@xmachines/docs 1.0.0-beta.25 → 1.0.0-beta.27

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 (268) hide show
  1. package/api/@xmachines/play/classes/PlayError.md +10 -4
  2. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  3. package/api/@xmachines/play-actor/README.md +4 -0
  4. package/api/@xmachines/play-actor/classes/AbstractActor.md +49 -92
  5. package/api/@xmachines/play-actor/functions/typedSpec.md +57 -0
  6. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +9 -18
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +5 -21
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +5 -6
  10. package/api/@xmachines/play-dom/README.md +24 -8
  11. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  12. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  13. package/api/@xmachines/play-dom/functions/defineRegistry.md +61 -0
  14. package/api/@xmachines/play-dom/functions/renderSpec.md +29 -12
  15. package/api/@xmachines/play-dom/interfaces/ComponentContext.md +62 -0
  16. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +9 -9
  17. package/api/@xmachines/play-dom/interfaces/DefineRegistryOptions.md +25 -0
  18. package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +18 -0
  19. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +13 -10
  20. package/api/@xmachines/play-dom/interfaces/EventHandle.md +29 -0
  21. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
  22. package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +53 -0
  23. package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +21 -0
  24. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +16 -3
  25. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +5 -2
  26. package/api/@xmachines/play-dom-router/README.md +10 -0
  27. package/api/@xmachines/play-dom-router/functions/connectRouter.md +18 -46
  28. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  29. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +38 -0
  30. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  31. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
  32. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  33. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
  34. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +119 -0
  35. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +114 -0
  36. package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +50 -0
  37. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +27 -0
  38. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +104 -0
  39. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
  40. package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +9 -0
  41. package/api/@xmachines/play-dom-router-demo/README.md +46 -51
  42. package/api/@xmachines/play-react/README.md +4 -4
  43. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +31 -5
  44. package/api/@xmachines/play-react/functions/defineRegistry.md +2 -0
  45. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  46. package/api/@xmachines/play-react/functions/useBoundProp.md +2 -0
  47. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  48. package/api/@xmachines/play-react/functions/useStateBinding.md +2 -0
  49. package/api/@xmachines/play-react/interfaces/ComponentContext.md +2 -0
  50. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  51. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  52. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -7
  53. package/api/@xmachines/play-react/type-aliases/ComponentFn.md +2 -0
  54. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  55. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  56. package/api/@xmachines/play-react-router/README.md +5 -1
  57. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +102 -25
  58. package/api/@xmachines/play-react-router/classes/RouteMap.md +17 -33
  59. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +8 -1
  60. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +21 -11
  61. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +8 -8
  62. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
  63. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +18 -8
  64. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  65. package/api/@xmachines/play-router/README.md +42 -5
  66. package/api/@xmachines/play-router/classes/BaseRouteMap.md +12 -19
  67. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +100 -25
  68. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  69. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  70. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  71. package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +38 -0
  72. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +45 -0
  73. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  74. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  75. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  76. package/api/@xmachines/play-router/functions/extractRouteParams.md +46 -0
  77. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  78. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  79. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  80. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  81. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  82. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  83. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  84. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  85. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  86. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  87. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  88. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  89. package/api/@xmachines/play-router/interfaces/LocationLike.md +27 -0
  90. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  91. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  92. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  93. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  94. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  95. package/api/@xmachines/play-router/interfaces/{BaseRouteMapping.md → RouteMapping.md} +5 -5
  96. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  97. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  98. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  99. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  100. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  101. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  102. package/api/@xmachines/play-router/interfaces/WindowLike.md +65 -0
  103. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  104. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  105. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  106. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  107. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  108. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  109. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  110. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  111. package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +6 -0
  112. package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +8 -0
  113. package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +2 -0
  114. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +10 -0
  115. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +2 -0
  116. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +2 -0
  117. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +2 -0
  118. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +2 -0
  119. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +2 -0
  120. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +2 -0
  121. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +2 -0
  122. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +2 -0
  123. package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +2 -0
  124. package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +2 -0
  125. package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +2 -0
  126. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  127. package/api/@xmachines/play-solid/README.md +4 -4
  128. package/api/@xmachines/play-solid/functions/defineRegistry.md +2 -0
  129. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  130. package/api/@xmachines/play-solid/functions/useStateBinding.md +2 -0
  131. package/api/@xmachines/play-solid/interfaces/ComponentContext.md +2 -0
  132. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -7
  133. package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +2 -0
  134. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  135. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  136. package/api/@xmachines/play-solid-router/README.md +2 -2
  137. package/api/@xmachines/play-solid-router/classes/RouteMap.md +13 -26
  138. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +121 -46
  139. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  140. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +15 -9
  141. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +47 -92
  142. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +8 -8
  143. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  144. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +19 -6
  145. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  146. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  147. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +21 -18
  148. package/api/@xmachines/play-solid-router-demo/README.md +25 -28
  149. package/api/@xmachines/play-svelte/README.md +28 -0
  150. package/api/@xmachines/play-svelte/functions/defineRegistry.md +2 -0
  151. package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +2 -0
  152. package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +2 -0
  153. package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +9 -9
  154. package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +2 -0
  155. package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +2 -0
  156. package/api/@xmachines/play-svelte/variables/PlayRenderer.md +2 -0
  157. package/api/@xmachines/play-svelte-spa-router/README.md +1 -0
  158. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +13 -26
  159. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +14 -1
  160. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +23 -4
  161. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -5
  162. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +10 -10
  163. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +20 -5
  164. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  165. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +65 -0
  166. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  167. package/api/@xmachines/play-svelte-spa-router-demo/README.md +119 -12
  168. package/api/@xmachines/play-sveltekit-router/README.md +2 -1
  169. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +46 -24
  170. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +14 -1
  171. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +23 -4
  172. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -5
  173. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +27 -0
  174. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +10 -10
  175. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +20 -5
  176. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  177. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  178. package/api/@xmachines/play-sveltekit-router-demo/README.md +120 -12
  179. package/api/@xmachines/play-tanstack-react-router/README.md +5 -3
  180. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +17 -33
  181. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +93 -25
  182. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  183. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  184. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +21 -11
  185. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  186. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +8 -8
  187. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  188. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +18 -8
  189. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  190. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  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 +13 -19
  193. package/api/@xmachines/play-tanstack-react-router-demo/README.md +23 -29
  194. package/api/@xmachines/play-tanstack-solid-router/README.md +8 -8
  195. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +13 -26
  196. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +101 -36
  197. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  198. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +15 -9
  199. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +8 -8
  200. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  201. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +13 -9
  202. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  203. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  204. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  205. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +23 -24
  206. package/api/@xmachines/play-tanstack-solid-router-demo/README.md +25 -26
  207. package/api/@xmachines/play-vue/README.md +4 -4
  208. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  209. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  210. package/api/@xmachines/play-vue/functions/useStateBinding.md +2 -0
  211. package/api/@xmachines/play-vue/interfaces/ComponentContext.md +2 -0
  212. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  213. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  214. package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +2 -0
  215. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  216. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +4 -3
  217. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  218. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  219. package/api/@xmachines/play-vue-router/README.md +2 -2
  220. package/api/@xmachines/play-vue-router/classes/RouteMap.md +18 -108
  221. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +44 -104
  222. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +127 -62
  223. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  224. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +8 -8
  225. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +19 -7
  226. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  227. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  228. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  229. package/api/@xmachines/play-vue-router-demo/README.md +47 -40
  230. package/api/@xmachines/play-xstate/README.md +15 -15
  231. package/api/@xmachines/play-xstate/classes/PlayerActor.md +46 -30
  232. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +20 -15
  233. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  234. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  235. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  236. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  237. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  238. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  239. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +2 -2
  240. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  241. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  242. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  243. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  244. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  245. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  246. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +14 -12
  247. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  248. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  249. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  250. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  251. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  252. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  253. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +3 -7
  254. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  255. package/api/README.md +4 -4
  256. package/api/llms.txt +3 -3
  257. package/examples/README.md +50 -32
  258. package/examples/basic-state-machine.md +75 -31
  259. package/examples/form-validation.md +199 -127
  260. package/examples/multi-router-integration.md +312 -230
  261. package/examples/routing-patterns.md +243 -187
  262. package/examples/traffic-light.md +114 -65
  263. package/guides/README.md +29 -15
  264. package/guides/getting-started.md +224 -144
  265. package/guides/installation.md +153 -213
  266. package/package.json +2 -2
  267. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +0 -38
  268. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +0 -33
@@ -2,63 +2,13 @@
2
2
 
3
3
  # Abstract Interface: AbstractActor\<TLogic, TEvent\>
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:231](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L231)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-actor/src/abstract-actor.ts#L141)
6
6
 
7
7
  Abstract base class for Play Architecture actors.
8
8
 
9
- Extends XState Actor to maintain ecosystem compatibility (inspection, devtools)
10
- while enforcing minimal signal protocol for Actor ↔ Infrastructure communication.
11
-
12
- The core protocol contains only:
13
-
14
- - state: Reactive state snapshot
15
- - send: Event dispatch method
16
-
17
- Optional capabilities (routing, view rendering) are provided via interfaces:
18
-
19
- - Implement Routable for routing support
20
- - Implement Viewable for view rendering support
21
-
22
- Concrete implementations created by @xmachines/play-xstate adapter.
23
-
24
- ## Examples
25
-
26
- Simple actor (no routing, no view) - single type param, backward compat
27
-
28
- ```typescript
29
- class SimpleActor extends AbstractActor<AnyActorLogic> {
30
- state = new Signal.State({...});
31
- send(event) { ... }
32
- }
33
- ```
34
-
35
- Typed event actor - two type params
36
-
37
- ```typescript
38
- type AuthEvent = { type: "auth.login"; username: string } | { type: "auth.logout" };
39
- class AuthActor extends AbstractActor<AnyActorLogic, AuthEvent> {
40
- state = new Signal.State({...});
41
- send(event: AuthEvent) { ... }
42
- }
43
- ```
44
-
45
- Full-featured actor (routing + view)
46
-
47
- ```typescript
48
- class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
49
- implements Routable, Viewable {
50
- state = new Signal.State({...});
51
- currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
52
- currentView = new Signal.State(null);
53
- send(event) { ... }
54
- }
55
- ```
56
-
57
- ## See
58
-
59
- - [Play RFC](../../../../rfc/play.md)
60
- - [Routable](../../play-actor/interfaces/Routable.md) for routing capability
61
- - [Viewable](../../play-actor/interfaces/Viewable.md) for view rendering capability
9
+ Provides signal-driven state observation that integrates with XState ecosystem
10
+ tooling (devtools, inspection) while exposing reactive signals for
11
+ Infrastructure layer communication.
62
12
 
63
13
  ## Extends
64
14
 
@@ -66,26 +16,26 @@ class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
66
16
 
67
17
  ## Type Parameters
68
18
 
69
- | Type Parameter | Default type | Description |
70
- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
71
- | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | XState actor logic type (maintains type safety) |
72
- | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | Event type union that this actor's send() accepts. Defaults to `EventObject` (`{ type: string }`) for backward compatibility. Use `EventFromLogic<TMachine>` from xstate to infer the exact event union from a state machine (e.g., in `PlayerActor`). Invariant: Actor Authority - Actor is the sole source of truth for state transitions. Invariant: Signal-Only Reactivity - Infrastructure observes via TC39 Signals. Invariant: Passive Infrastructure - Infrastructure reflects, never decides. |
19
+ | Type Parameter | Default type | Description |
20
+ | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |
21
+ | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | XState actor logic type |
22
+ | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | Event type constraint (defaults to EventObject) |
73
23
 
74
24
  ## Properties
75
25
 
76
- | Property | Modifier | Type | Description | Inherited from | Defined in |
77
- | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78
- | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
79
- | <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. | `Actor.clock` | - |
80
- | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
81
- | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
82
- | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
83
- | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
84
- | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
85
- | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
86
- | <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Typed as `Signal.State<unknown>` at the abstract level; concrete implementations narrow this to the actual snapshot type (e.g., `Signal.State<AnyMachineSnapshot>` in `@xmachines/play-xstate`'s `PlayerActor`). Infrastructure observes this signal to react to state changes without directly coupling to the Actor's internal state machine implementation. **Example** `// Infrastructure observes state signal const watcher = new Signal.subtle.Watcher(() => { console.log('Actor state changed:', actor.state.get()); }); watcher.watch(actor.state);` | - | [packages/play-actor/src/abstract-actor.ts:254](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L254) |
87
- | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
88
- | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
26
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
27
+ | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
29
+ | <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. | `Actor.clock` | - |
30
+ | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
31
+ | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
32
+ | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
33
+ | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
34
+ | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
35
+ | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
36
+ | <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | 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. | - | [packages/play-actor/src/abstract-actor.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-actor/src/abstract-actor.ts#L151) |
37
+ | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
38
+ | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
89
39
 
90
40
  ## Methods
91
41
 
@@ -95,6 +45,8 @@ class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
95
45
  observable: InteropSubscribable<SnapshotFrom<TLogic>>;
96
46
  ```
97
47
 
48
+ Defined in: `xstate`
49
+
98
50
  #### Returns
99
51
 
100
52
  [`InteropSubscribable`](https://www.jsdocs.io/package/xstate#InteropSubscribable)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\>
@@ -113,6 +65,8 @@ Actor.[observable]
113
65
  getPersistedSnapshot(): Snapshot<unknown>;
114
66
  ```
115
67
 
68
+ Defined in: `xstate`
69
+
116
70
  Obtain the internal state of the actor, which can be persisted.
117
71
 
118
72
  #### Returns
@@ -147,6 +101,8 @@ Actor.getPersistedSnapshot;
147
101
  getSnapshot(): SnapshotFrom<TLogic>;
148
102
  ```
149
103
 
104
+ Defined in: `xstate`
105
+
150
106
  Read an actor’s snapshot synchronously.
151
107
 
152
108
  #### Returns
@@ -182,6 +138,8 @@ Actor.getSnapshot;
182
138
  on<TType>(type, handler): Subscription;
183
139
  ```
184
140
 
141
+ Defined in: `xstate`
142
+
185
143
  #### Type Parameters
186
144
 
187
145
  | Type Parameter |
@@ -213,6 +171,8 @@ Actor.on;
213
171
  select<TSelected>(selector, equalityFn?): Readable<TSelected>;
214
172
  ```
215
173
 
174
+ Defined in: `xstate`
175
+
216
176
  #### Type Parameters
217
177
 
218
178
  | Type Parameter |
@@ -244,37 +204,22 @@ Actor.select;
244
204
  abstract send(event): void;
245
205
  ```
246
206
 
247
- Defined in: [packages/play-actor/src/abstract-actor.ts:278](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L278)
207
+ Defined in: [packages/play-actor/src/abstract-actor.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-actor/src/abstract-actor.ts#L158)
248
208
 
249
- Send event to Actor
209
+ Send event to Actor.
250
210
 
251
- Infrastructure forwards user intents (navigation, domain events, custom events)
252
- as events to the Actor. The Actor's state machine guards determine whether
253
- each event is valid from the current state.
211
+ Constrained to TEvent for type safety in concrete implementations.
254
212
 
255
213
  #### Parameters
256
214
 
257
- | Parameter | Type | Description |
258
- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
259
- | `event` | `TEvent` | Event object with type property (e.g., PlayEvent, PlayRouteEvent) Invariant: Actor Authority - Only Actor decides whether an event is valid. |
215
+ | Parameter | Type |
216
+ | --------- | -------- |
217
+ | `event` | `TEvent` |
260
218
 
261
219
  #### Returns
262
220
 
263
221
  `void`
264
222
 
265
- #### Example
266
-
267
- ```typescript
268
- // Infrastructure forwards user intent
269
- actor.send({ type: "auth.login", userId: "123" });
270
- // Actor's guards determine if event is allowed
271
- ```
272
-
273
- #### Remarks
274
-
275
- Accepts any event object with a type property. Core events (PlayEvent) are in
276
- @xmachines/play, routing events (PlayRouteEvent) are in @xmachines/play-router.
277
-
278
223
  #### Overrides
279
224
 
280
225
  ```ts
@@ -289,6 +234,8 @@ Actor.send;
289
234
  start(): this;
290
235
  ```
291
236
 
237
+ Defined in: `xstate`
238
+
292
239
  Starts the Actor from the initial state
293
240
 
294
241
  #### Returns
@@ -309,6 +256,8 @@ Actor.start;
309
256
  stop(): this;
310
257
  ```
311
258
 
259
+ Defined in: `xstate`
260
+
312
261
  Stops the Actor and unsubscribe all listeners.
313
262
 
314
263
  #### Returns
@@ -331,6 +280,8 @@ Actor.stop;
331
280
  subscribe(observer): Subscription;
332
281
  ```
333
282
 
283
+ Defined in: `xstate`
284
+
334
285
  Subscribe an observer to an actor’s snapshot values.
335
286
 
336
287
  ##### Parameters
@@ -407,6 +358,8 @@ subscribe(
407
358
  completeListener?): Subscription;
408
359
  ```
409
360
 
361
+ Defined in: `xstate`
362
+
410
363
  Subscribe an observer to an actor’s snapshot values.
411
364
 
412
365
  ##### Parameters
@@ -484,6 +437,8 @@ Actor.subscribe;
484
437
  toJSON(): object;
485
438
  ```
486
439
 
440
+ Defined in: `xstate`
441
+
487
442
  #### Returns
488
443
 
489
444
  `object`
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayRouteEvent
4
4
 
5
- Defined in: [packages/play-router/src/types.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L216)
5
+ Defined in: [packages/play-router/src/types.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L223)
6
6
 
7
7
  Enhanced routing event with parameter and query support
8
8
 
@@ -30,7 +30,7 @@ Target state ID with # prefix (e.g., '#home', '#profile')
30
30
 
31
31
  ## Param
32
32
 
33
- Merged path + query parameters (path parameters win conflicts)
33
+ Path-only route parameters extracted from the URL path (e.g., `{ userId: '123' }` from `/profile/123`). Query parameters are kept separate in `query`.
34
34
 
35
35
  ## Param
36
36
 
@@ -85,7 +85,7 @@ import type { PlayRouteEvent } from "@xmachines/play-router";
85
85
  const event: PlayRouteEvent = {
86
86
  type: "play.route",
87
87
  to: "#settings",
88
- params: { section: "profile" }, // Merged: path + query
88
+ params: { section: "profile" }, // Path-only route parameter
89
89
  query: { tab: "security" }, // Query-only
90
90
  };
91
91
  actor.send(event);
@@ -112,8 +112,8 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
112
112
 
113
113
  | Property | Modifier | Type | Defined in |
114
114
  | -------------------------------------- | ---------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
115
- | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [packages/play-router/src/types.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L221) |
116
- | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [packages/play-router/src/types.ts:219](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L219) |
117
- | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [packages/play-router/src/types.ts:220](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L220) |
118
- | <a id="property-to"></a> `to` | `readonly` | `string` | [packages/play-router/src/types.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L218) |
119
- | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [packages/play-router/src/types.ts:217](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L217) |
115
+ | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [packages/play-router/src/types.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L228) |
116
+ | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [packages/play-router/src/types.ts:226](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L226) |
117
+ | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [packages/play-router/src/types.ts:227](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L227) |
118
+ | <a id="property-to"></a> `to` | `readonly` | `string` | [packages/play-router/src/types.ts:225](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L225) |
119
+ | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [packages/play-router/src/types.ts:224](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L224) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayRouterProviderProps\<TActor\>
4
4
 
5
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L16)
5
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L33)
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -14,7 +14,7 @@ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:16](https:/
14
14
 
15
15
  | Property | Type | Description | Defined in |
16
16
  | ----------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
17
- | <a id="property-actor"></a> `actor` | `TActor` | - | [packages/play-solid-router/src/play-router-provider.tsx:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L17) |
18
- | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `any` | Renderer callback receives the same concrete actor type that was passed in. | [packages/play-solid-router/src/play-router-provider.tsx:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L21) |
19
- | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | - | [packages/play-solid-router/src/play-router-provider.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L18) |
20
- | <a id="property-router"></a> `router` | [`SolidRouterHooks`](../type-aliases/SolidRouterHooks.md) | - | [packages/play-solid-router/src/play-router-provider.tsx:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L19) |
17
+ | <a id="property-actor"></a> `actor` | `TActor` | - | [packages/play-solid-router/src/play-router-provider.tsx:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L34) |
18
+ | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `any` | Renderer callback receives the same concrete actor type that was passed in. | [packages/play-solid-router/src/play-router-provider.tsx:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L38) |
19
+ | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | - | [packages/play-solid-router/src/play-router-provider.tsx:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L35) |
20
+ | <a id="property-router"></a> `router` | [`SolidRouterHooks`](../type-aliases/SolidRouterHooks.md) | - | [packages/play-solid-router/src/play-router-provider.tsx:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L36) |
@@ -2,13 +2,26 @@
2
2
 
3
3
  # Interface: RouteMapping
4
4
 
5
- Defined in: [packages/play-solid-router/src/types.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/types.ts#L8)
5
+ Defined in: [packages/play-router/src/base-route-map.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/base-route-map.ts#L57)
6
6
 
7
- Mapping between state ID and URL path for SolidJS Router
7
+ A single state ID path mapping entry.
8
+
9
+ Both fields are `readonly` — mappings are immutable once passed to `BaseRouteMap`.
10
+ Adapter packages re-export a structurally compatible `RouteMapping` type under
11
+ their own name. This type is published from `@xmachines/play-router` as
12
+ `BaseRouteMapping` to avoid name collisions with those adapter-local types.
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ const mapping: BaseRouteMapping = { stateId: "home", path: "/" };
18
+ const paramMapping: BaseRouteMapping = { stateId: "profile", path: "/profile/:userId" };
19
+ const optionalMapping: BaseRouteMapping = { stateId: "settings", path: "/settings/:section?" };
20
+ ```
8
21
 
9
22
  ## Properties
10
23
 
11
- | Property | Modifier | Type | Description | Defined in |
12
- | --------------------------------------- | ---------- | -------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-path"></a> `path` | `readonly` | `string` | SolidJS Router path pattern **Example** `'/', '/profile/:userId', '/settings/:section?'` | [packages/play-solid-router/src/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/types.ts#L19) |
14
- | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID with # prefix **Example** `'#home', '#profile'` | [packages/play-solid-router/src/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/types.ts#L13) |
24
+ | Property | Modifier | Type | Description | Defined in |
25
+ | --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [packages/play-router/src/base-route-map.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/base-route-map.ts#L61) |
27
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [packages/play-router/src/base-route-map.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/base-route-map.ts#L59) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: [packages/play-router/src/types.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L264)
5
+ Defined in: [packages/play-router/src/types.ts:271](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L271)
6
6
 
7
7
  RouterBridge interface for runtime infrastructure adapters
8
8
 
@@ -54,7 +54,7 @@ class TanStackRouterBridge implements RouterBridge {
54
54
  connect(): void | Promise<void>;
55
55
  ```
56
56
 
57
- Defined in: [packages/play-router/src/types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L280)
57
+ Defined in: [packages/play-router/src/types.ts:287](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L287)
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: [packages/play-router/src/types.ts:296](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-router/src/types.ts#L296)
86
+ Defined in: [packages/play-router/src/types.ts:303](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-router/src/types.ts#L303)
87
87
 
88
88
  Disconnect the router bridge from the Actor
89
89
 
@@ -6,6 +6,6 @@
6
6
  type RoutableActor = AbstractActor<AnyActorLogic> & Routable & Viewable;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L8)
9
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L9)
10
10
 
11
11
  Minimum actor shape accepted by PlayRouterProvider.
@@ -6,46 +6,49 @@
6
6
  type SolidRouterHooks = object;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L10)
9
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L27)
10
10
 
11
- ## Properties
12
-
13
- ### location
11
+ The three Solid Router hook results that `PlayRouterProvider` and `SolidRouterBridge`
12
+ require. Pass these directly from your component's hook calls:
14
13
 
15
- ```ts
16
- location: object;
14
+ ```tsx
15
+ const navigate = useNavigate(); // → SolidRouterHooks.navigate
16
+ const location = useLocation(); // → SolidRouterHooks.location
17
+ const params = useParams(); // → SolidRouterHooks.params
17
18
  ```
18
19
 
19
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L12)
20
-
21
- #### pathname
20
+ - `navigate` — used to push URL changes when the actor's `currentRoute` changes.
21
+ - `location` — `pathname` and `search` are read at `connect()` time for deep-link sync.
22
+ Subsequent pathname changes drive router→actor sync via `createEffect`.
23
+ - `params` — Solid's pre-parsed path parameters for the current route segment. Used
24
+ directly in `extractParams()` to avoid re-parsing with URLPattern.
22
25
 
23
- ```ts
24
- pathname: string;
25
- ```
26
+ ## Properties
26
27
 
27
- #### search
28
+ ### location
28
29
 
29
30
  ```ts
30
- search: string;
31
+ location: Location;
31
32
  ```
32
33
 
34
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L29)
35
+
33
36
  ---
34
37
 
35
38
  ### navigate
36
39
 
37
40
  ```ts
38
- navigate: ((path) => void) | ((path, ...args) => unknown);
41
+ navigate: Navigator;
39
42
  ```
40
43
 
41
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L11)
44
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L28)
42
45
 
43
46
  ---
44
47
 
45
48
  ### params
46
49
 
47
50
  ```ts
48
- params: Record<string, string | undefined>;
51
+ params: Params;
49
52
  ```
50
53
 
51
- Defined in: [packages/play-solid-router/src/play-router-provider.tsx:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-solid-router/src/play-router-provider.tsx#L13)
54
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.27/packages/play-solid-router/src/play-router-provider.tsx#L30)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Solid Router Demo
4
4
 
5
- Solid + `@solidjs/router` demonstration of the Play architecture using provider-based router integration.
5
+ Solid + `@solidjs/router` integration demo for the XMachines Play architecture using provider-based router integration.
6
6
 
7
7
  ## What This Demonstrates
8
8
 
@@ -14,22 +14,22 @@ Solid + `@solidjs/router` demonstration of the Play architecture using provider-
14
14
 
15
15
  ## Running the Demo
16
16
 
17
- From this directory (`packages/play-solid-router/examples/demo`):
17
+ From the repository root:
18
18
 
19
19
  ```bash
20
20
  npm install
21
- npm run dev
21
+ npm run dev -w packages/play-solid-router/examples/demo
22
22
  ```
23
23
 
24
- Open `http://localhost:5173`.
24
+ Then open `http://localhost:3002`.
25
25
 
26
26
  ## Step-by-Step Code Flow
27
27
 
28
28
  Use this order to understand the implementation:
29
29
 
30
- 1. `src/main.tsx` bootstraps the demo and mounts the `<App />` component.
30
+ 1. `src/main.tsx` bootstraps the demo and mounts `<App />`.
31
31
  2. `src/App.tsx` wires actor lifecycle, shared machine/catalog imports, and router integration.
32
- 3. A `routeMap` is created by extracting routes from the shared `authMachine`.
32
+ 3. A `routeMap` is created by calling `createRouteMap(authMachine)`.
33
33
  4. `PlayRouterProvider` forwards navigation intent from `@solidjs/router` to the actor, and reflects actor-approved routes back to the URL.
34
34
  5. `Shell` (inside `src/App.tsx`) renders actor-projected views (`PlayRenderer`) and provides the shared UI shell.
35
35
  6. `test/library-pattern.test.ts` and `test/browser/` verify invariants and runtime routing behavior.
@@ -64,12 +64,11 @@ const routeMap = createRouteMap(authMachine);
64
64
 
65
65
  ## Key Files
66
66
 
67
- - `src/App.tsx` - Integration entry point wiring actor, provider, renderer, and shared machine/catalog imports.
68
- - `src/main.tsx` - Vite bootstrap for the Solid app.
69
- - `src/components/` - Demo views and controls that send events to the actor.
70
- - `test/library-pattern.test.ts` - Node/Vitest invariant checks for architecture boundaries.
71
- - `test/browser/startup.browser.test.ts` - Browser startup and mount coverage.
72
- - `test/browser/auth-flow.browser.test.ts` - Browser auth and routing behavior coverage.
67
+ - `src/App.tsx` - actor lifecycle, route map, `PlayRouterProvider` wiring, and renderer composition
68
+ - `src/main.tsx` - Vite bootstrap that mounts `<App />` via Solid's `render`
69
+ - `src/components/` - demo view components that send events to the actor
70
+ - `test/library-pattern.test.ts` - architecture boundary and invariant assertions
71
+ - `test/browser/shared-demo.browser.test.ts` - browser startup and full auth flow coverage
73
72
 
74
73
  ## State Machine & Architecture Details
75
74
 
@@ -97,31 +96,29 @@ Solid Router integration remains passive infrastructure. `RouterBridgeBase` stay
97
96
 
98
97
  ## Available Scripts
99
98
 
100
- ```bash
101
- npm run dev # Start Vite dev server (default: http://localhost:5173)
102
- npm run build # Build production assets
103
- npm run preview # Preview production build locally
104
- npm run test # Run unit/integration tests via Vitest
105
- npm run test:browser # Run browser-mode tests via vitest.browser.config.ts
106
- ```
99
+ These commands are defined in `package.json`:
100
+
101
+ | Command | Description |
102
+ | ------------------------------------------------------------------ | -------------------------------- |
103
+ | `npm run dev -w packages/play-solid-router/examples/demo` | Start Vite dev server |
104
+ | `npm run build -w packages/play-solid-router/examples/demo` | Build production bundle |
105
+ | `npm run preview -w packages/play-solid-router/examples/demo` | Preview built bundle |
106
+ | `npm run test -w packages/play-solid-router/examples/demo` | Run Vitest test suite |
107
+ | `npm run test:browser -w packages/play-solid-router/examples/demo` | Run browser-focused Vitest suite |
107
108
 
108
109
  ## Verification
109
110
 
110
- Use these checks from this directory:
111
+ Use these checks to validate README claims against the current demo implementation:
111
112
 
112
113
  ```bash
113
- npm run test
114
- npm run test:browser
114
+ npm run test -w packages/play-solid-router/examples/demo
115
+ npm run test:browser -w packages/play-solid-router/examples/demo
115
116
  ```
116
117
 
117
- Manual sanity check:
118
-
119
- 1. Start the app with `npm run dev`.
120
- 2. Open `http://localhost:5173`.
121
- 3. Confirm login/logout transitions update both view and URL, and that accessing protected routes while logged out redirects properly.
118
+ Expected result: library-pattern invariant tests and the browser shared-demo suite both pass, confirming login/logout transitions update both view and URL correctly.
122
119
 
123
120
  ## Learn More
124
121
 
125
122
  - [Solid Router package README](../play-solid-router/README.md)
123
+ - [SolidJS package README](../play-solid/README.md)
126
124
  - [TanStack Solid Router demo README](../play-tanstack-solid-router-demo/README.md)
127
- - [TanStack React Router demo README](../play-tanstack-react-router-demo/README.md)