"@json-render/core": minor "@json-render/react": minor
New @json-render/shadcn package, event handles, built-in actions, and stream improvements.
@json-render/shadcn PackagePre-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 componentson())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 eventBaseComponentPropsCatalog-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.
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.
preventDefault on ActionBindingAction bindings now support a preventDefault boolean field, allowing the LLM to request that default browser behavior (e.g. navigation on links) be prevented.
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.
defineRegistry Actions RequirementdefineRegistry 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.