@xmachines/docs 2.1.1 → 2.2.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 (336) hide show
  1. package/README.md +2 -2
  2. package/api/@xmachines/play/README.md +1 -1
  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/assertNonNullable.md +1 -1
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  7. package/api/@xmachines/play-actor/README.md +1 -1
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +1 -1
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +1 -1
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +1 -1
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +1 -1
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +1 -1
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +1 -1
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
  18. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
  19. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
  20. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +2 -2
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +3 -3
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +4 -4
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +1 -1
  27. package/api/@xmachines/play-dom/README.md +1 -1
  28. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  29. package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
  30. package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
  31. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +2 -2
  32. package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
  33. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +4 -4
  34. package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
  35. package/api/@xmachines/play-dom-router/README.md +3 -1
  36. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +149 -7
  37. package/api/@xmachines/play-dom-router/functions/connectRouter.md +6 -5
  38. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  39. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
  40. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  41. package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +32 -0
  42. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
  43. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
  44. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +12 -6
  45. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
  46. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
  47. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  48. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
  49. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
  50. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
  51. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
  52. package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +76 -0
  53. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
  54. package/api/@xmachines/play-react/README.md +1 -1
  55. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
  56. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  57. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  58. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  59. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
  60. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  61. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  62. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
  63. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
  64. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
  65. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +1 -1
  66. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  67. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  68. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  69. package/api/@xmachines/play-react-router/README.md +2 -2
  70. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +172 -15
  71. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  72. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +7 -18
  73. package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
  74. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  75. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
  76. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  77. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  78. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
  79. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  80. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  81. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  82. package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  83. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
  84. package/api/@xmachines/play-router/README.md +297 -11
  85. package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
  86. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +178 -19
  87. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  88. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  89. package/api/@xmachines/play-router/functions/cleanFrameworkParams.md +40 -0
  90. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
  92. package/api/@xmachines/play-router/functions/createRouterConnection.md +21 -0
  93. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  94. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  95. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  96. package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
  97. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  98. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  99. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  100. package/api/@xmachines/play-router/functions/getPatternParamNames.md +24 -0
  101. package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +36 -0
  102. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  103. package/api/@xmachines/play-router/functions/getRouteMappings.md +67 -0
  104. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  105. package/api/@xmachines/play-router/functions/isMountableBridge.md +26 -0
  106. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  107. package/api/@xmachines/play-router/functions/joinBasePath.md +37 -0
  108. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  109. package/api/@xmachines/play-router/functions/mountKey.md +28 -0
  110. package/api/@xmachines/play-router/functions/normalizeBasePath.md +43 -0
  111. package/api/@xmachines/play-router/functions/openProviderBridge.md +41 -0
  112. package/api/@xmachines/play-router/functions/pickOwnParams.md +41 -0
  113. package/api/@xmachines/play-router/functions/repointProviderBridge.md +27 -0
  114. package/api/@xmachines/play-router/functions/resolveBasePath.md +51 -0
  115. package/api/@xmachines/play-router/functions/resolveFrameworkParams.md +51 -0
  116. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  117. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  118. package/api/@xmachines/play-router/functions/stripBasePath.md +44 -0
  119. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  120. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  121. package/api/@xmachines/play-router/interfaces/BasePathOptions.md +32 -0
  122. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  123. package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +47 -0
  124. package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
  125. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  126. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  127. package/api/@xmachines/play-router/interfaces/MountableRouterBridge.md +130 -0
  128. package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +28 -0
  129. package/api/@xmachines/play-router/interfaces/PlayActor.md +5 -5
  130. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
  131. package/api/@xmachines/play-router/interfaces/PlayRouterProviderBaseProps.md +33 -0
  132. package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +14 -0
  133. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +3 -3
  134. package/api/@xmachines/play-router/interfaces/RoutableActor.md +4 -4
  135. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  136. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +2 -2
  137. package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
  138. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  139. package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
  140. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  141. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  142. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  143. package/api/@xmachines/play-router/interfaces/RouterBridge.md +7 -3
  144. package/api/@xmachines/play-router/interfaces/RouterConnection.md +76 -0
  145. package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
  146. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +1 -1
  147. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  148. package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +36 -0
  149. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  150. package/api/@xmachines/play-router/variables/NO_BASE_PATH.md +18 -0
  151. package/api/@xmachines/play-signals/README.md +1 -1
  152. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  153. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  154. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  155. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  156. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  157. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  158. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  159. package/api/@xmachines/play-solid/README.md +1 -1
  160. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  161. package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
  162. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
  163. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
  164. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
  165. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
  166. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  167. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  168. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  169. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  170. package/api/@xmachines/play-solid-router/README.md +19 -3
  171. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  172. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +166 -18
  173. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +8 -18
  174. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  175. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  176. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
  177. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  178. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  179. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
  180. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  181. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  182. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +14 -12
  183. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  184. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  185. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  186. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +4 -4
  187. package/api/@xmachines/play-svelte/README.md +1 -1
  188. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  189. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  190. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
  191. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  192. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
  193. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
  194. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
  195. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
  196. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
  197. package/api/@xmachines/play-svelte-spa-router/README.md +3 -1
  198. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
  199. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +148 -6
  200. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  201. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
  202. package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +32 -0
  203. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +12 -6
  204. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
  205. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
  206. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
  207. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  208. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +76 -0
  209. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  210. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  211. package/api/@xmachines/play-sveltekit-router/README.md +3 -1
  212. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
  213. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +148 -6
  214. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  215. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
  216. package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +32 -0
  217. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +28 -6
  218. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
  219. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
  220. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
  221. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
  222. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  223. package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +76 -0
  224. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  225. package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
  226. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  227. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +148 -6
  228. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +7 -18
  229. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  230. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  231. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  232. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +5 -5
  233. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  234. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  235. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
  236. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  237. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  238. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  239. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  240. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  241. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  242. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
  243. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +4 -4
  244. package/api/@xmachines/play-tanstack-router/README.md +1 -1
  245. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +153 -11
  246. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
  247. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
  248. package/api/@xmachines/play-tanstack-solid-router/README.md +2 -2
  249. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  250. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +149 -7
  251. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +7 -17
  252. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  253. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
  254. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
  255. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  256. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
  257. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  258. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  259. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  260. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  261. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  262. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  263. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +5 -5
  264. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +4 -4
  265. package/api/@xmachines/play-vue/README.md +1 -1
  266. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  267. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  268. package/api/@xmachines/play-vue/functions/usePlayView.md +1 -1
  269. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
  270. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
  271. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
  272. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
  273. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
  274. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  275. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  276. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  277. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  278. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +1 -1
  279. package/api/@xmachines/play-vue-router/README.md +1 -1
  280. package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
  281. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +154 -12
  282. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  283. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
  284. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  285. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
  286. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
  287. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  288. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  289. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +1 -1
  290. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +25 -2
  291. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +1 -1
  292. package/api/@xmachines/play-xstate/README.md +1 -1
  293. package/api/@xmachines/play-xstate/classes/PlayerActor.md +16 -16
  294. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  295. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  296. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  297. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  298. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  299. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  300. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  301. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  302. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  303. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  304. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  305. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  306. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  307. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +7 -7
  308. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  309. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  310. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  311. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  312. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  313. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  314. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  315. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  316. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  317. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  318. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  319. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  320. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  321. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  322. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  323. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  324. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  325. package/contributing/configuration.md +1 -1
  326. package/contributing/development.md +16 -16
  327. package/contributing/testing.md +31 -4
  328. package/examples/README.md +1 -1
  329. package/examples/multi-router-integration.md +126 -1
  330. package/examples/routing-patterns.md +1 -1
  331. package/guides/inspector.md +1 -1
  332. package/package.json +1 -1
  333. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  334. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -30
  335. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  336. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -31
@@ -4,7 +4,7 @@
4
4
 
5
5
  Route tree extraction from XState v5 state machines. Part of [@xmachines/play](../play/README.md) Universal Player 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-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-2.2.0-blue)](https://www.npmjs.com/package/@xmachines/play-router)
8
8
 
9
9
  This package extracts the routes from a machine graph and looks them up in both directions. The Actor therefore keeps the authority over the navigation.
10
10
 
@@ -38,6 +38,8 @@ pnpm add urlpattern-polyfill
38
38
 
39
39
  `urlpattern-polyfill` is an optional peer dependency. A package manager does not install it for you. Install it and load it yourself when your runtime has no native URLPattern.
40
40
 
41
+ **When you need it:** `RouteMap` compiles each parameterized route in its CONSTRUCTOR, and it throws a `URLPatternUnavailableError` there when no URLPattern is available. One route that holds a `:param` or a `*` therefore makes the polyfill a startup requirement on such a runtime. A route map whose paths are all static needs URLPattern never.
42
+
41
43
  ## Usage
42
44
 
43
45
  ### Extract routes from a machine
@@ -125,6 +127,209 @@ actor.send({
125
127
  });
126
128
  ```
127
129
 
130
+ ### Sharing a router with the host (`basePath`)
131
+
132
+ A machine owns the complete URL space of its router by default. Give a `basePath`,
133
+ and it owns a prefix only: the host keeps the rest of the same router.
134
+
135
+ The shape that motivates this option is a URL such as `/:machineId/play/dashboard`.
136
+ The host resolves `:machineId` — in a loader of TanStack, in a `useParams()` call, in
137
+ a `load` function of SvelteKit — and the `meta.route` tree of the machine gives
138
+ everything below `/:machineId/play`.
139
+
140
+ ```typescript
141
+ // The route of the host is /$machineId/play/$ and its loader resolved machineId.
142
+ const disconnect = connectRouter({
143
+ actor,
144
+ router,
145
+ routeMap, // unchanged — the route map stays relative to the machine
146
+ basePath: "/:machineId/play",
147
+ basePathParams: { machineId },
148
+ });
149
+
150
+ // The "/dashboard" of the machine is now the URL "/abc123/play/dashboard".
151
+ // The "/" of the machine is now the URL "/abc123/play".
152
+ ```
153
+
154
+ The prefix can be a pattern, so that you keep one string that mirrors your route
155
+ config, but every `:param` needs a value in `basePathParams`. The bridge writes a
156
+ real browser URL, so it resolves the prefix in advance, and it refuses each shape
157
+ that resolves to one concrete path never: a `*` wildcard, a `:param?`, a `$param`
158
+ (the spelling of TanStack — write `:param`), a query string, and a hash. A base path
159
+ is a PATHNAME, so it also refuses a URL scheme: give `/admin`, and never
160
+ `https://app.example.com/admin`.
161
+
162
+ It also refuses every segment that a browser REWRITES, and it refuses the resolved
163
+ value of a `:param` on the same rule: a dot segment (`.`, `..`, and their
164
+ percent-encoded forms), a backslash, whitespace, and a character that a URL
165
+ percent-encodes, such as the `é` of `/café`. Each of them makes the prefix that comes
166
+ back differ from the prefix that went out, so every location would read as foreign
167
+ and the machine would go permanently silent. Give the segment in the form that a URL
168
+ carries: `/caf%C3%A9`.
169
+
170
+ **An unresolved `:param` throws** a `MissingBasePathParamError`, at the construction
171
+ and not on the first navigation. There is no "not ready yet" fallback, on purpose: a
172
+ bridge without a prefix would claim the complete router, and it would start to
173
+ correct the URLs of the host, which is worse than a loud failure. Resolve the value
174
+ before you connect or render — a route loader or a `useParams()` call holds it
175
+ already.
176
+
177
+ **A location outside the prefix belongs to the host.** The bridge sends no
178
+ `play.route` event there, it runs no corrective navigation there, and it writes no
179
+ route of its actor there. That silence lets the two halves live together, and it holds
180
+ in both directions: a route change that no URL event caused — an `after` timer, an
181
+ async guard that settles, a restore of a snapshot — would otherwise drag the user off
182
+ the page of the host. The bridge remembers such a move, and it writes it when the
183
+ location comes back under the prefix, so the machine keeps its place. Inside the mount
184
+ nothing changes: a path that the machine does not know is still a 404 of its own URL
185
+ space, and the URL still follows the actor.
186
+
187
+ | Location of the router | `basePath = "/abc123/play"` |
188
+ | ---------------------- | ----------------------------------------------------- |
189
+ | `/abc123/play` | the `/` of the machine → `play.route` |
190
+ | `/abc123/play/about` | the `/about` of the machine → `play.route` |
191
+ | `/abc123/play/nope` | unknown INSIDE the mount → the URL follows the actor |
192
+ | `/account/billing` | a route of the host → the bridge does nothing |
193
+ | `/abc123/playground` | another segment → the host's, the bridge does nothing |
194
+
195
+ **The machine is authoritative over its own params.** `event.params` holds what the
196
+ pattern of the machine declares, and nothing else. The params of the prefix belong to
197
+ the host — the host wrote the prefix and resolved them — so they travel in no
198
+ `play.route` event, and a param of the host that happens to share a name with one of
199
+ the machine cannot shadow it.
200
+
201
+ Read the resolved mount from the bridge instead, where it cannot go stale:
202
+
203
+ ```typescript
204
+ bridge.basePath; // "/abc123/play"
205
+ bridge.basePathParams; // { machineId: "abc123" }
206
+ ```
207
+
208
+ A machine that needs the identity of its host — a `machineId`, a tenant — takes it
209
+ through the `input` of the actor, where it belongs: that identity decides WHICH
210
+ machine runs, and it is not a param of a route inside the machine.
211
+
212
+ #### Several machines alive at once
213
+
214
+ More than one machine can be alive at a time, each mounted at its own prefix, all
215
+ sharing one router. Every bridge hears every location change of that router, and each
216
+ one recognises its own half and leaves the rest alone — a location under another
217
+ machine's prefix is foreign in exactly the way a route of the host is. So a
218
+ `play.route` reaches the machine that owns the URL and no other, and a correction of
219
+ an unknown path happens only inside the prefix that owns it.
220
+
221
+ **Each bridge can stay connected, as long as each one has its own prefix.** A bridge
222
+ outside its mount keeps the silence in BOTH directions: it sends no `play.route`, it
223
+ corrects no URL, and it writes no route of its actor. So the machine that the location
224
+ belongs to is the only one that writes, and an actor that nobody is looking at cannot
225
+ take the URL from the one on screen. A route that the hidden machine moved to is not
226
+ lost: the bridge remembers it, and it writes it when the host navigates back under its
227
+ prefix.
228
+
229
+ **Two bridges contend when neither prefix separates their halves of the URL.** That is
230
+ the case for two bridges with no prefix, for two with the same prefix, and also for two
231
+ whose prefixes NEST: a mount at `/a` and a mount at `/a/b` both claim `/a/b/x`, because
232
+ `/a` is a prefix of it. Give sibling prefixes — `/a/one` and `/a/two` — and no location
233
+ belongs to two machines. Where a prefix cannot separate them, connect the bridge that
234
+ owns the address bar and let the others keep their state with no bridge attached. `connect()` refuses a
235
+ second bridge for one actor, but it cannot know which of two different actors should
236
+ own the URL.
237
+
238
+ #### How to load and unload routes
239
+
240
+ The prefix lives on the **bridge**, and not on the `RouteMap`. A route map is static,
241
+ it is shared, and it holds an LRU cache inside, so one map serves every mount without
242
+ a rebuild.
243
+
244
+ `setBasePath()` moves WHERE an actor is mounted, and never WHICH actor is mounted:
245
+
246
+ ```typescript
247
+ // The host moved this actor from one region of its URL space to another.
248
+ bridge.setBasePath("/:region/:machineId/play", { region: "us", machineId });
249
+ ```
250
+
251
+ The call also brings the location in step. Nothing else moves the address bar, so a
252
+ move to a prefix that the URL is not under writes the new mount, and it keeps the
253
+ route of the actor: `/eu/abc123/play/about` becomes `/us/abc123/play/about`. A location
254
+ that already lies under the new prefix drives the actor instead, exactly as it does on
255
+ `connect()`.
256
+
257
+ **An actor never changes identity.** A segment of the prefix that IDENTIFIES the
258
+ actor — a `machineId` that names the document it runs — therefore never moves through
259
+ this method. A new identity is a new ACTOR, and a new actor takes a new bridge,
260
+ because `connect()` permits one bridge for each actor. Give the provider the new actor
261
+ and let it rebuild: that is the correct shape, and it is what the host wants, because
262
+ the new document starts at its own state.
263
+
264
+ The segments that move here are the ones that LOCATE: a region, a locale, a tenant, a
265
+ workspace slug. They say where the same actor lives, and they decide nothing about
266
+ it.
267
+
268
+ Nothing goes away: the actor, the route map, and its cache all stay, and the bridge
269
+ runs the same first-synchronization decision against the new prefix. A call that
270
+ resolves to the same prefix reconciles nothing, and it still takes the new params, so
271
+ a move between `"/abc123/play"` and `"/:machineId/play"` with `{ machineId }` keeps
272
+ `event.params` honest. A call with no argument removes the prefix, and it gives the
273
+ machine the complete router again.
274
+
275
+ Every `PlayRouterProvider` gives `basePath` and `basePathParams` as **reactive
276
+ props**, wired to `setBasePath()`. They need no stable reference, unlike `actor`,
277
+ `router`, and `routeMap`, and they rebuild the bridge never:
278
+
279
+ ```tsx
280
+ // A render with a new `region` moves the mount, and it rebuilds the bridge never. A
281
+ // render with a new `machineId` gives a different `actor` prop, and THAT rebuilds the
282
+ // bridge, which is correct: one actor takes one bridge.
283
+ <PlayRouterProvider
284
+ actor={actor}
285
+ router={router}
286
+ routeMap={routeMap}
287
+ basePath="/:machineId/play"
288
+ basePathParams={{ machineId }}
289
+ renderer={(a) => <PlayRenderer actor={a} registry={registry} />}
290
+ />
291
+ ```
292
+
293
+ To register the routes of the machine in a host router that declares real route
294
+ objects, ask for the list — and drop it again when the machine unloads:
295
+
296
+ ```typescript
297
+ import { extractMachineRoutes, getRouteMappings } from "@xmachines/play-router";
298
+
299
+ const tree = extractMachineRoutes(machine);
300
+
301
+ // Concrete, for a route that the host adds after a loader resolved the mount
302
+ getRouteMappings(tree, { basePath: "/:machineId/play", basePathParams: { machineId } });
303
+ // [{ stateId: "home", path: "/abc123/play" },
304
+ // { stateId: "profile", path: "/abc123/play/profile/:userId" }, ...]
305
+
306
+ // The pattern, for a static route declaration of the host
307
+ getRouteMappings(tree, { basePath: "/:machineId/play" });
308
+ // [{ stateId: "home", path: "/:machineId/play" }, ...]
309
+ ```
310
+
311
+ Each `stateId` comes from the route tree, so it carries NO `#`. A host that keys its
312
+ route table on the target of a `play.route` event adds the `#` itself, because the
313
+ event always carries the prefixed form.
314
+
315
+ > Under a mount, `@xmachines/play-vue-router` and `@xmachines/play-solid-router` read
316
+ > the pre-parsed route params of their framework never: under a prefix the framework
317
+ > matched a route of the HOST by construction, because the machine owns the suffix of
318
+ > the path only. Those params therefore describe the route of the machine never, even
319
+ > when a name collides — a collision carries the value of the HOST. Both adapters
320
+ > resolve each param from the stripped path with `URLPattern` instead, and they
321
+ > therefore need a polyfill on an older runtime when they are mounted.
322
+ >
323
+ > Without a prefix both adapters keep the parse of their framework, with its decoding
324
+ > and with no polyfill, but restricted to the names that the pattern of the machine
325
+ > declares. A splat of a catch-all, and a param of a wrapper route, reach the actor
326
+ > never.
327
+ >
328
+ > A location that fills NO optional segment reaches URLPattern never. `/settings` is the
329
+ > bare form of `/settings/:section?`, so the params are `{}`, and the adapters read that
330
+ > from the path alone rather than from their framework. The route map that HOLDS that
331
+ > pattern still needed URLPattern when it was built.
332
+
128
333
  ### How to write a `RouterBridgeBase` adapter
129
334
 
130
335
  Extend `RouterBridgeBase`, then implement the three abstract methods for your framework:
@@ -211,6 +416,7 @@ bridge.disconnect();
211
416
  | `getRoutableRoutes(tree)` | Returns every routable `RouteNode` in one flat array |
212
417
  | `getNavigableRoutes(tree, stateId)` | Returns the child routes that a state can reach, through the hierarchy and through a transition |
213
418
  | `routeExists(tree, path)` | Tells you if the tree holds a path |
419
+ | `getRouteMappings(tree, options?)` | The `{ stateId, path }` entries for a route table of a host, with an optional prefix |
214
420
  | `getTransitionReachableRoutes(graph, stateId)` | Returns the route paths that a state can reach through an XState transition |
215
421
  | `isRouteReachable(graph, fromStateId, toStateId)` | Tells you if a transition path is present between two states |
216
422
 
@@ -224,6 +430,56 @@ bridge.disconnect();
224
430
  | `extractRouteParams(pathname, pattern)` | Reads the path parameters of a URL with URLPattern |
225
431
  | `extractQuery(search)` | Reads the query parameters of a URL search string |
226
432
 
433
+ ### Base Path
434
+
435
+ | Export | Description |
436
+ | --------------------------------------- | --------------------------------------------------------------------------------------- |
437
+ | `BasePathOptions` | `{ basePath?, basePathParams? }` — every bridge, provider, and `connectRouter` takes it |
438
+ | `RouterBridgeBase#basePath` | The resolved prefix of the mount, or `""` when the machine owns the complete router |
439
+ | `RouterBridgeBase#basePathParams` | The values of the `:param` segments of the mount — they travel in no `play.route` event |
440
+ | `RouterBridgeBase#setBasePath(p, prm?)` | Moves the mount of a live bridge, with no teardown, and brings the location in step |
441
+ | `normalizeBasePath(basePath?)` | Normalizes a prefix, and it keeps each `:param` segment |
442
+ | `resolveBasePath(basePath?, params?)` | Resolves a prefix to `{ path, params }`, and it substitutes every `:param` |
443
+ | `stripBasePath(pathname, basePath)` | The machine half of a location, or `null` when the location belongs to the host |
444
+ | `joinBasePath(basePath, path)` | Adds a prefix to a machine path, and it keeps a query string or a hash at the end |
445
+ | `NO_BASE_PATH` | The frozen `{ path: "", params: {} }` of a bridge that takes no `basePath` |
446
+
447
+ ### Framework Params
448
+
449
+ A bridge whose framework parses the path params itself — Vue Router and SolidJS Router
450
+ both do — keeps that parse instead of running URLPattern again. The decision that makes
451
+ it safe is the same in both, so it lives here.
452
+
453
+ | Export | Description |
454
+ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
455
+ | `resolveFrameworkParams(source)` | Decides which params describe the route of the machine: `{}`, the parse of the framework, or the fallback |
456
+ | `getPatternParamNames(pattern)` | The names of every `:param` of a route pattern. A `*` wildcard carries none |
457
+ | `getRequiredPatternParamNames(pattern)` | The names the pattern REQUIRES, so an optional `:name?` is left out |
458
+ | `pickOwnParams(params, names, requiredNames?)` | The params that the pattern declares, or `null` when the framework covers them not. `requiredNames` says which names may NOT be absent; it defaults to every name, so a two-argument call treats an optional `:name?` as a gap |
459
+ | `cleanFrameworkParams(params)` | The params of a framework with no absent value, each one a string |
460
+
461
+ ### Provider Lifecycle
462
+
463
+ A `PlayRouterProvider` of a framework is two things: the lifecycle of a bridge, and
464
+ about fifteen lines that bind that lifecycle to the effects of the framework. This
465
+ package holds the lifecycle, and it holds every decision in it. An adapter keeps its
466
+ own effects and nothing else.
467
+
468
+ | Export | Description |
469
+ | ----------------------------------------------------- | ------------------------------------------------------------------------------------------- |
470
+ | `PlayRouterProviderBaseProps<TRouter, TActor, TNode>` | The documented props. `TNode` is what the framework renders |
471
+ | `PlayRouterBridgeConstructor<TRouter>` | The constructor shape a bridge class must satisfy |
472
+ | `openProviderBridge(BridgeCtor, args)` | Builds the bridge, connects it, and returns it with a `close` |
473
+ | `repointProviderBridge(bridge, basePath, params?)` | Moves the mount of a live bridge. A `null` bridge and a bridge with no mount API are no-ops |
474
+ | `mountKey(basePath, params?)` | A key that changes when the mount changes, compared BY VALUE |
475
+ | `isMountableBridge(bridge)` | The run-time probe for a bridge that can move its mount |
476
+ | `createRouterConnection(bridge)` | Wraps a live bridge in the callable `RouterConnection` that `connectRouter` returns |
477
+ | `RouterConnection` | The callable handle: `disconnect()`, and the mount to read and to move |
478
+
479
+ Nothing here imports a framework, so this package keeps no framework dependency —
480
+ `tests/provider-factory-parity.test.ts` holds that. `TNode` is the only thing in the
481
+ props that a framework decides, which is why it is a type parameter.
482
+
227
483
  ### Validation
228
484
 
229
485
  | Export | Description |
@@ -237,6 +493,7 @@ bridge.disconnect();
237
493
  | Export | Description |
238
494
  | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
239
495
  | `RouterBridge` | The interface of the `connect()` and `disconnect()` lifecycle |
496
+ | `MountableRouterBridge` | A `RouterBridge` whose mount can move — it adds `basePath` and `setBasePath()` |
240
497
  | `RouteTree` | The hierarchical tree, with `root`, `byStateId`, `byPath`, and an optional `graph` |
241
498
  | `RouteNode` | One node of the tree, with `id`, `path`, `fullPath`, `stateId`, `children`, and `parent` |
242
499
  | `RouteInfo` | The flat route descriptor that comes from a state node |
@@ -251,16 +508,18 @@ bridge.disconnect();
251
508
 
252
509
  ### Errors (subpath `@xmachines/play-router/errors`)
253
510
 
254
- | Class | Code | When thrown |
255
- | ---------------------------- | --------------------------------------- | ----------------------------------------------------------------------- |
256
- | `RouterSyncError` | `PLAY_ROUTER_SYNC_FAILED` | `syncActorFromRouter()` cannot send a `play.route` event |
257
- | `DuplicateBridgeError` | `PLAY_ROUTER_DUPLICATE_BRIDGE` | A second bridge tries to connect to an actor that already has one |
258
- | `URLPatternUnavailableError` | `PLAY_ROUTE_MAP_URLPATTERN_UNAVAILABLE` | The URLPattern API is absent, and no polyfill is loaded |
259
- | `InvalidRoutePatternError` | `PLAY_ROUTE_MAP_INVALID_PATTERN` | The URLPattern constructor refuses a route pattern string |
260
- | `EmptyRoutePathError` | `PLAY_ROUTE_EMPTY_PATH` | A state declares `meta.route: ""` |
261
- | `InvalidStateIdError` | `PLAY_ROUTE_INVALID_STATE_ID` | A route names a state ID that the machine graph does not hold |
262
- | `DuplicateRoutePathError` | `PLAY_ROUTE_DUPLICATE_PATH` | Two or more states share the same URL path |
263
- | `UnknownStateTypeError` | `PLAY_ROUTE_UNKNOWN_STATE_TYPE` | A state node has an XState `.type` value that the package does not know |
511
+ | Class | Code | When thrown |
512
+ | ---------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
513
+ | `RouterSyncError` | `PLAY_ROUTER_SYNC_FAILED` | `syncActorFromRouter()` cannot send a `play.route` event |
514
+ | `DuplicateBridgeError` | `PLAY_ROUTER_DUPLICATE_BRIDGE` | A second bridge tries to connect to an actor that already has one |
515
+ | `URLPatternUnavailableError` | `PLAY_ROUTE_MAP_URLPATTERN_UNAVAILABLE` | The URLPattern API is absent, and no polyfill is loaded |
516
+ | `InvalidRoutePatternError` | `PLAY_ROUTE_MAP_INVALID_PATTERN` | A route pattern does not compile, or two of its params land on one URLPattern group |
517
+ | `EmptyRoutePathError` | `PLAY_ROUTE_EMPTY_PATH` | A state declares `meta.route: ""` |
518
+ | `InvalidStateIdError` | `PLAY_ROUTE_INVALID_STATE_ID` | A route names a state ID that the machine graph does not hold |
519
+ | `DuplicateRoutePathError` | `PLAY_ROUTE_DUPLICATE_PATH` | Two or more states share the same URL path |
520
+ | `UnknownStateTypeError` | `PLAY_ROUTE_UNKNOWN_STATE_TYPE` | A state node has an XState `.type` value that the package does not know |
521
+ | `InvalidBasePathError` | `PLAY_ROUTER_INVALID_BASE_PATH` | A `basePath` resolves to one concrete prefix never (`*`, `:p?`, `$p`, `?`, `#`, a scheme, `.`/`..`, whitespace) |
522
+ | `MissingBasePathParamError` | `PLAY_ROUTER_MISSING_BASE_PATH_PARAM` | A `:param` of a `basePath` has no value in `basePathParams` |
264
523
 
265
524
  ```typescript
266
525
  import {
@@ -388,12 +647,18 @@ MIT — see [LICENSE](LICENSE).
388
647
 
389
648
  ## Interfaces
390
649
 
650
+ - [BasePathOptions](interfaces/BasePathOptions.md)
391
651
  - [BuildPlayRouteEventOptions](interfaces/BuildPlayRouteEventOptions.md)
652
+ - [FrameworkParamsSource](interfaces/FrameworkParamsSource.md)
392
653
  - [LocationLike](interfaces/LocationLike.md)
393
654
  - [MachineEdgeData](interfaces/MachineEdgeData.md)
394
655
  - [MachineNodeData](interfaces/MachineNodeData.md)
656
+ - [MountableRouterBridge](interfaces/MountableRouterBridge.md)
657
+ - [OpenProviderBridgeArgs](interfaces/OpenProviderBridgeArgs.md)
395
658
  - [PlayActor](interfaces/PlayActor.md)
396
659
  - [PlayRouteEvent](interfaces/PlayRouteEvent.md)
660
+ - [PlayRouterProviderBaseProps](interfaces/PlayRouterProviderBaseProps.md)
661
+ - [ResolvedBasePath](interfaces/ResolvedBasePath.md)
397
662
  - [ResolvedRoutePath](interfaces/ResolvedRoutePath.md)
398
663
  - [RoutableActor](interfaces/RoutableActor.md)
399
664
  - [RouteInfo](interfaces/RouteInfo.md)
@@ -403,6 +668,7 @@ MIT — see [LICENSE](LICENSE).
403
668
  - [RouteNode](interfaces/RouteNode.md)
404
669
  - [RouteObject](interfaces/RouteObject.md)
405
670
  - [RouterBridge](interfaces/RouterBridge.md)
671
+ - [RouterConnection](interfaces/RouterConnection.md)
406
672
  - [RouteTree](interfaces/RouteTree.md)
407
673
  - [RouteWatcherHandle](interfaces/RouteWatcherHandle.md)
408
674
  - [WindowLike](interfaces/WindowLike.md)
@@ -411,14 +677,21 @@ MIT — see [LICENSE](LICENSE).
411
677
 
412
678
  - [~~BaseRouteMapping~~](type-aliases/BaseRouteMapping.md)
413
679
  - [MachineGraph](type-aliases/MachineGraph.md)
680
+ - [PlayRouterBridgeConstructor](type-aliases/PlayRouterBridgeConstructor.md)
414
681
  - [RouteMetadata](type-aliases/RouteMetadata.md)
415
682
 
683
+ ## Variables
684
+
685
+ - [NO\_BASE\_PATH](variables/NO_BASE_PATH.md)
686
+
416
687
  ## Functions
417
688
 
418
689
  - [buildPlayRouteEvent](functions/buildPlayRouteEvent.md)
419
690
  - [buildRouteTree](functions/buildRouteTree.md)
691
+ - [cleanFrameworkParams](functions/cleanFrameworkParams.md)
420
692
  - [createRouteMap](functions/createRouteMap.md)
421
693
  - [createRouteMapFromTree](functions/createRouteMapFromTree.md)
694
+ - [createRouterConnection](functions/createRouterConnection.md)
422
695
  - [detectDuplicateRoutes](functions/detectDuplicateRoutes.md)
423
696
  - [extractMachineRoutes](functions/extractMachineRoutes.md)
424
697
  - [extractQuery](functions/extractQuery.md)
@@ -426,11 +699,24 @@ MIT — see [LICENSE](LICENSE).
426
699
  - [findRouteById](functions/findRouteById.md)
427
700
  - [findRouteByPath](functions/findRouteByPath.md)
428
701
  - [getNavigableRoutes](functions/getNavigableRoutes.md)
702
+ - [getPatternParamNames](functions/getPatternParamNames.md)
703
+ - [getRequiredPatternParamNames](functions/getRequiredPatternParamNames.md)
429
704
  - [getRoutableRoutes](functions/getRoutableRoutes.md)
705
+ - [getRouteMappings](functions/getRouteMappings.md)
430
706
  - [getTransitionReachableRoutes](functions/getTransitionReachableRoutes.md)
707
+ - [isMountableBridge](functions/isMountableBridge.md)
431
708
  - [isRouteReachable](functions/isRouteReachable.md)
709
+ - [joinBasePath](functions/joinBasePath.md)
432
710
  - [machineToGraph](functions/machineToGraph.md)
711
+ - [mountKey](functions/mountKey.md)
712
+ - [normalizeBasePath](functions/normalizeBasePath.md)
713
+ - [openProviderBridge](functions/openProviderBridge.md)
714
+ - [pickOwnParams](functions/pickOwnParams.md)
715
+ - [repointProviderBridge](functions/repointProviderBridge.md)
716
+ - [resolveBasePath](functions/resolveBasePath.md)
717
+ - [resolveFrameworkParams](functions/resolveFrameworkParams.md)
433
718
  - [routeExists](functions/routeExists.md)
434
719
  - [sanitizePathname](functions/sanitizePathname.md)
720
+ - [stripBasePath](functions/stripBasePath.md)
435
721
  - [validateRouteFormat](functions/validateRouteFormat.md)
436
722
  - [validateStateExists](functions/validateStateExists.md)
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: RouteMap
4
4
 
5
- Defined in: [base-route-map.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/base-route-map.ts#L105)
5
+ Defined in: [base-route-map.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/base-route-map.ts#L105)
6
6
 
7
7
  The shared base class of the route map for both directions.
8
8
 
@@ -58,7 +58,7 @@ map.getPathByStateId("missing"); // null
58
58
  new RouteMap(mappings, options?): RouteMap;
59
59
  ```
60
60
 
61
- Defined in: [base-route-map.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/base-route-map.ts#L133)
61
+ Defined in: [base-route-map.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/base-route-map.ts#L133)
62
62
 
63
63
  Builds a route map from an array of the mappings between a state ID and a path.
64
64
 
@@ -87,7 +87,7 @@ candidates is therefore efficient.
87
87
  getPathByStateId(stateId): string | null;
88
88
  ```
89
89
 
90
- Defined in: [base-route-map.ts:225](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/base-route-map.ts#L225)
90
+ Defined in: [base-route-map.ts:229](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/base-route-map.ts#L229)
91
91
 
92
92
  Returns the path pattern of a state ID.
93
93
 
@@ -123,7 +123,7 @@ map.getPathByStateId("missing"); // null
123
123
  getStateIdByPath(path): string | null;
124
124
  ```
125
125
 
126
- Defined in: [base-route-map.ts:185](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-router/src/base-route-map.ts#L185)
126
+ Defined in: [base-route-map.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/base-route-map.ts#L189)
127
127
 
128
128
  Resolves a URL path to its state ID.
129
129