@xmachines/docs 1.0.0-beta.10

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.
Files changed (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/api/@xmachines/play/README.md +130 -0
  4. package/api/@xmachines/play/type-aliases/PlayEvent.md +81 -0
  5. package/api/@xmachines/play-actor/README.md +247 -0
  6. package/api/@xmachines/play-actor/classes/AbstractActor.md +520 -0
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +29 -0
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +17 -0
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +12 -0
  10. package/api/@xmachines/play-catalog/README.md +331 -0
  11. package/api/@xmachines/play-catalog/functions/defineCatalog.md +98 -0
  12. package/api/@xmachines/play-catalog/functions/defineComponents.md +134 -0
  13. package/api/@xmachines/play-catalog/type-aliases/Catalog.md +48 -0
  14. package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +20 -0
  15. package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +65 -0
  16. package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +17 -0
  17. package/api/@xmachines/play-react/README.md +423 -0
  18. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +613 -0
  19. package/api/@xmachines/play-react/functions/useSignalEffect.md +68 -0
  20. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +15 -0
  21. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +14 -0
  22. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +15 -0
  23. package/api/@xmachines/play-react/variables/PlayRenderer.md +64 -0
  24. package/api/@xmachines/play-react-router/README.md +198 -0
  25. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +321 -0
  26. package/api/@xmachines/play-react-router/classes/RouteMap.md +137 -0
  27. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +19 -0
  28. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +35 -0
  29. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +119 -0
  30. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +14 -0
  31. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +17 -0
  32. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +104 -0
  33. package/api/@xmachines/play-react-router-demo/README.md +137 -0
  34. package/api/@xmachines/play-router/README.md +502 -0
  35. package/api/@xmachines/play-router/classes/BaseRouteMap.md +142 -0
  36. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +300 -0
  37. package/api/@xmachines/play-router/functions/buildRouteTree.md +27 -0
  38. package/api/@xmachines/play-router/functions/connectRouter.md +67 -0
  39. package/api/@xmachines/play-router/functions/crawlMachine.md +92 -0
  40. package/api/@xmachines/play-router/functions/createBrowserHistory.md +47 -0
  41. package/api/@xmachines/play-router/functions/createRouteMap.md +53 -0
  42. package/api/@xmachines/play-router/functions/createRouter.md +76 -0
  43. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +32 -0
  44. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +64 -0
  45. package/api/@xmachines/play-router/functions/extractRoute.md +45 -0
  46. package/api/@xmachines/play-router/functions/findRouteById.md +37 -0
  47. package/api/@xmachines/play-router/functions/findRouteByPath.md +39 -0
  48. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +35 -0
  49. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +39 -0
  50. package/api/@xmachines/play-router/functions/routeExists.md +26 -0
  51. package/api/@xmachines/play-router/functions/validateRouteFormat.md +29 -0
  52. package/api/@xmachines/play-router/functions/validateStateExists.md +29 -0
  53. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +27 -0
  54. package/api/@xmachines/play-router/interfaces/BrowserHistory.md +172 -0
  55. package/api/@xmachines/play-router/interfaces/BrowserWindow.md +69 -0
  56. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +13 -0
  57. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +119 -0
  58. package/api/@xmachines/play-router/interfaces/RouteInfo.md +19 -0
  59. package/api/@xmachines/play-router/interfaces/RouteMap.md +56 -0
  60. package/api/@xmachines/play-router/interfaces/RouteNode.md +21 -0
  61. package/api/@xmachines/play-router/interfaces/RouteObject.md +21 -0
  62. package/api/@xmachines/play-router/interfaces/RouteTree.md +20 -0
  63. package/api/@xmachines/play-router/interfaces/RouterBridge.md +104 -0
  64. package/api/@xmachines/play-router/interfaces/StateVisit.md +15 -0
  65. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +28 -0
  66. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +11 -0
  67. package/api/@xmachines/play-router-demo/README.md +137 -0
  68. package/api/@xmachines/play-signals/README.md +176 -0
  69. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +34 -0
  70. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +49 -0
  71. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +35 -0
  72. package/api/@xmachines/play-signals/interfaces/SignalState.md +68 -0
  73. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +97 -0
  74. package/api/@xmachines/play-signals/namespaces/Signal/README.md +22 -0
  75. package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +52 -0
  76. package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +72 -0
  77. package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +19 -0
  78. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/README.md +21 -0
  79. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +85 -0
  80. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +13 -0
  81. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +19 -0
  82. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +19 -0
  83. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +19 -0
  84. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +19 -0
  85. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +25 -0
  86. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +9 -0
  87. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +9 -0
  88. package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +19 -0
  89. package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +19 -0
  90. package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +19 -0
  91. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +32 -0
  92. package/api/@xmachines/play-solid/README.md +311 -0
  93. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +15 -0
  94. package/api/@xmachines/play-solid/variables/PlayRenderer.md +70 -0
  95. package/api/@xmachines/play-solid-router/README.md +666 -0
  96. package/api/@xmachines/play-solid-router/classes/RouteMap.md +150 -0
  97. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +347 -0
  98. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +19 -0
  99. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +32 -0
  100. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +486 -0
  101. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +119 -0
  102. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
  103. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +14 -0
  104. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +104 -0
  105. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +9 -0
  106. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +51 -0
  107. package/api/@xmachines/play-solid-router-demo/README.md +127 -0
  108. package/api/@xmachines/play-tanstack-react-router/README.md +226 -0
  109. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +137 -0
  110. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +348 -0
  111. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +19 -0
  112. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +53 -0
  113. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +35 -0
  114. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +38 -0
  115. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +33 -0
  116. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +119 -0
  117. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +14 -0
  118. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +17 -0
  119. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +26 -0
  120. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +104 -0
  121. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +9 -0
  122. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +78 -0
  123. package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +64 -0
  124. package/api/@xmachines/play-tanstack-react-router-demo/README.md +126 -0
  125. package/api/@xmachines/play-tanstack-solid-router/README.md +285 -0
  126. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +150 -0
  127. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +343 -0
  128. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +19 -0
  129. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +32 -0
  130. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +119 -0
  131. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
  132. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +23 -0
  133. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +104 -0
  134. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +9 -0
  135. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +9 -0
  136. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +78 -0
  137. package/api/@xmachines/play-tanstack-solid-router-demo/README.md +126 -0
  138. package/api/@xmachines/play-vue/README.md +292 -0
  139. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +14 -0
  140. package/api/@xmachines/play-vue/variables/PlayRenderer.md +9 -0
  141. package/api/@xmachines/play-vue-router/README.md +604 -0
  142. package/api/@xmachines/play-vue-router/classes/RouteMap.md +209 -0
  143. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +201 -0
  144. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +360 -0
  145. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +19 -0
  146. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +119 -0
  147. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +15 -0
  148. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +104 -0
  149. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +9 -0
  150. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +67 -0
  151. package/api/@xmachines/play-vue-router-demo/README.md +133 -0
  152. package/api/@xmachines/play-xstate/README.md +512 -0
  153. package/api/@xmachines/play-xstate/classes/PlayerActor.md +527 -0
  154. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +43 -0
  155. package/api/@xmachines/play-xstate/functions/composeGuards.md +79 -0
  156. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +67 -0
  157. package/api/@xmachines/play-xstate/functions/definePlayer.md +127 -0
  158. package/api/@xmachines/play-xstate/functions/deriveRoute.md +109 -0
  159. package/api/@xmachines/play-xstate/functions/eventMatches.md +40 -0
  160. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +54 -0
  161. package/api/@xmachines/play-xstate/functions/hasContext.md +42 -0
  162. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +41 -0
  163. package/api/@xmachines/play-xstate/functions/mergeViewProps.md +26 -0
  164. package/api/@xmachines/play-xstate/functions/negateGuard.md +61 -0
  165. package/api/@xmachines/play-xstate/functions/stateMatches.md +25 -0
  166. package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +39 -0
  167. package/api/@xmachines/play-xstate/functions/validateViewProps.md +80 -0
  168. package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +16 -0
  169. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +24 -0
  170. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +26 -0
  171. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +22 -0
  172. package/api/@xmachines/play-xstate/type-aliases/Catalog.md +21 -0
  173. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +14 -0
  174. package/api/@xmachines/play-xstate/type-aliases/Guard.md +34 -0
  175. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +20 -0
  176. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +29 -0
  177. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +45 -0
  178. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +51 -0
  179. package/api/@xmachines/play-xstate/type-aliases/ValidationResult.md +17 -0
  180. package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +35 -0
  181. package/api/@xmachines/shared/README.md +379 -0
  182. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +29 -0
  183. package/api/@xmachines/shared/functions/xmAliases.md +24 -0
  184. package/api/README.md +25 -0
  185. package/api/llms.txt +26 -0
  186. package/examples/README.md +63 -0
  187. package/examples/basic-state-machine.md +70 -0
  188. package/examples/form-validation.md +167 -0
  189. package/examples/multi-router-integration.md +277 -0
  190. package/examples/routing-patterns.md +260 -0
  191. package/examples/traffic-light.md +99 -0
  192. package/guides/README.md +29 -0
  193. package/guides/getting-started.md +223 -0
  194. package/guides/installation.md +323 -0
  195. package/index.d.ts +3 -0
  196. package/index.js +4 -0
  197. package/package.json +54 -0
@@ -0,0 +1,209 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-vue-router](../README.md) / RouteMap
2
+
3
+ # Class: RouteMap
4
+
5
+ Defined in: [play-vue-router/src/route-map.ts:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/route-map.ts#L14)
6
+
7
+ VueBaseRouteMap — intermediate base class for Vue Router adapters.
8
+
9
+ Extends `BaseRouteMap` (bucket-indexed O(k) pattern matching + QuickLRU 500-entry
10
+ cache) and adds the Vue-specific adapter layer: `routeName` ↔ `stateId` bidirectional
11
+ lookup and optional URL pattern access.
12
+
13
+ **Why a separate base class?** Vue Router uses named routes (`routeName`) rather than
14
+ URL paths for navigation. `BaseRouteMap` operates on path strings; `VueBaseRouteMap`
15
+ bridges the two by translating `RouteMapping` entries at construction time — only
16
+ mappings with a `pattern` field participate in URL path resolution via `BaseRouteMap`.
17
+
18
+ Exported from `@xmachines/play-vue-router` for consumers who need to extend or test
19
+ the Vue routing layer directly. Most consumers use `RouteMap` instead.
20
+
21
+ ## Example
22
+
23
+ ```typescript
24
+ import { VueBaseRouteMap } from "@xmachines/play-vue-router";
25
+
26
+ class MyVueRouteMap extends VueBaseRouteMap {
27
+ // add custom resolution logic
28
+ }
29
+ ```
30
+
31
+ ## Extends
32
+
33
+ - [`VueBaseRouteMap`](VueBaseRouteMap.md)
34
+
35
+ ## Constructors
36
+
37
+ ### Constructor
38
+
39
+ ```ts
40
+ new RouteMap(mappings): RouteMap;
41
+ ```
42
+
43
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L32)
44
+
45
+ #### Parameters
46
+
47
+ | Parameter | Type |
48
+ | ---------- | ------------------------------------------------- |
49
+ | `mappings` | [`RouteMapping`](../interfaces/RouteMapping.md)[] |
50
+
51
+ #### Returns
52
+
53
+ `RouteMap`
54
+
55
+ #### Inherited from
56
+
57
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`constructor`](VueBaseRouteMap.md#constructor)
58
+
59
+ ## Methods
60
+
61
+ ### getPathByStateId()
62
+
63
+ ```ts
64
+ getPathByStateId(stateId): string | null;
65
+ ```
66
+
67
+ Defined in: play-router/dist/base-route-map.d.ts:111
68
+
69
+ Look up the path pattern registered for a state ID.
70
+
71
+ #### Parameters
72
+
73
+ | Parameter | Type | Description |
74
+ | --------- | -------- | --------------------------------------------------------- |
75
+ | `stateId` | `string` | State machine state ID (e.g., `"profile"`, `"#settings"`) |
76
+
77
+ #### Returns
78
+
79
+ `string` \| `null`
80
+
81
+ The registered path pattern, or `null` if the state ID is unknown
82
+
83
+ #### Example
84
+
85
+ ```typescript
86
+ map.getPathByStateId("profile"); // "/profile/:userId"
87
+ map.getPathByStateId("missing"); // null
88
+ ```
89
+
90
+ #### Inherited from
91
+
92
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`getPathByStateId`](VueBaseRouteMap.md#getpathbystateid)
93
+
94
+ ---
95
+
96
+ ### getPattern()
97
+
98
+ ```ts
99
+ getPattern(stateId): string | undefined;
100
+ ```
101
+
102
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L58)
103
+
104
+ Get the URL path pattern for a given state ID (e.g. `"/profile/:userId"`).
105
+
106
+ #### Parameters
107
+
108
+ | Parameter | Type |
109
+ | --------- | -------- |
110
+ | `stateId` | `string` |
111
+
112
+ #### Returns
113
+
114
+ `string` \| `undefined`
115
+
116
+ #### Inherited from
117
+
118
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`getPattern`](VueBaseRouteMap.md#getpattern)
119
+
120
+ ---
121
+
122
+ ### getRouteName()
123
+
124
+ ```ts
125
+ getRouteName(stateId): string | undefined;
126
+ ```
127
+
128
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L48)
129
+
130
+ Get the Vue Router route name for a given state ID.
131
+
132
+ #### Parameters
133
+
134
+ | Parameter | Type |
135
+ | --------- | -------- |
136
+ | `stateId` | `string` |
137
+
138
+ #### Returns
139
+
140
+ `string` \| `undefined`
141
+
142
+ #### Inherited from
143
+
144
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`getRouteName`](VueBaseRouteMap.md#getroutename)
145
+
146
+ ---
147
+
148
+ ### getStateId()
149
+
150
+ ```ts
151
+ getStateId(routeName): string | undefined;
152
+ ```
153
+
154
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L53)
155
+
156
+ Get the state ID for a given Vue Router route name.
157
+
158
+ #### Parameters
159
+
160
+ | Parameter | Type |
161
+ | ----------- | -------- |
162
+ | `routeName` | `string` |
163
+
164
+ #### Returns
165
+
166
+ `string` \| `undefined`
167
+
168
+ #### Inherited from
169
+
170
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`getStateId`](VueBaseRouteMap.md#getstateid)
171
+
172
+ ---
173
+
174
+ ### getStateIdByPath()
175
+
176
+ ```ts
177
+ getStateIdByPath(path): string | null;
178
+ ```
179
+
180
+ Defined in: play-router/dist/base-route-map.d.ts:98
181
+
182
+ Resolve a URL path to its mapped state ID.
183
+
184
+ Strips query strings and hash fragments before matching. Tries an O(1) exact
185
+ lookup first, then falls back to bucket-indexed pattern matching. Results are
186
+ cached after the first pattern match.
187
+
188
+ #### Parameters
189
+
190
+ | Parameter | Type | Description |
191
+ | --------- | -------- | ------------------------------------------------------------------------------ |
192
+ | `path` | `string` | URL pathname, optionally including query/hash (e.g., `"/profile/123?ref=nav"`) |
193
+
194
+ #### Returns
195
+
196
+ `string` \| `null`
197
+
198
+ The mapped state ID, or `null` if no route matches
199
+
200
+ #### Example
201
+
202
+ ```typescript
203
+ map.getStateIdByPath("/profile/123"); // "profile"
204
+ map.getStateIdByPath("/unknown"); // null
205
+ ```
206
+
207
+ #### Inherited from
208
+
209
+ [`VueBaseRouteMap`](VueBaseRouteMap.md).[`getStateIdByPath`](VueBaseRouteMap.md#getstateidbypath)
@@ -0,0 +1,201 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-vue-router](../README.md) / VueBaseRouteMap
2
+
3
+ # Class: VueBaseRouteMap
4
+
5
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L28)
6
+
7
+ VueBaseRouteMap — intermediate base class for Vue Router adapters.
8
+
9
+ Extends `BaseRouteMap` (bucket-indexed O(k) pattern matching + QuickLRU 500-entry
10
+ cache) and adds the Vue-specific adapter layer: `routeName` ↔ `stateId` bidirectional
11
+ lookup and optional URL pattern access.
12
+
13
+ **Why a separate base class?** Vue Router uses named routes (`routeName`) rather than
14
+ URL paths for navigation. `BaseRouteMap` operates on path strings; `VueBaseRouteMap`
15
+ bridges the two by translating `RouteMapping` entries at construction time — only
16
+ mappings with a `pattern` field participate in URL path resolution via `BaseRouteMap`.
17
+
18
+ Exported from `@xmachines/play-vue-router` for consumers who need to extend or test
19
+ the Vue routing layer directly. Most consumers use `RouteMap` instead.
20
+
21
+ ## Example
22
+
23
+ ```typescript
24
+ import { VueBaseRouteMap } from "@xmachines/play-vue-router";
25
+
26
+ class MyVueRouteMap extends VueBaseRouteMap {
27
+ // add custom resolution logic
28
+ }
29
+ ```
30
+
31
+ ## Extends
32
+
33
+ - [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md)
34
+
35
+ ## Extended by
36
+
37
+ - [`RouteMap`](RouteMap.md)
38
+
39
+ ## Constructors
40
+
41
+ ### Constructor
42
+
43
+ ```ts
44
+ new VueBaseRouteMap(mappings): VueBaseRouteMap;
45
+ ```
46
+
47
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L32)
48
+
49
+ #### Parameters
50
+
51
+ | Parameter | Type |
52
+ | ---------- | ------------------------------------------------- |
53
+ | `mappings` | [`RouteMapping`](../interfaces/RouteMapping.md)[] |
54
+
55
+ #### Returns
56
+
57
+ `VueBaseRouteMap`
58
+
59
+ #### Overrides
60
+
61
+ [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`constructor`](../../play-router/classes/BaseRouteMap.md#constructor)
62
+
63
+ ## Methods
64
+
65
+ ### getPathByStateId()
66
+
67
+ ```ts
68
+ getPathByStateId(stateId): string | null;
69
+ ```
70
+
71
+ Defined in: play-router/dist/base-route-map.d.ts:111
72
+
73
+ Look up the path pattern registered for a state ID.
74
+
75
+ #### Parameters
76
+
77
+ | Parameter | Type | Description |
78
+ | --------- | -------- | --------------------------------------------------------- |
79
+ | `stateId` | `string` | State machine state ID (e.g., `"profile"`, `"#settings"`) |
80
+
81
+ #### Returns
82
+
83
+ `string` \| `null`
84
+
85
+ The registered path pattern, or `null` if the state ID is unknown
86
+
87
+ #### Example
88
+
89
+ ```typescript
90
+ map.getPathByStateId("profile"); // "/profile/:userId"
91
+ map.getPathByStateId("missing"); // null
92
+ ```
93
+
94
+ #### Inherited from
95
+
96
+ [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getPathByStateId`](../../play-router/classes/BaseRouteMap.md#getpathbystateid)
97
+
98
+ ---
99
+
100
+ ### getPattern()
101
+
102
+ ```ts
103
+ getPattern(stateId): string | undefined;
104
+ ```
105
+
106
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L58)
107
+
108
+ Get the URL path pattern for a given state ID (e.g. `"/profile/:userId"`).
109
+
110
+ #### Parameters
111
+
112
+ | Parameter | Type |
113
+ | --------- | -------- |
114
+ | `stateId` | `string` |
115
+
116
+ #### Returns
117
+
118
+ `string` \| `undefined`
119
+
120
+ ---
121
+
122
+ ### getRouteName()
123
+
124
+ ```ts
125
+ getRouteName(stateId): string | undefined;
126
+ ```
127
+
128
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:48](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L48)
129
+
130
+ Get the Vue Router route name for a given state ID.
131
+
132
+ #### Parameters
133
+
134
+ | Parameter | Type |
135
+ | --------- | -------- |
136
+ | `stateId` | `string` |
137
+
138
+ #### Returns
139
+
140
+ `string` \| `undefined`
141
+
142
+ ---
143
+
144
+ ### getStateId()
145
+
146
+ ```ts
147
+ getStateId(routeName): string | undefined;
148
+ ```
149
+
150
+ Defined in: [play-vue-router/src/vue-base-route-map.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-vue-router/src/vue-base-route-map.ts#L53)
151
+
152
+ Get the state ID for a given Vue Router route name.
153
+
154
+ #### Parameters
155
+
156
+ | Parameter | Type |
157
+ | ----------- | -------- |
158
+ | `routeName` | `string` |
159
+
160
+ #### Returns
161
+
162
+ `string` \| `undefined`
163
+
164
+ ---
165
+
166
+ ### getStateIdByPath()
167
+
168
+ ```ts
169
+ getStateIdByPath(path): string | null;
170
+ ```
171
+
172
+ Defined in: play-router/dist/base-route-map.d.ts:98
173
+
174
+ Resolve a URL path to its mapped state ID.
175
+
176
+ Strips query strings and hash fragments before matching. Tries an O(1) exact
177
+ lookup first, then falls back to bucket-indexed pattern matching. Results are
178
+ cached after the first pattern match.
179
+
180
+ #### Parameters
181
+
182
+ | Parameter | Type | Description |
183
+ | --------- | -------- | ------------------------------------------------------------------------------ |
184
+ | `path` | `string` | URL pathname, optionally including query/hash (e.g., `"/profile/123?ref=nav"`) |
185
+
186
+ #### Returns
187
+
188
+ `string` \| `null`
189
+
190
+ The mapped state ID, or `null` if no route matches
191
+
192
+ #### Example
193
+
194
+ ```typescript
195
+ map.getStateIdByPath("/profile/123"); // "profile"
196
+ map.getStateIdByPath("/unknown"); // null
197
+ ```
198
+
199
+ #### Inherited from
200
+
201
+ [`BaseRouteMap`](../../play-router/classes/BaseRouteMap.md).[`getStateIdByPath`](../../play-router/classes/BaseRouteMap.md#getstateidbypath)