@xmachines/docs 1.0.0-beta.34 → 1.0.0-beta.35
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.
- package/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +9 -9
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +4 -3
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -23
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +13 -13
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +12 -12
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +5 -5
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +7 -7
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomSchema.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-dom/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +3 -3
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/{RouteMapLike.md → RouteLookupContract.md} +7 -7
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +6 -11
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +2 -2
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +1 -0
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +24 -24
- package/api/@xmachines/play-react-router/classes/RouteMap.md +38 -22
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +21 -0
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +6 -6
- package/api/@xmachines/play-router/classes/{BaseRouteMap.md → RouteMap.md} +11 -11
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +24 -24
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +2 -2
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +6 -6
- package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +5 -5
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +6 -6
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/{RouteMap.md → RouteMatcher.md} +13 -13
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +2 -2
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +9 -9
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +25 -25
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +9 -9
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +9 -9
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +38 -22
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +24 -24
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +7 -39
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +9 -9
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +25 -25
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +9 -4
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +38 -20
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +25 -25
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +8 -8
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +1 -1
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +14 -14
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/README.md +47 -47
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/llms.txt +4 -2
- package/examples/@xmachines/play-dom-demo/README.md +2 -2
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +4 -3
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +5 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +4 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +4 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +8 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +5 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-dom-router-demo/README.md +26 -22
- package/examples/@xmachines/play-react-demo/README.md +2 -2
- package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +7 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +5 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +8 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +7 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +6 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-router-demo/README.md +5 -3
- package/examples/@xmachines/play-solid-demo/README.md +2 -2
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +5 -1
- package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +6 -3
- package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +5 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-router-demo/README.md +6 -4
- package/examples/@xmachines/play-svelte-demo/README.md +11 -1
- package/examples/@xmachines/play-svelte-demo/type-aliases/App.md +9 -0
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +9 -0
- package/examples/@xmachines/play-svelte-demo/variables/App.md +9 -0
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +172 -0
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +2 -2
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +2 -2
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +3 -3
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +4 -4
- package/examples/@xmachines/play-vue-demo/README.md +11 -2
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +9 -0
- package/examples/@xmachines/play-vue-demo/variables/App.md +9 -0
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +172 -0
- package/examples/@xmachines/play-vue-router-demo/README.md +21 -24
- package/examples/README.md +2 -0
- package/package.json +2 -2
- package/rfc/play.md +19 -19
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +0 -141
- package/api/_media/README.md +0 -404
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-vue-demo](../README.md) / authCatalog
|
|
2
|
+
|
|
3
|
+
# Variable: authCatalog
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const authCatalog: Catalog<
|
|
7
|
+
{
|
|
8
|
+
catalog: SchemaType<
|
|
9
|
+
"object",
|
|
10
|
+
{
|
|
11
|
+
actions: SchemaType<
|
|
12
|
+
"map",
|
|
13
|
+
{
|
|
14
|
+
description: SchemaType<"string", unknown>;
|
|
15
|
+
params: SchemaType<"zod", unknown>;
|
|
16
|
+
}
|
|
17
|
+
>;
|
|
18
|
+
components: SchemaType<
|
|
19
|
+
"map",
|
|
20
|
+
{
|
|
21
|
+
description: SchemaType<"string", unknown>;
|
|
22
|
+
example: SchemaType<"any", unknown>;
|
|
23
|
+
props: SchemaType<"zod", unknown>;
|
|
24
|
+
slots: SchemaType<"array", SchemaType<"string", unknown>>;
|
|
25
|
+
}
|
|
26
|
+
>;
|
|
27
|
+
}
|
|
28
|
+
>;
|
|
29
|
+
spec: SchemaType<
|
|
30
|
+
"object",
|
|
31
|
+
{
|
|
32
|
+
elements: SchemaType<
|
|
33
|
+
"record",
|
|
34
|
+
SchemaType<
|
|
35
|
+
"object",
|
|
36
|
+
{
|
|
37
|
+
children: SchemaType<"array", SchemaType<"string", unknown>>;
|
|
38
|
+
props: SchemaType<"propsOf", string>;
|
|
39
|
+
type: SchemaType<"ref", string>;
|
|
40
|
+
visible: SchemaType<"any", unknown>;
|
|
41
|
+
}
|
|
42
|
+
>
|
|
43
|
+
>;
|
|
44
|
+
root: SchemaType<"string", unknown>;
|
|
45
|
+
}
|
|
46
|
+
>;
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
actions: {
|
|
50
|
+
login: {
|
|
51
|
+
description: "Login with username";
|
|
52
|
+
params: ZodObject<
|
|
53
|
+
{
|
|
54
|
+
username: ZodString;
|
|
55
|
+
},
|
|
56
|
+
$strip
|
|
57
|
+
>;
|
|
58
|
+
};
|
|
59
|
+
logout: {
|
|
60
|
+
description: "Logout and return to home";
|
|
61
|
+
};
|
|
62
|
+
route: {
|
|
63
|
+
description: "Navigate to a route by path (e.g. '#home', '#login', '#dashboard')";
|
|
64
|
+
params: ZodObject<
|
|
65
|
+
{
|
|
66
|
+
params: ZodOptional<ZodRecord<ZodString, ZodString>>;
|
|
67
|
+
to: ZodString;
|
|
68
|
+
},
|
|
69
|
+
$strip
|
|
70
|
+
>;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
components: {
|
|
74
|
+
About: {
|
|
75
|
+
props: ZodObject<
|
|
76
|
+
{
|
|
77
|
+
title: ZodString;
|
|
78
|
+
},
|
|
79
|
+
$strip
|
|
80
|
+
>;
|
|
81
|
+
};
|
|
82
|
+
Contact: {
|
|
83
|
+
props: ZodObject<
|
|
84
|
+
{
|
|
85
|
+
title: ZodString;
|
|
86
|
+
},
|
|
87
|
+
$strip
|
|
88
|
+
>;
|
|
89
|
+
};
|
|
90
|
+
Dashboard: {
|
|
91
|
+
props: ZodObject<
|
|
92
|
+
{
|
|
93
|
+
username: ZodString;
|
|
94
|
+
welcome: ZodBoolean;
|
|
95
|
+
},
|
|
96
|
+
$strip
|
|
97
|
+
>;
|
|
98
|
+
};
|
|
99
|
+
Home: {
|
|
100
|
+
props: ZodObject<
|
|
101
|
+
{
|
|
102
|
+
title: ZodString;
|
|
103
|
+
},
|
|
104
|
+
$strip
|
|
105
|
+
>;
|
|
106
|
+
};
|
|
107
|
+
Login: {
|
|
108
|
+
props: ZodObject<
|
|
109
|
+
{
|
|
110
|
+
title: ZodString;
|
|
111
|
+
username: ZodOptional<ZodString>;
|
|
112
|
+
},
|
|
113
|
+
$strip
|
|
114
|
+
>;
|
|
115
|
+
};
|
|
116
|
+
NavBar: {
|
|
117
|
+
props: ZodObject<
|
|
118
|
+
{
|
|
119
|
+
isAuthenticated: ZodBoolean;
|
|
120
|
+
username: ZodNullable<ZodString>;
|
|
121
|
+
},
|
|
122
|
+
$strip
|
|
123
|
+
>;
|
|
124
|
+
};
|
|
125
|
+
Navigation: {
|
|
126
|
+
props: ZodObject<
|
|
127
|
+
{
|
|
128
|
+
currentPath: ZodString;
|
|
129
|
+
isAuthenticated: ZodBoolean;
|
|
130
|
+
},
|
|
131
|
+
$strip
|
|
132
|
+
>;
|
|
133
|
+
};
|
|
134
|
+
Overview: {
|
|
135
|
+
props: ZodObject<
|
|
136
|
+
{
|
|
137
|
+
title: ZodString;
|
|
138
|
+
},
|
|
139
|
+
$strip
|
|
140
|
+
>;
|
|
141
|
+
};
|
|
142
|
+
Profile: {
|
|
143
|
+
props: ZodObject<
|
|
144
|
+
{
|
|
145
|
+
username: ZodString;
|
|
146
|
+
},
|
|
147
|
+
$strip
|
|
148
|
+
>;
|
|
149
|
+
};
|
|
150
|
+
Settings: {
|
|
151
|
+
props: ZodObject<
|
|
152
|
+
{
|
|
153
|
+
section: ZodOptional<ZodString>;
|
|
154
|
+
username: ZodString;
|
|
155
|
+
},
|
|
156
|
+
$strip
|
|
157
|
+
>;
|
|
158
|
+
};
|
|
159
|
+
Stats: {
|
|
160
|
+
props: ZodObject<
|
|
161
|
+
{
|
|
162
|
+
title: ZodString;
|
|
163
|
+
},
|
|
164
|
+
$strip
|
|
165
|
+
>;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
>;
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Defined in: [packages/play-vue/examples/demo/src/catalog.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.35/packages/play-vue/examples/demo/src/catalog.ts#L5)
|
|
@@ -27,21 +27,17 @@ Then open `http://localhost:3001`.
|
|
|
27
27
|
|
|
28
28
|
Use this order to understand how the demo is wired:
|
|
29
29
|
|
|
30
|
-
1. `src/main.ts`
|
|
31
|
-
2. `src/
|
|
32
|
-
3. `src/
|
|
33
|
-
4.
|
|
34
|
-
5.
|
|
35
|
-
6.
|
|
30
|
+
1. `src/main.ts` creates the Vue app, installs Vue Router, mounts, and wires HMR cleanup.
|
|
31
|
+
2. `src/runtime.ts` creates the actor, starts it, builds the shared `registryResult`, and creates the `routeMap`.
|
|
32
|
+
3. `src/router.ts` installs a single catch-all route; `PlayRenderer` selects the actual view from actor state.
|
|
33
|
+
4. `src/App.vue` renders `<PlayRouterProvider>` with the shared actor, routeMap, router instance, and a `renderShell` renderer function.
|
|
34
|
+
5. The renderer function creates the shared `Shell` component with actor, router, and registry as props.
|
|
35
|
+
6. `PlayRouterProvider` waits for `router.isReady()` so direct URL loads are handled correctly.
|
|
36
|
+
7. Browser tests in `test/browser/` validate startup and auth route transitions.
|
|
36
37
|
|
|
37
38
|
```ts
|
|
38
39
|
// src/main.ts (shape)
|
|
39
|
-
const createPlayer = definePlayer({ machine: authMachine });
|
|
40
|
-
const actor = createPlayer();
|
|
41
|
-
actor.start();
|
|
42
|
-
|
|
43
40
|
const app = createApp(App);
|
|
44
|
-
app.provide("actor", actor);
|
|
45
41
|
app.use(router);
|
|
46
42
|
app.mount("#app");
|
|
47
43
|
```
|
|
@@ -54,11 +50,10 @@ export const routes = [{ path: "/:pathMatch(.*)*", name: "xmachines-play", compo
|
|
|
54
50
|
```vue
|
|
55
51
|
<!-- src/App.vue (shape) -->
|
|
56
52
|
<script setup lang="ts">
|
|
57
|
-
|
|
58
|
-
const routeMap = createRouteMap(authMachine);
|
|
53
|
+
import { actor, routeMap, registryResult } from "./runtime.js";
|
|
59
54
|
|
|
60
55
|
const renderShell = (currentActor, currentRouter) =>
|
|
61
|
-
h(SharedShell, { actor: currentActor, router: currentRouter,
|
|
56
|
+
h(SharedShell, { actor: currentActor, router: currentRouter, registryResult });
|
|
62
57
|
</script>
|
|
63
58
|
|
|
64
59
|
<template>
|
|
@@ -71,19 +66,21 @@ const renderShell = (currentActor, currentRouter) =>
|
|
|
71
66
|
</template>
|
|
72
67
|
```
|
|
73
68
|
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
```ts
|
|
70
|
+
// src/runtime.ts (shape)
|
|
71
|
+
export const actor = createPlayer();
|
|
72
|
+
actor.start();
|
|
73
|
+
|
|
74
|
+
export const routeMap = createRouteMap(authMachine);
|
|
75
|
+
export const registryResult = defineRegistry(authCatalog, { components, actions });
|
|
80
76
|
```
|
|
81
77
|
|
|
82
78
|
## Key Files
|
|
83
79
|
|
|
84
|
-
- `src/main.ts` -
|
|
80
|
+
- `src/main.ts` - Vue app bootstrap (mount + router install + HMR cleanup)
|
|
81
|
+
- `src/runtime.ts` - actor startup, routeMap creation, and registry construction
|
|
85
82
|
- `src/router.ts` - single catch-all route record
|
|
86
|
-
- `src/App.vue` - `
|
|
83
|
+
- `src/App.vue` - `PlayRouterProvider` wiring and renderer composition using the shared runtime
|
|
87
84
|
- `test/reactivity.test.ts` - reactive integration assertions
|
|
88
85
|
- `test/browser/shared-demo.browser.test.ts` - browser startup and full auth flow coverage
|
|
89
86
|
|
|
@@ -136,5 +133,5 @@ Expected result: reactivity integration tests and the browser shared-demo suite
|
|
|
136
133
|
|
|
137
134
|
## Learn More
|
|
138
135
|
|
|
139
|
-
- [Vue Router
|
|
140
|
-
- [Vue
|
|
136
|
+
- [Vue Router](../../README.md)
|
|
137
|
+
- [Vue](../../../play-vue)
|
package/examples/README.md
CHANGED
|
@@ -34,6 +34,7 @@ Complete working implementations of actor-authoritative routing with all archite
|
|
|
34
34
|
- [@xmachines/play-solid-demo](@xmachines/play-solid-demo/README.md)
|
|
35
35
|
- [@xmachines/play-svelte-demo](@xmachines/play-svelte-demo/README.md)
|
|
36
36
|
- [@xmachines/play-vue-demo](@xmachines/play-vue-demo/README.md)
|
|
37
|
+
|
|
37
38
|
<!-- typedoc:renderer-demos:end -->
|
|
38
39
|
|
|
39
40
|
### Router Demos
|
|
@@ -48,6 +49,7 @@ Complete working implementations of actor-authoritative routing with all archite
|
|
|
48
49
|
- [@xmachines/play-tanstack-react-router-demo](@xmachines/play-tanstack-react-router-demo/README.md)
|
|
49
50
|
- [@xmachines/play-tanstack-solid-router-demo](@xmachines/play-tanstack-solid-router-demo/README.md)
|
|
50
51
|
- [@xmachines/play-vue-router-demo](@xmachines/play-vue-router-demo/README.md)
|
|
52
|
+
|
|
51
53
|
<!-- typedoc:router-demos:end -->
|
|
52
54
|
|
|
53
55
|
## Running the Code Examples
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/docs",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.35",
|
|
4
4
|
"description": "Documentation for XMachines",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"test": "vitest run"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@xmachines/shared": "1.0.0-beta.
|
|
52
|
+
"@xmachines/shared": "1.0.0-beta.35",
|
|
53
53
|
"oxfmt": "^0.45.0",
|
|
54
54
|
"oxlint": "^1.60.0",
|
|
55
55
|
"typedoc": "^0.28.19",
|
package/rfc/play.md
CHANGED
|
@@ -20,24 +20,24 @@ The reference implementation provides a modular monorepo that satisfies the arch
|
|
|
20
20
|
### 2.1 Roles
|
|
21
21
|
|
|
22
22
|
- **The Actor (Logic Engine)**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
- Pure, environment-agnostic logic runtime
|
|
24
|
+
- Owns state, guards, errors, and route validity
|
|
25
|
+
- Emits _Virtual Routes_ as derived intent
|
|
26
26
|
|
|
27
27
|
- **The Runtime Adapter (Infrastructure Layer)**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
- Environment-specific adapter (Browser, Native, Server, Test Runner)
|
|
29
|
+
- Reflects Actor output into the environment
|
|
30
|
+
- Forwards environment events to the Actor without interpretation
|
|
31
31
|
|
|
32
32
|
- **The View**
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
- Passive consumer of Actor state
|
|
34
|
+
- No business rules or routing authority
|
|
35
35
|
|
|
36
36
|
### 2.2 Communication Medium
|
|
37
37
|
|
|
38
38
|
- **Signals (TC39 Proposal)**
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
- Used exclusively for Actor ↔ Adapter communication
|
|
40
|
+
- Enables synchronous, glitch-free propagation
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -75,9 +75,9 @@ The reference implementation provides a modular monorepo that satisfies the arch
|
|
|
75
75
|
- Defines **Virtual Routes** as metadata on state nodes
|
|
76
76
|
- Validates all incoming navigation intents
|
|
77
77
|
- On invalid intent:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
1. Transitions to an error or fallback state
|
|
79
|
+
2. Emits a corresponding Virtual Route (e.g. `/error`, `/login`)
|
|
80
|
+
3. Forces the environment to realign with Actor state
|
|
81
81
|
|
|
82
82
|
The Actor has zero knowledge of:
|
|
83
83
|
|
|
@@ -114,9 +114,9 @@ Wraps the TC39 Signals (Stage 1) polyfill. By isolating the reactive primitive w
|
|
|
114
114
|
**Exports:**
|
|
115
115
|
|
|
116
116
|
- `Signal` — Re-exported namespace from `signal-polyfill`:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
- `Signal.State` — Actor output snapshot
|
|
118
|
+
- `Signal.Computed` — Lazy, pull-based derivation of routes and views
|
|
119
|
+
- `Signal.subtle.Watcher` — Synchronous observation for Runtime Adapters
|
|
120
120
|
- `watchSignal` — Convenience function: subscribes to a single signal with a one-shot watcher lifecycle and microtask batching; returns a cleanup function
|
|
121
121
|
|
|
122
122
|
#### 5.1.2 `@xmachines/play`
|
|
@@ -246,9 +246,9 @@ Provides the complete routing infrastructure: route extraction from state machin
|
|
|
246
246
|
- `RouterBridge` — Interface: `{ connect(): void; disconnect(): void }`
|
|
247
247
|
- `PlayRouteEvent` — Routing event: `{ type: 'play.route'; to: string; params?; query?; match? }`
|
|
248
248
|
- `RouterBridgeBase` — Abstract base class that encapsulates common bridge logic (signal watching, route synchronization, param/query extraction). Subclasses implement only three methods:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
249
|
+
- `navigateRouter(path)` — Push a path into the framework router
|
|
250
|
+
- `watchRouterChanges()` — Subscribe to framework router navigation events
|
|
251
|
+
- `unwatchRouterChanges()` — Unsubscribe from framework router events
|
|
252
252
|
|
|
253
253
|
**Route Extraction Exports:**
|
|
254
254
|
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
[Documentation](../../../README.md) / [@xmachines/play-vue-router](../README.md) / VueBaseRouteMap
|
|
2
|
-
|
|
3
|
-
# Class: VueBaseRouteMap
|
|
4
|
-
|
|
5
|
-
Defined in: [play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-router/src/base-route-map.ts#L100)
|
|
6
|
-
|
|
7
|
-
Shared bidirectional route map base class.
|
|
8
|
-
|
|
9
|
-
All framework adapter `RouteMap` classes extend this — they add no logic of their
|
|
10
|
-
own and inherit the full public API from here.
|
|
11
|
-
|
|
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
|
-
```
|
|
44
|
-
|
|
45
|
-
## Extended by
|
|
46
|
-
|
|
47
|
-
- [`RouteMap`](RouteMap.md)
|
|
48
|
-
|
|
49
|
-
## Constructors
|
|
50
|
-
|
|
51
|
-
### Constructor
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
new VueBaseRouteMap(mappings, options?): BaseRouteMap;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Defined in: [play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-router/src/base-route-map.ts#L125)
|
|
58
|
-
|
|
59
|
-
Build a route map from an array of state ID ↔ path mappings.
|
|
60
|
-
|
|
61
|
-
Static paths (no `:param`) are indexed in an O(1) `Map`.
|
|
62
|
-
Parameterized paths are compiled to `URLPattern` and grouped into first-segment
|
|
63
|
-
buckets for efficient candidate selection.
|
|
64
|
-
|
|
65
|
-
#### Parameters
|
|
66
|
-
|
|
67
|
-
| Parameter | Type | Description |
|
|
68
|
-
| -------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
69
|
-
| `mappings` | [`RouteMapping`](../interfaces/RouteMapping.md)[] | Array of `{ stateId, path }` entries. Order determines priority when multiple patterns could match the same path. |
|
|
70
|
-
| `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). |
|
|
71
|
-
| `options.cacheSize?` | `number` | - |
|
|
72
|
-
|
|
73
|
-
#### Returns
|
|
74
|
-
|
|
75
|
-
`BaseRouteMap`
|
|
76
|
-
|
|
77
|
-
## Methods
|
|
78
|
-
|
|
79
|
-
### getPathByStateId()
|
|
80
|
-
|
|
81
|
-
```ts
|
|
82
|
-
getPathByStateId(stateId): string | null;
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Defined in: [play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-router/src/base-route-map.ts#L209)
|
|
86
|
-
|
|
87
|
-
Look up the path pattern registered for a state ID.
|
|
88
|
-
|
|
89
|
-
#### Parameters
|
|
90
|
-
|
|
91
|
-
| Parameter | Type | Description |
|
|
92
|
-
| --------- | -------- | --------------------------------------------------------- |
|
|
93
|
-
| `stateId` | `string` | State machine state ID (e.g., `"profile"`, `"#settings"`) |
|
|
94
|
-
|
|
95
|
-
#### Returns
|
|
96
|
-
|
|
97
|
-
`string` \| `null`
|
|
98
|
-
|
|
99
|
-
The registered path pattern, or `null` if the state ID is unknown
|
|
100
|
-
|
|
101
|
-
#### Example
|
|
102
|
-
|
|
103
|
-
```typescript
|
|
104
|
-
map.getPathByStateId("profile"); // "/profile/:userId"
|
|
105
|
-
map.getPathByStateId("missing"); // null
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
### getStateIdByPath()
|
|
111
|
-
|
|
112
|
-
```ts
|
|
113
|
-
getStateIdByPath(path): string | null;
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Defined in: [play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-router/src/base-route-map.ts#L174)
|
|
117
|
-
|
|
118
|
-
Resolve a URL path to its mapped state ID.
|
|
119
|
-
|
|
120
|
-
Strips query strings and hash fragments before matching. Tries an O(1) exact
|
|
121
|
-
lookup first, then falls back to bucket-indexed pattern matching. Results are
|
|
122
|
-
cached after the first pattern match.
|
|
123
|
-
|
|
124
|
-
#### Parameters
|
|
125
|
-
|
|
126
|
-
| Parameter | Type | Description |
|
|
127
|
-
| --------- | -------- | ------------------------------------------------------------------------------ |
|
|
128
|
-
| `path` | `string` | URL pathname, optionally including query/hash (e.g., `"/profile/123?ref=nav"`) |
|
|
129
|
-
|
|
130
|
-
#### Returns
|
|
131
|
-
|
|
132
|
-
`string` \| `null`
|
|
133
|
-
|
|
134
|
-
The mapped state ID, or `null` if no route matches
|
|
135
|
-
|
|
136
|
-
#### Example
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
map.getStateIdByPath("/profile/123"); // "profile"
|
|
140
|
-
map.getStateIdByPath("/unknown"); // null
|
|
141
|
-
```
|