@xmachines/docs 1.0.0-beta.18 → 1.0.0-beta.19
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 +1 -1
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/type-aliases/PlayEvent.md +3 -3
- package/api/@xmachines/play-actor/README.md +2 -2
- package/api/@xmachines/play-actor/classes/AbstractActor.md +4 -4
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-react/README.md +7 -2
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +9 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- 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 +6 -6
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-router/README.md +103 -47
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -21
- 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/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- 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 +6 -42
- 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/getTransitionReachableRoutes.md +38 -0
- package/api/@xmachines/play-router/functions/isRouteReachable.md +38 -0
- package/api/@xmachines/play-router/functions/machineToGraph.md +19 -0
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +40 -0
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +9 -8
- package/api/@xmachines/play-router/functions/validateStateExists.md +8 -8
- package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +15 -0
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +17 -0
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +7 -7
- 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 +12 -12
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -6
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +20 -0
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +8 -2
- package/api/@xmachines/play-signals/functions/watchSignal.md +8 -1
- 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/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +1 -1
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +1 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +16 -16
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -4
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +28 -0
- 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/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- 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/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +26 -25
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -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 +1 -1
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +2 -1
- 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 +27 -32
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +4 -4
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +6 -6
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- 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/contextFieldMatches.md +36 -0
- package/api/@xmachines/play-xstate/functions/definePlayer.md +2 -2
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +2 -2
- 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/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- 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 +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/_media/play.md +447 -0
- package/examples/multi-router-integration.md +1 -1
- package/examples/routing-patterns.md +1 -1
- package/guides/installation.md +30 -30
- package/package.json +2 -2
- package/api/@xmachines/play-router/functions/crawlMachine.md +0 -92
- package/api/@xmachines/play-router/functions/extractRoute.md +0 -45
- package/api/@xmachines/play-router/interfaces/StateVisit.md +0 -15
- package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +0 -64
- package/api/@xmachines/play-xstate/functions/stateMatches.md +0 -25
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteNode
|
|
4
4
|
|
|
5
|
-
Defined in: [types.ts:
|
|
5
|
+
Defined in: [types.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L77)
|
|
6
6
|
|
|
7
7
|
Node in the route tree representing a single route
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
| Property | Type
|
|
12
|
-
| ----------------------------------------- |
|
|
13
|
-
| <a id="property-children"></a> `children` | `RouteNode`[]
|
|
14
|
-
| <a id="property-fullpath"></a> `fullPath` | `string`
|
|
15
|
-
| <a id="property-id"></a> `id` | `string`
|
|
16
|
-
| <a id="property-metadata"></a> `metadata` | `
|
|
17
|
-
| <a id="property-parent"></a> `parent` | `RouteNode` \| `null`
|
|
18
|
-
| <a id="property-path"></a> `path` | `string`
|
|
19
|
-
| <a id="property-pattern"></a> `pattern?` | `string`
|
|
20
|
-
| <a id="property-routable"></a> `routable` | `boolean`
|
|
21
|
-
| <a id="property-stateid"></a> `stateId` | `string`
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ----------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| <a id="property-children"></a> `children` | `RouteNode`[] | Child routes | [types.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L94) |
|
|
14
|
+
| <a id="property-fullpath"></a> `fullPath` | `string` | Full resolved path from root | [types.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L83) |
|
|
15
|
+
| <a id="property-id"></a> `id` | `string` | Unique identifier (state ID) | [types.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L79) |
|
|
16
|
+
| <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original meta.route metadata | [types.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L98) |
|
|
17
|
+
| <a id="property-parent"></a> `parent` | `RouteNode` \| `null` | Parent route (null for root) | [types.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L96) |
|
|
18
|
+
| <a id="property-path"></a> `path` | `string` | Route path segment (relative or absolute) | [types.ts:81](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L81) |
|
|
19
|
+
| <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if path contains params | [types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L85) |
|
|
20
|
+
| <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) States with meta.route can receive play.route events | [types.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L92) |
|
|
21
|
+
| <a id="property-stateid"></a> `stateId` | `string` | XState state ID this route maps to | [types.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L87) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteObject
|
|
4
4
|
|
|
5
|
-
Defined in: [types.ts:
|
|
5
|
+
Defined in: [types.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L39)
|
|
6
6
|
|
|
7
7
|
Route object with additional metadata.
|
|
8
8
|
|
|
@@ -18,4 +18,4 @@ Additional route metadata (title, breadcrumb, etc.)
|
|
|
18
18
|
|
|
19
19
|
| Property | Type | Description | Defined in |
|
|
20
20
|
| --------------------------------- | -------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
-
| <a id="property-path"></a> `path` | `string` | Route path template (e.g., '/user/:id') | [types.ts:
|
|
21
|
+
| <a id="property-path"></a> `path` | `string` | Route path template (e.g., '/user/:id') | [types.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L41) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteTree
|
|
4
4
|
|
|
5
|
-
Defined in: [types.ts:
|
|
5
|
+
Defined in: [types.ts:108](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L108)
|
|
6
6
|
|
|
7
7
|
Complete route tree with lookup maps
|
|
8
8
|
|
|
@@ -13,8 +13,9 @@ Provides bidirectional mapping between state IDs and URL paths:
|
|
|
13
13
|
|
|
14
14
|
## Properties
|
|
15
15
|
|
|
16
|
-
| Property | Type
|
|
17
|
-
| ------------------------------------------- |
|
|
18
|
-
| <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\>
|
|
19
|
-
| <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\>
|
|
20
|
-
| <a id="property-
|
|
16
|
+
| Property | Type | Description | Defined in |
|
|
17
|
+
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map full path -> route node Used to look up state ID from URL path for play.route event targeting | [types.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L120) |
|
|
19
|
+
| <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map state ID -> route node Used to look up URL path from state ID for browser URL sync | [types.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L115) |
|
|
20
|
+
| <a id="property-graph"></a> `graph?` | `Graph`\<[`MachineNodeData`](MachineNodeData.md), [`MachineEdgeData`](MachineEdgeData.md), `any`, `any`\> | Graph representation of the state machine for advanced queries. Populated by extractMachineRoutes() — use for hierarchy queries, reachability checks, and transition-aware navigation via @statelyai/graph algorithms. **Example** `import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home");` | [types.ts:132](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L132) |
|
|
21
|
+
| <a id="property-root"></a> `root` | [`RouteNode`](RouteNode.md) | Root route node | [types.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L110) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteWatcherHandle
|
|
4
4
|
|
|
5
|
-
Defined in: [router-bridge-base.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [router-bridge-base.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/router-bridge-base.ts#L68)
|
|
6
6
|
|
|
7
7
|
Narrow interface for the TC39 Signal watcher used by `RouterBridgeBase` to
|
|
8
8
|
monitor `actor.currentRoute` changes.
|
|
@@ -24,7 +24,7 @@ created and managed internally by `RouterBridgeBase`.
|
|
|
24
24
|
unwatch(): void;
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Defined in: [router-bridge-base.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
27
|
+
Defined in: [router-bridge-base.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/router-bridge-base.ts#L72)
|
|
28
28
|
|
|
29
29
|
Stop observing and release the watcher.
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ Stop observing and release the watcher.
|
|
|
40
40
|
watch(signal): void;
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Defined in: [router-bridge-base.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
43
|
+
Defined in: [router-bridge-base.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/router-bridge-base.ts#L70)
|
|
44
44
|
|
|
45
45
|
Arm the watcher to observe the given signal.
|
|
46
46
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [types.ts:
|
|
5
|
+
Defined in: [types.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L264)
|
|
6
6
|
|
|
7
7
|
RouterBridge interface for runtime infrastructure adapters
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ class TanStackRouterBridge implements RouterBridge {
|
|
|
44
44
|
|
|
45
45
|
## See
|
|
46
46
|
|
|
47
|
-
[
|
|
47
|
+
[Play RFC](../../../_media/play.md) - Invariant INV-04
|
|
48
48
|
|
|
49
49
|
## Methods
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ class TanStackRouterBridge implements RouterBridge {
|
|
|
54
54
|
connect(): void | Promise<void>;
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Defined in: [types.ts:
|
|
57
|
+
Defined in: [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L280)
|
|
58
58
|
|
|
59
59
|
Connect the router bridge to the Actor
|
|
60
60
|
|
|
@@ -83,7 +83,7 @@ await bridge.connect();
|
|
|
83
83
|
disconnect(): void | Promise<void>;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: [types.ts:
|
|
86
|
+
Defined in: [types.ts:296](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L296)
|
|
87
87
|
|
|
88
88
|
Disconnect the router bridge from the Actor
|
|
89
89
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: VanillaRouter
|
|
4
4
|
|
|
5
|
-
Defined in: [create-router.ts:4](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [create-router.ts:4](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/create-router.ts#L4)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
9
|
| Property | Modifier | Type | Description | Defined in |
|
|
10
10
|
| ------------------------------------------- | ---------- | ------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
-
| <a id="property-history"></a> `history` | `readonly` | [`BrowserHistory`](BrowserHistory.md) | History instance | [create-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
12
|
-
| <a id="property-routetree"></a> `routeTree` | `readonly` | [`RouteTree`](RouteTree.md) | Route tree (for structure reference) | [create-router.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
11
|
+
| <a id="property-history"></a> `history` | `readonly` | [`BrowserHistory`](BrowserHistory.md) | History instance | [create-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/create-router.ts#L8) |
|
|
12
|
+
| <a id="property-routetree"></a> `routeTree` | `readonly` | [`RouteTree`](RouteTree.md) | Route tree (for structure reference) | [create-router.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/create-router.ts#L13) |
|
|
13
13
|
|
|
14
14
|
## Methods
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ Defined in: [create-router.ts:4](https://gitlab.com/xmachin-es/xmachines-js/-/bl
|
|
|
19
19
|
destroy(): void;
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Defined in: [create-router.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
+
Defined in: [create-router.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/create-router.ts#L18)
|
|
23
23
|
|
|
24
24
|
Cleanup
|
|
25
25
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / MachineGraph
|
|
2
|
+
|
|
3
|
+
# Type Alias: MachineGraph
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type MachineGraph = Graph<MachineNodeData, MachineEdgeData>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [machine-to-graph.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/machine-to-graph.ts#L17)
|
|
10
|
+
|
|
11
|
+
Typed @statelyai/graph Graph representing a state machine.
|
|
12
|
+
Provides hierarchy queries, traversal algorithms, and reachability checks.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { getChildren, getSuccessors, hasPath } from "@statelyai/graph";
|
|
18
|
+
const graph: MachineGraph = machineToGraph(machine);
|
|
19
|
+
const children = getChildren(graph, "myMachine");
|
|
20
|
+
```
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type RouteMetadata = string | RouteObject;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [types.ts:
|
|
9
|
+
Defined in: [types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/types.ts#L49)
|
|
10
10
|
|
|
11
11
|
Route metadata from state machine `meta.route` field.
|
|
@@ -70,6 +70,12 @@ const stopWatching = watchSignal(actor.currentRoute, (route) => {
|
|
|
70
70
|
stopWatching();
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
`watchSignal()` is memory-safe:
|
|
74
|
+
|
|
75
|
+
- Calling the returned cleanup before a pending microtask fires will **not** invoke the callback — a `disposed` flag prevents use-after-free when components unmount with in-flight updates.
|
|
76
|
+
- Rapid synchronous signal changes coalesce to **one** microtask (`needsEnqueue` guard) — the callback receives the latest value only.
|
|
77
|
+
- Calling the cleanup multiple times is idempotent (no throw).
|
|
78
|
+
|
|
73
79
|
`watchSignal()` preserves the same canonical watcher lifecycle described below. It is an optional helper for adapter and renderer code; raw `Signal` APIs remain the base substrate.
|
|
74
80
|
|
|
75
81
|
## Canonical Watcher Lifecycle
|
|
@@ -110,7 +116,7 @@ Always dispose explicitly. Do not rely on GC-only cleanup guidance.
|
|
|
110
116
|
|
|
111
117
|
- [TC39 Signals Proposal](https://github.com/tc39/proposal-signals)
|
|
112
118
|
- [signal-polyfill](https://github.com/proposal-signals/signal-polyfill)
|
|
113
|
-
- [
|
|
119
|
+
- [Play RFC](../../_media/play.md)
|
|
114
120
|
|
|
115
121
|
## License
|
|
116
122
|
|
|
@@ -153,7 +159,7 @@ count.set(5); // Logs: Count: 5 Doubled: 10
|
|
|
153
159
|
|
|
154
160
|
## See
|
|
155
161
|
|
|
156
|
-
- [
|
|
162
|
+
- [Play RFC](../../_media/play.md) - Invariant INV-05
|
|
157
163
|
- [TC39 Signals Proposal](https://github.com/tc39/proposal-signals)
|
|
158
164
|
|
|
159
165
|
## Remarks
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function watchSignal<T>(signal, onValue): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-signals/src/watch-signal.ts:
|
|
9
|
+
Defined in: [packages/play-signals/src/watch-signal.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/watch-signal.ts#L21)
|
|
10
10
|
|
|
11
11
|
Subscribe to a single signal using the canonical one-shot watcher lifecycle.
|
|
12
12
|
|
|
@@ -15,6 +15,13 @@ drained, then the watcher re-arms itself so future updates are not missed.
|
|
|
15
15
|
The returned cleanup keeps teardown idempotent by tolerating already-detached
|
|
16
16
|
watchers.
|
|
17
17
|
|
|
18
|
+
**Memory safety (Phase 29):**
|
|
19
|
+
|
|
20
|
+
- `disposed` flag prevents post-cleanup callback execution: if cleanup is
|
|
21
|
+
called before a pending microtask fires, the microtask returns early.
|
|
22
|
+
- `needsEnqueue` guard dedups rapid synchronous signal changes: only one
|
|
23
|
+
microtask is ever queued per batch of synchronous mutations.
|
|
24
|
+
|
|
18
25
|
## Type Parameters
|
|
19
26
|
|
|
20
27
|
| Type Parameter |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ComputedOptions\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L84)
|
|
6
6
|
|
|
7
7
|
Options for creating Signal.Computed
|
|
8
8
|
|
|
@@ -31,4 +31,4 @@ const options: ComputedOptions<string> = {
|
|
|
31
31
|
|
|
32
32
|
| Property | Type | Description | Defined in |
|
|
33
33
|
| -------------------------------------- | ----------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
34
|
-
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
34
|
+
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L88) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalComputed\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L111)
|
|
6
6
|
|
|
7
7
|
Lazily-evaluated, memoized computed signal
|
|
8
8
|
|
|
@@ -38,7 +38,7 @@ console.log(doubled.get()); // 10 (memoized, not recomputed)
|
|
|
38
38
|
get(): T;
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
41
|
+
Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L117)
|
|
42
42
|
|
|
43
43
|
Read computed value (recalculates only if dependencies changed)
|
|
44
44
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalOptions\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L26)
|
|
6
6
|
|
|
7
7
|
Options for creating Signal.State
|
|
8
8
|
|
|
@@ -32,4 +32,4 @@ const count = new Signal.State(0, options);
|
|
|
32
32
|
|
|
33
33
|
| Property | Type | Description | Defined in |
|
|
34
34
|
| -------------------------------------- | ----------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
35
|
-
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
35
|
+
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L33) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalState\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L53)
|
|
6
6
|
|
|
7
7
|
Writable state signal holding a single reactive value
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ console.log(name.get()); // 'Bob'
|
|
|
35
35
|
get(): T;
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
38
|
+
Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L59)
|
|
39
39
|
|
|
40
40
|
Read current value and track as dependency
|
|
41
41
|
|
|
@@ -53,7 +53,7 @@ Current value of the signal
|
|
|
53
53
|
set(value): void;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
56
|
+
Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L66)
|
|
57
57
|
|
|
58
58
|
Write new value and notify watchers if changed
|
|
59
59
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalWatcher
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L167)
|
|
6
6
|
|
|
7
7
|
Watcher for observing signal changes and scheduling effects
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ getPending(): (
|
|
|
40
40
|
| SignalComputed<unknown>)[];
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
43
|
+
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L187)
|
|
44
44
|
|
|
45
45
|
Get signals that changed since last check
|
|
46
46
|
|
|
@@ -60,7 +60,7 @@ Array of signals that have pending updates
|
|
|
60
60
|
unwatch(signal): void;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
63
|
+
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L180)
|
|
64
64
|
|
|
65
65
|
Stop watching a signal
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ Stop watching a signal
|
|
|
82
82
|
watch(signal): void;
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
85
|
+
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L173)
|
|
86
86
|
|
|
87
87
|
Start watching a signal for changes
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type WatcherNotify = () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-signals/src/types.ts#L139)
|
|
10
10
|
|
|
11
11
|
Notification callback for Signal.subtle.Watcher
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ Bridges TC39 Signal-driven actors to SolidJS's fine-grained reactivity. Business
|
|
|
15
15
|
- Routes action names from spec elements to `actor.send()` via the `actions` prop
|
|
16
16
|
- Manages per-view UI state in an `@xstate/store` atom (automatic or caller-supplied)
|
|
17
17
|
|
|
18
|
-
Per [
|
|
18
|
+
Per [Play RFC](../../_media/play.md):
|
|
19
19
|
|
|
20
20
|
- **Actor Authority (INV-01):** Guards in the machine decide all state transitions
|
|
21
21
|
- **Passive Infrastructure (INV-04):** Solid observes signals and dispatches events — never decides
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useActor(): PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/useActor.ts#L49)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRendererProps\<TLogic\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-solid/src/types.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-solid/src/types.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L27)
|
|
6
6
|
|
|
7
7
|
Props for PlayRenderer component
|
|
8
8
|
|
|
@@ -16,8 +16,8 @@ Props for PlayRenderer component
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description | Defined in |
|
|
18
18
|
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-actions"></a> `actions?` | `object` | Optional mapping of json-render action names to XState event type strings. Values are constrained to `EventFromLogic<TLogic>["type"]` — passing a non-existent event type string is a compile error when TLogic is specified. | [packages/play-solid/src/types.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-solid/src/types.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
-
| <a id="property-fallback"></a> `fallback?` | `any` | Optional element shown when currentView is null | [packages/play-solid/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | Component registry from @json-render/solid defineRegistry() | [packages/play-solid/src/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <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. | [packages/play-solid/src/types.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
+
| <a id="property-actions"></a> `actions?` | `object` | Optional mapping of json-render action names to XState event type strings. Values are constrained to `EventFromLogic<TLogic>["type"]` — passing a non-existent event type string is a compile error when TLogic is specified. | [packages/play-solid/src/types.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L51) |
|
|
20
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-solid/src/types.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L29) |
|
|
21
|
+
| <a id="property-fallback"></a> `fallback?` | `any` | Optional element shown when currentView is null | [packages/play-solid/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L35) |
|
|
22
|
+
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | Component registry from @json-render/solid defineRegistry() | [packages/play-solid/src/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L32) |
|
|
23
|
+
| <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. | [packages/play-solid/src/types.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/types.ts#L44) |
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type PlayActor = AbstractActor<AnyActorLogic>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/useActor.ts#L26)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const PlayRenderer: Component<PlayRendererProps>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/PlayRenderer.tsx:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/PlayRenderer.tsx:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid/src/PlayRenderer.tsx#L49)
|
|
10
10
|
|
|
11
11
|
Main renderer component that subscribes to actor signals and renders UI
|
|
12
12
|
|
|
@@ -10,7 +10,7 @@ SolidJS Router adapter using `RouterBridgeBase` for consistent actor↔router sy
|
|
|
10
10
|
|
|
11
11
|
`@xmachines/play-solid-router` provides seamless integration between SolidJS Router and XMachines state machines. Built on Solid's reactive primitives, it enables zero-adaptation signals synchronization.
|
|
12
12
|
|
|
13
|
-
Per [
|
|
13
|
+
Per [Play RFC](../../_media/play.md), this package implements:
|
|
14
14
|
|
|
15
15
|
- **Actor Authority (INV-01):** State machine controls navigation, router reflects decisions
|
|
16
16
|
- **Passive Infrastructure (INV-04):** Router observes `actor.currentRoute` signal
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-solid-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-solid-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-solid-router/src/route-map.ts#L26)
|
|
6
6
|
|
|
7
7
|
Shared bidirectional route map base class.
|
|
8
8
|
|
|
@@ -53,7 +53,7 @@ map.getPathByStateId("missing"); // null
|
|
|
53
53
|
new RouteMap(mappings): RouteMap;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: packages/play-router/
|
|
56
|
+
Defined in: [packages/play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/base-route-map.ts#L125)
|
|
57
57
|
|
|
58
58
|
Build a route map from an array of state ID ↔ path mappings.
|
|
59
59
|
|
|
@@ -83,7 +83,7 @@ buckets for efficient candidate selection.
|
|
|
83
83
|
getPathByStateId(stateId): string | null;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: packages/play-router/
|
|
86
|
+
Defined in: [packages/play-router/src/base-route-map.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/base-route-map.ts#L210)
|
|
87
87
|
|
|
88
88
|
Look up the path pattern registered for a state ID.
|
|
89
89
|
|
|
@@ -118,7 +118,7 @@ map.getPathByStateId("missing"); // null
|
|
|
118
118
|
getStateIdByPath(path): string | null;
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
Defined in: packages/play-router/
|
|
121
|
+
Defined in: [packages/play-router/src/base-route-map.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.19/packages/play-router/src/base-route-map.ts#L175)
|
|
122
122
|
|
|
123
123
|
Resolve a URL path to its mapped state ID.
|
|
124
124
|
|