@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
@@ -2,16 +2,16 @@
2
2
 
3
3
  # Interface: MachineNodeData
4
4
 
5
- Defined in: [types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L9)
5
+ Defined in: [types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L9)
6
6
 
7
- Data attached to each node in the machine graph representation.
8
- Captures the essential state metadata needed for route extraction and queries.
7
+ The data on each node of the graph that represents the machine.
8
+ It holds the state metadata that the route extraction and the queries need.
9
9
 
10
10
  ## Properties
11
11
 
12
- | Property | Type | Description | Defined in |
13
- | --------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
14
- | <a id="property-meta"></a> `meta?` | `Record`\<`string`, `unknown`\> | Original state meta object | [types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L15) |
15
- | <a id="property-route"></a> `route?` | `string` | Extracted route path from meta.route (string form) | [types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L17) |
16
- | <a id="property-stateid"></a> `stateId` | `string` | XState state ID (e.g., "test.dashboard.overview") | [types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L11) |
17
- | <a id="property-type"></a> `type` | `"history"` \| `"atomic"` \| `"compound"` \| `"parallel"` \| `"final"` | State type from XState | [types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L13) |
12
+ | Property | Type | Description | Defined in |
13
+ | --------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
14
+ | <a id="property-meta"></a> `meta?` | `Record`\<`string`, `unknown`\> | The original meta object of the state | [types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L15) |
15
+ | <a id="property-route"></a> `route?` | `string` | The route path of meta.route, in its string form | [types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L17) |
16
+ | <a id="property-stateid"></a> `stateId` | `string` | The XState state ID, for example "test.dashboard.overview" | [types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L11) |
17
+ | <a id="property-type"></a> `type` | `"atomic"` \| `"compound"` \| `"parallel"` \| `"final"` \| `"history"` | The state type of XState | [types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L13) |
@@ -2,22 +2,24 @@
2
2
 
3
3
  # Interface: PlayActor
4
4
 
5
- Defined in: [types.ts:316](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L316)
5
+ Defined in: [types.ts:312](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L312)
6
6
 
7
- Full actor shape used by `PlayRouterProvider` components across all framework
8
- adapters (`play-solid-router`, `play-vue-router`, `play-react-router`, and the
9
- adapters built on the shared framework-router bridge bases).
7
+ The complete actor shape of the `PlayRouterProvider` component of each framework
8
+ adapter: `play-solid-router`, `play-vue-router`, `play-react-router`, and each
9
+ adapter on the shared framework router bridge bases.
10
10
 
11
- Extends `RoutableActor` with `currentView` the provider renders the current
12
- view spec in addition to synchronizing routes, so it needs both capabilities.
11
+ The shape extends `RoutableActor` with `currentView`, because the provider renders
12
+ the current view spec and also keeps the routes in step. It therefore needs both
13
+ capabilities.
13
14
 
14
- - Use `RoutableActor` when only routing is needed (e.g. `RouterBridgeBase` subclasses,
15
- `connectRouter`).
16
- - Use `PlayActor` when the component also renders the current view spec
17
- (e.g. `PlayRouterProvider` renderer callback parameter, `PlayRenderer`).
15
+ - Use `RoutableActor` when you need the routing alone, for example in a
16
+ `RouterBridgeBase` subclass, or in `connectRouter`.
17
+ - Use `PlayActor` when the component also renders the current view spec, for
18
+ example for the renderer callback parameter of `PlayRouterProvider`, and in
19
+ `PlayRenderer`.
18
20
 
19
- All `AbstractActor` subclasses that implement both `Routable` and `Viewable`
20
- satisfy this interface structurally.
21
+ Every `AbstractActor` subclass that implements both `Routable` and `Viewable`
22
+ satisfies this interface structurally.
21
23
 
22
24
  ## Example
23
25
 
@@ -25,7 +27,7 @@ satisfy this interface structurally.
25
27
  import type { PlayActor } from "@xmachines/play-router";
26
28
 
27
29
  function MyRouterProvider({ actor }: { actor: PlayActor }) {
28
- // access actor.currentRoute (routing) and actor.currentView (rendering)
30
+ // it reads actor.currentRoute for the routing, and actor.currentView for the render
29
31
  }
30
32
  ```
31
33
 
@@ -35,11 +37,11 @@ function MyRouterProvider({ actor }: { actor: PlayActor }) {
35
37
 
36
38
  ## Properties
37
39
 
38
- | Property | Modifier | Type | Description | Inherited from | Defined in |
39
- | ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
40
- | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | TC39 Signal exposing the actor's current URL path (or state ID). | [`RoutableActor`](RoutableActor.md).[`currentRoute`](RoutableActor.md#property-currentroute) | [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L280) |
41
- | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | TC39 Signal exposing the actor's current view spec, or `null` when inactive. | - | [types.ts:318](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L318) |
42
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | [`RoutableActor`](RoutableActor.md).[`initialRoute`](RoutableActor.md#property-initialroute) | [types.ts:286](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L286) |
40
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
41
+ | ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
42
+ | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | The TC39 Signal of the current URL path of the actor, or of its state ID. | [`RoutableActor`](RoutableActor.md).[`currentRoute`](RoutableActor.md#property-currentroute) | [types.ts:274](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L274) |
43
+ | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | The TC39 Signal of the current view spec of the actor, or `null` when no view is active. | - | [types.ts:314](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L314) |
44
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it. A router bridge compares it with the browser URL. It therefore separates a deep link, where the router wins, from a restore of a session, where the actor wins. | [`RoutableActor`](RoutableActor.md).[`initialRoute`](RoutableActor.md#property-initialroute) | [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L280) |
43
45
 
44
46
  ## Methods
45
47
 
@@ -49,9 +51,9 @@ function MyRouterProvider({ actor }: { actor: PlayActor }) {
49
51
  send(event): void;
50
52
  ```
51
53
 
52
- Defined in: [types.ts:288](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L288)
54
+ Defined in: [types.ts:282](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L282)
53
55
 
54
- Send a route navigation event to the actor.
56
+ Sends a route navigation event to the actor.
55
57
 
56
58
  #### Parameters
57
59
 
@@ -2,57 +2,62 @@
2
2
 
3
3
  # Interface: PlayRouteEvent
4
4
 
5
- Defined in: [types.ts:244](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L244)
5
+ Defined in: [types.ts:237](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L237)
6
6
 
7
- Enhanced routing event with parameter and query support
7
+ The routing event, with its parameters and its query
8
8
 
9
- Unified routing event used throughout the Play architecture. Supports parameter-aware
10
- navigation patterns (e.g., `/profile/:userId`) for dynamic route segments.
9
+ This is the one routing event of the complete Play architecture. It supports a
10
+ navigation that knows the parameters, for example `/profile/:userId`, for a dynamic
11
+ route segment.
11
12
 
12
- **Architectural Context:** Implements **Passive Infrastructure (INV-04)** by representing
13
- user navigation intent that the Actor evaluates through guards. Infrastructure proposes
14
- via `play.route` events, Actor decides via state machine transitions.
13
+ **Architectural context:** the event implements **Passive Infrastructure
14
+ (INV-04)**, because it holds the navigation intent of the user, and the Actor then
15
+ evaluates that intent with its guards. The infrastructure makes a request with a
16
+ `play.route` event, and the Actor decides with a transition of its state machine.
15
17
 
16
- **Browser Navigation Flow:**
18
+ **The flow of a browser navigation:**
17
19
 
18
- 1. Browser fires `popstate`
19
- 2. Router adapter resolves URL to route target
20
- 3. Adapter sends `PlayRouteEvent` to Actor
21
- 4. Actor validates transition via state machine guards
20
+ 1. The browser fires `popstate`
21
+ 2. The router adapter resolves the URL to a route target
22
+ 3. The adapter sends a `PlayRouteEvent` to the Actor
23
+ 4. The Actor checks the transition with the guards of its state machine
22
24
 
23
25
  ## Param
24
26
 
25
27
  **type**
26
28
 
27
- Event discriminator (always "play.route")
29
+ The discriminator of the event. It is always "play.route"
28
30
 
29
31
  ## Param
30
32
 
31
33
  **to**
32
34
 
33
- Target state ID with # prefix (e.g., '#home', '#profile')
35
+ The target state ID, with a # prefix, for example '#home' or '#profile'
34
36
 
35
37
  ## Param
36
38
 
37
39
  **params**
38
40
 
39
- Path-only route parameters extracted from the URL path (e.g., `{ userId: '123' }` from `/profile/123`). Query parameters are kept separate in `query`.
41
+ The route parameters of the path only, from the URL path, for
42
+ example `{ userId: '123' }` of `/profile/123`. The `query` field holds the query
43
+ parameters separately.
40
44
 
41
45
  ## Param
42
46
 
43
47
  **query**
44
48
 
45
- Query parameters only (isolated from path params)
49
+ The query parameters only. They stay separate from the params of the path
46
50
 
47
51
  ## Param
48
52
 
49
53
  **match**
50
54
 
51
- Full URLPattern match result for debugging/observability (optional)
55
+ The complete match result of URLPattern, for the debug work and for
56
+ the observability. It is optional
52
57
 
53
58
  ## Examples
54
59
 
55
- Combining base and routing events
60
+ The base event and the routing event together
56
61
 
57
62
  ```typescript
58
63
  import type { PlayEvent } from "@xmachines/play";
@@ -61,7 +66,7 @@ import type { PlayRouteEvent } from "@xmachines/play-router";
61
66
  type AppEvent = PlayEvent | PlayRouteEvent;
62
67
  ```
63
68
 
64
- Basic navigation to a route
69
+ A basic navigation to a route
65
70
 
66
71
  ```typescript
67
72
  import type { PlayRouteEvent } from "@xmachines/play-router";
@@ -73,7 +78,7 @@ const event: PlayRouteEvent = {
73
78
  actor.send(event);
74
79
  ```
75
80
 
76
- Navigation with route parameters
81
+ A navigation with route parameters
77
82
 
78
83
  ```typescript
79
84
  import type { PlayRouteEvent } from "@xmachines/play-router";
@@ -84,10 +89,10 @@ const event: PlayRouteEvent = {
84
89
  params: { userId: "123" },
85
90
  };
86
91
  actor.send(event);
87
- // Resolves to route: /profile/123
92
+ // It resolves to the route /profile/123
88
93
  ```
89
94
 
90
- Navigation with query parameters
95
+ A navigation with query parameters
91
96
 
92
97
  ```typescript
93
98
  import type { PlayRouteEvent } from "@xmachines/play-router";
@@ -95,11 +100,11 @@ import type { PlayRouteEvent } from "@xmachines/play-router";
95
100
  const event: PlayRouteEvent = {
96
101
  type: "play.route",
97
102
  to: "#settings",
98
- params: { section: "profile" }, // Path-only route parameter
99
- query: { tab: "security" }, // Query-only
103
+ params: { section: "profile" }, // a route parameter of the path only
104
+ query: { tab: "security" }, // the query only
100
105
  };
101
106
  actor.send(event);
102
- // Resolves to route: /settings/profile?tab=security
107
+ // It resolves to the route /settings/profile?tab=security
103
108
  ```
104
109
 
105
110
  ## See
@@ -108,9 +113,10 @@ actor.send(event);
108
113
 
109
114
  ## Remarks
110
115
 
111
- Use `play.route` when you need parameter-aware navigation with the `route: {}`
112
- config pattern on your state machine nodes. The `match` field exposes the full
113
- URLPatternResult for advanced use cases (debugging, pattern analysis).
116
+ Use `play.route` when you need a navigation that knows the parameters, with the
117
+ `route: {}` config pattern on the nodes of your state machine. The `match` field
118
+ gives you the complete URLPatternResult, for an advanced use such as a debug or an
119
+ analysis of the pattern.
114
120
 
115
121
  ## Indexable
116
122
 
@@ -120,10 +126,10 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
120
126
 
121
127
  ## Properties
122
128
 
123
- | Property | Modifier | Type | Defined in |
124
- | -------------------------------------- | ---------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
125
- | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [types.ts:249](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L249) |
126
- | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:247](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L247) |
127
- | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:248](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L248) |
128
- | <a id="property-to"></a> `to` | `readonly` | `string` | [types.ts:246](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L246) |
129
- | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [types.ts:245](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L245) |
129
+ | Property | Modifier | Type | Defined in |
130
+ | -------------------------------------- | ---------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- |
131
+ | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [types.ts:242](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L242) |
132
+ | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:240](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L240) |
133
+ | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [types.ts:241](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L241) |
134
+ | <a id="property-to"></a> `to` | `readonly` | `string` | [types.ts:239](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L239) |
135
+ | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [types.ts:238](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L238) |
@@ -2,16 +2,16 @@
2
2
 
3
3
  # Interface: ResolvedRoutePath
4
4
 
5
- Defined in: [validate-routes.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/validate-routes.ts#L9)
5
+ Defined in: [validate-routes.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L9)
6
6
 
7
- A route entry with its RESOLVED full path the path after relative routes have
8
- been prefixed with their parent's full path during tree construction.
7
+ A route entry with its RESOLVED complete path, which is the path after the tree
8
+ construction put the path of the parent before each relative route.
9
9
 
10
10
  `RouteNode` satisfies this shape structurally.
11
11
 
12
12
  ## Properties
13
13
 
14
- | Property | Type | Description | Defined in |
15
- | ----------------------------------------- | -------- | -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
16
- | <a id="property-fullpath"></a> `fullPath` | `string` | Resolved absolute route path (e.g. `"/dashboard/settings"`). | [validate-routes.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/validate-routes.ts#L13) |
17
- | <a id="property-stateid"></a> `stateId` | `string` | State identifier owning the route (e.g. `"app.dashboard.settings"`). | [validate-routes.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/validate-routes.ts#L11) |
14
+ | Property | Type | Description | Defined in |
15
+ | ----------------------------------------- | -------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
16
+ | <a id="property-fullpath"></a> `fullPath` | `string` | The resolved absolute route path, for example `"/dashboard/settings"`. | [validate-routes.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L13) |
17
+ | <a id="property-stateid"></a> `stateId` | `string` | The identifier of the state that owns the route, for example `"app.dashboard.settings"`. | [validate-routes.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/validate-routes.ts#L11) |
@@ -2,21 +2,22 @@
2
2
 
3
3
  # Interface: RoutableActor
4
4
 
5
- Defined in: [types.ts:278](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L278)
5
+ Defined in: [types.ts:272](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L272)
6
6
 
7
- Minimal actor interface required by `RouterBridgeBase` and all framework router
8
- adapters.
7
+ The minimal actor interface that `RouterBridgeBase` and every framework router
8
+ adapter require.
9
9
 
10
- Using this interface instead of `AbstractActor<AnyActorLogic> & Routable` lets
11
- `RouterBridgeBase.actor.send` be typed to accept `PlayRouteEvent` directly
12
- eliminating the unsafe `(actor.send as (e: PlayRouteEvent) => void)` cast that
13
- existed when the actor was typed with the weaker `EventObject` constraint.
10
+ This interface, and not `AbstractActor<AnyActorLogic> & Routable`, gives
11
+ `RouterBridgeBase.actor.send` the type that accepts a `PlayRouteEvent` directly.
12
+ It therefore removes the unsafe cast `(actor.send as (e: PlayRouteEvent) => void)`,
13
+ which the weaker `EventObject` constraint of the actor type needed before.
14
14
 
15
- All `AbstractActor` subclasses satisfy this interface structurally because:
15
+ Every `AbstractActor` subclass satisfies this interface structurally, for two
16
+ reasons:
16
17
 
17
- - `AbstractActor` implements `send(event: TEvent): void` where `TEvent` accepts
18
- any `EventObject`, so `PlayRouteEvent` (a subtype) is always accepted.
19
- - `Routable` provides `currentRoute` and `initialRoute`.
18
+ - `AbstractActor` implements `send(event: TEvent): void`, and `TEvent` accepts each
19
+ `EventObject`. Therefore it always accepts a `PlayRouteEvent`, which is a subtype.
20
+ - `Routable` gives `currentRoute` and `initialRoute`.
20
21
 
21
22
  ## Example
22
23
 
@@ -36,10 +37,10 @@ class MyBridge extends RouterBridgeBase {
36
37
 
37
38
  ## Properties
38
39
 
39
- | Property | Modifier | Type | Description | Defined in |
40
- | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
41
- | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | TC39 Signal exposing the actor's current URL path (or state ID). | [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L280) |
42
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | [types.ts:286](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L286) |
40
+ | Property | Modifier | Type | Description | Defined in |
41
+ | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
42
+ | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | The TC39 Signal of the current URL path of the actor, or of its state ID. | [types.ts:274](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L274) |
43
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it. A router bridge compares it with the browser URL. It therefore separates a deep link, where the router wins, from a restore of a session, where the actor wins. | [types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L280) |
43
44
 
44
45
  ## Methods
45
46
 
@@ -49,9 +50,9 @@ class MyBridge extends RouterBridgeBase {
49
50
  send(event): void;
50
51
  ```
51
52
 
52
- Defined in: [types.ts:288](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L288)
53
+ Defined in: [types.ts:282](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L282)
53
54
 
54
- Send a route navigation event to the actor.
55
+ Sends a route navigation event to the actor.
55
56
 
56
57
  #### Parameters
57
58
 
@@ -2,18 +2,18 @@
2
2
 
3
3
  # Interface: RouteInfo
4
4
 
5
- Defined in: [types.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L75)
5
+ Defined in: [types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L60)
6
6
 
7
- Extracted route information from a state node
7
+ The route information of a state node
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | --------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | Whether route path is absolute (starts with /) | [types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L85) |
14
- | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original route metadata | [types.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L92) |
15
- | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if routePath contains params | [types.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L83) |
16
- | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) true = has meta.route, can receive play.route events | [types.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L90) |
17
- | <a id="property-routepath"></a> `routePath` | `string` | Route path extracted from meta.route | [types.ts:81](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L81) |
18
- | <a id="property-stateid"></a> `stateId` | `string` | State identifier (node.id or path.join('.')) | [types.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L77) |
19
- | <a id="property-statepath"></a> `statePath` | `string`[] | State path segments from root | [types.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L79) |
11
+ | Property | Type | Description | Defined in |
12
+ | --------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-isabsolute"></a> `isAbsolute` | `boolean` | It tells you if the route path is absolute, which means that it starts with / | [types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L70) |
14
+ | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | The original route metadata | [types.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L77) |
15
+ | <a id="property-pattern"></a> `pattern?` | `string` | The route pattern with its parameters, for example /profile/:userId, when routePath holds a parameter | [types.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L68) |
16
+ | <a id="property-routable"></a> `routable` | `boolean` | It tells you if this state has a route, which means that it has a meta.route field. true = it has a meta.route field, and it can receive a play.route event | [types.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L75) |
17
+ | <a id="property-routepath"></a> `routePath` | `string` | The route path of meta.route | [types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L66) |
18
+ | <a id="property-stateid"></a> `stateId` | `string` | The identifier of the state: node.id, or path.join('.') | [types.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L62) |
19
+ | <a id="property-statepath"></a> `statePath` | `string`[] | The segments of the state path, from the root | [types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L64) |
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: RouteMapOptions
4
4
 
5
- Defined in: [create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/create-route-map.ts#L9)
5
+ Defined in: [create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map.ts#L9)
6
6
 
7
- Options for `createRouteMap` and `createRouteMapFromTree`.
7
+ The options of `createRouteMap` and of `createRouteMapFromTree`.
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-cachesize"></a> `cacheSize?` | `number` | Maximum number of resolved parameterized path lookups to cache. `RouteMap.getStateIdByPath()` resolves parameterized patterns (e.g. `/profile/:userId`) via URLPattern on every call. Frequently visited paths are cached in an LRU so subsequent lookups are O(1). Increase this value for applications with large parameterized route sets or high navigation frequency. Default: `500`. | [create-route-map.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/create-route-map.ts#L20) |
11
+ | Property | Type | Description | Defined in |
12
+ | -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-cachesize"></a> `cacheSize?` | `number` | The maximum number of the resolved parameterized path lookups in the cache. `RouteMap.getStateIdByPath()` resolves a parameterized pattern, for example `/profile/:userId`, with URLPattern on each call. The map keeps each path of a frequent visit in an LRU cache, and a later lookup of that path is therefore O(1). Raise this value for an application with a large set of parameterized routes, or with a high frequency of the navigation. The default is `500`. | [create-route-map.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/create-route-map.ts#L21) |
@@ -2,14 +2,15 @@
2
2
 
3
3
  # Interface: RouteMapping
4
4
 
5
- Defined in: [base-route-map.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/base-route-map.ts#L51)
5
+ Defined in: [base-route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L54)
6
6
 
7
- A single state ID path mapping entry.
7
+ One entry of the map between a state ID and a path.
8
8
 
9
- Both fields are `readonly` mappings are immutable once passed to `RouteMap`.
10
- Adapter packages re-export a structurally compatible `RouteMapping` type under
11
- their own name. This type is published from `@xmachines/play-router` as
12
- `RouteMapping` to avoid name collisions with those adapter-local types.
9
+ Both fields are `readonly`, because a mapping is immutable after the caller gives
10
+ it to `RouteMap`. An adapter package re-exports a structurally compatible
11
+ `RouteMapping` type under its own name. `@xmachines/play-router` publishes this
12
+ type as `RouteMapping`, and its name therefore does not collide with such a local
13
+ type of an adapter.
13
14
 
14
15
  ## Example
15
16
 
@@ -21,7 +22,7 @@ const optionalMapping: RouteMapping = { stateId: "settings", path: "/settings/:s
21
22
 
22
23
  ## Properties
23
24
 
24
- | Property | Modifier | Type | Description | Defined in |
25
- | --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
26
- | <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [base-route-map.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/base-route-map.ts#L55) |
27
- | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/base-route-map.ts#L53) |
25
+ | Property | Modifier | Type | Description | Defined in |
26
+ | --------------------------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
27
+ | <a id="property-path"></a> `path` | `readonly` | `string` | The pattern of the URL path, for example `"/"`, `"/profile/:userId"`, or `"/settings/:section?"` | [base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L58) |
28
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | The state ID of the state machine, for example `"home"` or `"#profile"` | [base-route-map.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/base-route-map.ts#L56) |
@@ -2,11 +2,11 @@
2
2
 
3
3
  # Interface: RouteMatch
4
4
 
5
- Defined in: [router-sync.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L12)
5
+ Defined in: [router-sync.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L12)
6
6
 
7
7
  ## Properties
8
8
 
9
- | Property | Type | Defined in |
10
- | -------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
11
- | <a id="property-params"></a> `params?` | `Record`\<`string`, `string`\> | [router-sync.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L14) |
12
- | <a id="property-to"></a> `to` | `string` \| `null` \| `undefined` | [router-sync.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-sync.ts#L13) |
9
+ | Property | Type | Defined in |
10
+ | -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
11
+ | <a id="property-params"></a> `params?` | `Record`\<`string`, `string`\> | [router-sync.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L14) |
12
+ | <a id="property-to"></a> `to` | `string` \| `null` \| `undefined` | [router-sync.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-sync.ts#L13) |
@@ -2,20 +2,20 @@
2
2
 
3
3
  # Interface: RouteNode
4
4
 
5
- Defined in: [types.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L98)
5
+ Defined in: [types.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L83)
6
6
 
7
- Node in the route tree representing a single route
7
+ A node of the route tree. It represents one route
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | ----------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
13
- | <a id="property-children"></a> `children` | `RouteNode`[] | Child routes | [types.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L122) |
14
- | <a id="property-fullpath"></a> `fullPath` | `string` | The fully resolved absolute path from the root (e.g. `"/dashboard/overview"`). Always use `fullPath` for browser URL matching and route map construction. `createRouteMapFromTree` and `createRouteMap` both use this field. | [types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L111) |
15
- | <a id="property-id"></a> `id` | `string` | Unique identifier (state ID) | [types.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L100) |
16
- | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | Original meta.route metadata | [types.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L126) |
17
- | <a id="property-parent"></a> `parent` | `RouteNode` \| `null` | Parent route (null for root) | [types.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L124) |
18
- | <a id="property-path"></a> `path` | `string` | The raw route path segment as declared in `meta.route` may be relative (e.g. `"overview"`) or absolute (e.g. `"/dashboard"`). Do not use this for URL matching; use `fullPath` instead. | [types.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L105) |
19
- | <a id="property-pattern"></a> `pattern?` | `string` | Route pattern with parameters (e.g., /profile/:userId) if path contains params | [types.ts:113](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L113) |
20
- | <a id="property-routable"></a> `routable` | `boolean` | Whether this state is routable (has meta.route) States with meta.route can receive play.route events | [types.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L120) |
21
- | <a id="property-stateid"></a> `stateId` | `string` | XState state ID this route maps to | [types.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L115) |
11
+ | Property | Type | Description | Defined in |
12
+ | ----------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-children"></a> `children` | `RouteNode`[] | The child routes | [types.ts:108](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L108) |
14
+ | <a id="property-fullpath"></a> `fullPath` | `string` | The complete absolute path from the root, for example `"/dashboard/overview"`. Always use `fullPath` for a match of a browser URL and for the construction of a route map. `createRouteMapFromTree` and `createRouteMap` both use this field. | [types.ts:97](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L97) |
15
+ | <a id="property-id"></a> `id` | `string` | The unique identifier, which is the state ID | [types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L85) |
16
+ | <a id="property-metadata"></a> `metadata` | [`RouteMetadata`](../type-aliases/RouteMetadata.md) | The original meta.route metadata | [types.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L112) |
17
+ | <a id="property-parent"></a> `parent` | `RouteNode` \| `null` | The parent route. It is null for the root | [types.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L110) |
18
+ | <a id="property-path"></a> `path` | `string` | The raw segment of the route path, as `meta.route` declares it. It is relative, for example `"overview"`, or absolute, for example `"/dashboard"`. Never use it for a match of a URL: use `fullPath` for that. | [types.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L91) |
19
+ | <a id="property-pattern"></a> `pattern?` | `string` | The route pattern with its parameters, for example /profile/:userId, when path holds a parameter | [types.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L99) |
20
+ | <a id="property-routable"></a> `routable` | `boolean` | It tells you if this state has a route, which means that it has a meta.route field. A state with a meta.route field can receive a play.route event | [types.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L106) |
21
+ | <a id="property-stateid"></a> `stateId` | `string` | The XState state ID of this route | [types.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L101) |