@xmachines/docs 2.1.1 → 3.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 +2 -2
- package/api/@xmachines/play/README.md +74 -7
- package/api/@xmachines/play/classes/NonNullableError.md +4 -4
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/functions/asCleanup.md +78 -0
- package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
- package/api/@xmachines/play/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play/type-aliases/DisposeKey.md +32 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-actor/README.md +8 -1
- 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 +1 -1
- package/api/@xmachines/play-actor/functions/createFailureLatch.md +20 -0
- package/api/@xmachines/play-actor/functions/createReportGuard.md +26 -0
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +1 -1
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +1 -1
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +1 -1
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +1 -1
- package/api/@xmachines/play-actor/functions/sameViewInputs.md +25 -0
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +1 -1
- package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
- package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
- package/api/@xmachines/play-actor/interfaces/FailureLatch.md +59 -0
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/ReportGuard.md +92 -0
- package/api/@xmachines/play-actor/interfaces/ReportGuardMessages.md +18 -0
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewInputs.md +19 -0
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +4 -4
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +1 -1
- package/api/@xmachines/play-dom/README.md +84 -16
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +10 -10
- package/api/@xmachines/play-dom/functions/createPlayUI.md +8 -8
- package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +17 -11
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -4
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -12
- package/api/@xmachines/play-dom/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play-dom/type-aliases/DisposablePlayUI.md +36 -0
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -1
- package/api/@xmachines/play-dom-router/README.md +46 -18
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +149 -7
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +6 -5
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +3 -3
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-dom-router/functions/createRouter.md +20 -8
- package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +32 -0
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +27 -17
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +12 -6
- package/api/@xmachines/play-dom-router/interfaces/DisposableBrowserHistory.md +262 -0
- package/api/@xmachines/play-dom-router/interfaces/DisposableVanillaRouter.md +80 -0
- 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/RouterConnection.md +105 -0
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +26 -5
- package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +38 -0
- package/api/@xmachines/play-dom-router/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-react/README.md +2 -2
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +42 -7
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +8 -6
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -5
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
- 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/type-aliases/PlayRendererProps.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 +2 -2
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +172 -15
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +7 -18
- 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/PlayRouterProviderProps.md +10 -8
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-router/README.md +308 -11
- package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +178 -19
- 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/cleanFrameworkParams.md +40 -0
- 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/createRouterConnection.md +21 -0
- 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/getPatternParamNames.md +24 -0
- package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +36 -0
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/getRouteMappings.md +67 -0
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
- package/api/@xmachines/play-router/functions/isMountableBridge.md +26 -0
- package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
- package/api/@xmachines/play-router/functions/joinBasePath.md +37 -0
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/mountKey.md +28 -0
- package/api/@xmachines/play-router/functions/normalizeBasePath.md +43 -0
- package/api/@xmachines/play-router/functions/openProviderBridge.md +41 -0
- package/api/@xmachines/play-router/functions/pickOwnParams.md +41 -0
- package/api/@xmachines/play-router/functions/repointProviderBridge.md +27 -0
- package/api/@xmachines/play-router/functions/resolveBasePath.md +51 -0
- package/api/@xmachines/play-router/functions/resolveFrameworkParams.md +51 -0
- 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/stripBasePath.md +44 -0
- 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/BasePathOptions.md +32 -0
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
- package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +47 -0
- package/api/@xmachines/play-router/interfaces/LocationLike.md +5 -5
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +7 -7
- package/api/@xmachines/play-router/interfaces/MountableRouterBridge.md +130 -0
- package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +28 -0
- package/api/@xmachines/play-router/interfaces/PlayActor.md +7 -7
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
- package/api/@xmachines/play-router/interfaces/PlayRouterProviderBaseProps.md +33 -0
- package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +14 -0
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +5 -5
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +10 -10
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
- package/api/@xmachines/play-router/interfaces/RouteObject.md +4 -4
- package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -7
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +7 -3
- package/api/@xmachines/play-router/interfaces/RouterConnection.md +105 -0
- package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
- package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +1 -1
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +36 -0
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-router/variables/DISPOSE.md +34 -0
- package/api/@xmachines/play-router/variables/NO_BASE_PATH.md +18 -0
- package/api/@xmachines/play-signals/README.md +4 -2
- package/api/@xmachines/play-signals/functions/watchSignal.md +27 -4
- 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/Cleanup.md +38 -0
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +23 -5
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +14 -1
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +13 -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 +19 -3
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +166 -18
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +8 -18
- 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/PlayRouterProviderProps.md +10 -8
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +14 -12
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
- 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 +4 -4
- package/api/@xmachines/play-svelte/README.md +3 -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 +7 -1
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
- 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 +3 -1
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +148 -6
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +32 -0
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +12 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +105 -0
- 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 +3 -1
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +148 -6
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +32 -0
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +28 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +105 -0
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +148 -6
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +7 -18
- 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/PlayRouterProviderProps.md +10 -8
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-tanstack-router/README.md +1 -1
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +153 -11
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/README.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +149 -7
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +7 -17
- 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/PlayRouterProviderProps.md +10 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
- 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 +5 -5
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +4 -4
- package/api/@xmachines/play-vue/README.md +34 -12
- 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/usePlayView.md +6 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +12 -7
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +15 -10
- 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/variables/getPlayViewContext.md +6 -1
- package/api/@xmachines/play-vue-router/README.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +154 -12
- 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/type-aliases/VueRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +25 -2
- package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +1 -1
- package/api/@xmachines/play-xstate/README.md +19 -2
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +53 -17
- 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/play-xstate/variables/DISPOSE.md +34 -0
- package/api/@xmachines/shared/README.md +1 -1
- 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 +2 -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 +5 -1
- package/contributing/configuration.md +60 -18
- package/contributing/development.md +66 -44
- package/contributing/testing.md +34 -7
- package/examples/README.md +1 -1
- package/examples/multi-router-integration.md +126 -1
- package/examples/routing-patterns.md +1 -1
- package/guides/getting-started.md +7 -7
- package/guides/inspector.md +1 -1
- package/guides/signals.md +43 -0
- package/package.json +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -30
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -31
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteMachineConfig = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L73)
|
|
10
10
|
|
|
11
11
|
The minimal structural constraint of a machine config that
|
|
12
12
|
`formatPlayRouteTransitions` accepts.
|
|
@@ -32,7 +32,7 @@ original concrete type through the transform. Therefore
|
|
|
32
32
|
optional context?: unknown;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
35
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L74)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -42,7 +42,7 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:7
|
|
|
42
42
|
optional on?: Record<string, unknown>;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
45
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:76](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L76)
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
@@ -52,4 +52,4 @@ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:7
|
|
|
52
52
|
optional states?: Record<string, unknown>;
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
55
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L75)
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type RouteMetadata = string | RouteObject;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/types.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/types.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L6)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RouteStateNode = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L32)
|
|
10
10
|
|
|
11
11
|
The minimal structural shape of one XState state node, as
|
|
12
12
|
`formatPlayRouteTransitions` reads it during its walk over the machine config.
|
|
@@ -29,7 +29,7 @@ signature without a change.
|
|
|
29
29
|
optional id?: string;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
32
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L36)
|
|
33
33
|
|
|
34
34
|
The optional explicit state ID, for example `"home"` or `"settings"`. It is the `#id` target of a `play.route` event.
|
|
35
35
|
|
|
@@ -41,7 +41,7 @@ The optional explicit state ID, for example `"home"` or `"settings"`. It is the
|
|
|
41
41
|
optional meta?: object;
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
44
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L38)
|
|
45
45
|
|
|
46
46
|
The state metadata. A `meta.route` field gives the state a route.
|
|
47
47
|
|
|
@@ -63,6 +63,6 @@ The template of the URL path: the string form, for example
|
|
|
63
63
|
optional states?: Record<string, RouteStateNode>;
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
66
|
+
Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L47)
|
|
67
67
|
|
|
68
68
|
The nested child states. The function walks them for each further route declaration.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[API](../../../README.md) / [@xmachines/play-xstate](../README.md) / DISPOSE
|
|
2
|
+
|
|
3
|
+
# Variable: DISPOSE
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const DISPOSE: DisposeKey;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/play/src/disposable.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play/src/disposable.ts#L94)
|
|
10
|
+
|
|
11
|
+
The key that a release is stored under.
|
|
12
|
+
|
|
13
|
+
`Symbol.dispose` where the runtime has it, and `Symbol.for("Symbol.dispose")` where it
|
|
14
|
+
does not. This is not a convenience — it is the difference between a `using` that
|
|
15
|
+
releases and one that raises.
|
|
16
|
+
|
|
17
|
+
A bundler that downlevels `using` for a target below Chrome 134 emits a helper that
|
|
18
|
+
reads `object[Symbol.dispose || Symbol.for("Symbol.dispose")]`. A release stored under
|
|
19
|
+
a bare `[Symbol.dispose]` lands on the string key `"undefined"` in that runtime,
|
|
20
|
+
because the well-known symbol is absent and the computed key takes the value
|
|
21
|
+
`undefined`. The helper then looks up the registered symbol, finds nothing, and throws
|
|
22
|
+
`TypeError: Object is not disposable`. Storing under the same fallback closes the gap.
|
|
23
|
+
|
|
24
|
+
The type assertion states what the fallback IS. `Symbol.for` returns a plain `symbol`,
|
|
25
|
+
TypeScript declares `Symbol.dispose` as a `unique symbol`, and no expression produces
|
|
26
|
+
a `unique symbol` other than the declaration itself.
|
|
27
|
+
|
|
28
|
+
This binding resolves ONE time, when the module evaluates. [asCleanup](../../play/functions/asCleanup.md) therefore
|
|
29
|
+
reads `Symbol.dispose` again at each call and stores the release under both keys, so a
|
|
30
|
+
polyfill that installs the well-known symbol after this module evaluates still finds
|
|
31
|
+
the release. A class or an object literal that writes `[DISPOSE]()` has no such second
|
|
32
|
+
chance: it carries the key that existed when it was defined. Install an Explicit
|
|
33
|
+
Resource Management polyfill before the first import of `@xmachines/play`, which is the
|
|
34
|
+
ordinary contract of a polyfill.
|
|
@@ -31,7 +31,7 @@ In the monorepo, each package refers to it by name:
|
|
|
31
31
|
| `@xmachines/shared/vite-aliases` | `config/vite-aliases.ts` | Vite resolve aliases for all `@xmachines/*` workspace packages |
|
|
32
32
|
| `@xmachines/shared/vitest` | `config/vitest.ts` | `defineXmVitestConfig` helper for per-package Vitest configs |
|
|
33
33
|
| `@xmachines/shared/vitest-setup` | `config/vitest.setup.ts` | Shared Vitest setup — extends matchers with `@testing-library/jest-dom` |
|
|
34
|
-
| `@xmachines/shared/vitest-node-setup` | `config/vitest.node.setup.ts` | Node.js runtime guard — asserts `Node.js >=
|
|
34
|
+
| `@xmachines/shared/vitest-node-setup` | `config/vitest.node.setup.ts` | Node.js runtime guard — asserts `Node.js >= 24` |
|
|
35
35
|
| `@xmachines/shared/vitest-urlpattern-setup` | `config/vitest.urlpattern.setup.ts` | Optional URLPattern polyfill setup for route-matching tests |
|
|
36
36
|
|
|
37
37
|
## Usage
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmAliases(importMetaUrl): Record<string, string>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L221)
|
|
10
10
|
|
|
11
11
|
Vite resolve.alias entries for all @xmachines/* workspace packages.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmCacheDir(importMetaUrl, name): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:338](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:338](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L338)
|
|
10
10
|
|
|
11
11
|
Returns the shared Vite `cacheDir` for this workspace package.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmOptimizeDeps(include?): DepOptimizationOptions;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:291](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:291](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L291)
|
|
10
10
|
|
|
11
11
|
Returns the standard Vite `optimizeDeps` config for browser test projects.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmResolve(importMetaUrl, extra?): ResolveOptions & object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:258](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:258](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L258)
|
|
10
10
|
|
|
11
11
|
Full Vite `resolve` config for @xmachines/* workspace packages.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function xmSvelteRunes(): object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vite-aliases.ts:317](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vite-aliases.ts:317](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L317)
|
|
10
10
|
|
|
11
11
|
Svelte plugin options that enforce runes mode for workspace sources only.
|
|
12
12
|
|
|
@@ -35,4 +35,4 @@ one and change the other.
|
|
|
35
35
|
|
|
36
36
|
| Name | Type | Defined in |
|
|
37
37
|
| ------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
-
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:318](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
38
|
+
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:318](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vite-aliases.ts#L318) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmBrowserConfig(importMetaUrl, overrides, options?): UserConfig;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vitest.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L167)
|
|
10
10
|
|
|
11
11
|
Create a Vitest browser-mode config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function defineXmVitestConfig(importMetaUrl, overrides): UserConfig;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [vitest.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
9
|
+
Defined in: [vitest.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L64)
|
|
10
10
|
|
|
11
11
|
Create a Vitest config with XMachines workspace defaults.
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: XmBrowserConfigOptions
|
|
4
4
|
|
|
5
|
-
Defined in: [vitest.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
5
|
+
Defined in: [vitest.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L117)
|
|
6
6
|
|
|
7
7
|
Options for [defineXmBrowserConfig](../functions/defineXmBrowserConfig.md) that live outside the plain
|
|
8
8
|
Vitest config overrides.
|
|
@@ -11,6 +11,6 @@ Vitest config overrides.
|
|
|
11
11
|
|
|
12
12
|
| Property | Type | Description | Defined in |
|
|
13
13
|
| -------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
14
|
-
| <a id="property-base"></a> `base?` | `UserConfig` | Base Vite config to layer the browser test config on top of (typically a demo's `vite.config.ts`). When set, the base is expected to provide its own `resolve`/`plugins`, so the `cacheDir` and `resolve` defaults are not applied — mirroring the previous `mergeConfig(viteConfig, ...)` pattern in demo browser configs. | [vitest.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
15
|
-
| <a id="property-optimizedeps"></a> `optimizeDeps?` | `string`[] | Extra package specifiers to pre-bundle via `xmOptimizeDeps` (e.g. `["@xmachines/json-render-vue", "@xmachines/json-render-vue/schema"]`). Ignored when `overrides.optimizeDeps` is set, which then replaces the default `xmOptimizeDeps()` wholesale. | [vitest.ts:132](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
16
|
-
| <a id="property-resolve"></a> `resolve?` | `Partial`\<`ResolveOptions` & `object`\> | Extra resolve options forwarded to `xmResolve` (e.g. `conditions` or additional `alias` entries). Not applied when `base` is set — the base config owns `resolve` in that layout. | [vitest.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/
|
|
14
|
+
| <a id="property-base"></a> `base?` | `UserConfig` | Base Vite config to layer the browser test config on top of (typically a demo's `vite.config.ts`). When set, the base is expected to provide its own `resolve`/`plugins`, so the `cacheDir` and `resolve` defaults are not applied — mirroring the previous `mergeConfig(viteConfig, ...)` pattern in demo browser configs. | [vitest.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L125) |
|
|
15
|
+
| <a id="property-optimizedeps"></a> `optimizeDeps?` | `string`[] | Extra package specifiers to pre-bundle via `xmOptimizeDeps` (e.g. `["@xmachines/json-render-vue", "@xmachines/json-render-vue/schema"]`). Ignored when `overrides.optimizeDeps` is set, which then replaces the default `xmOptimizeDeps()` wholesale. | [vitest.ts:132](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L132) |
|
|
16
|
+
| <a id="property-resolve"></a> `resolve?` | `Partial`\<`ResolveOptions` & `object`\> | Extra resolve options forwarded to `xmResolve` (e.g. `conditions` or additional `alias` entries). Not applied when `base` is set — the base config owns `resolve` in that layout. | [vitest.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/shared/config/vitest.ts#L138) |
|
|
@@ -586,7 +586,11 @@ Custom `watchRouterChanges()` implementations that bypass `syncActorFromRouter()
|
|
|
586
586
|
|
|
587
587
|
**SSR / test injection:** [`WindowLike`](../api/@xmachines/play-router/interfaces/WindowLike.md) and [`LocationLike`](../api/@xmachines/play-router/interfaces/LocationLike.md) structural interfaces in [`@xmachines/play-router`](../api/@xmachines/play-router/README.md) allow injecting mock objects in router adapters, enabling testing without a real browser environment.
|
|
588
588
|
|
|
589
|
-
**Logging:** No structured logging framework. [`PlayerOptions`](../api/@xmachines/play-xstate/interfaces/PlayerOptions.md) exposes lifecycle hooks — `onStart`, `onStop`, `onTransition`, `onStateChange`, `onError` — as observability extension points.
|
|
589
|
+
**Logging:** No structured logging framework. [`PlayerOptions`](../api/@xmachines/play-xstate/interfaces/PlayerOptions.md) exposes lifecycle hooks — `onStart`, `onStop`, `onTransition`, `onStateChange`, `onError` — as observability extension points. A renderer writes to `console.error` in ONE case: it contained a failure, and no handler of the host receives that failure. Such a failure is the one result that nobody can debug. Give `onError` to send the failure of a view to your own observability tool instead.
|
|
590
|
+
|
|
591
|
+
Five paths reach that case. The host gives no `onError` prop. The handler of the host throws, or the producer of the `fallback` throws, or a release of the caller throws — each of those reports the failure of the HOST, which no handler of the host receives. `ActorProvider` of play-vue stops a second report of one error, and `onError` stays silent there on purpose, because the four other renderers see such an error never.
|
|
592
|
+
|
|
593
|
+
Three other places write to `console.warn`, and each one reports a configuration that the library cannot refuse: `warnOnce` of `@xmachines/play-actor` names a `/context` projection that it cannot derive, one time for each spec; `@xmachines/play-xstate` names the `meta.view.contextProps` field that 1.x removed, one time for each spec; and `@xmachines/play-router` names a `basePath` that a bridge with no mount ignores. A warning is the answer where a throw would stop an application for a fault that it can still run with. No other library source calls `console.*`.
|
|
590
594
|
|
|
591
595
|
**Authentication:** Not in scope. Enforced via XState guards on `play.route` transitions. The guard evaluates machine `context` (e.g., `isLoggedIn`) before permitting navigation. No library-level auth primitives — the machine defines all access control.
|
|
592
596
|
|
|
@@ -47,21 +47,22 @@ SEMREL_SKIP_STEPS="@semantic-release/git|@semantic-release/gitlab"
|
|
|
47
47
|
|
|
48
48
|
**Location:** `/tsconfig.json`
|
|
49
49
|
|
|
50
|
-
The root TypeScript config is a **build coordinator only** — it compiles nothing itself. It lists every package and example via `references
|
|
50
|
+
The root TypeScript config is a **build coordinator only** — it compiles nothing itself. It lists every package and example via `references`, and that array is the whole build order: TypeScript does not inherit `references` through `extends`, so a package declares none of its own. `tests/tsconfig-reference-graph.test.ts` fails when the array misses a project or lists a package before something it imports.
|
|
51
51
|
|
|
52
52
|
```json
|
|
53
53
|
{
|
|
54
54
|
"files": [],
|
|
55
55
|
"references": [
|
|
56
56
|
// Layer 0 — no internal deps
|
|
57
|
-
{ "path": "./packages/play-signals" },
|
|
58
|
-
{ "path": "./packages/play" },
|
|
59
57
|
{ "path": "./packages/docs" },
|
|
58
|
+
{ "path": "./packages/play" },
|
|
59
|
+
{ "path": "./packages/shared" },
|
|
60
60
|
// Layer 1 — depends on Layer 0
|
|
61
|
+
{ "path": "./packages/play-signals" },
|
|
62
|
+
// Layer 2
|
|
61
63
|
{ "path": "./packages/play-actor" },
|
|
62
|
-
// Layer
|
|
63
|
-
{ "path": "./packages/play-router" }
|
|
64
|
-
{ "path": "./packages/play-xstate" }
|
|
64
|
+
// Layer 3
|
|
65
|
+
{ "path": "./packages/play-router" }
|
|
65
66
|
// ...etc.
|
|
66
67
|
]
|
|
67
68
|
}
|
|
@@ -80,7 +81,7 @@ All packages extend this base. Key compiler settings:
|
|
|
80
81
|
|
|
81
82
|
| Setting | Value | Notes |
|
|
82
83
|
| ---------------------------- | ------------ | -------------------------------------------------------- |
|
|
83
|
-
| `target` | `ESNext` | Latest ECMAScript output
|
|
84
|
+
| `target` | `ESNext` | Latest ECMAScript output. See the two passes below |
|
|
84
85
|
| `module` | `NodeNext` | ESM with `.js` extension imports required |
|
|
85
86
|
| `moduleResolution` | `NodeNext` | Matches `module` setting |
|
|
86
87
|
| `customConditions` | `["source"]` | Resolves `@xmachines/*` to TypeScript source in dev/test |
|
|
@@ -98,6 +99,31 @@ All packages extend this base. Key compiler settings:
|
|
|
98
99
|
| `isolatedModules` | `true` | |
|
|
99
100
|
| `removeComments` | `false` | Preserves JSDoc in output |
|
|
100
101
|
|
|
102
|
+
**Two passes emit, and `emitDeclarationOnly` decides which one ships.** `build` is
|
|
103
|
+
`vite build && tsc --build`, so tsc runs last.
|
|
104
|
+
|
|
105
|
+
- **Fourteen publishable packages** let tsc emit JavaScript. tsc overwrites the Vite pass,
|
|
106
|
+
and `compilerOptions.target` above is what governs the published `dist/*.js`.
|
|
107
|
+
- **Five** — play-vue, play-svelte, play-solid, play-solid-router,
|
|
108
|
+
play-tanstack-solid-router — set `emitDeclarationOnly`, so tsc emits only `.d.ts` and the
|
|
109
|
+
Vite pass is the published JavaScript. `build.target` governs theirs.
|
|
110
|
+
|
|
111
|
+
Vite inherits no target from the tsconfig. It reads `compilerOptions.target` for one
|
|
112
|
+
purpose: to pick the `useDefineForClassFields` default that it gives the transform. The
|
|
113
|
+
syntax level of the Vite pass comes from `build.target`, which
|
|
114
|
+
`packages/shared/config/vite.ts` sets — `"esnext"` for a publishable package, and an
|
|
115
|
+
explicit browser list for a demo app.
|
|
116
|
+
|
|
117
|
+
Leave both stated, and keep both at ESNext for a library. A package that inherits the Vite
|
|
118
|
+
default builds against a browser baseline, which is a second and lower ceiling than the one
|
|
119
|
+
this table declares — and it is the ceiling that ships for those five.
|
|
120
|
+
|
|
121
|
+
**A demo states an explicit browser list, and not `baseline-widely-available`.** A target
|
|
122
|
+
controls syntax and adds no method. `baseline-widely-available` of Vite 8 names
|
|
123
|
+
`firefox114`, the demos bundle `play-router`, and `play-router` calls `toSorted()`, which
|
|
124
|
+
shipped in Firefox 115. The list in `vite.ts` therefore raises that one entry, so the
|
|
125
|
+
declared floor is the floor the bundle runs on.
|
|
126
|
+
|
|
101
127
|
**Per-package `tsconfig.json` pattern:**
|
|
102
128
|
|
|
103
129
|
```json
|
|
@@ -107,16 +133,17 @@ All packages extend this base. Key compiler settings:
|
|
|
107
133
|
"composite": true,
|
|
108
134
|
"rootDir": "./src",
|
|
109
135
|
"outDir": "./dist"
|
|
110
|
-
}
|
|
111
|
-
"references": [{ "path": "../dependency-package" }]
|
|
136
|
+
}
|
|
112
137
|
}
|
|
113
138
|
```
|
|
114
139
|
|
|
140
|
+
A package declares no `references`. Its dependencies live in `package.json`, and the root array orders the build.
|
|
141
|
+
|
|
115
142
|
**Test tsconfig (`@xmachines/shared/tsconfig-test`):**
|
|
116
143
|
|
|
117
144
|
**Location:** `packages/shared/config/tsconfig.test.json`
|
|
118
145
|
|
|
119
|
-
Test builds add `noEmit: true`, `allowImportingTsExtensions: true`, and `vitest/globals` types. Used by `pnpm run test:build` to type-check test files without emitting output.
|
|
146
|
+
Test builds add `noEmit: true`, `allowImportingTsExtensions: true`, and `vitest/globals` types. Used by `pnpm run test:build` to type-check test files without emitting output. That script passes `--force`, so the check covers every project of the solution on every run.
|
|
120
147
|
|
|
121
148
|
### Linting — `oxlint.config.ts` (root)
|
|
122
149
|
|
|
@@ -154,6 +181,20 @@ export default defineConfig({
|
|
|
154
181
|
| `typescript/no-explicit-any` | — | `error` |
|
|
155
182
|
| `typescript/no-unused-vars` | — | `error` (ignores `_` prefixed names) |
|
|
156
183
|
| `unicorn/filename-case` | — | `off` |
|
|
184
|
+
| `unicorn/no-array-sort` | — | `error` |
|
|
185
|
+
| `no-underscore-dangle` | — | `off` |
|
|
186
|
+
|
|
187
|
+
`unicorn/no-array-sort` is an error and not the warning of its category. The workspace
|
|
188
|
+
targets ESNext, and Node 22 — the lowest runtime a published package supports — has
|
|
189
|
+
`toSorted()`, so the method is always available. As a warning the rule kept
|
|
190
|
+
the lint job green while the Code Quality report showed the degradation, and `sort()` stayed
|
|
191
|
+
behind a suppression for a ceiling that had already gone.
|
|
192
|
+
|
|
193
|
+
`no-underscore-dangle` is off because it contradicts `typescript/no-unused-vars`, which
|
|
194
|
+
declares `^_` as the mark of a binding that exists on purpose and that nothing reads. A
|
|
195
|
+
`using` declaration is the case that makes the contradiction concrete: the scope reads the
|
|
196
|
+
binding through `Symbol.dispose`, the linter sees no read, and the `_` that answers one rule
|
|
197
|
+
trips the other.
|
|
157
198
|
|
|
158
199
|
**Per-package override pattern:**
|
|
159
200
|
|
|
@@ -344,14 +385,15 @@ The only environment-specific distinction is between **local development** (dev
|
|
|
344
385
|
|
|
345
386
|
## Required vs Optional Settings Summary
|
|
346
387
|
|
|
347
|
-
| Config | Required to Work
|
|
348
|
-
| ------------------------------------ |
|
|
349
|
-
| `SEMREL_SKIP_STEPS` | No
|
|
350
|
-
| Root `tsconfig.json` `references` | Yes —
|
|
351
|
-
| Per-package `
|
|
352
|
-
|
|
|
353
|
-
| `@xmachines/shared/
|
|
354
|
-
| `@xmachines/shared/
|
|
388
|
+
| Config | Required to Work | Optional / Has Default |
|
|
389
|
+
| ------------------------------------ | --------------------------------------- | ----------------------------- |
|
|
390
|
+
| `SEMREL_SKIP_STEPS` | No | Default: `""` (run all steps) |
|
|
391
|
+
| Root `tsconfig.json` `references` | Yes — the whole build order | — |
|
|
392
|
+
| Per-package `references` | No — TypeScript drops them on `extends` | — |
|
|
393
|
+
| Per-package `composite: true` | Yes — required for project references | — |
|
|
394
|
+
| `@xmachines/shared/tsconfig` extends | Yes — all packages must extend it | — |
|
|
395
|
+
| `@xmachines/shared/oxlint` extends | Yes — all packages must extend it | — |
|
|
396
|
+
| `@xmachines/shared/oxfmt` extends | Yes — all packages must extend it | — |
|
|
355
397
|
|
|
356
398
|
---
|
|
357
399
|
|
|
@@ -20,7 +20,7 @@ This guide covers everything you need to set up a local development environment,
|
|
|
20
20
|
|
|
21
21
|
### Prerequisites
|
|
22
22
|
|
|
23
|
-
- **Node.js** `>=
|
|
23
|
+
- **Node.js** `>= 24.0.0` (the suite writes `using`, which needs V8 13.4)
|
|
24
24
|
- **pnpm** via corepack (`corepack enable`; version pinned by the `packageManager` field — the project uses pnpm workspaces)
|
|
25
25
|
- **Git**
|
|
26
26
|
|
|
@@ -125,22 +125,22 @@ packages/<name>/
|
|
|
125
125
|
|
|
126
126
|
All commands are run from the **repository root** unless otherwise noted.
|
|
127
127
|
|
|
128
|
-
| Command | Description
|
|
129
|
-
| ------------------------------------------ |
|
|
130
|
-
| `pnpm run build` |
|
|
131
|
-
| `pnpm --filter @xmachines/<pkg> run build` | Build a single package (and its deps)
|
|
132
|
-
| `pnpm run clean` | Remove coverage, Vite caches, and all `dist/` directories in packages
|
|
133
|
-
| `pnpm test` | Run all unit/integration tests once
|
|
134
|
-
| `pnpm run test:watch` | Re-run tests on file changes (interactive)
|
|
135
|
-
| `pnpm run test:browser` | Run Playwright browser tests
|
|
136
|
-
| `pnpm run test:coverage` | Run tests with V8 coverage reporting
|
|
137
|
-
| `pnpm run test:browser:coverage` | Run browser tests with coverage reporting
|
|
138
|
-
| `pnpm run test:build` |
|
|
139
|
-
| `pnpm run lint` | Lint all packages with oxlint
|
|
140
|
-
| `pnpm run lint:fix` | Auto-fix lint issues
|
|
141
|
-
| `pnpm run format` | Format all files with oxfmt
|
|
142
|
-
| `pnpm run format:check` | Check formatting (CI mode — no writes)
|
|
143
|
-
| `pnpm run docs` | Build packages, generate TypeDoc API docs, then format
|
|
128
|
+
| Command | Description |
|
|
129
|
+
| ------------------------------------------ | ------------------------------------------------------------------------- |
|
|
130
|
+
| `pnpm run build` | Incremental build — all packages in dependency order (not a type-check) |
|
|
131
|
+
| `pnpm --filter @xmachines/<pkg> run build` | Build a single package (and its deps) |
|
|
132
|
+
| `pnpm run clean` | Remove coverage, Vite caches, and all `dist/` directories in packages |
|
|
133
|
+
| `pnpm test` | Run all unit/integration tests once |
|
|
134
|
+
| `pnpm run test:watch` | Re-run tests on file changes (interactive) |
|
|
135
|
+
| `pnpm run test:browser` | Run Playwright browser tests |
|
|
136
|
+
| `pnpm run test:coverage` | Run tests with V8 coverage reporting |
|
|
137
|
+
| `pnpm run test:browser:coverage` | Run browser tests with coverage reporting |
|
|
138
|
+
| `pnpm run test:build` | Complete type-check of every package and its tests (`tsconfig.test.json`) |
|
|
139
|
+
| `pnpm run lint` | Lint all packages with oxlint |
|
|
140
|
+
| `pnpm run lint:fix` | Auto-fix lint issues |
|
|
141
|
+
| `pnpm run format` | Format all files with oxfmt |
|
|
142
|
+
| `pnpm run format:check` | Check formatting (CI mode — no writes) |
|
|
143
|
+
| `pnpm run docs` | Build packages, generate TypeDoc API docs, then format |
|
|
144
144
|
|
|
145
145
|
---
|
|
146
146
|
|
|
@@ -198,52 +198,72 @@ The monorepo uses **TypeScript project references** for correct build-order mana
|
|
|
198
198
|
|
|
199
199
|
Packages are grouped into dependency layers as defined in the root `tsconfig.json`:
|
|
200
200
|
|
|
201
|
-
| Layer | Packages
|
|
202
|
-
| ----- |
|
|
203
|
-
| 0 | `
|
|
204
|
-
| 1 | `play-
|
|
205
|
-
| 2 | `play-
|
|
206
|
-
| 3 | `play-react-router`,
|
|
201
|
+
| Layer | Packages | Depends on |
|
|
202
|
+
| ----- | -------------------------------------------------------------------------------- | ------------------ |
|
|
203
|
+
| 0 | `docs`, `play`, `shared` | External libs only |
|
|
204
|
+
| 1 | `play-signals` | Layer 0 |
|
|
205
|
+
| 2 | `play-actor` | Layers 0–1 |
|
|
206
|
+
| 3 | `play-dom`, `play-react`, `play-router`, `play-solid`, `play-svelte`, `play-vue` | Layers 0–2 |
|
|
207
|
+
| 4 | `play-tanstack-router`, `play-xstate` | Layers 0–3 |
|
|
208
|
+
| 5 | `play-actor/examples/shared` | Layers 0–4 |
|
|
209
|
+
| 6 | renderer demo apps | Layers 0–5 |
|
|
210
|
+
| 7 | the eight router adapters | Layers 0–6 |
|
|
211
|
+
| 8 | router demo apps | Layers 0–7 |
|
|
212
|
+
|
|
213
|
+
The layer of an entry is its longest path to a package with no workspace dependency, and `tests/tsconfig-reference-graph.test.ts` computes it from the manifests.
|
|
207
214
|
|
|
208
215
|
#### Mermaid Diagram
|
|
209
216
|
|
|
210
217
|
```mermaid
|
|
211
218
|
flowchart LR
|
|
212
|
-
subgraph L0["Layer 0 — no
|
|
213
|
-
play-signals
|
|
219
|
+
subgraph L0["Layer 0 — no workspace deps"]
|
|
214
220
|
play
|
|
221
|
+
shared
|
|
215
222
|
docs
|
|
216
223
|
end
|
|
217
224
|
|
|
218
225
|
subgraph L1["Layer 1"]
|
|
226
|
+
play-signals
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
subgraph L2["Layer 2"]
|
|
219
230
|
play-actor
|
|
220
231
|
end
|
|
221
232
|
|
|
222
|
-
subgraph
|
|
223
|
-
play-
|
|
224
|
-
play-dom-router
|
|
225
|
-
play-sveltekit-router
|
|
226
|
-
play-xstate
|
|
233
|
+
subgraph L3["Layer 3 — view renderers, and the router core"]
|
|
234
|
+
play-dom
|
|
227
235
|
play-react
|
|
228
|
-
play-
|
|
236
|
+
play-router
|
|
229
237
|
play-solid
|
|
230
238
|
play-svelte
|
|
231
|
-
play-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
play-
|
|
236
|
-
play-
|
|
239
|
+
play-vue
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
subgraph L4["Layer 4"]
|
|
243
|
+
play-tanstack-router
|
|
244
|
+
play-xstate
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
subgraph L5["Layer 5"]
|
|
248
|
+
actorshared["play-actor/examples/shared"]
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
subgraph L6["Layer 6"]
|
|
252
|
+
renderdemos["renderer demo apps"]
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
subgraph L7["Layer 7 — the eight router adapters"]
|
|
256
|
+
adapters["play-dom-router, play-react-router, play-solid-router,
|
|
257
|
+
play-svelte-spa-router, play-sveltekit-router,
|
|
258
|
+
play-tanstack-react-router, play-tanstack-solid-router,
|
|
259
|
+
play-vue-router"]
|
|
237
260
|
end
|
|
238
261
|
|
|
239
|
-
subgraph
|
|
240
|
-
|
|
241
|
-
examples["example demo apps"]
|
|
262
|
+
subgraph L8["Layer 8"]
|
|
263
|
+
routerdemos["router demo apps"]
|
|
242
264
|
end
|
|
243
265
|
|
|
244
|
-
L0 --> L1
|
|
245
|
-
L1 --> L2
|
|
246
|
-
L2 --> L3
|
|
266
|
+
L0 --> L1 --> L2 --> L3 --> L4 --> L5 --> L6 --> L7 --> L8
|
|
247
267
|
```
|
|
248
268
|
|
|
249
269
|
### Adding a New Package
|
|
@@ -351,6 +371,8 @@ Active plugins: `typescript`, `unicorn`, `import`. Key rules:
|
|
|
351
371
|
| `typescript/no-explicit-any` | error |
|
|
352
372
|
| `import/no-cycle` | error |
|
|
353
373
|
| `typescript/no-unused-vars` | error (prefix unused with `_`) |
|
|
374
|
+
| `unicorn/no-array-sort` | error (use `toSorted()`) |
|
|
375
|
+
| `no-underscore-dangle` | off (clashes with `^_` unused) |
|
|
354
376
|
| `correctness` category | error |
|
|
355
377
|
| `suspicious` category | warn |
|
|
356
378
|
|
|
@@ -501,7 +523,7 @@ feat(play-react): add PlayRenderer suspense boundary
|
|
|
501
523
|
|
|
502
524
|
3. **Write tests** — new code must meet coverage thresholds (80% lines/functions/statements and 75% branches at the monorepo level; core packages enforce higher per-package thresholds)
|
|
503
525
|
4. **Add JSDoc** — all new public exports require JSDoc with `@param`, `@returns`, and `@see` RFC links
|
|
504
|
-
5. **Never edit `packages/docs/api/`** — API docs are auto-generated; edit source JSDoc and regenerate with `pnpm run docs
|
|
526
|
+
5. **Never edit `packages/docs/api/`** — API docs are auto-generated; edit source JSDoc and regenerate with `pnpm run docs`. Keep the result out of your branch: the release regenerates and commits it (see [deployment.md](deployment.md)), so a branch that carries its own regeneration churns hundreds of files and conflicts with the next one.
|
|
505
527
|
|
|
506
528
|
### Merge Request Checklist
|
|
507
529
|
|