{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "streaming-text-demo",
  "title": "Streaming Text Demo",
  "description": "A worked example of Streaming Text: Text that arrives a piece at a time from an async source, with a cursor while it runs and sentence-level announcements for screen readers.",
  "dependencies": [
    "lucide-react@^1.31.0"
  ],
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/streaming-text.json"
  ],
  "files": [
    {
      "path": "components/demos/streaming-text-demo.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { RestartButton } from \"@/components/demos/restart-button\"\nimport { StreamingText } from \"@/registry/default/streaming-text/streaming-text\"\n\nconst script =\n  \"I checked the three files you changed. The migration looks right, but `users.email` is still nullable, so the unique index will fail on the second empty row. Want me to add the backfill first?\"\n\nexport function StreamingTextDemo() {\n  const [runId, setRunId] = React.useState(0)\n  const [done, setDone] = React.useState(false)\n\n  return (\n    <div className=\"grid w-full max-w-xl gap-4\">\n      <StreamingText\n        key={runId}\n        text={script}\n        speed={55}\n        className=\"text-[0.95rem] leading-relaxed\"\n        onDone={() => setDone(true)}\n      />\n\n      {done ? (\n        <RestartButton\n          onClick={() => {\n            setDone(false)\n            setRunId((current) => current + 1)\n          }}\n        />\n      ) : null}\n    </div>\n  )\n}\n",
      "type": "registry:example"
    },
    {
      "path": "components/demos/restart-button.tsx",
      "content": "\"use client\"\n\nimport { RotateCcw } from \"lucide-react\"\n\nexport function RestartButton({ onClick }: { onClick: () => void }) {\n  return (\n    <button className=\"restore-button\" type=\"button\" onClick={onClick}>\n      <RotateCcw aria-hidden=\"true\" size={15} /> Replay\n    </button>\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}