@xmachines/docs 2.1.1 → 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 +2 -2
- 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 +46 -18
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +149 -7
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +6 -5
- 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 +32 -0
- 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 +12 -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 +105 -0
- 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 +2 -2
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +172 -15
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +7 -18
- 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 +10 -8
- 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 +15 -9
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-router/README.md +308 -11
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +178 -19
- 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 +40 -0
- 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 +21 -0
- 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 +24 -0
- package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +36 -0
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRouteMappings.md +67 -0
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isMountableBridge.md +26 -0
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/joinBasePath.md +37 -0
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/mountKey.md +28 -0
- package/api/@xmachines/play-router/functions/normalizeBasePath.md +43 -0
- package/api/@xmachines/play-router/functions/openProviderBridge.md +41 -0
- package/api/@xmachines/play-router/functions/pickOwnParams.md +41 -0
- package/api/@xmachines/play-router/functions/repointProviderBridge.md +27 -0
- package/api/@xmachines/play-router/functions/resolveBasePath.md +51 -0
- package/api/@xmachines/play-router/functions/resolveFrameworkParams.md +51 -0
- 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 +44 -0
- 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 +32 -0
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
- package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +47 -0
- 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 +130 -0
- package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +28 -0
- 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 +33 -0
- package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +14 -0
- 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 +7 -3
- package/api/@xmachines/play-router/interfaces/RouterConnection.md +105 -0
- 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 +36 -0
- 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 +18 -0
- 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 +19 -3
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +166 -18
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +8 -18
- 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 +10 -8
- 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 +14 -12
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -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/variables/PlayRouterProvider.md +4 -4
- 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 +3 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +148 -6
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +32 -0
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +12 -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 +105 -0
- 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 +3 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +148 -6
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +32 -0
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +28 -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 +105 -0
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +148 -6
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +7 -18
- 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 +10 -8
- 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 +15 -9
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -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 +5 -5
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-tanstack-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +153 -11
- 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 +2 -2
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +149 -7
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +7 -17
- 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 +10 -8
- 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 +15 -9
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -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 +5 -5
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +4 -4
- 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 +154 -12
- 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 +25 -2
- 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 +60 -18
- package/contributing/development.md +66 -44
- package/contributing/testing.md +34 -7
- package/examples/README.md +1 -1
- package/examples/multi-router-integration.md +126 -1
- package/examples/routing-patterns.md +1 -1
- package/guides/getting-started.md +7 -7
- package/guides/inspector.md +1 -1
- package/guides/signals.md +43 -0
- package/package.json +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -30
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -31
|
@@ -2,13 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: ReactRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:
|
|
5
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-react-router/src/react-router-bridge.ts#L30)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A `RouterBridge` whose machine is mounted at a URL prefix that can MOVE while the
|
|
8
|
+
bridge stays connected.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
that
|
|
10
|
+
Every bridge on `RouterBridgeBase` satisfies this interface. The interface exists
|
|
11
|
+
so that a provider component moves a live bridge instead of a teardown of it: a
|
|
12
|
+
host route that renders again with a new prefix keeps the actor, the route map, and
|
|
13
|
+
its LRU cache.
|
|
14
|
+
|
|
15
|
+
The mount that moves says WHERE an actor lives, and never WHICH actor lives there.
|
|
16
|
+
An actor never changes identity, so a new identity is a new actor, and a new actor
|
|
17
|
+
takes a new bridge.
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// The host moved this actor to another place in its URL space. `machineId` names
|
|
23
|
+
// WHICH document the actor runs, and it does not change: a new identity is a new
|
|
24
|
+
// actor, and therefore a new bridge, because one actor takes one bridge.
|
|
25
|
+
bridge.setBasePath("/:region/:machineId/play", { region: "us", machineId });
|
|
26
|
+
```
|
|
12
27
|
|
|
13
28
|
## Extends
|
|
14
29
|
|
|
@@ -22,18 +37,20 @@ that are different in each framework, and it implements nothing more.
|
|
|
22
37
|
new ReactRouterBridge(
|
|
23
38
|
router,
|
|
24
39
|
actor,
|
|
25
|
-
routeMap
|
|
40
|
+
routeMap,
|
|
41
|
+
options?): ReactRouterBridge;
|
|
26
42
|
```
|
|
27
43
|
|
|
28
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:
|
|
44
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-react-router/src/react-router-bridge.ts#L33)
|
|
29
45
|
|
|
30
46
|
#### Parameters
|
|
31
47
|
|
|
32
|
-
| Parameter | Type
|
|
33
|
-
| ---------- |
|
|
34
|
-
| `router` | `Router`
|
|
35
|
-
| `actor` | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md)
|
|
36
|
-
| `routeMap` | [`RouteMap`](RouteMap.md)
|
|
48
|
+
| Parameter | Type |
|
|
49
|
+
| ---------- | ------------------------------------------------------------------------ |
|
|
50
|
+
| `router` | `Router` |
|
|
51
|
+
| `actor` | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md) |
|
|
52
|
+
| `routeMap` | [`RouteMap`](RouteMap.md) |
|
|
53
|
+
| `options?` | [`BasePathOptions`](../../play-dom-router/interfaces/BasePathOptions.md) |
|
|
37
54
|
|
|
38
55
|
#### Returns
|
|
39
56
|
|
|
@@ -43,6 +60,84 @@ Defined in: [play-react-router/src/react-router-bridge.ts:32](https://gitlab.com
|
|
|
43
60
|
|
|
44
61
|
[`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`constructor`](../../play-router/classes/RouterBridgeBase.md#constructor)
|
|
45
62
|
|
|
63
|
+
## Accessors
|
|
64
|
+
|
|
65
|
+
### basePath
|
|
66
|
+
|
|
67
|
+
#### Get Signature
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
get basePath(): string;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
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)
|
|
74
|
+
|
|
75
|
+
The resolved URL prefix that the machine of this bridge is mounted under, or `""`
|
|
76
|
+
when the machine owns the complete router.
|
|
77
|
+
|
|
78
|
+
##### Returns
|
|
79
|
+
|
|
80
|
+
`string`
|
|
81
|
+
|
|
82
|
+
The resolved URL prefix of the mount, or `""` when the machine owns the complete router.
|
|
83
|
+
|
|
84
|
+
#### Inherited from
|
|
85
|
+
|
|
86
|
+
[`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`basePath`](../../play-router/classes/RouterBridgeBase.md#basepath)
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### basePathParams
|
|
91
|
+
|
|
92
|
+
#### Get Signature
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
get basePathParams(): Readonly<Record<string, string>>;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
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)
|
|
99
|
+
|
|
100
|
+
The resolved values of the `:param` segments of the mount, or `{}` for a prefix
|
|
101
|
+
without a param.
|
|
102
|
+
|
|
103
|
+
These params belong to the HOST: the host wrote the prefix and resolved the
|
|
104
|
+
values, and they describe the route of the host and not the route of the machine.
|
|
105
|
+
They therefore travel in NO `play.route` event. The machine is authoritative over
|
|
106
|
+
its own params, and `event.params` holds what the pattern of the machine
|
|
107
|
+
declares, and nothing else.
|
|
108
|
+
|
|
109
|
+
They live here instead, because a value that reached the actor on a navigation
|
|
110
|
+
ALONE would go stale: `setBasePath()` can move the mount while the machine stays
|
|
111
|
+
on the same route, no event goes out, and `event.params` would then contradict
|
|
112
|
+
`basePath`. A read of this accessor cannot go stale.
|
|
113
|
+
|
|
114
|
+
A machine that needs the identity of its host — a `machineId`, a tenant — takes
|
|
115
|
+
it through the `input` of the actor, where it belongs: that identity decides
|
|
116
|
+
WHICH machine runs, and it is not a param of a route inside the machine.
|
|
117
|
+
|
|
118
|
+
##### Example
|
|
119
|
+
|
|
120
|
+
```typescript
|
|
121
|
+
bridge.basePath; // "/abc123/play"
|
|
122
|
+
bridge.basePathParams; // { machineId: "abc123" }
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
##### Returns
|
|
126
|
+
|
|
127
|
+
`Readonly`\<`Record`\<`string`, `string`\>\>
|
|
128
|
+
|
|
129
|
+
The resolved values of the `:param` segments of the mount, or `{}` for a prefix
|
|
130
|
+
without a param.
|
|
131
|
+
|
|
132
|
+
These params belong to the HOST, so they travel in NO `play.route` event — the
|
|
133
|
+
machine is authoritative over its own params. This accessor is therefore the one
|
|
134
|
+
way a host reads them back, and it cannot go stale: `setBasePath()` can move the
|
|
135
|
+
mount while the machine stays on the same route, and no event goes out.
|
|
136
|
+
|
|
137
|
+
#### Inherited from
|
|
138
|
+
|
|
139
|
+
[`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`basePathParams`](../../play-router/classes/RouterBridgeBase.md#basepathparams)
|
|
140
|
+
|
|
46
141
|
## Methods
|
|
47
142
|
|
|
48
143
|
### connect()
|
|
@@ -51,7 +146,7 @@ Defined in: [play-react-router/src/react-router-bridge.ts:32](https://gitlab.com
|
|
|
51
146
|
connect(): void;
|
|
52
147
|
```
|
|
53
148
|
|
|
54
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
149
|
+
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)
|
|
55
150
|
|
|
56
151
|
Connects the router bridge to the Actor.
|
|
57
152
|
|
|
@@ -61,7 +156,7 @@ in its own way.
|
|
|
61
156
|
|
|
62
157
|
The order of these steps is part of the contract of the bridge:
|
|
63
158
|
|
|
64
|
-
- The constructor seeds `
|
|
159
|
+
- The constructor seeds `lastActorRoute` from `actor.currentRoute`, and it records no location
|
|
65
160
|
- The method installs the actor watcher before the router subscriptions of the adapter
|
|
66
161
|
- The first synchronization then separates a deep link from a restore, with `actor.initialRoute`
|
|
67
162
|
|
|
@@ -85,7 +180,7 @@ An adapter that needs a different behavior of the first synchronization override
|
|
|
85
180
|
disconnect(): void;
|
|
86
181
|
```
|
|
87
182
|
|
|
88
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
183
|
+
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)
|
|
89
184
|
|
|
90
185
|
Disconnects the router bridge from the Actor.
|
|
91
186
|
|
|
@@ -99,3 +194,65 @@ framework.
|
|
|
99
194
|
#### Inherited from
|
|
100
195
|
|
|
101
196
|
[`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`disconnect`](../../play-router/classes/RouterBridgeBase.md#disconnect)
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
### setBasePath()
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
setBasePath(basePath?, basePathParams?): void;
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
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)
|
|
207
|
+
|
|
208
|
+
Moves the machine to a different mount point, while it stays connected.
|
|
209
|
+
|
|
210
|
+
This is the "load and unload" half of a shared router. It moves WHERE an actor is
|
|
211
|
+
mounted, and never WHICH actor is mounted: the actor, the route map, and its LRU
|
|
212
|
+
cache all stay, and nothing goes away.
|
|
213
|
+
|
|
214
|
+
An actor never changes identity. A prefix that IDENTIFIES the actor — a
|
|
215
|
+
`machineId` that names the document it runs — therefore never moves through this
|
|
216
|
+
method: a new identity is a new actor, and a new actor takes a new bridge, because
|
|
217
|
+
`connect()` permits one bridge for each actor. The segments that move here are the
|
|
218
|
+
ones that LOCATE: a region, a locale, a tenant, a workspace slug.
|
|
219
|
+
|
|
220
|
+
The call then brings the location in step with the NEW prefix. A location inside
|
|
221
|
+
the new mount runs the same first-synchronization decision as `connect()`: it
|
|
222
|
+
drives the actor, and a restore keeps the route of the actor. A location OUTSIDE
|
|
223
|
+
the new mount is the old mount in practice, so the bridge writes the new one
|
|
224
|
+
itself, and it keeps the route of the actor while it does so — nothing else moves
|
|
225
|
+
the address bar. A call that resolves to the current prefix changes no location,
|
|
226
|
+
and it therefore reconciles nothing.
|
|
227
|
+
|
|
228
|
+
#### Parameters
|
|
229
|
+
|
|
230
|
+
| Parameter | Type | Description |
|
|
231
|
+
| ----------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
232
|
+
| `basePath?` | `string` | The new prefix, as a pattern or as a concrete path. An absent value, `""`, and `"/"` all remove the prefix, and they give the machine the complete router again. |
|
|
233
|
+
| `basePathParams?` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of `basePath`. |
|
|
234
|
+
|
|
235
|
+
#### Returns
|
|
236
|
+
|
|
237
|
+
`void`
|
|
238
|
+
|
|
239
|
+
#### Throws
|
|
240
|
+
|
|
241
|
+
For a prefix that resolves to one concrete path never.
|
|
242
|
+
|
|
243
|
+
#### Throws
|
|
244
|
+
|
|
245
|
+
When a `:param` of the prefix has no value.
|
|
246
|
+
|
|
247
|
+
#### Example
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
// The host moved this actor to another place in its URL space. `machineId` names
|
|
251
|
+
// WHICH document the actor runs, and it does not change: a new identity is a new
|
|
252
|
+
// actor, and therefore a new bridge, because one actor takes one bridge.
|
|
253
|
+
bridge.setBasePath("/:region/:machineId/play", { region: "us", machineId });
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### Inherited from
|
|
257
|
+
|
|
258
|
+
[`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`setBasePath`](../../play-router/classes/RouterBridgeBase.md#setbasepath)
|
|
@@ -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:
|
|
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:
|
|
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
|
|
|
@@ -6,19 +6,9 @@
|
|
|
6
6
|
function createPlayRouterProvider<TRouter>(BridgeCtor): <TActor>(__namedParameters) => Element;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-react-router/src/create-play-router-provider.tsx:
|
|
9
|
+
Defined in: [play-react-router/src/create-play-router-provider.tsx:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-react-router/src/create-play-router-provider.tsx#L52)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
The component of the return value connects a `PlayerActor` to the framework
|
|
14
|
-
router. It keeps the actor state and the browser URL in step, in both directions.
|
|
15
|
-
|
|
16
|
-
The component creates the bridge one time, on mount, and it disconnects the bridge
|
|
17
|
-
on unmount. It also builds the bridge again on a change of the identity of `actor`,
|
|
18
|
-
of `router`, or of `routeMap`. Therefore all three props must be **stable
|
|
19
|
-
references**: create them outside the JSX, or hold them with `useMemo`. Under the
|
|
20
|
-
React `<StrictMode>`, the effect runs two times on mount (connect, disconnect,
|
|
21
|
-
connect), and the bridges support this.
|
|
11
|
+
Builds a `PlayRouterProvider` for one React bridge class.
|
|
22
12
|
|
|
23
13
|
## Type Parameters
|
|
24
14
|
|
|
@@ -28,15 +18,14 @@ connect), and the bridges support this.
|
|
|
28
18
|
|
|
29
19
|
## Parameters
|
|
30
20
|
|
|
31
|
-
| Parameter | Type | Description
|
|
32
|
-
| ------------ | -------------------------------------------------------------------------------------------- |
|
|
33
|
-
| `BridgeCtor` | [`PlayRouterBridgeConstructor`](../type-aliases/PlayRouterBridgeConstructor.md)\<`TRouter`\> | The bridge class
|
|
21
|
+
| Parameter | Type | Description |
|
|
22
|
+
| ------------ | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
23
|
+
| `BridgeCtor` | [`PlayRouterBridgeConstructor`](../type-aliases/PlayRouterBridgeConstructor.md)\<`TRouter`\> | The bridge class, built as `new BridgeCtor(router, actor, routeMap, options)`. |
|
|
34
24
|
|
|
35
25
|
## Returns
|
|
36
26
|
|
|
37
|
-
A `PlayRouterProvider` component
|
|
38
|
-
|
|
39
|
-
prop.
|
|
27
|
+
A `PlayRouterProvider` component, generic over the actor type, so the
|
|
28
|
+
`renderer` callback receives the same concrete actor type as the prop.
|
|
40
29
|
|
|
41
30
|
\<`TActor`\>(`__namedParameters`) => `Element`
|
|
42
31
|
|
|
@@ -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
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMapFromTree(routeTree, options?): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-router/src/create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-router/src/create-route-map-from-tree.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/create-route-map-from-tree.ts#L33)
|
|
10
10
|
|
|
11
11
|
Creates a `RouteMap` from the node structure of a `RouteTree`.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayActor
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:
|
|
5
|
+
Defined in: [play-router/src/types.ts:313](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L313)
|
|
6
6
|
|
|
7
7
|
The complete actor shape of the `PlayRouterProvider` component of each framework
|
|
8
8
|
adapter: `play-solid-router`, `play-vue-router`, `play-react-router`, and each
|
|
@@ -39,9 +39,9 @@ function MyRouterProvider({ actor }: { actor: PlayActor }) {
|
|
|
39
39
|
|
|
40
40
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
41
41
|
| ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
-
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | The TC39 Signal of the current URL path of the actor, or of its state ID. | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md).[`currentRoute`](../../play-dom-router/interfaces/RoutableActor.md#property-currentroute) | [play-router/src/types.ts:
|
|
43
|
-
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | The TC39 Signal of the current view spec of the actor, or `null` when no view is active. | - | [play-router/src/types.ts:
|
|
44
|
-
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it. A router bridge compares it with the browser URL. It therefore separates a deep link, where the router wins, from a restore of a session, where the actor wins. | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md).[`initialRoute`](../../play-dom-router/interfaces/RoutableActor.md#property-initialroute) | [play-router/src/types.ts:
|
|
42
|
+
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | The TC39 Signal of the current URL path of the actor, or of its state ID. | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md).[`currentRoute`](../../play-dom-router/interfaces/RoutableActor.md#property-currentroute) | [play-router/src/types.ts:275](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L275) |
|
|
43
|
+
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | The TC39 Signal of the current view spec of the actor, or `null` when no view is active. | - | [play-router/src/types.ts:315](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L315) |
|
|
44
|
+
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it. A router bridge compares it with the browser URL. It therefore separates a deep link, where the router wins, from a restore of a session, where the actor wins. | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md).[`initialRoute`](../../play-dom-router/interfaces/RoutableActor.md#property-initialroute) | [play-router/src/types.ts:281](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L281) |
|
|
45
45
|
|
|
46
46
|
## Methods
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ function MyRouterProvider({ actor }: { actor: PlayActor }) {
|
|
|
51
51
|
send(event): void;
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Defined in: [play-router/src/types.ts:
|
|
54
|
+
Defined in: [play-router/src/types.ts:283](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/types.ts#L283)
|
|
55
55
|
|
|
56
56
|
Sends a route navigation event to the actor.
|
|
57
57
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRouteEvent
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:
|
|
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:
|
|
132
|
-
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:
|
|
133
|
-
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:
|
|
134
|
-
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:
|
|
135
|
-
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:
|
|
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: PlayRouterProviderProps\<TActor\>
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/play-router-provider.tsx:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-react-router/src/play-router-provider.tsx:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-react-router/src/play-router-provider.tsx#L27)
|
|
6
6
|
|
|
7
7
|
The props of the `PlayRouterProvider` of React Router.
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ The props of the `PlayRouterProvider` of React Router.
|
|
|
12
12
|
|
|
13
13
|
## Extends
|
|
14
14
|
|
|
15
|
-
- [`PlayRouterProviderBaseProps`](PlayRouterProviderBaseProps.md)\<`BrowserRouterInstance`, `TActor`\>
|
|
15
|
+
- [`PlayRouterProviderBaseProps`](../type-aliases/PlayRouterProviderBaseProps.md)\<`BrowserRouterInstance`, `TActor`\>
|
|
16
16
|
|
|
17
17
|
## Type Parameters
|
|
18
18
|
|
|
@@ -22,9 +22,11 @@ The props of the `PlayRouterProvider` of React Router.
|
|
|
22
22
|
|
|
23
23
|
## Properties
|
|
24
24
|
|
|
25
|
-
| Property
|
|
26
|
-
|
|
|
27
|
-
| <a id="property-actor"></a> `actor`
|
|
28
|
-
| <a id="property-
|
|
29
|
-
| <a id="property-
|
|
30
|
-
| <a id="property-
|
|
25
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
26
|
+
| ------------------------------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
+
| <a id="property-actor"></a> `actor` | `TActor` | The actor to keep in step with the router. It must be a stable reference: give the same actor instance on every render. An actor in the JSX, or a new actor on each render, makes the bridge disconnect and connect again each time. | `PlayRouterProviderBaseProps.actor` | [play-router/src/provider-lifecycle.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L42) |
|
|
28
|
+
| <a id="property-basepath"></a> `basePath?` | `string` | Mounts the routes of the machine under a URL prefix that the host owns, so that the routes of the host and the routes of the machine share one router. `actor`, `router`, and `routeMap` each need a stable reference. This prop needs none, and it rebuilds the bridge never: a change moves the live bridge with `setBasePath()`, so a host route that renders again with a new prefix keeps the actor, the route map, and its cache. The prefix says WHERE an actor is mounted, and never WHICH actor is mounted. An actor never changes identity, so a prefix segment that IDENTIFIES the actor gives a different `actor` prop instead, and THAT rebuilds the bridge — which is correct, because one actor takes one bridge. A location outside the prefix belongs completely to the host: the bridge sends no event there, and it corrects no URL there. Every `:param` needs a value. An unresolved one throws a `MissingBasePathParamError` out of the mount effect, because the bridge writes no URL without it. Render this component only after the host holds the value, which a route loader or a `useParams()` call does already. | `PlayRouterProviderBaseProps.basePath` | [play-router/src/provider-lifecycle.ts:80](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L80) |
|
|
29
|
+
| <a id="property-basepathparams"></a> `basePathParams?` | `Record`\<`string`, `string` \| `number`\> | The values of the `:param` segments of [PlayRouterProviderBaseProps.basePath](#property-basepath), for example `{ machineId }` for `basePath="/:machineId/play"`. An inline object literal is correct here: the provider compares this prop by value, and a move to the same prefix does nothing. | `PlayRouterProviderBaseProps.basePathParams` | [play-router/src/provider-lifecycle.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L89) |
|
|
30
|
+
| <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | The renderer callback receives the same concrete actor type as the prop. | `PlayRouterProviderBaseProps.renderer` | [play-router/src/provider-lifecycle.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L91) |
|
|
31
|
+
| <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | The route map of both directions, for the lookup between a state ID and a URL path. **It must be a stable reference.** The provider builds the bridge again on each change of the identity of `routeMap`. A value in the JSX, for example `createRouteMapFromTree(routeTree)`, makes a new object on every render, and the bridge therefore connects again on every render. Hold the value with `useMemo`: `const routeMap = useMemo(() => createRouteMapFromTree(routeTree), [routeTree]);` | `PlayRouterProviderBaseProps.routeMap` | [play-router/src/provider-lifecycle.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L57) |
|
|
32
|
+
| <a id="property-router"></a> `router` | `Router` | The router instance that the bridge keeps in step with the actor. It must be a stable reference. | `PlayRouterProviderBaseProps.router` | [play-router/src/provider-lifecycle.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L44) |
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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
|
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
# Type Alias: PlayRouterBridgeConstructor\<TRouter\>
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
type PlayRouterBridgeConstructor<TRouter> = (router, actor, routeMap) => RouterBridge;
|
|
6
|
+
type PlayRouterBridgeConstructor<TRouter> = (router, actor, routeMap, options?) => RouterBridge;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-
|
|
9
|
+
Defined in: [play-router/src/provider-lifecycle.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-router/src/provider-lifecycle.ts#L103)
|
|
10
10
|
|
|
11
|
-
The constructor shape that a bridge class must satisfy for
|
|
12
|
-
|
|
11
|
+
The constructor shape that a bridge class must satisfy for a provider factory: `(router, actor, routeMap, options?) → RouterBridge`.
|
|
12
|
+
|
|
13
|
+
The return type is `RouterBridge`, the published contract of a bridge, so a
|
|
14
|
+
consumer bridge of its own keeps compiling. Every bridge on `RouterBridgeBase` also
|
|
15
|
+
satisfies `MountableRouterBridge`, and the provider finds that mount API at run
|
|
16
|
+
time: a bridge without it ignores `basePath`, exactly as it did before the option
|
|
17
|
+
existed.
|
|
13
18
|
|
|
14
19
|
## Type Parameters
|
|
15
20
|
|
|
@@ -19,11 +24,12 @@ The constructor shape that a bridge class must satisfy for
|
|
|
19
24
|
|
|
20
25
|
## Parameters
|
|
21
26
|
|
|
22
|
-
| Parameter | Type
|
|
23
|
-
| ---------- |
|
|
24
|
-
| `router` | `TRouter`
|
|
25
|
-
| `actor` | [`PlayActor`](../interfaces/PlayActor.md)
|
|
26
|
-
| `routeMap` | [`RouteMap`](../classes/RouteMap.md)
|
|
27
|
+
| Parameter | Type |
|
|
28
|
+
| ---------- | ------------------------------------------------------------------------ |
|
|
29
|
+
| `router` | `TRouter` |
|
|
30
|
+
| `actor` | [`PlayActor`](../interfaces/PlayActor.md) |
|
|
31
|
+
| `routeMap` | [`RouteMap`](../classes/RouteMap.md) |
|
|
32
|
+
| `options?` | [`BasePathOptions`](../../play-dom-router/interfaces/BasePathOptions.md) |
|
|
27
33
|
|
|
28
34
|
## Returns
|
|
29
35
|
|