{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "typewriter",
  "type": "registry:ui",
  "title": "Typewriter",
  "description": "Char reveal with caret.",
  "dependencies": [],
  "registryDependencies": [
    "bricked-css",
    "pixel-icon"
  ],
  "files": [
    {
      "path": "registry/bricked-ui/typewriter.tsx",
      "content": "import * as React from \"react\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\nimport { cn } from \"@/lib/utils\";\r\nimport { PixelIcon, type PixelIconInput } from \"./pixel-icon\";\r\n\r\nconst s = cva(\"bk-type\", {\r\n  variants: {\r\n    size: { sm: \"[--px:4px] [--cut:1.5px] [--icon:3px] text-[11px]\", md: \"[--px:6px] [--cut:2px] [--icon:4px] text-[14px]\", lg: \"[--px:8px] [--cut:3px] [--icon:5px] text-[18px]\" },\r\n    variant: { primary: \"bg-brick text-ink\", dark: \"bg-ink text-on-dark\" },\r\n  },\r\n  defaultVariants: { size: \"md\", variant: \"primary\" },\r\n});\r\nexport interface TypewriterProps extends Omit<React.ComponentProps<\"p\">, \"children\">, VariantProps<typeof s> { text: string; icon?: PixelIconInput; }\r\nexport function Typewriter({ className, size, variant, text, ...props }: TypewriterProps) {\r\n  const [n, setN] = React.useState(0);\r\n  React.useEffect(() => { const t = setInterval(() => setN(v => { if (v >= text.length) { clearInterval(t); return v; } return v + 1; }), 60); return () => clearInterval(t); }, [text]);\r\n  return (<p className={cn(s({ size, variant }), className)} aria-label={text} {...props}>{text.slice(0, n)}<span className=\"bk-caret\" aria-hidden=\"true\" /></p>);\r\n}\r\n",
      "type": "registry:ui",
      "target": "components/ui/typewriter.tsx"
    }
  ]
}