@xmachines/docs 1.0.0-beta.25 → 1.0.0-beta.26

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 (246) hide show
  1. package/api/@xmachines/play/classes/PlayError.md +10 -4
  2. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  3. package/api/@xmachines/play-actor/README.md +4 -0
  4. package/api/@xmachines/play-actor/classes/AbstractActor.md +49 -92
  5. package/api/@xmachines/play-actor/functions/typedSpec.md +57 -0
  6. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +9 -18
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +5 -21
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +5 -6
  10. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  11. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  12. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  13. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  14. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  15. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  16. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  17. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  18. package/api/@xmachines/play-dom-router/README.md +10 -0
  19. package/api/@xmachines/play-dom-router/functions/connectRouter.md +18 -46
  20. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  21. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +38 -0
  22. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  23. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
  24. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  25. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
  26. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +119 -0
  27. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +114 -0
  28. package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +50 -0
  29. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +27 -0
  30. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +104 -0
  31. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
  32. package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +9 -0
  33. package/api/@xmachines/play-react/README.md +4 -4
  34. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +31 -5
  35. package/api/@xmachines/play-react/functions/defineRegistry.md +2 -0
  36. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  37. package/api/@xmachines/play-react/functions/useBoundProp.md +2 -0
  38. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  39. package/api/@xmachines/play-react/functions/useStateBinding.md +2 -0
  40. package/api/@xmachines/play-react/interfaces/ComponentContext.md +2 -0
  41. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  42. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  43. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -7
  44. package/api/@xmachines/play-react/type-aliases/ComponentFn.md +2 -0
  45. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  46. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  47. package/api/@xmachines/play-react-router/README.md +5 -1
  48. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +102 -25
  49. package/api/@xmachines/play-react-router/classes/RouteMap.md +17 -33
  50. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +8 -1
  51. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +21 -11
  52. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +8 -8
  53. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
  54. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +18 -8
  55. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  56. package/api/@xmachines/play-router/README.md +42 -5
  57. package/api/@xmachines/play-router/classes/BaseRouteMap.md +12 -19
  58. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +100 -25
  59. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  60. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  61. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  62. package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +38 -0
  63. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +45 -0
  64. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  65. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  66. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  67. package/api/@xmachines/play-router/functions/extractRouteParams.md +46 -0
  68. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  69. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  70. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  71. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  72. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  73. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  74. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  75. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  76. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  77. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  78. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  79. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  80. package/api/@xmachines/play-router/interfaces/LocationLike.md +27 -0
  81. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  82. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  83. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  84. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  85. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  86. package/api/@xmachines/play-router/interfaces/{BaseRouteMapping.md → RouteMapping.md} +5 -5
  87. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  88. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  89. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  90. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  91. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  92. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  93. package/api/@xmachines/play-router/interfaces/WindowLike.md +65 -0
  94. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  95. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  96. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  97. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  98. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  99. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  100. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  101. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  102. package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +6 -0
  103. package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +8 -0
  104. package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +2 -0
  105. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +10 -0
  106. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +2 -0
  107. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +2 -0
  108. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +2 -0
  109. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +2 -0
  110. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +2 -0
  111. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +2 -0
  112. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +2 -0
  113. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +2 -0
  114. package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +2 -0
  115. package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +2 -0
  116. package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +2 -0
  117. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  118. package/api/@xmachines/play-solid/README.md +4 -4
  119. package/api/@xmachines/play-solid/functions/defineRegistry.md +2 -0
  120. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  121. package/api/@xmachines/play-solid/functions/useStateBinding.md +2 -0
  122. package/api/@xmachines/play-solid/interfaces/ComponentContext.md +2 -0
  123. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -7
  124. package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +2 -0
  125. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  126. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  127. package/api/@xmachines/play-solid-router/README.md +2 -2
  128. package/api/@xmachines/play-solid-router/classes/RouteMap.md +13 -26
  129. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +121 -46
  130. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  131. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +15 -9
  132. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +47 -92
  133. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +8 -8
  134. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  135. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +19 -6
  136. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  137. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  138. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +21 -18
  139. package/api/@xmachines/play-svelte/README.md +28 -0
  140. package/api/@xmachines/play-svelte/functions/defineRegistry.md +2 -0
  141. package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +2 -0
  142. package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +2 -0
  143. package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +9 -9
  144. package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +2 -0
  145. package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +2 -0
  146. package/api/@xmachines/play-svelte/variables/PlayRenderer.md +2 -0
  147. package/api/@xmachines/play-svelte-spa-router/README.md +1 -0
  148. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +13 -26
  149. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +14 -1
  150. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +23 -4
  151. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -5
  152. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +10 -10
  153. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +20 -5
  154. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  155. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +65 -0
  156. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  157. package/api/@xmachines/play-sveltekit-router/README.md +2 -1
  158. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +46 -24
  159. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +14 -1
  160. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +23 -4
  161. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -5
  162. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +27 -0
  163. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +10 -10
  164. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +20 -5
  165. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  166. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  167. package/api/@xmachines/play-tanstack-react-router/README.md +5 -3
  168. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +17 -33
  169. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +93 -25
  170. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  171. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  172. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +21 -11
  173. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  174. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +8 -8
  175. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  176. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +18 -8
  177. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  178. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  179. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  180. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +6 -26
  181. package/api/@xmachines/play-tanstack-solid-router/README.md +8 -8
  182. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +13 -26
  183. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +101 -36
  184. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  185. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +15 -9
  186. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +8 -8
  187. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  188. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +13 -9
  189. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  190. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  191. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  192. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +23 -24
  193. package/api/@xmachines/play-vue/README.md +4 -4
  194. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  195. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  196. package/api/@xmachines/play-vue/functions/useStateBinding.md +2 -0
  197. package/api/@xmachines/play-vue/interfaces/ComponentContext.md +2 -0
  198. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  199. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  200. package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +2 -0
  201. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  202. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  203. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  204. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  205. package/api/@xmachines/play-vue-router/README.md +2 -2
  206. package/api/@xmachines/play-vue-router/classes/RouteMap.md +18 -108
  207. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +44 -104
  208. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +127 -62
  209. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  210. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +8 -8
  211. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +19 -7
  212. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  213. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  214. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  215. package/api/@xmachines/play-xstate/README.md +15 -15
  216. package/api/@xmachines/play-xstate/classes/PlayerActor.md +46 -30
  217. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +20 -15
  218. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  219. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  220. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  221. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  222. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  223. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  224. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +2 -2
  225. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  226. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  227. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  228. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  229. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  230. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  231. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +14 -12
  232. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  233. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  234. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  235. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  236. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  237. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  238. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  239. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  240. package/api/README.md +4 -4
  241. package/api/llms.txt +3 -3
  242. package/examples/README.md +5 -0
  243. package/examples/routing-patterns.md +6 -4
  244. package/package.json +2 -2
  245. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +0 -38
  246. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +0 -33
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayRendererProps\<TLogic\>
4
4
 
5
- Defined in: [packages/play-svelte/src/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L13)
5
+ Defined in: [packages/play-svelte/src/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L13)
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -12,11 +12,11 @@ Defined in: [packages/play-svelte/src/types.ts:13](https://gitlab.com/xmachin-es
12
12
 
13
13
  ## Properties
14
14
 
15
- | Property | Type | Description | Defined in |
16
- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
17
- | <a id="property-actions"></a> `actions?` | `object` | - | [packages/play-svelte/src/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L17) |
18
- | <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | - | [packages/play-svelte/src/types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L14) |
19
- | <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | Svelte snippet rendered when currentView is null (no active view). Also shown when a catalog component throws during render. | [packages/play-svelte/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L22) |
20
- | <a id="property-onerror"></a> `onError?` | (`error`) => `void` | Called when a catalog component throws during render. | [packages/play-svelte/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L26) |
21
- | <a id="property-registry"></a> `registry` | `ComponentRegistry` | - | [packages/play-svelte/src/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L15) |
22
- | <a id="property-store"></a> `store?` | `StateStore` | - | [packages/play-svelte/src/types.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte/src/types.ts#L16) |
15
+ | Property | Type | Description | Defined in |
16
+ | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | <a id="property-actions"></a> `actions?` | `object` | - | [packages/play-svelte/src/types.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L17) |
18
+ | <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | - | [packages/play-svelte/src/types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L14) |
19
+ | <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | Svelte snippet rendered when currentView is null (no active view). Also shown when a catalog component throws during render. | [packages/play-svelte/src/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L22) |
20
+ | <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | Called when a catalog component throws during render. Receives the thrown error and a `reset` function that clears the boundary and attempts to re-render. Matches Svelte 5's `<svelte:boundary onerror>` signature. | [packages/play-svelte/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L28) |
21
+ | <a id="property-registry"></a> `registry` | `ComponentRegistry` | - | [packages/play-svelte/src/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L15) |
22
+ | <a id="property-store"></a> `store?` | `StateStore` | - | [packages/play-svelte/src/types.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte/src/types.ts#L16) |
@@ -6,6 +6,8 @@
6
6
  type ComponentFn<C, K> = Component<BaseComponentProps<InferComponentProps<C, K>>>;
7
7
  ```
8
8
 
9
+ Defined in: `@json-render/svelte`
10
+
9
11
  Component render function type for Svelte
10
12
 
11
13
  ## Type Parameters
@@ -5,3 +5,5 @@
5
5
  ```ts
6
6
  type PlayRenderer = SvelteComponent;
7
7
  ```
8
+
9
+ Defined in: `svelte`
@@ -5,3 +5,5 @@
5
5
  ```ts
6
6
  const PlayRenderer: LegacyComponentType;
7
7
  ```
8
+
9
+ Defined in: `svelte`
@@ -42,6 +42,7 @@ const disconnect = connectRouter({ actor, routeMap });
42
42
  - [PlayRouteEvent](interfaces/PlayRouteEvent.md)
43
43
  - [RouteMapping](interfaces/RouteMapping.md)
44
44
  - [RouterBridge](interfaces/RouterBridge.md)
45
+ - [WindowLike](interfaces/WindowLike.md)
45
46
 
46
47
  ## Type Aliases
47
48
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: RouteMap
4
4
 
5
- Defined in: [play-svelte-spa-router/src/route-map.ts:3](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/route-map.ts#L3)
5
+ Defined in: [play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L100)
6
6
 
7
7
  Shared bidirectional route map base class.
8
8
 
@@ -14,7 +14,8 @@ own and inherit the full public API from here.
14
14
  - Static paths (no `:param`) → O(1) `Map` lookup
15
15
  - Dynamic paths → O(k) bucket-indexed scan using `URLPattern`, where `k` is the number
16
16
  of routes sharing the same first path segment
17
- - Results are cached after the first match
17
+ - Results are cached after the first match in an LRU cache (default 500 entries,
18
+ configurable via the `cacheSize` constructor option)
18
19
 
19
20
  **Pattern syntax** (`:param` / `:param?`):
20
21
 
@@ -41,19 +42,15 @@ map.getPathByStateId("profile"); // "/profile/:userId"
41
42
  map.getPathByStateId("missing"); // null
42
43
  ```
43
44
 
44
- ## Extends
45
-
46
- - [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md)
47
-
48
45
  ## Constructors
49
46
 
50
47
  ### Constructor
51
48
 
52
49
  ```ts
53
- new RouteMap(mappings): RouteMap;
50
+ new RouteMap(mappings, options?): BaseRouteMap;
54
51
  ```
55
52
 
56
- Defined in: play-router/dist/base-route-map.d.ts:82
53
+ Defined in: [play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L125)
57
54
 
58
55
  Build a route map from an array of state ID ↔ path mappings.
59
56
 
@@ -63,17 +60,15 @@ buckets for efficient candidate selection.
63
60
 
64
61
  #### Parameters
65
62
 
66
- | Parameter | Type | Description |
67
- | ---------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
68
- | `mappings` | [`BaseRouteMapping`](../../play-router/interfaces/BaseRouteMapping.md)[] | Array of `{ stateId, path }` entries. Order determines priority when multiple patterns could match the same path. |
63
+ | Parameter | Type | Description |
64
+ | -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
65
+ | `mappings` | [`RouteMapping`](../interfaces/RouteMapping.md)[] | Array of `{ stateId, path }` entries. Order determines priority when multiple patterns could match the same path. |
66
+ | `options` | \{ `cacheSize?`: `number`; \} | Optional configuration. `options.cacheSize`: Maximum number of resolved parameterized path lookups to cache. Defaults to `500`. Increase for applications with many unique parameterized URL values (e.g. user profile pages with thousands of distinct IDs). After eviction the path falls back to the O(k) bucket pattern scan — correct but slower. Minimum effective value is `1` (QuickLRU constraint). |
67
+ | `options.cacheSize?` | `number` | - |
69
68
 
70
69
  #### Returns
71
70
 
72
- `RouteMap`
73
-
74
- #### Inherited from
75
-
76
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`constructor`](../../play-router/classes/BaseRouteMap.md#constructor)
71
+ `BaseRouteMap`
77
72
 
78
73
  ## Methods
79
74
 
@@ -83,7 +78,7 @@ buckets for efficient candidate selection.
83
78
  getPathByStateId(stateId): string | null;
84
79
  ```
85
80
 
86
- Defined in: play-router/dist/base-route-map.d.ts:112
81
+ Defined in: [play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L209)
87
82
 
88
83
  Look up the path pattern registered for a state ID.
89
84
 
@@ -106,10 +101,6 @@ map.getPathByStateId("profile"); // "/profile/:userId"
106
101
  map.getPathByStateId("missing"); // null
107
102
  ```
108
103
 
109
- #### Inherited from
110
-
111
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getPathByStateId`](../../play-router/classes/BaseRouteMap.md#getpathbystateid)
112
-
113
104
  ---
114
105
 
115
106
  ### getStateIdByPath()
@@ -118,7 +109,7 @@ map.getPathByStateId("missing"); // null
118
109
  getStateIdByPath(path): string | null;
119
110
  ```
120
111
 
121
- Defined in: play-router/dist/base-route-map.d.ts:99
112
+ Defined in: [play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L174)
122
113
 
123
114
  Resolve a URL path to its mapped state ID.
124
115
 
@@ -144,7 +135,3 @@ The mapped state ID, or `null` if no route matches
144
135
  map.getStateIdByPath("/profile/123"); // "profile"
145
136
  map.getStateIdByPath("/unknown"); // null
146
137
  ```
147
-
148
- #### Inherited from
149
-
150
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getStateIdByPath`](../../play-router/classes/BaseRouteMap.md#getstateidbypath)
@@ -6,7 +6,11 @@
6
6
  function connectRouter(options): () => void;
7
7
  ```
8
8
 
9
- Defined in: [play-svelte-spa-router/src/connect-router.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/connect-router.ts#L46)
9
+ Defined in: [play-svelte-spa-router/src/connect-router.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/connect-router.ts#L30)
10
+
11
+ Connect svelte-spa-router to actor.
12
+
13
+ Returns a cleanup function. The public API surface is unchanged (D-14).
10
14
 
11
15
  ## Parameters
12
16
 
@@ -17,3 +21,12 @@ Defined in: [play-svelte-spa-router/src/connect-router.ts:46](https://gitlab.com
17
21
  ## Returns
18
22
 
19
23
  () => `void`
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import { connectRouter, createRouteMap } from "@xmachines/play-svelte-spa-router";
29
+ const routeMap = createRouteMap(machine);
30
+ const disconnect = connectRouter({ actor, routeMap });
31
+ onDestroy(() => disconnect());
32
+ ```
@@ -6,14 +6,33 @@
6
6
  function createRouteMap(machine): RouteMap;
7
7
  ```
8
8
 
9
- Defined in: [play-svelte-spa-router/src/create-route-map.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/create-route-map.ts#L5)
9
+ Defined in: [play-router/src/create-route-map-from-machine.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/create-route-map-from-machine.ts#L26)
10
+
11
+ Create a `BaseRouteMap` from an XState state machine.
12
+
13
+ Extracts all routable states (those with `meta.route`) and builds a bidirectional
14
+ path ↔ stateId lookup structure. The returned map is used by `RouterBridgeBase`
15
+ subclasses to translate browser URL changes into `play.route` actor events and
16
+ vice-versa.
10
17
 
11
18
  ## Parameters
12
19
 
13
- | Parameter | Type |
14
- | --------- | ------------------------------------------------------------------------- |
15
- | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) |
20
+ | Parameter | Type | Description |
21
+ | --------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------- |
22
+ | `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | XState v5 state machine with `meta.route` annotations on states. |
16
23
 
17
24
  ## Returns
18
25
 
19
26
  [`RouteMap`](../classes/RouteMap.md)
27
+
28
+ A `BaseRouteMap` for passing to any `RouterBridgeBase`-based adapter.
29
+
30
+ ## Example
31
+
32
+ ```typescript
33
+ import { createRouteMapFromMachine } from "@xmachines/play-router";
34
+ import { connectRouter } from "@xmachines/play-dom-router";
35
+
36
+ const routeMap = createRouteMapFromMachine(myMachine);
37
+ const disconnect = connectRouter({ actor, router, routeMap });
38
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: ConnectRouterOptions
4
4
 
5
- Defined in: [play-svelte-spa-router/src/connect-router.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/connect-router.ts#L12)
5
+ Defined in: [play-svelte-spa-router/src/connect-router.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/connect-router.ts#L7)
6
6
 
7
7
  @xmachines/play-svelte-spa-router
8
8
 
@@ -10,7 +10,8 @@ Svelte SPA router adapter for XMachines Play architecture.
10
10
 
11
11
  ## Properties
12
12
 
13
- | Property | Modifier | Type | Defined in |
14
- | ----------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
- | <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | [play-svelte-spa-router/src/connect-router.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/connect-router.ts#L13) |
16
- | <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md) | [play-svelte-spa-router/src/connect-router.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/connect-router.ts#L14) |
13
+ | Property | Modifier | Type | Description | Defined in |
14
+ | ----------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15
+ | <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | - | [play-svelte-spa-router/src/connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/connect-router.ts#L8) |
16
+ | <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md) | - | [play-svelte-spa-router/src/connect-router.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/connect-router.ts#L9) |
17
+ | <a id="property-window"></a> `window?` | `readonly` | [`WindowLike`](WindowLike.md) | Window-like object for `hashchange` subscriptions. Defaults to the global `window`. Pass a mock in tests or a no-op in SSR environments. | [play-svelte-spa-router/src/connect-router.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/connect-router.ts#L14) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayRouteEvent
4
4
 
5
- Defined in: play-router/dist/types.d.ts:207
5
+ Defined in: [play-router/src/types.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L223)
6
6
 
7
7
  Enhanced routing event with parameter and query support
8
8
 
@@ -30,7 +30,7 @@ Target state ID with # prefix (e.g., '#home', '#profile')
30
30
 
31
31
  ## Param
32
32
 
33
- Merged path + query parameters (path parameters win conflicts)
33
+ Path-only route parameters extracted from the URL path (e.g., `{ userId: '123' }` from `/profile/123`). Query parameters are kept separate in `query`.
34
34
 
35
35
  ## Param
36
36
 
@@ -85,7 +85,7 @@ import type { PlayRouteEvent } from "@xmachines/play-router";
85
85
  const event: PlayRouteEvent = {
86
86
  type: "play.route",
87
87
  to: "#settings",
88
- params: { section: "profile" }, // Merged: path + query
88
+ params: { section: "profile" }, // Path-only route parameter
89
89
  query: { tab: "security" }, // Query-only
90
90
  };
91
91
  actor.send(event);
@@ -110,10 +110,10 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
110
110
 
111
111
  ## Properties
112
112
 
113
- | Property | Modifier | Type | Defined in |
114
- | -------------------------------------- | ---------- | ------------------------------ | ------------------------------- |
115
- | <a id="property-match"></a> `match?` | `readonly` | `unknown` | play-router/dist/types.d.ts:212 |
116
- | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | play-router/dist/types.d.ts:210 |
117
- | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | play-router/dist/types.d.ts:211 |
118
- | <a id="property-to"></a> `to` | `readonly` | `string` | play-router/dist/types.d.ts:209 |
119
- | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | play-router/dist/types.d.ts:208 |
113
+ | Property | Modifier | Type | Defined in |
114
+ | -------------------------------------- | ---------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
115
+ | <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L228) |
116
+ | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:226](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L226) |
117
+ | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:227](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L227) |
118
+ | <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:225](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L225) |
119
+ | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:224](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L224) |
@@ -2,11 +2,26 @@
2
2
 
3
3
  # Interface: RouteMapping
4
4
 
5
- Defined in: [play-svelte-spa-router/src/types.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/types.ts#L6)
5
+ Defined in: [play-router/src/base-route-map.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L57)
6
+
7
+ A single state ID ↔ path mapping entry.
8
+
9
+ Both fields are `readonly` — mappings are immutable once passed to `BaseRouteMap`.
10
+ Adapter packages re-export a structurally compatible `RouteMapping` type under
11
+ their own name. This type is published from `@xmachines/play-router` as
12
+ `BaseRouteMapping` to avoid name collisions with those adapter-local types.
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ const mapping: BaseRouteMapping = { stateId: "home", path: "/" };
18
+ const paramMapping: BaseRouteMapping = { stateId: "profile", path: "/profile/:userId" };
19
+ const optionalMapping: BaseRouteMapping = { stateId: "settings", path: "/settings/:section?" };
20
+ ```
6
21
 
7
22
  ## Properties
8
23
 
9
- | Property | Modifier | Type | Defined in |
10
- | --------------------------------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | <a id="property-path"></a> `path` | `readonly` | `string` | [play-svelte-spa-router/src/types.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/types.ts#L8) |
12
- | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | [play-svelte-spa-router/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/types.ts#L7) |
24
+ | Property | Modifier | Type | Description | Defined in |
25
+ | --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [play-router/src/base-route-map.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L61) |
27
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [play-router/src/base-route-map.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L59) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouterBridge
4
4
 
5
- Defined in: play-router/dist/types.d.ts:254
5
+ Defined in: [play-router/src/types.ts:271](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L271)
6
6
 
7
7
  RouterBridge interface for runtime infrastructure adapters
8
8
 
@@ -54,7 +54,7 @@ class TanStackRouterBridge implements RouterBridge {
54
54
  connect(): void | Promise<void>;
55
55
  ```
56
56
 
57
- Defined in: play-router/dist/types.d.ts:270
57
+ Defined in: [play-router/src/types.ts:287](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L287)
58
58
 
59
59
  Connect the router bridge to the Actor
60
60
 
@@ -83,7 +83,7 @@ await bridge.connect();
83
83
  disconnect(): void | Promise<void>;
84
84
  ```
85
85
 
86
- Defined in: play-router/dist/types.d.ts:285
86
+ Defined in: [play-router/src/types.ts:303](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L303)
87
87
 
88
88
  Disconnect the router bridge from the Actor
89
89
 
@@ -0,0 +1,65 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-svelte-spa-router](../README.md) / WindowLike
2
+
3
+ # Interface: WindowLike
4
+
5
+ Defined in: [play-router/src/types.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L324)
6
+
7
+ Minimal window interface required by adapters that subscribe to DOM events
8
+ (e.g. `hashchange`). Injectable for SSR and testing — pass a mock instead of
9
+ the global `window` when the DOM is unavailable.
10
+
11
+ Defined structurally (no `Window` reference) so this package compiles without
12
+ the DOM lib.
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ // Normal usage — global window (default)
18
+ connectRouter({ actor, routeMap });
19
+
20
+ // SSR / test — injected mock
21
+ const mockWin: WindowLike = { addEventListener: vi.fn(), removeEventListener: vi.fn() };
22
+ connectRouter({ actor, routeMap, window: mockWin });
23
+ ```
24
+
25
+ ## Methods
26
+
27
+ ### addEventListener()
28
+
29
+ ```ts
30
+ addEventListener(type, listener): void;
31
+ ```
32
+
33
+ Defined in: [play-router/src/types.ts:325](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L325)
34
+
35
+ #### Parameters
36
+
37
+ | Parameter | Type |
38
+ | ---------- | ------------------- |
39
+ | `type` | `string` |
40
+ | `listener` | (`event`) => `void` |
41
+
42
+ #### Returns
43
+
44
+ `void`
45
+
46
+ ---
47
+
48
+ ### removeEventListener()
49
+
50
+ ```ts
51
+ removeEventListener(type, listener): void;
52
+ ```
53
+
54
+ Defined in: [play-router/src/types.ts:326](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/types.ts#L326)
55
+
56
+ #### Parameters
57
+
58
+ | Parameter | Type |
59
+ | ---------- | ------------------- |
60
+ | `type` | `string` |
61
+ | `listener` | (`event`) => `void` |
62
+
63
+ #### Returns
64
+
65
+ `void`
@@ -6,4 +6,4 @@
6
6
  type RoutableActor = AbstractActor<AnyActorLogic> & Routable;
7
7
  ```
8
8
 
9
- Defined in: [play-svelte-spa-router/src/types.ts:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-svelte-spa-router/src/types.ts#L11)
9
+ Defined in: [play-svelte-spa-router/src/types.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-svelte-spa-router/src/types.ts#L6)
@@ -8,7 +8,7 @@ Thin SvelteKit adapter for XMachines Play.
8
8
 
9
9
  - Keeps `actor.currentRoute` and SvelteKit navigation in sync.
10
10
  - Exposes a local `RouteMap` plus `createRouteMap(machine)` helper.
11
- - Stays direct, with no shared `@xmachines/play-svelte-router` abstraction.
11
+ - No intermediate shared package — all shared logic lives in `@xmachines/play-router`.
12
12
  - Extracts route params and query values when browser navigation enters through SvelteKit.
13
13
 
14
14
  ## Usage
@@ -39,6 +39,7 @@ onDestroy(disconnect);
39
39
  ## Interfaces
40
40
 
41
41
  - [ConnectRouterOptions](interfaces/ConnectRouterOptions.md)
42
+ - [LocationLike](interfaces/LocationLike.md)
42
43
  - [PlayRouteEvent](interfaces/PlayRouteEvent.md)
43
44
  - [RouteMapping](interfaces/RouteMapping.md)
44
45
  - [RouterBridge](interfaces/RouterBridge.md)
@@ -2,23 +2,55 @@
2
2
 
3
3
  # Class: RouteMap
4
4
 
5
- Defined in: [play-sveltekit-router/src/route-map.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-sveltekit-router/src/route-map.ts#L6)
5
+ Defined in: [play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L100)
6
6
 
7
- SvelteKit route map backed by the shared Play router base class.
7
+ Shared bidirectional route map base class.
8
8
 
9
- ## Extends
9
+ All framework adapter `RouteMap` classes extend this — they add no logic of their
10
+ own and inherit the full public API from here.
10
11
 
11
- - [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md)
12
+ **Lookup strategy:**
13
+
14
+ - Static paths (no `:param`) → O(1) `Map` lookup
15
+ - Dynamic paths → O(k) bucket-indexed scan using `URLPattern`, where `k` is the number
16
+ of routes sharing the same first path segment
17
+ - Results are cached after the first match in an LRU cache (default 500 entries,
18
+ configurable via the `cacheSize` constructor option)
19
+
20
+ **Pattern syntax** (`:param` / `:param?`):
21
+
22
+ - `:param` — required segment, matches exactly one non-`/` segment
23
+ - `:param?` — optional segment, matches zero or one non-`/` segment
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import { BaseRouteMap } from "@xmachines/play-router";
29
+
30
+ const map = new BaseRouteMap([
31
+ { stateId: "home", path: "/" },
32
+ { stateId: "profile", path: "/profile/:userId" },
33
+ { stateId: "settings", path: "/settings/:section?" },
34
+ ]);
35
+
36
+ map.getStateIdByPath("/"); // "home"
37
+ map.getStateIdByPath("/profile/123"); // "profile"
38
+ map.getStateIdByPath("/settings"); // "settings"
39
+ map.getStateIdByPath("/unknown"); // null
40
+
41
+ map.getPathByStateId("profile"); // "/profile/:userId"
42
+ map.getPathByStateId("missing"); // null
43
+ ```
12
44
 
13
45
  ## Constructors
14
46
 
15
47
  ### Constructor
16
48
 
17
49
  ```ts
18
- new RouteMap(mappings): RouteMap;
50
+ new RouteMap(mappings, options?): BaseRouteMap;
19
51
  ```
20
52
 
21
- Defined in: play-router/dist/base-route-map.d.ts:82
53
+ Defined in: [play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L125)
22
54
 
23
55
  Build a route map from an array of state ID ↔ path mappings.
24
56
 
@@ -28,17 +60,15 @@ buckets for efficient candidate selection.
28
60
 
29
61
  #### Parameters
30
62
 
31
- | Parameter | Type | Description |
32
- | ---------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
33
- | `mappings` | [`BaseRouteMapping`](../../play-router/interfaces/BaseRouteMapping.md)[] | Array of `{ stateId, path }` entries. Order determines priority when multiple patterns could match the same path. |
63
+ | Parameter | Type | Description |
64
+ | -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
65
+ | `mappings` | [`RouteMapping`](../interfaces/RouteMapping.md)[] | Array of `{ stateId, path }` entries. Order determines priority when multiple patterns could match the same path. |
66
+ | `options` | \{ `cacheSize?`: `number`; \} | Optional configuration. `options.cacheSize`: Maximum number of resolved parameterized path lookups to cache. Defaults to `500`. Increase for applications with many unique parameterized URL values (e.g. user profile pages with thousands of distinct IDs). After eviction the path falls back to the O(k) bucket pattern scan — correct but slower. Minimum effective value is `1` (QuickLRU constraint). |
67
+ | `options.cacheSize?` | `number` | - |
34
68
 
35
69
  #### Returns
36
70
 
37
- `RouteMap`
38
-
39
- #### Inherited from
40
-
41
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`constructor`](../../play-router/classes/BaseRouteMap.md#constructor)
71
+ `BaseRouteMap`
42
72
 
43
73
  ## Methods
44
74
 
@@ -48,7 +78,7 @@ buckets for efficient candidate selection.
48
78
  getPathByStateId(stateId): string | null;
49
79
  ```
50
80
 
51
- Defined in: play-router/dist/base-route-map.d.ts:112
81
+ Defined in: [play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L209)
52
82
 
53
83
  Look up the path pattern registered for a state ID.
54
84
 
@@ -71,10 +101,6 @@ map.getPathByStateId("profile"); // "/profile/:userId"
71
101
  map.getPathByStateId("missing"); // null
72
102
  ```
73
103
 
74
- #### Inherited from
75
-
76
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getPathByStateId`](../../play-router/classes/BaseRouteMap.md#getpathbystateid)
77
-
78
104
  ---
79
105
 
80
106
  ### getStateIdByPath()
@@ -83,7 +109,7 @@ map.getPathByStateId("missing"); // null
83
109
  getStateIdByPath(path): string | null;
84
110
  ```
85
111
 
86
- Defined in: play-router/dist/base-route-map.d.ts:99
112
+ Defined in: [play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-router/src/base-route-map.ts#L174)
87
113
 
88
114
  Resolve a URL path to its mapped state ID.
89
115
 
@@ -109,7 +135,3 @@ The mapped state ID, or `null` if no route matches
109
135
  map.getStateIdByPath("/profile/123"); // "profile"
110
136
  map.getStateIdByPath("/unknown"); // null
111
137
  ```
112
-
113
- #### Inherited from
114
-
115
- [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getStateIdByPath`](../../play-router/classes/BaseRouteMap.md#getstateidbypath)
@@ -6,7 +6,11 @@
6
6
  function connectRouter(options): () => void;
7
7
  ```
8
8
 
9
- Defined in: [play-sveltekit-router/src/connect-router.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-sveltekit-router/src/connect-router.ts#L28)
9
+ Defined in: [play-sveltekit-router/src/connect-router.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-sveltekit-router/src/connect-router.ts#L29)
10
+
11
+ Connect SvelteKit router to actor.
12
+
13
+ Returns a cleanup function. The public API surface is unchanged (D-14).
10
14
 
11
15
  ## Parameters
12
16
 
@@ -17,3 +21,12 @@ Defined in: [play-sveltekit-router/src/connect-router.ts:28](https://gitlab.com/
17
21
  ## Returns
18
22
 
19
23
  () => `void`
24
+
25
+ ## Example
26
+
27
+ ```typescript
28
+ import { connectRouter, createRouteMap } from "@xmachines/play-sveltekit-router";
29
+ const routeMap = createRouteMap(machine);
30
+ const disconnect = connectRouter({ actor, routeMap });
31
+ onDestroy(() => disconnect());
32
+ ```