@xmachines/docs 2.0.0 → 2.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 +11 -13
- package/api/@xmachines/play/README.md +58 -63
- package/api/@xmachines/play/classes/NonNullableError.md +7 -7
- package/api/@xmachines/play/classes/PlayError.md +25 -27
- package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
- package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
- package/api/@xmachines/play-actor/README.md +72 -63
- package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
- package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
- package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
- package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
- package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
- package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
- package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
- package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
- package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
- package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
- package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
- package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
- package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
- package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
- package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
- package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
- package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
- package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
- package/api/@xmachines/play-dom/README.md +119 -85
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
- package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
- package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
- package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
- package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
- package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
- package/api/@xmachines/play-dom-router/README.md +66 -49
- package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
- package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
- package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
- package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
- package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
- package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
- package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
- package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
- package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
- package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
- package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
- package/api/@xmachines/play-react/README.md +63 -54
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
- package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
- package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
- package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
- package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
- package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
- package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
- package/api/@xmachines/play-react-router/README.md +37 -28
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
- package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
- package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
- package/api/@xmachines/play-router/README.md +94 -82
- package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
- package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
- package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
- package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
- package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
- package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
- package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
- package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
- package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
- package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
- package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
- package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
- package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
- package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
- package/api/@xmachines/play-router/functions/routeExists.md +8 -8
- package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
- package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
- package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
- package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
- package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
- package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
- package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
- package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
- package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
- package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
- package/api/@xmachines/play-signals/README.md +38 -36
- package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
- package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
- package/api/@xmachines/play-solid/README.md +46 -42
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
- package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
- package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
- package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
- package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
- package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
- package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
- package/api/@xmachines/play-solid-router/README.md +34 -29
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
- package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
- package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
- package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
- package/api/@xmachines/play-svelte/README.md +40 -31
- package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
- package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
- package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
- package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
- package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
- package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
- package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
- package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
- package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
- package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
- package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
- package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
- package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
- package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-sveltekit-router/README.md +38 -34
- package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
- package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
- package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
- package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
- package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
- package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
- package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
- package/api/@xmachines/play-tanstack-router/README.md +37 -17
- package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
- package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
- package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
- package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
- package/api/@xmachines/play-vue/README.md +37 -35
- package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
- package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
- package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
- package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
- package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
- package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
- 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 +34 -0
- package/api/@xmachines/play-vue-router/README.md +65 -56
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
- package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
- package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
- package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
- package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
- package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
- package/api/@xmachines/play-xstate/README.md +72 -70
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
- package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
- package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
- package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
- package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
- package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
- package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
- package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
- package/api/@xmachines/shared/README.md +11 -13
- 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/development.md +28 -0
- package/guides/inspector.md +1 -1
- package/package.json +1 -1
- package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# `@xmachines/shared`
|
|
4
4
|
|
|
5
|
-
Shared configurations for XMachines packages
|
|
5
|
+
Shared configurations for the XMachines packages: TypeScript, linting, formatting, and the Vitest setup that the monorepo uses.
|
|
6
6
|
|
|
7
7
|
[](https://opensource.org/licenses/MIT)
|
|
8
8
|
|
|
9
|
-
Part of the [xmachines-js monorepo](../../README.md).
|
|
10
|
-
|
|
11
9
|
## Installation
|
|
12
10
|
|
|
13
|
-
This package is an internal
|
|
11
|
+
This package is an internal dependency of the monorepo. **An external user must not install it.**
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
In the monorepo, each package refers to it by name:
|
|
16
14
|
|
|
17
15
|
```json
|
|
18
16
|
{
|
|
@@ -76,7 +74,7 @@ The shared config enables the `typescript`, `unicorn`, and `import` plugins with
|
|
|
76
74
|
- `correctness` rules as errors
|
|
77
75
|
- `suspicious` and `perf` rules as warnings
|
|
78
76
|
- `import/no-cycle` and `typescript/no-explicit-any` as errors
|
|
79
|
-
- `typescript/no-unused-vars` as an error (
|
|
77
|
+
- `typescript/no-unused-vars` as an error (it ignores a name with a `_` prefix)
|
|
80
78
|
|
|
81
79
|
### Formatting (`oxfmt`)
|
|
82
80
|
|
|
@@ -87,11 +85,11 @@ import sharedConfig from "@xmachines/shared/oxfmt";
|
|
|
87
85
|
export default sharedConfig;
|
|
88
86
|
```
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
The main formatting rules are a tab width of 4 with real tab characters, a print width of 100 characters, double quotes, a trailing comma, and a final newline. A JSON file and a YAML file use an indentation of 2 spaces.
|
|
91
89
|
|
|
92
90
|
### Vitest Configuration
|
|
93
91
|
|
|
94
|
-
Use `defineXmVitestConfig` for
|
|
92
|
+
Use `defineXmVitestConfig` for the Vitest config of a package. It adds the shared setup files and the `@xmachines/*` source aliases:
|
|
95
93
|
|
|
96
94
|
```typescript
|
|
97
95
|
// vitest.config.ts
|
|
@@ -107,7 +105,7 @@ export default defineXmVitestConfig(import.meta.url, {
|
|
|
107
105
|
**What `defineXmVitestConfig` applies automatically:**
|
|
108
106
|
|
|
109
107
|
- `resolve.alias` from `xmAliases(import.meta.url)` — resolves `@xmachines/*` to TypeScript source
|
|
110
|
-
- `config/vitest.node.setup.ts` — Node.js runtime guard (
|
|
108
|
+
- `config/vitest.node.setup.ts` — the Node.js runtime guard (the browser mode skips it)
|
|
111
109
|
- `config/vitest.setup.ts` — `@testing-library/jest-dom` matcher extensions
|
|
112
110
|
|
|
113
111
|
For packages that test URL routing, add the URLPattern polyfill setup:
|
|
@@ -123,7 +121,7 @@ export default defineXmVitestConfig(import.meta.url, {
|
|
|
123
121
|
|
|
124
122
|
### Vite Aliases
|
|
125
123
|
|
|
126
|
-
|
|
124
|
+
In a Vite demo package or app package, resolve every `@xmachines/*` package to its TypeScript source. A build first is not necessary:
|
|
127
125
|
|
|
128
126
|
```typescript
|
|
129
127
|
// vite.config.ts
|
|
@@ -135,9 +133,9 @@ export default defineConfig({
|
|
|
135
133
|
});
|
|
136
134
|
```
|
|
137
135
|
|
|
138
|
-
Use `xmAliases` for
|
|
136
|
+
Use `xmAliases` for the aliases alone. Use `xmResolve` for a resolve config that adds `preserveSymlinks` (`false` by default) and your other resolve options to the aliases. For example, give `conditions` yourself if you need it.
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
In a browser test project, use `xmOptimizeDeps` to bundle the packages in advance. The optimizer then does not restart during a run. Use `xmCacheDir` to share one Vite dependency cache across the workspace:
|
|
141
139
|
|
|
142
140
|
```typescript
|
|
143
141
|
import { xmResolve, xmOptimizeDeps, xmCacheDir } from "@xmachines/shared/vite-aliases";
|
|
@@ -157,7 +155,7 @@ The base `config/tsconfig.json` configures:
|
|
|
157
155
|
- **Strict mode:** full strict, `noUnusedLocals`, `noUnusedParameters`, `exactOptionalPropertyTypes`, `noImplicitReturns`, `noImplicitOverride`
|
|
158
156
|
- **Emit:** `declaration`, `declarationMap`, `sourceMap` enabled
|
|
159
157
|
- **Interop:** `verbatimModuleSyntax`, `isolatedModules`
|
|
160
|
-
- **Custom condition:** `"source"` —
|
|
158
|
+
- **Custom condition:** `"source"` — `xmAliases` uses it to resolve a package to its TypeScript source in development and in a test
|
|
161
159
|
|
|
162
160
|
## Testing
|
|
163
161
|
|
|
@@ -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/v2.
|
|
9
|
+
Defined in: [vite-aliases.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vite-aliases.ts:338](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vite-aliases.ts:291](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vite-aliases.ts:258](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vite-aliases.ts:317](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
38
|
+
| `dynamicCompileOptions()` | (`data`) => \| \{ `runes`: `boolean`; \} \| `undefined` | [vite-aliases.ts:318](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vitest.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
9
|
+
Defined in: [vitest.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
5
|
+
Defined in: [vitest.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.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/v2.
|
|
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/v2.
|
|
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/v2.
|
|
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/v2.1.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/v2.1.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/v2.1.0/packages/shared/config/vitest.ts#L138) |
|
|
@@ -10,6 +10,7 @@ This guide covers everything you need to set up a local development environment,
|
|
|
10
10
|
- [Updating Dependencies](#updating-dependencies)
|
|
11
11
|
- [TypeScript Composite Build System](#typescript-composite-build-system)
|
|
12
12
|
- [Code Style](#code-style)
|
|
13
|
+
- [Writing Style](#writing-style-asd-ste100)
|
|
13
14
|
- [Branch Conventions](#branch-conventions)
|
|
14
15
|
- [PR Process](#pr-process)
|
|
15
16
|
|
|
@@ -400,6 +401,30 @@ Use `unknown` with type guards instead of `any`. Prefix unused locals/parameters
|
|
|
400
401
|
|
|
401
402
|
---
|
|
402
403
|
|
|
404
|
+
## Writing Style: ASD-STE100
|
|
405
|
+
|
|
406
|
+
Every text that a human reads follows **ASD-STE100 Simplified Technical English**: commit messages, merge request titles and descriptions, documentation under `packages/docs/`, README files, changelog entries, and code comments. The specification is at <https://asd-ste100.org/>.
|
|
407
|
+
|
|
408
|
+
Simplified Technical English keeps the documentation unambiguous for readers whose first language is not English, and it keeps the localized docs site consistent between versions.
|
|
409
|
+
|
|
410
|
+
The rules that apply most often:
|
|
411
|
+
|
|
412
|
+
- **One idea per sentence.** Keep instruction sentences to 20 words, descriptive sentences to 25.
|
|
413
|
+
- **Active voice, present tense, named actor.** Write "the bridge drops the event", not "the event is dropped".
|
|
414
|
+
- **Imperative for instructions.** Write "run `pnpm test`", not "you should run the tests". This also gives the Conventional Commits subject line its correct form.
|
|
415
|
+
- **One word, one meaning.** Choose one term for each concept and repeat it. Do not alternate between synonyms such as "delete", "remove", and "purge".
|
|
416
|
+
- **Simple words.** Write "use", not "utilize". Write "start", not "commence". Write "about", not "regarding".
|
|
417
|
+
- **Keep the articles.** Write "the actor emits the event", not "actor emits event". Do not use contractions: write "do not", not "don't".
|
|
418
|
+
- **No `-ing` clusters.** Write "the actor that emits the event", not "the emitting actor".
|
|
419
|
+
- **No idioms, metaphors, marketing words, jokes, or emojis.**
|
|
420
|
+
- **One topic for each paragraph, six sentences at most.** Put a warning or a caution before the step that it applies to.
|
|
421
|
+
|
|
422
|
+
The rules apply to prose. They do not apply to identifiers, code, test names, log output, or text that you quote from an external source.
|
|
423
|
+
|
|
424
|
+
The root `AGENTS.md` carries the same rules for AI coding agents.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
403
428
|
## Branch Conventions
|
|
404
429
|
|
|
405
430
|
Use a `<type>/` prefix that matches the conventional commit type for the work being done:
|
|
@@ -430,6 +455,8 @@ Release branches are managed by the project maintainers:
|
|
|
430
455
|
|
|
431
456
|
### Commit Messages
|
|
432
457
|
|
|
458
|
+
All prose in a commit follows [ASD-STE100](#writing-style-asd-ste100) — the subject line and the body.
|
|
459
|
+
|
|
433
460
|
This project uses **Conventional Commits** — changelogs and version bumps are generated automatically from commit history.
|
|
434
461
|
|
|
435
462
|
```
|
|
@@ -486,6 +513,7 @@ feat(play-react): add PlayRenderer suspense boundary
|
|
|
486
513
|
- [ ] New code has tests at or above coverage thresholds
|
|
487
514
|
- [ ] All new public exports have JSDoc
|
|
488
515
|
- [ ] Conventional commit format used on all commits
|
|
516
|
+
- [ ] Commits, MR description, and docs written in [ASD-STE100](#writing-style-asd-ste100)
|
|
489
517
|
- [ ] RFC read and implementation conforms to spec
|
|
490
518
|
|
|
491
519
|
### CI Pipeline
|
package/guides/inspector.md
CHANGED
|
@@ -170,7 +170,7 @@ actor.start();
|
|
|
170
170
|
<button onClick={() => inspector.show()}>Show Inspector</button>;
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
The controller answers the late-opening problem from the previous section: it buffers serialized events from actor creation, pins the current root's registration so it can never roll out of the bounded buffer, and flushes the buffer when the inspector window completes its handshake. That is a demo trade-off rather than a general recommendation — every transition pays serialization whether or not anyone ever opens the inspector — but it is what makes the button work at any point in a session.
|
|
173
|
+
The controller answers the late-opening problem from the previous section: it buffers serialized events from actor creation, pins the current root's registration so it can never roll out of the bounded buffer, and flushes the buffer when the inspector window completes its handshake. That is a demo trade-off rather than a general recommendation — every transition pays serialization whether or not anyone ever opens the inspector — but it is what makes the button work at any point in a session. The shared package's own README, at `packages/play-actor/examples/shared/README.md` in this repository, documents the design in full.
|
|
174
174
|
|
|
175
175
|
---
|
|
176
176
|
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
[API](../../../README.md) / [@xmachines/play-vue](../README.md) / getPlayViewContext
|
|
2
|
-
|
|
3
|
-
# Function: getPlayViewContext()
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
function getPlayViewContext(): ViewContextValue;
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Defined in: [packages/play-vue/src/actor-provider-context.ts:44](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-vue/src/actor-provider-context.ts#L44)
|
|
10
|
-
|
|
11
|
-
Access the current ViewContextValue from inside an ActorProvider tree.
|
|
12
|
-
|
|
13
|
-
## Returns
|
|
14
|
-
|
|
15
|
-
[`ViewContextValue`](../interfaces/ViewContextValue.md)
|
|
16
|
-
|
|
17
|
-
## Throws
|
|
18
|
-
|
|
19
|
-
If called outside an <ActorProvider> (or <PlayUIProvider>) tree
|
|
20
|
-
|
|
21
|
-
## Example
|
|
22
|
-
|
|
23
|
-
```typescript
|
|
24
|
-
import { getPlayViewContext } from "@xmachines/play-vue";
|
|
25
|
-
|
|
26
|
-
const view = getPlayViewContext();
|
|
27
|
-
// view.spec, view.handlers, view.registry
|
|
28
|
-
```
|