Commit Graph

194 Commits

Author SHA1 Message Date
github-actions[bot] 9adcc09204 chore: version packages (#248)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.16.0 @json-render/core@0.16.0 @json-render/image@0.16.0 @json-render/ink@0.16.0 @json-render/jotai@0.16.0 @json-render/mcp@0.16.0 @json-render/next@0.16.0 @json-render/react-email@0.16.0 @json-render/react-native@0.16.0 @json-render/react-pdf@0.16.0 @json-render/react-three-fiber@0.16.0 @json-render/react@0.16.0 @json-render/redux@0.16.0 @json-render/remotion@0.16.0 @json-render/shadcn-svelte@0.16.0 @json-render/shadcn@0.16.0 @json-render/solid@0.16.0 @json-render/svelte@0.16.0 @json-render/vue@0.16.0 @json-render/xstate@0.16.0 @json-render/yaml@0.16.0 @json-render/zustand@0.16.0
2026-03-27 18:17:20 -07:00
Chris Tate 519a538aae v0.16.0 (#247) 2026-03-27 16:19:38 -07:00
Chris Tate a99d68c481 next (#246)
* next

* next example

* component catalog

* fixes

* fixes
@json-render/next@0.15.0
2026-03-27 16:10:13 -07:00
maxffarrell 40892a6af0 feat: shadcn-svelte renderer (#227)
* init

* fix: resolve all type errors, runtime bugs, and test failures in @json-render/shadcn-svelte

- Add /index.js extensions to all ../ui/* imports (NodeNext moduleResolution)
- Type shadcnComponents as Record<string, Component<any>> to fix d.ts generation
- Call getBoundProp() once at top level instead of inside a binding() function
  called from event handlers (getContext() only works during initialization)
- Move getOptionalValidationContext() call to top level; update createValidation()
  to accept the context as first param instead of calling getContext() itself
- Wrap validation.register() in untrack() to break the fieldConfigs read-write
  cycle that caused effect_update_depth_exceeded in tests
- Fix implicit any on Input onkeydown handler (KeyboardEvent type)
- Use untrack() for $state() initializers that read reactive props values
- Call getStateValue() once at top level in Dialog/Drawer (not in a function
  called from event handlers)
- Fix test fixtures: use named imports { StateProvider, ValidationProvider }
- Add server.deps.inline for bits-ui and @lucide/svelte so vitest can process
  their .svelte source files; add root svelte.config.js with runes: true
- Add role/aria-modal/tabindex/onkeydown a11y attributes to Dialog and Drawer
- Fix self-closing non-void elements in Skeleton, Spinner, Textarea

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update shadcn-svelte components

* fixes

* fixes

* fix: address PR review issues for shadcn-svelte renderer

- Fix missing comma in .changeset/config.json (invalid JSON)
- Fix Slider.svelte type errors (single-mode expects number, not array)
- Replace raw <button> with shadcn Button in Pagination.svelte
- Remove global font import and body/html overrides from app.css
- Remove root svelte.config.js (duplicates package-level config)
- Revert unrelated packageManager version bump

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@json-render/shadcn-svelte@0.1.0
2026-03-24 10:38:11 -05:00
github-actions[bot] 7628640984 chore: version packages (#243)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.15.0 @json-render/core@0.15.0 @json-render/image@0.15.0 @json-render/ink@0.15.0 @json-render/jotai@0.15.0 @json-render/mcp@0.15.0 @json-render/react-email@0.15.0 @json-render/react-native@0.15.0 @json-render/react-pdf@0.15.0 @json-render/react-three-fiber@0.15.0 @json-render/react@0.15.0 @json-render/redux@0.15.0 @json-render/remotion@0.15.0 @json-render/shadcn@0.15.0 @json-render/solid@0.15.0 @json-render/svelte@0.15.0 @json-render/vue@0.15.0 @json-render/xstate@0.15.0 @json-render/yaml@0.15.0 @json-render/zustand@0.15.0
2026-03-23 13:30:11 -05:00
Chris Tate bf3a7ec61d prepare v0.15 release (#242) 2026-03-23 13:23:41 -05:00
Chris Tate 453484985a ink updates (#241)
* ink updates

* no emojis

* design

* fit content

* fixes

* fixes
2026-03-23 13:12:31 -05:00
Alexis Rico d69a59ea9d feat: add @json-render/ink terminal renderer (#240)
* 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>
@json-render/ink@0.14.1
2026-03-23 11:47:36 -05:00
Chris Tate c43b36e01c fixes (#238) 2026-03-20 21:53:51 -05:00
Chris Tate c538bb1604 fixes (#237) 2026-03-20 21:49:59 -05:00
Chris Tate e73146e622 fix ge build (#236) 2026-03-20 21:46:54 -05:00
Chris Tate f4d13b6612 game engine example (#235)
* game engine

* fixes

* fixes

* fix controls

* og

* fixes

* fixes
2026-03-20 21:43:06 -05:00
Zorn b7993ed4ae fix: deduplicate remotion to fix useVideoConfig in production (#232)
pnpm creates separate copies of remotion@4.0.418 when peer dependency
versions differ between workspace packages (e.g. react@19.2.3 vs
react@19.2.4). This causes two React contexts, so useVideoConfig()
in @json-render/remotion cannot see the Player's context.

Add turbopack.resolveAlias to force all remotion imports to resolve
from the app's node_modules, ensuring a single instance.
2026-03-20 09:12:28 -05:00
Chris Tate 4bb1151b6c examples (#229)
* add examples

* live demos

* og's

* r3f mobile

* rate limits

* fix lint
2026-03-19 01:55:28 -05:00
github-actions[bot] ad557b2309 chore: version packages (#226)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.14.1 @json-render/core@0.14.1 @json-render/image@0.14.1 @json-render/jotai@0.14.1 @json-render/mcp@0.14.1 @json-render/react-email@0.14.1 @json-render/react-native@0.14.1 @json-render/react-pdf@0.14.1 @json-render/react-three-fiber@0.14.1 @json-render/react@0.14.1 @json-render/redux@0.14.1 @json-render/remotion@0.14.1 @json-render/shadcn@0.14.1 @json-render/solid@0.14.1 @json-render/svelte@0.14.1 @json-render/vue@0.14.1 @json-render/xstate@0.14.1 @json-render/yaml@0.14.1 @json-render/zustand@0.14.1
2026-03-17 17:44:18 -05:00
Chris Tate 43b7515a24 chore: patch release (#225)
* chore: add minor changeset for v0.15 release

* chore: change changeset to patch release

---------

Co-authored-by: ctate <366502+ctate@users.noreply.github.com>
2026-03-17 17:37:29 -05:00
Laurens van der Helm e16c5ef477 feat: add yaml format support to buildUserPrompt (#223) 2026-03-17 13:40:28 -05:00
github-actions[bot] 22545b49cc chore: version packages (#221)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.14.0 @json-render/core@0.14.0 @json-render/image@0.14.0 @json-render/jotai@0.14.0 @json-render/mcp@0.14.0 @json-render/react-email@0.14.0 @json-render/react-native@0.14.0 @json-render/react-pdf@0.14.0 @json-render/react-three-fiber@0.14.0 @json-render/react@0.14.0 @json-render/redux@0.14.0 @json-render/remotion@0.14.0 @json-render/shadcn@0.14.0 @json-render/solid@0.14.0 @json-render/svelte@0.14.0 @json-render/vue@0.14.0 @json-render/xstate@0.14.0 @json-render/yaml@0.14.0 @json-render/zustand@0.14.0
2026-03-13 17:05:54 -05:00
Chris Tate a8afd8bfe2 prepare v0.14 (#220) 2026-03-13 13:50:56 -05:00
Chris Tate dc489601be add yaml wire format and universal edit modes (#219)
* 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
@json-render/yaml@0.13.0
2026-03-13 13:37:21 -05:00
Chris Tate 7758d4bbd5 faster ci (#212)
* faster ci

* fix workflow
2026-03-12 22:47:02 -05:00
github-actions[bot] 6225fc41eb chore: version packages (#211)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.13.0 @json-render/core@0.13.0 @json-render/image@0.13.0 @json-render/jotai@0.13.0 @json-render/mcp@0.13.0 @json-render/react-email@0.13.0 @json-render/react-native@0.13.0 @json-render/react-pdf@0.13.0 @json-render/react-three-fiber@0.13.0 @json-render/react@0.13.0 @json-render/redux@0.13.0 @json-render/remotion@0.13.0 @json-render/shadcn@0.13.0 @json-render/solid@0.13.0 @json-render/svelte@0.13.0 @json-render/vue@0.13.0 @json-render/xstate@0.13.0 @json-render/zustand@0.13.0
2026-03-12 10:20:48 -05:00
Chris Tate 5b32de8720 prepare v0.13 (#210) 2026-03-12 10:18:18 -05:00
Chris Tate f6d1c5134b react-three-fiber (#209) @json-render/react-three-fiber@0.12.1 2026-03-12 10:14:11 -05:00
Chris Tate 316439fcd7 add solid example (#208) 2026-03-11 22:54:56 -05:00
Chris Tate c180f529a0 feat: add strict mode to jsonSchema() for LLM structured outputs (#193)
* 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>
2026-03-11 22:17:09 -05:00
Chris Tate c3c0a36f20 better visual (#206) 2026-03-11 12:16:51 -05:00
Patrick Hall 9bb82604f0 solid: add renderer implementation (#201)
* 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>
@json-render/solid@0.12.0
2026-03-11 09:12:07 -05:00
github-actions[bot] caa90b8b84 chore: version packages (#204)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.12.1 @json-render/core@0.12.1 @json-render/image@0.12.1 @json-render/jotai@0.12.1 @json-render/mcp@0.12.1 @json-render/react-email@0.12.1 @json-render/react-native@0.12.1 @json-render/react-pdf@0.12.1 @json-render/react@0.12.1 @json-render/redux@0.12.1 @json-render/remotion@0.12.1 @json-render/shadcn@0.12.1 @json-render/svelte@0.12.1 @json-render/vue@0.12.1 @json-render/xstate@0.12.1 @json-render/zustand@0.12.1
2026-03-11 02:19:24 -05:00
Chris Tate 54a1ecf817 Add v0.12.1 release changeset with mode renames and MCP fixes (#203)
This PR adds the changeset file to prepare for the v0.12.1 release, documenting important breaking changes and bug fixes.

## Changes

**@json-render/core**
- Renamed generation modes from `"generate"`/`"chat"` to `"standalone"`/`"inline"` (old names deprecated with warnings)

**@json-render/mcp**  
- Fixed React duplicate module error causing `useRef` to return null by adding Vite `resolve.dedupe` configuration
- Added `./build-app-html` export entry point

**Other improvements**
- Updated homepage URLs across all packages to https://json-render.dev
- Reorganized skills directory structure
- Added skills documentation page to web app

Fixes #198
2026-03-11 02:09:10 -05:00
Chris Tate dc9e9d17f3 rename modes (#197)
* rename modes

* improvements

* fixes

* fix homepage
2026-03-10 15:07:47 -05:00
Chris Tate 1977fb3a11 fix(mcp): resolve React duplicate module error with dedupe config (#192)
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
2026-03-09 21:21:07 -05:00
Chris Tate 4606c01085 skills page (#188) 2026-03-06 20:39:07 -06:00
Chris Tate c1a700d719 cleaner skills (#187) 2026-03-06 20:22:56 -06:00
github-actions[bot] 6f15faaae0 chore: version packages (#186)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.12.0 @json-render/core@0.12.0 @json-render/image@0.12.0 @json-render/jotai@0.12.0 @json-render/mcp@0.12.0 @json-render/react-email@0.12.0 @json-render/react-native@0.12.0 @json-render/react-pdf@0.12.0 @json-render/react@0.12.0 @json-render/redux@0.12.0 @json-render/remotion@0.12.0 @json-render/shadcn@0.12.0 @json-render/svelte@0.12.0 @json-render/vue@0.12.0 @json-render/xstate@0.12.0 @json-render/zustand@0.12.0
2026-03-06 20:02:39 -06:00
Chris Tate 63c339b4bb prepare 0.12.0 (#185) 2026-03-06 19:58:08 -06:00
Chris Tate 1cc87310c9 mcp (#184)
* mcp

* fix lint
@json-render/mcp@0.11.0
2026-03-06 19:41:27 -06:00
Chris Tate 5b929dffa6 fix(svelte): correct JSDoc comment and add missing zod peer dependency (#183)
Fixes #182
2026-03-06 19:16:17 -06:00
Simon H 512f7fe5c5 feat: Svelte-renderer (#168)
* create svelte-renderer

* helpers

* reactive API

* turn into provider components

* fixes

* examples

* docs

* correct component props for catalog, harmonize defineRegistry API with other APis

* shuffle things around

* createRenderer

* on

* boundary/warning

* functions

* fix

* fix types
@json-render/svelte@0.6.1
2026-03-06 17:31:06 -06:00
Lucian Fialho b6f12d4d53 Feat/react email support (#159)
* 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>
@json-render/react-email@0.8.0
2026-03-02 16:43:03 -06:00
Chris Tate f29b1c2ef6 adds predev for portless to vue/vite (#178) 2026-03-02 11:52:08 -06:00
Michał Czapliński 8968bd648a Add missing portless dependency (#143)
* add portless dependency to package.json and update pnpm-lock.yaml

* fix: Add a `predev` command which warns that global portless install is required.

* fix: remove portless dependency

* fix: revert changes to pnpm-lock.yml

* revert again after pulling latest changes
2026-03-02 11:43:55 -06:00
github-actions[bot] 023ca789b2 chore: version packages (#176)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.11.0 @json-render/core@0.11.0 @json-render/image@0.11.0 @json-render/jotai@0.11.0 @json-render/react-native@0.11.0 @json-render/react-pdf@0.11.0 @json-render/react@0.11.0 @json-render/redux@0.11.0 @json-render/remotion@0.11.0 @json-render/shadcn@0.11.0 @json-render/vue@0.11.0 @json-render/xstate@0.11.0 @json-render/zustand@0.11.0
2026-02-27 13:29:16 -06:00
Chris Tate 3f1e71e779 prepare v0.11.0 (#175)
* prepare v0.11.0

* release instructions
2026-02-27 13:25:55 -06:00
Chris Tate 553c803422 image (#173)
* 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
@json-render/image@0.1.0
2026-02-27 13:03:42 -06:00
Chris Tate 9f58d8712c fix docs (#167)
* fix docs

* fix docs
2026-02-25 16:19:29 -06:00
github-actions[bot] c2b397510e chore: version packages (#166)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@json-render/codegen@0.10.0 @json-render/core@0.10.0 @json-render/jotai@0.10.0 @json-render/react-native@0.10.0 @json-render/react-pdf@0.10.0 @json-render/react@0.10.0 @json-render/redux@0.10.0 @json-render/remotion@0.10.0 @json-render/shadcn@0.10.0 @json-render/vue@0.10.0 @json-render/xstate@0.10.0 @json-render/zustand@0.10.0
2026-02-25 10:56:29 -06:00
Chris Tate 8506cfaa03 fix pkg name (#165)
* fix pkg name

* faster builds

* fixes

* Revert "fixes"

This reverts commit d0b43db972.

* Revert "faster builds"

This reverts commit 34a5190b07.
2026-02-25 10:50:59 -06:00
Chris Tate 9cef4e9142 prepare v0.10 (#164) 2026-02-25 10:27:25 -06:00
Chris Tate 3c11f19be4 vue improvements (#163)
* vue improvements

* fixes

* fixes

* fixes

* fix ci

* fix ci
@json-render/vue@0.9.1
2026-02-25 09:44:57 -06:00