@xmachines/docs 6.1.0 → 8.0.0-next.1
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 +5 -5
- package/api/@xmachines/core/README.md +7 -2
- 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 +11 -11
- package/api/@xmachines/core/errors/classes/DisposeConflictError.md +11 -11
- 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 +10 -5
- package/api/@xmachines/play/errors/classes/NonNullableError.md +11 -11
- package/api/@xmachines/play/errors/classes/PlayError.md +12 -11
- package/api/@xmachines/play/index/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/index/type-aliases/PlayEvent.md +4 -4
- package/api/@xmachines/play-actor/README.md +11 -3
- package/api/@xmachines/play-actor/interfaces/ActorEvent.md +4 -4
- package/api/@xmachines/play-actor/interfaces/PlayActor.md +6 -6
- package/api/@xmachines/play-atom/README.md +21 -7
- package/api/@xmachines/play-atom/functions/watchAtom.md +1 -1
- 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 +136 -50
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +12 -12
- package/api/@xmachines/play-dom/functions/createPlayUI.md +5 -5
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +3 -2
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -9
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +15 -14
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +26 -20
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -5
- package/api/@xmachines/play-dom/interfaces/PassOptions.md +14 -0
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +18 -17
- package/api/@xmachines/play-dom/interfaces/RenderErrorInfo.md +16 -0
- package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +17 -15
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +9 -8
- package/api/@xmachines/play-dom/interfaces/ValidationRegistry.md +14 -11
- package/api/@xmachines/play-dom/type-aliases/ConfirmHandler.md +9 -10
- package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +4 -3
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/OnRenderError.md +27 -0
- package/api/@xmachines/play-dom/type-aliases/RenderErrorKind.md +21 -0
- package/api/@xmachines/play-dom-router/README.md +44 -6
- 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 +5 -5
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
- 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 +9 -9
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +6 -6
- 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 +5 -5
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +8 -8
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
- 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 +6 -6
- package/api/@xmachines/play-pattern/interfaces/KeyValueCache.md +3 -3
- 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 +58 -19
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +6 -6
- package/api/@xmachines/play-react/functions/defineRegistry.md +1 -1
- 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/ActionProviderProps.md +5 -5
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
- package/api/@xmachines/play-react/interfaces/DefineRegistryResult.md +15 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -6
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-react/interfaces/RenderErrorInfo.md +16 -0
- package/api/@xmachines/play-react/interfaces/RendererProps.md +7 -7
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +7 -7
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/OnRenderError.md +27 -0
- package/api/@xmachines/play-react/type-aliases/RenderErrorKind.md +21 -0
- package/api/@xmachines/play-react/variables/ActorProvider.md +14 -4
- 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 +26 -5
- 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 +9 -9
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-react-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +5 -5
- 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 +87 -29
- package/api/@xmachines/play-router/errors/classes/DuplicateBridgeError.md +11 -11
- package/api/@xmachines/play-router/errors/classes/DuplicateRoutePathError.md +12 -12
- package/api/@xmachines/play-router/errors/classes/EmptyRoutePathError.md +12 -12
- package/api/@xmachines/play-router/errors/classes/InvalidBasePathError.md +12 -12
- package/api/@xmachines/play-router/errors/classes/InvalidRoutePatternError.md +12 -12
- package/api/@xmachines/play-router/errors/classes/InvalidStateIdError.md +12 -12
- package/api/@xmachines/play-router/errors/classes/MissingBasePathParamError.md +13 -13
- package/api/@xmachines/play-router/errors/classes/RouterSyncError.md +11 -11
- package/api/@xmachines/play-router/errors/classes/UnknownStateTypeError.md +13 -13
- 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 +5 -5
- 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 +5 -5
- package/api/@xmachines/play-router/index/interfaces/BuildPlayRouteEventOptions.md +6 -6
- 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 +3 -3
- package/api/@xmachines/play-router/index/interfaces/LocationLike.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/MountableRouterBridge.md +8 -8
- 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 +14 -14
- package/api/@xmachines/play-router/index/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-router/index/interfaces/PlayRouterProviderBaseProps.md +11 -11
- package/api/@xmachines/play-router/index/interfaces/ResolvedBasePath.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/ResolvedRoutePath.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/Routable.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/RouteInfo.md +10 -10
- package/api/@xmachines/play-router/index/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-router/index/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteMatch.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteNode.md +12 -12
- package/api/@xmachines/play-router/index/interfaces/RouteObject.md +7 -7
- package/api/@xmachines/play-router/index/interfaces/RouteTree.md +7 -7
- 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 +8 -8
- package/api/@xmachines/play-router/index/interfaces/RouterConnection.md +8 -8
- package/api/@xmachines/play-router/index/interfaces/SplitLocation.md +7 -7
- 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/README.md +5 -2
- package/api/@xmachines/play-router/xstate/functions/createRouteMap.md +2 -2
- package/api/@xmachines/play-router/xstate/functions/extractMachineRoutes.md +5 -5
- 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 +7 -8
- package/api/@xmachines/play-router/xstate/functions/isRouteReachable.md +8 -9
- 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/Graph.md +26 -0
- package/api/@xmachines/play-router/xstate/interfaces/GraphEdge.md +22 -0
- package/api/@xmachines/play-router/xstate/interfaces/GraphNode.md +21 -0
- package/api/@xmachines/play-router/xstate/interfaces/MachineEdgeData.md +6 -6
- package/api/@xmachines/play-router/xstate/interfaces/MachineNodeData.md +7 -7
- package/api/@xmachines/play-router/xstate/type-aliases/MachineGraph.md +4 -6
- package/api/@xmachines/play-solid/README.md +35 -11
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useBoundProp.md +8 -5
- package/api/@xmachines/play-solid/functions/useFieldValidation.md +6 -4
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateBinding.md +5 -3
- package/api/@xmachines/play-solid/functions/useStateValue.md +5 -3
- 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/RenderErrorInfo.md +16 -0
- package/api/@xmachines/play-solid/interfaces/RendererProps.md +7 -7
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +7 -7
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/OnRenderError.md +27 -0
- package/api/@xmachines/play-solid/type-aliases/RenderErrorKind.md +21 -0
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +17 -3
- 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 +24 -10
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- 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 +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-solid-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +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 +19 -11
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +3 -4
- 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 +12 -12
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryResult.md +15 -0
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-svelte/interfaces/RenderErrorInfo.md +16 -0
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +7 -7
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/OnRenderError.md +27 -0
- package/api/@xmachines/play-svelte/type-aliases/RenderErrorKind.md +21 -0
- package/api/@xmachines/play-svelte-spa-router/README.md +14 -7
- 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 +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +10 -10
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-svelte-spa-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +8 -8
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/README.md +67 -14
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +29 -19
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +13 -16
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +9 -9
- package/api/@xmachines/play-sveltekit-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +8 -8
- package/api/@xmachines/play-sveltekit-router/interfaces/SvelteKitRouterBridgeOptions.md +25 -0
- package/api/@xmachines/play-sveltekit-router/type-aliases/ShallowNavigation.md +21 -0
- package/api/@xmachines/play-tanstack-react-router/README.md +36 -17
- 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 +9 -9
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +5 -5
- 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 +7 -4
- 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 +50 -17
- 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 +9 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +5 -5
- 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 +12 -12
- package/api/@xmachines/play-url/errors/classes/InvalidRoutePatternError.md +12 -12
- package/api/@xmachines/play-url/errors/classes/MissingBasePathParamError.md +13 -13
- 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 +5 -5
- 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 +6 -6
- package/api/@xmachines/play-url/index/interfaces/KeyValueCache.md +3 -3
- package/api/@xmachines/play-url/index/interfaces/LiteralPart.md +5 -5
- package/api/@xmachines/play-url/index/interfaces/ParamPart.md +9 -9
- package/api/@xmachines/play-url/index/interfaces/ParseOptions.md +4 -4
- package/api/@xmachines/play-url/index/interfaces/ParsedPattern.md +14 -14
- package/api/@xmachines/play-url/index/interfaces/PatternParam.md +6 -6
- package/api/@xmachines/play-url/index/interfaces/ResolvedBasePath.md +5 -5
- package/api/@xmachines/play-url/index/interfaces/SplitLocation.md +7 -7
- 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 +45 -19
- package/api/@xmachines/play-view/errors/README.md +1 -0
- package/api/@xmachines/play-view/errors/classes/InvalidViewOutletError.md +13 -13
- package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +12 -12
- package/api/@xmachines/play-view/errors/classes/ViewElementKeyCollisionError.md +181 -0
- package/api/@xmachines/play-view/index/README.md +10 -4
- package/api/@xmachines/play-view/index/functions/attachRenderErrorHandler.md +10 -9
- package/api/@xmachines/play-view/index/functions/bindStoreHandlers.md +34 -0
- package/api/@xmachines/play-view/index/functions/composePlayState.md +1 -1
- package/api/@xmachines/play-view/index/functions/composeViews.md +8 -2
- package/api/@xmachines/play-view/index/functions/createActorProxy.md +39 -0
- package/api/@xmachines/play-view/index/functions/createRenderErrorBinding.md +35 -0
- package/api/@xmachines/play-view/index/functions/createReportGuard.md +1 -1
- package/api/@xmachines/play-view/index/functions/createViewSession.md +29 -0
- package/api/@xmachines/play-view/index/functions/createViewStoreLifecycle.md +1 -1
- package/api/@xmachines/play-view/index/functions/forwardRenderError.md +45 -0
- 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/toAtomState.md +1 -1
- package/api/@xmachines/play-view/index/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-view/index/interfaces/BaseActorProviderProps.md +8 -8
- package/api/@xmachines/play-view/index/interfaces/BaseViewContextValue.md +7 -7
- package/api/@xmachines/play-view/index/interfaces/ComposedView.md +7 -7
- package/api/@xmachines/play-view/index/interfaces/HandlerFactory.md +19 -0
- package/api/@xmachines/play-view/index/interfaces/PlaySpec.md +8 -8
- 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 +4 -4
- package/api/@xmachines/play-view/index/interfaces/ViewMeta.md +7 -7
- package/api/@xmachines/play-view/index/interfaces/ViewOutlet.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ViewSession.md +155 -0
- package/api/@xmachines/play-view/index/interfaces/ViewSessionOptions.md +12 -0
- package/api/@xmachines/play-view/index/interfaces/ViewSessionSnapshot.md +23 -0
- package/api/@xmachines/play-view/index/interfaces/ViewStoreLifecycle.md +22 -3
- package/api/@xmachines/play-view/index/interfaces/ViewStoreResolution.md +7 -6
- package/api/@xmachines/play-view/index/interfaces/ViewTree.md +6 -6
- package/api/@xmachines/play-view/index/interfaces/ViewTreeChild.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/Viewable.md +4 -4
- package/api/@xmachines/play-view/index/type-aliases/StateUpdater.md +21 -0
- 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 +20 -15
- 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/useBoundProp.md +10 -4
- package/api/@xmachines/play-vue/functions/useFieldValidation.md +12 -5
- 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/RenderErrorInfo.md +16 -0
- package/api/@xmachines/play-vue/interfaces/RendererProps.md +7 -7
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +7 -7
- 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 +4 -4
- package/api/@xmachines/play-vue/type-aliases/OnRenderError.md +27 -0
- package/api/@xmachines/play-vue/type-aliases/RenderErrorKind.md +21 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/Renderer.md +3 -3
- package/api/@xmachines/play-vue-router/README.md +18 -11
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterNavigationError.md +11 -11
- package/api/@xmachines/play-vue-router/errors/classes/VueRouterSendError.md +11 -11
- 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 +9 -9
- package/api/@xmachines/play-vue-router/index/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-vue-router/index/interfaces/RouteMapOptions.md +6 -6
- package/api/@xmachines/play-vue-router/index/interfaces/RouteMapping.md +5 -5
- 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 +120 -57
- package/api/@xmachines/play-xstate/errors/classes/ActorThrewNonErrorError.md +11 -11
- package/api/@xmachines/play-xstate/errors/classes/InvalidEventError.md +12 -12
- package/api/@xmachines/play-xstate/errors/classes/InvalidMachineError.md +11 -11
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteHandlerError.md +12 -12
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteMetadataError.md +12 -12
- package/api/@xmachines/play-xstate/errors/classes/InvalidRouteParamError.md +14 -14
- package/api/@xmachines/play-xstate/errors/classes/MissingRouteParamError.md +13 -13
- package/api/@xmachines/play-xstate/errors/classes/MissingStateIdError.md +15 -15
- package/api/@xmachines/play-xstate/index/README.md +1 -1
- package/api/@xmachines/play-xstate/index/classes/PlayerActor.md +201 -124
- package/api/@xmachines/play-xstate/index/functions/compose.md +4 -4
- package/api/@xmachines/play-xstate/index/functions/definePlayer.md +14 -10
- package/api/@xmachines/play-xstate/index/interfaces/PlayerConfig.md +6 -6
- package/api/@xmachines/play-xstate/index/interfaces/PlayerFactoryResumeOptions.md +4 -4
- package/api/@xmachines/play-xstate/index/interfaces/PlayerOptions.md +9 -9
- 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 +13 -5
- package/api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md +26 -13
- 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 +8 -8
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteObject.md +7 -7
- 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 -0
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutput.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmBuildOutputFile.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 +4 -4
- package/api/@xmachines/shared/vite-aliases/functions/xmTestTarget.md +1 -1
- package/api/@xmachines/shared/vite-aliases/type-aliases/XmTestTarget.md +1 -1
- 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 +6 -6
- package/contributing/architecture.md +100 -61
- package/contributing/configuration.md +44 -62
- package/contributing/deployment.md +131 -161
- package/contributing/development.md +34 -9
- package/contributing/migrating-to-play-atom.md +23 -5
- package/contributing/testing.md +64 -33
- package/examples/@xmachines/play-dom-demo/README.md +2 -2
- package/examples/@xmachines/play-dom-demo/functions/createAuthActionHandlers.md +11 -11
- 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 +4 -3
- package/examples/@xmachines/play-react-demo/README.md +2 -2
- package/examples/@xmachines/play-react-demo/functions/createAuthActionHandlers.md +11 -11
- 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 +17 -17
- package/examples/@xmachines/play-react-router-demo/README.md +4 -3
- package/examples/@xmachines/play-solid-demo/README.md +3 -3
- package/examples/@xmachines/play-solid-demo/functions/createAuthActionHandlers.md +11 -11
- 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 +9 -3
- package/examples/@xmachines/play-svelte-demo/README.md +1 -1
- package/examples/@xmachines/play-svelte-demo/functions/createAuthActionHandlers.md +11 -11
- 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 +17 -17
- 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 +3 -2
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +9 -8
- package/examples/@xmachines/play-vue-demo/README.md +2 -2
- package/examples/@xmachines/play-vue-demo/functions/createAuthActionHandlers.md +11 -11
- 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/@xmachines/play-vue-router-demo/README.md +3 -3
- package/examples/README.md +1 -1
- package/examples/basic-state-machine.md +19 -23
- package/examples/form-validation.md +60 -61
- package/examples/multi-router-integration.md +268 -147
- package/examples/routing-patterns.md +73 -43
- package/examples/traffic-light.md +24 -22
- package/guides/actor-model.md +38 -21
- package/guides/atoms.md +48 -8
- package/guides/getting-started.md +106 -62
- package/guides/inspector.md +103 -37
- package/guides/routing.md +7 -2
- package/guides/state-machines.md +106 -68
- package/guides/views.md +40 -18
- package/package.json +6 -6
- package/rfc/git.md +13 -5
- package/rfc/play.md +53 -31
- package/rfc/run.md +7 -4
- package/api/@xmachines/play-view/index/functions/createFailureLatch.md +0 -20
- package/api/@xmachines/play-view/index/functions/sameViewInputs.md +0 -25
- package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +0 -60
- package/api/@xmachines/play-view/index/interfaces/ViewInputs.md +0 -19
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmBuildOutput(importMetaUrl): Plugin;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:388](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:388](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L388)
|
|
10
10
|
|
|
11
11
|
The Vite plugin of the dist run: it moves each `src/` file of a published package to its
|
|
12
12
|
counterpart in `dist/`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmBuildOutputFile(packageDir, sourceFile): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L359)
|
|
10
10
|
|
|
11
11
|
The file in `dist/` that the build writes for one source file of a package.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmCacheDir(importMetaUrl, name): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:495](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:495](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L495)
|
|
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:448](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:448](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L448)
|
|
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:333](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:333](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L333)
|
|
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:474](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:474](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L474)
|
|
10
10
|
|
|
11
11
|
Svelte plugin options that enforce runes mode for workspace sources only.
|
|
12
12
|
|
|
@@ -33,6 +33,6 @@ one and change the other.
|
|
|
33
33
|
|
|
34
34
|
`object`
|
|
35
35
|
|
|
36
|
-
| Name | Type | Defined in
|
|
37
|
-
| ------------------------- | ------------------------------------------------------- |
|
|
38
|
-
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:475](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
36
|
+
| Name | Type | Defined in |
|
|
37
|
+
| ------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:475](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L475) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmTestTarget(env?): XmTestTarget;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L25)
|
|
10
10
|
|
|
11
11
|
Reads the test target from the `XM_TEST_TARGET` environment variable.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type XmTestTarget = "source" | "dist";
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vite-aliases.ts#L13)
|
|
10
10
|
|
|
11
11
|
The code that a test run loads for each published `@xmachines/*` package.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmBrowserConfig(importMetaUrl, overrides, options?): UserConfig;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vitest.ts:224](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:224](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L224)
|
|
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:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L76)
|
|
10
10
|
|
|
11
11
|
Create a Vitest config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: XmBrowserConfigOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [vitest.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [vitest.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L174)
|
|
6
6
|
|
|
7
7
|
Options for [defineXmBrowserConfig](../functions/defineXmBrowserConfig.md) that live outside the plain
|
|
8
8
|
Vitest config overrides.
|
|
9
9
|
|
|
10
10
|
## Properties
|
|
11
11
|
|
|
12
|
-
| Property | Type | Description | Defined in
|
|
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:182](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:189](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:195](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
12
|
+
| Property | Type | Description | Defined in |
|
|
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:182](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L182) |
|
|
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:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L189) |
|
|
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:195](https://gitlab.com/xmachin-es/xmachines-js/-/blob/docs-v8.0.0-next.1/packages/shared/config/vitest.ts#L195) |
|
|
@@ -4,7 +4,7 @@ XMachines Play implements the **Universal Player Architecture** — a layered, a
|
|
|
4
4
|
|
|
5
5
|
## System Overview
|
|
6
6
|
|
|
7
|
-
XMachines JS is the JavaScript/TypeScript reference implementation of the **Universal Player Architecture** ([Play RFC](../rfc/play.md)). It is a monorepo of modular packages that strictly separates **business logic (the Actor)** from **infrastructure (router adapters and view renderers)**. An XState
|
|
7
|
+
XMachines JS is the JavaScript/TypeScript reference implementation of the **Universal Player Architecture** ([Play RFC](../rfc/play.md)). It is a monorepo of modular packages that strictly separates **business logic (the Actor)** from **infrastructure (router adapters and view renderers)**. An XState v6 state machine is the single source of truth; it owns all state, guards, and route validity. Infrastructure is passive: it observes atoms emitted by the Actor and proposes state changes via typed events. The Actor's guards make every navigation and transition decision. Communication across the boundary is exclusively through atoms — never subscriptions, callbacks, or direct state mutation. Five architectural invariants (documented in the [Play RFC](../rfc/play.md)) enforce this contract across the entire package graph.
|
|
8
8
|
|
|
9
9
|
## Architectural Invariants
|
|
10
10
|
|
|
@@ -35,7 +35,7 @@ graph TD
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
subgraph ViewHalf["The View Half"]
|
|
38
|
-
view["@xmachines/play-view\n(Viewable, PlaySpec, the view
|
|
38
|
+
view["@xmachines/play-view\n(Viewable, PlaySpec, the view session)"]
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
subgraph Concrete["Concrete Implementations"]
|
|
@@ -86,7 +86,7 @@ The diagram groups the packages by role. The build order is a separate view: eac
|
|
|
86
86
|
| [`@xmachines/play-atom`](../api/@xmachines/play-atom/README.md) | The atom primitives, isolated in one package | `packages/play-atom/src/index.ts` |
|
|
87
87
|
| [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md) | `PlayActor`, and nothing else | `packages/play-actor/src/play-actor.ts` |
|
|
88
88
|
| [`@xmachines/play-view`](../api/@xmachines/play-view/README.md) | `Viewable`, `PlaySpec`, the shared view half | `packages/play-view/src/view-types.ts` |
|
|
89
|
-
| [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) | XState
|
|
89
|
+
| [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) | XState v6 adapter: `definePlayer`, `PlayerActor` | `packages/play-xstate/src/player-actor.ts` |
|
|
90
90
|
| [`@xmachines/play-pattern`](../api/@xmachines/play-pattern/README.md) | The route pattern language: one parse, and `buildPath` | `packages/play-pattern/src/pattern-grammar.ts` |
|
|
91
91
|
| [`@xmachines/play-url`](../api/@xmachines/play-url/README.md) | The URLPattern API, a base path, framework params | `packages/play-url/src/url-pattern-utils.ts` |
|
|
92
92
|
| [`@xmachines/play-router`](../api/@xmachines/play-router/README.md) | `RouteMap`, `RouterBridgeBase`, the provider lifecycle | `packages/play-router/src/router-bridge-base.ts` |
|
|
@@ -175,13 +175,13 @@ flowchart TD
|
|
|
175
175
|
C["watchRouterChanges() subscribed"]
|
|
176
176
|
D["getInitialRouterPath() reads current browser URL"]
|
|
177
177
|
E["resolves sanitized URL path → stateId via routeMap"]
|
|
178
|
-
F{"Compare
|
|
178
|
+
F{"Compare the URL, path and query, vs actor.initialRoute"}
|
|
179
179
|
G["syncActorFromRouter()\nrouter wins — deep-link"]
|
|
180
180
|
H["navigateRouter()\nactor wins — restore"]
|
|
181
181
|
|
|
182
182
|
A --> B --> C --> D --> E --> F
|
|
183
|
-
F -->|"URL ≠
|
|
184
|
-
F -->|"URL =
|
|
183
|
+
F -->|"URL ≠ initial URL (path or query)"| G
|
|
184
|
+
F -->|"URL = initial URL"| H
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
### View derivation
|
|
@@ -189,24 +189,22 @@ flowchart TD
|
|
|
189
189
|
```mermaid
|
|
190
190
|
flowchart TD
|
|
191
191
|
A["XState snapshot"]
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
G["composeViews(tree) in play-view\ncached for each tree: elements, authored state, viewParts\nviewKey = the id of the outermost composing state"]
|
|
195
|
-
B["resolveViewMeta(active branch: the routed region first)\nfinds deepest meta.view with root + elements\n(its record key becomes viewKey)"]
|
|
192
|
+
T["resolveViewTree(root, snapshot.value)\na view with outlets composes the active children that an outlet shows;\nany other node takes its deepest view, the routed region first\nviewKey = the id of the state of the selected view"]
|
|
193
|
+
G["composeViews(tree) in play-view\nkept for each tree of each machine: elements, authored state, viewParts\nviewKey = the id of the outermost composing state"]
|
|
196
194
|
C["snapshot.context\nprojected wholesale as the /context slice"]
|
|
197
195
|
D["composePlayState(spec.state, slice)\nstate: { ...authored, context: slice }"]
|
|
198
|
-
E["reuseComposedState (
|
|
196
|
+
E["reuseComposedState (the emit gate of the currentView atom)\nthe previous spec when nothing changed,\nits state reference when the slice is value-unchanged"]
|
|
199
197
|
F["Derived PlaySpec (with viewKey) is the value of the currentView atom"]
|
|
200
198
|
|
|
201
|
-
A -->
|
|
202
|
-
|
|
203
|
-
T -->|"
|
|
204
|
-
T -->|"no active view composes:\nthe view that the walk resolved"| C
|
|
205
|
-
O -->|"no"| B --> C
|
|
199
|
+
A --> T
|
|
200
|
+
T -->|"the selected view composes"| G --> C
|
|
201
|
+
T -->|"a view without outlets"| C
|
|
206
202
|
C --> D --> E --> F
|
|
207
203
|
```
|
|
208
204
|
|
|
209
|
-
The composition keeps each element of the outer view by reference, except an element that receives a child view. It prefixes each key of a child view with the id of its state.
|
|
205
|
+
The composition keeps each element of the outer view by reference, except an element that receives a child view. It prefixes each key of a child view with the id of its state. play-xstate keeps one result of `composeViews` for each tree of views of each machine. A change of the context therefore emits the same `elements` and `viewParts` references, and the emit gate of `withView` compares the top-level fields alone. One walk derives every view: a machine without `outlets` is its simple case, in which the deepest view wins. When the `viewKey` stays and the `viewParts` value changes, `createViewStoreLifecycle` writes the authored keys that the store does not hold. play-dom then gives the new spec to `setSpec` of the incremental renderer, which keeps each node whose element did not change.
|
|
206
|
+
|
|
207
|
+
Each provider reads the view through `createViewSession` of play-view. The session resolves the store when the actor emits, when the host hands over a new actor or controlled store, and for a retry — never in a render. A provider binds the snapshot of the session to its framework: `useState` and a layout effect in play-react, a `shallowRef` in play-vue, a signal in play-solid, `$state.raw` in play-svelte, and a listener in play-dom. The subtree of the view is keyed on the `generation` of the store, and the error boundary resets on a new snapshot.
|
|
210
208
|
|
|
211
209
|
**State atoms on the actor:**
|
|
212
210
|
|
|
@@ -236,6 +234,8 @@ Base class for the typed runtime errors of every Play package. It extends [`Base
|
|
|
236
234
|
import { PlayError } from "@xmachines/play/errors";
|
|
237
235
|
import { RouterSyncError } from "@xmachines/play-router/errors";
|
|
238
236
|
|
|
237
|
+
declare const err: unknown;
|
|
238
|
+
|
|
239
239
|
if (err instanceof RouterSyncError) {
|
|
240
240
|
/* err.scope, err.code, err.cause */
|
|
241
241
|
}
|
|
@@ -259,11 +259,18 @@ Extends `@xmachines/json-render-core` `Spec`. `deriveCurrentView` projects the m
|
|
|
259
259
|
|
|
260
260
|
### [`PlayerActor<TMachine>`](../api/@xmachines/play-xstate/index/classes/PlayerActor.md)
|
|
261
261
|
|
|
262
|
-
Concrete XState
|
|
262
|
+
Concrete XState v6 actor. It extends XState's own `Actor` directly, and it implements [`PlayActor`](../api/@xmachines/play-actor/interfaces/PlayActor.md). It receives the machine in its constructor, so an instance IS the actor rather than a wrapper around one. Bridges its own subscription to atoms. Exposes: `state`, `send()`, `start()`, `stop()`, `can()`.
|
|
263
263
|
|
|
264
264
|
[`Routable`](../api/@xmachines/play-router/index/interfaces/Routable.md) and [`Viewable`](../api/@xmachines/play-view/index/interfaces/Viewable.md) are OPTIONAL capabilities, and the class implements neither. Each one is a mixin behind its own entry point — [`@xmachines/play-xstate/routing`](../api/@xmachines/play-xstate/README.md) and [`@xmachines/play-xstate/view`](../api/@xmachines/play-xstate/README.md) — and `compose` builds the class that an application needs:
|
|
265
265
|
|
|
266
266
|
```typescript
|
|
267
|
+
import type { AnyStateMachine } from "xstate";
|
|
268
|
+
import { compose, definePlayer, PlayerActor } from "@xmachines/play-xstate";
|
|
269
|
+
import { withRouting } from "@xmachines/play-xstate/routing";
|
|
270
|
+
import { withView } from "@xmachines/play-xstate/view";
|
|
271
|
+
|
|
272
|
+
declare const machine: AnyStateMachine;
|
|
273
|
+
|
|
267
274
|
definePlayer({ machine, actor: compose(PlayerActor, withRouting, withView) });
|
|
268
275
|
```
|
|
269
276
|
|
|
@@ -278,7 +285,11 @@ A capability that must run an EFFECT on a transition overrides `onSnapshot`, and
|
|
|
278
285
|
Factory creator. Each call constructs one `PlayerActor`, which is itself the XState actor and derives its own `initialRoute` from its pre-start snapshot. Restoring a snapshot is the exception: the default initial route can only come from XState's pure `initialTransition` helper, whose inert actor scope constructs a throwaway actor and evaluates the initial transition twice. Returns `(input?, restore?) => PlayerActor<TMachine>`.
|
|
279
286
|
|
|
280
287
|
```typescript
|
|
281
|
-
import {
|
|
288
|
+
import type { AnyStateMachine } from "xstate";
|
|
289
|
+
import { definePlayer, type PlayerOptions } from "@xmachines/play-xstate";
|
|
290
|
+
|
|
291
|
+
declare const machine: AnyStateMachine;
|
|
292
|
+
declare const options: PlayerOptions<AnyStateMachine>;
|
|
282
293
|
|
|
283
294
|
const createPlayer = definePlayer({ machine, options });
|
|
284
295
|
const actor = createPlayer(); // or createPlayer(input) or createPlayer(undefined, { snapshot })
|
|
@@ -290,6 +301,8 @@ actor.start();
|
|
|
290
301
|
Abstract base class capturing all common router bridge logic. Template Method pattern — subclasses implement exactly three abstract methods: `navigateRouter(path)`, `watchRouterChanges()`, `unwatchRouterChanges()`. Manages `isConnected`, `lastSyncedPath` (echo suppression), `isProcessingNavigation` (re-entrant guard redirect prevention), and `routeWatcher` lifecycle. Enforces one-bridge-per-actor via a module-level `WeakMap`.
|
|
291
302
|
|
|
292
303
|
```typescript
|
|
304
|
+
import { RouterBridgeBase } from "@xmachines/play-router";
|
|
305
|
+
|
|
293
306
|
class MyRouterBridge extends RouterBridgeBase {
|
|
294
307
|
protected navigateRouter(path: string): void {
|
|
295
308
|
/* push URL */
|
|
@@ -327,7 +340,7 @@ Subscribe to a single atom with microtask coalescing and memory-safe cleanup. It
|
|
|
327
340
|
|
|
328
341
|
### [`formatPlayRouteTransitions(machineConfig)`](../api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md)
|
|
329
342
|
|
|
330
|
-
Crawls machine state configs looking for states with `meta.route` and auto-generates `play.route` transition handlers at the root machine level. Each generated transition targets the matching state,
|
|
343
|
+
Crawls machine state configs looking for states with `meta.route` and auto-generates `play.route` transition handlers at the root machine level. Each generated transition is a config object: it targets the matching state, it selects the event with `matches: { to: "#stateId" }`, and its `context` mapper returns a patch with `event.params` and `event.query`. The `play.route` entry is a list, with the generated transitions first and a transition of the machine last. Returns the same config type `T` — directly usable by `setup().createMachine()`.
|
|
331
344
|
|
|
332
345
|
## View Renderer Pattern
|
|
333
346
|
|
|
@@ -356,7 +369,7 @@ Per-view component state is managed by `@xstate/store`: a fresh store atom is cr
|
|
|
356
369
|
|
|
357
370
|
All eight router adapter packages follow the Template Method pattern via [`RouterBridgeBase`](../api/@xmachines/play-router/index/classes/RouterBridgeBase.md). Each adapter implements exactly three abstract methods:
|
|
358
371
|
|
|
359
|
-
```typescript
|
|
372
|
+
```typescript fragment
|
|
360
373
|
// How to tell the framework router to change URL
|
|
361
374
|
protected abstract navigateRouter(path: string): void;
|
|
362
375
|
|
|
@@ -392,9 +405,9 @@ packages/
|
|
|
392
405
|
├── play-actor/ # Layer 1: the PlayActor contract — state and send, and nothing else
|
|
393
406
|
├── play-pattern/ # Layer 1: the route pattern language — one parse, and the path it builds back
|
|
394
407
|
├── play-url/ # Layer 2: the URL layer — the URLPattern API, a base path, framework params
|
|
395
|
-
├── play-view/ # Layer 2: Viewable, PlaySpec, the view
|
|
408
|
+
├── play-view/ # Layer 2: Viewable, PlaySpec, the view session, the context projection
|
|
396
409
|
│
|
|
397
|
-
├── play-xstate/ # Layer 4: Concrete XState
|
|
410
|
+
├── play-xstate/ # Layer 4: Concrete XState v6 actor: definePlayer, PlayerActor
|
|
398
411
|
│ └── src/
|
|
399
412
|
│ ├── player-actor.ts # PlayerActor — concrete actor
|
|
400
413
|
│ ├── define-player.ts # definePlayer factory
|
|
@@ -469,7 +482,7 @@ The **protocol layer** is `play`, `play-atom` and `play-actor`. `play` reads `co
|
|
|
469
482
|
| URL layer (`play-url`) | Protocol layer, `play-pattern`, `urlpattern-polyfill` | Any other `@xmachines/*` package |
|
|
470
483
|
| View half (`play-view`) | Protocol layer, `@xmachines/json-render-core` | Router adapters, framework code |
|
|
471
484
|
| Actor logic (`play-xstate`) | Protocol layer, `play-pattern`, `xstate` | View renderers, router adapters |
|
|
472
|
-
| Router infrastructure (`play-router`) | Protocol layer, `play-url`,
|
|
485
|
+
| Router infrastructure (`play-router`) | Protocol layer, `play-url`, `xstate` | View renderers |
|
|
473
486
|
| Router adapters (`play-*-router`) | `play-router`, protocol layer, framework router lib | View renderers |
|
|
474
487
|
| View renderers (`play-*`) | Protocol layer, `play-view`, `@xmachines/json-render-*` | Router adapters |
|
|
475
488
|
|
|
@@ -526,39 +539,56 @@ import { InvalidEventError } from "@xmachines/play-xstate/errors";
|
|
|
526
539
|
|
|
527
540
|
## Application Bootstrap (React example)
|
|
528
541
|
|
|
529
|
-
```
|
|
530
|
-
import {
|
|
542
|
+
```tsx
|
|
543
|
+
import { createRootRoute, createRouter } from "@tanstack/react-router";
|
|
544
|
+
import { setup, types } from "xstate";
|
|
531
545
|
import { definePlayer, compose, PlayerActor } from "@xmachines/play-xstate";
|
|
532
546
|
import { formatPlayRouteTransitions, withRouting } from "@xmachines/play-xstate/routing";
|
|
533
547
|
import { withView } from "@xmachines/play-xstate/view";
|
|
534
548
|
import { extractMachineRoutes } from "@xmachines/play-router/xstate";
|
|
535
549
|
import { createRouteMapFromTree, PlayRouterProvider } from "@xmachines/play-tanstack-react-router";
|
|
536
|
-
import { PlayUIProvider, PlayRenderer,
|
|
550
|
+
import { PlayUIProvider, PlayRenderer, type PlayUIProviderProps } from "@xmachines/play-react";
|
|
551
|
+
import type { ViewMeta } from "@xmachines/play-view";
|
|
537
552
|
|
|
538
553
|
// 1. Define machine — meta.route declares virtual routes; meta.view declares UI specs
|
|
539
554
|
const machineConfig = formatPlayRouteTransitions({
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
555
|
+
id: "app",
|
|
556
|
+
initial: "home",
|
|
557
|
+
context: { params: {}, query: {} },
|
|
558
|
+
states: {
|
|
559
|
+
home: {
|
|
560
|
+
id: "home",
|
|
561
|
+
meta: {
|
|
562
|
+
route: "/",
|
|
563
|
+
view: {
|
|
564
|
+
root: "home",
|
|
565
|
+
elements: { home: { type: "HomePage", props: {}, children: [] } },
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
profile: {
|
|
570
|
+
id: "profile",
|
|
571
|
+
meta: {
|
|
572
|
+
route: "/profile/:userId",
|
|
573
|
+
view: {
|
|
574
|
+
root: "profile",
|
|
575
|
+
elements: {
|
|
576
|
+
profile: {
|
|
577
|
+
type: "ProfilePage",
|
|
578
|
+
props: { userId: undefined },
|
|
579
|
+
children: [],
|
|
580
|
+
},
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
},
|
|
559
586
|
});
|
|
560
587
|
|
|
561
|
-
|
|
588
|
+
// XState 6 types the `meta` of each state from `schemas.meta`
|
|
589
|
+
const machine = setup({
|
|
590
|
+
schemas: { meta: types<{ route?: string; view?: ViewMeta }>() },
|
|
591
|
+
}).createMachine(machineConfig);
|
|
562
592
|
|
|
563
593
|
// 2. Build route map from machine definition (done once at startup)
|
|
564
594
|
const routeTree = extractMachineRoutes(machine);
|
|
@@ -569,18 +599,26 @@ const createPlayer = definePlayer({ machine, actor: compose(PlayerActor, withRou
|
|
|
569
599
|
const actor = createPlayer();
|
|
570
600
|
actor.start();
|
|
571
601
|
|
|
572
|
-
// 4.
|
|
573
|
-
const
|
|
602
|
+
// 4. Create the framework router. The machine owns the routes, so the route tree is one root route
|
|
603
|
+
const router = createRouter({ routeTree: createRootRoute() });
|
|
574
604
|
|
|
575
|
-
// 5.
|
|
605
|
+
// 5. Define component registry for json-render: defineRegistry(catalog, { components })
|
|
606
|
+
declare const registryResult: PlayUIProviderProps["registryResult"];
|
|
607
|
+
|
|
608
|
+
// 6. Render — the router provider wires actor → router, and its renderer callback renders the view
|
|
576
609
|
function App() {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
610
|
+
return (
|
|
611
|
+
<PlayRouterProvider
|
|
612
|
+
actor={actor}
|
|
613
|
+
router={router}
|
|
614
|
+
routeMap={routeMap}
|
|
615
|
+
renderer={(currentActor) => (
|
|
616
|
+
<PlayUIProvider actor={currentActor} registryResult={registryResult}>
|
|
617
|
+
<PlayRenderer />
|
|
618
|
+
</PlayUIProvider>
|
|
619
|
+
)}
|
|
620
|
+
/>
|
|
621
|
+
);
|
|
584
622
|
}
|
|
585
623
|
```
|
|
586
624
|
|
|
@@ -588,7 +626,7 @@ function App() {
|
|
|
588
626
|
|
|
589
627
|
### Importing `@xstate/store` directly
|
|
590
628
|
|
|
591
|
-
```typescript
|
|
629
|
+
```typescript fragment
|
|
592
630
|
// ❌ Wrong — bypasses the atom isolation layer, and names the engine in your own .d.ts
|
|
593
631
|
import { createAtom } from "@xstate/store";
|
|
594
632
|
|
|
@@ -598,12 +636,13 @@ import { createAtom } from "@xmachines/play-atom";
|
|
|
598
636
|
|
|
599
637
|
### Using framework state for business logic
|
|
600
638
|
|
|
601
|
-
```typescript
|
|
639
|
+
```typescript fragment
|
|
602
640
|
// ❌ Wrong — violates INV-03 (Atom-Only Reactivity) and INV-04 (Passive Infrastructure)
|
|
603
641
|
const [currentUser, setCurrentUser] = useState(null);
|
|
604
642
|
|
|
605
|
-
// ✅ Correct — observe the actor atom directly
|
|
606
|
-
const currentUser =
|
|
643
|
+
// ✅ Correct — observe the actor atom directly; React state only triggers the render
|
|
644
|
+
const [currentUser, setCurrentUser] = useState(actor.state.get().context.currentUser);
|
|
645
|
+
useAtomEffect([actor.state], () => setCurrentUser(actor.state.get().context.currentUser));
|
|
607
646
|
```
|
|
608
647
|
|
|
609
648
|
### Calling `navigateRouter` inside `watchRouterChanges`
|