{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ai-streaming-text",
  "type": "registry:component",
  "title": "AI Streaming Text",
  "description": "Readable text block for partial assistant output with an optional live cursor while tokens stream in.",
  "dependencies": [
    "@vllnt/ui@^0.2.1"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/ai-streaming-text/ai-streaming-text.tsx",
      "content": "import { forwardRef } from \"react\";\n\nimport { cn } from \"@vllnt/ui\";\n\nexport type AIStreamingTextProps = React.ComponentPropsWithoutRef<\"div\"> & {\n  /** Cursor glyph shown while streaming. */\n  cursor?: string;\n  /** Whether new content is still arriving. */\n  isStreaming?: boolean;\n  /** Whether to show the streaming cursor. */\n  showCursor?: boolean;\n  /** Text content available from the stream. */\n  text: string;\n};\n\nconst AIStreamingText = forwardRef<HTMLDivElement, AIStreamingTextProps>(\n  (\n    {\n      className,\n      cursor = \"▍\",\n      isStreaming = false,\n      showCursor = true,\n      text,\n      ...props\n    },\n    ref,\n  ) => {\n    return (\n      <div\n        aria-live={isStreaming ? \"polite\" : undefined}\n        className={cn(\n          \"text-sm leading-6 text-foreground whitespace-pre-wrap\",\n          className,\n        )}\n        ref={ref}\n        {...props}\n      >\n        {text}\n        {isStreaming && showCursor ? (\n          <span\n            aria-hidden=\"true\"\n            className=\"ml-0.5 inline-block animate-pulse text-muted-foreground\"\n          >\n            {cursor}\n          </span>\n        ) : null}\n      </div>\n    );\n  },\n);\n\nAIStreamingText.displayName = \"AIStreamingText\";\n\nexport { AIStreamingText };\n",
      "type": "registry:component"
    }
  ],
  "version": "0.2.1",
  "stability": "stable"
}
