* feat: add @json-render/ink terminal renderer and ink-chat example
Adds a new `@json-render/ink` package that brings json-render specs to
terminal UIs via Ink (React for CLIs). Includes 24 standard components
(layout, text, inputs, markdown, etc.), context providers for state,
validation, visibility, actions, focus, and repeat scopes, plus a
streaming JSONL hook for progressive spec rendering.
Also adds an `ink-chat` example app demonstrating an AI chat interface
in the terminal with streaming responses, tool calls, and interactive
wizard flows.
Includes 76 tests (24 unit + 52 e2e), docs page, and web app integration.
* feat: show live spec preview during streaming
Render the spec progressively as JSONL patches arrive instead of only
showing a spinner. The preview disappears when streaming completes and
the finalized message replaces it in history.
* feat: clip streaming preview to 6 lines
* refactor: move spinner into input box, show full streaming preview
* fix: skip spacer during streaming to prevent clipping tall previews
* fix: strip invisible colors on dark terminal backgrounds
Drop foreground colors like "black" and "#000000" from AI-generated
specs so text remains readable on dark terminals. Removed hardcoded
color="black" from Badge and added safeColor() guard to all components
that accept user-specified color props.
* fix: always show spacer to keep input pinned to bottom
* fix: show dash placeholder for empty values in Table and KeyValue
Empty or null values in Table cells and KeyValue now render as "—"
instead of blank space. Also removed dimColor from ListItem subtitle
and trailing for better readability on dark terminals.
* fix: division by zero in Sparkline sampling when maxWidth is 1
* fix: Review feedback
Signed-off-by: Alexis Rico <sferadev@gmail.com>
* fix: Update readme
Signed-off-by: Alexis Rico <sferadev@gmail.com>
---------
Signed-off-by: Alexis Rico <sferadev@gmail.com>
* add yaml wire format and universal edit modes
**Summary**
- Add `@json-render/yaml` package with streaming parser, YAML prompt generation, and AI SDK transform
- Add universal edit modes (patch, merge, diff) to `@json-render/core`, usable across both JSONL and YAML formats
- Integrate YAML support and edit mode selection into the web playground with format toggle, token usage display, and prompt caching
* improvements
* fixes
* fixes ci
* docs
* feat: add strict mode to jsonSchema() for LLM structured outputs
This PR adds support for generating strict JSON schemas compatible with LLM structured output APIs (OpenAI, Google Gemini, Anthropic, etc.).
## Problem
`catalog.jsonSchema()` was generating schemas that OpenAI's strict mode rejected due to:
- Use of `propertyNames` keyword (not permitted)
- Missing `additionalProperties: false` on nested objects
- Optional properties not being handled correctly for strict validation
## Changes
- Added `JsonSchemaOptions` interface with `strict` boolean flag
- Updated `catalog.jsonSchema()` to accept optional `JsonSchemaOptions` parameter
- When `strict: true`, the schema generator:
- Sets `additionalProperties: false` on all object types
- Removes `propertyNames` constraints
- Lists all properties (including optional ones) in `required` arrays, using nullable types for optionals
- Converts record types to fixed-key objects without additional property schemas
- Fixed Zod 4 compatibility issue in type name resolution
- Added comprehensive test suite covering all strict mode requirements
- Exported `JsonSchemaOptions` type from core package
## Usage
```typescript
// Default behavior (unchanged)
const schema = catalog.jsonSchema();
// Strict mode for LLM APIs
const strictSchema = catalog.jsonSchema({ strict: true });
```
The default behavior remains unchanged to maintain backward compatibility.
Fixes#180
* fix: document record type limitation and add anyOf nullable test
- Add clear JSDoc documenting that record/map types become opaque objects
in strict mode (LLM strict schemas require additionalProperties: false)
- Improve inline comment on the record case in zodToJsonSchema
- Add test exercising the anyOf nullable wrapping for optional properties
using a non-record schema so the path is directly verified
---------
Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
* solid: add renderer implementation
This adds a Solid renderer with the same core capabilities as the
existing framework packages, including typed registry helpers,
providers, streaming hooks, docs, and example integration.
* fix: solid reactivity bugs in validation + state
---------
Co-authored-by: Patrick <phall@Patricks-MacBook-Pro.local>
Fixes a React runtime error where `useRef` was null due to multiple React instances being bundled.
## Changes Made
- **Vite configuration**: Added `resolve.dedupe` for `react` and `react-dom` in `examples/mcp/vite.config.ts` to ensure only one instance of React is used during bundling
- **React version constraints**: Changed from exact versions (`19.2.3`) to flexible ranges (`^19.0.0`) in `examples/mcp/package.json` to improve compatibility
- **Build entry point**: Added new `build-app-html-entry.ts` file and updated `tsup.config.ts` to include it as a build target
- **Package exports**: Added `./build-app-html` export path in `packages/mcp/package.json`
- **Minor fixes**: Updated Next.js type reference path in stripe-app example
The root cause was React being duplicated in the bundle, causing hooks like `useRef` to fail when components tried to access React's internal state from the wrong instance. The `dedupe` configuration ensures Vite resolves all React imports to the same module instance.
Fixes#190
* add react-email workspace dependencies
* add react-email package
* add react-email example with Vercel Invite, Stripe Welcome and Nike Receipt
* add render tests for react-email package
* fix missing style prop on stripe-welcome logo Image
* add react email documentation
* add json render react email skill
* fix @internal/react-state alias in vitest config
Pre-existing issue: vitest could not resolve @internal/react-state,
causing 6 test suites in packages/react and packages/react-pdf to fail.
* fix PR review feedback
- fix tsconfig: remove rootDir, expand include for test imports
- fix render tests: add non-null assertions for noUncheckedIndexedAccess
- fix dev script: add portless to match other examples
- fix .env.example: correct comment from video to email generation
- fix docs: add blank line before heading in installation page
* merge latest
* fix: update tsconfig extends from @repo to @internal/typescript-config
* fixes
* fixes
---------
Co-authored-by: WManzoli <willmanzoli@gmail.com>
Co-authored-by: Chris Tate <chris@ctate.dev>
* image
* fixes
* fixes
* fix ci
* fix ci
* disable @next/next/no-img-element rule in ESLint configuration
* update route.ts to use path.join for font resolution and adjust next-env.d.ts import path
* feat: add @xstate/store integration using atoms
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add README for @json-render/xstate-store
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: rename xstateStoreStateStore to xstateStore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* README updates
* Keep naming convention
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- `@json-render/react` barrel-imports React contexts that call `createContext`, which crashes in Next.js App Router API routes (RSC runtime strips `createContext`)
- Updated all docs, READMEs, examples, and skills to import `schema` from `@json-render/react/schema` instead of `@json-render/react`
- For combined imports, split into separate `schema` (subpath) and client API (main entry) lines
Fixes#123
* external store adapter for state management
Introduces a `StateStore` interface that lets users plug in their own state management (Redux, Zustand, XState, etc.) instead of being locked into the internal `useState`-based store.
- Added `StateStore` interface and `createStateStore()` factory to `@json-render/core`
- `StateProvider`, `JSONUIProvider`, and `createRenderer` now accept an optional `store` prop for controlled mode
- When `store` is provided, it becomes the single source of truth (`initialState`/`onStateChange` are ignored)
- When `store` is omitted, everything works exactly as before (fully backward compatible)
- Applied across all platform packages: react, react-native, react-pdf
* improvements
* update docs
* improvements
* fixes
* fix CI
* add store adapters
* fixes
* fixes
* fixes
* fixes
* e2e tests
* improvements
* fixes
* fixes
* fixes
* fixes
* update lockfile for widened react peer deps
* fix dashboard build
When form inputs lack `$bindState` bindings (like in the homepage contact form simulation), `useFieldValidation` was called with `bindings?.value ?? ""` as the path. All three inputs registered at the same `""` path but with different validation configs. Each `registerField` call overwrote the previous one, triggering a re-render where the other inputs would see a mismatched config and re-register -- creating an infinite loop.
- Fix infinite re-render loop caused by multiple unbound form inputs (Input, Textarea, Select) all registering field validation at 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