@xmachines/docs 1.0.0-beta.30 → 1.0.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/@xmachines/play/README.md +5 -0
- package/api/@xmachines/play/classes/NonNullableError.md +189 -0
- package/api/@xmachines/play/classes/PlayError.md +9 -4
- package/api/@xmachines/play/functions/assertNonNullable.md +56 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/README.md +9 -9
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +40 -10
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +20 -12
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/defineRegistry.md +8 -21
- package/api/@xmachines/play-dom/functions/renderSpec.md +15 -13
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -48
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DefineRegistryOptions.md +7 -9
- package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +7 -8
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +9 -12
- package/api/@xmachines/play-dom/interfaces/EventHandle.md +6 -20
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
- package/api/@xmachines/play-dom/type-aliases/ActionFn.md +30 -0
- package/api/@xmachines/play-dom/type-aliases/Actions.md +18 -0
- package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -28
- package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -7
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -17
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -6
- package/api/@xmachines/play-dom/type-aliases/DomSchema.md +9 -0
- package/api/@xmachines/play-dom/variables/schema.md +56 -0
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-react/README.md +29 -32
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +11 -12
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +12 -5
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +1 -1
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +23 -23
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +1 -1
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
- package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
- package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +1 -1
- package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
- package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +28 -29
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/useBoundProp.md +45 -0
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +11 -12
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +4 -25
- package/api/@xmachines/play-solid-router/README.md +2 -2
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +28 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +7 -7
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-svelte/README.md +23 -7
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +12 -35
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +23 -0
- package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +8 -9
- package/api/@xmachines/play-svelte/type-aliases/ActionFn.md +30 -0
- package/api/@xmachines/play-svelte/type-aliases/Actions.md +17 -0
- package/api/@xmachines/play-svelte/type-aliases/SetState.md +21 -0
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +8 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +7 -7
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +24 -24
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +9 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
- package/api/@xmachines/play-vue/README.md +33 -33
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/useBoundProp.md +45 -0
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +9 -10
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +3 -3
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +39 -26
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +1 -0
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +54 -23
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/README.md +47 -47
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/examples/@xmachines/play-dom-demo/README.md +7 -0
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +23 -0
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +9 -0
- 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 +9 -0
- 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 +172 -0
- package/examples/@xmachines/play-react-demo/README.md +9 -3
- package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-react-demo/functions/DebugPanel.md +1 -1
- package/examples/@xmachines/play-react-demo/functions/HeaderNav.md +1 -1
- package/examples/@xmachines/play-react-demo/functions/Shell.md +1 -1
- package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +9 -0
- 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 +11 -0
- 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 +11 -0
- package/examples/@xmachines/play-react-demo/variables/NavBarView.md +9 -0
- 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 +13 -0
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +172 -0
- package/examples/@xmachines/play-react-router-demo/README.md +1 -3
- package/examples/@xmachines/play-solid-demo/README.md +9 -3
- package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/DebugPanel.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/HeaderNav.md +1 -1
- package/examples/@xmachines/play-solid-demo/functions/Shell.md +1 -1
- package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +9 -0
- 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 +11 -0
- 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 +11 -0
- package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +12 -0
- 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 +13 -0
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +172 -0
- package/examples/@xmachines/play-solid-router-demo/README.md +1 -3
- package/examples/README.md +2 -2
- package/package.json +6 -6
- package/rfc/play.md +19 -19
- package/api/@xmachines/play-react/functions/useStateBinding.md +0 -34
- package/api/@xmachines/play-solid/functions/useStateBinding.md +0 -25
- package/api/@xmachines/play-vue/functions/useStateBinding.md +0 -32
|
@@ -38,7 +38,7 @@ without muting console output.
|
|
|
38
38
|
- `PlayRenderer` — main renderer component
|
|
39
39
|
- `useActor` — hook for accessing the actor inside a `PlayRenderer` tree
|
|
40
40
|
- `defineRegistry` — re-exported from `@json-render/solid`
|
|
41
|
-
- `
|
|
41
|
+
- `useBoundProp` — re-exported from `@json-render/solid`
|
|
42
42
|
- `ComponentFn` (type) — re-exported from `@json-render/solid`
|
|
43
43
|
- `ComponentContext` (type) — re-exported from `@json-render/solid`
|
|
44
44
|
- `PlayRendererProps` (type)
|
|
@@ -83,9 +83,17 @@ const Dashboard: ComponentFn<typeof catalog, "Dashboard"> = ({ props }) => (
|
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
// 3. Build registry
|
|
86
|
-
const
|
|
86
|
+
const registryResult = defineRegistry(catalog, {
|
|
87
87
|
components: { Login, Dashboard },
|
|
88
|
-
actions: {
|
|
88
|
+
actions: {
|
|
89
|
+
login: async (params) => {
|
|
90
|
+
if (!params) return;
|
|
91
|
+
actor.send({ type: "auth.login", username: params.username });
|
|
92
|
+
},
|
|
93
|
+
logout: async (params) => {
|
|
94
|
+
actor.send({ type: "auth.logout" });
|
|
95
|
+
},
|
|
96
|
+
},
|
|
89
97
|
});
|
|
90
98
|
|
|
91
99
|
// 4. Define machine with view metadata
|
|
@@ -160,13 +168,7 @@ const actor = createPlayer();
|
|
|
160
168
|
actor.start();
|
|
161
169
|
|
|
162
170
|
function App() {
|
|
163
|
-
return
|
|
164
|
-
<PlayRenderer
|
|
165
|
-
actor={actor}
|
|
166
|
-
registry={registry}
|
|
167
|
-
actions={{ login: "auth.login", logout: "auth.logout" }}
|
|
168
|
-
/>
|
|
169
|
-
);
|
|
171
|
+
return <PlayRenderer actor={actor} registryResult={registryResult} />;
|
|
170
172
|
}
|
|
171
173
|
```
|
|
172
174
|
|
|
@@ -179,8 +181,7 @@ Main component. Subscribes to `actor.currentView` and renders the spec.
|
|
|
179
181
|
```tsx
|
|
180
182
|
<PlayRenderer
|
|
181
183
|
actor={actor}
|
|
182
|
-
|
|
183
|
-
actions={{ login: "auth.login" }}
|
|
184
|
+
registryResult={registryResult}
|
|
184
185
|
store={myStore}
|
|
185
186
|
fallback={<p>Loading…</p>}
|
|
186
187
|
/>
|
|
@@ -188,21 +189,11 @@ Main component. Subscribes to `actor.currentView` and renders the spec.
|
|
|
188
189
|
|
|
189
190
|
**`actor`** — A `PlayerActor` (or any `AbstractActor & Viewable`). Provides the `currentView` signal.
|
|
190
191
|
|
|
191
|
-
**`
|
|
192
|
+
**`registryResult`** — The full `DefineRegistryResult` returned by `defineRegistry(catalog, { components, actions })` from `@xmachines/play-solid`.
|
|
192
193
|
|
|
193
194
|
`defineRegistry` also accepts `onRenderError(error, elementType)`, which receives errors
|
|
194
195
|
caught by `@json-render/solid`'s inner element boundary before the default logger is used.
|
|
195
196
|
|
|
196
|
-
**`actions`** — Maps json-render action names (from spec `on` bindings) to XState event type strings. Type-checked against `EventFromLogic<TLogic>["type"]` when `TLogic` is specified:
|
|
197
|
-
|
|
198
|
-
```tsx
|
|
199
|
-
<PlayRenderer<typeof machine>
|
|
200
|
-
actor={actor}
|
|
201
|
-
registry={registry}
|
|
202
|
-
actions={{ login: "auth.login", logout: "auth.logout" }}
|
|
203
|
-
/>
|
|
204
|
-
```
|
|
205
|
-
|
|
206
197
|
**`store`** (optional) — Controls per-view UI state (`$state` bindings, form values):
|
|
207
198
|
|
|
208
199
|
- **Omitted (uncontrolled, default):** A fresh `@xstate/store` atom is created per view transition, seeded from `view.spec.state`.
|
|
@@ -215,16 +206,24 @@ import type { StateStore } from "@json-render/core";
|
|
|
215
206
|
|
|
216
207
|
const store: StateStore = xstateStoreStateStore({ atom: createAtom({ username: "" }) });
|
|
217
208
|
|
|
218
|
-
<PlayRenderer actor={actor}
|
|
209
|
+
<PlayRenderer actor={actor} registryResult={registryResult} store={store} />;
|
|
219
210
|
```
|
|
220
211
|
|
|
221
212
|
**Inner render errors** — You can intercept catalog component render failures without
|
|
222
213
|
overriding the outer Solid error boundary:
|
|
223
214
|
|
|
224
215
|
```tsx
|
|
225
|
-
const
|
|
216
|
+
const registryResult = defineRegistry(catalog, {
|
|
226
217
|
components: { Login, Dashboard },
|
|
227
|
-
actions: {
|
|
218
|
+
actions: {
|
|
219
|
+
login: async (params) => {
|
|
220
|
+
if (!params) return;
|
|
221
|
+
actor.send({ type: "auth.login", username: params.username });
|
|
222
|
+
},
|
|
223
|
+
logout: async (params) => {
|
|
224
|
+
actor.send({ type: "auth.logout" });
|
|
225
|
+
},
|
|
226
|
+
},
|
|
228
227
|
onRenderError(error, elementType) {
|
|
229
228
|
reportExpectedRenderError(error, elementType);
|
|
230
229
|
},
|
|
@@ -272,7 +271,7 @@ Priority: **route param fills `undefined` slots; explicit non-`undefined` spec p
|
|
|
272
271
|
- SolidJS signals are only used to trigger re-renders — not for business logic
|
|
273
272
|
- `actor.currentView` (TC39 Signal) is bridged into a SolidJS `createSignal` inside `PlayRenderer`
|
|
274
273
|
- Per-view UI state lives in an `@xstate/store` atom, not in SolidJS reactive state
|
|
275
|
-
- `@json-render/solid` drives rendering; `PlayRenderer` is the signal bridge — import `defineRegistry`, `ComponentFn`, `ComponentContext`, and `
|
|
274
|
+
- `@json-render/solid` drives rendering; `PlayRenderer` is the signal bridge — import `defineRegistry`, `ComponentFn`, `ComponentContext`, and `useBoundProp` from `@xmachines/play-solid`
|
|
276
275
|
|
|
277
276
|
@xmachines/play-solid - SolidJS renderer for XMachines Play architecture
|
|
278
277
|
|
|
@@ -280,7 +279,7 @@ Provides a thin SolidJS rendering layer that passively observes actor signals
|
|
|
280
279
|
and renders UI components via @json-render/solid. SolidJS reactivity is only
|
|
281
280
|
used to trigger re-renders — signals are the source of truth.
|
|
282
281
|
|
|
283
|
-
Re-exports `defineRegistry`, `
|
|
282
|
+
Re-exports `defineRegistry`, `useBoundProp`, `ComponentFn`, and
|
|
284
283
|
`ComponentContext` from `@json-render/solid` so consumers import everything
|
|
285
284
|
from `@xmachines/play-solid` rather than `@json-render/solid` directly.
|
|
286
285
|
|
|
@@ -302,4 +301,4 @@ from `@xmachines/play-solid` rather than `@json-render/solid` directly.
|
|
|
302
301
|
|
|
303
302
|
- [defineRegistry](functions/defineRegistry.md)
|
|
304
303
|
- [useActor](functions/useActor.md)
|
|
305
|
-
- [
|
|
304
|
+
- [useBoundProp](functions/useBoundProp.md)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function useActor(): PlayActor;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/useActor.ts#L49)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@xmachines/play-solid](../README.md) / useBoundProp
|
|
2
|
+
|
|
3
|
+
# Function: useBoundProp()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function useBoundProp<T>(propValue, bindingPath): [T | undefined, (value) => void];
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: `@json-render/solid`
|
|
10
|
+
|
|
11
|
+
Hook for two-way bound props. Returns `[value, setValue]` where:
|
|
12
|
+
|
|
13
|
+
- `value` is the already-resolved prop value (passed through from render props)
|
|
14
|
+
- `setValue` writes back to the bound state path (no-op if not bound)
|
|
15
|
+
|
|
16
|
+
Designed to work with the `bindings` map that the renderer provides when
|
|
17
|
+
a prop uses `{ $bindState: "/path" }` or `{ $bindItem: "field" }`.
|
|
18
|
+
|
|
19
|
+
## Type Parameters
|
|
20
|
+
|
|
21
|
+
| Type Parameter |
|
|
22
|
+
| -------------- |
|
|
23
|
+
| `T` |
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
| Parameter | Type |
|
|
28
|
+
| ------------- | ----------------------- |
|
|
29
|
+
| `propValue` | `T` \| `undefined` |
|
|
30
|
+
| `bindingPath` | `string` \| `undefined` |
|
|
31
|
+
|
|
32
|
+
## Returns
|
|
33
|
+
|
|
34
|
+
\[`T` \| `undefined`, (`value`) => `void`\]
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { useBoundProp } from "@json-render/solid";
|
|
40
|
+
|
|
41
|
+
const Input: ComponentRenderer = (ctx) => {
|
|
42
|
+
const [value, setValue] = useBoundProp<string>(ctx.props.value, ctx.bindings?.value);
|
|
43
|
+
return <input value={value ?? ""} onInput={(e) => setValue(e.target.value)} />;
|
|
44
|
+
};
|
|
45
|
+
```
|
|
@@ -2,23 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRendererProps\<TLogic\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-solid/src/types.ts:
|
|
5
|
+
Defined in: [packages/play-solid/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L26)
|
|
6
6
|
|
|
7
7
|
Props for PlayRenderer component
|
|
8
8
|
|
|
9
9
|
## Type Parameters
|
|
10
10
|
|
|
11
|
-
| Type Parameter | Default type | Description
|
|
12
|
-
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
13
|
-
| `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | The XState actor logic type. Defaults to `AnyActorLogic` for non-generic usage.
|
|
11
|
+
| Type Parameter | Default type | Description |
|
|
12
|
+
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
13
|
+
| `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | The XState actor logic type. Defaults to `AnyActorLogic` for non-generic usage. |
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
| Property
|
|
18
|
-
|
|
|
19
|
-
| <a id="property-
|
|
20
|
-
| <a id="property-
|
|
21
|
-
| <a id="property-
|
|
22
|
-
| <a id="property-
|
|
23
|
-
| <a id="property-
|
|
24
|
-
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and this store is the single source of truth for UI state (form values, etc.). When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [packages/play-solid/src/types.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.30/packages/play-solid/src/types.ts#L58) |
|
|
17
|
+
| Property | Type | Description | Defined in |
|
|
18
|
+
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-solid/src/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L28) |
|
|
20
|
+
| <a id="property-fallback"></a> `fallback?` | `any` | Optional element shown when currentView is null or a component throws | [packages/play-solid/src/types.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L38) |
|
|
21
|
+
| <a id="property-onerror"></a> `onError?` | (`error`) => `void` | Optional callback invoked when a catalog component throws during render. | [packages/play-solid/src/types.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L45) |
|
|
22
|
+
| <a id="property-registryresult"></a> `registryResult` | `DefineRegistryResult` | Full result from defineRegistry() in @json-render/solid. Contains both the component registry and the action handlers factory. Action handlers are real async functions dispatching to the actor (not string-mapped event types). | [packages/play-solid/src/types.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L35) |
|
|
23
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and this store is the single source of truth for UI state (form values, etc.). When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [packages/play-solid/src/types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/types.ts#L54) |
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type PlayActor = AbstractActor<AnyActorLogic>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-solid/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/useActor.ts#L26)
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
const PlayRenderer: Component<PlayRendererProps>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid/src/PlayRenderer.tsx:
|
|
9
|
+
Defined in: [packages/play-solid/src/PlayRenderer.tsx:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid/src/PlayRenderer.tsx#L74)
|
|
10
10
|
|
|
11
11
|
Main renderer component that subscribes to actor signals and renders UI
|
|
12
12
|
|
|
13
|
-
Architecture
|
|
13
|
+
Architecture:
|
|
14
14
|
|
|
15
15
|
- Subscribes to actor.currentView signal via TC39 Signal.subtle.Watcher
|
|
16
|
-
- Renders view.spec via
|
|
17
|
-
- Routes actions to actor.send() via
|
|
16
|
+
- Renders view.spec via StateProvider → PlayRendererInner (with ActionProvider + handlers)
|
|
17
|
+
- Routes actions to actor.send() via registryResult.handlers() — real async functions
|
|
18
18
|
- SolidJS signal only for triggering renders, NOT business logic
|
|
19
19
|
- State store: uses external `store` prop if provided (controlled mode); otherwise
|
|
20
20
|
creates a fresh @xstate/store atom per view transition seeded from spec.state.
|
|
@@ -25,24 +25,3 @@ Architecture (per XMachines Play patterns):
|
|
|
25
25
|
Invariant: Actor Authority - Actor decides all state transitions via guards.
|
|
26
26
|
Invariant: Passive Infrastructure - Component observes signals and sends events.
|
|
27
27
|
Invariant: Signal-Only Reactivity - Business logic state lives in actor signals.
|
|
28
|
-
|
|
29
|
-
## Example
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
import { PlayRenderer } from "@xmachines/play-solid";
|
|
33
|
-
import { defineRegistry } from "@json-render/solid";
|
|
34
|
-
|
|
35
|
-
const { registry } = defineRegistry(catalog, { components: { ... } });
|
|
36
|
-
|
|
37
|
-
// Uncontrolled — fresh atom per view, seeded from spec.state:
|
|
38
|
-
<PlayRenderer actor={actor} registry={registry} actions={{ login: "auth.login" }} />
|
|
39
|
-
|
|
40
|
-
// Controlled — caller provides and owns the store:
|
|
41
|
-
import { createAtom } from "@xstate/store";
|
|
42
|
-
import { xstateStoreStateStore } from "@json-render/xstate";
|
|
43
|
-
const store = xstateStoreStateStore({ atom: createAtom({ username: "" }) });
|
|
44
|
-
<PlayRenderer actor={actor} registry={registry} store={store} actions={{ login: "auth.login" }} />
|
|
45
|
-
|
|
46
|
-
// With observability hook:
|
|
47
|
-
<PlayRenderer actor={actor} registry={registry} onError={(err) => Sentry.captureException(err)} />
|
|
48
|
-
```
|
|
@@ -168,8 +168,8 @@ routeMap.getPathByStateId(stateId: string): string | null
|
|
|
168
168
|
**Constructor Parameters:**
|
|
169
169
|
|
|
170
170
|
- `mappings` - Array of `{ stateId, path }` entries:
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
- `stateId` — State machine state ID (e.g., `'#profile'`)
|
|
172
|
+
- `path` — SolidJS Router path pattern (e.g., `'/profile/:userId'`)
|
|
173
173
|
|
|
174
174
|
**Methods:**
|
|
175
175
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-router/src/base-route-map.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/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?): BaseRouteMap;
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Defined in: [packages/play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
53
|
+
Defined in: [packages/play-router/src/base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/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: [packages/play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
81
|
+
Defined in: [packages/play-router/src/base-route-map.ts:209](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/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: [packages/play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
112
|
+
Defined in: [packages/play-router/src/base-route-map.ts:174](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/base-route-map.ts#L174)
|
|
113
113
|
|
|
114
114
|
Resolve a URL path to its mapped state ID.
|
|
115
115
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: SolidRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L55)
|
|
6
6
|
|
|
7
7
|
SolidJS Router integration bridge extending RouterBridgeBase
|
|
8
8
|
|
|
@@ -31,7 +31,7 @@ new SolidRouterBridge(
|
|
|
31
31
|
routeMap): SolidRouterBridge;
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
34
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L76)
|
|
35
35
|
|
|
36
36
|
Create a SolidJS Router bridge
|
|
37
37
|
|
|
@@ -59,15 +59,15 @@ Create a SolidJS Router bridge
|
|
|
59
59
|
|
|
60
60
|
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|
|
61
61
|
| --------------------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
62
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../interfaces/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`actor`](../../play-router/classes/RouterBridgeBase.md#property-actor) | [packages/play-router/src/router-bridge-base.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
63
|
-
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`hasConnectedOnce`](../../play-router/classes/RouterBridgeBase.md#property-hasconnectedonce) | [packages/play-router/src/router-bridge-base.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
64
|
-
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isConnected`](../../play-router/classes/RouterBridgeBase.md#property-isconnected) | [packages/play-router/src/router-bridge-base.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
65
|
-
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isProcessingNavigation`](../../play-router/classes/RouterBridgeBase.md#property-isprocessingnavigation) | [packages/play-router/src/router-bridge-base.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
66
|
-
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`lastSyncedPath`](../../play-router/classes/RouterBridgeBase.md#property-lastsyncedpath) | [packages/play-router/src/router-bridge-base.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
67
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | `undefined` | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap()` or an equivalent. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeMap`](../../play-router/classes/RouterBridgeBase.md#property-routemap) | [packages/play-router/src/router-bridge-base.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
68
|
-
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [packages/play-router/src/router-bridge-base.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
69
|
-
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [packages/play-router/src/router-bridge-base.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
70
|
-
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`RouteWatcherHandle`](../../play-router/interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeWatcher`](../../play-router/classes/RouterBridgeBase.md#property-routewatcher) | [packages/play-router/src/router-bridge-base.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
62
|
+
| <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../interfaces/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`actor`](../../play-router/classes/RouterBridgeBase.md#property-actor) | [packages/play-router/src/router-bridge-base.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L99) |
|
|
63
|
+
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`hasConnectedOnce`](../../play-router/classes/RouterBridgeBase.md#property-hasconnectedonce) | [packages/play-router/src/router-bridge-base.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L87) |
|
|
64
|
+
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isConnected`](../../play-router/classes/RouterBridgeBase.md#property-isconnected) | [packages/play-router/src/router-bridge-base.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L86) |
|
|
65
|
+
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isProcessingNavigation`](../../play-router/classes/RouterBridgeBase.md#property-isprocessingnavigation) | [packages/play-router/src/router-bridge-base.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L89) |
|
|
66
|
+
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`lastSyncedPath`](../../play-router/classes/RouterBridgeBase.md#property-lastsyncedpath) | [packages/play-router/src/router-bridge-base.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L88) |
|
|
67
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | `undefined` | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap()` or an equivalent. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeMap`](../../play-router/classes/RouterBridgeBase.md#property-routemap) | [packages/play-router/src/router-bridge-base.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L100) |
|
|
68
|
+
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [packages/play-router/src/router-bridge-base.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L102) |
|
|
69
|
+
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [packages/play-router/src/router-bridge-base.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L101) |
|
|
70
|
+
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`RouteWatcherHandle`](../../play-router/interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeWatcher`](../../play-router/classes/RouterBridgeBase.md#property-routewatcher) | [packages/play-router/src/router-bridge-base.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L90) |
|
|
71
71
|
|
|
72
72
|
## Methods
|
|
73
73
|
|
|
@@ -77,7 +77,7 @@ Create a SolidJS Router bridge
|
|
|
77
77
|
connect(): void;
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
80
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:126](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L126)
|
|
81
81
|
|
|
82
82
|
Connect the router bridge to the Actor.
|
|
83
83
|
|
|
@@ -109,7 +109,7 @@ Adapters that need custom initial-sync behavior should override
|
|
|
109
109
|
disconnect(): void;
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:
|
|
112
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:214](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L214)
|
|
113
113
|
|
|
114
114
|
Disconnect the router bridge from the Actor.
|
|
115
115
|
|
|
@@ -131,7 +131,7 @@ Stops signal watching and unregisters framework-specific router listener.
|
|
|
131
131
|
dispose(): void;
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:188](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
134
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:188](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L188)
|
|
135
135
|
|
|
136
136
|
Dispose the bridge (alias for disconnect).
|
|
137
137
|
|
|
@@ -153,7 +153,7 @@ onCleanup(() => bridge.dispose());
|
|
|
153
153
|
protected extractParams(pathname, stateId): Record<string, string>;
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
156
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L105)
|
|
157
157
|
|
|
158
158
|
Extract path parameters using Solid's pre-parsed `useParams()` values.
|
|
159
159
|
|
|
@@ -190,7 +190,7 @@ Normalized path parameters with undefined/empty values filtered out
|
|
|
190
190
|
protected extractQuery(search): Record<string, string>;
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:
|
|
193
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L359)
|
|
194
194
|
|
|
195
195
|
Extract query parameters from URL search string.
|
|
196
196
|
|
|
@@ -218,7 +218,7 @@ Extracted query parameters or empty object
|
|
|
218
218
|
protected getInitialRouterPath(): string | null;
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
221
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:127](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L127)
|
|
222
222
|
|
|
223
223
|
Get the current router pathname for initial URL -> actor sync on connect.
|
|
224
224
|
|
|
@@ -238,7 +238,7 @@ Get the current router pathname for initial URL -> actor sync on connect.
|
|
|
238
238
|
protected getInitialRouterSearch(): string | undefined;
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
241
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L138)
|
|
242
242
|
|
|
243
243
|
Return the initial URL search string for query-param forwarding on `connect()`.
|
|
244
244
|
|
|
@@ -262,7 +262,7 @@ params) returns `undefined` so `syncActorFromRouter` produces `query: {}`.
|
|
|
262
262
|
protected navigateRouter(path): void;
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
265
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L120)
|
|
266
266
|
|
|
267
267
|
Navigate SolidJS Router to the given path.
|
|
268
268
|
|
|
@@ -288,7 +288,7 @@ Navigate SolidJS Router to the given path.
|
|
|
288
288
|
protected resolveNavigationPath(route): string | null;
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:
|
|
291
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:344](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L344)
|
|
292
292
|
|
|
293
293
|
Resolve an actor route value to a concrete URL path for navigation.
|
|
294
294
|
|
|
@@ -327,7 +327,7 @@ Concrete URL path, or `null` if navigation should be skipped
|
|
|
327
327
|
protected syncActorFromRouter(pathname, search?): void;
|
|
328
328
|
```
|
|
329
329
|
|
|
330
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:
|
|
330
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L264)
|
|
331
331
|
|
|
332
332
|
Sync actor state when router location changes.
|
|
333
333
|
|
|
@@ -357,7 +357,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
357
357
|
protected syncRouterFromActor(route): void;
|
|
358
358
|
```
|
|
359
359
|
|
|
360
|
-
Defined in: [packages/play-router/src/router-bridge-base.ts:
|
|
360
|
+
Defined in: [packages/play-router/src/router-bridge-base.ts:244](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/router-bridge-base.ts#L244)
|
|
361
361
|
|
|
362
362
|
Sync router location when actor route signal changes.
|
|
363
363
|
|
|
@@ -390,7 +390,7 @@ suppressed as circular echoes.
|
|
|
390
390
|
protected unwatchRouterChanges(): void;
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
393
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L175)
|
|
394
394
|
|
|
395
395
|
Stop watching SolidJS Router changes.
|
|
396
396
|
|
|
@@ -414,7 +414,7 @@ cleanup path — component unmount does NOT trigger this automatically.
|
|
|
414
414
|
protected watchRouterChanges(): void;
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
-
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:153](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
417
|
+
Defined in: [packages/play-solid-router/src/solid-router-bridge.ts:153](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/solid-router-bridge.ts#L153)
|
|
418
418
|
|
|
419
419
|
Subscribe to SolidJS Router location changes using createEffect.
|
|
420
420
|
|
|
@@ -6,7 +6,34 @@
|
|
|
6
6
|
function PlayRouterProvider<TActor>(props): any;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:
|
|
9
|
+
Defined in: [packages/play-solid-router/src/play-router-provider.tsx:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-solid-router/src/play-router-provider.tsx#L76)
|
|
10
|
+
|
|
11
|
+
Connects a `PlayerActor` to Solid Router, keeping actor state and browser URL
|
|
12
|
+
in sync bidirectionally.
|
|
13
|
+
|
|
14
|
+
The bridge is created synchronously at component evaluation time (Solid's
|
|
15
|
+
execution model) and torn down via `onCleanup` when the component is disposed.
|
|
16
|
+
Unlike React, prop stability is not a concern — Solid's `props` accessor is
|
|
17
|
+
already reactive and the bridge is created once per component instance.
|
|
18
|
+
|
|
19
|
+
The `router` prop must be obtained from Solid Router hooks in the parent component:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
function AppShell() {
|
|
23
|
+
const navigate = useNavigate();
|
|
24
|
+
const location = useLocation();
|
|
25
|
+
const params = useParams();
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<PlayRouterProvider
|
|
29
|
+
actor={actor}
|
|
30
|
+
routeMap={routeMap}
|
|
31
|
+
router={{ navigate, location, params }}
|
|
32
|
+
renderer={(a) => <PlayRenderer actor={a} registry={registry} />}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
10
37
|
|
|
11
38
|
## Type Parameters
|
|
12
39
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-router/src/create-route-map-from-machine.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-router/src/create-route-map-from-machine.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.32/packages/play-router/src/create-route-map-from-machine.ts#L26)
|
|
10
10
|
|
|
11
11
|
Create a `BaseRouteMap` from an XState state machine.
|
|
12
12
|
|