{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ascii-rain",
  "title": "ASCII Rain",
  "description": "A background of falling ASCII glyph columns with real DOM content on top.",
  "dependencies": [],
  "registryDependencies": [
    "https://dotgrain.space/r/engine.json"
  ],
  "files": [
    {
      "path": "registry/ui/ascii-rain.tsx",
      "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Quantize } from \"@/lib/dotgrain/quantize\";\nimport type { DitherTokens } from \"@/lib/dotgrain/types\";\n\nexport type AsciiRainProps = Partial<Omit<DitherTokens, \"mode\" | \"pattern\">> & {\n  /** Share of columns raining, 0–1. */\n  density?: number;\n  /** Tail length as a share of the height, 0–1. */\n  length?: 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 AsciiRain({ density, length, label, children, className, style, ref, ...tokens }: AsciiRainProps) {\n  return (\n    <div ref={ref} className={className} style={{ position: \"relative\", ...style }}>\n      <Quantize\n        source={{ kind: \"field\", field: \"rain\", params: { ...(density !== undefined && { density }), ...(length !== undefined && { length }) } }}\n        label={label}\n        {...tokens}\n        mode=\"ascii\"\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": [
      "ascii"
    ]
  },
  "categories": [
    "background"
  ],
  "type": "registry:ui"
}