@xmachines/docs 2.0.0 → 2.1.0

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 (299) hide show
  1. package/README.md +11 -13
  2. package/api/@xmachines/play/README.md +58 -63
  3. package/api/@xmachines/play/classes/NonNullableError.md +7 -7
  4. package/api/@xmachines/play/classes/PlayError.md +25 -27
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
  7. package/api/@xmachines/play-actor/README.md +72 -63
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
  18. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
  19. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
  20. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
  27. package/api/@xmachines/play-dom/README.md +119 -85
  28. package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
  29. package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
  30. package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
  31. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
  32. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  33. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
  34. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  35. package/api/@xmachines/play-dom-router/README.md +66 -49
  36. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  37. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  38. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  39. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  40. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  41. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  42. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
  43. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  44. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
  45. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  46. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  47. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  48. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  49. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  50. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  51. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  52. package/api/@xmachines/play-react/README.md +63 -54
  53. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  54. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  55. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  56. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  57. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  58. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  59. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
  60. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  61. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  62. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  63. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  64. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  65. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  66. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  67. package/api/@xmachines/play-react-router/README.md +37 -28
  68. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  69. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  70. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  71. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  72. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  73. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  74. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
  75. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  76. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  77. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  78. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  79. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  80. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  81. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  82. package/api/@xmachines/play-router/README.md +94 -82
  83. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  84. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  85. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  86. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  87. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  88. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  89. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  90. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  91. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  92. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  93. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  94. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  95. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  96. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  97. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  98. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  99. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  100. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  101. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  102. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  103. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  104. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  105. package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
  106. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
  107. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  108. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  109. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
  110. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  111. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  112. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  113. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  114. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  115. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  116. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  117. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  118. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  119. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  120. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  121. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  122. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  123. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  124. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  125. package/api/@xmachines/play-signals/README.md +38 -36
  126. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  127. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  128. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  129. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  130. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  131. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  132. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  133. package/api/@xmachines/play-solid/README.md +46 -42
  134. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  135. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  136. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  137. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  138. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  139. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  140. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  141. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  142. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  143. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  144. package/api/@xmachines/play-solid-router/README.md +34 -29
  145. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  146. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  147. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  148. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  149. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
  150. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  151. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
  152. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  153. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  154. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  155. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  156. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  157. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  158. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  159. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  160. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  161. package/api/@xmachines/play-svelte/README.md +40 -31
  162. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  163. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  164. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  165. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  166. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  167. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  168. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  169. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  170. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  171. package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
  172. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  173. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  174. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  175. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  176. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  177. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
  178. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  179. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  180. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  181. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  182. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  183. package/api/@xmachines/play-sveltekit-router/README.md +38 -34
  184. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  186. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  189. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
  190. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
  191. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  192. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  193. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  194. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
  196. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  198. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  199. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  201. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  202. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  203. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
  204. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  205. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  206. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  207. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  208. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  209. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  210. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  211. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  212. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  213. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  214. package/api/@xmachines/play-tanstack-router/README.md +37 -17
  215. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  216. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  217. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  218. package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
  219. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  220. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  221. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  222. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  223. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  224. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
  225. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  226. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  227. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  228. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  229. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  230. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  231. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  232. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  233. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  235. package/api/@xmachines/play-vue/README.md +37 -35
  236. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  237. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  238. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  239. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  240. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  241. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  242. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  243. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  244. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  245. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  246. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  247. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  248. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  249. package/api/@xmachines/play-vue-router/README.md +65 -56
  250. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  251. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  252. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  253. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  254. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
  255. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  256. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  257. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  258. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  259. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  260. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  261. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  262. package/api/@xmachines/play-xstate/README.md +72 -70
  263. package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
  264. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
  265. package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
  266. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
  267. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
  268. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  269. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  270. package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
  271. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
  272. package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
  273. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  274. package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
  275. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  276. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  277. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
  278. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  279. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  280. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
  281. package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
  282. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
  283. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
  284. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
  285. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  286. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
  287. package/api/@xmachines/shared/README.md +11 -13
  288. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  289. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  290. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  291. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  292. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  293. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  294. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  295. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  296. package/contributing/development.md +28 -0
  297. package/guides/inspector.md +1 -1
  298. package/package.json +1 -1
  299. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
@@ -2,21 +2,22 @@
2
2
 
3
3
  # Interface: RoutableActor
4
4
 
5
- Defined in: [types.ts:259](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L259)
5
+ Defined in: [types.ts:272](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L272)
6
6
 
7
- Minimal actor interface required by `RouterBridgeBase` and all framework router
8
- adapters.
7
+ The minimal actor interface that `RouterBridgeBase` and every framework router
8
+ adapter require.
9
9
 
10
- Using this interface instead of `AbstractActor<AnyActorLogic> & Routable` lets
11
- `RouterBridgeBase.actor.send` be typed to accept `PlayRouteEvent` directly
12
- eliminating the unsafe `(actor.send as (e: PlayRouteEvent) => void)` cast that
13
- existed when the actor was typed with the weaker `EventObject` constraint.
10
+ This interface, and not `AbstractActor<AnyActorLogic> & Routable`, gives
11
+ `RouterBridgeBase.actor.send` the type that accepts a `PlayRouteEvent` directly.
12
+ It therefore removes the unsafe cast `(actor.send as (e: PlayRouteEvent) => void)`,
13
+ which the weaker `EventObject` constraint of the actor type needed before.
14
14
 
15
- All `AbstractActor` subclasses satisfy this interface structurally because:
15
+ Every `AbstractActor` subclass satisfies this interface structurally, for two
16
+ reasons:
16
17
 
17
- - `AbstractActor` implements `send(event: TEvent): void` where `TEvent` accepts
18
- any `EventObject`, so `PlayRouteEvent` (a subtype) is always accepted.
19
- - `Routable` provides `currentRoute` and `initialRoute`.
18
+ - `AbstractActor` implements `send(event: TEvent): void`, and `TEvent` accepts each
19
+ `EventObject`. Therefore it always accepts a `PlayRouteEvent`, which is a subtype.
20
+ - `Routable` gives `currentRoute` and `initialRoute`.
20
21
 
21
22
  ## Example
22
23
 
@@ -36,10 +37,10 @@ class MyBridge extends RouterBridgeBase {
36
37
 
37
38
  ## Properties
38
39
 
39
- | Property | Modifier | Type | Description | Defined in |
40
- | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
41
- | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | TC39 Signal exposing the actor's current URL path (or state ID). | [types.ts:261](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L261) |
42
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | [types.ts:267](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L267) |
40
+ | Property | Modifier | Type | Description | Defined in |
41
+ | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
42
+ | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | The TC39 Signal of the current URL path of the actor, or of its state ID. | [types.ts:274](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L274) |
43
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it. A router bridge compares it with the browser URL. It therefore separates a deep link, where the router wins, from a restore of a session, where the actor wins. | [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L280) |
43
44
 
44
45
  ## Methods
45
46
 
@@ -49,9 +50,9 @@ class MyBridge extends RouterBridgeBase {
49
50
  send(event): void;
50
51
  ```
51
52
 
52
- Defined in: [types.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L269)
53
+ Defined in: [types.ts:282](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L282)
53
54
 
54
- Send a route navigation event to the actor.
55
+ Sends a route navigation event to the actor.
55
56
 
56
57
  #### Parameters
57
58
 
@@ -2,18 +2,18 @@
2
2
 
3
3
  # Interface: RouteInfo
4
4
 
5
- Defined in: [types.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L56)
5
+ Defined in: [types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L60)
6
6
 
7
- Extracted route information from a state node
7
+ The route information of a state node
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | --------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | Whether route path is absolute (starts with /) | [types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L66) |
14
- | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original route metadata | [types.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L73) |
15
- | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if routePath contains params | [types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L64) |
16
- | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) true = has meta.route, can receive play.route events | [types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L71) |
17
- | <a id="property-routepath"></a> `routePath` | `string` | Route path extracted from meta.route | [types.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L62) |
18
- | <a id="property-stateid"></a> `stateId` | `string` | State identifier (node.id or path.join('.')) | [types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L58) |
19
- | <a id="property-statepath"></a> `statePath` | `string`[] | State path segments from root | [types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L60) |
11
+ | Property | Type | Description | Defined in |
12
+ | --------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | It tells you if the route path is absolute, which means that it starts with / | [types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L70) |
14
+ | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | The original route metadata | [types.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L77) |
15
+ | <a id="property-pattern"></a> `pattern?` | `string` | The route pattern with its parameters, for example /profile/:userId, when routePath holds a parameter | [types.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L68) |
16
+ | <a id="property-routable"></a> `routable` | `boolean` | It tells you if this state has a route, which means that it has a meta.route field. true = it has a meta.route field, and it can receive a play.route event | [types.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L75) |
17
+ | <a id="property-routepath"></a> `routePath` | `string` | The route path of meta.route | [types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L66) |
18
+ | <a id="property-stateid"></a> `stateId` | `string` | The identifier of the state: node.id, or path.join('.') | [types.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L62) |
19
+ | <a id="property-statepath"></a> `statePath` | `string`[] | The segments of the state path, from the root | [types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L64) |
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: RouteMapOptions
4
4
 
5
- Defined in: [create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/create-route-map.ts#L9)
5
+ Defined in: [create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map.ts#L9)
6
6
 
7
- Options for `createRouteMap` and `createRouteMapFromTree`.
7
+ The options of `createRouteMap` and of `createRouteMapFromTree`.
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-cachesize"></a> `cacheSize?` | `number` | Maximum number of resolved parameterized path lookups to cache. `RouteMap.getStateIdByPath()` resolves parameterized patterns (e.g. `/profile/:userId`) via URLPattern on every call. Frequently visited paths are cached in an LRU so subsequent lookups are O(1). Increase this value for applications with large parameterized route sets or high navigation frequency. Default: `500`. | [create-route-map.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/create-route-map.ts#L20) |
11
+ | Property | Type | Description | Defined in |
12
+ | -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-cachesize"></a> `cacheSize?` | `number` | The maximum number of the resolved parameterized path lookups in the cache. `RouteMap.getStateIdByPath()` resolves a parameterized pattern, for example `/profile/:userId`, with URLPattern on each call. The map keeps each path of a frequent visit in an LRU cache, and a later lookup of that path is therefore O(1). Raise this value for an application with a large set of parameterized routes, or with a high frequency of the navigation. The default is `500`. | [create-route-map.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map.ts#L21) |
@@ -2,14 +2,15 @@
2
2
 
3
3
  # Interface: RouteMapping
4
4
 
5
- Defined in: [base-route-map.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L51)
5
+ Defined in: [base-route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L54)
6
6
 
7
- A single state ID path mapping entry.
7
+ One entry of the map between a state ID and a path.
8
8
 
9
- Both fields are `readonly` mappings are immutable once passed to `RouteMap`.
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
- `RouteMapping` to avoid name collisions with those adapter-local types.
9
+ Both fields are `readonly`, because a mapping is immutable after the caller gives
10
+ it to `RouteMap`. An adapter package re-exports a structurally compatible
11
+ `RouteMapping` type under its own name. `@xmachines/play-router` publishes this
12
+ type as `RouteMapping`, and its name therefore does not collide with such a local
13
+ type of an adapter.
13
14
 
14
15
  ## Example
15
16
 
@@ -21,7 +22,7 @@ const optionalMapping: RouteMapping = { stateId: "settings", path: "/settings/:s
21
22
 
22
23
  ## Properties
23
24
 
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?"`) | [base-route-map.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L55) |
27
- | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L53) |
25
+ | Property | Modifier | Type | Description | Defined in |
26
+ | --------------------------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
27
+ | <a id="property-path"></a> `path` | `readonly` | `string` | The pattern of the URL path, for example `"/"`, `"/profile/:userId"`, or `"/settings/:section?"` | [base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L58) |
28
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | The state ID of the state machine, for example `"home"` or `"#profile"` | [base-route-map.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L56) |
@@ -2,11 +2,11 @@
2
2
 
3
3
  # Interface: RouteMatch
4
4
 
5
- Defined in: [router-sync.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L12)
5
+ Defined in: [router-sync.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L12)
6
6
 
7
7
  ## Properties
8
8
 
9
9
  | Property | Type | Defined in |
10
10
  | -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
11
- | <a id="property-params"></a> `params?` | `Record`\<`string`, `string`\> | [router-sync.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L14) |
12
- | <a id="property-to"></a> `to` | `string` \| `null` \| `undefined` | [router-sync.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L13) |
11
+ | <a id="property-params"></a> `params?` | `Record`\<`string`, `string`\> | [router-sync.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L14) |
12
+ | <a id="property-to"></a> `to` | `string` \| `null` \| `undefined` | [router-sync.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L13) |
@@ -2,20 +2,20 @@
2
2
 
3
3
  # Interface: RouteNode
4
4
 
5
- Defined in: [types.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L79)
5
+ Defined in: [types.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L83)
6
6
 
7
- Node in the route tree representing a single route
7
+ A node of the route tree. It represents one route
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | ----------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-children"></a> `children` | `RouteNode`[] | Child routes | [types.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L103) |
14
- | <a id="property-fullpath"></a> `fullPath` | `string` | The fully resolved absolute path from the root (e.g. `"/dashboard/overview"`). Always use `fullPath` for browser URL matching and route map construction. `createRouteMapFromTree` and `createRouteMap` both use this field. | [types.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L92) |
15
- | <a id="property-id"></a> `id` | `string` | Unique identifier (state ID) | [types.ts:81](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L81) |
16
- | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original meta.route metadata | [types.ts:107](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L107) |
17
- | <a id="property-parent"></a> `parent` | `RouteNode` \| `null` | Parent route (null for root) | [types.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L105) |
18
- | <a id="property-path"></a> `path` | `string` | The raw route path segment as declared in `meta.route` may be relative (e.g. `"overview"`) or absolute (e.g. `"/dashboard"`). Do not use this for URL matching; use `fullPath` instead. | [types.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L86) |
19
- | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if path contains params | [types.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L94) |
20
- | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) States with meta.route can receive play.route events | [types.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L101) |
21
- | <a id="property-stateid"></a> `stateId` | `string` | XState state ID this route maps to | [types.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L96) |
11
+ | Property | Type | Description | Defined in |
12
+ | ----------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-children"></a> `children` | `RouteNode`[] | The child routes | [types.ts:108](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L108) |
14
+ | <a id="property-fullpath"></a> `fullPath` | `string` | The complete absolute path from the root, for example `"/dashboard/overview"`. Always use `fullPath` for a match of a browser URL and for the construction of a route map. `createRouteMapFromTree` and `createRouteMap` both use this field. | [types.ts:97](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L97) |
15
+ | <a id="property-id"></a> `id` | `string` | The unique identifier, which is the state ID | [types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L85) |
16
+ | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | The original meta.route metadata | [types.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L112) |
17
+ | <a id="property-parent"></a> `parent` | `RouteNode` \| `null` | The parent route. It is null for the root | [types.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L110) |
18
+ | <a id="property-path"></a> `path` | `string` | The raw segment of the route path, as `meta.route` declares it. It is relative, for example `"overview"`, or absolute, for example `"/dashboard"`. Never use it for a match of a URL: use `fullPath` for that. | [types.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L91) |
19
+ | <a id="property-pattern"></a> `pattern?` | `string` | The route pattern with its parameters, for example /profile/:userId, when path holds a parameter | [types.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L99) |
20
+ | <a id="property-routable"></a> `routable` | `boolean` | It tells you if this state has a route, which means that it has a meta.route field. A state with a meta.route field can receive a play.route event | [types.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L106) |
21
+ | <a id="property-stateid"></a> `stateId` | `string` | The XState state ID of this route | [types.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L101) |
@@ -2,9 +2,9 @@
2
2
 
3
3
  # Interface: RouteObject
4
4
 
5
- Defined in: [types.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L41)
5
+ Defined in: [types.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L45)
6
6
 
7
- Route object with additional metadata.
7
+ A route object, with more metadata.
8
8
 
9
9
  ## Indexable
10
10
 
@@ -12,10 +12,10 @@ Route object with additional metadata.
12
12
  [key: string]: unknown
13
13
  ```
14
14
 
15
- Additional route metadata (title, breadcrumb, etc.)
15
+ The additional metadata of the route: a title, a breadcrumb, and so on
16
16
 
17
17
  ## Properties
18
18
 
19
- | Property | Type | Description | Defined in |
20
- | --------------------------------- | -------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
21
- | <a id="property-path"></a> `path` | `string` | Route path template (e.g., '/user/:id') | [types.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L43) |
19
+ | Property | Type | Description | Defined in |
20
+ | --------------------------------- | -------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
21
+ | <a id="property-path"></a> `path` | `string` | The template of the route path, for example '/user/:id' | [types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L47) |
@@ -2,20 +2,20 @@
2
2
 
3
3
  # Interface: RouteTree
4
4
 
5
- Defined in: [types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L117)
5
+ Defined in: [types.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L122)
6
6
 
7
- Complete route tree with lookup maps
7
+ The complete route tree, with its lookup maps
8
8
 
9
- Provides bidirectional mapping between state IDs and URL paths:
9
+ It gives you the map between a state ID and a URL path, in both directions:
10
10
 
11
- - byStateId: Maps state IDs to route nodes (for play.route event targeting)
12
- - byPath: Maps URL paths to route nodes (for browser navigation)
11
+ - byStateId: it maps each state ID to its route node, for the target of a play.route event
12
+ - byPath: it maps each URL path to its route node, for the browser navigation
13
13
 
14
14
  ## Properties
15
15
 
16
- | Property | Type | Description | Defined in |
17
- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
18
- | <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map full path -> route node Used to look up state ID from URL path for play.route event targeting | [types.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L129) |
19
- | <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map state ID -> route node Used to look up URL path from state ID for browser URL sync | [types.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L124) |
20
- | <a id="property-graph"></a> `graph?` | `Graph`\<[`MachineNodeData`](MachineNodeData.md), [`MachineEdgeData`](MachineEdgeData.md), `any`, `any`\> | Graph representation of the state machine for advanced queries. Populated by extractMachineRoutes() use for hierarchy queries, reachability checks, and transition-aware navigation via @statelyai/graph algorithms. **Example** `import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home");` | [types.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L141) |
21
- | <a id="property-root"></a> `root` | [`RouteNode`](RouteNode.md) | Root route node | [types.ts:119](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L119) |
16
+ | Property | Type | Description | Defined in |
17
+ | ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
18
+ | <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | The map from a complete path to its route node. It gives you the state ID of a URL path, for the target of a play.route event | [types.ts:134](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L134) |
19
+ | <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | The map from a state ID to its route node. It gives you the URL path of a state ID, for the update of the browser URL | [types.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L129) |
20
+ | <a id="property-graph"></a> `graph?` | `Graph`\<[`MachineNodeData`](MachineNodeData.md), [`MachineEdgeData`](MachineEdgeData.md), `any`, `any`\> | The graph of the state machine, for an advanced query. extractMachineRoutes() fills it. Use it for a query of the hierarchy, for a test of the reachability, and for a navigation that knows the transitions, through the algorithms of @statelyai/graph. **Example** `import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home");` | [types.ts:147](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L147) |
21
+ | <a id="property-root"></a> `root` | [`RouteNode`](RouteNode.md) | The root node of the routes | [types.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L124) |
@@ -2,19 +2,19 @@
2
2
 
3
3
  # Interface: RouteWatcherHandle
4
4
 
5
- Defined in: [router-bridge-base.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-bridge-base.ts#L71)
5
+ Defined in: [router-bridge-base.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L72)
6
6
 
7
- Narrow interface for the TC39 Signal watcher used by `RouterBridgeBase` to
8
- monitor `actor.currentRoute` changes.
7
+ The narrow interface of the TC39 Signal watcher. `RouterBridgeBase` uses it to
8
+ observe each change of `actor.currentRoute`.
9
9
 
10
- This interface hides the full `Signal.subtle.Watcher` surface and exposes only
11
- the two operations that `RouterBridgeBase` actually needs:
10
+ The interface hides the complete `Signal.subtle.Watcher` surface. It exposes the
11
+ two operations that `RouterBridgeBase` needs:
12
12
 
13
- - `watch(signal)` — arm the watcher on a specific signal
14
- - `unwatch()` — stop watching and release resources
13
+ - `watch(signal)` — it arms the watcher on one signal
14
+ - `unwatch()` — it stops the watch and frees the resources
15
15
 
16
- Framework adapter subclasses never interact with this handle directly; it is
17
- created and managed internally by `RouterBridgeBase`.
16
+ A framework adapter subclass touches this handle never. `RouterBridgeBase` makes
17
+ it and manages it internally.
18
18
 
19
19
  ## Methods
20
20
 
@@ -24,9 +24,9 @@ created and managed internally by `RouterBridgeBase`.
24
24
  unwatch(): void;
25
25
  ```
26
26
 
27
- Defined in: [router-bridge-base.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-bridge-base.ts#L75)
27
+ Defined in: [router-bridge-base.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L76)
28
28
 
29
- Stop observing and release the watcher.
29
+ Stops the observation and frees the watcher.
30
30
 
31
31
  #### Returns
32
32
 
@@ -40,9 +40,9 @@ Stop observing and release the watcher.
40
40
  watch(signal): void;
41
41
  ```
42
42
 
43
- Defined in: [router-bridge-base.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-bridge-base.ts#L73)
43
+ Defined in: [router-bridge-base.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L74)
44
44
 
45
- Arm the watcher to observe the given signal.
45
+ Arms the watcher on the given signal.
46
46
 
47
47
  #### Parameters
48
48
 
@@ -2,21 +2,23 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: [types.ts:341](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L341)
5
+ Defined in: [types.ts:358](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L358)
6
6
 
7
- RouterBridge interface for runtime infrastructure adapters
7
+ The RouterBridge interface of a runtime infrastructure adapter
8
8
 
9
- Defines the lifecycle connection between Infrastructure (e.g., a framework router) and
10
- the Actor. Infrastructure "bridges" to the Actor by observing its signals and
11
- managing its own lifecycle accordingly.
9
+ The interface defines the connection of the lifecycle between the infrastructure,
10
+ for example a framework router, and the Actor. The infrastructure builds a "bridge"
11
+ to the Actor: it observes the signals of the Actor, and it manages its own
12
+ lifecycle accordingly.
12
13
 
13
- **Architectural Context:** Implements **Passive Infrastructure (INV-04)** by establishing
14
- a unidirectional observation pattern. Infrastructure connects to observe Actor signals
15
- (currentRoute, currentView, state) and reflects changes without making state decisions.
14
+ **Architectural context:** the interface implements **Passive Infrastructure
15
+ (INV-04)**, because it gives an observation in one direction. The infrastructure
16
+ connects to observe the signals of the Actor (currentRoute, currentView, and
17
+ state), and it reflects each change. It makes no decision about the state.
16
18
 
17
19
  ## Example
18
20
 
19
- Framework router bridge implementation
21
+ The implementation of a framework router bridge
20
22
 
21
23
  ```typescript
22
24
  import type { RouterBridge } from "@xmachines/play-router";
@@ -26,7 +28,7 @@ class MyRouterBridge implements RouterBridge {
26
28
  private watcher: Signal.Watcher | null = null;
27
29
 
28
30
  async connect(): Promise<void> {
29
- // Start observing actor.currentRoute signal
31
+ // Start the observation of the actor.currentRoute signal
30
32
  this.watcher = new Signal.subtle.Watcher(() => {
31
33
  const route = actor.currentRoute.get();
32
34
  if (route) router.navigate(route);
@@ -35,7 +37,7 @@ class MyRouterBridge implements RouterBridge {
35
37
  }
36
38
 
37
39
  async disconnect(): Promise<void> {
38
- // Stop observing, cleanup watchers
40
+ // Stop the observation, and clean the watchers up
39
41
  this.watcher?.unwatch(actor.currentRoute);
40
42
  this.watcher = null;
41
43
  }
@@ -44,7 +46,7 @@ class MyRouterBridge implements RouterBridge {
44
46
 
45
47
  ## See
46
48
 
47
- [Play RFC](../../../../rfc/play.md) - Invariant INV-04
49
+ [Play RFC](../../../../rfc/play.md) - invariant INV-04
48
50
 
49
51
  ## Methods
50
52
 
@@ -54,25 +56,26 @@ class MyRouterBridge implements RouterBridge {
54
56
  connect(): void | Promise<void>;
55
57
  ```
56
58
 
57
- Defined in: [types.ts:357](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L357)
59
+ Defined in: [types.ts:375](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L375)
58
60
 
59
- Connect the router bridge to the Actor
61
+ Connects the router bridge to the Actor
60
62
 
61
- Called when Infrastructure should begin observing Actor signals and
62
- synchronizing its state (e.g., browser URL) with Actor state.
63
+ The infrastructure calls it when it must start the observation of the Actor
64
+ signals, and when it must bring its own state, for example the browser URL, in line
65
+ with the Actor state.
63
66
 
64
67
  #### Returns
65
68
 
66
69
  `void` \| `Promise`\<`void`\>
67
70
 
68
- Promise that resolves when connection is established, or void for synchronous connection
71
+ The promise that resolves after the connection, or void for a synchronous connection
69
72
 
70
73
  #### Example
71
74
 
72
75
  ```typescript
73
76
  const bridge: RouterBridge = createBridge(actor, router);
74
77
  await bridge.connect();
75
- // Bridge now observing actor.currentRoute signal
78
+ // The bridge observes the actor.currentRoute signal now
76
79
  ```
77
80
 
78
81
  ---
@@ -83,22 +86,22 @@ await bridge.connect();
83
86
  disconnect(): void | Promise<void>;
84
87
  ```
85
88
 
86
- Defined in: [types.ts:373](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L373)
89
+ Defined in: [types.ts:391](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L391)
87
90
 
88
- Disconnect the router bridge from the Actor
91
+ Disconnects the router bridge from the Actor
89
92
 
90
- Called when Infrastructure should stop observing and clean up resources
91
- (e.g., signal watchers, event listeners).
93
+ The infrastructure calls it when it must stop the observation and free its
94
+ resources, for example a signal watcher and an event listener.
92
95
 
93
96
  #### Returns
94
97
 
95
98
  `void` \| `Promise`\<`void`\>
96
99
 
97
- Promise that resolves when disconnection is complete, or void for synchronous disconnection
100
+ The promise that resolves after the disconnection, or void for a synchronous disconnection
98
101
 
99
102
  #### Example
100
103
 
101
104
  ```typescript
102
105
  await bridge.disconnect();
103
- // Bridge stopped observing, resources cleaned up
106
+ // The bridge stopped its observation, and it freed its resources
104
107
  ```
@@ -2,22 +2,22 @@
2
2
 
3
3
  # Interface: WindowLike
4
4
 
5
- Defined in: [types.ts:394](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L394)
5
+ Defined in: [types.ts:412](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L412)
6
6
 
7
- Minimal window interface required by adapters that subscribe to DOM events
8
- (e.g. `hashchange`). Injectable for SSR and testing pass a mock instead of
9
- the global `window` when the DOM is unavailable.
7
+ The minimal window interface of an adapter that subscribes to a DOM event, for
8
+ example to `hashchange`. You can inject it for SSR and for a test: give a mock in
9
+ place of the global `window` when no DOM is available.
10
10
 
11
- Defined structurally (no `Window` reference) so this package compiles without
12
- the DOM lib.
11
+ The definition is structural, and it holds no reference to `Window`. This package
12
+ therefore compiles without the DOM lib.
13
13
 
14
14
  ## Example
15
15
 
16
16
  ```typescript
17
- // Normal usage — global window (default)
17
+ // The normal use the global window, which is the default
18
18
  connectRouter({ actor, routeMap });
19
19
 
20
- // SSR / test — injected mock
20
+ // SSR or a test — an injected mock
21
21
  const mockWin: WindowLike = { addEventListener: vi.fn(), removeEventListener: vi.fn() };
22
22
  connectRouter({ actor, routeMap, window: mockWin });
23
23
  ```
@@ -30,7 +30,7 @@ connectRouter({ actor, routeMap, window: mockWin });
30
30
  addEventListener(type, listener): void;
31
31
  ```
32
32
 
33
- Defined in: [types.ts:395](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L395)
33
+ Defined in: [types.ts:413](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L413)
34
34
 
35
35
  #### Parameters
36
36
 
@@ -51,7 +51,7 @@ Defined in: [types.ts:395](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.
51
51
  removeEventListener(type, listener): void;
52
52
  ```
53
53
 
54
- Defined in: [types.ts:396](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L396)
54
+ Defined in: [types.ts:414](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L414)
55
55
 
56
56
  #### Parameters
57
57
 
@@ -0,0 +1,13 @@
1
+ [API](../../../README.md) / [@xmachines/play-router](../README.md) / BaseRouteMapping
2
+
3
+ # ~~Type Alias: BaseRouteMapping~~
4
+
5
+ ```ts
6
+ type BaseRouteMapping = RouteMapping;
7
+ ```
8
+
9
+ Defined in: [index.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/index.ts#L61)
10
+
11
+ ## Deprecated
12
+
13
+ Use [RouteMapping](../interfaces/RouteMapping.md). Will be removed in the next major.
@@ -6,10 +6,11 @@
6
6
  type MachineGraph = Graph<MachineNodeData, MachineEdgeData>;
7
7
  ```
8
8
 
9
- Defined in: [machine-to-graph.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/machine-to-graph.ts#L18)
9
+ Defined in: [machine-to-graph.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/machine-to-graph.ts#L19)
10
10
 
11
- Typed @statelyai/graph Graph representing a state machine.
12
- Provides hierarchy queries, traversal algorithms, and reachability checks.
11
+ The typed Graph of @statelyai/graph that represents a state machine.
12
+ It gives you the queries of the hierarchy, the algorithms of a walk, and the tests
13
+ of the reachability.
13
14
 
14
15
  ## Example
15
16
 
@@ -6,6 +6,6 @@
6
6
  type RouteMetadata = string | RouteObject;
7
7
  ```
8
8
 
9
- Defined in: [types.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L51)
9
+ Defined in: [types.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L55)
10
10
 
11
- Route metadata from state machine `meta.route` field.
11
+ The route metadata of the `meta.route` field of a state machine.