@xmachines/docs 1.0.0-beta.55 → 1.0.0-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/api/@xmachines/play/README.md +3 -3
- package/api/@xmachines/play/classes/NonNullableError.md +7 -7
- package/api/@xmachines/play/classes/PlayError.md +7 -7
- 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 +7 -7
- package/api/@xmachines/play-actor/classes/AbstractActor.md +14 -14
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
- package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +7 -7
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +8 -8
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +13 -19
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +12 -11
- package/api/@xmachines/play-dom/functions/createPlayUI.md +5 -5
- 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 +2 -2
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -9
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +12 -11
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +19 -18
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +6 -6
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -13
- package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +14 -13
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +12 -11
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +9 -9
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +2 -2
- 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/ConfirmHandler.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +5 -5
- 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 +1 -1
- package/api/@xmachines/play-dom/type-aliases/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/SetState.md +3 -3
- package/api/@xmachines/play-dom/variables/schema.md +26 -20
- package/api/@xmachines/play-dom-router/README.md +4 -4
- 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/RoutableActor.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
- 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-react/README.md +9 -15
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +18 -18
- package/api/@xmachines/play-react/functions/ActionProvider.md +1 -1
- package/api/@xmachines/play-react/functions/JSONUIProvider.md +1 -1
- package/api/@xmachines/play-react/functions/Renderer.md +1 -1
- package/api/@xmachines/play-react/functions/StateProvider.md +1 -1
- package/api/@xmachines/play-react/functions/ValidationProvider.md +1 -1
- package/api/@xmachines/play-react/functions/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-react/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useBoundProp.md +2 -2
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-react/interfaces/JSONUIProviderProps.md +13 -12
- 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 +8 -8
- package/api/@xmachines/play-react/interfaces/RendererProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-react/type-aliases/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +2 -2
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +5 -5
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +4 -4
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-router/README.md +5 -5
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +4 -4
- 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/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/PlayActor.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +3 -3
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +2 -2
- 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/README.md +5 -5
- 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/namespaces/Signal/classes/Computed.md +3 -3
- package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +4 -4
- package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +5 -5
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +1 -1
- package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +1 -1
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +13 -19
- package/api/@xmachines/play-solid/functions/ActionProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/JSONUIProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/Renderer.md +1 -1
- package/api/@xmachines/play-solid/functions/StateProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/ValidationProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-solid/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-solid/functions/useAction.md +1 -1
- package/api/@xmachines/play-solid/functions/useActions.md +1 -1
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useBoundProp.md +2 -2
- package/api/@xmachines/play-solid/functions/useFieldValidation.md +1 -1
- package/api/@xmachines/play-solid/functions/useIsVisible.md +1 -1
- package/api/@xmachines/play-solid/functions/useOptionalValidation.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateBinding.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateStore.md +1 -1
- package/api/@xmachines/play-solid/functions/useStateValue.md +1 -1
- package/api/@xmachines/play-solid/functions/useVisibility.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-solid/interfaces/DefineRegistryResult.md +1 -1
- package/api/@xmachines/play-solid/interfaces/JSONUIProviderProps.md +13 -12
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/RendererProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +7 -7
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/ComponentRegistry.md +2 -8
- package/api/@xmachines/play-solid/type-aliases/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +2 -2
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +5 -5
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +5 -5
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +13 -13
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-svelte/README.md +26 -31
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +2 -2
- package/api/@xmachines/play-svelte/functions/getActorContext.md +2 -2
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +6 -6
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/JSONUIProviderProps.md +7 -0
- package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +1 -1
- package/api/@xmachines/play-svelte/type-aliases/RenderErrorHandler.md +17 -1
- package/api/@xmachines/play-svelte/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-svelte/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +4 -4
- 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/RouteMapOptions.md +2 -2
- 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/README.md +6 -6
- 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/RouteMapOptions.md +2 -2
- 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/README.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.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/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
- 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/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +2 -2
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/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 +4 -4
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-vue/README.md +12 -18
- package/api/@xmachines/play-vue/functions/defineRegistry.md +3 -3
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/useBoundProp.md +2 -2
- package/api/@xmachines/play-vue/interfaces/ActionProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +1 -1
- package/api/@xmachines/play-vue/interfaces/DefineRegistryResult.md +1 -1
- package/api/@xmachines/play-vue/interfaces/JSONUIProviderProps.md +12 -11
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/RendererProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/StateProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ValidationProviderProps.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentFn.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/RenderErrorHandler.md +1 -1
- package/api/@xmachines/play-vue/variables/ActionProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/JSONUIProvider.md +10 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue/variables/Renderer.md +10 -1
- package/api/@xmachines/play-vue/variables/StateProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/ValidationProvider.md +1 -1
- package/api/@xmachines/play-vue/variables/VisibilityProvider.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +4 -4
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +5 -5
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
- 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/README.md +3 -3
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +31 -31
- 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/interfaces/RouteObject.md +2 -2
- 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/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/README.md +2 -2
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +3 -3
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +2 -2
- package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/api/llms.txt +2 -2
- package/contributing/architecture.md +9 -9
- package/contributing/configuration.md +12 -12
- package/contributing/deployment.md +9 -9
- package/contributing/development.md +43 -43
- package/contributing/testing.md +15 -15
- package/examples/@xmachines/play-dom-demo/README.md +12 -12
- 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-dom-router-demo/README.md +12 -12
- package/examples/@xmachines/play-react-demo/README.md +13 -13
- 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-react-router-demo/README.md +12 -12
- package/examples/@xmachines/play-solid-demo/README.md +12 -12
- 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-solid-router-demo/README.md +12 -12
- package/examples/@xmachines/play-svelte-demo/README.md +12 -12
- package/examples/@xmachines/play-svelte-demo/type-aliases/App.md +1 -1
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +12 -12
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +12 -12
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +12 -12
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +12 -12
- package/examples/@xmachines/play-vue-demo/README.md +14 -14
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-vue-router-demo/README.md +12 -12
- package/examples/README.md +3 -3
- package/examples/form-validation.md +2 -2
- package/guides/getting-started.md +35 -42
- package/guides/signals.md +2 -2
- package/guides/state-machines.md +1 -1
- package/package.json +2 -2
- package/rfc/play.md +16 -16
|
@@ -11,20 +11,20 @@ Part of the [XMachines Play monorepo](../../README.md).
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
pnpm add @xmachines/play-dom
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
**Peer dependencies:**
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
pnpm add xstate @xstate/store @xmachines/json-render-core @xmachines/json-render-xstate
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
26
|
import { createRenderer, schema } from "@xmachines/play-dom";
|
|
27
|
-
import { defineCatalog } from "@json-render
|
|
27
|
+
import { defineCatalog } from "@xmachines/json-render-core";
|
|
28
28
|
import { z } from "zod";
|
|
29
29
|
import type { ComponentFn } from "@xmachines/play-dom";
|
|
30
30
|
|
|
@@ -74,7 +74,7 @@ disconnect();
|
|
|
74
74
|
|
|
75
75
|
```typescript
|
|
76
76
|
import { createRenderer, schema } from "@xmachines/play-dom";
|
|
77
|
-
import { defineCatalog } from "@json-render
|
|
77
|
+
import { defineCatalog } from "@xmachines/json-render-core";
|
|
78
78
|
|
|
79
79
|
const catalog = defineCatalog(schema, {
|
|
80
80
|
/* ... */
|
|
@@ -95,7 +95,7 @@ Factory-level options (`functions`, `validationFunctions`, `navigate`, `onRender
|
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
97
|
import { defineRegistry, createPlayUI, schema } from "@xmachines/play-dom";
|
|
98
|
-
import { defineCatalog } from "@json-render
|
|
98
|
+
import { defineCatalog } from "@xmachines/json-render-core";
|
|
99
99
|
|
|
100
100
|
const catalog = defineCatalog(schema, {
|
|
101
101
|
/* ... */
|
|
@@ -144,7 +144,7 @@ renderer.disconnect();
|
|
|
144
144
|
|
|
145
145
|
```typescript
|
|
146
146
|
import { createAtom } from "@xstate/store";
|
|
147
|
-
import { xstateStoreStateStore } from "@json-render
|
|
147
|
+
import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
|
|
148
148
|
|
|
149
149
|
const atom = createAtom({ username: "" });
|
|
150
150
|
const store = xstateStoreStateStore({ atom });
|
|
@@ -179,10 +179,10 @@ Without `functions`, any `$computed` expression silently resolves to `undefined`
|
|
|
179
179
|
|
|
180
180
|
Provides named validation functions for inline field validation within components. Functions receive `(value, args?)` and return `true` (valid) or `false` (invalid).
|
|
181
181
|
|
|
182
|
-
Unlike the framework renderers, the DOM renderer has no automatic `ValidationProvider` tree. Components must invoke validation explicitly using `runValidationCheck` / `runValidation` from `@json-render
|
|
182
|
+
Unlike the framework renderers, the DOM renderer has no automatic `ValidationProvider` tree. Components must invoke validation explicitly using `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`, passing `ctx.ctx.validationFunctions` as `customFunctions`.
|
|
183
183
|
|
|
184
184
|
```typescript
|
|
185
|
-
import { runValidationCheck } from "@json-render
|
|
185
|
+
import { runValidationCheck } from "@xmachines/json-render-core";
|
|
186
186
|
|
|
187
187
|
const mount = createPlayUI(registryResult, {
|
|
188
188
|
validationFunctions: {
|
|
@@ -246,7 +246,7 @@ const mount = createPlayUI(registryResult, {
|
|
|
246
246
|
});
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
The argument order matches the upstream `RenderErrorHandler` type from `@json-render
|
|
249
|
+
The argument order matches the upstream `RenderErrorHandler` type from `@xmachines/json-render-core`: **error first, name second**. This is consistent with the framework renderers (`@xmachines/json-render-solid`, `@xmachines/json-render-react`).
|
|
250
250
|
|
|
251
251
|
Without `onRenderError`, all three error types are logged via `console.error` and swallowed. No exception propagates, and no unhandled promise rejection is created.
|
|
252
252
|
|
|
@@ -275,7 +275,7 @@ const MyComponent: ComponentFn<typeof catalog, "MyComponent"> = ({ ctx }) => {
|
|
|
275
275
|
| `PlayRenderer` | class | Class-based renderer with `connect()` / `disconnect()` lifecycle |
|
|
276
276
|
| `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers |
|
|
277
277
|
| `renderSpec(...)` | function | Pure Spec → DOM renderer (low-level) |
|
|
278
|
-
| `schema` | const | The `@json-render
|
|
278
|
+
| `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()` |
|
|
279
279
|
|
|
280
280
|
### Key Types
|
|
281
281
|
|
|
@@ -309,10 +309,10 @@ const MyComponent: ComponentFn<typeof catalog, "MyComponent"> = ({ ctx }) => {
|
|
|
309
309
|
|
|
310
310
|
```bash
|
|
311
311
|
# Run all tests (jsdom environment)
|
|
312
|
-
|
|
312
|
+
pnpm test
|
|
313
313
|
|
|
314
314
|
# Run with coverage
|
|
315
|
-
|
|
315
|
+
pnpm run test:coverage
|
|
316
316
|
```
|
|
317
317
|
|
|
318
318
|
Tests live in `test/` and use [Vitest](https://vitest.dev/) with a jsdom environment. Coverage thresholds: 80% lines, functions, branches, and statements.
|
|
@@ -328,7 +328,7 @@ Public API split into two layers:
|
|
|
328
328
|
- `PlayRenderer` — class-based renderer with `connect()` / `disconnect()` lifecycle
|
|
329
329
|
- `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `MountOptions`
|
|
330
330
|
|
|
331
|
-
**json-render layer** (
|
|
331
|
+
**json-render layer** (re-exported from @xmachines/json-render-dom):
|
|
332
332
|
|
|
333
333
|
- `defineRegistry` — build a catalog-typed DomRegistry
|
|
334
334
|
- `renderSpec` — pure Spec → DOM renderer (uses resolveElementProps from core)
|
|
@@ -386,9 +386,3 @@ Public API split into two layers:
|
|
|
386
386
|
- [createRenderer](functions/createRenderer.md)
|
|
387
387
|
- [defineRegistry](functions/defineRegistry.md)
|
|
388
388
|
- [renderSpec](functions/renderSpec.md)
|
|
389
|
-
|
|
390
|
-
## References
|
|
391
|
-
|
|
392
|
-
### RenderErrorHandler
|
|
393
|
-
|
|
394
|
-
Re-exports [RenderErrorHandler](type-aliases/RenderErrorHandler.md)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayRenderer
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-dom/src/PlayRenderer.ts:
|
|
5
|
+
Defined in: [packages/play-dom/src/PlayRenderer.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/PlayRenderer.ts#L67)
|
|
6
6
|
|
|
7
7
|
PlayRenderer connects an actor's `currentView` signal to the DOM renderer.
|
|
8
8
|
|
|
@@ -13,6 +13,7 @@ Options from `PlayDomOptions` (which extends `UIProviderOptions`) are all forwar
|
|
|
13
13
|
into `DomRenderContext` on every render pass:
|
|
14
14
|
|
|
15
15
|
- `functions` — named compute functions for `{ $computed: "name" }` prop expressions
|
|
16
|
+
- `directives` — custom `$`-prefixed dynamic values (from `defineDirective`), resolved during prop resolution
|
|
16
17
|
- `validationFunctions` — custom validation functions, available at `ctx.ctx.validationFunctions`
|
|
17
18
|
- `navigate` — navigation callback, invoked on `onSuccess: { navigate: "..." }` action bindings
|
|
18
19
|
- `onRenderError` — called with `(error, name)` for component render errors and action handler rejections
|
|
@@ -37,7 +38,7 @@ renderer.disconnect();
|
|
|
37
38
|
|
|
38
39
|
```typescript
|
|
39
40
|
import { createAtom } from "@xstate/store";
|
|
40
|
-
import { xstateStoreStateStore } from "@json-render
|
|
41
|
+
import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
|
|
41
42
|
|
|
42
43
|
const atom = createAtom({ username: "" });
|
|
43
44
|
const store = xstateStoreStateStore({ atom });
|
|
@@ -60,16 +61,16 @@ new PlayRenderer(
|
|
|
60
61
|
options?): PlayRenderer;
|
|
61
62
|
```
|
|
62
63
|
|
|
63
|
-
Defined in: [packages/play-dom/src/PlayRenderer.ts:
|
|
64
|
+
Defined in: [packages/play-dom/src/PlayRenderer.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/PlayRenderer.ts#L102)
|
|
64
65
|
|
|
65
66
|
#### Parameters
|
|
66
67
|
|
|
67
|
-
| Parameter | Type | Description
|
|
68
|
-
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
69
|
-
| `container` | `HTMLElement` | `HTMLElement` to render into. Cleared and repopulated on every view transition.
|
|
70
|
-
| `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 providing the `currentView` signal (must implement `Viewable`).
|
|
71
|
-
| `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | Component renderer map — typically `registryResult.registry` from `defineRegistry`.
|
|
72
|
-
| `options` | [`PlayDomOptions`](../interfaces/PlayDomOptions.md) | Configuration (see [PlayDomOptions](../interfaces/PlayDomOptions.md)): - `registryResult` — auto-wires `setState`/`state` from the xstate store. - `store` — external `StateStore` (controlled mode; overrides `spec.state` seeding). - `loading` — streaming mode flag; suppresses missing-child warnings. - `functions` — named compute functions for `$computed` prop expressions. - `validationFunctions` — custom validation functions; available at `ctx.ctx.validationFunctions`. - `navigate` — navigation callback; invoked on `onSuccess: { navigate: "..." }`. - `onRenderError` — `(error, name)` handler for component render errors and action handler rejections; suppresses `console.error` fallback. |
|
|
68
|
+
| Parameter | Type | Description |
|
|
69
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `container` | `HTMLElement` | `HTMLElement` to render into. Cleared and repopulated on every view transition. |
|
|
71
|
+
| `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 providing the `currentView` signal (must implement `Viewable`). |
|
|
72
|
+
| `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | Component renderer map — typically `registryResult.registry` from `defineRegistry`. |
|
|
73
|
+
| `options` | [`PlayDomOptions`](../interfaces/PlayDomOptions.md) | Configuration (see [PlayDomOptions](../interfaces/PlayDomOptions.md)): - `registryResult` — auto-wires `setState`/`state` from the xstate store. - `store` — external `StateStore` (controlled mode; overrides `spec.state` seeding). - `loading` — streaming mode flag; suppresses missing-child warnings. - `functions` — named compute functions for `$computed` prop expressions. - `directives` — custom `$`-prefixed dynamic values resolved during prop resolution. - `validationFunctions` — custom validation functions; available at `ctx.ctx.validationFunctions`. - `navigate` — navigation callback; invoked on `onSuccess: { navigate: "..." }`. - `onRenderError` — `(error, name)` handler for component render errors and action handler rejections; suppresses `console.error` fallback. |
|
|
73
74
|
|
|
74
75
|
#### Returns
|
|
75
76
|
|
|
@@ -83,7 +84,7 @@ Defined in: [packages/play-dom/src/PlayRenderer.ts:100](https://gitlab.com/xmach
|
|
|
83
84
|
connect(): void;
|
|
84
85
|
```
|
|
85
86
|
|
|
86
|
-
Defined in: [packages/play-dom/src/PlayRenderer.ts:
|
|
87
|
+
Defined in: [packages/play-dom/src/PlayRenderer.ts:118](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/PlayRenderer.ts#L118)
|
|
87
88
|
|
|
88
89
|
Start watching actor.currentView and render to container.
|
|
89
90
|
Renders the initial view synchronously, then subscribes to signal changes.
|
|
@@ -105,7 +106,7 @@ change. Guard against this by auto-disconnecting first.
|
|
|
105
106
|
disconnect(): void;
|
|
106
107
|
```
|
|
107
108
|
|
|
108
|
-
Defined in: [packages/play-dom/src/PlayRenderer.ts:
|
|
109
|
+
Defined in: [packages/play-dom/src/PlayRenderer.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/PlayRenderer.ts#L127)
|
|
109
110
|
|
|
110
111
|
Stop watching and clear the container.
|
|
111
112
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createPlayUI(registryResult, options?): MountFn;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/src/create-play-ui.ts:
|
|
9
|
+
Defined in: [packages/play-dom/src/create-play-ui.ts:93](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/create-play-ui.ts#L93)
|
|
10
10
|
|
|
11
11
|
Create a batteries-included DOM renderer mount function.
|
|
12
12
|
|
|
@@ -16,10 +16,10 @@ once per actor/container pair.
|
|
|
16
16
|
|
|
17
17
|
## Parameters
|
|
18
18
|
|
|
19
|
-
| Parameter | Type | Description
|
|
20
|
-
| ---------------- | --------------------------------------------------------------- |
|
|
21
|
-
| `registryResult` | [`DefineRegistryResult`](../interfaces/DefineRegistryResult.md) | Result from `defineRegistry()` — provides the registry and the lazy handlers factory.
|
|
22
|
-
| `options` | [`CreatePlayUIOptions`](../interfaces/CreatePlayUIOptions.md) | Factory-level configuration (see [CreatePlayUIOptions](../interfaces/CreatePlayUIOptions.md)): - `functions` — named compute functions for `$computed` prop expressions. - `validationFunctions` — custom validation functions; available at `ctx.ctx.validationFunctions`. - `navigate` — navigation callback; invoked on `onSuccess: { navigate: "..." }`. - `onRenderError` — `(error, name)` handler for component render errors and action handler rejections. - `fallback` — element shown when the actor's initial view is `null`. |
|
|
19
|
+
| Parameter | Type | Description |
|
|
20
|
+
| ---------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
21
|
+
| `registryResult` | [`DefineRegistryResult`](../interfaces/DefineRegistryResult.md) | Result from `defineRegistry()` — provides the registry and the lazy handlers factory. |
|
|
22
|
+
| `options` | [`CreatePlayUIOptions`](../interfaces/CreatePlayUIOptions.md) | Factory-level configuration (see [CreatePlayUIOptions](../interfaces/CreatePlayUIOptions.md)): - `functions` — named compute functions for `$computed` prop expressions. - `directives` — custom `$`-prefixed dynamic values resolved during prop resolution. - `validationFunctions` — custom validation functions; available at `ctx.ctx.validationFunctions`. - `navigate` — navigation callback; invoked on `onSuccess: { navigate: "..." }`. - `onRenderError` — `(error, name)` handler for component render errors and action handler rejections. - `fallback` — element shown when the actor's initial view is `null`. |
|
|
23
23
|
|
|
24
24
|
## Returns
|
|
25
25
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRenderer<C>(catalog, componentMap): (actor, container, options?) => () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/src/create-renderer.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-dom/src/create-renderer.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/create-renderer.ts#L84)
|
|
10
10
|
|
|
11
11
|
Create a reusable DOM renderer factory from a catalog and component map.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineRegistry<C>(_catalog, options): DefineRegistryResult;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: `@xmachines/json-render-dom`
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function renderSpec(spec, store, registry, options?): Node | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in:
|
|
9
|
+
Defined in: `@xmachines/json-render-dom`
|
|
10
10
|
|
|
11
11
|
Render a Spec tree into DOM nodes using the provided `DomRegistry`.
|
|
12
12
|
|
|
@@ -24,7 +24,7 @@ built by `defineRegistry` — this function only orchestrates the traversal.
|
|
|
24
24
|
| `spec` | `Spec` | The json-render `Spec` describing the UI tree. |
|
|
25
25
|
| `store` | `StateStore` | Live `StateStore` bound to `spec.state`. |
|
|
26
26
|
| `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | Map of element type names → `DomComponentRenderer`. |
|
|
27
|
-
| `options
|
|
27
|
+
| `options?` | [`RenderSpecOptions`](../interfaces/RenderSpecOptions.md) | Named options — see [RenderSpecOptions](../interfaces/RenderSpecOptions.md). |
|
|
28
28
|
|
|
29
29
|
## Returns
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ComponentContext\<C, K\>
|
|
4
4
|
|
|
5
|
-
Defined in:
|
|
5
|
+
Defined in: `@xmachines/json-render-dom`
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -13,11 +13,11 @@ Defined in: [packages/play-dom/src/json-render/types.ts:363](https://gitlab.com/
|
|
|
13
13
|
|
|
14
14
|
## Properties
|
|
15
15
|
|
|
16
|
-
| Property | Type | Description | Defined in
|
|
17
|
-
| ----------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
18
|
-
| <a id="property-bindings"></a> `bindings` | `Record`\<`string`, `string`\> \| `undefined` | Two-way binding paths resolved from `$bindState` / `$bindItem` prop expressions. |
|
|
19
|
-
| <a id="property-children"></a> `children` | `Node`[] | Rendered child nodes from the spec's `children` list. |
|
|
20
|
-
| <a id="property-ctx"></a> `ctx` | [`DomRenderContext`](DomRenderContext.md) | Low-level render context. |
|
|
21
|
-
| <a id="property-emit"></a> `emit` | (`event`) => `void` | Dispatch a named event defined in the spec's `on` map. |
|
|
22
|
-
| <a id="property-on"></a> `on` | (`event`) => [`EventHandle`](EventHandle.md) | Get an `EventHandle` for a named event from the spec's `on` map. |
|
|
23
|
-
| <a id="property-props"></a> `props` | `InferComponentProps`\<`C`, `K`\> | Catalog-typed, store-resolved props for this component. |
|
|
16
|
+
| Property | Type | Description | Defined in |
|
|
17
|
+
| ----------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- | ---------- |
|
|
18
|
+
| <a id="property-bindings"></a> `bindings` | `Record`\<`string`, `string`\> \| `undefined` | Two-way binding paths resolved from `$bindState` / `$bindItem` prop expressions. | - |
|
|
19
|
+
| <a id="property-children"></a> `children` | `Node`[] | Rendered child nodes from the spec's `children` list. | - |
|
|
20
|
+
| <a id="property-ctx"></a> `ctx` | [`DomRenderContext`](DomRenderContext.md) | Low-level render context. | - |
|
|
21
|
+
| <a id="property-emit"></a> `emit` | (`event`) => `void` | Dispatch a named event defined in the spec's `on` map. | - |
|
|
22
|
+
| <a id="property-on"></a> `on` | (`event`) => [`EventHandle`](EventHandle.md) | Get an `EventHandle` for a named event from the spec's `on` map. | - |
|
|
23
|
+
| <a id="property-props"></a> `props` | `InferComponentProps`\<`C`, `K`\> | Catalog-typed, store-resolved props for this component. | - |
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: CreatePlayUIOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-dom/src/types.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-dom/src/types.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/types.ts#L67)
|
|
6
6
|
|
|
7
7
|
Options for `createPlayUI()` — the batteries-included DOM factory.
|
|
8
8
|
|
|
9
9
|
Extends [UIProviderOptions](UIProviderOptions.md), which contributes `functions`,
|
|
10
|
-
`validationFunctions`, `navigate`, and `onRenderError`. All
|
|
11
|
-
closed over at factory creation time and forwarded into `PlayRenderer`
|
|
10
|
+
`directives`, `validationFunctions`, `navigate`, and `onRenderError`. All
|
|
11
|
+
are closed over at factory creation time and forwarded into `PlayRenderer`
|
|
12
12
|
on every `mount()` call.
|
|
13
13
|
|
|
14
14
|
Parallel to `PlayUIProvider`'s props in the framework renderers.
|
|
@@ -23,11 +23,12 @@ createPlayUI
|
|
|
23
23
|
|
|
24
24
|
## Properties
|
|
25
25
|
|
|
26
|
-
| Property | Type
|
|
27
|
-
| ---------------------------------------------------------------- |
|
|
28
|
-
| <a id="property-
|
|
29
|
-
| <a id="property-
|
|
30
|
-
| <a id="property-
|
|
31
|
-
| <a id="property-
|
|
32
|
-
| <a id="property-
|
|
33
|
-
| <a id="property-
|
|
26
|
+
| Property | Type | Description | Inherited from | Defined in |
|
|
27
|
+
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| <a id="property-directives"></a> `directives?` | `DirectiveDefinition`\<`ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>\>[] | Custom directives — user-defined `$`-prefixed dynamic values that extend the spec expression language (e.g. `{ $format: "currency", value: ... }`). Each entry is a `DirectiveDefinition` built with `defineDirective` from `@xmachines/json-render-core`. The array is converted to a `DirectiveRegistry` once per render pass and forwarded to `resolveElementProps` via `PropResolutionContext.directives`. Built-in expressions (`$state`, `$cond`, etc.) always take precedence over custom directives. Mirrors the `directives` prop on `JSONUIProvider` / `JsonUIProvider` introduced in **Json-render** 0.19. **Example** `import { defineDirective, resolvePropValue } from "@xmachines/json-render-core"; import { z } from "zod"; const formatDirective = defineDirective({ name: "$format", description: "Locale-aware number formatting.", schema: z.object({ $format: z.enum(["number", "currency"]), value: z.unknown() }), resolve(value, ctx) { const resolved = resolvePropValue(value.value, ctx); return new Intl.NumberFormat().format(resolved as number); }, }); renderSpec(spec, store, registry, { directives: [formatDirective] });` | [`UIProviderOptions`](UIProviderOptions.md).[`directives`](UIProviderOptions.md#property-directives) | - |
|
|
29
|
+
| <a id="property-fallback"></a> `fallback?` | `HTMLElement` \| `null` | Optional fallback element shown when `currentView` is `null` on **initial mount** only. The fallback is appended immediately after `mount()` if the container is empty at that moment (i.e. the actor's initial view is `null`). **Limitation:** If the actor's view transitions to `null` after mount, the container will be cleared but this fallback will NOT be re-appended. For dynamic fallback behavior (null view after non-null), use `PlayRenderer` directly and wrap the `actor.currentView` signal to inject fallback content. | - | [packages/play-dom/src/types.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.57/packages/play-dom/src/types.ts#L79) |
|
|
30
|
+
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `ComputedFunction`\> | Named compute functions for `{ $computed: "name", args: {...} }` prop expressions. Each function receives the resolved `args` object and returns the computed value. Forwarded directly to `resolveElementProps` via `PropResolutionContext.functions`, matching the `FunctionsContext` provider in the framework renderers. Without this option, `$computed` expressions resolve to `undefined` (no throw). **Example** `renderSpec(spec, store, registry, { functions: { fullName: (args) => `${args.first} ${args.last}`, formatCurrency: (args) => new Intl.NumberFormat().format(args.amount as number), }, });` Mirrors the `functions` prop on `JSONUIProvider` / `JsonUIProvider`. | [`UIProviderOptions`](UIProviderOptions.md).[`functions`](UIProviderOptions.md#property-functions) | - |
|
|
31
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Programmatic navigation function. Called automatically when an action binding resolves with `onSuccess: { navigate: "/path" }`. The resolved path string is passed as the sole argument. Mirrors the `navigate` prop in `ActionProvider` from the framework renderers, where it is captured in the `execute()` closure. Also available to component implementations directly via `ctx.ctx.navigate` for cases where navigation needs to be triggered outside of an action binding. **Example** `import { useNavigate } from "my-router"; const navigate = useNavigate(); renderSpec(spec, store, registry, { navigate });` Spec binding that triggers navigation: `{ "on": { "click": { "action": "doSomething", "onSuccess": { "navigate": "/dashboard" } } } }` | [`UIProviderOptions`](UIProviderOptions.md).[`navigate`](UIProviderOptions.md#property-navigate) | - |
|
|
32
|
+
| <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook for actions that declare `confirm` in their binding. Consulted by `emit()` before executing a confirm-gated action. Return (or resolve) `true` to execute, `false` to skip. Without this handler, confirm-gated actions are skipped with a `console.warn` — they never execute unconfirmed. See [ConfirmHandler](../type-aliases/ConfirmHandler.md) for the full contract. This is the headless equivalent of the `pendingConfirmation` / `confirmAction()` / `cancelAction()` flow in the framework adapters. | [`UIProviderOptions`](UIProviderOptions.md).[`onConfirm`](UIProviderOptions.md#property-onconfirm) | - |
|
|
33
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Unified error handler for component render errors and action handler rejections. Matches `RenderErrorHandler = (error: unknown, name: string) => void`. Invoked for three distinct error classes: - `(error, elementType)` — when a component renderer throws synchronously during `renderSpec` - `(error, actionName)` — when an action handler rejects during `emit()` (on-event path) - `(error, actionName)` — when an action handler rejects during a `watch` binding callback When provided, suppresses the `console.error` fallback for all three error types. Forwarded into `renderSpec` as the `onRenderError` parameter and into `DomRenderContext.onRenderError` so both `emit()` and `watch` handlers route their errors through the same channel as component render errors. **Example** `renderSpec(spec, store, registry, { onRenderError: (err, name) => { myErrorReporter.capture(err, { context: name }); }, });` | [`UIProviderOptions`](UIProviderOptions.md).[`onRenderError`](UIProviderOptions.md#property-onrendererror) | - |
|
|
34
|
+
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions for inline field validation. Each function receives `(value, args?)` and returns `true` (valid) or `false` (invalid). Functions are available to component implementations via `ctx.ctx.validationFunctions` and should be passed as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. Mirrors `customFunctions` in `ValidationProvider` from the framework renderers. The DOM renderer has no automatic `ValidationProvider` tree — validation must be invoked explicitly by component implementations. **Example** `import { runValidationCheck } from "@xmachines/json-render-core"; renderSpec(spec, store, registry, { validationFunctions: { isEven: (value) => typeof value === "number" && value % 2 === 0, phoneNumber: (value) => /^\+?[\d\s\-()]{7,}$/.test(String(value)), }, }); // Inside a ComponentFn: const MyField: ComponentFn<typeof catalog, "MyField"> = ({ ctx }) => { const result = runValidationCheck( { type: "isEven", message: "must be even" }, { value: someValue, stateModel: {}, customFunctions: ctx.ctx.validationFunctions }, ); // result.valid, result.message };` | [`UIProviderOptions`](UIProviderOptions.md).[`validationFunctions`](UIProviderOptions.md#property-validationfunctions) | - |
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DefineRegistryResult
|
|
4
4
|
|
|
5
|
-
Defined in:
|
|
5
|
+
Defined in: `@xmachines/json-render-dom`
|
|
6
6
|
|
|
7
7
|
Result returned by `defineRegistry`.
|
|
8
8
|
|
|
9
|
-
Matches `DefineRegistryResult` from @json-render
|
|
9
|
+
Matches `DefineRegistryResult` from @xmachines/json-render-react, /solid, /svelte, /vue.
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
| Property | Type | Description
|
|
14
|
-
| --------------------------------------------------- | --------------------------------------------------------------------- |
|
|
15
|
-
| <a id="property-executeaction"></a> `executeAction` | (`actionName`, `params`, `setState`, `state?`) => `Promise`\<`void`\> | Execute a named action by name, with optional params. Mirrors `executeAction` on `DefineRegistryResult` from @json-render
|
|
16
|
-
| <a id="property-handlers"></a> `handlers` | (`getSetState`, `getState`) => `Record`\<`string`, `ActionHandler`\> | Create ActionProvider-compatible handlers. Accepts getter functions (called lazily at action-invocation time) so handlers always see the latest setState and state snapshot — matching the pattern from the framework renderers.
|
|
17
|
-
| <a id="property-registry"></a> `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | The built `DomRegistry`, ready to pass to `
|
|
13
|
+
| Property | Type | Description | Defined in |
|
|
14
|
+
| --------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
|
15
|
+
| <a id="property-executeaction"></a> `executeAction` | (`actionName`, `params`, `setState`, `state?`) => `Promise`\<`void`\> | Execute a named action by name, with optional params. Mirrors `executeAction` on `DefineRegistryResult` from @xmachines/json-render-react, /solid, /vue, /svelte. Useful for programmatically triggering actions outside of the emit/on flow. | - |
|
|
16
|
+
| <a id="property-handlers"></a> `handlers` | (`getSetState`, `getState`) => `Record`\<`string`, `ActionHandler`\> | Create ActionProvider-compatible handlers. Accepts getter functions (called lazily at action-invocation time) so handlers always see the latest setState and state snapshot — matching the pattern from the framework renderers. Host renderers typically wire these from their state store. Pass `() => undefined, () => ({})` only in tests or when state management is not needed. | - |
|
|
17
|
+
| <a id="property-registry"></a> `registry` | [`DomRegistry`](../type-aliases/DomRegistry.md) | The built `DomRegistry`, ready to pass to `renderSpec`. | - |
|
|
@@ -2,26 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DomRenderContext
|
|
4
4
|
|
|
5
|
-
Defined in:
|
|
5
|
+
Defined in: `@xmachines/json-render-dom`
|
|
6
6
|
|
|
7
7
|
Low-level render context passed to each `DomComponentRenderer`.
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
| Property | Type | Description
|
|
12
|
-
| ---------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
13
|
-
| <a id="property-
|
|
14
|
-
| <a id="property-
|
|
15
|
-
| <a id="property-
|
|
16
|
-
| <a id="property-
|
|
17
|
-
| <a id="property-
|
|
18
|
-
| <a id="property-
|
|
19
|
-
| <a id="property-
|
|
20
|
-
| <a id="property-
|
|
21
|
-
| <a id="property-
|
|
22
|
-
| <a id="property-
|
|
23
|
-
| <a id="property-
|
|
24
|
-
| <a id="property-
|
|
25
|
-
| <a id="property-
|
|
26
|
-
| <a id="property-
|
|
27
|
-
| <a id="property-
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ---------------------------------------------------------------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
|
13
|
+
| <a id="property-directives"></a> `directives?` | `DirectiveRegistry` | Custom directive registry, converted from `UIProviderOptions.directives` (a `DirectiveDefinition[]`) once per render pass and forwarded to `PropResolutionContext.directives`. Components that resolve prop sub-values themselves (via `resolvePropValue` from `@xmachines/json-render-core`) should include this in their resolution context so custom `$`-prefixed dynamic values keep working inside those values. Mirrors the directives context from the framework renderers (`useDirectives` / `DirectivesContextProvider` / `DIRECTIVES_KEY`). | - |
|
|
14
|
+
| <a id="property-elementbindings"></a> `elementBindings?` | `Record`\<`string`, `string`\> | Pre-computed two-way binding paths for this element's props. | - |
|
|
15
|
+
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `ComputedFunction`\> | Optional map of named compute functions, forwarded to PropResolutionContext. Enables { $computed: "funcName", args: {...} } prop expressions to resolve. Mirrors the `functions` prop from framework renderer providers. | - |
|
|
16
|
+
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | Map of json-render catalog action names → async ActionHandler functions. | - |
|
|
17
|
+
| <a id="property-loading"></a> `loading?` | `boolean` | When true, indicates the spec is still streaming (e.g. from an AI provider). Component implementations can use this to show skeleton/loading states. When loading=true, missing-child warnings are suppressed. Mirrors the `loading` prop from framework renderer providers. | - |
|
|
18
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Navigation function forwarded from `UIProviderOptions`. Called when an action binding has `onSuccess: { navigate: "/path" }`. Mirrors the `navigate` prop in `ActionProvider` from framework renderers. | - |
|
|
19
|
+
| <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook forwarded from `UIProviderOptions.onConfirm`. Consulted by `emit()` before executing an action binding that declares `confirm`. When absent, confirm-gated actions are skipped with a `console.warn` instead of executing unconfirmed. | - |
|
|
20
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Error handler forwarded from `UIProviderOptions.onRenderError`. Matches `RenderErrorHandler = (error: unknown, name: string) => void`. Called by `emit()` when an action handler rejects, with `(error, actionName)`. Also called by `renderSpec` when a component renderer throws, with `(error, elementType)`. When absent, both fall back to `console.error`. Component implementations may call this directly via `ctx.ctx.onRenderError` to surface errors through the application's central error channel. | - |
|
|
21
|
+
| <a id="property-renderchildren"></a> `renderChildren` | (`keys`) => `Node`[] | Render a list of child element keys into DOM nodes. | - |
|
|
22
|
+
| <a id="property-repeatbasepath"></a> `repeatBasePath?` | `string` | Absolute JSON Pointer path to the current repeat item (e.g. "/todos/0"). Mirrors `repeatBasePath` in `PropResolutionContext`. | - |
|
|
23
|
+
| <a id="property-repeatindex"></a> `repeatIndex?` | `number` | Current repeat array index when inside a repeat scope. Mirrors `repeatIndex` in `PropResolutionContext`. | - |
|
|
24
|
+
| <a id="property-repeatitem"></a> `repeatItem?` | `unknown` | Current repeat item when inside a repeat scope. Mirrors `repeatItem` in `@xmachines/json-render-core`'s `PropResolutionContext`. | - |
|
|
25
|
+
| <a id="property-send"></a> `send` | (`event`) => `void` | Dispatch an event (e.g. to an XState actor). | - |
|
|
26
|
+
| <a id="property-spec"></a> `spec` | `Spec` | Full spec tree for this render pass. | - |
|
|
27
|
+
| <a id="property-store"></a> `store` | `StateStore` | Live state store bound to `spec.state`. | - |
|
|
28
|
+
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions available to `runValidation` / `runValidationCheck`. Each function receives `(value, args?)` and returns a boolean. Mirrors `customFunctions` in `ValidationProvider` from framework renderers. Components that perform inline validation (e.g. form fields) should read this from `ctx.ctx.validationFunctions` and pass it as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. | - |
|