@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
@@ -9,13 +9,14 @@ function buildPlayRouteEvent(options): {
9
9
  } | null;
10
10
  ```
11
11
 
12
- Defined in: [router-sync.ts:168](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L168)
12
+ Defined in: [router-sync.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L175)
13
13
 
14
- Build a normalized `play.route` event from raw router/browser input.
14
+ Builds a normalized `play.route` event from the raw input of a router or of a
15
+ browser.
15
16
 
16
- Both `connectRouter()` (from `@xmachines/play-dom-router`) and `RouterBridgeBase`
17
- use this helper so low-level and framework adapters share the same pathname
18
- sanitization, route matching, and query extraction behavior.
17
+ `connectRouter()` of `@xmachines/play-dom-router` and `RouterBridgeBase` both use
18
+ this helper. Therefore a low-level adapter and a framework adapter clean each
19
+ pathname, match each route, and read each query in the same way.
19
20
 
20
21
  ## Parameters
21
22
 
@@ -6,32 +6,33 @@
6
6
  function buildRouteTree(routes): RouteTree;
7
7
  ```
8
8
 
9
- Defined in: [build-tree.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/build-tree.ts#L21)
9
+ Defined in: [build-tree.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/build-tree.ts#L22)
10
10
 
11
- Build hierarchical route tree from flat route list
11
+ Builds the hierarchical route tree from the flat list of the routes
12
12
 
13
- Constructs nested tree respecting parent-child state relationships.
14
- Absolute routes become top-level, relative routes nest under parents.
15
- Creates bidirectional maps for state ID path lookup.
13
+ The function makes a nested tree, and it keeps the parent-child relation of the
14
+ states. An absolute route becomes a route of the top level, and a relative route
15
+ goes below its parent. The function also makes the maps of both directions, for
16
+ the lookup between a state ID and a path.
16
17
 
17
- Duplicate detection runs here after relative routes are resolved against
18
- their parent's full path so two relative routes with the same raw string
19
- under different parents are valid, while distinct raw strings that resolve to
20
- the same full path (which would silently overwrite each other in `byPath`)
21
- are rejected.
18
+ The detection of a duplicate runs here, after the function resolved each relative
19
+ route against the complete path of its parent. Therefore two relative routes with
20
+ the same raw string below two different parents are valid, and two different raw
21
+ strings that resolve to the same complete path are not: those two overwrite each
22
+ other in `byPath` in silence.
22
23
 
23
24
  ## Parameters
24
25
 
25
- | Parameter | Type | Description |
26
- | --------- | ------------------------------------------- | -------------------------------------- |
27
- | `routes` | [`RouteInfo`](../interfaces/RouteInfo.md)[] | Flat list of RouteInfo from extraction |
26
+ | Parameter | Type | Description |
27
+ | --------- | ------------------------------------------- | ----------------------------------------------------------- |
28
+ | `routes` | [`RouteInfo`](../interfaces/RouteInfo.md)[] | The flat list of the RouteInfo objects, from the extraction |
28
29
 
29
30
  ## Returns
30
31
 
31
32
  [`RouteTree`](../interfaces/RouteTree.md)
32
33
 
33
- RouteTree with root, byStateId map, and byPath map
34
+ The RouteTree, with its root, its byStateId map, and its byPath map
34
35
 
35
36
  ## Throws
36
37
 
37
- If two states resolve to the same full path
38
+ When two states resolve to the same complete path
@@ -6,27 +6,28 @@
6
6
  function createRouteMap(machine, options?): RouteMap;
7
7
  ```
8
8
 
9
- Defined in: [create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/create-route-map.ts#L45)
9
+ Defined in: [create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map.ts#L47)
10
10
 
11
- Create a `RouteMap` from an XState state machine.
11
+ Creates a `RouteMap` from an XState state machine.
12
12
 
13
- Extracts all routable states (those with `meta.route`) and builds a bidirectional
14
- path stateId lookup structure. The returned map is used by `RouterBridgeBase`
15
- subclasses to translate browser URL changes into `play.route` actor events and
16
- vice-versa.
13
+ The function reads every state with a route, which means each state with a
14
+ `meta.route` field. It then builds the lookup structure between a path and a
15
+ stateId, for both directions. A subclass of `RouterBridgeBase` uses the map: it
16
+ converts each change of the browser URL into a `play.route` actor event, and each
17
+ actor route into a URL.
17
18
 
18
19
  ## Parameters
19
20
 
20
- | Parameter | Type | Description |
21
- | ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
22
- | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | XState v5 state machine with `meta.route` annotations on states. |
23
- | `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | Optional configuration. Pass `{ cacheSize }` to override the default LRU cache size for parameterized path lookups. |
21
+ | Parameter | Type | Description |
22
+ | ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
23
+ | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine, with a `meta.route` annotation on each state with a route. |
24
+ | `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | The optional configuration. Give `{ cacheSize }` to change the default size of the LRU cache of the parameterized path lookups. |
24
25
 
25
26
  ## Returns
26
27
 
27
28
  [`RouteMap`](../classes/RouteMap.md)
28
29
 
29
- A `RouteMap` for passing to any `RouterBridgeBase`-based adapter.
30
+ A `RouteMap` for each adapter on `RouterBridgeBase`.
30
31
 
31
32
  ## Example
32
33
 
@@ -6,41 +6,41 @@
6
6
  function createRouteMapFromTree(routeTree, options?): RouteMap;
7
7
  ```
8
8
 
9
- Defined in: [create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/create-route-map-from-tree.ts#L33)
9
+ Defined in: [create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map-from-tree.ts#L33)
10
10
 
11
- Create a `RouteMap` from a `RouteTree` node structure.
11
+ Creates a `RouteMap` from the node structure of a `RouteTree`.
12
12
 
13
- Used by framework-router adapters that pass a
14
- `RouteTree` produced by `extractMachineRoutes()` rather than calling
15
- `createRouteMap()` directly.
13
+ A framework router adapter uses this function when it gives a `RouteTree` from
14
+ `extractMachineRoutes()`, and not when it calls `createRouteMap()` directly.
16
15
 
17
- Traverses all nodes collecting `{ stateId: node.id, path: node.fullPath }` pairs.
18
- `node.fullPath` is always the absolute resolved path (e.g. `"/dashboard/overview"`),
19
- which is what `RouteMap` needs for browser URL matching. This matches the
20
- behaviour of `createRouteMap(machine)`, which also uses `node.fullPath`.
16
+ The function walks every node, and it collects the pairs
17
+ `{ stateId: node.id, path: node.fullPath }`. `node.fullPath` is always the
18
+ absolute resolved path, for example `"/dashboard/overview"`, and `RouteMap` needs
19
+ that path for the match of a browser URL. `createRouteMap(machine)` behaves in the
20
+ same way, because it also uses `node.fullPath`.
21
21
 
22
22
  ## Parameters
23
23
 
24
- | Parameter | Type | Description |
25
- | ----------- | ----------------------------------------------------- | ----------------------------------------------------------------------------- |
26
- | `routeTree` | [`RouteTree`](../interfaces/RouteTree.md) | A `RouteTree` as returned by `extractMachineRoutes()`. |
27
- | `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | Optional configuration (e.g. `{ cacheSize }` to override the LRU cache size). |
24
+ | Parameter | Type | Description |
25
+ | ----------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------- |
26
+ | `routeTree` | [`RouteTree`](../interfaces/RouteTree.md) | A `RouteTree`, as `extractMachineRoutes()` returns it. |
27
+ | `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | The optional configuration, for example `{ cacheSize }` to change the size of the LRU cache. |
28
28
 
29
29
  ## Returns
30
30
 
31
31
  [`RouteMap`](../classes/RouteMap.md)
32
32
 
33
- A `RouteMap` for use with any `RouterBridgeBase`-based adapter.
33
+ A `RouteMap` for each adapter on `RouterBridgeBase`.
34
34
 
35
35
  ## Example
36
36
 
37
37
  ```typescript
38
- // Preferredsingle call for XState machines:
38
+ // The preferred form one call for an XState machine:
39
39
  import { createRouteMap } from "@xmachines/play-router";
40
- const routeMap = createRouteMap(machine); // takes AnyStateMachine
40
+ const routeMap = createRouteMap(machine); // it takes an AnyStateMachine
41
41
 
42
- // Two-step form used by framework adapters that work with route trees:
42
+ // The two-step form, for a framework adapter that works with a route tree:
43
43
  import { extractMachineRoutes, createRouteMapFromTree } from "@xmachines/play-router";
44
44
  const routeTree = extractMachineRoutes(machine);
45
- const routeMap = createRouteMapFromTree(routeTree); // uses node.fullPath (absolute)
45
+ const routeMap = createRouteMapFromTree(routeTree); // it uses node.fullPath, which is absolute
46
46
  ```
@@ -6,29 +6,30 @@
6
6
  function detectDuplicateRoutes(routes): void;
7
7
  ```
8
8
 
9
- Defined in: [validate-routes.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/validate-routes.ts#L69)
9
+ Defined in: [validate-routes.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L70)
10
10
 
11
- Detect duplicate route paths
11
+ Finds each duplicate route path
12
12
 
13
- THROWS ERROR when multiple states share the same RESOLVED full path.
13
+ The function THROWS AN ERROR when more than one state holds the same RESOLVED
14
+ complete path.
14
15
 
15
- Detection operates on resolved full paths (after relative routes have been
16
- prefixed with their parent's path in `buildRouteTree`), not on raw route
17
- strings: two relative `"settings"` routes under different parents resolve to
18
- distinct full paths and are valid, while a relative route and an absolute
19
- route resolving to the same URL genuinely collide and must be rejected.
20
- Called from `buildRouteTree` once full paths are known.
16
+ The detection works on the resolved complete paths, after `buildRouteTree` put the
17
+ path of each parent before its relative routes. It does not work on the raw route
18
+ strings: two relative `"settings"` routes below two different parents resolve to
19
+ two different complete paths, and they are valid; a relative route and an absolute
20
+ route that resolve to the same URL are a real collision, and the function refuses
21
+ them. `buildRouteTree` calls this function when the complete paths are known.
21
22
 
22
- Rationale: URL-based routing requires one-to-one mapping between URLs and states.
23
- Multiple states at the same path creates ambiguity for browser navigation (back button,
24
- direct URL access). Use different paths for different states, or single state with
25
- conditional rendering.
23
+ The reason: a routing on the URL requires one state for each URL. Two states at
24
+ the same path make the browser navigation ambiguous, for the BACK button and for a
25
+ direct URL. Use a different path for each state, or use one state with a
26
+ conditional render.
26
27
 
27
28
  ## Parameters
28
29
 
29
- | Parameter | Type | Description |
30
- | --------- | ----------------------------------------------------------- | ------------------------------------------------------------------- |
31
- | `routes` | [`ResolvedRoutePath`](../interfaces/ResolvedRoutePath.md)[] | Array of route entries with resolved full paths (e.g. `RouteNode`s) |
30
+ | Parameter | Type | Description |
31
+ | --------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
32
+ | `routes` | [`ResolvedRoutePath`](../interfaces/ResolvedRoutePath.md)[] | The array of the route entries with their resolved complete paths, for example the `RouteNode` objects |
32
33
 
33
34
  ## Returns
34
35
 
@@ -36,4 +37,4 @@ conditional rendering.
36
37
 
37
38
  ## Throws
38
39
 
39
- If duplicate resolved route paths are detected
40
+ When the function finds two resolved route paths that are equal
@@ -6,23 +6,24 @@
6
6
  function extractMachineRoutes(machine): RouteTree;
7
7
  ```
8
8
 
9
- Defined in: [extract-routes.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/extract-routes.ts#L89)
9
+ Defined in: [extract-routes.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/extract-routes.ts#L92)
10
10
 
11
- Extract complete route tree from state machine graph
11
+ Reads the complete route tree from the graph of a state machine
12
12
 
13
- Converts the XState machine to a @statelyai/graph Graph via machineToGraph(),
14
- then walks graph nodes to extract route metadata, validate route references,
15
- and build a hierarchical RouteTree. The graph is attached to the returned
16
- RouteTree for downstream transition-aware queries.
13
+ The function converts the XState machine into a Graph of @statelyai/graph, with
14
+ machineToGraph(). It then walks the graph nodes: it reads the route metadata of
15
+ each node, it checks each route reference, and it builds a hierarchical RouteTree.
16
+ The RouteTree of the return value also holds the graph, for a later query that
17
+ needs the transitions.
17
18
 
18
19
  ## Parameters
19
20
 
20
- | Parameter | Type | Description |
21
- | --------- | ------------------------------------------------------------------------- | ----------------------- |
22
- | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | XState v5 state machine |
21
+ | Parameter | Type | Description |
22
+ | --------- | ------------------------------------------------------------------------- | --------------------------- |
23
+ | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine |
23
24
 
24
25
  ## Returns
25
26
 
26
27
  [`RouteTree`](../interfaces/RouteTree.md)
27
28
 
28
- Route tree with root, byStateId map, byPath map, and graph
29
+ The route tree, with its root, its byStateId map, its byPath map, and its graph
@@ -6,10 +6,10 @@
6
6
  function extractQuery(search): Record<string, string>;
7
7
  ```
8
8
 
9
- Defined in: [router-sync.ts:149](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L149)
9
+ Defined in: [router-sync.ts:155](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L155)
10
10
 
11
- Parse a URL search string into the plain object shape expected by
12
- `play.route` events.
11
+ Parses a URL search string into the plain object that a `play.route` event
12
+ needs.
13
13
 
14
14
  ## Parameters
15
15
 
@@ -6,40 +6,43 @@
6
6
  function extractRouteParams(pathname, pattern): Record<string, string>;
7
7
  ```
8
8
 
9
- Defined in: [router-sync.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/router-sync.ts#L112)
9
+ Defined in: [router-sync.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L117)
10
10
 
11
- Extract named path parameters from a URL using the URLPattern API.
11
+ Reads the named path parameters of a URL, with the URLPattern API.
12
12
 
13
- Takes the pattern string directly use this when the pattern is already known.
14
- For extraction via a state ID lookup, see `RouterBridgeBase.extractParams`.
13
+ The function takes the string of the pattern directly. Use it when you know the
14
+ pattern already. For a read through the lookup of a state ID, see
15
+ `RouterBridgeBase.extractParams`.
15
16
 
16
- Undefined values (unmatched optional segments, e.g. `/settings` against
17
- `/settings/:section?`) are omitted from the returned object.
17
+ The object of the return holds no undefined value. Such a value comes from an
18
+ optional segment without a match, for example `/settings` against
19
+ `/settings/:section?`.
18
20
 
19
- The pattern is normalized with the same rules `RouteMap` uses for matching
20
- (hyphenated names like `:cat-id` become `:cat_id` for URLPattern), and the
21
- extracted group names are mapped back to the original param names, so
22
- `/docs/123` against `/docs/:cat-id` yields `{ "cat-id": "123" }`.
21
+ The function normalizes the pattern with the rules of the match in `RouteMap`: a
22
+ name with a hyphen, such as `:cat-id`, becomes `:cat_id` for URLPattern. It then
23
+ maps each group name back to the original param name. Therefore `/docs/123`
24
+ against `/docs/:cat-id` gives `{ "cat-id": "123" }`.
23
25
 
24
- Values are percent-decoded (`john%20doe` → `john doe`), matching framework
25
- router semantics (e.g. vue-router). Malformed sequences are kept raw.
26
+ The function decodes each percent sequence of a value (`john%20doe` → `john doe`),
27
+ as a framework router does, for example vue-router. It keeps a malformed sequence
28
+ raw.
26
29
 
27
30
  ## Parameters
28
31
 
29
- | Parameter | Type | Description |
30
- | ---------- | -------- | ---------------------------------------------------- |
31
- | `pathname` | `string` | The concrete URL pathname (e.g. `/profile/alice`) |
32
- | `pattern` | `string` | The URL pattern template (e.g. `/profile/:username`) |
32
+ | Parameter | Type | Description |
33
+ | ---------- | -------- | ----------------------------------------------------------------- |
34
+ | `pathname` | `string` | The concrete URL pathname, for example `/profile/alice` |
35
+ | `pattern` | `string` | The template of the URL pattern, for example `/profile/:username` |
33
36
 
34
37
  ## Returns
35
38
 
36
39
  `Record`\<`string`, `string`\>
37
40
 
38
- A record of extracted parameter values, or `{}` for static patterns.
41
+ The record of the parameter values of the read, or `{}` for a static pattern.
39
42
 
40
43
  ## Throws
41
44
 
42
- When `URLPattern` is absent and the pattern is parameterized.
45
+ When `URLPattern` is absent and the pattern holds a parameter.
43
46
 
44
47
  ## Example
45
48
 
@@ -50,5 +53,5 @@ extractRouteParams("/profile/alice", "/profile/:username");
50
53
  // → { username: "alice" }
51
54
 
52
55
  extractRouteParams("/settings", "/settings/:section?");
53
- // → {} (optional param absent not included)
56
+ // → {} — the optional param is absent, and the object holds it not
54
57
  ```
@@ -6,25 +6,26 @@
6
6
  function findRouteById(tree, id): RouteNode | undefined;
7
7
  ```
8
8
 
9
- Defined in: [find-route.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/find-route.ts#L57)
9
+ Defined in: [find-route.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/find-route.ts#L59)
10
10
 
11
- Find route node by state ID
11
+ Finds a route node by its state ID
12
12
 
13
- Looks up route node using the state's ID property. Used to get URL path
14
- from state ID for browser URL sync after play.route transitions.
13
+ The function looks the route node up by the ID property of the state. It gives you
14
+ the URL path of a state ID, for the update of the browser URL after a `play.route`
15
+ transition.
15
16
 
16
17
  ## Parameters
17
18
 
18
- | Parameter | Type | Description |
19
- | --------- | ----------------------------------------- | ------------------------------------------------ |
20
- | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | Route tree from extractMachineRoutes |
21
- | `id` | `string` | State ID (e.g., 'dashboard', 'settings.profile') |
19
+ | Parameter | Type | Description |
20
+ | --------- | ----------------------------------------- | ----------------------------------------------------------- |
21
+ | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | The route tree, from extractMachineRoutes |
22
+ | `id` | `string` | The state ID, for example 'dashboard' or 'settings.profile' |
22
23
 
23
24
  ## Returns
24
25
 
25
26
  [`RouteNode`](../interfaces/RouteNode.md) \| `undefined`
26
27
 
27
- Route node if found, undefined otherwise
28
+ The route node, or undefined when the function finds none
28
29
 
29
30
  ## Example
30
31
 
@@ -6,30 +6,32 @@
6
6
  function findRouteByPath(tree, path): RouteNode | undefined;
7
7
  ```
8
8
 
9
- Defined in: [find-route.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/find-route.ts#L82)
9
+ Defined in: [find-route.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/find-route.ts#L86)
10
10
 
11
- Find route node by URL path
11
+ Finds a route node by its URL path
12
12
 
13
- Looks up route node using the URL path. Used to get state ID from browser
14
- URL for sending play.route events on navigation.
13
+ The function looks the route node up by the URL path. It gives you the state ID of
14
+ a browser URL, for the `play.route` event of a navigation.
15
15
 
16
- When multiple states share the same path (e.g., root and a state both at "/"),
17
- prefers routable nodes (with meta.route) over non-routable nodes.
16
+ When more than one state holds the same path, for example the root and a second
17
+ state both at "/", the function prefers a node with a route, which means a node
18
+ with a `meta.route` field, over a node without one.
18
19
 
19
- Supports pattern matching for dynamic routes (e.g., '/settings/:section?').
20
+ The function also matches a pattern of a dynamic route, for example
21
+ '/settings/:section?'.
20
22
 
21
23
  ## Parameters
22
24
 
23
- | Parameter | Type | Description |
24
- | --------- | ----------------------------------------- | -------------------------------------------------- |
25
- | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | Route tree from extractMachineRoutes |
26
- | `path` | `string` | URL path (e.g., '/dashboard', '/settings/profile') |
25
+ | Parameter | Type | Description |
26
+ | --------- | ----------------------------------------- | ------------------------------------------------------------- |
27
+ | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | The route tree, from extractMachineRoutes |
28
+ | `path` | `string` | The URL path, for example '/dashboard' or '/settings/profile' |
27
29
 
28
30
  ## Returns
29
31
 
30
32
  [`RouteNode`](../interfaces/RouteNode.md) \| `undefined`
31
33
 
32
- Route node if found, undefined otherwise
34
+ The route node, or undefined when the function finds none
33
35
 
34
36
  ## Example
35
37
 
@@ -6,25 +6,25 @@
6
6
  function getNavigableRoutes(tree, stateId): RouteNode[];
7
7
  ```
8
8
 
9
- Defined in: [query.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/query.ts#L41)
9
+ Defined in: [query.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/query.ts#L41)
10
10
 
11
- Get all routes navigable from given state
11
+ Returns every route of a navigation from the given state
12
12
 
13
- Returns child routes of the specified state. Future enhancement will
14
- include sibling routes reachable via transitions.
13
+ The function returns the child routes of the state. A later version also returns
14
+ the sibling routes of a transition.
15
15
 
16
16
  ## Parameters
17
17
 
18
- | Parameter | Type | Description |
19
- | --------- | ----------------------------------------- | -------------------------------------- |
20
- | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | Route tree from extractMachineRoutes() |
21
- | `stateId` | `string` | Current state ID |
18
+ | Parameter | Type | Description |
19
+ | --------- | ----------------------------------------- | ------------------------------------------- |
20
+ | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | The route tree, from extractMachineRoutes() |
21
+ | `stateId` | `string` | The ID of the current state |
22
22
 
23
23
  ## Returns
24
24
 
25
25
  [`RouteNode`](../interfaces/RouteNode.md)[]
26
26
 
27
- Array of route nodes reachable from state
27
+ The array of the route nodes that the state can reach
28
28
 
29
29
  ## Example
30
30
 
@@ -6,25 +6,25 @@
6
6
  function getRoutableRoutes(tree): RouteNode[];
7
7
  ```
8
8
 
9
- Defined in: [query.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/query.ts#L103)
9
+ Defined in: [query.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/query.ts#L106)
10
10
 
11
- Get all routable routes from tree as flat array
11
+ Returns every route of the tree that has a route, in one flat array
12
12
 
13
- Returns all routes that have meta.route defined, excluding non-routable
14
- states and the synthetic root node. Useful for dynamically generating
15
- router configurations in framework adapters.
13
+ The function returns each route with a `meta.route` field. It returns no state
14
+ without a route, and no synthetic root node. Use it to generate a router
15
+ configuration in a framework adapter dynamically.
16
16
 
17
17
  ## Parameters
18
18
 
19
- | Parameter | Type | Description |
20
- | --------- | ----------------------------------------- | -------------------------------------- |
21
- | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | Route tree from extractMachineRoutes() |
19
+ | Parameter | Type | Description |
20
+ | --------- | ----------------------------------------- | ------------------------------------------- |
21
+ | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | The route tree, from extractMachineRoutes() |
22
22
 
23
23
  ## Returns
24
24
 
25
25
  [`RouteNode`](../interfaces/RouteNode.md)[]
26
26
 
27
- Array of routable route nodes with path and stateId
27
+ The array of the route nodes with a route, with their path and their stateId
28
28
 
29
29
  ## Example
30
30
 
@@ -6,31 +6,32 @@
6
6
  function getTransitionReachableRoutes(graph, stateId): string[];
7
7
  ```
8
8
 
9
- Defined in: [query.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/query.ts#L154)
9
+ Defined in: [query.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/query.ts#L158)
10
10
 
11
- Get routes reachable via transitions from current state
11
+ Returns the routes that a transition from the current state can reach
12
12
 
13
- Uses the @statelyai/graph successor algorithm to find all states
14
- directly reachable via transition edges from the given state,
15
- then filters to those with defined routes.
13
+ The function uses the successor algorithm of @statelyai/graph. It finds every
14
+ state of a direct transition edge from the given state, then it keeps the states
15
+ with a route.
16
16
 
17
- Returned values are the RAW `meta.route` strings from the machine — relative
18
- routes (e.g. `"detail"`) are NOT resolved to full paths and cannot be used as
19
- `tree.byPath` keys. For resolved `RouteNode`s use `getNavigableRoutes`, which
20
- resolves reachable states through `tree.byStateId`.
17
+ The values of the return are the RAW `meta.route` strings of the machine. The
18
+ function does NOT resolve a relative route, for example `"detail"`, to a complete
19
+ path, and such a value is therefore no key of `tree.byPath`. For a resolved
20
+ `RouteNode`, use `getNavigableRoutes`: that function resolves each state that the
21
+ transition reaches through `tree.byStateId`.
21
22
 
22
23
  ## Parameters
23
24
 
24
- | Parameter | Type | Description |
25
- | --------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
26
- | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | Machine graph from RouteTree.graph |
27
- | `stateId` | `string` | Current state ID (e.g., "test.home") |
25
+ | Parameter | Type | Description |
26
+ | --------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
27
+ | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | The machine graph, from RouteTree.graph |
28
+ | `stateId` | `string` | The ID of the current state, for example "test.home" |
28
29
 
29
30
  ## Returns
30
31
 
31
32
  `string`[]
32
33
 
33
- Array of raw route strings reachable via transitions
34
+ The array of the raw route strings that a transition can reach
34
35
 
35
36
  ## Example
36
37
 
@@ -38,6 +39,6 @@ Array of raw route strings reachable via transitions
38
39
  const tree = extractMachineRoutes(machine);
39
40
  if (tree.graph) {
40
41
  const reachable = getTransitionReachableRoutes(tree.graph, "auth.loggedIn");
41
- // ['/dashboard', '/settings'] — routes reachable via transitions
42
+ // ['/dashboard', '/settings'] — the routes that a transition can reach
42
43
  }
43
44
  ```