Compare commits

..
Author SHA1 Message Date
Chris Tate 112496c202 fix schema import to use server-safe subpath
- `@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
2026-02-24 00:51:25 -06:00
43 changed files with 23 additions and 597 deletions
+2 -5
View File
@@ -10,10 +10,7 @@
"@json-render/shadcn",
"@json-render/react-native",
"@json-render/remotion",
"@json-render/codegen",
"@json-render/zustand",
"@json-render/redux",
"@json-render/jotai"
"@json-render/codegen"
]
],
"linked": [],
@@ -21,7 +18,7 @@
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": {
"version": true,
"version": false,
"tag": false
}
}
-10
View File
@@ -1,10 +0,0 @@
# web
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
- @json-render/codegen@0.9.0
+1 -35
View File
@@ -5,7 +5,7 @@ export const metadata = pageMetadata("docs/changelog")
Notable changes and updates to json-render.
## v0.9.0
## v0.8.0
February 2026
@@ -13,17 +13,8 @@ February 2026
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- Added `StateStore` interface and `createStateStore()` factory to `@json-render/core`
- `StateProvider`, `JSONUIProvider`, and `createRenderer` now accept an optional `store` prop
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
New adapter packages: `@json-render/redux`, `@json-render/zustand`, `@json-render/jotai`.
See the [Data Binding](/docs/data-binding#external-store-controlled-mode) guide for usage.
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path. This makes batch updates via `update()` easier to handle:
@@ -38,31 +29,6 @@ onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
The callback is only called when a `set()` or `update()` call actually changes the state. A `set()` call produces a single-element array; an `update()` call produces one array with all changed paths.
### Fixed: Server-safe schema import
`@json-render/react` barrel-imports React contexts that call `createContext`, which crashes in Next.js App Router API routes (RSC runtime strips `createContext`). All docs, examples, and skills now 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:
```ts
import { schema } from "@json-render/react/schema";
import { defineRegistry, Renderer } from "@json-render/react";
```
### Fixed: Chaining actions
Fixed an issue where chaining multiple actions on the same event (e.g. `setState` followed by a custom action) did not execute all actions. Affected `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`.
### Fixed: Zod array inner type resolution
Fixed safely resolving the inner type for Zod arrays in schema introspection, preventing errors when catalog component props use `z.array()`.
---
## v0.8.0
February 2026
### New: `@json-render/react-pdf`
PDF renderer for json-render, powered by [`@react-pdf/renderer`](https://react-pdf.org/). Define catalogs and registries the same way as `@json-render/react`, but output PDF documents instead of web UI.
@@ -25,18 +25,6 @@ Requires Tailwind CSS in your project. See the [@json-render/shadcn API referenc
<PackageInstall packages="@json-render/core @json-render/remotion remotion @remotion/player" />
## For External State Management (Optional)
If you want to wire json-render to an existing state management library instead of the built-in store, install the adapter for your library:
<PackageInstall packages="@json-render/zustand" />
<PackageInstall packages="@json-render/redux" />
<PackageInstall packages="@json-render/jotai" />
See the [Data Binding](/docs/data-binding#external-store-controlled-mode) guide for usage.
## Peer Dependencies
json-render requires the following peer dependencies:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"license": "Apache-2.0",
-10
View File
@@ -1,10 +0,0 @@
# example-chat
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
- @json-render/shadcn@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-chat",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
-10
View File
@@ -1,10 +0,0 @@
# example-dashboard
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
- @json-render/codegen@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-dashboard",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
-10
View File
@@ -1,10 +0,0 @@
# example-no-ai
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
- @json-render/shadcn@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-no-ai",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
-9
View File
@@ -1,9 +0,0 @@
# example-react-native
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react-native@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-react-native",
"version": "0.1.1",
"version": "0.1.0",
"private": true,
"main": "expo-router/entry",
"scripts": {
-9
View File
@@ -1,9 +0,0 @@
# example-react-pdf
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react-pdf@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-react-pdf",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
-9
View File
@@ -1,9 +0,0 @@
# example-remotion
## 0.1.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/remotion@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-remotion",
"version": "0.1.1",
"version": "0.1.0",
"type": "module",
"private": true,
"scripts": {
@@ -1,9 +0,0 @@
# com.example.json-render-demo
## 0.0.2
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "com.example.json-render-demo",
"version": "0.0.2",
"version": "0.0.1",
"description": "Test",
"private": true,
"license": "~~proprietary~~",
@@ -1,9 +0,0 @@
# com.example.json-render-fullpage-demo
## 0.0.2
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
@@ -1,6 +1,6 @@
{
"name": "com.example.json-render-fullpage-demo",
"version": "0.0.2",
"version": "0.0.1",
"description": "Full-page Stripe App example (alpha)",
"private": true,
"license": "~~proprietary~~",
-43
View File
@@ -1,48 +1,5 @@
# @json-render/codegen
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
## 0.8.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/codegen",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "Utilities for generating code from json-render UI trees",
"keywords": [
-38
View File
@@ -1,43 +1,5 @@
# @json-render/core
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
## 0.8.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/core",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "JSON becomes real things. Define your catalog, register your components, let AI generate.",
"keywords": [
-44
View File
@@ -1,44 +0,0 @@
# @json-render/jotai
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/jotai",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "Jotai adapter for json-render StateStore",
"keywords": [
-44
View File
@@ -1,49 +1,5 @@
# @json-render/react-native
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @internal/react-state@0.8.1
## 0.8.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/react-native",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "React Native renderer for @json-render/core. JSON becomes React Native components.",
"keywords": [
-44
View File
@@ -1,49 +1,5 @@
# @json-render/react-pdf
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @internal/react-state@0.8.1
## 0.8.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/react-pdf",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "React PDF renderer for @json-render/core. JSON becomes PDF documents.",
"keywords": [
-8
View File
@@ -1,8 +0,0 @@
# @internal/react-state
## 0.8.1
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@internal/react-state",
"version": "0.8.1",
"version": "0.8.0",
"private": true,
"license": "Apache-2.0",
"description": "Shared React state context for json-render renderer packages",
-44
View File
@@ -1,49 +1,5 @@
# @json-render/react
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @internal/react-state@0.8.1
## 0.8.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/react",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "React renderer for @json-render/core. JSON becomes React components.",
"keywords": [
-44
View File
@@ -1,44 +0,0 @@
# @json-render/redux
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/redux",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "Redux adapter for json-render StateStore",
"keywords": [
-43
View File
@@ -1,48 +1,5 @@
# @json-render/remotion
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
## 0.8.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/remotion",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "Remotion renderer for @json-render/core. JSON becomes video compositions.",
"keywords": [
-44
View File
@@ -1,49 +1,5 @@
# @json-render/shadcn
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
- @json-render/react@0.9.0
## 0.8.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/shadcn",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "shadcn/ui component library for @json-render/core. JSON becomes beautiful Tailwind-styled React components.",
"keywords": [
-44
View File
@@ -1,44 +0,0 @@
# @json-render/zustand
## 0.9.0
### Minor Changes
- 1d755c1: External state store, store adapters, and bug fixes.
### New: External State Store
The `StateStore` interface lets you plug in your own state management (Redux, Zustand, Jotai, XState, etc.) instead of the built-in internal store. Pass a `store` prop to `StateProvider`, `JSONUIProvider`, or `createRenderer` for controlled mode.
- 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
- Store utilities (`createStoreAdapter`, `immutableSetByPath`, `flattenToPointers`) available via `@json-render/core/store-utils` for building custom adapters
### New: Store Adapter Packages
- `@json-render/zustand` — Zustand adapter for `StateStore`
- `@json-render/redux` — Redux / Redux Toolkit adapter for `StateStore`
- `@json-render/jotai` — Jotai adapter for `StateStore`
### Changed: `onStateChange` signature updated (breaking)
The `onStateChange` callback now receives a single array of changed entries instead of being called once per path:
```ts
// Before
onStateChange?: (path: string, value: unknown) => void
// After
onStateChange?: (changes: Array<{ path: string; value: unknown }>) => void
```
### Fixed
- Fix schema import to use server-safe `@json-render/react/schema` subpath, avoiding `createContext` crashes in Next.js App Router API routes
- Fix chaining actions in `@json-render/react`, `@json-render/react-native`, and `@json-render/react-pdf`
- Fix safely resolving inner type for Zod arrays in core schema
### Patch Changes
- Updated dependencies [1d755c1]
- @json-render/core@0.9.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@json-render/zustand",
"version": "0.9.0",
"version": "0.8.0",
"license": "Apache-2.0",
"description": "Zustand adapter for json-render StateStore",
"keywords": [