@xmachines/play-solid 1.0.0-beta.54 → 1.0.0-beta.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/ActorProvider.js +2 -2
- package/dist/ActorProvider.js.map +1 -1
- package/dist/PlayRenderer.js +1 -1
- package/dist/PlayRenderer.js.map +1 -1
- package/dist/PlayUIProvider.js +1 -1
- package/dist/PlayUIProvider.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +16 -11
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> Solid renderer for XMachines Play architecture
|
|
6
6
|
|
|
7
|
-
SolidJS rendering layer that passively observes actor signals and renders UI components via `@json-render
|
|
7
|
+
SolidJS rendering layer that passively observes actor signals and renders UI components via `@xmachines/json-render-solid`. SolidJS reactivity is used solely to trigger re-renders — TC39 Signals are the source of truth.
|
|
8
8
|
|
|
9
9
|
Part of the [xmachines-js monorepo](../../README.md).
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ npm install @xmachines/play-solid
|
|
|
17
17
|
**Peer dependencies** — install alongside the package:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install solid-js xstate @xstate/store @json-render
|
|
20
|
+
npm install solid-js xstate @xstate/store @xmachines/json-render-solid @xmachines/json-render-core @xmachines/json-render-xstate
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
@@ -25,8 +25,8 @@ npm install solid-js xstate @xstate/store @json-render/solid @json-render/core @
|
|
|
25
25
|
```tsx
|
|
26
26
|
import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
|
|
27
27
|
import { definePlayer } from "@xmachines/play-xstate";
|
|
28
|
-
import { defineCatalog } from "@json-render
|
|
29
|
-
import { schema } from "@json-render
|
|
28
|
+
import { defineCatalog } from "@xmachines/json-render-core";
|
|
29
|
+
import { schema } from "@xmachines/json-render-solid/schema";
|
|
30
30
|
|
|
31
31
|
// 1. Define a catalog (authCatalogDef is a plain object describing components/actions)
|
|
32
32
|
const catalog = defineCatalog(schema, authCatalogDef);
|
|
@@ -110,7 +110,7 @@ Access the resolved view context (spec, handlers, registry, store) from within t
|
|
|
110
110
|
|
|
111
111
|
```tsx
|
|
112
112
|
import { usePlayView } from "@xmachines/play-solid";
|
|
113
|
-
import { Renderer } from "@json-render
|
|
113
|
+
import { Renderer } from "@xmachines/json-render-solid";
|
|
114
114
|
|
|
115
115
|
const MyRenderer = () => {
|
|
116
116
|
const view = usePlayView();
|
|
@@ -141,9 +141,9 @@ const MyRenderer = () => {
|
|
|
141
141
|
| -------------- | -------------------------------------------------------------------------------------- |
|
|
142
142
|
| `ActorContext` | SolidJS context for the actor; use `ActorContext.Provider` directly as an escape hatch |
|
|
143
143
|
|
|
144
|
-
### Re-exports from `@json-render
|
|
144
|
+
### Re-exports from `@xmachines/json-render-solid`
|
|
145
145
|
|
|
146
|
-
This package re-exports the full `@json-render
|
|
146
|
+
This package re-exports the full `@xmachines/json-render-solid` public API so consumers do not need a direct dependency:
|
|
147
147
|
|
|
148
148
|
```tsx
|
|
149
149
|
import {
|
package/dist/ActorProvider.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ActorContext as e } from "./useActor.js";
|
|
2
2
|
import { createComponent as t } from "solid-js/web";
|
|
3
|
-
import { StateProvider as n, useStateStore as r } from "@json-render
|
|
3
|
+
import { StateProvider as n, useStateStore as r } from "@xmachines/json-render-solid";
|
|
4
4
|
import { ErrorBoundary as i, createContext as a, createEffect as o, createMemo as s, createSignal as c, onCleanup as l, useContext as u } from "solid-js";
|
|
5
5
|
import { createAtom as d } from "@xstate/store";
|
|
6
|
-
import { xstateStoreStateStore as f } from "@json-render
|
|
6
|
+
import { xstateStoreStateStore as f } from "@xmachines/json-render-xstate";
|
|
7
7
|
import { watchSignal as p } from "@xmachines/play-signals";
|
|
8
8
|
import { assertNonNullable as m } from "@xmachines/play";
|
|
9
9
|
import { attachRenderErrorHandler as h, toAtomState as g } from "@xmachines/play-actor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActorProvider.js","names":["createSignal","createEffect","createMemo","onCleanup","createContext","useContext","ErrorBoundary","Component","JSX","StateProvider","useStateStore","DefineRegistryResult","SetState","StateStore","ComponentRegistry","createAtom","xstateStoreStateStore","watchSignal","assertNonNullable","toAtomState","attachRenderErrorHandler","PlaySpec","BaseActorProviderProps","BaseViewContextValue","ActorContext","AnyPlayActor","ViewContextValue","ViewContext","usePlayView","ActorProviderProps","fallback","Element","onError","error","children","ActorProviderInner","registryResult","spec","store","innerProps","stateCtx","setStateAdapter","updater","prev","getSnapshot","update","handlers","viewValue","registry","_$createComponent","Provider","value","ActorProvider","props","view","setView","actorProxy","Proxy","get","_target","prop","current","actor","Reflect","bind","has","resolvedRegistryResult","onRenderError","internalStore","lastView","nextView","currentView","unwatch","err","atom","state"],"sources":["../src/ActorProvider.tsx"],"sourcesContent":["/**\n * ActorProvider — Smart SolidJS provider component for the XMachines Play actor lifecycle.\n *\n * Escape hatch primitive for library authors who need direct control. Most users should\n * use PlayUIProvider (batteries-included composite) instead.\n *\n * This component:\n * - Subscribes to actor.currentView signal via watchSignal (in component body per Phase 29)\n * - Manages per-view StateStore lifecycle (controlled/uncontrolled)\n * - Resolves action handlers via inner component pattern (inside StateProvider)\n * - Injects onRenderError into registry if provided\n * - Provides ActorContext (actor) and ViewContext (spec + handlers + registry) to children\n * - Wraps render path in SolidJS ErrorBoundary\n *\n * Per D-11: The old `ActorProvider = ActorContext.Provider` alias is removed. This new smart\n * component takes the name. Use `ActorContext.Provider` directly for escape-hatch access.\n *\n * @packageDocumentation\n */\n\nimport {\n\tcreateSignal,\n\tcreateEffect,\n\tcreateMemo,\n\tonCleanup,\n\tcreateContext,\n\tuseContext,\n\tErrorBoundary,\n} from \"solid-js\";\nimport type { Component, JSX } from \"solid-js\";\nimport { StateProvider, useStateStore } from \"@json-render/solid\";\nimport type { DefineRegistryResult, SetState } from \"@json-render/solid\";\nimport type { StateStore } from \"@json-render/core\";\nimport type { ComponentRegistry } from \"@json-render/solid\";\nimport { createAtom } from \"@xstate/store\";\nimport { xstateStoreStateStore } from \"@json-render/xstate\";\nimport { watchSignal } from \"@xmachines/play-signals\";\nimport { assertNonNullable } from \"@xmachines/play\";\nimport {\n\ttoAtomState,\n\tattachRenderErrorHandler,\n\ttype PlaySpec,\n\ttype BaseActorProviderProps,\n\ttype BaseViewContextValue,\n} from \"@xmachines/play-actor\";\nimport { ActorContext, type AnyPlayActor } from \"./useActor.js\";\n\n// ---------------------------------------------------------------------------\n// ViewContextValue — shape of the context value provided by ActorProvider\n// ---------------------------------------------------------------------------\n\n/**\n * Value provided by ActorProvider's ViewContext.\n * Access via usePlayView() inside the ActorProvider tree.\n */\nexport interface ViewContextValue extends BaseViewContextValue<ComponentRegistry> {}\n\nconst ViewContext = createContext<ViewContextValue | null>(null);\n\n/**\n * Hook to access the current view context inside an ActorProvider tree.\n *\n * @throws {Error} If called outside an ActorProvider (or PlayUIProvider) tree\n *\n * @example\n * ```tsx\n * import { usePlayView } from \"@xmachines/play-solid\";\n *\n * const MyRenderer: Component = () => {\n * const view = usePlayView();\n * return <Renderer spec={view.spec} registry={view.registry} />;\n * };\n * ```\n */\nexport function usePlayView(): ViewContextValue {\n\treturn assertNonNullable(useContext(ViewContext), \"ViewContext\");\n}\n\n// ---------------------------------------------------------------------------\n// ActorProviderProps\n// ---------------------------------------------------------------------------\n\n/**\n * Props for ActorProvider — the escape hatch primitive.\n *\n * For batteries-included usage, prefer PlayUIProvider which wraps ActorProvider\n * with JSONUIProvider and all required sub-providers.\n */\nexport interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult> {\n\t/** Optional fallback element shown when currentView is null or ErrorBoundary catches */\n\tfallback?: JSX.Element;\n\n\t/** Optional callback invoked when SolidJS ErrorBoundary catches an error */\n\tonError?: (error: unknown) => void;\n\n\t/** Children — required; must include <PlayRenderer /> (or use PlayUIProvider shorthand) */\n\tchildren: JSX.Element;\n}\n\n// ---------------------------------------------------------------------------\n// ActorProviderInner — resolves handlers inside StateProvider tree\n// ---------------------------------------------------------------------------\n\n/**\n * Inner component that runs inside StateProvider so it can call useStateStore()\n * to get live set/getSnapshot for handler resolution.\n */\nconst ActorProviderInner: Component<{\n\tregistryResult: DefineRegistryResult;\n\tspec: PlaySpec;\n\tstore: StateStore;\n\tchildren: JSX.Element;\n}> = (innerProps) => {\n\tconst stateCtx = useStateStore();\n\n\t// Build SetState adapter bridging stateCtx.update/getSnapshot\n\tconst setStateAdapter: SetState = (updater) => {\n\t\tconst prev = stateCtx.getSnapshot();\n\t\tstateCtx.update(updater(prev));\n\t};\n\n\tconst handlers = innerProps.registryResult.handlers(\n\t\t() => setStateAdapter,\n\t\t() => stateCtx.getSnapshot(),\n\t);\n\n\tconst viewValue: ViewContextValue = {\n\t\tspec: innerProps.spec,\n\t\thandlers,\n\t\tregistry: innerProps.registryResult.registry,\n\t\tstore: innerProps.store,\n\t};\n\n\treturn <ViewContext.Provider value={viewValue}>{innerProps.children}</ViewContext.Provider>;\n};\n\n// ---------------------------------------------------------------------------\n// ActorProvider — the smart component (per D-11 takes the ActorProvider name)\n// ---------------------------------------------------------------------------\n\n/**\n * Smart ActorProvider component — owns actor bridging, signal subscription,\n * StateStore lifecycle, handler resolution, and error boundary.\n *\n * Per D-11: Replaces the old raw alias `ActorProvider = ActorContext.Provider`.\n * Consumers who previously used `<ActorProvider value={actor}>` should now use\n * `<ActorContext.Provider value={actor}>` for raw provider access, or migrate to\n * this smart component / PlayUIProvider.\n *\n * @example\n * ```tsx\n * import { ActorProvider, PlayRenderer } from \"@xmachines/play-solid\";\n *\n * <ActorProvider actor={myActor} registryResult={registryResult}>\n * <PlayRenderer />\n * </ActorProvider>\n * ```\n */\nexport const ActorProvider: Component<ActorProviderProps> = (props) => {\n\t// SolidJS signal for current view (PlaySpec | null)\n\tconst [view, setView] = createSignal<PlaySpec | null>(null);\n\n\t// A stable Proxy is provided as the ActorContext value instead of the raw\n\t// actor: Solid's Context.Provider reads `value` once at creation, so passing\n\t// `props.actor` directly would snapshot the FIRST actor and useActor()\n\t// consumers would never see a prop swap. With the proxy, consumers keep the\n\t// reference obtained at creation time, yet every property access (send,\n\t// currentView, …) resolves against the latest actor. Reading `props.actor`\n\t// inside the traps is a reactive read, so consumers accessing properties in\n\t// tracking scopes (createEffect, createMemo, JSX) re-run on swap. Methods\n\t// are bound to the current actor so `this` (including private fields) works\n\t// exactly as with a direct call. Mirrors play-vue's ActorProvider proxy.\n\tconst actorProxy = new Proxy({} as AnyPlayActor, {\n\t\tget(_target, prop) {\n\t\t\tconst current = props.actor as AnyPlayActor;\n\t\t\tconst value = Reflect.get(current, prop, current) as unknown;\n\t\t\treturn typeof value === \"function\" ? value.bind(current) : value;\n\t\t},\n\t\thas(_target, prop) {\n\t\t\treturn prop in (props.actor as AnyPlayActor);\n\t\t},\n\t});\n\n\t// Inject onRenderError into registry if provided (non-enumerable override).\n\t// Memoized so that creating a new object on every reactive evaluation does not\n\t// cause unnecessary re-renders of child components that receive this as a prop.\n\tconst resolvedRegistryResult = createMemo(() => {\n\t\tif (!props.onRenderError) return props.registryResult;\n\t\treturn {\n\t\t\t...props.registryResult,\n\t\t\tregistry: attachRenderErrorHandler(props.registryResult.registry, props.onRenderError),\n\t\t};\n\t});\n\n\t// Per-view internal store — recreated on each view transition (uncontrolled mode)\n\tlet internalStore: StateStore | null = null;\n\tlet lastView: PlaySpec | null = null;\n\n\t// Bridge TC39 Signal to SolidJS signal — seed AND watch atomically inside a single\n\t// createEffect to eliminate the race window between .get() and watcher registration.\n\t// If the TC39 signal changes between the initial .get() and first watcher notification,\n\t// the update function captures the latest value without missing it.\n\tcreateEffect(() => {\n\t\tconst update = (nextView: PlaySpec | null) => setView(nextView);\n\t\tupdate(props.actor.currentView.get() as PlaySpec | null);\n\t\tconst unwatch = watchSignal(props.actor.currentView, (nextView) => {\n\t\t\tupdate(nextView as PlaySpec | null);\n\t\t});\n\t\tonCleanup(() => unwatch());\n\t});\n\n\treturn (\n\t\t<ActorContext.Provider value={actorProxy}>\n\t\t\t<ErrorBoundary\n\t\t\t\tfallback={(err: unknown) => {\n\t\t\t\t\tprops.onError?.(err);\n\t\t\t\t\treturn props.fallback ?? null;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{(() => {\n\t\t\t\t\tconst currentView = view();\n\t\t\t\t\tif (!currentView) return props.fallback ?? null;\n\n\t\t\t\t\t// Resolve store: external (controlled) or internal per-view atom\n\t\t\t\t\tlet store: StateStore;\n\t\t\t\t\tif (props.store) {\n\t\t\t\t\t\tstore = props.store;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (internalStore === null || lastView !== currentView) {\n\t\t\t\t\t\t\t// Proto-safe guard: spec.state must be a plain object (T-37-05-02)\n\t\t\t\t\t\t\tinternalStore = xstateStoreStateStore({\n\t\t\t\t\t\t\t\tatom: createAtom(toAtomState(currentView.state)),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastView = currentView;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstore = internalStore;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<StateProvider store={store}>\n\t\t\t\t\t\t\t<ActorProviderInner\n\t\t\t\t\t\t\t\tregistryResult={resolvedRegistryResult()}\n\t\t\t\t\t\t\t\tspec={currentView}\n\t\t\t\t\t\t\t\tstore={store}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t\t</ActorProviderInner>\n\t\t\t\t\t\t</StateProvider>\n\t\t\t\t\t);\n\t\t\t\t})()}\n\t\t\t</ErrorBoundary>\n\t\t</ActorContext.Provider>\n\t);\n};\n"],"mappings":";;;;;;;;;;AAyDA,IAAM2B,IAAcvB,EAAuC,IAAI;AAiB/D,SAAgBwB,IAAgC;CAC/C,OAAOV,EAAkBb,EAAWsB,CAAW,GAAG,aAAa;AAChE;AA+BA,IAAMQ,KAKAI,MAAe;CACpB,IAAMC,IAAW9B,EAAc,GAGzB+B,KAA6BC,MAAY;EAC9C,IAAMC,IAAOH,EAASI,YAAY;EAClCJ,EAASK,OAAOH,EAAQC,CAAI,CAAC;CAC9B,GAEMG,IAAWP,EAAWH,eAAeU,eACpCL,SACAD,EAASI,YAAY,CAC5B,GAEMG,IAA8B;EACnCV,MAAME,EAAWF;EACjBS;EACAE,UAAUT,EAAWH,eAAeY;EACpCV,OAAOC,EAAWD;CACnB;CAEA,OAAAW,EAAQtB,EAAYuB,UAAQ;EAACC,OAAOJ;EAAS,IAAAb,WAAA;GAAA,OAAGK,EAAWL;EAAQ;CAAA,CAAA;AACpE,GAwBakB,KAAgDC,MAAU;CAEtE,IAAM,CAACC,GAAMC,KAAWvD,EAA8B,IAAI,GAYpDwD,IAAa,IAAIC,MAAM,CAAC,GAAmB;EAChDC,IAAIC,GAASC,GAAM;GAClB,IAAMC,IAAUR,EAAMS,OAChBX,IAAQY,QAAQL,IAAIG,GAASD,GAAMC,CAAO;GAChD,OAAO,OAAOV,KAAU,aAAaA,EAAMa,KAAKH,CAAO,IAAIV;EAC5D;EACAc,IAAIN,GAASC,GAAM;GAClB,OAAOA,KAASP,EAAMS;EACvB;CACD,CAAC,GAKKI,IAAyBhE,QACzBmD,EAAMc,gBACJ;EACN,GAAGd,EAAMjB;EACTY,UAAU5B,EAAyBiC,EAAMjB,eAAeY,UAAUK,EAAMc,aAAa;CACtF,IAJiCd,EAAMjB,cAKvC,GAGGgC,IAAmC,MACnCC,IAA4B;CAehC,OATApE,QAAmB;EAClB,IAAM4C,KAAUyB,MAA8Bf,EAAQe,CAAQ;EAC9DzB,EAAOQ,EAAMS,MAAMS,YAAYb,IAAI,CAAoB;EACvD,IAAMc,IAAUvD,EAAYoC,EAAMS,MAAMS,cAAcD,MAAa;GAClEzB,EAAOyB,CAA2B;EACnC,CAAC;EACDnE,QAAgBqE,EAAQ,CAAC;CAC1B,CAAC,GAEDvB,EACEzB,EAAa0B,UAAQ;EAACC,OAAOK;EAAU,IAAAtB,WAAA;GAAA,OAAAe,EACtC3C,GAAa;IACbwB,WAAW2C,OACVpB,EAAMrB,UAAUyC,CAAG,GACZpB,EAAMvB,YAAY;IACzB,IAAAI,WAAA;KAAA,cAEO;MACP,IAAMqC,IAAcjB,EAAK;MACzB,IAAI,CAACiB,GAAa,OAAOlB,EAAMvB,YAAY;MAG3C,IAAIQ;MAcJ,OAbIe,EAAMf,QACTA,IAAQe,EAAMf,UAEV8B,MAAkB,QAAQC,MAAaE,OAE1CH,IAAgBpD,EAAsB,EACrC0D,MAAM3D,EAAWI,EAAYoD,EAAYI,KAAK,CAAC,EAChD,CAAC,GACDN,IAAWE,IAEZjC,IAAQ8B,IAGTnB,EACExC,GAAa;OAAQ6B;OAAK,IAAAJ,WAAA;QAAA,OAAAe,EACzBd,GAAkB;SAAA,IAClBC,iBAAc;UAAA,OAAE8B,EAAuB;SAAC;SACxC7B,MAAMkC;SACCjC;SAAK,IAAAJ,WAAA;UAAA,OAEXmB,EAAMnB;SAAQ;QAAA,CAAA;OAAA;MAAA,CAAA;KAInB,EAAA,CAAG;IAAC;GAAA,CAAA;EAAA;CAAA,CAAA;AAIR"}
|
|
1
|
+
{"version":3,"file":"ActorProvider.js","names":["createSignal","createEffect","createMemo","onCleanup","createContext","useContext","ErrorBoundary","Component","JSX","StateProvider","useStateStore","DefineRegistryResult","SetState","StateStore","ComponentRegistry","createAtom","xstateStoreStateStore","watchSignal","assertNonNullable","toAtomState","attachRenderErrorHandler","PlaySpec","BaseActorProviderProps","BaseViewContextValue","ActorContext","AnyPlayActor","ViewContextValue","ViewContext","usePlayView","ActorProviderProps","fallback","Element","onError","error","children","ActorProviderInner","registryResult","spec","store","innerProps","stateCtx","setStateAdapter","updater","prev","getSnapshot","update","handlers","viewValue","registry","_$createComponent","Provider","value","ActorProvider","props","view","setView","actorProxy","Proxy","get","_target","prop","current","actor","Reflect","bind","has","resolvedRegistryResult","onRenderError","internalStore","lastView","nextView","currentView","unwatch","err","atom","state"],"sources":["../src/ActorProvider.tsx"],"sourcesContent":["/**\n * ActorProvider — Smart SolidJS provider component for the XMachines Play actor lifecycle.\n *\n * Escape hatch primitive for library authors who need direct control. Most users should\n * use PlayUIProvider (batteries-included composite) instead.\n *\n * This component:\n * - Subscribes to actor.currentView signal via watchSignal (in component body per Phase 29)\n * - Manages per-view StateStore lifecycle (controlled/uncontrolled)\n * - Resolves action handlers via inner component pattern (inside StateProvider)\n * - Injects onRenderError into registry if provided\n * - Provides ActorContext (actor) and ViewContext (spec + handlers + registry) to children\n * - Wraps render path in SolidJS ErrorBoundary\n *\n * Per D-11: The old `ActorProvider = ActorContext.Provider` alias is removed. This new smart\n * component takes the name. Use `ActorContext.Provider` directly for escape-hatch access.\n *\n * @packageDocumentation\n */\n\nimport {\n\tcreateSignal,\n\tcreateEffect,\n\tcreateMemo,\n\tonCleanup,\n\tcreateContext,\n\tuseContext,\n\tErrorBoundary,\n} from \"solid-js\";\nimport type { Component, JSX } from \"solid-js\";\nimport { StateProvider, useStateStore } from \"@xmachines/json-render-solid\";\nimport type { DefineRegistryResult, SetState } from \"@xmachines/json-render-solid\";\nimport type { StateStore } from \"@xmachines/json-render-core\";\nimport type { ComponentRegistry } from \"@xmachines/json-render-solid\";\nimport { createAtom } from \"@xstate/store\";\nimport { xstateStoreStateStore } from \"@xmachines/json-render-xstate\";\nimport { watchSignal } from \"@xmachines/play-signals\";\nimport { assertNonNullable } from \"@xmachines/play\";\nimport {\n\ttoAtomState,\n\tattachRenderErrorHandler,\n\ttype PlaySpec,\n\ttype BaseActorProviderProps,\n\ttype BaseViewContextValue,\n} from \"@xmachines/play-actor\";\nimport { ActorContext, type AnyPlayActor } from \"./useActor.js\";\n\n// ---------------------------------------------------------------------------\n// ViewContextValue — shape of the context value provided by ActorProvider\n// ---------------------------------------------------------------------------\n\n/**\n * Value provided by ActorProvider's ViewContext.\n * Access via usePlayView() inside the ActorProvider tree.\n */\nexport interface ViewContextValue extends BaseViewContextValue<ComponentRegistry> {}\n\nconst ViewContext = createContext<ViewContextValue | null>(null);\n\n/**\n * Hook to access the current view context inside an ActorProvider tree.\n *\n * @throws {Error} If called outside an ActorProvider (or PlayUIProvider) tree\n *\n * @example\n * ```tsx\n * import { usePlayView } from \"@xmachines/play-solid\";\n *\n * const MyRenderer: Component = () => {\n * const view = usePlayView();\n * return <Renderer spec={view.spec} registry={view.registry} />;\n * };\n * ```\n */\nexport function usePlayView(): ViewContextValue {\n\treturn assertNonNullable(useContext(ViewContext), \"ViewContext\");\n}\n\n// ---------------------------------------------------------------------------\n// ActorProviderProps\n// ---------------------------------------------------------------------------\n\n/**\n * Props for ActorProvider — the escape hatch primitive.\n *\n * For batteries-included usage, prefer PlayUIProvider which wraps ActorProvider\n * with JSONUIProvider and all required sub-providers.\n */\nexport interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult> {\n\t/** Optional fallback element shown when currentView is null or ErrorBoundary catches */\n\tfallback?: JSX.Element;\n\n\t/** Optional callback invoked when SolidJS ErrorBoundary catches an error */\n\tonError?: (error: unknown) => void;\n\n\t/** Children — required; must include <PlayRenderer /> (or use PlayUIProvider shorthand) */\n\tchildren: JSX.Element;\n}\n\n// ---------------------------------------------------------------------------\n// ActorProviderInner — resolves handlers inside StateProvider tree\n// ---------------------------------------------------------------------------\n\n/**\n * Inner component that runs inside StateProvider so it can call useStateStore()\n * to get live set/getSnapshot for handler resolution.\n */\nconst ActorProviderInner: Component<{\n\tregistryResult: DefineRegistryResult;\n\tspec: PlaySpec;\n\tstore: StateStore;\n\tchildren: JSX.Element;\n}> = (innerProps) => {\n\tconst stateCtx = useStateStore();\n\n\t// Build SetState adapter bridging stateCtx.update/getSnapshot\n\tconst setStateAdapter: SetState = (updater) => {\n\t\tconst prev = stateCtx.getSnapshot();\n\t\tstateCtx.update(updater(prev));\n\t};\n\n\tconst handlers = innerProps.registryResult.handlers(\n\t\t() => setStateAdapter,\n\t\t() => stateCtx.getSnapshot(),\n\t);\n\n\tconst viewValue: ViewContextValue = {\n\t\tspec: innerProps.spec,\n\t\thandlers,\n\t\tregistry: innerProps.registryResult.registry,\n\t\tstore: innerProps.store,\n\t};\n\n\treturn <ViewContext.Provider value={viewValue}>{innerProps.children}</ViewContext.Provider>;\n};\n\n// ---------------------------------------------------------------------------\n// ActorProvider — the smart component (per D-11 takes the ActorProvider name)\n// ---------------------------------------------------------------------------\n\n/**\n * Smart ActorProvider component — owns actor bridging, signal subscription,\n * StateStore lifecycle, handler resolution, and error boundary.\n *\n * Per D-11: Replaces the old raw alias `ActorProvider = ActorContext.Provider`.\n * Consumers who previously used `<ActorProvider value={actor}>` should now use\n * `<ActorContext.Provider value={actor}>` for raw provider access, or migrate to\n * this smart component / PlayUIProvider.\n *\n * @example\n * ```tsx\n * import { ActorProvider, PlayRenderer } from \"@xmachines/play-solid\";\n *\n * <ActorProvider actor={myActor} registryResult={registryResult}>\n * <PlayRenderer />\n * </ActorProvider>\n * ```\n */\nexport const ActorProvider: Component<ActorProviderProps> = (props) => {\n\t// SolidJS signal for current view (PlaySpec | null)\n\tconst [view, setView] = createSignal<PlaySpec | null>(null);\n\n\t// A stable Proxy is provided as the ActorContext value instead of the raw\n\t// actor: Solid's Context.Provider reads `value` once at creation, so passing\n\t// `props.actor` directly would snapshot the FIRST actor and useActor()\n\t// consumers would never see a prop swap. With the proxy, consumers keep the\n\t// reference obtained at creation time, yet every property access (send,\n\t// currentView, …) resolves against the latest actor. Reading `props.actor`\n\t// inside the traps is a reactive read, so consumers accessing properties in\n\t// tracking scopes (createEffect, createMemo, JSX) re-run on swap. Methods\n\t// are bound to the current actor so `this` (including private fields) works\n\t// exactly as with a direct call. Mirrors play-vue's ActorProvider proxy.\n\tconst actorProxy = new Proxy({} as AnyPlayActor, {\n\t\tget(_target, prop) {\n\t\t\tconst current = props.actor as AnyPlayActor;\n\t\t\tconst value = Reflect.get(current, prop, current) as unknown;\n\t\t\treturn typeof value === \"function\" ? value.bind(current) : value;\n\t\t},\n\t\thas(_target, prop) {\n\t\t\treturn prop in (props.actor as AnyPlayActor);\n\t\t},\n\t});\n\n\t// Inject onRenderError into registry if provided (non-enumerable override).\n\t// Memoized so that creating a new object on every reactive evaluation does not\n\t// cause unnecessary re-renders of child components that receive this as a prop.\n\tconst resolvedRegistryResult = createMemo(() => {\n\t\tif (!props.onRenderError) return props.registryResult;\n\t\treturn {\n\t\t\t...props.registryResult,\n\t\t\tregistry: attachRenderErrorHandler(props.registryResult.registry, props.onRenderError),\n\t\t};\n\t});\n\n\t// Per-view internal store — recreated on each view transition (uncontrolled mode)\n\tlet internalStore: StateStore | null = null;\n\tlet lastView: PlaySpec | null = null;\n\n\t// Bridge TC39 Signal to SolidJS signal — seed AND watch atomically inside a single\n\t// createEffect to eliminate the race window between .get() and watcher registration.\n\t// If the TC39 signal changes between the initial .get() and first watcher notification,\n\t// the update function captures the latest value without missing it.\n\tcreateEffect(() => {\n\t\tconst update = (nextView: PlaySpec | null) => setView(nextView);\n\t\tupdate(props.actor.currentView.get() as PlaySpec | null);\n\t\tconst unwatch = watchSignal(props.actor.currentView, (nextView) => {\n\t\t\tupdate(nextView as PlaySpec | null);\n\t\t});\n\t\tonCleanup(() => unwatch());\n\t});\n\n\treturn (\n\t\t<ActorContext.Provider value={actorProxy}>\n\t\t\t<ErrorBoundary\n\t\t\t\tfallback={(err: unknown) => {\n\t\t\t\t\tprops.onError?.(err);\n\t\t\t\t\treturn props.fallback ?? null;\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{(() => {\n\t\t\t\t\tconst currentView = view();\n\t\t\t\t\tif (!currentView) return props.fallback ?? null;\n\n\t\t\t\t\t// Resolve store: external (controlled) or internal per-view atom\n\t\t\t\t\tlet store: StateStore;\n\t\t\t\t\tif (props.store) {\n\t\t\t\t\t\tstore = props.store;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (internalStore === null || lastView !== currentView) {\n\t\t\t\t\t\t\t// Proto-safe guard: spec.state must be a plain object (T-37-05-02)\n\t\t\t\t\t\t\tinternalStore = xstateStoreStateStore({\n\t\t\t\t\t\t\t\tatom: createAtom(toAtomState(currentView.state)),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlastView = currentView;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstore = internalStore;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<StateProvider store={store}>\n\t\t\t\t\t\t\t<ActorProviderInner\n\t\t\t\t\t\t\t\tregistryResult={resolvedRegistryResult()}\n\t\t\t\t\t\t\t\tspec={currentView}\n\t\t\t\t\t\t\t\tstore={store}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{props.children}\n\t\t\t\t\t\t\t</ActorProviderInner>\n\t\t\t\t\t\t</StateProvider>\n\t\t\t\t\t);\n\t\t\t\t})()}\n\t\t\t</ErrorBoundary>\n\t\t</ActorContext.Provider>\n\t);\n};\n"],"mappings":";;;;;;;;;;AAyDA,IAAM2B,IAAcvB,EAAuC,IAAI;AAiB/D,SAAgBwB,IAAgC;CAC/C,OAAOV,EAAkBb,EAAWsB,CAAW,GAAG,aAAa;AAChE;AA+BA,IAAMQ,KAKAI,MAAe;CACpB,IAAMC,IAAW9B,EAAc,GAGzB+B,KAA6BC,MAAY;EAC9C,IAAMC,IAAOH,EAASI,YAAY;EAClCJ,EAASK,OAAOH,EAAQC,CAAI,CAAC;CAC9B,GAEMG,IAAWP,EAAWH,eAAeU,eACpCL,SACAD,EAASI,YAAY,CAC5B,GAEMG,IAA8B;EACnCV,MAAME,EAAWF;EACjBS;EACAE,UAAUT,EAAWH,eAAeY;EACpCV,OAAOC,EAAWD;CACnB;CAEA,OAAAW,EAAQtB,EAAYuB,UAAQ;EAACC,OAAOJ;EAAS,IAAAb,WAAA;GAAA,OAAGK,EAAWL;EAAQ;CAAA,CAAA;AACpE,GAwBakB,KAAgDC,MAAU;CAEtE,IAAM,CAACC,GAAMC,KAAWvD,EAA8B,IAAI,GAYpDwD,IAAa,IAAIC,MAAM,CAAC,GAAmB;EAChDC,IAAIC,GAASC,GAAM;GAClB,IAAMC,IAAUR,EAAMS,OAChBX,IAAQY,QAAQL,IAAIG,GAASD,GAAMC,CAAO;GAChD,OAAO,OAAOV,KAAU,aAAaA,EAAMa,KAAKH,CAAO,IAAIV;EAC5D;EACAc,IAAIN,GAASC,GAAM;GAClB,OAAOA,KAASP,EAAMS;EACvB;CACD,CAAC,GAKKI,IAAyBhE,QACzBmD,EAAMc,gBACJ;EACN,GAAGd,EAAMjB;EACTY,UAAU5B,EAAyBiC,EAAMjB,eAAeY,UAAUK,EAAMc,aAAa;CACtF,IAJiCd,EAAMjB,cAKvC,GAGGgC,IAAmC,MACnCC,IAA4B;CAehC,OATApE,QAAmB;EAClB,IAAM4C,KAAUyB,MAA8Bf,EAAQe,CAAQ;EAC9DzB,EAAOQ,EAAMS,MAAMS,YAAYb,IAAI,CAAoB;EACvD,IAAMc,IAAUvD,EAAYoC,EAAMS,MAAMS,cAAcD,MAAa;GAClEzB,EAAOyB,CAA2B;EACnC,CAAC;EACDnE,QAAgBqE,EAAQ,CAAC;CAC1B,CAAC,GAEDvB,EACEzB,EAAa0B,UAAQ;EAACC,OAAOK;EAAU,IAAAtB,WAAA;GAAA,OAAAe,EACtC3C,GAAa;IACbwB,WAAW2C,OACVpB,EAAMrB,UAAUyC,CAAG,GACZpB,EAAMvB,YAAY;IACzB,IAAAI,WAAA;KAAA,cAEO;MACP,IAAMqC,IAAcjB,EAAK;MACzB,IAAI,CAACiB,GAAa,OAAOlB,EAAMvB,YAAY;MAG3C,IAAIQ;MAcJ,OAbIe,EAAMf,QACTA,IAAQe,EAAMf,UAEV8B,MAAkB,QAAQC,MAAaE,OAE1CH,IAAgBpD,EAAsB,EACrC0D,MAAM3D,EAAWI,EAAYoD,EAAYI,KAAK,CAAC,EAChD,CAAC,GACDN,IAAWE,IAEZjC,IAAQ8B,IAGTnB,EACExC,GAAa;OAAQ6B;OAAK,IAAAJ,WAAA;QAAA,OAAAe,EACzBd,GAAkB;SAAA,IAClBC,iBAAc;UAAA,OAAE8B,EAAuB;SAAC;SACxC7B,MAAMkC;SACCjC;SAAK,IAAAJ,WAAA;UAAA,OAEXmB,EAAMnB;SAAQ;QAAA,CAAA;OAAA;MAAA,CAAA;KAInB,EAAA,CAAG;IAAC;GAAA,CAAA;EAAA;CAAA,CAAA;AAIR"}
|
package/dist/PlayRenderer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { usePlayView as e } from "./ActorProvider.js";
|
|
2
2
|
import { createComponent as t } from "solid-js/web";
|
|
3
|
-
import { Renderer as n } from "@json-render
|
|
3
|
+
import { Renderer as n } from "@xmachines/json-render-solid";
|
|
4
4
|
//#region src/PlayRenderer.tsx
|
|
5
5
|
var r = () => {
|
|
6
6
|
let r = e();
|
package/dist/PlayRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayRenderer.js","names":["Component","Renderer","usePlayView","PlayRenderer","view","_$createComponent","spec","registry"],"sources":["../src/PlayRenderer.tsx"],"sourcesContent":["/**\n * PlayRenderer - Zero-prop leaf component for XMachines Play SolidJS architecture.\n *\n * Reads view context from the enclosing ActorProvider (or PlayUIProvider) via\n * usePlayView() and renders the spec using @json-render
|
|
1
|
+
{"version":3,"file":"PlayRenderer.js","names":["Component","Renderer","usePlayView","PlayRenderer","view","_$createComponent","spec","registry"],"sources":["../src/PlayRenderer.tsx"],"sourcesContent":["/**\n * PlayRenderer - Zero-prop leaf component for XMachines Play SolidJS architecture.\n *\n * Reads view context from the enclosing ActorProvider (or PlayUIProvider) via\n * usePlayView() and renders the spec using @xmachines/json-render-solid's Renderer.\n *\n * Standard usage:\n * ```tsx\n * <PlayUIProvider actor={myActor} registryResult={registryResult}>\n * <PlayRenderer />\n * </PlayUIProvider>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { Component } from \"solid-js\";\nimport { Renderer } from \"@xmachines/json-render-solid\";\nimport { usePlayView } from \"./ActorProvider.js\";\n\n/**\n * Zero-prop leaf renderer. Must be placed inside an ActorProvider or PlayUIProvider tree.\n *\n * Reads ViewContextValue (spec, handlers, registry) from the enclosing provider\n * via usePlayView() and renders the spec via @xmachines/json-render-solid's Renderer.\n */\nexport const PlayRenderer: Component = () => {\n\tconst view = usePlayView();\n\treturn <Renderer spec={view.spec} registry={view.registry} />;\n};\n"],"mappings":";;;;AA0BA,IAAaG,UAAgC;CAC5C,IAAMC,IAAOF,EAAY;CACzB,OAAAG,EAAQJ,GAAQ;EAAA,IAACK,OAAI;GAAA,OAAEF,EAAKE;EAAI;EAAA,IAAEC,WAAQ;GAAA,OAAEH,EAAKG;EAAQ;CAAA,CAAA;AAC1D"}
|
package/dist/PlayUIProvider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActorProvider as e, usePlayView as t } from "./ActorProvider.js";
|
|
2
2
|
import { createComponent as n, mergeProps as r } from "solid-js/web";
|
|
3
|
-
import { JSONUIProvider as i } from "@json-render
|
|
3
|
+
import { JSONUIProvider as i } from "@xmachines/json-render-solid";
|
|
4
4
|
//#region src/PlayUIProvider.tsx
|
|
5
5
|
var a = (e) => {
|
|
6
6
|
let a = t();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayUIProvider.js","names":["Component","JSX","JSONUIProvider","JSONUIProviderProps","ActorProvider","usePlayView","ActorProviderProps","JSONUIForwardedProps","Pick","PlayUIProviderProps","Partial","JSONUIBridge","children","Element","bridgeProps","view","_$createComponent","_$mergeProps","registry","handlers","store","validationFunctions","undefined","navigate","functions","PlayUIProvider","props","actor","registryResult","fallback","onError","onRenderError"],"sources":["../src/PlayUIProvider.tsx"],"sourcesContent":["/**\n * PlayUIProvider — Batteries-included SolidJS provider for XMachines Play.\n *\n * Wraps ActorProvider + JSONUIProvider into a single composite provider.\n * This is the recommended entry point for most users.\n *\n * Standard usage:\n * ```tsx\n * import { PlayUIProvider, PlayRenderer, defineRegistry } from \"@xmachines/play-solid\";\n *\n * const registryResult = defineRegistry(myCatalog, { components, actions });\n *\n * <PlayUIProvider actor={myActor} registryResult={registryResult}>\n * <PlayRenderer />\n * </PlayUIProvider>\n * ```\n *\n * For full control (library authors), use ActorProvider directly.\n *\n * @packageDocumentation\n */\n\nimport type { Component, JSX } from \"solid-js\";\nimport { JSONUIProvider, type JSONUIProviderProps } from \"@json-render
|
|
1
|
+
{"version":3,"file":"PlayUIProvider.js","names":["Component","JSX","JSONUIProvider","JSONUIProviderProps","ActorProvider","usePlayView","ActorProviderProps","JSONUIForwardedProps","Pick","PlayUIProviderProps","Partial","JSONUIBridge","children","Element","bridgeProps","view","_$createComponent","_$mergeProps","registry","handlers","store","validationFunctions","undefined","navigate","functions","PlayUIProvider","props","actor","registryResult","fallback","onError","onRenderError"],"sources":["../src/PlayUIProvider.tsx"],"sourcesContent":["/**\n * PlayUIProvider — Batteries-included SolidJS provider for XMachines Play.\n *\n * Wraps ActorProvider + JSONUIProvider into a single composite provider.\n * This is the recommended entry point for most users.\n *\n * Standard usage:\n * ```tsx\n * import { PlayUIProvider, PlayRenderer, defineRegistry } from \"@xmachines/play-solid\";\n *\n * const registryResult = defineRegistry(myCatalog, { components, actions });\n *\n * <PlayUIProvider actor={myActor} registryResult={registryResult}>\n * <PlayRenderer />\n * </PlayUIProvider>\n * ```\n *\n * For full control (library authors), use ActorProvider directly.\n *\n * @packageDocumentation\n */\n\nimport type { Component, JSX } from \"solid-js\";\nimport { JSONUIProvider, type JSONUIProviderProps } from \"@xmachines/json-render-solid\";\nimport { ActorProvider, usePlayView, type ActorProviderProps } from \"./ActorProvider.js\";\n\n// Pick only the forwarded props from JSONUIProviderProps (per D-16)\ntype JSONUIForwardedProps = Pick<\n\tJSONUIProviderProps,\n\t\"validationFunctions\" | \"navigate\" | \"functions\"\n>;\n\n/**\n * Props for PlayUIProvider — all ActorProvider props plus JSONUIProvider's forwarded props.\n */\nexport interface PlayUIProviderProps extends ActorProviderProps, Partial<JSONUIForwardedProps> {}\n\n/**\n * Inner bridge component — must be inside ActorProvider's tree so usePlayView() has\n * access to the resolved ViewContextValue. Reads handlers and registry from the view\n * context and passes them to JSONUIProvider.\n *\n * This bridge pattern mirrors the React implementation (JSONUIBridge in play-react).\n */\nconst JSONUIBridge: Component<Partial<JSONUIForwardedProps> & { children: JSX.Element }> = (\n\tbridgeProps,\n) => {\n\tconst view = usePlayView();\n\n\treturn (\n\t\t<JSONUIProvider\n\t\t\tregistry={view.registry}\n\t\t\thandlers={view.handlers}\n\t\t\tstore={view.store}\n\t\t\t{...(bridgeProps.validationFunctions !== undefined && {\n\t\t\t\tvalidationFunctions: bridgeProps.validationFunctions,\n\t\t\t})}\n\t\t\t{...(bridgeProps.navigate !== undefined && { navigate: bridgeProps.navigate })}\n\t\t\t{...(bridgeProps.functions !== undefined && { functions: bridgeProps.functions })}\n\t\t>\n\t\t\t{bridgeProps.children}\n\t\t</JSONUIProvider>\n\t);\n};\n\n/**\n * Batteries-included composite provider: ActorProvider + JSONUIProvider.\n *\n * Provides the full JSON render context stack:\n * - ActorContext (actor instance via ActorProvider)\n * - ViewContext (spec, handlers, registry via ActorProvider)\n * - StateProvider + ActionProvider + VisibilityProvider + ValidationProvider (via JSONUIProvider)\n * - ConfirmDialogManager (via JSONUIProvider)\n *\n * @example\n * ```tsx\n * <PlayUIProvider actor={myActor} registryResult={registryResult} navigate={navigate}>\n * <PlayRenderer />\n * </PlayUIProvider>\n * ```\n */\nexport const PlayUIProvider: Component<PlayUIProviderProps> = (props) => {\n\treturn (\n\t\t<ActorProvider\n\t\t\tactor={props.actor}\n\t\t\tregistryResult={props.registryResult}\n\t\t\t{...(props.store !== undefined && { store: props.store })}\n\t\t\t{...(props.fallback !== undefined && { fallback: props.fallback })}\n\t\t\t{...(props.onError !== undefined && { onError: props.onError })}\n\t\t\t{...(props.onRenderError !== undefined && { onRenderError: props.onRenderError })}\n\t\t>\n\t\t\t<JSONUIBridge\n\t\t\t\t{...(props.validationFunctions !== undefined && {\n\t\t\t\t\tvalidationFunctions: props.validationFunctions,\n\t\t\t\t})}\n\t\t\t\t{...(props.navigate !== undefined && { navigate: props.navigate })}\n\t\t\t\t{...(props.functions !== undefined && { functions: props.functions })}\n\t\t\t>\n\t\t\t\t{props.children}\n\t\t\t</JSONUIBridge>\n\t\t</ActorProvider>\n\t);\n};\n"],"mappings":";;;;AA4CA,IAAMW,KACLG,MACI;CACJ,IAAMC,IAAOV,EAAY;CAEzB,OAAAW,EACEd,GAAce,EAAA;EAAA,IACdC,WAAQ;GAAA,OAAEH,EAAKG;EAAQ;EAAA,IACvBC,WAAQ;GAAA,OAAEJ,EAAKI;EAAQ;EAAA,IACvBC,QAAK;GAAA,OAAEL,EAAKK;EAAK;CAAA,SACZN,EAAYO,wBAAwBC,KAAAA,KAAa,EACrDD,qBAAqBP,EAAYO,oBAClC,SACKP,EAAYS,aAAaD,KAAAA,KAAa,EAAEC,UAAUT,EAAYS,SAAS,SACvET,EAAYU,cAAcF,KAAAA,KAAa,EAAEE,WAAWV,EAAYU,UAAU,GAAC,EAAA,IAAAZ,WAAA;EAAA,OAE/EE,EAAYF;CAAQ,EAAA,CAAA,CAAA;AAGxB,GAkBaa,KAAkDC,MAC9DV,EACEZ,GAAaa,EAAA;CAAA,IACbU,QAAK;EAAA,OAAED,EAAMC;CAAK;CAAA,IAClBC,iBAAc;EAAA,OAAEF,EAAME;CAAc;AAAA,SAC/BF,EAAMN,UAAUE,KAAAA,KAAa,EAAEF,OAAOM,EAAMN,MAAM,SAClDM,EAAMG,aAAaP,KAAAA,KAAa,EAAEO,UAAUH,EAAMG,SAAS,SAC3DH,EAAMI,YAAYR,KAAAA,KAAa,EAAEQ,SAASJ,EAAMI,QAAQ,SACxDJ,EAAMK,kBAAkBT,KAAAA,KAAa,EAAES,eAAeL,EAAMK,cAAc,GAAC,EAAA,IAAAnB,WAAA;CAAA,OAAAI,EAE/EL,GAAYM,QACPS,EAAML,wBAAwBC,KAAAA,KAAa,EAC/CD,qBAAqBK,EAAML,oBAC5B,SACKK,EAAMH,aAAaD,KAAAA,KAAa,EAAEC,UAAUG,EAAMH,SAAS,SAC3DG,EAAMF,cAAcF,KAAAA,KAAa,EAAEE,WAAWE,EAAMF,UAAU,GAAC,EAAA,IAAAZ,WAAA;EAAA,OAEnEc,EAAMd;CAAQ,EAAA,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2,5 +2,5 @@ import { ActorContext as e, useActor as t } from "./useActor.js";
|
|
|
2
2
|
import { ActorProvider as n, usePlayView as r } from "./ActorProvider.js";
|
|
3
3
|
import { PlayRenderer as i } from "./PlayRenderer.js";
|
|
4
4
|
import { PlayUIProvider as a } from "./PlayUIProvider.js";
|
|
5
|
-
import { ActionProvider as o, JSONUIProvider as s, Renderer as c, StateProvider as l, ValidationProvider as u, VisibilityProvider as d, defineRegistry as f, useAction as p, useActions as m, useBoundProp as h, useFieldValidation as g, useIsVisible as _, useOptionalValidation as v, useStateBinding as y, useStateStore as b, useStateValue as x, useVisibility as S } from "@json-render
|
|
5
|
+
import { ActionProvider as o, JSONUIProvider as s, Renderer as c, StateProvider as l, ValidationProvider as u, VisibilityProvider as d, defineRegistry as f, useAction as p, useActions as m, useBoundProp as h, useFieldValidation as g, useIsVisible as _, useOptionalValidation as v, useStateBinding as y, useStateStore as b, useStateValue as x, useVisibility as S } from "@xmachines/json-render-solid";
|
|
6
6
|
export { o as ActionProvider, e as ActorContext, n as ActorProvider, s as JSONUIProvider, i as PlayRenderer, a as PlayUIProvider, c as Renderer, l as StateProvider, u as ValidationProvider, d as VisibilityProvider, f as defineRegistry, p as useAction, m as useActions, t as useActor, h as useBoundProp, g as useFieldValidation, _ as useIsVisible, v as useOptionalValidation, r as usePlayView, y as useStateBinding, b as useStateStore, x as useStateValue, S as useVisibility };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/play-solid",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.56",
|
|
4
4
|
"description": "Solid renderer for XMachines Play architecture",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"catalog",
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "XMachines Contributors",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+ssh://git@gitlab.com/xmachin-es/xmachines-js.git",
|
|
18
|
+
"directory": "packages/play-solid"
|
|
19
|
+
},
|
|
15
20
|
"files": [
|
|
16
21
|
"dist",
|
|
17
22
|
"README.md",
|
|
@@ -39,19 +44,19 @@
|
|
|
39
44
|
"prepublishOnly": "npm run build"
|
|
40
45
|
},
|
|
41
46
|
"dependencies": {
|
|
42
|
-
"@xmachines/play": "1.0.0-beta.
|
|
43
|
-
"@xmachines/play-actor": "1.0.0-beta.
|
|
44
|
-
"@xmachines/play-signals": "1.0.0-beta.
|
|
47
|
+
"@xmachines/play": "1.0.0-beta.56",
|
|
48
|
+
"@xmachines/play-actor": "1.0.0-beta.56",
|
|
49
|
+
"@xmachines/play-signals": "1.0.0-beta.56"
|
|
45
50
|
},
|
|
46
51
|
"devDependencies": {
|
|
47
|
-
"@json-render/core": "^0.18.0",
|
|
48
|
-
"@json-render/solid": "^0.18.0",
|
|
49
|
-
"@json-render/xstate": "^0.18.0",
|
|
50
52
|
"@solidjs/testing-library": "^0.8.10",
|
|
51
53
|
"@testing-library/jest-dom": "^6.9.1",
|
|
52
54
|
"@types/node": "^25.6.0",
|
|
53
55
|
"@vitest/browser-playwright": "^4.1.5",
|
|
54
|
-
"@xmachines/
|
|
56
|
+
"@xmachines/json-render-core": "^0.19.0-xm.2",
|
|
57
|
+
"@xmachines/json-render-solid": "^0.19.0-xm.2",
|
|
58
|
+
"@xmachines/json-render-xstate": "^0.19.0-xm.2",
|
|
59
|
+
"@xmachines/shared": "1.0.0-beta.56",
|
|
55
60
|
"@xstate/store": "^3.17.0",
|
|
56
61
|
"jsdom": "^29.1.0",
|
|
57
62
|
"oxfmt": "^0.47.0",
|
|
@@ -65,9 +70,9 @@
|
|
|
65
70
|
"zod": "^4.4.1"
|
|
66
71
|
},
|
|
67
72
|
"peerDependencies": {
|
|
68
|
-
"@json-render
|
|
69
|
-
"@json-render
|
|
70
|
-
"@json-render
|
|
73
|
+
"@xmachines/json-render-core": "^0.19.0-xm.2",
|
|
74
|
+
"@xmachines/json-render-solid": "^0.19.0-xm.2",
|
|
75
|
+
"@xmachines/json-render-xstate": "^0.19.0-xm.2",
|
|
71
76
|
"@xstate/store": "^3.17.0",
|
|
72
77
|
"solid-js": "^1.8.0",
|
|
73
78
|
"xstate": "^5.31.0"
|