2d70fab: New @json-render/shadcn package, event handles, built-in actions, and stream improvements.### New: @json-render/shadcn Package
Pre-built shadcn/ui component library for json-render. 30+ components built on Radix UI + Tailwind CSS, ready to use with defineCatalog and defineRegistry.
shadcnComponentDefinitions — Zod-based catalog definitions for all components (server-safe, no React dependency via @json-render/shadcn/catalog)shadcnComponents — React implementations for all components### New: Event Handles (on())
Components now receive an on(event) function in addition to emit(event). The on() function returns an EventHandle with metadata:
emit() — fire the eventshouldPreventDefault — whether any action binding requested preventDefaultbound — whether any handler is bound to this event### New: BaseComponentProps
Catalog-agnostic base type for component render functions. Use when building reusable component libraries (like @json-render/shadcn) that are not tied to a specific catalog.
### New: Built-in Actions in Schema
Schemas can now declare builtInActions — actions that are always available at runtime and automatically injected into prompts. The React schema declares setState, pushState, and removeState as built-in, so they appear in prompts without needing to be listed in catalog actions.
### New: preventDefault on ActionBinding
Action bindings now support a preventDefault boolean field, allowing the LLM to request that default browser behavior (e.g. navigation on links) be prevented.
### Improved: Stream Transform Text Block Splitting
createJsonRenderTransform() now properly splits text blocks around spec data by emitting text-end/text-start pairs. This ensures the AI SDK creates separate text parts, preserving correct interleaving of prose and UI in message.parts.
### Improved: defineRegistry Actions Requirement
defineRegistry now conditionally requires the actions field only when the catalog declares actions. Catalogs with no actions (e.g. actions: {}) no longer need to pass an empty actions object.
ea97aff: Fix infinite re-render loop caused by multiple unbound form inputs (Input, Textarea, Select) all registering field validation at the same empty path with different checks configs, causing them to overwrite each other endlessly. Stabilize context values in ActionProvider, ValidationProvider, and useUIStream by using refs for state/callbacks, preventing unnecessary re-render cascades on every state update.06b8745: Chat mode (inline GenUI), AI SDK integration, two-way binding, and expression-based visibility/props.### New: Chat Mode (Inline GenUI)
Two generation modes: Generate (JSONL-only, the default) and Chat (text + JSONL inline). Chat mode lets AI respond conversationally with embedded UI specs — ideal for chatbots and copilot experiences.
catalog.prompt({ mode: "chat" }) generates a chat-aware system promptpipeJsonRender() server-side transform separates text from JSONL patches in a mixed streamcreateJsonRenderTransform() low-level TransformStream for custom pipelines### New: AI SDK Integration
First-class Vercel AI SDK support with typed data parts and stream utilities.
SpecDataPart type for data-spec stream parts (patch, flat, nested payloads)SPEC_DATA_PART / SPEC_DATA_PART_TYPE constants for type-safe part filteringcreateMixedStreamParser() for parsing mixed text + JSONL streams### New: React Chat Hooks
useChatUI() — full chat hook with message history, streaming, and spec extractionuseJsonRenderMessage() — extract spec + text from a message's parts arraybuildSpecFromParts() / getTextFromParts() — utilities for working with AI SDK message partsuseBoundProp() — two-way binding hook for $bindState / $bindItem expressions### New: Two-Way Binding
Props can now use $bindState and $bindItem expressions for two-way data binding. The renderer resolves bindings and passes a bindings map to components, enabling write-back to state.
### New: Expression-Based Props and Visibility
Replaced string token rewriting with structured expression objects:
{ $state: "/path" }, { $item: "field" }, { $index: true }{ $state: "/path", eq: "value" }, { $item: "active" }, { $index: true, gt: 0 }{ $and: [...] }, { $or: [...] }, and implicit AND via arrayseq, neq, gt, gte, lt, lte, not### New: Utilities
applySpecPatch() — typed convenience wrapper for applying a single patch to a SpecnestedToFlat() — convert nested tree specs to flat { root, elements } formatresolveBindings() / resolveActionParam() — resolve binding paths and action params### New: Chat Example
Full-featured chat example (examples/chat) with AI agent, tool calls (crypto, GitHub, Hacker News, weather, search), theme toggle, and streaming UI generation.
### Improved: Renderer
ElementRenderer is now React.memo'd for better performance in repeat listsemit is always defined (never undefined) — no more optional chaining neededresolveActionParam supporting $item, $index, $state### Breaking Changes
{ $path } / { path } replaced by { $state }, { $item }, { $index }{ path } → { $state }, { and/or/not } → { $and/$or } with not as operator flag{ path: string } → { $state: string }repeat.path → repeat.statePathpath → statePath in setState action paramsactionHandlers → handlers on JSONUIProvider/ActionProviderAuthState type and { auth } visibility conditions removed — model auth as regular statecreateCatalog, generateCatalogPrompt, generateSystemPrompt, ComponentDefinition, CatalogConfig, SystemPromptOptions removedcreateRendererFromCatalog, rewriteRepeatTokenstraverseTree → traverseSpec, SpecVisitor → TreeVisitor429e456: Fix LLM hallucinations by dynamically generating prompt examples from the user's catalog instead of hardcoding component names. Adds optional example field to ComponentDefinition with Zod schema introspection fallback. Mentions RFC 6902 in output format section.3d2d1ad: Add @json-render/react-native package, event system (emit replaces onAction), repeat/list rendering, user prompt builder, spec validation, and rename DataProvider to StateProvider.dd17549: remove key/parentKey from flat specs, RFC 6902 compliance for SpecStream61ee8e5: include remove op in system prompt54bce09: add defineRegistry function