@xmachines/docs 2.2.0 → 4.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 +8 -16
- package/api/@xmachines/play/README.md +75 -97
- package/api/@xmachines/play/errors/README.md +8 -0
- package/api/@xmachines/play/{classes → errors/classes}/NonNullableError.md +6 -6
- package/api/@xmachines/play/{classes → errors/classes}/PlayError.md +35 -10
- package/api/@xmachines/play/index/README.md +75 -0
- package/api/@xmachines/play/index/functions/asCleanup.md +78 -0
- package/api/@xmachines/play/{functions → index/functions}/assertNonNullable.md +2 -2
- package/api/@xmachines/{play-actor → play/index}/functions/shallowEqualExcept.md +3 -3
- package/api/@xmachines/play/index/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play/index/type-aliases/DisposeKey.md +32 -0
- package/api/@xmachines/play/{type-aliases → index/type-aliases}/PlayEvent.md +4 -4
- package/api/@xmachines/play/index/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-actor/README.md +78 -222
- package/api/@xmachines/play-actor/interfaces/ActorEvent.md +18 -0
- package/api/@xmachines/play-actor/interfaces/PlayActor.md +73 -0
- package/api/@xmachines/play-dom/README.md +99 -43
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +12 -11
- package/api/@xmachines/play-dom/functions/asCleanup.md +78 -0
- package/api/@xmachines/play-dom/functions/createPlayUI.md +6 -6
- 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/MountFn.md +30 -8
- package/api/@xmachines/play-dom-router/README.md +99 -73
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +22 -21
- package/api/@xmachines/{play-vue-router → play-dom-router}/classes/RouteMap.md +12 -6
- package/api/@xmachines/play-dom-router/functions/asCleanup.md +78 -0
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +3 -8
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +7 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +12 -6
- package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +5 -5
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +73 -19
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +8 -8
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +24 -21
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +4 -4
- 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 +36 -7
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +40 -6
- 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 +18 -40
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +50 -11
- 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 +11 -11
- 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 +8 -8
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +11 -3
- 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/variables/schema.md +52 -0
- package/api/@xmachines/play-react-router/README.md +22 -50
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +17 -16
- package/api/@xmachines/play-react-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +11 -8
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +16 -9
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +10 -10
- package/api/@xmachines/play-react-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +4 -4
- 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 +17 -7
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-router/README.md +108 -189
- package/api/@xmachines/play-router/errors/README.md +15 -0
- package/api/@xmachines/play-router/errors/classes/DuplicateBridgeError.md +191 -0
- package/api/@xmachines/play-router/errors/classes/DuplicateRoutePathError.md +175 -0
- package/api/@xmachines/play-router/errors/classes/EmptyRoutePathError.md +175 -0
- package/api/@xmachines/play-router/errors/classes/InvalidBasePathError.md +200 -0
- package/api/@xmachines/play-router/errors/classes/InvalidRoutePatternError.md +203 -0
- package/api/@xmachines/play-router/errors/classes/InvalidStateIdError.md +175 -0
- package/api/@xmachines/play-router/errors/classes/MissingBasePathParamError.md +199 -0
- package/api/@xmachines/play-router/errors/classes/RouterSyncError.md +192 -0
- package/api/@xmachines/play-router/errors/classes/UnknownStateTypeError.md +182 -0
- package/api/@xmachines/play-router/index/README.md +75 -0
- package/api/@xmachines/play-router/{classes → index/classes}/RouteMap.md +12 -6
- package/api/@xmachines/play-router/{classes → index/classes}/RouterBridgeBase.md +19 -17
- package/api/@xmachines/play-router/{functions → index/functions}/buildPlayRouteEvent.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/buildRouteTree.md +14 -4
- package/api/@xmachines/play-router/{functions → index/functions}/cleanFrameworkParams.md +3 -4
- package/api/@xmachines/play-router/{functions → index/functions}/createRouteMapFromTree.md +13 -6
- package/api/@xmachines/play-router/{functions → index/functions}/createRouterConnection.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/detectDuplicateRoutes.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/extractQuery.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/extractRouteParams.md +3 -3
- package/api/@xmachines/play-router/{functions → index/functions}/findRouteById.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/findRouteByPath.md +2 -2
- package/api/@xmachines/play-router/index/functions/getPatternParamNames.md +29 -0
- package/api/@xmachines/play-router/index/functions/getRequiredPatternParamNames.md +39 -0
- package/api/@xmachines/play-router/{functions → index/functions}/isMountableBridge.md +2 -2
- package/api/@xmachines/play-router/index/functions/joinBasePath.md +37 -0
- package/api/@xmachines/play-router/{functions → index/functions}/mountKey.md +2 -2
- package/api/@xmachines/play-router/index/functions/normalizeBasePath.md +43 -0
- package/api/@xmachines/play-router/{functions → index/functions}/openProviderBridge.md +14 -14
- package/api/@xmachines/play-router/index/functions/pickOwnParams.md +41 -0
- package/api/@xmachines/play-router/{functions → index/functions}/repointProviderBridge.md +2 -2
- package/api/@xmachines/play-router/index/functions/resolveBasePath.md +51 -0
- package/api/@xmachines/play-router/{functions → index/functions}/resolveFrameworkParams.md +11 -13
- package/api/@xmachines/play-router/{functions → index/functions}/sanitizePathname.md +2 -2
- package/api/@xmachines/play-router/index/functions/stripBasePath.md +44 -0
- package/api/@xmachines/play-router/{functions → index/functions}/validateRouteFormat.md +2 -2
- package/api/@xmachines/play-router/{functions → index/functions}/validateStateExists.md +2 -2
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/BasePathOptions.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/BuildPlayRouteEventOptions.md +13 -0
- package/api/@xmachines/play-router/index/interfaces/FrameworkParamsSource.md +47 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/LocationLike.md +6 -6
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/MountableRouterBridge.md +9 -9
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/OpenProviderBridgeArgs.md +13 -13
- package/api/@xmachines/play-router/index/interfaces/PlayRouteEvent.md +130 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/PlayRouterProviderBaseProps.md +15 -15
- package/api/@xmachines/play-router/index/interfaces/ResolvedBasePath.md +14 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/ResolvedRoutePath.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/Routable.md +26 -0
- package/api/@xmachines/play-router/index/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouteInfo.md +11 -11
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouteMapping.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/RouteMatch.md +12 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouteNode.md +13 -13
- package/api/@xmachines/play-router/index/interfaces/RouteObject.md +34 -0
- package/api/@xmachines/play-router/index/interfaces/RouteTree.md +27 -0
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouteWatcherHandle.md +7 -7
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouterBridge.md +5 -5
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/RouterConnection.md +38 -9
- package/api/@xmachines/play-router/{interfaces → index/interfaces}/WindowLike.md +4 -4
- package/api/@xmachines/play-router/index/type-aliases/PlayRouterBridgeConstructor.md +46 -0
- package/api/@xmachines/play-router/index/type-aliases/RouteData.md +12 -0
- package/api/@xmachines/play-router/index/type-aliases/RouteDataResolver.md +31 -0
- package/api/@xmachines/play-router/index/type-aliases/RouteMetadata.md +11 -0
- package/api/@xmachines/play-router/index/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-router/index/variables/NO_BASE_PATH.md +18 -0
- package/api/@xmachines/play-router/index/variables/ROOT_NODE_ID.md +18 -0
- package/api/@xmachines/play-router/xstate/README.md +53 -0
- package/api/@xmachines/{play-dom-router → play-router/xstate}/functions/createRouteMap.md +8 -6
- package/api/@xmachines/play-router/{functions → xstate/functions}/extractMachineRoutes.md +4 -4
- package/api/@xmachines/play-router/xstate/functions/getNavigableRoutes.md +35 -0
- package/api/@xmachines/play-router/{functions → xstate/functions}/getRoutableRoutes.md +6 -6
- package/api/@xmachines/play-router/{functions → xstate/functions}/getRouteMappings.md +7 -7
- package/api/@xmachines/play-router/{functions → xstate/functions}/getTransitionReachableRoutes.md +2 -2
- package/api/@xmachines/play-router/{functions → xstate/functions}/isRouteReachable.md +2 -2
- package/api/@xmachines/play-router/{functions → xstate/functions}/machineToGraph.md +2 -2
- package/api/@xmachines/play-router/xstate/functions/routeExists.md +26 -0
- package/api/@xmachines/play-router/xstate/interfaces/MachineEdgeData.md +15 -0
- package/api/@xmachines/play-router/xstate/interfaces/MachineNodeData.md +17 -0
- package/api/@xmachines/play-router/{type-aliases → xstate/type-aliases}/MachineGraph.md +2 -2
- package/api/@xmachines/play-signals/README.md +5 -25
- 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 +36 -35
- 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 +11 -11
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +16 -8
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +11 -3
- 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/variables/schema.md +71 -0
- package/api/@xmachines/play-solid-router/README.md +31 -52
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +30 -53
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +9 -8
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +38 -35
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +12 -12
- package/api/@xmachines/play-solid-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +17 -7
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +5 -5
- 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 +13 -28
- 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 +12 -12
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +8 -8
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +11 -3
- package/api/@xmachines/play-svelte/variables/schema.md +16 -0
- package/api/@xmachines/play-svelte-spa-router/README.md +22 -41
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +22 -21
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +8 -8
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-svelte-spa-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +4 -4
- 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 +36 -7
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/README.md +17 -35
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +22 -21
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +8 -8
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-sveltekit-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +4 -4
- 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 +36 -7
- package/api/@xmachines/play-tanstack-react-router/README.md +19 -43
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +18 -17
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +11 -8
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +16 -9
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +10 -10
- package/api/@xmachines/play-tanstack-react-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.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 +17 -7
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +5 -5
- 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 +6 -4
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +17 -20
- 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 +26 -52
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +11 -5
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +49 -45
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +9 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +9 -14
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +10 -10
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +4 -4
- 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 +17 -7
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +5 -5
- 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-url/README.md +69 -0
- package/api/@xmachines/play-url/errors/README.md +17 -0
- package/api/@xmachines/play-url/errors/classes/InvalidBasePathError.md +200 -0
- package/api/@xmachines/play-url/errors/classes/InvalidRoutePatternError.md +203 -0
- package/api/@xmachines/play-url/errors/classes/MissingBasePathParamError.md +199 -0
- package/api/@xmachines/play-url/index/README.md +65 -0
- package/api/@xmachines/play-url/index/functions/cleanFrameworkParams.md +39 -0
- package/api/@xmachines/play-url/index/functions/getCandidates.md +29 -0
- package/api/@xmachines/play-url/index/functions/getCompiledPattern.md +31 -0
- package/api/@xmachines/play-url/index/functions/getIndexKey.md +30 -0
- package/api/@xmachines/play-url/index/functions/getNormalizedParamNameMap.md +32 -0
- package/api/@xmachines/play-url/index/functions/getPatternParamNames.md +29 -0
- package/api/@xmachines/play-url/index/functions/getRequiredPatternParamNames.md +39 -0
- package/api/@xmachines/play-url/index/functions/holdsUnsubstitutedParam.md +36 -0
- package/api/@xmachines/play-url/index/functions/isParameterizedPattern.md +36 -0
- package/api/@xmachines/{play-router → play-url/index}/functions/joinBasePath.md +2 -2
- package/api/@xmachines/{play-router → play-url/index}/functions/normalizeBasePath.md +2 -2
- package/api/@xmachines/play-url/index/functions/normalizeParamNames.md +36 -0
- package/api/@xmachines/play-url/index/functions/parsePattern.md +27 -0
- package/api/@xmachines/{play-router → play-url/index}/functions/pickOwnParams.md +4 -4
- package/api/@xmachines/{play-router → play-url/index}/functions/resolveBasePath.md +2 -2
- package/api/@xmachines/play-url/index/functions/resolveFrameworkParams.md +49 -0
- package/api/@xmachines/{play-router → play-url/index}/functions/stripBasePath.md +2 -2
- package/api/@xmachines/play-url/index/interfaces/BasePathOptions.md +28 -0
- package/api/@xmachines/{play-router → play-url/index}/interfaces/FrameworkParamsSource.md +9 -9
- package/api/@xmachines/play-url/index/interfaces/GroupPart.md +15 -0
- package/api/@xmachines/play-url/index/interfaces/LiteralPart.md +14 -0
- package/api/@xmachines/play-url/index/interfaces/ParamPart.md +21 -0
- package/api/@xmachines/play-url/index/interfaces/ParsedPattern.md +23 -0
- package/api/@xmachines/play-url/index/interfaces/PatternParam.md +15 -0
- package/api/@xmachines/{play-router → play-url/index}/interfaces/ResolvedBasePath.md +6 -6
- package/api/@xmachines/play-url/index/type-aliases/PatternModifier.md +11 -0
- package/api/@xmachines/play-url/index/type-aliases/PatternPart.md +9 -0
- package/api/@xmachines/play-url/index/type-aliases/URLPatternCtor.md +22 -0
- package/api/@xmachines/play-url/index/type-aliases/URLPatternLike.md +68 -0
- package/api/@xmachines/{play-router → play-url/index}/variables/NO_BASE_PATH.md +2 -2
- package/api/@xmachines/play-url/index/variables/URLPattern.md +21 -0
- package/api/@xmachines/play-view/README.md +165 -0
- package/api/@xmachines/play-view/errors/README.md +17 -0
- package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +192 -0
- package/api/@xmachines/play-view/index/README.md +55 -0
- package/api/@xmachines/{play-actor → play-view/index}/functions/attachRenderErrorHandler.md +6 -6
- package/api/@xmachines/{play-actor → play-view/index}/functions/composePlayState.md +2 -2
- package/api/@xmachines/play-view/index/functions/createFailureLatch.md +20 -0
- package/api/@xmachines/play-view/index/functions/createReportGuard.md +26 -0
- package/api/@xmachines/{play-actor → play-view/index}/functions/createViewStoreLifecycle.md +2 -2
- package/api/@xmachines/{play-actor → play-view/index}/functions/guardContextWrites.md +2 -2
- package/api/@xmachines/{play-actor → play-view/index}/functions/refreshContextSubtree.md +2 -2
- package/api/@xmachines/{play-actor → play-view/index}/functions/reuseComposedState.md +3 -3
- package/api/@xmachines/play-view/index/functions/sameViewInputs.md +25 -0
- package/api/@xmachines/{play-actor → play-view/index}/functions/toAtomState.md +2 -2
- package/api/@xmachines/{play-actor → play-view/index}/functions/typedSpec.md +2 -2
- package/api/@xmachines/play-view/index/interfaces/BaseActorProviderProps.md +49 -0
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/BaseViewContextValue.md +12 -12
- package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +60 -0
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/PlaySpec.md +8 -8
- package/api/@xmachines/play-view/index/interfaces/ReportGuard.md +92 -0
- package/api/@xmachines/play-view/index/interfaces/ReportGuardMessages.md +18 -0
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/ResolveViewStoreOptions.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ViewInputs.md +19 -0
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/ViewStoreLifecycle.md +6 -5
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/ViewStoreResolution.md +7 -7
- package/api/@xmachines/{play-actor → play-view/index}/interfaces/Viewable.md +5 -5
- package/api/@xmachines/play-view/index/type-aliases/ViewActor.md +26 -0
- package/api/@xmachines/{play-actor → play-view/index}/variables/CONTEXT_STATE_KEY.md +2 -2
- package/api/@xmachines/play-vue/README.md +46 -42
- 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 +13 -8
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +15 -10
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +8 -8
- package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +11 -3
- 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/schema.md +71 -0
- package/api/@xmachines/play-vue-router/README.md +34 -77
- package/api/@xmachines/play-vue-router/errors/README.md +8 -0
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterNavigationError.md +193 -0
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterSendError.md +177 -0
- package/api/@xmachines/play-vue-router/index/README.md +20 -0
- package/api/@xmachines/play-vue-router/index/classes/RouteMap.md +157 -0
- package/api/@xmachines/play-vue-router/{classes → index/classes}/VueRouterBridge.md +24 -43
- package/api/@xmachines/play-vue-router/index/interfaces/PlayRouteEvent.md +130 -0
- package/api/@xmachines/play-vue-router/index/interfaces/RoutableActor.md +72 -0
- package/api/@xmachines/play-vue-router/{interfaces → index/interfaces}/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-vue-router/{interfaces → index/interfaces}/RouteMapping.md +6 -6
- package/api/@xmachines/play-vue-router/{interfaces → index/interfaces}/RouterBridge.md +5 -5
- package/api/@xmachines/play-vue-router/{variables → index/variables}/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-xstate/README.md +163 -98
- package/api/@xmachines/play-xstate/errors/README.md +13 -0
- package/api/@xmachines/play-xstate/errors/classes/ActorThrewNonErrorError.md +199 -0
- package/api/@xmachines/play-xstate/errors/classes/InvalidEventError.md +198 -0
- package/api/@xmachines/play-xstate/errors/classes/InvalidMachineError.md +169 -0
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteHandlerError.md +197 -0
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteMetadataError.md +176 -0
- package/api/@xmachines/play-xstate/errors/classes/MissingRouteParamError.md +199 -0
- package/api/@xmachines/play-xstate/errors/classes/MissingStateIdError.md +203 -0
- package/api/@xmachines/play-xstate/index/README.md +38 -0
- package/api/@xmachines/play-xstate/index/classes/PlayerActor.md +584 -0
- package/api/@xmachines/play-xstate/index/functions/compose.md +224 -0
- package/api/@xmachines/play-xstate/index/functions/definePlayer.md +158 -0
- package/api/@xmachines/play-xstate/index/interfaces/PlayerConfig.md +22 -0
- package/api/@xmachines/play-xstate/{interfaces → index/interfaces}/PlayerFactoryResumeOptions.md +3 -3
- package/api/@xmachines/play-xstate/{interfaces → index/interfaces}/PlayerOptions.md +8 -8
- package/api/@xmachines/play-xstate/index/type-aliases/Capability.md +33 -0
- package/api/@xmachines/play-xstate/index/type-aliases/PlayerConstructor.md +39 -0
- package/api/@xmachines/play-xstate/index/type-aliases/PlayerFactory.md +27 -0
- package/api/@xmachines/play-xstate/index/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-xstate/with-routing/README.md +46 -0
- package/api/@xmachines/play-xstate/{functions → with-routing/functions}/buildRouteUrl.md +2 -2
- package/api/@xmachines/play-xstate/{functions → with-routing/functions}/deriveRoute.md +4 -4
- package/api/@xmachines/play-xstate/{functions → with-routing/functions}/formatPlayRouteTransitions.md +2 -2
- package/api/@xmachines/play-xstate/{functions → with-routing/functions}/isAbsoluteRoute.md +3 -3
- package/api/@xmachines/play-xstate/with-routing/functions/withRouting.md +36 -0
- package/api/@xmachines/play-xstate/{interfaces → with-routing/interfaces}/RouteContext.md +6 -6
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteObject.md +34 -0
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteData.md +12 -0
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteDataResolver.md +31 -0
- package/api/@xmachines/play-xstate/{type-aliases → with-routing/type-aliases}/RouteMachineConfig.md +5 -5
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMetadata.md +11 -0
- package/api/@xmachines/play-xstate/{type-aliases → with-routing/type-aliases}/RouteStateNode.md +21 -7
- package/api/@xmachines/play-xstate/with-view/README.md +31 -0
- package/api/@xmachines/play-xstate/with-view/functions/withView.md +32 -0
- package/api/@xmachines/shared/README.md +10 -32
- 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 +2 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/api/README.md +2 -0
- package/api/llms.txt +15 -10
- package/contributing/architecture.md +97 -65
- package/contributing/configuration.md +142 -41
- package/contributing/deployment.md +30 -28
- package/contributing/development.md +94 -31
- package/contributing/testing.md +90 -31
- package/examples/README.md +9 -7
- package/examples/form-validation.md +3 -2
- package/examples/multi-router-integration.md +61 -39
- package/examples/routing-patterns.md +15 -14
- package/examples/traffic-light.md +11 -5
- package/guides/README.md +1 -0
- package/guides/actor-model.md +35 -26
- package/guides/getting-started.md +47 -44
- package/guides/inspector.md +4 -4
- package/guides/routing.md +245 -0
- package/guides/signals.md +43 -0
- package/guides/state-machines.md +16 -17
- package/package.json +10 -9
- package/rfc/play.md +35 -22
- package/api/@xmachines/play-actor/classes/AbstractActor.md +0 -505
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +0 -48
- package/api/@xmachines/play-actor/interfaces/Routable.md +0 -14
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +0 -122
- package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +0 -13
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +0 -70
- package/api/@xmachines/play-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +0 -35
- package/api/@xmachines/play-router/functions/getPatternParamNames.md +0 -24
- package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +0 -36
- package/api/@xmachines/play-router/functions/routeExists.md +0 -26
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +0 -13
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +0 -15
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +0 -17
- package/api/@xmachines/play-router/interfaces/PlayActor.md +0 -70
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +0 -135
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +0 -65
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +0 -12
- package/api/@xmachines/play-router/interfaces/RouteObject.md +0 -21
- package/api/@xmachines/play-router/interfaces/RouteTree.md +0 -21
- package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +0 -13
- package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +0 -36
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +0 -11
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +0 -471
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +0 -13
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +0 -9
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +0 -9
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +0 -29
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +0 -70
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +0 -31
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +0 -70
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +0 -13
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +0 -9
- package/api/@xmachines/play-vue/variables/getPlayViewContext.md +0 -34
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +0 -40
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +0 -70
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +0 -135
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +0 -13
- package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +0 -13
- package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +0 -13
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +0 -532
- package/api/@xmachines/play-xstate/functions/composeGuards.md +0 -86
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +0 -72
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +0 -43
- package/api/@xmachines/play-xstate/functions/definePlayer.md +0 -78
- package/api/@xmachines/play-xstate/functions/eventMatches.md +0 -45
- package/api/@xmachines/play-xstate/functions/hasContext.md +0 -45
- package/api/@xmachines/play-xstate/functions/negateGuard.md +0 -67
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +0 -20
- package/api/@xmachines/play-xstate/interfaces/RouteObject.md +0 -17
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +0 -19
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +0 -36
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +0 -23
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +0 -26
- package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +0 -9
|
@@ -1,471 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-solid-router](../README.md) / AbstractActor
|
|
2
|
-
|
|
3
|
-
# Abstract Interface: AbstractActor\<TLogic, TEvent\>
|
|
4
|
-
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:197](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-actor/src/abstract-actor.ts#L197)
|
|
6
|
-
|
|
7
|
-
The abstract base class of an actor of the Play Architecture.
|
|
8
|
-
|
|
9
|
-
It observes the state through the signals, and it works with the tools of the
|
|
10
|
-
XState ecosystem, such as the devtools and the inspection. It also exposes the
|
|
11
|
-
reactive signals of the communication with the infrastructure layer.
|
|
12
|
-
|
|
13
|
-
**A subclass IS the actor.** Give the logic _and_ its options to
|
|
14
|
-
`super(logic, options)`, then observe `this`. A separate actor beside this
|
|
15
|
-
instance leaves this instance as an empty second actor. Every inherited member
|
|
16
|
-
then answers from that empty actor, until you forward each one: `system`,
|
|
17
|
-
`sessionId`, `clock`, the internal `_send` that receives the traffic of
|
|
18
|
-
`sendTo()`, and each member that a later XState version adds.
|
|
19
|
-
|
|
20
|
-
## Extends
|
|
21
|
-
|
|
22
|
-
- [`Actor`](https://www.jsdocs.io/package/xstate#Actor)\<`TLogic`\>
|
|
23
|
-
|
|
24
|
-
## Type Parameters
|
|
25
|
-
|
|
26
|
-
| Type Parameter | Default type | Description |
|
|
27
|
-
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------ |
|
|
28
|
-
| `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | The type of the XState actor logic |
|
|
29
|
-
| `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | The constraint of the event type. The default is EventObject |
|
|
30
|
-
|
|
31
|
-
## Properties
|
|
32
|
-
|
|
33
|
-
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
34
|
-
| ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
|
-
| <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
|
|
36
|
-
| <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | `Actor.clock` | - |
|
|
37
|
-
| <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
|
|
38
|
-
| <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
|
|
39
|
-
| <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
|
|
40
|
-
| <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
|
|
41
|
-
| <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
|
|
42
|
-
| <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
|
|
43
|
-
| <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | The reactive snapshot of the current actor state. The infrastructure observes this signal, and it reacts to each state change. It therefore holds no coupling to the internal state machine of the actor. | - | [packages/play-actor/src/abstract-actor.ts:207](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-actor/src/abstract-actor.ts#L207) |
|
|
44
|
-
| <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
|
|
45
|
-
| <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
|
|
46
|
-
|
|
47
|
-
## Methods
|
|
48
|
-
|
|
49
|
-
### \[observable\]()
|
|
50
|
-
|
|
51
|
-
```ts
|
|
52
|
-
observable: InteropSubscribable<SnapshotFrom<TLogic>>;
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Defined in: `xstate`
|
|
56
|
-
|
|
57
|
-
#### Returns
|
|
58
|
-
|
|
59
|
-
[`InteropSubscribable`](https://www.jsdocs.io/package/xstate#InteropSubscribable)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\>
|
|
60
|
-
|
|
61
|
-
#### Inherited from
|
|
62
|
-
|
|
63
|
-
```ts
|
|
64
|
-
Actor.[observable]
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
### getPersistedSnapshot()
|
|
70
|
-
|
|
71
|
-
```ts
|
|
72
|
-
getPersistedSnapshot(): Snapshot<unknown>;
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Defined in: `xstate`
|
|
76
|
-
|
|
77
|
-
Obtain the internal state of the actor, which can be persisted.
|
|
78
|
-
|
|
79
|
-
#### Returns
|
|
80
|
-
|
|
81
|
-
[`Snapshot`](https://www.jsdocs.io/package/xstate#Snapshot)\<`unknown`\>
|
|
82
|
-
|
|
83
|
-
#### Remarks
|
|
84
|
-
|
|
85
|
-
The internal state can be persisted from any actor, not only machines.
|
|
86
|
-
|
|
87
|
-
Note that the persisted state is not the same as the snapshot from
|
|
88
|
-
[Actor.getSnapshot](../../play-actor/classes/AbstractActor.md#getsnapshot). Persisted state represents the internal state of
|
|
89
|
-
the actor, while snapshots represent the actor's last emitted value.
|
|
90
|
-
|
|
91
|
-
Can be restored with [ActorOptions.state](https://www.jsdocs.io/package/xstate#ActorOptions.state)
|
|
92
|
-
|
|
93
|
-
#### See
|
|
94
|
-
|
|
95
|
-
https://stately.ai/docs/persistence
|
|
96
|
-
|
|
97
|
-
#### Inherited from
|
|
98
|
-
|
|
99
|
-
```ts
|
|
100
|
-
Actor.getPersistedSnapshot;
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
### getSnapshot()
|
|
106
|
-
|
|
107
|
-
```ts
|
|
108
|
-
getSnapshot(): SnapshotFrom<TLogic>;
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Defined in: `xstate`
|
|
112
|
-
|
|
113
|
-
Read an actor’s snapshot synchronously.
|
|
114
|
-
|
|
115
|
-
#### Returns
|
|
116
|
-
|
|
117
|
-
[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>
|
|
118
|
-
|
|
119
|
-
#### Remarks
|
|
120
|
-
|
|
121
|
-
The snapshot represent an actor's last emitted value.
|
|
122
|
-
|
|
123
|
-
When an actor receives an event, its internal state may change. An actor
|
|
124
|
-
may emit a snapshot when a state transition occurs.
|
|
125
|
-
|
|
126
|
-
Note that some actors, such as callback actors generated with
|
|
127
|
-
`fromCallback`, will not emit snapshots.
|
|
128
|
-
|
|
129
|
-
#### See
|
|
130
|
-
|
|
131
|
-
- [Actor.subscribe](../../play-actor/classes/AbstractActor.md#subscribe) to subscribe to an actor’s snapshot values.
|
|
132
|
-
- [Actor.getPersistedSnapshot](../../play-actor/classes/AbstractActor.md#getpersistedsnapshot) to persist the internal state of an actor (which is more than just a snapshot).
|
|
133
|
-
|
|
134
|
-
#### Inherited from
|
|
135
|
-
|
|
136
|
-
```ts
|
|
137
|
-
Actor.getSnapshot;
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
### on()
|
|
143
|
-
|
|
144
|
-
```ts
|
|
145
|
-
on<TType>(type, handler): Subscription;
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Defined in: `xstate`
|
|
149
|
-
|
|
150
|
-
#### Type Parameters
|
|
151
|
-
|
|
152
|
-
| Type Parameter |
|
|
153
|
-
| ----------------------- |
|
|
154
|
-
| `TType` _extends_ `any` |
|
|
155
|
-
|
|
156
|
-
#### Parameters
|
|
157
|
-
|
|
158
|
-
| Parameter | Type |
|
|
159
|
-
| --------- | --------------------- |
|
|
160
|
-
| `type` | `TType` |
|
|
161
|
-
| `handler` | (`emitted`) => `void` |
|
|
162
|
-
|
|
163
|
-
#### Returns
|
|
164
|
-
|
|
165
|
-
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
166
|
-
|
|
167
|
-
#### Inherited from
|
|
168
|
-
|
|
169
|
-
```ts
|
|
170
|
-
Actor.on;
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
### select()
|
|
176
|
-
|
|
177
|
-
```ts
|
|
178
|
-
select<TSelected>(selector, equalityFn?): Readable<TSelected>;
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
Defined in: `xstate`
|
|
182
|
-
|
|
183
|
-
#### Type Parameters
|
|
184
|
-
|
|
185
|
-
| Type Parameter |
|
|
186
|
-
| -------------- |
|
|
187
|
-
| `TSelected` |
|
|
188
|
-
|
|
189
|
-
#### Parameters
|
|
190
|
-
|
|
191
|
-
| Parameter | Type |
|
|
192
|
-
| ------------- | --------------------------- |
|
|
193
|
-
| `selector` | (`snapshot`) => `TSelected` |
|
|
194
|
-
| `equalityFn?` | (`a`, `b`) => `boolean` |
|
|
195
|
-
|
|
196
|
-
#### Returns
|
|
197
|
-
|
|
198
|
-
`Readable`\<`TSelected`\>
|
|
199
|
-
|
|
200
|
-
#### Inherited from
|
|
201
|
-
|
|
202
|
-
```ts
|
|
203
|
-
Actor.select;
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
### send()
|
|
209
|
-
|
|
210
|
-
```ts
|
|
211
|
-
abstract send(event): void;
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-actor/src/abstract-actor.ts#L223)
|
|
215
|
-
|
|
216
|
-
Sends an event to the Actor.
|
|
217
|
-
|
|
218
|
-
The constraint is TEvent, which gives the type safety of a concrete
|
|
219
|
-
implementation.
|
|
220
|
-
|
|
221
|
-
A note for an implementation that wraps `send`, to check the event or to notify a
|
|
222
|
-
hook around it: this declaration is abstract for one reason only, to narrow the
|
|
223
|
-
event type, and TypeScript forbids a `super` call to an abstract member. Reach
|
|
224
|
-
the implementation of XState with `Actor.prototype.send.call(this, event)`
|
|
225
|
-
instead. A concrete declaration permits `super.send()`, but it also forces an
|
|
226
|
-
`override` modifier in every subclass that exists now, and that is a breaking
|
|
227
|
-
change for an adapter outside this repository.
|
|
228
|
-
|
|
229
|
-
#### Parameters
|
|
230
|
-
|
|
231
|
-
| Parameter | Type |
|
|
232
|
-
| --------- | -------- |
|
|
233
|
-
| `event` | `TEvent` |
|
|
234
|
-
|
|
235
|
-
#### Returns
|
|
236
|
-
|
|
237
|
-
`void`
|
|
238
|
-
|
|
239
|
-
#### Overrides
|
|
240
|
-
|
|
241
|
-
```ts
|
|
242
|
-
Actor.send;
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
### start()
|
|
248
|
-
|
|
249
|
-
```ts
|
|
250
|
-
start(): this;
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Defined in: `xstate`
|
|
254
|
-
|
|
255
|
-
Starts the Actor from the initial state
|
|
256
|
-
|
|
257
|
-
#### Returns
|
|
258
|
-
|
|
259
|
-
`this`
|
|
260
|
-
|
|
261
|
-
#### Inherited from
|
|
262
|
-
|
|
263
|
-
```ts
|
|
264
|
-
Actor.start;
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
### stop()
|
|
270
|
-
|
|
271
|
-
```ts
|
|
272
|
-
stop(): this;
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Defined in: `xstate`
|
|
276
|
-
|
|
277
|
-
Stops the Actor and unsubscribe all listeners.
|
|
278
|
-
|
|
279
|
-
#### Returns
|
|
280
|
-
|
|
281
|
-
`this`
|
|
282
|
-
|
|
283
|
-
#### Inherited from
|
|
284
|
-
|
|
285
|
-
```ts
|
|
286
|
-
Actor.stop;
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
---
|
|
290
|
-
|
|
291
|
-
### subscribe()
|
|
292
|
-
|
|
293
|
-
#### Call Signature
|
|
294
|
-
|
|
295
|
-
```ts
|
|
296
|
-
subscribe(observer): Subscription;
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
Defined in: `xstate`
|
|
300
|
-
|
|
301
|
-
Subscribe an observer to an actor’s snapshot values.
|
|
302
|
-
|
|
303
|
-
##### Parameters
|
|
304
|
-
|
|
305
|
-
| Parameter | Type | Description |
|
|
306
|
-
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
307
|
-
| `observer` | [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\> | Either a plain function that receives the latest snapshot, or an observer object whose `.next(snapshot)` method receives the latest snapshot |
|
|
308
|
-
|
|
309
|
-
##### Returns
|
|
310
|
-
|
|
311
|
-
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
312
|
-
|
|
313
|
-
##### Remarks
|
|
314
|
-
|
|
315
|
-
The observer will receive the actor’s snapshot value when it is emitted.
|
|
316
|
-
The observer can be:
|
|
317
|
-
|
|
318
|
-
- A plain function that receives the latest snapshot, or
|
|
319
|
-
- An observer object whose `.next(snapshot)` method receives the latest
|
|
320
|
-
snapshot
|
|
321
|
-
|
|
322
|
-
##### Examples
|
|
323
|
-
|
|
324
|
-
```ts
|
|
325
|
-
// Observer as a plain function
|
|
326
|
-
const subscription = actor.subscribe((snapshot) => {
|
|
327
|
-
console.log(snapshot);
|
|
328
|
-
});
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
```ts
|
|
332
|
-
// Observer as an object
|
|
333
|
-
const subscription = actor.subscribe({
|
|
334
|
-
next(snapshot) {
|
|
335
|
-
console.log(snapshot);
|
|
336
|
-
},
|
|
337
|
-
error(err) {
|
|
338
|
-
// ...
|
|
339
|
-
},
|
|
340
|
-
complete() {
|
|
341
|
-
// ...
|
|
342
|
-
},
|
|
343
|
-
});
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
The return value of `actor.subscribe(observer)` is a subscription object
|
|
347
|
-
that has an `.unsubscribe()` method. You can call
|
|
348
|
-
`subscription.unsubscribe()` to unsubscribe the observer:
|
|
349
|
-
|
|
350
|
-
```ts
|
|
351
|
-
const subscription = actor.subscribe((snapshot) => {
|
|
352
|
-
// ...
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
// Unsubscribe the observer
|
|
356
|
-
subscription.unsubscribe();
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
When the actor is stopped, all of its observers will automatically be
|
|
360
|
-
unsubscribed.
|
|
361
|
-
|
|
362
|
-
##### Inherited from
|
|
363
|
-
|
|
364
|
-
```ts
|
|
365
|
-
Actor.subscribe;
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
#### Call Signature
|
|
369
|
-
|
|
370
|
-
```ts
|
|
371
|
-
subscribe(
|
|
372
|
-
nextListener?,
|
|
373
|
-
errorListener?,
|
|
374
|
-
completeListener?): Subscription;
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
Defined in: `xstate`
|
|
378
|
-
|
|
379
|
-
Subscribe an observer to an actor’s snapshot values.
|
|
380
|
-
|
|
381
|
-
##### Parameters
|
|
382
|
-
|
|
383
|
-
| Parameter | Type |
|
|
384
|
-
| ------------------- | ---------------------- |
|
|
385
|
-
| `nextListener?` | (`snapshot`) => `void` |
|
|
386
|
-
| `errorListener?` | (`error`) => `void` |
|
|
387
|
-
| `completeListener?` | () => `void` |
|
|
388
|
-
|
|
389
|
-
##### Returns
|
|
390
|
-
|
|
391
|
-
[`Subscription`](https://www.jsdocs.io/package/xstate#Subscription)
|
|
392
|
-
|
|
393
|
-
##### Remarks
|
|
394
|
-
|
|
395
|
-
The observer will receive the actor’s snapshot value when it is emitted.
|
|
396
|
-
The observer can be:
|
|
397
|
-
|
|
398
|
-
- A plain function that receives the latest snapshot, or
|
|
399
|
-
- An observer object whose `.next(snapshot)` method receives the latest
|
|
400
|
-
snapshot
|
|
401
|
-
|
|
402
|
-
##### Examples
|
|
403
|
-
|
|
404
|
-
```ts
|
|
405
|
-
// Observer as a plain function
|
|
406
|
-
const subscription = actor.subscribe((snapshot) => {
|
|
407
|
-
console.log(snapshot);
|
|
408
|
-
});
|
|
409
|
-
```
|
|
410
|
-
|
|
411
|
-
```ts
|
|
412
|
-
// Observer as an object
|
|
413
|
-
const subscription = actor.subscribe({
|
|
414
|
-
next(snapshot) {
|
|
415
|
-
console.log(snapshot);
|
|
416
|
-
},
|
|
417
|
-
error(err) {
|
|
418
|
-
// ...
|
|
419
|
-
},
|
|
420
|
-
complete() {
|
|
421
|
-
// ...
|
|
422
|
-
},
|
|
423
|
-
});
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
The return value of `actor.subscribe(observer)` is a subscription object
|
|
427
|
-
that has an `.unsubscribe()` method. You can call
|
|
428
|
-
`subscription.unsubscribe()` to unsubscribe the observer:
|
|
429
|
-
|
|
430
|
-
```ts
|
|
431
|
-
const subscription = actor.subscribe((snapshot) => {
|
|
432
|
-
// ...
|
|
433
|
-
});
|
|
434
|
-
|
|
435
|
-
// Unsubscribe the observer
|
|
436
|
-
subscription.unsubscribe();
|
|
437
|
-
```
|
|
438
|
-
|
|
439
|
-
When the actor is stopped, all of its observers will automatically be
|
|
440
|
-
unsubscribed.
|
|
441
|
-
|
|
442
|
-
##### Inherited from
|
|
443
|
-
|
|
444
|
-
```ts
|
|
445
|
-
Actor.subscribe;
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
---
|
|
449
|
-
|
|
450
|
-
### toJSON()
|
|
451
|
-
|
|
452
|
-
```ts
|
|
453
|
-
toJSON(): object;
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
Defined in: `xstate`
|
|
457
|
-
|
|
458
|
-
#### Returns
|
|
459
|
-
|
|
460
|
-
`object`
|
|
461
|
-
|
|
462
|
-
| Name | Type | Defined in |
|
|
463
|
-
| -------------- | -------- | ---------- |
|
|
464
|
-
| `id` | `string` | - |
|
|
465
|
-
| `xstate$$type` | `number` | - |
|
|
466
|
-
|
|
467
|
-
#### Inherited from
|
|
468
|
-
|
|
469
|
-
```ts
|
|
470
|
-
Actor.toJSON;
|
|
471
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-solid-router](../README.md) / RoutableActor
|
|
2
|
-
|
|
3
|
-
# ~~Type Alias: RoutableActor~~
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
type RoutableActor = PlayActor;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-solid-router/src/play-router-provider.tsx#L19)
|
|
10
|
-
|
|
11
|
-
## Deprecated
|
|
12
|
-
|
|
13
|
-
Use `PlayActor` from `@xmachines/play-router`. The next major version removes this alias.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-svelte-spa-router](../README.md) / createRouteMap
|
|
2
|
-
|
|
3
|
-
# Function: createRouteMap()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function createRouteMap(machine, options?): RouteMap;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-router/src/create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/create-route-map.ts#L47)
|
|
10
|
-
|
|
11
|
-
Creates a `RouteMap` from an XState state machine.
|
|
12
|
-
|
|
13
|
-
The function reads every state with a route, which means each state with a
|
|
14
|
-
`meta.route` field. It then builds the lookup structure between a path and a
|
|
15
|
-
stateId, for both directions. A subclass of `RouterBridgeBase` uses the map: it
|
|
16
|
-
converts each change of the browser URL into a `play.route` actor event, and each
|
|
17
|
-
actor route into a URL.
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Parameter | Type | Description |
|
|
22
|
-
| ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
-
| `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine, with a `meta.route` annotation on each state with a route. |
|
|
24
|
-
| `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | The optional configuration. Give `{ cacheSize }` to change the default size of the LRU cache of the parameterized path lookups. |
|
|
25
|
-
|
|
26
|
-
## Returns
|
|
27
|
-
|
|
28
|
-
[`RouteMap`](../classes/RouteMap.md)
|
|
29
|
-
|
|
30
|
-
A `RouteMap` for each adapter on `RouterBridgeBase`.
|
|
31
|
-
|
|
32
|
-
## Example
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { createRouteMap } from "@xmachines/play-router";
|
|
36
|
-
import { connectRouter } from "@xmachines/play-dom-router";
|
|
37
|
-
|
|
38
|
-
const routeMap = createRouteMap(myMachine);
|
|
39
|
-
const disconnect = connectRouter({ actor, router, routeMap });
|
|
40
|
-
```
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-svelte-spa-router](../README.md) / RoutableActor
|
|
2
|
-
|
|
3
|
-
# Type Alias: RoutableActor
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
type RoutableActor = AbstractActor<AnyActorLogic> & Routable;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-svelte-spa-router/src/types.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-svelte-spa-router/src/types.ts#L6)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-sveltekit-router](../README.md) / createRouteMap
|
|
2
|
-
|
|
3
|
-
# Function: createRouteMap()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function createRouteMap(machine, options?): RouteMap;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-router/src/create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/create-route-map.ts#L47)
|
|
10
|
-
|
|
11
|
-
Creates a `RouteMap` from an XState state machine.
|
|
12
|
-
|
|
13
|
-
The function reads every state with a route, which means each state with a
|
|
14
|
-
`meta.route` field. It then builds the lookup structure between a path and a
|
|
15
|
-
stateId, for both directions. A subclass of `RouterBridgeBase` uses the map: it
|
|
16
|
-
converts each change of the browser URL into a `play.route` actor event, and each
|
|
17
|
-
actor route into a URL.
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Parameter | Type | Description |
|
|
22
|
-
| ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
-
| `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine, with a `meta.route` annotation on each state with a route. |
|
|
24
|
-
| `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | The optional configuration. Give `{ cacheSize }` to change the default size of the LRU cache of the parameterized path lookups. |
|
|
25
|
-
|
|
26
|
-
## Returns
|
|
27
|
-
|
|
28
|
-
[`RouteMap`](../classes/RouteMap.md)
|
|
29
|
-
|
|
30
|
-
A `RouteMap` for each adapter on `RouterBridgeBase`.
|
|
31
|
-
|
|
32
|
-
## Example
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { createRouteMap } from "@xmachines/play-router";
|
|
36
|
-
import { connectRouter } from "@xmachines/play-dom-router";
|
|
37
|
-
|
|
38
|
-
const routeMap = createRouteMap(myMachine);
|
|
39
|
-
const disconnect = connectRouter({ actor, router, routeMap });
|
|
40
|
-
```
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-sveltekit-router](../README.md) / RoutableActor
|
|
2
|
-
|
|
3
|
-
# Type Alias: RoutableActor
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
type RoutableActor = AbstractActor<AnyActorLogic> & Routable;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-sveltekit-router/src/types.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-sveltekit-router/src/types.ts#L10)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-tanstack-react-router](../README.md) / createRouteMap
|
|
2
|
-
|
|
3
|
-
# Function: createRouteMap()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function createRouteMap(machine, options?): RouteMap;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-router/src/create-route-map.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/create-route-map.ts#L47)
|
|
10
|
-
|
|
11
|
-
Creates a `RouteMap` from an XState state machine.
|
|
12
|
-
|
|
13
|
-
The function reads every state with a route, which means each state with a
|
|
14
|
-
`meta.route` field. It then builds the lookup structure between a path and a
|
|
15
|
-
stateId, for both directions. A subclass of `RouterBridgeBase` uses the map: it
|
|
16
|
-
converts each change of the browser URL into a `play.route` actor event, and each
|
|
17
|
-
actor route into a URL.
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Parameter | Type | Description |
|
|
22
|
-
| ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
-
| `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine, with a `meta.route` annotation on each state with a route. |
|
|
24
|
-
| `options?` | [`RouteMapOptions`](../interfaces/RouteMapOptions.md) | The optional configuration. Give `{ cacheSize }` to change the default size of the LRU cache of the parameterized path lookups. |
|
|
25
|
-
|
|
26
|
-
## Returns
|
|
27
|
-
|
|
28
|
-
[`RouteMap`](../classes/RouteMap.md)
|
|
29
|
-
|
|
30
|
-
A `RouteMap` for each adapter on `RouterBridgeBase`.
|
|
31
|
-
|
|
32
|
-
## Example
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { createRouteMap } from "@xmachines/play-router";
|
|
36
|
-
import { connectRouter } from "@xmachines/play-dom-router";
|
|
37
|
-
|
|
38
|
-
const routeMap = createRouteMap(myMachine);
|
|
39
|
-
const disconnect = connectRouter({ actor, router, routeMap });
|
|
40
|
-
```
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-tanstack-react-router](../README.md) / extractMachineRoutes
|
|
2
|
-
|
|
3
|
-
# Function: extractMachineRoutes()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function extractMachineRoutes(machine): RouteTree;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [play-router/src/extract-routes.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.2.0/packages/play-router/src/extract-routes.ts#L92)
|
|
10
|
-
|
|
11
|
-
Reads the complete route tree from the graph of a state machine
|
|
12
|
-
|
|
13
|
-
The function converts the XState machine into a Graph of @statelyai/graph, with
|
|
14
|
-
machineToGraph(). It then walks the graph nodes: it reads the route metadata of
|
|
15
|
-
each node, it checks each route reference, and it builds a hierarchical RouteTree.
|
|
16
|
-
The RouteTree of the return value also holds the graph, for a later query that
|
|
17
|
-
needs the transitions.
|
|
18
|
-
|
|
19
|
-
## Parameters
|
|
20
|
-
|
|
21
|
-
| Parameter | Type | Description |
|
|
22
|
-
| --------- | ------------------------------------------------------------------------- | --------------------------- |
|
|
23
|
-
| `machine` | [`AnyStateMachine`](https://www.jsdocs.io/package/xstate#AnyStateMachine) | The XState v5 state machine |
|
|
24
|
-
|
|
25
|
-
## Returns
|
|
26
|
-
|
|
27
|
-
[`RouteTree`](../../play-router/interfaces/RouteTree.md)
|
|
28
|
-
|
|
29
|
-
The route tree, with its root, its byStateId map, its byPath map, and its graph
|