{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "streaming-text-demo",
  "title": "Streaming Text: Example",
  "description": "A reply streaming in.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.cuelark.com/r/streaming-text.json"
  ],
  "files": [
    {
      "path": "src/registry/cuelark/examples/streaming-text-demo.tsx",
      "content": "import * as React from \"react\";\n\nimport { StreamingText } from \"@/registry/cuelark/ui/streaming-text\";\n\nconst reply =\n  \"Here is the plan: move the tax rule into one helper, call it from the API and the PDF renderer, and cover both with tests. Invoices without a tax ID keep their current totals, so nothing changes for most customers.\";\n\nexport default function StreamingTextDemo() {\n  const [n, setN] = React.useState(0);\n  React.useEffect(() => {\n    const id = setInterval(() => setN((v) => (v >= reply.length + 40 ? 0 : v + 6)), 70);\n    return () => clearInterval(id);\n  }, []);\n  return <StreamingText className=\"max-w-lg\" text={reply.slice(0, n)} streaming={n < reply.length} />;\n}\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "streaming-text",
    "example"
  ],
  "type": "registry:component"
}