@xmachines/docs 2.0.0-alpha.1 → 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 +16 -17
- package/api/@xmachines/play/README.md +58 -66
- package/api/@xmachines/play/classes/NonNullableError.md +14 -14
- package/api/@xmachines/play/classes/PlayError.md +32 -34
- package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
- package/api/@xmachines/play/type-aliases/PlayEvent.md +28 -27
- package/api/@xmachines/play-actor/README.md +114 -50
- package/api/@xmachines/play-actor/classes/AbstractActor.md +45 -30
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
- package/api/@xmachines/play-actor/functions/composePlayState.md +27 -0
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +21 -0
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +43 -0
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +28 -0
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +42 -0
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +29 -0
- package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
- package/api/@xmachines/play-actor/functions/typedSpec.md +25 -27
- 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 -15
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +11 -0
- package/api/@xmachines/play-actor/interfaces/Routable.md +6 -6
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +50 -0
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +15 -0
- package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +15 -0
- package/api/@xmachines/play-dom/README.md +123 -86
- 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/functions/createValidationRegistry.md +22 -0
- package/api/@xmachines/play-dom/functions/defineRegistry.md +5 -5
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -8
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +16 -16
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -0
- package/api/@xmachines/play-dom/interfaces/FieldValidationState.md +16 -0
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +17 -17
- package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +2 -0
- package/api/@xmachines/play-dom/interfaces/ValidationRegistry.md +21 -0
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +10 -0
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
- package/api/@xmachines/play-dom/variables/schema.md +35 -45
- package/api/@xmachines/play-dom-router/README.md +68 -51
- 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 +21 -20
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +41 -35
- 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 +65 -55
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
- package/api/@xmachines/play-react/functions/defineRegistry.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useFieldValidation.md +31 -0
- 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/ComponentContext.md +9 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -6
- 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 +38 -31
- 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 +41 -35
- 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 +99 -95
- 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 +6 -6
- package/api/@xmachines/play-router/interfaces/LocationLike.md +11 -11
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -9
- 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 +41 -35
- 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 +5 -5
- 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 +39 -34
- 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 +45 -30
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +41 -35
- 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 +60 -33
- 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 +43 -52
- 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 +41 -35
- 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 +43 -39
- 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 +11 -11
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +41 -35
- 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 +67 -49
- 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 +41 -35
- 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 +38 -16
- 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 +76 -50
- 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 +41 -35
- 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 +39 -39
- 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/useFieldValidation.md +31 -0
- 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 +4 -4
- 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 +66 -57
- 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 +41 -35
- 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 +129 -138
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +148 -114
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -23
- package/api/@xmachines/play-xstate/functions/composeGuards.md +34 -33
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +27 -22
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +19 -14
- 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 +12 -7
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +17 -48
- package/api/@xmachines/play-xstate/functions/hasContext.md +12 -9
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
- package/api/@xmachines/play-xstate/functions/negateGuard.md +26 -20
- 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 -11
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
- package/api/@xmachines/play-xstate/interfaces/RouteObject.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +9 -25
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +13 -11
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +8 -5
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +11 -15
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -19
- package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -26
- package/api/@xmachines/shared/README.md +12 -14
- 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 +12 -7
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +9 -4
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +6 -6
- package/contributing/architecture.md +27 -28
- package/contributing/configuration.md +10 -10
- package/contributing/deployment.md +51 -30
- package/contributing/development.md +90 -21
- package/contributing/testing.md +36 -14
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- 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/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/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/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/examples/README.md +4 -1
- package/examples/basic-state-machine.md +24 -24
- package/examples/form-validation.md +110 -121
- package/examples/multi-router-integration.md +0 -2
- package/examples/routing-patterns.md +60 -94
- package/examples/traffic-light.md +57 -48
- package/guides/README.md +6 -2
- package/guides/actor-model.md +1 -1
- package/guides/getting-started.md +89 -90
- package/guides/inspector.md +197 -0
- package/guides/state-machines.md +55 -69
- package/package.json +10 -7
- package/rfc/play.md +15 -6
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
- package/api/@xmachines/play-xstate/functions/createRoutedMachine.md +0 -87
- package/api/@xmachines/play-xstate/type-aliases/PlayRoutePayload.md +0 -30
- package/api/@xmachines/play-xstate/type-aliases/SetupLike.md +0 -33
- package/api/@xmachines/play-xstate/type-aliases/WithOptional.md +0 -31
- package/api/@xmachines/play-xstate/variables/emptyEventSchema.md +0 -37
- package/api/@xmachines/play-xstate/variables/playMetaSchema.md +0 -40
- package/api/@xmachines/play-xstate/variables/playRouteEventSchema.md +0 -9
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
[API](../../README.md) / @xmachines/play-svelte
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-svelte
|
|
6
4
|
|
|
7
|
-
Svelte 5 renderer for the XMachines Play architecture
|
|
5
|
+
Svelte 5 renderer for the XMachines Play architecture. It connects an actor to a catalog-driven `@xmachines/json-render-svelte` UI, with Svelte 5 runes and TC39 Signals.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
[](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@xmachines/play-svelte)
|
|
10
8
|
|
|
11
9
|
## Installation
|
|
12
10
|
|
|
@@ -14,18 +12,18 @@ Part of the [xmachines-js monorepo](../../README.md).
|
|
|
14
12
|
pnpm add @xmachines/play-svelte
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
**Peer dependencies
|
|
15
|
+
**Peer dependencies.** Install them separately:
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
pnpm add svelte@^5.0.0 xstate@^
|
|
21
|
-
@xmachines/json-render-core@^0.
|
|
18
|
+
pnpm add svelte@^5.0.0 xstate@^5.31.0 @xstate/store@^3.17.0 \
|
|
19
|
+
@xmachines/json-render-core@^0.20.0-xm.2 @xmachines/json-render-svelte@^0.20.0-xm.2 @xmachines/json-render-xstate@^0.20.0-xm.2
|
|
22
20
|
```
|
|
23
21
|
|
|
24
22
|
## Usage
|
|
25
23
|
|
|
26
24
|
### Basic setup
|
|
27
25
|
|
|
28
|
-
Define
|
|
26
|
+
Define the catalog and the registry one time. Then give both to `PlayUIProvider`, together with your actor. `PlayRenderer` then renders the current view of the actor:
|
|
29
27
|
|
|
30
28
|
```svelte
|
|
31
29
|
<!-- App.svelte -->
|
|
@@ -55,15 +53,23 @@ Define a catalog and registry once, then pass both to `PlayUIProvider` with your
|
|
|
55
53
|
|
|
56
54
|
### Lower-level: ActorProvider
|
|
57
55
|
|
|
58
|
-
Use `ActorProvider` directly when you need
|
|
56
|
+
Use `ActorProvider` directly when you need more control over the rendering. For example, use it to add a custom layout, or to add each `@xmachines/json-render-svelte` provider one by one:
|
|
59
57
|
|
|
60
58
|
```svelte
|
|
61
59
|
<script lang="ts">
|
|
62
60
|
import { ActorProvider } from "@xmachines/play-svelte";
|
|
63
61
|
|
|
64
|
-
let { actor, registryResult } = $props();
|
|
62
|
+
let { actor, registryResult, children } = $props();
|
|
63
|
+
|
|
64
|
+
function handleError(error: unknown, reset: () => void) {
|
|
65
|
+
console.error(error);
|
|
66
|
+
}
|
|
65
67
|
</script>
|
|
66
68
|
|
|
69
|
+
{#snippet loadingSnippet()}
|
|
70
|
+
<div>Loading…</div>
|
|
71
|
+
{/snippet}
|
|
72
|
+
|
|
67
73
|
<ActorProvider {actor} {registryResult} fallback={loadingSnippet} onError={handleError}>
|
|
68
74
|
<!-- children rendered inside StateProvider tree -->
|
|
69
75
|
{@render children()}
|
|
@@ -84,20 +90,20 @@ actor.send({ type: "some.event" });
|
|
|
84
90
|
|
|
85
91
|
### Components
|
|
86
92
|
|
|
87
|
-
| Component | Description
|
|
88
|
-
| ------------------ |
|
|
89
|
-
| `<PlayUIProvider>` |
|
|
90
|
-
| `<ActorProvider>` | Primitive provider — owns actor lifecycle, signal subscription, per-view `StateStore`, and `onRenderError` injection.
|
|
91
|
-
| `<PlayRenderer>` | Zero-prop leaf component — reads `getPlayViewContext()` and renders `<Renderer>` from `@xmachines/json-render-svelte`.
|
|
93
|
+
| Component | Description |
|
|
94
|
+
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `<PlayUIProvider>` | Composite provider. It wraps `ActorProvider` and `JsonUIProvider`. Use it as the standard entry point for an actor-driven UI. |
|
|
96
|
+
| `<ActorProvider>` | Primitive provider — owns actor lifecycle, signal subscription, per-view `StateStore`, and `onRenderError` injection. |
|
|
97
|
+
| `<PlayRenderer>` | Zero-prop leaf component — reads `getPlayViewContext()` and renders `<Renderer>` from `@xmachines/json-render-svelte`. |
|
|
92
98
|
|
|
93
99
|
### Functions
|
|
94
100
|
|
|
95
101
|
| Function | Description |
|
|
96
102
|
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
103
|
| `defineRegistry(catalog, options)` | Creates a typed component registry. Wraps `@xmachines/json-render-svelte`'s `defineRegistry` with catalog-typed `params` on action handlers. Import from `@xmachines/play-svelte`, not `@xmachines/json-render-svelte`. |
|
|
98
|
-
| `getActorContext()` | Returns the `AnyPlayActor`
|
|
104
|
+
| `getActorContext()` | Returns the `AnyPlayActor` of the nearest `ActorProvider` ancestor. It throws when the caller is outside the provider tree. |
|
|
99
105
|
| `getPlayViewContext()` | Returns the `ViewContextValue` (spec, registry, handlers, store) from the nearest `ActorProvider` ancestor. |
|
|
100
|
-
| `setActorContext(actor)` | Sets the actor context
|
|
106
|
+
| `setActorContext(actor)` | Sets the actor context. `ActorProvider` uses it internally. |
|
|
101
107
|
|
|
102
108
|
### Types
|
|
103
109
|
|
|
@@ -105,17 +111,17 @@ actor.send({ type: "some.event" });
|
|
|
105
111
|
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
106
112
|
| `ActorProviderProps` | Props for `<ActorProvider>`: `actor`, `registryResult`, optional `store`, `fallback` snippet, `onError`, `onRenderError`, `children`. |
|
|
107
113
|
| `PlayUIProviderProps` | Extends `ActorProviderProps` with optional `validationFunctions`, `navigate`, and `functions`. |
|
|
108
|
-
| `ViewContextValue` | The view context shape
|
|
109
|
-
| `AnyPlayActor` | `AbstractActor<AnyActorLogic> & Viewable` — the actor shape
|
|
114
|
+
| `ViewContextValue` | The view context shape that `ActorProvider` provides and `PlayRenderer` reads. |
|
|
115
|
+
| `AnyPlayActor` | `AbstractActor<AnyActorLogic> & Viewable` — the actor shape that `ActorProvider` and `getActorContext` accept. |
|
|
110
116
|
| `DefineRegistryOptions<C>` | Options for `defineRegistry`: `components`, catalog-typed `actions`, and `onRenderError`. |
|
|
111
|
-
| `ActionFn<C, K>` |
|
|
117
|
+
| `ActionFn<C, K>` | The handler type for one action. The params come from the catalog. |
|
|
112
118
|
| `Actions<C>` | Map of catalog-typed action handlers. |
|
|
113
|
-
| `SetState` |
|
|
114
|
-
| `RenderErrorHandler` |
|
|
119
|
+
| `SetState` | The state setter type. Each action handler receives it as the second argument. |
|
|
120
|
+
| `RenderErrorHandler` | The callback `(error: unknown, elementType: string) => void`. The renderer calls it when a catalog component throws. |
|
|
115
121
|
|
|
116
122
|
### Re-exports from `@xmachines/json-render-svelte`
|
|
117
123
|
|
|
118
|
-
Import everything from `@xmachines/play-svelte
|
|
124
|
+
Import everything from `@xmachines/play-svelte`. This package re-exports these providers:
|
|
119
125
|
|
|
120
126
|
```ts
|
|
121
127
|
import {
|
|
@@ -152,30 +158,33 @@ Or from within the package directory:
|
|
|
152
158
|
pnpm test
|
|
153
159
|
```
|
|
154
160
|
|
|
155
|
-
|
|
161
|
+
The tests run with [Vitest](https://vitest.dev/) in a `jsdom` environment, together with `@testing-library/svelte`. The browser tests are in `test/browser/`. They use a separate config with Playwright:
|
|
156
162
|
|
|
157
163
|
```bash
|
|
158
164
|
# From the package directory
|
|
159
165
|
pnpm exec vitest --config vitest.browser.config.ts
|
|
160
166
|
```
|
|
161
167
|
|
|
162
|
-
**Coverage thresholds:** 80% lines, functions, branches, and statements
|
|
168
|
+
**Coverage thresholds:** 80% for lines, functions, branches, and statements. The v8 provider enforces them.
|
|
163
169
|
|
|
164
170
|
## License
|
|
165
171
|
|
|
166
172
|
MIT — see [LICENSE](./LICENSE).
|
|
167
173
|
|
|
168
|
-
@xmachines/play-svelte - Svelte renderer for XMachines Play architecture
|
|
174
|
+
@xmachines/play-svelte - Svelte renderer for the XMachines Play architecture
|
|
169
175
|
|
|
170
|
-
|
|
176
|
+
The package splits the provider from the renderer, in the same way as
|
|
177
|
+
@xmachines/json-render-svelte:
|
|
171
178
|
|
|
172
|
-
- ActorProvider:
|
|
173
|
-
|
|
174
|
-
- PlayUIProvider:
|
|
175
|
-
- PlayRenderer:
|
|
179
|
+
- ActorProvider: the low-level provider. It owns the actor lifecycle, the signal
|
|
180
|
+
subscription, the StateStore of each view, and the injection of onRenderError
|
|
181
|
+
- PlayUIProvider: the composite provider (ActorProvider and JsonUIProvider)
|
|
182
|
+
- PlayRenderer: the leaf without props. It reads getPlayViewContext() and renders
|
|
183
|
+
the Renderer
|
|
176
184
|
|
|
177
|
-
|
|
178
|
-
from @xmachines/play-svelte
|
|
185
|
+
The package re-exports the primitives of @xmachines/json-render-svelte. A
|
|
186
|
+
consumer therefore imports everything from @xmachines/play-svelte, and not from
|
|
187
|
+
@xmachines/json-render-svelte.
|
|
179
188
|
|
|
180
189
|
## Interfaces
|
|
181
190
|
|
|
@@ -222,18 +231,36 @@ Renames and re-exports [PlayRenderer](variables/PlayRenderer.md)
|
|
|
222
231
|
|
|
223
232
|
---
|
|
224
233
|
|
|
234
|
+
### FieldValidationState
|
|
235
|
+
|
|
236
|
+
Renames and re-exports [JSONUIProviderProps](type-aliases/JSONUIProviderProps.md)
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
225
240
|
### getBoundProp
|
|
226
241
|
|
|
227
242
|
Renames and re-exports [JSONUIProviderProps](type-aliases/JSONUIProviderProps.md)
|
|
228
243
|
|
|
229
244
|
---
|
|
230
245
|
|
|
246
|
+
### getFieldValidation
|
|
247
|
+
|
|
248
|
+
Renames and re-exports [JSONUIProviderProps](type-aliases/JSONUIProviderProps.md)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
231
252
|
### getStateValue
|
|
232
253
|
|
|
233
254
|
Renames and re-exports [JSONUIProviderProps](type-aliases/JSONUIProviderProps.md)
|
|
234
255
|
|
|
235
256
|
---
|
|
236
257
|
|
|
258
|
+
### getValidationContext
|
|
259
|
+
|
|
260
|
+
Renames and re-exports [JSONUIProviderProps](type-aliases/JSONUIProviderProps.md)
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
237
264
|
### JsonUIProvider
|
|
238
265
|
|
|
239
266
|
Renames and re-exports [PlayRenderer](variables/PlayRenderer.md)
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
function defineRegistry<C>(catalog, options): DefineRegistryResult;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/define-registry.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/define-registry.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/define-registry.ts#L156)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Creates a component registry, and gives each action handler its catalog-typed `params`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
`@xmachines/
|
|
13
|
+
This function is the drop-in replacement for `defineRegistry` from
|
|
14
|
+
`@xmachines/json-render-svelte`. Import it from `@xmachines/play-svelte`, and each
|
|
15
|
+
action then gets its param type from the catalog.
|
|
15
16
|
|
|
16
17
|
## Type Parameters
|
|
17
18
|
|
|
@@ -21,10 +22,10 @@ Drop-in replacement for `defineRegistry` from `@xmachines/json-render-svelte`. I
|
|
|
21
22
|
|
|
22
23
|
## Parameters
|
|
23
24
|
|
|
24
|
-
| Parameter | Type | Description
|
|
25
|
-
| --------- | ------------------------------------------------------------------------ |
|
|
26
|
-
| `catalog` | `C` | The json-render catalog
|
|
27
|
-
| `options` | [`DefineRegistryOptions`](../interfaces/DefineRegistryOptions.md)\<`C`\> |
|
|
25
|
+
| Parameter | Type | Description |
|
|
26
|
+
| --------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
|
|
27
|
+
| `catalog` | `C` | The json-render catalog. It defines the prop shape of each component and the schema of each action. |
|
|
28
|
+
| `options` | [`DefineRegistryOptions`](../interfaces/DefineRegistryOptions.md)\<`C`\> | The registry options. Each `actions` entry receives its params with the type from the catalog. |
|
|
28
29
|
|
|
29
30
|
## Returns
|
|
30
31
|
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
function getActorContext(): AnyPlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L42)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Returns the actor of the nearest ActorProvider ancestor.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
This function had the name useActor() before. The new name follows the
|
|
14
|
+
get*Context() convention of @xmachines/json-render-svelte (D-07).
|
|
14
15
|
|
|
15
16
|
## Returns
|
|
16
17
|
|
|
@@ -18,4 +19,4 @@ Renamed from useActor() to match @xmachines/json-render-svelte's get*Context() c
|
|
|
18
19
|
|
|
19
20
|
## Throws
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
When the caller is outside <ActorProvider> or <PlayUIProvider>
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
function getPlayViewContext(): ViewContextValue;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L63)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Returns the current view context of the nearest ActorProvider ancestor.
|
|
12
12
|
|
|
13
13
|
## Returns
|
|
14
14
|
|
|
@@ -16,4 +16,4 @@ Get the current view context from the nearest ActorProvider ancestor.
|
|
|
16
16
|
|
|
17
17
|
## Throws
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
When the caller is outside <ActorProvider> or <PlayUIProvider>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function setActorContext(actor): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L31)
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ActorProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L72)
|
|
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
|
|
|
@@ -33,12 +35,12 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
33
35
|
|
|
34
36
|
## Properties
|
|
35
37
|
|
|
36
|
-
| Property | Type | Description
|
|
37
|
-
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) |
|
|
39
|
-
| <a id="property-children"></a> `children` | `Snippet` | -
|
|
40
|
-
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | -
|
|
41
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | -
|
|
42
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) |
|
|
43
|
-
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` |
|
|
44
|
-
| <a id="property-store"></a> `store?` | `StateStore` |
|
|
38
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
39
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [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) |
|
|
41
|
+
| <a id="property-children"></a> `children` | `Snippet` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L75) |
|
|
42
|
+
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L73) |
|
|
43
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L74) |
|
|
44
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [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) |
|
|
45
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [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) |
|
|
46
|
+
| <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. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [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,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DefineRegistryOptions\<C\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/define-registry.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/define-registry.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/define-registry.ts#L94)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The options of `defineRegistry`.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
`Record<string, DefineRegistryActionFn>`
|
|
9
|
+
The shape is the same as the shape above it, but the untyped
|
|
10
|
+
`Record<string, DefineRegistryActionFn>` becomes the catalog-typed `Actions<C>` map.
|
|
11
11
|
|
|
12
12
|
## Type Parameters
|
|
13
13
|
|
|
@@ -17,8 +17,8 @@ Mirrors the upstream shape but replaces the untyped
|
|
|
17
17
|
|
|
18
18
|
## Properties
|
|
19
19
|
|
|
20
|
-
| Property | Type | Description
|
|
21
|
-
| ---------------------------------------------------- | ------------------------------------------------------------- |
|
|
22
|
-
| <a id="property-actions"></a> `actions?` | [`Actions`](../type-aliases/Actions.md)\<`C`\> |
|
|
23
|
-
| <a id="property-components"></a> `components?` | `Components`\<`C`\> | Svelte component implementations
|
|
24
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) |
|
|
20
|
+
| Property | Type | Description | Defined in |
|
|
21
|
+
| ---------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
22
|
+
| <a id="property-actions"></a> `actions?` | [`Actions`](../type-aliases/Actions.md)\<`C`\> | The catalog-typed map of the action handlers. Each handler receives `params` with the exact schema of the catalog action, or `undefined` when the caller gives no params. It also receives the `setState` argument and the `state` argument of the package above. Test for `undefined` before you read a param: **Example** `actions: { login: async (params) => { if (!params) return; actor.send({ type: "auth.login", username: params.username }); }, logout: async () => actor.send({ type: "auth.logout" }), }` | [packages/play-svelte/src/define-registry.ts:118](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/define-registry.ts#L118) |
|
|
23
|
+
| <a id="property-components"></a> `components?` | `Components`\<`C`\> | The Svelte component implementations, with the catalog component name as the key. | [packages/play-svelte/src/define-registry.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/define-registry.ts#L98) |
|
|
24
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The callback that the renderer calls when a catalog component throws during a render. The inner `<svelte:boundary>` of `@xmachines/json-render-svelte` catches the error, and that boundary wraps each element. With this callback, the default `console.error(...)` fallback does not run: the renderer removes the component from the DOM, and your callback receives the error and the name of the element type. You can then report the error, or you can recover from it. **Example** `const { registry, handlers } = defineRegistry(authCatalog, { components: { Login, Dashboard }, actions: { ... }, onRenderError(error, elementType) { console.warn(`Component <${elementType}> crashed:`, error); reportToSentry(error, { componentType: elementType }); }, });` **Param** **error** The value that the component threw. It is not always an `Error` instance. **Param** **elementType** The name of the catalog component that failed, for example `"Dashboard"`. | [packages/play-svelte/src/define-registry.ts:143](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/define-registry.ts#L143) |
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayUIProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L82)
|
|
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
|
|
|
@@ -29,15 +31,15 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
29
31
|
|
|
30
32
|
## Properties
|
|
31
33
|
|
|
32
|
-
| Property | Type | Description
|
|
33
|
-
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) |
|
|
35
|
-
| <a id="property-children"></a> `children` | `Snippet` | -
|
|
36
|
-
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | -
|
|
37
|
-
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | -
|
|
38
|
-
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | -
|
|
39
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | -
|
|
40
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) |
|
|
41
|
-
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` |
|
|
42
|
-
| <a id="property-store"></a> `store?` | `StateStore` |
|
|
43
|
-
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | -
|
|
34
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
35
|
+
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
36
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [`ActorProviderProps`](ActorProviderProps.md).[`actor`](ActorProviderProps.md#property-actor) | [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) |
|
|
37
|
+
| <a id="property-children"></a> `children` | `Snippet` | - | [`ActorProviderProps`](ActorProviderProps.md).[`children`](ActorProviderProps.md#property-children) | [packages/play-svelte/src/actor-context.svelte.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L75) |
|
|
38
|
+
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | [`ActorProviderProps`](ActorProviderProps.md).[`fallback`](ActorProviderProps.md#property-fallback) | [packages/play-svelte/src/actor-context.svelte.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L73) |
|
|
39
|
+
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L88) |
|
|
40
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L87) |
|
|
41
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | [`ActorProviderProps`](ActorProviderProps.md).[`onError`](ActorProviderProps.md#property-onerror) | [packages/play-svelte/src/actor-context.svelte.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L74) |
|
|
42
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [`ActorProviderProps`](ActorProviderProps.md).[`onRenderError`](ActorProviderProps.md#property-onrendererror) | [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) |
|
|
43
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [`ActorProviderProps`](ActorProviderProps.md).[`registryResult`](ActorProviderProps.md#property-registryresult) | [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) |
|
|
44
|
+
| <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. | [`ActorProviderProps`](ActorProviderProps.md).[`store`](ActorProviderProps.md#property-store) | [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) |
|
|
45
|
+
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L83) |
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewContextValue
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L51)
|
|
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
|
## Extends
|
|
14
15
|
|
|
@@ -16,9 +17,9 @@ type) so it is typed via `TRegistry` — the same generic used in `BaseActorProv
|
|
|
16
17
|
|
|
17
18
|
## Properties
|
|
18
19
|
|
|
19
|
-
| Property | Type | Description
|
|
20
|
-
| ----------------------------------------- | ----------------------------------------------------- |
|
|
21
|
-
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> |
|
|
22
|
-
| <a id="property-registry"></a> `registry` | `TRegistry` |
|
|
23
|
-
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render.
|
|
24
|
-
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore
|
|
20
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
21
|
+
| ----------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | The action handlers, resolved against the live StateStore. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`handlers`](../../play-actor/interfaces/BaseViewContextValue.md#property-handlers) | [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) |
|
|
23
|
+
| <a id="property-registry"></a> `registry` | `TRegistry` | The component registry, from registryResult.registry. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`registry`](../../play-actor/interfaces/BaseViewContextValue.md#property-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) |
|
|
24
|
+
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`spec`](../../play-actor/interfaces/BaseViewContextValue.md#property-spec) | [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) |
|
|
25
|
+
| <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. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`store`](../../play-actor/interfaces/BaseViewContextValue.md#property-store) | [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) |
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type AnyPlayActor = AbstractActor<AnyActorLogic> & Viewable;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-svelte/src/actor-context.svelte.ts#L25)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The actor type that the Svelte `ActorProvider` and `getActorContext` accept. It requires `Viewable` for the view rendering. For the complete routing and view shape, use `PlayActor` from `@xmachines/play-router`.
|