@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,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: NonNullableError
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play/src/errors.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play/src/errors.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L111)
|
|
6
6
|
|
|
7
7
|
Thrown by [assertNonNullable](../functions/assertNonNullable.md) when a value is `null` or `undefined`.
|
|
8
8
|
|
|
@@ -35,7 +35,7 @@ try {
|
|
|
35
35
|
new NonNullableError(message, options?): NonNullableError;
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Defined in: [packages/play/src/errors.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
38
|
+
Defined in: [packages/play/src/errors.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L112)
|
|
39
39
|
|
|
40
40
|
#### Parameters
|
|
41
41
|
|
|
@@ -57,10 +57,10 @@ Defined in: [packages/play/src/errors.ts:112](https://gitlab.com/xmachin-es/xmac
|
|
|
57
57
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
58
58
|
| ------------------------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
59
|
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | - | [`PlayError`](PlayError.md).[`cause`](PlayError.md#property-cause) | - |
|
|
60
|
-
| <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | [`PlayError`](PlayError.md).[`code`](PlayError.md#property-code) | [packages/play/src/errors.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
60
|
+
| <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | [`PlayError`](PlayError.md).[`code`](PlayError.md#property-code) | [packages/play/src/errors.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L75) |
|
|
61
61
|
| <a id="property-message"></a> `message` | `public` | `string` | - | [`PlayError`](PlayError.md).[`message`](PlayError.md#property-message) | - |
|
|
62
62
|
| <a id="property-name"></a> `name` | `public` | `string` | - | [`PlayError`](PlayError.md).[`name`](PlayError.md#property-name) | - |
|
|
63
|
-
| <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | [`PlayError`](PlayError.md).[`scope`](PlayError.md#property-scope) | [packages/play/src/errors.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
63
|
+
| <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | [`PlayError`](PlayError.md).[`scope`](PlayError.md#property-scope) | [packages/play/src/errors.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L66) |
|
|
64
64
|
| <a id="property-stack"></a> `stack?` | `public` | `string` | - | [`PlayError`](PlayError.md).[`stack`](PlayError.md#property-stack) | - |
|
|
65
65
|
| <a id="property-stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | [`PlayError`](PlayError.md).[`stackTraceLimit`](PlayError.md#property-stacktracelimit) | - |
|
|
66
66
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayError
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play/src/errors.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play/src/errors.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L64)
|
|
6
6
|
|
|
7
7
|
Base class for all typed runtime errors thrown by `@xmachines/*` packages.
|
|
8
8
|
|
|
@@ -87,7 +87,7 @@ new PlayError(
|
|
|
87
87
|
options?): PlayError;
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
Defined in: [packages/play/src/errors.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
90
|
+
Defined in: [packages/play/src/errors.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L83)
|
|
91
91
|
|
|
92
92
|
#### Parameters
|
|
93
93
|
|
|
@@ -113,10 +113,10 @@ Error.constructor;
|
|
|
113
113
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
114
114
|
| ------------------------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
115
|
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | - |
|
|
116
|
-
| <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | - | [packages/play/src/errors.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
116
|
+
| <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | - | [packages/play/src/errors.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L75) |
|
|
117
117
|
| <a id="property-message"></a> `message` | `public` | `string` | - | `Error.message` | - |
|
|
118
118
|
| <a id="property-name"></a> `name` | `public` | `string` | - | `Error.name` | - |
|
|
119
|
-
| <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | - | [packages/play/src/errors.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
119
|
+
| <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | - | [packages/play/src/errors.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/errors.ts#L66) |
|
|
120
120
|
| <a id="property-stack"></a> `stack?` | `public` | `string` | - | `Error.stack` | - |
|
|
121
121
|
| <a id="property-stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | - |
|
|
122
122
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function assertNonNullable<V>(value, name?): NonNullable<V>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play/src/utils.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play/src/utils.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/utils.ts#L39)
|
|
10
10
|
|
|
11
11
|
Assert that `value` is neither `null` nor `undefined`, and return it typed
|
|
12
12
|
as `NonNullable<V>` — combining the guard and the narrowed value in a single
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type PlayEvent<TPayload> = object & TPayload;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play/src/types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play/src/types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/types.ts#L69)
|
|
10
10
|
|
|
11
11
|
Generic event type for Play Architecture
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@ Robot, and other state machine libraries.
|
|
|
34
34
|
|
|
35
35
|
| Name | Type | Defined in |
|
|
36
36
|
| ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
37
|
-
| `type` | `string` | [packages/play/src/types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
37
|
+
| `type` | `string` | [packages/play/src/types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play/src/types.ts#L70) |
|
|
38
38
|
|
|
39
39
|
## Type Parameters
|
|
40
40
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Abstract Class: AbstractActor\<TLogic, TEvent\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L141)
|
|
6
6
|
|
|
7
7
|
Abstract base class for Play Architecture actors.
|
|
8
8
|
|
|
@@ -67,7 +67,7 @@ Actor<TLogic>.constructor
|
|
|
67
67
|
| <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
|
|
68
68
|
| <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
|
|
69
69
|
| <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
|
|
70
|
-
| <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Infrastructure observes this signal to react to state changes without directly coupling to the actor's internal state machine implementation. | - | [packages/play-actor/src/abstract-actor.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
70
|
+
| <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Infrastructure observes this signal to react to state changes without directly coupling to the actor's internal state machine implementation. | - | [packages/play-actor/src/abstract-actor.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L151) |
|
|
71
71
|
| <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
|
|
72
72
|
| <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
|
|
73
73
|
|
|
@@ -238,7 +238,7 @@ Actor.select;
|
|
|
238
238
|
abstract send(event): void;
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
241
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L158)
|
|
242
242
|
|
|
243
243
|
Send event to Actor.
|
|
244
244
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function typedSpec<TContext>(spec): PlaySpec;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L86)
|
|
10
10
|
|
|
11
11
|
Identity helper that constrains a `PlaySpec` object's `contextProps` to keys
|
|
12
12
|
of a specific machine context type, giving compile-time validation and IDE
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlaySpec
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L43)
|
|
6
6
|
|
|
7
7
|
XMachines extension of `@json-render/core` `Spec`.
|
|
8
8
|
|
|
@@ -22,7 +22,7 @@ entries against your machine's context type at compile time.
|
|
|
22
22
|
|
|
23
23
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
24
24
|
| -------------------------------------------------- | ---------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
25
|
-
| <a id="property-contextprops"></a> `contextProps?` | `readonly` | readonly `string`[] | Explicit allowlist of machine context field names to expose as prop slots. Each named field is merged into every spec element's `props` at view derivation time, filling any slot whose current value is `undefined`. Use `typedSpec<TContext>(...)` to constrain entries to `keyof TContext & string`. | - | [packages/play-actor/src/abstract-actor.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
25
|
+
| <a id="property-contextprops"></a> `contextProps?` | `readonly` | readonly `string`[] | Explicit allowlist of machine context field names to expose as prop slots. Each named field is merged into every spec element's `props` at view derivation time, filling any slot whose current value is `undefined`. Use `typedSpec<TContext>(...)` to constrain entries to `keyof TContext & string`. | - | [packages/play-actor/src/abstract-actor.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L51) |
|
|
26
26
|
| <a id="property-elements"></a> `elements` | `public` | `Record`\<`string`, `UIElement`\> | Flat map of elements by key | `Spec.elements` | - |
|
|
27
27
|
| <a id="property-root"></a> `root` | `public` | `string` | Root element key | `Spec.root` | - |
|
|
28
28
|
| <a id="property-state"></a> `state?` | `public` | `Record`\<`string`, `unknown`\> | Optional initial state to seed the state model. Components using statePath will read from / write to this state. | `Spec.state` | - |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Routable
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L27)
|
|
6
6
|
|
|
7
7
|
Optional capability: Routing support
|
|
8
8
|
|
|
@@ -10,5 +10,5 @@ Optional capability: Routing support
|
|
|
10
10
|
|
|
11
11
|
| Property | Modifier | Type | Defined in |
|
|
12
12
|
| ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | [packages/play-actor/src/abstract-actor.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
14
|
-
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | [packages/play-actor/src/abstract-actor.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
13
|
+
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | [packages/play-actor/src/abstract-actor.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L28) |
|
|
14
|
+
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | [packages/play-actor/src/abstract-actor.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L29) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewMetadata
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L100)
|
|
6
6
|
|
|
7
7
|
View metadata for rendering.
|
|
8
8
|
|
|
@@ -13,5 +13,5 @@ Used by PlayRenderer to dynamically render UI based on actor state.
|
|
|
13
13
|
|
|
14
14
|
| Property | Type | Description | Defined in |
|
|
15
15
|
| ------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
-
| <a id="property-component"></a> `component` | `string` | Root element type name (for diagnostics and component resolution) | [packages/play-actor/src/abstract-actor.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
17
|
-
| <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | XMachines view spec — extends `@json-render/core` Spec with `contextProps` for explicit context field exposure. Use `typedSpec<TContext>(...)` at the definition site to validate `contextProps` entries against the machine context type. | [packages/play-actor/src/abstract-actor.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
16
|
+
| <a id="property-component"></a> `component` | `string` | Root element type name (for diagnostics and component resolution) | [packages/play-actor/src/abstract-actor.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L102) |
|
|
17
|
+
| <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | XMachines view spec — extends `@json-render/core` Spec with `contextProps` for explicit context field exposure. Use `typedSpec<TContext>(...)` at the definition site to validate `contextProps` entries against the machine context type. | [packages/play-actor/src/abstract-actor.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L110) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Viewable
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-actor/src/abstract-actor.ts:121](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-actor/src/abstract-actor.ts:121](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L121)
|
|
6
6
|
|
|
7
7
|
Actor capability for exposing renderable view state.
|
|
8
8
|
|
|
@@ -15,4 +15,4 @@ framework adapter.
|
|
|
15
15
|
|
|
16
16
|
| Property | Modifier | Type | Description | Defined in |
|
|
17
17
|
| ----------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
-
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal. State signal containing view.component and view.spec from meta.view. Infrastructure renders view — Logic-Driven UI invariant. | [packages/play-actor/src/abstract-actor.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
18
|
+
| <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal. State signal containing view.component and view.spec from meta.view. Infrastructure renders view — Logic-Driven UI invariant. | [packages/play-actor/src/abstract-actor.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.33/packages/play-actor/src/abstract-actor.ts#L128) |
|
|
@@ -4,76 +4,257 @@
|
|
|
4
4
|
|
|
5
5
|
**Vanilla DOM renderer for XMachines**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Framework-free view rendering driven by an XState v5 actor's `currentView` TC39 Signal. Implements the same catalog-typed `defineRegistry` / `ComponentFn` / `ActionFn` API surface as `@json-render/react`, `/solid`, `/vue`, and `/svelte`.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm install @xmachines/play-dom
|
|
12
|
+
npm install @xmachines/play-dom @json-render/core zod
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Key Exports
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
| Export | Description |
|
|
18
|
+
| --------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `createRenderer(catalog, componentMap)` | One-call factory: returns `mount(actor, container, options?) → disconnect` |
|
|
20
|
+
| `connectRenderer(options)` | Functional API: connect actor → DOM with full options |
|
|
21
|
+
| `defineRegistry(catalog, { components, actions })` | Build a catalog-typed `DomRegistry` with typed action handlers |
|
|
22
|
+
| `PlayRenderer` | Class-based renderer — `connect()` / `disconnect()` lifecycle |
|
|
23
|
+
| `schema` | DOM schema for `defineCatalog` (mirrors `@json-render/react/schema`) |
|
|
24
|
+
| `ComponentFn<C, K>` | Catalog-typed DOM component function type |
|
|
25
|
+
| `ComponentContext<C, K>` | Context passed to each `ComponentFn` — `props`, `on`, `emit`, `children`, `bindings`, `ctx` |
|
|
26
|
+
| `ActionFn<C, K>` | `(params, setState, state) => Promise<void>` — catalog-typed action handler |
|
|
27
|
+
| `SetState` | `(updater: prev => next) => void` — write to the local state store |
|
|
28
|
+
| `BaseComponentProps<P>` | Base type for catalog component prop definitions |
|
|
29
|
+
| `CatalogHasActions<C>` | Conditional type: `true` when catalog declares actions |
|
|
30
|
+
| `renderSpec(spec, store, registry, send, handlers)` | Pure Spec → DOM renderer (advanced use) |
|
|
31
|
+
|
|
32
|
+
## Quick Start — `createRenderer`
|
|
33
|
+
|
|
34
|
+
The preferred one-call pattern — mirrors all framework renderers:
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { createRenderer, schema } from "@xmachines/play-dom";
|
|
30
38
|
import { defineCatalog } from "@json-render/core";
|
|
31
|
-
import {
|
|
39
|
+
import { z } from "zod";
|
|
32
40
|
import type { ComponentFn } from "@xmachines/play-dom";
|
|
33
41
|
|
|
34
|
-
// 1.
|
|
35
|
-
const
|
|
36
|
-
|
|
42
|
+
// 1. Define catalog
|
|
43
|
+
const catalog = defineCatalog(schema, {
|
|
44
|
+
components: {
|
|
45
|
+
Home: { props: z.object({ title: z.string() }) },
|
|
46
|
+
Login: { props: z.object({ title: z.string(), username: z.string().optional() }) },
|
|
47
|
+
},
|
|
48
|
+
actions: {
|
|
49
|
+
login: { params: z.object({ username: z.string() }) },
|
|
50
|
+
logout: {},
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
type AppCatalog = typeof catalog;
|
|
37
54
|
|
|
38
|
-
// 2. Implement
|
|
39
|
-
const Home: ComponentFn<
|
|
55
|
+
// 2. Implement components
|
|
56
|
+
const Home: ComponentFn<AppCatalog, "Home"> = ({ props }) => {
|
|
40
57
|
const el = document.createElement("section");
|
|
41
58
|
el.textContent = props.title;
|
|
42
59
|
return el;
|
|
43
60
|
};
|
|
44
61
|
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
62
|
+
const Login: ComponentFn<AppCatalog, "Login"> = ({ props, on }) => {
|
|
63
|
+
const section = document.createElement("section");
|
|
64
|
+
const input = document.createElement("input");
|
|
65
|
+
input.value = props.username ?? "";
|
|
66
|
+
input.addEventListener("input", () => ctx.store.update((s) => ({ ...s, username: input.value })));
|
|
67
|
+
|
|
68
|
+
const button = document.createElement("button");
|
|
69
|
+
button.textContent = "Log In";
|
|
70
|
+
const submit = on("submit");
|
|
71
|
+
button.addEventListener("click", () => submit.emit());
|
|
72
|
+
|
|
73
|
+
section.append(input, button);
|
|
74
|
+
return section;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// 3. Create the renderer factory (once, at module level)
|
|
78
|
+
const mount = createRenderer(catalog, { Home, Login });
|
|
79
|
+
|
|
80
|
+
// 4. Mount when actor and container are ready
|
|
81
|
+
const actor = createPlayer()();
|
|
82
|
+
actor.start();
|
|
83
|
+
|
|
84
|
+
const disconnect = mount(actor, document.getElementById("app")!);
|
|
85
|
+
|
|
86
|
+
// Cleanup:
|
|
87
|
+
disconnect();
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## `defineRegistry` — Full Control
|
|
91
|
+
|
|
92
|
+
When you need `registryResult.executeAction()` or want to share the registry with `connectRenderer`:
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { defineRegistry, connectRenderer, schema } from "@xmachines/play-dom";
|
|
96
|
+
import { defineCatalog } from "@json-render/core";
|
|
97
|
+
import { z } from "zod";
|
|
98
|
+
|
|
99
|
+
const catalog = defineCatalog(schema, {
|
|
100
|
+
components: {
|
|
101
|
+
Home: { props: z.object({ title: z.string() }) },
|
|
102
|
+
},
|
|
48
103
|
actions: {
|
|
49
|
-
login:
|
|
104
|
+
login: { params: z.object({ username: z.string() }) },
|
|
105
|
+
logout: {},
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// Action handlers receive (params, setState, state)
|
|
110
|
+
// - params: resolved from the spec's on.submit.params (e.g. { $state: "/username" })
|
|
111
|
+
// - setState: write to the local state store (e.g. to clear a form)
|
|
112
|
+
// - state: current local state store snapshot
|
|
113
|
+
const registryResult = defineRegistry(catalog, {
|
|
114
|
+
components: {
|
|
115
|
+
Home: ({ props }) => {
|
|
116
|
+
const el = document.createElement("section");
|
|
117
|
+
el.textContent = props.title;
|
|
118
|
+
return el;
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
actions: {
|
|
122
|
+
login: async (params, setState) => {
|
|
50
123
|
if (!params) return;
|
|
51
124
|
actor.send({ type: "auth.login", username: params.username });
|
|
125
|
+
setState((prev) => ({ ...prev, username: "" })); // clear the form
|
|
52
126
|
},
|
|
53
127
|
logout: async () => actor.send({ type: "auth.logout" }),
|
|
54
128
|
},
|
|
55
129
|
});
|
|
56
130
|
|
|
57
|
-
// 4. Resolve handlers and connect
|
|
58
|
-
const actor = definePlayer({ machine: authMachine })();
|
|
59
|
-
actor.start();
|
|
60
|
-
|
|
61
|
-
const handlers = registryResult.handlers(
|
|
62
|
-
() => undefined,
|
|
63
|
-
() => ({}),
|
|
64
|
-
);
|
|
65
|
-
const container = document.getElementById("app")!;
|
|
66
131
|
const disconnect = connectRenderer({
|
|
67
132
|
actor,
|
|
68
133
|
registry: registryResult.registry,
|
|
69
|
-
|
|
70
|
-
|
|
134
|
+
registryResult, // wires setState/state from xstate store automatically
|
|
135
|
+
container: document.getElementById("app")!,
|
|
71
136
|
});
|
|
72
137
|
```
|
|
73
138
|
|
|
139
|
+
## Component API
|
|
140
|
+
|
|
141
|
+
### `ComponentFn<C, K>` — component function signature
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
const MyCard: ComponentFn<AppCatalog, "Card"> = ({
|
|
145
|
+
props, // catalog-typed props for this component
|
|
146
|
+
children, // Node[] — rendered child nodes
|
|
147
|
+
on, // (eventName) => EventHandle — get emit() for catalog-declared events
|
|
148
|
+
emit, // (eventName) => void — fire an event directly
|
|
149
|
+
bindings, // Record<string, string> — $bindState paths for two-way bindings
|
|
150
|
+
ctx, // DomRenderContext — store, send, handlers, loading, functions
|
|
151
|
+
}) => {
|
|
152
|
+
const el = document.createElement("div");
|
|
153
|
+
el.append(...children);
|
|
154
|
+
return el;
|
|
155
|
+
};
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Two-way binding with `$bindState`
|
|
159
|
+
|
|
160
|
+
In the view spec:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{ "username": { "$bindState": "/username" } }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
In the component:
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
const Login: ComponentFn<AppCatalog, "Login"> = ({ props, ctx }) => {
|
|
170
|
+
const input = document.createElement("input");
|
|
171
|
+
input.value = props.username ?? "";
|
|
172
|
+
// Write back to the store on user input
|
|
173
|
+
input.addEventListener("input", () => {
|
|
174
|
+
ctx.store.update((s) => ({ ...s, username: input.value }));
|
|
175
|
+
});
|
|
176
|
+
return input;
|
|
177
|
+
};
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### `on()` — event handle
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
const submit = on("submit"); // EventHandle
|
|
184
|
+
if (submit.bound) {
|
|
185
|
+
button.addEventListener("click", (e) => {
|
|
186
|
+
if (submit.shouldPreventDefault) e.preventDefault();
|
|
187
|
+
submit.emit(); // resolves params from store, calls action handler
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### `ActionFn` — action handler signature
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// Full signature — all three params are available
|
|
196
|
+
login: async (params, setState, state) => {
|
|
197
|
+
actor.send({ type: "auth.login", username: params!.username });
|
|
198
|
+
setState(prev => ({ ...prev, username: "" }));
|
|
199
|
+
console.log("previous state was:", state);
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
// Params-only — setState/state can be omitted if unused
|
|
203
|
+
logout: async () => actor.send({ type: "auth.logout" }),
|
|
204
|
+
route: async (params) => actor.send({ type: "play.route", to: params!.to }),
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Spec Features
|
|
208
|
+
|
|
209
|
+
`renderSpec` / `renderElement` supports these spec directives:
|
|
210
|
+
|
|
211
|
+
| Directive | Description |
|
|
212
|
+
| ------------------------------------------------------ | ------------------------------------------------------------------------------------- |
|
|
213
|
+
| `visible` | Boolean or `{ $state: "/path" }` — hide element when false |
|
|
214
|
+
| `on.submit` / `on.click` | Action binding — `{ action: "login", params: { username: { $state: "/username" } } }` |
|
|
215
|
+
| `repeat: { statePath, key? }` | Render children once per item in the state array at `statePath` |
|
|
216
|
+
| `watch: { "/path": actionBinding }` | Fire action when store path changes after mount |
|
|
217
|
+
| `props.username: { $bindState: "/username" }` | Two-way binding — read from store, write back via `ctx.store.update()` |
|
|
218
|
+
| `props.value: { $state: "/value" }` | Read-only store reference |
|
|
219
|
+
| `props.label: { $computed: "computeFn", args: [...] }` | Computed prop via `functions` map |
|
|
220
|
+
|
|
221
|
+
## `PlayRenderer` — class API
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
import { PlayRenderer, defineRegistry } from "@xmachines/play-dom";
|
|
225
|
+
|
|
226
|
+
const { registry, registryResult } = defineRegistry(catalog, { components, actions });
|
|
227
|
+
|
|
228
|
+
const renderer = new PlayRenderer(document.getElementById("app")!, actor, registry, {
|
|
229
|
+
registryResult,
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
renderer.connect(); // starts watching actor.currentView
|
|
233
|
+
renderer.disconnect(); // stops watching, clears container
|
|
234
|
+
|
|
235
|
+
// double-connect is safe — connect() calls disconnect() internally if already connected
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Options Reference
|
|
239
|
+
|
|
240
|
+
### `ConnectRendererOptions` / `PlayDomOptions`
|
|
241
|
+
|
|
242
|
+
| Option | Type | Description |
|
|
243
|
+
| ---------------- | ------------------------------- | ----------------------------------------------------------------------------- |
|
|
244
|
+
| `actor` | `AbstractActor & Viewable` | Actor providing `currentView` signal |
|
|
245
|
+
| `registry` | `DomRegistry` | Component renderer map from `defineRegistry` |
|
|
246
|
+
| `registryResult` | `DefineRegistryResult` | Preferred — auto-wires `setState`/`state` from xstate store |
|
|
247
|
+
| `handlers` | `Record<string, ActionHandler>` | Pre-resolved handlers (legacy / advanced) |
|
|
248
|
+
| `container` | `HTMLElement` | DOM element to render into |
|
|
249
|
+
| `fallback` | `HTMLElement \| null` | Shown on initial mount when view is `null` (initial mount only) |
|
|
250
|
+
| `store` | `StateStore` | External store — controlled mode, overrides `spec.state` |
|
|
251
|
+
| `loading` | `boolean` | Streaming mode — suppresses missing-child warnings, exposes `ctx.ctx.loading` |
|
|
252
|
+
|
|
74
253
|
## Learn More
|
|
75
254
|
|
|
76
255
|
- [DOM Router adapter `@xmachines/play-dom-router`](../play-dom-router/README.md)
|
|
256
|
+
- [API reference](../../_media/README.md)
|
|
257
|
+
- [Play RFC](../../packages/docs/rfc/play.md)
|
|
77
258
|
|
|
78
259
|
@xmachines/play-dom — Vanilla DOM renderer for XMachines Play architecture.
|
|
79
260
|
|
|
@@ -81,8 +262,9 @@ Public API split into two layers:
|
|
|
81
262
|
|
|
82
263
|
**XMachines layer** (this package):
|
|
83
264
|
|
|
84
|
-
- `
|
|
85
|
-
- `
|
|
265
|
+
- `createRenderer()` — one-call factory: returns `mount(actor, container, options?) → disconnect`
|
|
266
|
+
- `PlayRenderer` — class-based renderer with `connect()` / `disconnect()` lifecycle
|
|
267
|
+
- `connectRenderer()` — functional API (backward-compat alternative to `PlayRenderer`)
|
|
86
268
|
- `ConnectRendererOptions`, `PlayDomOptions`
|
|
87
269
|
|
|
88
270
|
**json-render layer** (upstreamable to @json-render/dom):
|
|
@@ -96,6 +278,9 @@ Public API split into two layers:
|
|
|
96
278
|
- `DomRegistry` — raw registry type
|
|
97
279
|
- `DomRenderContext` — raw render context
|
|
98
280
|
- `EventHandle` — event handle returned by on()
|
|
281
|
+
- `SetState` — state updater function passed to ActionFn
|
|
282
|
+
- `CatalogHasActions` — conditional type: true when catalog declares actions
|
|
283
|
+
- `BaseComponentProps` — base props type for catalog component definitions
|
|
99
284
|
|
|
100
285
|
## Classes
|
|
101
286
|
|
|
@@ -105,7 +290,6 @@ Public API split into two layers:
|
|
|
105
290
|
|
|
106
291
|
- [ComponentContext](interfaces/ComponentContext.md)
|
|
107
292
|
- [ConnectRendererOptions](interfaces/ConnectRendererOptions.md)
|
|
108
|
-
- [DefineRegistryOptions](interfaces/DefineRegistryOptions.md)
|
|
109
293
|
- [DefineRegistryResult](interfaces/DefineRegistryResult.md)
|
|
110
294
|
- [DomRenderContext](interfaces/DomRenderContext.md)
|
|
111
295
|
- [EventHandle](interfaces/EventHandle.md)
|
|
@@ -115,11 +299,15 @@ Public API split into two layers:
|
|
|
115
299
|
|
|
116
300
|
- [ActionFn](type-aliases/ActionFn.md)
|
|
117
301
|
- [Actions](type-aliases/Actions.md)
|
|
302
|
+
- [BaseComponentProps](type-aliases/BaseComponentProps.md)
|
|
303
|
+
- [CatalogHasActions](type-aliases/CatalogHasActions.md)
|
|
118
304
|
- [ComponentFn](type-aliases/ComponentFn.md)
|
|
119
305
|
- [ComponentRegistry](type-aliases/ComponentRegistry.md)
|
|
306
|
+
- [DefineRegistryOptions](type-aliases/DefineRegistryOptions.md)
|
|
120
307
|
- [DomComponentRenderer](type-aliases/DomComponentRenderer.md)
|
|
121
308
|
- [DomRegistry](type-aliases/DomRegistry.md)
|
|
122
309
|
- [DomSchema](type-aliases/DomSchema.md)
|
|
310
|
+
- [SetState](type-aliases/SetState.md)
|
|
123
311
|
|
|
124
312
|
## Variables
|
|
125
313
|
|
|
@@ -128,5 +316,6 @@ Public API split into two layers:
|
|
|
128
316
|
## Functions
|
|
129
317
|
|
|
130
318
|
- [connectRenderer](functions/connectRenderer.md)
|
|
319
|
+
- [createRenderer](functions/createRenderer.md)
|
|
131
320
|
- [defineRegistry](functions/defineRegistry.md)
|
|
132
321
|
- [renderSpec](functions/renderSpec.md)
|