"@json-render/core": minor "@json-render/react": minor "@json-render/react-native": minor "@json-render/codegen": minor
Chat mode (inline GenUI), AI SDK integration, two-way binding, and expression-based visibility/props.
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 pipelinesFirst-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 streamsuseChatUI() — 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 expressionsProps 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.
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, notapplySpecPatch() — 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 paramsFull-featured chat example (examples/chat) with AI agent, tool calls (crypto, GitHub, Hacker News, weather, search), theme toggle, and streaming UI generation.
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{ $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 → TreeVisitor