@xmachines/docs 1.0.0-beta.15 → 1.0.0-beta.17
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/api/@xmachines/play/README.md +56 -17
- package/api/@xmachines/play/classes/PlayError.md +240 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +4 -4
- package/api/@xmachines/play-actor/README.md +32 -31
- package/api/@xmachines/play-actor/classes/AbstractActor.md +65 -53
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +37 -0
- package/api/@xmachines/play-actor/interfaces/Routable.md +5 -4
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
- package/api/@xmachines/play-actor/interfaces/Viewable.md +8 -8
- package/api/@xmachines/play-dom/README.md +36 -0
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +83 -0
- package/api/@xmachines/play-dom/functions/connectRenderer.md +51 -0
- package/api/@xmachines/play-dom/functions/renderSpec.md +28 -0
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +18 -0
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +18 -0
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -0
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +23 -0
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +11 -0
- package/api/@xmachines/play-react/README.md +226 -305
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +12 -38
- package/api/@xmachines/play-react/functions/defineRegistry.md +47 -0
- package/api/@xmachines/play-react/functions/useActor.md +13 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/functions/useStateBinding.md +32 -0
- package/api/@xmachines/play-react/interfaces/ComponentContext.md +35 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +15 -7
- package/api/@xmachines/play-react/type-aliases/ComponentFn.md +34 -0
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-react/variables/PlayRenderer.md +18 -30
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +32 -32
- package/api/@xmachines/play-react-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/README.md +51 -0
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +6 -6
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +44 -40
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-router/functions/crawlMachine.md +1 -1
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +4 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractRoute.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +19 -15
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +55 -0
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/StateVisit.md +4 -4
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +22 -10
- package/api/@xmachines/play-signals/functions/watchSignal.md +35 -0
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +3 -9
- package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +3 -11
- package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +5 -7
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +3 -13
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +0 -2
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +0 -2
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +193 -219
- package/api/@xmachines/play-solid/functions/defineRegistry.md +47 -0
- package/api/@xmachines/play-solid/functions/useActor.md +13 -0
- package/api/@xmachines/play-solid/functions/useStateBinding.md +23 -0
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +35 -0
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +15 -7
- package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +34 -0
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +15 -43
- package/api/@xmachines/play-solid-router/README.md +2 -0
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +6 -6
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +37 -37
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +65 -51
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +3 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -5
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +45 -33
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +24 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +33 -33
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +3 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-vue/README.md +216 -209
- package/api/@xmachines/play-vue/functions/defineRegistry.md +32 -0
- package/api/@xmachines/play-vue/functions/useActor.md +13 -0
- package/api/@xmachines/play-vue/functions/useStateBinding.md +30 -0
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +35 -0
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +14 -6
- package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +33 -0
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +21 -0
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +46 -49
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +3 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +7 -1
- package/api/@xmachines/play-xstate/README.md +250 -107
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +77 -55
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +24 -18
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +12 -61
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/functions/stateMatches.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +9 -13
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +22 -0
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +8 -9
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +6 -5
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +14 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +19 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/README.md +1 -1
- package/api/llms.txt +11 -5
- package/examples/README.md +20 -6
- package/examples/multi-router-integration.md +33 -24
- package/examples/routing-patterns.md +2 -3
- package/package.json +3 -3
- package/api/@xmachines/play-catalog/README.md +0 -331
- package/api/@xmachines/play-catalog/functions/defineCatalog.md +0 -98
- package/api/@xmachines/play-catalog/functions/defineComponents.md +0 -134
- package/api/@xmachines/play-catalog/type-aliases/Catalog.md +0 -48
- package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +0 -20
- package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +0 -65
- package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +0 -17
- package/api/@xmachines/play-xstate/functions/mergeViewProps.md +0 -26
- package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +0 -39
- package/api/@xmachines/play-xstate/functions/validateViewProps.md +0 -80
- package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +0 -16
- package/api/@xmachines/play-xstate/type-aliases/Catalog.md +0 -21
- package/api/@xmachines/play-xstate/type-aliases/ValidationResult.md +0 -17
- package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +0 -35
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / renderSpec
|
|
2
|
+
|
|
3
|
+
# Function: renderSpec()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function renderSpec(spec, store, registry, send, actor, actorActions): Node | null;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [dom-renderer.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/dom-renderer.ts#L26)
|
|
10
|
+
|
|
11
|
+
Render a Spec tree into DOM nodes using the provided DomRegistry.
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
17
|
+
| `spec` | `Spec` | The json-render Spec describing the UI tree |
|
|
18
|
+
| `store` | `StateStore` | StateStore holding the current state values |
|
|
19
|
+
| `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | Map of element type names to DomComponentRenderer functions |
|
|
20
|
+
| `send` | (`event`) => `void` | Function to dispatch XState events from UI interactions |
|
|
21
|
+
| `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Raw actor — available to DOM components for state reading, complex events |
|
|
22
|
+
| `actorActions` | `Record`\<`string`, `string`\> | Map of json-render action names → XState event types |
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`Node` \| `null`
|
|
27
|
+
|
|
28
|
+
The root DOM node, or null if root element is invisible or unknown
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / ConnectRendererOptions
|
|
2
|
+
|
|
3
|
+
# Interface: ConnectRendererOptions
|
|
4
|
+
|
|
5
|
+
Defined in: [types.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L63)
|
|
6
|
+
|
|
7
|
+
Options for connectRenderer() — backward compat API.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| <a id="property-actions"></a> `actions?` | `Record`\<`string`, `string`\> | Map of json-render actionName → XState event type | [types.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L77) |
|
|
14
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [types.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L65) |
|
|
15
|
+
| <a id="property-container"></a> `container` | `HTMLElement` | Container element to render into | [types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L71) |
|
|
16
|
+
| <a id="property-fallback"></a> `fallback?` | `HTMLElement` \| `null` | Optional element shown when currentView is null (defaults to nothing — clears container) | [types.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L74) |
|
|
17
|
+
| <a id="property-registry"></a> `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | Registry of component renderers — replaces old `components` map | [types.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L68) |
|
|
18
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored. When omitted, a fresh @xstate/store atom is created internally per view transition. | [types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L84) |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / DomRenderContext
|
|
2
|
+
|
|
3
|
+
# Interface: DomRenderContext
|
|
4
|
+
|
|
5
|
+
Defined in: [types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L14)
|
|
6
|
+
|
|
7
|
+
Context passed to each DomComponentRenderer when rendering an element.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Raw actor — access from any DOM component for state reading, complex events, lifecycle | [types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L22) |
|
|
14
|
+
| <a id="property-actoractions"></a> `actorActions` | `Record`\<`string`, `string`\> | Map of json-render action names → XState event types | [types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L24) |
|
|
15
|
+
| <a id="property-renderchildren"></a> `renderChildren` | (`keys`) => `Node`[] | Recursively render child elements by key | [types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L26) |
|
|
16
|
+
| <a id="property-send"></a> `send` | (`event`) => `void` | Send an event to the actor | [types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L20) |
|
|
17
|
+
| <a id="property-spec"></a> `spec` | `Spec` | Full spec tree | [types.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L16) |
|
|
18
|
+
| <a id="property-store"></a> `store` | `StateStore` | State store bound to spec.state | [types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L18) |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / PlayDomOptions
|
|
2
|
+
|
|
3
|
+
# Interface: PlayDomOptions
|
|
4
|
+
|
|
5
|
+
Defined in: [types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L46)
|
|
6
|
+
|
|
7
|
+
Options for PlayRenderer.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ---------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| <a id="property-actions"></a> `actions?` | `Record`\<`string`, `string`\> | Map of json-render actionName → XState event type | [types.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L48) |
|
|
14
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and this store is the single source of truth for UI state (form values, etc.). When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L57) |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / DomComponentRenderer
|
|
2
|
+
|
|
3
|
+
# Type Alias: DomComponentRenderer
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type DomComponentRenderer = (element, ctx) => HTMLElement | Text | null;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L33)
|
|
10
|
+
|
|
11
|
+
Pure DOM component renderer — receives a UIElement + context and returns a DOM node.
|
|
12
|
+
No framework required. Return null for unknown/unsupported elements.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| --------- | ------------------------------------------------------- |
|
|
18
|
+
| `element` | `UIElement` |
|
|
19
|
+
| `ctx` | [`DomRenderContext`](../interfaces/DomRenderContext.md) |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`HTMLElement` \| `Text` \| `null`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / DomRegistry
|
|
2
|
+
|
|
3
|
+
# Type Alias: DomRegistry
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type DomRegistry = Record<string, DomComponentRenderer>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [types.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-dom/src/types.ts#L41)
|
|
10
|
+
|
|
11
|
+
Registry of component renderers keyed by element type.
|