@xmachines/docs 1.0.0-beta.18 → 1.0.0-beta.20

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.
Files changed (189) hide show
  1. package/api/@xmachines/play/README.md +1 -1
  2. package/api/@xmachines/play/classes/PlayError.md +4 -4
  3. package/api/@xmachines/play/type-aliases/PlayEvent.md +3 -3
  4. package/api/@xmachines/play-actor/README.md +2 -2
  5. package/api/@xmachines/play-actor/classes/AbstractActor.md +4 -4
  6. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  10. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  11. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  12. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  13. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  14. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  15. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  16. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  17. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  18. package/api/@xmachines/play-react/README.md +7 -2
  19. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +9 -5
  20. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  21. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  22. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  23. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  24. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +6 -6
  25. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  26. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  27. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
  28. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  29. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
  30. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  31. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +9 -9
  32. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  33. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  34. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +4 -4
  35. package/api/@xmachines/play-router/README.md +103 -47
  36. package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
  37. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -21
  38. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  39. package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
  40. package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -1
  41. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  42. package/api/@xmachines/play-router/functions/createRouter.md +1 -1
  43. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  44. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +6 -42
  45. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  46. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  47. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  48. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  49. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +38 -0
  50. package/api/@xmachines/play-router/functions/isRouteReachable.md +38 -0
  51. package/api/@xmachines/play-router/functions/machineToGraph.md +19 -0
  52. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  53. package/api/@xmachines/play-router/functions/sanitizePathname.md +40 -0
  54. package/api/@xmachines/play-router/functions/validateRouteFormat.md +9 -8
  55. package/api/@xmachines/play-router/functions/validateStateExists.md +8 -8
  56. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
  57. package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
  58. package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
  59. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
  60. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +15 -0
  61. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +17 -0
  62. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +7 -7
  63. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  64. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  65. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  66. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  67. package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -6
  68. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  69. package/api/@xmachines/play-router/interfaces/RouterBridge.md +4 -4
  70. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
  71. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +20 -0
  72. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  73. package/api/@xmachines/play-signals/README.md +8 -2
  74. package/api/@xmachines/play-signals/functions/watchSignal.md +8 -1
  75. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  76. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  77. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  78. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  79. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  80. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  81. package/api/@xmachines/play-solid/README.md +1 -1
  82. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  83. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
  84. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  85. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  86. package/api/@xmachines/play-solid-router/README.md +1 -1
  87. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  88. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
  89. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  90. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +16 -16
  92. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +9 -9
  93. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  94. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  95. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +4 -4
  96. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  97. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  98. package/api/@xmachines/play-tanstack-react-router/README.md +1 -4
  99. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  100. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
  101. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  102. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  103. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  104. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +28 -0
  105. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
  106. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
  107. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +9 -9
  108. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  109. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  110. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  111. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +4 -4
  112. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  113. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  114. package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
  115. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  116. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +26 -25
  117. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  118. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  119. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +9 -9
  120. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  121. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  122. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +4 -4
  123. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  124. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  125. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
  126. package/api/@xmachines/play-vue/README.md +1 -1
  127. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  128. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  129. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  130. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  131. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  132. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  133. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  134. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  135. package/api/@xmachines/play-vue-router/README.md +2 -1
  136. package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
  137. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
  138. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +27 -32
  139. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  140. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +9 -9
  141. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
  142. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +4 -4
  143. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  144. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  145. package/api/@xmachines/play-xstate/README.md +6 -6
  146. package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
  147. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  148. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  149. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  150. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +36 -0
  151. package/api/@xmachines/play-xstate/functions/definePlayer.md +2 -2
  152. package/api/@xmachines/play-xstate/functions/deriveRoute.md +2 -2
  153. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  154. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  155. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  156. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  157. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  158. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  159. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  160. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  161. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  162. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  163. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  164. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  165. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  166. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  167. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  168. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  169. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  170. package/api/_media/play.md +447 -0
  171. package/examples/multi-router-integration.md +1 -1
  172. package/examples/routing-patterns.md +1 -1
  173. package/guides/installation.md +30 -30
  174. package/package.json +5 -3
  175. package/rfc/broker.md +100 -0
  176. package/rfc/browser.md +44 -0
  177. package/rfc/cli.md +118 -0
  178. package/rfc/git.md +61 -0
  179. package/rfc/mcp.md +43 -0
  180. package/rfc/node.md +36 -0
  181. package/rfc/play.md +447 -0
  182. package/rfc/rest.md +102 -0
  183. package/rfc/run.md +159 -0
  184. package/rfc/streams.md +168 -0
  185. package/api/@xmachines/play-router/functions/crawlMachine.md +0 -92
  186. package/api/@xmachines/play-router/functions/extractRoute.md +0 -45
  187. package/api/@xmachines/play-router/interfaces/StateVisit.md +0 -15
  188. package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +0 -64
  189. package/api/@xmachines/play-xstate/functions/stateMatches.md +0 -25
@@ -6,7 +6,7 @@
6
6
  function findRouteById(tree, id): RouteNode | undefined;
7
7
  ```
8
8
 
9
- Defined in: [index.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/index.ts#L70)
9
+ Defined in: [find-route.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/find-route.ts#L91)
10
10
 
11
11
  Find route node by state ID
12
12
 
@@ -6,7 +6,7 @@
6
6
  function findRouteByPath(tree, path): RouteNode | undefined;
7
7
  ```
8
8
 
9
- Defined in: [index.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/index.ts#L162)
9
+ Defined in: [find-route.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/find-route.ts#L116)
10
10
 
11
11
  Find route node by URL path
12
12
 
@@ -6,7 +6,7 @@
6
6
  function getNavigableRoutes(tree, stateId): RouteNode[];
7
7
  ```
8
8
 
9
- Defined in: [query.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L20)
9
+ Defined in: [query.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/query.ts#L22)
10
10
 
11
11
  Get all routes navigable from given state
12
12
 
@@ -6,7 +6,7 @@
6
6
  function getRoutableRoutes(tree): RouteNode[];
7
7
  ```
8
8
 
9
- Defined in: [query.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L50)
9
+ Defined in: [query.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/query.ts#L67)
10
10
 
11
11
  Get all routable routes from tree as flat array
12
12
 
@@ -0,0 +1,38 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / getTransitionReachableRoutes
2
+
3
+ # Function: getTransitionReachableRoutes()
4
+
5
+ ```ts
6
+ function getTransitionReachableRoutes(graph, stateId): string[];
7
+ ```
8
+
9
+ Defined in: [query.ts:113](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/query.ts#L113)
10
+
11
+ Get routes reachable via transitions from current state
12
+
13
+ Uses the @statelyai/graph successor algorithm to find all states
14
+ directly reachable via transition edges from the given state,
15
+ then filters to those with defined routes.
16
+
17
+ ## Parameters
18
+
19
+ | Parameter | Type | Description |
20
+ | --------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
21
+ | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | Machine graph from RouteTree.graph |
22
+ | `stateId` | `string` | Current state ID (e.g., "test.home") |
23
+
24
+ ## Returns
25
+
26
+ `string`[]
27
+
28
+ Array of route paths reachable via transitions
29
+
30
+ ## Example
31
+
32
+ ```typescript
33
+ const tree = extractMachineRoutes(machine);
34
+ if (tree.graph) {
35
+ const reachable = getTransitionReachableRoutes(tree.graph, "auth.loggedIn");
36
+ // ['/dashboard', '/settings'] — routes reachable via transitions
37
+ }
38
+ ```
@@ -0,0 +1,38 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / isRouteReachable
2
+
3
+ # Function: isRouteReachable()
4
+
5
+ ```ts
6
+ function isRouteReachable(graph, fromStateId, toStateId): boolean;
7
+ ```
8
+
9
+ Defined in: [query.ts:149](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/query.ts#L149)
10
+
11
+ Check if a route is reachable from current state via transitions
12
+
13
+ Uses @statelyai/graph path-finding to determine if there exists
14
+ a chain of transition edges from the source state to the target state.
15
+
16
+ ## Parameters
17
+
18
+ | Parameter | Type | Description |
19
+ | ------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
20
+ | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | Machine graph from RouteTree.graph |
21
+ | `fromStateId` | `string` | Source state ID |
22
+ | `toStateId` | `string` | Target state ID |
23
+
24
+ ## Returns
25
+
26
+ `boolean`
27
+
28
+ true if a transition path exists, false otherwise
29
+
30
+ ## Example
31
+
32
+ ```typescript
33
+ const tree = extractMachineRoutes(machine);
34
+ if (tree.graph) {
35
+ const canReach = isRouteReachable(tree.graph, "auth.login", "auth.dashboard");
36
+ // true if login → dashboard transition path exists
37
+ }
38
+ ```
@@ -0,0 +1,19 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / machineToGraph
2
+
3
+ # Function: machineToGraph()
4
+
5
+ ```ts
6
+ function machineToGraph(machine): MachineGraph;
7
+ ```
8
+
9
+ Defined in: [machine-to-graph.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/machine-to-graph.ts#L70)
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type |
14
+ | --------- | ------------------------------------------------------------------------- |
15
+ | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) |
16
+
17
+ ## Returns
18
+
19
+ [`MachineGraph`](../type-aliases/MachineGraph.md)
@@ -6,7 +6,7 @@
6
6
  function routeExists(tree, path): boolean;
7
7
  ```
8
8
 
9
- Defined in: [query.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L72)
9
+ Defined in: [query.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/query.ts#L89)
10
10
 
11
11
  Validate route path exists in tree
12
12
 
@@ -0,0 +1,40 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / sanitizePathname
2
+
3
+ # Function: sanitizePathname()
4
+
5
+ ```ts
6
+ function sanitizePathname(pathname): string | null;
7
+ ```
8
+
9
+ Defined in: [router-sync.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/router-sync.ts#L63)
10
+
11
+ Normalize a pathname before route-map lookup.
12
+
13
+ This strips query/hash fragments, collapses duplicate slashes, and rejects
14
+ implausibly long paths that should never enter route resolution.
15
+
16
+ Returns `null` for paths exceeding 2048 characters (malformed/adversarial input).
17
+ Adapters that bypass `RouterBridgeBase.syncActorFromRouter()` (e.g. `VueRouterBridge`)
18
+ must call this function directly and return early on `null` to apply the same
19
+ defense-in-depth security guarantee as the shared base class.
20
+
21
+ ## Parameters
22
+
23
+ | Parameter | Type | Description |
24
+ | ---------- | -------- | --------------------------------------------- |
25
+ | `pathname` | `string` | Raw path string from router navigation event. |
26
+
27
+ ## Returns
28
+
29
+ `string` \| `null`
30
+
31
+ Normalized path string, or `null` if the path is malformed/too long.
32
+
33
+ ## Example
34
+
35
+ ```typescript
36
+ import { sanitizePathname } from "@xmachines/play-router";
37
+
38
+ const clean = sanitizePathname(to.path);
39
+ if (clean === null) return; // reject malformed path
40
+ ```
@@ -6,19 +6,20 @@
6
6
  function validateRouteFormat(routePath, stateId): void;
7
7
  ```
8
8
 
9
- Defined in: [validate-routes.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/validate-routes.ts#L14)
9
+ Defined in: [validate-routes.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/validate-routes.ts#L14)
10
10
 
11
11
  Validate route path format
12
12
 
13
- Ensures route paths start with "/" (absolute or relative).
14
- Per Route Protocol spec, all routes must have explicit path structure.
13
+ Ensures route paths are non-empty strings. Both absolute paths ("/foo")
14
+ and relative paths ("foo", "child/nested") are accepted. Relative routes
15
+ inherit their parent state's path prefix when the tree is built.
15
16
 
16
17
  ## Parameters
17
18
 
18
- | Parameter | Type | Description |
19
- | ----------- | -------- | ----------------------------------- |
20
- | `routePath` | `string` | Route path to validate |
21
- | `stateId` | `string` | State identifier for error messages |
19
+ | Parameter | Type | Description |
20
+ | ----------- | -------- | --------------------------------------------- |
21
+ | `routePath` | `string` | Route path to validate (absolute or relative) |
22
+ | `stateId` | `string` | State identifier for error messages |
22
23
 
23
24
  ## Returns
24
25
 
@@ -26,4 +27,4 @@ Per Route Protocol spec, all routes must have explicit path structure.
26
27
 
27
28
  ## Throws
28
29
 
29
- If route path doesn't start with /
30
+ If route path is empty
@@ -3,22 +3,22 @@
3
3
  # Function: validateStateExists()
4
4
 
5
5
  ```ts
6
- function validateStateExists(stateId, stateMap): void;
6
+ function validateStateExists(stateId, stateIds): void;
7
7
  ```
8
8
 
9
- Defined in: [validate-routes.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/validate-routes.ts#L32)
9
+ Defined in: [validate-routes.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/validate-routes.ts#L32)
10
10
 
11
- Validate state exists in state map
11
+ Validate state exists in state ID set
12
12
 
13
13
  Ensures referenced state IDs exist in the machine graph.
14
14
  Build-time validation prevents broken route references.
15
15
 
16
16
  ## Parameters
17
17
 
18
- | Parameter | Type | Description |
19
- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------- |
20
- | `stateId` | `string` | State identifier to validate |
21
- | `stateMap` | `Map`\<`string`, [`StateNode`](https://www.jsdocs.io/package/xstate#StateNode)\<[`MachineContext`](https://www.jsdocs.io/package/xstate#MachineContext), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\>\> | Map of all state IDs to StateNodes |
18
+ | Parameter | Type | Description |
19
+ | ---------- | ----------------- | ------------------------------------------------- |
20
+ | `stateId` | `string` | State identifier to validate |
21
+ | `stateIds` | `Set`\<`string`\> | Set of all known state IDs from the machine graph |
22
22
 
23
23
  ## Returns
24
24
 
@@ -26,4 +26,4 @@ Build-time validation prevents broken route references.
26
26
 
27
27
  ## Throws
28
28
 
29
- If state ID doesn't exist in map
29
+ If state ID doesn't exist in set
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: BaseRouteMapping
4
4
 
5
- Defined in: [base-route-map.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L64)
5
+ Defined in: [base-route-map.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/base-route-map.ts#L64)
6
6
 
7
7
  A single state ID ↔ path mapping entry.
8
8
 
@@ -23,5 +23,5 @@ const optionalMapping: BaseRouteMapping = { stateId: "settings", path: "/setting
23
23
 
24
24
  | Property | Modifier | Type | Description | Defined in |
25
25
  | --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
26
- | <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [base-route-map.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L68) |
27
- | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L66) |
26
+ | <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [base-route-map.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/base-route-map.ts#L68) |
27
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/base-route-map.ts#L66) |
@@ -2,17 +2,17 @@
2
2
 
3
3
  # Interface: BrowserHistory
4
4
 
5
- Defined in: [create-browser-history.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L1)
5
+ Defined in: [create-browser-history.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L1)
6
6
 
7
7
  ## Properties
8
8
 
9
9
  | Property | Modifier | Type | Description | Defined in |
10
10
  | ----------------------------------------- | ---------- | --------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | <a id="property-location"></a> `location` | `readonly` | `object` | Get current location state | [create-browser-history.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L5) |
12
- | `location.hash` | `public` | `string` | - | [create-browser-history.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L8) |
13
- | `location.pathname` | `public` | `string` | - | [create-browser-history.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L6) |
14
- | `location.search` | `public` | `string` | - | [create-browser-history.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L7) |
15
- | `location.state` | `public` | `unknown` | - | [create-browser-history.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L9) |
11
+ | <a id="property-location"></a> `location` | `readonly` | `object` | Get current location state | [create-browser-history.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L5) |
12
+ | `location.hash` | `public` | `string` | - | [create-browser-history.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L8) |
13
+ | `location.pathname` | `public` | `string` | - | [create-browser-history.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L6) |
14
+ | `location.search` | `public` | `string` | - | [create-browser-history.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L7) |
15
+ | `location.state` | `public` | `unknown` | - | [create-browser-history.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L9) |
16
16
 
17
17
  ## Methods
18
18
 
@@ -22,7 +22,7 @@ Defined in: [create-browser-history.ts:1](https://gitlab.com/xmachin-es/xmachine
22
22
  back(): void;
23
23
  ```
24
24
 
25
- Defined in: [create-browser-history.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L26)
25
+ Defined in: [create-browser-history.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L26)
26
26
 
27
27
  #### Returns
28
28
 
@@ -36,7 +36,7 @@ Defined in: [create-browser-history.ts:26](https://gitlab.com/xmachin-es/xmachin
36
36
  createHref(path): string;
37
37
  ```
38
38
 
39
- Defined in: [create-browser-history.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L38)
39
+ Defined in: [create-browser-history.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L38)
40
40
 
41
41
  Create href from path
42
42
 
@@ -58,7 +58,7 @@ Create href from path
58
58
  destroy(): void;
59
59
  ```
60
60
 
61
- Defined in: [create-browser-history.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L47)
61
+ Defined in: [create-browser-history.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L47)
62
62
 
63
63
  Cleanup.
64
64
 
@@ -78,7 +78,7 @@ wrapper is destroyed.
78
78
  forward(): void;
79
79
  ```
80
80
 
81
- Defined in: [create-browser-history.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L27)
81
+ Defined in: [create-browser-history.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L27)
82
82
 
83
83
  #### Returns
84
84
 
@@ -92,7 +92,7 @@ Defined in: [create-browser-history.ts:27](https://gitlab.com/xmachin-es/xmachin
92
92
  go(delta): void;
93
93
  ```
94
94
 
95
- Defined in: [create-browser-history.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L25)
95
+ Defined in: [create-browser-history.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L25)
96
96
 
97
97
  Go back/forward
98
98
 
@@ -114,7 +114,7 @@ Go back/forward
114
114
  push(path, state?): void;
115
115
  ```
116
116
 
117
- Defined in: [create-browser-history.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L15)
117
+ Defined in: [create-browser-history.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L15)
118
118
 
119
119
  Push new URL to history
120
120
 
@@ -137,7 +137,7 @@ Push new URL to history
137
137
  replace(path, state?): void;
138
138
  ```
139
139
 
140
- Defined in: [create-browser-history.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L20)
140
+ Defined in: [create-browser-history.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L20)
141
141
 
142
142
  Replace current URL in history
143
143
 
@@ -160,7 +160,7 @@ Replace current URL in history
160
160
  subscribe(listener): () => void;
161
161
  ```
162
162
 
163
- Defined in: [create-browser-history.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L33)
163
+ Defined in: [create-browser-history.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L33)
164
164
 
165
165
  Subscribe to history changes
166
166
  Returns unsubscribe function
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: BrowserWindow
4
4
 
5
- Defined in: [create-browser-history.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L59)
5
+ Defined in: [create-browser-history.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L59)
6
6
 
7
7
  Minimal window interface for createBrowserHistory
8
8
 
@@ -14,17 +14,17 @@ Avoids coupling to `Window & typeof globalThis` which varies across environments
14
14
 
15
15
  | Property | Modifier | Type | Defined in |
16
16
  | ----------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
- | <a id="property-history"></a> `history` | `public` | `object` | [create-browser-history.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L60) |
18
- | `history.state` | `readonly` | `unknown` | [create-browser-history.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L61) |
19
- | `history.back` | `public` | `void` | [create-browser-history.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L65) |
20
- | `history.forward` | `public` | `void` | [create-browser-history.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L66) |
21
- | `history.go` | `public` | `void` | [create-browser-history.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L64) |
22
- | `history.pushState` | `public` | `void` | [create-browser-history.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L62) |
23
- | `history.replaceState` | `public` | `void` | [create-browser-history.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L63) |
24
- | <a id="property-location"></a> `location` | `public` | `object` | [create-browser-history.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L68) |
25
- | `location.hash` | `readonly` | `string` | [create-browser-history.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L71) |
26
- | `location.pathname` | `readonly` | `string` | [create-browser-history.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L69) |
27
- | `location.search` | `readonly` | `string` | [create-browser-history.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L70) |
17
+ | <a id="property-history"></a> `history` | `public` | `object` | [create-browser-history.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L60) |
18
+ | `history.state` | `readonly` | `unknown` | [create-browser-history.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L61) |
19
+ | `history.back` | `public` | `void` | [create-browser-history.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L65) |
20
+ | `history.forward` | `public` | `void` | [create-browser-history.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L66) |
21
+ | `history.go` | `public` | `void` | [create-browser-history.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L64) |
22
+ | `history.pushState` | `public` | `void` | [create-browser-history.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L62) |
23
+ | `history.replaceState` | `public` | `void` | [create-browser-history.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L63) |
24
+ | <a id="property-location"></a> `location` | `public` | `object` | [create-browser-history.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L68) |
25
+ | `location.hash` | `readonly` | `string` | [create-browser-history.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L71) |
26
+ | `location.pathname` | `readonly` | `string` | [create-browser-history.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L69) |
27
+ | `location.search` | `readonly` | `string` | [create-browser-history.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L70) |
28
28
 
29
29
  ## Methods
30
30
 
@@ -34,7 +34,7 @@ Avoids coupling to `Window & typeof globalThis` which varies across environments
34
34
  addEventListener(type, listener): void;
35
35
  ```
36
36
 
37
- Defined in: [create-browser-history.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L73)
37
+ Defined in: [create-browser-history.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L73)
38
38
 
39
39
  #### Parameters
40
40
 
@@ -55,7 +55,7 @@ Defined in: [create-browser-history.ts:73](https://gitlab.com/xmachin-es/xmachin
55
55
  removeEventListener(type, listener): void;
56
56
  ```
57
57
 
58
- Defined in: [create-browser-history.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L74)
58
+ Defined in: [create-browser-history.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-browser-history.ts#L74)
59
59
 
60
60
  #### Parameters
61
61
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: ConnectRouterOptions
4
4
 
5
- Defined in: [connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/connect-router.ts#L8)
5
+ Defined in: [connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/connect-router.ts#L8)
6
6
 
7
7
  ## Properties
8
8
 
9
9
  | Property | Type | Defined in |
10
10
  | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
11
- | <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)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | [connect-router.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/connect-router.ts#L9) |
12
- | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](RouteMap.md) | [connect-router.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/connect-router.ts#L11) |
13
- | <a id="property-router"></a> `router` | [`VanillaRouter`](VanillaRouter.md) | [connect-router.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/connect-router.ts#L10) |
11
+ | <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)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | [connect-router.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/connect-router.ts#L9) |
12
+ | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](RouteMap.md) | [connect-router.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/connect-router.ts#L11) |
13
+ | <a id="property-router"></a> `router` | [`VanillaRouter`](VanillaRouter.md) | [connect-router.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/connect-router.ts#L10) |
@@ -0,0 +1,15 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / MachineEdgeData
2
+
3
+ # Interface: MachineEdgeData
4
+
5
+ Defined in: [types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L22)
6
+
7
+ Data attached to each edge in the machine graph representation.
8
+ Captures transition event and guard information.
9
+
10
+ ## Properties
11
+
12
+ | Property | Type | Description | Defined in |
13
+ | -------------------------------------------- | -------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
14
+ | <a id="property-eventtype"></a> `eventType` | `string` | The event type that triggers this transition | [types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L24) |
15
+ | <a id="property-guardtype"></a> `guardType?` | `string` | String representation of guard (if any) | [types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L26) |
@@ -0,0 +1,17 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / MachineNodeData
2
+
3
+ # Interface: MachineNodeData
4
+
5
+ Defined in: [types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L7)
6
+
7
+ Data attached to each node in the machine graph representation.
8
+ Captures the essential state metadata needed for route extraction and queries.
9
+
10
+ ## Properties
11
+
12
+ | Property | Type | Description | Defined in |
13
+ | --------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
14
+ | <a id="property-meta"></a> `meta?` | `Record`\<`string`, `unknown`\> | Original state meta object | [types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L13) |
15
+ | <a id="property-route"></a> `route?` | `string` | Extracted route path from meta.route (string form) | [types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L15) |
16
+ | <a id="property-stateid"></a> `stateId` | `string` | XState state ID (e.g., "test.dashboard.overview") | [types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L9) |
17
+ | <a id="property-type"></a> `type` | `"atomic"` \| `"compound"` \| `"parallel"` \| `"final"` \| `"history"` | State type from XState | [types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L11) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayRouteEvent
4
4
 
5
- Defined in: [types.ts:190](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L190)
5
+ Defined in: [types.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L216)
6
6
 
7
7
  Enhanced routing event with parameter and query support
8
8
 
@@ -94,7 +94,7 @@ actor.send(event);
94
94
 
95
95
  ## See
96
96
 
97
- [RFC Play v1](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md)
97
+ [Play RFC](../../../_media/play.md)
98
98
 
99
99
  ## Remarks
100
100
 
@@ -112,8 +112,8 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
112
112
 
113
113
  | Property | Modifier | Type | Defined in |
114
114
  | -------------------------------------- | ---------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
115
- | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [types.ts:195](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L195) |
116
- | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:193](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L193) |
117
- | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:194](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L194) |
118
- | <a id="property-to"></a> `to` | `readonly` | `string` | [types.ts:192](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L192) |
119
- | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [types.ts:191](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L191) |
115
+ | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [types.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L221) |
116
+ | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:219](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L219) |
117
+ | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:220](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L220) |
118
+ | <a id="property-to"></a> `to` | `readonly` | `string` | [types.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L218) |
119
+ | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [types.ts:217](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L217) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouteInfo
4
4
 
5
- Defined in: [types.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L40)
5
+ Defined in: [types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L54)
6
6
 
7
7
  Extracted route information from a state node
8
8
 
@@ -10,10 +10,10 @@ Extracted route information from a state node
10
10
 
11
11
  | Property | Type | Description | Defined in |
12
12
  | --------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | Whether route path is absolute (starts with /) | [types.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L50) |
14
- | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original route metadata | [types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L57) |
15
- | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if routePath contains params | [types.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L48) |
16
- | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) true = has meta.route, can receive play.route events | [types.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L55) |
17
- | <a id="property-routepath"></a> `routePath` | `string` | Route path extracted from meta.route | [types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L46) |
18
- | <a id="property-stateid"></a> `stateId` | `string` | State identifier (node.id or path.join('.')) | [types.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L42) |
19
- | <a id="property-statepath"></a> `statePath` | `string`[] | State path segments from root | [types.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/types.ts#L44) |
13
+ | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | Whether route path is absolute (starts with /) | [types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L64) |
14
+ | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original route metadata | [types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L71) |
15
+ | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if routePath contains params | [types.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L62) |
16
+ | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) true = has meta.route, can receive play.route events | [types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L69) |
17
+ | <a id="property-routepath"></a> `routePath` | `string` | Route path extracted from meta.route | [types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L60) |
18
+ | <a id="property-stateid"></a> `stateId` | `string` | State identifier (node.id or path.join('.')) | [types.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L56) |
19
+ | <a id="property-statepath"></a> `statePath` | `string`[] | State path segments from root | [types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/types.ts#L58) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouteMap
4
4
 
5
- Defined in: [create-route-map.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-route-map.ts#L28)
5
+ Defined in: [create-route-map.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-route-map.ts#L28)
6
6
 
7
7
  Bidirectional route resolution interface returned by `createRouteMap()`.
8
8
 
@@ -23,7 +23,7 @@ events into `play.route` actor events.
23
23
  resolve(path): object;
24
24
  ```
25
25
 
26
- Defined in: [create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-route-map.ts#L45)
26
+ Defined in: [create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-route-map.ts#L45)
27
27
 
28
28
  Resolve a URL path to a state ID and params.
29
29
 
@@ -52,5 +52,5 @@ if (to) {
52
52
 
53
53
  | Name | Type | Defined in |
54
54
  | -------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
55
- | `params` | `Record`\<`string`, `string`\> | [create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-route-map.ts#L47) |
56
- | `to` | `string` \| `null` | [create-route-map.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-route-map.ts#L46) |
55
+ | `params` | `Record`\<`string`, `string`\> | [create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-route-map.ts#L47) |
56
+ | `to` | `string` \| `null` | [create-route-map.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.20/packages/play-router/src/create-route-map.ts#L46) |