@xmachines/docs 1.0.0-beta.17 → 1.0.0-beta.18
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 +1 -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/useBoundProp.md +43 -0
- package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
- package/api/@xmachines/play-react/functions/useStateBinding.md +1 -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 +6 -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 +6 -6
- package/api/@xmachines/play-react-router/classes/RouteMap.md +1 -1
- 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/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
- package/api/@xmachines/play-router/classes/BaseRouteMap.md +4 -4
- package/api/@xmachines/play-router/classes/RouterBridgeBase.md +21 -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/crawlMachine.md +1 -1
- package/api/@xmachines/play-router/functions/createBrowserHistory.md +1 -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/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 +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/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 +3 -3
- 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/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/functions/useActor.md +1 -1
- package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +6 -6
- package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
- package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
- package/api/@xmachines/play-solid-router/README.md +54 -30
- package/api/@xmachines/play-solid-router/classes/RouteMap.md +1 -1
- package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +7 -7
- 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/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-solid-router/interfaces/RouteMapping.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 +1 -1
- package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +6 -6
- package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
- 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 +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/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 +1 -1
- package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +7 -7
- 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/PlayRouterProviderProps.md +5 -5
- package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.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 +3 -0
- package/api/@xmachines/play-vue/functions/defineRegistry.md +5 -5
- 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 +16 -0
- package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +15 -0
- package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +21 -0
- 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/README.md +53 -29
- package/api/@xmachines/play-vue-router/classes/RouteMap.md +5 -5
- package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +5 -5
- package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +7 -7
- 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 +1 -1
- package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
- package/api/@xmachines/play-xstate/classes/PlayerActor.md +11 -11
- 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/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/functions/stateMatches.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/README.md +1 -1
- package/api/llms.txt +1 -1
- package/guides/README.md +2 -1
- package/guides/installation.md +1 -6
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRendererProps\<TLogic\>
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/play-react/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [packages/play-react/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L31)
|
|
6
6
|
|
|
7
7
|
Props for PlayRenderer component
|
|
8
8
|
|
|
@@ -16,8 +16,8 @@ Props for PlayRenderer component
|
|
|
16
16
|
|
|
17
17
|
| Property | Type | Description | Defined in |
|
|
18
18
|
| ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| <a id="property-actions"></a> `actions?` | `object` | Maps json-render action names to XState event type strings. Values are constrained to `EventFromLogic<TLogic>["type"]` — passing a non-existent event type string is a compile error when TLogic is specified. | [packages/play-react/src/types.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-react/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
21
|
-
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Optional component shown when currentView is null | [packages/play-react/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
22
|
-
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | ComponentRegistry from defineRegistry() in @json-render/react | [packages/play-react/src/types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
23
|
-
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and the store is the single source of truth for UI state. When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [packages/play-react/src/types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
+
| <a id="property-actions"></a> `actions?` | `object` | Maps json-render action names to XState event type strings. Values are constrained to `EventFromLogic<TLogic>["type"]` — passing a non-existent event type string is a compile error when TLogic is specified. | [packages/play-react/src/types.ts:56](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L56) |
|
|
20
|
+
| <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<`TLogic`, [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability) | [packages/play-react/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L33) |
|
|
21
|
+
| <a id="property-fallback"></a> `fallback?` | `ReactNode` | Optional component shown when currentView is null | [packages/play-react/src/types.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L49) |
|
|
22
|
+
| <a id="property-registry"></a> `registry` | `ComponentRegistry` | ComponentRegistry from defineRegistry() in @json-render/react | [packages/play-react/src/types.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L36) |
|
|
23
|
+
| <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (e.g. from @json-render/xstate). When provided, PlayRenderer operates in controlled mode — spec.state is ignored and the store is the single source of truth for UI state. When omitted, a fresh @xstate/store atom is created internally per view transition, seeded from spec.state. | [packages/play-react/src/types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/types.ts#L46) |
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
type PlayActor = AbstractActor<AnyActorLogic>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-react/src/useActor.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/useActor.ts#L26)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const PlayRenderer: React.FC<PlayRendererProps>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/play-react/src/PlayRenderer.tsx:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [packages/play-react/src/PlayRenderer.tsx:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react/src/PlayRenderer.tsx#L65)
|
|
10
10
|
|
|
11
11
|
Main renderer component that subscribes to actor signals and renders UI
|
|
12
12
|
via @json-render/react Renderer.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: ReactRouterBridge
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L28)
|
|
6
6
|
|
|
7
7
|
Abstract base class for all `@xmachines` router adapter bridges.
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ new ReactRouterBridge(
|
|
|
25
25
|
routeMap): ReactRouterBridge;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
28
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L31)
|
|
29
29
|
|
|
30
30
|
#### Parameters
|
|
31
31
|
|
|
@@ -172,7 +172,7 @@ Extracted query parameters or empty object
|
|
|
172
172
|
protected getInitialRouterPath(): string | null;
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
175
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L49)
|
|
176
176
|
|
|
177
177
|
Return the router's current pathname so connect() can sync the actor to
|
|
178
178
|
the URL on initial load. router.subscribe() only fires on future navigations
|
|
@@ -195,7 +195,7 @@ the page on /about would leave the actor in its default "home" state.
|
|
|
195
195
|
protected navigateRouter(path): void;
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
198
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L39)
|
|
199
199
|
|
|
200
200
|
Navigate the framework router to the given path.
|
|
201
201
|
|
|
@@ -283,7 +283,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
283
283
|
protected unwatchRouterChanges(): void;
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
286
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L59)
|
|
287
287
|
|
|
288
288
|
Stop watching for router location changes.
|
|
289
289
|
|
|
@@ -305,7 +305,7 @@ Called by disconnect(). Should clean up the framework-specific subscription.
|
|
|
305
305
|
protected watchRouterChanges(): void;
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
-
Defined in: [play-react-router/src/react-router-bridge.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
308
|
+
Defined in: [play-react-router/src/react-router-bridge.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/react-router-bridge.ts#L53)
|
|
309
309
|
|
|
310
310
|
Start watching for router location changes.
|
|
311
311
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-react-router/src/route-map.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/route-map.ts#L54)
|
|
6
6
|
|
|
7
7
|
Bidirectional route mapper for React Router.
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function PlayRouterProvider<TActor>(__namedParameters): Element;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-react-router/src/play-router-provider.tsx:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-react-router/src/play-router-provider.tsx:21](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L21)
|
|
10
10
|
|
|
11
11
|
## Type Parameters
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMapFromTree(routeTree): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [play-react-router/src/route-map.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [play-react-router/src/route-map.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/route-map.ts#L73)
|
|
10
10
|
|
|
11
11
|
Create RouteMap from RouteTree
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: PlayRouterProviderProps\<TActor\>
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/play-router-provider.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-react-router/src/play-router-provider.tsx:10](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L10)
|
|
6
6
|
|
|
7
7
|
## Type Parameters
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ Defined in: [play-react-router/src/play-router-provider.tsx:10](https://gitlab.c
|
|
|
14
14
|
|
|
15
15
|
| Property | Type | Description | Defined in |
|
|
16
16
|
| ----------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
17
|
-
| <a id="property-actor"></a> `actor` | `TActor` | - | [play-react-router/src/play-router-provider.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
18
|
-
| <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | Renderer callback receives the same concrete actor type that was passed in. | [play-react-router/src/play-router-provider.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
19
|
-
| <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | - | [play-react-router/src/play-router-provider.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
20
|
-
| <a id="property-router"></a> `router` | `Router` | - | [play-react-router/src/play-router-provider.tsx:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
17
|
+
| <a id="property-actor"></a> `actor` | `TActor` | - | [play-react-router/src/play-router-provider.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L14) |
|
|
18
|
+
| <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `ReactNode` | Renderer callback receives the same concrete actor type that was passed in. | [play-react-router/src/play-router-provider.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L18) |
|
|
19
|
+
| <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | - | [play-react-router/src/play-router-provider.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L16) |
|
|
20
|
+
| <a id="property-router"></a> `router` | `Router` | - | [play-react-router/src/play-router-provider.tsx:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/play-router-provider.tsx#L15) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: RouteMapping
|
|
4
4
|
|
|
5
|
-
Defined in: [play-react-router/src/route-map.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [play-react-router/src/route-map.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/route-map.ts#L22)
|
|
6
6
|
|
|
7
7
|
Mapping between state machine state ID and router path.
|
|
8
8
|
|
|
@@ -13,5 +13,5 @@ Fields are `readonly` — entries are immutable once passed to `RouteMap`.
|
|
|
13
13
|
|
|
14
14
|
| Property | Modifier | Type | Description | Defined in |
|
|
15
15
|
| --------------------------------------- | ---------- | -------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
-
| <a id="property-path"></a> `path` | `readonly` | `string` | Router path with optional parameters (e.g., `"/settings/:section?"`) | [play-react-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
17
|
-
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State ID from state machine (e.g., `"home"`, `"settings.profile"`) | [play-react-router/src/route-map.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
16
|
+
| <a id="property-path"></a> `path` | `readonly` | `string` | Router path with optional parameters (e.g., `"/settings/:section?"`) | [play-react-router/src/route-map.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/route-map.ts#L26) |
|
|
17
|
+
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State ID from state machine (e.g., `"home"`, `"settings.profile"`) | [play-react-router/src/route-map.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-react-router/src/route-map.ts#L24) |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: BaseRouteMap
|
|
4
4
|
|
|
5
|
-
Defined in: [base-route-map.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [base-route-map.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L106)
|
|
6
6
|
|
|
7
7
|
Shared bidirectional route map base class.
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@ map.getPathByStateId("missing"); // null
|
|
|
57
57
|
new BaseRouteMap(mappings): BaseRouteMap;
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Defined in: [base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
60
|
+
Defined in: [base-route-map.ts:125](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L125)
|
|
61
61
|
|
|
62
62
|
Build a route map from an array of state ID ↔ path mappings.
|
|
63
63
|
|
|
@@ -83,7 +83,7 @@ buckets for efficient candidate selection.
|
|
|
83
83
|
getPathByStateId(stateId): string | null;
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
Defined in: [base-route-map.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
86
|
+
Defined in: [base-route-map.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L210)
|
|
87
87
|
|
|
88
88
|
Look up the path pattern registered for a state ID.
|
|
89
89
|
|
|
@@ -114,7 +114,7 @@ map.getPathByStateId("missing"); // null
|
|
|
114
114
|
getStateIdByPath(path): string | null;
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
Defined in: [base-route-map.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
117
|
+
Defined in: [base-route-map.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L175)
|
|
118
118
|
|
|
119
119
|
Resolve a URL path to its mapped state ID.
|
|
120
120
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Abstract Class: RouterBridgeBase
|
|
4
4
|
|
|
5
|
-
Defined in: [router-bridge-base.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [router-bridge-base.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L82)
|
|
6
6
|
|
|
7
7
|
Abstract base class for all `@xmachines` router adapter bridges.
|
|
8
8
|
|
|
@@ -30,7 +30,7 @@ between frameworks.
|
|
|
30
30
|
new RouterBridgeBase(actor, routeMap): RouterBridgeBase;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [router-bridge-base.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
33
|
+
Defined in: [router-bridge-base.ts:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L96)
|
|
34
34
|
|
|
35
35
|
#### Parameters
|
|
36
36
|
|
|
@@ -49,15 +49,15 @@ Defined in: [router-bridge-base.ts:96](https://gitlab.com/xmachin-es/xmachines-j
|
|
|
49
49
|
|
|
50
50
|
| Property | Modifier | Type | Default value | Description | Defined in |
|
|
51
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) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [router-bridge-base.ts:97](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
53
|
-
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
54
|
-
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
55
|
-
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
56
|
-
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [router-bridge-base.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
57
|
-
| <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. | [router-bridge-base.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
58
|
-
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
59
|
-
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
60
|
-
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | [`RouteWatcherHandle`](../interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [router-bridge-base.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
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) | `undefined` | A `Routable` actor exposing `currentRoute` and `send`. | [router-bridge-base.ts:97](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L97) |
|
|
53
|
+
| <a id="property-hasconnectedonce"></a> `hasConnectedOnce` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:85](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L85) |
|
|
54
|
+
| <a id="property-isconnected"></a> `isConnected` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:84](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L84) |
|
|
55
|
+
| <a id="property-isprocessingnavigation"></a> `isProcessingNavigation` | `protected` | `boolean` | `false` | - | [router-bridge-base.ts:87](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L87) |
|
|
56
|
+
| <a id="property-lastsyncedpath"></a> `lastSyncedPath` | `protected` | `string` \| `null` | `null` | - | [router-bridge-base.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L86) |
|
|
57
|
+
| <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. | [router-bridge-base.ts:98](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L98) |
|
|
58
|
+
| `routeMap.getPathByStateId` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L100) |
|
|
59
|
+
| `routeMap.getStateIdByPath` | `public` | `string` \| `null` \| `undefined` | `undefined` | - | [router-bridge-base.ts:99](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L99) |
|
|
60
|
+
| <a id="property-routewatcher"></a> `routeWatcher` | `protected` | [`RouteWatcherHandle`](../interfaces/RouteWatcherHandle.md) \| `null` | `null` | - | [router-bridge-base.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L88) |
|
|
61
61
|
|
|
62
62
|
## Methods
|
|
63
63
|
|
|
@@ -67,7 +67,7 @@ Defined in: [router-bridge-base.ts:96](https://gitlab.com/xmachin-es/xmachines-j
|
|
|
67
67
|
connect(): void;
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Defined in: [router-bridge-base.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
70
|
+
Defined in: [router-bridge-base.ts:116](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L116)
|
|
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: [router-bridge-base.ts:184](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
93
|
+
Defined in: [router-bridge-base.ts:184](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L184)
|
|
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
|
protected extractParams(pathname, stateId): Record<string, string>;
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Defined in: [router-bridge-base.ts:283](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
115
|
+
Defined in: [router-bridge-base.ts:283](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L283)
|
|
116
116
|
|
|
117
117
|
Extract path parameters from URL using the URLPattern API.
|
|
118
118
|
|
|
@@ -142,7 +142,7 @@ Extracted path parameters, or empty object if URLPattern is unavailable or no ma
|
|
|
142
142
|
protected extractQuery(search): Record<string, string>;
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
Defined in: [router-bridge-base.ts:310](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
145
|
+
Defined in: [router-bridge-base.ts:310](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L310)
|
|
146
146
|
|
|
147
147
|
Extract query parameters from URL search string.
|
|
148
148
|
|
|
@@ -166,7 +166,7 @@ Extracted query parameters or empty object
|
|
|
166
166
|
protected getInitialRouterPath(): string | null | undefined;
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
Defined in: [router-bridge-base.ts:357](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
169
|
+
Defined in: [router-bridge-base.ts:357](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L357)
|
|
170
170
|
|
|
171
171
|
Return the router's current pathname at connect() time.
|
|
172
172
|
|
|
@@ -198,7 +198,7 @@ bridges that have not yet implemented this hook.
|
|
|
198
198
|
abstract protected navigateRouter(path): void;
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Defined in: [router-bridge-base.ts:322](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
201
|
+
Defined in: [router-bridge-base.ts:322](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L322)
|
|
202
202
|
|
|
203
203
|
Navigate the framework router to the given path.
|
|
204
204
|
|
|
@@ -223,7 +223,7 @@ Must trigger the framework router's navigation (e.g., router.navigate(path)).
|
|
|
223
223
|
protected syncActorFromRouter(pathname, search?): void;
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
-
Defined in: [router-bridge-base.ts:231](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
226
|
+
Defined in: [router-bridge-base.ts:231](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L231)
|
|
227
227
|
|
|
228
228
|
Sync actor state when router location changes.
|
|
229
229
|
|
|
@@ -249,7 +249,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
249
249
|
protected syncRouterFromActor(route): void;
|
|
250
250
|
```
|
|
251
251
|
|
|
252
|
-
Defined in: [router-bridge-base.ts:211](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
252
|
+
Defined in: [router-bridge-base.ts:211](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L211)
|
|
253
253
|
|
|
254
254
|
Sync router location when actor route signal changes.
|
|
255
255
|
|
|
@@ -274,7 +274,7 @@ Prevents circular updates via isProcessingNavigation flag.
|
|
|
274
274
|
abstract protected unwatchRouterChanges(): void;
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
Defined in: [router-bridge-base.ts:337](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
277
|
+
Defined in: [router-bridge-base.ts:337](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L337)
|
|
278
278
|
|
|
279
279
|
Stop watching for router location changes.
|
|
280
280
|
|
|
@@ -292,7 +292,7 @@ Called by disconnect(). Should clean up the framework-specific subscription.
|
|
|
292
292
|
abstract protected watchRouterChanges(): void;
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
Defined in: [router-bridge-base.ts:330](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
295
|
+
Defined in: [router-bridge-base.ts:330](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/router-bridge-base.ts#L330)
|
|
296
296
|
|
|
297
297
|
Start watching for router location changes.
|
|
298
298
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function buildRouteTree(routes): RouteTree;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [build-tree.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [build-tree.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/build-tree.ts#L13)
|
|
10
10
|
|
|
11
11
|
Build hierarchical route tree from flat route list
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function connectRouter(options): () => void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [connect-router.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [connect-router.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/connect-router.ts#L59)
|
|
10
10
|
|
|
11
11
|
Connect vanilla router to actor (pure browser integration).
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function crawlMachine(machine): StateVisit[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [crawl-machine.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [crawl-machine.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/crawl-machine.ts#L74)
|
|
10
10
|
|
|
11
11
|
Crawl state machine graph using breadth-first traversal
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createBrowserHistory(options): BrowserHistory;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [create-browser-history.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [create-browser-history.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-browser-history.ts#L115)
|
|
10
10
|
|
|
11
11
|
Create browser history that wraps window.history
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouteMap(routeTree): RouteMap;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [create-route-map.ts:121](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [create-route-map.ts:121](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-route-map.ts#L121)
|
|
10
10
|
|
|
11
11
|
Create a RouteMap from a RouteTree for efficient path lookups.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function createRouter(options): VanillaRouter;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [create-router.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [create-router.ts:73](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/create-router.ts#L73)
|
|
10
10
|
|
|
11
11
|
Create vanilla router for framework-agnostic routing.
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function detectDuplicateRoutes(routes): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [validate-routes.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [validate-routes.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/validate-routes.ts#L51)
|
|
10
10
|
|
|
11
11
|
Detect duplicate route paths
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function extractMachineRoutes(machine): RouteTree;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [extract-routes.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [extract-routes.ts:45](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/extract-routes.ts#L45)
|
|
10
10
|
|
|
11
11
|
Extract complete route tree from state machine graph
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function extractRoute(node, path, stateMap): RouteInfo | null;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [extract-route.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [extract-route.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/extract-route.ts#L26)
|
|
10
10
|
|
|
11
11
|
Extract route information from state node with validation
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function findRouteById(tree, id): RouteNode | undefined;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [index.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [index.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/index.ts#L70)
|
|
10
10
|
|
|
11
11
|
Find route node by state ID
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function findRouteByPath(tree, path): RouteNode | undefined;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [index.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [index.ts:162](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/index.ts#L162)
|
|
10
10
|
|
|
11
11
|
Find route node by URL path
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getNavigableRoutes(tree, stateId): RouteNode[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [query.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L20)
|
|
10
10
|
|
|
11
11
|
Get all routes navigable from given state
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function getRoutableRoutes(tree): RouteNode[];
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [query.ts:50](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L50)
|
|
10
10
|
|
|
11
11
|
Get all routable routes from tree as flat array
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function routeExists(tree, path): boolean;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [query.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [query.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/query.ts#L72)
|
|
10
10
|
|
|
11
11
|
Validate route path exists in tree
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function validateRouteFormat(routePath, stateId): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [validate-routes.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [validate-routes.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/validate-routes.ts#L14)
|
|
10
10
|
|
|
11
11
|
Validate route path format
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function validateStateExists(stateId, stateMap): void;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [validate-routes.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
9
|
+
Defined in: [validate-routes.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/validate-routes.ts#L32)
|
|
10
10
|
|
|
11
11
|
Validate state exists in state map
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: BaseRouteMapping
|
|
4
4
|
|
|
5
|
-
Defined in: [base-route-map.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
5
|
+
Defined in: [base-route-map.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L64)
|
|
6
6
|
|
|
7
7
|
A single state ID ↔ path mapping entry.
|
|
8
8
|
|
|
@@ -23,5 +23,5 @@ const optionalMapping: BaseRouteMapping = { stateId: "settings", path: "/setting
|
|
|
23
23
|
|
|
24
24
|
| Property | Modifier | Type | Description | Defined in |
|
|
25
25
|
| --------------------------------------- | ---------- | -------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
-
| <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [base-route-map.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
27
|
-
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.
|
|
26
|
+
| <a id="property-path"></a> `path` | `readonly` | `string` | URL path pattern (e.g., `"/"`, `"/profile/:userId"`, `"/settings/:section?"`) | [base-route-map.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L68) |
|
|
27
|
+
| <a id="property-stateid"></a> `stateId` | `readonly` | `string` | State machine state ID (e.g., `"home"`, `"#profile"`) | [base-route-map.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.18/packages/play-router/src/base-route-map.ts#L66) |
|