@xmachines/docs 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -13
- package/api/@xmachines/play/README.md +58 -63
- package/api/@xmachines/play/classes/NonNullableError.md +7 -7
- package/api/@xmachines/play/classes/PlayError.md +25 -27
- package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
- package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
- package/api/@xmachines/play-actor/README.md +72 -63
- package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
- package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
- package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
- package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
- package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
- package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
- package/api/@xmachines/play-dom/README.md +119 -85
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
- package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
- package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
- package/api/@xmachines/play-dom-router/README.md +66 -49
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
- package/api/@xmachines/play-react/README.md +63 -54
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
- package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
- package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
- package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
- package/api/@xmachines/play-react-router/README.md +37 -28
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
- package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
- package/api/@xmachines/play-router/README.md +94 -82
- package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
- package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
- package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
- package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
- package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
- package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
- package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
- package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +8 -8
- package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
- package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
- package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
- package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
- package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
- package/api/@xmachines/play-signals/README.md +38 -36
- package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
- package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
- package/api/@xmachines/play-solid/README.md +46 -42
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
- package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
- package/api/@xmachines/play-solid-router/README.md +34 -29
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
- package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
- package/api/@xmachines/play-svelte/README.md +40 -31
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
- package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/README.md +38 -34
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
- package/api/@xmachines/play-tanstack-router/README.md +37 -17
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
- package/api/@xmachines/play-vue/README.md +37 -35
- package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
- package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
- package/api/@xmachines/play-vue-router/README.md +65 -56
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
- package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
- package/api/@xmachines/play-xstate/README.md +72 -70
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
- package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
- package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
- package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
- package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
- package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
- package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
- package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
- package/api/@xmachines/shared/README.md +11 -13
- 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/development.md +28 -0
- package/guides/inspector.md +1 -1
- package/package.json +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
function createViewStoreLifecycle(createStore): ViewStoreLifecycle;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:
|
|
9
|
+
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L94)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Creates a coordinator of the lifecycle.
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
15
|
-
| Parameter | Type | Description
|
|
16
|
-
| ------------- | ------------------------ |
|
|
17
|
-
| `createStore` | (`seed`) => `StateStore` |
|
|
15
|
+
| Parameter | Type | Description |
|
|
16
|
+
| ------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| `createStore` | (`seed`) => `StateStore` | The store factory of the framework. It receives the seed that is safe for the prototype (`toAtomState(view.state)`), and the composed state carries /context already. |
|
|
18
18
|
|
|
19
19
|
## Returns
|
|
20
20
|
|
|
@@ -6,36 +6,38 @@
|
|
|
6
6
|
function guardContextWrites(store): StateStore;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/context-projection.ts:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
(`$bindState`, `setState`, chained `set`). The provider
|
|
15
|
-
store
|
|
16
|
-
to the machinery.
|
|
17
|
-
|
|
18
|
-
A write
|
|
19
|
-
|
|
20
|
-
the whole object back
|
|
21
|
-
round
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
is
|
|
29
|
-
|
|
9
|
+
Defined in: [packages/play-actor/src/context-projection.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L151)
|
|
10
|
+
|
|
11
|
+
Wraps a StateStore, and the wrapper refuses each write under `/context`.
|
|
12
|
+
|
|
13
|
+
A provider applies it to the store that it gives to the bindings and to the
|
|
14
|
+
action handlers (`$bindState`, `setState`, and a chained `set`). The provider
|
|
15
|
+
keeps the store without the wrapper, and it refreshes the projection through that
|
|
16
|
+
store. The subtree is therefore read-only to the spec, and not to the machinery.
|
|
17
|
+
|
|
18
|
+
A write with a value that is **identical** to the current value passes in
|
|
19
|
+
silence. A handler in the style of `setState` reads the complete snapshot,
|
|
20
|
+
changes it, and writes the whole object back. The `context` key that goes through
|
|
21
|
+
that round trip without a change is no attempt of a mutation. Only a write that
|
|
22
|
+
changes the subtree throws.
|
|
23
|
+
|
|
24
|
+
Each read passes through without a change. The wrapper delegates every member
|
|
25
|
+
explicitly, and it does not use a spread: a store from a consumer can be an
|
|
26
|
+
instance of a class, and the methods of that instance are on the prototype. Those
|
|
27
|
+
methods do not survive `{ ...store }`, and the first render then fails with
|
|
28
|
+
`store.getSnapshot is not a function`. The code builds the wrapper one time for
|
|
29
|
+
each resolved store. Therefore the identity of the delegating `getSnapshot` and
|
|
30
|
+
of the delegating `subscribe` stays stable for a consumer in the style of
|
|
31
|
+
`useSyncExternalStore`.
|
|
30
32
|
|
|
31
33
|
## Parameters
|
|
32
34
|
|
|
33
|
-
| Parameter | Type | Description
|
|
34
|
-
| --------- | ------------ |
|
|
35
|
-
| `store` | `StateStore` | The
|
|
35
|
+
| Parameter | Type | Description |
|
|
36
|
+
| --------- | ------------ | ---------------------------- |
|
|
37
|
+
| `store` | `StateStore` | The store below the wrapper. |
|
|
36
38
|
|
|
37
39
|
## Returns
|
|
38
40
|
|
|
39
41
|
`StateStore`
|
|
40
42
|
|
|
41
|
-
A store with
|
|
43
|
+
A store with a guard on `set` and on `update`.
|
|
@@ -6,21 +6,22 @@
|
|
|
6
6
|
function refreshContextSubtree(store, view): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/context-projection.ts:
|
|
9
|
+
Defined in: [packages/play-actor/src/context-projection.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L210)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
Refreshes the `/context` subtree of a live store from the composed state of a
|
|
12
|
+
derived view. An emission with the same `viewKey` means that only the projection
|
|
13
|
+
changed. The function therefore replaces the complete subtree, and it never
|
|
14
|
+
merges it field by field, because `update` cannot delete a key. Every ephemeral
|
|
15
|
+
value at the root level stays. The function does nothing when the view carries no
|
|
16
|
+
slice, or when the store holds the slice already.
|
|
16
17
|
|
|
17
18
|
## Parameters
|
|
18
19
|
|
|
19
|
-
| Parameter | Type | Description
|
|
20
|
-
| ------------- | -------------------------- |
|
|
21
|
-
| `store` | `StateStore` | The
|
|
22
|
-
| `view` | \{ `state?`: `unknown`; \} | The derived view
|
|
23
|
-
| `view.state?` | `unknown` | -
|
|
20
|
+
| Parameter | Type | Description |
|
|
21
|
+
| ------------- | -------------------------- | -------------------------------------------------------------- |
|
|
22
|
+
| `store` | `StateStore` | The store WITHOUT the guard. A provider refreshes through it. |
|
|
23
|
+
| `view` | \{ `state?`: `unknown`; \} | The derived view. Its `state.context` field carries the slice. |
|
|
24
|
+
| `view.state?` | `unknown` | - |
|
|
24
25
|
|
|
25
26
|
## Returns
|
|
26
27
|
|
|
@@ -6,28 +6,29 @@
|
|
|
6
6
|
function reuseComposedState(prev, next): PlaySpec | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/context-projection.ts:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`deriveCurrentView` composes `state: { ...meta.view.state, context: slice }`
|
|
15
|
-
|
|
16
|
-
every event
|
|
17
|
-
reference and the
|
|
18
|
-
|
|
19
|
-
XState
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
references are stable
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
Defined in: [packages/play-actor/src/context-projection.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L92)
|
|
10
|
+
|
|
11
|
+
Reuses the composed `state` of the previous emission, or the complete previous
|
|
12
|
+
spec, when the value of the projection did not change.
|
|
13
|
+
|
|
14
|
+
`deriveCurrentView` composes `state: { ...meta.view.state, context: slice }` new
|
|
15
|
+
on each call, and the XState function `assign` makes a new context object on
|
|
16
|
+
every event. Without this reuse, every event therefore presents a new `state`
|
|
17
|
+
reference, and the `Object.is` test of each field in the emit gate emits the view
|
|
18
|
+
again and remounts it, without an end. The function compares the slices field by
|
|
19
|
+
field ([shallowEqualExcept](shallowEqualExcept.md)), because the XState function `assign` makes a
|
|
20
|
+
new context object for each event, and a test of the identity of the whole object
|
|
21
|
+
therefore reports a change every time. The authored fields come from the static
|
|
22
|
+
`meta.view.state` through a spread. Therefore their references are stable for an
|
|
23
|
+
unchanged `viewKey`, and a plain `Object.is` test is correct for them.
|
|
24
|
+
|
|
25
|
+
The function returns one of three values, in this order of preference:
|
|
26
|
+
|
|
27
|
+
- `prev` itself, when nothing observable changed. The emit gate then stops at the
|
|
28
|
+
identity of the reference, and it walks no element;
|
|
29
|
+
- `{ ...next, state: prev.state }`, when the value of the state did not change
|
|
30
|
+
but another top-level field is different;
|
|
31
|
+
- `next`, when something changed.
|
|
31
32
|
|
|
32
33
|
## Parameters
|
|
33
34
|
|
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
function shallowEqualExcept(a, b, except?): boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/context-projection.ts:
|
|
9
|
+
Defined in: [packages/play-actor/src/context-projection.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L58)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The shallow equality of the own keys, with `Object.is`. It can ignore one key on
|
|
12
12
|
both sides.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
equality and the
|
|
16
|
-
`viewSpecsEquivalent
|
|
14
|
+
This is the one comparison rule behind every decision of the emission dedup: the
|
|
15
|
+
equality of a slice, and also the emit gate of the player, which compares the
|
|
16
|
+
spec fields in `viewSpecsEquivalent` and reuses the composed state in
|
|
17
|
+
[reuseComposedState](reuseComposedState.md).
|
|
17
18
|
|
|
18
19
|
## Parameters
|
|
19
20
|
|
|
@@ -6,28 +6,30 @@
|
|
|
6
6
|
function toAtomState(state): Record<string, unknown>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/provider-guards.ts:
|
|
9
|
+
Defined in: [packages/play-actor/src/provider-guards.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/provider-guards.ts#L39)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Converts the `state` field of a spec into a plain object for `createAtom`, in a safe way.
|
|
12
12
|
|
|
13
|
-
`spec.state`
|
|
14
|
-
`
|
|
15
|
-
|
|
16
|
-
its
|
|
13
|
+
`spec.state` has the type `unknown` in `PlaySpec`. At run time it is `null`,
|
|
14
|
+
`undefined`, a primitive, or a plain object, and this depends on the value that
|
|
15
|
+
the author of the machine put in the view spec. `createAtom` requires a plain
|
|
16
|
+
object as its first value, because every other value makes a broken store at run
|
|
17
|
+
time.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
and
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
The function accepts a plain object only, which means that its prototype is
|
|
20
|
+
`Object.prototype` or `null`, and it returns that object without a change. Every
|
|
21
|
+
other value becomes a new `{}`: `null`, `undefined`, a primitive, an array, an
|
|
22
|
+
instance of a class, and a built-in object such as a Date, a Map, or a Set. A
|
|
23
|
+
broken store therefore never appears at run time.
|
|
22
24
|
|
|
23
25
|
## Parameters
|
|
24
26
|
|
|
25
|
-
| Parameter | Type | Description
|
|
26
|
-
| --------- | --------- |
|
|
27
|
-
| `state` | `unknown` | The raw `spec.state` value
|
|
27
|
+
| Parameter | Type | Description |
|
|
28
|
+
| --------- | --------- | ------------------------------------------- |
|
|
29
|
+
| `state` | `unknown` | The raw `spec.state` value of a `PlaySpec`. |
|
|
28
30
|
|
|
29
31
|
## Returns
|
|
30
32
|
|
|
31
33
|
`Record`\<`string`, `unknown`\>
|
|
32
34
|
|
|
33
|
-
`state` itself when it is a plain object,
|
|
35
|
+
`state` itself when it is a plain object. In every other case, a new empty object.
|
|
@@ -6,22 +6,23 @@
|
|
|
6
6
|
function typedSpec(spec): PlaySpec;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:
|
|
9
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L91)
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
definition site
|
|
11
|
+
The identity helper gives a view spec literal the type `PlaySpec` at the
|
|
12
|
+
definition site. The compiler therefore checks the spec, and the IDE completes it.
|
|
13
13
|
|
|
14
|
-
XState
|
|
15
|
-
|
|
16
|
-
mechanism that
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
The XState `meta` field has the type `Record<string, unknown>`. TypeScript
|
|
15
|
+
therefore infers no spec shape from the context. `typedSpec(...)` is the
|
|
16
|
+
mechanism that starts the check where you write the spec. The parameter holds no
|
|
17
|
+
`viewKey`: the derivation stamps that field, and it overwrites a value from an
|
|
18
|
+
author without a notice. Therefore the compiler refuses a `viewKey` here.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
spec
|
|
20
|
+
The check of an excess property works on an inline object literal only. For a
|
|
21
|
+
spec in a variable, or for a spec from a spread, write `satisfies PlaySpec` at
|
|
22
22
|
the literal instead.
|
|
23
23
|
|
|
24
|
-
At
|
|
24
|
+
At run time this function does nothing: it returns the spec object without a
|
|
25
|
+
change.
|
|
25
26
|
|
|
26
27
|
## Parameters
|
|
27
28
|
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BaseActorProviderProps\<TRegistry\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L159)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`DefineRegistryResult` type
|
|
10
|
-
`@xmachines/json-render-core
|
|
7
|
+
The framework-agnostic base props. Every `ActorProvider` implementation shares
|
|
8
|
+
them: React, Vue, Solid, and Svelte. `TRegistry` holds the
|
|
9
|
+
`DefineRegistryResult` type of the framework. `RenderErrorHandler` comes from
|
|
10
|
+
`@xmachines/json-render-core`, and a second generic parameter is therefore not
|
|
11
|
+
necessary.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Each framework package extends this interface with its `fallback` field, its
|
|
14
|
+
`onError` field, and its `children` field.
|
|
13
15
|
|
|
14
16
|
## Example
|
|
15
17
|
|
|
@@ -32,15 +34,15 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
32
34
|
|
|
33
35
|
## Type Parameters
|
|
34
36
|
|
|
35
|
-
| Type Parameter | Description
|
|
36
|
-
| ------------------------------ |
|
|
37
|
-
| `TRegistry` _extends_ `object` | The
|
|
37
|
+
| Type Parameter | Description |
|
|
38
|
+
| ------------------------------ | ------------------------------------------------- |
|
|
39
|
+
| `TRegistry` _extends_ `object` | The `DefineRegistryResult` type of the framework. |
|
|
38
40
|
|
|
39
41
|
## Properties
|
|
40
42
|
|
|
41
|
-
| Property | Type | Description
|
|
42
|
-
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](Viewable.md) |
|
|
44
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) |
|
|
45
|
-
| <a id="property-registryresult"></a> `registryResult` | `TRegistry` |
|
|
46
|
-
| <a id="property-store"></a> `store?` | `StateStore` |
|
|
43
|
+
| Property | Type | Description | Defined in |
|
|
44
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [packages/play-actor/src/abstract-actor.ts:163](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L163) |
|
|
46
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [packages/play-actor/src/abstract-actor.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L177) |
|
|
47
|
+
| <a id="property-registryresult"></a> `registryResult` | `TRegistry` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [packages/play-actor/src/abstract-actor.ts:165](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L165) |
|
|
48
|
+
| <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, which is the controlled mode. With this option, the provider ignores spec.state, and this store is the single source of truth. Without it, the provider makes a new @xstate/store atom for each view transition, with the values of spec.state. | [packages/play-actor/src/abstract-actor.ts:172](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L172) |
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BaseViewContextValue\<TRegistry\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:123](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L123)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The framework-agnostic base of the `ViewContextValue` type in each framework.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`registry`
|
|
11
|
-
type
|
|
9
|
+
It holds the three fields that are identical in React, Vue, Solid, and Svelte.
|
|
10
|
+
The `registry` field belongs to one framework, because each framework has its own
|
|
11
|
+
`ComponentRegistry` type. Therefore `TRegistry` gives its type, and this is the
|
|
12
|
+
same generic parameter as in `BaseActorProviderProps`.
|
|
12
13
|
|
|
13
14
|
## Extended by
|
|
14
15
|
|
|
@@ -19,15 +20,15 @@ type) so it is typed via `TRegistry` — the same generic used in `BaseActorProv
|
|
|
19
20
|
|
|
20
21
|
## Type Parameters
|
|
21
22
|
|
|
22
|
-
| Type Parameter | Description
|
|
23
|
-
| ------------------------------ |
|
|
24
|
-
| `TRegistry` _extends_ `object` | The
|
|
23
|
+
| Type Parameter | Description |
|
|
24
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
+
| `TRegistry` _extends_ `object` | The registry type of the component of the framework, for example `ComponentRegistry` from `@xmachines/json-render-react`. |
|
|
25
26
|
|
|
26
27
|
## Properties
|
|
27
28
|
|
|
28
|
-
| Property | Type | Description
|
|
29
|
-
| ----------------------------------------- | ------------------------------------- |
|
|
30
|
-
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> |
|
|
31
|
-
| <a id="property-registry"></a> `registry` | `TRegistry` |
|
|
32
|
-
| <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | The current PlaySpec to render.
|
|
33
|
-
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore
|
|
29
|
+
| Property | Type | Description | Defined in |
|
|
30
|
+
| ----------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | The action handlers, resolved against the live StateStore. | [packages/play-actor/src/abstract-actor.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L127) |
|
|
32
|
+
| <a id="property-registry"></a> `registry` | `TRegistry` | The component registry, from registryResult.registry. | [packages/play-actor/src/abstract-actor.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L129) |
|
|
33
|
+
| <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | The current PlaySpec to render. | [packages/play-actor/src/abstract-actor.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L125) |
|
|
34
|
+
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore. Give it to JSONUIProvider or JsonUIProvider as `store`, and the providers then share the state. | [packages/play-actor/src/abstract-actor.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L133) |
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlaySpec
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L47)
|
|
6
6
|
|
|
7
|
-
XMachines extension of `@xmachines/json-render-core
|
|
7
|
+
The XMachines extension of the `Spec` type of `@xmachines/json-render-core`.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ordinary `{ $state: "/context/…" }` grammar
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
Each derived view receives the machine context in its state store, under the
|
|
10
|
+
read-only `/context` subtree. A spec therefore reads the context through the
|
|
11
|
+
ordinary `{ $state: "/context/…" }` grammar: in a prop, in a `visible` condition,
|
|
12
|
+
and in `repeat.statePath`. The store always holds the complete context, and a
|
|
13
|
+
spec reads only the paths that it needs.
|
|
14
14
|
|
|
15
15
|
## Extends
|
|
16
16
|
|
|
@@ -18,9 +18,9 @@ projected; a spec simply reads the paths it needs.
|
|
|
18
18
|
|
|
19
19
|
## Properties
|
|
20
20
|
|
|
21
|
-
| Property | Modifier | Type | Description
|
|
22
|
-
| ----------------------------------------- | ---------- | --------------------------------- |
|
|
23
|
-
| <a id="property-elements"></a> `elements` | `public` | `Record`\<`string`, `UIElement`\> | Flat map of elements by key
|
|
24
|
-
| <a id="property-root"></a> `root` | `public` | `string` | Root element key
|
|
25
|
-
| <a id="property-state"></a> `state?` | `public` | `Record`\<`string`, `unknown`\> | Optional initial state to seed the state model. Components using statePath will read from / write to this state.
|
|
26
|
-
| <a id="property-viewkey"></a> `viewKey?` | `readonly` | `string` |
|
|
21
|
+
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
22
|
+
| ----------------------------------------- | ---------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| <a id="property-elements"></a> `elements` | `public` | `Record`\<`string`, `UIElement`\> | Flat map of elements by key | `Spec.elements` | - |
|
|
24
|
+
| <a id="property-root"></a> `root` | `public` | `string` | Root element key | `Spec.root` | - |
|
|
25
|
+
| <a id="property-state"></a> `state?` | `public` | `Record`\<`string`, `unknown`\> | Optional initial state to seed the state model. Components using statePath will read from / write to this state. | `Spec.state` | - |
|
|
26
|
+
| <a id="property-viewkey"></a> `viewKey?` | `readonly` | `string` | The identity of the view of this derived spec. `deriveCurrentView` sets it from the meta entry that the derivation selected. A provider uses it as the key of its store lifecycle: a new `viewKey` seeds the store again, and the same `viewKey` refreshes `/context` in place, which keeps the ephemeral view state. Never write this field in `meta.view`. | - | [packages/play-actor/src/abstract-actor.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L55) |
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ResolveViewStoreOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L57)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
|
-
| Property | Type | Description
|
|
10
|
-
| ------------------------------------------------------------------ | --------- |
|
|
11
|
-
| <a id="property-refreshexternalstore"></a> `refreshExternalStore?` | `boolean` |
|
|
9
|
+
| Property | Type | Description | Defined in |
|
|
10
|
+
| ------------------------------------------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
11
|
+
| <a id="property-refreshexternalstore"></a> `refreshExternalStore?` | `boolean` | The controlled mode only: refresh the /context subtree of the external store during this resolve. The default is true. Give false where the call site permits no notification of the store subscribers, which is the render path of React, and refresh from an effect instead. | [packages/play-actor/src/view-store-lifecycle.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L64) |
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Routable
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L33)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
An optional capability: the routing support
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
11
|
| Property | Modifier | Type | Defined in |
|
|
12
12
|
| ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
-
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | [packages/play-actor/src/abstract-actor.ts:
|
|
14
|
-
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | [packages/play-actor/src/abstract-actor.ts:
|
|
13
|
+
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | [packages/play-actor/src/abstract-actor.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L34) |
|
|
14
|
+
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | [packages/play-actor/src/abstract-actor.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L35) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewStoreLifecycle
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:
|
|
5
|
+
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L67)
|
|
6
6
|
|
|
7
7
|
## Methods
|
|
8
8
|
|
|
@@ -12,9 +12,9 @@ Defined in: [packages/play-actor/src/view-store-lifecycle.ts:62](https://gitlab.
|
|
|
12
12
|
reset(): void;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:
|
|
15
|
+
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L84)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Drops everything, on an unmount or a disconnect. The next resolve makes a new seed.
|
|
18
18
|
|
|
19
19
|
#### Returns
|
|
20
20
|
|
|
@@ -32,18 +32,18 @@ resolve(
|
|
|
32
32
|
options?): ViewStoreResolution;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:
|
|
35
|
+
Defined in: [packages/play-actor/src/view-store-lifecycle.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L77)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Brings the store in line with an emission, and returns it with its guard.
|
|
38
38
|
|
|
39
39
|
#### Parameters
|
|
40
40
|
|
|
41
|
-
| Parameter | Type | Description
|
|
42
|
-
| ---------------- | ------------------------------------------------------- |
|
|
43
|
-
| `actor` | `unknown` | The actor the emission
|
|
44
|
-
| `view` | [`PlaySpec`](PlaySpec.md) | The derived view
|
|
45
|
-
| `externalStore?` | `StateStore` |
|
|
46
|
-
| `options?` | [`ResolveViewStoreOptions`](ResolveViewStoreOptions.md) | See [ResolveViewStoreOptions](ResolveViewStoreOptions.md).
|
|
41
|
+
| Parameter | Type | Description |
|
|
42
|
+
| ---------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `actor` | `unknown` | The actor of the emission. A different actor drops the store that the code kept. |
|
|
44
|
+
| `view` | [`PlaySpec`](PlaySpec.md) | The derived view. It is not null: a null emission is a GAP, and not a new view. A caller resolves nothing on a null value, and it keeps the store. |
|
|
45
|
+
| `externalStore?` | `StateStore` | The controlled mode: the store of the caller. |
|
|
46
|
+
| `options?` | [`ResolveViewStoreOptions`](ResolveViewStoreOptions.md) | See [ResolveViewStoreOptions](ResolveViewStoreOptions.md). |
|
|
47
47
|
|
|
48
48
|
#### Returns
|
|
49
49
|
|