All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Initial release.
Hooks
useTokenStream(source)— consumes anyAsyncIterable<string>orReadableStream<Uint8Array>and accumulates text, tracking the full streaming lifecycle (idle → streaming → complete | error). Exposestext,isStreaming,status,error,abort, andreset.useMessageStream(parts)— bridges Vercel AI SDKUIMessage.partstotext,reasoning,hasActiveToolCall,hasReasoning, andsourceUrls.useDebouncedStreaming(isStreaming, debounceMs?)— debounces the streaming boolean to prevent flicker between tokens.useAISDKStatus(chatStatus)— maps Vercel AI SDKuseChatstatus strings toStreamStatus.
Components
<StreamingText>— renders text that grows token-by-token with an optional blinking cursor (built-in or custom node). Renders as any HTML element viaasprop. Fully unstyled.<TypingIndicator>— animated "AI is thinking" indicator withdots,pulse, andbarvariants. Inherits color from parent. Fully accessible.<PartialRender>— renderer-prop component with error boundary for graceful partial-content rendering during streaming.<StreamGuard>— status-driven render slots (idle,streaming,complete,error) for type-safe lifecycle switching.
Adapters (streaming-ui-primitives/adapters)
fromFetchSSE(response, options?)— converts a rawfetchResponsetoAsyncIterable<string>. Modes:auto,text,sse-text,sse-json,vercel-ai.fromOpenAIChatStream(stream)— wraps OpenAI SDKchat.completions.stream().fromOpenAICompletionStream(stream)— wraps OpenAI SDK legacycompletions.create({ stream: true }).fromAnthropicStream(stream)— wraps Anthropic SDKmessages.stream().partsToText(parts, options?)— extracts plain text fromUIMessage.parts.hasActiveToolCall(parts)— returnstrueif any tool invocation is pending.fromUseChatStatus(status)— maps Vercel AI SDKuseChatstatus toStreamStatus.
Infrastructure
- Dual ESM + CJS build with full
.d.tsdeclarations viavite-plugin-dts. - GitHub Actions CI (unit tests, typecheck, E2E via Playwright against built Storybook).
- GitHub Actions OIDC-compliant npm publish on version tags.
- MIT license.