From 305eb73a3bbfaf12500e4af5fee4200f9872655c Mon Sep 17 00:00:00 2001 From: Rasmus Viloma Date: Mon, 3 Aug 2026 21:06:33 +0300 Subject: [PATCH] docs(changeset): describe 0.1.0 as a release, not a migration --- .changeset/initial-release.md | 15 +++++++++++---- .changeset/rsc-namespace-exports.md | 17 ----------------- 2 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 .changeset/rsc-namespace-exports.md diff --git a/.changeset/initial-release.md b/.changeset/initial-release.md index 769de81..1a35b35 100644 --- a/.changeset/initial-release.md +++ b/.changeset/initial-release.md @@ -4,13 +4,14 @@ Initial release: headless chat UI primitives for React, unstyled and animation-free. -Eleven entry points, each a compound component (or a pure utility module) that renders -semantic DOM with `data-*` state attributes and takes a `render` prop for swapping the -underlying element: +Eleven entry points. Each component entry exports a namespace whose parts you compose +yourself — `Composer.Root`, `Composer.Container`, `Message.Root`, `Message.Text` — rendering +semantic DOM with `data-*` state attributes, and every part takes a `render` prop for +swapping the underlying element: - `/composer` — rich-text input over a purpose-built contenteditable engine: inline chips, `/` and `@` prefix-triggered command lists with fuzzy scoring, attachments, and the - ask-user questionnaire flow. One store per ``, or bring your own with + ask-user questionnaire flow. One store per ``, or bring your own with `Composer.createStore()` to drive it from outside the tree. - `/thread` — scroll container with at-bottom detection, auto-follow, prepend-aware restoration, and dock/overlay inset measurement. @@ -21,6 +22,12 @@ underlying element: - `/message-utils` — part segmentation, turn grouping, and reasoning/source derivation. - `/chip-markdown` — the self-describing chip wire format. +Works with React Server Components. The package ships one module per part, so a server +component can render a static transcript directly — `Message.Root`, `Message.Text`, +`Chip.Root` and friends resolve across the client boundary rather than coming back +`undefined`. The parts remain client components, so hooks and event handlers behave as +usual; reach for `"use client"` where you need them. + The types are framework-agnostic: an AI SDK `UIMessage` satisfies `ChatMessage` structurally, so SDK messages pass straight into the utilities and components with no adapter. Beyond the React 19 peer, the package pulls in only `@floating-ui/dom` (anchored diff --git a/.changeset/rsc-namespace-exports.md b/.changeset/rsc-namespace-exports.md deleted file mode 100644 index fd906a7..0000000 --- a/.changeset/rsc-namespace-exports.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"@intentface/chat": minor ---- - -**Breaking:** primitives are now namespace exports, and the root part is explicit. `` becomes ``, `` becomes ``, and likewise for `Thread`, `Steps`, `Reasoning`, `Chip`, `Attachments` and `AskUser`. Sub-component names (`Composer.Container`, `Message.Text`, …), hooks, and type names are unchanged, so the migration is mechanical: - -```diff -- -+ - {text} -- -+ -``` - -This makes the primitives usable from React Server Components. Previously every sub-component resolved to `undefined` in a server component, failing the render with `Element type is invalid… but got: undefined` — a server component importing a `"use client"` module receives a proxy of its *named exports* and cannot read properties off an exported value, which is where `Object.assign` put them. Rendering a static transcript from a server component now works; the parts remain client components, so interactive props and hooks behave exactly as before. - -The package also now ships unbundled, one module per source file, because a bundle can carry only one top-level `"use client"` directive and that collapses the per-part boundaries the above depends on. Two incidental wins from building with tsc: declarations are inferred properly (the previous isolated-declarations emit erased every compound component to `unknown`) and the production `react/jsx-runtime` is always used (the previous build emitted the development runtime, which throws `jsxDEV is not a function` in a consumer's production build).