@xmachines/docs 1.0.0-beta.33 → 1.0.0-beta.34
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/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +9 -10
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +7 -10
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +46 -0
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +33 -0
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +4 -4
- package/api/@xmachines/play-dom/README.md +98 -15
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/createPlayUI.md +28 -0
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -9
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +19 -11
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +29 -0
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +6 -6
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +14 -14
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +6 -6
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +14 -0
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +27 -0
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +7 -7
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomSchema.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +25 -0
- package/api/@xmachines/play-dom/type-aliases/RenderErrorHandler.md +23 -0
- package/api/@xmachines/play-dom/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-dom/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/README.md +165 -48
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/ActionProvider.md +21 -0
- package/api/@xmachines/play-react/functions/JSONUIProvider.md +21 -0
- package/api/@xmachines/play-react/functions/Renderer.md +21 -0
- package/api/@xmachines/play-react/functions/StateProvider.md +27 -0
- package/api/@xmachines/play-react/functions/ValidationProvider.md +21 -0
- package/api/@xmachines/play-react/functions/VisibilityProvider.md +21 -0
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +32 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActionProviderProps.md +15 -0
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +27 -0
- package/api/@xmachines/play-react/interfaces/JSONUIProviderProps.md +21 -0
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +26 -0
- package/api/@xmachines/play-react/interfaces/RendererProps.md +17 -0
- package/api/@xmachines/play-react/interfaces/StateProviderProps.md +16 -0
- package/api/@xmachines/play-react/interfaces/ValidationProviderProps.md +14 -0
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +20 -0
- package/api/@xmachines/play-react/interfaces/VisibilityProviderProps.md +13 -0
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/RenderErrorHandler.md +3 -2
- package/api/@xmachines/play-react/variables/ActorProvider.md +33 -0
- package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -50
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +43 -0
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +23 -23
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +158 -42
- package/api/@xmachines/play-solid/functions/ActionProvider.md +19 -0
- package/api/@xmachines/play-solid/functions/JSONUIProvider.md +21 -0
- package/api/@xmachines/play-solid/functions/Renderer.md +21 -0
- package/api/@xmachines/play-solid/functions/StateProvider.md +19 -0
- package/api/@xmachines/play-solid/functions/ValidationProvider.md +19 -0
- package/api/@xmachines/play-solid/functions/VisibilityProvider.md +20 -0
- package/api/@xmachines/play-solid/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-solid/functions/useAction.md +24 -0
- package/api/@xmachines/play-solid/functions/useActions.md +13 -0
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useFieldValidation.md +29 -0
- package/api/@xmachines/play-solid/functions/useIsVisible.md +19 -0
- package/api/@xmachines/play-solid/functions/useOptionalValidation.md +13 -0
- package/api/@xmachines/play-solid/functions/usePlayView.md +30 -0
- package/api/@xmachines/play-solid/functions/useStateBinding.md +25 -0
- package/api/@xmachines/play-solid/functions/useStateStore.md +13 -0
- package/api/@xmachines/play-solid/functions/useStateValue.md +25 -0
- package/api/@xmachines/play-solid/functions/useVisibility.md +13 -0
- package/api/@xmachines/play-solid/interfaces/ActionProviderProps.md +12 -0
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +30 -0
- package/api/@xmachines/play-solid/interfaces/DefineRegistryResult.md +15 -0
- package/api/@xmachines/play-solid/interfaces/JSONUIProviderProps.md +21 -0
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +26 -0
- package/api/@xmachines/play-solid/interfaces/RendererProps.md +17 -0
- package/api/@xmachines/play-solid/interfaces/StateProviderProps.md +13 -0
- package/api/@xmachines/play-solid/interfaces/ValidationProviderProps.md +11 -0
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +21 -0
- package/api/@xmachines/play-solid/type-aliases/ComponentRegistry.md +17 -0
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/RenderErrorHandler.md +3 -2
- package/api/@xmachines/play-solid/type-aliases/SetState.md +21 -0
- package/api/@xmachines/play-solid/type-aliases/VisibilityProviderProps.md +9 -0
- package/api/@xmachines/play-solid/variables/ActorContext.md +13 -0
- package/api/@xmachines/play-solid/variables/ActorProvider.md +27 -0
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +5 -18
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +26 -0
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/README.md +105 -25
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +21 -0
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +19 -0
- package/api/@xmachines/play-svelte/functions/setActorContext.md +19 -0
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +40 -0
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +6 -6
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +24 -0
- package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-svelte/type-aliases/RenderErrorHandler.md +1 -17
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
- package/api/@xmachines/play-vue/README.md +136 -40
- package/api/@xmachines/play-vue/functions/defineRegistry.md +2 -2
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +28 -0
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActionProviderProps.md +12 -0
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +25 -0
- package/api/@xmachines/play-vue/interfaces/DefineRegistryResult.md +15 -0
- package/api/@xmachines/play-vue/interfaces/JSONUIProviderProps.md +20 -0
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +24 -0
- package/api/@xmachines/play-vue/interfaces/RendererProps.md +17 -0
- package/api/@xmachines/play-vue/interfaces/StateProviderProps.md +15 -0
- package/api/@xmachines/play-vue/interfaces/ValidationProviderProps.md +11 -0
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +21 -0
- 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/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/RenderErrorHandler.md +3 -2
- package/api/@xmachines/play-vue/variables/ActionProvider.md +64 -0
- package/api/@xmachines/play-vue/variables/JSONUIProvider.md +96 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/Renderer.md +79 -0
- package/api/@xmachines/play-vue/variables/StateProvider.md +79 -0
- package/api/@xmachines/play-vue/variables/ValidationProvider.md +55 -0
- package/api/@xmachines/play-vue/variables/VisibilityProvider.md +40 -0
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +24 -24
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +24 -24
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/_media/README.md +98 -15
- package/examples/@xmachines/play-dom-demo/README.md +42 -22
- 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/README.md +53 -46
- 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/README.md +53 -34
- 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/README.md +23 -20
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +8 -10
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +10 -12
- package/examples/@xmachines/play-vue-demo/README.md +55 -37
- package/examples/form-validation.md +33 -42
- package/guides/README.md +8 -0
- package/guides/actor-model.md +180 -0
- package/guides/getting-started.md +18 -14
- package/guides/signals.md +166 -0
- package/guides/state-machines.md +288 -0
- package/package.json +2 -2
- package/rfc/play.md +62 -35
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +0 -17
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +0 -24
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +0 -24
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +0 -22
- package/api/@xmachines/play-svelte/variables/getBoundProp.md +0 -7
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +0 -22
|
@@ -43,14 +43,19 @@ without muting console output.
|
|
|
43
43
|
- `useBoundProp` — re-exported from `@json-render/react`
|
|
44
44
|
- `ComponentFn` (type) — re-exported from `@json-render/react`
|
|
45
45
|
- `ComponentContext` (type) — re-exported from `@json-render/react`
|
|
46
|
-
- `
|
|
46
|
+
- `ActorProvider` — escape hatch primitive (owns actor bridging, signal bridge, store lifecycle)
|
|
47
|
+
- `PlayUIProvider` — batteries-included composite (wraps `ActorProvider` + `JSONUIProvider`)
|
|
48
|
+
- `usePlayView` — hook for accessing the current view spec inside a provider tree
|
|
49
|
+
- `RenderErrorHandler` (type) — inner per-element error callback signature
|
|
50
|
+
- `ActorProviderProps` (type)
|
|
51
|
+
- `ViewContextValue` (type)
|
|
47
52
|
- `PlayActor` (type)
|
|
48
53
|
|
|
49
54
|
## Quick Start
|
|
50
55
|
|
|
51
56
|
```tsx
|
|
52
57
|
import { definePlayer, formatPlayRouteTransitions } from "@xmachines/play-xstate";
|
|
53
|
-
import { PlayRenderer } from "@xmachines/play-react";
|
|
58
|
+
import { PlayUIProvider, PlayRenderer } from "@xmachines/play-react";
|
|
54
59
|
import { defineCatalog } from "@json-render/core";
|
|
55
60
|
import { defineRegistry } from "@xmachines/play-react";
|
|
56
61
|
import type { ComponentFn } from "@xmachines/play-react";
|
|
@@ -121,12 +126,9 @@ const machine = setup({
|
|
|
121
126
|
meta: {
|
|
122
127
|
route: "/login",
|
|
123
128
|
view: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
root: "
|
|
127
|
-
elements: {
|
|
128
|
-
root: { type: "Login", props: { title: "Sign In" }, children: [] },
|
|
129
|
-
},
|
|
129
|
+
root: "root",
|
|
130
|
+
elements: {
|
|
131
|
+
root: { type: "Login", props: { title: "Sign In" }, children: [] },
|
|
130
132
|
},
|
|
131
133
|
},
|
|
132
134
|
},
|
|
@@ -136,12 +138,9 @@ const machine = setup({
|
|
|
136
138
|
meta: {
|
|
137
139
|
route: "/dashboard",
|
|
138
140
|
view: {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
root: "
|
|
142
|
-
elements: {
|
|
143
|
-
root: { type: "Dashboard", props: { username: "" }, children: [] },
|
|
144
|
-
},
|
|
141
|
+
root: "root",
|
|
142
|
+
elements: {
|
|
143
|
+
root: { type: "Dashboard", props: { username: "" }, children: [] },
|
|
145
144
|
},
|
|
146
145
|
},
|
|
147
146
|
},
|
|
@@ -171,31 +170,36 @@ const actor = createPlayer();
|
|
|
171
170
|
actor.start();
|
|
172
171
|
|
|
173
172
|
function App() {
|
|
174
|
-
return
|
|
173
|
+
return (
|
|
174
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
175
|
+
<PlayRenderer />
|
|
176
|
+
</PlayUIProvider>
|
|
177
|
+
);
|
|
175
178
|
}
|
|
176
179
|
```
|
|
177
180
|
|
|
178
181
|
## API Reference
|
|
179
182
|
|
|
180
|
-
### `
|
|
183
|
+
### `PlayUIProvider`
|
|
181
184
|
|
|
182
|
-
|
|
185
|
+
Batteries-included composite provider. Wraps `ActorProvider` + `JSONUIProvider`. Pass `actor` and `registryResult` here, then place `<PlayRenderer />` inside as a zero-prop child.
|
|
183
186
|
|
|
184
187
|
```tsx
|
|
185
|
-
<
|
|
188
|
+
<PlayUIProvider
|
|
186
189
|
actor={actor} // required
|
|
187
190
|
registryResult={registryResult} // required
|
|
188
191
|
store={myStore} // optional — controlled mode
|
|
189
192
|
fallback={<p>Loading…</p>} // optional
|
|
190
|
-
|
|
193
|
+
onError={(err, info) => Sentry.captureException(err, { extra: info })} // optional
|
|
194
|
+
onRenderError={(error, elementType) => console.warn(`<${elementType}> crashed:`, error)} // optional
|
|
195
|
+
>
|
|
196
|
+
<PlayRenderer />
|
|
197
|
+
</PlayUIProvider>
|
|
191
198
|
```
|
|
192
199
|
|
|
193
200
|
**`actor`** — A `PlayerActor` (or any `AbstractActor & Viewable`). Provides the `currentView` signal.
|
|
194
201
|
|
|
195
|
-
**`registryResult`** — Full result from `defineRegistry(catalog, { components, actions })`.
|
|
196
|
-
|
|
197
|
-
`defineRegistry` also accepts `onRenderError(error, elementType)`, which receives errors
|
|
198
|
-
caught by `@json-render/react`'s inner element boundary before the default logger is used.
|
|
202
|
+
**`registryResult`** — Full result from `defineRegistry(catalog, { components, actions })`. Contains both the component registry and action handlers.
|
|
199
203
|
|
|
200
204
|
**`store`** (optional) — Controls per-view UI state (form values, `$state` bindings):
|
|
201
205
|
|
|
@@ -209,31 +213,99 @@ import type { StateStore } from "@json-render/core";
|
|
|
209
213
|
|
|
210
214
|
const store: StateStore = xstateStoreStateStore({ atom: createAtom({ username: "alice" }) });
|
|
211
215
|
|
|
212
|
-
<
|
|
216
|
+
<PlayUIProvider actor={actor} registryResult={registryResult} store={store}>
|
|
217
|
+
<PlayRenderer />
|
|
218
|
+
</PlayUIProvider>;
|
|
213
219
|
```
|
|
214
220
|
|
|
215
|
-
|
|
216
|
-
|
|
221
|
+
**`fallback`** — Shown when `actor.currentView.get()` is `null` (machine in a no-view state, or during initialisation).
|
|
222
|
+
|
|
223
|
+
**`onError`** — Called when the outer `PlayErrorBoundary` catches an error. Receives `(error: Error, info: React.ErrorInfo)`. Use for observability tools (Sentry, Datadog, etc.).
|
|
224
|
+
|
|
225
|
+
**`onRenderError`** — Called when an individual catalog component throws during render. Caught by `@json-render/react`'s inner per-element boundary — the failed component is silently removed while the rest of the spec continues rendering. `onError` / `fallback` are **not** triggered. When both `onRenderError` on `PlayUIProvider` and on `defineRegistry` are set, the prop wins.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### `ActorProvider`
|
|
230
|
+
|
|
231
|
+
Escape hatch primitive. Owns actor bridging, signal bridge, and store lifecycle. Use this when you need direct control over the provider layer (e.g. custom `JSONUIProvider` configuration).
|
|
217
232
|
|
|
218
233
|
```tsx
|
|
234
|
+
import { ActorProvider } from "@xmachines/play-react";
|
|
235
|
+
|
|
236
|
+
<ActorProvider
|
|
237
|
+
actor={actor}
|
|
238
|
+
registryResult={registryResult}
|
|
239
|
+
onRenderError={(err, type) => reportError(err, type)}
|
|
240
|
+
>
|
|
241
|
+
{/* your own JSONUIProvider + PlayRenderer tree */}
|
|
242
|
+
</ActorProvider>;
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
### `PlayRenderer`
|
|
248
|
+
|
|
249
|
+
Zero-prop leaf component. Must be rendered inside a `PlayUIProvider` (or `ActorProvider`) tree. Subscribes to `actor.currentView` via context and renders the current spec.
|
|
250
|
+
|
|
251
|
+
```tsx
|
|
252
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
253
|
+
<PlayRenderer />
|
|
254
|
+
</PlayUIProvider>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`PlayRenderer` accepts no props — all configuration (`actor`, `registryResult`, `store`, `fallback`, `onError`, `onRenderError`) is provided by the enclosing `PlayUIProvider` or `ActorProvider`.
|
|
258
|
+
|
|
259
|
+
## Error handling
|
|
260
|
+
|
|
261
|
+
The provider tree has two layers of error boundaries:
|
|
262
|
+
|
|
263
|
+
### Outer boundary — `onError` and `fallback`
|
|
264
|
+
|
|
265
|
+
Wraps the entire renderer output via `PlayErrorBoundary`. Triggered when the spec or store setup throws, or when the inner boundary is not present.
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
<PlayUIProvider
|
|
269
|
+
actor={actor}
|
|
270
|
+
registryResult={registryResult}
|
|
271
|
+
fallback={<p>Something went wrong.</p>}
|
|
272
|
+
onError={(err, info) => Sentry.captureException(err, { extra: info })}
|
|
273
|
+
>
|
|
274
|
+
<PlayRenderer />
|
|
275
|
+
</PlayUIProvider>
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### Inner boundary — `onRenderError`
|
|
279
|
+
|
|
280
|
+
Each catalog element is individually wrapped in an error boundary by `@json-render/react`. When a component throws, it is silently removed while the rest of the spec continues rendering. The outer boundary is **not** triggered.
|
|
281
|
+
|
|
282
|
+
Pass `onRenderError` to `PlayUIProvider` (or `ActorProvider`) — overrides any registry-level handler — or bake it into `defineRegistry`:
|
|
283
|
+
|
|
284
|
+
```tsx
|
|
285
|
+
// via PlayUIProvider prop
|
|
286
|
+
<PlayUIProvider
|
|
287
|
+
actor={actor}
|
|
288
|
+
registryResult={registryResult}
|
|
289
|
+
onRenderError={(error, elementType) => {
|
|
290
|
+
console.warn(`<${elementType}> crashed:`, error);
|
|
291
|
+
}}
|
|
292
|
+
>
|
|
293
|
+
<PlayRenderer />
|
|
294
|
+
</PlayUIProvider>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
```ts
|
|
298
|
+
// via defineRegistry — bakes the handler into the registry
|
|
219
299
|
const registryResult = defineRegistry(catalog, {
|
|
220
300
|
components: { Login, Dashboard },
|
|
221
|
-
actions: {
|
|
222
|
-
login: async (params) => {
|
|
223
|
-
if (!params) return;
|
|
224
|
-
actor.send({ type: "auth.login", username: params.username });
|
|
225
|
-
},
|
|
226
|
-
logout: async () => {
|
|
227
|
-
actor.send({ type: "auth.logout" });
|
|
228
|
-
},
|
|
229
|
-
},
|
|
301
|
+
actions: { login: async (params) => { ... }, logout: async () => { ... } },
|
|
230
302
|
onRenderError(error, elementType) {
|
|
231
303
|
reportExpectedRenderError(error, elementType);
|
|
232
304
|
},
|
|
233
305
|
});
|
|
234
306
|
```
|
|
235
307
|
|
|
236
|
-
|
|
308
|
+
`onRenderError` is typed as `RenderErrorHandler` and exported from `@xmachines/play-react`.
|
|
237
309
|
|
|
238
310
|
---
|
|
239
311
|
|
|
@@ -251,7 +323,7 @@ function LogoutButton() {
|
|
|
251
323
|
}
|
|
252
324
|
```
|
|
253
325
|
|
|
254
|
-
Throws `"useActor() must be called inside <
|
|
326
|
+
Throws `NonNullableError: "useActor() must be called inside <ActorProvider> (or <PlayUIProvider>)"` if called outside the tree.
|
|
255
327
|
|
|
256
328
|
---
|
|
257
329
|
|
|
@@ -278,7 +350,7 @@ function NavBar({ actor }: { actor: ReturnType<typeof createPlayer> }) {
|
|
|
278
350
|
|
|
279
351
|
### `PlayErrorBoundary`
|
|
280
352
|
|
|
281
|
-
Class error boundary that wraps the rendered output.
|
|
353
|
+
Class error boundary that wraps the rendered output. `PlayRenderer` wraps its own output in this boundary automatically — use this directly only if you need to wrap other content or nest boundaries manually.
|
|
282
354
|
|
|
283
355
|
`componentDidCatch` invokes the `onError` prop (for observability tools) but does **not** re-throw — re-throwing from `componentDidCatch` can unmount the entire React 19 root. `getDerivedStateFromError` handles fallback state transition instead.
|
|
284
356
|
|
|
@@ -289,7 +361,9 @@ import { PlayErrorBoundary } from "@xmachines/play-react";
|
|
|
289
361
|
fallback={<p>Something went wrong.</p>}
|
|
290
362
|
onError={(err, info) => Sentry.captureException(err, { extra: info })}
|
|
291
363
|
>
|
|
292
|
-
<
|
|
364
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
365
|
+
<PlayRenderer />
|
|
366
|
+
</PlayUIProvider>
|
|
293
367
|
</PlayErrorBoundary>;
|
|
294
368
|
```
|
|
295
369
|
|
|
@@ -311,10 +385,10 @@ Priority: **route param fills `undefined` slots; explicit non-`undefined` spec p
|
|
|
311
385
|
|
|
312
386
|
## Error Handling
|
|
313
387
|
|
|
314
|
-
| Error
|
|
315
|
-
|
|
|
316
|
-
| `useActor() must be called inside <
|
|
317
|
-
| Component render error
|
|
388
|
+
| Error | Cause | Fix |
|
|
389
|
+
| ------------------------------------------------------------------------ | ---------------------------- | ---------------------------------------------------------------- |
|
|
390
|
+
| `useActor() must be called inside <ActorProvider> (or <PlayUIProvider>)` | Hook called outside the tree | Wrap with `<PlayUIProvider>` or `<ActorProvider>` |
|
|
391
|
+
| Component render error | Component throws | `PlayErrorBoundary` catches it; inspect component implementation |
|
|
318
392
|
|
|
319
393
|
---
|
|
320
394
|
|
|
@@ -327,7 +401,7 @@ Priority: **route param fills `undefined` slots; explicit non-`undefined` spec p
|
|
|
327
401
|
|
|
328
402
|
@xmachines/play-react - React renderer for XMachines Play architecture
|
|
329
403
|
|
|
330
|
-
Provides a
|
|
404
|
+
Provides a provider-based React rendering layer that passively observes actor signals
|
|
331
405
|
and renders UI components via @json-render/react. This package enables
|
|
332
406
|
framework-swappable architecture where React is just a rendering target
|
|
333
407
|
that subscribes to signal changes.
|
|
@@ -335,9 +409,23 @@ that subscribes to signal changes.
|
|
|
335
409
|
**Key principle:** React state is NEVER used for business logic—only for
|
|
336
410
|
triggering React's render cycle. Signals are the source of truth.
|
|
337
411
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
412
|
+
**Standard usage:**
|
|
413
|
+
|
|
414
|
+
```tsx
|
|
415
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
416
|
+
<PlayRenderer />
|
|
417
|
+
</PlayUIProvider>
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Escape hatch (custom composition):**
|
|
421
|
+
|
|
422
|
+
```tsx
|
|
423
|
+
<ActorProvider actor={actor} registryResult={registryResult}>
|
|
424
|
+
<JSONUIProvider registry={registryResult.registry}>
|
|
425
|
+
<PlayRenderer />
|
|
426
|
+
</JSONUIProvider>
|
|
427
|
+
</ActorProvider>
|
|
428
|
+
```
|
|
341
429
|
|
|
342
430
|
## Classes
|
|
343
431
|
|
|
@@ -345,10 +433,18 @@ from `@xmachines/play-react` rather than `@json-render/react` directly.
|
|
|
345
433
|
|
|
346
434
|
## Interfaces
|
|
347
435
|
|
|
436
|
+
- [ActionProviderProps](interfaces/ActionProviderProps.md)
|
|
437
|
+
- [ActorProviderProps](interfaces/ActorProviderProps.md)
|
|
348
438
|
- [ComponentContext](interfaces/ComponentContext.md)
|
|
439
|
+
- [JSONUIProviderProps](interfaces/JSONUIProviderProps.md)
|
|
349
440
|
- [PlayErrorBoundaryProps](interfaces/PlayErrorBoundaryProps.md)
|
|
350
441
|
- [PlayErrorBoundaryState](interfaces/PlayErrorBoundaryState.md)
|
|
351
|
-
- [
|
|
442
|
+
- [PlayUIProviderProps](interfaces/PlayUIProviderProps.md)
|
|
443
|
+
- [RendererProps](interfaces/RendererProps.md)
|
|
444
|
+
- [StateProviderProps](interfaces/StateProviderProps.md)
|
|
445
|
+
- [ValidationProviderProps](interfaces/ValidationProviderProps.md)
|
|
446
|
+
- [ViewContextValue](interfaces/ViewContextValue.md)
|
|
447
|
+
- [VisibilityProviderProps](interfaces/VisibilityProviderProps.md)
|
|
352
448
|
|
|
353
449
|
## Type Aliases
|
|
354
450
|
|
|
@@ -358,11 +454,32 @@ from `@xmachines/play-react` rather than `@json-render/react` directly.
|
|
|
358
454
|
|
|
359
455
|
## Variables
|
|
360
456
|
|
|
457
|
+
- [ActorProvider](variables/ActorProvider.md)
|
|
361
458
|
- [PlayRenderer](variables/PlayRenderer.md)
|
|
459
|
+
- [PlayUIProvider](variables/PlayUIProvider.md)
|
|
362
460
|
|
|
363
461
|
## Functions
|
|
364
462
|
|
|
463
|
+
- [ActionProvider](functions/ActionProvider.md)
|
|
365
464
|
- [defineRegistry](functions/defineRegistry.md)
|
|
465
|
+
- [JSONUIProvider](functions/JSONUIProvider.md)
|
|
466
|
+
- [Renderer](functions/Renderer.md)
|
|
467
|
+
- [StateProvider](functions/StateProvider.md)
|
|
366
468
|
- [useActor](functions/useActor.md)
|
|
367
469
|
- [useBoundProp](functions/useBoundProp.md)
|
|
470
|
+
- [usePlayView](functions/usePlayView.md)
|
|
368
471
|
- [useSignalEffect](functions/useSignalEffect.md)
|
|
472
|
+
- [ValidationProvider](functions/ValidationProvider.md)
|
|
473
|
+
- [VisibilityProvider](functions/VisibilityProvider.md)
|
|
474
|
+
|
|
475
|
+
## References
|
|
476
|
+
|
|
477
|
+
### PlayRendererProps
|
|
478
|
+
|
|
479
|
+
Renames and re-exports [ActorProviderProps](interfaces/ActorProviderProps.md)
|
|
480
|
+
|
|
481
|
+
---
|
|
482
|
+
|
|
483
|
+
### RenderErrorHandler
|
|
484
|
+
|
|
485
|
+
Re-exports [RenderErrorHandler](type-aliases/RenderErrorHandler.md)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayErrorBoundary
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/PlayErrorBoundary.tsx#L53)
|
|
6
6
|
|
|
7
7
|
React class component error boundary for catching catalog component render errors.
|
|
8
8
|
|
|
@@ -36,7 +36,7 @@ Per CONS-14: Class component pattern works with all React versions (18 and 19).
|
|
|
36
36
|
new PlayErrorBoundary(props): PlayErrorBoundary;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
39
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:57](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/PlayErrorBoundary.tsx#L57)
|
|
40
40
|
|
|
41
41
|
#### Parameters
|
|
42
42
|
|
|
@@ -75,7 +75,7 @@ React.Component<
|
|
|
75
75
|
componentDidCatch(error, info): void;
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
78
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/PlayErrorBoundary.tsx#L66)
|
|
79
79
|
|
|
80
80
|
Catches exceptions generated in descendant components. Unhandled exceptions will cause
|
|
81
81
|
the entire component tree to unmount.
|
|
@@ -375,7 +375,7 @@ React.Component.getSnapshotBeforeUpdate;
|
|
|
375
375
|
render(): ReactNode;
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
378
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/PlayErrorBoundary.tsx#L70)
|
|
379
379
|
|
|
380
380
|
#### Returns
|
|
381
381
|
|
|
@@ -604,7 +604,7 @@ React.Component.UNSAFE_componentWillUpdate;
|
|
|
604
604
|
static getDerivedStateFromError(error): PlayErrorBoundaryState;
|
|
605
605
|
```
|
|
606
606
|
|
|
607
|
-
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
607
|
+
Defined in: [packages/play-react/src/PlayErrorBoundary.tsx:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/PlayErrorBoundary.tsx#L62)
|
|
608
608
|
|
|
609
609
|
#### Parameters
|
|
610
610
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / ActionProvider
|
|
2
|
+
|
|
3
|
+
# Function: ActionProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function ActionProvider(__namedParameters): Element;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Provider for action execution
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
17
|
+
| `__namedParameters` | [`ActionProviderProps`](../interfaces/ActionProviderProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / JSONUIProvider
|
|
2
|
+
|
|
3
|
+
# Function: JSONUIProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function JSONUIProvider(__namedParameters): Element;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Combined provider for all JSONUI contexts
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
17
|
+
| `__namedParameters` | [`JSONUIProviderProps`](../interfaces/JSONUIProviderProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / Renderer
|
|
2
|
+
|
|
3
|
+
# Function: Renderer()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function Renderer(__namedParameters): Element | null;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Main renderer component
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| ------------------- | ------------------------------------------------- |
|
|
17
|
+
| `__namedParameters` | [`RendererProps`](../interfaces/RendererProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element` \| `null`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / StateProvider
|
|
2
|
+
|
|
3
|
+
# Function: StateProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function StateProvider(__namedParameters): Element;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Provider for state model context.
|
|
12
|
+
|
|
13
|
+
Supports two modes:
|
|
14
|
+
|
|
15
|
+
- **Controlled**: pass a `store` prop (e.g. backed by Redux / Zustand).
|
|
16
|
+
- **Uncontrolled** (default): omit `store` and optionally pass
|
|
17
|
+
`initialState` / `onStateChange`.
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
| Parameter | Type |
|
|
22
|
+
| ------------------- | ----------------------------------------------------------- |
|
|
23
|
+
| `__namedParameters` | [`StateProviderProps`](../interfaces/StateProviderProps.md) |
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`Element`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / ValidationProvider
|
|
2
|
+
|
|
3
|
+
# Function: ValidationProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function ValidationProvider(__namedParameters): Element;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Provider for validation
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| ------------------- | --------------------------------------------------------------------- |
|
|
17
|
+
| `__namedParameters` | [`ValidationProviderProps`](../interfaces/ValidationProviderProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / VisibilityProvider
|
|
2
|
+
|
|
3
|
+
# Function: VisibilityProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function VisibilityProvider(__namedParameters): Element;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/react`
|
|
10
|
+
|
|
11
|
+
Provider for visibility evaluation
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| ------------------- | --------------------------------------------------------------------- |
|
|
17
|
+
| `__namedParameters` | [`VisibilityProviderProps`](../interfaces/VisibilityProviderProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`Element`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useActor(): PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/useActor.ts:
|
|
9
|
+
Defined in: [packages/play-react/src/useActor.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/useActor.ts#L31)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / usePlayView
|
|
2
|
+
|
|
3
|
+
# Function: usePlayView()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function usePlayView(): ViewContextValue;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-react/src/ActorProvider.tsx:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/ActorProvider.tsx#L72)
|
|
10
|
+
|
|
11
|
+
Hook to access the current view spec, handlers, and registry.
|
|
12
|
+
|
|
13
|
+
Must be called inside <ActorProvider> or <PlayUIProvider>.
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
[`ViewContextValue`](../interfaces/ViewContextValue.md)
|
|
18
|
+
|
|
19
|
+
## Throws
|
|
20
|
+
|
|
21
|
+
If called outside an ActorProvider/PlayUIProvider tree
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { usePlayView } from "@xmachines/play-react";
|
|
27
|
+
|
|
28
|
+
function MyRenderer() {
|
|
29
|
+
const view = usePlayView();
|
|
30
|
+
return <Renderer spec={view.spec} registry={view.registry} />;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useSignalEffect(callback): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/useSignalEffect.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-react/src/useSignalEffect.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/useSignalEffect.ts#L71)
|
|
10
10
|
|
|
11
11
|
React hook that subscribes to signal changes and runs effect callback
|
|
12
12
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / ActionProviderProps
|
|
2
|
+
|
|
3
|
+
# Interface: ActionProviderProps
|
|
4
|
+
|
|
5
|
+
Defined in: `@json-render/react`
|
|
6
|
+
|
|
7
|
+
Props for ActionProvider
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ------------------------------------------ | ------------------------------------- | ----------------------- | ---------- |
|
|
13
|
+
| <a id="property-children"></a> `children` | `ReactNode` | - | - |
|
|
14
|
+
| <a id="property-handlers"></a> `handlers?` | `Record`\<`string`, `ActionHandler`\> | Initial action handlers | - |
|
|
15
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Navigation function | - |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-react](../README.md) / ActorProviderProps
|
|
2
|
+
|
|
3
|
+
# Interface: ActorProviderProps
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play-react/src/ActorProvider.tsx:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/ActorProvider.tsx#L31)
|
|
6
|
+
|
|
7
|
+
Props for the ActorProvider component.
|
|
8
|
+
|
|
9
|
+
## Extends
|
|
10
|
+
|
|
11
|
+
- [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md)\<`DefineRegistryResult`\>
|
|
12
|
+
|
|
13
|
+
## Extended by
|
|
14
|
+
|
|
15
|
+
- [`PlayUIProviderProps`](PlayUIProviderProps.md)
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
20
|
+
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| <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) | Actor instance with currentView signal (requires Viewable capability). | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-actor/src/abstract-actor.ts#L154) |
|
|
22
|
+
| <a id="property-children"></a> `children` | `ReactNode` | Child components to render inside the provider tree | - | [packages/play-react/src/ActorProvider.tsx:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/ActorProvider.tsx#L37) |
|
|
23
|
+
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Optional component shown when currentView is null or a catalog component throws | - | [packages/play-react/src/ActorProvider.tsx:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/ActorProvider.tsx#L33) |
|
|
24
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `info`) => `void` | Optional error handler callback invoked when a catalog component throws during render | - | [packages/play-react/src/ActorProvider.tsx:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-react/src/ActorProvider.tsx#L35) |
|
|
25
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-actor/src/abstract-actor.ts#L167) |
|
|
26
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | Full result from defineRegistry() — contains the component registry and action handlers factory. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-actor/src/abstract-actor.ts#L156) |
|
|
27
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (controlled mode). When provided, spec.state is ignored and this store is the single source of truth. When omitted, a fresh @xstate/store atom is created per view transition from spec.state. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-actor/src/abstract-actor.ts#L162) |
|