@xmachines/docs 2.2.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/api/@xmachines/play/README.md +74 -7
- package/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/asCleanup.md +78 -0
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play/type-aliases/DisposeKey.md +32 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-actor/README.md +8 -1
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
- package/api/@xmachines/play-actor/functions/composePlayState.md +1 -1
- package/api/@xmachines/play-actor/functions/createFailureLatch.md +20 -0
- package/api/@xmachines/play-actor/functions/createReportGuard.md +26 -0
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +1 -1
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +1 -1
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +1 -1
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +1 -1
- package/api/@xmachines/play-actor/functions/sameViewInputs.md +25 -0
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +1 -1
- package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
- 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/FailureLatch.md +59 -0
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/ReportGuard.md +92 -0
- package/api/@xmachines/play-actor/interfaces/ReportGuardMessages.md +18 -0
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewInputs.md +19 -0
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +4 -4
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +1 -1
- package/api/@xmachines/play-dom/README.md +84 -16
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +10 -10
- package/api/@xmachines/play-dom/functions/createPlayUI.md +8 -8
- package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +17 -11
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -4
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -12
- package/api/@xmachines/play-dom/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play-dom/type-aliases/DisposablePlayUI.md +36 -0
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -1
- package/api/@xmachines/play-dom-router/README.md +44 -18
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +7 -7
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +3 -3
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +20 -8
- package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +27 -17
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/DisposableBrowserHistory.md +262 -0
- package/api/@xmachines/play-dom-router/interfaces/DisposableVanillaRouter.md +80 -0
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- 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 +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +35 -6
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +26 -5
- package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play-dom-router/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-react/README.md +2 -2
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +42 -7
- 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 +10 -10
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +8 -6
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -5
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/PlayRendererProps.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 +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +7 -7
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -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 +3 -3
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-router/README.md +13 -2
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +7 -7
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/cleanFrameworkParams.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouterConnection.md +1 -1
- 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/getPatternParamNames.md +1 -1
- package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRouteMappings.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isMountableBridge.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/joinBasePath.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/mountKey.md +1 -1
- package/api/@xmachines/play-router/functions/normalizeBasePath.md +1 -1
- package/api/@xmachines/play-router/functions/openProviderBridge.md +5 -5
- package/api/@xmachines/play-router/functions/pickOwnParams.md +1 -1
- package/api/@xmachines/play-router/functions/repointProviderBridge.md +1 -1
- package/api/@xmachines/play-router/functions/resolveBasePath.md +1 -1
- package/api/@xmachines/play-router/functions/resolveFrameworkParams.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/stripBasePath.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/BasePathOptions.md +5 -5
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
- package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +8 -8
- package/api/@xmachines/play-router/interfaces/LocationLike.md +5 -5
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +7 -7
- package/api/@xmachines/play-router/interfaces/MountableRouterBridge.md +8 -8
- package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +8 -8
- package/api/@xmachines/play-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-router/interfaces/PlayRouterProviderBaseProps.md +9 -9
- package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +5 -5
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +5 -5
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
- package/api/@xmachines/play-router/interfaces/RouteObject.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -7
- 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/RouterConnection.md +37 -8
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +1 -1
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-router/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-router/variables/NO_BASE_PATH.md +1 -1
- package/api/@xmachines/play-signals/README.md +4 -2
- package/api/@xmachines/play-signals/functions/watchSignal.md +27 -4
- 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/Cleanup.md +38 -0
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +23 -5
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +14 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +13 -5
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.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 +1 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +8 -8
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +7 -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 +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- 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/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-svelte/README.md +3 -3
- 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 +7 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +7 -7
- 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/BasePathOptions.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -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 +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +35 -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/README.md +1 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +7 -7
- 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/BasePathOptions.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
- 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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +35 -6
- 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 +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +7 -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 +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +7 -7
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +8 -8
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +7 -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 +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- 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 +5 -5
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-vue/README.md +34 -12
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/usePlayView.md +6 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +12 -7
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +15 -10
- 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/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/getPlayViewContext.md +6 -1
- package/api/@xmachines/play-vue-router/README.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +8 -8
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -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 +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +1 -1
- package/api/@xmachines/play-xstate/README.md +19 -2
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +53 -17
- 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 +7 -7
- 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/play-xstate/variables/DISPOSE.md +34 -0
- package/api/@xmachines/shared/README.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- 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 +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/contributing/architecture.md +5 -1
- package/contributing/configuration.md +59 -17
- package/contributing/development.md +50 -28
- package/contributing/testing.md +3 -3
- package/guides/getting-started.md +7 -7
- package/guides/signals.md +43 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayUIProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L127)
|
|
6
6
|
|
|
7
7
|
The framework-agnostic base props. Every `ActorProvider` implementation shares
|
|
8
8
|
them: React, Vue, Solid, and Svelte. `TRegistry` holds the
|
|
@@ -31,15 +31,15 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
31
31
|
|
|
32
32
|
## Properties
|
|
33
33
|
|
|
34
|
-
| Property | Type | Description
|
|
35
|
-
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability.
|
|
37
|
-
| <a id="property-children"></a> `children` | `Snippet` | -
|
|
38
|
-
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | -
|
|
39
|
-
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | -
|
|
40
|
-
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | -
|
|
41
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | -
|
|
42
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry.
|
|
43
|
-
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers.
|
|
44
|
-
| <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, which is the controlled mode. With this option, the provider ignores spec.state, and this store is the single source of truth. Without it, the provider makes a new @xstate/store atom for each view transition, with the values of spec.state.
|
|
45
|
-
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | -
|
|
34
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
35
|
+
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [`ActorProviderProps`](ActorProviderProps.md).[`actor`](ActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:163](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L163) |
|
|
37
|
+
| <a id="property-children"></a> `children` | `Snippet` | - | [`ActorProviderProps`](ActorProviderProps.md).[`children`](ActorProviderProps.md#property-children) | [packages/play-svelte/src/actor-context.svelte.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L120) |
|
|
38
|
+
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | [`ActorProviderProps`](ActorProviderProps.md).[`fallback`](ActorProviderProps.md#property-fallback) | [packages/play-svelte/src/actor-context.svelte.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L79) |
|
|
39
|
+
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L133) |
|
|
40
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:132](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L132) |
|
|
41
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | The optional callback. The provider calls it when the outer `<svelte:boundary>` catches an error, and when the resolution of the store fails. The second parameter is the `reset` callback, for a retry that the host starts. The reset resolves the view that the actor holds at the moment of the call, and not the view that failed: the host can keep the callback on a "Retry" button while the actor moves on. A reset that the host calls from inside this handler starts no second retry, because no input changed between the two attempts. **ONE reset serves a failure of either kind, and it retries the failure on the screen NOW.** A host can keep the callback — a "Retry" button of a toast outlives the failure that opened it — and the press retries whatever failure stands at that moment, and not the one that handed the callback out. The four other renderers hand the host one reset the same way, and the five hold ONE contract. **Each reset does nothing after the provider is destroyed.** The host can hold the callback — a "Retry" button of a toast outlives the route that opened it — and a reset of a provider that is gone would report to the host a second time, from a component that renders nothing. The callback stays safe to hold, and safe to call. While the error is active, the provider renders the `fallback` instead of its children. The provider clears the error on the next view emission (when `currentView` changes), so a view transition retries the render. Element-level catalog component throws are caught upstream by the per-element boundary of @json-render, and reported through `onRenderError`. This boundary is the outer net for everything else. **A handler that THROWS reaches no caller.** The provider contains that throw, and it writes the throw to `console.error`. Svelte catches such a throw itself, and it leaves its own `calling_on_error` flag raised: every later reset of the host then raises `svelte_boundary_reset_onerror`, so the "Retry" button throws and the boundary can never clear. Report a failure from this handler. To ESCALATE one, raise it from a task of your own — `queueMicrotask(() => { throw error; })` — which reaches the global handler of the page and leaves the containment whole. The five renderers hold this one rule. | [`ActorProviderProps`](ActorProviderProps.md).[`onError`](ActorProviderProps.md#property-onerror) | [packages/play-svelte/src/actor-context.svelte.ts:119](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L119) |
|
|
42
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [`ActorProviderProps`](ActorProviderProps.md).[`onRenderError`](ActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L177) |
|
|
43
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [`ActorProviderProps`](ActorProviderProps.md).[`registryResult`](ActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:165](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L165) |
|
|
44
|
+
| <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, which is the controlled mode. With this option, the provider ignores spec.state, and this store is the single source of truth. Without it, the provider makes a new @xstate/store atom for each view transition, with the values of spec.state. | [`ActorProviderProps`](ActorProviderProps.md).[`store`](ActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:172](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L172) |
|
|
45
|
+
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L128) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewContextValue
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L51)
|
|
6
6
|
|
|
7
7
|
The framework-agnostic base of the `ViewContextValue` type in each framework.
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ same generic parameter as in `BaseActorProviderProps`.
|
|
|
19
19
|
|
|
20
20
|
| Property | Type | Description | Inherited from | Defined in |
|
|
21
21
|
| ----------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | The action handlers, resolved against the live StateStore. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`handlers`](../../play-actor/interfaces/BaseViewContextValue.md#property-handlers) | [packages/play-actor/src/abstract-actor.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
23
|
-
| <a id="property-registry"></a> `registry` | `TRegistry` | The component registry, from registryResult.registry. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`registry`](../../play-actor/interfaces/BaseViewContextValue.md#property-registry) | [packages/play-actor/src/abstract-actor.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
-
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`spec`](../../play-actor/interfaces/BaseViewContextValue.md#property-spec) | [packages/play-actor/src/abstract-actor.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
25
|
-
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore. Give it to JSONUIProvider or JsonUIProvider as `store`, and the providers then share the state. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`store`](../../play-actor/interfaces/BaseViewContextValue.md#property-store) | [packages/play-actor/src/abstract-actor.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
22
|
+
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | The action handlers, resolved against the live StateStore. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`handlers`](../../play-actor/interfaces/BaseViewContextValue.md#property-handlers) | [packages/play-actor/src/abstract-actor.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L127) |
|
|
23
|
+
| <a id="property-registry"></a> `registry` | `TRegistry` | The component registry, from registryResult.registry. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`registry`](../../play-actor/interfaces/BaseViewContextValue.md#property-registry) | [packages/play-actor/src/abstract-actor.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L129) |
|
|
24
|
+
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`spec`](../../play-actor/interfaces/BaseViewContextValue.md#property-spec) | [packages/play-actor/src/abstract-actor.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L125) |
|
|
25
|
+
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore. Give it to JSONUIProvider or JsonUIProvider as `store`, and the providers then share the state. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`store`](../../play-actor/interfaces/BaseViewContextValue.md#property-store) | [packages/play-actor/src/abstract-actor.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-actor/src/abstract-actor.ts#L133) |
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type AnyPlayActor = AbstractActor<AnyActorLogic> & Viewable;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte/src/actor-context.svelte.ts#L25)
|
|
10
10
|
|
|
11
11
|
The actor type that the Svelte `ActorProvider` and `getActorContext` accept. It requires `Viewable` for the view rendering. For the complete routing and view shape, use `PlayActor` from `@xmachines/play-router`.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
> Svelte SPA Router adapter for the XMachines Play architecture. It connects hash-based routing to a `Routable` actor, so the state machine owns the navigation.
|
|
6
6
|
|
|
7
|
-
[](https://opensource.org/licenses/MIT) [](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@xmachines/play-svelte-spa-router)
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/base-route-map.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/base-route-map.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L105)
|
|
6
6
|
|
|
7
7
|
The shared base class of the route map for both directions.
|
|
8
8
|
|
|
@@ -58,7 +58,7 @@ map.getPathByStateId("missing"); // null
|
|
|
58
58
|
new RouteMap(mappings, options?): RouteMap;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [play-router/src/base-route-map.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
61
|
+
Defined in: [play-router/src/base-route-map.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L133)
|
|
62
62
|
|
|
63
63
|
Builds a route map from an array of the mappings between a state ID and a path.
|
|
64
64
|
|
|
@@ -87,7 +87,7 @@ candidates is therefore efficient.
|
|
|
87
87
|
getPathByStateId(stateId): string | null;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [play-router/src/base-route-map.ts:229](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
90
|
+
Defined in: [play-router/src/base-route-map.ts:229](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L229)
|
|
91
91
|
|
|
92
92
|
Returns the path pattern of a state ID.
|
|
93
93
|
|
|
@@ -123,7 +123,7 @@ map.getPathByStateId("missing"); // null
|
|
|
123
123
|
getStateIdByPath(path): string | null;
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
Defined in: [play-router/src/base-route-map.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
126
|
+
Defined in: [play-router/src/base-route-map.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L189)
|
|
127
127
|
|
|
128
128
|
Resolves a URL path to its state ID.
|
|
129
129
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: SvelteSpaRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-svelte-spa-router/src/svelte-spa-router-bridge.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-svelte-spa-router/src/svelte-spa-router-bridge.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/svelte-spa-router-bridge.ts#L30)
|
|
6
6
|
|
|
7
7
|
The Svelte SPA router bridge — it connects svelte-spa-router to RouterBridgeBase.
|
|
8
8
|
|
|
@@ -58,7 +58,7 @@ new SvelteSpaRouterBridge(
|
|
|
58
58
|
options?): SvelteSpaRouterBridge;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [play-svelte-spa-router/src/svelte-spa-router-bridge.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
61
|
+
Defined in: [play-svelte-spa-router/src/svelte-spa-router-bridge.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/svelte-spa-router-bridge.ts#L33)
|
|
62
62
|
|
|
63
63
|
#### Parameters
|
|
64
64
|
|
|
@@ -87,7 +87,7 @@ Defined in: [play-svelte-spa-router/src/svelte-spa-router-bridge.ts:33](https://
|
|
|
87
87
|
get basePath(): string;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [play-router/src/router-bridge-base.ts:255](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
90
|
+
Defined in: [play-router/src/router-bridge-base.ts:255](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L255)
|
|
91
91
|
|
|
92
92
|
The resolved URL prefix that the machine of this bridge is mounted under, or `""`
|
|
93
93
|
when the machine owns the complete router.
|
|
@@ -112,7 +112,7 @@ The resolved URL prefix of the mount, or `""` when the machine owns the complete
|
|
|
112
112
|
get basePathParams(): Readonly<Record<string, string>>;
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Defined in: [play-router/src/router-bridge-base.ts:284](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
115
|
+
Defined in: [play-router/src/router-bridge-base.ts:284](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L284)
|
|
116
116
|
|
|
117
117
|
The resolved values of the `:param` segments of the mount, or `{}` for a prefix
|
|
118
118
|
without a param.
|
|
@@ -163,7 +163,7 @@ mount while the machine stays on the same route, and no event goes out.
|
|
|
163
163
|
connect(): void;
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
Defined in: [play-router/src/router-bridge-base.ts:506](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
166
|
+
Defined in: [play-router/src/router-bridge-base.ts:506](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L506)
|
|
167
167
|
|
|
168
168
|
Connects the router bridge to the Actor.
|
|
169
169
|
|
|
@@ -197,7 +197,7 @@ An adapter that needs a different behavior of the first synchronization override
|
|
|
197
197
|
disconnect(): void;
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
Defined in: [play-router/src/router-bridge-base.ts:728](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
200
|
+
Defined in: [play-router/src/router-bridge-base.ts:728](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L728)
|
|
201
201
|
|
|
202
202
|
Disconnects the router bridge from the Actor.
|
|
203
203
|
|
|
@@ -220,7 +220,7 @@ framework.
|
|
|
220
220
|
setBasePath(basePath?, basePathParams?): void;
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
Defined in: [play-router/src/router-bridge-base.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
223
|
+
Defined in: [play-router/src/router-bridge-base.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/router-bridge-base.ts#L324)
|
|
224
224
|
|
|
225
225
|
Moves the machine to a different mount point, while it stays connected.
|
|
226
226
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function connectRouter(options): RouterConnection;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-svelte-spa-router/src/connect-router.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-svelte-spa-router/src/connect-router.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/connect-router.ts#L31)
|
|
10
10
|
|
|
11
11
|
Connects svelte-spa-router to an actor.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine, options?): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-router/src/create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-router/src/create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/create-route-map.ts#L47)
|
|
10
10
|
|
|
11
11
|
Creates a `RouteMap` from an XState state machine.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BasePathOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/base-path.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/base-path.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-path.ts#L44)
|
|
6
6
|
|
|
7
7
|
The base-path options that every router bridge, `connectRouter` function, and
|
|
8
8
|
`PlayRouterProvider` component accepts.
|
|
@@ -28,5 +28,5 @@ connectRouter({
|
|
|
28
28
|
|
|
29
29
|
| Property | Modifier | Type | Description | Defined in |
|
|
30
30
|
| ------------------------------------------------------ | ---------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
-
| <a id="property-basepath"></a> `basePath?` | `readonly` | `string` | The URL prefix that the routes of the machine hang off, for example `"/admin"` or `"/:machineId/play"`. A `:param` segment is a declarative convenience, so that a host keeps ONE string that mirrors its own route config. Every `:param` must have a value in [BasePathOptions.basePathParams](ConnectRouterOptions.md#property-basepathparams), because the bridge writes a real URL. An optional segment (`:param?`) and a wildcard (`*`) are therefore refused: neither of them resolves to one concrete prefix. An absent value, `""`, and `"/"` all mean "no prefix", which is the behaviour of every release before this option existed. | [play-router/src/base-path.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
32
|
-
| <a id="property-basepathparams"></a> `basePathParams?` | `readonly` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of [BasePathOptions.basePath](ConnectRouterOptions.md#property-basepath). These values belong to the HOST, which wrote the prefix and resolved them, so they travel in NO `play.route` event: the machine is authoritative over its own params, and `event.params` holds what the pattern of the machine declares, and nothing else. A param of the host that shares a name with one of the machine can therefore shadow it never. A host reads them back from `bridge.basePathParams`, where they cannot go stale. A machine that needs the identity of its host takes it through the `input` of the actor, where that identity decides WHICH machine runs. | [play-router/src/base-path.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
31
|
+
| <a id="property-basepath"></a> `basePath?` | `readonly` | `string` | The URL prefix that the routes of the machine hang off, for example `"/admin"` or `"/:machineId/play"`. A `:param` segment is a declarative convenience, so that a host keeps ONE string that mirrors its own route config. Every `:param` must have a value in [BasePathOptions.basePathParams](ConnectRouterOptions.md#property-basepathparams), because the bridge writes a real URL. An optional segment (`:param?`) and a wildcard (`*`) are therefore refused: neither of them resolves to one concrete prefix. An absent value, `""`, and `"/"` all mean "no prefix", which is the behaviour of every release before this option existed. | [play-router/src/base-path.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-path.ts#L58) |
|
|
32
|
+
| <a id="property-basepathparams"></a> `basePathParams?` | `readonly` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of [BasePathOptions.basePath](ConnectRouterOptions.md#property-basepath). These values belong to the HOST, which wrote the prefix and resolved them, so they travel in NO `play.route` event: the machine is authoritative over its own params, and `event.params` holds what the pattern of the machine declares, and nothing else. A param of the host that shares a name with one of the machine can therefore shadow it never. A host reads them back from `bridge.basePathParams`, where they cannot go stale. A machine that needs the identity of its host takes it through the `input` of the actor, where that identity decides WHICH machine runs. | [play-router/src/base-path.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-path.ts#L72) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ConnectRouterOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [play-svelte-spa-router/src/connect-router.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-svelte-spa-router/src/connect-router.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/connect-router.ts#L6)
|
|
6
6
|
|
|
7
7
|
@xmachines/play-svelte-spa-router
|
|
8
8
|
|
|
@@ -16,8 +16,8 @@ Svelte SPA router adapter for the XMachines Play architecture.
|
|
|
16
16
|
|
|
17
17
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
18
18
|
| ------------------------------------------------------ | ---------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md) | - | - | [play-svelte-spa-router/src/connect-router.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
20
|
-
| <a id="property-basepath"></a> `basePath?` | `readonly` | `string` | The URL prefix that the routes of the machine hang off, for example `"/admin"` or `"/:machineId/play"`. A `:param` segment is a declarative convenience, so that a host keeps ONE string that mirrors its own route config. Every `:param` must have a value in [BasePathOptions.basePathParams](#property-basepathparams), because the bridge writes a real URL. An optional segment (`:param?`) and a wildcard (`*`) are therefore refused: neither of them resolves to one concrete prefix. An absent value, `""`, and `"/"` all mean "no prefix", which is the behaviour of every release before this option existed. | [`BasePathOptions`](BasePathOptions.md).[`basePath`](BasePathOptions.md#property-basepath) | [play-router/src/base-path.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
21
|
-
| <a id="property-basepathparams"></a> `basePathParams?` | `readonly` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of [BasePathOptions.basePath](#property-basepath). These values belong to the HOST, which wrote the prefix and resolved them, so they travel in NO `play.route` event: the machine is authoritative over its own params, and `event.params` holds what the pattern of the machine declares, and nothing else. A param of the host that shares a name with one of the machine can therefore shadow it never. A host reads them back from `bridge.basePathParams`, where they cannot go stale. A machine that needs the identity of its host takes it through the `input` of the actor, where that identity decides WHICH machine runs. | [`BasePathOptions`](BasePathOptions.md).[`basePathParams`](BasePathOptions.md#property-basepathparams) | [play-router/src/base-path.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
22
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md) | - | - | [play-svelte-spa-router/src/connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
23
|
-
| <a id="property-window"></a> `window?` | `readonly` | [`WindowLike`](WindowLike.md) | The window-like object for the `hashchange` subscription. The default is the global `window`, when one exists. In an environment without a window, such as SSR or Node, the bridge skips the `hashchange` subscription. Give a mock in a test. | - | [play-svelte-spa-router/src/connect-router.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
19
|
+
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md) | - | - | [play-svelte-spa-router/src/connect-router.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/connect-router.ts#L7) |
|
|
20
|
+
| <a id="property-basepath"></a> `basePath?` | `readonly` | `string` | The URL prefix that the routes of the machine hang off, for example `"/admin"` or `"/:machineId/play"`. A `:param` segment is a declarative convenience, so that a host keeps ONE string that mirrors its own route config. Every `:param` must have a value in [BasePathOptions.basePathParams](#property-basepathparams), because the bridge writes a real URL. An optional segment (`:param?`) and a wildcard (`*`) are therefore refused: neither of them resolves to one concrete prefix. An absent value, `""`, and `"/"` all mean "no prefix", which is the behaviour of every release before this option existed. | [`BasePathOptions`](BasePathOptions.md).[`basePath`](BasePathOptions.md#property-basepath) | [play-router/src/base-path.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-path.ts#L58) |
|
|
21
|
+
| <a id="property-basepathparams"></a> `basePathParams?` | `readonly` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of [BasePathOptions.basePath](#property-basepath). These values belong to the HOST, which wrote the prefix and resolved them, so they travel in NO `play.route` event: the machine is authoritative over its own params, and `event.params` holds what the pattern of the machine declares, and nothing else. A param of the host that shares a name with one of the machine can therefore shadow it never. A host reads them back from `bridge.basePathParams`, where they cannot go stale. A machine that needs the identity of its host takes it through the `input` of the actor, where that identity decides WHICH machine runs. | [`BasePathOptions`](BasePathOptions.md).[`basePathParams`](BasePathOptions.md#property-basepathparams) | [play-router/src/base-path.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-path.ts#L72) |
|
|
22
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md) | - | - | [play-svelte-spa-router/src/connect-router.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/connect-router.ts#L8) |
|
|
23
|
+
| <a id="property-window"></a> `window?` | `readonly` | [`WindowLike`](WindowLike.md) | The window-like object for the `hashchange` subscription. The default is the global `window`, when one exists. In an environment without a window, such as SSR or Node, the bridge skips the `hashchange` subscription. Give a mock in a test. | - | [play-svelte-spa-router/src/connect-router.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-svelte-spa-router/src/connect-router.ts#L15) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRouteEvent
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:238](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/types.ts:238](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L238)
|
|
6
6
|
|
|
7
7
|
The routing event, with its parameters and its query
|
|
8
8
|
|
|
@@ -128,8 +128,8 @@ analysis of the pattern.
|
|
|
128
128
|
|
|
129
129
|
| Property | Modifier | Type | Defined in |
|
|
130
130
|
| -------------------------------------- | ---------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
-
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:243](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
132
|
-
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:241](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
133
|
-
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:242](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
134
|
-
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:240](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
135
|
-
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:239](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
131
|
+
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:243](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L243) |
|
|
132
|
+
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:241](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L241) |
|
|
133
|
+
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:242](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L242) |
|
|
134
|
+
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:240](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L240) |
|
|
135
|
+
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:239](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L239) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMapOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/create-route-map.ts#L9)
|
|
6
6
|
|
|
7
7
|
The options of `createRouteMap` and of `createRouteMapFromTree`.
|
|
8
8
|
|
|
@@ -10,4 +10,4 @@ The options of `createRouteMap` and of `createRouteMapFromTree`.
|
|
|
10
10
|
|
|
11
11
|
| Property | Type | Description | Defined in |
|
|
12
12
|
| -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| <a id="property-cachesize"></a> `cacheSize?` | `number` | The maximum number of the resolved parameterized path lookups in the cache. `RouteMap.getStateIdByPath()` resolves a parameterized pattern, for example `/profile/:userId`, with URLPattern on each call. The map keeps each path of a frequent visit in an LRU cache, and a later lookup of that path is therefore O(1). Raise this value for an application with a large set of parameterized routes, or with a high frequency of the navigation. The default is `500`. | [play-router/src/create-route-map.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
13
|
+
| <a id="property-cachesize"></a> `cacheSize?` | `number` | The maximum number of the resolved parameterized path lookups in the cache. `RouteMap.getStateIdByPath()` resolves a parameterized pattern, for example `/profile/:userId`, with URLPattern on each call. The map keeps each path of a frequent visit in an LRU cache, and a later lookup of that path is therefore O(1). Raise this value for an application with a large set of parameterized routes, or with a high frequency of the navigation. The default is `500`. | [play-router/src/create-route-map.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/create-route-map.ts#L21) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMapping
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/base-route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/base-route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L54)
|
|
6
6
|
|
|
7
7
|
One entry of the map between a state ID and a path.
|
|
8
8
|
|
|
@@ -24,5 +24,5 @@ const optionalMapping: RouteMapping = { stateId: "settings", path: "/settings/:s
|
|
|
24
24
|
|
|
25
25
|
| Property | Modifier | Type | Description | Defined in |
|
|
26
26
|
| --------------------------------------- | ---------- | -------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
-
| <a id="property-path"></a> `path` | `readonly` | `string` | The pattern of the URL path, for example `"/"`, `"/profile/:userId"`, or `"/settings/:section?"` | [play-router/src/base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
28
|
-
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | The state ID of the state machine, for example `"home"` or `"#profile"` | [play-router/src/base-route-map.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
27
|
+
| <a id="property-path"></a> `path` | `readonly` | `string` | The pattern of the URL path, for example `"/"`, `"/profile/:userId"`, or `"/settings/:section?"` | [play-router/src/base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L58) |
|
|
28
|
+
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | The state ID of the state machine, for example `"home"` or `"#profile"` | [play-router/src/base-route-map.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/base-route-map.ts#L56) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/types.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L359)
|
|
6
6
|
|
|
7
7
|
The RouterBridge interface of a runtime infrastructure adapter
|
|
8
8
|
|
|
@@ -56,7 +56,7 @@ class MyRouterBridge implements RouterBridge {
|
|
|
56
56
|
connect(): void | Promise<void>;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Defined in: [play-router/src/types.ts:376](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
59
|
+
Defined in: [play-router/src/types.ts:376](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L376)
|
|
60
60
|
|
|
61
61
|
Connects the router bridge to the Actor
|
|
62
62
|
|
|
@@ -86,7 +86,7 @@ await bridge.connect();
|
|
|
86
86
|
disconnect(): void | Promise<void>;
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Defined in: [play-router/src/types.ts:392](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
89
|
+
Defined in: [play-router/src/types.ts:392](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L392)
|
|
90
90
|
|
|
91
91
|
Disconnects the router bridge from the Actor
|
|
92
92
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouterConnection()
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/provider-lifecycle.ts:
|
|
5
|
+
Defined in: [play-router/src/provider-lifecycle.ts:265](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L265)
|
|
6
6
|
|
|
7
7
|
What `connectRouter` of an adapter returns.
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ stale.
|
|
|
21
21
|
RouterConnection(): void;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [play-router/src/provider-lifecycle.ts:
|
|
24
|
+
Defined in: [play-router/src/provider-lifecycle.ts:267](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L267)
|
|
25
25
|
|
|
26
26
|
Stops the synchronization. The same call as [RouterConnection.disconnect](#disconnect).
|
|
27
27
|
|
|
@@ -33,18 +33,47 @@ Stops the synchronization. The same call as [RouterConnection.disconnect](#disco
|
|
|
33
33
|
|
|
34
34
|
| Property | Modifier | Type | Description | Defined in |
|
|
35
35
|
| ----------------------------------------------------- | ---------- | -------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
-
| <a id="property-basepath"></a> `basePath` | `readonly` | `string` | The resolved prefix of the mount, or `""` when the machine owns the whole router. | [play-router/src/provider-lifecycle.ts:
|
|
37
|
-
| <a id="property-basepathparams"></a> `basePathParams` | `readonly` | `Readonly`\<`Record`\<`string`, `string`\>\> | The values of the `:param` segments of the mount. They travel in no event. | [play-router/src/provider-lifecycle.ts:
|
|
36
|
+
| <a id="property-basepath"></a> `basePath` | `readonly` | `string` | The resolved prefix of the mount, or `""` when the machine owns the whole router. | [play-router/src/provider-lifecycle.ts:288](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L288) |
|
|
37
|
+
| <a id="property-basepathparams"></a> `basePathParams` | `readonly` | `Readonly`\<`Record`\<`string`, `string`\>\> | The values of the `:param` segments of the mount. They travel in no event. | [play-router/src/provider-lifecycle.ts:290](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L290) |
|
|
38
38
|
|
|
39
39
|
## Methods
|
|
40
40
|
|
|
41
|
+
### \[dispose\]()
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
dispose: void;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Defined in: [play-router/src/provider-lifecycle.ts:286](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L286)
|
|
48
|
+
|
|
49
|
+
Stops the synchronization when the scope of a `using` declaration ends.
|
|
50
|
+
|
|
51
|
+
This value IS the release of `connectRouter`, and all eight router adapters return
|
|
52
|
+
it, so it carries the protocol of `@xmachines/play` like every other release of the
|
|
53
|
+
ecosystem:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
{
|
|
57
|
+
using connection = connectRouter({ actor, router, routeMap });
|
|
58
|
+
// disconnect() runs at the end of the scope, and after an exception too
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The release is [RouterConnection.disconnect](#disconnect), which is idempotent.
|
|
63
|
+
|
|
64
|
+
#### Returns
|
|
65
|
+
|
|
66
|
+
`void`
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
41
70
|
### disconnect()
|
|
42
71
|
|
|
43
72
|
```ts
|
|
44
73
|
disconnect(): void;
|
|
45
74
|
```
|
|
46
75
|
|
|
47
|
-
Defined in: [play-router/src/provider-lifecycle.ts:
|
|
76
|
+
Defined in: [play-router/src/provider-lifecycle.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L269)
|
|
48
77
|
|
|
49
78
|
Stops the synchronization.
|
|
50
79
|
|
|
@@ -60,7 +89,7 @@ Stops the synchronization.
|
|
|
60
89
|
setBasePath(basePath?, basePathParams?): void;
|
|
61
90
|
```
|
|
62
91
|
|
|
63
|
-
Defined in: [play-router/src/provider-lifecycle.ts:
|
|
92
|
+
Defined in: [play-router/src/provider-lifecycle.ts:292](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L292)
|
|
64
93
|
|
|
65
94
|
Moves the mount of the live bridge, with no teardown.
|
|
66
95
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: WindowLike
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:460](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/types.ts:460](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L460)
|
|
6
6
|
|
|
7
7
|
The minimal window interface of an adapter that subscribes to a DOM event, for
|
|
8
8
|
example to `hashchange`. You can inject it for SSR and for a test: give a mock in
|
|
@@ -30,7 +30,7 @@ connectRouter({ actor, routeMap, window: mockWin });
|
|
|
30
30
|
addEventListener(type, listener): void;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [play-router/src/types.ts:461](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
33
|
+
Defined in: [play-router/src/types.ts:461](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L461)
|
|
34
34
|
|
|
35
35
|
#### Parameters
|
|
36
36
|
|
|
@@ -51,7 +51,7 @@ Defined in: [play-router/src/types.ts:461](https://gitlab.com/xmachin-es/xmachin
|
|
|
51
51
|
removeEventListener(type, listener): void;
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Defined in: [play-router/src/types.ts:462](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
54
|
+
Defined in: [play-router/src/types.ts:462](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L462)
|
|
55
55
|
|
|
56
56
|
#### Parameters
|
|
57
57
|
|