@xmachines/docs 1.0.0-beta.53 → 1.0.0-beta.55
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/README.md +1 -1
- package/api/@xmachines/play/classes/NonNullableError.md +7 -7
- package/api/@xmachines/play/classes/PlayError.md +7 -7
- 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 +2 -0
- package/api/@xmachines/play-actor/classes/AbstractActor.md +14 -14
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +40 -0
- package/api/@xmachines/play-actor/functions/toAtomState.md +33 -0
- 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 +2 -0
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- 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 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +12 -30
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +7 -6
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +16 -15
- 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 +9 -8
- package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +25 -0
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +6 -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/ConfirmHandler.md +44 -0
- 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/RenderErrorHandler.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/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 +1 -1
- 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 +16 -6
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +7 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +16 -4
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-react/README.md +6 -6
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +18 -18
- package/api/@xmachines/play-react/functions/ActionProvider.md +1 -1
- package/api/@xmachines/play-react/functions/JSONUIProvider.md +1 -1
- package/api/@xmachines/play-react/functions/Renderer.md +1 -1
- package/api/@xmachines/play-react/functions/StateProvider.md +1 -1
- package/api/@xmachines/play-react/functions/ValidationProvider.md +1 -1
- package/api/@xmachines/play-react/functions/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-react/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useBoundProp.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +28 -26
- package/api/@xmachines/play-react/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-react/interfaces/JSONUIProviderProps.md +1 -1
- 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/RendererProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-react/type-aliases/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +10 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +4 -365
- package/api/@xmachines/play-react-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +45 -0
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +32 -0
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +17 -7
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +30 -0
- package/api/@xmachines/play-react-router/{functions → variables}/PlayRouterProvider.md +6 -6
- package/api/@xmachines/play-router/README.md +12 -10
- package/api/@xmachines/play-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +9 -345
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +11 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +2 -2
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +13 -6
- 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 +9 -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 +7 -2
- 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/PlayActor.md +7 -7
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +17 -0
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- 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 +6 -6
- 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 +4 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +4 -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/namespaces/Signal/classes/Computed.md +3 -3
- package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +4 -4
- package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +5 -5
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +1 -1
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/functions/ActionProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/JSONUIProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/Renderer.md +1 -1
- package/api/@xmachines/play-solid/functions/StateProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/ValidationProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-solid/functions/useAction.md +1 -1
- package/api/@xmachines/play-solid/functions/useActions.md +1 -1
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useBoundProp.md +1 -1
- package/api/@xmachines/play-solid/functions/useFieldValidation.md +1 -1
- package/api/@xmachines/play-solid/functions/useIsVisible.md +1 -1
- package/api/@xmachines/play-solid/functions/useOptionalValidation.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateBinding.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateStore.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateValue.md +1 -1
- package/api/@xmachines/play-solid/functions/useVisibility.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-solid/interfaces/DefineRegistryResult.md +1 -1
- package/api/@xmachines/play-solid/interfaces/JSONUIProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/RendererProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/ComponentRegistry.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/VisibilityProviderProps.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 +7 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +5 -360
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +44 -0
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +13 -13
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +30 -0
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +17 -7
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +34 -0
- 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-solid-router/{functions → variables}/PlayRouterProvider.md +6 -6
- 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/BaseComponentProps.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +6 -6
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-svelte/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +6 -6
- 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 +17 -5
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- 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 +16 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +7 -1
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +21 -384
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +45 -0
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +32 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +17 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +30 -0
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +12 -4
- package/api/@xmachines/play-tanstack-react-router/{functions → variables}/PlayRouterProvider.md +8 -6
- package/api/@xmachines/play-tanstack-router/README.md +58 -0
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +131 -0
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +57 -0
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +100 -0
- package/api/@xmachines/play-tanstack-solid-router/README.md +7 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +25 -378
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +44 -0
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +31 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +15 -7
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +30 -0
- 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 +30 -7
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +33 -0
- 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/functions/useBoundProp.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-vue/interfaces/DefineRegistryResult.md +1 -1
- package/api/@xmachines/play-vue/interfaces/JSONUIProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/RendererProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentFn.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/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-vue/variables/ActionProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/JSONUIProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/Renderer.md +1 -1
- package/api/@xmachines/play-vue/variables/StateProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/ValidationProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +17 -5
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +6 -395
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +16 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +6 -6
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +3 -3
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +70 -169
- 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/interfaces/RouteObject.md +2 -2
- 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/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/vite-aliases/README.md +1 -0
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +7 -3
- package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +6 -5
- package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +33 -0
- package/api/@xmachines/shared/vitest/README.md +5 -0
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +42 -0
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +16 -0
- package/api/README.md +1 -0
- package/api/llms.txt +4 -3
- package/contributing/architecture.md +6 -6
- package/contributing/configuration.md +1 -16
- package/contributing/deployment.md +8 -8
- package/contributing/testing.md +4 -4
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- 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 +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- 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 +1 -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 +1 -1
- 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 +1 -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-svelte-demo/type-aliases/App.md +1 -1
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/guides/README.md +6 -44
- package/package.json +6 -3
- package/api/@xmachines/play-router/functions/createRouteMatcher.md +0 -53
- package/api/@xmachines/play-router/interfaces/RouteMatcher.md +0 -56
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +0 -33
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Abstract Class: RouterBridgeBase
|
|
4
4
|
|
|
5
|
-
Defined in: [router-bridge-base.ts:
|
|
5
|
+
Defined in: [router-bridge-base.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-bridge-base.ts#L96)
|
|
6
6
|
|
|
7
7
|
Abstract base class for all `@xmachines` router adapter bridges.
|
|
8
8
|
|
|
@@ -13,9 +13,9 @@ between frameworks.
|
|
|
13
13
|
## Extended by
|
|
14
14
|
|
|
15
15
|
- [`ReactRouterBridge`](../../play-react-router/classes/ReactRouterBridge.md)
|
|
16
|
+
- [`TanStackRouterBridgeBase`](../../play-tanstack-router/classes/TanStackRouterBridgeBase.md)
|
|
16
17
|
- [`SolidRouterBridge`](../../play-solid-router/classes/SolidRouterBridge.md)
|
|
17
18
|
- [`TanStackReactRouterBridge`](../../play-tanstack-react-router/classes/TanStackReactRouterBridge.md)
|
|
18
|
-
- [`TanStackSolidRouterBridge`](../../play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md)
|
|
19
19
|
- [`VueRouterBridge`](../../play-vue-router/classes/VueRouterBridge.md)
|
|
20
20
|
|
|
21
21
|
## Implements
|
|
@@ -30,14 +30,14 @@ between frameworks.
|
|
|
30
30
|
new RouterBridgeBase(actor, routeMap): RouterBridgeBase;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [router-bridge-base.ts:
|
|
33
|
+
Defined in: [router-bridge-base.ts:123](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-bridge-base.ts#L123)
|
|
34
34
|
|
|
35
35
|
#### Parameters
|
|
36
36
|
|
|
37
|
-
| Parameter | Type | Description
|
|
38
|
-
| --------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
-
| `actor` | [`RoutableActor`](../interfaces/RoutableActor.md) | A `RoutableActor` exposing `currentRoute`, `initialRoute`, and `send`.
|
|
40
|
-
| `routeMap` | \{ `getPathByStateId`: `string` \| `null` \| `undefined`; `getStateIdByPath`: `string` \| `null` \| `undefined`; \} | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap(machine)` or an equivalent. |
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
39
|
+
| `actor` | [`RoutableActor`](../interfaces/RoutableActor.md) | A `RoutableActor` exposing `currentRoute`, `initialRoute`, and `send`. |
|
|
40
|
+
| `routeMap` | \{ `getPathByStateId`: `string` \| `null` \| `undefined`; `getStateIdByPath`: `string` \| `null` \| `undefined`; \} | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap(machine)` or an equivalent. `getPathByStateId` may be keyed on either the `"#stateId"` or the bare `"stateId"` form — both forms are tried automatically by the bridge, so custom implementations (e.g. plain test objects) need only handle one. |
|
|
41
41
|
| `routeMap.getPathByStateId` | - |
|
|
42
42
|
| `routeMap.getStateIdByPath` | - |
|
|
43
43
|
|
|
@@ -45,20 +45,6 @@ Defined in: [router-bridge-base.ts:124](https://gitlab.com/xmachin-es/xmachines-
|
|
|
45
45
|
|
|
46
46
|
`RouterBridgeBase`
|
|
47
47
|
|
|
48
|
-
## Properties
|
|
49
|
-
|
|
50
|
-
| Property | Modifier | Type | Default value | Description | Defined in |
|
|
51
|
-
| --------------------------------------------------------------------- | ----------- | --------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](../interfaces/RoutableActor.md) | `undefined` | A `RoutableActor` exposing `currentRoute`, `initialRoute`, and `send`. | [router-bridge-base.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L125) |
|
|
53
|
-
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L103) |
|
|
54
|
-
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L102) |
|
|
55
|
-
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | Guards `syncActorFromRouter` against re-entrant calls triggered by the actor's own guard redirects (router→actor send → signal fires → actor→router push → another syncActorFromRouter before the first one returns). NOT used for actor→router echo suppression — that is handled exclusively by `lastSyncedPath`, which is updated before `navigateRouter()` is called so any router callback for the same path short-circuits at the `sanitized === lastSyncedPath` check in `syncActorFromRouter`. | [router-bridge-base.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L115) |
|
|
56
|
-
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [router-bridge-base.ts:104](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L104) |
|
|
57
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | `undefined` | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap(machine)` or an equivalent. | [router-bridge-base.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L126) |
|
|
58
|
-
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L128) |
|
|
59
|
-
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L127) |
|
|
60
|
-
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | [`RouteWatcherHandle`](../interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [router-bridge-base.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L116) |
|
|
61
|
-
|
|
62
48
|
## Methods
|
|
63
49
|
|
|
64
50
|
### connect()
|
|
@@ -67,7 +53,7 @@ Defined in: [router-bridge-base.ts:124](https://gitlab.com/xmachin-es/xmachines-
|
|
|
67
53
|
connect(): void;
|
|
68
54
|
```
|
|
69
55
|
|
|
70
|
-
Defined in: [router-bridge-base.ts:
|
|
56
|
+
Defined in: [router-bridge-base.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-bridge-base.ts#L151)
|
|
71
57
|
|
|
72
58
|
Connect the router bridge to the Actor.
|
|
73
59
|
|
|
@@ -99,7 +85,7 @@ Adapters that need custom initial-sync behavior should override
|
|
|
99
85
|
disconnect(): void;
|
|
100
86
|
```
|
|
101
87
|
|
|
102
|
-
Defined in: [router-bridge-base.ts:
|
|
88
|
+
Defined in: [router-bridge-base.ts:256](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-bridge-base.ts#L256)
|
|
103
89
|
|
|
104
90
|
Disconnect the router bridge from the Actor.
|
|
105
91
|
|
|
@@ -112,325 +98,3 @@ Stops signal watching and unregisters framework-specific router listener.
|
|
|
112
98
|
#### Implementation of
|
|
113
99
|
|
|
114
100
|
[`RouterBridge`](../interfaces/RouterBridge.md).[`disconnect`](../interfaces/RouterBridge.md#disconnect)
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
### extractParams()
|
|
119
|
-
|
|
120
|
-
```ts
|
|
121
|
-
protected extractParams(pathname, stateId): Record<string, string>;
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Defined in: [router-bridge-base.ts:402](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L402)
|
|
125
|
-
|
|
126
|
-
Extract path parameters from URL using the URLPattern API.
|
|
127
|
-
|
|
128
|
-
Accesses `globalThis.URLPattern` at runtime — no polyfill is imported by this
|
|
129
|
-
library. If `URLPattern` is unavailable and the matched route has parameterized
|
|
130
|
-
segments, a `URLPatternUnavailableError` is thrown — callers must provide a polyfill
|
|
131
|
-
for environments without native URLPattern support (Node.js < 24, older browsers).
|
|
132
|
-
|
|
133
|
-
#### Parameters
|
|
134
|
-
|
|
135
|
-
| Parameter | Type | Description |
|
|
136
|
-
| ---------- | -------- | ----------------------------------------------------- |
|
|
137
|
-
| `pathname` | `string` | The actual URL path (e.g., '/profile/john') |
|
|
138
|
-
| `stateId` | `string` | The matched state ID for looking up the route pattern |
|
|
139
|
-
|
|
140
|
-
#### Returns
|
|
141
|
-
|
|
142
|
-
`Record`\<`string`, `string`\>
|
|
143
|
-
|
|
144
|
-
Extracted path parameters, or empty object if no match
|
|
145
|
-
|
|
146
|
-
#### Throws
|
|
147
|
-
|
|
148
|
-
When URLPattern is absent and the route is parameterized
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
### extractQuery()
|
|
153
|
-
|
|
154
|
-
```ts
|
|
155
|
-
protected extractQuery(search): Record<string, string>;
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Defined in: [router-bridge-base.ts:439](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L439)
|
|
159
|
-
|
|
160
|
-
Extract query parameters from URL search string.
|
|
161
|
-
|
|
162
|
-
#### Parameters
|
|
163
|
-
|
|
164
|
-
| Parameter | Type | Description |
|
|
165
|
-
| --------- | -------- | ------------------------------------------------ |
|
|
166
|
-
| `search` | `string` | URL search string (e.g., '?tab=security&page=1') |
|
|
167
|
-
|
|
168
|
-
#### Returns
|
|
169
|
-
|
|
170
|
-
`Record`\<`string`, `string`\>
|
|
171
|
-
|
|
172
|
-
Extracted query parameters or empty object
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
### getInitialRouterPath()
|
|
177
|
-
|
|
178
|
-
```ts
|
|
179
|
-
protected getInitialRouterPath(): string | null | undefined;
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Defined in: [router-bridge-base.ts:512](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L512)
|
|
183
|
-
|
|
184
|
-
Return the router's current pathname at connect() time.
|
|
185
|
-
|
|
186
|
-
Called once during connect() to perform the initial URL → actor sync.
|
|
187
|
-
router.subscribe() only fires on _future_ navigation events; it does not
|
|
188
|
-
replay the already-loaded location. Subclasses that can read the router's
|
|
189
|
-
current location synchronously (e.g. `router.state.location.pathname`)
|
|
190
|
-
should override this method so that deep-link / direct-URL loads drive the
|
|
191
|
-
actor to the correct state instead of leaving it at its machine default.
|
|
192
|
-
|
|
193
|
-
Return semantics:
|
|
194
|
-
|
|
195
|
-
- `string` → router has a current path; base connect() will sync actor from router
|
|
196
|
-
- `null` → router is active but has no current path yet; base connect() will sync router from actor
|
|
197
|
-
- `undefined` → adapter handles initial sync itself and base connect() should stay out of the way
|
|
198
|
-
|
|
199
|
-
The default returns `undefined`, preserving the previous behaviour for
|
|
200
|
-
bridges that have not yet implemented this hook.
|
|
201
|
-
|
|
202
|
-
#### Returns
|
|
203
|
-
|
|
204
|
-
`string` \| `null` \| `undefined`
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
### getInitialRouterSearch()
|
|
209
|
-
|
|
210
|
-
```ts
|
|
211
|
-
protected getInitialRouterSearch(): string | undefined;
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Defined in: [router-bridge-base.ts:529](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L529)
|
|
215
|
-
|
|
216
|
-
Return the router's current search string at connect() time.
|
|
217
|
-
|
|
218
|
-
Paired with `getInitialRouterPath()` — called once during connect() to pass
|
|
219
|
-
the initial URL query string to `syncActorFromRouter()`. If the router's current
|
|
220
|
-
URL has no search (or the subclass doesn't override this), returns `undefined`
|
|
221
|
-
and `syncActorFromRouter` will produce an empty `query: {}` in the event.
|
|
222
|
-
|
|
223
|
-
Subclasses that override `getInitialRouterPath()` and have a query string
|
|
224
|
-
available should also override this method.
|
|
225
|
-
|
|
226
|
-
#### Returns
|
|
227
|
-
|
|
228
|
-
`string` \| `undefined`
|
|
229
|
-
|
|
230
|
-
URL search string (e.g. `"?tab=security"`), or `undefined` if not available.
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### navigateRouter()
|
|
235
|
-
|
|
236
|
-
```ts
|
|
237
|
-
abstract protected navigateRouter(path): void;
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
Defined in: [router-bridge-base.ts:448](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L448)
|
|
241
|
-
|
|
242
|
-
Must trigger the framework router's navigation (e.g., router.navigate(path)).
|
|
243
|
-
|
|
244
|
-
#### Parameters
|
|
245
|
-
|
|
246
|
-
| Parameter | Type |
|
|
247
|
-
| --------- | -------- |
|
|
248
|
-
| `path` | `string` |
|
|
249
|
-
|
|
250
|
-
#### Returns
|
|
251
|
-
|
|
252
|
-
`void`
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
### resolveNavigationPath()
|
|
257
|
-
|
|
258
|
-
```ts
|
|
259
|
-
protected resolveNavigationPath(route): string | null;
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Defined in: [router-bridge-base.ts:424](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L424)
|
|
263
|
-
|
|
264
|
-
Resolve an actor route value to a concrete URL path for navigation.
|
|
265
|
-
|
|
266
|
-
Bridges that receive raw `actor.currentRoute` values in `navigateRouter`
|
|
267
|
-
can call this to normalize stateIds (with or without `#` prefix) to paths.
|
|
268
|
-
Returns `null` when navigation is not possible:
|
|
269
|
-
|
|
270
|
-
- unknown stateId with no route map entry
|
|
271
|
-
- parameterized pattern (e.g. `/profile/:id`) — no concrete values available
|
|
272
|
-
- non-path string that isn't a known stateId
|
|
273
|
-
|
|
274
|
-
Route maps may store stateIds with or without the `#` prefix; both forms
|
|
275
|
-
are tried automatically.
|
|
276
|
-
|
|
277
|
-
#### Parameters
|
|
278
|
-
|
|
279
|
-
| Parameter | Type | Description |
|
|
280
|
-
| --------- | -------- | -------------------------------------------------------------- |
|
|
281
|
-
| `route` | `string` | Raw actor route value (stateId, `#`-stateId, or concrete path) |
|
|
282
|
-
|
|
283
|
-
#### Returns
|
|
284
|
-
|
|
285
|
-
`string` \| `null`
|
|
286
|
-
|
|
287
|
-
Concrete URL path, or `null` if navigation should be skipped
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
### sanitizePath()
|
|
292
|
-
|
|
293
|
-
```ts
|
|
294
|
-
protected sanitizePath(pathname): string | null;
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
Defined in: [router-bridge-base.ts:466](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L466)
|
|
298
|
-
|
|
299
|
-
Sanitize and validate a raw URL pathname received from the router.
|
|
300
|
-
|
|
301
|
-
Applies the path-length cap (2048 chars), strips query strings and fragments
|
|
302
|
-
that may have been included in the pathname segment, and normalises
|
|
303
|
-
consecutive slashes.
|
|
304
|
-
|
|
305
|
-
Implementations that bypass `syncActorFromRouter()` (e.g. when using
|
|
306
|
-
framework-native reactive watchers that receive pre-parsed route objects)
|
|
307
|
-
MUST call this method before passing the path to any route-map lookup.
|
|
308
|
-
`syncActorFromRouter()` calls this internally, so bridges that delegate
|
|
309
|
-
to it do not need to call `sanitizePath` themselves.
|
|
310
|
-
|
|
311
|
-
#### Parameters
|
|
312
|
-
|
|
313
|
-
| Parameter | Type | Description |
|
|
314
|
-
| ---------- | -------- | ------------------------------------------- |
|
|
315
|
-
| `pathname` | `string` | Raw URL pathname from the framework router. |
|
|
316
|
-
|
|
317
|
-
#### Returns
|
|
318
|
-
|
|
319
|
-
`string` \| `null`
|
|
320
|
-
|
|
321
|
-
Sanitized pathname, or `null` if the path is invalid / too long.
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
### syncActorFromRouter()
|
|
326
|
-
|
|
327
|
-
```ts
|
|
328
|
-
protected syncActorFromRouter(pathname, search?): void;
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
Defined in: [router-bridge-base.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L324)
|
|
332
|
-
|
|
333
|
-
Sync actor state when router location changes.
|
|
334
|
-
|
|
335
|
-
**Known path:** sends a `play.route` event to the actor with the matched
|
|
336
|
-
stateId, params, and query. Prevents circular updates via the
|
|
337
|
-
`isProcessingNavigation` flag.
|
|
338
|
-
|
|
339
|
-
**Unknown/unmapped path:** does NOT send a `play.route` event (actor state
|
|
340
|
-
is unchanged). Instead, actively corrects the browser URL by calling
|
|
341
|
-
`navigateRouter(actor.currentRoute.get())` — keeping the URL in sync with
|
|
342
|
-
actor state even when the user types an invalid path into the address bar
|
|
343
|
-
or pushes one programmatically mid-session. `lastSyncedPath` is set to the
|
|
344
|
-
resolved concrete path before calling `navigateRouter` so the router's own
|
|
345
|
-
callback for that navigation short-circuits the echo-suppression guard and
|
|
346
|
-
sends no spurious event.
|
|
347
|
-
|
|
348
|
-
#### Parameters
|
|
349
|
-
|
|
350
|
-
| Parameter | Type |
|
|
351
|
-
| ---------- | -------- |
|
|
352
|
-
| `pathname` | `string` |
|
|
353
|
-
| `search?` | `string` |
|
|
354
|
-
|
|
355
|
-
#### Returns
|
|
356
|
-
|
|
357
|
-
`void`
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
### syncRouterFromActor()
|
|
362
|
-
|
|
363
|
-
```ts
|
|
364
|
-
protected syncRouterFromActor(route): void;
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Defined in: [router-bridge-base.ts:289](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L289)
|
|
368
|
-
|
|
369
|
-
Sync router location when actor route signal changes.
|
|
370
|
-
|
|
371
|
-
Calls navigateRouter() for framework-specific navigation.
|
|
372
|
-
|
|
373
|
-
Echo suppression — preventing the router's own callback from re-driving the
|
|
374
|
-
actor — is handled entirely by `lastSyncedPath`: it is set to `route` before
|
|
375
|
-
`navigateRouter()` is called, so any `syncActorFromRouter` invocation for the
|
|
376
|
-
same path short-circuits at the `sanitized === lastSyncedPath` check and sends
|
|
377
|
-
no event regardless of whether the callback fires synchronously or asynchronously.
|
|
378
|
-
|
|
379
|
-
`isProcessingNavigation` is NOT set here — it is only used inside
|
|
380
|
-
`syncActorFromRouter` to guard against re-entrant guard-redirect loops.
|
|
381
|
-
|
|
382
|
-
#### Parameters
|
|
383
|
-
|
|
384
|
-
| Parameter | Type |
|
|
385
|
-
| --------- | --------- |
|
|
386
|
-
| `route` | `unknown` |
|
|
387
|
-
|
|
388
|
-
#### Returns
|
|
389
|
-
|
|
390
|
-
`void`
|
|
391
|
-
|
|
392
|
-
---
|
|
393
|
-
|
|
394
|
-
### unwatchRouterChanges()
|
|
395
|
-
|
|
396
|
-
```ts
|
|
397
|
-
abstract protected unwatchRouterChanges(): void;
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
Defined in: [router-bridge-base.ts:492](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L492)
|
|
401
|
-
|
|
402
|
-
Stop watching for router location changes.
|
|
403
|
-
|
|
404
|
-
Called by disconnect(). Should clean up the framework-specific subscription.
|
|
405
|
-
|
|
406
|
-
#### Returns
|
|
407
|
-
|
|
408
|
-
`void`
|
|
409
|
-
|
|
410
|
-
---
|
|
411
|
-
|
|
412
|
-
### watchRouterChanges()
|
|
413
|
-
|
|
414
|
-
```ts
|
|
415
|
-
abstract protected watchRouterChanges(): void;
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
Defined in: [router-bridge-base.ts:485](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.53/packages/play-router/src/router-bridge-base.ts#L485)
|
|
419
|
-
|
|
420
|
-
Start watching for router location changes.
|
|
421
|
-
|
|
422
|
-
Called by connect(). Should set up the framework-specific subscription
|
|
423
|
-
for location changes and call syncActorFromRouter() on each change.
|
|
424
|
-
|
|
425
|
-
**Implementations that call `syncActorFromRouter`** get path sanitization
|
|
426
|
-
applied automatically — no extra work needed.
|
|
427
|
-
|
|
428
|
-
**Implementations that bypass `syncActorFromRouter`** (e.g. `VueRouterBridge`,
|
|
429
|
-
which builds the `play.route` event directly from framework-native route params)
|
|
430
|
-
MUST call `this.sanitizePath(path)` and return early when it returns `null`.
|
|
431
|
-
Skipping this allows oversized or malformed paths through without the length
|
|
432
|
-
and content guards that protect the route-map lookup.
|
|
433
|
-
|
|
434
|
-
#### Returns
|
|
435
|
-
|
|
436
|
-
`void`
|
|
@@ -9,7 +9,7 @@ function buildPlayRouteEvent(options): {
|
|
|
9
9
|
} | null;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [router-sync.ts:
|
|
12
|
+
Defined in: [router-sync.ts:168](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-sync.ts#L168)
|
|
13
13
|
|
|
14
14
|
Build a normalized `play.route` event from raw router/browser input.
|
|
15
15
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function buildRouteTree(routes): RouteTree;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [build-tree.ts:
|
|
9
|
+
Defined in: [build-tree.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/build-tree.ts#L21)
|
|
10
10
|
|
|
11
11
|
Build hierarchical route tree from flat route list
|
|
12
12
|
|
|
@@ -14,6 +14,12 @@ Constructs nested tree respecting parent-child state relationships.
|
|
|
14
14
|
Absolute routes become top-level, relative routes nest under parents.
|
|
15
15
|
Creates bidirectional maps for state ID ↔ path lookup.
|
|
16
16
|
|
|
17
|
+
Duplicate detection runs here — after relative routes are resolved against
|
|
18
|
+
their parent's full path — so two relative routes with the same raw string
|
|
19
|
+
under different parents are valid, while distinct raw strings that resolve to
|
|
20
|
+
the same full path (which would silently overwrite each other in `byPath`)
|
|
21
|
+
are rejected.
|
|
22
|
+
|
|
17
23
|
## Parameters
|
|
18
24
|
|
|
19
25
|
| Parameter | Type | Description |
|
|
@@ -25,3 +31,7 @@ Creates bidirectional maps for state ID ↔ path lookup.
|
|
|
25
31
|
[`RouteTree`](../interfaces/RouteTree.md)
|
|
26
32
|
|
|
27
33
|
RouteTree with root, byStateId map, and byPath map
|
|
34
|
+
|
|
35
|
+
## Throws
|
|
36
|
+
|
|
37
|
+
If two states resolve to the same full path
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine, options?): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/create-route-map.ts#L45)
|
|
10
10
|
|
|
11
11
|
Create a `RouteMap` from an XState state machine.
|
|
12
12
|
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
function createRouteMapFromTree(routeTree, options?): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/create-route-map-from-tree.ts#L33)
|
|
10
10
|
|
|
11
11
|
Create a `RouteMap` from a `RouteTree` node structure.
|
|
12
12
|
|
|
13
|
-
Used by framework-router adapters
|
|
13
|
+
Used by framework-router adapters that pass a
|
|
14
14
|
`RouteTree` produced by `extractMachineRoutes()` rather than calling
|
|
15
15
|
`createRouteMap()` directly.
|
|
16
16
|
|
|
@@ -6,11 +6,18 @@
|
|
|
6
6
|
function detectDuplicateRoutes(routes): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [validate-routes.ts:
|
|
9
|
+
Defined in: [validate-routes.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/validate-routes.ts#L69)
|
|
10
10
|
|
|
11
11
|
Detect duplicate route paths
|
|
12
12
|
|
|
13
|
-
THROWS ERROR when multiple states share the same
|
|
13
|
+
THROWS ERROR when multiple states share the same RESOLVED full path.
|
|
14
|
+
|
|
15
|
+
Detection operates on resolved full paths (after relative routes have been
|
|
16
|
+
prefixed with their parent's path in `buildRouteTree`), not on raw route
|
|
17
|
+
strings: two relative `"settings"` routes under different parents resolve to
|
|
18
|
+
distinct full paths and are valid, while a relative route and an absolute
|
|
19
|
+
route resolving to the same URL genuinely collide and must be rejected.
|
|
20
|
+
Called from `buildRouteTree` once full paths are known.
|
|
14
21
|
|
|
15
22
|
Rationale: URL-based routing requires one-to-one mapping between URLs and states.
|
|
16
23
|
Multiple states at the same path creates ambiguity for browser navigation (back button,
|
|
@@ -19,9 +26,9 @@ conditional rendering.
|
|
|
19
26
|
|
|
20
27
|
## Parameters
|
|
21
28
|
|
|
22
|
-
| Parameter | Type
|
|
23
|
-
| --------- |
|
|
24
|
-
| `routes` | [`
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --------- | ----------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
31
|
+
| `routes` | [`ResolvedRoutePath`](../interfaces/ResolvedRoutePath.md)[] | Array of route entries with resolved full paths (e.g. `RouteNode`s) |
|
|
25
32
|
|
|
26
33
|
## Returns
|
|
27
34
|
|
|
@@ -29,4 +36,4 @@ conditional rendering.
|
|
|
29
36
|
|
|
30
37
|
## Throws
|
|
31
38
|
|
|
32
|
-
If duplicate route paths are detected
|
|
39
|
+
If duplicate resolved route paths are detected
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function extractMachineRoutes(machine): RouteTree;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [extract-routes.ts:
|
|
9
|
+
Defined in: [extract-routes.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/extract-routes.ts#L89)
|
|
10
10
|
|
|
11
11
|
Extract complete route tree from state machine graph
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function extractQuery(search): Record<string, string>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [router-sync.ts:
|
|
9
|
+
Defined in: [router-sync.ts:149](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-sync.ts#L149)
|
|
10
10
|
|
|
11
11
|
Parse a URL search string into the plain object shape expected by
|
|
12
12
|
`play.route` events.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function extractRouteParams(pathname, pattern): Record<string, string>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [router-sync.ts:
|
|
9
|
+
Defined in: [router-sync.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/router-sync.ts#L112)
|
|
10
10
|
|
|
11
11
|
Extract named path parameters from a URL using the URLPattern API.
|
|
12
12
|
|
|
@@ -16,6 +16,14 @@ For extraction via a state ID lookup, see `RouterBridgeBase.extractParams`.
|
|
|
16
16
|
Undefined values (unmatched optional segments, e.g. `/settings` against
|
|
17
17
|
`/settings/:section?`) are omitted from the returned object.
|
|
18
18
|
|
|
19
|
+
The pattern is normalized with the same rules `RouteMap` uses for matching
|
|
20
|
+
(hyphenated names like `:cat-id` become `:cat_id` for URLPattern), and the
|
|
21
|
+
extracted group names are mapped back to the original param names, so
|
|
22
|
+
`/docs/123` against `/docs/:cat-id` yields `{ "cat-id": "123" }`.
|
|
23
|
+
|
|
24
|
+
Values are percent-decoded (`john%20doe` → `john doe`), matching framework
|
|
25
|
+
router semantics (e.g. vue-router). Malformed sequences are kept raw.
|
|
26
|
+
|
|
19
27
|
## Parameters
|
|
20
28
|
|
|
21
29
|
| Parameter | Type | Description |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function findRouteById(tree, id): RouteNode | undefined;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [find-route.ts:
|
|
9
|
+
Defined in: [find-route.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/find-route.ts#L57)
|
|
10
10
|
|
|
11
11
|
Find route node by state ID
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function findRouteByPath(tree, path): RouteNode | undefined;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [find-route.ts:
|
|
9
|
+
Defined in: [find-route.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/find-route.ts#L82)
|
|
10
10
|
|
|
11
11
|
Find route node by URL path
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getNavigableRoutes(tree, stateId): RouteNode[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:
|
|
9
|
+
Defined in: [query.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/query.ts#L64)
|
|
10
10
|
|
|
11
11
|
Get all routes navigable from given state
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getRoutableRoutes(tree): RouteNode[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:
|
|
9
|
+
Defined in: [query.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/query.ts#L126)
|
|
10
10
|
|
|
11
11
|
Get all routable routes from tree as flat array
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getTransitionReachableRoutes(graph, stateId): string[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:
|
|
9
|
+
Defined in: [query.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/query.ts#L177)
|
|
10
10
|
|
|
11
11
|
Get routes reachable via transitions from current state
|
|
12
12
|
|
|
@@ -14,6 +14,11 @@ Uses the @statelyai/graph successor algorithm to find all states
|
|
|
14
14
|
directly reachable via transition edges from the given state,
|
|
15
15
|
then filters to those with defined routes.
|
|
16
16
|
|
|
17
|
+
Returned values are the RAW `meta.route` strings from the machine — relative
|
|
18
|
+
routes (e.g. `"detail"`) are NOT resolved to full paths and cannot be used as
|
|
19
|
+
`tree.byPath` keys. For resolved `RouteNode`s use `getNavigableRoutes`, which
|
|
20
|
+
resolves reachable states through `tree.byStateId`.
|
|
21
|
+
|
|
17
22
|
## Parameters
|
|
18
23
|
|
|
19
24
|
| Parameter | Type | Description |
|
|
@@ -25,7 +30,7 @@ then filters to those with defined routes.
|
|
|
25
30
|
|
|
26
31
|
`string`[]
|
|
27
32
|
|
|
28
|
-
Array of route
|
|
33
|
+
Array of raw route strings reachable via transitions
|
|
29
34
|
|
|
30
35
|
## Example
|
|
31
36
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function isRouteReachable(graph, fromStateId, toStateId): boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:
|
|
9
|
+
Defined in: [query.ts:204](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.55/packages/play-router/src/query.ts#L204)
|
|
10
10
|
|
|
11
11
|
Check if a route is reachable from current state via transitions
|
|
12
12
|
|