@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,14 +2,14 @@
2
2
 
3
3
  # Interface: PlayRouterProviderBaseProps\<TRouter, TActor\>
4
4
 
5
- Defined in: [play-tanstack-react-router/src/create-play-router-provider.tsx:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L45)
5
+ Defined in: [play-tanstack-react-router/src/create-play-router-provider.tsx:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L46)
6
6
 
7
- Props shared by every factory-created React `PlayRouterProvider`.
7
+ The props that every React `PlayRouterProvider` of the factory shares.
8
8
 
9
- Adapter packages re-export a concrete alias with `TRouter` bound to their
10
- router instance type (e.g. `PlayRouterProviderProps<TActor>` in
11
- `@xmachines/play-tanstack-react-router` binds `TRouter` to the TanStack Router
12
- instance type).
9
+ An adapter package re-exports a concrete alias, with `TRouter` bound to the type of
10
+ its router instance. For example, `PlayRouterProviderProps<TActor>` in
11
+ `@xmachines/play-tanstack-react-router` binds `TRouter` to the type of the TanStack
12
+ Router instance.
13
13
 
14
14
  ## Extended by
15
15
 
@@ -24,9 +24,9 @@ instance type).
24
24
 
25
25
  ## Properties
26
26
 
27
- | Property | Type | Description | Defined in |
28
- | ----------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
- | <a id="property-actor"></a> `actor` | `TActor` | The actor to sync with the router. Must be a stable reference pass the same actor instance across renders. Creating the actor inline or re-creating it on every render will cause the bridge to disconnect and reconnect each time. | [play-tanstack-react-router/src/create-play-router-provider.tsx:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L51) |
30
- | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | Renderer callback receives the same concrete actor type that was passed in. | [play-tanstack-react-router/src/create-play-router-provider.tsx:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L68) |
31
- | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | Bidirectional route map for state ID URL path lookups. **Must be a stable reference.** The bridge is rebuilt whenever `routeMap` changes identity. If constructed inline (e.g. `createRouteMapFromTree(routeTree)` in JSX), a new object is produced on every render and the bridge reconnects every render. Memoize with `useMemo`: `const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]);` | [play-tanstack-react-router/src/create-play-router-provider.tsx:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L66) |
32
- | <a id="property-router"></a> `router` | `TRouter` | The router instance the bridge synchronizes with. Must be a stable reference. | [play-tanstack-react-router/src/create-play-router-provider.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L53) |
27
+ | Property | Type | Description | Defined in |
28
+ | ----------------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | <a id="property-actor"></a> `actor` | `TActor` | The actor to keep in step with the router. It must be a stable reference: give the same actor instance on every render. An actor in the JSX, or a new actor on each render, makes the bridge disconnect and connect again each time. | [play-tanstack-react-router/src/create-play-router-provider.tsx:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L52) |
30
+ | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | The renderer callback receives the same concrete actor type as the prop. | [play-tanstack-react-router/src/create-play-router-provider.tsx:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L69) |
31
+ | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | The route map of both directions, for the lookup between a state ID and a URL path. **It must be a stable reference.** The provider builds the bridge again on each change of the identity of `routeMap`. A value in the JSX, for example `createRouteMapFromTree(routeTree)`, makes a new object on every render, and the bridge therefore connects again on every render. Hold the value with `useMemo`: `const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]);` | [play-tanstack-react-router/src/create-play-router-provider.tsx:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L67) |
32
+ | <a id="property-router"></a> `router` | `TRouter` | The router instance that the bridge keeps in step with the actor. It must be a stable reference. | [play-tanstack-react-router/src/create-play-router-provider.tsx:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L54) |
@@ -2,13 +2,13 @@
2
2
 
3
3
  # Interface: PlayRouterProviderProps\<TActor\>
4
4
 
5
- Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/play-router-provider.tsx#L43)
5
+ Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/play-router-provider.tsx#L45)
6
6
 
7
- Props for the TanStack React Router `PlayRouterProvider`.
7
+ The props of the `PlayRouterProvider` of TanStack React Router.
8
8
 
9
- `router` is the TanStack Router instance returned by `createRouter`.
10
- See `PlayRouterProviderBaseProps` for the stable-reference requirements on
11
- `actor`, `router`, and `routeMap`.
9
+ `router` is the TanStack Router instance that `createRouter` returns.
10
+ `PlayRouterProviderBaseProps` holds the requirement of a stable reference for
11
+ `actor`, for `router`, and for `routeMap`.
12
12
 
13
13
  ## Extends
14
14
 
@@ -22,9 +22,9 @@ See `PlayRouterProviderBaseProps` for the stable-reference requirements on
22
22
 
23
23
  ## Properties
24
24
 
25
- | Property | Type | Description | Inherited from | Defined in |
26
- | ----------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27
- | <a id="property-actor"></a> `actor` | `TActor` | The actor to sync with the router. Must be a stable reference pass the same actor instance across renders. Creating the actor inline or re-creating it on every render will cause the bridge to disconnect and reconnect each time. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`actor`](PlayRouterProviderBaseProps.md#property-actor) | [play-tanstack-react-router/src/create-play-router-provider.tsx:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L51) |
28
- | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | Renderer callback receives the same concrete actor type that was passed in. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`renderer`](PlayRouterProviderBaseProps.md#property-renderer) | [play-tanstack-react-router/src/create-play-router-provider.tsx:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L68) |
29
- | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | Bidirectional route map for state ID URL path lookups. **Must be a stable reference.** The bridge is rebuilt whenever `routeMap` changes identity. If constructed inline (e.g. `createRouteMapFromTree(routeTree)` in JSX), a new object is produced on every render and the bridge reconnects every render. Memoize with `useMemo`: `const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]);` | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`routeMap`](PlayRouterProviderBaseProps.md#property-routemap) | [play-tanstack-react-router/src/create-play-router-provider.tsx:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L66) |
30
- | <a id="property-router"></a> `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md) | The router instance the bridge synchronizes with. Must be a stable reference. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`router`](PlayRouterProviderBaseProps.md#property-router) | [play-tanstack-react-router/src/create-play-router-provider.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L53) |
25
+ | Property | Type | Description | Inherited from | Defined in |
26
+ | ----------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27
+ | <a id="property-actor"></a> `actor` | `TActor` | The actor to keep in step with the router. It must be a stable reference: give the same actor instance on every render. An actor in the JSX, or a new actor on each render, makes the bridge disconnect and connect again each time. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`actor`](PlayRouterProviderBaseProps.md#property-actor) | [play-tanstack-react-router/src/create-play-router-provider.tsx:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L52) |
28
+ | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | The renderer callback receives the same concrete actor type as the prop. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`renderer`](PlayRouterProviderBaseProps.md#property-renderer) | [play-tanstack-react-router/src/create-play-router-provider.tsx:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L69) |
29
+ | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | The route map of both directions, for the lookup between a state ID and a URL path. **It must be a stable reference.** The provider builds the bridge again on each change of the identity of `routeMap`. A value in the JSX, for example `createRouteMapFromTree(routeTree)`, makes a new object on every render, and the bridge therefore connects again on every render. Hold the value with `useMemo`: `const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]);` | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`routeMap`](PlayRouterProviderBaseProps.md#property-routemap) | [play-tanstack-react-router/src/create-play-router-provider.tsx:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L67) |
30
+ | <a id="property-router"></a> `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md) | The router instance that the bridge keeps in step with the actor. It must be a stable reference. | [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md).[`router`](PlayRouterProviderBaseProps.md#property-router) | [play-tanstack-react-router/src/create-play-router-provider.tsx:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L54) |
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: RouteMapOptions
4
4
 
5
- Defined in: [play-router/src/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: [play-router/src/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`. | [play-router/src/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`. | [play-router/src/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: [play-router/src/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: [play-router/src/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?"`) | [play-router/src/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"`) | [play-router/src/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?"` | [play-router/src/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"` | [play-router/src/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) |
@@ -1,16 +1,17 @@
1
1
  [API](../../../README.md) / [@xmachines/play-tanstack-react-router](../README.md) / RouteNavigateEvent
2
2
 
3
- # Interface: RouteNavigateEvent
3
+ # ~~Interface: RouteNavigateEvent~~
4
4
 
5
- Defined in: [play-tanstack-react-router/src/types.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/types.ts#L21)
5
+ Defined in: [play-tanstack-react-router/src/types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/types.ts#L24)
6
6
 
7
- Event sent to actor when browser navigates.
7
+ The event that the bridge sends to the actor when the browser navigates.
8
8
 
9
- Browser navigation (user clicks link, back/forward button, direct URL entry)
10
- sends this event to the actor. The actor's guards determine if navigation
11
- is allowed based on business logic.
9
+ A browser navigation sends this event to the actor. A click on a link, the BACK
10
+ or FORWARD button, and a URL that the user types each cause a navigation. The
11
+ guards of the actor then decide if the business logic permits the navigation.
12
12
 
13
- Invariant: Passive Infrastructure - Router suggests, actor decides validity.
13
+ Invariant: Passive Infrastructure. The router makes a request, and the actor
14
+ decides the validity.
14
15
 
15
16
  ## Example
16
17
 
@@ -18,9 +19,13 @@ Invariant: Passive Infrastructure - Router suggests, actor decides validity.
18
19
  actor.send({ type: "route.navigate", path: "/dashboard" });
19
20
  ```
20
21
 
22
+ ## Deprecated
23
+
24
+ Superseded by `PlayRouteEvent` from `@xmachines/play-router`. Will be removed in the next major.
25
+
21
26
  ## Properties
22
27
 
23
- | Property | Modifier | Type | Description | Defined in |
24
- | --------------------------------- | ---------- | ------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
- | <a id="property-path"></a> `path` | `readonly` | `string` | Target route path (may include parameters, e.g., /posts/123) | [play-tanstack-react-router/src/types.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/types.ts#L25) |
26
- | <a id="property-type"></a> `type` | `readonly` | `"route.navigate"` | Event type discriminant (extends XState event pattern) | [play-tanstack-react-router/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/types.ts#L23) |
28
+ | Property | Modifier | Type | Description | Defined in |
29
+ | ------------------------------------- | ---------- | ------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
+ | <a id="property-path"></a> ~~`path`~~ | `readonly` | `string` | The target route path. It can hold a parameter, for example /posts/123 | [play-tanstack-react-router/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/types.ts#L28) |
31
+ | <a id="property-type"></a> ~~`type`~~ | `readonly` | `"route.navigate"` | The event type discriminant. It follows the XState event pattern | [play-tanstack-react-router/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/types.ts#L26) |
@@ -2,21 +2,23 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: [play-router/src/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: [play-router/src/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: [play-router/src/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: [play-router/src/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: [play-router/src/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: [play-router/src/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
  ```
@@ -6,9 +6,9 @@
6
6
  type PlayRouterBridgeConstructor<TRouter> = (router, actor, routeMap) => RouterBridge;
7
7
  ```
8
8
 
9
- Defined in: [play-tanstack-react-router/src/create-play-router-provider.tsx:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L31)
9
+ Defined in: [play-tanstack-react-router/src/create-play-router-provider.tsx:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/create-play-router-provider.tsx#L32)
10
10
 
11
- Constructor shape a bridge class must satisfy to be used with
11
+ The constructor shape that a bridge class must satisfy for
12
12
  `createPlayRouterProvider`: `(router, actor, routeMap) → RouterBridge`.
13
13
 
14
14
  ## Type Parameters
@@ -6,4 +6,4 @@
6
6
  type TanStackRouterInstance = ConstructorParameters<typeof TanStackReactRouterBridge>[0];
7
7
  ```
8
8
 
9
- Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/play-router-provider.tsx#L34)
9
+ Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/play-router-provider.tsx#L36)
@@ -6,11 +6,11 @@
6
6
  type TanStackRouterLike = object;
7
7
  ```
8
8
 
9
- Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L36)
9
+ Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L37)
10
10
 
11
- Structural (type-only) interface for the TanStack Router surface used by
12
- `TanStackRouterBridgeBase`. Both `@tanstack/react-router` and
13
- `@tanstack/solid-router` instances satisfy it.
11
+ The type-only interface of the TanStack Router surface that
12
+ `TanStackRouterBridgeBase` uses. An instance of `@tanstack/react-router` and an
13
+ instance of `@tanstack/solid-router` both satisfy it.
14
14
 
15
15
  ## Properties
16
16
 
@@ -20,7 +20,7 @@ Structural (type-only) interface for the TanStack Router surface used by
20
20
  history: object;
21
21
  ```
22
22
 
23
- Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L44)
23
+ Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L46)
24
24
 
25
25
  #### location
26
26
 
@@ -28,9 +28,10 @@ Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:44](https:/
28
28
  location: object;
29
29
  ```
30
30
 
31
- Current location populated from `window.location` when `createRouter()` runs,
32
- before `router.load()`. Always available in the browser.
33
- `router.state.location` is only populated after `router.load()` and may be stale.
31
+ The current location. `createRouter()` fills it from `window.location`, before
32
+ `router.load()`. It is always available in the browser.
33
+ `router.state.location` has a value only after `router.load()`, and that value
34
+ can be old.
34
35
 
35
36
  ##### location.pathname
36
37
 
@@ -68,11 +69,12 @@ subscribe(handler): () => void;
68
69
  optional load(): void | Promise<void>;
69
70
  ```
70
71
 
71
- Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L43)
72
+ Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L45)
72
73
 
73
- Re-runs TanStack route matching and loaders for the current location.
74
- Optional: the bridge calls it (fire-and-forget) after every navigation so
75
- matching/loaders stay in sync even without a mounted `<RouterProvider>`.
74
+ Runs the TanStack route matching and the loaders again for the current location.
75
+ This method is optional. The bridge calls it after every navigation, and it does
76
+ not wait for the result. The matching and the loaders therefore stay correct,
77
+ also when no `<RouterProvider>` is mounted.
76
78
 
77
79
  #### Returns
78
80
 
@@ -86,7 +88,7 @@ matching/loaders stay in sync even without a mounted `<RouterProvider>`.
86
88
  navigate(args): void;
87
89
  ```
88
90
 
89
- Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L37)
91
+ Defined in: [play-tanstack-router/src/tanstack-router-bridge-base.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-router/src/tanstack-router-bridge-base.ts#L38)
90
92
 
91
93
  #### Parameters
92
94
 
@@ -6,16 +6,17 @@
6
6
  const PlayRouterProvider: <TActor>(__namedParameters) => Element;
7
7
  ```
8
8
 
9
- Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-tanstack-react-router/src/play-router-provider.tsx#L57)
9
+ Defined in: [play-tanstack-react-router/src/play-router-provider.tsx:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-tanstack-react-router/src/play-router-provider.tsx#L60)
10
10
 
11
- Connects a `PlayerActor` to TanStack React Router, keeping actor state and
12
- browser URL in sync bidirectionally.
11
+ Connects a `PlayerActor` to TanStack React Router. It keeps the actor state and the
12
+ browser URL in step, in both directions.
13
13
 
14
- The bridge is created once on mount and torn down on unmount. It is also
15
- rebuilt if `actor`, `router`, or `routeMap` change identity so all three
16
- props must be **stable references** (created outside JSX or memoized).
17
- Under React `<StrictMode>` the effect runs twice on mount
18
- (connect disconnect connect), which the bridge supports.
14
+ The component creates the bridge one time, on mount, and it disconnects the bridge
15
+ on unmount. It also builds the bridge again on a change of the identity of `actor`,
16
+ of `router`, or of `routeMap`. Therefore all three props must be **stable
17
+ references**: create them outside the JSX, or hold them with `useMemo`. Under the
18
+ React `<StrictMode>`, the effect runs two times on mount (connect, disconnect,
19
+ connect), and the bridge supports this.
19
20
 
20
21
  ## Type Parameters
21
22
 
@@ -4,14 +4,16 @@
4
4
 
5
5
  Shared, framework-agnostic TanStack Router bridge base for XMachines Play.
6
6
 
7
- TanStack Router exposes the identical `navigate` / `load` / `history` surface in
8
- both its React and Solid flavours, so the entire bridge implementation lives here
9
- as `TanStackRouterBridgeBase` (extending `RouterBridgeBase` from
10
- [`@xmachines/play-router`](../play-router/README.md)). The framework adapter
11
- packages only subclass it to bind their concrete router type.
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-tanstack-router)
12
8
 
13
- This package has **no TanStack runtime dependency** `TanStackRouterLike` is a
14
- structural, type-only interface covering the small router surface the bridge uses.
9
+ TanStack Router gives React and Solid the same `navigate`, `load`, and `history`
10
+ surface. Therefore the complete bridge implementation lives here, in
11
+ `TanStackRouterBridgeBase`. That class extends `RouterBridgeBase` from
12
+ [`@xmachines/play-router`](../play-router/README.md). Each framework adapter
13
+ package makes a subclass of it, and binds its own router type.
14
+
15
+ This package has **no TanStack runtime dependency**. `TanStackRouterLike` is a
16
+ type-only interface. It describes the small router surface that the bridge uses.
15
17
 
16
18
  ## Who consumes it
17
19
 
@@ -21,21 +23,41 @@ structural, type-only interface covering the small router surface the bridge use
21
23
  ## Usage
22
24
 
23
25
  ```typescript
26
+ import { createMachine } from "xstate";
27
+ import { definePlayer, formatPlayRouteTransitions } from "@xmachines/play-xstate";
28
+ import { createRouteMap } from "@xmachines/play-router";
24
29
  import { TanStackRouterBridgeBase } from "@xmachines/play-tanstack-router";
25
30
 
31
+ const machine = createMachine(
32
+ formatPlayRouteTransitions({
33
+ id: "app",
34
+ initial: "home",
35
+ states: {
36
+ home: { id: "home", meta: { route: "/" } },
37
+ about: { id: "about", meta: { route: "/about" } },
38
+ },
39
+ }),
40
+ );
41
+
42
+ const actor = definePlayer({ machine })();
43
+ actor.start();
44
+
45
+ const routeMap = createRouteMap(machine);
46
+
26
47
  export class MyTanStackBridge extends TanStackRouterBridgeBase {}
27
48
 
49
+ // router: your TanStack Router instance (from the React or Solid createRouter)
28
50
  const bridge = new MyTanStackBridge(router, actor, routeMap);
29
51
  bridge.connect();
30
- // Cleanup on unmount
31
- return () => bridge.disconnect();
52
+ // Disconnect the bridge at teardown
53
+ bridge.disconnect();
32
54
  ```
33
55
 
34
56
  ## Exports
35
57
 
36
- - `TanStackRouterBridgeBase` — abstract bridge base class
37
- - `TanStackRouterLike` — structural (type-only) TanStack router surface
38
- - `TanStackRouteMapLike` — narrow route-map surface the bridge requires
58
+ - `TanStackRouterBridgeBase` — the concrete bridge base class. Use it directly, or make a subclass of it
59
+ - `TanStackRouterLike` — the TanStack router surface, as a type-only interface
60
+ - `TanStackRouteMapLike` — the narrow route-map surface that the bridge requires
39
61
 
40
62
  ## License
41
63
 
@@ -43,10 +65,10 @@ MIT
43
65
 
44
66
  @xmachines/play-tanstack-router
45
67
 
46
- Shared, framework-agnostic TanStack Router bridge base for XMachines Play.
47
- Consumed by `@xmachines/play-tanstack-react-router` and
48
- `@xmachines/play-tanstack-solid-router`, which subclass
49
- `TanStackRouterBridgeBase` to bind their concrete router type.
68
+ The shared, framework-agnostic TanStack Router bridge base for XMachines Play.
69
+ `@xmachines/play-tanstack-react-router` and
70
+ `@xmachines/play-tanstack-solid-router` use it. Each of them makes a subclass of
71
+ `TanStackRouterBridgeBase`, and the subclass binds its own router type.
50
72
 
51
73
  ## Classes
52
74