{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "loader",
  "title": "Loader",
  "description": "An indeterminate dither or ASCII spinner that announces its label as a status.",
  "dependencies": [],
  "registryDependencies": [
    "https://dotgrain.space/r/engine.json"
  ],
  "files": [
    {
      "path": "registry/ui/loader.tsx",
      "content": "\"use client\";\n\nimport type { CSSProperties, Ref } from \"react\";\nimport { Quantize } from \"@/lib/dotgrain/quantize\";\nimport type { DitherTokens } from \"@/lib/dotgrain/types\";\n\nexport type LoaderProps = Partial<DitherTokens> & {\n  /** Announced to screen readers; not shown. */\n  label?: string;\n  /** Width and height in CSS pixels. */\n  size?: number;\n  className?: string;\n  style?: CSSProperties;\n  ref?: Ref<HTMLDivElement>;\n};\n\nexport function Loader({ label = \"Loading\", size = 48, className, style, ref, ...tokens }: LoaderProps) {\n  return (\n    <div ref={ref} role=\"status\" className={className} style={{ position: \"relative\", display: \"inline-block\", width: size, height: size, ...style }}>\n      <Quantize source={{ kind: \"field\", field: \"spin\" }} {...tokens} style={{ position: \"absolute\", inset: 0 }} />\n      {/* Visually hidden, still read out. */}\n      <span style={{ position: \"absolute\", width: 1, height: 1, overflow: \"hidden\", clip: \"rect(0 0 0 0)\", whiteSpace: \"nowrap\" }}>{label}</span>\n    </div>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "modes": [
      "dither",
      "ascii"
    ]
  },
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}