@xmachines/docs 1.0.0-beta.32 → 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 +309 -37
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +39 -26
- package/api/@xmachines/play-dom/functions/connectRenderer.md +39 -20
- package/api/@xmachines/play-dom/functions/createPlayUI.md +28 -0
- package/api/@xmachines/play-dom/functions/createRenderer.md +43 -0
- package/api/@xmachines/play-dom/functions/defineRegistry.md +5 -5
- package/api/@xmachines/play-dom/functions/renderSpec.md +43 -9
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -9
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +19 -9
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +29 -0
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +14 -9
- 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 -5
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +27 -0
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +23 -7
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +114 -0
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +25 -0
- 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 +39 -0
- 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 +30 -0
- package/api/@xmachines/play-dom/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +166 -59
- 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 +166 -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 +23 -0
- 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 +159 -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 +23 -0
- 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 +142 -27
- 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 -5
- 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 +7 -0
- 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 +137 -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 +23 -0
- 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 +404 -0
- 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 +112 -41
- package/examples/routing-patterns.md +9 -19
- package/guides/README.md +8 -0
- package/guides/actor-model.md +180 -0
- package/guides/getting-started.md +54 -37
- package/guides/installation.md +6 -6
- 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-dom/interfaces/DefineRegistryOptions.md +0 -23
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +0 -23
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +0 -23
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +0 -21
- package/api/@xmachines/play-svelte/variables/getBoundProp.md +0 -7
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +0 -21
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ComputedOptions\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L84)
|
|
6
6
|
|
|
7
7
|
Options for creating Signal.Computed
|
|
8
8
|
|
|
@@ -31,4 +31,4 @@ const options: ComputedOptions<string> = {
|
|
|
31
31
|
|
|
32
32
|
| Property | Type | Description | Defined in |
|
|
33
33
|
| -------------------------------------- | ----------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
34
|
-
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
34
|
+
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for memoization | [packages/play-signals/src/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L88) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalComputed\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L111)
|
|
6
6
|
|
|
7
7
|
Lazily-evaluated, memoized computed signal
|
|
8
8
|
|
|
@@ -38,7 +38,7 @@ console.log(doubled.get()); // 10 (memoized, not recomputed)
|
|
|
38
38
|
get(): T;
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
41
|
+
Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L117)
|
|
42
42
|
|
|
43
43
|
Read computed value (recalculates only if dependencies changed)
|
|
44
44
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalOptions\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L26)
|
|
6
6
|
|
|
7
7
|
Options for creating Signal.State
|
|
8
8
|
|
|
@@ -32,4 +32,4 @@ const count = new Signal.State(0, options);
|
|
|
32
32
|
|
|
33
33
|
| Property | Type | Description | Defined in |
|
|
34
34
|
| -------------------------------------- | ----------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
35
|
-
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
35
|
+
| <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L33) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalState\<T\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L53)
|
|
6
6
|
|
|
7
7
|
Writable state signal holding a single reactive value
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ console.log(name.get()); // 'Bob'
|
|
|
35
35
|
get(): T;
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
38
|
+
Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L59)
|
|
39
39
|
|
|
40
40
|
Read current value and track as dependency
|
|
41
41
|
|
|
@@ -53,7 +53,7 @@ Current value of the signal
|
|
|
53
53
|
set(value): void;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
56
|
+
Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L66)
|
|
57
57
|
|
|
58
58
|
Write new value and notify watchers if changed
|
|
59
59
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalWatcher
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L167)
|
|
6
6
|
|
|
7
7
|
Watcher for observing signal changes and scheduling effects
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ getPending(): (
|
|
|
40
40
|
| SignalComputed<unknown>)[];
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
43
|
+
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L187)
|
|
44
44
|
|
|
45
45
|
Get signals that changed since last check
|
|
46
46
|
|
|
@@ -60,7 +60,7 @@ Array of signals that have pending updates
|
|
|
60
60
|
unwatch(signal): void;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
63
|
+
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L180)
|
|
64
64
|
|
|
65
65
|
Stop watching a signal
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ Stop watching a signal
|
|
|
82
82
|
watch(signal): void;
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
85
|
+
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L173)
|
|
86
86
|
|
|
87
87
|
Start watching a signal for changes
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type WatcherNotify = () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-signals/src/types.ts#L139)
|
|
10
10
|
|
|
11
11
|
Notification callback for Signal.subtle.Watcher
|
|
12
12
|
|
|
@@ -41,7 +41,12 @@ without muting console output.
|
|
|
41
41
|
- `useBoundProp` — re-exported from `@json-render/solid`
|
|
42
42
|
- `ComponentFn` (type) — re-exported from `@json-render/solid`
|
|
43
43
|
- `ComponentContext` (type) — re-exported from `@json-render/solid`
|
|
44
|
-
- `
|
|
44
|
+
- `ActorProvider` — escape hatch primitive (owns actor bridging, signal bridge, store lifecycle)
|
|
45
|
+
- `PlayUIProvider` — batteries-included composite (wraps `ActorProvider` + `JSONUIProvider`)
|
|
46
|
+
- `usePlayView` — hook for accessing the current view spec inside a provider tree
|
|
47
|
+
- `RenderErrorHandler` (type) — inner per-element error callback signature
|
|
48
|
+
- `ActorProviderProps` (type)
|
|
49
|
+
- `ViewContextValue` (type)
|
|
45
50
|
- `PlayActor` (type)
|
|
46
51
|
|
|
47
52
|
## Quick Start
|
|
@@ -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
|
},
|
|
@@ -168,32 +167,37 @@ const actor = createPlayer();
|
|
|
168
167
|
actor.start();
|
|
169
168
|
|
|
170
169
|
function App() {
|
|
171
|
-
return
|
|
170
|
+
return (
|
|
171
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
172
|
+
<PlayRenderer />
|
|
173
|
+
</PlayUIProvider>
|
|
174
|
+
);
|
|
172
175
|
}
|
|
173
176
|
```
|
|
174
177
|
|
|
175
178
|
## API Reference
|
|
176
179
|
|
|
177
|
-
### `
|
|
180
|
+
### `PlayUIProvider`
|
|
178
181
|
|
|
179
|
-
|
|
182
|
+
Batteries-included composite provider. Wraps `ActorProvider` + `JSONUIProvider`. Pass `actor` and `registryResult` here, then place `<PlayRenderer />` inside as a zero-prop child.
|
|
180
183
|
|
|
181
184
|
```tsx
|
|
182
|
-
<
|
|
185
|
+
<PlayUIProvider
|
|
183
186
|
actor={actor}
|
|
184
187
|
registryResult={registryResult}
|
|
185
188
|
store={myStore}
|
|
186
189
|
fallback={<p>Loading…</p>}
|
|
187
|
-
|
|
190
|
+
onError={(err) => Sentry.captureException(err)}
|
|
191
|
+
onRenderError={(error, elementType) => console.warn(`<${elementType}> crashed:`, error)}
|
|
192
|
+
>
|
|
193
|
+
<PlayRenderer />
|
|
194
|
+
</PlayUIProvider>
|
|
188
195
|
```
|
|
189
196
|
|
|
190
197
|
**`actor`** — A `PlayerActor` (or any `AbstractActor & Viewable`). Provides the `currentView` signal.
|
|
191
198
|
|
|
192
199
|
**`registryResult`** — The full `DefineRegistryResult` returned by `defineRegistry(catalog, { components, actions })` from `@xmachines/play-solid`.
|
|
193
200
|
|
|
194
|
-
`defineRegistry` also accepts `onRenderError(error, elementType)`, which receives errors
|
|
195
|
-
caught by `@json-render/solid`'s inner element boundary before the default logger is used.
|
|
196
|
-
|
|
197
201
|
**`store`** (optional) — Controls per-view UI state (`$state` bindings, form values):
|
|
198
202
|
|
|
199
203
|
- **Omitted (uncontrolled, default):** A fresh `@xstate/store` atom is created per view transition, seeded from `view.spec.state`.
|
|
@@ -206,31 +210,99 @@ import type { StateStore } from "@json-render/core";
|
|
|
206
210
|
|
|
207
211
|
const store: StateStore = xstateStoreStateStore({ atom: createAtom({ username: "" }) });
|
|
208
212
|
|
|
209
|
-
<
|
|
213
|
+
<PlayUIProvider actor={actor} registryResult={registryResult} store={store}>
|
|
214
|
+
<PlayRenderer />
|
|
215
|
+
</PlayUIProvider>;
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**`fallback`** — Shown when `actor.currentView.get()` is `null`.
|
|
219
|
+
|
|
220
|
+
**`onError`** — Called when the outer `ErrorBoundary` catches an error. Receives `(error: unknown)`. Use for observability tools.
|
|
221
|
+
|
|
222
|
+
**`onRenderError`** — Called when an individual catalog component throws during render. Caught by `@json-render/solid`'s inner per-element `ErrorBoundary` — 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.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### `ActorProvider`
|
|
227
|
+
|
|
228
|
+
Escape hatch primitive. Owns actor bridging, signal bridge, and store lifecycle. Use this when you need direct control over the provider layer.
|
|
229
|
+
|
|
230
|
+
```tsx
|
|
231
|
+
import { ActorProvider } from "@xmachines/play-solid";
|
|
232
|
+
|
|
233
|
+
<ActorProvider
|
|
234
|
+
actor={actor}
|
|
235
|
+
registryResult={registryResult}
|
|
236
|
+
onRenderError={(err, type) => reportError(err, type)}
|
|
237
|
+
>
|
|
238
|
+
{/* your own JSONUIProvider + PlayRenderer tree */}
|
|
239
|
+
</ActorProvider>;
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### `PlayRenderer`
|
|
245
|
+
|
|
246
|
+
Zero-prop leaf component. Must be rendered inside a `PlayUIProvider` (or `ActorProvider`) tree. Subscribes to `actor.currentView` via context and renders the current spec.
|
|
247
|
+
|
|
248
|
+
```tsx
|
|
249
|
+
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
250
|
+
<PlayRenderer />
|
|
251
|
+
</PlayUIProvider>
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`PlayRenderer` accepts no props — all configuration (`actor`, `registryResult`, `store`, `fallback`, `onError`, `onRenderError`) is provided by the enclosing `PlayUIProvider` or `ActorProvider`.
|
|
255
|
+
|
|
256
|
+
## Error handling
|
|
257
|
+
|
|
258
|
+
The provider tree has two layers of error boundaries:
|
|
259
|
+
|
|
260
|
+
### Outer boundary — `onError` and `fallback`
|
|
261
|
+
|
|
262
|
+
Wraps the entire renderer via a SolidJS `ErrorBoundary`. Triggered when the spec or store setup throws, or when the inner boundary is not present.
|
|
263
|
+
|
|
264
|
+
```tsx
|
|
265
|
+
<PlayUIProvider
|
|
266
|
+
actor={actor}
|
|
267
|
+
registryResult={registryResult}
|
|
268
|
+
fallback={<p>Something went wrong.</p>}
|
|
269
|
+
onError={(err) => Sentry.captureException(err)}
|
|
270
|
+
>
|
|
271
|
+
<PlayRenderer />
|
|
272
|
+
</PlayUIProvider>
|
|
210
273
|
```
|
|
211
274
|
|
|
212
|
-
|
|
213
|
-
|
|
275
|
+
### Inner boundary — `onRenderError`
|
|
276
|
+
|
|
277
|
+
Each catalog element is individually wrapped in a SolidJS `ErrorBoundary` by `@json-render/solid`. When a component throws, it is silently removed while the rest of the spec continues rendering. The outer boundary is **not** triggered.
|
|
278
|
+
|
|
279
|
+
Pass `onRenderError` to `PlayUIProvider` (or `ActorProvider`) — overrides any registry-level handler — or bake it into `defineRegistry`:
|
|
214
280
|
|
|
215
281
|
```tsx
|
|
282
|
+
// via PlayUIProvider prop
|
|
283
|
+
<PlayUIProvider
|
|
284
|
+
actor={actor}
|
|
285
|
+
registryResult={registryResult}
|
|
286
|
+
onRenderError={(error, elementType) => {
|
|
287
|
+
console.warn(`<${elementType}> crashed:`, error);
|
|
288
|
+
}}
|
|
289
|
+
>
|
|
290
|
+
<PlayRenderer />
|
|
291
|
+
</PlayUIProvider>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
// via defineRegistry — bakes the handler into the registry
|
|
216
296
|
const registryResult = defineRegistry(catalog, {
|
|
217
297
|
components: { Login, Dashboard },
|
|
218
|
-
actions: {
|
|
219
|
-
login: async (params) => {
|
|
220
|
-
if (!params) return;
|
|
221
|
-
actor.send({ type: "auth.login", username: params.username });
|
|
222
|
-
},
|
|
223
|
-
logout: async (params) => {
|
|
224
|
-
actor.send({ type: "auth.logout" });
|
|
225
|
-
},
|
|
226
|
-
},
|
|
298
|
+
actions: { login: async (params) => { ... }, logout: async () => { ... } },
|
|
227
299
|
onRenderError(error, elementType) {
|
|
228
300
|
reportExpectedRenderError(error, elementType);
|
|
229
301
|
},
|
|
230
302
|
});
|
|
231
303
|
```
|
|
232
304
|
|
|
233
|
-
|
|
305
|
+
`onRenderError` is typed as `RenderErrorHandler` and exported from `@xmachines/play-solid`.
|
|
234
306
|
|
|
235
307
|
---
|
|
236
308
|
|
|
@@ -248,7 +320,7 @@ function LogoutButton() {
|
|
|
248
320
|
}
|
|
249
321
|
```
|
|
250
322
|
|
|
251
|
-
Throws `"useActor() must be called inside <
|
|
323
|
+
Throws `NonNullableError: "useActor() must be called inside <ActorProvider> (or <PlayUIProvider>)"` if called outside the tree.
|
|
252
324
|
|
|
253
325
|
---
|
|
254
326
|
|
|
@@ -275,30 +347,75 @@ Priority: **route param fills `undefined` slots; explicit non-`undefined` spec p
|
|
|
275
347
|
|
|
276
348
|
@xmachines/play-solid - SolidJS renderer for XMachines Play architecture
|
|
277
349
|
|
|
278
|
-
Provides a
|
|
279
|
-
|
|
280
|
-
|
|
350
|
+
Provides a SolidJS rendering layer that passively observes actor signals and
|
|
351
|
+
renders UI components via @json-render/solid. SolidJS reactivity is only used
|
|
352
|
+
to trigger re-renders — signals are the source of truth.
|
|
281
353
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
354
|
+
Primary entry point:
|
|
355
|
+
|
|
356
|
+
```tsx
|
|
357
|
+
import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
For escape-hatch provider composition:
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
import { ActorProvider, ActorContext, usePlayView } from "@xmachines/play-solid";
|
|
364
|
+
```
|
|
285
365
|
|
|
286
366
|
## Interfaces
|
|
287
367
|
|
|
368
|
+
- [ActionProviderProps](interfaces/ActionProviderProps.md)
|
|
369
|
+
- [ActorProviderProps](interfaces/ActorProviderProps.md)
|
|
288
370
|
- [ComponentContext](interfaces/ComponentContext.md)
|
|
289
|
-
- [
|
|
371
|
+
- [DefineRegistryResult](interfaces/DefineRegistryResult.md)
|
|
372
|
+
- [JSONUIProviderProps](interfaces/JSONUIProviderProps.md)
|
|
373
|
+
- [PlayUIProviderProps](interfaces/PlayUIProviderProps.md)
|
|
374
|
+
- [RendererProps](interfaces/RendererProps.md)
|
|
375
|
+
- [StateProviderProps](interfaces/StateProviderProps.md)
|
|
376
|
+
- [ValidationProviderProps](interfaces/ValidationProviderProps.md)
|
|
377
|
+
- [ViewContextValue](interfaces/ViewContextValue.md)
|
|
290
378
|
|
|
291
379
|
## Type Aliases
|
|
292
380
|
|
|
293
381
|
- [ComponentFn](type-aliases/ComponentFn.md)
|
|
382
|
+
- [ComponentRegistry](type-aliases/ComponentRegistry.md)
|
|
294
383
|
- [PlayActor](type-aliases/PlayActor.md)
|
|
384
|
+
- [RenderErrorHandler](type-aliases/RenderErrorHandler.md)
|
|
385
|
+
- [SetState](type-aliases/SetState.md)
|
|
386
|
+
- [VisibilityProviderProps](type-aliases/VisibilityProviderProps.md)
|
|
295
387
|
|
|
296
388
|
## Variables
|
|
297
389
|
|
|
390
|
+
- [ActorContext](variables/ActorContext.md)
|
|
391
|
+
- [ActorProvider](variables/ActorProvider.md)
|
|
298
392
|
- [PlayRenderer](variables/PlayRenderer.md)
|
|
393
|
+
- [PlayUIProvider](variables/PlayUIProvider.md)
|
|
299
394
|
|
|
300
395
|
## Functions
|
|
301
396
|
|
|
397
|
+
- [ActionProvider](functions/ActionProvider.md)
|
|
302
398
|
- [defineRegistry](functions/defineRegistry.md)
|
|
399
|
+
- [JSONUIProvider](functions/JSONUIProvider.md)
|
|
400
|
+
- [Renderer](functions/Renderer.md)
|
|
401
|
+
- [StateProvider](functions/StateProvider.md)
|
|
402
|
+
- [useAction](functions/useAction.md)
|
|
403
|
+
- [useActions](functions/useActions.md)
|
|
303
404
|
- [useActor](functions/useActor.md)
|
|
304
405
|
- [useBoundProp](functions/useBoundProp.md)
|
|
406
|
+
- [useFieldValidation](functions/useFieldValidation.md)
|
|
407
|
+
- [useIsVisible](functions/useIsVisible.md)
|
|
408
|
+
- [useOptionalValidation](functions/useOptionalValidation.md)
|
|
409
|
+
- [usePlayView](functions/usePlayView.md)
|
|
410
|
+
- [useStateBinding](functions/useStateBinding.md)
|
|
411
|
+
- [useStateStore](functions/useStateStore.md)
|
|
412
|
+
- [useStateValue](functions/useStateValue.md)
|
|
413
|
+
- [useVisibility](functions/useVisibility.md)
|
|
414
|
+
- [ValidationProvider](functions/ValidationProvider.md)
|
|
415
|
+
- [VisibilityProvider](functions/VisibilityProvider.md)
|
|
416
|
+
|
|
417
|
+
## References
|
|
418
|
+
|
|
419
|
+
### RenderErrorHandler
|
|
420
|
+
|
|
421
|
+
Re-exports [RenderErrorHandler](type-aliases/RenderErrorHandler.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / ActionProvider
|
|
2
|
+
|
|
3
|
+
# Function: ActionProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function ActionProvider(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | ------------------------------------------------------------------------------ |
|
|
15
|
+
| `props` | `ParentProps`\<[`ActionProviderProps`](../interfaces/ActionProviderProps.md)\> |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`any`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / JSONUIProvider
|
|
2
|
+
|
|
3
|
+
# Function: JSONUIProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function JSONUIProvider(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
Combined provider for all JSONUI contexts
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| --------- | ------------------------------------------------------------- |
|
|
17
|
+
| `props` | [`JSONUIProviderProps`](../interfaces/JSONUIProviderProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`any`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / Renderer
|
|
2
|
+
|
|
3
|
+
# Function: Renderer()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function Renderer(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
Main renderer component
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
| Parameter | Type |
|
|
16
|
+
| --------- | ------------------------------------------------- |
|
|
17
|
+
| `props` | [`RendererProps`](../interfaces/RendererProps.md) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`any`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / StateProvider
|
|
2
|
+
|
|
3
|
+
# Function: StateProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function StateProvider(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | ---------------------------------------------------------------------------- |
|
|
15
|
+
| `props` | `ParentProps`\<[`StateProviderProps`](../interfaces/StateProviderProps.md)\> |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`any`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / ValidationProvider
|
|
2
|
+
|
|
3
|
+
# Function: ValidationProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function ValidationProvider(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | -------------------------------------------------------------------------------------- |
|
|
15
|
+
| `props` | `ParentProps`\<[`ValidationProviderProps`](../interfaces/ValidationProviderProps.md)\> |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`any`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / VisibilityProvider
|
|
2
|
+
|
|
3
|
+
# Function: VisibilityProvider()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function VisibilityProvider(props): any;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| ----------------- | ------------------------- |
|
|
15
|
+
| `props` | \{ `children?`: `any`; \} |
|
|
16
|
+
| `props.children?` | `any` |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
`any`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / useAction
|
|
2
|
+
|
|
3
|
+
# Function: useAction()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function useAction(binding): object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | --------------- |
|
|
15
|
+
| `binding` | `ActionBinding` |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`object`
|
|
20
|
+
|
|
21
|
+
| Name | Type | Defined in |
|
|
22
|
+
| ----------- | ------------------------- | ---------- |
|
|
23
|
+
| `execute()` | () => `Promise`\<`void`\> | - |
|
|
24
|
+
| `isLoading` | `boolean` | - |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / useActions
|
|
2
|
+
|
|
3
|
+
# Function: useActions()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function useActions(): ActionContextValue;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Returns
|
|
12
|
+
|
|
13
|
+
`ActionContextValue`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useActor(): PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.34/packages/play-solid/src/useActor.ts#L36)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / useFieldValidation
|
|
2
|
+
|
|
3
|
+
# Function: useFieldValidation()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function useFieldValidation(path, config?): object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | ------------------ |
|
|
15
|
+
| `path` | `string` |
|
|
16
|
+
| `config?` | `ValidationConfig` |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
`object`
|
|
21
|
+
|
|
22
|
+
| Name | Type | Defined in |
|
|
23
|
+
| ------------ | ------------------------------------ | ---------- |
|
|
24
|
+
| `clear()` | () => `void` | - |
|
|
25
|
+
| `errors` | `Accessor`\<`string`[]\> | - |
|
|
26
|
+
| `isValid` | `Accessor`\<`boolean`\> | - |
|
|
27
|
+
| `state` | `Accessor`\<`FieldValidationState`\> | - |
|
|
28
|
+
| `touch()` | () => `void` | - |
|
|
29
|
+
| `validate()` | () => `ValidationResult` | - |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / useIsVisible
|
|
2
|
+
|
|
3
|
+
# Function: useIsVisible()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function useIsVisible(condition): boolean;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| ----------- | ------------------------------------ |
|
|
15
|
+
| `condition` | `VisibilityCondition` \| `undefined` |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`boolean`
|