@xmachines/docs 1.0.0-beta.21 → 1.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/@xmachines/play/classes/PlayError.md +4 -4
- package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
- package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
- package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +3 -3
- package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
- package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
- package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
- package/api/@xmachines/play-react/README.md +20 -0
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/useActor.md +1 -1
- package/api/@xmachines/play-react/functions/useSignalEffect.md +8 -1
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
- package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
- package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -6
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +34 -21
- package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/README.md +17 -0
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +34 -21
- package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
- package/api/@xmachines/play-router/functions/connectRouter.md +1 -1
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +6 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-router/functions/createRouter.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/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/BaseRouteMapping.md +3 -3
- package/api/@xmachines/play-router/interfaces/BrowserHistory.md +14 -14
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +4 -4
- package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
- package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
- package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
- package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
- package/api/@xmachines/play-router/interfaces/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/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
- package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
- package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
- package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
- package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
- package/api/@xmachines/play-solid/README.md +20 -0
- package/api/@xmachines/play-solid/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -6
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +7 -1
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +35 -22
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +34 -21
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.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/functions/extractParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +35 -22
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +4 -4
- package/api/@xmachines/play-vue/README.md +20 -0
- package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
- package/api/@xmachines/play-vue/functions/useActor.md +1 -1
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
- package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +7 -7
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +35 -22
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- 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 +13 -1
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +13 -13
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
- package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
- package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
- package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
- package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
- package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
- package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
- package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
- package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
- package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
- package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/rfc/play.md +1 -1
- package/package.json +2 -2
- package/rfc/play.md +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: VueBaseRouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-vue-router/src/vue-base-route-map.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-vue-router/src/vue-base-route-map.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-base-route-map.ts#L28)
|
|
6
6
|
|
|
7
7
|
VueBaseRouteMap — intermediate base class for Vue Router adapters.
|
|
8
8
|
|
|
@@ -44,7 +44,7 @@ class MyVueRouteMap extends VueBaseRouteMap {
|
|
|
44
44
|
new VueBaseRouteMap(mappings): VueBaseRouteMap;
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Defined in: [play-vue-router/src/vue-base-route-map.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
47
|
+
Defined in: [play-vue-router/src/vue-base-route-map.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-base-route-map.ts#L32)
|
|
48
48
|
|
|
49
49
|
#### Parameters
|
|
50
50
|
|
|
@@ -68,7 +68,7 @@ Defined in: [play-vue-router/src/vue-base-route-map.ts:32](https://gitlab.com/xm
|
|
|
68
68
|
getPathByStateId(stateId): string | null;
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
Defined in: [play-router/src/base-route-map.ts:
|
|
71
|
+
Defined in: [play-router/src/base-route-map.ts:202](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/base-route-map.ts#L202)
|
|
72
72
|
|
|
73
73
|
Look up the path pattern registered for a state ID.
|
|
74
74
|
|
|
@@ -103,7 +103,7 @@ map.getPathByStateId("missing"); // null
|
|
|
103
103
|
getPattern(stateId): string | undefined;
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
Defined in: [play-vue-router/src/vue-base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
106
|
+
Defined in: [play-vue-router/src/vue-base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-base-route-map.ts#L58)
|
|
107
107
|
|
|
108
108
|
Get the URL path pattern for a given state ID (e.g. `"/profile/:userId"`).
|
|
109
109
|
|
|
@@ -125,7 +125,7 @@ Get the URL path pattern for a given state ID (e.g. `"/profile/:userId"`).
|
|
|
125
125
|
getRouteName(stateId): string | undefined;
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
Defined in: [play-vue-router/src/vue-base-route-map.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
128
|
+
Defined in: [play-vue-router/src/vue-base-route-map.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-base-route-map.ts#L48)
|
|
129
129
|
|
|
130
130
|
Get the Vue Router route name for a given state ID.
|
|
131
131
|
|
|
@@ -147,7 +147,7 @@ Get the Vue Router route name for a given state ID.
|
|
|
147
147
|
getStateId(routeName): string | undefined;
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
Defined in: [play-vue-router/src/vue-base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
150
|
+
Defined in: [play-vue-router/src/vue-base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-base-route-map.ts#L53)
|
|
151
151
|
|
|
152
152
|
Get the state ID for a given Vue Router route name.
|
|
153
153
|
|
|
@@ -169,7 +169,7 @@ Get the state ID for a given Vue Router route name.
|
|
|
169
169
|
getStateIdByPath(path): string | null;
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
Defined in: [play-router/src/base-route-map.ts:
|
|
172
|
+
Defined in: [play-router/src/base-route-map.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/base-route-map.ts#L167)
|
|
173
173
|
|
|
174
174
|
Resolve a URL path to its mapped state ID.
|
|
175
175
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: VueRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L47)
|
|
6
6
|
|
|
7
7
|
@xmachines/play-vue-router - Vue Router 4.x adapter for XMachines Play
|
|
8
8
|
|
|
@@ -23,7 +23,7 @@ new VueRouterBridge(
|
|
|
23
23
|
vueRouteMap): VueRouterBridge;
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:137](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
26
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:137](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L137)
|
|
27
27
|
|
|
28
28
|
Create a Vue Router bridge
|
|
29
29
|
|
|
@@ -55,15 +55,15 @@ onUnmounted(() => bridge.disconnect());
|
|
|
55
55
|
|
|
56
56
|
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|
|
57
57
|
| --------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
58
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`actor`](../../play-router/classes/RouterBridgeBase.md#property-actor) | [play-router/src/router-bridge-base.ts:
|
|
59
|
-
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`hasConnectedOnce`](../../play-router/classes/RouterBridgeBase.md#property-hasconnectedonce) | [play-router/src/router-bridge-base.ts:
|
|
60
|
-
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isConnected`](../../play-router/classes/RouterBridgeBase.md#property-isconnected) | [play-router/src/router-bridge-base.ts:
|
|
61
|
-
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isProcessingNavigation`](../../play-router/classes/RouterBridgeBase.md#property-isprocessingnavigation) | [play-router/src/router-bridge-base.ts:
|
|
62
|
-
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`lastSyncedPath`](../../play-router/classes/RouterBridgeBase.md#property-lastsyncedpath) | [play-router/src/router-bridge-base.ts:
|
|
63
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | `undefined` | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap()` or an equivalent. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeMap`](../../play-router/classes/RouterBridgeBase.md#property-routemap) | [play-router/src/router-bridge-base.ts:
|
|
64
|
-
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [play-router/src/router-bridge-base.ts:
|
|
65
|
-
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [play-router/src/router-bridge-base.ts:
|
|
66
|
-
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`RouteWatcherHandle`](../../play-router/interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeWatcher`](../../play-router/classes/RouterBridgeBase.md#property-routewatcher) | [play-router/src/router-bridge-base.ts:
|
|
58
|
+
| <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`actor`](../../play-router/classes/RouterBridgeBase.md#property-actor) | [play-router/src/router-bridge-base.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L102) |
|
|
59
|
+
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`hasConnectedOnce`](../../play-router/classes/RouterBridgeBase.md#property-hasconnectedonce) | [play-router/src/router-bridge-base.ts:90](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L90) |
|
|
60
|
+
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isConnected`](../../play-router/classes/RouterBridgeBase.md#property-isconnected) | [play-router/src/router-bridge-base.ts:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L89) |
|
|
61
|
+
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isProcessingNavigation`](../../play-router/classes/RouterBridgeBase.md#property-isprocessingnavigation) | [play-router/src/router-bridge-base.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L92) |
|
|
62
|
+
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`lastSyncedPath`](../../play-router/classes/RouterBridgeBase.md#property-lastsyncedpath) | [play-router/src/router-bridge-base.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L91) |
|
|
63
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | `undefined` | Bidirectional route map for `stateId ↔ path` resolution. Provide `getStateIdByPath` and `getPathByStateId`. Framework adapters typically wrap the result of `createRouteMap()` or an equivalent. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeMap`](../../play-router/classes/RouterBridgeBase.md#property-routemap) | [play-router/src/router-bridge-base.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L103) |
|
|
64
|
+
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [play-router/src/router-bridge-base.ts:105](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L105) |
|
|
65
|
+
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | - | [play-router/src/router-bridge-base.ts:104](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L104) |
|
|
66
|
+
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`RouteWatcherHandle`](../../play-router/interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeWatcher`](../../play-router/classes/RouterBridgeBase.md#property-routewatcher) | [play-router/src/router-bridge-base.ts:93](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L93) |
|
|
67
67
|
|
|
68
68
|
## Methods
|
|
69
69
|
|
|
@@ -73,13 +73,22 @@ onUnmounted(() => bridge.disconnect());
|
|
|
73
73
|
connect(): void;
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
76
|
+
Defined in: [play-router/src/router-bridge-base.ts:129](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L129)
|
|
77
77
|
|
|
78
78
|
Connect the router bridge to the Actor.
|
|
79
79
|
|
|
80
80
|
Sets up the TC39 Signal watcher for actor → router direction and
|
|
81
81
|
starts watching router changes (framework-specific).
|
|
82
82
|
|
|
83
|
+
Ordering here is part of the bridge contract:
|
|
84
|
+
|
|
85
|
+
- `lastSyncedPath` is seeded in the constructor from `actor.currentRoute`
|
|
86
|
+
- the actor watcher is installed before adapter router subscriptions
|
|
87
|
+
- initial sync then resolves deep-link vs restore using `actor.initialRoute`
|
|
88
|
+
|
|
89
|
+
Adapters that need custom initial-sync behavior should override
|
|
90
|
+
`getInitialRouterPath()` rather than reordering `connect()` steps.
|
|
91
|
+
|
|
83
92
|
#### Returns
|
|
84
93
|
|
|
85
94
|
`void`
|
|
@@ -96,7 +105,7 @@ starts watching router changes (framework-specific).
|
|
|
96
105
|
disconnect(): void;
|
|
97
106
|
```
|
|
98
107
|
|
|
99
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
108
|
+
Defined in: [play-router/src/router-bridge-base.ts:197](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L197)
|
|
100
109
|
|
|
101
110
|
Disconnect the router bridge from the Actor.
|
|
102
111
|
|
|
@@ -118,7 +127,7 @@ Stops signal watching and unregisters framework-specific router listener.
|
|
|
118
127
|
dispose(): void;
|
|
119
128
|
```
|
|
120
129
|
|
|
121
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:
|
|
130
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L280)
|
|
122
131
|
|
|
123
132
|
Cleanup alias for component lifecycle integration.
|
|
124
133
|
|
|
@@ -140,7 +149,7 @@ onUnmounted(() => bridge.dispose());
|
|
|
140
149
|
protected extractParams(pathname, stateId): Record<string, string>;
|
|
141
150
|
```
|
|
142
151
|
|
|
143
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
152
|
+
Defined in: [play-router/src/router-bridge-base.ts:300](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L300)
|
|
144
153
|
|
|
145
154
|
Extract path parameters from URL using the URLPattern API.
|
|
146
155
|
|
|
@@ -174,7 +183,7 @@ Extracted path parameters, or empty object if URLPattern is unavailable or no ma
|
|
|
174
183
|
protected extractQuery(search): Record<string, string>;
|
|
175
184
|
```
|
|
176
185
|
|
|
177
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
186
|
+
Defined in: [play-router/src/router-bridge-base.ts:321](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L321)
|
|
178
187
|
|
|
179
188
|
Extract query parameters from URL search string.
|
|
180
189
|
|
|
@@ -202,7 +211,7 @@ Extracted query parameters or empty object
|
|
|
202
211
|
protected getInitialRouterPath(): string | null;
|
|
203
212
|
```
|
|
204
213
|
|
|
205
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:
|
|
214
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:268](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L268)
|
|
206
215
|
|
|
207
216
|
Return the current Vue Router URL for initial sync.
|
|
208
217
|
|
|
@@ -227,7 +236,7 @@ bridge pushes actor's route to the router).
|
|
|
227
236
|
protected navigateRouter(path): void;
|
|
228
237
|
```
|
|
229
238
|
|
|
230
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:155](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
239
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:155](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L155)
|
|
231
240
|
|
|
232
241
|
Navigate Vue Router to the given path/stateId.
|
|
233
242
|
|
|
@@ -257,7 +266,7 @@ Navigation errors are thrown as [VueRouterNavigationError](#).
|
|
|
257
266
|
protected syncActorFromRouter(pathname, search?): void;
|
|
258
267
|
```
|
|
259
268
|
|
|
260
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
269
|
+
Defined in: [play-router/src/router-bridge-base.ts:248](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L248)
|
|
261
270
|
|
|
262
271
|
Sync actor state when router location changes.
|
|
263
272
|
|
|
@@ -287,13 +296,17 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
287
296
|
protected syncRouterFromActor(route): void;
|
|
288
297
|
```
|
|
289
298
|
|
|
290
|
-
Defined in: [play-router/src/router-bridge-base.ts:
|
|
299
|
+
Defined in: [play-router/src/router-bridge-base.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/router-bridge-base.ts#L228)
|
|
291
300
|
|
|
292
301
|
Sync router location when actor route signal changes.
|
|
293
302
|
|
|
294
303
|
Calls navigateRouter() for framework-specific navigation.
|
|
295
304
|
Prevents circular updates via isProcessingNavigation flag.
|
|
296
305
|
|
|
306
|
+
`lastSyncedPath` is updated before `navigateRouter()` and the processing flag is
|
|
307
|
+
released in a microtask so synchronous router callbacks triggered by navigation are
|
|
308
|
+
suppressed as circular echoes.
|
|
309
|
+
|
|
297
310
|
#### Parameters
|
|
298
311
|
|
|
299
312
|
| Parameter | Type |
|
|
@@ -316,7 +329,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
316
329
|
protected unwatchRouterChanges(): void;
|
|
317
330
|
```
|
|
318
331
|
|
|
319
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:
|
|
332
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:255](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L255)
|
|
320
333
|
|
|
321
334
|
Unsubscribe from Vue Router afterEach guard.
|
|
322
335
|
|
|
@@ -336,7 +349,7 @@ Unsubscribe from Vue Router afterEach guard.
|
|
|
336
349
|
protected watchRouterChanges(): void;
|
|
337
350
|
```
|
|
338
351
|
|
|
339
|
-
Defined in: [play-vue-router/src/vue-router-bridge.ts:186](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
352
|
+
Defined in: [play-vue-router/src/vue-router-bridge.ts:186](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/vue-router-bridge.ts#L186)
|
|
340
353
|
|
|
341
354
|
Start watching for router location changes.
|
|
342
355
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-vue-router/src/create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-vue-router/src/create-route-map.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/create-route-map.ts#L9)
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRouteEvent
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-router/src/types.ts:216](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L216)
|
|
6
6
|
|
|
7
7
|
Enhanced routing event with parameter and query support
|
|
8
8
|
|
|
@@ -112,8 +112,8 @@ URLPatternResult for advanced use cases (debugging, pattern analysis).
|
|
|
112
112
|
|
|
113
113
|
| Property | Modifier | Type | Defined in |
|
|
114
114
|
| -------------------------------------- | ---------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
-
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
116
|
-
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:219](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
117
|
-
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:220](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
118
|
-
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
119
|
-
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:217](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
115
|
+
| <a id="property-match"></a> `match?` | `readonly` | `unknown` | [play-router/src/types.ts:221](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L221) |
|
|
116
|
+
| <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:219](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L219) |
|
|
117
|
+
| <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | [play-router/src/types.ts:220](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L220) |
|
|
118
|
+
| <a id="property-to"></a> `to` | `readonly` | `string` | [play-router/src/types.ts:218](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L218) |
|
|
119
|
+
| <a id="property-type"></a> `type` | `readonly` | `"play.route"` | [play-router/src/types.ts:217](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L217) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMapping
|
|
4
4
|
|
|
5
|
-
Defined in: [play-vue-router/src/types.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-vue-router/src/types.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/types.ts#L10)
|
|
6
6
|
|
|
7
7
|
Mapping configuration between XMachines state IDs and Vue Router route names
|
|
8
8
|
|
|
@@ -10,6 +10,6 @@ Mapping configuration between XMachines state IDs and Vue Router route names
|
|
|
10
10
|
|
|
11
11
|
| Property | Modifier | Type | Description | Defined in |
|
|
12
12
|
| ------------------------------------------- | ---------- | -------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
-
| <a id="property-pattern"></a> `pattern?` | `readonly` | `string` | Optional URL pattern for debugging | [play-vue-router/src/types.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
14
|
-
| <a id="property-routename"></a> `routeName` | `readonly` | `string` | Vue Router route name | [play-vue-router/src/types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
15
|
-
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID (e.g., '#home', '#profile') | [play-vue-router/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
13
|
+
| <a id="property-pattern"></a> `pattern?` | `readonly` | `string` | Optional URL pattern for debugging | [play-vue-router/src/types.ts:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/types.ts#L16) |
|
|
14
|
+
| <a id="property-routename"></a> `routeName` | `readonly` | `string` | Vue Router route name | [play-vue-router/src/types.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/types.ts#L14) |
|
|
15
|
+
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID (e.g., '#home', '#profile') | [play-vue-router/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/types.ts#L12) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-router/src/types.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-router/src/types.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L264)
|
|
6
6
|
|
|
7
7
|
RouterBridge interface for runtime infrastructure adapters
|
|
8
8
|
|
|
@@ -54,7 +54,7 @@ class TanStackRouterBridge implements RouterBridge {
|
|
|
54
54
|
connect(): void | Promise<void>;
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Defined in: [play-router/src/types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
57
|
+
Defined in: [play-router/src/types.ts:280](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L280)
|
|
58
58
|
|
|
59
59
|
Connect the router bridge to the Actor
|
|
60
60
|
|
|
@@ -83,7 +83,7 @@ await bridge.connect();
|
|
|
83
83
|
disconnect(): void | Promise<void>;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: [play-router/src/types.ts:296](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
86
|
+
Defined in: [play-router/src/types.ts:296](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-router/src/types.ts#L296)
|
|
87
87
|
|
|
88
88
|
Disconnect the router bridge from the Actor
|
|
89
89
|
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type RoutableActor = AbstractActor<AnyActorLogic> & Routable & Viewable;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-vue-router/src/play-router-provider.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-vue-router/src/play-router-provider.ts:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/play-router-provider.ts#L10)
|
|
10
10
|
|
|
11
11
|
Minimum actor shape accepted by PlayRouterProvider.
|
|
@@ -64,7 +64,7 @@ const PlayRouterProvider: DefineComponent<
|
|
|
64
64
|
>;
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Defined in: [play-vue-router/src/play-router-provider.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
67
|
+
Defined in: [play-vue-router/src/play-router-provider.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-vue-router/src/play-router-provider.ts#L19)
|
|
68
68
|
|
|
69
69
|
PlayRouterProvider — Vue convenience wrapper for VueRouterBridge.
|
|
70
70
|
|
|
@@ -169,6 +169,10 @@ const restoredActor = createPlayer(undefined, { snapshot });
|
|
|
169
169
|
restoredActor.start();
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
+
`restoredActor.initialRoute` still reflects the machine's default initial route, not the
|
|
173
|
+
restored snapshot route. Router bridges rely on that invariant to distinguish a deep-link
|
|
174
|
+
from a restored session during `connect()`.
|
|
175
|
+
|
|
172
176
|
### PlayerActor
|
|
173
177
|
|
|
174
178
|
Concrete actor implementing Play signal protocol:
|
|
@@ -179,6 +183,14 @@ Concrete actor implementing Play signal protocol:
|
|
|
179
183
|
- `currentRoute: Signal.Computed<string | null>` — Derived URL from the current state's `meta.route` and `context.routeParams`. Returns `null` when no route metadata is present or a required route parameter is missing from context.
|
|
180
184
|
- `currentView: Signal.State<ViewMetadata | null>` — Current view spec (updated on every state transition). The spec is automatically enriched with `context.routeParams` (URL params) and any `contextProps`-allowlisted context fields before being emitted (see [Prop Enrichment from Routing and Context](#prop-enrichment-from-routing-and-context)).
|
|
181
185
|
|
|
186
|
+
**Lifecycle ordering:**
|
|
187
|
+
|
|
188
|
+
- `state` and `currentRoute` update synchronously from the active XState snapshot.
|
|
189
|
+
- `currentView` is then validated and cached from that same snapshot.
|
|
190
|
+
- `onStateChange` runs after those signals are current.
|
|
191
|
+
- `onTransition` runs after `send()` completes, with both previous and next snapshots.
|
|
192
|
+
- `onStart` runs after the initial active snapshot has been published.
|
|
193
|
+
|
|
182
194
|
**Methods:**
|
|
183
195
|
|
|
184
196
|
- `start()` — Start the actor (must call after creation)
|
|
@@ -256,7 +268,7 @@ const machine = setup({
|
|
|
256
268
|
|
|
257
269
|
- `hasContext(path: string)` - Check if context property is truthy
|
|
258
270
|
- `eventMatches(type: string)` - Check event type
|
|
259
|
-
- `contextFieldMatches(fieldPath: string, expectedValue: unknown)` - Check context field with
|
|
271
|
+
- `contextFieldMatches(fieldPath: string, expectedValue: unknown)` - Check context field with strict structural equality
|
|
260
272
|
- `composeGuards(guards: Array)` - AND composition
|
|
261
273
|
- `composeGuardsOr(guards: Array)` - OR composition
|
|
262
274
|
- `negateGuard(guard)` - NOT composition
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: PlayerActor\<TMachine\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:332](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:332](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L332)
|
|
6
6
|
|
|
7
7
|
Concrete XState actor implementing Play Architecture signal protocol
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ console.log(actor.currentRoute.get()); // '/'
|
|
|
46
46
|
console.log(actor.currentView.get()); // { component: 'HomePage' }
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Signal lifecycle with watchers
|
|
49
|
+
Signal lifecycle with watchers
|
|
50
50
|
|
|
51
51
|
```typescript
|
|
52
52
|
import { Signal } from "@xmachines/play-signals";
|
|
@@ -60,7 +60,7 @@ const watcher = new Signal.subtle.Watcher(() => {
|
|
|
60
60
|
|
|
61
61
|
watcher.watch(actor.state);
|
|
62
62
|
actor.send({ type: "play.route", to: "#about" });
|
|
63
|
-
// Watcher notification scheduled via microtask
|
|
63
|
+
// Watcher notification scheduled via microtask by the watcher itself
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## See
|
|
@@ -108,7 +108,7 @@ new PlayerActor<TMachine>(
|
|
|
108
108
|
snapshot?): PlayerActor<TMachine>;
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
111
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:403](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L403)
|
|
112
112
|
|
|
113
113
|
#### Parameters
|
|
114
114
|
|
|
@@ -133,16 +133,16 @@ Defined in: [packages/play-xstate/src/player-actor.ts:400](https://gitlab.com/xm
|
|
|
133
133
|
| ------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
134
134
|
| <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`_parent`](../../play-actor/classes/AbstractActor.md#property-_parent) | - |
|
|
135
135
|
| <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`clock`](../../play-actor/classes/AbstractActor.md#property-clock) | - |
|
|
136
|
-
| <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed` that derives the current URL path from the active machine state's `meta.route` template and the actor's context. Returns `null` when the current state has no `meta.route`, or when the route template cannot be fully resolved (e.g. a required parameter is absent from context). **Throws** When a required `:param` placeholder in the route template has no matching value in the actor's context. Import the class from `@xmachines/play-xstate/errors`. **Example** `// Returns "/profile/alice" when context.userId === "alice" const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:362](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
137
|
-
| <a id="property-currentview"></a> `currentView` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](../../play-actor/interfaces/ViewMetadata.md) \| `null`\> | Reactive signal containing the current view spec derived from the active state's `meta.view` metadata. Always emits a **fresh object reference** on every state transition (including self-transitions with `reenter: true`) so TC39 Signal equality checks reliably detect changes. The emitted `ViewMetadata` has its spec element `props` enriched with `context.routeParams` before emission — URL path parameters (e.g. `:section?`) flow into component props automatically. See `mergeRouteParamsIntoProps` for the merge priority rules. Returns `null` when the current state has no `meta.view` metadata. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.component); // e.g. "Dashboard" console.log(view.spec); // @json-render/core Spec object }` | - | - | [packages/play-xstate/src/player-actor.ts:
|
|
136
|
+
| <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed` that derives the current URL path from the active machine state's `meta.route` template and the actor's context. Returns `null` when the current state has no `meta.route`, or when the route template cannot be fully resolved (e.g. a required parameter is absent from context). **Throws** When a required `:param` placeholder in the route template has no matching value in the actor's context. Import the class from `@xmachines/play-xstate/errors`. **Example** `// Returns "/profile/alice" when context.userId === "alice" const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:362](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L362) |
|
|
137
|
+
| <a id="property-currentview"></a> `currentView` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](../../play-actor/interfaces/ViewMetadata.md) \| `null`\> | Reactive signal containing the current view spec derived from the active state's `meta.view` metadata. Always emits a **fresh object reference** on every state transition (including self-transitions with `reenter: true`) so TC39 Signal equality checks reliably detect changes. The emitted `ViewMetadata` has its spec element `props` enriched with `context.routeParams` before emission — URL path parameters (e.g. `:section?`) flow into component props automatically. See `mergeRouteParamsIntoProps` for the merge priority rules. Returns `null` when the current state has no `meta.view` metadata. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.component); // e.g. "Dashboard" console.log(view.spec); // @json-render/core Spec object }` | - | - | [packages/play-xstate/src/player-actor.ts:401](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L401) |
|
|
138
138
|
| <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`id`](../../play-actor/classes/AbstractActor.md#property-id) | - |
|
|
139
|
-
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction, never changes even when the actor is restored from a snapshot. Router bridges compare this against the browser URL to distinguish a deep-link (non-initial URL → router wins) from a restore (initial URL + actor at a different restored route → actor wins).
|
|
139
|
+
| <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's initial state — fixed at construction, never changes even when the actor is restored from a snapshot. Router bridges compare this against the browser URL to distinguish a deep-link (non-initial URL → router wins) from a restore (initial URL + actor at a different restored route → actor wins). This value is intentionally derived from a fresh, non-restored machine snapshot, never from the runtime actor snapshot passed via `restore?.snapshot`. | - | - | [packages/play-xstate/src/player-actor.ts:375](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L375) |
|
|
140
140
|
| <a id="property-logic"></a> `logic` | `public` | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`logic`](../../play-actor/classes/AbstractActor.md#property-logic) | - |
|
|
141
141
|
| <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`options`](../../play-actor/classes/AbstractActor.md#property-options) | - |
|
|
142
142
|
| <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<`any`, `any`, `any`\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`ref`](../../play-actor/classes/AbstractActor.md#property-ref) | - |
|
|
143
143
|
| <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`sessionId`](../../play-actor/classes/AbstractActor.md#property-sessionid) | - |
|
|
144
144
|
| <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`src`](../../play-actor/classes/AbstractActor.md#property-src) | - |
|
|
145
|
-
| <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`AnyMachineSnapshot`](https://www.jsdocs.io/package/xstate#AnyMachineSnapshot)\> | Reactive snapshot of current actor state. Typed as `Signal.State<unknown>` at the abstract level; concrete implementations narrow this to the actual snapshot type (e.g., `Signal.State<AnyMachineSnapshot>` in `@xmachines/play-xstate`'s `PlayerActor`). Infrastructure observes this signal to react to state changes without directly coupling to the Actor's internal state machine implementation. **Example** `// Infrastructure observes state signal const watcher = new Signal.subtle.Watcher(() => { console.log('Actor state changed:', actor.state.get()); }); watcher.watch(actor.state);` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:342](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
145
|
+
| <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`AnyMachineSnapshot`](https://www.jsdocs.io/package/xstate#AnyMachineSnapshot)\> | Reactive snapshot of current actor state. Typed as `Signal.State<unknown>` at the abstract level; concrete implementations narrow this to the actual snapshot type (e.g., `Signal.State<AnyMachineSnapshot>` in `@xmachines/play-xstate`'s `PlayerActor`). Infrastructure observes this signal to react to state changes without directly coupling to the Actor's internal state machine implementation. **Example** `// Infrastructure observes state signal const watcher = new Signal.subtle.Watcher(() => { console.log('Actor state changed:', actor.state.get()); }); watcher.watch(actor.state);` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:342](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L342) |
|
|
146
146
|
| <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`system`](../../play-actor/classes/AbstractActor.md#property-system) | - |
|
|
147
147
|
| <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`systemId`](../../play-actor/classes/AbstractActor.md#property-systemid) | - |
|
|
148
148
|
|
|
@@ -170,7 +170,7 @@ observable: InteropSubscribable<any>;
|
|
|
170
170
|
dispose(): void;
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
173
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:585](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L585)
|
|
174
174
|
|
|
175
175
|
Convenience dispose method for cleanup
|
|
176
176
|
|
|
@@ -220,7 +220,7 @@ https://stately.ai/docs/persistence
|
|
|
220
220
|
getSnapshot(): SnapshotFrom<TMachine>;
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
223
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:554](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L554)
|
|
224
224
|
|
|
225
225
|
Get current snapshot
|
|
226
226
|
|
|
@@ -298,7 +298,7 @@ select<TSelected>(selector, equalityFn?): Readable<TSelected>;
|
|
|
298
298
|
send(event): void;
|
|
299
299
|
```
|
|
300
300
|
|
|
301
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
301
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:531](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L531)
|
|
302
302
|
|
|
303
303
|
Send an event to the underlying XState actor.
|
|
304
304
|
|
|
@@ -342,7 +342,7 @@ actor.send({ type: "play.route", to: "#home" });
|
|
|
342
342
|
start(): this;
|
|
343
343
|
```
|
|
344
344
|
|
|
345
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
345
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:485](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L485)
|
|
346
346
|
|
|
347
347
|
Start the actor
|
|
348
348
|
|
|
@@ -364,7 +364,7 @@ Per RESEARCH.md Pitfall 1: Always call start() after creation
|
|
|
364
364
|
stop(): this;
|
|
365
365
|
```
|
|
366
366
|
|
|
367
|
-
Defined in: [packages/play-xstate/src/player-actor.ts:
|
|
367
|
+
Defined in: [packages/play-xstate/src/player-actor.ts:499](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/player-actor.ts#L499)
|
|
368
368
|
|
|
369
369
|
Stop the actor and cleanup
|
|
370
370
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function buildRouteUrl(routeTemplate, context?): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/routing/build-url.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/routing/build-url.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/routing/build-url.ts#L35)
|
|
10
10
|
|
|
11
11
|
Build a full URL from a route template and the actor's context.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function composeGuards<TContext, TEvent>(guards): ComposedGuard;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/compose.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/compose.ts:77](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/guards/compose.ts#L77)
|
|
10
10
|
|
|
11
11
|
Compose guards with AND logic using XState's and() helper
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function composeGuardsOr<TContext, TEvent>(guards): ComposedGuard;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/compose.ts:143](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/compose.ts:143](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/guards/compose.ts#L143)
|
|
10
10
|
|
|
11
11
|
Compose guards with OR logic using XState's or() helper
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function contextFieldMatches<TContext>(fieldPath, expectedValue): Guard<TContext, PlayEvent>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-xstate/src/guards/helpers.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-xstate/src/guards/helpers.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.22/packages/play-xstate/src/guards/helpers.ts#L68)
|
|
10
10
|
|
|
11
11
|
Check if a context field matches an expected value.
|
|
12
12
|
|