@xmachines/docs 1.0.0 → 1.1.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 +1 -3
- package/api/@xmachines/play/README.md +1 -3
- 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 +22 -10
- package/api/@xmachines/play-actor/classes/AbstractActor.md +19 -3
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.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/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/README.md +3 -2
- 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/interfaces/CreatePlayUIOptions.md +2 -2
- 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/type-aliases/MountFn.md +1 -1
- package/api/@xmachines/play-dom-router/README.md +3 -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 +3 -2
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-react/type-aliases/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 +3 -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 +3 -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 +3 -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 +3 -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 +19 -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 +3 -2
- 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 -3
- 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 +3 -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 +3 -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 +3 -0
- 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 +3 -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 +2 -4
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/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 +3 -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 +41 -23
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +77 -53
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +5 -12
- package/api/@xmachines/play-xstate/functions/composeGuards.md +7 -2
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +7 -2
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +7 -2
- 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 +7 -2
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +7 -4
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +7 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +4 -4
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -11
- 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 +7 -2
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +7 -5
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +7 -5
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +11 -15
- 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/README.md +2 -2
- 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 +12 -7
- 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 +18 -16
- package/contributing/configuration.md +10 -10
- package/contributing/deployment.md +49 -28
- package/contributing/development.md +56 -17
- package/contributing/testing.md +12 -4
- 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 +7 -6
- 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 +3 -2
- 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 +2 -1
- package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-react-router-demo/README.md +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 +4 -2
- 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 +2 -1
- package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
- package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
- package/examples/@xmachines/play-solid-router-demo/README.md +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/basic-state-machine.md +0 -2
- package/examples/form-validation.md +0 -2
- package/examples/multi-router-integration.md +0 -2
- package/examples/routing-patterns.md +0 -2
- package/examples/traffic-light.md +0 -2
- package/guides/README.md +0 -2
- package/guides/getting-started.md +19 -11
- package/package.json +9 -6
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
-
|
|
3
1
|
# Configuration
|
|
4
2
|
|
|
5
3
|
This document describes every configuration file, environment variable, and per-package override used by the `xmachines-js` monorepo.
|
|
@@ -133,7 +131,6 @@ The root config extends the shared base (`@xmachines/shared/oxlint`) and adds wo
|
|
|
133
131
|
export default defineConfig({
|
|
134
132
|
extends: [sharedConfig],
|
|
135
133
|
ignorePatterns: [
|
|
136
|
-
".planning",
|
|
137
134
|
".opencode",
|
|
138
135
|
"node_modules",
|
|
139
136
|
"dist",
|
|
@@ -185,7 +182,6 @@ export default defineConfig({
|
|
|
185
182
|
...sharedConfig,
|
|
186
183
|
ignorePatterns: [
|
|
187
184
|
...(sharedConfig.ignorePatterns ?? []),
|
|
188
|
-
".planning",
|
|
189
185
|
".opencode",
|
|
190
186
|
".agents",
|
|
191
187
|
".githuman",
|
|
@@ -295,7 +291,7 @@ Provides two helpers used in all `vitest.config.ts` and `vite.config.ts` files:
|
|
|
295
291
|
- **`xmAliases(import.meta.url)`** — returns a `Record<string, string>` mapping every `@xmachines/*` package to its TypeScript source entry. Enables tests and dev servers to run without a prior `pnpm run build`.
|
|
296
292
|
- **`xmResolve(import.meta.url)`** — returns a full Vite `resolve` config with `xmAliases` plus `preserveSymlinks: true` and `conditions: ["source"]`.
|
|
297
293
|
- **`xmCacheDir(import.meta.url, name)`** — returns a shared Vite cache path under `node_modules/.vite/<name>` to prevent redundant dep optimizer runs across projects.
|
|
298
|
-
- **`xmOptimizeDeps(
|
|
294
|
+
- **`xmOptimizeDeps(include?)`** — returns an `optimizeDeps.include` list holding exactly the specifiers passed in. Nothing is pre-bundled by default, and every entry has to be a package the calling project declares: pnpm gives each package its own `node_modules`, so Vite cannot resolve an undeclared specifier — it warns on stderr and carries on, which reads as a failure in a passing job.
|
|
299
295
|
|
|
300
296
|
### Release — `release.config.mjs`
|
|
301
297
|
|
|
@@ -306,11 +302,15 @@ Defines the release branches and plugin chain used by the GitLab CI semantic-rel
|
|
|
306
302
|
|
|
307
303
|
**Release branches:**
|
|
308
304
|
|
|
309
|
-
| Branch
|
|
310
|
-
|
|
|
311
|
-
| `main`
|
|
312
|
-
| `
|
|
313
|
-
| `beta`
|
|
305
|
+
| Branch | Channel | Pre-release |
|
|
306
|
+
| ------- | --------- | ----------- |
|
|
307
|
+
| `main` | (default) | No |
|
|
308
|
+
| `rc` | `rc` | `rc` |
|
|
309
|
+
| `beta` | `beta` | `true` |
|
|
310
|
+
| `alpha` | `alpha` | `alpha` |
|
|
311
|
+
| `pre` | `pre` | `pre` |
|
|
312
|
+
|
|
313
|
+
Only `main` is a protected branch today. That works because `GITLAB_TOKEN` — which the release needs, since `CI_JOB_TOKEN` can push neither the release commit nor the tag — is an _unprotected_ group variable and so reaches every one of these refs. If it is ever made protected, each of these branches has to be protected too, or the release fails in verify-conditions with `EGITNOPERMISSION` rather than at the registry.
|
|
314
314
|
|
|
315
315
|
**Tag format:** `v${version}`
|
|
316
316
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
-
|
|
3
1
|
# Deployment
|
|
4
2
|
|
|
5
3
|
This document describes how `@xmachines/xmachines-js` packages are built, versioned, and published to npm. All releases are automated through [semantic-release](https://semantic-release.gitbook.io/) running inside a GitLab CI pipeline. No manual `npm publish` commands are required for normal releases.
|
|
@@ -10,11 +8,11 @@ This document describes how `@xmachines/xmachines-js` packages are built, versio
|
|
|
10
8
|
|
|
11
9
|
All `@xmachines/*` packages are published to the **public npm registry** (`registry.npmjs.org`). Every package uses `"publishConfig": { "access": "public" }` so scoped packages are accessible without an npm org subscription. See the [Published Packages](#published-packages) table for the full list.
|
|
12
10
|
|
|
13
|
-
| Target | Config File
|
|
14
|
-
| --------------- |
|
|
15
|
-
| npm registry |
|
|
16
|
-
| GitLab Releases |
|
|
17
|
-
| GitLab CI | `.gitlab-ci.yml`
|
|
11
|
+
| Target | Config File | Purpose |
|
|
12
|
+
| --------------- | ------------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
13
|
+
| npm registry | `release.config.mjs` (npm plugin entries derived from the workspace scan) | Publish all public packages |
|
|
14
|
+
| GitLab Releases | `release.config.mjs` (`@semantic-release/gitlab` plugin) | Attach tarball artifacts to the GitLab release tag |
|
|
15
|
+
| GitLab CI | `.gitlab-ci.yml` | Trigger builds, tests, and releases on push / MR / tag |
|
|
18
16
|
|
|
19
17
|
The root `package.json` is marked `"private": true` and is **never published** to npm.
|
|
20
18
|
|
|
@@ -22,7 +20,7 @@ The root `package.json` is marked `"private": true` and is **never published** t
|
|
|
22
20
|
|
|
23
21
|
## Published Packages
|
|
24
22
|
|
|
25
|
-
The following packages are published on every release (derived from
|
|
23
|
+
The following packages are published on every release (derived from the workspace scan in `release.config.mjs` — every non-private package that is not a demo):
|
|
26
24
|
|
|
27
25
|
| Package | Directory |
|
|
28
26
|
| ------------------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
@@ -59,16 +57,18 @@ Each published package includes only the directories listed in its `files` field
|
|
|
59
57
|
|
|
60
58
|
Pipeline runs are triggered by `.gitlab-ci.yml` under the following conditions:
|
|
61
59
|
|
|
62
|
-
| Trigger
|
|
63
|
-
|
|
|
64
|
-
| Push to `main` / `
|
|
65
|
-
| Merge request
|
|
66
|
-
|
|
|
60
|
+
| Trigger | Pipeline runs |
|
|
61
|
+
| ------------------------------------------------ | -------------------------------------------------- |
|
|
62
|
+
| Push to `main` / `rc` / `beta` / `alpha` / `pre` | Full pipeline; the release job waits to be started |
|
|
63
|
+
| Merge request | Full pipeline, no release job |
|
|
64
|
+
| Web / API / trigger / parent pipeline | Full pipeline |
|
|
65
|
+
|
|
66
|
+
No rule admits a tag pipeline, so pushing a tag runs nothing.
|
|
67
67
|
|
|
68
|
-
The pipeline includes two reusable CI components:
|
|
68
|
+
The pipeline includes two reusable CI components, both pinned in `.gitlab-ci.yml` — which is the version to trust, rather than a number repeated here:
|
|
69
69
|
|
|
70
|
-
- **`to-be-continuous/node/gitlab-ci-node
|
|
71
|
-
- **`to-be-continuous/semantic-release/gitlab-ci-semrel
|
|
70
|
+
- **`to-be-continuous/node/gitlab-ci-node`** — handles install, lint, build, test, and audit
|
|
71
|
+
- **`to-be-continuous/semantic-release/gitlab-ci-semrel`** — runs `semantic-release` on eligible branches
|
|
72
72
|
|
|
73
73
|
The `node-build` job runs with:
|
|
74
74
|
|
|
@@ -116,7 +116,7 @@ node scripts/release-pack-smoke.mjs
|
|
|
116
116
|
|
|
117
117
|
`scripts/release-pack-smoke.mjs`:
|
|
118
118
|
|
|
119
|
-
1. Reads
|
|
119
|
+
1. Reads `release.config.mjs` to find all `@semantic-release/npm` plugin entries where `npmPublish` is not `false`.
|
|
120
120
|
2. For each publishable package: runs `npm pack --json` in the package directory.
|
|
121
121
|
3. Creates a temporary directory, runs `npm init -y`, and installs the local tarball with `--ignore-scripts`.
|
|
122
122
|
4. Asserts the install succeeds — any missing files, broken exports, or pack-time errors surface here.
|
|
@@ -130,13 +130,17 @@ This smoke test runs **before** the actual publish so packaging problems are cau
|
|
|
130
130
|
|
|
131
131
|
### Branch Model
|
|
132
132
|
|
|
133
|
-
Releases are driven by commit history on
|
|
133
|
+
Releases are driven by commit history on the release branches:
|
|
134
|
+
|
|
135
|
+
| Branch | Channel | Tag format | Behaviour |
|
|
136
|
+
| ------- | ---------------- | ---------------- | ----------------------------- |
|
|
137
|
+
| `main` | stable (default) | `v1.2.3` | Full production release |
|
|
138
|
+
| `rc` | `rc` | `v1.2.3-rc.N` | Release candidate pre-release |
|
|
139
|
+
| `beta` | `beta` | `v1.2.3-beta.N` | Beta pre-release |
|
|
140
|
+
| `alpha` | `alpha` | `v1.2.3-alpha.N` | Alpha pre-release |
|
|
141
|
+
| `pre` | `pre` | `v1.2.3-pre.N` | Pre-release |
|
|
134
142
|
|
|
135
|
-
|
|
136
|
-
| -------- | ---------------- | --------------- | ----------------------------- |
|
|
137
|
-
| `main` | stable (default) | `v1.2.3` | Full production release |
|
|
138
|
-
| `beta` | `beta` | `v1.2.3-beta.N` | Beta pre-release |
|
|
139
|
-
| `pre/rc` | `pre/rc` | `v1.2.3-rc.N` | Release candidate pre-release |
|
|
143
|
+
The channel becomes the npm dist-tag verbatim, which is why none of them contains a slash: npm reads a slash in a version selector as a GitHub shorthand, so such a tag cannot be installed.
|
|
140
144
|
|
|
141
145
|
Tag format is `v${version}` (e.g., `v1.0.0-beta.46`).
|
|
142
146
|
|
|
@@ -169,10 +173,11 @@ Each publishable package is published in sequence via individual `@semantic-rele
|
|
|
169
173
|
- `pkgRoot` — the package directory relative to the workspace root
|
|
170
174
|
- `tarballDir` — `dist/releases/` where the packed `.tgz` is saved
|
|
171
175
|
|
|
172
|
-
Example (from
|
|
176
|
+
Example (from `release.config.mjs`, where these entries are generated rather than
|
|
177
|
+
hand-written):
|
|
173
178
|
|
|
174
|
-
```
|
|
175
|
-
["@semantic-release/npm", {
|
|
179
|
+
```js
|
|
180
|
+
["@semantic-release/npm", { pkgRoot: "packages/play", tarballDir: "dist/releases" }];
|
|
176
181
|
```
|
|
177
182
|
|
|
178
183
|
### Post-Release Phase
|
|
@@ -217,14 +222,14 @@ This means packages always depend on the exact same version of sibling packages
|
|
|
217
222
|
| Variable | Source | Purpose |
|
|
218
223
|
| --------------------------- | --------------------------------------- | ------------------------------------------------------------------------------- |
|
|
219
224
|
| `NPM_ID_TOKEN` | GitLab CI OIDC (auto-generated per job) | Authenticates `semantic-release` to npm registry via OIDC token exchange |
|
|
220
|
-
| `GL_TOKEN` / `GITLAB_TOKEN` | GitLab CI
|
|
225
|
+
| `GL_TOKEN` / `GITLAB_TOKEN` | GitLab CI group variable (unprotected) | Authenticates `@semantic-release/gitlab` for release creation and git push back |
|
|
221
226
|
| `CI_JOB_TOKEN` | GitLab CI built-in | Used by the `to-be-continuous` components for GitLab API calls |
|
|
222
227
|
|
|
223
228
|
**No static npm token is committed to the repository.** The `NPM_ID_TOKEN` is a short-lived OIDC token generated for each CI job with audience `npm:registry.npmjs.org`.
|
|
224
229
|
|
|
225
230
|
To publish packages, a maintainer must:
|
|
226
231
|
|
|
227
|
-
1. Have push access to a release-eligible branch (`main`, `beta`, `pre
|
|
232
|
+
1. Have push access to a release-eligible branch (`main`, `rc`, `beta`, `alpha`, `pre`). Only `main` is protected; see the branch model above for what changes if `GITLAB_TOKEN` is ever made a protected variable.
|
|
228
233
|
2. Ensure the GitLab project CI/CD variables include the required tokens.
|
|
229
234
|
|
|
230
235
|
---
|
|
@@ -267,6 +272,22 @@ There is no automated rollback mechanism. To revert a release:
|
|
|
267
272
|
|
|
268
273
|
---
|
|
269
274
|
|
|
275
|
+
## Recovering a Failed Release
|
|
276
|
+
|
|
277
|
+
If the job dies partway (e.g. one package's trusted publisher isn't set up), some packages are published, the git tag is created, and the rest are missing. To finish the release:
|
|
278
|
+
|
|
279
|
+
1. **Delete the release tag.** semantic-release creates the tag _before_ publishing, so a re-run while it exists is a no-op ([semantic-release#3178](https://github.com/semantic-release/semantic-release/issues/3178)):
|
|
280
|
+
```bash
|
|
281
|
+
glab api --method DELETE "projects/xmachin-es%2Fxmachines-js/repository/tags/vX.Y.Z"
|
|
282
|
+
```
|
|
283
|
+
2. **Re-run the `semantic-release` job.**
|
|
284
|
+
|
|
285
|
+
The config detects a staged-but-untagged version (a recovery re-run) and automatically demotes any package already on npm at that version to pack-only — re-packing it for the release assets but **not** re-publishing it — so the re-run publishes only what's missing, with no manual input. `SEMREL_SKIP_STEPS` (a regex matched against release step IDs) remains available as a manual override to force-skip specific steps.
|
|
286
|
+
|
|
287
|
+
> First fix the underlying cause before re-running — e.g. configure the missing trusted publisher — otherwise the same packages fail again.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
270
291
|
## Local Release Dry-Run (Manual)
|
|
271
292
|
|
|
272
293
|
To preview what semantic-release would do without publishing:
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
-
|
|
3
1
|
# Development
|
|
4
2
|
|
|
5
3
|
This guide covers everything you need to set up a local development environment, understand the build system, and contribute code to the XMachines JS monorepo.
|
|
@@ -9,6 +7,7 @@ This guide covers everything you need to set up a local development environment,
|
|
|
9
7
|
- [Local Setup](#local-setup)
|
|
10
8
|
- [Monorepo Structure](#monorepo-structure)
|
|
11
9
|
- [Build Commands](#build-commands)
|
|
10
|
+
- [Updating Dependencies](#updating-dependencies)
|
|
12
11
|
- [TypeScript Composite Build System](#typescript-composite-build-system)
|
|
13
12
|
- [Code Style](#code-style)
|
|
14
13
|
- [Branch Conventions](#branch-conventions)
|
|
@@ -132,8 +131,7 @@ All commands are run from the **repository root** unless otherwise noted.
|
|
|
132
131
|
| `pnpm run test:watch` | Re-run tests on file changes (interactive) |
|
|
133
132
|
| `pnpm run test:browser` | Run Playwright browser tests |
|
|
134
133
|
| `pnpm run test:coverage` | Run tests with V8 coverage reporting |
|
|
135
|
-
| `pnpm run coverage
|
|
136
|
-
| `pnpm run coverage:summary` | Run tests and write a JSON summary report |
|
|
134
|
+
| `pnpm run test:browser:coverage` | Run browser tests with coverage reporting |
|
|
137
135
|
| `pnpm run test:build` | Type-check test files without running them (`tsconfig.test.json`) |
|
|
138
136
|
| `pnpm run lint` | Lint all packages with oxlint |
|
|
139
137
|
| `pnpm run lint:fix` | Auto-fix lint issues |
|
|
@@ -143,6 +141,45 @@ All commands are run from the **repository root** unless otherwise noted.
|
|
|
143
141
|
|
|
144
142
|
---
|
|
145
143
|
|
|
144
|
+
## Updating Dependencies
|
|
145
|
+
|
|
146
|
+
Every dependency is declared with the same range in every manifest that uses it, and a test fails if two disagree — `pnpm update` should move a package everywhere at once, not leave one package a minor behind.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pnpm update -r # move within the declared ranges
|
|
150
|
+
pnpm update -r --latest # move the ranges themselves
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`pnpm update -r` alone will not move a `0.x` dependency past its current minor: a caret on a `0.x` version means `>=0.58.0 <0.59.0`, because minors are where a pre-1.0 package is allowed to break. `oxfmt` sat six minors behind that way while `pnpm outdated` reported it on every pipeline. Use `--latest` for those, and read what changed.
|
|
154
|
+
|
|
155
|
+
Two dependencies are pinned on purpose and must not be swept up:
|
|
156
|
+
|
|
157
|
+
| Dependency | Constraint | Why |
|
|
158
|
+
| ------------ | ------------------------------------ | --------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| `playwright` | exact, equal to `PLAYWRIGHT_VERSION` | The browsers are baked into the CI image; the browser job fails on any mismatch |
|
|
160
|
+
| `typescript` | `^5.9.3 \|\| ^6.0.3` | TypeScript 7 ships no programmatic compiler API, which TypeDoc and `@vue/compiler-sfc` both require |
|
|
161
|
+
|
|
162
|
+
New versions also wait out pnpm's `minimumReleaseAge` (24 hours) before they can be installed at all.
|
|
163
|
+
|
|
164
|
+
### Peer ranges are wider than what CI installs
|
|
165
|
+
|
|
166
|
+
`peerDependencies` and `devDependencies` say different things about the same package, so the one-range rule does not apply across them and the test exempts peers.
|
|
167
|
+
|
|
168
|
+
A peer range is a contract with the consumer: _bring your own React, anything in this range works_. It is deliberately wide, because the application owns that dependency — narrowing it forces consumers to upgrade in lockstep, or leaves two copies of a framework in their bundle. A dev range is what this repository installs to compile and test, and is concrete because CI needs one resolution.
|
|
169
|
+
|
|
170
|
+
So `react: ^18.0.0 || ^19.0.0` as a peer alongside `react: ^19.2.5` as a dev dependency is the correct pairing, not drift.
|
|
171
|
+
|
|
172
|
+
What that costs is worth stating plainly: **CI only ever exercises the dev version.** Two peers currently claim support across a major boundary that nothing here tests:
|
|
173
|
+
|
|
174
|
+
| Package | Peer range | Tested against |
|
|
175
|
+
| --------------------- | ---------------------- | -------------- |
|
|
176
|
+
| `react` / `react-dom` | `^18.0.0 \|\| ^19.0.0` | 19.x |
|
|
177
|
+
| `vue-router` | `^4.0.0 \|\| ^5.0.0` | 5.x |
|
|
178
|
+
|
|
179
|
+
React 18 and vue-router 4 are supported by intent — nothing known depends on 19-only or 5-only behaviour — but neither is installed by any job, so a regression there would surface as a consumer's bug report rather than a red pipeline. Narrowing either range to what is tested would be a breaking change for consumers and needs a major release; adding a floor-install job would close the gap instead. Until one of those happens, treat the lower major as untested.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
146
183
|
## TypeScript Composite Build System
|
|
147
184
|
|
|
148
185
|
The monorepo uses **TypeScript project references** for correct build-order management. No manual sequencing or separate build scripts are needed.
|
|
@@ -375,13 +412,15 @@ refactor/route-map-extraction
|
|
|
375
412
|
|
|
376
413
|
Release branches are managed by the project maintainers:
|
|
377
414
|
|
|
378
|
-
| Branch
|
|
379
|
-
|
|
|
380
|
-
| `main`
|
|
381
|
-
| `
|
|
382
|
-
| `
|
|
415
|
+
| Branch | Purpose |
|
|
416
|
+
| ------- | ------------------------- |
|
|
417
|
+
| `main` | Stable releases |
|
|
418
|
+
| `rc` | Release candidate channel |
|
|
419
|
+
| `beta` | Pre-release beta channel |
|
|
420
|
+
| `alpha` | Pre-release alpha channel |
|
|
421
|
+
| `pre` | Pre-release channel |
|
|
383
422
|
|
|
384
|
-
**Do not** manually version packages or create release branches —
|
|
423
|
+
**Do not** manually version packages or create release branches — semantic-release owns the version, and a release is cut by starting its manual CI job.
|
|
385
424
|
|
|
386
425
|
---
|
|
387
426
|
|
|
@@ -451,13 +490,13 @@ feat(play-react): add PlayRenderer suspense boundary
|
|
|
451
490
|
|
|
452
491
|
The GitLab CI pipeline runs automatically on merge requests, pushes to `main`, and git tags.
|
|
453
492
|
|
|
454
|
-
| Job | Command
|
|
455
|
-
| ------------------ |
|
|
456
|
-
| Build | `pnpm run build`
|
|
457
|
-
| Test with coverage | `vitest run --coverage`
|
|
458
|
-
| Lint | `oxlint .`
|
|
459
|
-
| Audit | `pnpm audit --audit-level=high`
|
|
460
|
-
| Semantic release | (
|
|
493
|
+
| Job | Command | Artifacts |
|
|
494
|
+
| ------------------ | ------------------------------------------------ | -------------------------------------- |
|
|
495
|
+
| Build | `pnpm run build` | — |
|
|
496
|
+
| Test with coverage | `vitest run --coverage` | JUnit XML, Cobertura coverage report |
|
|
497
|
+
| Lint | `oxlint .` | — |
|
|
498
|
+
| Audit | `pnpm audit --audit-level=high` | — |
|
|
499
|
+
| Semantic release | (manual job on `main`/`rc`/`beta`/`alpha`/`pre`) | CHANGELOG, npm publish, GitLab release |
|
|
461
500
|
|
|
462
501
|
---
|
|
463
502
|
|
package/contributing/testing.md
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
2
|
-
|
|
3
1
|
# Testing
|
|
4
2
|
|
|
5
3
|
This document describes the test framework, conventions, and CI integration for the XMachines JS monorepo.
|
|
@@ -62,10 +60,20 @@ pnpm run test:coverage
|
|
|
62
60
|
Produces coverage output in `text`, `html`, and `json-summary` formats.
|
|
63
61
|
|
|
64
62
|
```bash
|
|
65
|
-
pnpm run coverage
|
|
66
|
-
pnpm run coverage:summary # JSON summary only
|
|
63
|
+
pnpm run test:browser:coverage # browser suite, with coverage
|
|
67
64
|
```
|
|
68
65
|
|
|
66
|
+
Root-level coverage thresholds (regression gate):
|
|
67
|
+
|
|
68
|
+
| Metric | Threshold |
|
|
69
|
+
| ---------- | --------- |
|
|
70
|
+
| Lines | 80% |
|
|
71
|
+
| Functions | 80% |
|
|
72
|
+
| Statements | 80% |
|
|
73
|
+
| Branches | 75% |
|
|
74
|
+
|
|
75
|
+
Individual packages may enforce higher per-package thresholds in their own `vitest.config.ts`.
|
|
76
|
+
|
|
69
77
|
### Verify TypeScript test graph compiles
|
|
70
78
|
|
|
71
79
|
```bash
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[Examples](../../README.md) / @xmachines/play-dom-demo
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-dom-demo
|
|
6
4
|
|
|
7
5
|
Vanilla DOM renderer demo for [`@xmachines/play-dom`](../../../api/@xmachines/play-dom/README.md) — actor + `createPlayUI` without a router.
|
|
8
6
|
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
9
|
## What This Demonstrates
|
|
10
10
|
|
|
11
11
|
- Shared auth machine reused without framework-specific business logic
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createNavBar(actor, container): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/NavBar.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/NavBar.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/NavBar.ts#L9)
|
|
10
10
|
|
|
11
11
|
NavBar — App-shell navigation factory. Mounts a reactive nav into
|
|
12
12
|
`container`, observes actor.state via watchSignal, and updates button
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
# Function: initShell()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function initShell(actor, appElement): () => void;
|
|
6
|
+
function initShell(actor, appElement, inspector): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Shell.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Shell.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Shell.ts#L24)
|
|
10
10
|
|
|
11
11
|
Shell — DOM shell layout factory. Renders demo chrome (header + main +
|
|
12
12
|
debug panel), mounts NavBar, connects DOM renderer, and wires DebugPanel.
|
|
@@ -14,10 +14,11 @@ Returns a disconnect function.
|
|
|
14
14
|
|
|
15
15
|
## Parameters
|
|
16
16
|
|
|
17
|
-
| Parameter | Type
|
|
18
|
-
| ------------ |
|
|
19
|
-
| `actor` | `AuthActor`
|
|
20
|
-
| `appElement` | `HTMLElement`
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------------ | --------------- |
|
|
19
|
+
| `actor` | `AuthActor` |
|
|
20
|
+
| `appElement` | `HTMLElement` |
|
|
21
|
+
| `inspector` | `DemoInspector` |
|
|
21
22
|
|
|
22
23
|
## Returns
|
|
23
24
|
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type AuthCatalog = typeof authCatalog;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/catalog.ts#L6)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const About: ComponentFn<AuthCatalog, "About">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/About.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/About.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/About.ts#L8)
|
|
10
10
|
|
|
11
11
|
About — Public information page. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'About'>). Renders static content from props.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Contact: ComponentFn<AuthCatalog, "Contact">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Contact.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Contact.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Contact.ts#L8)
|
|
10
10
|
|
|
11
11
|
Contact — Public contact page. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Contact'>). Renders static content from props.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Dashboard: ComponentFn<AuthCatalog, "Dashboard">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Dashboard.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Dashboard.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Dashboard.ts#L9)
|
|
10
10
|
|
|
11
11
|
Dashboard — Protected authenticated home. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Dashboard'>). Renders welcome message; logout
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Home: ComponentFn<AuthCatalog, "Home">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Home.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Home.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Home.ts#L9)
|
|
10
10
|
|
|
11
11
|
Home — Public landing page. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Home'>). Renders static welcome content from
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Login: ComponentFn<AuthCatalog, "Login">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Login.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Login.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Login.ts#L9)
|
|
10
10
|
|
|
11
11
|
Login — Authentication form. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Login'>). Binds username input to ctx.store via
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const NavBarView: ComponentFn<AuthCatalog, "NavBar">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/NavBarView.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/NavBarView.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/NavBarView.ts#L12)
|
|
10
10
|
|
|
11
11
|
NavBarView — Catalog-typed NavBar component for DOM renderer.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Navigation: ComponentFn<AuthCatalog, "Navigation">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Navigation.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Navigation.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Navigation.ts#L9)
|
|
10
10
|
|
|
11
11
|
Navigation — Navigation status display. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Navigation'>). Renders current path and auth
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Overview: ComponentFn<AuthCatalog, "Overview">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Overview.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Overview.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Overview.ts#L9)
|
|
10
10
|
|
|
11
11
|
Overview — Dashboard overview child route. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Overview'>). Relative route resolves to
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Profile: ComponentFn<AuthCatalog, "Profile">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Profile.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Profile.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Profile.ts#L9)
|
|
10
10
|
|
|
11
11
|
Profile — Protected user profile page. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Profile'>). Renders username from route params
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Settings: ComponentFn<AuthCatalog, "Settings">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Settings.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Settings.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Settings.ts#L9)
|
|
10
10
|
|
|
11
11
|
Settings — Protected settings page. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Settings'>). Renders active section and username
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Stats: ComponentFn<AuthCatalog, "Stats">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-dom/examples/demo/src/components/Stats.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-dom/examples/demo/src/components/Stats.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/components/Stats.ts#L9)
|
|
10
10
|
|
|
11
11
|
Stats — Dashboard stats child route. Catalog-typed DOM component
|
|
12
12
|
(ComponentFn<AuthCatalog, 'Stats'>). Relative route resolves to
|
|
@@ -169,4 +169,4 @@ const authCatalog: Catalog<
|
|
|
169
169
|
>;
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
Defined in: [packages/play-dom/examples/demo/src/catalog.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
172
|
+
Defined in: [packages/play-dom/examples/demo/src/catalog.ts:5](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-dom/examples/demo/src/catalog.ts#L5)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[Examples](../../README.md) / @xmachines/play-dom-router-demo
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-dom-router-demo
|
|
6
4
|
|
|
7
5
|
Pure TypeScript integration demo for [`@xmachines/play-dom-router`](../../../api/@xmachines/play-dom-router/README.md) — actor-authoritative routing with the Browser History API and no framework.
|
|
8
6
|
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
9
|
## What This Demonstrates
|
|
10
10
|
|
|
11
11
|
- Shared auth machine reused without framework-specific business logic
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[Examples](../../README.md) / @xmachines/play-react-demo
|
|
2
2
|
|
|
3
|
-
<!-- generated-by: gsd-doc-writer -->
|
|
4
|
-
|
|
5
3
|
# @xmachines/play-react-demo
|
|
6
4
|
|
|
7
5
|
React renderer demo for [`@xmachines/play-react`](../../../api/@xmachines/play-react/README.md) — actor + `PlayRenderer` without a router.
|
|
8
6
|
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
9
|
## What This Demonstrates
|
|
10
10
|
|
|
11
11
|
- Shared auth machine reused without framework-specific business logic
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function App(): Element;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/App.tsx:
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/App.tsx:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-react/examples/demo/src/App.tsx#L72)
|
|
10
10
|
|
|
11
11
|
## Returns
|
|
12
12
|
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type AuthCatalog = typeof authCatalog;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/catalog.ts:6](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-react/examples/demo/src/catalog.ts#L6)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const About: ComponentFn<AuthCatalog, "About">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/About.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/About.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-react/examples/demo/src/components/About.tsx#L10)
|
|
10
10
|
|
|
11
11
|
About — Public information page
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Contact: ComponentFn<AuthCatalog, "Contact">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Contact.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Contact.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-react/examples/demo/src/components/Contact.tsx#L10)
|
|
10
10
|
|
|
11
11
|
Contact — Public contact page
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const Dashboard: ComponentFn<AuthCatalog, "Dashboard">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/examples/demo/src/components/Dashboard.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.
|
|
9
|
+
Defined in: [packages/play-react/examples/demo/src/components/Dashboard.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.1.0/packages/play-react/examples/demo/src/components/Dashboard.tsx#L12)
|
|
10
10
|
|
|
11
11
|
Dashboard — Protected authenticated home
|
|
12
12
|
|