@xmachines/docs 1.0.0-beta.32 → 1.0.0-beta.33
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/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- 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/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +228 -39
- 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/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 +7 -7
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +11 -9
- 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 +4 -4
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +7 -5
- 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/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 +1 -0
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- 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/PlayRendererProps.md +9 -8
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/type-aliases/RenderErrorHandler.md +22 -0
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- 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 +1 -0
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +9 -8
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/type-aliases/RenderErrorHandler.md +22 -0
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- 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 +44 -9
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +6 -5
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +9 -8
- package/api/@xmachines/play-svelte/type-aliases/RenderErrorHandler.md +23 -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 +1 -0
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +7 -6
- 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 +22 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- 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 +12 -12
- 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 +321 -0
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/form-validation.md +80 -0
- package/examples/routing-patterns.md +9 -19
- package/guides/getting-started.md +51 -38
- package/guides/installation.md +6 -6
- package/package.json +2 -2
- package/api/@xmachines/play-dom/interfaces/DefineRegistryOptions.md +0 -23
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayDomOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [xm-types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [xm-types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/xm-types.ts#L18)
|
|
6
6
|
|
|
7
7
|
Options for PlayRenderer.
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
| Property
|
|
12
|
-
|
|
|
13
|
-
| <a id="property-handlers"></a> `handlers?`
|
|
14
|
-
| <a id="property-
|
|
11
|
+
| Property | Type | Description | Defined in |
|
|
12
|
+
| ------------------------------------------------------ | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| <a id="property-handlers"></a> `handlers?` | `Record`\<`string`, `ActionHandler`\> | Pre-resolved handler map — for backward compatibility or advanced use cases. When `registryResult` is provided, this is ignored. If you need actions to receive `setState` and `state`, use `registryResult` instead. | [xm-types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/xm-types.ts#L36) |
|
|
14
|
+
| <a id="property-loading"></a> `loading?` | `boolean` | When true, indicates the spec is still streaming (e.g. from an AI provider). Forwarded to renderSpec so ComponentFn implementations can read ctx.ctx.loading to show skeleton states. Also suppresses missing-child warnings during stream ingestion. Mirrors the `loading` prop from framework renderer providers. | [xm-types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/xm-types.ts#L53) |
|
|
15
|
+
| <a id="property-registryresult"></a> `registryResult?` | [`DefineRegistryResult`](DefineRegistryResult.md) | The result from `defineRegistry` — provides both the registry and the handlers factory. When provided, `PlayRenderer` wires `setState` and `getState` from the @xstate/store-backed `StateStore` into the handlers factory automatically. This is the preferred approach as it ensures actions always receive live `setState` and `state` bound to the current store. Mutually exclusive with `handlers`. | [xm-types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/xm-types.ts#L28) |
|
|
16
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and this store is the single source of truth for UI state (form values, etc.). When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [xm-types.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/xm-types.ts#L45) |
|
|
@@ -3,14 +3,18 @@
|
|
|
3
3
|
# Type Alias: ActionFn\<C, K\>
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
type ActionFn<C, K> = (params) => Promise<void>;
|
|
6
|
+
type ActionFn<C, K> = (params, setState, state) => Promise<void>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:232](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L232)
|
|
10
10
|
|
|
11
11
|
Catalog-typed action function — mirrors `ActionFn<C, K>` from @json-render/react, /solid, /vue.
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
|
|
13
|
+
- `params` is typed to the exact param schema defined in the catalog, or `undefined` if the
|
|
14
|
+
spec provided no params. Guard against undefined before accessing params.
|
|
15
|
+
- `setState` writes to the @xstate/store-backed local state store. Use it to update ephemeral
|
|
16
|
+
UI state (e.g. form field values, error messages) from within an action handler.
|
|
17
|
+
- `state` is a snapshot of the current state model at the time the action was invoked.
|
|
14
18
|
|
|
15
19
|
## Type Parameters
|
|
16
20
|
|
|
@@ -21,10 +25,22 @@ provided params. The handler must guard against undefined before accessing param
|
|
|
21
25
|
|
|
22
26
|
## Parameters
|
|
23
27
|
|
|
24
|
-
| Parameter
|
|
25
|
-
|
|
|
26
|
-
| `params`
|
|
28
|
+
| Parameter | Type |
|
|
29
|
+
| ---------- | ---------------------------------------------- |
|
|
30
|
+
| `params` | `InferActionParams`\<`C`, `K`\> \| `undefined` |
|
|
31
|
+
| `setState` | [`SetState`](SetState.md) |
|
|
32
|
+
| `state` | `StateModel` |
|
|
27
33
|
|
|
28
34
|
## Returns
|
|
29
35
|
|
|
30
36
|
`Promise`\<`void`\>
|
|
37
|
+
|
|
38
|
+
## Example
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
login: async (params, setState, state) => {
|
|
42
|
+
if (!params) return;
|
|
43
|
+
setState((prev) => ({ ...prev, loading: true }));
|
|
44
|
+
await actor.send({ type: "auth.login", username: params.username });
|
|
45
|
+
};
|
|
46
|
+
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Actions<C> = { [K in keyof InferCatalogActions<C>]: ActionFn<C, K> };
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:242](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L242)
|
|
10
10
|
|
|
11
11
|
Map of catalog-typed action handler functions.
|
|
12
12
|
Each key is a catalog action name; each value is an `ActionFn<C, K>` for that action.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / BaseComponentProps
|
|
2
|
+
|
|
3
|
+
# Type Alias: BaseComponentProps\<P\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type BaseComponentProps<P> = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [json-render/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L187)
|
|
10
|
+
|
|
11
|
+
Catalog-agnostic component props type.
|
|
12
|
+
|
|
13
|
+
Use this when building shared component libraries that should not be tied to
|
|
14
|
+
a specific catalog instance. Mirrors `BaseComponentProps<P>` from
|
|
15
|
+
@json-render/react, /vue, /svelte.
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import type { BaseComponentProps } from "@xmachines/play-dom";
|
|
21
|
+
|
|
22
|
+
function MyButton({ props, emit }: BaseComponentProps<{ label: string }>) {
|
|
23
|
+
const el = document.createElement("button");
|
|
24
|
+
el.textContent = props.label;
|
|
25
|
+
el.addEventListener("click", () => emit("click"));
|
|
26
|
+
return el;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Type Parameters
|
|
31
|
+
|
|
32
|
+
| Type Parameter | Default type |
|
|
33
|
+
| --------------------------------------------- | ------------------------------- |
|
|
34
|
+
| `P` _extends_ `Record`\<`string`, `unknown`\> | `Record`\<`string`, `unknown`\> |
|
|
35
|
+
|
|
36
|
+
## Properties
|
|
37
|
+
|
|
38
|
+
### bindings
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
bindings: Record<string, string> | undefined;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Defined in: [json-render/types.ts:190](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L190)
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### children
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
children: Node[];
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Defined in: [json-render/types.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L189)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### ctx
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
ctx: DomRenderContext;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Defined in: [json-render/types.ts:193](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L193)
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### emit
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
emit: (event) => void;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Defined in: [json-render/types.ts:191](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L191)
|
|
75
|
+
|
|
76
|
+
#### Parameters
|
|
77
|
+
|
|
78
|
+
| Parameter | Type |
|
|
79
|
+
| --------- | -------- |
|
|
80
|
+
| `event` | `string` |
|
|
81
|
+
|
|
82
|
+
#### Returns
|
|
83
|
+
|
|
84
|
+
`void`
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### on
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
on: (event) => EventHandle;
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Defined in: [json-render/types.ts:192](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L192)
|
|
95
|
+
|
|
96
|
+
#### Parameters
|
|
97
|
+
|
|
98
|
+
| Parameter | Type |
|
|
99
|
+
| --------- | -------- |
|
|
100
|
+
| `event` | `string` |
|
|
101
|
+
|
|
102
|
+
#### Returns
|
|
103
|
+
|
|
104
|
+
[`EventHandle`](../interfaces/EventHandle.md)
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### props
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
props: P;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Defined in: [json-render/types.ts:188](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L188)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / CatalogHasActions
|
|
2
|
+
|
|
3
|
+
# Type Alias: CatalogHasActions\<C\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type CatalogHasActions<C> = [InferCatalogActions<C>] extends [never]
|
|
7
|
+
? false
|
|
8
|
+
: [keyof InferCatalogActions<C>] extends [never]
|
|
9
|
+
? false
|
|
10
|
+
: true;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [json-render/types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L58)
|
|
14
|
+
|
|
15
|
+
Evaluates to `true` when a catalog declares at least one action; `false` otherwise.
|
|
16
|
+
|
|
17
|
+
Mirrors `CatalogHasActions<C>` from @json-render/react, /solid, /vue.
|
|
18
|
+
Used to make the `actions` field required in `DefineRegistryOptions` when the
|
|
19
|
+
catalog defines actions, and optional when it does not.
|
|
20
|
+
|
|
21
|
+
## Type Parameters
|
|
22
|
+
|
|
23
|
+
| Type Parameter |
|
|
24
|
+
| ----------------------- |
|
|
25
|
+
| `C` _extends_ `Catalog` |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type ComponentFn<C, K> = (ctx) => HTMLElement | Text | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:198](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L198)
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type ComponentRegistry<C> = { [K in keyof InferCatalogComponents<C>]: ComponentFn<C, K> };
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:204](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L204)
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / DefineRegistryOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: DefineRegistryOptions\<C\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type DefineRegistryOptions<C> = object & CatalogHasActions<C> extends true ? object : object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [json-render/types.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L264)
|
|
10
|
+
|
|
11
|
+
Options for `defineRegistry`.
|
|
12
|
+
|
|
13
|
+
Mirrors `DefineRegistryOptions<C>` from @json-render/react, /solid, /svelte, /vue.
|
|
14
|
+
`actions` accepts catalog-typed async handler functions — params, setState, and state are
|
|
15
|
+
fully typed. When the catalog declares actions, `actions` is required; otherwise optional.
|
|
16
|
+
|
|
17
|
+
## Type Declaration
|
|
18
|
+
|
|
19
|
+
| Name | Type | Description | Defined in |
|
|
20
|
+
| ------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `components?` | [`ComponentRegistry`](ComponentRegistry.md)\<`C`\> | Catalog-typed component implementations. If omitted, all elements fall through to the `fallback` renderer (if provided) or return `null` — the container will be empty. | [json-render/types.ts:270](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L270) |
|
|
22
|
+
|
|
23
|
+
## Type Parameters
|
|
24
|
+
|
|
25
|
+
| Type Parameter |
|
|
26
|
+
| ----------------------- |
|
|
27
|
+
| `C` _extends_ `Catalog` |
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
actions: {
|
|
33
|
+
login: async (params, setState, state) => {
|
|
34
|
+
if (!params) return;
|
|
35
|
+
setState(prev => ({ ...prev, loading: true }));
|
|
36
|
+
actor.send({ type: 'auth.login', username: params.username });
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type DomComponentRenderer = (element, ctx) => HTMLElement | Text | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:134](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L134)
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type DomRegistry = Record<string, DomComponentRenderer>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:
|
|
9
|
+
Defined in: [json-render/types.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L210)
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type DomSchema = typeof schema;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/schema.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [json-render/schema.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/schema.ts#L60)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-dom](../README.md) / SetState
|
|
2
|
+
|
|
3
|
+
# Type Alias: SetState
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type SetState = (updater) => void;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [json-render/types.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/types.ts#L45)
|
|
10
|
+
|
|
11
|
+
Function to update the local state store.
|
|
12
|
+
|
|
13
|
+
Mirrors `SetState` from @json-render/react, /solid, /vue, /svelte.
|
|
14
|
+
In the DOM renderer, this writes through to the @xstate/store-backed StateStore.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| --------- | ------------------------------------------- |
|
|
20
|
+
| `updater` | (`prev`) => `Record`\<`string`, `unknown`\> |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`void`
|
|
25
|
+
|
|
26
|
+
## Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
setState((prev) => ({ ...prev, username: "alice" }));
|
|
30
|
+
```
|
|
@@ -46,7 +46,7 @@ const schema: Schema<{
|
|
|
46
46
|
}>;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Defined in: [json-render/schema.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
49
|
+
Defined in: [json-render/schema.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-dom/src/json-render/schema.ts#L20)
|
|
50
50
|
|
|
51
51
|
The schema for @xmachines/play-dom
|
|
52
52
|
|