@xmachines/docs 2.1.1 → 3.0.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 (360) hide show
  1. package/README.md +2 -2
  2. package/api/@xmachines/play/README.md +74 -7
  3. package/api/@xmachines/play/classes/NonNullableError.md +4 -4
  4. package/api/@xmachines/play/classes/PlayError.md +4 -4
  5. package/api/@xmachines/play/functions/asCleanup.md +78 -0
  6. package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
  7. package/api/@xmachines/play/type-aliases/Cleanup.md +38 -0
  8. package/api/@xmachines/play/type-aliases/DisposeKey.md +32 -0
  9. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  10. package/api/@xmachines/play/variables/DISPOSE.md +34 -0
  11. package/api/@xmachines/play-actor/README.md +8 -1
  12. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  13. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
  14. package/api/@xmachines/play-actor/functions/composePlayState.md +1 -1
  15. package/api/@xmachines/play-actor/functions/createFailureLatch.md +20 -0
  16. package/api/@xmachines/play-actor/functions/createReportGuard.md +26 -0
  17. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +1 -1
  18. package/api/@xmachines/play-actor/functions/guardContextWrites.md +1 -1
  19. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +1 -1
  20. package/api/@xmachines/play-actor/functions/reuseComposedState.md +1 -1
  21. package/api/@xmachines/play-actor/functions/sameViewInputs.md +25 -0
  22. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +1 -1
  23. package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
  24. package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
  25. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
  26. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
  27. package/api/@xmachines/play-actor/interfaces/FailureLatch.md +59 -0
  28. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  29. package/api/@xmachines/play-actor/interfaces/ReportGuard.md +92 -0
  30. package/api/@xmachines/play-actor/interfaces/ReportGuardMessages.md +18 -0
  31. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +2 -2
  32. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  33. package/api/@xmachines/play-actor/interfaces/ViewInputs.md +19 -0
  34. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +3 -3
  35. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +4 -4
  36. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  37. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +1 -1
  38. package/api/@xmachines/play-dom/README.md +84 -16
  39. package/api/@xmachines/play-dom/classes/PlayRenderer.md +10 -10
  40. package/api/@xmachines/play-dom/functions/createPlayUI.md +8 -8
  41. package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
  42. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +17 -11
  43. package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -4
  44. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -12
  45. package/api/@xmachines/play-dom/type-aliases/Cleanup.md +38 -0
  46. package/api/@xmachines/play-dom/type-aliases/DisposablePlayUI.md +36 -0
  47. package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -1
  48. package/api/@xmachines/play-dom-router/README.md +46 -18
  49. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +149 -7
  50. package/api/@xmachines/play-dom-router/functions/connectRouter.md +6 -5
  51. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +3 -3
  52. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
  53. package/api/@xmachines/play-dom-router/functions/createRouter.md +20 -8
  54. package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +32 -0
  55. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +27 -17
  56. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  57. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +12 -6
  58. package/api/@xmachines/play-dom-router/interfaces/DisposableBrowserHistory.md +262 -0
  59. package/api/@xmachines/play-dom-router/interfaces/DisposableVanillaRouter.md +80 -0
  60. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
  61. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
  62. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  63. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
  64. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
  65. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
  66. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
  67. package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +105 -0
  68. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +26 -5
  69. package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +38 -0
  70. package/api/@xmachines/play-dom-router/variables/DISPOSE.md +34 -0
  71. package/api/@xmachines/play-react/README.md +2 -2
  72. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +42 -7
  73. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  74. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  75. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  76. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
  77. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +8 -6
  78. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -5
  79. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
  80. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
  81. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
  82. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +1 -1
  83. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  84. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  85. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  86. package/api/@xmachines/play-react-router/README.md +2 -2
  87. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +172 -15
  88. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  89. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +7 -18
  90. package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  92. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
  93. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  94. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  95. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
  96. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  97. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  98. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  99. package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  100. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
  101. package/api/@xmachines/play-router/README.md +308 -11
  102. package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
  103. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +178 -19
  104. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  105. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  106. package/api/@xmachines/play-router/functions/cleanFrameworkParams.md +40 -0
  107. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  108. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
  109. package/api/@xmachines/play-router/functions/createRouterConnection.md +21 -0
  110. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  111. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  112. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  113. package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
  114. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  115. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  116. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  117. package/api/@xmachines/play-router/functions/getPatternParamNames.md +24 -0
  118. package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +36 -0
  119. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  120. package/api/@xmachines/play-router/functions/getRouteMappings.md +67 -0
  121. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  122. package/api/@xmachines/play-router/functions/isMountableBridge.md +26 -0
  123. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  124. package/api/@xmachines/play-router/functions/joinBasePath.md +37 -0
  125. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  126. package/api/@xmachines/play-router/functions/mountKey.md +28 -0
  127. package/api/@xmachines/play-router/functions/normalizeBasePath.md +43 -0
  128. package/api/@xmachines/play-router/functions/openProviderBridge.md +41 -0
  129. package/api/@xmachines/play-router/functions/pickOwnParams.md +41 -0
  130. package/api/@xmachines/play-router/functions/repointProviderBridge.md +27 -0
  131. package/api/@xmachines/play-router/functions/resolveBasePath.md +51 -0
  132. package/api/@xmachines/play-router/functions/resolveFrameworkParams.md +51 -0
  133. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  134. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  135. package/api/@xmachines/play-router/functions/stripBasePath.md +44 -0
  136. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  137. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  138. package/api/@xmachines/play-router/interfaces/BasePathOptions.md +32 -0
  139. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
  140. package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +47 -0
  141. package/api/@xmachines/play-router/interfaces/LocationLike.md +5 -5
  142. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +5 -5
  143. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +7 -7
  144. package/api/@xmachines/play-router/interfaces/MountableRouterBridge.md +130 -0
  145. package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +28 -0
  146. package/api/@xmachines/play-router/interfaces/PlayActor.md +7 -7
  147. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  148. package/api/@xmachines/play-router/interfaces/PlayRouterProviderBaseProps.md +33 -0
  149. package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +14 -0
  150. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +5 -5
  151. package/api/@xmachines/play-router/interfaces/RoutableActor.md +6 -6
  152. package/api/@xmachines/play-router/interfaces/RouteInfo.md +10 -10
  153. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +4 -4
  154. package/api/@xmachines/play-router/interfaces/RouteMapping.md +5 -5
  155. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  156. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  157. package/api/@xmachines/play-router/interfaces/RouteObject.md +4 -4
  158. package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -7
  159. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  160. package/api/@xmachines/play-router/interfaces/RouterBridge.md +7 -3
  161. package/api/@xmachines/play-router/interfaces/RouterConnection.md +105 -0
  162. package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
  163. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +1 -1
  164. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  165. package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +36 -0
  166. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  167. package/api/@xmachines/play-router/variables/DISPOSE.md +34 -0
  168. package/api/@xmachines/play-router/variables/NO_BASE_PATH.md +18 -0
  169. package/api/@xmachines/play-signals/README.md +4 -2
  170. package/api/@xmachines/play-signals/functions/watchSignal.md +27 -4
  171. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  172. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  173. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  174. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  175. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  176. package/api/@xmachines/play-signals/type-aliases/Cleanup.md +38 -0
  177. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  178. package/api/@xmachines/play-solid/README.md +23 -5
  179. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  180. package/api/@xmachines/play-solid/functions/usePlayView.md +14 -1
  181. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
  182. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
  183. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +13 -5
  184. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
  185. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  186. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  187. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  188. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  189. package/api/@xmachines/play-solid-router/README.md +19 -3
  190. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  191. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +166 -18
  192. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +8 -18
  193. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  194. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  195. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
  196. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  197. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  198. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
  199. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  200. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  201. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +14 -12
  202. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  203. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  204. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  205. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +4 -4
  206. package/api/@xmachines/play-svelte/README.md +3 -3
  207. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  208. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  209. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +7 -1
  210. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  211. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
  212. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
  213. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
  214. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
  215. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
  216. package/api/@xmachines/play-svelte-spa-router/README.md +3 -1
  217. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
  218. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +148 -6
  219. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  220. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
  221. package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +32 -0
  222. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +12 -6
  223. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
  224. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
  225. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
  226. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  227. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +105 -0
  228. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  229. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  230. package/api/@xmachines/play-sveltekit-router/README.md +3 -1
  231. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
  232. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +148 -6
  233. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  234. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
  235. package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +32 -0
  236. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +28 -6
  237. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
  238. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
  239. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
  240. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
  241. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  242. package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +105 -0
  243. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  244. package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
  245. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  246. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +148 -6
  247. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +7 -18
  248. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  249. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  250. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  251. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +5 -5
  252. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  253. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  254. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
  255. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  256. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  257. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  258. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  259. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  260. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  261. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
  262. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +4 -4
  263. package/api/@xmachines/play-tanstack-router/README.md +1 -1
  264. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +153 -11
  265. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
  266. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
  267. package/api/@xmachines/play-tanstack-solid-router/README.md +2 -2
  268. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  269. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +149 -7
  270. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +7 -17
  271. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  272. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
  273. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
  274. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  275. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
  276. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  277. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  278. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  279. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  280. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  281. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  282. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +5 -5
  283. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +4 -4
  284. package/api/@xmachines/play-vue/README.md +34 -12
  285. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  286. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  287. package/api/@xmachines/play-vue/functions/usePlayView.md +6 -1
  288. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +12 -7
  289. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +15 -10
  290. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
  291. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
  292. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
  293. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  294. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  295. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  296. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  297. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +6 -1
  298. package/api/@xmachines/play-vue-router/README.md +1 -1
  299. package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
  300. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +154 -12
  301. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  302. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
  303. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  304. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
  305. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
  306. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  307. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  308. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +1 -1
  309. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +25 -2
  310. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +1 -1
  311. package/api/@xmachines/play-xstate/README.md +19 -2
  312. package/api/@xmachines/play-xstate/classes/PlayerActor.md +53 -17
  313. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  314. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  315. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  316. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  317. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  318. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  319. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  320. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  321. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  322. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  323. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  324. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  325. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  326. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +7 -7
  327. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  328. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  329. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  330. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  331. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  332. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  333. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  334. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  335. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  336. package/api/@xmachines/play-xstate/variables/DISPOSE.md +34 -0
  337. package/api/@xmachines/shared/README.md +1 -1
  338. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  339. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  340. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  341. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  342. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  343. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  344. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  345. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  346. package/contributing/architecture.md +5 -1
  347. package/contributing/configuration.md +60 -18
  348. package/contributing/development.md +66 -44
  349. package/contributing/testing.md +34 -7
  350. package/examples/README.md +1 -1
  351. package/examples/multi-router-integration.md +126 -1
  352. package/examples/routing-patterns.md +1 -1
  353. package/guides/getting-started.md +7 -7
  354. package/guides/inspector.md +1 -1
  355. package/guides/signals.md +43 -0
  356. package/package.json +1 -1
  357. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  358. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -30
  359. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  360. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -31
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayDomOptions
4
4
 
5
- Defined in: [packages/play-dom/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom/src/types.ts#L23)
5
+ Defined in: [packages/play-dom/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L23)
6
6
 
7
7
  The options of `PlayRenderer`.
8
8
 
@@ -17,14 +17,16 @@ reads them at `ctx.ctx.*`.
17
17
 
18
18
  ## Properties
19
19
 
20
- | Property | Type | Description | Inherited from | Defined in |
21
- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
22
- | <a id="property-directives"></a> `directives?` | `DirectiveDefinition`\<`ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>\>[] | Custom directives — user-defined `$`-prefixed dynamic values that extend the spec expression language (e.g. `{ $format: "currency", value: ... }`). Each entry is a `DirectiveDefinition` built with `defineDirective` from `@xmachines/json-render-core`. The array is converted to a `DirectiveRegistry` once per render pass and forwarded to `resolveElementProps` via `PropResolutionContext.directives`. Built-in expressions (`$state`, `$cond`, etc.) always take precedence over custom directives. Mirrors the `directives` prop on `JSONUIProvider` / `JsonUIProvider` introduced in **Json-render** 0.19. **Example** `import { defineDirective, resolvePropValue } from "@xmachines/json-render-core"; import { z } from "zod"; const formatDirective = defineDirective({ name: "$format", description: "Locale-aware number formatting.", schema: z.object({ $format: z.enum(["number", "currency"]), value: z.unknown() }), resolve(value, ctx) { const resolved = resolvePropValue(value.value, ctx); return new Intl.NumberFormat().format(resolved as number); }, }); renderSpec(spec, store, registry, { directives: [formatDirective] });` | [`UIProviderOptions`](UIProviderOptions.md).[`directives`](UIProviderOptions.md#property-directives) | - |
23
- | <a id="property-functions"></a> `functions?` | `Record`\<`string`, `ComputedFunction`\> | Named compute functions for `{ $computed: "name", args: {...} }` prop expressions. Each function receives the resolved `args` object and returns the computed value. Forwarded directly to `resolveElementProps` via `PropResolutionContext.functions`, matching the `FunctionsContext` provider in the framework renderers. Without this option, `$computed` expressions resolve to `undefined` (no throw). **Example** `renderSpec(spec, store, registry, { functions: { fullName: (args) => `${args.first} ${args.last}`, formatCurrency: (args) => new Intl.NumberFormat().format(args.amount as number), }, });` Mirrors the `functions` prop on `JSONUIProvider` / `JsonUIProvider`. | [`UIProviderOptions`](UIProviderOptions.md).[`functions`](UIProviderOptions.md#property-functions) | - |
24
- | <a id="property-loading"></a> `loading?` | `boolean` | With the value `true`, the spec is still streaming, for example from an AI provider. The renderer gives the flag to `renderSpec`. A component implementation therefore reads `ctx.ctx.loading`, and it can render a skeleton state. The flag also stops each warning about an absent child during the ingestion of the stream, because an element of a reference can still be absent from the incremental spec. This option matches the `loading` prop of the framework renderer providers. | - | [packages/play-dom/src/types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom/src/types.ts#L54) |
25
- | <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Programmatic navigation function. Called automatically when an action binding resolves with `onSuccess: { navigate: "/path" }`. The resolved path string is passed as the sole argument. Mirrors the `navigate` prop in `ActionProvider` from the framework renderers, where it is captured in the `execute()` closure. Also available to component implementations directly via `ctx.ctx.navigate` for cases where navigation needs to be triggered outside of an action binding. **Example** `import { useNavigate } from "my-router"; const navigate = useNavigate(); renderSpec(spec, store, registry, { navigate });` Spec binding that triggers navigation: `{ "on": { "click": { "action": "doSomething", "onSuccess": { "navigate": "/dashboard" } } } }` | [`UIProviderOptions`](UIProviderOptions.md).[`navigate`](UIProviderOptions.md#property-navigate) | - |
26
- | <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook for actions that declare `confirm` in their binding. Consulted by `emit()` before executing a confirm-gated action. Return (or resolve) `true` to execute, `false` to skip. Without this handler, confirm-gated actions are skipped with a `console.warn` they never execute unconfirmed. See [ConfirmHandler](../type-aliases/ConfirmHandler.md) for the full contract. This is the headless equivalent of the `pendingConfirmation` / `confirmAction()` / `cancelAction()` flow in the framework adapters. | [`UIProviderOptions`](UIProviderOptions.md).[`onConfirm`](UIProviderOptions.md#property-onconfirm) | - |
27
- | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Unified error handler for component render errors and action handler rejections. Matches `RenderErrorHandler = (error: unknown, name: string) => void`. Invoked for three distinct error classes: - `(error, elementType)` when a component renderer throws synchronously during `renderSpec` - `(error, actionName)` when an action handler rejects during `emit()` (on-event path) - `(error, actionName)` — when an action handler rejects during a `watch` binding callback When provided, suppresses the `console.error` fallback for all three error types. Forwarded into `renderSpec` as the `onRenderError` parameter and into `DomRenderContext.onRenderError` so both `emit()` and `watch` handlers route their errors through the same channel as component render errors. **Example** `renderSpec(spec, store, registry, { onRenderError: (err, name) => { myErrorReporter.capture(err, { context: name }); }, });` | [`UIProviderOptions`](UIProviderOptions.md).[`onRenderError`](UIProviderOptions.md#property-onrendererror) | - |
28
- | <a id="property-registryresult"></a> `registryResult?` | [`DefineRegistryResult`](DefineRegistryResult.md) | The result of `defineRegistry`. It gives the registry and the factory of the handlers. With this option, `PlayRenderer` connects `setState` and `getState` of the `StateStore` on @xstate/store to the factory of the handlers for you. This is the preferred way, because each action then always receives a live `setState` and a live `state` on the current store. | - | [packages/play-dom/src/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom/src/types.ts#L32) |
29
- | <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, for example from `xstateStoreStateStore` in @xmachines/json-render-xstate. With this option, `PlayRenderer` works in the controlled mode: it ignores `spec.state`, and this store is the single source of truth of the UI state, such as a form value. Without this option, the renderer makes a new `@xstate/store` atom for each view transition, with the values of `spec.state`. | - | [packages/play-dom/src/types.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom/src/types.ts#L42) |
30
- | <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions for inline field validation. Each function receives `(value, args?)` and returns `true` (valid) or `false` (invalid). Functions are available to component implementations via `ctx.ctx.validationFunctions` and should be passed as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. Mirrors `customFunctions` in `ValidationProvider` from the framework renderers. The DOM renderer has no automatic `ValidationProvider` tree — validation must be invoked explicitly by component implementations. **Example** `import { runValidationCheck } from "@xmachines/json-render-core"; renderSpec(spec, store, registry, { validationFunctions: { isEven: (value) => typeof value === "number" && value % 2 === 0, phoneNumber: (value) => /^\+?[\d\s\-()]{7,}$/.test(String(value)), }, }); // Inside a ComponentFn: const MyField: ComponentFn<typeof catalog, "MyField"> = ({ ctx }) => { const result = runValidationCheck( { type: "isEven", message: "must be even" }, { value: someValue, stateModel: {}, customFunctions: ctx.ctx.validationFunctions }, ); // result.valid, result.message };` | [`UIProviderOptions`](UIProviderOptions.md).[`validationFunctions`](UIProviderOptions.md#property-validationfunctions) | - |
20
+ | Property | Type | Description | Inherited from | Defined in |
21
+ | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
22
+ | <a id="property-directives"></a> `directives?` | `DirectiveDefinition`\<`ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>\>[] | Custom directives — user-defined `$`-prefixed dynamic values that extend the spec expression language (e.g. `{ $format: "currency", value: ... }`). Each entry is a `DirectiveDefinition` built with `defineDirective` from `@xmachines/json-render-core`. The array is converted to a `DirectiveRegistry` once per render pass and forwarded to `resolveElementProps` via `PropResolutionContext.directives`. Built-in expressions (`$state`, `$cond`, etc.) always take precedence over custom directives. Mirrors the `directives` prop on `JSONUIProvider` / `JsonUIProvider` introduced in **Json-render** 0.19. **Example** `import { defineDirective, resolvePropValue } from "@xmachines/json-render-core"; import { z } from "zod"; const formatDirective = defineDirective({ name: "$format", description: "Locale-aware number formatting.", schema: z.object({ $format: z.enum(["number", "currency"]), value: z.unknown() }), resolve(value, ctx) { const resolved = resolvePropValue(value.value, ctx); return new Intl.NumberFormat().format(resolved as number); }, }); renderSpec(spec, store, registry, { directives: [formatDirective] });` | [`UIProviderOptions`](UIProviderOptions.md).[`directives`](UIProviderOptions.md#property-directives) | - |
23
+ | <a id="property-fallback"></a> `fallback?` | `HTMLElement` \| (() => `HTMLElement`) \| `null` | The optional element that the renderer shows when `currentView` is `null`, and after a failure of a rebuild that it contains. The renderer shows it for EVERY null view, and not for the first mount only: a view that returns to `null` after a view that was not `null` also shows it. The four framework providers hold the same rule for their placeholder content. The renderer shows it after a failure of a rebuild too. This option turns nothing on: the renderer contains such a failure always, and this option says only what the empty container shows. The next view that renders clears the container, which removes the element. **One element belongs to one renderer.** `appendChild` MOVES a node. Two renderers that hold the same element therefore take it from each other on every null view, and the container of the first one goes empty without a notice. Build one element for each `PlayRenderer`. A FUNCTION also works here. The renderer calls it at the first moment that it needs the element, and it keeps the result, so a renderer whose view is never null builds nothing. [CreatePlayUIOptions.fallback](CreatePlayUIOptions.md#property-fallback) passes such a function for each mount. A producer that THROWS is contained on BOTH paths — a null view, and a rebuild that failed — and the renderer writes it to `console.error` and NOT to [PlayDomOptions.onError](#property-onerror). On the second path the renderer calls the producer from inside the containment of the view, and a second trip through `onError` would report the failure of the fallback as a failure of the view. The container stays empty. | - | [packages/play-dom/src/types.ts:132](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L132) |
24
+ | <a id="property-functions"></a> `functions?` | `Record`\<`string`, `ComputedFunction`\> | Named compute functions for `{ $computed: "name", args: {...} }` prop expressions. Each function receives the resolved `args` object and returns the computed value. Forwarded directly to `resolveElementProps` via `PropResolutionContext.functions`, matching the `FunctionsContext` provider in the framework renderers. Without this option, `$computed` expressions resolve to `undefined` (no throw). **Example** `renderSpec(spec, store, registry, { functions: { fullName: (args) => `${args.first} ${args.last}`, formatCurrency: (args) => new Intl.NumberFormat().format(args.amount as number), }, });` Mirrors the `functions` prop on `JSONUIProvider` / `JsonUIProvider`. | [`UIProviderOptions`](UIProviderOptions.md).[`functions`](UIProviderOptions.md#property-functions) | - |
25
+ | <a id="property-loading"></a> `loading?` | `boolean` | With the value `true`, the spec is still streaming, for example from an AI provider. The renderer gives the flag to `renderSpec`. A component implementation therefore reads `ctx.ctx.loading`, and it can render a skeleton state. The flag also stops each warning about an absent child during the ingestion of the stream, because an element of a reference can still be absent from the incremental spec. This option matches the `loading` prop of the framework renderer providers. | - | [packages/play-dom/src/types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L54) |
26
+ | <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Programmatic navigation function. Called automatically when an action binding resolves with `onSuccess: { navigate: "/path" }`. The resolved path string is passed as the sole argument. Mirrors the `navigate` prop in `ActionProvider` from the framework renderers, where it is captured in the `execute()` closure. Also available to component implementations directly via `ctx.ctx.navigate` for cases where navigation needs to be triggered outside of an action binding. **Example** `import { useNavigate } from "my-router"; const navigate = useNavigate(); renderSpec(spec, store, registry, { navigate });` Spec binding that triggers navigation: `{ "on": { "click": { "action": "doSomething", "onSuccess": { "navigate": "/dashboard" } } } }` | [`UIProviderOptions`](UIProviderOptions.md).[`navigate`](UIProviderOptions.md#property-navigate) | - |
27
+ | <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook for actions that declare `confirm` in their binding. Consulted by `emit()` before executing a confirm-gated action. Return (or resolve) `true` to execute, `false` to skip. Without this handler, confirm-gated actions are skipped with a `console.warn` they never execute unconfirmed. See [ConfirmHandler](../type-aliases/ConfirmHandler.md) for the full contract. This is the headless equivalent of the `pendingConfirmation` / `confirmAction()` / `cancelAction()` flow in the framework adapters. | [`UIProviderOptions`](UIProviderOptions.md).[`onConfirm`](UIProviderOptions.md#property-onconfirm) | - |
28
+ | <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | The optional handler of a failure of a complete rebuild of the view. This option is NOT the same as `onRenderError`, which [UIProviderOptions](UIProviderOptions.md) gives: the inner renderer routes a render error of one component, and a rejection of one action handler, to `onRenderError`. It contains each of them per element, and the rebuild continues. `onError` receives the failure of the complete rebuild that no per-element boundary caught. The renderer CONTAINS a rebuild that throws, with this option and without it: it resets the state of the failed rebuild, so that the next emission makes a complete render again, and it clears the container. `connect()` renders the first view synchronously, so a bad initial view makes `connect()` throw no more. A WRITE of the store takes the same path. The renderer resolves the props of every element that the write touched, so a `$computed` function that throws on the new state aborts that render too. The renderer contains such a failure as well, and the action handler that wrote the state receives no exception. This option says WHERE the report goes. Without it, the renderer writes the contained failure to `console.error`. A handler that THROWS reaches no caller: the renderer contains that throw too, and it writes the throw to `console.error`. A host that must escalate a failure raises it from a task of its own — `queueMicrotask(() => { throw error; })` which reaches the global handler of the page and leaves the containment whole. The five renderers hold this one rule. The second parameter is the RESET, for a retry that the host starts — a "Retry" button of its own. It renders the view that the actor holds at the MOMENT OF THE CALL, so a host that keeps the callback cannot rewind the screen to the view that failed. A reset that the host calls from inside this handler does nothing, because no input changed between the two attempts, and a reset after `disconnect()` does nothing. A reset belongs to ONE connection. `connect()` starts a connection, and the reset of a report of an older connection does nothing. A host that calls `connect()` again from inside this handler abandons the connection that reported. The "Retry" button of that report must not render into the connection that took its place. Call the reset of the newest report. This option matches the `onError` prop of the framework renderer providers, and the five renderers hold the same three rules for the reset. | - | [packages/play-dom/src/types.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L100) |
29
+ | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Unified error handler for component render errors and action handler rejections. Matches `RenderErrorHandler = (error: unknown, name: string) => void`. Invoked for three distinct error classes: - `(error, elementType)` when a component renderer throws synchronously during `renderSpec` - `(error, actionName)` — when an action handler rejects during `emit()` (on-event path) - `(error, actionName)` when an action handler rejects during a `watch` binding callback When provided, suppresses the `console.error` fallback for all three error types. Forwarded into `renderSpec` as the `onRenderError` parameter and into `DomRenderContext.onRenderError` so both `emit()` and `watch` handlers route their errors through the same channel as component render errors. **Example** `renderSpec(spec, store, registry, { onRenderError: (err, name) => { myErrorReporter.capture(err, { context: name }); }, });` | [`UIProviderOptions`](UIProviderOptions.md).[`onRenderError`](UIProviderOptions.md#property-onrendererror) | - |
30
+ | <a id="property-registryresult"></a> `registryResult?` | [`DefineRegistryResult`](DefineRegistryResult.md) | The result of `defineRegistry`. It gives the registry and the factory of the handlers. With this option, `PlayRenderer` connects `setState` and `getState` of the `StateStore` on @xstate/store to the factory of the handlers for you. This is the preferred way, because each action then always receives a live `setState` and a live `state` on the current store. | - | [packages/play-dom/src/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L32) |
31
+ | <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, for example from `xstateStoreStateStore` in @xmachines/json-render-xstate. With this option, `PlayRenderer` works in the controlled mode: it ignores `spec.state`, and this store is the single source of truth of the UI state, such as a form value. Without this option, the renderer makes a new `@xstate/store` atom for each view transition, with the values of `spec.state`. | - | [packages/play-dom/src/types.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/types.ts#L42) |
32
+ | <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions for inline field validation. Each function receives `(value, args?)` and returns `true` (valid) or `false` (invalid). Functions are available to component implementations via `ctx.ctx.validationFunctions` and should be passed as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. Mirrors `customFunctions` in `ValidationProvider` from the framework renderers. The DOM renderer has no automatic `ValidationProvider` tree — validation must be invoked explicitly by component implementations. **Example** `import { runValidationCheck } from "@xmachines/json-render-core"; renderSpec(spec, store, registry, { validationFunctions: { isEven: (value) => typeof value === "number" && value % 2 === 0, phoneNumber: (value) => /^\+?[\d\s\-()]{7,}$/.test(String(value)), }, }); // Inside a ComponentFn: const MyField: ComponentFn<typeof catalog, "MyField"> = ({ ctx }) => { const result = runValidationCheck( { type: "isEven", message: "must be even" }, { value: someValue, stateModel: {}, customFunctions: ctx.ctx.validationFunctions }, ); // result.valid, result.message };` | [`UIProviderOptions`](UIProviderOptions.md).[`validationFunctions`](UIProviderOptions.md#property-validationfunctions) | - |
@@ -0,0 +1,38 @@
1
+ [API](../../../README.md) / [@xmachines/play-dom](../README.md) / Cleanup
2
+
3
+ # Type Alias: Cleanup
4
+
5
+ ```ts
6
+ type Cleanup = () => void & { [Key in DisposeKey]: () => void };
7
+ ```
8
+
9
+ Defined in: [packages/play/src/disposable.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play/src/disposable.ts#L66)
10
+
11
+ The release of a subscription. A caller runs it, or a scope releases it.
12
+
13
+ The type is a function AND a `Disposable`, so one value serves both forms. A caller
14
+ that holds the release in a field and runs it from a teardown keeps that code. A
15
+ caller inside one scope writes `using` and writes no teardown at all:
16
+
17
+ ```ts
18
+ // The explicit form. It stays correct.
19
+ const stop = watchSignal(count, render);
20
+ stop();
21
+
22
+ // The scoped form. The scope releases it, and an exception releases it too.
23
+ {
24
+ using stop = watchSignal(count, render);
25
+ render(count.get());
26
+ }
27
+ ```
28
+
29
+ `using` needs Node 24 or a browser with Explicit Resource Management, and it needs
30
+ `"lib": ["ESNext"]` of the consumer. The publishable packages build at
31
+ `target: "esnext"` and pass the syntax through, so the bundler of the consumer decides
32
+ how to emit it. The `Cleanup` VALUE needs neither: a runtime without `Symbol.dispose`
33
+ still calls it as a function, and a consumer that declares a lower `lib` still reads
34
+ the type. See [DisposeKey](../../play/type-aliases/DisposeKey.md) for the second half of that.
35
+
36
+ ## See
37
+
38
+ [Play RFC](../../../../rfc/play.md)
@@ -0,0 +1,36 @@
1
+ [API](../../../README.md) / [@xmachines/play-dom](../README.md) / DisposablePlayUI
2
+
3
+ # Type Alias: DisposablePlayUI
4
+
5
+ ```ts
6
+ type DisposablePlayUI = (...args) => Cleanup;
7
+ ```
8
+
9
+ Defined in: [packages/play-dom/src/create-play-ui.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/create-play-ui.ts#L102)
10
+
11
+ The mount function that [createPlayUI](../functions/createPlayUI.md) builds.
12
+
13
+ It IS a [MountFn](MountFn.md), and it says one thing more: the mount hands back a
14
+ [Cleanup](Cleanup.md), so a caller may release it with `using` and write no teardown.
15
+
16
+ ```ts
17
+ const mount = createPlayUI(registryResult);
18
+ {
19
+ using stop = mount(actor, container);
20
+ // stop() runs at the end of the scope, and after an exception too
21
+ }
22
+ ```
23
+
24
+ A narrowed return and not a narrowed `MountFn`: the return type of a function may
25
+ narrow, so this costs a consumer that writes a `MountFn` nothing. The parameters come
26
+ from `MountFn` through `Parameters`, so the two signatures cannot drift.
27
+
28
+ ## Parameters
29
+
30
+ | Parameter | Type |
31
+ | --------- | --------------------------------------- |
32
+ | ...`args` | `Parameters`\<[`MountFn`](MountFn.md)\> |
33
+
34
+ ## Returns
35
+
36
+ [`Cleanup`](Cleanup.md)
@@ -6,7 +6,7 @@
6
6
  type MountFn = (actor, container, options?) => () => void;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-dom/src/create-play-ui.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom/src/create-play-ui.ts#L71)
9
+ Defined in: [packages/play-dom/src/create-play-ui.ts:78](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom/src/create-play-ui.ts#L78)
10
10
 
11
11
  The mount function that `createPlayUI` returns.
12
12
 
@@ -14,6 +14,11 @@ Call it with `(actor, container, mountOptions?)` to start the renderer.
14
14
  It returns a `disconnect` cleanup function. That function stops the render and
15
15
  clears the container.
16
16
 
17
+ The return is a plain function here, because a consumer WRITES a value of this type
18
+ to wrap or to stand in for a mount. A [Cleanup](Cleanup.md) return would refuse every such
19
+ function that hands a plain release back. [DisposablePlayUI](DisposablePlayUI.md) narrows it for the
20
+ value that [createPlayUI](../functions/createPlayUI.md) builds, which nothing writes by hand.
21
+
17
22
  ## Parameters
18
23
 
19
24
  | Parameter | Type |
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Vanilla DOM router (Browser History API) for XMachines Play Architecture.**
6
6
 
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.1-blue)](https://www.npmjs.com/package/@xmachines/play-dom-router)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-3.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-dom-router)
8
8
 
9
9
  This framework-agnostic router integration keeps the `currentRoute` TC39 Signal of a Play actor and the `window.history` API of the browser in step. It needs no framework. It implements the same [`RouterBridgeBase`](../play-router/README.md) pattern as every other router adapter in the XMachines ecosystem.
10
10
 
@@ -33,19 +33,22 @@ pnpm add xstate@^5.31.0
33
33
 
34
34
  | Export | Description |
35
35
  | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
36
- | `createBrowserHistory(options)` | Wraps `window.history` with a subscribable `BrowserHistory` interface |
37
- | `createRouter(options)` | Creates a `VanillaRouter` from a `BrowserHistory` and a `RouteTree` |
38
- | `connectRouter(options)` | Connects a `VanillaRouter` to a `Routable` actor — returns a `disconnect` cleanup function |
36
+ | `createBrowserHistory(options)` | Wraps `window.history`. It returns a `DisposableBrowserHistory` |
37
+ | `createRouter(options)` | Creates a `DisposableVanillaRouter` from a `BrowserHistory` and a `RouteTree`, which `using` releases |
38
+ | `connectRouter(options)` | Connects a `VanillaRouter` to a `Routable` actor — returns a `RouterConnection`, which `using` releases |
39
39
  | `DomRouterBridge` | The low-level bridge class. It extends `RouterBridgeBase`. Use it directly for full lifecycle control |
40
40
  | `createRouteMap` | It comes from `@xmachines/play-router`. It builds the bidirectional path ↔ state ID map |
41
- | `BrowserHistory` | Interface for the history wrapper |
41
+ | `BrowserHistory` | Interface for the history wrapper. Implement it to inject a history of your own |
42
+ | `DisposableBrowserHistory` | What `createBrowserHistory` returns: `subscribe` hands a `Cleanup` back, and the history itself is a `Disposable` |
42
43
  | `BrowserWindow` | Structural window interface (accepts `Window`, JSDOM, or any test double) |
43
- | `VanillaRouter` | Interface for the router wrapper |
44
+ | `VanillaRouter<History>` | The router wrapper. `History` carries the history of the caller, so a `DisposableBrowserHistory` stays one |
45
+ | `DisposableVanillaRouter<History>` | What `createRouter` returns: a `VanillaRouter` that carries the dispose key, so a `using` scope holds it |
44
46
  | `ConnectRouterOptions` | Options type for `connectRouter` |
45
47
  | `RouteLookupContract` | Structural interface for bidirectional route lookup |
46
48
  | `RoutableActor` | Minimal actor interface from `@xmachines/play-router` — `currentRoute`, `initialRoute`, and `send(PlayRouteEvent)` |
47
49
  | `RouterBridge`, `PlayRouteEvent` | Types re-exported from `@xmachines/play-router` |
48
50
  | `RouteMap`, `RouteMapping`, `RouteMapOptions` | Types re-exported from `@xmachines/play-router` |
51
+ | `DISPOSE`, `Cleanup` | The release protocol that `subscribe` and `DisposableBrowserHistory` name, re-exported from `@xmachines/play` |
49
52
 
50
53
  ## Quick Start
51
54
 
@@ -121,17 +124,17 @@ history.destroy();
121
124
 
122
125
  **`BrowserHistory` interface:**
123
126
 
124
- | Method | Description |
125
- | ----------------------- | ---------------------------------------------------------------------------------------------------- |
126
- | `location` | Read-only `{ pathname, search, hash, state }` |
127
- | `push(path, state?)` | Push a new entry to history |
128
- | `replace(path, state?)` | Replace the current history entry |
129
- | `go(delta)` | Navigate relative to current position |
130
- | `back()` | Navigate backward |
131
- | `forward()` | Navigate forward |
132
- | `subscribe(listener)` | Subscribe to location changes — returns unsubscribe function |
133
- | `createHref(path)` | Create an href from a path |
134
- | `destroy()` | Cleans up. It removes the listeners, and it restores the patched methods when it is the last wrapper |
127
+ | Method | Description |
128
+ | ----------------------- | -------------------------------------------------------------------------------------------------------- |
129
+ | `location` | Read-only `{ pathname, search, hash, state }` |
130
+ | `push(path, state?)` | Push a new entry to history |
131
+ | `replace(path, state?)` | Replace the current history entry |
132
+ | `go(delta)` | Navigate relative to current position |
133
+ | `back()` | Navigate backward |
134
+ | `forward()` | Navigate forward |
135
+ | `subscribe(listener)` | Subscribe to location changes — returns an unsubscribe function, a `Cleanup` from `createBrowserHistory` |
136
+ | `createHref(path)` | Create an href from a path |
137
+ | `destroy()` | Cleans up. It removes the listeners, and it restores the patched methods when it is the last wrapper |
135
138
 
136
139
  **`BrowserWindow` interface:**
137
140
 
@@ -139,7 +142,7 @@ The interface accepts `window`, a JSDOM window, or every other object that imple
139
142
 
140
143
  ### `createRouter(options)`
141
144
 
142
- This function creates a `VanillaRouter` around a `history` and a `routeTree`. Its setup flow is the same as the setup flow of TanStack Router.
145
+ This function creates a `DisposableVanillaRouter` around a `history` and a `routeTree`. Its setup flow is the same as the setup flow of TanStack Router.
143
146
 
144
147
  ```typescript
145
148
  // routeTree and history from the Quick Start above
@@ -149,6 +152,19 @@ const router = createRouter({ routeTree, history });
149
152
  // router.destroy() — calls history.destroy()
150
153
  ```
151
154
 
155
+ Or let a scope release it, which also releases the history on an exception:
156
+
157
+ ```typescript
158
+ using router = createRouter({ routeTree, history });
159
+ ```
160
+
161
+ The return is a `DisposableVanillaRouter`. The dispose key and `destroy()` run the same
162
+ body, and the release is idempotent, so a caller that keeps `destroy()` keeps it.
163
+
164
+ **The release covers the history alone.** `connectRouter` hands back its own
165
+ `RouterConnection`, and a scope that ends releases no connection for you. Release the
166
+ connection first, then the router.
167
+
152
168
  ### `connectRouter(options)`
153
169
 
154
170
  This function connects a `VanillaRouter` to a `Routable` actor. It does all the work in both directions:
@@ -268,9 +284,12 @@ MIT — see [LICENSE](LICENSE).
268
284
 
269
285
  ## Interfaces
270
286
 
287
+ - [BasePathOptions](interfaces/BasePathOptions.md)
271
288
  - [BrowserHistory](interfaces/BrowserHistory.md)
272
289
  - [BrowserWindow](interfaces/BrowserWindow.md)
273
290
  - [ConnectRouterOptions](interfaces/ConnectRouterOptions.md)
291
+ - [DisposableBrowserHistory](interfaces/DisposableBrowserHistory.md)
292
+ - [DisposableVanillaRouter](interfaces/DisposableVanillaRouter.md)
274
293
  - [PlayRouteEvent](interfaces/PlayRouteEvent.md)
275
294
  - [RoutableActor](interfaces/RoutableActor.md)
276
295
  - [RouteLookupContract](interfaces/RouteLookupContract.md)
@@ -278,8 +297,17 @@ MIT — see [LICENSE](LICENSE).
278
297
  - [RouteMapOptions](interfaces/RouteMapOptions.md)
279
298
  - [RouteMapping](interfaces/RouteMapping.md)
280
299
  - [RouterBridge](interfaces/RouterBridge.md)
300
+ - [RouterConnection](interfaces/RouterConnection.md)
281
301
  - [VanillaRouter](interfaces/VanillaRouter.md)
282
302
 
303
+ ## Type Aliases
304
+
305
+ - [Cleanup](type-aliases/Cleanup.md)
306
+
307
+ ## Variables
308
+
309
+ - [DISPOSE](variables/DISPOSE.md)
310
+
283
311
  ## Functions
284
312
 
285
313
  - [connectRouter](functions/connectRouter.md)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: DomRouterBridge
4
4
 
5
- Defined in: [play-dom-router/src/dom-router-bridge.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom-router/src/dom-router-bridge.ts#L26)
5
+ Defined in: [play-dom-router/src/dom-router-bridge.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom-router/src/dom-router-bridge.ts#L27)
6
6
 
7
7
  The DOM router bridge — it puts a BrowserHistory from `createBrowserHistory`
8
8
  behind the `RouterBridgeBase` protocol.
@@ -19,7 +19,7 @@ It overrides two optional hooks:
19
19
  - `getInitialRouterSearch` → `history.location.search`
20
20
 
21
21
  The bridge inherits the prevention of a circular update, the
22
- restore-or-deeplink detection, and the `lastSyncedPath` deduplication from
22
+ restore-or-deeplink detection, and the echo suppression of both directions from
23
23
  `RouterBridgeBase`.
24
24
 
25
25
  Use `connectRouter` for the usual case. Use this class directly when you need
@@ -37,10 +37,11 @@ full control of the connection lifecycle.
37
37
  new DomRouterBridge(
38
38
  actor,
39
39
  routeMap,
40
- history): DomRouterBridge;
40
+ history,
41
+ options?): DomRouterBridge;
41
42
  ```
42
43
 
43
- Defined in: [play-dom-router/src/dom-router-bridge.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-dom-router/src/dom-router-bridge.ts#L34)
44
+ Defined in: [play-dom-router/src/dom-router-bridge.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-dom-router/src/dom-router-bridge.ts#L35)
44
45
 
45
46
  #### Parameters
46
47
 
@@ -49,6 +50,7 @@ Defined in: [play-dom-router/src/dom-router-bridge.ts:34](https://gitlab.com/xma
49
50
  | `actor` | [`RoutableActor`](../interfaces/RoutableActor.md) | A `Routable` actor with `currentRoute` and `send`. |
50
51
  | `routeMap` | [`RouteLookupContract`](../interfaces/RouteLookupContract.md) | The route lookup for both directions. Every object that satisfies [RouteLookupContract](../interfaces/RouteLookupContract.md) works. |
51
52
  | `history` | [`BrowserHistory`](../interfaces/BrowserHistory.md) | The BrowserHistory instance from `createBrowserHistory`. |
53
+ | `options?` | [`BasePathOptions`](../interfaces/BasePathOptions.md) | - |
52
54
 
53
55
  #### Returns
54
56
 
@@ -58,6 +60,84 @@ Defined in: [play-dom-router/src/dom-router-bridge.ts:34](https://gitlab.com/xma
58
60
 
59
61
  [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`constructor`](../../play-router/classes/RouterBridgeBase.md#constructor)
60
62
 
63
+ ## Accessors
64
+
65
+ ### basePath
66
+
67
+ #### Get Signature
68
+
69
+ ```ts
70
+ get basePath(): string;
71
+ ```
72
+
73
+ Defined in: [play-router/src/router-bridge-base.ts:255](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L255)
74
+
75
+ The resolved URL prefix that the machine of this bridge is mounted under, or `""`
76
+ when the machine owns the complete router.
77
+
78
+ ##### Returns
79
+
80
+ `string`
81
+
82
+ The resolved URL prefix of the mount, or `""` when the machine owns the complete router.
83
+
84
+ #### Inherited from
85
+
86
+ [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`basePath`](../../play-router/classes/RouterBridgeBase.md#basepath)
87
+
88
+ ---
89
+
90
+ ### basePathParams
91
+
92
+ #### Get Signature
93
+
94
+ ```ts
95
+ get basePathParams(): Readonly<Record<string, string>>;
96
+ ```
97
+
98
+ Defined in: [play-router/src/router-bridge-base.ts:284](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L284)
99
+
100
+ The resolved values of the `:param` segments of the mount, or `{}` for a prefix
101
+ without a param.
102
+
103
+ These params belong to the HOST: the host wrote the prefix and resolved the
104
+ values, and they describe the route of the host and not the route of the machine.
105
+ They therefore travel in NO `play.route` event. The machine is authoritative over
106
+ its own params, and `event.params` holds what the pattern of the machine
107
+ declares, and nothing else.
108
+
109
+ They live here instead, because a value that reached the actor on a navigation
110
+ ALONE would go stale: `setBasePath()` can move the mount while the machine stays
111
+ on the same route, no event goes out, and `event.params` would then contradict
112
+ `basePath`. A read of this accessor cannot go stale.
113
+
114
+ A machine that needs the identity of its host — a `machineId`, a tenant — takes
115
+ it through the `input` of the actor, where it belongs: that identity decides
116
+ WHICH machine runs, and it is not a param of a route inside the machine.
117
+
118
+ ##### Example
119
+
120
+ ```typescript
121
+ bridge.basePath; // "/abc123/play"
122
+ bridge.basePathParams; // { machineId: "abc123" }
123
+ ```
124
+
125
+ ##### Returns
126
+
127
+ `Readonly`\<`Record`\<`string`, `string`\>\>
128
+
129
+ The resolved values of the `:param` segments of the mount, or `{}` for a prefix
130
+ without a param.
131
+
132
+ These params belong to the HOST, so they travel in NO `play.route` event — the
133
+ machine is authoritative over its own params. This accessor is therefore the one
134
+ way a host reads them back, and it cannot go stale: `setBasePath()` can move the
135
+ mount while the machine stays on the same route, and no event goes out.
136
+
137
+ #### Inherited from
138
+
139
+ [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`basePathParams`](../../play-router/classes/RouterBridgeBase.md#basepathparams)
140
+
61
141
  ## Methods
62
142
 
63
143
  ### connect()
@@ -66,7 +146,7 @@ Defined in: [play-dom-router/src/dom-router-bridge.ts:34](https://gitlab.com/xma
66
146
  connect(): void;
67
147
  ```
68
148
 
69
- Defined in: [play-router/src/router-bridge-base.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/router-bridge-base.ts#L158)
149
+ Defined in: [play-router/src/router-bridge-base.ts:506](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L506)
70
150
 
71
151
  Connects the router bridge to the Actor.
72
152
 
@@ -76,7 +156,7 @@ in its own way.
76
156
 
77
157
  The order of these steps is part of the contract of the bridge:
78
158
 
79
- - The constructor seeds `lastSyncedPath` from `actor.currentRoute`
159
+ - The constructor seeds `lastActorRoute` from `actor.currentRoute`, and it records no location
80
160
  - The method installs the actor watcher before the router subscriptions of the adapter
81
161
  - The first synchronization then separates a deep link from a restore, with `actor.initialRoute`
82
162
 
@@ -100,7 +180,7 @@ An adapter that needs a different behavior of the first synchronization override
100
180
  disconnect(): void;
101
181
  ```
102
182
 
103
- Defined in: [play-router/src/router-bridge-base.ts:270](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/router-bridge-base.ts#L270)
183
+ Defined in: [play-router/src/router-bridge-base.ts:728](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L728)
104
184
 
105
185
  Disconnects the router bridge from the Actor.
106
186
 
@@ -114,3 +194,65 @@ framework.
114
194
  #### Inherited from
115
195
 
116
196
  [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`disconnect`](../../play-router/classes/RouterBridgeBase.md#disconnect)
197
+
198
+ ---
199
+
200
+ ### setBasePath()
201
+
202
+ ```ts
203
+ setBasePath(basePath?, basePathParams?): void;
204
+ ```
205
+
206
+ Defined in: [play-router/src/router-bridge-base.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L324)
207
+
208
+ Moves the machine to a different mount point, while it stays connected.
209
+
210
+ This is the "load and unload" half of a shared router. It moves WHERE an actor is
211
+ mounted, and never WHICH actor is mounted: the actor, the route map, and its LRU
212
+ cache all stay, and nothing goes away.
213
+
214
+ An actor never changes identity. A prefix that IDENTIFIES the actor — a
215
+ `machineId` that names the document it runs — therefore never moves through this
216
+ method: a new identity is a new actor, and a new actor takes a new bridge, because
217
+ `connect()` permits one bridge for each actor. The segments that move here are the
218
+ ones that LOCATE: a region, a locale, a tenant, a workspace slug.
219
+
220
+ The call then brings the location in step with the NEW prefix. A location inside
221
+ the new mount runs the same first-synchronization decision as `connect()`: it
222
+ drives the actor, and a restore keeps the route of the actor. A location OUTSIDE
223
+ the new mount is the old mount in practice, so the bridge writes the new one
224
+ itself, and it keeps the route of the actor while it does so — nothing else moves
225
+ the address bar. A call that resolves to the current prefix changes no location,
226
+ and it therefore reconciles nothing.
227
+
228
+ #### Parameters
229
+
230
+ | Parameter | Type | Description |
231
+ | ----------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
232
+ | `basePath?` | `string` | The new prefix, as a pattern or as a concrete path. An absent value, `""`, and `"/"` all remove the prefix, and they give the machine the complete router again. |
233
+ | `basePathParams?` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of `basePath`. |
234
+
235
+ #### Returns
236
+
237
+ `void`
238
+
239
+ #### Throws
240
+
241
+ For a prefix that resolves to one concrete path never.
242
+
243
+ #### Throws
244
+
245
+ When a `:param` of the prefix has no value.
246
+
247
+ #### Example
248
+
249
+ ```typescript
250
+ // The host moved this actor to another place in its URL space. `machineId` names
251
+ // WHICH document the actor runs, and it does not change: a new identity is a new
252
+ // actor, and therefore a new bridge, because one actor takes one bridge.
253
+ bridge.setBasePath("/:region/:machineId/play", { region: "us", machineId });
254
+ ```
255
+
256
+ #### Inherited from
257
+
258
+ [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`setBasePath`](../../play-router/classes/RouterBridgeBase.md#setbasepath)