@xmachines/docs 6.0.0 → 6.1.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 +6 -5
- package/api/@xmachines/core/README.md +1 -1
- package/api/@xmachines/core/cache/functions/createLruCache.md +1 -1
- package/api/@xmachines/core/cache/interfaces/KeyValueCache.md +3 -3
- package/api/@xmachines/core/errors/classes/BaseError.md +4 -4
- package/api/@xmachines/core/errors/classes/DisposeConflictError.md +4 -4
- package/api/@xmachines/core/utils/functions/asDisposable.md +2 -2
- package/api/@xmachines/core/utils/functions/createNullRecord.md +1 -1
- package/api/@xmachines/core/utils/functions/createWarnOnce.md +1 -1
- package/api/@xmachines/core/utils/functions/describeValue.md +1 -1
- package/api/@xmachines/core/utils/functions/isError.md +1 -1
- package/api/@xmachines/core/utils/functions/isThenable.md +1 -1
- package/api/@xmachines/core/utils/functions/releaseQuietly.md +1 -1
- package/api/@xmachines/core/utils/functions/rethrowLater.md +1 -1
- package/api/@xmachines/core/utils/functions/safeString.md +1 -1
- package/api/@xmachines/core/utils/functions/shallowEqualExcept.md +1 -1
- package/api/@xmachines/core/utils/type-aliases/DisposeKey.md +1 -1
- package/api/@xmachines/core/utils/type-aliases/DisposeMember.md +1 -1
- package/api/@xmachines/core/utils/variables/DISPOSE.md +1 -1
- package/api/@xmachines/play/README.md +1 -1
- package/api/@xmachines/play/errors/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/errors/classes/PlayError.md +5 -4
- 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 +2 -2
- package/api/@xmachines/play-atom/functions/watchAtom.md +1 -1
- package/api/@xmachines/play-atom/interfaces/AsyncAtomOptions.md +2 -2
- package/api/@xmachines/play-atom/interfaces/Atom.md +6 -6
- package/api/@xmachines/play-atom/interfaces/AtomObserver.md +4 -4
- package/api/@xmachines/play-atom/interfaces/AtomOptions.md +2 -2
- 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 +9 -14
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +11 -11
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -2
- 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 +1 -1
- package/api/@xmachines/play-dom-router/README.md +1 -1
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +7 -7
- package/api/@xmachines/play-dom-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +8 -8
- 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 +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 +6 -6
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-pattern/README.md +1 -1
- package/api/@xmachines/play-pattern/functions/buildPath.md +1 -1
- package/api/@xmachines/play-pattern/functions/createLruCache.md +1 -1
- 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 +4 -4
- package/api/@xmachines/play-pattern/interfaces/KeyValueCache.md +3 -3
- package/api/@xmachines/play-pattern/interfaces/LiteralPart.md +3 -3
- package/api/@xmachines/play-pattern/interfaces/ParamPart.md +7 -7
- package/api/@xmachines/play-pattern/interfaces/ParseOptions.md +2 -2
- package/api/@xmachines/play-pattern/interfaces/ParsedPattern.md +12 -12
- package/api/@xmachines/play-pattern/interfaces/PatternParam.md +4 -4
- 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 +2 -2
- 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 +8 -8
- 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 +8 -8
- 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 +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +7 -7
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +9 -9
- package/api/@xmachines/play-react-router/interfaces/RoutableActor.md +4 -4
- 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 +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 +7 -8
- 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/classes/RouteMap.md +4 -4
- 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/createLruCache.md +1 -1
- 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 +1 -1
- 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 +3 -3
- package/api/@xmachines/play-router/index/interfaces/FrameworkParamsSource.md +7 -7
- package/api/@xmachines/play-router/index/interfaces/KeyValueCache.md +3 -3
- 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 +8 -8
- package/api/@xmachines/play-router/index/interfaces/ParseOptions.md +2 -2
- 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 +9 -9
- 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 +4 -4
- 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 +12 -15
- 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 +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouterBridgeOptions.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouterConnection.md +6 -6
- 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 +1 -4
- package/api/@xmachines/play-solid/functions/defineRegistry.md +5 -5
- 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 +8 -8
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +9 -8
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- 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/variables/schema.md +35 -54
- package/api/@xmachines/play-solid-router/README.md +2 -2
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +8 -8
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/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 +9 -9
- package/api/@xmachines/play-solid-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +4 -4
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-svelte/README.md +2 -2
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +10 -8
- package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +10 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +7 -7
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +8 -8
- 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 +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 +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/README.md +1 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +7 -7
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +3 -3
- 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 +7 -7
- package/api/@xmachines/play-sveltekit-router/interfaces/RoutableActor.md +4 -4
- 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 +6 -6
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/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 +9 -9
- package/api/@xmachines/play-tanstack-react-router/interfaces/RoutableActor.md +4 -4
- 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 +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +7 -7
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +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 +9 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RoutableActor.md +4 -4
- 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 +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 +1 -1
- 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/functions/buildPath.md +1 -1
- package/api/@xmachines/play-url/index/functions/cleanFrameworkParams.md +1 -1
- package/api/@xmachines/play-url/index/functions/createLruCache.md +1 -1
- 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 +3 -3
- package/api/@xmachines/play-url/index/interfaces/FrameworkParamsSource.md +7 -7
- package/api/@xmachines/play-url/index/interfaces/GroupPart.md +4 -4
- package/api/@xmachines/play-url/index/interfaces/KeyValueCache.md +3 -3
- 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 +2 -2
- 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 +53 -22
- package/api/@xmachines/play-view/errors/README.md +1 -0
- package/api/@xmachines/play-view/errors/classes/InvalidViewOutletError.md +204 -0
- package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +5 -5
- package/api/@xmachines/play-view/index/README.md +6 -0
- 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/composeViews.md +35 -0
- 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 +1 -1
- 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 +11 -11
- 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/ComposedView.md +16 -0
- package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +3 -3
- package/api/@xmachines/play-view/index/interfaces/PlaySpec.md +12 -8
- package/api/@xmachines/play-view/index/interfaces/ReportGuard.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ReportGuardMessages.md +3 -3
- 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/ViewMeta.md +25 -0
- package/api/@xmachines/play-view/index/interfaces/ViewOutlet.md +23 -0
- 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/ViewTree.md +15 -0
- package/api/@xmachines/play-view/index/interfaces/ViewTreeChild.md +14 -0
- package/api/@xmachines/play-view/index/interfaces/Viewable.md +4 -4
- 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 +3 -5
- 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/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-router/README.md +1 -1
- 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 +4 -4
- 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 +4 -4
- package/api/@xmachines/play-vue-router/index/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/index/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/index/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +24 -17
- 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 +7 -7
- 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/classes/PlayerActor.md +10 -10
- 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 +12 -15
- 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 +2 -4
- package/api/@xmachines/shared/vite-aliases/README.md +7 -0
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +11 -5
- package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutput.md +37 -0
- package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutputFile.md +28 -0
- 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/vite-aliases/functions/xmTestTarget.md +26 -0
- package/api/@xmachines/shared/vite-aliases/type-aliases/XmTestTarget.md +15 -0
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +5 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/api/llms.txt +8 -4
- package/contributing/architecture.md +18 -8
- package/contributing/configuration.md +39 -6
- package/contributing/development.md +3 -1
- package/contributing/migrating-to-play-atom.md +1 -1
- package/contributing/testing.md +33 -4
- 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 +15 -15
- 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 +1 -1
- package/examples/@xmachines/play-react-demo/variables/Button.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Field.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Panel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/demoComponents.md +15 -15
- 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 +190 -277
- package/examples/@xmachines/play-solid-demo/variables/demoComponents.md +17 -17
- 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 +190 -277
- package/examples/@xmachines/play-svelte-demo/variables/demoComponents.md +15 -15
- 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 +1 -1
- package/examples/@xmachines/play-vue-demo/variables/demoComponents.md +1 -1
- package/examples/README.md +1 -1
- package/examples/multi-router-integration.md +1 -1
- package/examples/routing-patterns.md +1 -1
- package/examples/traffic-light.md +1 -1
- package/guides/README.md +5 -4
- package/guides/actor-model.md +4 -4
- package/guides/atoms.md +4 -4
- package/guides/getting-started.md +2 -6
- package/guides/inspector.md +1 -1
- package/guides/routing.md +41 -45
- package/guides/state-machines.md +69 -4
- package/guides/views.md +347 -0
- package/package.json +1 -1
- package/rfc/play.md +24 -8
|
@@ -121,7 +121,7 @@ on: {
|
|
|
121
121
|
|
|
122
122
|
- Every routable state must have both `id` (the `#id` navigation target) and `meta.route` (the URL template).
|
|
123
123
|
- The machine's context must include `params` and `query` fields (both `Record<string, string>`), because `formatPlayRouteTransitions` assigns them on every `play.route` transition.
|
|
124
|
-
- `reenter` comes from the object form of `meta.route`, and the default is `false`. Declare `meta: { route: { path: "/red", reenter: true } }` for a state
|
|
124
|
+
- `reenter` comes from the object form of `meta.route`, and the default is `false`. Declare `meta: { route: { path: "/red", reenter: true } }` for a state whose route must also re-enter the domain of the transition. See [Re-entry on a navigation](../guides/routing.md#re-entry-on-a-navigation).
|
|
125
125
|
|
|
126
126
|
## The `actor.currentRoute` atom
|
|
127
127
|
|
package/guides/README.md
CHANGED
|
@@ -10,10 +10,11 @@ User-facing guides for the XMachines Play architecture.
|
|
|
10
10
|
|
|
11
11
|
Background reading that explains the _why_ behind XMachines design decisions.
|
|
12
12
|
|
|
13
|
-
- **[
|
|
14
|
-
- **[
|
|
15
|
-
- **[
|
|
16
|
-
- **[
|
|
13
|
+
- **[State Machines](state-machines.md)** — What finite state machines are, how `meta.route` and `meta.view` extend them, and why they replace boolean flags and component-level routing logic
|
|
14
|
+
- **[The Actor Model](actor-model.md)** — The actor/infrastructure split, why the machine has zero framework imports, and how the reset invariant works
|
|
15
|
+
- **[Routing](routing.md)** — The URLPattern grammar that a `meta.route` path declares, the prefix rule that decides every optional route, and the three invariants that every router adapter follows
|
|
16
|
+
- **[Views](views.md)** — Which state supplies the view, the read-only `/context` projection, the `viewKey` that decides when a renderer keeps the UI, and the four invariants that every renderer follows
|
|
17
|
+
- **[Atoms](atoms.md)** — The atom primitives (`createAtom`, `createWritableAtom`, `watchAtom`), why XMachines uses them instead of observables, and the architectural invariants they enforce
|
|
17
18
|
|
|
18
19
|
## Tooling
|
|
19
20
|
|
package/guides/actor-model.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# The Actor Model in XMachines
|
|
2
2
|
|
|
3
3
|
XMachines is built around one central design principle: **business logic must never depend on infrastructure**. This page explains what that means, why the split is enforced the way it is, and what concrete responsibilities belong to each side of the boundary.
|
|
4
4
|
|
|
@@ -50,7 +50,7 @@ beside an old derivation, and the composition order of the capabilities decides
|
|
|
50
50
|
|
|
51
51
|
A derivation that fails reports through the `onError` option of the actor and keeps its
|
|
52
52
|
last good value. It throws never, because it runs inside the write and a throw would break
|
|
53
|
-
the transition for every other observer. See [
|
|
53
|
+
the transition for every other observer. See [Atoms](atoms.md).
|
|
54
54
|
|
|
55
55
|
The actor also owns:
|
|
56
56
|
|
|
@@ -190,8 +190,8 @@ The Play RFC captures the actor/infrastructure split in a single statement:
|
|
|
190
190
|
|
|
191
191
|
## See also
|
|
192
192
|
|
|
193
|
-
- [
|
|
194
|
-
- [
|
|
193
|
+
- [Atoms](atoms.md) — how the actor communicates with infrastructure
|
|
194
|
+
- [State Machines](state-machines.md) — how the machine definition drives actor behavior
|
|
195
195
|
- [Getting Started](getting-started.md) — hands-on walkthrough creating and starting an actor
|
|
196
196
|
- [@xmachines/play-actor](../api/@xmachines/play-actor/README.md) — API reference for [`PlayActor`](../api/@xmachines/play-actor/interfaces/PlayActor.md)
|
|
197
197
|
- [@xmachines/play-xstate](../api/@xmachines/play-xstate/README.md) — API reference for [`definePlayer`](../api/@xmachines/play-xstate/index/functions/definePlayer.md) and [`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md)
|
package/guides/atoms.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Atoms in XMachines
|
|
2
2
|
|
|
3
3
|
Atoms are the reactive substrate connecting actors to the outside world in XMachines. This page explains what they are, why XMachines uses them instead of observables or callbacks, and how the atom primitives map to distinct roles in the architecture.
|
|
4
4
|
|
|
@@ -214,7 +214,7 @@ decides how to emit it. A caller that does not write `using` needs neither, and
|
|
|
214
214
|
|
|
215
215
|
`@xstate/store` holds the active subscriber in a variable of its own module. Two copies in one application build two separate graphs: a computed atom of the first copy and a subscription of the second copy never meet, the subscriber stays silent, and no error reports the fault. Every propagation of state in this architecture goes through an atom, so the second copy stops the whole reactivity of an application.
|
|
216
216
|
|
|
217
|
-
[`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) therefore declares `@xstate/store` as a **peer** dependency. A renderer
|
|
217
|
+
[`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) therefore declares `@xstate/store` as a **peer** dependency. A renderer does not declare it, because it reads the atom through [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) and names the engine in no import. Install one copy, and install it yourself. `tests/singleton-peers.test.ts` holds the rule true inside this workspace.
|
|
218
218
|
|
|
219
219
|
---
|
|
220
220
|
|
|
@@ -268,8 +268,8 @@ Failing to clean up subscriptions causes memory leaks and stale callbacks firing
|
|
|
268
268
|
|
|
269
269
|
## See also
|
|
270
270
|
|
|
271
|
-
- [
|
|
272
|
-
- [
|
|
271
|
+
- [The Actor Model](actor-model.md) — why the actor owns all atom writes
|
|
272
|
+
- [State Machines](state-machines.md) — how state nodes produce the metadata that atoms derive
|
|
273
273
|
- [Getting Started](getting-started.md) — hands-on walkthrough using atoms to observe an actor
|
|
274
274
|
- [@xmachines/play-atom](../api/@xmachines/play-atom/README.md) — API reference
|
|
275
275
|
- [Play RFC](../rfc/play.md) — architectural specification
|
|
@@ -296,7 +296,7 @@ A renderer needs none of this: [`@xmachines/play-react`](../api/@xmachines/play-
|
|
|
296
296
|
and the other renderers observe `currentView` for you. Reach for `watchAtom` when you
|
|
297
297
|
write infrastructure, or a debug panel beside the UI.
|
|
298
298
|
|
|
299
|
-
[
|
|
299
|
+
[Atoms](atoms.md) states the whole model.
|
|
300
300
|
|
|
301
301
|
---
|
|
302
302
|
|
|
@@ -669,11 +669,6 @@ on: {
|
|
|
669
669
|
}
|
|
670
670
|
```
|
|
671
671
|
|
|
672
|
-
(Older releases threw `MissingQueryContextError` at construction for a
|
|
673
|
-
routing-aware context without a `query` field. That class is gone: the generated
|
|
674
|
-
`play.route` transitions assign `query` on every navigation, so the loss it
|
|
675
|
-
guarded against cannot happen.)
|
|
676
|
-
|
|
677
672
|
#### Missing `id` on routable states
|
|
678
673
|
|
|
679
674
|
**Error:** `MissingStateIdError: State "home" has meta.route "/" but no id`.
|
|
@@ -751,6 +746,7 @@ node --version
|
|
|
751
746
|
|
|
752
747
|
## Next Steps
|
|
753
748
|
|
|
749
|
+
- **[Views](views.md)** — Which state supplies the view, the `/context` projection, and when a renderer keeps the UI
|
|
754
750
|
- **[Inspecting a Running Actor](inspector.md)** — Attaching the Stately inspector to see the machine, its transitions, and its context live
|
|
755
751
|
- **[Architecture](../contributing/architecture.md)** — System design, layers, invariants, and data flow
|
|
756
752
|
- **[Play RFC](../rfc/play.md)** — Complete architectural specification
|
package/guides/inspector.md
CHANGED
|
@@ -192,6 +192,6 @@ const createPlayer = definePlayer({ machine: appMachine, options });
|
|
|
192
192
|
|
|
193
193
|
- **[`PlayerOptions`](../api/@xmachines/play-xstate/index/interfaces/PlayerOptions.md)** — the full options bag, `inspect` included
|
|
194
194
|
- **[`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md)** — the actor an inspector observes
|
|
195
|
-
- **[
|
|
195
|
+
- **[The Actor Model](actor-model.md)** — why the actor is the actor, and what that buys
|
|
196
196
|
- **[Getting Started](getting-started.md)** — installing packages and creating your first actor
|
|
197
197
|
- **[Stately inspect docs](https://stately.ai/docs/inspector)** — the inspector itself, its transports and options
|
package/guides/routing.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Routing in XMachines
|
|
2
2
|
|
|
3
3
|
A route of XMachines is a fact about a STATE, and not a fact about a component tree. A state node declares `meta.route`, and the library carries that declaration in both directions: a URL becomes a state, and a state becomes a URL.
|
|
4
4
|
|
|
5
|
-
This guide states the pattern language one time, and it names the three rules that every one of the nine router adapters follows.
|
|
5
|
+
This guide states the pattern language one time, it tells when a navigation re-enters a state, and it names the three rules that every one of the nine router adapters follows.
|
|
6
6
|
|
|
7
7
|
After you read it, you know which patterns a route can declare, which side resolves a location, and why a bridge comes in a `connect()` and `disconnect()` pair.
|
|
8
8
|
|
|
@@ -19,13 +19,13 @@ The first direction needs a matcher, and every router writes its own. Express us
|
|
|
19
19
|
|
|
20
20
|
`URLPattern` is the WHATWG standard for this, its syntax comes from `path-to-regexp`, and it is a superset of it. XMachines takes it as the pattern language, and it reads the whole of it.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
[`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) makes the same decision for reactivity: one primitive, isolated behind one module, present on every runtime. The [Atoms](atoms.md) guide describes it.
|
|
23
23
|
|
|
24
24
|
### The API is always present
|
|
25
25
|
|
|
26
|
-
[`@xmachines/play-
|
|
26
|
+
[`@xmachines/play-url`](../api/@xmachines/play-url/README.md) carries [`urlpattern-polyfill`](https://github.com/kenchris/urlpattern-polyfill) as an ordinary dependency. It uses the native `URLPattern` when the runtime has one, and the polyfill when it does not. **Install nothing, and load nothing.**
|
|
27
27
|
|
|
28
|
-
The native API arrived in Chrome 95, in Firefox 142 and in Safari 26. The browser floor of
|
|
28
|
+
The native API arrived in Chrome 95, in Firefox 142 and in Safari 26. The browser floor of XMachines is Chrome 110, Firefox 115 and Safari 16.4. Chrome carries the API at that floor, and Firefox and Safari carry it far above it, so a Firefox or a Safari at the floor runs the polyfill. The test suite of [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) measures the two implementations against each other, form by form. They agree on every form of the grammar, and they disagree about one shape that no bridge can produce — see the prefix rule below.
|
|
29
29
|
|
|
30
30
|
The cost is 18 kB, minified and with no dependency of its own, and a consumer whose runtime has the native API pays it too. A conditional load would save those bytes and it would make the module asynchronous: `RouteMap` compiles in its constructor, and a navigation matches inside an event handler. Neither can await.
|
|
31
31
|
|
|
@@ -116,12 +116,6 @@ The build resolves every escape, so the derived path carries the character and n
|
|
|
116
116
|
backslash that protects it. `/tags/c\+\+` derives `/tags/c++`, which is the path that the
|
|
117
117
|
route matches.
|
|
118
118
|
|
|
119
|
-
**An escaped `:` is the one escape that stops at the bridge.** The build derives
|
|
120
|
-
`/time/10:30` for `/time/10\:30`, and the route matches that path — but a bridge refuses
|
|
121
|
-
to push a path that holds a `:`, because a `:` in a CONCRETE path marks a param that
|
|
122
|
-
nothing substituted. `resolveNavigationPath` therefore answers `null`, and the address bar
|
|
123
|
-
follows that state never. Write `%3A` instead, as the section below prescribes.
|
|
124
|
-
|
|
125
119
|
### A literal that the grammar would read
|
|
126
120
|
|
|
127
121
|
`:`, `+`, `?`, `(` and `{` are characters of the grammar, so a route that writes one of them raw does not mean the literal. The two halves fail differently.
|
|
@@ -148,25 +142,7 @@ This rule is about the PATTERN that a state declares. A param VALUE needs no esc
|
|
|
148
142
|
|
|
149
143
|
`encodeURIComponent` leaves `*` as it stands, and that is the one exception. A bridge refuses a path that still holds a `:` or a `*`, because such a character marks a param that nothing substituted. A value of `a*b` therefore stops the push, and the URL stays where it is.
|
|
150
144
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
A route that carries a QUERY STRING is the same case, and it is the form a machine writes most often. `meta: { route: "/dates?trip=one-way" }` reached the exact-match map before, and the bridge pushed it to the address bar with its query. The grammar reads that `?` as a modifier that follows no part, so `RouteMap` throws `InvalidRoutePatternError` in its constructor now and the application starts never. A route declares a PATHNAME: put the default in `context.query`, which the generated `play.route` transition assigns and `buildRouteUrl` writes to the URL.
|
|
154
|
-
|
|
155
|
-
### Upgrading from 3.x: the `reenter` default changed
|
|
156
|
-
|
|
157
|
-
An earlier release wrote `reenter: true` on every transition that `formatPlayRouteTransitions` generated, so every routed state re-entered its own domain on each navigation and ran its `entry` actions again. The flag now comes from `meta.route`, and the default is `false`, which is the default of XState.
|
|
158
|
-
|
|
159
|
-
**Nothing throws, and the `entry` action simply stops running.** A state that needs it declares the flag for itself:
|
|
160
|
-
|
|
161
|
-
```ts
|
|
162
|
-
states: {
|
|
163
|
-
dashboard: { meta: { route: { path: "/dashboard", reenter: true } } },
|
|
164
|
-
},
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
`reenter` spares the DOMAIN of the transition and not every ancestor that stays active. Under the default `handler: "root"` the domain is the root of the machine, so `false` spares the root alone and each ancestor between the root and the target still runs its `exit` and `entry` actions. `handler: "local"` and `handler: "both"` move the domain down to the parent, which is the field that spares those intermediate ancestors.
|
|
168
|
-
|
|
169
|
-
CAUTION: `"local"` also SCOPES the route. The generated transition then sits on the parent alone, so a `play.route` event that arrives while the parent is inactive matches nothing and the actor does not move — a deep link or a press on BACK therefore leaves the URL and the actor divergent. Choose `"local"` where that scope is the intent, such as a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere.
|
|
145
|
+
A route that carries a QUERY STRING is the same case as a raw `?`, and it is the form a machine writes most often. The grammar reads the `?` of `meta: { route: "/dates?trip=one-way" }` as a modifier that follows no part, so `RouteMap` throws `InvalidRoutePatternError` in its constructor and the application starts never. A route declares a PATHNAME: put the default in `context.query`, which the generated `play.route` transition assigns and `buildRouteUrl` writes to the URL.
|
|
170
146
|
|
|
171
147
|
### The prefix rule
|
|
172
148
|
|
|
@@ -196,6 +172,28 @@ The cost is that you cannot write URLPattern's own reading of `:cat-id`. Use `:c
|
|
|
196
172
|
|
|
197
173
|
---
|
|
198
174
|
|
|
175
|
+
## Re-entry on a navigation
|
|
176
|
+
|
|
177
|
+
`formatPlayRouteTransitions` reads the `reenter` flag of each transition from `meta.route`. The default is `false`, which is the default of XState.
|
|
178
|
+
|
|
179
|
+
The flag decides one thing: whether the DOMAIN of the transition runs its `exit` and `entry` actions again. Under the default `handler: "root"` the domain is the root of the machine. `"local"` and `"both"` put a transition on the parent, and while the parent is active that transition answers the event, so the domain is the parent.
|
|
180
|
+
|
|
181
|
+
Each state below the domain on the path to the target runs its `exit` and `entry` actions on each navigation, whatever the flag says. The target itself is one of them, unless the route targets the root of the machine: the root is then the domain, and the flag decides. Under `"root"`, `false` therefore spares the root alone, and each ancestor between the root and the target runs its actions again. `handler` is the field that spares those intermediate ancestors.
|
|
182
|
+
|
|
183
|
+
CAUTION: a parallel state loses the position of its other regions when it is the domain or a state below the domain. XState exits each active state below the domain, and not only the states on the path to the target. Each other region therefore enters its `initial` state again. A parallel root under `handler: "root"` is such a domain. With `reenter: true`, a `"local"` or `"both"` transition also exits the parent. Where the parent is a region of a parallel state, the other regions of that state enter their `initial` state again too.
|
|
184
|
+
|
|
185
|
+
A state whose navigation must re-enter the domain too declares the flag for itself. Here the root runs its `exit` and `entry` actions on each navigation to `dashboard`:
|
|
186
|
+
|
|
187
|
+
```ts
|
|
188
|
+
states: {
|
|
189
|
+
dashboard: { meta: { route: { path: "/dashboard", reenter: true } } },
|
|
190
|
+
},
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
CAUTION: `"local"` also SCOPES the route. The generated transition then sits on the parent alone, so a `play.route` event that arrives while the parent is inactive matches nothing and the actor does not move — a deep link or a press on BACK therefore leaves the URL and the actor divergent. Choose `"local"` where that scope is the intent, such as a step that a person reaches only inside its wizard. Choose `"both"` where the state must stay reachable from everywhere.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
199
197
|
## The routing invariants
|
|
200
198
|
|
|
201
199
|
### 1. XMachines resolves the state id. The router never does
|
|
@@ -234,31 +232,29 @@ A bridge installs an atom subscription on the actor and a subscription on the ro
|
|
|
234
232
|
|
|
235
233
|
---
|
|
236
234
|
|
|
237
|
-
## Why not a matcher
|
|
238
|
-
|
|
239
|
-
The 2.2.0 review asked whether a hand-written segment matcher could drop the `URLPattern` requirement. The answer is no, and the reason is not the size of the code.
|
|
235
|
+
## Why not a smaller matcher
|
|
240
236
|
|
|
241
|
-
A
|
|
237
|
+
A matcher that reads only a literal and `:name` covers most routes. It carries fewer features than the routers that XMachines supports, which is the problem that [the first section](#what-problem-urlpattern-solves) describes.
|
|
242
238
|
|
|
243
|
-
|
|
239
|
+
One engine also keeps the match and the params in agreement. With two matchers, a route could resolve while its params came back empty.
|
|
244
240
|
|
|
245
241
|
---
|
|
246
242
|
|
|
247
243
|
## Summary
|
|
248
244
|
|
|
249
|
-
| Question | Answer
|
|
250
|
-
| ----------------------------------------- |
|
|
251
|
-
| What is the pattern language? | The `URLPattern` pathname grammar, plus hyphenated param names
|
|
252
|
-
| Do I install a polyfill? | No. [`@xmachines/play-
|
|
253
|
-
| Which side turns a URL into a state? | XMachines, in every adapter
|
|
254
|
-
| Which side turns a state into a URL? | XMachines, with no URLPattern at all
|
|
255
|
-
| When does the framework parse the params? | Vue Router and SolidJS Router, when the parse covers every name
|
|
256
|
-
| Who releases the bridge? | You, through `disconnect()` in the teardown of your component
|
|
245
|
+
| Question | Answer |
|
|
246
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------- |
|
|
247
|
+
| What is the pattern language? | The `URLPattern` pathname grammar, plus hyphenated param names |
|
|
248
|
+
| Do I install a polyfill? | No. [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) carries one |
|
|
249
|
+
| Which side turns a URL into a state? | XMachines, in every adapter |
|
|
250
|
+
| Which side turns a state into a URL? | XMachines, with no URLPattern at all |
|
|
251
|
+
| When does the framework parse the params? | Vue Router and SolidJS Router, when the parse covers every name |
|
|
252
|
+
| Who releases the bridge? | You, through `disconnect()` in the teardown of your component |
|
|
257
253
|
|
|
258
254
|
## See also
|
|
259
255
|
|
|
260
|
-
- [
|
|
261
|
-
- [
|
|
256
|
+
- [State Machines](state-machines.md) — how `meta.route` reaches the route map
|
|
257
|
+
- [Atoms](atoms.md) — the same decision, made for reactivity
|
|
262
258
|
- [Multi-router integration](../examples/multi-router-integration.md) — the provider pattern and `basePath`, end to end
|
|
263
259
|
- [Routing patterns](../examples/routing-patterns.md) — worked route maps
|
|
264
260
|
- [@xmachines/play-router](../api/@xmachines/play-router/README.md) — API reference
|
package/guides/state-machines.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# State Machines in XMachines
|
|
2
2
|
|
|
3
3
|
XMachines uses XState v5 as its state machine engine. This page explains what finite state machines are, how XMachines extends them with routing and view metadata, and why this design eliminates an entire category of bugs common in traditional frontend architecture.
|
|
4
4
|
|
|
@@ -122,12 +122,76 @@ const appMachine = setup({/* ... */}).createMachine({
|
|
|
122
122
|
|
|
123
123
|
`meta.route` is a string path. When the machine enters a state, `actor.currentRoute` (a `ReadonlyAtom`) derives this path and emits it. The router bridge reads it and updates the URL.
|
|
124
124
|
|
|
125
|
-
`meta.view` is a [`
|
|
125
|
+
`meta.view` is a [`ViewMeta`](../api/@xmachines/play-view/index/interfaces/ViewMeta.md) — a `@xmachines/json-render-core` spec object describing what to render. The actor derives a [`PlaySpec`](../api/@xmachines/play-view/index/interfaces/PlaySpec.md) from it, and that derived spec is what a renderer receives. Use `typedSpec(...)` from [`@xmachines/play-view`](../api/@xmachines/play-view/README.md) to type-check the spec literal at the definition site (XState's `meta` is untyped). When the machine enters a state, `actor.currentView` is updated with the derived spec. The renderer reads it and projects it through framework components.
|
|
126
126
|
|
|
127
127
|
The machine's whole context is available to every view through the **`/context` projection**: the derived spec's `state` carries `context: <machine context>`. Specs read it with ordinary state expressions — `{ $state: "/context/username" }` in props, `visible` conditions, or `repeat.statePath`. The subtree is **read-only**: context changes only through machine events, and a `$bindState`/`setState` write under `/context` throws. URL data lives at its own paths (`/context/params/…`, `/context/query/…`, written into context by `formatPlayRouteTransitions`), so a URL param can never shadow a machine-owned field. When validating specs with tools like `validateSpec`, validate the **derived** view (`actor.currentView.get()`) — its `state` honestly describes the store contents — not the raw `meta.view`. A context change re-emits the view with the same `viewKey`; providers respond by refreshing `/context` in the live store, not by remounting the UI.
|
|
128
128
|
|
|
129
129
|
**The machine is the single source of truth for both routing and views.** There is no separate route configuration file. There is no switch statement in a component deciding what to render based on the URL. The state machine encodes all of that.
|
|
130
130
|
|
|
131
|
+
### A layout and its pages: `outlets`
|
|
132
|
+
|
|
133
|
+
Without outlets, the deepest active state that declares a view wins, and a view on a parent state stays off the screen. Declare `outlets` in the view of the parent to show the parent view AND the view of its active child. Each outlet names an element of the parent view, and the view of the child goes into that element:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
const shell = typedSpec({
|
|
137
|
+
root: "shell",
|
|
138
|
+
state: { collapsed: false },
|
|
139
|
+
elements: {
|
|
140
|
+
shell: { type: "Shell", props: {}, children: ["title"], slots: { sidebar: [] } },
|
|
141
|
+
title: { type: "Heading", props: { text: "App" }, children: [] },
|
|
142
|
+
},
|
|
143
|
+
outlets: {
|
|
144
|
+
menu: { element: "shell", slot: "sidebar" }, // the region "menu"
|
|
145
|
+
"*": { element: "shell" }, // every other child
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
const appMachine = setup({/* ... */}).createMachine({
|
|
150
|
+
id: "app",
|
|
151
|
+
type: "parallel",
|
|
152
|
+
meta: { view: shell },
|
|
153
|
+
states: {
|
|
154
|
+
menu: { initial: "open", states: { open: { meta: { view: menuView } } } },
|
|
155
|
+
page: {
|
|
156
|
+
initial: "home",
|
|
157
|
+
states: {
|
|
158
|
+
home: { meta: { route: "/", view: homeView } },
|
|
159
|
+
search: { meta: { route: "/search", view: searchView } },
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- **The key of an outlet** is the key of a child state in `states`, or `"*"` for each active child that has no outlet of its own. A child with neither stays off the screen.
|
|
167
|
+
- **A compound state** fills one outlet with its active child. **A parallel state** fills one outlet for each region, in the order of `states`.
|
|
168
|
+
- **`slot`** names a named slot of the element. Omit it to append the child view to the `children` of the element. The component of the element renders the slot, as the renderer of your framework describes.
|
|
169
|
+
- **The view of a child** is the deepest view in its active subtree, and a child view can declare `outlets` of its own for a nested layout. A parallel state without outlets shows the region of the URL when that region has a view, and its first region that has a view otherwise.
|
|
170
|
+
|
|
171
|
+
The derived spec holds the elements of every composed view. The keys of the outer view stay as you wrote them, and each key of a child view gets the id of its state as a prefix, for example `app.page.search/root`, so two views never collide.
|
|
172
|
+
|
|
173
|
+
The `viewKey` of a composed view is the id of the outermost state that declares `outlets`. A change of the page therefore keeps the store of the layout: the `collapsed` value in the example above does not change. The first time that a page shows, the provider writes the keys of its authored `state` that the store does not hold. A page that comes back finds the values that it left. All the pages of one layout share one store, so two pages that declare the same key share one value: give each page its own keys. When two composed views declare the same state key, the outer view wins, and the library writes a warning.
|
|
174
|
+
|
|
175
|
+
An outlet that names an element that its view does not hold throws `InvalidViewOutletError`. The actor reports it through its `onError` option, and it keeps the last good view.
|
|
176
|
+
|
|
177
|
+
**`handler` decides whether the layout survives a navigation.** Under the default `handler: "root"`, a navigation exits and enters every active state below the root, and a parallel state then puts its other regions back in their `initial` state. Declare `handler: "local"` or `"both"` on a routed state inside a region, as [Re-entry on a navigation](routing.md#re-entry-on-a-navigation) describes.
|
|
178
|
+
|
|
179
|
+
**The URL comes from the routed region.** In a parallel machine, the URL comes from the first region whose active states declare a `meta.route`, so the `menu` region can come before the `page` region. Keep the routes of one layout in one region. The URL shows the route of the first routed region only, so a navigation to a route of a second routed region never shows in the address bar.
|
|
180
|
+
|
|
181
|
+
CAUTION: a second routed region moves without its URL. Take a `page` region with `/` and `/search`, and a `drawer` region after it with `/drawer` and `/drawer/settings`:
|
|
182
|
+
|
|
183
|
+
| Step | `page` | `drawer` | URL |
|
|
184
|
+
| --------------------------- | -------- | ---------- | --------- |
|
|
185
|
+
| start | `home` | `closed` | `/` |
|
|
186
|
+
| a navigation to `#settings` | `home` | `settings` | `/` |
|
|
187
|
+
| a navigation to `#search` | `search` | `closed` | `/search` |
|
|
188
|
+
|
|
189
|
+
- The navigation to `#settings` moves the drawer, and the URL stays `/`. The browser adds no history entry, BACK does not close the drawer, and a reload or a shared link loses the drawer.
|
|
190
|
+
- A deep link to `/drawer/settings` moves the drawer too, but the actor derives the URL `/` from the `page` region, so the address bar does not keep the path of the drawer.
|
|
191
|
+
- The navigation to `#search` puts the drawer back to `closed`, because the default `handler: "root"` exits and enters every region. `handler: "local"` keeps it.
|
|
192
|
+
|
|
193
|
+
A URL path has one hierarchy, and it cannot hold the branches of two regions. Keep the other regions unrouted. When the position of such a region must survive a reload or a shared link, write it as a query value of the routed region, for example `/search?drawer=settings`. The generated `play.route` transition assigns the query to `context.query`, the URL carries `context.query`, and your machine moves the region to match the value.
|
|
194
|
+
|
|
131
195
|
---
|
|
132
196
|
|
|
133
197
|
## [`formatPlayRouteTransitions`](../api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md) — automatic route event wiring
|
|
@@ -276,9 +340,10 @@ actor.start();
|
|
|
276
340
|
|
|
277
341
|
## See also
|
|
278
342
|
|
|
279
|
-
- [
|
|
280
|
-
- [
|
|
343
|
+
- [The Actor Model](actor-model.md) — how the machine definition becomes a live actor
|
|
344
|
+
- [Atoms](atoms.md) — how the actor's state is observed by infrastructure
|
|
281
345
|
- [Getting Started](getting-started.md) — step-by-step walkthrough building your first machine and actor
|
|
346
|
+
- [Views](views.md) — which state supplies the view, how a layout holds its pages, and when a renderer keeps the UI
|
|
282
347
|
- [Routing Patterns](../examples/routing-patterns.md) — worked examples of `meta.route` and guards
|
|
283
348
|
- [@xmachines/play-xstate](../api/@xmachines/play-xstate/README.md) — full API reference for [`definePlayer`](../api/@xmachines/play-xstate/index/functions/definePlayer.md), [`PlayerActor`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md), and the routing utilities
|
|
284
349
|
- [XState v5 documentation](https://stately.ai/docs/xstate) — upstream state machine library documentation
|