@xmachines/docs 1.0.0-beta.21 → 1.0.0-beta.23

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 (177) hide show
  1. package/api/@xmachines/play/classes/PlayError.md +4 -4
  2. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  3. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  4. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  5. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  6. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
  7. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  8. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  9. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  10. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  11. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  12. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  13. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  14. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  15. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  16. package/api/@xmachines/play-dom-router/README.md +152 -0
  17. package/api/@xmachines/{play-router → play-dom-router}/functions/connectRouter.md +8 -4
  18. package/api/@xmachines/{play-router → play-dom-router}/functions/createBrowserHistory.md +7 -2
  19. package/api/@xmachines/{play-router → play-dom-router}/functions/createRouter.md +12 -34
  20. package/api/@xmachines/{play-router → play-dom-router}/interfaces/BrowserHistory.md +17 -17
  21. package/api/@xmachines/{play-router → play-dom-router}/interfaces/BrowserWindow.md +17 -17
  22. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +15 -0
  23. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +28 -0
  24. package/api/@xmachines/{play-router-demo → play-dom-router-demo}/README.md +20 -16
  25. package/api/@xmachines/play-react/README.md +20 -0
  26. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
  27. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  28. package/api/@xmachines/play-react/functions/useSignalEffect.md +8 -1
  29. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  30. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  31. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -6
  32. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  33. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  34. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +34 -21
  35. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  36. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
  37. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  38. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  39. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  40. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  41. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  42. package/api/@xmachines/play-router/README.md +24 -12
  43. package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
  44. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +34 -21
  45. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +32 -0
  46. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  47. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  48. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  49. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  50. package/api/@xmachines/play-router/functions/extractQuery.md +22 -0
  51. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  52. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  53. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  54. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  55. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  56. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  57. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  58. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  59. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  60. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  61. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  62. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +3 -3
  63. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +13 -0
  64. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  65. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  66. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
  67. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  68. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  69. package/api/@xmachines/play-router/interfaces/RouteMatch.md +12 -0
  70. package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
  71. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  72. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  73. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  74. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  75. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  76. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  77. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  78. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  79. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  80. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  81. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  82. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  83. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  84. package/api/@xmachines/play-solid/README.md +20 -0
  85. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  86. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -6
  87. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  88. package/api/@xmachines/play-solid/variables/PlayRenderer.md +7 -1
  89. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  90. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +35 -22
  91. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  92. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  93. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  94. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  95. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  96. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  97. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  98. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  99. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  100. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  101. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +34 -21
  102. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  103. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  104. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  105. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  106. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +1 -1
  107. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
  108. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  109. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  110. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  111. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  112. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  113. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  114. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  115. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  116. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +35 -22
  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 +6 -6
  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 +3 -3
  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 +20 -0
  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/classes/RouteMap.md +7 -7
  136. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
  137. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +35 -22
  138. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  139. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  140. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
  141. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  142. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  143. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  144. package/api/@xmachines/play-xstate/README.md +13 -1
  145. package/api/@xmachines/play-xstate/classes/PlayerActor.md +13 -13
  146. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  147. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  148. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  149. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  150. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  151. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  152. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  153. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  154. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  155. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  156. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  157. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  158. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  159. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  160. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  161. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  162. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  163. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  164. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  165. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  166. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  167. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  168. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  169. package/api/README.md +2 -1
  170. package/api/llms.txt +1 -0
  171. package/api/rfc/play.md +1 -1
  172. package/examples/README.md +1 -1
  173. package/examples/multi-router-integration.md +36 -26
  174. package/package.json +4 -2
  175. package/rfc/play.md +1 -1
  176. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +0 -13
  177. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +0 -28
@@ -6,7 +6,7 @@
6
6
  function definePlayer<TMachine>(config): PlayerFactory<TMachine>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/define-player.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/define-player.ts#L61)
9
+ Defined in: [packages/play-xstate/src/define-player.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/define-player.ts#L61)
10
10
 
11
11
  Create a player factory from an XState machine
12
12
 
@@ -6,7 +6,7 @@
6
6
  function deriveRoute(stateMeta): string | null;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/derive-route.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/derive-route.ts#L90)
9
+ Defined in: [packages/play-xstate/src/routing/derive-route.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/derive-route.ts#L90)
10
10
 
11
11
  Derive route from XState state metadata
12
12
 
@@ -6,7 +6,7 @@
6
6
  function eventMatches<TEvent>(eventType): Guard<unknown, TEvent>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/helpers.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/helpers.ts#L49)
9
+ Defined in: [packages/play-xstate/src/guards/helpers.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/helpers.ts#L49)
10
10
 
11
11
  Check if event type matches expected type
12
12
 
@@ -6,7 +6,7 @@
6
6
  function formatPlayRouteTransitions<T>(machineConfig): T;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L88)
9
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L88)
10
10
 
11
11
  Formats play.route transitions from declarative route configs
12
12
 
@@ -6,7 +6,7 @@
6
6
  function hasContext<TContext>(path): Guard<TContext, PlayEvent>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/helpers.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/helpers.ts#L23)
9
+ Defined in: [packages/play-xstate/src/guards/helpers.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/helpers.ts#L23)
10
10
 
11
11
  Check if context has a truthy value at path
12
12
 
@@ -6,7 +6,7 @@
6
6
  function isAbsoluteRoute(path): boolean;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/derive-route.ts:150](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/derive-route.ts#L150)
9
+ Defined in: [packages/play-xstate/src/routing/derive-route.ts:150](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/derive-route.ts#L150)
10
10
 
11
11
  Check if route path is absolute
12
12
 
@@ -6,7 +6,7 @@
6
6
  function negateGuard<TContext, TEvent>(guard): ComposedGuard;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:203](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/compose.ts#L203)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:203](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/compose.ts#L203)
10
10
 
11
11
  Negate a guard using XState's not() helper
12
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerConfig\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L7)
5
+ Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L7)
6
6
 
7
7
  Configuration for definePlayer()
8
8
 
@@ -16,5 +16,5 @@ Configuration for definePlayer()
16
16
 
17
17
  | Property | Type | Description | Defined in |
18
18
  | ---------------------------------------- | ------------------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | <a id="property-machine"></a> `machine` | `TMachine` | XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L9) |
20
- | <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | Lifecycle hooks and configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L12) |
19
+ | <a id="property-machine"></a> `machine` | `TMachine` | XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L9) |
20
+ | <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | Lifecycle hooks and configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L12) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerFactoryResumeOptions\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L47)
5
+ Defined in: [packages/play-xstate/src/types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L47)
6
6
 
7
7
  Optional restore arguments for the player factory.
8
8
 
@@ -19,4 +19,4 @@ Mirrors XState's createActor options bag while preserving the existing
19
19
 
20
20
  | Property | Type | Description | Defined in |
21
21
  | ------------------------------------------ | --------------------------------------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | <a id="property-snapshot"></a> `snapshot?` | [`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TMachine`\> | Persisted XState snapshot used to restore actor state. | [packages/play-xstate/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L49) |
22
+ | <a id="property-snapshot"></a> `snapshot?` | [`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TMachine`\> | Persisted XState snapshot used to restore actor state. | [packages/play-xstate/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L49) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerOptions\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L20)
5
+ Defined in: [packages/play-xstate/src/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L20)
6
6
 
7
7
  Player lifecycle hooks
8
8
 
@@ -18,8 +18,8 @@ Per CONTEXT.md: Rich set of hooks for observability
18
18
 
19
19
  | Property | Type | Description | Defined in |
20
20
  | ---------------------------------------------------- | --------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | Called on actor errors | [packages/play-xstate/src/types.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L38) |
22
- | <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | Called when actor starts | [packages/play-xstate/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L22) |
23
- | <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | Called when state signal changes | [packages/play-xstate/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L35) |
24
- | <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | Called when actor stops | [packages/play-xstate/src/types.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L25) |
25
- | <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | Called on every state transition | [packages/play-xstate/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L28) |
21
+ | <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | Called on actor errors | [packages/play-xstate/src/types.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L38) |
22
+ | <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | Called when actor starts | [packages/play-xstate/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L22) |
23
+ | <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | Called when state signal changes | [packages/play-xstate/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L35) |
24
+ | <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | Called when actor stops | [packages/play-xstate/src/types.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L25) |
25
+ | <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | Called on every state transition | [packages/play-xstate/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L28) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouteContext
4
4
 
5
- Defined in: [packages/play-xstate/src/routing/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L11)
5
+ Defined in: [packages/play-xstate/src/routing/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/types.ts#L11)
6
6
 
7
7
  Route build context from machine context
8
8
 
@@ -16,7 +16,7 @@ Route build context from machine context
16
16
 
17
17
  | Property | Type | Description | Defined in |
18
18
  | ------------------------------------------------ | ------------------------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | <a id="property-basepath"></a> `basePath?` | `string` | Base path for relative routes | [packages/play-xstate/src/routing/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L13) |
20
- | <a id="property-hash"></a> `hash?` | `string` | Hash fragment | [packages/play-xstate/src/routing/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L19) |
21
- | <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | Query parameters | [packages/play-xstate/src/routing/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L17) |
22
- | <a id="property-routeparams"></a> `routeParams?` | `Record`\<`string`, `unknown`\> | Route parameters to substitute | [packages/play-xstate/src/routing/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/types.ts#L15) |
19
+ | <a id="property-basepath"></a> `basePath?` | `string` | Base path for relative routes | [packages/play-xstate/src/routing/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/types.ts#L13) |
20
+ | <a id="property-hash"></a> `hash?` | `string` | Hash fragment | [packages/play-xstate/src/routing/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/types.ts#L19) |
21
+ | <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | Query parameters | [packages/play-xstate/src/routing/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/types.ts#L17) |
22
+ | <a id="property-routeparams"></a> `routeParams?` | `Record`\<`string`, `unknown`\> | Route parameters to substitute | [packages/play-xstate/src/routing/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/types.ts#L15) |
@@ -6,7 +6,7 @@
6
6
  type ComposedGuard = GuardPredicate<MachineContext, EventObject, unknown, ParameterizedObject>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/compose.ts#L14)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/compose.ts#L14)
10
10
 
11
11
  Narrowest public return type for guard composition helpers.
12
12
 
@@ -6,7 +6,7 @@
6
6
  type Guard<TContext, TEvent> = (args) => boolean;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/types.ts#L13)
9
+ Defined in: [packages/play-xstate/src/guards/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/types.ts#L13)
10
10
 
11
11
  Standard XState guard function signature
12
12
 
@@ -6,7 +6,7 @@
6
6
  type GuardArray<TContext, TEvent> = Guard<TContext, TEvent>[] | string[];
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/guards/types.ts#L23)
9
+ Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/guards/types.ts#L23)
10
10
 
11
11
  Array of guard predicates or guard names
12
12
 
@@ -6,7 +6,7 @@
6
6
  type PlayerFactory<TMachine> = (input?, options?) => PlayerActor<TMachine>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/types.ts#L57)
9
+ Defined in: [packages/play-xstate/src/types.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/types.ts#L57)
10
10
 
11
11
  Factory function returned by definePlayer()
12
12
 
@@ -6,7 +6,7 @@
6
6
  type RouteMachineConfig = object;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L52)
9
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L52)
10
10
 
11
11
  Minimal structural constraint for machine configs accepted by
12
12
  `formatPlayRouteTransitions`.
@@ -32,7 +32,7 @@ through the transform, so the return value remains directly usable by
32
32
  optional context?: unknown;
33
33
  ```
34
34
 
35
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L53)
35
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L53)
36
36
 
37
37
  ---
38
38
 
@@ -42,7 +42,7 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:5
42
42
  optional on?: Record<string, unknown>;
43
43
  ```
44
44
 
45
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L55)
45
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L55)
46
46
 
47
47
  ---
48
48
 
@@ -52,4 +52,4 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:5
52
52
  optional states?: Record<string, unknown>;
53
53
  ```
54
54
 
55
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L54)
55
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L54)
@@ -6,7 +6,7 @@
6
6
  type RouteStateNode = object;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L21)
9
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L21)
10
10
 
11
11
  Minimal structural shape of a single XState state node as read by
12
12
  `formatPlayRouteTransitions` when crawling the machine config.
@@ -29,7 +29,7 @@ the index signature.
29
29
  optional id?: string;
30
30
  ```
31
31
 
32
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L23)
32
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L23)
33
33
 
34
34
  Optional explicit state ID (e.g. `"home"`, `"settings"`). Used as the `#id` target in `play.route` events.
35
35
 
@@ -41,7 +41,7 @@ Optional explicit state ID (e.g. `"home"`, `"settings"`). Used as the `#id` targ
41
41
  optional meta?: object;
42
42
  ```
43
43
 
44
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L25)
44
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L25)
45
45
 
46
46
  State metadata — `meta.route` marks the state as routable.
47
47
 
@@ -61,6 +61,6 @@ URL path template (e.g. `"/profile/:username"`, `"/settings/:section?"`).
61
61
  optional states?: Record<string, RouteStateNode>;
62
62
  ```
63
63
 
64
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-xstate/src/routing/format-play-route-transitions.ts#L30)
64
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/play-xstate/src/routing/format-play-route-transitions.ts#L30)
65
65
 
66
66
  Nested child states, recursively crawled for additional route declarations.
@@ -6,7 +6,7 @@
6
6
  function defineXmVitestConfig(importMetaUrl, overrides): object;
7
7
  ```
8
8
 
9
- Defined in: [src/index.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/src/index.ts#L10)
9
+ Defined in: [src/index.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/shared/src/index.ts#L10)
10
10
 
11
11
  Create a Vitest config with XMachines workspace defaults.
12
12
 
@@ -26,4 +26,4 @@ render it under `@xmachines/shared` instead of nested module pages.
26
26
 
27
27
  | Name | Type | Defined in |
28
28
  | ------ | ----- | ---------------------------------------------------------------------------------------------------------------------------- |
29
- | `test` | `any` | [config/vitest.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/config/vitest.ts#L82) |
29
+ | `test` | `any` | [config/vitest.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/shared/config/vitest.ts#L82) |
@@ -6,7 +6,7 @@
6
6
  function xmAliases(importMetaUrl): Record<string, string>;
7
7
  ```
8
8
 
9
- Defined in: [src/index.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/shared/src/index.ts#L20)
9
+ Defined in: [src/index.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.23/packages/shared/src/index.ts#L20)
10
10
 
11
11
  Build Vite/Vitest alias entries for all `@xmachines/*` workspace packages.
12
12
 
package/api/README.md CHANGED
@@ -33,11 +33,12 @@ Generated API documentation for the XMachines JavaScript/TypeScript packages.
33
33
  - [@xmachines/play](@xmachines/play/README.md)
34
34
  - [@xmachines/play-actor](@xmachines/play-actor/README.md)
35
35
  - [@xmachines/play-dom](@xmachines/play-dom/README.md)
36
+ - [@xmachines/play-dom-router](@xmachines/play-dom-router/README.md)
37
+ - [@xmachines/play-dom-router-demo](@xmachines/play-dom-router-demo/README.md)
36
38
  - [@xmachines/play-react](@xmachines/play-react/README.md)
37
39
  - [@xmachines/play-react-router](@xmachines/play-react-router/README.md)
38
40
  - [@xmachines/play-react-router-demo](@xmachines/play-react-router-demo/README.md)
39
41
  - [@xmachines/play-router](@xmachines/play-router/README.md)
40
- - [@xmachines/play-router-demo](@xmachines/play-router-demo/README.md)
41
42
  - [@xmachines/play-signals](@xmachines/play-signals/README.md)
42
43
  - [@xmachines/play-solid](@xmachines/play-solid/README.md)
43
44
  - [@xmachines/play-solid-router](@xmachines/play-solid-router/README.md)
package/api/llms.txt CHANGED
@@ -26,6 +26,7 @@
26
26
  - [@xmachines/play](@xmachines/play/README.md): Core Play types and runtime contracts
27
27
  - [@xmachines/play-actor](@xmachines/play-actor/README.md): Abstract actor base class plus Routable and Viewable capabilities
28
28
  - [@xmachines/play-dom](@xmachines/play-dom/README.md): Vanilla DOM renderer for Viewable actors
29
+ - [@xmachines/play-dom-router](@xmachines/play-dom-router/README.md): Vanilla DOM browser history, router, and actor↔URL synchronization
29
30
  - [@xmachines/play-signals](@xmachines/play-signals/README.md): Signal primitives used by Play actors and adapters
30
31
  - [@xmachines/play-router](@xmachines/play-router/README.md): Route extraction, route maps, and shared routing infrastructure
31
32
  - [@xmachines/play-xstate](@xmachines/play-xstate/README.md): XState-backed player and actor integration
package/api/rfc/play.md CHANGED
@@ -199,7 +199,7 @@ Wraps XState v5 to satisfy the `AbstractActor` contract. Provides the primary AP
199
199
 
200
200
  **Utility Exports:**
201
201
 
202
- - Guard combinators: `composeGuards`, `composeGuardsOr`, `negateGuard`, `hasContext`, `eventMatches`, `stateMatches`
202
+ - Guard combinators: `composeGuards`, `composeGuardsOr`, `negateGuard`, `hasContext`, `eventMatches`, `contextFieldMatches`
203
203
  - Route derivation: `deriveRoute`, `isAbsoluteRoute`, `buildRouteUrl`, `formatPlayRouteTransitions`
204
204
 
205
205
  **Responsibilities:**
@@ -29,7 +29,7 @@ Complete working applications demonstrating actor-authoritative routing, shared
29
29
 
30
30
  ### Framework-Agnostic Baseline
31
31
 
32
- - **[Vanilla JavaScript Router Demo](../api/@xmachines/play-router-demo/README.md)** - Pure browser integration with the History API and DOM rendering; the lowest-level reference implementation for the router demos
32
+ - **[Vanilla JavaScript Router Demo](../api/@xmachines/play-dom-router-demo/README.md)** - Pure browser integration with the History API and DOM rendering; the lowest-level reference implementation for the router demos
33
33
 
34
34
  ### React Integrations
35
35
 
@@ -138,8 +138,10 @@ Framework-agnostic router for JSX-based frameworks.
138
138
  import {
139
139
  connectRouter,
140
140
  createBrowserHistory,
141
- createRouteMap,
142
141
  createRouter,
142
+ } from '@xmachines/play-dom-router';
143
+ import {
144
+ createRouteMap,
143
145
  extractMachineRoutes,
144
146
  } from '@xmachines/play-router';
145
147
  import { definePlayer } from '@xmachines/play-xstate';
@@ -151,11 +153,11 @@ const actor = createPlayer();
151
153
  // 2. Create framework-agnostic router
152
154
  const routeTree = extractMachineRoutes(machine);
153
155
  const routeMap = createRouteMap(routeTree);
154
- const history = createBrowserHistory();
156
+ const history = createBrowserHistory({ window });
155
157
  const router = createRouter({ routeTree, history });
156
158
 
157
- // 3. Connect router with manual integration
158
- const disconnect = connectRouter(actor, router, routeMap);
159
+ // 3. Connect router with actor (bidirectional sync)
160
+ const disconnect = connectRouter({ actor, router, routeMap });
159
161
 
160
162
  history.subscribe(() => {
161
163
  // Update your framework's router from the shared history state
@@ -189,24 +191,34 @@ h(resolveComponent(view.component), viewProps)
189
191
  Manual browser integration with no framework.
190
192
 
191
193
  ```typescript
192
- import { connectRouter } from "@xmachines/play-router";
194
+ import { createBrowserHistory, createRouter, connectRouter } from "@xmachines/play-dom-router";
195
+ import { extractMachineRoutes, createRouteMap } from "@xmachines/play-router";
193
196
 
194
197
  // 1. Create actor
195
198
  const actor = createPlayer();
199
+ actor.start();
196
200
 
197
- // 2. Connect router with browser integration
198
- const disconnect = connectRouter(actor, {
199
- onNavigate: (path) => {
200
- // Update browser history
201
- window.history.pushState({}, "", path);
202
- renderView();
203
- },
204
- });
201
+ // 2. Create browser history and router
202
+ const routeTree = extractMachineRoutes(machine);
203
+ const routeMap = createRouteMap(routeTree);
204
+ const history = createBrowserHistory({ window });
205
+ const router = createRouter({ routeTree, history });
206
+
207
+ // 3. Connect router with actor (handles all bidirectional sync)
208
+ const disconnect = connectRouter({ actor, router, routeMap });
205
209
 
206
- // 3. Manual rendering
207
- function renderView() {
208
- const view = actor.currentView.get();
210
+ // 4. Manual rendering — subscribe to actor signals
211
+ const watcher = new Signal.subtle.Watcher(() => {
212
+ queueMicrotask(() => {
213
+ const view = actor.currentView.get();
214
+ renderView(view);
215
+ watcher.watch(actor.currentView);
216
+ });
217
+ });
218
+ watcher.watch(actor.currentView);
219
+ renderView(actor.currentView.get());
209
220
 
221
+ function renderView(view) {
210
222
  // Vanilla JS rendering
211
223
  if (view.component === "HomeView") {
212
224
  document.getElementById("app").innerHTML = `
@@ -221,12 +233,6 @@ function renderView() {
221
233
  }
222
234
  }
223
235
 
224
- // 4. Listen to browser back/forward
225
- window.addEventListener("popstate", () => {
226
- const path = window.location.pathname;
227
- actor.send({ type: "play.route", to: path });
228
- });
229
-
230
236
  // 5. Manual event handlers
231
237
  function navigateToAbout() {
232
238
  actor.send({ type: "play.route", to: "/about" });
@@ -236,9 +242,12 @@ function navigateToHome() {
236
242
  actor.send({ type: "play.route", to: "/" });
237
243
  }
238
244
 
239
- // Start
240
- actor.start();
241
- renderView();
245
+ // 6. Cleanup on unload
246
+ window.addEventListener("beforeunload", () => {
247
+ disconnect();
248
+ router.destroy();
249
+ watcher.unwatch(actor.currentView);
250
+ });
242
251
  ```
243
252
 
244
253
  ### Benefits
@@ -282,5 +291,6 @@ All three modes preserve the 5 architectural invariants:
282
291
 
283
292
  - [play-tanstack-router README](../api/@xmachines/play-tanstack-react-router/README.md) - TanStack integration details
284
293
  - [play-react README](../api/@xmachines/play-react/README.md) - React renderer documentation
285
- - [play-router README](../api/@xmachines/play-router/README.md) - Framework-agnostic routing
294
+ - [play-router README](../api/@xmachines/play-router/README.md) - Framework-agnostic routing (route tree, route map, router bridge)
295
+ - [play-dom-router README](../api/@xmachines/play-dom-router/README.md) - Vanilla DOM bindings (`createBrowserHistory`, `createRouter`, `connectRouter`)
286
296
  - [Play RFC](../rfc/play.md) - Complete specification
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmachines/docs",
3
- "version": "1.0.0-beta.21",
3
+ "version": "1.0.0-beta.23",
4
4
  "description": "Documentation for XMachines",
5
5
  "keywords": [
6
6
  "documentation",
@@ -48,7 +48,9 @@
48
48
  "typedoc": "typedoc"
49
49
  },
50
50
  "devDependencies": {
51
- "@xmachines/shared": "1.0.0-beta.21",
51
+ "@xmachines/shared": "1.0.0-beta.23",
52
+ "oxfmt": "^0.43.0",
53
+ "oxlint": "^1.57.0",
52
54
  "typedoc": "^0.28.18",
53
55
  "typedoc-plugin-llms-txt": "^0.1.2",
54
56
  "typedoc-plugin-markdown": "^4.11.0"
package/rfc/play.md CHANGED
@@ -199,7 +199,7 @@ Wraps XState v5 to satisfy the `AbstractActor` contract. Provides the primary AP
199
199
 
200
200
  **Utility Exports:**
201
201
 
202
- - Guard combinators: `composeGuards`, `composeGuardsOr`, `negateGuard`, `hasContext`, `eventMatches`, `stateMatches`
202
+ - Guard combinators: `composeGuards`, `composeGuardsOr`, `negateGuard`, `hasContext`, `eventMatches`, `contextFieldMatches`
203
203
  - Route derivation: `deriveRoute`, `isAbsoluteRoute`, `buildRouteUrl`, `formatPlayRouteTransitions`
204
204
 
205
205
  **Responsibilities:**
@@ -1,13 +0,0 @@
1
- [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / ConnectRouterOptions
2
-
3
- # Interface: ConnectRouterOptions
4
-
5
- Defined in: [connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-router/src/connect-router.ts#L8)
6
-
7
- ## Properties
8
-
9
- | Property | Type | Defined in |
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.21/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.21/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.21/packages/play-router/src/connect-router.ts#L10) |
@@ -1,28 +0,0 @@
1
- [Documentation](../../../README.md) / [@xmachines/play-router](../README.md) / VanillaRouter
2
-
3
- # Interface: VanillaRouter
4
-
5
- Defined in: [create-router.ts:4](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-router/src/create-router.ts#L4)
6
-
7
- ## Properties
8
-
9
- | Property | Modifier | Type | Description | Defined in |
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.21/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.21/packages/play-router/src/create-router.ts#L13) |
13
-
14
- ## Methods
15
-
16
- ### destroy()
17
-
18
- ```ts
19
- destroy(): void;
20
- ```
21
-
22
- Defined in: [create-router.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.21/packages/play-router/src/create-router.ts#L18)
23
-
24
- Cleanup
25
-
26
- #### Returns
27
-
28
- `void`