@xmachines/docs 1.0.0 → 2.0.0-alpha.1

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 (342) hide show
  1. package/README.md +1 -1
  2. package/api/@xmachines/play/classes/NonNullableError.md +11 -11
  3. package/api/@xmachines/play/classes/PlayError.md +11 -11
  4. package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
  5. package/api/@xmachines/play/type-aliases/PlayEvent.md +4 -4
  6. package/api/@xmachines/play-actor/classes/AbstractActor.md +20 -19
  7. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
  8. package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
  9. package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
  10. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +7 -7
  11. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +7 -7
  12. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +7 -7
  13. package/api/@xmachines/play-actor/interfaces/Routable.md +5 -5
  14. package/api/@xmachines/play-actor/interfaces/Viewable.md +4 -4
  15. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  16. package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
  17. package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
  18. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +10 -10
  19. package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -5
  20. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +12 -12
  21. package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
  22. package/api/@xmachines/play-dom-router/README.md +1 -1
  23. package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
  24. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  25. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +2 -2
  26. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  27. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
  28. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  29. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
  30. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +8 -8
  31. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +6 -6
  32. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  33. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
  34. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +4 -4
  35. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +5 -5
  36. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
  37. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
  38. package/api/@xmachines/play-react/README.md +1 -1
  39. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
  40. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  41. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  42. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  43. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
  44. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +6 -6
  45. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +5 -5
  46. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
  47. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +7 -7
  48. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
  49. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  50. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  51. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  52. package/api/@xmachines/play-react-router/README.md +1 -1
  53. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +4 -4
  54. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  55. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
  56. package/api/@xmachines/play-react-router/functions/createRouteMap.md +2 -2
  57. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  58. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +7 -7
  59. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +8 -8
  60. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +7 -7
  61. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
  62. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +4 -4
  63. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +5 -5
  64. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  65. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  66. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
  67. package/api/@xmachines/play-router/README.md +15 -7
  68. package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
  69. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +4 -4
  70. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  71. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  72. package/api/@xmachines/play-router/functions/createRouteMap.md +2 -2
  73. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
  74. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  75. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +2 -2
  76. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  77. package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
  78. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  79. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  80. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  81. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  82. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  83. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  84. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  85. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  86. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  87. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  88. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  89. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
  90. package/api/@xmachines/play-router/interfaces/LocationLike.md +5 -5
  91. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -5
  92. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +7 -7
  93. package/api/@xmachines/play-router/interfaces/PlayActor.md +7 -7
  94. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  95. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +5 -5
  96. package/api/@xmachines/play-router/interfaces/RoutableActor.md +6 -6
  97. package/api/@xmachines/play-router/interfaces/RouteInfo.md +10 -10
  98. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +4 -4
  99. package/api/@xmachines/play-router/interfaces/RouteMapping.md +5 -5
  100. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  101. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  102. package/api/@xmachines/play-router/interfaces/RouteObject.md +4 -4
  103. package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -7
  104. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  105. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  106. package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
  107. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  108. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  109. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  110. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +4 -4
  111. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  112. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +4 -4
  113. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  114. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  115. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  116. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  117. package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
  118. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
  119. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
  120. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +7 -7
  121. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
  122. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  123. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  124. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  125. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  126. package/api/@xmachines/play-solid-router/README.md +5 -5
  127. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  128. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +5 -5
  129. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
  130. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +2 -2
  131. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +20 -19
  132. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +7 -7
  133. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +8 -8
  134. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +7 -7
  135. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +7 -7
  136. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +4 -4
  137. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +5 -5
  138. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  139. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  140. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  141. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  142. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +1 -1
  143. package/api/@xmachines/play-svelte/README.md +1 -1
  144. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  145. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  146. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
  147. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  148. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
  149. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +6 -6
  150. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
  151. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +7 -7
  152. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
  153. package/api/@xmachines/play-svelte-spa-router/README.md +24 -18
  154. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
  155. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
  156. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +2 -2
  157. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -6
  158. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +8 -8
  159. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +4 -4
  160. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +5 -5
  161. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  162. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  163. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  164. package/api/@xmachines/play-sveltekit-router/README.md +5 -5
  165. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
  166. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
  167. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +2 -2
  168. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  169. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +5 -5
  170. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +8 -8
  171. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +4 -4
  172. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +5 -5
  173. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  174. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  175. package/api/@xmachines/play-tanstack-react-router/README.md +1 -1
  176. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  177. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +4 -4
  178. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
  179. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +2 -2
  180. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  181. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +2 -2
  182. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +7 -7
  183. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +8 -8
  184. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +7 -7
  185. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +7 -7
  186. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +4 -4
  187. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +5 -5
  188. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +5 -5
  189. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  190. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  191. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  192. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  193. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
  194. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +2 -2
  195. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
  196. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +4 -4
  197. package/api/@xmachines/play-tanstack-solid-router/README.md +5 -5
  198. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  199. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +5 -5
  200. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
  201. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +2 -2
  202. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +7 -7
  203. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +8 -8
  204. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +7 -7
  205. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +7 -7
  206. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +4 -4
  207. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +5 -5
  208. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  209. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
  210. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  211. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  212. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
  213. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
  214. package/api/@xmachines/play-vue/README.md +1 -1
  215. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  216. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
  217. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  218. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +7 -7
  219. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +10 -10
  220. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +7 -7
  221. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
  222. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
  223. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  224. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  225. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +4 -4
  226. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  227. package/api/@xmachines/play-vue-router/README.md +1 -1
  228. package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
  229. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +5 -5
  230. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +2 -2
  231. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +7 -7
  232. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +8 -8
  233. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +4 -4
  234. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +5 -5
  235. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  236. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  237. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  238. package/api/@xmachines/play-xstate/README.md +88 -25
  239. package/api/@xmachines/play-xstate/classes/PlayerActor.md +34 -33
  240. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  241. package/api/@xmachines/play-xstate/functions/composeGuards.md +23 -17
  242. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +16 -16
  243. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  244. package/api/@xmachines/play-xstate/functions/createRoutedMachine.md +87 -0
  245. package/api/@xmachines/play-xstate/functions/definePlayer.md +3 -3
  246. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  247. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  248. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +45 -11
  249. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  250. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  251. package/api/@xmachines/play-xstate/functions/negateGuard.md +15 -15
  252. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +5 -5
  253. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +4 -4
  254. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +8 -8
  255. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +7 -7
  256. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +4 -4
  257. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +26 -5
  258. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  259. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  260. package/api/@xmachines/play-xstate/type-aliases/PlayRoutePayload.md +30 -0
  261. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  262. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +13 -6
  263. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  264. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +16 -4
  265. package/api/@xmachines/play-xstate/type-aliases/SetupLike.md +33 -0
  266. package/api/@xmachines/play-xstate/type-aliases/WithOptional.md +31 -0
  267. package/api/@xmachines/play-xstate/variables/emptyEventSchema.md +37 -0
  268. package/api/@xmachines/play-xstate/variables/playMetaSchema.md +40 -0
  269. package/api/@xmachines/play-xstate/variables/playRouteEventSchema.md +9 -0
  270. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  271. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  272. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  273. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  274. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +4 -4
  275. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  276. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  277. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +6 -6
  278. package/contributing/architecture.md +9 -6
  279. package/contributing/development.md +1 -1
  280. package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
  281. package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
  282. package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
  283. package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
  284. package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
  285. package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
  286. package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
  287. package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
  288. package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
  289. package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
  290. package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
  291. package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
  292. package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
  293. package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
  294. package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
  295. package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
  296. package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
  297. package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
  298. package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
  299. package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
  300. package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
  301. package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
  302. package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
  303. package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
  304. package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
  305. package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
  306. package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
  307. package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
  308. package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
  309. package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
  310. package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
  311. package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
  312. package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
  313. package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
  314. package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
  315. package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
  316. package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
  317. package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
  318. package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
  319. package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
  320. package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
  321. package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
  322. package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
  323. package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
  324. package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
  325. package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
  326. package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
  327. package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
  328. package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
  329. package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
  330. package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
  331. package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
  332. package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
  333. package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
  334. package/examples/README.md +1 -1
  335. package/examples/basic-state-machine.md +22 -24
  336. package/examples/form-validation.md +118 -109
  337. package/examples/routing-patterns.md +92 -60
  338. package/examples/traffic-light.md +46 -57
  339. package/guides/getting-started.md +79 -68
  340. package/guides/state-machines.md +68 -52
  341. package/package.json +2 -2
  342. package/rfc/play.md +4 -4
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: [play-router/src/types.ts:341](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-router/src/types.ts#L341)
5
+ Defined in: [play-router/src/types.ts:360](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L360)
6
6
 
7
7
  RouterBridge interface for runtime infrastructure adapters
8
8
 
@@ -54,7 +54,7 @@ class MyRouterBridge implements RouterBridge {
54
54
  connect(): void | Promise<void>;
55
55
  ```
56
56
 
57
- Defined in: [play-router/src/types.ts:357](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-router/src/types.ts#L357)
57
+ Defined in: [play-router/src/types.ts:376](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L376)
58
58
 
59
59
  Connect the router bridge to the Actor
60
60
 
@@ -83,7 +83,7 @@ await bridge.connect();
83
83
  disconnect(): void | Promise<void>;
84
84
  ```
85
85
 
86
- Defined in: [play-router/src/types.ts:373](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-router/src/types.ts#L373)
86
+ Defined in: [play-router/src/types.ts:392](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L392)
87
87
 
88
88
  Disconnect the router bridge from the Actor
89
89
 
@@ -6,7 +6,7 @@
6
6
  type RoutableActor = PlayActor;
7
7
  ```
8
8
 
9
- Defined in: [play-vue-router/src/play-router-provider.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-vue-router/src/play-router-provider.ts#L10)
9
+ Defined in: [play-vue-router/src/play-router-provider.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-vue-router/src/play-router-provider.ts#L10)
10
10
 
11
11
  ## Deprecated
12
12
 
@@ -64,7 +64,7 @@ const PlayRouterProvider: DefineComponent<
64
64
  >;
65
65
  ```
66
66
 
67
- Defined in: [play-vue-router/src/play-router-provider.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-vue-router/src/play-router-provider.ts#L19)
67
+ Defined in: [play-vue-router/src/play-router-provider.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-vue-router/src/play-router-provider.ts#L19)
68
68
 
69
69
  PlayRouterProvider — Vue convenience wrapper for VueRouterBridge.
70
70
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # @xmachines/play-xstate
6
6
 
7
- > XState v5 adapter for the XMachines Play Architecture — bind state machines to the actor base with signal-driven reactivity and router integration.
7
+ > XState v6 adapter for the XMachines Play Architecture — bind state machines to the actor base with signal-driven reactivity and router integration.
8
8
 
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
10
  [![Version](https://img.shields.io/badge/version-1.0.0--beta.51-blue)](https://www.npmjs.com/package/@xmachines/play-xstate)
@@ -19,7 +19,7 @@ Part of the [XMachines Play](../../README.md) monorepo.
19
19
  pnpm add @xmachines/play-xstate xstate
20
20
  ```
21
21
 
22
- `xstate ^5.31.0` is a peer dependency and must be installed alongside this package.
22
+ `xstate ^6.0.0-alpha.19` is a peer dependency and must be installed alongside this package.
23
23
 
24
24
  ---
25
25
 
@@ -27,13 +27,18 @@ pnpm add @xmachines/play-xstate xstate
27
27
 
28
28
  ```typescript
29
29
  import { setup } from "xstate";
30
- import { definePlayer } from "@xmachines/play-xstate";
30
+ import { definePlayer, emptyEventSchema, playMetaSchema } from "@xmachines/play-xstate";
31
31
 
32
- // 1. Define your XState v5 machine
33
- const machine = setup({}).createMachine({
32
+ // 1. Define your XState v6 machine
33
+ const machine = setup({
34
+ schemas: {
35
+ events: { activate: emptyEventSchema },
36
+ meta: playMetaSchema, // types meta.route / meta.view on state nodes
37
+ },
38
+ }).createMachine({
34
39
  initial: "idle",
35
40
  states: {
36
- idle: { meta: { route: "/" } },
41
+ idle: { meta: { route: "/" }, on: { activate: { target: "active" } } },
37
42
  active: { meta: { route: "/active" } },
38
43
  },
39
44
  });
@@ -61,16 +66,16 @@ actor.stop();
61
66
 
62
67
  ### `definePlayer(config)`
63
68
 
64
- Creates a `PlayerFactory` from an XState v5 machine. The factory pattern enables multiple independent actor instances from a single configuration — useful for multi-user scenarios, SSR, or testing.
69
+ Creates a `PlayerFactory` from an XState v6 machine. The factory pattern enables multiple independent actor instances from a single configuration — useful for multi-user scenarios, SSR, or testing.
65
70
 
66
71
  ```typescript
67
- import { setup } from "xstate";
72
+ import { setup, types } from "xstate";
68
73
  import { definePlayer } from "@xmachines/play-xstate";
69
74
 
70
75
  const machine = setup({
71
- types: {
72
- context: {} as { userId: string },
73
- input: {} as { userId: string },
76
+ schemas: {
77
+ context: types<{ userId: string }>(),
78
+ input: types<{ userId: string }>(),
74
79
  },
75
80
  }).createMachine({
76
81
  context: ({ input }) => ({ userId: input.userId }),
@@ -119,7 +124,7 @@ console.log(restored.currentRoute.get()); // same route as when saved
119
124
 
120
125
  ### `PlayerActor<TMachine>`
121
126
 
122
- Concrete actor class that wraps an XState v5 actor and exposes TC39 Signal-based reactive signals. Implements both `Routable` and `Viewable` interfaces from `@xmachines/play-actor`.
127
+ Concrete actor class that wraps an XState v6 actor and exposes TC39 Signal-based reactive signals. Implements both `Routable` and `Viewable` interfaces from `@xmachines/play-actor`.
123
128
 
124
129
  #### Signals
125
130
 
@@ -160,7 +165,7 @@ actor.start();
160
165
 
161
166
  ### Guard utilities
162
167
 
163
- Composable guard helpers that wrap XState's built-in `and()`, `or()`, and `not()` for use in machine `setup({ guards })` definitions.
168
+ Composable guard helpers that combine predicates with AND, OR, and NOT logic. Each helper returns a plain predicate — call it inside a transition function with the transition arguments and return early to block the transition. String guard names are resolved against the named guards declared in `setup({ guards })`.
164
169
 
165
170
  ```typescript
166
171
  import { setup } from "xstate";
@@ -173,20 +178,24 @@ import {
173
178
  contextFieldMatches, // guard: context field equals a value
174
179
  } from "@xmachines/play-xstate";
175
180
 
181
+ const canAccessAdmin = composeGuards(["isLoggedIn", "hasAdminRole"]);
182
+ const isAuthenticated = negateGuard("isGuest");
183
+
176
184
  const machine = setup({
177
185
  guards: {
178
186
  isLoggedIn: ({ context }) => !!context.userId,
179
187
  hasAdminRole: ({ context }) => context.role === "admin",
188
+ isGuest: ({ context }) => !context.userId,
180
189
  },
181
190
  }).createMachine({
182
191
  on: {
183
- accessAdmin: {
184
- guard: composeGuards(["isLoggedIn", "hasAdminRole"]),
185
- target: "adminPanel",
192
+ accessAdmin: (args) => {
193
+ if (!canAccessAdmin(args)) return;
194
+ return { target: "adminPanel" };
186
195
  },
187
- accessDashboard: {
188
- guard: negateGuard("isGuest"),
189
- target: "dashboard",
196
+ accessDashboard: (args) => {
197
+ if (!isAuthenticated(args)) return;
198
+ return { target: "dashboard" };
190
199
  },
191
200
  },
192
201
  // ...
@@ -199,13 +208,42 @@ const machine = setup({
199
208
 
200
209
  Helper functions for declarative route configuration in XState machines.
201
210
 
211
+ #### `createRoutedMachine(setup)`
212
+
213
+ The recommended entry point: returns a `createMachine` with the same signature as the setup's own — full contextual typing for the config — that wires routing up at runtime.
214
+
215
+ ```typescript
216
+ import { setup } from "xstate";
217
+ import { createRoutedMachine } from "@xmachines/play-xstate";
218
+
219
+ const appSetup = setup({/* schemas, guards, ... */});
220
+
221
+ const machine = createRoutedMachine(appSetup)({
222
+ id: "app",
223
+ states: {
224
+ home: {
225
+ id: "home",
226
+ meta: { route: "/home" },
227
+ },
228
+ profile: {
229
+ id: "profile",
230
+ meta: { route: "/users/:userId" },
231
+ },
232
+ },
233
+ });
234
+ ```
235
+
202
236
  #### `formatPlayRouteTransitions(machineConfig)`
203
237
 
204
- Crawls machine states with `meta.route` and auto-generates `play.route` event handlers at the root leveleliminating boilerplate routing transitions.
238
+ The underlying transform. Crawls machine states with `meta.route` and wires them to XState v6's native routing: each routed state gets a native `route: {}` config (targetable via the built-in `xstate.route` event and visible to graph tooling), and one root `play.route` forwarder navigates those targets in a single atomic transition patching `params`/`query` into context — while re-raising `xstate.route` only for states that declare their own `route` config. Unknown targets fall through to user-defined `play.route` fallbacks (e.g. a 404 route); one `play.route` send is one atomic transition, so exit actions see the old `params` and entry actions the new ones.
205
239
 
206
240
  ```typescript
207
241
  import { setup } from "xstate";
208
- import { formatPlayRouteTransitions } from "@xmachines/play-xstate";
242
+ import {
243
+ formatPlayRouteTransitions,
244
+ playMetaSchema,
245
+ playRouteEventSchema,
246
+ } from "@xmachines/play-xstate";
209
247
 
210
248
  const config = formatPlayRouteTransitions({
211
249
  id: "app",
@@ -221,17 +259,30 @@ const config = formatPlayRouteTransitions({
221
259
  },
222
260
  });
223
261
 
224
- // config now includes auto-generated play.route handlers:
225
- // on: { "play.route": [ { target: ".home", guard: e => e.to === "#home" }, ... ] }
226
- const machine = setup({}).createMachine(config);
262
+ // config now carries native route configs plus the play.route forwarder:
263
+ // states: { home: { ..., route: {} }, profile: { ..., route: {} } }
264
+ // on: { "play.route": [forwarder, ...userFallbacks] }
265
+ // The forwarder navigates injected-route targets directly (atomically);
266
+ // xstate.route is raised only for states declaring their own route config.
267
+ const machine = setup({
268
+ schemas: {
269
+ events: { "play.route": playRouteEventSchema },
270
+ meta: playMetaSchema,
271
+ },
272
+ }).createMachine(config);
227
273
  ```
228
274
 
275
+ Because the injected `route` configs are static, route transitions keep statically-known targets — `machineToGraph()` sees real edges to every routed state, so reachability queries work.
276
+
229
277
  > **Note:** Every state with `meta.route` must also have an explicit `id` field; omitting it throws `MissingStateIdError` at machine-definition time.
230
278
 
231
279
  #### Other routing exports
232
280
 
233
281
  | Export | Description |
234
282
  | ---------------------------------- | ------------------------------------------------------------------------- |
283
+ | `playMetaSchema` | Shared `schemas.meta` declaration for `meta.route` / `meta.view` metadata |
284
+ | `playRouteEventSchema` | Shared `schemas.events` entry for the `play.route` event payload |
285
+ | `emptyEventSchema` | Shared `schemas.events` entry for events that carry no payload |
235
286
  | `deriveRoute(meta)` | Extract the route template string from a state's metadata object |
236
287
  | `isAbsoluteRoute(route)` | Returns `true` if the route string is an absolute URL path |
237
288
  | `buildRouteUrl(template, context)` | Substitute `:param` placeholders in a route template using context values |
@@ -272,6 +323,8 @@ import {
272
323
  InvalidEventError, // actor.send() called with null/undefined/non-object
273
324
  InvalidRouteMetadataError, // meta.route is neither a string nor { path: string }
274
325
  EmptyGuardArrayError, // composeGuards/composeGuardsOr called with empty array
326
+ UnresolvableGuardNameError, // string guard name could not be resolved at call time
327
+ InvalidGuardEntryError, // guard entry was neither a predicate nor a name (e.g. undefined)
275
328
  } from "@xmachines/play-xstate/errors";
276
329
  ```
277
330
 
@@ -297,7 +350,7 @@ Tests use [Vitest](https://vitest.dev/) and live in `packages/play-xstate/test/`
297
350
 
298
351
  MIT — see [LICENSE](LICENSE) for details.
299
352
 
300
- @xmachines/play-xstate - XState v5 adapter for Play Architecture
353
+ @xmachines/play-xstate - XState v6 adapter for Play Architecture
301
354
 
302
355
  Provides definePlayer() API for binding XState state machines to the
303
356
  actor base with signal lifecycle and DevTools integration.
@@ -324,9 +377,18 @@ reactivity.
324
377
  - [Guard](type-aliases/Guard.md)
325
378
  - [GuardArray](type-aliases/GuardArray.md)
326
379
  - [PlayerFactory](type-aliases/PlayerFactory.md)
380
+ - [PlayRoutePayload](type-aliases/PlayRoutePayload.md)
327
381
  - [RouteMachineConfig](type-aliases/RouteMachineConfig.md)
328
382
  - [RouteMetadata](type-aliases/RouteMetadata.md)
329
383
  - [RouteStateNode](type-aliases/RouteStateNode.md)
384
+ - [SetupLike](type-aliases/SetupLike.md)
385
+ - [WithOptional](type-aliases/WithOptional.md)
386
+
387
+ ## Variables
388
+
389
+ - [emptyEventSchema](variables/emptyEventSchema.md)
390
+ - [playMetaSchema](variables/playMetaSchema.md)
391
+ - [playRouteEventSchema](variables/playRouteEventSchema.md)
330
392
 
331
393
  ## Functions
332
394
 
@@ -334,6 +396,7 @@ reactivity.
334
396
  - [composeGuards](functions/composeGuards.md)
335
397
  - [composeGuardsOr](functions/composeGuardsOr.md)
336
398
  - [contextFieldMatches](functions/contextFieldMatches.md)
399
+ - [createRoutedMachine](functions/createRoutedMachine.md)
337
400
  - [definePlayer](functions/definePlayer.md)
338
401
  - [deriveRoute](functions/deriveRoute.md)
339
402
  - [eventMatches](functions/eventMatches.md)
@@ -2,11 +2,11 @@
2
2
 
3
3
  # Class: PlayerActor\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/player-actor.ts:362](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L362)
5
+ Defined in: [packages/play-xstate/src/player-actor.ts:362](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L362)
6
6
 
7
7
  Concrete XState actor implementing Play Architecture signal protocol
8
8
 
9
- Extends [@xmachines/play-actor!AbstractActor](../../play-actor/classes/AbstractActor.md) to provide XState v5 integration
9
+ Extends [@xmachines/play-actor!AbstractActor](../../play-actor/classes/AbstractActor.md) to provide XState v6 integration
10
10
  while maintaining ecosystem compatibility (XState inspection, devtools). This actor
11
11
  wraps an internal XState actor and exposes TC39 Signal-based reactive state for
12
12
  Infrastructure observation.
@@ -89,7 +89,7 @@ cached and updated at state entry, not computed on every read.
89
89
 
90
90
  | Type Parameter | Description |
91
91
  | ---------------------------------------------------------------------------------------------- | ---------------------------- |
92
- | `TMachine` _extends_ [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | XState v5 state machine type |
92
+ | `TMachine` _extends_ [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | XState v6 state machine type |
93
93
 
94
94
  ## Implements
95
95
 
@@ -108,7 +108,7 @@ new PlayerActor<TMachine>(
108
108
  restoredSnapshot?): PlayerActor<TMachine>;
109
109
  ```
110
110
 
111
- Defined in: [packages/play-xstate/src/player-actor.ts:454](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L454)
111
+ Defined in: [packages/play-xstate/src/player-actor.ts:459](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L459)
112
112
 
113
113
  #### Parameters
114
114
 
@@ -129,22 +129,23 @@ Defined in: [packages/play-xstate/src/player-actor.ts:454](https://gitlab.com/xm
129
129
 
130
130
  ## Properties
131
131
 
132
- | Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
133
- | ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
134
- | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`_parent`](../../play-actor/classes/AbstractActor.md#property-_parent) | - |
135
- | <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`clock`](../../play-actor/classes/AbstractActor.md#property-clock) | - |
136
- | <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed` that derives the current URL path from the active machine state's `meta.route` template and the actor's context. Returns `null` when the current state has no `meta.route`, or when the route template cannot be fully resolved (e.g. a required parameter is absent from context). **Throws** When a required `:param` placeholder in the route template has no matching value in the actor's context. Import the class from `@xmachines/play-xstate/errors`. **Example** `// Returns "/profile/alice" when context.userId === "alice" const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:408](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L408) |
137
- | <a id="property-currentview"></a> `currentView` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | Reactive signal containing the current view spec derived from the active state's `meta.view` metadata. Emits a **fresh object reference** whenever the rendered view actually changes — a different state's view, or a param/context change that alters the resolved spec (including `reenter: true` re-entries with new params). Snapshots that do not change the rendered view (e.g. context-only assigns) keep the previous reference so downstream providers do not remount the UI on every event. The emitted `PlaySpec` has its element `props` enriched with `context.params` before emission — URL path parameters (e.g. `:section?`) flow into component props automatically. See `mergeRouteParamsIntoProps` for the merge priority rules. Returns `null` when the current state has no `meta.view` metadata. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.root); // e.g. "root" console.log(view.elements); // @xmachines/json-render-core Spec elements }` | - | - | [packages/play-xstate/src/player-actor.ts:452](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L452) |
138
- | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`id`](../../play-actor/classes/AbstractActor.md#property-id) | - |
139
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction, never changes even when the actor is restored from a snapshot. Router bridges compare this against the browser URL to distinguish a deep-link (non-initial URL → router wins) from a restore (initial URL + actor at a different restored route → actor wins). Derived statically from the machine definition via `deriveInitialRoute` (XState's pure `initialTransition` helper): the initial state chain and its `meta.route` templates are fixed at machine definition time, while `:param` substitution uses the machine's real initial context for this actor's `input`. No extra actor is ever created, and a restored snapshot never influences the value — it is always the machine's **default** initial route. | - | - | [packages/play-xstate/src/player-actor.ts:425](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L425) |
140
- | <a id="property-logic"></a> `logic` | `public` | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`logic`](../../play-actor/classes/AbstractActor.md#property-logic) | - |
141
- | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`options`](../../play-actor/classes/AbstractActor.md#property-options) | - |
142
- | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<`any`, `any`, `any`\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`ref`](../../play-actor/classes/AbstractActor.md#property-ref) | - |
143
- | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`sessionId`](../../play-actor/classes/AbstractActor.md#property-sessionid) | - |
144
- | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`src`](../../play-actor/classes/AbstractActor.md#property-src) | - |
145
- | <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`ReturnType`\<`TMachine`\[`"transition"`\]\>\> | Reactive snapshot of current actor state. Infrastructure observes this signal to react to state changes without directly coupling to the actor's internal state machine implementation. | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:373](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L373) |
146
- | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`system`](../../play-actor/classes/AbstractActor.md#property-system) | - |
147
- | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`systemId`](../../play-actor/classes/AbstractActor.md#property-systemid) | - |
132
+ | Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
133
+ | ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
134
+ | <a id="property-_parent"></a> `_parent?` | `public` | `AnyActor` | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`_parent`](../../play-actor/classes/AbstractActor.md#property-_parent) | - |
135
+ | <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`clock`](../../play-actor/classes/AbstractActor.md#property-clock) | - |
136
+ | <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed` that derives the current URL path from the active machine state's `meta.route` template and the actor's context. Returns `null` when the current state has no `meta.route`, or when the route template cannot be fully resolved (e.g. a required parameter is absent from context). **Throws** When a required `:param` placeholder in the route template has no matching value in the actor's context. Import the class from `@xmachines/play-xstate/errors`. **Example** `// Returns "/profile/alice" when context.userId === "alice" const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:413](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L413) |
137
+ | <a id="property-currentview"></a> `currentView` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | Reactive signal containing the current view spec derived from the active state's `meta.view` metadata. Emits a **fresh object reference** whenever the rendered view actually changes — a different state's view, or a param/context change that alters the resolved spec (including `reenter: true` re-entries with new params). Snapshots that do not change the rendered view (e.g. context-only assigns) keep the previous reference so downstream providers do not remount the UI on every event. The emitted `PlaySpec` has its element `props` enriched with `context.params` before emission — URL path parameters (e.g. `:section?`) flow into component props automatically. See `mergeRouteParamsIntoProps` for the merge priority rules. Returns `null` when the current state has no `meta.view` metadata. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.root); // e.g. "root" console.log(view.elements); // @xmachines/json-render-core Spec elements }` | - | - | [packages/play-xstate/src/player-actor.ts:457](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L457) |
138
+ | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`id`](../../play-actor/classes/AbstractActor.md#property-id) | - |
139
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction, never changes even when the actor is restored from a snapshot. Router bridges compare this against the browser URL to distinguish a deep-link (non-initial URL → router wins) from a restore (initial URL + actor at a different restored route → actor wins). Derived statically from the machine definition via `deriveInitialRoute` (XState's pure `initialTransition` helper): the initial state chain and its `meta.route` templates are fixed at machine definition time, while `:param` substitution uses the machine's real initial context for this actor's `input`. No extra actor is ever created, and a restored snapshot never influences the value — it is always the machine's **default** initial route. | - | - | [packages/play-xstate/src/player-actor.ts:430](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L430) |
140
+ | <a id="property-logic"></a> `logic` | `public` | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`logic`](../../play-actor/classes/AbstractActor.md#property-logic) | - |
141
+ | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`options`](../../play-actor/classes/AbstractActor.md#property-options) | - |
142
+ | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<`any`, `any`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject), `any`\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`ref`](../../play-actor/classes/AbstractActor.md#property-ref) | - |
143
+ | <a id="property-registrykey"></a> `registryKey` | `public` | `string` \| `undefined` | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`registryKey`](../../play-actor/classes/AbstractActor.md#property-registrykey) | - |
144
+ | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`sessionId`](../../play-actor/classes/AbstractActor.md#property-sessionid) | - |
145
+ | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`src`](../../play-actor/classes/AbstractActor.md#property-src) | - |
146
+ | <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TMachine`\>\> | Reactive snapshot of current actor state. Infrastructure observes this signal to react to state changes without directly coupling to the actor's internal state machine implementation. | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:375](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L375) |
147
+ | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`system`](../../play-actor/classes/AbstractActor.md#property-system) | - |
148
+ | <a id="property-trigger"></a> `trigger` | `public` | `ActorTrigger`\<`SendableEventFromLogic`\<`TLogic`\>\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`trigger`](../../play-actor/classes/AbstractActor.md#property-trigger) | - |
148
149
 
149
150
  ## Methods
150
151
 
@@ -172,7 +173,7 @@ Defined in: `xstate`
172
173
  can(event): boolean;
173
174
  ```
174
175
 
175
- Defined in: [packages/play-xstate/src/player-actor.ts:386](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L386)
176
+ Defined in: [packages/play-xstate/src/player-actor.ts:388](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L388)
176
177
 
177
178
  Returns whether the actor's current state can accept the given event.
178
179
 
@@ -203,7 +204,7 @@ if (actor.can({ type: "auth.logout" })) { ... }
203
204
  dispose(): void;
204
205
  ```
205
206
 
206
- Defined in: [packages/play-xstate/src/player-actor.ts:727](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L727)
207
+ Defined in: [packages/play-xstate/src/player-actor.ts:731](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L731)
207
208
 
208
209
  Convenience dispose method for cleanup
209
210
 
@@ -221,7 +222,7 @@ Per CONTEXT.md: "Both .dispose() convenience method and manual machine.stop()"
221
222
  getPersistedSnapshot(): Snapshot<unknown>;
222
223
  ```
223
224
 
224
- Defined in: [packages/play-xstate/src/player-actor.ts:685](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L685)
225
+ Defined in: [packages/play-xstate/src/player-actor.ts:689](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L689)
225
226
 
226
227
  Get the persisted snapshot of the wrapped XState actor.
227
228
 
@@ -244,7 +245,7 @@ Suitable for serialization and later restoration via the factory's
244
245
  getSnapshot(): SnapshotFrom<TMachine>;
245
246
  ```
246
247
 
247
- Defined in: [packages/play-xstate/src/player-actor.ts:609](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L609)
248
+ Defined in: [packages/play-xstate/src/player-actor.ts:613](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L613)
248
249
 
249
250
  Get current snapshot
250
251
 
@@ -264,15 +265,15 @@ Get current snapshot
264
265
  on<TType>(type, handler): Subscription;
265
266
  ```
266
267
 
267
- Defined in: [packages/play-xstate/src/player-actor.ts:670](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L670)
268
+ Defined in: [packages/play-xstate/src/player-actor.ts:674](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L674)
268
269
 
269
270
  Listen for events emitted by the wrapped XState actor via the `emit` action.
270
271
 
271
272
  #### Type Parameters
272
273
 
273
- | Type Parameter |
274
- | ----------------------- |
275
- | `TType` _extends_ `any` |
274
+ | Type Parameter |
275
+ | -------------------------- |
276
+ | `TType` _extends_ `string` |
276
277
 
277
278
  #### Parameters
278
279
 
@@ -330,7 +331,7 @@ Defined in: `xstate`
330
331
  send(event): void;
331
332
  ```
332
333
 
333
- Defined in: [packages/play-xstate/src/player-actor.ts:586](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L586)
334
+ Defined in: [packages/play-xstate/src/player-actor.ts:590](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L590)
334
335
 
335
336
  Send an event to the underlying XState actor.
336
337
 
@@ -374,7 +375,7 @@ actor.send({ type: "play.route", to: "#home" });
374
375
  start(): this;
375
376
  ```
376
377
 
377
- Defined in: [packages/play-xstate/src/player-actor.ts:541](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L541)
378
+ Defined in: [packages/play-xstate/src/player-actor.ts:545](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L545)
378
379
 
379
380
  Start the actor
380
381
 
@@ -396,7 +397,7 @@ Per RESEARCH.md Pitfall 1: Always call start() after creation
396
397
  stop(): this;
397
398
  ```
398
399
 
399
- Defined in: [packages/play-xstate/src/player-actor.ts:555](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L555)
400
+ Defined in: [packages/play-xstate/src/player-actor.ts:559](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L559)
400
401
 
401
402
  Stop the actor and cleanup
402
403
 
@@ -418,7 +419,7 @@ Stop the actor and cleanup
418
419
  subscribe(observer): Subscription;
419
420
  ```
420
421
 
421
- Defined in: [packages/play-xstate/src/player-actor.ts:631](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L631)
422
+ Defined in: [packages/play-xstate/src/player-actor.ts:635](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L635)
422
423
 
423
424
  Subscribe to snapshot updates from the wrapped XState actor.
424
425
 
@@ -449,7 +450,7 @@ subscribe(
449
450
  completeListener?): Subscription;
450
451
  ```
451
452
 
452
- Defined in: [packages/play-xstate/src/player-actor.ts:642](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/player-actor.ts#L642)
453
+ Defined in: [packages/play-xstate/src/player-actor.ts:646](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/player-actor.ts#L646)
453
454
 
454
455
  Subscribe to snapshot updates from the wrapped XState actor.
455
456
 
@@ -6,7 +6,7 @@
6
6
  function buildRouteUrl(routeTemplate, context?): string;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/build-url.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0/packages/play-xstate/src/routing/build-url.ts#L40)
9
+ Defined in: [packages/play-xstate/src/routing/build-url.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-xstate/src/routing/build-url.ts#L40)
10
10
 
11
11
  Build a full URL from a route template and the actor's context.
12
12