@xmachines/docs 5.0.0 → 5.0.2
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 +1 -1
- package/api/@xmachines/play/README.md +2 -2
- package/api/@xmachines/play/errors/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/errors/classes/PlayError.md +4 -4
- package/api/@xmachines/play/index/functions/asCleanup.md +1 -1
- package/api/@xmachines/play/index/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/index/functions/shallowEqualExcept.md +1 -1
- package/api/@xmachines/play/index/type-aliases/Cleanup.md +1 -1
- package/api/@xmachines/play/index/type-aliases/DisposeKey.md +1 -1
- package/api/@xmachines/play/index/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play/index/variables/DISPOSE.md +1 -1
- 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/type-aliases/Cleanup.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 +1 -1
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/asCleanup.md +1 -1
- 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 +3 -3
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +6 -6
- package/api/@xmachines/play-dom/type-aliases/Cleanup.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +8 -5
- 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/asCleanup.md +1 -1
- 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 +15 -15
- 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 +7 -7
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +5 -5
- package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +1 -1
- package/api/@xmachines/play-dom-router/variables/DISPOSE.md +1 -1
- 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/createPatternCache.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/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/PatternCache.md +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/createPatternCache.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/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/PatternCache.md +3 -3
- 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 +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/index/interfaces/RouterBridgeOptions.md +5 -5
- package/api/@xmachines/play-router/index/interfaces/RouterConnection.md +7 -7
- 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/DISPOSE.md +1 -1
- 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 -1
- 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/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-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 +7 -7
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +7 -7
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +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/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 +2 -2
- 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 +7 -7
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/README.md +2 -2
- 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 +7 -7
- package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +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 +2 -2
- 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/createPatternCache.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/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/PatternCache.md +3 -3
- 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 +1 -1
- package/api/@xmachines/play-view/errors/classes/ReadOnlyContextError.md +5 -5
- package/api/@xmachines/play-view/index/functions/attachRenderErrorHandler.md +1 -1
- package/api/@xmachines/play-view/index/functions/composePlayState.md +1 -1
- package/api/@xmachines/play-view/index/functions/createFailureLatch.md +1 -1
- package/api/@xmachines/play-view/index/functions/createReportGuard.md +1 -1
- package/api/@xmachines/play-view/index/functions/createViewStoreLifecycle.md +1 -1
- package/api/@xmachines/play-view/index/functions/guardContextWrites.md +1 -1
- package/api/@xmachines/play-view/index/functions/refreshContextSubtree.md +1 -1
- package/api/@xmachines/play-view/index/functions/reuseComposedState.md +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 +1 -1
- package/api/@xmachines/play-view/index/interfaces/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/FailureLatch.md +3 -3
- package/api/@xmachines/play-view/index/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-view/index/interfaces/ReportGuard.md +5 -5
- package/api/@xmachines/play-view/index/interfaces/ReportGuardMessages.md +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/ViewStoreLifecycle.md +3 -3
- package/api/@xmachines/play-view/index/interfaces/ViewStoreResolution.md +4 -4
- package/api/@xmachines/play-view/index/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-view/index/type-aliases/ViewActor.md +1 -1
- package/api/@xmachines/play-view/index/variables/CONTEXT_STATE_KEY.md +1 -1
- package/api/@xmachines/play-vue/README.md +2 -2
- 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 +6 -6
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +9 -9
- 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 +2 -2
- 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 +11 -11
- 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/index/variables/DISPOSE.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/functions/withRouting.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/with-routing/interfaces/RouteObject.md +5 -5
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteData.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteDataResolver.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/with-routing/type-aliases/RouteStateNode.md +5 -5
- package/api/@xmachines/play-xstate/with-view/functions/withView.md +1 -1
- package/api/@xmachines/shared/README.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/contributing/configuration.md +2 -2
- package/contributing/deployment.md +23 -7
- package/contributing/development.md +1 -0
- package/contributing/migrating-to-play-atom.md +1 -1
- package/examples/@xmachines/play-dom-demo/README.md +44 -63
- package/examples/@xmachines/play-dom-demo/functions/createAuthActionHandlers.md +35 -0
- package/examples/@xmachines/play-dom-demo/functions/createConfirmDialog.md +27 -0
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +2 -2
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +7 -6
- 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 +12 -0
- 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 +19 -0
- 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 +14 -0
- 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 +190 -165
- package/examples/@xmachines/play-dom-demo/variables/demoComponents.md +30 -0
- package/examples/@xmachines/play-dom-router-demo/README.md +26 -34
- package/examples/@xmachines/play-react-demo/README.md +33 -57
- package/examples/@xmachines/play-react-demo/functions/createAuthActionHandlers.md +35 -0
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Button.md +12 -0
- package/examples/@xmachines/play-react-demo/variables/Contact.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +4 -3
- package/examples/@xmachines/play-react-demo/variables/Field.md +18 -0
- package/examples/@xmachines/play-react-demo/variables/Home.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Panel.md +15 -0
- package/examples/@xmachines/play-react-demo/variables/Profile.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Settings.md +2 -2
- package/examples/@xmachines/play-react-demo/variables/Shell.md +2 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +190 -165
- package/examples/@xmachines/play-react-demo/variables/demoComponents.md +30 -0
- package/examples/@xmachines/play-react-router-demo/README.md +32 -32
- package/examples/@xmachines/play-solid-demo/README.md +33 -57
- package/examples/@xmachines/play-solid-demo/functions/createAuthActionHandlers.md +35 -0
- 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 +11 -0
- 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 +5 -3
- package/examples/@xmachines/play-solid-demo/variables/Field.md +11 -0
- 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 +11 -0
- 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 +2 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +114 -2
- package/examples/@xmachines/play-solid-demo/variables/demoComponents.md +30 -0
- package/examples/@xmachines/play-solid-router-demo/README.md +20 -23
- package/examples/@xmachines/play-svelte-demo/README.md +38 -44
- package/examples/@xmachines/play-svelte-demo/functions/createAuthActionHandlers.md +35 -0
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +114 -2
- package/examples/@xmachines/play-svelte-demo/variables/demoComponents.md +30 -0
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +21 -27
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +21 -27
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +29 -31
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +25 -27
- package/examples/@xmachines/play-vue-demo/README.md +36 -60
- package/examples/@xmachines/play-vue-demo/functions/createAuthActionHandlers.md +35 -0
- 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 +114 -2
- package/examples/@xmachines/play-vue-demo/variables/demoComponents.md +11 -0
- package/examples/@xmachines/play-vue-router-demo/README.md +12 -23
- package/examples/form-validation.md +6 -3
- package/examples/multi-router-integration.md +6 -3
- package/examples/routing-patterns.md +6 -3
- package/guides/getting-started.md +8 -4
- package/package.json +2 -1
- package/examples/@xmachines/play-react-demo/functions/App.md +0 -13
- package/examples/@xmachines/play-react-demo/functions/DebugPanel.md +0 -20
- package/examples/@xmachines/play-react-demo/functions/HeaderNav.md +0 -20
- package/examples/@xmachines/play-react-demo/functions/Shell.md +0 -22
- package/examples/@xmachines/play-solid-demo/functions/App.md +0 -13
- package/examples/@xmachines/play-solid-demo/functions/DebugPanel.md +0 -20
- package/examples/@xmachines/play-solid-demo/functions/HeaderNav.md +0 -20
- package/examples/@xmachines/play-solid-demo/functions/Shell.md +0 -22
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
[Examples](../../README.md) / @xmachines/play-dom-router-demo
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-dom-router-demo
|
|
6
4
|
|
|
7
5
|
Pure TypeScript integration demo for [`@xmachines/play-dom-router`](../../../api/@xmachines/play-dom-router/README.md) — actor-authoritative routing with the Browser History API and no framework.
|
|
8
6
|
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
9
|
## What This Demonstrates
|
|
10
10
|
|
|
11
11
|
- Shared auth machine reused without framework-specific business logic
|
|
12
12
|
- `connectRouter` + `createBrowserHistory` wiring actor ↔ browser History API
|
|
13
13
|
- Shell-driven DOM rendering via `connectRenderer` with actor-authoritative navigation
|
|
14
|
-
- Manual
|
|
14
|
+
- Manual atom watcher lifecycle — the mechanism that framework adapters abstract
|
|
15
15
|
- Non-browser invariant tests plus browser E2E coverage
|
|
16
|
+
- Stately inspector attached at creation via `options.inspect` — the debug panel's **Show Inspector** button opens the live machine in its own window
|
|
16
17
|
|
|
17
18
|
## Running the Demo
|
|
18
19
|
|
|
@@ -29,10 +30,10 @@ Then open `http://localhost:3005`.
|
|
|
29
30
|
|
|
30
31
|
Use this order to understand the implementation:
|
|
31
32
|
|
|
32
|
-
1. `src/main.ts` looks up the host element (throws if absent)
|
|
33
|
-
2. `src/runtime.ts` creates the actor from the shared machine via `definePlayer
|
|
33
|
+
1. `src/main.ts` looks up the host element (throws if absent) and calls `initApp(app)` from `src/runtime.ts`. It tears nothing down at the end of the page, because the browser frees the page.
|
|
34
|
+
2. `src/runtime.ts` creates the page's inspector with `createDemoInspector()`, creates the actor from the shared machine via `definePlayer` with `options.inspect` wired to it, starts it, initializes router sync via `initRouter(actor)`, mounts the shared DOM shell via `initShell(actor, host, inspector)`, and returns one cleanup function.
|
|
34
35
|
3. `initRouter(actor)` from `src/router.ts` extracts route metadata, creates a browser history wrapper, instantiates a router, and calls `connectRouter` to wire bidirectional actor ↔ URL sync.
|
|
35
|
-
4. `initShell(actor, host)` is imported from `@xmachines/play-dom-demo
|
|
36
|
+
4. `initShell(actor, host, inspector)` is imported from [`@xmachines/play-dom-demo`](../play-dom-demo/README.md), so the router demo reuses the shared DOM shell — inspector button included — instead of duplicating the scaffold and renderer wiring.
|
|
36
37
|
5. Navigation buttons and links dispatch `play.route`, `auth.login`, and `auth.logout` events directly to the actor — no URL mutations from the shell.
|
|
37
38
|
6. Browser tests in `test/browser/` validate startup rendering and the full auth route flow.
|
|
38
39
|
|
|
@@ -41,16 +42,15 @@ Use this order to understand the implementation:
|
|
|
41
42
|
const app = document.getElementById("app");
|
|
42
43
|
if (!app) throw new Error("Root element not found");
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
45
|
+
// The app lives as long as the page, so the demo never tears it down: the browser frees
|
|
46
|
+
// it with the page. `initApp` returns a cleanup function for a host that removes the app
|
|
47
|
+
// before the page ends.
|
|
48
|
+
initApp(app);
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
52
|
// src/router.ts (shape)
|
|
53
|
-
export function initRouter(actor) {
|
|
53
|
+
export function initRouter(actor: RoutableActor) {
|
|
54
54
|
const routeTree = extractMachineRoutes(authMachine);
|
|
55
55
|
const routeMap = createRouteMap(authMachine);
|
|
56
56
|
const history = createBrowserHistory({ window });
|
|
@@ -67,12 +67,16 @@ export function initRouter(actor) {
|
|
|
67
67
|
```ts
|
|
68
68
|
// src/runtime.ts (shape)
|
|
69
69
|
export function initApp(host: HTMLElement): () => void {
|
|
70
|
-
const
|
|
70
|
+
const inspector = createDemoInspector();
|
|
71
|
+
const createPlayer = definePlayer({
|
|
72
|
+
machine: authMachine,
|
|
73
|
+
options: { inspect: inspector.inspect },
|
|
74
|
+
});
|
|
71
75
|
const actor = createPlayer();
|
|
72
76
|
actor.start();
|
|
73
77
|
|
|
74
78
|
const cleanupRouter = initRouter(actor);
|
|
75
|
-
const cleanupShell = initShell(actor, host);
|
|
79
|
+
const cleanupShell = initShell(actor, host, inspector);
|
|
76
80
|
|
|
77
81
|
return () => {
|
|
78
82
|
cleanupShell();
|
|
@@ -84,10 +88,10 @@ export function initApp(host: HTMLElement): () => void {
|
|
|
84
88
|
|
|
85
89
|
## Key Files
|
|
86
90
|
|
|
87
|
-
- `src/main.ts` - host lookup
|
|
91
|
+
- `src/main.ts` - host lookup and app bootstrap
|
|
88
92
|
- `src/runtime.ts` - actor startup, router initialization, and shared shell wiring
|
|
89
93
|
- `src/router.ts` - `createBrowserHistory`, `createRouter`, and `connectRouter` wiring
|
|
90
|
-
- `@xmachines/play-dom-demo` - shared DOM shell, NavBar, DebugPanel, and renderer wiring reused by this router demo
|
|
94
|
+
- [`@xmachines/play-dom-demo`](../play-dom-demo/README.md) - shared DOM shell, NavBar, DebugPanel (including the **Show Inspector** button), and renderer wiring reused by this router demo
|
|
91
95
|
- `test/library-pattern.test.ts` - architecture boundary and invariant assertions
|
|
92
96
|
- `test/browser/shared-demo.browser.test.ts` - startup rendering and full auth route browser flow
|
|
93
97
|
|
|
@@ -97,19 +101,17 @@ The demo utilizes XMachines architectural invariants at the lowest level:
|
|
|
97
101
|
|
|
98
102
|
1. **Actor Authority:** Intercepting browser `popstate` events or navigation button clicks dispatches a `play.route` event to the actor. The actor processes the request against the current state, ensuring any auth logic is correctly applied.
|
|
99
103
|
2. **Passive Infrastructure:** The router simply updates `window.history` and the DOM solely renders HTML based on what `actor.currentView` yields. Neither holds business state.
|
|
100
|
-
3. **
|
|
104
|
+
3. **Atom-Only Reactivity:** The integration registers `watchAtom` observers that trigger DOM reconciliation, illustrating the underlying mechanism that framework adapters abstract.
|
|
101
105
|
|
|
102
106
|
## Watcher Lifecycle and Cleanup Contract
|
|
103
107
|
|
|
104
108
|
Even in the vanilla demo, watcher handling follows the canonical lifecycle:
|
|
105
109
|
|
|
106
|
-
1. `
|
|
107
|
-
2. `
|
|
108
|
-
3.
|
|
109
|
-
4. Read actor signals and project DOM state
|
|
110
|
-
5. Re-arm with `watch()`/`watch(...signals)`
|
|
110
|
+
1. The atom notifies the subscription, synchronously, from the `set` that changed it
|
|
111
|
+
2. `watchAtom` queues one microtask, and it drops each duplicate notification of that batch
|
|
112
|
+
3. The microtask reads the actor atoms and projects DOM state
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
One subscription lives for the whole watch, and no caller arms a watcher again. Router/shell teardown must explicitly call cleanup (`disconnect`/`unwatch`) and not rely on GC-only behavior. In vanilla TypeScript, keep the cleanup functions, and call them when the app ends before the page does, or during hot-module replacement. Do not call them on `beforeunload`: that event also fires when the page goes into the back/forward cache, and Back then shows a page that does not respond. At the end of the page, the browser frees everything.
|
|
113
115
|
|
|
114
116
|
## Adapter Boundaries
|
|
115
117
|
|
|
@@ -127,19 +129,9 @@ These commands are defined in `package.json`:
|
|
|
127
129
|
| `pnpm --filter @xmachines/play-dom-router-demo run test` | Run Vitest test suite |
|
|
128
130
|
| `pnpm --filter @xmachines/play-dom-router-demo run test:browser` | Run browser-focused Vitest suite |
|
|
129
131
|
|
|
130
|
-
## Verification
|
|
131
|
-
|
|
132
|
-
Use these checks to validate README claims against the current demo implementation:
|
|
133
|
-
|
|
134
|
-
```bash
|
|
135
|
-
pnpm --filter @xmachines/play-dom-router-demo run test
|
|
136
|
-
pnpm --filter @xmachines/play-dom-router-demo run test:browser
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Expected result: tests pass, including startup rendering and the full browser auth flow in `test/browser/`.
|
|
140
|
-
|
|
141
132
|
## Learn More
|
|
142
133
|
|
|
143
134
|
- [Play DOM Router](../../../api/@xmachines/play-dom-router/README.md)
|
|
144
135
|
- [Play DOM](../play-dom-demo/README.md)
|
|
145
136
|
- [Play Router](../../../api/@xmachines/play-router/README.md)
|
|
137
|
+
- [Inspecting a Running Actor](../../../guides/inspector.md)
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
[Examples](../../README.md) / @xmachines/play-react-demo
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-react-demo
|
|
6
4
|
|
|
7
5
|
React renderer demo for [`@xmachines/play-react`](../../../api/@xmachines/play-react/README.md) — actor + `PlayRenderer` without a router.
|
|
8
6
|
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
9
|
## What This Demonstrates
|
|
10
10
|
|
|
11
11
|
- Shared auth machine reused without framework-specific business logic
|
|
12
12
|
- `PlayRenderer` rendering actor-projected views with a typed `defineRegistry` catalog
|
|
13
13
|
- Auth machine states drive view switching via `auth.login` / `auth.logout` events only — no `play.route` routing
|
|
14
|
-
- Canonical
|
|
14
|
+
- Canonical atoms lifecycle surfaced through React's rendering model
|
|
15
15
|
- Non-browser invariant tests plus browser renderer coverage
|
|
16
|
+
- Stately inspector attached at creation via `options.inspect` — the debug panel's **Show Inspector** button opens the live machine in its own window
|
|
17
|
+
- json-render 0.20 showcase pages driven purely by spec:
|
|
18
|
+
- **Overview** — two data planes side by side: `/context/tasks` (machine context via the read-only `/context` projection; `repeat` + `key`, `$item`-filtered lists, per-row actions sending inspectable machine events) next to ephemeral store state (`pushState`/`removeState`/`setState` built-ins driving filter chips and toggles that survive context updates)
|
|
19
|
+
- **Stats** — nested repeats (`repeat.statePath: { $item: "members" }`) over `/context/teams`
|
|
20
|
+
- **Settings** — declarative field validation, the `validateForm` built-in, a confirm-gated `resetForm` host action, and `onSuccess`/`onError` chains
|
|
21
|
+
- **Contact** — a chained named action: submit validates, then routes home on success or writes `"$error.message"` to state on failure
|
|
16
22
|
|
|
17
23
|
## Running the Demo
|
|
18
24
|
|
|
@@ -30,11 +36,11 @@ Then open `http://localhost:3001`.
|
|
|
30
36
|
Use this order to understand the implementation:
|
|
31
37
|
|
|
32
38
|
1. `src/main.tsx` mounts `<App />`.
|
|
33
|
-
2. `src/App.tsx` creates the actor at module scope via `definePlayer({ machine: authMachine })()` — created once when the module is first evaluated.
|
|
39
|
+
2. `src/App.tsx` creates the page's inspector with `createDemoInspector()` and the actor at module scope via `definePlayer({ machine: authMachine, options: { inspect: inspector.inspect }, actor: compose(PlayerActor, withRouting, withView) })()` — both created once when the module is first evaluated.
|
|
34
40
|
3. `defineRegistry(authCatalog, { components, actions })` builds the typed `registryResult` — real async action handlers dispatching to `actor.send()`.
|
|
35
41
|
4. `<PlayUIProvider actor={actor} registryResult={registryResult}><PlayRenderer /></PlayUIProvider>` observes `actor.currentView` and renders the active spec.
|
|
36
|
-
5. A `NavBar` component observes `actor`
|
|
37
|
-
6. `<DebugPanel actor={actor} />` shows live state, auth status, and current route.
|
|
42
|
+
5. A `NavBar` component observes `actor` atoms directly for nav visibility.
|
|
43
|
+
6. `<DebugPanel actor={actor} inspector={inspector} />` shows live state, auth status, and current route, plus the **Show Inspector** button.
|
|
38
44
|
7. Browser tests in `test/browser/` validate startup and interaction behavior.
|
|
39
45
|
|
|
40
46
|
```tsx
|
|
@@ -46,39 +52,17 @@ createRoot(document.getElementById("root")!).render(<App />);
|
|
|
46
52
|
// src/App.tsx (shape)
|
|
47
53
|
// Both actor and registryResult are module-scope singletons — created once,
|
|
48
54
|
// never recreated, no useMemo needed inside the component.
|
|
49
|
-
const
|
|
55
|
+
const inspector = createDemoInspector();
|
|
56
|
+
const actor: AuthActor = definePlayer({
|
|
57
|
+
machine: authMachine,
|
|
58
|
+
options: { inspect: inspector.inspect },
|
|
59
|
+
actor: compose(PlayerActor, withRouting, withView),
|
|
60
|
+
})();
|
|
50
61
|
actor.start();
|
|
51
62
|
|
|
52
63
|
const registryResult = defineRegistry(authCatalog, {
|
|
53
|
-
components:
|
|
54
|
-
|
|
55
|
-
About,
|
|
56
|
-
Contact,
|
|
57
|
-
Login,
|
|
58
|
-
Dashboard,
|
|
59
|
-
Overview,
|
|
60
|
-
Stats,
|
|
61
|
-
Profile,
|
|
62
|
-
Settings,
|
|
63
|
-
Navigation,
|
|
64
|
-
NavBar: NavBarView,
|
|
65
|
-
},
|
|
66
|
-
actions: {
|
|
67
|
-
login: async (args) =>
|
|
68
|
-
actor.send({
|
|
69
|
-
type: "auth.login",
|
|
70
|
-
username: assertNonNullable(args, "args").username,
|
|
71
|
-
}),
|
|
72
|
-
logout: async () => actor.send({ type: "auth.logout" }),
|
|
73
|
-
route: async (args) => {
|
|
74
|
-
const { to, params } = assertNonNullable(args, "args");
|
|
75
|
-
actor.send({
|
|
76
|
-
type: "play.route",
|
|
77
|
-
to,
|
|
78
|
-
...(params != null && { params }),
|
|
79
|
-
});
|
|
80
|
-
},
|
|
81
|
-
},
|
|
64
|
+
components: demoComponents, // one shared map — Home…NavBar plus the 0.20 Panel/Field/Button leaves
|
|
65
|
+
actions: createAuthActionHandlers(actor), // login/logout/route + task events + form actions
|
|
82
66
|
});
|
|
83
67
|
|
|
84
68
|
export function App() {
|
|
@@ -93,7 +77,7 @@ export function App() {
|
|
|
93
77
|
<PlayRenderer />
|
|
94
78
|
</PlayUIProvider>
|
|
95
79
|
</main>
|
|
96
|
-
<DebugPanel actor={actor} />
|
|
80
|
+
<DebugPanel actor={actor} inspector={inspector} />
|
|
97
81
|
</div>
|
|
98
82
|
);
|
|
99
83
|
}
|
|
@@ -113,20 +97,18 @@ export function App() {
|
|
|
113
97
|
The demo utilizes XMachines architectural invariants:
|
|
114
98
|
|
|
115
99
|
1. **Actor Authority:** View components dispatch `auth.login` and `auth.logout` events to the actor. The actor evaluates guards and transitions — React never decides which view to render.
|
|
116
|
-
2. **Passive Infrastructure:** `PlayRenderer` observes `actor.currentView`
|
|
117
|
-
3. **
|
|
100
|
+
2. **Passive Infrastructure:** `PlayRenderer` observes `actor.currentView` atoms only. It holds no business state and makes no routing decisions.
|
|
101
|
+
3. **Atom-Only Reactivity:** The bridge leverages React's rendering model to react precisely when actor atoms update, without polluting the component tree with `useState` or `useEffect` for business logic.
|
|
118
102
|
|
|
119
103
|
## Watcher Lifecycle and Cleanup Contract
|
|
120
104
|
|
|
121
105
|
This demo follows the canonical watcher lifecycle used across all `@xmachines` framework adapters:
|
|
122
106
|
|
|
123
|
-
1. `
|
|
124
|
-
2. `
|
|
125
|
-
3.
|
|
126
|
-
4. Read actor signals and project React render state
|
|
127
|
-
5. Re-arm with `watch()`/`watch(...signals)`
|
|
107
|
+
1. The atom notifies the subscription, synchronously, from the `set` that changed it
|
|
108
|
+
2. `watchAtom` queues one microtask, and it drops each duplicate notification of that batch
|
|
109
|
+
3. The microtask reads the actor atoms and projects React render state
|
|
128
110
|
|
|
129
|
-
|
|
111
|
+
One subscription lives for the whole watch, and no caller arms a watcher again. Cleanup is explicit: `actor.stop()` is called on component unmount via `useEffect`, and `PlayRenderer` handles internal watcher teardown natively.
|
|
130
112
|
|
|
131
113
|
## Adapter Boundaries
|
|
132
114
|
|
|
@@ -144,21 +126,11 @@ These commands are defined in `package.json`:
|
|
|
144
126
|
| `pnpm --filter @xmachines/play-react-demo run test` | Run Vitest test suite |
|
|
145
127
|
| `pnpm --filter @xmachines/play-react-demo run test:browser` | Run browser-focused Vitest suite |
|
|
146
128
|
|
|
147
|
-
## Verification
|
|
148
|
-
|
|
149
|
-
Use these checks to validate README claims against the current demo implementation:
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
pnpm --filter @xmachines/play-react-demo run test
|
|
153
|
-
pnpm --filter @xmachines/play-react-demo run test:browser
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Expected result: library-pattern invariant tests pass and the browser renderer suite completes.
|
|
157
|
-
|
|
158
129
|
## Learn More
|
|
159
130
|
|
|
160
131
|
- [play-react](../../../api/@xmachines/play-react/README.md)
|
|
161
132
|
- [React Router demo](../play-react-router-demo/README.md)
|
|
133
|
+
- [Inspecting a Running Actor](../../../guides/inspector.md)
|
|
162
134
|
|
|
163
135
|
## Type Aliases
|
|
164
136
|
|
|
@@ -168,15 +140,19 @@ Expected result: library-pattern invariant tests pass and the browser renderer s
|
|
|
168
140
|
|
|
169
141
|
- [About](variables/About.md)
|
|
170
142
|
- [authCatalog](variables/authCatalog.md)
|
|
143
|
+
- [Button](variables/Button.md)
|
|
171
144
|
- [Contact](variables/Contact.md)
|
|
172
145
|
- [Dashboard](variables/Dashboard.md)
|
|
173
146
|
- [DebugPanel](variables/DebugPanel.md)
|
|
147
|
+
- [demoComponents](variables/demoComponents.md)
|
|
148
|
+
- [Field](variables/Field.md)
|
|
174
149
|
- [Home](variables/Home.md)
|
|
175
150
|
- [Login](variables/Login.md)
|
|
176
151
|
- [NavBar](variables/NavBar.md)
|
|
177
152
|
- [NavBarView](variables/NavBarView.md)
|
|
178
153
|
- [Navigation](variables/Navigation.md)
|
|
179
154
|
- [Overview](variables/Overview.md)
|
|
155
|
+
- [Panel](variables/Panel.md)
|
|
180
156
|
- [Profile](variables/Profile.md)
|
|
181
157
|
- [Settings](variables/Settings.md)
|
|
182
158
|
- [Shell](variables/Shell.md)
|
|
@@ -184,4 +160,4 @@ Expected result: library-pattern invariant tests pass and the browser renderer s
|
|
|
184
160
|
|
|
185
161
|
## Functions
|
|
186
162
|
|
|
187
|
-
- [
|
|
163
|
+
- [createAuthActionHandlers](functions/createAuthActionHandlers.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[Examples](../../../README.md) / [@xmachines/play-react-demo](../README.md) / createAuthActionHandlers
|
|
2
|
+
|
|
3
|
+
# Function: createAuthActionHandlers()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function createAuthActionHandlers(actor): object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-actor/examples/shared/src/actions.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L48)
|
|
10
|
+
|
|
11
|
+
Build the demo action handler map for one actor.
|
|
12
|
+
|
|
13
|
+
Returned functions use the `(params, setState) => Promise<void>` shape every
|
|
14
|
+
framework's `defineRegistry` accepts; spread the result into its `actions`.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| --------- | ----------- |
|
|
20
|
+
| `actor` | `AuthActor` |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`object`
|
|
25
|
+
|
|
26
|
+
| Name | Type | Defined in |
|
|
27
|
+
| ---------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
28
|
+
| `addTask()` | (`params?`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L65) |
|
|
29
|
+
| `completeTask()` | (`params`, `_setState`, `state`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L72) |
|
|
30
|
+
| `login()` | (`params?`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L50) |
|
|
31
|
+
| `logout()` | () => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L54) |
|
|
32
|
+
| `removeTask()` | (`params`, `_setState`, `state`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:81](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L81) |
|
|
33
|
+
| `resetForm()` | (`params`, `setState`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L99) |
|
|
34
|
+
| `route()` | (`params?`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L55) |
|
|
35
|
+
| `submitForm()` | (`params?`) => `Promise`\<`void`\> | [packages/play-actor/examples/shared/src/actions.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-actor/examples/shared/src/actions.ts#L92) |
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type AuthCatalog = typeof authCatalog;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/catalog.ts#L6)
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const About: ComponentFn<AuthCatalog, "About">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/About.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/About.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/About.tsx#L10)
|
|
10
10
|
|
|
11
11
|
About — Public information page
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "About"> for catalog-typed props.
|
|
14
|
-
|
|
14
|
+
NavBar handles the navigation — this component only renders content.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[Examples](../../../README.md) / [@xmachines/play-react-demo](../README.md) / Button
|
|
2
|
+
|
|
3
|
+
# Variable: Button
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const Button: ComponentFn<AuthCatalog, "Button">;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Button.tsx:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Button.tsx#L8)
|
|
10
|
+
|
|
11
|
+
Button — emits `press`; the spec's `on.press` binding decides what happens
|
|
12
|
+
(a host action sending a machine event, or a built-in like setState).
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const Contact: ComponentFn<AuthCatalog, "Contact">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Contact.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Contact.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Contact.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Contact — Public contact page
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Contact"> for catalog-typed props.
|
|
14
|
-
|
|
14
|
+
NavBar handles the navigation — this component only renders content.
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
const Dashboard: ComponentFn<AuthCatalog, "Dashboard">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Dashboard.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Dashboard.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Dashboard.tsx#L12)
|
|
10
10
|
|
|
11
11
|
Dashboard — Protected authenticated home
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Dashboard"> for catalog-typed props.
|
|
14
14
|
Emits "logout" to trigger the auth.logout event via PlayRenderer actions map.
|
|
15
|
-
|
|
15
|
+
NavBar handles the navigation — this component only handles auth actions.
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
const DebugPanel: FC<{
|
|
7
7
|
actor: AuthActor;
|
|
8
|
+
inspector: DemoInspector;
|
|
8
9
|
}>;
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
Defined in: [packages/play-react/examples/demo/src/components/DebugPanel.tsx:
|
|
12
|
+
Defined in: [packages/play-react/examples/demo/src/components/DebugPanel.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/DebugPanel.tsx#L12)
|
|
12
13
|
|
|
13
14
|
DebugPanel — Live debug footer. Observes actor.state and actor.currentRoute
|
|
14
|
-
via
|
|
15
|
-
and active route.
|
|
15
|
+
via useAtomEffect and displays current state value, can-logout status,
|
|
16
|
+
and active route, plus the button that opens the Stately inspector window.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Examples](../../../README.md) / [@xmachines/play-react-demo](../README.md) / Field
|
|
2
|
+
|
|
3
|
+
# Variable: Field
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const Field: ComponentFn<AuthCatalog, "Field">;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Field.tsx:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Field.tsx#L15)
|
|
10
|
+
|
|
11
|
+
Field — labelled input with two-way $bindState binding and declarative
|
|
12
|
+
validation checks.
|
|
13
|
+
|
|
14
|
+
Registration happens by rendering: useFieldValidation registers the bound
|
|
15
|
+
state path with the ValidationProvider so the `validateForm` built-in sees
|
|
16
|
+
it. The error DISPLAY deliberately reads `props.formErrors` — the result
|
|
17
|
+
object validateForm wrote to state — rather than the local hook, so every
|
|
18
|
+
renderer (DOM included) surfaces errors at the same moment: after submit.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const Home: ComponentFn<AuthCatalog, "Home">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Home.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Home.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Home.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Home - Public landing page component
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Home"> for catalog-typed props.
|
|
14
|
-
|
|
14
|
+
NavBar handles the navigation — this component only renders content.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Login: ComponentFn<AuthCatalog, "Login">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Login.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Login.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Login.tsx#L14)
|
|
10
10
|
|
|
11
11
|
Login — Authentication form
|
|
12
12
|
|
|
@@ -8,7 +8,7 @@ const NavBar: FC<{
|
|
|
8
8
|
}>;
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/play-react/examples/demo/src/components/NavBar.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
11
|
+
Defined in: [packages/play-react/examples/demo/src/components/NavBar.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/NavBar.tsx#L12)
|
|
12
12
|
|
|
13
13
|
NavBar — App-shell navigation component.
|
|
14
14
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const NavBarView: ComponentFn<AuthCatalog, "NavBar">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/NavBarView.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/NavBarView.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/NavBarView.tsx#L11)
|
|
10
10
|
|
|
11
11
|
NavBarView — Catalog-typed NavBar for use in defineRegistry components map.
|
|
12
12
|
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const Navigation: ComponentFn<AuthCatalog, "Navigation">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Navigation.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Navigation.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Navigation.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Navigation - Status display component
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Navigation"> for catalog-typed props.
|
|
14
|
-
This component displays navigation state info.
|
|
14
|
+
This component displays navigation state info. NavBar handles the actual navigation.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Overview: ComponentFn<AuthCatalog, "Overview">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Overview.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Overview.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Overview.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Overview - Dashboard overview child route component
|
|
12
12
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[Examples](../../../README.md) / [@xmachines/play-react-demo](../README.md) / Panel
|
|
2
|
+
|
|
3
|
+
# Variable: Panel
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const Panel: ComponentFn<AuthCatalog, "Panel">;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Panel.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Panel.tsx#L11)
|
|
10
|
+
|
|
11
|
+
Panel — generic container leaf for the 0.20 showcase.
|
|
12
|
+
|
|
13
|
+
Renders an optional title and note, then its spec `children` — which is how
|
|
14
|
+
repeat containers work: the element renders ONCE and its children render per
|
|
15
|
+
item, so a Panel is both the list shell and the row.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const Profile: ComponentFn<AuthCatalog, "Profile">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Profile.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Profile.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Profile.tsx#L11)
|
|
10
10
|
|
|
11
11
|
Profile — Protected user profile page
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Profile"> for catalog-typed props.
|
|
14
|
-
|
|
14
|
+
NavBar handles the navigation — this component only renders content.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
const Settings: ComponentFn<AuthCatalog, "Settings">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Settings.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Settings.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Settings.tsx#L11)
|
|
10
10
|
|
|
11
11
|
Settings — Protected settings page
|
|
12
12
|
|
|
13
13
|
Uses ComponentFn<AuthCatalog, "Settings"> for catalog-typed props.
|
|
14
|
-
|
|
14
|
+
NavBar handles the navigation — this component only renders content.
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
const Shell: FC<{
|
|
7
7
|
actor: AuthActor;
|
|
8
|
+
inspector: DemoInspector;
|
|
8
9
|
registryResult: DefineRegistryResult;
|
|
9
10
|
router?: unknown;
|
|
10
11
|
}>;
|
|
11
12
|
```
|
|
12
13
|
|
|
13
|
-
Defined in: [packages/play-react/examples/demo/src/components/Shell.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
+
Defined in: [packages/play-react/examples/demo/src/components/Shell.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Shell.tsx#L14)
|
|
14
15
|
|
|
15
16
|
Demo Shell layout component.
|
|
16
17
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Stats: ComponentFn<AuthCatalog, "Stats">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Stats.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Stats.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v5.0.2/packages/play-react/examples/demo/src/components/Stats.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Stats - Dashboard stats child route component
|
|
12
12
|
|