@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,9 +2,9 @@
2
2
 
3
3
  # Interface: RouteObject
4
4
 
5
- Defined in: [types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L60)
5
+ Defined in: [types.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L45)
6
6
 
7
- Route object with additional metadata.
7
+ A route object, with more metadata.
8
8
 
9
9
  ## Indexable
10
10
 
@@ -12,10 +12,10 @@ Route object with additional metadata.
12
12
  [key: string]: unknown
13
13
  ```
14
14
 
15
- Additional route metadata (title, breadcrumb, etc.)
15
+ The additional metadata of the route: a title, a breadcrumb, and so on
16
16
 
17
17
  ## Properties
18
18
 
19
- | Property | Type | Description | Defined in |
20
- | --------------------------------- | -------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
21
- | <a id="property-path"></a> `path` | `string` | Route path template (e.g., '/user/:id') | [types.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L62) |
19
+ | Property | Type | Description | Defined in |
20
+ | --------------------------------- | -------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
21
+ | <a id="property-path"></a> `path` | `string` | The template of the route path, for example '/user/:id' | [types.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L47) |
@@ -2,20 +2,20 @@
2
2
 
3
3
  # Interface: RouteTree
4
4
 
5
- Defined in: [types.ts:136](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L136)
5
+ Defined in: [types.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L122)
6
6
 
7
- Complete route tree with lookup maps
7
+ The complete route tree, with its lookup maps
8
8
 
9
- Provides bidirectional mapping between state IDs and URL paths:
9
+ It gives you the map between a state ID and a URL path, in both directions:
10
10
 
11
- - byStateId: Maps state IDs to route nodes (for play.route event targeting)
12
- - byPath: Maps URL paths to route nodes (for browser navigation)
11
+ - byStateId: it maps each state ID to its route node, for the target of a play.route event
12
+ - byPath: it maps each URL path to its route node, for the browser navigation
13
13
 
14
14
  ## Properties
15
15
 
16
- | Property | Type | Description | Defined in |
17
- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
18
- | <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map full path -> route node Used to look up state ID from URL path for play.route event targeting | [types.ts:148](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L148) |
19
- | <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | Map state ID -> route node Used to look up URL path from state ID for browser URL sync | [types.ts:143](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L143) |
20
- | <a id="property-graph"></a> `graph?` | `Graph`\<[`MachineNodeData`](MachineNodeData.md), [`MachineEdgeData`](MachineEdgeData.md), `any`, `any`\> | Graph representation of the state machine for advanced queries. Populated by extractMachineRoutes() use for hierarchy queries, reachability checks, and transition-aware navigation via @statelyai/graph algorithms. **Example** `import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home");` | [types.ts:160](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L160) |
21
- | <a id="property-root"></a> `root` | [`RouteNode`](RouteNode.md) | Root route node | [types.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L138) |
16
+ | Property | Type | Description | Defined in |
17
+ | ------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
18
+ | <a id="property-bypath"></a> `byPath` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | The map from a complete path to its route node. It gives you the state ID of a URL path, for the target of a play.route event | [types.ts:134](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L134) |
19
+ | <a id="property-bystateid"></a> `byStateId` | `Map`\<`string`, [`RouteNode`](RouteNode.md)\> | The map from a state ID to its route node. It gives you the URL path of a state ID, for the update of the browser URL | [types.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L129) |
20
+ | <a id="property-graph"></a> `graph?` | `Graph`\<[`MachineNodeData`](MachineNodeData.md), [`MachineEdgeData`](MachineEdgeData.md), `any`, `any`\> | The graph of the state machine, for an advanced query. extractMachineRoutes() fills it. Use it for a query of the hierarchy, for a test of the reachability, and for a navigation that knows the transitions, through the algorithms of @statelyai/graph. **Example** `import { getSuccessors, hasPath } from "@statelyai/graph"; const successors = getSuccessors(tree.graph!, "myMachine.home");` | [types.ts:147](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L147) |
21
+ | <a id="property-root"></a> `root` | [`RouteNode`](RouteNode.md) | The root node of the routes | [types.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L124) |
@@ -2,19 +2,19 @@
2
2
 
3
3
  # Interface: RouteWatcherHandle
4
4
 
5
- Defined in: [router-bridge-base.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-bridge-base.ts#L71)
5
+ Defined in: [router-bridge-base.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L72)
6
6
 
7
- Narrow interface for the TC39 Signal watcher used by `RouterBridgeBase` to
8
- monitor `actor.currentRoute` changes.
7
+ The narrow interface of the TC39 Signal watcher. `RouterBridgeBase` uses it to
8
+ observe each change of `actor.currentRoute`.
9
9
 
10
- This interface hides the full `Signal.subtle.Watcher` surface and exposes only
11
- the two operations that `RouterBridgeBase` actually needs:
10
+ The interface hides the complete `Signal.subtle.Watcher` surface. It exposes the
11
+ two operations that `RouterBridgeBase` needs:
12
12
 
13
- - `watch(signal)` — arm the watcher on a specific signal
14
- - `unwatch()` — stop watching and release resources
13
+ - `watch(signal)` — it arms the watcher on one signal
14
+ - `unwatch()` — it stops the watch and frees the resources
15
15
 
16
- Framework adapter subclasses never interact with this handle directly; it is
17
- created and managed internally by `RouterBridgeBase`.
16
+ A framework adapter subclass touches this handle never. `RouterBridgeBase` makes
17
+ it and manages it internally.
18
18
 
19
19
  ## Methods
20
20
 
@@ -24,9 +24,9 @@ created and managed internally by `RouterBridgeBase`.
24
24
  unwatch(): void;
25
25
  ```
26
26
 
27
- Defined in: [router-bridge-base.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-bridge-base.ts#L75)
27
+ Defined in: [router-bridge-base.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L76)
28
28
 
29
- Stop observing and release the watcher.
29
+ Stops the observation and frees the watcher.
30
30
 
31
31
  #### Returns
32
32
 
@@ -40,9 +40,9 @@ Stop observing and release the watcher.
40
40
  watch(signal): void;
41
41
  ```
42
42
 
43
- Defined in: [router-bridge-base.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/router-bridge-base.ts#L73)
43
+ Defined in: [router-bridge-base.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/router-bridge-base.ts#L74)
44
44
 
45
- Arm the watcher to observe the given signal.
45
+ Arms the watcher on the given signal.
46
46
 
47
47
  #### Parameters
48
48
 
@@ -2,21 +2,23 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: [types.ts:360](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L360)
5
+ Defined in: [types.ts:358](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L358)
6
6
 
7
- RouterBridge interface for runtime infrastructure adapters
7
+ The RouterBridge interface of a runtime infrastructure adapter
8
8
 
9
- Defines the lifecycle connection between Infrastructure (e.g., a framework router) and
10
- the Actor. Infrastructure "bridges" to the Actor by observing its signals and
11
- managing its own lifecycle accordingly.
9
+ The interface defines the connection of the lifecycle between the infrastructure,
10
+ for example a framework router, and the Actor. The infrastructure builds a "bridge"
11
+ to the Actor: it observes the signals of the Actor, and it manages its own
12
+ lifecycle accordingly.
12
13
 
13
- **Architectural Context:** Implements **Passive Infrastructure (INV-04)** by establishing
14
- a unidirectional observation pattern. Infrastructure connects to observe Actor signals
15
- (currentRoute, currentView, state) and reflects changes without making state decisions.
14
+ **Architectural context:** the interface implements **Passive Infrastructure
15
+ (INV-04)**, because it gives an observation in one direction. The infrastructure
16
+ connects to observe the signals of the Actor (currentRoute, currentView, and
17
+ state), and it reflects each change. It makes no decision about the state.
16
18
 
17
19
  ## Example
18
20
 
19
- Framework router bridge implementation
21
+ The implementation of a framework router bridge
20
22
 
21
23
  ```typescript
22
24
  import type { RouterBridge } from "@xmachines/play-router";
@@ -26,7 +28,7 @@ class MyRouterBridge implements RouterBridge {
26
28
  private watcher: Signal.Watcher | null = null;
27
29
 
28
30
  async connect(): Promise<void> {
29
- // Start observing actor.currentRoute signal
31
+ // Start the observation of the actor.currentRoute signal
30
32
  this.watcher = new Signal.subtle.Watcher(() => {
31
33
  const route = actor.currentRoute.get();
32
34
  if (route) router.navigate(route);
@@ -35,7 +37,7 @@ class MyRouterBridge implements RouterBridge {
35
37
  }
36
38
 
37
39
  async disconnect(): Promise<void> {
38
- // Stop observing, cleanup watchers
40
+ // Stop the observation, and clean the watchers up
39
41
  this.watcher?.unwatch(actor.currentRoute);
40
42
  this.watcher = null;
41
43
  }
@@ -44,7 +46,7 @@ class MyRouterBridge implements RouterBridge {
44
46
 
45
47
  ## See
46
48
 
47
- [Play RFC](../../../../rfc/play.md) - Invariant INV-04
49
+ [Play RFC](../../../../rfc/play.md) - invariant INV-04
48
50
 
49
51
  ## Methods
50
52
 
@@ -54,25 +56,26 @@ class MyRouterBridge implements RouterBridge {
54
56
  connect(): void | Promise<void>;
55
57
  ```
56
58
 
57
- Defined in: [types.ts:376](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L376)
59
+ Defined in: [types.ts:375](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L375)
58
60
 
59
- Connect the router bridge to the Actor
61
+ Connects the router bridge to the Actor
60
62
 
61
- Called when Infrastructure should begin observing Actor signals and
62
- synchronizing its state (e.g., browser URL) with Actor state.
63
+ The infrastructure calls it when it must start the observation of the Actor
64
+ signals, and when it must bring its own state, for example the browser URL, in line
65
+ with the Actor state.
63
66
 
64
67
  #### Returns
65
68
 
66
69
  `void` \| `Promise`\<`void`\>
67
70
 
68
- Promise that resolves when connection is established, or void for synchronous connection
71
+ The promise that resolves after the connection, or void for a synchronous connection
69
72
 
70
73
  #### Example
71
74
 
72
75
  ```typescript
73
76
  const bridge: RouterBridge = createBridge(actor, router);
74
77
  await bridge.connect();
75
- // Bridge now observing actor.currentRoute signal
78
+ // The bridge observes the actor.currentRoute signal now
76
79
  ```
77
80
 
78
81
  ---
@@ -83,22 +86,22 @@ await bridge.connect();
83
86
  disconnect(): void | Promise<void>;
84
87
  ```
85
88
 
86
- Defined in: [types.ts:392](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L392)
89
+ Defined in: [types.ts:391](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L391)
87
90
 
88
- Disconnect the router bridge from the Actor
91
+ Disconnects the router bridge from the Actor
89
92
 
90
- Called when Infrastructure should stop observing and clean up resources
91
- (e.g., signal watchers, event listeners).
93
+ The infrastructure calls it when it must stop the observation and free its
94
+ resources, for example a signal watcher and an event listener.
92
95
 
93
96
  #### Returns
94
97
 
95
98
  `void` \| `Promise`\<`void`\>
96
99
 
97
- Promise that resolves when disconnection is complete, or void for synchronous disconnection
100
+ The promise that resolves after the disconnection, or void for a synchronous disconnection
98
101
 
99
102
  #### Example
100
103
 
101
104
  ```typescript
102
105
  await bridge.disconnect();
103
- // Bridge stopped observing, resources cleaned up
106
+ // The bridge stopped its observation, and it freed its resources
104
107
  ```
@@ -2,22 +2,22 @@
2
2
 
3
3
  # Interface: WindowLike
4
4
 
5
- Defined in: [types.ts:413](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L413)
5
+ Defined in: [types.ts:412](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L412)
6
6
 
7
- Minimal window interface required by adapters that subscribe to DOM events
8
- (e.g. `hashchange`). Injectable for SSR and testing pass a mock instead of
9
- the global `window` when the DOM is unavailable.
7
+ The minimal window interface of an adapter that subscribes to a DOM event, for
8
+ example to `hashchange`. You can inject it for SSR and for a test: give a mock in
9
+ place of the global `window` when no DOM is available.
10
10
 
11
- Defined structurally (no `Window` reference) so this package compiles without
12
- the DOM lib.
11
+ The definition is structural, and it holds no reference to `Window`. This package
12
+ therefore compiles without the DOM lib.
13
13
 
14
14
  ## Example
15
15
 
16
16
  ```typescript
17
- // Normal usage — global window (default)
17
+ // The normal use the global window, which is the default
18
18
  connectRouter({ actor, routeMap });
19
19
 
20
- // SSR / test — injected mock
20
+ // SSR or a test — an injected mock
21
21
  const mockWin: WindowLike = { addEventListener: vi.fn(), removeEventListener: vi.fn() };
22
22
  connectRouter({ actor, routeMap, window: mockWin });
23
23
  ```
@@ -30,7 +30,7 @@ connectRouter({ actor, routeMap, window: mockWin });
30
30
  addEventListener(type, listener): void;
31
31
  ```
32
32
 
33
- Defined in: [types.ts:414](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L414)
33
+ Defined in: [types.ts:413](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L413)
34
34
 
35
35
  #### Parameters
36
36
 
@@ -51,7 +51,7 @@ Defined in: [types.ts:414](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.
51
51
  removeEventListener(type, listener): void;
52
52
  ```
53
53
 
54
- Defined in: [types.ts:415](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L415)
54
+ Defined in: [types.ts:414](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L414)
55
55
 
56
56
  #### Parameters
57
57
 
@@ -0,0 +1,13 @@
1
+ [API](../../../README.md) / [@xmachines/play-router](../README.md) / BaseRouteMapping
2
+
3
+ # ~~Type Alias: BaseRouteMapping~~
4
+
5
+ ```ts
6
+ type BaseRouteMapping = RouteMapping;
7
+ ```
8
+
9
+ Defined in: [index.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/index.ts#L61)
10
+
11
+ ## Deprecated
12
+
13
+ Use [RouteMapping](../interfaces/RouteMapping.md). Will be removed in the next major.
@@ -6,10 +6,11 @@
6
6
  type MachineGraph = Graph<MachineNodeData, MachineEdgeData>;
7
7
  ```
8
8
 
9
- Defined in: [machine-to-graph.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/machine-to-graph.ts#L18)
9
+ Defined in: [machine-to-graph.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/machine-to-graph.ts#L19)
10
10
 
11
- Typed @statelyai/graph Graph representing a state machine.
12
- Provides hierarchy queries, traversal algorithms, and reachability checks.
11
+ The typed Graph of @statelyai/graph that represents a state machine.
12
+ It gives you the queries of the hierarchy, the algorithms of a walk, and the tests
13
+ of the reachability.
13
14
 
14
15
  ## Example
15
16
 
@@ -6,6 +6,6 @@
6
6
  type RouteMetadata = string | RouteObject;
7
7
  ```
8
8
 
9
- Defined in: [types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-router/src/types.ts#L70)
9
+ Defined in: [types.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-router/src/types.ts#L55)
10
10
 
11
- Route metadata from state machine `meta.route` field.
11
+ The route metadata of the `meta.route` field of a state machine.
@@ -1,12 +1,10 @@
1
1
  [API](../../README.md) / @xmachines/play-signals
2
2
 
3
- <!-- generated-by: gsd-doc-writer -->
4
-
5
3
  # @xmachines/play-signals
6
4
 
7
- TC39 Signals polyfill for XMachines fine-grained reactive state primitives that enable glitch-free, subscription-free state propagation in the Play Architecture.
5
+ TC39 Signals polyfill for XMachines. It gives the Play Architecture fine-grained reactive state primitives. The primitives propagate state without a glitch and without a subscription.
8
6
 
9
- Part of the [xmachines-js monorepo](../../README.md).
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.1.0-blue)](https://www.npmjs.com/package/@xmachines/play-signals)
10
8
 
11
9
  ## Installation
12
10
 
@@ -16,9 +14,9 @@ pnpm add @xmachines/play-signals
16
14
 
17
15
  ## Overview
18
16
 
19
- This package wraps the [`signal-polyfill`](https://github.com/nicolo-ribaudo/tc39-proposal-signals-polyfill) reference implementation of the [TC39 Signals proposal](https://github.com/tc39/proposal-signals) (Stage 1). It re-exports the full `Signal` namespace and adds a memory-safe `watchSignal` utility, isolating the rest of the codebase from potential Stage 1 API churn.
17
+ This package wraps the [`signal-polyfill`](https://github.com/nicolo-ribaudo/tc39-proposal-signals-polyfill) reference implementation of the [TC39 Signals proposal](https://github.com/tc39/proposal-signals) (Stage 1). It re-exports the complete `Signal` namespace, and it adds the memory-safe `watchSignal` utility. The wrapper keeps the rest of the code away from a Stage 1 API that can still change.
20
18
 
21
- **All signal imports in the XMachines ecosystem should come from this package**, not directly from `signal-polyfill`, so that polyfill version bumps or API adaptations can be made in one place.
19
+ **Import every signal in the XMachines ecosystem from this package**, not from `signal-polyfill`. One import point keeps each polyfill update and each API change in one place.
22
20
 
23
21
  ## Usage
24
22
 
@@ -48,11 +46,11 @@ console.log(doubled.get()); // 10 (recomputed because dependency changed)
48
46
  console.log(doubled.get()); // 10 (memoized — no recomputation)
49
47
  ```
50
48
 
51
- Computations automatically track every signal accessed inside them. Dynamic branching is fully supported only signals read in the _current_ execution path are tracked as dependencies.
49
+ A computation tracks each signal that it reads. A dynamic branch is safe: the computation keeps only the signals of the _current_ execution path as its dependencies.
52
50
 
53
51
  ### `watchSignal` — memory-safe one-shot effect
54
52
 
55
- Use `watchSignal` to subscribe to a `Signal.State` or `Signal.Computed` and receive its value after each change. Updates are coalesced into a single microtask per synchronous batch.
53
+ Use `watchSignal` to subscribe to a `Signal.State` or to a `Signal.Computed`. The callback receives the value after each change. `watchSignal` groups the updates of one synchronous batch into a single microtask.
56
54
 
57
55
  ```typescript
58
56
  import { Signal, watchSignal } from "@xmachines/play-signals";
@@ -71,11 +69,11 @@ count.set(3); // → logs "count changed: 3" once
71
69
  cleanup();
72
70
  ```
73
71
 
74
- The returned cleanup function is idempotent calling it multiple times is safe and will not throw.
72
+ The cleanup function is idempotent. A second call is safe, and it does not throw.
75
73
 
76
74
  ### `Signal.subtle.Watcher` — low-level multi-signal observation
77
75
 
78
- For advanced use cases such as framework integrations, the full `Signal.subtle.Watcher` API is available:
76
+ Advanced code, such as a framework integration, can use the complete `Signal.subtle.Watcher` API:
79
77
 
80
78
  ```typescript
81
79
  import { Signal } from "@xmachines/play-signals";
@@ -99,7 +97,7 @@ count.set(5); // schedules microtask notification
99
97
 
100
98
  ### Custom equality
101
99
 
102
- Both `Signal.State` and `Signal.Computed` accept an `equals` option to control when dependents are notified:
100
+ Both `Signal.State` and `Signal.Computed` accept an `equals` option. The option controls when a signal notifies its dependents:
103
101
 
104
102
  ```typescript
105
103
  import { Signal } from "@xmachines/play-signals";
@@ -110,7 +108,7 @@ const options: SignalOptions<{ name: string; age: number }> = {
110
108
  };
111
109
 
112
110
  const person = new Signal.State({ name: "Alice", age: 30 }, options);
113
- // Setting structurally identical value will not notify dependents
111
+ // A structurally identical value does not notify the dependents
114
112
  person.set({ name: "Alice", age: 30 });
115
113
  ```
116
114
 
@@ -119,13 +117,13 @@ person.set({ name: "Alice", age: 30 });
119
117
  | Export | Kind | Description |
120
118
  | ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------ |
121
119
  | `Signal` | namespace | Full TC39 Signals namespace (`State`, `Computed`, `subtle.Watcher`) re-exported from `signal-polyfill` |
122
- | `watchSignal(signal, onValue)` | function | Memory-safe subscription helper; returns a cleanup function |
120
+ | `watchSignal(signal, onValue)` | function | The memory-safe subscription helper. It returns a cleanup function |
123
121
  | `SignalState<T>` | interface | Shape of `Signal.State<T>` (`.get()`, `.set()`) |
124
122
  | `SignalComputed<T>` | interface | Shape of `Signal.Computed<T>` (`.get()`) |
125
123
  | `SignalWatcher` | interface | Shape of `Signal.subtle.Watcher` (`.watch()`, `.unwatch()`, `.getPending()`) |
126
- | `SignalOptions<T>` | interface | Options bag for `Signal.State` constructor (`equals?`) |
127
- | `ComputedOptions<T>` | interface | Options bag for `Signal.Computed` constructor (`equals?`) |
128
- | `WatcherNotify` | type | Callback signature for `Signal.subtle.Watcher` notify function |
124
+ | `SignalOptions<T>` | interface | The options object for the `Signal.State` constructor (`equals?`) |
125
+ | `ComputedOptions<T>` | interface | The options object for the `Signal.Computed` constructor (`equals?`) |
126
+ | `WatcherNotify` | type | The callback signature of the `Signal.subtle.Watcher` notify function |
129
127
 
130
128
  ## Testing
131
129
 
@@ -152,36 +150,38 @@ pnpm run test:coverage
152
150
  ## Requirements
153
151
 
154
152
  - **Node.js** `>= 22.0.0`
155
- - **TypeScript** `5.7+` (for consumers using TypeScript)
153
+ - **TypeScript** `5.7+` (for a consumer that uses TypeScript)
156
154
 
157
155
  ## License
158
156
 
159
157
  MIT — see [LICENSE](LICENSE).
160
158
 
161
- TC39 Signals Polyfill for XMachines Play Architecture
159
+ The TC39 Signals polyfill of the XMachines Play Architecture
162
160
 
163
- Provides fine-grained reactive state primitives based on the TC39 Signals proposal (Stage 1).
164
- This package isolates the TC39 polyfill to protect the codebase from Stage 1 API changes.
161
+ This package gives you the fine-grained reactive state primitives of the TC39
162
+ Signals proposal (Stage 1). It keeps the TC39 polyfill in one place, and it
163
+ therefore protects the code from a change of the Stage 1 API.
165
164
 
166
- **Architectural Context:** Implements **Signal-Only Reactivity (INV-05)** by providing
167
- the reactive primitives that enable Actor-to-Infrastructure communication without
168
- subscriptions or event emitters. All state propagation in Play Architecture uses
169
- TC39 Signals for automatic dependency tracking and glitch-free updates.
165
+ **Architectural context:** the package implements **Signal-Only Reactivity
166
+ (INV-05)**. It gives the reactive primitives that carry the communication from
167
+ the Actor to the infrastructure, without a subscription and without an event
168
+ emitter. Every propagation of state in the Play Architecture uses a TC39 Signal,
169
+ which tracks each dependency and updates without a glitch.
170
170
 
171
171
  ## Example
172
172
 
173
- Basic Signal usage
173
+ The basic use of a signal
174
174
 
175
175
  ```typescript
176
176
  import { Signal } from "@xmachines/play-signals";
177
177
 
178
- // Create state signal
178
+ // Create a state signal
179
179
  const count = new Signal.State(0);
180
180
 
181
- // Create computed signal
181
+ // Create a computed signal
182
182
  const doubled = new Signal.Computed(() => count.get() * 2);
183
183
 
184
- // Observe changes
184
+ // Observe the changes
185
185
  const watcher = new Signal.subtle.Watcher(() => {
186
186
  console.log("Count:", count.get(), "Doubled:", doubled.get());
187
187
  });
@@ -192,19 +192,21 @@ count.set(5); // Logs: Count: 5 Doubled: 10
192
192
 
193
193
  ## See
194
194
 
195
- - [Play RFC](../../../rfc/play.md) - Invariant INV-05
195
+ - [Play RFC](../../../rfc/play.md) - invariant INV-05
196
196
  - [TC39 Signals Proposal](https://github.com/tc39/proposal-signals)
197
197
 
198
198
  ## Remarks
199
199
 
200
- **Stage 1 Status:** TC39 Signals is currently Stage 1 in the TC39 process. This package
201
- uses the official `signal-polyfill` reference implementation to isolate the codebase
202
- from potential API changes as the proposal evolves. All signal imports should go through
203
- this package to maintain isolation.
200
+ **Stage 1 status:** TC39 Signals is at Stage 1 in the TC39 process now. This
201
+ package uses the official `signal-polyfill` reference implementation. The code
202
+ therefore stays separate from an API that can change while the proposal
203
+ develops. Import every signal through this package, and the separation stays
204
+ complete.
204
205
 
205
- **Why Isolation:** By re-exporting the polyfill through this dedicated package, we can
206
- update the polyfill version or adapt to API changes in one place without touching
207
- consuming packages. This architectural decision protects against Stage 1 API churn.
206
+ **The reason for the separation:** this dedicated package re-exports the
207
+ polyfill. Therefore one place holds each new polyfill version and each change of
208
+ the API, and no consuming package changes. This architectural decision protects
209
+ the code from a change of the Stage 1 API.
208
210
 
209
211
  ## Namespaces
210
212
 
@@ -6,21 +6,21 @@
6
6
  function watchSignal<T>(signal, onValue): () => void;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-signals/src/watch-signal.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/watch-signal.ts#L21)
9
+ Defined in: [packages/play-signals/src/watch-signal.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/watch-signal.ts#L21)
10
10
 
11
- Subscribe to a single signal using the canonical one-shot watcher lifecycle.
11
+ Subscribes to one signal, with the canonical one-shot watcher lifecycle.
12
12
 
13
- The callback runs from a queued microtask after pending notifications are
14
- drained, then the watcher re-arms itself so future updates are not missed.
15
- The returned cleanup keeps teardown idempotent by tolerating already-detached
16
- watchers.
13
+ The callback runs from a microtask in the queue, after the watcher drains the
14
+ notifications that wait. The watcher then arms itself again, so that it misses no
15
+ later update. The cleanup function is idempotent, because it accepts a watcher
16
+ that is detached already.
17
17
 
18
18
  **Memory safety (Phase 29):**
19
19
 
20
- - `disposed` flag prevents post-cleanup callback execution: if cleanup is
21
- called before a pending microtask fires, the microtask returns early.
22
- - `needsEnqueue` guard dedups rapid synchronous signal changes: only one
23
- microtask is ever queued per batch of synchronous mutations.
20
+ - The `disposed` flag stops a callback after the cleanup: the microtask returns at
21
+ once when the cleanup runs before the microtask fires.
22
+ - The `needsEnqueue` guard removes the duplicates of rapid synchronous signal
23
+ changes: one batch of synchronous changes queues one microtask only.
24
24
 
25
25
  ## Type Parameters
26
26
 
@@ -30,13 +30,13 @@ watchers.
30
30
 
31
31
  ## Parameters
32
32
 
33
- | Parameter | Type | Description |
34
- | --------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
35
- | `signal` | \| [`State`](../namespaces/Signal/classes/State.md)\<`T`\> \| [`Computed`](../namespaces/Signal/classes/Computed.md)\<`T`\> | A `Signal.State` or `Signal.Computed` to subscribe to. |
36
- | `onValue` | (`value`) => `void` | Called with the current signal value after each change. |
33
+ | Parameter | Type | Description |
34
+ | --------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
35
+ | `signal` | \| [`State`](../namespaces/Signal/classes/State.md)\<`T`\> \| [`Computed`](../namespaces/Signal/classes/Computed.md)\<`T`\> | The `Signal.State` or `Signal.Computed` to subscribe to. |
36
+ | `onValue` | (`value`) => `void` | The watcher calls it with the current signal value after each change. |
37
37
 
38
38
  ## Returns
39
39
 
40
- A cleanup function that unregisters the watcher.
40
+ The cleanup function. It removes the watcher.
41
41
 
42
42
  () => `void`
@@ -2,15 +2,15 @@
2
2
 
3
3
  # Interface: ComputedOptions\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L84)
5
+ Defined in: [packages/play-signals/src/types.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L85)
6
6
 
7
- Options for creating Signal.Computed
7
+ The options of a Signal.Computed
8
8
 
9
9
  ## Param
10
10
 
11
11
  **equals**
12
12
 
13
- Optional custom equality function for memoization
13
+ The optional equality function of your own, for the memoization
14
14
 
15
15
  ## Example
16
16
 
@@ -31,6 +31,6 @@ const options: ComputedOptions<string> = {
31
31
 
32
32
  ## Properties
33
33
 
34
- | Property | Type | Description | Defined in |
35
- | -------------------------------------- | ----------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
36
- | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L88) |
34
+ | Property | Type | Description | Defined in |
35
+ | -------------------------------------- | ----------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
36
+ | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | The equality function of your own, for the memoization | [packages/play-signals/src/types.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L89) |