{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dither-field",
  "title": "Dither Field",
  "description": "An animated dithered background field with real DOM content on top.",
  "dependencies": [],
  "registryDependencies": [
    "https://dotgrain.space/r/engine.json"
  ],
  "files": [
    {
      "path": "registry/ui/dither-field.tsx",
      "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Quantize } from \"@/lib/dotgrain/quantize\";\nimport type { DitherTokens, FieldName } from \"@/lib/dotgrain/types\";\n\nexport type DitherFieldProps = Partial<DitherTokens> & {\n  field?: Exclude<FieldName, \"progress\" | \"rain\" | \"spin\" | \"shimmer\" | \"frame\">;\n  /** Field parameters, e.g. `{ scale: 3 }` for noise or `{ angle: 90 }` for linear. */\n  params?: Record<string, number>;\n  /** Brighten a soft spot under the pointer (mouse and touch). Off under reduced motion. */\n  interactive?: boolean;\n  /** Radius of the pointer spot in CSS pixels. */\n  cursorRadius?: number;\n  /** Announces the background as one image; omit when decorative. */\n  label?: string;\n  children?: ReactNode;\n  className?: string;\n  style?: CSSProperties;\n  ref?: Ref<HTMLDivElement>;\n};\n\nexport function DitherField({\n  field = \"noise\",\n  params,\n  interactive = true,\n  cursorRadius,\n  label,\n  children,\n  className,\n  style,\n  ref,\n  ...tokens\n}: DitherFieldProps) {\n  return (\n    <div ref={ref} className={className} style={{ position: \"relative\", ...style }}>\n      <Quantize\n        source={{ kind: \"field\", field, params }}\n        label={label}\n        interactive={interactive}\n        cursorRadius={cursorRadius}\n        {...tokens}\n        style={{ position: \"absolute\", inset: 0 }}\n      />\n      {children !== undefined && <div style={{ position: \"relative\" }}>{children}</div>}\n    </div>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "modes": [
      "dither",
      "ascii"
    ]
  },
  "categories": [
    "background"
  ],
  "type": "registry:ui"
}