@xmachines/docs 5.0.1 → 6.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 +4 -1
- package/api/@xmachines/core/README.md +209 -0
- package/api/@xmachines/core/cache/README.md +17 -0
- package/api/@xmachines/core/cache/functions/createLruCache.md +52 -0
- package/api/@xmachines/core/cache/interfaces/KeyValueCache.md +61 -0
- package/api/@xmachines/core/errors/README.md +11 -0
- package/api/@xmachines/core/errors/classes/BaseError.md +226 -0
- package/api/@xmachines/core/errors/classes/DisposeConflictError.md +177 -0
- package/api/@xmachines/core/utils/README.md +33 -0
- package/api/@xmachines/core/utils/functions/asDisposable.md +139 -0
- package/api/@xmachines/core/utils/functions/createNullRecord.md +39 -0
- package/api/@xmachines/core/utils/functions/createWarnOnce.md +39 -0
- package/api/@xmachines/core/utils/functions/describeValue.md +39 -0
- package/api/@xmachines/core/utils/functions/isError.md +46 -0
- package/api/@xmachines/core/utils/functions/isThenable.md +43 -0
- package/api/@xmachines/core/utils/functions/releaseQuietly.md +37 -0
- package/api/@xmachines/core/utils/functions/rethrowLater.md +43 -0
- package/api/@xmachines/core/utils/functions/safeString.md +36 -0
- package/api/@xmachines/core/utils/functions/shallowEqualExcept.md +42 -0
- package/api/@xmachines/core/utils/type-aliases/DisposeKey.md +28 -0
- package/api/@xmachines/core/utils/type-aliases/DisposeMember.md +14 -0
- package/api/@xmachines/{play-router/index → core/utils}/variables/DISPOSE.md +9 -9
- package/api/@xmachines/play/README.md +19 -70
- package/api/@xmachines/play/errors/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/errors/classes/PlayError.md +30 -34
- package/api/@xmachines/play/index/README.md +0 -8
- package/api/@xmachines/play/index/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/index/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +1 -1
- package/api/@xmachines/play-actor/interfaces/ActorEvent.md +2 -2
- package/api/@xmachines/play-actor/interfaces/PlayActor.md +3 -3
- package/api/@xmachines/play-atom/README.md +35 -26
- package/api/@xmachines/play-atom/functions/watchAtom.md +8 -8
- package/api/@xmachines/play-atom/interfaces/AsyncAtomOptions.md +4 -4
- package/api/@xmachines/play-atom/interfaces/Atom.md +6 -6
- package/api/@xmachines/play-atom/interfaces/AtomObserver.md +6 -6
- package/api/@xmachines/play-atom/interfaces/AtomOptions.md +4 -4
- package/api/@xmachines/play-atom/interfaces/AtomSubscription.md +2 -2
- package/api/@xmachines/play-atom/interfaces/BaseAtom.md +4 -4
- package/api/@xmachines/play-atom/interfaces/CreateAtom.md +3 -3
- package/api/@xmachines/play-atom/interfaces/Readable.md +4 -4
- package/api/@xmachines/play-atom/interfaces/ReadonlyAtom.md +4 -4
- package/api/@xmachines/play-atom/type-aliases/AnyAtom.md +1 -1
- package/api/@xmachines/play-atom/type-aliases/AsyncAtomState.md +1 -1
- package/api/@xmachines/play-atom/variables/createAsyncAtom.md +1 -1
- package/api/@xmachines/play-atom/variables/createAtom.md +1 -1
- package/api/@xmachines/play-atom/variables/createWritableAtom.md +1 -1
- package/api/@xmachines/play-dom/README.md +32 -34
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +11 -11
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -14
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -17
- package/api/@xmachines/play-dom-router/README.md +35 -49
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +13 -13
- package/api/@xmachines/play-dom-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +5 -3
- package/api/@xmachines/play-dom-router/functions/createRouter.md +5 -3
- package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +21 -67
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +10 -10
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +7 -7
- 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/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +12 -31
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +12 -27
- package/api/@xmachines/play-pattern/README.md +10 -6
- package/api/@xmachines/play-pattern/functions/buildPath.md +1 -1
- package/api/@xmachines/play-pattern/functions/{createPatternCache.md → createLruCache.md} +19 -14
- package/api/@xmachines/play-pattern/functions/getIndexKey.md +1 -1
- package/api/@xmachines/play-pattern/functions/isDotSegment.md +1 -1
- package/api/@xmachines/play-pattern/functions/parsePattern.md +1 -1
- package/api/@xmachines/play-pattern/interfaces/GroupPart.md +6 -6
- package/api/@xmachines/play-pattern/interfaces/KeyValueCache.md +61 -0
- package/api/@xmachines/play-pattern/interfaces/LiteralPart.md +5 -5
- package/api/@xmachines/play-pattern/interfaces/ParamPart.md +9 -9
- package/api/@xmachines/play-pattern/interfaces/ParseOptions.md +4 -4
- package/api/@xmachines/play-pattern/interfaces/ParsedPattern.md +14 -14
- package/api/@xmachines/play-pattern/interfaces/PatternParam.md +6 -6
- package/api/@xmachines/play-pattern/type-aliases/PathBuildResult.md +1 -1
- package/api/@xmachines/play-pattern/type-aliases/PathParams.md +1 -1
- package/api/@xmachines/play-pattern/type-aliases/PatternModifier.md +1 -1
- package/api/@xmachines/play-pattern/type-aliases/PatternPart.md +1 -1
- package/api/@xmachines/play-react/README.md +5 -5
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +6 -6
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useAtomEffect.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +6 -6
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
- 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/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 +5 -3
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +7 -7
- package/api/@xmachines/play-react-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-react-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-router/README.md +15 -14
- package/api/@xmachines/play-router/errors/classes/DuplicateBridgeError.md +4 -4
- package/api/@xmachines/play-router/errors/classes/DuplicateRoutePathError.md +5 -5
- package/api/@xmachines/play-router/errors/classes/EmptyRoutePathError.md +5 -5
- package/api/@xmachines/play-router/errors/classes/InvalidBasePathError.md +5 -5
- package/api/@xmachines/play-router/errors/classes/InvalidRoutePatternError.md +5 -5
- package/api/@xmachines/play-router/errors/classes/InvalidStateIdError.md +5 -5
- package/api/@xmachines/play-router/errors/classes/MissingBasePathParamError.md +6 -6
- package/api/@xmachines/play-router/errors/classes/RouterSyncError.md +4 -4
- package/api/@xmachines/play-router/errors/classes/UnknownStateTypeError.md +6 -6
- package/api/@xmachines/play-router/index/README.md +2 -3
- package/api/@xmachines/play-router/index/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-router/index/classes/RouterBridgeBase.md +7 -7
- package/api/@xmachines/play-router/index/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/index/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/index/functions/cleanFrameworkParams.md +1 -1
- package/api/@xmachines/play-router/index/functions/{createPatternCache.md → createLruCache.md} +19 -14
- package/api/@xmachines/play-router/index/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/index/functions/createRouterConnection.md +1 -1
- package/api/@xmachines/play-router/index/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/index/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/index/functions/extractRouteParams.md +1 -1
- package/api/@xmachines/play-router/index/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/index/functions/findRouteByPath.md +3 -3
- package/api/@xmachines/play-router/index/functions/isMountableBridge.md +1 -1
- package/api/@xmachines/play-router/index/functions/joinBasePath.md +1 -1
- package/api/@xmachines/play-router/index/functions/mountKey.md +1 -1
- package/api/@xmachines/play-router/index/functions/normalizeBasePath.md +1 -1
- package/api/@xmachines/play-router/index/functions/openProviderBridge.md +3 -3
- package/api/@xmachines/play-router/index/functions/parsePattern.md +1 -1
- package/api/@xmachines/play-router/index/functions/pickOwnParams.md +1 -1
- package/api/@xmachines/play-router/index/functions/repointProviderBridge.md +1 -1
- package/api/@xmachines/play-router/index/functions/resolveBasePath.md +1 -1
- package/api/@xmachines/play-router/index/functions/resolveFrameworkParams.md +1 -1
- package/api/@xmachines/play-router/index/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/index/functions/splitLocation.md +1 -1
- package/api/@xmachines/play-router/index/functions/stripBasePath.md +1 -1
- package/api/@xmachines/play-router/index/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/index/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/index/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/index/interfaces/CompileOptions.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/FrameworkParamsSource.md +9 -9
- package/api/@xmachines/play-router/index/interfaces/KeyValueCache.md +61 -0
- package/api/@xmachines/play-router/index/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/MountableRouterBridge.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/OpenProviderBridgeArgs.md +10 -10
- package/api/@xmachines/play-router/index/interfaces/ParseOptions.md +4 -4
- package/api/@xmachines/play-router/index/interfaces/ParsedPattern.md +12 -12
- package/api/@xmachines/play-router/index/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-router/index/interfaces/PlayRouterProviderBaseProps.md +11 -11
- package/api/@xmachines/play-router/index/interfaces/ResolvedBasePath.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/ResolvedRoutePath.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-router/index/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/index/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/index/interfaces/RouteObject.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouterBridgeOptions.md +7 -7
- package/api/@xmachines/play-router/index/interfaces/RouterConnection.md +12 -31
- package/api/@xmachines/play-router/index/interfaces/SplitLocation.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/index/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-router/index/type-aliases/RouteData.md +1 -1
- package/api/@xmachines/play-router/index/type-aliases/RouteDataResolver.md +1 -1
- package/api/@xmachines/play-router/index/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-router/index/type-aliases/URLPatternLike.md +3 -3
- package/api/@xmachines/play-router/index/variables/NO_BASE_PATH.md +1 -1
- package/api/@xmachines/play-router/index/variables/ROOT_NODE_ID.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/getRouteMappings.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/xstate/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/xstate/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/xstate/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/xstate/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-solid/README.md +2 -2
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-solid/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 +5 -3
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +7 -7
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-solid-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-svelte/README.md +4 -4
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +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 +5 -3
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +7 -7
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +10 -10
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-svelte-spa-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +12 -31
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/README.md +5 -3
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +7 -7
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +10 -10
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-sveltekit-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +12 -31
- package/api/@xmachines/play-tanstack-react-router/README.md +5 -3
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-router/README.md +11 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +7 -7
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/README.md +5 -3
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +7 -7
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-url/README.md +3 -3
- package/api/@xmachines/play-url/errors/classes/InvalidBasePathError.md +5 -5
- package/api/@xmachines/play-url/errors/classes/InvalidRoutePatternError.md +5 -5
- package/api/@xmachines/play-url/errors/classes/MissingBasePathParamError.md +6 -6
- package/api/@xmachines/play-url/index/README.md +2 -2
- package/api/@xmachines/play-url/index/functions/buildPath.md +1 -1
- package/api/@xmachines/play-url/index/functions/cleanFrameworkParams.md +1 -1
- package/api/@xmachines/play-url/index/functions/{createPatternCache.md → createLruCache.md} +19 -14
- package/api/@xmachines/play-url/index/functions/getCandidates.md +1 -1
- package/api/@xmachines/play-url/index/functions/getCompiledPattern.md +1 -1
- package/api/@xmachines/play-url/index/functions/getIndexKey.md +1 -1
- package/api/@xmachines/play-url/index/functions/holdsUnsubstitutedParam.md +1 -1
- package/api/@xmachines/play-url/index/functions/isDotSegment.md +1 -1
- package/api/@xmachines/play-url/index/functions/joinBasePath.md +1 -1
- package/api/@xmachines/play-url/index/functions/normalizeBasePath.md +1 -1
- package/api/@xmachines/play-url/index/functions/parsePattern.md +1 -1
- package/api/@xmachines/play-url/index/functions/pickOwnParams.md +1 -1
- package/api/@xmachines/play-url/index/functions/resolveBasePath.md +1 -1
- package/api/@xmachines/play-url/index/functions/resolveFrameworkParams.md +1 -1
- package/api/@xmachines/play-url/index/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-url/index/functions/splitLocation.md +1 -1
- package/api/@xmachines/play-url/index/functions/stripBasePath.md +1 -1
- package/api/@xmachines/play-url/index/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-url/index/interfaces/CompileOptions.md +5 -5
- package/api/@xmachines/play-url/index/interfaces/FrameworkParamsSource.md +9 -9
- package/api/@xmachines/play-url/index/interfaces/GroupPart.md +4 -4
- package/api/@xmachines/play-url/index/interfaces/KeyValueCache.md +61 -0
- package/api/@xmachines/play-url/index/interfaces/LiteralPart.md +3 -3
- package/api/@xmachines/play-url/index/interfaces/ParamPart.md +7 -7
- package/api/@xmachines/play-url/index/interfaces/ParseOptions.md +4 -4
- package/api/@xmachines/play-url/index/interfaces/ParsedPattern.md +12 -12
- package/api/@xmachines/play-url/index/interfaces/PatternParam.md +4 -4
- package/api/@xmachines/play-url/index/interfaces/ResolvedBasePath.md +3 -3
- package/api/@xmachines/play-url/index/interfaces/SplitLocation.md +5 -5
- package/api/@xmachines/play-url/index/type-aliases/PathBuildResult.md +1 -1
- package/api/@xmachines/play-url/index/type-aliases/PathParams.md +1 -1
- package/api/@xmachines/play-url/index/type-aliases/PatternModifier.md +1 -1
- package/api/@xmachines/play-url/index/type-aliases/PatternPart.md +1 -1
- package/api/@xmachines/play-url/index/type-aliases/URLPatternCtor.md +1 -1
- package/api/@xmachines/play-url/index/type-aliases/URLPatternLike.md +3 -3
- package/api/@xmachines/play-url/index/variables/NO_BASE_PATH.md +1 -1
- package/api/@xmachines/play-url/index/variables/URLPattern.md +1 -1
- package/api/@xmachines/play-view/README.md +4 -3
- package/api/@xmachines/play-view/errors/README.md +1 -1
- package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +5 -5
- package/api/@xmachines/play-view/index/functions/attachRenderErrorHandler.md +1 -1
- package/api/@xmachines/play-view/index/functions/composePlayState.md +1 -1
- package/api/@xmachines/play-view/index/functions/createFailureLatch.md +1 -1
- package/api/@xmachines/play-view/index/functions/createReportGuard.md +1 -1
- package/api/@xmachines/play-view/index/functions/createViewStoreLifecycle.md +1 -1
- package/api/@xmachines/play-view/index/functions/guardContextWrites.md +1 -1
- package/api/@xmachines/play-view/index/functions/refreshContextSubtree.md +1 -1
- package/api/@xmachines/play-view/index/functions/reuseComposedState.md +2 -2
- package/api/@xmachines/play-view/index/functions/sameViewInputs.md +1 -1
- package/api/@xmachines/play-view/index/functions/toAtomState.md +1 -1
- package/api/@xmachines/play-view/index/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-view/index/interfaces/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +3 -3
- package/api/@xmachines/play-view/index/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-view/index/interfaces/ReportGuard.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ReportGuardMessages.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ResolveViewStoreOptions.md +2 -2
- package/api/@xmachines/play-view/index/interfaces/ViewInputs.md +4 -4
- package/api/@xmachines/play-view/index/interfaces/ViewStoreLifecycle.md +3 -3
- package/api/@xmachines/play-view/index/interfaces/ViewStoreResolution.md +4 -4
- package/api/@xmachines/play-view/index/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-view/index/type-aliases/ViewActor.md +1 -1
- package/api/@xmachines/play-view/index/variables/CONTEXT_STATE_KEY.md +1 -1
- package/api/@xmachines/play-vue/README.md +4 -4
- 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 +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +1 -0
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- 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/schema.md +35 -54
- package/api/@xmachines/play-vue-router/README.md +4 -2
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterNavigationError.md +4 -4
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterSendError.md +4 -4
- package/api/@xmachines/play-vue-router/index/classes/RouteMap.md +5 -6
- package/api/@xmachines/play-vue-router/index/classes/VueRouterBridge.md +7 -7
- package/api/@xmachines/play-vue-router/index/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-vue-router/index/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-vue-router/index/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-vue-router/index/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/index/interfaces/RouterBridge.md +5 -5
- package/api/@xmachines/play-vue-router/index/variables/PlayRouterProvider.md +7 -7
- package/api/@xmachines/play-xstate/README.md +20 -9
- package/api/@xmachines/play-xstate/errors/classes/ActorThrewNonErrorError.md +4 -4
- package/api/@xmachines/play-xstate/errors/classes/InvalidEventError.md +5 -5
- package/api/@xmachines/play-xstate/errors/classes/InvalidMachineError.md +4 -4
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteHandlerError.md +5 -5
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteMetadataError.md +5 -5
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteParamError.md +14 -14
- package/api/@xmachines/play-xstate/errors/classes/MissingRouteParamError.md +6 -6
- package/api/@xmachines/play-xstate/errors/classes/MissingStateIdError.md +6 -6
- package/api/@xmachines/play-xstate/index/README.md +0 -4
- package/api/@xmachines/play-xstate/index/classes/PlayerActor.md +10 -45
- package/api/@xmachines/play-xstate/index/functions/compose.md +4 -4
- package/api/@xmachines/play-xstate/index/functions/definePlayer.md +2 -2
- package/api/@xmachines/play-xstate/index/interfaces/PlayerConfig.md +4 -4
- package/api/@xmachines/play-xstate/index/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/index/interfaces/PlayerOptions.md +7 -7
- package/api/@xmachines/play-xstate/index/type-aliases/Capability.md +1 -1
- package/api/@xmachines/play-xstate/index/type-aliases/PlayerConstructor.md +1 -1
- package/api/@xmachines/play-xstate/index/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/withRouting.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteObject.md +5 -5
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteData.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteDataResolver.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteStateNode.md +5 -5
- package/api/@xmachines/play-xstate/with-view/functions/withView.md +1 -1
- 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/api/README.md +1 -0
- package/api/llms.txt +1 -0
- package/contributing/architecture.md +36 -21
- package/contributing/configuration.md +7 -5
- package/contributing/deployment.md +23 -7
- package/contributing/development.md +26 -27
- package/contributing/migrating-to-play-atom.md +2 -1
- package/examples/@xmachines/play-dom-demo/README.md +6 -2
- package/examples/@xmachines/play-dom-demo/functions/createAuthActionHandlers.md +9 -9
- package/examples/@xmachines/play-dom-demo/functions/createConfirmDialog.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Button.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Field.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Panel.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/demoComponents.md +17 -17
- package/examples/@xmachines/play-dom-router-demo/README.md +9 -10
- package/examples/@xmachines/play-react-demo/functions/createAuthActionHandlers.md +9 -9
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Button.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Field.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Panel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Settings.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/demoComponents.md +17 -17
- package/examples/@xmachines/play-react-router-demo/README.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/createAuthActionHandlers.md +9 -9
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Button.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Field.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Panel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/demoComponents.md +17 -17
- package/examples/@xmachines/play-solid-router-demo/README.md +1 -1
- package/examples/@xmachines/play-svelte-demo/functions/createAuthActionHandlers.md +9 -9
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/demoComponents.md +15 -15
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +1 -1
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +1 -1
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +1 -1
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +1 -1
- package/examples/@xmachines/play-vue-demo/functions/createAuthActionHandlers.md +9 -9
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +190 -277
- package/examples/@xmachines/play-vue-demo/variables/demoComponents.md +1 -1
- package/examples/README.md +1 -1
- package/examples/form-validation.md +6 -3
- package/examples/multi-router-integration.md +6 -3
- package/examples/routing-patterns.md +6 -3
- package/guides/atoms.md +24 -12
- package/guides/getting-started.md +20 -14
- package/package.json +2 -1
- package/rfc/broker.md +4 -0
- package/rfc/browser.md +4 -0
- package/rfc/cli.md +4 -0
- package/rfc/git.md +4 -0
- package/rfc/mcp.md +4 -0
- package/rfc/node.md +4 -0
- package/rfc/play.md +1 -1
- package/rfc/rest.md +4 -0
- package/rfc/run.md +4 -0
- package/rfc/streams.md +4 -0
- package/api/@xmachines/play/index/functions/asCleanup.md +0 -77
- package/api/@xmachines/play/index/functions/shallowEqualExcept.md +0 -29
- package/api/@xmachines/play/index/type-aliases/Cleanup.md +0 -38
- package/api/@xmachines/play/index/type-aliases/DisposeKey.md +0 -32
- package/api/@xmachines/play/index/variables/DISPOSE.md +0 -34
- package/api/@xmachines/play-atom/type-aliases/Cleanup.md +0 -38
- package/api/@xmachines/play-dom/functions/asCleanup.md +0 -77
- package/api/@xmachines/play-dom/type-aliases/Cleanup.md +0 -38
- package/api/@xmachines/play-dom-router/functions/asCleanup.md +0 -77
- package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +0 -38
- package/api/@xmachines/play-dom-router/variables/DISPOSE.md +0 -34
- package/api/@xmachines/play-pattern/interfaces/PatternCache.md +0 -65
- package/api/@xmachines/play-router/index/interfaces/PatternCache.md +0 -65
- package/api/@xmachines/play-url/index/interfaces/PatternCache.md +0 -65
- package/api/@xmachines/play-xstate/index/variables/DISPOSE.md +0 -34
- package/examples/@xmachines/play-react-demo/functions/App.md +0 -13
- package/examples/@xmachines/play-react-demo/functions/DebugPanel.md +0 -20
- package/examples/@xmachines/play-react-demo/functions/HeaderNav.md +0 -20
- package/examples/@xmachines/play-react-demo/functions/Shell.md +0 -22
- package/examples/@xmachines/play-solid-demo/functions/App.md +0 -13
- package/examples/@xmachines/play-solid-demo/functions/DebugPanel.md +0 -20
- package/examples/@xmachines/play-solid-demo/functions/HeaderNav.md +0 -20
- package/examples/@xmachines/play-solid-demo/functions/Shell.md +0 -22
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayerOptions\<TMachine\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/types.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-xstate/src/types.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L37)
|
|
6
6
|
|
|
7
7
|
The lifecycle hooks of the player — the observability surface around the actor.
|
|
8
8
|
|
|
@@ -16,9 +16,9 @@ The lifecycle hooks of the player — the observability surface around the actor
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description | Defined in |
|
|
18
18
|
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-inspect"></a> `inspect?` | \| [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<`InspectionEvent`\> \| ((`inspectionEvent`) => `void`) | The inspection observer. The factory gives it to `createActor` of XState without a change. This is the attachment at the moment of the creation, and it is the only route that observes the construction events of the actor. An attachment later, with `actor.system.inspect(fn)`, also works, but it sees only the events after that moment. A `PlayerActor` is the XState actor itself. Therefore its own events carry `actorRef === playerActor`, and you can recognize it by its identity. Each `PlayerActor` is also its own root system. Therefore `event.rootId === actor.sessionId` separates the complete tree, and this includes the events of an invoked child and of a spawned child, whose `actorRef` is the child. That identity brings one point to note: the `@xstate.actor` event fires from inside the constructor of the actor. Its `actorRef` value is therefore the instance during the construction, and `state`, `currentRoute`, `currentView`, and `initialRoute` do not exist yet. A read of one of them there throws. Keep the reference, and read the atoms from a later event, or outside the observer. **Example** `import { createBrowserInspector } from "@statelyai/inspect"; const { inspect } = createBrowserInspector(); const createPlayer = definePlayer({ machine, options: { inspect } });` For an inspector that you create after the factory, for example behind a dev-tools switch, give the factory a function that forwards each event: `inspect: (event) => currentInspector?.(event)`. | [packages/play-xstate/src/types.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
20
|
-
| <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | The actor calls it on an actor error: a snapshot restore that fails at `start()`, an action or a guard that throws, and a failure of the view derivation. The actor reads this field at the moment of the delivery of an error, and not at its construction. The options object is shared by its reference. Therefore a handler on that object still receives each actor error, also after a later attachment, and the removal of the handler restores the loud default below. With a handler in place, the actor sends the error there, and the error counts as handled. XState decides its own global rethrow for each observer, and this option does not reach that decision: a subscription of your own without an `error` listener still forces the rethrow, with an `onError` handler and without one. Without `onError`, each actor error stays loud, with an unhandled rethrow through `setTimeout`. No error therefore disappears in silence. Your own `error` subscribers stop that default not: `onError` alone stops it. A failure of the actor that is an `Error` already arrives without a change, and it keeps the identity of the machine. A machine that throws a value that is not an `Error` arrives as an `ActorThrewNonErrorError`, with the value from the throw on its `cause` field. | [packages/play-xstate/src/types.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
21
|
-
| <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | The actor calls it on each real start, which is every transition from "not running" to "running". A start after a stop is such a transition. A second `start()` call while the actor runs fires the hook not again. | [packages/play-xstate/src/types.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
22
|
-
| <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | The actor calls it when the state atom changes | [packages/play-xstate/src/types.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
23
|
-
| <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | The actor calls it on each real stop, which means only after it tore a running actor down. A second `stop()` call, and a stop of an actor that never started fire the hook not. | [packages/play-xstate/src/types.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
-
| <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | The actor calls it after every event that `send()` processes. This includes an event that the machine ignores, and `prevState` and `nextState` are then the same snapshot. Compare the two values when only a real transition is important to you. | [packages/play-xstate/src/types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
19
|
+
| <a id="property-inspect"></a> `inspect?` | \| [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<`InspectionEvent`\> \| ((`inspectionEvent`) => `void`) | The inspection observer. The factory gives it to `createActor` of XState without a change. This is the attachment at the moment of the creation, and it is the only route that observes the construction events of the actor. An attachment later, with `actor.system.inspect(fn)`, also works, but it sees only the events after that moment. A `PlayerActor` is the XState actor itself. Therefore its own events carry `actorRef === playerActor`, and you can recognize it by its identity. Each `PlayerActor` is also its own root system. Therefore `event.rootId === actor.sessionId` separates the complete tree, and this includes the events of an invoked child and of a spawned child, whose `actorRef` is the child. That identity brings one point to note: the `@xstate.actor` event fires from inside the constructor of the actor. Its `actorRef` value is therefore the instance during the construction, and `state`, `currentRoute`, `currentView`, and `initialRoute` do not exist yet. A read of one of them there throws. Keep the reference, and read the atoms from a later event, or outside the observer. **Example** `import { createBrowserInspector } from "@statelyai/inspect"; const { inspect } = createBrowserInspector(); const createPlayer = definePlayer({ machine, options: { inspect } });` For an inspector that you create after the factory, for example behind a dev-tools switch, give the factory a function that forwards each event: `inspect: (event) => currentInspector?.(event)`. | [packages/play-xstate/src/types.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L125) |
|
|
20
|
+
| <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | The actor calls it on an actor error: a snapshot restore that fails at `start()`, an action or a guard that throws, and a failure of the view derivation. The actor reads this field at the moment of the delivery of an error, and not at its construction. The options object is shared by its reference. Therefore a handler on that object still receives each actor error, also after a later attachment, and the removal of the handler restores the loud default below. With a handler in place, the actor sends the error there, and the error counts as handled. XState decides its own global rethrow for each observer, and this option does not reach that decision: a subscription of your own without an `error` listener still forces the rethrow, with an `onError` handler and without one. Without `onError`, each actor error stays loud, with an unhandled rethrow through `setTimeout`. No error therefore disappears in silence. Your own `error` subscribers stop that default not: `onError` alone stops it. A failure of the actor that is an `Error` already arrives without a change, and it keeps the identity of the machine. A machine that throws a value that is not an `Error` arrives as an `ActorThrewNonErrorError`, with the value from the throw on its `cause` field. | [packages/play-xstate/src/types.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L90) |
|
|
21
|
+
| <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | The actor calls it on each real start, which is every transition from "not running" to "running". A start after a stop is such a transition. A second `start()` call while the actor runs fires the hook not again. | [packages/play-xstate/src/types.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L43) |
|
|
22
|
+
| <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | The actor calls it when the state atom changes | [packages/play-xstate/src/types.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L65) |
|
|
23
|
+
| <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | The actor calls it on each real stop, which means only after it tore a running actor down. A second `stop()` call, and a stop of an actor that never started fire the hook not. | [packages/play-xstate/src/types.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L50) |
|
|
24
|
+
| <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | The actor calls it after every event that `send()` processes. This includes an event that the machine ignores, and `prevState` and `nextState` are then the same snapshot. Compare the two values when only a real transition is important to you. | [packages/play-xstate/src/types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L58) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Capability<TMachine, TAdded> = (Base) => PlayerConstructor<TMachine, TAdded>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/capabilities.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/capabilities.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/capabilities.ts#L70)
|
|
10
10
|
|
|
11
11
|
One capability of an actor: a function that takes an actor class and answers the same
|
|
12
12
|
class with `TAdded` on the instance.
|
|
@@ -11,7 +11,7 @@ type PlayerConstructor<TMachine, TCapabilities> = (
|
|
|
11
11
|
) => PlayerActor<TMachine> & TCapabilities;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Defined in: [packages/play-xstate/src/capabilities.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
+
Defined in: [packages/play-xstate/src/capabilities.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/capabilities.ts#L49)
|
|
15
15
|
|
|
16
16
|
The constructor of a `PlayerActor`, with every capability that it carries already.
|
|
17
17
|
|
|
@@ -9,7 +9,7 @@ type PlayerFactory<TMachine, TCapabilities> =
|
|
|
9
9
|
: (input, options?) => PlayerActor<TMachine> & TCapabilities;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [packages/play-xstate/src/types.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
12
|
+
Defined in: [packages/play-xstate/src/types.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/types.ts#L154)
|
|
13
13
|
|
|
14
14
|
The factory function that definePlayer() returns. Each call makes an independent
|
|
15
15
|
actor instance from the same configuration.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function buildRouteUrl(routeTemplate, context?, options?): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/build-url.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/build-url.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/build-url.ts#L46)
|
|
10
10
|
|
|
11
11
|
Builds a complete URL from a route template and the context of the actor.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function deriveRoute(stateMeta): string | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/derive-route.ts:93](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/derive-route.ts:93](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/derive-route.ts#L93)
|
|
10
10
|
|
|
11
11
|
Derives the route from the metadata of an XState state
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function formatPlayRouteTransitions<T>(machineConfig): T;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L216)
|
|
10
10
|
|
|
11
11
|
Makes the play.route transitions from the declarative route configs
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function isAbsoluteRoute(path): boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/derive-route.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/derive-route.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/derive-route.ts#L269)
|
|
10
10
|
|
|
11
11
|
Tells you if the route path is absolute
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function withRouting<TMachine>(Base): PlayerConstructor<TMachine, Routable>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/with-routing.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/with-routing.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/with-routing.ts#L48)
|
|
10
10
|
|
|
11
11
|
Adds the routing capability to an actor class.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteContext
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/routing/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-xstate/src/routing/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/types.ts#L28)
|
|
6
6
|
|
|
7
7
|
The context of the route construction, from the machine context.
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ machine that calls `buildRouteUrl` itself must fill `params` itself.
|
|
|
19
19
|
|
|
20
20
|
| Property | Type | Description | Defined in |
|
|
21
21
|
| ------------------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
22
|
-
| <a id="property-basepath"></a> `basePath?` | `string` | The base path of a relative route | [packages/play-xstate/src/routing/types.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
23
|
-
| <a id="property-hash"></a> `hash?` | `string` | The hash fragment | [packages/play-xstate/src/routing/types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
-
| <a id="property-params"></a> `params?` | `Record`\<`string`, `unknown`\> | The parameters of the path to substitute, for example `:userId` of `/profile/:userId` | [packages/play-xstate/src/routing/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
25
|
-
| <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | The query parameters | [packages/play-xstate/src/routing/types.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
22
|
+
| <a id="property-basepath"></a> `basePath?` | `string` | The base path of a relative route | [packages/play-xstate/src/routing/types.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/types.ts#L30) |
|
|
23
|
+
| <a id="property-hash"></a> `hash?` | `string` | The hash fragment | [packages/play-xstate/src/routing/types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/types.ts#L36) |
|
|
24
|
+
| <a id="property-params"></a> `params?` | `Record`\<`string`, `unknown`\> | The parameters of the path to substitute, for example `:userId` of `/profile/:userId` | [packages/play-xstate/src/routing/types.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/types.ts#L32) |
|
|
25
|
+
| <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | The query parameters | [packages/play-xstate/src/routing/types.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/types.ts#L34) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteObject
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-router/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-router/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L33)
|
|
6
6
|
|
|
7
7
|
A route object, with more metadata.
|
|
8
8
|
|
|
@@ -28,7 +28,7 @@ default is `false`, and a release before this one generated every transition wit
|
|
|
28
28
|
|
|
29
29
|
| Property | Type | Description | Defined in |
|
|
30
30
|
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
-
| <a id="property-data"></a> `data?` | \| [`RouteData`](../type-aliases/RouteData.md) \| [`RouteDataResolver`](../type-aliases/RouteDataResolver.md) | The extra data that the state threads into its `play.route` event. The shape follows `WithDynamicParams` of XState, which is how XState itself parameterizes an action and a guard: the field holds a literal value, OR a function of `{ context, event }` that returns one. `// The literal form. It survives a serialization of the machine. meta: { route: { path: "/doc/:docId", data: { titleKey: "doc.view" } } } // The function form, for a value that depends on the route. meta: { route: { path: "/doc/:docId", data: ({ event }) => ({ title: `Document ${event.params?.docId}` }), }, }` The generated transition resolves the value and assigns it to the `data` field of the context, beside `params` and `query`. The data of a state does NOT merge with the data of its ancestors: each state declares the whole value that its own route carries. This field and [PlayRouteEvent.data](../../../play-dom-router/interfaces/PlayRouteEvent.md#property-data) are two different things, and they meet in the resolver. This field is what the STATE declares, in its machine. `PlayRouteEvent.data` is what the SENDER of the event supplies, such as a router bridge or the code of an application. A resolver reads `event.data` and returns whatever mix of the two the state needs. CAUTION: the function form holds a function inside `meta`, and a function does not survive `JSON.stringify`. A machine that Stately Studio reads, or that a process sends over a wire, must use the literal form. | [packages/play-router/src/types.ts:131](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
32
|
-
| <a id="property-handler"></a> `handler?` | `"root"` \| `"local"` \| `"both"` | Where the generated `play.route` transition sits. `"root"` is the default, and it is what XState does: `formatRouteTransitions` installs every route transition on the ROOT of the machine, and each one targets its state by the ID. A route from any state therefore reaches this state. The cost is that the root is the domain of the transition, so XState re-enters each ancestor on the path to the target, and those ancestors run their `entry` actions again although they stay active. `"local"` installs the transition on the PARENT of this state instead, and it targets this state relatively. XState offers the transitions of the deepest active state node first, so the parent answers the event itself and runs its `exit` and its `entry` actions NOT again. `"both"` installs one transition in each place. The local one answers while the parent is active, and the root one answers a route that arrives from outside the parent. Use `"both"` where an ancestor holds an `entry` action that must run one time for each real entry, such as an analytics event or an audit record. CAUTION: `"local"` makes this state reachable by a route ONLY while its parent is active. A `play.route` event that arrives from anywhere else matches no transition and the actor does not move. A browser URL for this state therefore leaves the URL and the actor divergent. Choose `"local"` to SCOPE a route on purpose, for example a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere. The field has no effect on a state whose parent IS the root: the root transition of such a state is already local to its parent, so all three values agree. | [packages/play-router/src/types.ts:95](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
33
|
-
| <a id="property-path"></a> `path` | `string` | The template of the route path, for example `"/user/:id"`. | [packages/play-router/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
34
|
-
| <a id="property-reenter"></a> `reenter?` | `boolean` | The `reenter` flag of the generated `play.route` transition. The default is `false`, which is also the default of XState. The flag spares the DOMAIN of the transition, and not every ancestor that stays active. Under the default placement `handler: "root"` the domain is the root of the machine, so `false` spares the root alone: each ancestor BETWEEN the root and the target still runs its `exit` and its `entry` actions, because XState re-enters every descendant of the domain that lies on the path to the target. A move between two siblings therefore still runs the `entry` action of their shared parent. [RouteObject.handler](#property-handler) is the field that spares those intermediate ancestors: `"local"` and `"both"` move the domain down to the parent of the state. Use the two fields together where an `entry` action must run one time for each state that the actor really enters. Set the field to `true` where the domain must run its `entry` actions again on every route to a descendant. The flag does not decide the destination. The value of the machine after a route is identical under both settings. A route to a state that has children still enters the `initial` child of that state, because the generated transition targets the state by its id, and XState enters the initial child of an id target under both settings. **See** [Play RFC](../../../../../rfc/play.md) | [packages/play-router/src/types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
31
|
+
| <a id="property-data"></a> `data?` | \| [`RouteData`](../type-aliases/RouteData.md) \| [`RouteDataResolver`](../type-aliases/RouteDataResolver.md) | The extra data that the state threads into its `play.route` event. The shape follows `WithDynamicParams` of XState, which is how XState itself parameterizes an action and a guard: the field holds a literal value, OR a function of `{ context, event }` that returns one. `// The literal form. It survives a serialization of the machine. meta: { route: { path: "/doc/:docId", data: { titleKey: "doc.view" } } } // The function form, for a value that depends on the route. meta: { route: { path: "/doc/:docId", data: ({ event }) => ({ title: `Document ${event.params?.docId}` }), }, }` The generated transition resolves the value and assigns it to the `data` field of the context, beside `params` and `query`. The data of a state does NOT merge with the data of its ancestors: each state declares the whole value that its own route carries. This field and [PlayRouteEvent.data](../../../play-dom-router/interfaces/PlayRouteEvent.md#property-data) are two different things, and they meet in the resolver. This field is what the STATE declares, in its machine. `PlayRouteEvent.data` is what the SENDER of the event supplies, such as a router bridge or the code of an application. A resolver reads `event.data` and returns whatever mix of the two the state needs. CAUTION: the function form holds a function inside `meta`, and a function does not survive `JSON.stringify`. A machine that Stately Studio reads, or that a process sends over a wire, must use the literal form. | [packages/play-router/src/types.ts:131](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L131) |
|
|
32
|
+
| <a id="property-handler"></a> `handler?` | `"root"` \| `"local"` \| `"both"` | Where the generated `play.route` transition sits. `"root"` is the default, and it is what XState does: `formatRouteTransitions` installs every route transition on the ROOT of the machine, and each one targets its state by the ID. A route from any state therefore reaches this state. The cost is that the root is the domain of the transition, so XState re-enters each ancestor on the path to the target, and those ancestors run their `entry` actions again although they stay active. `"local"` installs the transition on the PARENT of this state instead, and it targets this state relatively. XState offers the transitions of the deepest active state node first, so the parent answers the event itself and runs its `exit` and its `entry` actions NOT again. `"both"` installs one transition in each place. The local one answers while the parent is active, and the root one answers a route that arrives from outside the parent. Use `"both"` where an ancestor holds an `entry` action that must run one time for each real entry, such as an analytics event or an audit record. CAUTION: `"local"` makes this state reachable by a route ONLY while its parent is active. A `play.route` event that arrives from anywhere else matches no transition and the actor does not move. A browser URL for this state therefore leaves the URL and the actor divergent. Choose `"local"` to SCOPE a route on purpose, for example a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere. The field has no effect on a state whose parent IS the root: the root transition of such a state is already local to its parent, so all three values agree. | [packages/play-router/src/types.ts:95](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L95) |
|
|
33
|
+
| <a id="property-path"></a> `path` | `string` | The template of the route path, for example `"/user/:id"`. | [packages/play-router/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L35) |
|
|
34
|
+
| <a id="property-reenter"></a> `reenter?` | `boolean` | The `reenter` flag of the generated `play.route` transition. The default is `false`, which is also the default of XState. The flag spares the DOMAIN of the transition, and not every ancestor that stays active. Under the default placement `handler: "root"` the domain is the root of the machine, so `false` spares the root alone: each ancestor BETWEEN the root and the target still runs its `exit` and its `entry` actions, because XState re-enters every descendant of the domain that lies on the path to the target. A move between two siblings therefore still runs the `entry` action of their shared parent. [RouteObject.handler](#property-handler) is the field that spares those intermediate ancestors: `"local"` and `"both"` move the domain down to the parent of the state. Use the two fields together where an `entry` action must run one time for each state that the actor really enters. Set the field to `true` where the domain must run its `entry` actions again on every route to a descendant. The flag does not decide the destination. The value of the machine after a route is identical under both settings. A route to a state that has children still enters the `initial` child of that state, because the generated transition targets the state by its id, and XState enters the initial child of an id target under both settings. **See** [Play RFC](../../../../../rfc/play.md) | [packages/play-router/src/types.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L64) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteData = Record<string, unknown>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-router/src/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-router/src/types.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L15)
|
|
10
10
|
|
|
11
11
|
The resolved extra data of a route. It reaches the consumer on the `data` field of a
|
|
12
12
|
`play.route` event.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteDataResolver = (args) => RouteData;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-router/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-router/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L28)
|
|
10
10
|
|
|
11
11
|
The function form of [RouteObject.data](../interfaces/RouteObject.md#property-data).
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteMachineConfig = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L177)
|
|
10
10
|
|
|
11
11
|
The minimal structural constraint of a machine config that
|
|
12
12
|
`formatPlayRouteTransitions` accepts.
|
|
@@ -32,7 +32,7 @@ original concrete type through the transform. Therefore
|
|
|
32
32
|
optional context?: unknown;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:178](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
35
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:178](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L178)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:1
|
|
|
42
42
|
optional on?: Record<string, unknown>;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
45
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L180)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
@@ -52,4 +52,4 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:1
|
|
|
52
52
|
optional states?: Record<string, unknown>;
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:179](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
55
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:179](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L179)
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type RouteMetadata = string | RouteObject;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-router/src/types.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-router/src/types.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-router/src/types.ts#L151)
|
|
10
10
|
|
|
11
11
|
The route metadata of the `meta.route` field of a state machine.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteStateNode = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L30)
|
|
10
10
|
|
|
11
11
|
The minimal structural shape of one XState state node, as
|
|
12
12
|
`formatPlayRouteTransitions` reads it during its walk over the machine config.
|
|
@@ -29,7 +29,7 @@ signature without a change.
|
|
|
29
29
|
optional id?: string;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
32
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L34)
|
|
33
33
|
|
|
34
34
|
The optional explicit state ID, for example `"home"` or `"settings"`. It is the `#id` target of a `play.route` event.
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@ The optional explicit state ID, for example `"home"` or `"settings"`. It is the
|
|
|
41
41
|
optional meta?: object;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
44
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L36)
|
|
45
45
|
|
|
46
46
|
The state metadata. A `meta.route` field gives the state a route.
|
|
47
47
|
|
|
@@ -64,7 +64,7 @@ generated transition, and that flag defaults to `false`.
|
|
|
64
64
|
optional on?: Record<string, unknown>;
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
67
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L51)
|
|
68
68
|
|
|
69
69
|
The event handlers of this state. The function reads them where a child asks for a
|
|
70
70
|
local `play.route` handler, so that the transitions of the user survive the merge.
|
|
@@ -77,6 +77,6 @@ local `play.route` handler, so that the transitions of the user survive the merg
|
|
|
77
77
|
optional states?: Record<string, RouteStateNode>;
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
80
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L46)
|
|
81
81
|
|
|
82
82
|
The nested child states. The function walks them for each further route declaration.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function withView<TMachine>(Base): PlayerConstructor<TMachine, Viewable>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/with-view.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/with-view.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/play-xstate/src/with-view.ts#L99)
|
|
10
10
|
|
|
11
11
|
Adds the view capability to an actor class.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmAliases(importMetaUrl): Record<string, string>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:238](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:238](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L238)
|
|
10
10
|
|
|
11
11
|
Vite resolve.alias entries for all @xmachines/* workspace packages.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmCacheDir(importMetaUrl, name): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:355](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:355](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L355)
|
|
10
10
|
|
|
11
11
|
Returns the shared Vite `cacheDir` for this workspace package.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmOptimizeDeps(include?): DepOptimizationOptions;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:308](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:308](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L308)
|
|
10
10
|
|
|
11
11
|
Returns the standard Vite `optimizeDeps` config for browser test projects.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmResolve(importMetaUrl, extra?): ResolveOptions & object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:275](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:275](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L275)
|
|
10
10
|
|
|
11
11
|
Full Vite `resolve` config for @xmachines/* workspace packages.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmSvelteRunes(): object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:334](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:334](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L334)
|
|
10
10
|
|
|
11
11
|
Svelte plugin options that enforce runes mode for workspace sources only.
|
|
12
12
|
|
|
@@ -35,4 +35,4 @@ one and change the other.
|
|
|
35
35
|
|
|
36
36
|
| Name | Type | Defined in |
|
|
37
37
|
| ------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
-
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:335](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
38
|
+
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:335](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vite-aliases.ts#L335) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmBrowserConfig(importMetaUrl, overrides, options?): UserConfig;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vitest.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L209)
|
|
10
10
|
|
|
11
11
|
Create a Vitest browser-mode config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmVitestConfig(importMetaUrl, overrides): UserConfig;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vitest.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L65)
|
|
10
10
|
|
|
11
11
|
Create a Vitest config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: XmBrowserConfigOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [vitest.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [vitest.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L159)
|
|
6
6
|
|
|
7
7
|
Options for [defineXmBrowserConfig](../functions/defineXmBrowserConfig.md) that live outside the plain
|
|
8
8
|
Vitest config overrides.
|
|
@@ -11,6 +11,6 @@ Vitest config overrides.
|
|
|
11
11
|
|
|
12
12
|
| Property | Type | Description | Defined in |
|
|
13
13
|
| -------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
14
|
-
| <a id="property-base"></a> `base?` | `UserConfig` | Base Vite config to layer the browser test config on top of (typically a demo's `vite.config.ts`). When set, the base is expected to provide its own `resolve`/`plugins`, so the `cacheDir` and `resolve` defaults are not applied — mirroring the previous `mergeConfig(viteConfig, ...)` pattern in demo browser configs. | [vitest.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
15
|
-
| <a id="property-optimizedeps"></a> `optimizeDeps?` | `string`[] | Extra package specifiers to pre-bundle via `xmOptimizeDeps` (e.g. `["@xmachines/json-render-vue", "@xmachines/json-render-vue/schema"]`). Ignored when `overrides.optimizeDeps` is set, which then replaces the default `xmOptimizeDeps()` wholesale. | [vitest.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
16
|
-
| <a id="property-resolve"></a> `resolve?` | `Partial`\<`ResolveOptions` & `object`\> | Extra resolve options forwarded to `xmResolve` (e.g. `conditions` or additional `alias` entries). Not applied when `base` is set — the base config owns `resolve` in that layout. | [vitest.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
+
| <a id="property-base"></a> `base?` | `UserConfig` | Base Vite config to layer the browser test config on top of (typically a demo's `vite.config.ts`). When set, the base is expected to provide its own `resolve`/`plugins`, so the `cacheDir` and `resolve` defaults are not applied — mirroring the previous `mergeConfig(viteConfig, ...)` pattern in demo browser configs. | [vitest.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L167) |
|
|
15
|
+
| <a id="property-optimizedeps"></a> `optimizeDeps?` | `string`[] | Extra package specifiers to pre-bundle via `xmOptimizeDeps` (e.g. `["@xmachines/json-render-vue", "@xmachines/json-render-vue/schema"]`). Ignored when `overrides.optimizeDeps` is set, which then replaces the default `xmOptimizeDeps()` wholesale. | [vitest.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L174) |
|
|
16
|
+
| <a id="property-resolve"></a> `resolve?` | `Partial`\<`ResolveOptions` & `object`\> | Extra resolve options forwarded to `xmResolve` (e.g. `conditions` or additional `alias` entries). Not applied when `base` is set — the base config owns `resolve` in that layout. | [vitest.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v6.0.0/packages/shared/config/vitest.ts#L180) |
|
package/api/README.md
CHANGED
package/api/llms.txt
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
- [@xmachines/play-sveltekit-router](@xmachines/play-sveltekit-router/README.md): SvelteKit router adapter for actor-driven navigation
|
|
47
47
|
- [@xmachines/play-svelte-spa-router](@xmachines/play-svelte-spa-router/README.md): Svelte SPA router adapter for actor-driven navigation
|
|
48
48
|
- [@xmachines/shared](@xmachines/shared/README.md): Shared TypeScript, oxlint, and formatting configuration
|
|
49
|
+
- [@xmachines/core](@xmachines/core/README.md): BaseError, the release protocol (asDisposable), a key-value cache, and helpers for values and errors
|
|
49
50
|
|
|
50
51
|
## Notes For LLMs
|
|
51
52
|
|