@xmachines/docs 1.0.0-beta.16 → 1.0.0-beta.17
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/README.md +56 -17
- package/api/@xmachines/play/classes/PlayError.md +240 -0
- package/api/@xmachines/play/type-aliases/PlayEvent.md +4 -4
- package/api/@xmachines/play-actor/README.md +32 -31
- package/api/@xmachines/play-actor/classes/AbstractActor.md +20 -19
- package/api/@xmachines/play-actor/interfaces/PlaySpec.md +37 -0
- package/api/@xmachines/play-actor/interfaces/Routable.md +5 -4
- package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
- package/api/@xmachines/play-actor/interfaces/Viewable.md +8 -8
- package/api/@xmachines/play-dom/README.md +36 -0
- package/api/@xmachines/play-dom/classes/PlayRenderer.md +83 -0
- package/api/@xmachines/play-dom/functions/connectRenderer.md +51 -0
- package/api/@xmachines/play-dom/functions/renderSpec.md +28 -0
- package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +18 -0
- package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +18 -0
- package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -0
- package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +23 -0
- package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +11 -0
- package/api/@xmachines/play-react/README.md +226 -305
- package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
- package/api/@xmachines/play-react/functions/defineRegistry.md +47 -0
- package/api/@xmachines/play-react/functions/useActor.md +13 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/functions/useStateBinding.md +32 -0
- package/api/@xmachines/play-react/interfaces/ComponentContext.md +35 -0
- 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 +15 -7
- package/api/@xmachines/play-react/type-aliases/ComponentFn.md +34 -0
- package/api/@xmachines/play-react/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-react/variables/PlayRenderer.md +18 -30
- package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +32 -32
- package/api/@xmachines/play-react-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
- package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/README.md +51 -0
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +6 -6
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +33 -35
- 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/crawlMachine.md +1 -1
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +4 -1
- package/api/@xmachines/play-router/functions/createRouteMap.md +3 -3
- 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/extractRoute.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/routeExists.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 +19 -15
- package/api/@xmachines/play-router/interfaces/BrowserWindow.md +14 -14
- package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +6 -6
- 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 +4 -4
- package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +55 -0
- package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
- package/api/@xmachines/play-router/interfaces/StateVisit.md +4 -4
- package/api/@xmachines/play-router/interfaces/VanillaRouter.md +4 -4
- package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
- package/api/@xmachines/play-signals/README.md +22 -10
- package/api/@xmachines/play-signals/functions/watchSignal.md +35 -0
- 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 +193 -219
- package/api/@xmachines/play-solid/functions/defineRegistry.md +47 -0
- package/api/@xmachines/play-solid/functions/useActor.md +13 -0
- package/api/@xmachines/play-solid/functions/useStateBinding.md +23 -0
- package/api/@xmachines/play-solid/interfaces/ComponentContext.md +35 -0
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +15 -7
- package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +34 -0
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +15 -43
- package/api/@xmachines/play-solid-router/README.md +2 -0
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +6 -6
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +37 -37
- package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +18 -17
- package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +3 -1
- package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
- package/api/@xmachines/play-tanstack-react-router/README.md +1 -5
- package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +45 -33
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +2 -2
- package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.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/PlayRouterProviderProps.md +14 -8
- 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/type-aliases/TanStackRouterInstance.md +1 -1
- package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +24 -4
- package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +6 -6
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +33 -33
- package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +11 -5
- package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +14 -8
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +3 -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 +216 -209
- package/api/@xmachines/play-vue/functions/defineRegistry.md +32 -0
- package/api/@xmachines/play-vue/functions/useActor.md +13 -0
- package/api/@xmachines/play-vue/functions/useStateBinding.md +30 -0
- package/api/@xmachines/play-vue/interfaces/ComponentContext.md +35 -0
- package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +14 -6
- package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +33 -0
- package/api/@xmachines/play-vue/type-aliases/PlayActor.md +9 -0
- package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-vue-router/README.md +21 -0
- 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 +48 -51
- package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
- package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +4 -4
- package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +3 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +7 -1
- package/api/@xmachines/play-xstate/README.md +236 -111
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +36 -33
- package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +24 -18
- 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/definePlayer.md +12 -61
- 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/functions/stateMatches.md +1 -1
- package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +9 -13
- package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
- package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +8 -9
- 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 +14 -4
- package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +19 -4
- package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
- package/api/@xmachines/shared/functions/xmAliases.md +1 -1
- package/api/README.md +1 -1
- package/api/llms.txt +11 -5
- package/examples/multi-router-integration.md +31 -19
- package/package.json +2 -2
- package/api/@xmachines/play-catalog/README.md +0 -331
- package/api/@xmachines/play-catalog/functions/defineCatalog.md +0 -98
- package/api/@xmachines/play-catalog/functions/defineComponents.md +0 -134
- package/api/@xmachines/play-catalog/type-aliases/Catalog.md +0 -48
- package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +0 -20
- package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +0 -65
- package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +0 -17
- package/api/@xmachines/play-xstate/functions/mergeViewProps.md +0 -26
- package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +0 -39
- package/api/@xmachines/play-xstate/functions/validateViewProps.md +0 -80
- package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +0 -16
- package/api/@xmachines/play-xstate/type-aliases/Catalog.md +0 -21
- package/api/@xmachines/play-xstate/type-aliases/ValidationResult.md +0 -17
- package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +0 -35
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-tanstack-solid-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-tanstack-solid-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/route-map.ts#L26)
|
|
6
6
|
|
|
7
7
|
Shared bidirectional route map base class.
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ own and inherit the full public API from here.
|
|
|
12
12
|
**Lookup strategy:**
|
|
13
13
|
|
|
14
14
|
- Static paths (no `:param`) → O(1) `Map` lookup
|
|
15
|
-
- Dynamic paths → O(k) bucket-indexed scan using `
|
|
15
|
+
- Dynamic paths → O(k) bucket-indexed scan using `URLPattern`, where `k` is the number
|
|
16
16
|
of routes sharing the same first path segment
|
|
17
17
|
- Results are cached after the first match
|
|
18
18
|
|
|
@@ -53,12 +53,12 @@ map.getPathByStateId("missing"); // null
|
|
|
53
53
|
new RouteMap(mappings): RouteMap;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: play-router/dist/base-route-map.d.ts:
|
|
56
|
+
Defined in: play-router/dist/base-route-map.d.ts:82
|
|
57
57
|
|
|
58
58
|
Build a route map from an array of state ID ↔ path mappings.
|
|
59
59
|
|
|
60
60
|
Static paths (no `:param`) are indexed in an O(1) `Map`.
|
|
61
|
-
Parameterized paths are compiled to `
|
|
61
|
+
Parameterized paths are compiled to `URLPattern` and grouped into first-segment
|
|
62
62
|
buckets for efficient candidate selection.
|
|
63
63
|
|
|
64
64
|
#### Parameters
|
|
@@ -83,7 +83,7 @@ buckets for efficient candidate selection.
|
|
|
83
83
|
getPathByStateId(stateId): string | null;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: play-router/dist/base-route-map.d.ts:
|
|
86
|
+
Defined in: play-router/dist/base-route-map.d.ts:112
|
|
87
87
|
|
|
88
88
|
Look up the path pattern registered for a state ID.
|
|
89
89
|
|
|
@@ -118,7 +118,7 @@ map.getPathByStateId("missing"); // null
|
|
|
118
118
|
getStateIdByPath(path): string | null;
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
Defined in: play-router/dist/base-route-map.d.ts:
|
|
121
|
+
Defined in: play-router/dist/base-route-map.d.ts:99
|
|
122
122
|
|
|
123
123
|
Resolve a URL path to its mapped state ID.
|
|
124
124
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: SolidRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L45)
|
|
6
6
|
|
|
7
7
|
TanStack Solid Router integration bridge extending RouterBridgeBase
|
|
8
8
|
|
|
@@ -25,17 +25,17 @@ new SolidRouterBridge(
|
|
|
25
25
|
routeMap): SolidRouterBridge;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
28
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:55](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L55)
|
|
29
29
|
|
|
30
30
|
Create a TanStack Solid Router bridge
|
|
31
31
|
|
|
32
32
|
#### Parameters
|
|
33
33
|
|
|
34
|
-
| Parameter | Type
|
|
35
|
-
| ---------- |
|
|
36
|
-
| `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md)
|
|
37
|
-
| `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic)\> & [`Routable`](../../play-actor/interfaces/Routable.md) | XMachines actor instance |
|
|
38
|
-
| `routeMap` | [`RouteMap`](RouteMap.md)
|
|
34
|
+
| Parameter | Type | Description |
|
|
35
|
+
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
|
|
36
|
+
| `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md) | TanStack Router instance (from createRouter) |
|
|
37
|
+
| `actor` | [`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) | XMachines actor instance |
|
|
38
|
+
| `routeMap` | [`RouteMap`](RouteMap.md) | Bidirectional state ID ↔ path mapping |
|
|
39
39
|
|
|
40
40
|
#### Returns
|
|
41
41
|
|
|
@@ -47,17 +47,17 @@ Create a TanStack Solid Router bridge
|
|
|
47
47
|
|
|
48
48
|
## Properties
|
|
49
49
|
|
|
50
|
-
| Property | Modifier | Type
|
|
51
|
-
| --------------------------------------------------------------------- | ----------- |
|
|
52
|
-
| <a id="property-actor"></a> `actor` | `readonly` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic)\> & [`Routable`](../../play-actor/interfaces/Routable.md) |
|
|
53
|
-
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean`
|
|
54
|
-
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean`
|
|
55
|
-
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean`
|
|
56
|
-
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string`
|
|
57
|
-
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object`
|
|
58
|
-
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined`
|
|
59
|
-
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined`
|
|
60
|
-
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`
|
|
50
|
+
| Property | Modifier | Type | Description | Inherited from | Defined in |
|
|
51
|
+
| --------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
52
|
+
| <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) | A `Routable` actor exposing `currentRoute` and `send`. | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`actor`](../../play-router/classes/RouterBridgeBase.md#property-actor) | play-router/dist/router-bridge-base.d.ts:73 |
|
|
53
|
+
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`hasConnectedOnce`](../../play-router/classes/RouterBridgeBase.md#property-hasconnectedonce) | play-router/dist/router-bridge-base.d.ts:79 |
|
|
54
|
+
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isConnected`](../../play-router/classes/RouterBridgeBase.md#property-isconnected) | play-router/dist/router-bridge-base.d.ts:78 |
|
|
55
|
+
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`isProcessingNavigation`](../../play-router/classes/RouterBridgeBase.md#property-isprocessingnavigation) | play-router/dist/router-bridge-base.d.ts:81 |
|
|
56
|
+
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`lastSyncedPath`](../../play-router/classes/RouterBridgeBase.md#property-lastsyncedpath) | play-router/dist/router-bridge-base.d.ts:80 |
|
|
57
|
+
| <a id="property-routemap"></a> `routeMap` | `readonly` | `object` | 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/dist/router-bridge-base.d.ts:74 |
|
|
58
|
+
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | - | - | play-router/dist/router-bridge-base.d.ts:76 |
|
|
59
|
+
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | - | - | play-router/dist/router-bridge-base.d.ts:75 |
|
|
60
|
+
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | \| [`RouteWatcherHandle`](../../play-router/interfaces/RouteWatcherHandle.md) \| `null` | - | [`RouterBridgeBase`](../../play-router/classes/RouterBridgeBase.md).[`routeWatcher`](../../play-router/classes/RouterBridgeBase.md#property-routewatcher) | play-router/dist/router-bridge-base.d.ts:82 |
|
|
61
61
|
|
|
62
62
|
## Methods
|
|
63
63
|
|
|
@@ -67,7 +67,7 @@ Create a TanStack Solid Router bridge
|
|
|
67
67
|
connect(): void;
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
70
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:99
|
|
71
71
|
|
|
72
72
|
Connect the router bridge to the Actor.
|
|
73
73
|
|
|
@@ -90,7 +90,7 @@ starts watching router changes (framework-specific).
|
|
|
90
90
|
disconnect(): void;
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
93
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:105
|
|
94
94
|
|
|
95
95
|
Disconnect the router bridge from the Actor.
|
|
96
96
|
|
|
@@ -112,7 +112,7 @@ Stops signal watching and unregisters framework-specific router listener.
|
|
|
112
112
|
dispose(): void;
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
115
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:120](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L120)
|
|
116
116
|
|
|
117
117
|
Dispose the bridge (alias for disconnect).
|
|
118
118
|
|
|
@@ -128,7 +128,7 @@ Dispose the bridge (alias for disconnect).
|
|
|
128
128
|
protected extractParams(pathname, stateId): Record<string, string>;
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
131
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:132
|
|
132
132
|
|
|
133
133
|
Extract path parameters from URL using the URLPattern API.
|
|
134
134
|
|
|
@@ -139,10 +139,10 @@ works, params will be empty).
|
|
|
139
139
|
|
|
140
140
|
#### Parameters
|
|
141
141
|
|
|
142
|
-
| Parameter | Type | Description
|
|
143
|
-
| ---------- | -------- |
|
|
144
|
-
| `pathname` | `string` | The actual URL path (e.g., '/profile/john')
|
|
145
|
-
| `stateId` | `string` | The matched state ID for looking up route pattern |
|
|
142
|
+
| Parameter | Type | Description |
|
|
143
|
+
| ---------- | -------- | ----------------------------------------------------- |
|
|
144
|
+
| `pathname` | `string` | The actual URL path (e.g., '/profile/john') |
|
|
145
|
+
| `stateId` | `string` | The matched state ID for looking up the route pattern |
|
|
146
146
|
|
|
147
147
|
#### Returns
|
|
148
148
|
|
|
@@ -162,7 +162,7 @@ Extracted path parameters, or empty object if URLPattern is unavailable or no ma
|
|
|
162
162
|
protected extractQuery(search): Record<string, string>;
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
165
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:139
|
|
166
166
|
|
|
167
167
|
Extract query parameters from URL search string.
|
|
168
168
|
|
|
@@ -190,7 +190,7 @@ Extracted query parameters or empty object
|
|
|
190
190
|
protected getInitialRouterPath(): string | null;
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:80](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
193
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:80](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L80)
|
|
194
194
|
|
|
195
195
|
Get the router's current path at connect() time for initial sync.
|
|
196
196
|
|
|
@@ -214,7 +214,7 @@ when the user cold-loads on a deep-link URL.
|
|
|
214
214
|
protected navigateRouter(path): void;
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
217
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L69)
|
|
218
218
|
|
|
219
219
|
Navigate TanStack Solid Router to the given path.
|
|
220
220
|
|
|
@@ -240,7 +240,7 @@ Navigate TanStack Solid Router to the given path.
|
|
|
240
240
|
protected syncActorFromRouter(pathname, search?): void;
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
243
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:119
|
|
244
244
|
|
|
245
245
|
Sync actor state when router location changes.
|
|
246
246
|
|
|
@@ -270,7 +270,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
270
270
|
protected syncRouterFromActor(route): void;
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
-
Defined in: play-router/dist/router-bridge-base.d.ts:
|
|
273
|
+
Defined in: play-router/dist/router-bridge-base.d.ts:112
|
|
274
274
|
|
|
275
275
|
Sync router location when actor route signal changes.
|
|
276
276
|
|
|
@@ -299,7 +299,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
299
299
|
protected unwatchRouterChanges(): void;
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
302
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L112)
|
|
303
303
|
|
|
304
304
|
Stop watching TanStack Router changes.
|
|
305
305
|
|
|
@@ -319,7 +319,7 @@ Stop watching TanStack Router changes.
|
|
|
319
319
|
protected watchRouterChanges(): void;
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
322
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L98)
|
|
323
323
|
|
|
324
324
|
Subscribe to ALL navigation events via router.history.
|
|
325
325
|
|
|
@@ -3,16 +3,22 @@
|
|
|
3
3
|
# Function: PlayRouterProvider()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function PlayRouterProvider(props): any;
|
|
6
|
+
function PlayRouterProvider<TActor>(props): any;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
9
|
+
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L19)
|
|
10
|
+
|
|
11
|
+
## Type Parameters
|
|
12
|
+
|
|
13
|
+
| Type Parameter |
|
|
14
|
+
| ---------------------------------------------------------------------- |
|
|
15
|
+
| `TActor` _extends_ [`RoutableActor`](../type-aliases/RoutableActor.md) |
|
|
10
16
|
|
|
11
17
|
## Parameters
|
|
12
18
|
|
|
13
|
-
| Parameter | Type
|
|
14
|
-
| --------- |
|
|
15
|
-
| `props` | [`PlayRouterProviderProps`](../interfaces/PlayRouterProviderProps.md) |
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| --------- | --------------------------------------------------------------------------------- |
|
|
21
|
+
| `props` | [`PlayRouterProviderProps`](../interfaces/PlayRouterProviderProps.md)\<`TActor`\> |
|
|
16
22
|
|
|
17
23
|
## Returns
|
|
18
24
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(machine): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-tanstack-solid-router/src/create-route-map.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-tanstack-solid-router/src/create-route-map.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/create-route-map.ts#L27)
|
|
10
10
|
|
|
11
11
|
Create a RouteMap from an XState machine
|
|
12
12
|
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
[Documentation](../../../README.md) / [@xmachines/play-tanstack-solid-router](../README.md) / PlayRouterProviderProps
|
|
2
2
|
|
|
3
|
-
# Interface: PlayRouterProviderProps
|
|
3
|
+
# Interface: PlayRouterProviderProps\<TActor\>
|
|
4
4
|
|
|
5
|
-
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
5
|
+
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:11](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L11)
|
|
6
|
+
|
|
7
|
+
## Type Parameters
|
|
8
|
+
|
|
9
|
+
| Type Parameter | Default type |
|
|
10
|
+
| ---------------------------------------------------------------------- | --------------------------------------------------- |
|
|
11
|
+
| `TActor` _extends_ [`RoutableActor`](../type-aliases/RoutableActor.md) | [`RoutableActor`](../type-aliases/RoutableActor.md) |
|
|
6
12
|
|
|
7
13
|
## Properties
|
|
8
14
|
|
|
9
|
-
| Property | Type | Defined in |
|
|
10
|
-
| ----------------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
-
| <a id="property-actor"></a> `actor` |
|
|
12
|
-
| <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `any` | [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
13
|
-
| <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
14
|
-
| <a id="property-router"></a> `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md) | [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
15
|
+
| Property | Type | Description | Defined in |
|
|
16
|
+
| ----------------------------------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
+
| <a id="property-actor"></a> `actor` | `TActor` | - | [play-tanstack-solid-router/src/play-router-provider.tsx:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L12) |
|
|
18
|
+
| <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `any` | Renderer callback receives the same concrete actor type that was passed in. | [play-tanstack-solid-router/src/play-router-provider.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L16) |
|
|
19
|
+
| <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | - | [play-tanstack-solid-router/src/play-router-provider.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L14) |
|
|
20
|
+
| <a id="property-router"></a> `router` | [`TanStackRouterLike`](../type-aliases/TanStackRouterLike.md) | - | [play-tanstack-solid-router/src/play-router-provider.tsx:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L13) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMapping
|
|
4
4
|
|
|
5
|
-
Defined in: [play-tanstack-solid-router/src/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-tanstack-solid-router/src/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/types.ts#L19)
|
|
6
6
|
|
|
7
7
|
A single state ID ↔ path mapping entry for the TanStack Solid Router adapter.
|
|
8
8
|
|
|
@@ -19,5 +19,5 @@ const mapping: RouteMapping = { stateId: "#profile", path: "/profile/:userId" };
|
|
|
19
19
|
|
|
20
20
|
| Property | Modifier | Type | Description | Defined in |
|
|
21
21
|
| --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| <a id="property-path"></a> `path` | `readonly` | `string` | TanStack Router path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [play-tanstack-solid-router/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID (e.g., `"#home"`, `"#profile"`) | [play-tanstack-solid-router/src/types.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
+
| <a id="property-path"></a> `path` | `readonly` | `string` | TanStack Router path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [play-tanstack-solid-router/src/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/types.ts#L23) |
|
|
23
|
+
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID (e.g., `"#home"`, `"#profile"`) | [play-tanstack-solid-router/src/types.ts:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/types.ts#L21) |
|
|
@@ -6,4 +6,6 @@
|
|
|
6
6
|
type RoutableActor = AbstractActor<AnyActorLogic> & Routable & Viewable;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
9
|
+
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L8)
|
|
10
|
+
|
|
11
|
+
Minimum actor shape accepted by PlayRouterProvider.
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type TanStackRouterInstance = ConstructorParameters<typeof SolidRouterBridge>[0];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:
|
|
9
|
+
Defined in: [play-tanstack-solid-router/src/play-router-provider.tsx:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/play-router-provider.tsx#L9)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type TanStackRouterLike = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L28)
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:28](https://g
|
|
|
16
16
|
history: object;
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L31)
|
|
20
20
|
|
|
21
21
|
#### subscribe()
|
|
22
22
|
|
|
@@ -42,7 +42,7 @@ subscribe(handler): () => void;
|
|
|
42
42
|
optional state?: object;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
45
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:30](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L30)
|
|
46
46
|
|
|
47
47
|
#### location?
|
|
48
48
|
|
|
@@ -64,7 +64,7 @@ optional pathname?: string;
|
|
|
64
64
|
navigate(args): void;
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
67
|
+
Defined in: [play-tanstack-solid-router/src/solid-router-bridge.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.17/packages/play-tanstack-solid-router/src/solid-router-bridge.ts#L29)
|
|
68
68
|
|
|
69
69
|
#### Parameters
|
|
70
70
|
|