@xmachines/docs 2.0.0-alpha.1 → 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 (388) hide show
  1. package/README.md +16 -17
  2. package/api/@xmachines/play/README.md +58 -66
  3. package/api/@xmachines/play/classes/NonNullableError.md +14 -14
  4. package/api/@xmachines/play/classes/PlayError.md +32 -34
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +28 -27
  7. package/api/@xmachines/play-actor/README.md +114 -50
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +45 -30
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +27 -0
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +21 -0
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +43 -0
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +28 -0
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +42 -0
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +29 -0
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +25 -27
  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 -15
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +11 -0
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +6 -6
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +50 -0
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +15 -0
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +15 -0
  27. package/api/@xmachines/play-dom/README.md +123 -86
  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/functions/createValidationRegistry.md +22 -0
  32. package/api/@xmachines/play-dom/functions/defineRegistry.md +5 -5
  33. package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -8
  34. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +16 -16
  35. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -0
  36. package/api/@xmachines/play-dom/interfaces/FieldValidationState.md +16 -0
  37. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  38. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +17 -17
  39. package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +2 -0
  40. package/api/@xmachines/play-dom/interfaces/ValidationRegistry.md +21 -0
  41. package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +10 -0
  42. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  43. package/api/@xmachines/play-dom/variables/schema.md +35 -45
  44. package/api/@xmachines/play-dom-router/README.md +68 -51
  45. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  46. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  47. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  48. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  49. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  50. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  51. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +21 -20
  52. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  53. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +41 -35
  54. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  55. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  56. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  57. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  58. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  59. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  60. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  61. package/api/@xmachines/play-react/README.md +65 -55
  62. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  63. package/api/@xmachines/play-react/functions/defineRegistry.md +5 -5
  64. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  65. package/api/@xmachines/play-react/functions/useFieldValidation.md +31 -0
  66. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  67. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  68. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  69. package/api/@xmachines/play-react/interfaces/ComponentContext.md +9 -8
  70. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  71. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -6
  72. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  73. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  74. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  75. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  76. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  77. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  78. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  79. package/api/@xmachines/play-react-router/README.md +38 -31
  80. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  81. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  82. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  83. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  84. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  85. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  86. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +41 -35
  87. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  88. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  89. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  90. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  91. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  92. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  93. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  94. package/api/@xmachines/play-router/README.md +99 -95
  95. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  96. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  97. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  98. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  99. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  100. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  101. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  102. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  103. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  104. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  105. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  106. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  107. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  108. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  109. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  110. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  111. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  112. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  113. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  114. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  115. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  116. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
  117. package/api/@xmachines/play-router/interfaces/LocationLike.md +11 -11
  118. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -9
  119. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  120. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  121. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +41 -35
  122. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  123. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  124. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  125. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  126. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  127. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  128. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  129. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  130. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  131. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  132. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  133. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  134. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  135. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  136. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  137. package/api/@xmachines/play-signals/README.md +38 -36
  138. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  139. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  140. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  141. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  142. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  143. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  144. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  145. package/api/@xmachines/play-solid/README.md +46 -42
  146. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  147. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  148. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  149. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  150. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  151. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  152. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  153. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  154. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  155. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  156. package/api/@xmachines/play-solid-router/README.md +39 -34
  157. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  158. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  159. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  160. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  161. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +45 -30
  162. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  163. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +41 -35
  164. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  165. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  166. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  167. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  168. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  169. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  170. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  171. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  172. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  173. package/api/@xmachines/play-svelte/README.md +60 -33
  174. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  175. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  176. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  177. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  178. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  179. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  180. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  181. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  182. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  183. package/api/@xmachines/play-svelte-spa-router/README.md +43 -52
  184. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  186. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  189. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +41 -35
  190. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  191. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  192. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  193. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  194. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-sveltekit-router/README.md +43 -39
  196. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  198. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  199. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  201. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +11 -11
  202. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +41 -35
  203. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  204. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  205. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  206. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  207. package/api/@xmachines/play-tanstack-react-router/README.md +67 -49
  208. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  209. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  210. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  211. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  212. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  213. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  214. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  215. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +41 -35
  216. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  217. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  218. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  219. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  220. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  221. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  222. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  223. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  224. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  225. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  226. package/api/@xmachines/play-tanstack-router/README.md +38 -16
  227. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  228. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  229. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  230. package/api/@xmachines/play-tanstack-solid-router/README.md +76 -50
  231. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  232. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  233. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  235. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  236. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +41 -35
  237. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  238. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  239. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  240. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  241. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  242. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  243. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  244. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  245. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  246. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  247. package/api/@xmachines/play-vue/README.md +39 -39
  248. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  249. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  250. package/api/@xmachines/play-vue/functions/useFieldValidation.md +31 -0
  251. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  252. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  253. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  254. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  255. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  256. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  257. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  258. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  259. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +4 -4
  260. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  261. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  262. package/api/@xmachines/play-vue-router/README.md +66 -57
  263. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  264. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  265. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  266. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  267. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +41 -35
  268. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  269. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  270. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  271. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  272. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  273. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  274. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  275. package/api/@xmachines/play-xstate/README.md +129 -138
  276. package/api/@xmachines/play-xstate/classes/PlayerActor.md +148 -114
  277. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -23
  278. package/api/@xmachines/play-xstate/functions/composeGuards.md +34 -33
  279. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +27 -22
  280. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +19 -14
  281. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  282. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  283. package/api/@xmachines/play-xstate/functions/eventMatches.md +12 -7
  284. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +17 -48
  285. package/api/@xmachines/play-xstate/functions/hasContext.md +12 -9
  286. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  287. package/api/@xmachines/play-xstate/functions/negateGuard.md +26 -20
  288. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  289. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  290. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -11
  291. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  292. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +4 -4
  293. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +9 -25
  294. package/api/@xmachines/play-xstate/type-aliases/Guard.md +13 -11
  295. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +8 -5
  296. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +11 -15
  297. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -19
  298. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  299. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -26
  300. package/api/@xmachines/shared/README.md +12 -14
  301. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  302. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  303. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +12 -7
  304. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  305. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +9 -4
  306. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  307. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  308. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +6 -6
  309. package/contributing/architecture.md +27 -28
  310. package/contributing/configuration.md +10 -10
  311. package/contributing/deployment.md +51 -30
  312. package/contributing/development.md +90 -21
  313. package/contributing/testing.md +36 -14
  314. package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
  315. package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
  316. package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
  317. package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
  318. package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
  319. package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
  320. package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
  321. package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
  322. package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
  323. package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
  324. package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
  325. package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
  326. package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
  327. package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
  328. package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
  329. package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
  330. package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
  331. package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
  332. package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
  333. package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
  334. package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
  335. package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
  336. package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
  337. package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
  338. package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
  339. package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
  340. package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
  341. package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
  342. package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
  343. package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
  344. package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
  345. package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
  346. package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
  347. package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
  348. package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
  349. package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
  350. package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
  351. package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
  352. package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
  353. package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
  354. package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
  355. package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
  356. package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
  357. package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
  358. package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
  359. package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
  360. package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
  361. package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
  362. package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
  363. package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
  364. package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
  365. package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
  366. package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
  367. package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
  368. package/examples/README.md +4 -1
  369. package/examples/basic-state-machine.md +24 -24
  370. package/examples/form-validation.md +110 -121
  371. package/examples/multi-router-integration.md +0 -2
  372. package/examples/routing-patterns.md +60 -94
  373. package/examples/traffic-light.md +57 -48
  374. package/guides/README.md +6 -2
  375. package/guides/actor-model.md +1 -1
  376. package/guides/getting-started.md +89 -90
  377. package/guides/inspector.md +197 -0
  378. package/guides/state-machines.md +55 -69
  379. package/package.json +10 -7
  380. package/rfc/play.md +15 -6
  381. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
  382. package/api/@xmachines/play-xstate/functions/createRoutedMachine.md +0 -87
  383. package/api/@xmachines/play-xstate/type-aliases/PlayRoutePayload.md +0 -30
  384. package/api/@xmachines/play-xstate/type-aliases/SetupLike.md +0 -33
  385. package/api/@xmachines/play-xstate/type-aliases/WithOptional.md +0 -31
  386. package/api/@xmachines/play-xstate/variables/emptyEventSchema.md +0 -37
  387. package/api/@xmachines/play-xstate/variables/playMetaSchema.md +0 -40
  388. package/api/@xmachines/play-xstate/variables/playRouteEventSchema.md +0 -9
@@ -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-alpha.1/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-alpha.1/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-alpha.1/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-alpha.1/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-alpha.1/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-alpha.1/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
  ```
@@ -6,26 +6,27 @@
6
6
  function isRouteReachable(graph, fromStateId, toStateId): boolean;
7
7
  ```
8
8
 
9
- Defined in: [query.ts:181](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/query.ts#L181)
9
+ Defined in: [query.ts:186](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/query.ts#L186)
10
10
 
11
- Check if a route is reachable from current state via transitions
11
+ Tells you if a transition from the current state can reach a route
12
12
 
13
- Uses @statelyai/graph path-finding to determine if there exists
14
- a chain of transition edges from the source state to the target state.
13
+ The function uses the path search of @statelyai/graph. It decides if a chain of
14
+ transition edges is present from the state of the origin to the state of the
15
+ target.
15
16
 
16
17
  ## Parameters
17
18
 
18
- | Parameter | Type | Description |
19
- | ------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
20
- | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | Machine graph from RouteTree.graph |
21
- | `fromStateId` | `string` | Source state ID |
22
- | `toStateId` | `string` | Target state ID |
19
+ | Parameter | Type | Description |
20
+ | ------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
21
+ | `graph` | `Graph`\<[`MachineNodeData`](../interfaces/MachineNodeData.md), [`MachineEdgeData`](../interfaces/MachineEdgeData.md)\> | The machine graph, from RouteTree.graph |
22
+ | `fromStateId` | `string` | The ID of the state of the origin |
23
+ | `toStateId` | `string` | The ID of the state of the target |
23
24
 
24
25
  ## Returns
25
26
 
26
27
  `boolean`
27
28
 
28
- true if a transition path exists, false otherwise
29
+ true when a transition path is present. In every other case, false
29
30
 
30
31
  ## Example
31
32
 
@@ -33,6 +34,6 @@ true if a transition path exists, false otherwise
33
34
  const tree = extractMachineRoutes(machine);
34
35
  if (tree.graph) {
35
36
  const canReach = isRouteReachable(tree.graph, "auth.login", "auth.dashboard");
36
- // true if login dashboard transition path exists
37
+ // it is true when a transition path from login to dashboard is present
37
38
  }
38
39
  ```
@@ -6,7 +6,7 @@
6
6
  function machineToGraph(machine): MachineGraph;
7
7
  ```
8
8
 
9
- Defined in: [machine-to-graph.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/machine-to-graph.ts#L71)
9
+ Defined in: [machine-to-graph.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/machine-to-graph.ts#L73)
10
10
 
11
11
  ## Parameters
12
12
 
@@ -6,21 +6,21 @@
6
6
  function routeExists(tree, path): boolean;
7
7
  ```
8
8
 
9
- Defined in: [query.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/query.ts#L125)
9
+ Defined in: [query.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/query.ts#L128)
10
10
 
11
- Validate route path exists in tree
11
+ Tells you if a route path is in the tree
12
12
 
13
- Checks if path has corresponding state with meta.route.
13
+ The function tests if the path has a state with a `meta.route` field.
14
14
 
15
15
  ## Parameters
16
16
 
17
- | Parameter | Type | Description |
18
- | --------- | ----------------------------------------- | --------------------------------------------- |
19
- | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | Route tree from extractMachineRoutes() |
20
- | `path` | `string` | Full route path (e.g., '/dashboard/settings') |
17
+ | Parameter | Type | Description |
18
+ | --------- | ----------------------------------------- | ---------------------------------------------------------- |
19
+ | `tree` | [`RouteTree`](../interfaces/RouteTree.md) | The route tree, from extractMachineRoutes() |
20
+ | `path` | `string` | The complete route path, for example '/dashboard/settings' |
21
21
 
22
22
  ## Returns
23
23
 
24
24
  `boolean`
25
25
 
26
- true if path exists, false otherwise
26
+ true when the tree holds the path. In every other case, false
@@ -6,29 +6,31 @@
6
6
  function sanitizePathname(pathname): string | null;
7
7
  ```
8
8
 
9
- Defined in: [router-sync.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L72)
9
+ Defined in: [router-sync.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L74)
10
10
 
11
- Normalize a pathname before route-map lookup.
11
+ Normalizes a pathname before a lookup in the route map.
12
12
 
13
- This strips query/hash fragments, collapses duplicate slashes, and rejects
14
- implausibly long paths that should never enter route resolution.
13
+ The function removes a query fragment and a hash fragment, it joins each duplicate
14
+ slash into one, and it refuses a path of an improbable length, because such a path
15
+ must never enter the route resolution.
15
16
 
16
- Returns `null` for paths exceeding 2048 characters (malformed/adversarial input).
17
- Adapters that bypass `RouterBridgeBase.syncActorFromRouter()` (e.g. `VueRouterBridge`)
18
- must call this function directly and return early on `null` to apply the same
19
- defense-in-depth security guarantee as the shared base class.
17
+ It returns `null` for a path of more than 2048 characters, which is malformed or
18
+ hostile input. An adapter that passes around
19
+ `RouterBridgeBase.syncActorFromRouter()`, for example `VueRouterBridge`, must call
20
+ this function itself, and it must return at once on a `null` value. That adapter
21
+ then gives the same guarantee of the defense in depth as the shared base class.
20
22
 
21
23
  ## Parameters
22
24
 
23
- | Parameter | Type | Description |
24
- | ---------- | -------- | --------------------------------------------- |
25
- | `pathname` | `string` | Raw path string from router navigation event. |
25
+ | Parameter | Type | Description |
26
+ | ---------- | -------- | -------------------------------------------------------- |
27
+ | `pathname` | `string` | The raw path string of a navigation event of the router. |
26
28
 
27
29
  ## Returns
28
30
 
29
31
  `string` \| `null`
30
32
 
31
- Normalized path string, or `null` if the path is malformed/too long.
33
+ The normalized path string, or `null` when the path is malformed or too long.
32
34
 
33
35
  ## Example
34
36
 
@@ -36,5 +38,5 @@ Normalized path string, or `null` if the path is malformed/too long.
36
38
  import { sanitizePathname } from "@xmachines/play-router";
37
39
 
38
40
  const clean = sanitizePathname(to.path);
39
- if (clean === null) return; // reject malformed path
41
+ if (clean === null) return; // refuse a malformed path
40
42
  ```
@@ -6,20 +6,20 @@
6
6
  function validateRouteFormat(routePath, stateId): void;
7
7
  ```
8
8
 
9
- Defined in: [validate-routes.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/validate-routes.ts#L27)
9
+ Defined in: [validate-routes.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L27)
10
10
 
11
- Validate route path format
11
+ Checks the format of a route path
12
12
 
13
- Ensures route paths are non-empty strings. Both absolute paths ("/foo")
14
- and relative paths ("foo", "child/nested") are accepted. Relative routes
15
- inherit their parent state's path prefix when the tree is built.
13
+ The function requires a string that is not empty. It accepts an absolute path
14
+ ("/foo") and also a relative path ("foo" or "child/nested"). A relative route
15
+ receives the path prefix of its parent state during the construction of the tree.
16
16
 
17
17
  ## Parameters
18
18
 
19
- | Parameter | Type | Description |
20
- | ----------- | -------- | --------------------------------------------- |
21
- | `routePath` | `string` | Route path to validate (absolute or relative) |
22
- | `stateId` | `string` | State identifier for error messages |
19
+ | Parameter | Type | Description |
20
+ | ----------- | -------- | -------------------------------------------------- |
21
+ | `routePath` | `string` | The route path to check: absolute or relative |
22
+ | `stateId` | `string` | The identifier of the state, for the error message |
23
23
 
24
24
  ## Returns
25
25
 
@@ -27,4 +27,4 @@ inherit their parent state's path prefix when the tree is built.
27
27
 
28
28
  ## Throws
29
29
 
30
- If route path is empty
30
+ When the route path is empty
@@ -6,19 +6,19 @@
6
6
  function validateStateExists(stateId, stateIds): void;
7
7
  ```
8
8
 
9
- Defined in: [validate-routes.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/validate-routes.ts#L43)
9
+ Defined in: [validate-routes.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L43)
10
10
 
11
- Validate state exists in state ID set
11
+ Checks that the set of the state IDs holds a state
12
12
 
13
- Ensures referenced state IDs exist in the machine graph.
14
- Build-time validation prevents broken route references.
13
+ The function requires each state ID of a reference in the machine graph. This
14
+ check at the build time therefore stops a broken route reference.
15
15
 
16
16
  ## Parameters
17
17
 
18
- | Parameter | Type | Description |
19
- | ---------- | ----------------- | ------------------------------------------------- |
20
- | `stateId` | `string` | State identifier to validate |
21
- | `stateIds` | `Set`\<`string`\> | Set of all known state IDs from the machine graph |
18
+ | Parameter | Type | Description |
19
+ | ---------- | ----------------- | ---------------------------------------------------- |
20
+ | `stateId` | `string` | The identifier of the state to check |
21
+ | `stateIds` | `Set`\<`string`\> | The set of every known state ID of the machine graph |
22
22
 
23
23
  ## Returns
24
24
 
@@ -26,4 +26,4 @@ Build-time validation prevents broken route references.
26
26
 
27
27
  ## Throws
28
28
 
29
- If state ID doesn't exist in set
29
+ When the set does not hold the state ID
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: BuildPlayRouteEventOptions
4
4
 
5
- Defined in: [router-sync.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L17)
5
+ Defined in: [router-sync.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L17)
6
6
 
7
7
  ## Properties
8
8
 
9
- | Property | Type | Defined in |
10
- | ----------------------------------------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
11
- | <a id="property-match"></a> `match` | (`sanitizedPathname`) => [`RouteMatch`](RouteMatch.md) | [router-sync.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L20) |
12
- | <a id="property-pathname"></a> `pathname` | `string` | [router-sync.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L18) |
13
- | <a id="property-search"></a> `search?` | `string` | [router-sync.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L19) |
9
+ | Property | Type | Defined in |
10
+ | ----------------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
11
+ | <a id="property-match"></a> `match` | (`sanitizedPathname`) => [`RouteMatch`](RouteMatch.md) | [router-sync.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L20) |
12
+ | <a id="property-pathname"></a> `pathname` | `string` | [router-sync.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L18) |
13
+ | <a id="property-search"></a> `search?` | `string` | [router-sync.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L19) |
@@ -2,26 +2,26 @@
2
2
 
3
3
  # Interface: LocationLike
4
4
 
5
- Defined in: [types.ts:433](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L433)
5
+ Defined in: [types.ts:432](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L432)
6
6
 
7
- Minimal location interface required by adapters that read the current URL at
8
- `connect()` time. Injectable for SSR and testing pass a mock instead of the
9
- global `location` when the DOM is unavailable.
7
+ The minimal location interface of an adapter that reads the current URL at the
8
+ moment of `connect()`. You can inject it for SSR and for a test: give a mock in
9
+ place of the global `location` when no DOM is available.
10
10
 
11
- Defined structurally (no `Location` reference) so this package compiles without
12
- the DOM lib.
11
+ The definition is structural, and it holds no reference to `Location`. This package
12
+ therefore compiles without the DOM lib.
13
13
 
14
14
  ## Example
15
15
 
16
16
  ```typescript
17
- // SSR / test — injected mock
17
+ // SSR or a test — an injected mock
18
18
  const mockLoc: LocationLike = { pathname: "/dashboard", search: "?tab=posts" };
19
19
  connectRouter({ actor, routeMap, location: mockLoc });
20
20
  ```
21
21
 
22
22
  ## Properties
23
23
 
24
- | Property | Modifier | Type | Defined in |
25
- | ----------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
26
- | <a id="property-pathname"></a> `pathname` | `readonly` | `string` | [types.ts:434](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L434) |
27
- | <a id="property-search"></a> `search` | `readonly` | `string` | [types.ts:435](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L435) |
24
+ | Property | Modifier | Type | Defined in |
25
+ | ----------------------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------- |
26
+ | <a id="property-pathname"></a> `pathname` | `readonly` | `string` | [types.ts:433](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L433) |
27
+ | <a id="property-search"></a> `search` | `readonly` | `string` | [types.ts:434](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L434) |
@@ -2,16 +2,14 @@
2
2
 
3
3
  # Interface: MachineEdgeData
4
4
 
5
- Defined in: [types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L24)
5
+ Defined in: [types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L24)
6
6
 
7
- Data attached to each edge in the machine graph representation.
8
- Captures transition event and guard information.
7
+ The data on each edge of the graph that represents the machine.
8
+ It holds the event of the transition and the information of its guard.
9
9
 
10
10
  ## Properties
11
11
 
12
- | Property | Type | Description | Defined in |
13
- | ------------------------------------------------ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
14
- | <a id="property-dynamic"></a> `dynamic?` | `boolean` | True when the transition is an XState v6 function transition: the function acts as its own guard/resolver, so its target and conditionality are dynamic and unknowable statically (the edge's target falls back to the source state). | [types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L47) |
15
- | <a id="property-eventtype"></a> `eventType` | `string` | The event type that triggers this transition | [types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L26) |
16
- | <a id="property-guarded"></a> `guarded?` | `boolean` | True when a guard function gates this transition. XState v6 compiles all guards to functions (authored predicates, JSON-layer names, and the route-matching guard synthesized on native route transitions), so only the presence of a guard — not its identity — is statically knowable. | [types.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L40) |
17
- | <a id="property-guardtype"></a> ~~`guardType?`~~ | `string` | **Deprecated** Never populated under XState v6: every guard (including JSON-layer guard names via `createMachineFromConfig`) compiles to a function, so guard identity is unrecoverable statically. Use [MachineEdgeData.guarded](#property-guarded) instead. | [types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L33) |
12
+ | Property | Type | Description | Defined in |
13
+ | ------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
14
+ | <a id="property-eventtype"></a> `eventType` | `string` | The event type that starts this transition | [types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L26) |
15
+ | <a id="property-guardtype"></a> ~~`guardType?`~~ | `string` | The guard as a string, when a guard is present **Deprecated** Will be removed in the next major. | [types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L32) |