@xmachines/docs 1.0.0-beta.31 → 1.0.0-beta.32
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/README.md +5 -0
- package/api/@xmachines/play/classes/NonNullableError.md +189 -0
- package/api/@xmachines/play/classes/PlayError.md +9 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +56 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +9 -9
- 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/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DefineRegistryOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +3 -3
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -1
- 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/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/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 +6 -6
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- 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/README.md +1 -1
- 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/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +2 -2
- 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 +28 -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 +7 -7
- 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 +8 -3
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +12 -35
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +23 -0
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-svelte/type-aliases/ActionFn.md +30 -0
- package/api/@xmachines/play-svelte/type-aliases/Actions.md +17 -0
- package/api/@xmachines/play-svelte/type-aliases/SetState.md +21 -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 +8 -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 +7 -7
- 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 +9 -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/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +4 -4
- 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/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +3 -3
- 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 +39 -26
- 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/README.md +47 -47
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- 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-react-router-demo/README.md +1 -3
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-router-demo/README.md +1 -3
- package/examples/README.md +2 -2
- package/package.json +6 -6
- package/rfc/play.md +19 -19
|
@@ -162,8 +162,13 @@ These protocols enforce the following invariants:
|
|
|
162
162
|
|
|
163
163
|
## Classes
|
|
164
164
|
|
|
165
|
+
- [NonNullableError](classes/NonNullableError.md)
|
|
165
166
|
- [PlayError](classes/PlayError.md)
|
|
166
167
|
|
|
167
168
|
## Type Aliases
|
|
168
169
|
|
|
169
170
|
- [PlayEvent](type-aliases/PlayEvent.md)
|
|
171
|
+
|
|
172
|
+
## Functions
|
|
173
|
+
|
|
174
|
+
- [assertNonNullable](functions/assertNonNullable.md)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play](../README.md) / NonNullableError
|
|
2
|
+
|
|
3
|
+
# Class: NonNullableError
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/play/src/errors.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play/src/errors.ts#L111)
|
|
6
|
+
|
|
7
|
+
Thrown by [assertNonNullable](../functions/assertNonNullable.md) when a value is `null` or `undefined`.
|
|
8
|
+
|
|
9
|
+
Catch this specifically to distinguish a missing-value assertion failure from
|
|
10
|
+
other runtime errors:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { NonNullableError } from "@xmachines/play/errors";
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const actor = assertNonNullable(inject<AuthActor>("actor"), "actor");
|
|
17
|
+
} catch (err) {
|
|
18
|
+
if (err instanceof NonNullableError) {
|
|
19
|
+
// err.name === "NonNullableError"
|
|
20
|
+
// err.scope === "assertNonNullable"
|
|
21
|
+
// err.code === "PLAY_NON_NULLABLE"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Extends
|
|
27
|
+
|
|
28
|
+
- [`PlayError`](PlayError.md)
|
|
29
|
+
|
|
30
|
+
## Constructors
|
|
31
|
+
|
|
32
|
+
### Constructor
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
new NonNullableError(message, options?): NonNullableError;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Defined in: [packages/play/src/errors.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play/src/errors.ts#L112)
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Parameter | Type |
|
|
43
|
+
| ---------- | -------------- |
|
|
44
|
+
| `message` | `string` |
|
|
45
|
+
| `options?` | `ErrorOptions` |
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`NonNullableError`
|
|
50
|
+
|
|
51
|
+
#### Overrides
|
|
52
|
+
|
|
53
|
+
[`PlayError`](PlayError.md).[`constructor`](PlayError.md#constructor)
|
|
54
|
+
|
|
55
|
+
## Properties
|
|
56
|
+
|
|
57
|
+
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
58
|
+
| ------------------------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
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.32/packages/play/src/errors.ts#L75) |
|
|
61
|
+
| <a id="property-message"></a> `message` | `public` | `string` | - | [`PlayError`](PlayError.md).[`message`](PlayError.md#property-message) | - |
|
|
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.32/packages/play/src/errors.ts#L66) |
|
|
64
|
+
| <a id="property-stack"></a> `stack?` | `public` | `string` | - | [`PlayError`](PlayError.md).[`stack`](PlayError.md#property-stack) | - |
|
|
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
|
+
|
|
67
|
+
## Methods
|
|
68
|
+
|
|
69
|
+
### captureStackTrace()
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
static captureStackTrace(targetObject, constructorOpt?): void;
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Defined in: `@types/node`
|
|
76
|
+
|
|
77
|
+
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
78
|
+
a string representing the location in the code at which
|
|
79
|
+
`Error.captureStackTrace()` was called.
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
const myObject = {};
|
|
83
|
+
Error.captureStackTrace(myObject);
|
|
84
|
+
myObject.stack; // Similar to `new Error().stack`
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The first line of the trace will be prefixed with
|
|
88
|
+
`${myObject.name}: ${myObject.message}`.
|
|
89
|
+
|
|
90
|
+
The optional `constructorOpt` argument accepts a function. If given, all frames
|
|
91
|
+
above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
|
92
|
+
generated stack trace.
|
|
93
|
+
|
|
94
|
+
The `constructorOpt` argument is useful for hiding implementation
|
|
95
|
+
details of error generation from the user. For instance:
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
function a() {
|
|
99
|
+
b();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function b() {
|
|
103
|
+
c();
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function c() {
|
|
107
|
+
// Create an error without stack trace to avoid calculating the stack trace twice.
|
|
108
|
+
const { stackTraceLimit } = Error;
|
|
109
|
+
Error.stackTraceLimit = 0;
|
|
110
|
+
const error = new Error();
|
|
111
|
+
Error.stackTraceLimit = stackTraceLimit;
|
|
112
|
+
|
|
113
|
+
// Capture the stack trace above function b
|
|
114
|
+
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
a();
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Parameters
|
|
122
|
+
|
|
123
|
+
| Parameter | Type |
|
|
124
|
+
| ----------------- | ---------- |
|
|
125
|
+
| `targetObject` | `object` |
|
|
126
|
+
| `constructorOpt?` | `Function` |
|
|
127
|
+
|
|
128
|
+
#### Returns
|
|
129
|
+
|
|
130
|
+
`void`
|
|
131
|
+
|
|
132
|
+
#### Inherited from
|
|
133
|
+
|
|
134
|
+
[`PlayError`](PlayError.md).[`captureStackTrace`](PlayError.md#capturestacktrace)
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### isError()
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
static isError(error): error is Error;
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Defined in: `typescript`
|
|
145
|
+
|
|
146
|
+
Indicates whether the argument provided is a built-in Error instance or not.
|
|
147
|
+
|
|
148
|
+
#### Parameters
|
|
149
|
+
|
|
150
|
+
| Parameter | Type |
|
|
151
|
+
| --------- | --------- |
|
|
152
|
+
| `error` | `unknown` |
|
|
153
|
+
|
|
154
|
+
#### Returns
|
|
155
|
+
|
|
156
|
+
`error is Error`
|
|
157
|
+
|
|
158
|
+
#### Inherited from
|
|
159
|
+
|
|
160
|
+
[`PlayError`](PlayError.md).[`isError`](PlayError.md#iserror)
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
### prepareStackTrace()
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
static prepareStackTrace(err, stackTraces): any;
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Defined in: `@types/node`
|
|
171
|
+
|
|
172
|
+
#### Parameters
|
|
173
|
+
|
|
174
|
+
| Parameter | Type |
|
|
175
|
+
| ------------- | ------------ |
|
|
176
|
+
| `err` | `Error` |
|
|
177
|
+
| `stackTraces` | `CallSite`[] |
|
|
178
|
+
|
|
179
|
+
#### Returns
|
|
180
|
+
|
|
181
|
+
`any`
|
|
182
|
+
|
|
183
|
+
#### See
|
|
184
|
+
|
|
185
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
186
|
+
|
|
187
|
+
#### Inherited from
|
|
188
|
+
|
|
189
|
+
[`PlayError`](PlayError.md).[`prepareStackTrace`](PlayError.md#preparestacktrace)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayError
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play/src/errors.ts:
|
|
5
|
+
Defined in: [packages/play/src/errors.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play/src/errors.ts#L64)
|
|
6
6
|
|
|
7
7
|
Base class for all typed runtime errors thrown by `@xmachines/*` packages.
|
|
8
8
|
|
|
@@ -21,6 +21,7 @@ Each `@xmachines/*` package exports its own typed subclasses from an
|
|
|
21
21
|
|
|
22
22
|
| Package | Import |
|
|
23
23
|
| ---------------------------- | ----------------------------------- |
|
|
24
|
+
| `@xmachines/play` | `@xmachines/play/errors` |
|
|
24
25
|
| `@xmachines/play-router` | `@xmachines/play-router/errors` |
|
|
25
26
|
| `@xmachines/play-vue-router` | `@xmachines/play-vue-router/errors` |
|
|
26
27
|
| `@xmachines/play-xstate` | `@xmachines/play-xstate/errors` |
|
|
@@ -70,6 +71,10 @@ export class MyPackageError extends PlayError {
|
|
|
70
71
|
|
|
71
72
|
- `Error`
|
|
72
73
|
|
|
74
|
+
## Extended by
|
|
75
|
+
|
|
76
|
+
- [`NonNullableError`](NonNullableError.md)
|
|
77
|
+
|
|
73
78
|
## Constructors
|
|
74
79
|
|
|
75
80
|
### Constructor
|
|
@@ -82,7 +87,7 @@ new PlayError(
|
|
|
82
87
|
options?): PlayError;
|
|
83
88
|
```
|
|
84
89
|
|
|
85
|
-
Defined in: [packages/play/src/errors.ts:
|
|
90
|
+
Defined in: [packages/play/src/errors.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play/src/errors.ts#L83)
|
|
86
91
|
|
|
87
92
|
#### Parameters
|
|
88
93
|
|
|
@@ -108,10 +113,10 @@ Error.constructor;
|
|
|
108
113
|
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
109
114
|
| ------------------------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
110
115
|
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | - |
|
|
111
|
-
| <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:
|
|
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.32/packages/play/src/errors.ts#L75) |
|
|
112
117
|
| <a id="property-message"></a> `message` | `public` | `string` | - | `Error.message` | - |
|
|
113
118
|
| <a id="property-name"></a> `name` | `public` | `string` | - | `Error.name` | - |
|
|
114
|
-
| <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | - | [packages/play/src/errors.ts:
|
|
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.32/packages/play/src/errors.ts#L66) |
|
|
115
120
|
| <a id="property-stack"></a> `stack?` | `public` | `string` | - | `Error.stack` | - |
|
|
116
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` | - |
|
|
117
122
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play](../README.md) / assertNonNullable
|
|
2
|
+
|
|
3
|
+
# Function: assertNonNullable()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function assertNonNullable<V>(value, name?): NonNullable<V>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play/src/utils.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play/src/utils.ts#L39)
|
|
10
|
+
|
|
11
|
+
Assert that `value` is neither `null` nor `undefined`, and return it typed
|
|
12
|
+
as `NonNullable<V>` — combining the guard and the narrowed value in a single
|
|
13
|
+
expression.
|
|
14
|
+
|
|
15
|
+
Unlike a non-null assertion (`value!`), this throws a descriptive error at
|
|
16
|
+
the point of failure rather than producing `undefined`-is-not-an-object`
|
|
17
|
+
crashes somewhere downstream.
|
|
18
|
+
|
|
19
|
+
Unlike an `asserts value is T` assertion function, this returns the narrowed
|
|
20
|
+
value directly, so no separate variable or `as` cast is required at the call
|
|
21
|
+
site.
|
|
22
|
+
|
|
23
|
+
## Type Parameters
|
|
24
|
+
|
|
25
|
+
| Type Parameter |
|
|
26
|
+
| -------------- |
|
|
27
|
+
| `V` |
|
|
28
|
+
|
|
29
|
+
## Parameters
|
|
30
|
+
|
|
31
|
+
| Parameter | Type | Description |
|
|
32
|
+
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
33
|
+
| `value` | `V` | The value to check. |
|
|
34
|
+
| `name?` | `string` | Optional name included in the error message to identify the missing value (e.g. the variable or injection key name). |
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
`NonNullable`\<`V`\>
|
|
39
|
+
|
|
40
|
+
`value` typed as `NonNullable<V>` — `null` and `undefined` removed.
|
|
41
|
+
|
|
42
|
+
## Throws
|
|
43
|
+
|
|
44
|
+
When `value` is `null` or `undefined`.
|
|
45
|
+
|
|
46
|
+
## Example
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { assertNonNullable } from "@xmachines/play";
|
|
50
|
+
|
|
51
|
+
// inject() + assertNonNullable in one line — no `!` or intermediate variable:
|
|
52
|
+
const actor = assertNonNullable(inject<AuthActor>("actor"), "actor");
|
|
53
|
+
|
|
54
|
+
// Element lookup:
|
|
55
|
+
const el = assertNonNullable(document.getElementById("app"), "#app");
|
|
56
|
+
```
|
|
@@ -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.32/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.32/packages/play/src/types.ts#L70) |
|
|
38
38
|
|
|
39
39
|
## Type Parameters
|
|
40
40
|
|
|
@@ -180,19 +180,19 @@ function connectBrowserNavigation(actor: AbstractActor<any>) {
|
|
|
180
180
|
This base class enforces three architectural invariants:
|
|
181
181
|
|
|
182
182
|
1. **Actor Authority (INV-01):**
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
183
|
+
- Actor decides all state transitions via guards
|
|
184
|
+
- Infrastructure sends events, actor validates and processes
|
|
185
|
+
- Actor's decision is final — no override by infrastructure
|
|
186
186
|
|
|
187
187
|
2. **Signal-Only Reactivity (INV-05):**
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
- All reactive state exposed via TC39 Signals
|
|
189
|
+
- Infrastructure uses `Signal.subtle.Watcher` to observe
|
|
190
|
+
- No direct queries (`getSnapshot()` for internal use only)
|
|
191
191
|
|
|
192
192
|
3. **Passive Infrastructure (INV-04):**
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
- Infrastructure reflects actor state (via signals)
|
|
194
|
+
- Infrastructure never decides transitions
|
|
195
|
+
- Browser/router events sent as commands to actor
|
|
196
196
|
|
|
197
197
|
## XState Compatibility
|
|
198
198
|
|
|
@@ -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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/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.32/packages/play-actor/src/abstract-actor.ts#L128) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayRenderer
|
|
4
4
|
|
|
5
|
-
Defined in: [PlayRenderer.ts:
|
|
5
|
+
Defined in: [PlayRenderer.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/PlayRenderer.ts#L60)
|
|
6
6
|
|
|
7
7
|
PlayRenderer connects an actor's currentView signal to the DOM renderer.
|
|
8
8
|
|
|
@@ -42,7 +42,7 @@ new PlayRenderer(
|
|
|
42
42
|
options?): PlayRenderer;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [PlayRenderer.ts:
|
|
45
|
+
Defined in: [PlayRenderer.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/PlayRenderer.ts#L72)
|
|
46
46
|
|
|
47
47
|
#### Parameters
|
|
48
48
|
|
|
@@ -65,7 +65,7 @@ Defined in: [PlayRenderer.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/bl
|
|
|
65
65
|
connect(): void;
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Defined in: [PlayRenderer.ts:
|
|
68
|
+
Defined in: [PlayRenderer.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/PlayRenderer.ts#L83)
|
|
69
69
|
|
|
70
70
|
Start watching actor.currentView and render to container.
|
|
71
71
|
Renders the initial view synchronously, then subscribes to signal changes.
|
|
@@ -82,7 +82,7 @@ Renders the initial view synchronously, then subscribes to signal changes.
|
|
|
82
82
|
disconnect(): void;
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Defined in: [PlayRenderer.ts:
|
|
85
|
+
Defined in: [PlayRenderer.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/PlayRenderer.ts#L91)
|
|
86
86
|
|
|
87
87
|
Stop watching and clear the container.
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function connectRenderer(options): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [connect-renderer.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [connect-renderer.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/connect-renderer.ts#L46)
|
|
10
10
|
|
|
11
11
|
Connect a signal-driven DOM renderer to an actor's currentView signal.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineRegistry<C>(_catalog, options): DefineRegistryResult;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/types.ts:213](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [json-render/types.ts:213](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L213)
|
|
10
10
|
|
|
11
11
|
Build a `DomRegistry` from a catalog and component/action options.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function renderSpec(spec, store, registry, send, handlers): Node | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [json-render/renderer.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [json-render/renderer.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/renderer.ts#L53)
|
|
10
10
|
|
|
11
11
|
Render a Spec tree into DOM nodes using the provided `DomRegistry`.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ComponentContext\<C, K\>
|
|
4
4
|
|
|
5
|
-
Defined in: [json-render/types.ts:78](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [json-render/types.ts:78](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L78)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -15,9 +15,9 @@ Defined in: [json-render/types.ts:78](https://gitlab.com/xmachin-es/xmachines-js
|
|
|
15
15
|
|
|
16
16
|
| Property | Type | Description | Defined in |
|
|
17
17
|
| ----------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
-
| <a id="property-bindings"></a> `bindings` | `Record`\<`string`, `string`\> \| `undefined` | Two-way binding paths resolved from `$bindState` / `$bindItem` prop expressions. | [json-render/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
-
| <a id="property-children"></a> `children` | `Node`[] | Rendered child nodes from the spec's `children` list. | [json-render/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-ctx"></a> `ctx` | [`DomRenderContext`](DomRenderContext.md) | Low-level render context. | [json-render/types.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
-
| <a id="property-emit"></a> `emit` | (`event`) => `void` | Dispatch a named event defined in the spec's `on` map. | [json-render/types.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-on"></a> `on` | (`event`) => [`EventHandle`](EventHandle.md) | Get an `EventHandle` for a named event from the spec's `on` map. | [json-render/types.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-props"></a> `props` | `InferComponentProps`\<`C`, `K`\> | Catalog-typed, store-resolved props for this component. | [json-render/types.ts:80](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
18
|
+
| <a id="property-bindings"></a> `bindings` | `Record`\<`string`, `string`\> \| `undefined` | Two-way binding paths resolved from `$bindState` / `$bindItem` prop expressions. | [json-render/types.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L88) |
|
|
19
|
+
| <a id="property-children"></a> `children` | `Node`[] | Rendered child nodes from the spec's `children` list. | [json-render/types.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L84) |
|
|
20
|
+
| <a id="property-ctx"></a> `ctx` | [`DomRenderContext`](DomRenderContext.md) | Low-level render context. | [json-render/types.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L100) |
|
|
21
|
+
| <a id="property-emit"></a> `emit` | (`event`) => `void` | Dispatch a named event defined in the spec's `on` map. | [json-render/types.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L92) |
|
|
22
|
+
| <a id="property-on"></a> `on` | (`event`) => [`EventHandle`](EventHandle.md) | Get an `EventHandle` for a named event from the spec's `on` map. | [json-render/types.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L96) |
|
|
23
|
+
| <a id="property-props"></a> `props` | `InferComponentProps`\<`C`, `K`\> | Catalog-typed, store-resolved props for this component. | [json-render/types.ts:80](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-dom/src/json-render/types.ts#L80) |
|