@xmachines/docs 1.0.0-beta.46 → 1.0.0-beta.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -7
- package/api/@xmachines/play/README.md +134 -57
- package/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +130 -155
- 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/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +140 -232
- 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/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +13 -13
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +6 -6
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +12 -12
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +5 -5
- 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/BaseComponentProps.md +7 -7
- package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.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/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomSchema.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/SetState.md +1 -1
- package/api/@xmachines/play-dom/variables/schema.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +160 -158
- 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/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/README.md +109 -320
- 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/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +107 -124
- 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/createRouteMap.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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +235 -475
- package/api/@xmachines/play-router/classes/RouteMap.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/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMatcher.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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatcher.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +105 -73
- 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 +117 -263
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +93 -606
- 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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/README.md +111 -103
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +156 -17
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/README.md +168 -17
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +147 -122
- 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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +195 -173
- 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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/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 +126 -271
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/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 +148 -528
- package/api/@xmachines/play-vue-router/classes/RouteMap.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/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +167 -496
- 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 +81 -294
- package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
- package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/examples/@xmachines/play-dom-demo/README.md +3 -3
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-dom-router-demo/README.md +2 -2
- package/examples/@xmachines/play-react-demo/README.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 -1
- package/examples/@xmachines/play-solid-demo/README.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/@xmachines/play-svelte-demo/README.md +1 -1
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +2 -2
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +2 -2
- package/examples/@xmachines/play-vue-demo/README.md +1 -1
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/examples/README.md +24 -25
- package/examples/form-validation.md +2 -2
- package/guides/README.md +7 -7
- package/guides/actor-model.md +18 -18
- package/guides/architecture.md +500 -0
- package/guides/configuration.md +556 -0
- package/guides/deployment.md +336 -0
- package/guides/development.md +617 -0
- package/guides/getting-started.md +351 -142
- package/guides/signals.md +19 -19
- package/guides/state-machines.md +16 -16
- package/guides/testing.md +460 -0
- package/package.json +5 -5
- package/guides/installation.md +0 -257
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: SignalWatcher
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-signals/src/types.ts#L167)
|
|
6
6
|
|
|
7
7
|
Watcher for observing signal changes and scheduling effects
|
|
8
8
|
|
|
@@ -40,7 +40,7 @@ getPending(): (
|
|
|
40
40
|
| SignalComputed<unknown>)[];
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
43
|
+
Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-signals/src/types.ts#L187)
|
|
44
44
|
|
|
45
45
|
Get signals that changed since last check
|
|
46
46
|
|
|
@@ -60,7 +60,7 @@ Array of signals that have pending updates
|
|
|
60
60
|
unwatch(signal): void;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
63
|
+
Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-signals/src/types.ts#L180)
|
|
64
64
|
|
|
65
65
|
Stop watching a signal
|
|
66
66
|
|
|
@@ -82,7 +82,7 @@ Stop watching a signal
|
|
|
82
82
|
watch(signal): void;
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
85
|
+
Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-signals/src/types.ts#L173)
|
|
86
86
|
|
|
87
87
|
Start watching a signal for changes
|
|
88
88
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type WatcherNotify = () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-signals/src/types.ts#L139)
|
|
10
10
|
|
|
11
11
|
Notification callback for Signal.subtle.Watcher
|
|
12
12
|
|
|
@@ -1,171 +1,58 @@
|
|
|
1
1
|
[API](../../README.md) / @xmachines/play-solid
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
**Solid renderer for XMachines Play Architecture**
|
|
6
|
-
|
|
7
|
-
Bridges TC39 Signal-driven actors to Solid's fine-grained reactivity. Business logic stays in the actor; Solid is purely a rendering target.
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
3
|
+
<!-- generated-by: gsd-doc-writer -->
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
# @xmachines/play-solid
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
- Renders the current view's JSON spec via `@json-render/solid`
|
|
15
|
-
- Routes action names from spec elements to `actor.send()` via the `actions` prop
|
|
16
|
-
- Manages per-view UI state in an `@xstate/store` atom (automatic or caller-supplied)
|
|
7
|
+
> Solid renderer for XMachines Play architecture
|
|
17
8
|
|
|
18
|
-
|
|
9
|
+
SolidJS rendering layer that passively observes actor signals and renders UI components via `@json-render/solid`. SolidJS reactivity is used solely to trigger re-renders — TC39 Signals are the source of truth.
|
|
19
10
|
|
|
20
|
-
|
|
21
|
-
- **Passive Infrastructure (INV-04):** Solid observes signals and dispatches events — never decides
|
|
22
|
-
- **Signal-Only Reactivity (INV-05):** `actor.currentView` signal is the sole render trigger
|
|
11
|
+
Part of the [xmachines-js monorepo](../../README.md).
|
|
23
12
|
|
|
24
13
|
## Installation
|
|
25
14
|
|
|
26
15
|
```bash
|
|
27
16
|
npm install @xmachines/play-solid
|
|
28
|
-
npm install @json-render/solid @json-render/core # peer deps
|
|
29
|
-
npm install @json-render/xstate @xstate/store # store integration
|
|
30
17
|
```
|
|
31
18
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- `PlayRenderer` — main renderer component
|
|
39
|
-
- `useActor` — hook for accessing the actor inside a `PlayRenderer` tree
|
|
40
|
-
- `defineRegistry` — re-exported from `@json-render/solid`
|
|
41
|
-
- `useBoundProp` — re-exported from `@json-render/solid`
|
|
42
|
-
- `ComponentFn` (type) — re-exported from `@json-render/solid`
|
|
43
|
-
- `ComponentContext` (type) — re-exported from `@json-render/solid`
|
|
44
|
-
- `ActorProvider` — escape hatch primitive (owns actor bridging, signal bridge, store lifecycle)
|
|
45
|
-
- `PlayUIProvider` — batteries-included composite (wraps `ActorProvider` + `JSONUIProvider`)
|
|
46
|
-
- `usePlayView` — hook for accessing the current view spec inside a provider tree
|
|
47
|
-
- `RenderErrorHandler` (type) — inner per-element error callback signature
|
|
48
|
-
- `ActorProviderProps` (type)
|
|
49
|
-
- `ViewContextValue` (type)
|
|
50
|
-
- `PlayActor` (type)
|
|
19
|
+
**Peer dependencies** — install alongside the package:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install solid-js xstate @xstate/store @json-render/solid @json-render/core @json-render/xstate
|
|
23
|
+
```
|
|
51
24
|
|
|
52
25
|
## Quick Start
|
|
53
26
|
|
|
54
27
|
```tsx
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
28
|
+
import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
|
|
29
|
+
import { definePlayer } from "@xmachines/play-xstate";
|
|
57
30
|
import { defineCatalog } from "@json-render/core";
|
|
58
|
-
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
elements: {
|
|
66
|
-
Login: { props: z.object({ title: z.string() }), description: "Login form" },
|
|
67
|
-
Dashboard: { props: z.object({ username: z.string() }), description: "Dashboard" },
|
|
31
|
+
import { schema } from "@json-render/solid/schema";
|
|
32
|
+
|
|
33
|
+
// 1. Define a catalog
|
|
34
|
+
const catalog = defineCatalog(schema, {
|
|
35
|
+
components: {
|
|
36
|
+
Home: { props: z.object({}), description: "Home screen" },
|
|
37
|
+
Login: { props: z.object({ error: z.string().optional() }), description: "Login screen" },
|
|
68
38
|
},
|
|
39
|
+
actions: {},
|
|
69
40
|
});
|
|
70
41
|
|
|
71
|
-
// 2.
|
|
72
|
-
const Login: ComponentFn<typeof catalog, "Login"> = ({ props, emit }) => (
|
|
73
|
-
<div class="view">
|
|
74
|
-
<h2>{props.title}</h2>
|
|
75
|
-
<form
|
|
76
|
-
onSubmit={(e) => {
|
|
77
|
-
e.preventDefault();
|
|
78
|
-
emit("submit");
|
|
79
|
-
}}
|
|
80
|
-
>
|
|
81
|
-
<button type="submit">Log In</button>
|
|
82
|
-
</form>
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
const Dashboard: ComponentFn<typeof catalog, "Dashboard"> = ({ props }) => (
|
|
87
|
-
<div class="view">Welcome, {props.username}!</div>
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
// 3. Build registry
|
|
42
|
+
// 2. Build a component registry
|
|
91
43
|
const registryResult = defineRegistry(catalog, {
|
|
92
|
-
components: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (!params) return;
|
|
96
|
-
actor.send({ type: "auth.login", username: params.username });
|
|
97
|
-
},
|
|
98
|
-
logout: async (params) => {
|
|
99
|
-
actor.send({ type: "auth.logout" });
|
|
100
|
-
},
|
|
44
|
+
components: {
|
|
45
|
+
Home: () => <div>Welcome home!</div>,
|
|
46
|
+
Login: (ctx) => <div>Login {ctx.props.error && <span>{ctx.props.error}</span>}</div>,
|
|
101
47
|
},
|
|
102
48
|
});
|
|
103
49
|
|
|
104
|
-
//
|
|
105
|
-
const
|
|
106
|
-
types: {
|
|
107
|
-
context: {} as {
|
|
108
|
-
isAuthenticated: boolean;
|
|
109
|
-
username: string | null;
|
|
110
|
-
params: Record<string, string>;
|
|
111
|
-
query: Record<string, string>;
|
|
112
|
-
},
|
|
113
|
-
events: {} as
|
|
114
|
-
| { type: "auth.login"; username: string }
|
|
115
|
-
| { type: "auth.logout" }
|
|
116
|
-
| { type: "play.route"; to: string; params?: Record<string, string> },
|
|
117
|
-
},
|
|
118
|
-
}).createMachine(
|
|
119
|
-
formatPlayRouteTransitions({
|
|
120
|
-
id: "app",
|
|
121
|
-
initial: "login",
|
|
122
|
-
context: { isAuthenticated: false, username: null, params: {}, query: {} },
|
|
123
|
-
states: {
|
|
124
|
-
login: {
|
|
125
|
-
id: "login",
|
|
126
|
-
meta: {
|
|
127
|
-
route: "/login",
|
|
128
|
-
view: {
|
|
129
|
-
root: "root",
|
|
130
|
-
elements: {
|
|
131
|
-
root: { type: "Login", props: { title: "Sign In" }, children: [] },
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
dashboard: {
|
|
137
|
-
id: "dashboard",
|
|
138
|
-
meta: {
|
|
139
|
-
route: "/dashboard",
|
|
140
|
-
view: {
|
|
141
|
-
root: "root",
|
|
142
|
-
elements: {
|
|
143
|
-
root: { type: "Dashboard", props: { username: "" }, children: [] },
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
on: {
|
|
150
|
-
"auth.login": {
|
|
151
|
-
target: ".dashboard",
|
|
152
|
-
guard: ({ context }) => !context.isAuthenticated,
|
|
153
|
-
actions: assign({ isAuthenticated: true, username: ({ event }) => event.username }),
|
|
154
|
-
},
|
|
155
|
-
"auth.logout": {
|
|
156
|
-
target: ".login",
|
|
157
|
-
guard: ({ context }) => context.isAuthenticated,
|
|
158
|
-
actions: assign({ isAuthenticated: false, username: null }),
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
}),
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
// 5. Create actor and render
|
|
165
|
-
const createPlayer = definePlayer({ machine });
|
|
50
|
+
// 3. Create and start an actor
|
|
51
|
+
const createPlayer = definePlayer({ machine: myMachine });
|
|
166
52
|
const actor = createPlayer();
|
|
167
53
|
actor.start();
|
|
168
54
|
|
|
55
|
+
// 4. Render
|
|
169
56
|
function App() {
|
|
170
57
|
return (
|
|
171
58
|
<PlayUIProvider actor={actor} registryResult={registryResult}>
|
|
@@ -175,181 +62,148 @@ function App() {
|
|
|
175
62
|
}
|
|
176
63
|
```
|
|
177
64
|
|
|
178
|
-
##
|
|
65
|
+
## Usage
|
|
179
66
|
|
|
180
|
-
### `PlayUIProvider`
|
|
67
|
+
### `PlayUIProvider` + `PlayRenderer` (recommended)
|
|
181
68
|
|
|
182
|
-
|
|
69
|
+
`PlayUIProvider` is the batteries-included entry point. It wraps `ActorProvider` and `JSONUIProvider` into a single composite provider. `PlayRenderer` is a zero-prop leaf component that reads view context and renders the current spec.
|
|
183
70
|
|
|
184
71
|
```tsx
|
|
72
|
+
import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
|
|
73
|
+
|
|
185
74
|
<PlayUIProvider
|
|
186
75
|
actor={actor}
|
|
187
76
|
registryResult={registryResult}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
77
|
+
fallback={<div>Loading…</div>}
|
|
78
|
+
onError={(err) => console.error(err)}
|
|
79
|
+
navigate={navigateFn} // optional: passed to JSONUIProvider
|
|
80
|
+
validationFunctions={valFns} // optional: form validation helpers
|
|
192
81
|
>
|
|
193
82
|
<PlayRenderer />
|
|
194
|
-
</PlayUIProvider
|
|
83
|
+
</PlayUIProvider>;
|
|
195
84
|
```
|
|
196
85
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
**`registryResult`** — The full `DefineRegistryResult` returned by `defineRegistry(catalog, { components, actions })` from.
|
|
200
|
-
|
|
201
|
-
**`store`** (optional) — Controls per-view UI state (`$state` bindings, form values):
|
|
86
|
+
### `ActorProvider` (escape hatch)
|
|
202
87
|
|
|
203
|
-
|
|
204
|
-
- **Provided (controlled):** The caller owns the store; `spec.state` is ignored.
|
|
88
|
+
For library authors who need direct control over provider composition:
|
|
205
89
|
|
|
206
90
|
```tsx
|
|
207
|
-
import {
|
|
208
|
-
import { xstateStoreStateStore } from "@json-render/xstate";
|
|
209
|
-
import type { StateStore } from "@json-render/core";
|
|
91
|
+
import { ActorProvider, PlayRenderer } from "@xmachines/play-solid";
|
|
210
92
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<PlayUIProvider actor={actor} registryResult={registryResult} store={store}>
|
|
93
|
+
<ActorProvider actor={actor} registryResult={registryResult}>
|
|
214
94
|
<PlayRenderer />
|
|
215
|
-
</
|
|
95
|
+
</ActorProvider>;
|
|
216
96
|
```
|
|
217
97
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
**`onError`** — Called when the outer `ErrorBoundary` catches an error. Receives `(error: unknown)`. Use for observability tools.
|
|
98
|
+
### `useActor` hook
|
|
221
99
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
### `ActorProvider`
|
|
227
|
-
|
|
228
|
-
Escape hatch primitive. Owns actor bridging, signal bridge, and store lifecycle. Use this when you need direct control over the provider layer.
|
|
100
|
+
Access the raw actor instance anywhere inside an `ActorProvider` or `PlayUIProvider` tree:
|
|
229
101
|
|
|
230
102
|
```tsx
|
|
231
|
-
import {
|
|
103
|
+
import { useActor } from "@xmachines/play-solid";
|
|
232
104
|
|
|
233
|
-
|
|
234
|
-
actor=
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
>
|
|
238
|
-
{/* your own JSONUIProvider + PlayRenderer tree */}
|
|
239
|
-
</ActorProvider>;
|
|
105
|
+
function SubmitButton() {
|
|
106
|
+
const actor = useActor();
|
|
107
|
+
return <button onClick={() => actor.send({ type: "SUBMIT" })}>Submit</button>;
|
|
108
|
+
}
|
|
240
109
|
```
|
|
241
110
|
|
|
242
|
-
|
|
111
|
+
### `usePlayView` hook
|
|
243
112
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
Zero-prop leaf component. Must be rendered inside a `PlayUIProvider` (or `ActorProvider`) tree. Subscribes to `actor.currentView` via context and renders the current spec.
|
|
113
|
+
Access the resolved view context (spec, handlers, registry) from within the provider tree:
|
|
247
114
|
|
|
248
115
|
```tsx
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</PlayUIProvider>
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
`PlayRenderer` accepts no props — all configuration (`actor`, `registryResult`, `store`, `fallback`, `onError`, `onRenderError`) is provided by the enclosing `PlayUIProvider` or `ActorProvider`.
|
|
255
|
-
|
|
256
|
-
## Error handling
|
|
257
|
-
|
|
258
|
-
The provider tree has two layers of error boundaries:
|
|
116
|
+
import { usePlayView } from "@xmachines/play-solid";
|
|
117
|
+
import { Renderer } from "@json-render/solid";
|
|
259
118
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
```tsx
|
|
265
|
-
<PlayUIProvider
|
|
266
|
-
actor={actor}
|
|
267
|
-
registryResult={registryResult}
|
|
268
|
-
fallback={<p>Something went wrong.</p>}
|
|
269
|
-
onError={(err) => Sentry.captureException(err)}
|
|
270
|
-
>
|
|
271
|
-
<PlayRenderer />
|
|
272
|
-
</PlayUIProvider>
|
|
119
|
+
const MyRenderer = () => {
|
|
120
|
+
const view = usePlayView();
|
|
121
|
+
return <Renderer spec={view.spec} registry={view.registry} />;
|
|
122
|
+
};
|
|
273
123
|
```
|
|
274
124
|
|
|
275
|
-
|
|
125
|
+
## API Summary
|
|
276
126
|
|
|
277
|
-
|
|
127
|
+
### Components
|
|
278
128
|
|
|
279
|
-
|
|
129
|
+
| Export | Description |
|
|
130
|
+
| ---------------- | ------------------------------------------------------------------------------ |
|
|
131
|
+
| `PlayUIProvider` | Batteries-included composite provider (recommended entry point) |
|
|
132
|
+
| `PlayRenderer` | Zero-prop leaf component; renders the current view spec inside a provider tree |
|
|
133
|
+
| `ActorProvider` | Lower-level smart provider for escape-hatch composition |
|
|
280
134
|
|
|
281
|
-
|
|
282
|
-
// via PlayUIProvider prop
|
|
283
|
-
<PlayUIProvider
|
|
284
|
-
actor={actor}
|
|
285
|
-
registryResult={registryResult}
|
|
286
|
-
onRenderError={(error, elementType) => {
|
|
287
|
-
console.warn(`<${elementType}> crashed:`, error);
|
|
288
|
-
}}
|
|
289
|
-
>
|
|
290
|
-
<PlayRenderer />
|
|
291
|
-
</PlayUIProvider>
|
|
292
|
-
```
|
|
135
|
+
### Hooks
|
|
293
136
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
actions: { login: async (params) => { ... }, logout: async () => { ... } },
|
|
299
|
-
onRenderError(error, elementType) {
|
|
300
|
-
reportExpectedRenderError(error, elementType);
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
```
|
|
137
|
+
| Export | Description |
|
|
138
|
+
| --------------- | --------------------------------------------------------------------------------- |
|
|
139
|
+
| `useActor()` | Returns the raw `PlayActor` instance from context; throws outside a provider tree |
|
|
140
|
+
| `usePlayView()` | Returns the current `ViewContextValue` (spec, handlers, registry, store) |
|
|
304
141
|
|
|
305
|
-
|
|
142
|
+
### Context
|
|
306
143
|
|
|
307
|
-
|
|
144
|
+
| Export | Description |
|
|
145
|
+
| -------------- | -------------------------------------------------------------------------------------- |
|
|
146
|
+
| `ActorContext` | SolidJS context for the actor; use `ActorContext.Provider` directly as an escape hatch |
|
|
308
147
|
|
|
309
|
-
### `
|
|
148
|
+
### Re-exports from `@json-render/solid`
|
|
310
149
|
|
|
311
|
-
|
|
150
|
+
This package re-exports the full `@json-render/solid` public API so consumers do not need a direct dependency:
|
|
312
151
|
|
|
313
152
|
```tsx
|
|
314
|
-
import {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
153
|
+
import {
|
|
154
|
+
// Providers
|
|
155
|
+
JSONUIProvider,
|
|
156
|
+
StateProvider,
|
|
157
|
+
ActionProvider,
|
|
158
|
+
VisibilityProvider,
|
|
159
|
+
ValidationProvider,
|
|
160
|
+
// Renderer
|
|
161
|
+
Renderer,
|
|
162
|
+
// Registry factory + hooks
|
|
163
|
+
defineRegistry,
|
|
164
|
+
useBoundProp,
|
|
165
|
+
useStateBinding,
|
|
166
|
+
useStateValue,
|
|
167
|
+
useStateStore,
|
|
168
|
+
useActions,
|
|
169
|
+
useAction,
|
|
170
|
+
useIsVisible,
|
|
171
|
+
useFieldValidation,
|
|
172
|
+
useOptionalValidation,
|
|
173
|
+
useVisibility,
|
|
174
|
+
} from "@xmachines/play-solid";
|
|
321
175
|
```
|
|
322
176
|
|
|
323
|
-
|
|
177
|
+
### Key Types
|
|
324
178
|
|
|
325
|
-
|
|
179
|
+
| Type | Description |
|
|
180
|
+
| --------------------- | --------------------------------------------------------------------- |
|
|
181
|
+
| `PlayUIProviderProps` | Props for `PlayUIProvider` |
|
|
182
|
+
| `ActorProviderProps` | Props for `ActorProvider` |
|
|
183
|
+
| `ViewContextValue` | Shape of the context value from `usePlayView()` |
|
|
184
|
+
| `PlayActor` | `AbstractActor<AnyActorLogic>` — the actor type accepted by providers |
|
|
326
185
|
|
|
327
|
-
##
|
|
186
|
+
## Testing
|
|
328
187
|
|
|
329
|
-
|
|
188
|
+
Run tests for this package in isolation:
|
|
330
189
|
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
// After play.route to /settings/profile → context.params = { section: "profile" }
|
|
334
|
-
// Component receives: { section: "profile", user: "alice" }
|
|
190
|
+
```bash
|
|
191
|
+
npm test -w packages/play-solid
|
|
335
192
|
```
|
|
336
193
|
|
|
337
|
-
|
|
194
|
+
Or from within the package directory:
|
|
338
195
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
196
|
+
```bash
|
|
197
|
+
npm test # single run (jsdom environment)
|
|
198
|
+
npm run test:watch # watch mode
|
|
199
|
+
npm run test:ui # interactive Vitest UI
|
|
200
|
+
```
|
|
342
201
|
|
|
343
|
-
|
|
344
|
-
- `actor.currentView` (TC39 Signal) is bridged into a SolidJS `createSignal` inside `PlayRenderer`
|
|
345
|
-
- Per-view UI state lives in an `@xstate/store` atom, not in SolidJS reactive state
|
|
346
|
-
- `@json-render/solid` drives rendering; `PlayRenderer` is the signal bridge — import `defineRegistry`, `ComponentFn`, `ComponentContext`, and `useBoundProp` from
|
|
202
|
+
Coverage is collected with v8 (80% threshold for lines, functions, branches, and statements). Browser-specific tests live in `test/browser/` and are excluded from the default jsdom run.
|
|
347
203
|
|
|
348
|
-
##
|
|
204
|
+
## License
|
|
349
205
|
|
|
350
|
-
|
|
351
|
-
- [Solid Router adapter](../play-solid-router/README.md)
|
|
352
|
-
- [TanStack Solid Router adapter](../play-tanstack-solid-router/README.md)
|
|
206
|
+
MIT
|
|
353
207
|
|
|
354
208
|
@xmachines/play-solid - SolidJS renderer for XMachines Play architecture
|
|
355
209
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useActor(): PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/useActor.ts#L36)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function usePlayView(): ViewContextValue;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/ActorProvider.tsx:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/ActorProvider.tsx:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/ActorProvider.tsx#L69)
|
|
10
10
|
|
|
11
11
|
Hook to access the current view context inside an ActorProvider tree.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ActorProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-solid/src/ActorProvider.tsx:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-solid/src/ActorProvider.tsx:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/ActorProvider.tsx#L83)
|
|
6
6
|
|
|
7
7
|
Props for ActorProvider — the escape hatch primitive.
|
|
8
8
|
|
|
@@ -21,10 +21,10 @@ with JSONUIProvider and all required sub-providers.
|
|
|
21
21
|
|
|
22
22
|
| Property | Type | Description | Inherited from | Defined in |
|
|
23
23
|
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability). | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
25
|
-
| <a id="property-children"></a> `children` | `any` | Children — required; must include <PlayRenderer /> (or use PlayUIProvider shorthand) | - | [packages/play-solid/src/ActorProvider.tsx:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
26
|
-
| <a id="property-fallback"></a> `fallback?` | `any` | Optional fallback element shown when currentView is null or ErrorBoundary catches | - | [packages/play-solid/src/ActorProvider.tsx:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
27
|
-
| <a id="property-onerror"></a> `onError?` | (`error`) => `void` | Optional callback invoked when SolidJS ErrorBoundary catches an error | - | [packages/play-solid/src/ActorProvider.tsx:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
28
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
29
|
-
| <a id="property-registryresult"></a> `registryResult` | [`DefineRegistryResult`](DefineRegistryResult.md) | Full result from defineRegistry() — contains the component registry and action handlers factory. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
30
|
-
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (controlled mode). When provided, spec.state is ignored and this store is the single source of truth. When omitted, a fresh @xstate/store atom is created per view transition from spec.state. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
24
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability). | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-actor/src/abstract-actor.ts#L154) |
|
|
25
|
+
| <a id="property-children"></a> `children` | `any` | Children — required; must include <PlayRenderer /> (or use PlayUIProvider shorthand) | - | [packages/play-solid/src/ActorProvider.tsx:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/ActorProvider.tsx#L91) |
|
|
26
|
+
| <a id="property-fallback"></a> `fallback?` | `any` | Optional fallback element shown when currentView is null or ErrorBoundary catches | - | [packages/play-solid/src/ActorProvider.tsx:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/ActorProvider.tsx#L85) |
|
|
27
|
+
| <a id="property-onerror"></a> `onError?` | (`error`) => `void` | Optional callback invoked when SolidJS ErrorBoundary catches an error | - | [packages/play-solid/src/ActorProvider.tsx:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-solid/src/ActorProvider.tsx#L88) |
|
|
28
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-actor/src/abstract-actor.ts#L167) |
|
|
29
|
+
| <a id="property-registryresult"></a> `registryResult` | [`DefineRegistryResult`](DefineRegistryResult.md) | Full result from defineRegistry() — contains the component registry and action handlers factory. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-actor/src/abstract-actor.ts#L156) |
|
|
30
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (controlled mode). When provided, spec.state is ignored and this store is the single source of truth. When omitted, a fresh @xstate/store atom is created per view transition from spec.state. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.48/packages/play-actor/src/abstract-actor.ts#L162) |
|