@xmachines/docs 1.0.0-beta.51 → 1.0.0-beta.52
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 +13 -11
- package/api/@xmachines/play/README.md +6 -5
- 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 +2 -2
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/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 +125 -47
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +20 -10
- package/api/@xmachines/play-dom/functions/createPlayUI.md +9 -9
- package/api/@xmachines/play-dom/functions/createRenderer.md +3 -2
- package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +17 -13
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +15 -12
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +17 -14
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +10 -6
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +20 -8
- package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +13 -10
- 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 +6 -4
- 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 +23 -25
- 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 +6 -6
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +68 -0
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-react/README.md +3 -3
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +3 -3
- 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/AnyPlayActor.md +11 -0
- 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 +16 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +85 -41
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +68 -0
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +8 -8
- 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 +21 -18
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +83 -43
- 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/PlayActor.md +68 -0
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +64 -0
- 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 +4 -3
- 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 +18 -20
- package/api/@xmachines/play-solid/functions/useActor.md +3 -3
- 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/AnyPlayActor.md +11 -0
- package/api/@xmachines/play-solid/variables/ActorContext.md +2 -2
- 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 +77 -10
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +83 -35
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +4 -4
- 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/PlayActor.md +68 -0
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +8 -8
- 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 +6 -4
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/README.md +23 -14
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +3 -3
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +4 -4
- 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/AnyPlayActor.md +11 -0
- package/api/@xmachines/play-svelte-spa-router/README.md +13 -13
- 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 +6 -6
- 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 +20 -20
- 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 +6 -6
- 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 +3 -6
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +80 -35
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +68 -0
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +8 -8
- 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 +23 -17
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/{SolidRouterBridge.md → TanStackSolidRouterBridge.md} +86 -38
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +68 -0
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +8 -8
- 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 +6 -4
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
- package/api/@xmachines/play-vue/README.md +3 -3
- 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 +3 -3
- 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/AnyPlayActor.md +11 -0
- 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/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +27 -17
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +81 -33
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +68 -0
- 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 +6 -4
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +3 -3
- package/api/@xmachines/play-xstate/README.md +7 -3
- 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/interfaces/RouteObject.md +17 -0
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +9 -0
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/README.md +25 -12
- 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/contributing/architecture.md +599 -0
- package/contributing/configuration.md +262 -419
- package/contributing/development.md +300 -453
- package/contributing/testing.md +165 -172
- package/examples/@xmachines/play-dom-demo/README.md +30 -21
- 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 +23 -18
- package/examples/@xmachines/play-react-demo/README.md +38 -37
- 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 +37 -33
- package/examples/@xmachines/play-solid-demo/README.md +5 -2
- 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 +38 -25
- package/examples/@xmachines/play-svelte-demo/README.md +8 -5
- 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 +11 -9
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +14 -9
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +39 -13
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +27 -13
- package/examples/@xmachines/play-vue-demo/README.md +35 -24
- package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
- package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-vue-router-demo/README.md +2 -0
- package/examples/README.md +7 -7
- package/examples/multi-router-integration.md +13 -16
- package/examples/routing-patterns.md +2 -2
- package/guides/README.md +1 -1
- package/guides/actor-model.md +2 -2
- package/guides/getting-started.md +325 -132
- package/guides/signals.md +1 -1
- package/guides/state-machines.md +1 -1
- package/package.json +2 -2
- package/api/@xmachines/play-dom/functions/connectRenderer.md +0 -70
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +0 -28
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +0 -9
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +0 -9
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +0 -9
- package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +0 -9
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +0 -9
- package/guides/architecture.md +0 -500
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-router/src/types.ts:
|
|
5
|
+
Defined in: [packages/play-router/src/types.ts:341](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/types.ts#L341)
|
|
6
6
|
|
|
7
7
|
RouterBridge interface for runtime infrastructure adapters
|
|
8
8
|
|
|
@@ -54,7 +54,7 @@ class TanStackRouterBridge implements RouterBridge {
|
|
|
54
54
|
connect(): void | Promise<void>;
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Defined in: [packages/play-router/src/types.ts:
|
|
57
|
+
Defined in: [packages/play-router/src/types.ts:357](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/types.ts#L357)
|
|
58
58
|
|
|
59
59
|
Connect the router bridge to the Actor
|
|
60
60
|
|
|
@@ -83,7 +83,7 @@ await bridge.connect();
|
|
|
83
83
|
disconnect(): void | Promise<void>;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: [packages/play-router/src/types.ts:
|
|
86
|
+
Defined in: [packages/play-router/src/types.ts:373](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/types.ts#L373)
|
|
87
87
|
|
|
88
88
|
Disconnect the router bridge from the Actor
|
|
89
89
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
[API](../../../README.md) / [@xmachines/play-solid-router](../README.md) / RoutableActor
|
|
2
2
|
|
|
3
|
-
# Type Alias: RoutableActor
|
|
3
|
+
# ~~Type Alias: RoutableActor~~
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
type RoutableActor =
|
|
6
|
+
type RoutableActor = PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-solid-router/src/play-router-provider.tsx#L9)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Deprecated
|
|
12
|
+
|
|
13
|
+
Use `PlayActor` from `@xmachines/play-router`. Will be removed in the next major version.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type SolidRouterHooks = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-solid-router/src/play-router-provider.tsx#L27)
|
|
10
10
|
|
|
11
11
|
The three Solid Router hook results that `PlayRouterProvider` and `SolidRouterBridge`
|
|
12
12
|
require. Pass these directly from your component's hook calls:
|
|
@@ -31,7 +31,7 @@ const params = useParams(); // → SolidRouterHooks.params
|
|
|
31
31
|
location: Location;
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
34
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-solid-router/src/play-router-provider.tsx#L29)
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:29](https:/
|
|
|
41
41
|
navigate: Navigator;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
44
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-solid-router/src/play-router-provider.tsx#L28)
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -51,4 +51,4 @@ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:28](https:/
|
|
|
51
51
|
params: Params;
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
54
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-solid-router/src/play-router-provider.tsx#L30)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# @xmachines/play-svelte
|
|
6
6
|
|
|
7
|
-
Svelte 5 renderer for the XMachines Play architecture — connects
|
|
7
|
+
Svelte 5 renderer for the XMachines Play architecture — connects an actor to a `@json-render/svelte` catalog-driven UI using Svelte 5 runes and TC39 Signals.
|
|
8
8
|
|
|
9
9
|
Part of the [xmachines-js monorepo](../../README.md).
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ npm install @xmachines/play-svelte
|
|
|
17
17
|
**Peer dependencies** (must be installed separately):
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
npm install svelte@^5.
|
|
20
|
+
npm install svelte@^5.0.0 xstate@^5.31.0 @xstate/store@^3.17.0 \
|
|
21
21
|
@json-render/core@^0.18.0 @json-render/svelte@^0.18.0 @json-render/xstate@^0.18.0
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -95,22 +95,23 @@ actor.send({ type: "some.event" });
|
|
|
95
95
|
| Function | Description |
|
|
96
96
|
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
97
|
| `defineRegistry(catalog, options)` | Creates a typed component registry. Wraps `@json-render/svelte`'s `defineRegistry` with catalog-typed `params` on action handlers. Import from `@xmachines/play-svelte`, not `@json-render/svelte`. |
|
|
98
|
-
| `getActorContext()` | Returns the `
|
|
98
|
+
| `getActorContext()` | Returns the `AnyPlayActor` from the nearest `ActorProvider` ancestor. Throws if called outside the provider tree. |
|
|
99
99
|
| `getPlayViewContext()` | Returns the `ViewContextValue` (spec, registry, handlers, store) from the nearest `ActorProvider` ancestor. |
|
|
100
100
|
| `setActorContext(actor)` | Sets the actor context — used internally by `ActorProvider`. |
|
|
101
101
|
|
|
102
102
|
### Types
|
|
103
103
|
|
|
104
|
-
| Type | Description
|
|
105
|
-
| -------------------------- |
|
|
106
|
-
| `ActorProviderProps` | Props for `<ActorProvider>`: `actor`, `registryResult`, optional `store`, `fallback` snippet, `onError`, `onRenderError`. |
|
|
107
|
-
| `PlayUIProviderProps` | Extends `ActorProviderProps` with optional `validationFunctions`, `navigate`, and `functions`.
|
|
108
|
-
| `ViewContextValue` | The view context shape provided by `ActorProvider` and consumed by `PlayRenderer`.
|
|
109
|
-
| `
|
|
110
|
-
| `DefineRegistryOptions<C>` | Options for `defineRegistry`: `components`, catalog-typed `actions`, and `onRenderError`.
|
|
111
|
-
| `ActionFn<C, K>` | Per-action handler type with params inferred from catalog.
|
|
112
|
-
| `Actions<C>` | Map of catalog-typed action handlers.
|
|
113
|
-
| `
|
|
104
|
+
| Type | Description |
|
|
105
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
106
|
+
| `ActorProviderProps` | Props for `<ActorProvider>`: `actor`, `registryResult`, optional `store`, `fallback` snippet, `onError`, `onRenderError`, `children`. |
|
|
107
|
+
| `PlayUIProviderProps` | Extends `ActorProviderProps` with optional `validationFunctions`, `navigate`, and `functions`. |
|
|
108
|
+
| `ViewContextValue` | The view context shape provided by `ActorProvider` and consumed by `PlayRenderer`. |
|
|
109
|
+
| `AnyPlayActor` | `AbstractActor<AnyActorLogic> & Viewable` — the actor shape accepted by `ActorProvider` and `getActorContext`. |
|
|
110
|
+
| `DefineRegistryOptions<C>` | Options for `defineRegistry`: `components`, catalog-typed `actions`, and `onRenderError`. |
|
|
111
|
+
| `ActionFn<C, K>` | Per-action handler type with params inferred from catalog. |
|
|
112
|
+
| `Actions<C>` | Map of catalog-typed action handlers. |
|
|
113
|
+
| `SetState` | State setter function type passed as the second argument to action handlers. |
|
|
114
|
+
| `RenderErrorHandler` | Callback `(error: unknown, elementType: string) => void` invoked when a catalog component throws. |
|
|
114
115
|
|
|
115
116
|
### Re-exports from `@json-render/svelte`
|
|
116
117
|
|
|
@@ -127,6 +128,14 @@ import {
|
|
|
127
128
|
getBoundProp,
|
|
128
129
|
getStateValue,
|
|
129
130
|
} from "@xmachines/play-svelte";
|
|
131
|
+
|
|
132
|
+
// Types
|
|
133
|
+
import type {
|
|
134
|
+
JSONUIProviderProps,
|
|
135
|
+
BaseComponentProps,
|
|
136
|
+
ComponentFn,
|
|
137
|
+
ComponentContext,
|
|
138
|
+
} from "@xmachines/play-svelte";
|
|
130
139
|
```
|
|
131
140
|
|
|
132
141
|
## Testing
|
|
@@ -181,8 +190,8 @@ from @xmachines/play-svelte rather than @json-render/svelte directly.
|
|
|
181
190
|
|
|
182
191
|
- [ActionFn](type-aliases/ActionFn.md)
|
|
183
192
|
- [Actions](type-aliases/Actions.md)
|
|
193
|
+
- [AnyPlayActor](type-aliases/AnyPlayActor.md)
|
|
184
194
|
- [ComponentFn](type-aliases/ComponentFn.md)
|
|
185
|
-
- [PlayActor](type-aliases/PlayActor.md)
|
|
186
195
|
- [PlayRenderer](type-aliases/PlayRenderer.md)
|
|
187
196
|
- [RenderErrorHandler](type-aliases/RenderErrorHandler.md)
|
|
188
197
|
- [SetState](type-aliases/SetState.md)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineRegistry<C>(catalog, options): DefineRegistryResult;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/define-registry.ts:153](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-svelte/src/define-registry.ts:153](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/define-registry.ts#L153)
|
|
10
10
|
|
|
11
11
|
Create a component registry, restoring catalog-typed `params` on action handlers.
|
|
12
12
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
# Function: getActorContext()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function getActorContext():
|
|
6
|
+
function getActorContext(): AnyPlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L38)
|
|
10
10
|
|
|
11
11
|
Get the actor from the nearest ActorProvider ancestor.
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Renamed from useActor() to match @json-render/svelte's get\*Context() convention
|
|
|
14
14
|
|
|
15
15
|
## Returns
|
|
16
16
|
|
|
17
|
-
[`
|
|
17
|
+
[`AnyPlayActor`](../type-aliases/AnyPlayActor.md)
|
|
18
18
|
|
|
19
19
|
## Throws
|
|
20
20
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getPlayViewContext(): ViewContextValue;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L59)
|
|
10
10
|
|
|
11
11
|
Get the current view context from the nearest ActorProvider ancestor.
|
|
12
12
|
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
function setActorContext(actor): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L28)
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
13
|
-
| Parameter | Type
|
|
14
|
-
| --------- |
|
|
15
|
-
| `actor` | [`
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| --------- | ------------------------------------------------- |
|
|
15
|
+
| `actor` | [`AnyPlayActor`](../type-aliases/AnyPlayActor.md) |
|
|
16
16
|
|
|
17
17
|
## Returns
|
|
18
18
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ActorProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L68)
|
|
6
6
|
|
|
7
7
|
Framework-agnostic base props shared by every `ActorProvider` implementation
|
|
8
8
|
(React, Vue, Solid, Svelte). `TRegistry` captures the framework-specific
|
|
@@ -35,10 +35,10 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
35
35
|
|
|
36
36
|
| Property | Type | Description | Inherited from | Defined in |
|
|
37
37
|
| ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
-
| <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.
|
|
39
|
-
| <a id="property-children"></a> `children` | `Snippet` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
40
|
-
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
41
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
42
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/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.
|
|
43
|
-
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | 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.
|
|
44
|
-
| <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.
|
|
38
|
+
| <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.52/packages/play-actor/src/abstract-actor.ts#L154) |
|
|
39
|
+
| <a id="property-children"></a> `children` | `Snippet` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L71) |
|
|
40
|
+
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L69) |
|
|
41
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L70) |
|
|
42
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/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.52/packages/play-actor/src/abstract-actor.ts#L167) |
|
|
43
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | 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.52/packages/play-actor/src/abstract-actor.ts#L156) |
|
|
44
|
+
| <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.52/packages/play-actor/src/abstract-actor.ts#L162) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: DefineRegistryOptions\<C\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/define-registry.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-svelte/src/define-registry.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/define-registry.ts#L92)
|
|
6
6
|
|
|
7
7
|
Options for `defineRegistry`.
|
|
8
8
|
|
|
@@ -19,6 +19,6 @@ Mirrors the upstream shape but replaces the untyped
|
|
|
19
19
|
|
|
20
20
|
| Property | Type | Description | Defined in |
|
|
21
21
|
| ---------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| <a id="property-actions"></a> `actions?` | [`Actions`](../type-aliases/Actions.md)\<`C`\> | Catalog-typed action handler map. Each handler receives `params` typed to the exact schema defined in the catalog action (or `undefined` if no params were provided), plus the upstream `setState` and `state` arguments. Guard against `undefined` before accessing params: **Example** `actions: { login: async (params) => { if (!params) return; actor.send({ type: "auth.login", username: params.username }); }, logout: async () => actor.send({ type: "auth.logout" }), }` | [packages/play-svelte/src/define-registry.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-components"></a> `components?` | `Components`\<`C`\> | Svelte component implementations — keyed by catalog component name. | [packages/play-svelte/src/define-registry.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
24
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | `any` | Callback invoked when a catalog component throws during render. The error is caught by `@json-render/svelte`'s inner `<svelte:boundary>` that wraps each rendered element. When provided, this callback replaces the default `console.error(...)` fallback — the component is silently removed from the DOM and your callback receives the error and the element type name for custom error reporting or recovery logic. **Example** `const { registry, handlers } = defineRegistry(authCatalog, { components: { Login, Dashboard }, actions: { ... }, onRenderError(error, elementType) { console.warn(`Component <${elementType}> crashed:`, error); reportToSentry(error, { componentType: elementType }); }, });` **Param** The thrown value (not necessarily an `Error` instance). **Param** The catalog component name that crashed (e.g. `"Dashboard"`). | [packages/play-svelte/src/define-registry.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
+
| <a id="property-actions"></a> `actions?` | [`Actions`](../type-aliases/Actions.md)\<`C`\> | Catalog-typed action handler map. Each handler receives `params` typed to the exact schema defined in the catalog action (or `undefined` if no params were provided), plus the upstream `setState` and `state` arguments. Guard against `undefined` before accessing params: **Example** `actions: { login: async (params) => { if (!params) return; actor.send({ type: "auth.login", username: params.username }); }, logout: async () => actor.send({ type: "auth.logout" }), }` | [packages/play-svelte/src/define-registry.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/define-registry.ts#L116) |
|
|
23
|
+
| <a id="property-components"></a> `components?` | `Components`\<`C`\> | Svelte component implementations — keyed by catalog component name. | [packages/play-svelte/src/define-registry.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/define-registry.ts#L96) |
|
|
24
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | `any` | Callback invoked when a catalog component throws during render. The error is caught by `@json-render/svelte`'s inner `<svelte:boundary>` that wraps each rendered element. When provided, this callback replaces the default `console.error(...)` fallback — the component is silently removed from the DOM and your callback receives the error and the element type name for custom error reporting or recovery logic. **Example** `const { registry, handlers } = defineRegistry(authCatalog, { components: { Login, Dashboard }, actions: { ... }, onRenderError(error, elementType) { console.warn(`Component <${elementType}> crashed:`, error); reportToSentry(error, { componentType: elementType }); }, });` **Param** The thrown value (not necessarily an `Error` instance). **Param** The catalog component name that crashed (e.g. `"Dashboard"`). | [packages/play-svelte/src/define-registry.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/define-registry.ts#L141) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayUIProviderProps
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:78](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L78)
|
|
6
6
|
|
|
7
7
|
Framework-agnostic base props shared by every `ActorProvider` implementation
|
|
8
8
|
(React, Vue, Solid, Svelte). `TRegistry` captures the framework-specific
|
|
@@ -31,13 +31,13 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
|
|
|
31
31
|
|
|
32
32
|
| Property | Type | Description | Inherited from | Defined in |
|
|
33
33
|
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| <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). | [`ActorProviderProps`](ActorProviderProps.md).[`actor`](ActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
35
|
-
| <a id="property-children"></a> `children` | `Snippet` | - | [`ActorProviderProps`](ActorProviderProps.md).[`children`](ActorProviderProps.md#property-children) | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
36
|
-
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | [`ActorProviderProps`](ActorProviderProps.md).[`fallback`](ActorProviderProps.md#property-fallback) | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
37
|
-
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
38
|
-
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
39
|
-
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | [`ActorProviderProps`](ActorProviderProps.md).[`onError`](ActorProviderProps.md#property-onerror) | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
40
|
-
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`ActorProviderProps`](ActorProviderProps.md).[`onRenderError`](ActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
41
|
-
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | Full result from defineRegistry() — contains the component registry and action handlers factory. | [`ActorProviderProps`](ActorProviderProps.md).[`registryResult`](ActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
42
|
-
| <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. | [`ActorProviderProps`](ActorProviderProps.md).[`store`](ActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
43
|
-
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:
|
|
34
|
+
| <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). | [`ActorProviderProps`](ActorProviderProps.md).[`actor`](ActorProviderProps.md#property-actor) | [packages/play-actor/src/abstract-actor.ts:154](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L154) |
|
|
35
|
+
| <a id="property-children"></a> `children` | `Snippet` | - | [`ActorProviderProps`](ActorProviderProps.md).[`children`](ActorProviderProps.md#property-children) | [packages/play-svelte/src/actor-context.svelte.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L71) |
|
|
36
|
+
| <a id="property-fallback"></a> `fallback?` | `Snippet`\<\[\]\> | - | [`ActorProviderProps`](ActorProviderProps.md).[`fallback`](ActorProviderProps.md#property-fallback) | [packages/play-svelte/src/actor-context.svelte.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L69) |
|
|
37
|
+
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `unknown`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L84) |
|
|
38
|
+
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | - | - | [packages/play-svelte/src/actor-context.svelte.ts:83](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L83) |
|
|
39
|
+
| <a id="property-onerror"></a> `onError?` | (`error`, `reset`) => `void` | - | [`ActorProviderProps`](ActorProviderProps.md).[`onError`](ActorProviderProps.md#property-onerror) | [packages/play-svelte/src/actor-context.svelte.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L70) |
|
|
40
|
+
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`ActorProviderProps`](ActorProviderProps.md).[`onRenderError`](ActorProviderProps.md#property-onrendererror) | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L167) |
|
|
41
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | Full result from defineRegistry() — contains the component registry and action handlers factory. | [`ActorProviderProps`](ActorProviderProps.md).[`registryResult`](ActorProviderProps.md#property-registryresult) | [packages/play-actor/src/abstract-actor.ts:156](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L156) |
|
|
42
|
+
| <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. | [`ActorProviderProps`](ActorProviderProps.md).[`store`](ActorProviderProps.md#property-store) | [packages/play-actor/src/abstract-actor.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L162) |
|
|
43
|
+
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | - | - | [packages/play-svelte/src/actor-context.svelte.ts:79](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L79) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ViewContextValue
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:
|
|
5
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L47)
|
|
6
6
|
|
|
7
7
|
Framework-agnostic base for every framework's `ViewContextValue`.
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ type) so it is typed via `TRegistry` — the same generic used in `BaseActorProv
|
|
|
18
18
|
|
|
19
19
|
| Property | Type | Description | Inherited from | Defined in |
|
|
20
20
|
| ----------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
-
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | Action handlers resolved against the live StateStore. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`handlers`](../../play-actor/interfaces/BaseViewContextValue.md#property-handlers) | [packages/play-actor/src/abstract-actor.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | Component registry from registryResult.registry. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`registry`](../../play-actor/interfaces/BaseViewContextValue.md#property-registry) | [packages/play-actor/src/abstract-actor.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`spec`](../../play-actor/interfaces/BaseViewContextValue.md#property-spec) | [packages/play-actor/src/abstract-actor.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
24
|
-
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore — pass to JSONUIProvider/JsonUIProvider as `store` to share state across providers. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`store`](../../play-actor/interfaces/BaseViewContextValue.md#property-store) | [packages/play-actor/src/abstract-actor.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
+
| <a id="property-handlers"></a> `handlers` | `Record`\<`string`, `ActionHandler`\> | Action handlers resolved against the live StateStore. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`handlers`](../../play-actor/interfaces/BaseViewContextValue.md#property-handlers) | [packages/play-actor/src/abstract-actor.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L122) |
|
|
22
|
+
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | Component registry from registryResult.registry. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`registry`](../../play-actor/interfaces/BaseViewContextValue.md#property-registry) | [packages/play-actor/src/abstract-actor.ts:124](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L124) |
|
|
23
|
+
| <a id="property-spec"></a> `spec` | [`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) | The current PlaySpec to render. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`spec`](../../play-actor/interfaces/BaseViewContextValue.md#property-spec) | [packages/play-actor/src/abstract-actor.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L120) |
|
|
24
|
+
| <a id="property-store"></a> `store` | `StateStore` | The active StateStore — pass to JSONUIProvider/JsonUIProvider as `store` to share state across providers. | [`BaseViewContextValue`](../../play-actor/interfaces/BaseViewContextValue.md).[`store`](../../play-actor/interfaces/BaseViewContextValue.md#property-store) | [packages/play-actor/src/abstract-actor.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-actor/src/abstract-actor.ts#L126) |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[API](../../../README.md) / [@xmachines/play-svelte](../README.md) / AnyPlayActor
|
|
2
|
+
|
|
3
|
+
# Type Alias: AnyPlayActor
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type AnyPlayActor = AbstractActor<AnyActorLogic> & Viewable;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play-svelte/src/actor-context.svelte.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte/src/actor-context.svelte.ts#L22)
|
|
10
|
+
|
|
11
|
+
Actor type accepted by the Svelte `ActorProvider` and `getActorContext` — requires `Viewable` for view rendering. For the full routing + view shape, use `PlayActor` from `@xmachines/play-router`.
|
|
@@ -22,7 +22,7 @@ npm install @xmachines/play-svelte-spa-router
|
|
|
22
22
|
**Peer dependencies** — install alongside the adapter:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npm install svelte@^5.
|
|
25
|
+
npm install svelte@^5.0.0 svelte-spa-router@^5.0.0 xstate@^5.31.0
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
---
|
|
@@ -95,7 +95,7 @@ Connects `svelte-spa-router` to a `Routable` actor. Returns a cleanup (disconnec
|
|
|
95
95
|
|
|
96
96
|
```typescript
|
|
97
97
|
interface ConnectRouterOptions {
|
|
98
|
-
readonly actor:
|
|
98
|
+
readonly actor: RoutableActor;
|
|
99
99
|
readonly routeMap: RouteMap;
|
|
100
100
|
/**
|
|
101
101
|
* Window-like object for `hashchange` subscriptions.
|
|
@@ -108,7 +108,7 @@ interface ConnectRouterOptions {
|
|
|
108
108
|
|
|
109
109
|
**Behaviour:**
|
|
110
110
|
|
|
111
|
-
- On `connect`: reads the current hash URL via `router.loc`, syncs the actor via a `play.route` event, and starts watching for `hashchange` events.
|
|
111
|
+
- On `connect`: reads the current hash URL via `router.loc.location`, syncs the actor via a `play.route` event, and starts watching for `hashchange` events.
|
|
112
112
|
- On actor `currentRoute` change: calls `push(path)` (svelte-spa-router) to update the URL.
|
|
113
113
|
- On `hashchange`: parses the new location from `router.loc` and sends `play.route` to the actor.
|
|
114
114
|
- On disconnect: removes the `hashchange` listener and unsubscribes from actor signals.
|
|
@@ -128,15 +128,15 @@ Re-exported from `@xmachines/play-router`. Bidirectional map between state IDs a
|
|
|
128
128
|
|
|
129
129
|
### Exported types
|
|
130
130
|
|
|
131
|
-
| Type | Description
|
|
132
|
-
| ---------------------- |
|
|
133
|
-
| `ConnectRouterOptions` | Options accepted by `connectRouter`
|
|
134
|
-
| `RoutableActor` | `AbstractActor
|
|
135
|
-
| `PlayRouteEvent` | The `play.route` event type sent to the actor
|
|
136
|
-
| `RouterBridge` | Interface that all router bridges must satisfy
|
|
137
|
-
| `RouteMapping` | Route-entry shape within a `RouteMap`
|
|
138
|
-
| `RouteMapOptions` | Options for `createRouteMap`
|
|
139
|
-
| `WindowLike` | Minimal `window` interface for testability
|
|
131
|
+
| Type | Description |
|
|
132
|
+
| ---------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
133
|
+
| `ConnectRouterOptions` | Options accepted by `connectRouter` |
|
|
134
|
+
| `RoutableActor` | Minimal actor interface — `AbstractActor` from `@xmachines/play-actor` combined with the `Routable` mixin |
|
|
135
|
+
| `PlayRouteEvent` | The `play.route` event type sent to the actor |
|
|
136
|
+
| `RouterBridge` | Interface that all router bridges must satisfy |
|
|
137
|
+
| `RouteMapping` | Route-entry shape within a `RouteMap` |
|
|
138
|
+
| `RouteMapOptions` | Options for `createRouteMap` |
|
|
139
|
+
| `WindowLike` | Minimal `window` interface for testability |
|
|
140
140
|
|
|
141
141
|
---
|
|
142
142
|
|
|
@@ -150,7 +150,7 @@ Re-exported from `@xmachines/play-router`. Bidirectional map between state IDs a
|
|
|
150
150
|
| `watchRouterChanges()` | `win.addEventListener("hashchange", …)` |
|
|
151
151
|
| `unwatchRouterChanges()` | `win.removeEventListener("hashchange", …)` |
|
|
152
152
|
|
|
153
|
-
Initial path
|
|
153
|
+
Initial path is read from `router.loc.location` and initial search from `router.loc.querystring`. Restore-vs-deeplink detection, guard-redirect flows, and `isProcessingNavigation` debouncing are inherited from `RouterBridgeBase`.
|
|
154
154
|
|
|
155
155
|
---
|
|
156
156
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/base-route-map.ts#L100)
|
|
6
6
|
|
|
7
7
|
Shared bidirectional route map base class.
|
|
8
8
|
|
|
@@ -50,7 +50,7 @@ map.getPathByStateId("missing"); // null
|
|
|
50
50
|
new RouteMap(mappings, options?): RouteMap;
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Defined in: [play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
53
|
+
Defined in: [play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/base-route-map.ts#L125)
|
|
54
54
|
|
|
55
55
|
Build a route map from an array of state ID ↔ path mappings.
|
|
56
56
|
|
|
@@ -78,7 +78,7 @@ buckets for efficient candidate selection.
|
|
|
78
78
|
getPathByStateId(stateId): string | null;
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Defined in: [play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
81
|
+
Defined in: [play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/base-route-map.ts#L209)
|
|
82
82
|
|
|
83
83
|
Look up the path pattern registered for a state ID.
|
|
84
84
|
|
|
@@ -109,7 +109,7 @@ map.getPathByStateId("missing"); // null
|
|
|
109
109
|
getStateIdByPath(path): string | null;
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Defined in: [play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
112
|
+
Defined in: [play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/base-route-map.ts#L174)
|
|
113
113
|
|
|
114
114
|
Resolve a URL path to its mapped state ID.
|
|
115
115
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function connectRouter(options): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-svelte-spa-router/src/connect-router.ts:
|
|
9
|
+
Defined in: [play-svelte-spa-router/src/connect-router.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte-spa-router/src/connect-router.ts#L28)
|
|
10
10
|
|
|
11
11
|
Connect svelte-spa-router to actor.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine, options?): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-router/src/create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-router/src/create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-router/src/create-route-map.ts#L45)
|
|
10
10
|
|
|
11
11
|
Create a `RouteMap` from an XState state machine.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ConnectRouterOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [play-svelte-spa-router/src/connect-router.ts:
|
|
5
|
+
Defined in: [play-svelte-spa-router/src/connect-router.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte-spa-router/src/connect-router.ts#L5)
|
|
6
6
|
|
|
7
7
|
@xmachines/play-svelte-spa-router
|
|
8
8
|
|
|
@@ -10,8 +10,8 @@ Svelte SPA router adapter for XMachines Play architecture.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
| Property | Modifier | Type
|
|
14
|
-
| ----------------------------------------- | ---------- |
|
|
15
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`
|
|
16
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md)
|
|
17
|
-
| <a id="property-window"></a> `window?` | `readonly` | [`WindowLike`](WindowLike.md)
|
|
13
|
+
| Property | Modifier | Type | Description | Defined in |
|
|
14
|
+
| ----------------------------------------- | ---------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](../../play-dom-router/interfaces/RoutableActor.md) | - | [play-svelte-spa-router/src/connect-router.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte-spa-router/src/connect-router.ts#L6) |
|
|
16
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteMap`](../classes/RouteMap.md) | - | [play-svelte-spa-router/src/connect-router.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte-spa-router/src/connect-router.ts#L7) |
|
|
17
|
+
| <a id="property-window"></a> `window?` | `readonly` | [`WindowLike`](WindowLike.md) | Window-like object for `hashchange` subscriptions. Defaults to the global `window`. Pass a mock in tests or a no-op in SSR environments. | [play-svelte-spa-router/src/connect-router.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.52/packages/play-svelte-spa-router/src/connect-router.ts#L12) |
|