@xmachines/docs 1.1.0 → 2.0.0
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 +5 -2
- package/api/@xmachines/play/README.md +1 -2
- 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 +61 -18
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
- package/api/@xmachines/play-actor/functions/composePlayState.md +26 -0
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +21 -0
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +41 -0
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +27 -0
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +41 -0
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +28 -0
- package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
- package/api/@xmachines/play-actor/functions/typedSpec.md +23 -26
- 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 +12 -14
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +11 -0
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +50 -0
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +15 -0
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +15 -0
- package/api/@xmachines/play-dom/README.md +5 -3
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
- package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/createValidationRegistry.md +22 -0
- package/api/@xmachines/play-dom/functions/defineRegistry.md +5 -5
- package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -8
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +2 -2
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -0
- package/api/@xmachines/play-dom/interfaces/FieldValidationState.md +16 -0
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +4 -4
- package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +2 -0
- package/api/@xmachines/play-dom/interfaces/ValidationRegistry.md +21 -0
- package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +10 -0
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom/variables/schema.md +35 -45
- package/api/@xmachines/play-dom-router/README.md +1 -2
- 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/RoutableActor.md +4 -4
- 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 +2 -2
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/defineRegistry.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useFieldValidation.md +31 -0
- 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/ComponentContext.md +9 -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 +1 -1
- package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-react-router/README.md +1 -2
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +4 -4
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-router/README.md +1 -2
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +4 -4
- 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/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 +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +3 -3
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +4 -4
- 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/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 +1 -2
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +1 -2
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
- package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +1 -2
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +5 -5
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- 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-solid-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-svelte/README.md +20 -3
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/README.md +1 -2
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/README.md +1 -2
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -2
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- 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-react-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-router/README.md +1 -2
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +2 -2
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/README.md +1 -2
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +1 -1
- 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 +4 -4
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +1 -1
- 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 +1 -1
- package/api/@xmachines/play-vue/functions/useFieldValidation.md +31 -0
- 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 +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +1 -2
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +5 -5
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/README.md +36 -2
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +28 -28
- 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 +7 -7
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
- 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 +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- 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/vite-aliases/functions/xmSvelteRunes.md +7 -2
- package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
- package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
- package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
- package/contributing/architecture.md +6 -6
- package/contributing/deployment.md +2 -2
- package/contributing/development.md +5 -3
- package/contributing/testing.md +24 -10
- package/examples/@xmachines/play-dom-demo/README.md +2 -2
- package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
- package/examples/@xmachines/play-dom-demo/functions/initShell.md +6 -7
- package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-dom-router-demo/README.md +2 -2
- package/examples/@xmachines/play-react-demo/README.md +2 -2
- 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 +2 -3
- 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 -2
- 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 +2 -2
- package/examples/@xmachines/play-solid-demo/README.md +2 -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 +2 -4
- 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 -2
- 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 +2 -2
- package/examples/@xmachines/play-svelte-demo/README.md +2 -2
- package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-svelte-spa-router-demo/README.md +2 -2
- package/examples/@xmachines/play-sveltekit-router-demo/README.md +2 -2
- package/examples/@xmachines/play-tanstack-react-router-demo/README.md +2 -2
- package/examples/@xmachines/play-tanstack-solid-router-demo/README.md +2 -2
- package/examples/@xmachines/play-vue-demo/README.md +2 -2
- 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 -2
- package/examples/README.md +3 -0
- package/examples/form-validation.md +1 -1
- package/guides/README.md +6 -0
- package/guides/actor-model.md +1 -1
- package/guides/getting-started.md +4 -2
- package/guides/inspector.md +197 -0
- package/guides/state-machines.md +3 -1
- package/package.json +2 -2
- package/rfc/play.md +11 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayDomOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-dom/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [packages/play-dom/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom/src/types.ts#L23)
|
|
6
6
|
|
|
7
7
|
Options for `PlayRenderer`.
|
|
8
8
|
|
|
@@ -21,10 +21,10 @@ by component implementations via `ctx.ctx.*`.
|
|
|
21
21
|
| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
22
|
| <a id="property-directives"></a> `directives?` | `DirectiveDefinition`\<`ZodType`\<`unknown`, `unknown`, `$ZodTypeInternals`\<`unknown`, `unknown`\>\>\>[] | Custom directives — user-defined `$`-prefixed dynamic values that extend the spec expression language (e.g. `{ $format: "currency", value: ... }`). Each entry is a `DirectiveDefinition` built with `defineDirective` from `@xmachines/json-render-core`. The array is converted to a `DirectiveRegistry` once per render pass and forwarded to `resolveElementProps` via `PropResolutionContext.directives`. Built-in expressions (`$state`, `$cond`, etc.) always take precedence over custom directives. Mirrors the `directives` prop on `JSONUIProvider` / `JsonUIProvider` introduced in **Json-render** 0.19. **Example** `import { defineDirective, resolvePropValue } from "@xmachines/json-render-core"; import { z } from "zod"; const formatDirective = defineDirective({ name: "$format", description: "Locale-aware number formatting.", schema: z.object({ $format: z.enum(["number", "currency"]), value: z.unknown() }), resolve(value, ctx) { const resolved = resolvePropValue(value.value, ctx); return new Intl.NumberFormat().format(resolved as number); }, }); renderSpec(spec, store, registry, { directives: [formatDirective] });` | [`UIProviderOptions`](UIProviderOptions.md).[`directives`](UIProviderOptions.md#property-directives) | - |
|
|
23
23
|
| <a id="property-functions"></a> `functions?` | `Record`\<`string`, `ComputedFunction`\> | Named compute functions for `{ $computed: "name", args: {...} }` prop expressions. Each function receives the resolved `args` object and returns the computed value. Forwarded directly to `resolveElementProps` via `PropResolutionContext.functions`, matching the `FunctionsContext` provider in the framework renderers. Without this option, `$computed` expressions resolve to `undefined` (no throw). **Example** `renderSpec(spec, store, registry, { functions: { fullName: (args) => `${args.first} ${args.last}`, formatCurrency: (args) => new Intl.NumberFormat().format(args.amount as number), }, });` Mirrors the `functions` prop on `JSONUIProvider` / `JsonUIProvider`. | [`UIProviderOptions`](UIProviderOptions.md).[`functions`](UIProviderOptions.md#property-functions) | - |
|
|
24
|
-
| <a id="property-loading"></a> `loading?` | `boolean` | When `true`, indicates the spec is still streaming (e.g. from an AI provider). Forwarded to `renderSpec` so component implementations can read `ctx.ctx.loading` to render skeleton states. Also suppresses missing-child warnings during stream ingestion, since referenced elements may not yet have arrived in the incremental spec. Mirrors the `loading` prop from framework renderer providers. | - | [packages/play-dom/src/types.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
+
| <a id="property-loading"></a> `loading?` | `boolean` | When `true`, indicates the spec is still streaming (e.g. from an AI provider). Forwarded to `renderSpec` so component implementations can read `ctx.ctx.loading` to render skeleton states. Also suppresses missing-child warnings during stream ingestion, since referenced elements may not yet have arrived in the incremental spec. Mirrors the `loading` prop from framework renderer providers. | - | [packages/play-dom/src/types.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom/src/types.ts#L52) |
|
|
25
25
|
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Programmatic navigation function. Called automatically when an action binding resolves with `onSuccess: { navigate: "/path" }`. The resolved path string is passed as the sole argument. Mirrors the `navigate` prop in `ActionProvider` from the framework renderers, where it is captured in the `execute()` closure. Also available to component implementations directly via `ctx.ctx.navigate` for cases where navigation needs to be triggered outside of an action binding. **Example** `import { useNavigate } from "my-router"; const navigate = useNavigate(); renderSpec(spec, store, registry, { navigate });` Spec binding that triggers navigation: `{ "on": { "click": { "action": "doSomething", "onSuccess": { "navigate": "/dashboard" } } } }` | [`UIProviderOptions`](UIProviderOptions.md).[`navigate`](UIProviderOptions.md#property-navigate) | - |
|
|
26
26
|
| <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook for actions that declare `confirm` in their binding. Consulted by `emit()` before executing a confirm-gated action. Return (or resolve) `true` to execute, `false` to skip. Without this handler, confirm-gated actions are skipped with a `console.warn` — they never execute unconfirmed. See [ConfirmHandler](../type-aliases/ConfirmHandler.md) for the full contract. This is the headless equivalent of the `pendingConfirmation` / `confirmAction()` / `cancelAction()` flow in the framework adapters. | [`UIProviderOptions`](UIProviderOptions.md).[`onConfirm`](UIProviderOptions.md#property-onconfirm) | - |
|
|
27
27
|
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Unified error handler for component render errors and action handler rejections. Matches `RenderErrorHandler = (error: unknown, name: string) => void`. Invoked for three distinct error classes: - `(error, elementType)` — when a component renderer throws synchronously during `renderSpec` - `(error, actionName)` — when an action handler rejects during `emit()` (on-event path) - `(error, actionName)` — when an action handler rejects during a `watch` binding callback When provided, suppresses the `console.error` fallback for all three error types. Forwarded into `renderSpec` as the `onRenderError` parameter and into `DomRenderContext.onRenderError` so both `emit()` and `watch` handlers route their errors through the same channel as component render errors. **Example** `renderSpec(spec, store, registry, { onRenderError: (err, name) => { myErrorReporter.capture(err, { context: name }); }, });` | [`UIProviderOptions`](UIProviderOptions.md).[`onRenderError`](UIProviderOptions.md#property-onrendererror) | - |
|
|
28
|
-
| <a id="property-registryresult"></a> `registryResult?` | [`DefineRegistryResult`](DefineRegistryResult.md) | The result from `defineRegistry` — provides both the registry and the handlers factory. When provided, `PlayRenderer` wires `setState` and `getState` from the @xstate/store-backed `StateStore` into the handlers factory automatically. This is the preferred approach as it ensures actions always receive live `setState` and `state` bound to the current store. | - | [packages/play-dom/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
29
|
-
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @xmachines/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-dom/src/types.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
28
|
+
| <a id="property-registryresult"></a> `registryResult?` | [`DefineRegistryResult`](DefineRegistryResult.md) | The result from `defineRegistry` — provides both the registry and the handlers factory. When provided, `PlayRenderer` wires `setState` and `getState` from the @xstate/store-backed `StateStore` into the handlers factory automatically. This is the preferred approach as it ensures actions always receive live `setState` and `state` bound to the current store. | - | [packages/play-dom/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom/src/types.ts#L31) |
|
|
29
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from `xstateStoreStateStore` in @xmachines/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-dom/src/types.ts:41](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom/src/types.ts#L41) |
|
|
30
30
|
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions for inline field validation. Each function receives `(value, args?)` and returns `true` (valid) or `false` (invalid). Functions are available to component implementations via `ctx.ctx.validationFunctions` and should be passed as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. Mirrors `customFunctions` in `ValidationProvider` from the framework renderers. The DOM renderer has no automatic `ValidationProvider` tree — validation must be invoked explicitly by component implementations. **Example** `import { runValidationCheck } from "@xmachines/json-render-core"; renderSpec(spec, store, registry, { validationFunctions: { isEven: (value) => typeof value === "number" && value % 2 === 0, phoneNumber: (value) => /^\+?[\d\s\-()]{7,}$/.test(String(value)), }, }); // Inside a ComponentFn: const MyField: ComponentFn<typeof catalog, "MyField"> = ({ ctx }) => { const result = runValidationCheck( { type: "isEven", message: "must be even" }, { value: someValue, stateModel: {}, customFunctions: ctx.ctx.validationFunctions }, ); // result.valid, result.message };` | [`UIProviderOptions`](UIProviderOptions.md).[`validationFunctions`](UIProviderOptions.md#property-validationfunctions) | - |
|
|
@@ -21,6 +21,8 @@ empty map, so `renderSpec(spec, store, registry)` renders a static tree.
|
|
|
21
21
|
| <a id="property-navigate"></a> `navigate?` | (`path`) => `void` | Navigation callback forwarded to `DomRenderContext.navigate`. Invoked automatically by `defineRegistry`'s `emit()` when an action binding resolves with `onSuccess: { navigate: "/path" }`. Also readable by component implementations via `ctx.navigate`. | - |
|
|
22
22
|
| <a id="property-onconfirm"></a> `onConfirm?` | [`ConfirmHandler`](../type-aliases/ConfirmHandler.md) | Confirmation hook forwarded to `DomRenderContext.onConfirm`. Consulted by `defineRegistry`'s `emit()` before executing an action binding that declares `confirm`. Without it, confirm-gated actions are skipped with a `console.warn` (never executed unconfirmed). | - |
|
|
23
23
|
| <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Callback matching `RenderErrorHandler = (error, name)`. Invoked for three distinct error classes: - `(error, elementType)` when a component renderer throws (GAP-08) - `(error, actionName)` when an action handler rejects during `emit()` - `(error, actionName)` when an action handler rejects in a `watch` binding If absent, all three fall back to `console.error`. Forwarded into `DomRenderContext.onRenderError` so `emit()` and `watch` handlers route errors through the same channel as component render errors. | - |
|
|
24
|
+
| <a id="property-onvalidationsetup"></a> `onValidationSetup?` | (`cleanup`) => `void` | Called with an unregister callback for every field an element registers through `ctx.validation.registerField`, so a host can release the registrations of an element instance when it unmounts. Mirrors `onWatchSetup`. | - |
|
|
24
25
|
| <a id="property-onwatchsetup"></a> `onWatchSetup?` | (`cleanup`) => `void` \| (() => `void`) | Callback invoked with each watch subscription cleanup function (GAP-02). When an element declares `watch`, the renderer sets up a store subscription and passes its unsubscribe function to this callback. Host renderers collect these to call on teardown. When absent, `watch` bindings are not wired. May return a replacement cleanup: when the caller wraps the supplied cleanup (e.g. to drop it from its own collection when invoked), the incremental renderer registers the returned wrapper so an unmount-driven release also runs the caller's bookkeeping. Returning nothing keeps the supplied cleanup. | - |
|
|
25
26
|
| <a id="property-send"></a> `send?` | (`event`) => `void` | Dispatcher for interaction events (e.g. `actor.send`), exposed to component implementations via `ctx.send`. Defaults to a no-op. | - |
|
|
27
|
+
| <a id="property-validation"></a> `validation?` | [`ValidationRegistry`](ValidationRegistry.md) | Field-validation registry shared by the whole tree, exposed to components as `ctx.validation` and used by the `validateForm` built-in. One is created per `renderSpec` call when omitted; a host that re-renders (e.g. the incremental renderer) must create one for its lifetime and pass it on every pass so registrations survive. | - |
|
|
26
28
|
| <a id="property-validationfunctions"></a> `validationFunctions?` | `Record`\<`string`, (`value`, `args?`) => `boolean`\> | Custom validation functions forwarded to `DomRenderContext.validationFunctions`. Components pass these as `customFunctions` to `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`. Has no effect on prop resolution. | - |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[API](../../../README.md) / [@xmachines/play-dom](../README.md) / ValidationRegistry
|
|
2
|
+
|
|
3
|
+
# Interface: ValidationRegistry
|
|
4
|
+
|
|
5
|
+
Defined in: `@xmachines/json-render-dom`
|
|
6
|
+
|
|
7
|
+
Registry of validated fields for one rendered tree.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
| Property | Modifier | Type | Description | Defined in |
|
|
12
|
+
| ------------------------------------------------------- | ---------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
|
13
|
+
| <a id="property-clear"></a> `clear` | `public` | (`path`) => `void` | Forget a field's recorded state; the registration itself survives. | - |
|
|
14
|
+
| <a id="property-customfunctions"></a> `customFunctions` | `readonly` | `Record`\<`string`, `ValidationFunction`\> | Custom validation functions available to every check. | - |
|
|
15
|
+
| <a id="property-fieldstates"></a> `fieldStates` | `readonly` | `Record`\<`string`, [`FieldValidationState`](FieldValidationState.md)\> | Validation state by field state path. | - |
|
|
16
|
+
| <a id="property-registerfield"></a> `registerField` | `public` | (`path`, `config`) => `void` | Register (or update) a field's validation config. Called by component implementations during render, normally via `ctx.validation`. Registrations are reference-counted per path: two elements bound to the same state path each hold one, so one of them going away does not un-validate the other. | - |
|
|
17
|
+
| <a id="property-releasefield"></a> `releaseField` | `public` | (`path`) => `void` | Drop one reference to a field's registration, keeping its recorded state. The registration itself goes away once the last reference is released. This is what the render context's per-element cleanup calls: an element instance releases its registrations when it unmounts or before it re-renders, and `fieldStates` survives — matching the framework ValidationProvider, whose field states outlive a re-render. | - |
|
|
18
|
+
| <a id="property-touch"></a> `touch` | `public` | (`path`) => `void` | Mark a field as interacted with, without validating it. | - |
|
|
19
|
+
| <a id="property-unregisterfield"></a> `unregisterField` | `public` | (`path`) => `void` | Drop a field's registration entirely, references and recorded state. | - |
|
|
20
|
+
| <a id="property-validate"></a> `validate` | `public` | (`path`, `config?`) => `ValidationResult` | Validate one field against the live store snapshot and record the result. Uses the field's registered config unless one is passed explicitly. | - |
|
|
21
|
+
| <a id="property-validateall"></a> `validateAll` | `public` | () => `boolean` | Validate every registered field. Returns true when all are valid. | - |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type MountFn = (actor, container, options?) => () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/src/create-play-ui.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-dom/src/create-play-ui.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom/src/create-play-ui.ts#L69)
|
|
10
10
|
|
|
11
11
|
The mount function returned by `createPlayUI`.
|
|
12
12
|
|
|
@@ -4,51 +4,41 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
const schema: _json_render_core.Schema<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
>;
|
|
43
|
-
props: _json_render_core.SchemaType<"propsOf", string>;
|
|
44
|
-
type: _json_render_core.SchemaType<"ref", string>;
|
|
45
|
-
visible: _json_render_core.SchemaType<"any", unknown>;
|
|
46
|
-
}
|
|
47
|
-
>
|
|
48
|
-
>;
|
|
49
|
-
root: _json_render_core.SchemaType<"string", unknown>;
|
|
50
|
-
}
|
|
51
|
-
>;
|
|
7
|
+
catalog: _json_render_core.SchemaType<"object", {
|
|
8
|
+
actions: _json_render_core.SchemaType<"map", {
|
|
9
|
+
description: _json_render_core.SchemaType<"string", unknown>;
|
|
10
|
+
params: _json_render_core.SchemaType<"zod", unknown>;
|
|
11
|
+
}>;
|
|
12
|
+
components: _json_render_core.SchemaType<"map", {
|
|
13
|
+
description: _json_render_core.SchemaType<"string", unknown>;
|
|
14
|
+
example: _json_render_core.SchemaType<"any", unknown>;
|
|
15
|
+
props: _json_render_core.SchemaType<"zod", unknown>;
|
|
16
|
+
slots: _json_render_core.SchemaType<"array", _json_render_core.SchemaType<"string", unknown>>;
|
|
17
|
+
}>;
|
|
18
|
+
}>;
|
|
19
|
+
spec: _json_render_core.SchemaType<"object", {
|
|
20
|
+
elements: _json_render_core.SchemaType<"record", _json_render_core.SchemaType<"object", {
|
|
21
|
+
children: _json_render_core.SchemaType<"array", _json_render_core.SchemaType<"string", unknown>>;
|
|
22
|
+
props: _json_render_core.SchemaType<"propsOf", string>;
|
|
23
|
+
repeat: {
|
|
24
|
+
inner?: unknown;
|
|
25
|
+
kind: "any";
|
|
26
|
+
optional: true;
|
|
27
|
+
};
|
|
28
|
+
slots: {
|
|
29
|
+
inner?: _json_render_core.SchemaType<"array", _json_render_core.SchemaType<..., ...>>;
|
|
30
|
+
kind: "record";
|
|
31
|
+
optional: true;
|
|
32
|
+
};
|
|
33
|
+
type: _json_render_core.SchemaType<"ref", string>;
|
|
34
|
+
visible: {
|
|
35
|
+
inner?: unknown;
|
|
36
|
+
kind: "any";
|
|
37
|
+
optional: true;
|
|
38
|
+
};
|
|
39
|
+
}>>;
|
|
40
|
+
root: _json_render_core.SchemaType<"string", unknown>;
|
|
41
|
+
}>;
|
|
52
42
|
}>;
|
|
53
43
|
```
|
|
54
44
|
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Vanilla DOM router (Browser History API) for XMachines Play Architecture.**
|
|
6
6
|
|
|
7
|
-
[](https://opensource.org/licenses/MIT)
|
|
8
|
-
[](https://www.npmjs.com/package/@xmachines/play-dom-router)
|
|
7
|
+
[](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@xmachines/play-dom-router)
|
|
9
8
|
|
|
10
9
|
Framework-agnostic router integration that synchronizes a Play actor's `currentRoute` TC39 Signal with the browser's `window.history` API — no framework required. Implements the same [`RouterBridgeBase`](../play-router/README.md) pattern as all other router adapters in the XMachines ecosystem.
|
|
11
10
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function connectRouter(options): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-dom-router/src/connect-router.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-dom-router/src/connect-router.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L51)
|
|
10
10
|
|
|
11
11
|
Connect vanilla router to actor (pure browser integration).
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createBrowserHistory(options): BrowserHistory;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L120)
|
|
10
10
|
|
|
11
11
|
Create browser history that wraps window.history
|
|
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/
|
|
9
|
+
Defined in: [play-router/src/create-route-map.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/create-route-map.ts#L45)
|
|
10
10
|
|
|
11
11
|
Create a `RouteMap` from an XState state machine.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouter(options): VanillaRouter;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-dom-router/src/create-router.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [play-dom-router/src/create-router.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-router.ts#L52)
|
|
10
10
|
|
|
11
11
|
Create vanilla router for framework-agnostic routing.
|
|
12
12
|
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BrowserHistory
|
|
4
4
|
|
|
5
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L1)
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
9
|
| Property | Modifier | Type | Description | Defined in |
|
|
10
10
|
| ----------------------------------------- | ---------- | --------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
-
| <a id="property-location"></a> `location` | `readonly` | `object` | Get current location state | [play-dom-router/src/create-browser-history.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
12
|
-
| `location.hash` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
13
|
-
| `location.pathname` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
-
| `location.search` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
15
|
-
| `location.state` | `public` | `unknown` | - | [play-dom-router/src/create-browser-history.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
11
|
+
| <a id="property-location"></a> `location` | `readonly` | `object` | Get current location state | [play-dom-router/src/create-browser-history.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L5) |
|
|
12
|
+
| `location.hash` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L8) |
|
|
13
|
+
| `location.pathname` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L6) |
|
|
14
|
+
| `location.search` | `public` | `string` | - | [play-dom-router/src/create-browser-history.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L7) |
|
|
15
|
+
| `location.state` | `public` | `unknown` | - | [play-dom-router/src/create-browser-history.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L9) |
|
|
16
16
|
|
|
17
17
|
## Methods
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ Defined in: [play-dom-router/src/create-browser-history.ts:1](https://gitlab.com
|
|
|
22
22
|
back(): void;
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
25
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L26)
|
|
26
26
|
|
|
27
27
|
#### Returns
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ Defined in: [play-dom-router/src/create-browser-history.ts:26](https://gitlab.co
|
|
|
36
36
|
createHref(path): string;
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
39
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L38)
|
|
40
40
|
|
|
41
41
|
Create href from path
|
|
42
42
|
|
|
@@ -58,7 +58,7 @@ Create href from path
|
|
|
58
58
|
destroy(): void;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
61
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L47)
|
|
62
62
|
|
|
63
63
|
Cleanup.
|
|
64
64
|
|
|
@@ -78,7 +78,7 @@ wrapper is destroyed.
|
|
|
78
78
|
forward(): void;
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
81
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L27)
|
|
82
82
|
|
|
83
83
|
#### Returns
|
|
84
84
|
|
|
@@ -92,7 +92,7 @@ Defined in: [play-dom-router/src/create-browser-history.ts:27](https://gitlab.co
|
|
|
92
92
|
go(delta): void;
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
95
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L25)
|
|
96
96
|
|
|
97
97
|
Go back/forward
|
|
98
98
|
|
|
@@ -114,7 +114,7 @@ Go back/forward
|
|
|
114
114
|
push(path, state?): void;
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
117
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L15)
|
|
118
118
|
|
|
119
119
|
Push new URL to history
|
|
120
120
|
|
|
@@ -137,7 +137,7 @@ Push new URL to history
|
|
|
137
137
|
replace(path, state?): void;
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
140
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L20)
|
|
141
141
|
|
|
142
142
|
Replace current URL in history
|
|
143
143
|
|
|
@@ -160,7 +160,7 @@ Replace current URL in history
|
|
|
160
160
|
subscribe(listener): () => void;
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
163
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L33)
|
|
164
164
|
|
|
165
165
|
Subscribe to history changes
|
|
166
166
|
Returns unsubscribe function
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BrowserWindow
|
|
4
4
|
|
|
5
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L59)
|
|
6
6
|
|
|
7
7
|
Minimal window interface for createBrowserHistory
|
|
8
8
|
|
|
@@ -14,17 +14,17 @@ Avoids coupling to `Window & typeof globalThis` which varies across environments
|
|
|
14
14
|
|
|
15
15
|
| Property | Modifier | Type | Defined in |
|
|
16
16
|
| ----------------------------------------- | ---------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
-
| <a id="property-history"></a> `history` | `public` | `object` | [play-dom-router/src/create-browser-history.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
18
|
-
| `history.state` | `readonly` | `unknown` | [play-dom-router/src/create-browser-history.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
19
|
-
| `history.back` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
20
|
-
| `history.forward` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
21
|
-
| `history.go` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
22
|
-
| `history.pushState` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
23
|
-
| `history.replaceState` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
-
| <a id="property-location"></a> `location` | `public` | `object` | [play-dom-router/src/create-browser-history.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
25
|
-
| `location.hash` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
26
|
-
| `location.pathname` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
27
|
-
| `location.search` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
17
|
+
| <a id="property-history"></a> `history` | `public` | `object` | [play-dom-router/src/create-browser-history.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L60) |
|
|
18
|
+
| `history.state` | `readonly` | `unknown` | [play-dom-router/src/create-browser-history.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L61) |
|
|
19
|
+
| `history.back` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L65) |
|
|
20
|
+
| `history.forward` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L66) |
|
|
21
|
+
| `history.go` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L64) |
|
|
22
|
+
| `history.pushState` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:62](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L62) |
|
|
23
|
+
| `history.replaceState` | `public` | `void` | [play-dom-router/src/create-browser-history.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L63) |
|
|
24
|
+
| <a id="property-location"></a> `location` | `public` | `object` | [play-dom-router/src/create-browser-history.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L68) |
|
|
25
|
+
| `location.hash` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L71) |
|
|
26
|
+
| `location.pathname` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L69) |
|
|
27
|
+
| `location.search` | `readonly` | `string` | [play-dom-router/src/create-browser-history.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L70) |
|
|
28
28
|
|
|
29
29
|
## Methods
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ Avoids coupling to `Window & typeof globalThis` which varies across environments
|
|
|
34
34
|
addEventListener(type, listener): void;
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
37
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L73)
|
|
38
38
|
|
|
39
39
|
#### Parameters
|
|
40
40
|
|
|
@@ -55,7 +55,7 @@ Defined in: [play-dom-router/src/create-browser-history.ts:73](https://gitlab.co
|
|
|
55
55
|
removeEventListener(type, listener): void;
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
Defined in: [play-dom-router/src/create-browser-history.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
58
|
+
Defined in: [play-dom-router/src/create-browser-history.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/create-browser-history.ts#L74)
|
|
59
59
|
|
|
60
60
|
#### Parameters
|
|
61
61
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: ConnectRouterOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [play-dom-router/src/connect-router.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-dom-router/src/connect-router.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L23)
|
|
6
6
|
|
|
7
7
|
Options for [connectRouter](../functions/connectRouter.md).
|
|
8
8
|
|
|
@@ -10,6 +10,6 @@ Options for [connectRouter](../functions/connectRouter.md).
|
|
|
10
10
|
|
|
11
11
|
| Property | Modifier | Type | Description | Defined in |
|
|
12
12
|
| ----------------------------------------- | ---------- | ----------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](RoutableActor.md) | The actor to synchronize with the browser URL. Must implement `Routable`. | [play-dom-router/src/connect-router.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteLookupContract`](RouteLookupContract.md) | Route lookup used to match URL pathnames to machine state IDs. | [play-dom-router/src/connect-router.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
15
|
-
| <a id="property-router"></a> `router` | `readonly` | [`VanillaRouter`](VanillaRouter.md) | The vanilla router created by [createRouter](../functions/createRouter.md). | [play-dom-router/src/connect-router.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
13
|
+
| <a id="property-actor"></a> `actor` | `readonly` | [`RoutableActor`](RoutableActor.md) | The actor to synchronize with the browser URL. Must implement `Routable`. | [play-dom-router/src/connect-router.ts:25](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L25) |
|
|
14
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | [`RouteLookupContract`](RouteLookupContract.md) | Route lookup used to match URL pathnames to machine state IDs. | [play-dom-router/src/connect-router.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L29) |
|
|
15
|
+
| <a id="property-router"></a> `router` | `readonly` | [`VanillaRouter`](VanillaRouter.md) | The vanilla router created by [createRouter](../functions/createRouter.md). | [play-dom-router/src/connect-router.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L27) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRouteEvent
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:225](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/types.ts:225](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L225)
|
|
6
6
|
|
|
7
7
|
Enhanced routing event with parameter and query support
|
|
8
8
|
|
|
@@ -122,8 +122,8 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
|
|
|
122
122
|
|
|
123
123
|
| Property | Modifier | Type | Defined in |
|
|
124
124
|
| -------------------------------------- | ---------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
125
|
-
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:230](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
126
|
-
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
127
|
-
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:229](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
128
|
-
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:227](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
129
|
-
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:226](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
125
|
+
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:230](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L230) |
|
|
126
|
+
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L228) |
|
|
127
|
+
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:229](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L229) |
|
|
128
|
+
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:227](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L227) |
|
|
129
|
+
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:226](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L226) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RoutableActor
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:259](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/types.ts:259](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L259)
|
|
6
6
|
|
|
7
7
|
Minimal actor interface required by `RouterBridgeBase` and all framework router
|
|
8
8
|
adapters.
|
|
@@ -42,8 +42,8 @@ class MyBridge extends RouterBridgeBase {
|
|
|
42
42
|
|
|
43
43
|
| Property | Modifier | Type | Description | Defined in |
|
|
44
44
|
| ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
45
|
-
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | TC39 Signal exposing the actor's current URL path (or state ID). | [play-router/src/types.ts:261](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
46
|
-
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | [play-router/src/types.ts:267](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
45
|
+
| <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | TC39 Signal exposing the actor's current URL path (or state ID). | [play-router/src/types.ts:261](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L261) |
|
|
46
|
+
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction. Router bridges compare this against the browser URL to distinguish a deep-link (router wins) from a session restore (actor wins). | [play-router/src/types.ts:267](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L267) |
|
|
47
47
|
|
|
48
48
|
## Methods
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ class MyBridge extends RouterBridgeBase {
|
|
|
53
53
|
send(event): void;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [play-router/src/types.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
56
|
+
Defined in: [play-router/src/types.ts:269](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/types.ts#L269)
|
|
57
57
|
|
|
58
58
|
Send a route navigation event to the actor.
|
|
59
59
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteLookupContract
|
|
4
4
|
|
|
5
|
-
Defined in: [play-dom-router/src/connect-router.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-dom-router/src/connect-router.ts:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L15)
|
|
6
6
|
|
|
7
7
|
Structural route lookup interface accepted by [connectRouter](../functions/connectRouter.md).
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ implementations keyed on a single form still resolve.
|
|
|
21
21
|
getPathByStateId(id): string | null | undefined;
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Defined in: [play-dom-router/src/connect-router.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
24
|
+
Defined in: [play-dom-router/src/connect-router.ts:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L17)
|
|
25
25
|
|
|
26
26
|
#### Parameters
|
|
27
27
|
|
|
@@ -41,7 +41,7 @@ Defined in: [play-dom-router/src/connect-router.ts:17](https://gitlab.com/xmachi
|
|
|
41
41
|
getStateIdByPath(path): string | null | undefined;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [play-dom-router/src/connect-router.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
44
|
+
Defined in: [play-dom-router/src/connect-router.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-dom-router/src/connect-router.ts#L16)
|
|
45
45
|
|
|
46
46
|
#### Parameters
|
|
47
47
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/base-route-map.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [play-router/src/base-route-map.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L101)
|
|
6
6
|
|
|
7
7
|
Shared bidirectional route map base class.
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@ map.getPathByStateId("missing"); // null
|
|
|
57
57
|
getPathByStateId(stateId): string | null;
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Defined in: [play-router/src/base-route-map.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
60
|
+
Defined in: [play-router/src/base-route-map.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L218)
|
|
61
61
|
|
|
62
62
|
Look up the path pattern registered for a state ID.
|
|
63
63
|
|
|
@@ -93,7 +93,7 @@ map.getPathByStateId("missing"); // null
|
|
|
93
93
|
getStateIdByPath(path): string | null;
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
Defined in: [play-router/src/base-route-map.ts:178](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
96
|
+
Defined in: [play-router/src/base-route-map.ts:178](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-router/src/base-route-map.ts#L178)
|
|
97
97
|
|
|
98
98
|
Resolve a URL path to its mapped state ID.
|
|
99
99
|
|