@equinor/fusion-framework-plugin-context-navigation 0.1.0 → 0.1.1

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 (218) hide show
  1. package/dist/esm/ContextNavigationConfigurator.js +178 -0
  2. package/dist/esm/ContextNavigationConfigurator.js.map +1 -0
  3. package/dist/esm/__tests__/active-app-navigation-events.test.js +115 -0
  4. package/dist/esm/__tests__/active-app-navigation-events.test.js.map +1 -0
  5. package/dist/esm/__tests__/apply-navigation.test.js +152 -0
  6. package/dist/esm/__tests__/apply-navigation.test.js.map +1 -0
  7. package/dist/esm/__tests__/enable.test.js +91 -0
  8. package/dist/esm/__tests__/enable.test.js.map +1 -0
  9. package/dist/esm/__tests__/guard-handlers.test.js +82 -0
  10. package/dist/esm/__tests__/guard-handlers.test.js.map +1 -0
  11. package/dist/esm/__tests__/plugin.test.js +483 -0
  12. package/dist/esm/__tests__/plugin.test.js.map +1 -0
  13. package/dist/esm/__tests__/reconcile.test.js +164 -0
  14. package/dist/esm/__tests__/reconcile.test.js.map +1 -0
  15. package/dist/esm/adapters/create-path-adapter.js +92 -0
  16. package/dist/esm/adapters/create-path-adapter.js.map +1 -0
  17. package/dist/esm/adapters/create-query-adapter.js +83 -0
  18. package/dist/esm/adapters/create-query-adapter.js.map +1 -0
  19. package/dist/esm/adapters/custom-adapter/create-custom-adapter.js +116 -0
  20. package/dist/esm/adapters/custom-adapter/create-custom-adapter.js.map +1 -0
  21. package/dist/esm/adapters/custom-adapter/index.js +5 -0
  22. package/dist/esm/adapters/custom-adapter/index.js.map +1 -0
  23. package/dist/esm/adapters/custom-adapter/normalize-string-result.js +37 -0
  24. package/dist/esm/adapters/custom-adapter/normalize-string-result.js.map +1 -0
  25. package/dist/esm/adapters/custom-adapter/to-app-relative.js +34 -0
  26. package/dist/esm/adapters/custom-adapter/to-app-relative.js.map +1 -0
  27. package/dist/esm/adapters/custom-adapter/to-full-path.js +28 -0
  28. package/dist/esm/adapters/custom-adapter/to-full-path.js.map +1 -0
  29. package/dist/esm/adapters/index.js +4 -0
  30. package/dist/esm/adapters/index.js.map +1 -0
  31. package/dist/esm/adapters/types.js +2 -0
  32. package/dist/esm/adapters/types.js.map +1 -0
  33. package/dist/esm/apply-navigation.js +102 -0
  34. package/dist/esm/apply-navigation.js.map +1 -0
  35. package/dist/esm/constants/context-query-param-key.js +8 -0
  36. package/dist/esm/constants/context-query-param-key.js.map +1 -0
  37. package/dist/esm/constants/index.js +3 -0
  38. package/dist/esm/constants/index.js.map +1 -0
  39. package/dist/esm/constants/uuid-pattern.js +8 -0
  40. package/dist/esm/constants/uuid-pattern.js.map +1 -0
  41. package/dist/esm/create-context-navigation-plugin.js +124 -0
  42. package/dist/esm/create-context-navigation-plugin.js.map +1 -0
  43. package/dist/esm/enable-context-navigation.js +40 -0
  44. package/dist/esm/enable-context-navigation.js.map +1 -0
  45. package/dist/esm/events.js +2 -0
  46. package/dist/esm/events.js.map +1 -0
  47. package/dist/esm/guard-handlers/consume-own-nav-token.js +29 -0
  48. package/dist/esm/guard-handlers/consume-own-nav-token.js.map +1 -0
  49. package/dist/esm/guard-handlers/guard-tick-deps.js +2 -0
  50. package/dist/esm/guard-handlers/guard-tick-deps.js.map +1 -0
  51. package/dist/esm/guard-handlers/guard-tick-payload.js +2 -0
  52. package/dist/esm/guard-handlers/guard-tick-payload.js.map +1 -0
  53. package/dist/esm/guard-handlers/handle-push-mode-guard.js +44 -0
  54. package/dist/esm/guard-handlers/handle-push-mode-guard.js.map +1 -0
  55. package/dist/esm/guard-handlers/handle-replace-mode-guard.js +40 -0
  56. package/dist/esm/guard-handlers/handle-replace-mode-guard.js.map +1 -0
  57. package/dist/esm/guard-handlers/index.js +5 -0
  58. package/dist/esm/guard-handlers/index.js.map +1 -0
  59. package/dist/esm/guard-handlers/is-in-app-scope.js +19 -0
  60. package/dist/esm/guard-handlers/is-in-app-scope.js.map +1 -0
  61. package/dist/esm/helpers/get-current-url.js +11 -0
  62. package/dist/esm/helpers/get-current-url.js.map +1 -0
  63. package/dist/esm/helpers/index.js +6 -0
  64. package/dist/esm/helpers/index.js.map +1 -0
  65. package/dist/esm/helpers/normalize-path-from-url.js +14 -0
  66. package/dist/esm/helpers/normalize-path-from-url.js.map +1 -0
  67. package/dist/esm/helpers/normalize-path.js +30 -0
  68. package/dist/esm/helpers/normalize-path.js.map +1 -0
  69. package/dist/esm/helpers/resolve-adapter.js +23 -0
  70. package/dist/esm/helpers/resolve-adapter.js.map +1 -0
  71. package/dist/esm/helpers/strip-query-params.js +14 -0
  72. package/dist/esm/helpers/strip-query-params.js.map +1 -0
  73. package/dist/esm/index.js +13 -0
  74. package/dist/esm/index.js.map +1 -0
  75. package/dist/esm/operators/active-app-navigation-events.js +52 -0
  76. package/dist/esm/operators/active-app-navigation-events.js.map +1 -0
  77. package/dist/esm/reconcile.js +76 -0
  78. package/dist/esm/reconcile.js.map +1 -0
  79. package/dist/esm/sources/app-first-source.js +41 -0
  80. package/dist/esm/sources/app-first-source.js.map +1 -0
  81. package/dist/esm/sources/context-first-source.js +47 -0
  82. package/dist/esm/sources/context-first-source.js.map +1 -0
  83. package/dist/esm/sources/index.js +4 -0
  84. package/dist/esm/sources/index.js.map +1 -0
  85. package/dist/esm/sources/types.js +16 -0
  86. package/dist/esm/sources/types.js.map +1 -0
  87. package/dist/esm/types.js +2 -0
  88. package/dist/esm/types.js.map +1 -0
  89. package/dist/esm/utils/has-custom-context-generators.js +14 -0
  90. package/dist/esm/utils/has-custom-context-generators.js.map +1 -0
  91. package/dist/esm/utils/legacy-app-navigation-fix.js +45 -0
  92. package/dist/esm/utils/legacy-app-navigation-fix.js.map +1 -0
  93. package/dist/esm/utils/resolve-context-from-url.js +37 -0
  94. package/dist/esm/utils/resolve-context-from-url.js.map +1 -0
  95. package/dist/esm/utils/url/build-app-route.js +20 -0
  96. package/dist/esm/utils/url/build-app-route.js.map +1 -0
  97. package/dist/esm/utils/url/build-context-url-for-strategy.js +43 -0
  98. package/dist/esm/utils/url/build-context-url-for-strategy.js.map +1 -0
  99. package/dist/esm/utils/url/index.js +7 -0
  100. package/dist/esm/utils/url/index.js.map +1 -0
  101. package/dist/esm/utils/url/parse-app-route.js +47 -0
  102. package/dist/esm/utils/url/parse-app-route.js.map +1 -0
  103. package/dist/esm/utils/url/resolve-context-id-from-url.js +29 -0
  104. package/dist/esm/utils/url/resolve-context-id-from-url.js.map +1 -0
  105. package/dist/esm/utils/url/strip-context-query-param.js +20 -0
  106. package/dist/esm/utils/url/strip-context-query-param.js.map +1 -0
  107. package/dist/esm/version.js +3 -0
  108. package/dist/esm/version.js.map +1 -0
  109. package/dist/tsconfig.tsbuildinfo +1 -0
  110. package/dist/types/ContextNavigationConfigurator.d.ts +125 -0
  111. package/dist/types/ContextNavigationConfigurator.d.ts.map +1 -0
  112. package/dist/types/__tests__/active-app-navigation-events.test.d.ts +2 -0
  113. package/dist/types/__tests__/active-app-navigation-events.test.d.ts.map +1 -0
  114. package/dist/types/__tests__/apply-navigation.test.d.ts +2 -0
  115. package/dist/types/__tests__/apply-navigation.test.d.ts.map +1 -0
  116. package/dist/types/__tests__/enable.test.d.ts +2 -0
  117. package/dist/types/__tests__/enable.test.d.ts.map +1 -0
  118. package/dist/types/__tests__/guard-handlers.test.d.ts +2 -0
  119. package/dist/types/__tests__/guard-handlers.test.d.ts.map +1 -0
  120. package/dist/types/__tests__/plugin.test.d.ts +2 -0
  121. package/dist/types/__tests__/plugin.test.d.ts.map +1 -0
  122. package/dist/types/__tests__/reconcile.test.d.ts +2 -0
  123. package/dist/types/__tests__/reconcile.test.d.ts.map +1 -0
  124. package/dist/types/adapters/create-path-adapter.d.ts +27 -0
  125. package/dist/types/adapters/create-path-adapter.d.ts.map +1 -0
  126. package/dist/types/adapters/create-query-adapter.d.ts +34 -0
  127. package/dist/types/adapters/create-query-adapter.d.ts.map +1 -0
  128. package/dist/types/adapters/custom-adapter/create-custom-adapter.d.ts +29 -0
  129. package/dist/types/adapters/custom-adapter/create-custom-adapter.d.ts.map +1 -0
  130. package/dist/types/adapters/custom-adapter/index.d.ts +5 -0
  131. package/dist/types/adapters/custom-adapter/index.d.ts.map +1 -0
  132. package/dist/types/adapters/custom-adapter/normalize-string-result.d.ts +21 -0
  133. package/dist/types/adapters/custom-adapter/normalize-string-result.d.ts.map +1 -0
  134. package/dist/types/adapters/custom-adapter/to-app-relative.d.ts +25 -0
  135. package/dist/types/adapters/custom-adapter/to-app-relative.d.ts.map +1 -0
  136. package/dist/types/adapters/custom-adapter/to-full-path.d.ts +22 -0
  137. package/dist/types/adapters/custom-adapter/to-full-path.d.ts.map +1 -0
  138. package/dist/types/adapters/index.d.ts +5 -0
  139. package/dist/types/adapters/index.d.ts.map +1 -0
  140. package/dist/types/adapters/types.d.ts +73 -0
  141. package/dist/types/adapters/types.d.ts.map +1 -0
  142. package/dist/types/apply-navigation.d.ts +88 -0
  143. package/dist/types/apply-navigation.d.ts.map +1 -0
  144. package/dist/types/constants/context-query-param-key.d.ts +8 -0
  145. package/dist/types/constants/context-query-param-key.d.ts.map +1 -0
  146. package/dist/types/constants/index.d.ts +3 -0
  147. package/dist/types/constants/index.d.ts.map +1 -0
  148. package/dist/types/constants/uuid-pattern.d.ts +8 -0
  149. package/dist/types/constants/uuid-pattern.d.ts.map +1 -0
  150. package/dist/types/create-context-navigation-plugin.d.ts +58 -0
  151. package/dist/types/create-context-navigation-plugin.d.ts.map +1 -0
  152. package/dist/types/enable-context-navigation.d.ts +21 -0
  153. package/dist/types/enable-context-navigation.d.ts.map +1 -0
  154. package/dist/types/events.d.ts +16 -0
  155. package/dist/types/events.d.ts.map +1 -0
  156. package/dist/types/guard-handlers/consume-own-nav-token.d.ts +21 -0
  157. package/dist/types/guard-handlers/consume-own-nav-token.d.ts.map +1 -0
  158. package/dist/types/guard-handlers/guard-tick-deps.d.ts +20 -0
  159. package/dist/types/guard-handlers/guard-tick-deps.d.ts.map +1 -0
  160. package/dist/types/guard-handlers/guard-tick-payload.d.ts +15 -0
  161. package/dist/types/guard-handlers/guard-tick-payload.d.ts.map +1 -0
  162. package/dist/types/guard-handlers/handle-push-mode-guard.d.ts +24 -0
  163. package/dist/types/guard-handlers/handle-push-mode-guard.d.ts.map +1 -0
  164. package/dist/types/guard-handlers/handle-replace-mode-guard.d.ts +19 -0
  165. package/dist/types/guard-handlers/handle-replace-mode-guard.d.ts.map +1 -0
  166. package/dist/types/guard-handlers/index.d.ts +7 -0
  167. package/dist/types/guard-handlers/index.d.ts.map +1 -0
  168. package/dist/types/guard-handlers/is-in-app-scope.d.ts +15 -0
  169. package/dist/types/guard-handlers/is-in-app-scope.d.ts.map +1 -0
  170. package/dist/types/helpers/get-current-url.d.ts +10 -0
  171. package/dist/types/helpers/get-current-url.d.ts.map +1 -0
  172. package/dist/types/helpers/index.d.ts +6 -0
  173. package/dist/types/helpers/index.d.ts.map +1 -0
  174. package/dist/types/helpers/normalize-path-from-url.d.ts +11 -0
  175. package/dist/types/helpers/normalize-path-from-url.d.ts.map +1 -0
  176. package/dist/types/helpers/normalize-path.d.ts +14 -0
  177. package/dist/types/helpers/normalize-path.d.ts.map +1 -0
  178. package/dist/types/helpers/resolve-adapter.d.ts +14 -0
  179. package/dist/types/helpers/resolve-adapter.d.ts.map +1 -0
  180. package/dist/types/helpers/strip-query-params.d.ts +12 -0
  181. package/dist/types/helpers/strip-query-params.d.ts.map +1 -0
  182. package/dist/types/index.d.ts +9 -0
  183. package/dist/types/index.d.ts.map +1 -0
  184. package/dist/types/operators/active-app-navigation-events.d.ts +47 -0
  185. package/dist/types/operators/active-app-navigation-events.d.ts.map +1 -0
  186. package/dist/types/reconcile.d.ts +43 -0
  187. package/dist/types/reconcile.d.ts.map +1 -0
  188. package/dist/types/sources/app-first-source.d.ts +14 -0
  189. package/dist/types/sources/app-first-source.d.ts.map +1 -0
  190. package/dist/types/sources/context-first-source.d.ts +15 -0
  191. package/dist/types/sources/context-first-source.d.ts.map +1 -0
  192. package/dist/types/sources/index.d.ts +4 -0
  193. package/dist/types/sources/index.d.ts.map +1 -0
  194. package/dist/types/sources/types.d.ts +61 -0
  195. package/dist/types/sources/types.d.ts.map +1 -0
  196. package/dist/types/types.d.ts +126 -0
  197. package/dist/types/types.d.ts.map +1 -0
  198. package/dist/types/utils/has-custom-context-generators.d.ts +13 -0
  199. package/dist/types/utils/has-custom-context-generators.d.ts.map +1 -0
  200. package/dist/types/utils/legacy-app-navigation-fix.d.ts +33 -0
  201. package/dist/types/utils/legacy-app-navigation-fix.d.ts.map +1 -0
  202. package/dist/types/utils/resolve-context-from-url.d.ts +20 -0
  203. package/dist/types/utils/resolve-context-from-url.d.ts.map +1 -0
  204. package/dist/types/utils/url/build-app-route.d.ts +11 -0
  205. package/dist/types/utils/url/build-app-route.d.ts.map +1 -0
  206. package/dist/types/utils/url/build-context-url-for-strategy.d.ts +14 -0
  207. package/dist/types/utils/url/build-context-url-for-strategy.d.ts.map +1 -0
  208. package/dist/types/utils/url/index.d.ts +8 -0
  209. package/dist/types/utils/url/index.d.ts.map +1 -0
  210. package/dist/types/utils/url/parse-app-route.d.ts +20 -0
  211. package/dist/types/utils/url/parse-app-route.d.ts.map +1 -0
  212. package/dist/types/utils/url/resolve-context-id-from-url.d.ts +8 -0
  213. package/dist/types/utils/url/resolve-context-id-from-url.d.ts.map +1 -0
  214. package/dist/types/utils/url/strip-context-query-param.d.ts +12 -0
  215. package/dist/types/utils/url/strip-context-query-param.d.ts.map +1 -0
  216. package/dist/types/version.d.ts +2 -0
  217. package/dist/types/version.d.ts.map +1 -0
  218. package/package.json +4 -4
@@ -0,0 +1,125 @@
1
+ import type { ContextNavigationConfig, ContextNavigationNavigatedDetail } from './types';
2
+ import type { ContextNavigationAdapterInput } from './adapters/types';
3
+ import type { ReconcilerSourceFactory } from './sources/types';
4
+ /**
5
+ * Configurator for the context-navigation plugin.
6
+ *
7
+ * Provides a fluent builder API for portal developers.
8
+ * Adapters are registered with priority — the first adapter whose
9
+ * `canHandle()` returns `true` is used for navigation.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * enableContextNavigation(configurator, (builder) => {
14
+ * builder.setPortalName('my-portal');
15
+ * builder.setDebug(true);
16
+ * // Custom adapters registered at higher priority override defaults
17
+ * builder.registerAdapter(myHashAdapter);
18
+ * });
19
+ * ```
20
+ */
21
+ export declare class ContextNavigationConfigurator {
22
+ #private;
23
+ /**
24
+ * Register a navigation adapter or adapter factory.
25
+ *
26
+ * - **Object** — a static adapter with `canHandle`, `encode`, `decode`.
27
+ * - **Function** — a factory called with the resolution context that
28
+ * returns a bound adapter or `null` to skip.
29
+ *
30
+ * Adapters are evaluated in registration order. The first match wins.
31
+ *
32
+ * **Note:** Registering any adapter disables the built-in defaults
33
+ * (custom, query, path). Register all adapters you need explicitly.
34
+ *
35
+ * @param adapter - The adapter instance or factory function to register.
36
+ * @returns The configurator instance for chaining.
37
+ */
38
+ registerAdapter(adapter: ContextNavigationAdapterInput): this;
39
+ /**
40
+ * Set the portal name used in debug output.
41
+ * @default 'Portal'
42
+ *
43
+ * @param name - The portal name to use in debug output.
44
+ * @returns The configurator instance for chaining.
45
+ */
46
+ setPortalName(name: string): this;
47
+ /**
48
+ * Set the origin for constructing absolute URLs.
49
+ * @default window.location.origin
50
+ *
51
+ * @param origin - The origin string to use for URL construction.
52
+ * @returns The configurator instance for chaining.
53
+ */
54
+ setOrigin(origin: string): this;
55
+ /**
56
+ * Enable or disable the URL guard.
57
+ * @default true
58
+ *
59
+ * @param enabled - Whether to enable the URL guard.
60
+ * @returns The configurator instance for chaining.
61
+ */
62
+ setUrlGuard(enabled: boolean): this;
63
+ /**
64
+ * Enable or disable verbose debug logging.
65
+ * @default false
66
+ *
67
+ * @param enabled - Whether to enable debug logging.
68
+ * @returns The configurator instance for chaining.
69
+ */
70
+ setDebug(enabled: boolean): this;
71
+ /**
72
+ * Set a function that computes the URL to navigate to when context is cleared.
73
+ *
74
+ * When set, the reconciler bypasses adapter encoding for null context
75
+ * and navigates directly to the returned URL. Use in context-portal where
76
+ * clearing context should return to the portal landing page.
77
+ *
78
+ * Accepts either a static string (shorthand) or a function that receives
79
+ * the current app key and URL for dynamic path construction.
80
+ *
81
+ * @param urlOrFn - A static path (e.g. `'/'`) or a function returning one.
82
+ * @returns The configurator instance for chaining.
83
+ */
84
+ setNullContextUrl(urlOrFn: string | ((args: {
85
+ appKey: string;
86
+ currentURL: URL;
87
+ }) => string)): this;
88
+ /**
89
+ * Set a side-effect hook called after each successful navigation.
90
+ * @param fn - The callback function to invoke after navigation.
91
+ * @returns The configurator instance for chaining.
92
+ */
93
+ setOnTransition(fn: (detail: ContextNavigationNavigatedDetail) => void): this;
94
+ /**
95
+ * Set the options passed to `navigation.navigate()` during URL updates.
96
+ *
97
+ * @default { replace: true }
98
+ * @param options - The navigation options to use for URL updates.
99
+ * @returns The configurator instance for chaining.
100
+ * @see INavigationProvider.navigate
101
+ * @see ContextNavigationConfig.navigationOptions
102
+ */
103
+ setNavigationOptions(options: {
104
+ replace?: boolean;
105
+ state?: unknown;
106
+ }): this;
107
+ /**
108
+ * Set the source factory that drives the reconciler's observable stream.
109
+ *
110
+ * @default createAppFirstSource()
111
+ * @param factory - The source factory to use for the reconciler.
112
+ * @returns The configurator instance for chaining.
113
+ * @see ReconcilerSourceFactory
114
+ * @see appFirstSource
115
+ * @see contextFirstSource
116
+ */
117
+ setSourceFactory(factory: ReconcilerSourceFactory): this;
118
+ /**
119
+ * Builds the resolved plugin configuration from the registered options.
120
+ *
121
+ * @returns The resolved configuration used by the context-navigation plugin.
122
+ */
123
+ createConfig(): ContextNavigationConfig;
124
+ }
125
+ //# sourceMappingURL=ContextNavigationConfigurator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextNavigationConfigurator.d.ts","sourceRoot":"","sources":["../../src/ContextNavigationConfigurator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAoB/D;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,6BAA6B;;IAIxC;;;;;;;;;;;;;;OAcG;IACH,eAAe,CAAC,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAG5D;IAED;;;;;;OAMG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGhC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAG9B;IAED;;;;;;OAMG;IACH,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAGlC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAG/B;IAED;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,GAAG,CAAA;KAAE,KAAK,MAAM,CAAC,GACxE,IAAI,CAGN;IAED;;;;OAIG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,gCAAgC,KAAK,IAAI,GAAG,IAAI,CAG5E;IAED;;;;;;;;OAQG;IACH,oBAAoB,CAAC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAG1E;IAED;;;;;;;;;OASG;IACH,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAGvD;IAED;;;;OAIG;IACH,YAAY,IAAI,uBAAuB,CAuBtC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=active-app-navigation-events.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"active-app-navigation-events.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/active-app-navigation-events.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=apply-navigation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-navigation.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/apply-navigation.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=enable.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enable.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/enable.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=guard-handlers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guard-handlers.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/guard-handlers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plugin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/plugin.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=reconcile.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconcile.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/reconcile.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import type { ContextNavigationAdapter } from './types';
2
+ /**
3
+ * Path adapter — encodes context identity as the first path segment after
4
+ * the app basename.
5
+ *
6
+ * **Intent:** This is the legacy/default strategy for Fusion apps. It places
7
+ * the context UUID immediately after `/apps/{appKey}/` as a path segment,
8
+ * making context visible in the URL structure. This convention predates the
9
+ * query strategy and remains the fallback for apps that don't declare a
10
+ * routing strategy.
11
+ *
12
+ * **URL shape:** `/apps/{appKey}/{contextId}/...`
13
+ *
14
+ * **Selection logic:**
15
+ * 1. Immediately bails if the app has custom generators registered
16
+ * (those apps are owned by the custom adapter).
17
+ * 2. Matches when `routingStrategy === 'path'` (explicit opt-in).
18
+ * 3. Matches when no strategy is declared (default fallback).
19
+ *
20
+ * **Context detection:** Uses `parseAppRoute` (URLPattern-based) to parse
21
+ * the path into named segments, and UUID pattern matching to distinguish
22
+ * context ids from route names.
23
+ *
24
+ * @returns A static adapter object
25
+ */
26
+ export declare function createPathAdapter(): ContextNavigationAdapter;
27
+ //# sourceMappingURL=create-path-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-path-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/create-path-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAA4B,MAAM,SAAS,CAAC;AAOlF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,IAAI,wBAAwB,CAoE5D"}
@@ -0,0 +1,34 @@
1
+ import type { ContextNavigationAdapter } from './types';
2
+ /**
3
+ * Query adapter — encodes context identity as a URL query parameter.
4
+ *
5
+ * **Intent:** This is the preferred strategy for new apps. It keeps the
6
+ * pathname clean for app routing while storing context in a predictable
7
+ * query param (`?$contextId={uuid}`). This avoids conflicts with
8
+ * React Router path segments and makes deep-links copy-pasteable without
9
+ * affecting route matching.
10
+ *
11
+ * **URL shape:** `/apps/{appKey}/route?$contextId={id}`
12
+ *
13
+ * **Selection:** Matches only when the app explicitly declares
14
+ * `routingStrategy: 'query'` on its context provider. Does not
15
+ * fall through as a default — that role belongs to the path adapter.
16
+ *
17
+ * **Query string handling:** Clones the full current URL (`currentURL.href`)
18
+ * so all existing query parameters are preserved. Only the context param
19
+ * is added/removed/replaced.
20
+ *
21
+ * @param paramName - Query parameter name to use (default `$contextId`)
22
+ * @returns A static adapter object (not a factory — no runtime binding needed)
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * // Default param name
27
+ * const adapter = createQueryAdapter();
28
+ *
29
+ * // Custom param name for portal-specific needs
30
+ * const adapter = createQueryAdapter('contextId');
31
+ * ```
32
+ */
33
+ export declare function createQueryAdapter(paramName?: string): ContextNavigationAdapter;
34
+ //# sourceMappingURL=create-query-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-query-adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/create-query-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAA4B,MAAM,SAAS,CAAC;AAGlF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,SAA0B,GAAG,wBAAwB,CAuDhG"}
@@ -0,0 +1,29 @@
1
+ import type { ContextNavigationAdapterFactory } from '../types';
2
+ /**
3
+ * Custom adapter factory — delegates URL encoding/decoding to app-provided hooks.
4
+ *
5
+ * **Intent:** Some apps define their own URL shape for context (e.g.
6
+ * `/route-a/{contextId}` instead of the standard `/{contextId}/route-a`).
7
+ * These apps register `extractContextIdFromPath` and `generatePathFromContext`
8
+ * on their context provider. This adapter bridges those app hooks into the
9
+ * navigation handler's adapter contract so the reconciler can drive navigation
10
+ * without knowing the app's specific URL layout.
11
+ *
12
+ * **Selection:** The factory returns a bound adapter only when the app has
13
+ * both generator hooks registered (checked via {@link hasCustomContextGenerators}).
14
+ * Otherwise it returns `null`, letting lower-priority adapters (query, path) match.
15
+ *
16
+ * **Coordinate system:** All app hooks receive/return app-relative paths.
17
+ * The adapter handles stripping and prepending the `/apps/{appKey}` prefix
18
+ * transparently via {@link toAppRelative} and {@link toFullPath}.
19
+ *
20
+ * **Query string preservation:** The adapter always carries forward
21
+ * `currentURL.search` to the output URL, ensuring query parameters
22
+ * (e.g. `?routingStrategy=custom`) survive navigation.
23
+ *
24
+ * @returns A {@link ContextNavigationAdapterFactory} that produces a custom adapter when the
25
+ * app context exposes both `extractContextIdFromPath` and `generatePathFromContext`,
26
+ * or `null` to fall through to the next adapter in the resolution chain.
27
+ */
28
+ export declare function createCustomAdapter(): ContextNavigationAdapterFactory;
29
+ //# sourceMappingURL=create-custom-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-custom-adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/custom-adapter/create-custom-adapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAO1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,IAAI,+BAA+B,CAoGrE"}
@@ -0,0 +1,5 @@
1
+ export { createCustomAdapter } from './create-custom-adapter';
2
+ export { normalizeStringResult } from './normalize-string-result';
3
+ export { toAppRelative } from './to-app-relative';
4
+ export { toFullPath } from './to-full-path';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapters/custom-adapter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Normalize legacy app generator outputs to a plain string.
3
+ *
4
+ * Legacy apps may return their path values as either a bare string or
5
+ * wrapped in an array (e.g. `['path']` or `[]`). This function unifies
6
+ * both shapes into `string | undefined` so downstream code doesn't need
7
+ * to branch on format.
8
+ *
9
+ * @param value - Raw return value from an app generator hook
10
+ * @returns The resolved string, or `undefined` if the value is empty/invalid
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * normalizeStringResult('/foo/bar'); // '/foo/bar'
15
+ * normalizeStringResult(['/foo/bar']); // '/foo/bar'
16
+ * normalizeStringResult([]); // undefined
17
+ * normalizeStringResult(''); // undefined
18
+ * ```
19
+ */
20
+ export declare function normalizeStringResult(value: unknown): string | undefined;
21
+ //# sourceMappingURL=normalize-string-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-string-result.d.ts","sourceRoot":"","sources":["../../../../src/adapters/custom-adapter/normalize-string-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAkBxE"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Strips the app basename prefix from a full pathname to produce an
3
+ * app-relative path.
4
+ *
5
+ * App-provided hooks (`extractContextIdFromPath`, `generatePathFromContext`)
6
+ * operate on app-relative paths — they don't know about the portal's
7
+ * `/apps/{appKey}` prefix. This function converts a browser-absolute
8
+ * pathname into the app's local coordinate system before calling those hooks.
9
+ *
10
+ * Always returns a path starting with `/` so app hooks receive consistent input.
11
+ *
12
+ * @param fullPathname - Absolute browser pathname (e.g. `/apps/my-app/route-a`)
13
+ * @param appBasename - The app's base path (e.g. `/apps/my-app`)
14
+ * @returns App-relative path (e.g. `/route-a`), or the input unchanged if
15
+ * the basename doesn't match (defensive fallback)
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * toAppRelative('/apps/my-app/route-a/ctx', '/apps/my-app'); // '/route-a/ctx'
20
+ * toAppRelative('/apps/my-app', '/apps/my-app'); // '/'
21
+ * toAppRelative('/other/path', '/apps/my-app'); // '/other/path'
22
+ * ```
23
+ */
24
+ export declare function toAppRelative(fullPathname: string, appBasename: string): string;
25
+ //# sourceMappingURL=to-app-relative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-app-relative.d.ts","sourceRoot":"","sources":["../../../../src/adapters/custom-adapter/to-app-relative.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAS/E"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Prepends the app basename to an app-relative path to produce a full
3
+ * browser-absolute pathname.
4
+ *
5
+ * Inverse of {@link toAppRelative}. After an app hook generates a new
6
+ * app-relative path (with context encoded), this function converts it
7
+ * back into a full pathname suitable for browser navigation.
8
+ *
9
+ * Handles edge cases where either side may or may not have a leading/trailing slash.
10
+ *
11
+ * @param appRelativePath - App-relative path (e.g. `/route-a/ctx-id`)
12
+ * @param appBasename - The app's base path (e.g. `/apps/my-app`)
13
+ * @returns Full browser pathname (e.g. `/apps/my-app/route-a/ctx-id`)
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * toFullPath('/route-a/ctx-id', '/apps/my-app'); // '/apps/my-app/route-a/ctx-id'
18
+ * toFullPath('route-a/ctx-id', '/apps/my-app/'); // '/apps/my-app/route-a/ctx-id'
19
+ * ```
20
+ */
21
+ export declare function toFullPath(appRelativePath: string, appBasename: string): string;
22
+ //# sourceMappingURL=to-full-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-full-path.d.ts","sourceRoot":"","sources":["../../../../src/adapters/custom-adapter/to-full-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAM/E"}
@@ -0,0 +1,5 @@
1
+ export { createPathAdapter } from './create-path-adapter';
2
+ export { createQueryAdapter } from './create-query-adapter';
3
+ export { createCustomAdapter } from './custom-adapter';
4
+ export type { AdapterResolutionContext, ContextNavigationAdapter, ContextNavigationAdapterFactory, ContextNavigationAdapterInput, } from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,+BAA+B,EAC/B,6BAA6B,GAC9B,MAAM,SAAS,CAAC"}
@@ -0,0 +1,73 @@
1
+ import type { ContextItem, IContextProvider } from '@equinor/fusion-framework-module-context';
2
+ import type { FrameworkOptions } from '@equinor/fusion-framework-module-app';
3
+ /**
4
+ * Context for adapter resolution — passed to `canHandle` so the adapter
5
+ * can self-select based on app config, URL shape, or other signals.
6
+ */
7
+ export interface AdapterResolutionContext {
8
+ /** Current app key. */
9
+ appKey: string;
10
+ /** The app's context provider (has custom generators, etc.) */
11
+ appContext: IContextProvider;
12
+ /** Routing strategy declared in the app manifest's build options. */
13
+ routingStrategy?: FrameworkOptions['contextRouting'];
14
+ /** The current browser URL. */
15
+ currentURL: URL;
16
+ }
17
+ /**
18
+ * A context navigation adapter encodes/decodes context identity in the URL.
19
+ *
20
+ * Adapters are **self-selecting** — they declare via `canHandle` whether they
21
+ * apply to a given app/URL combination. The provider iterates registered
22
+ * adapters by priority and uses the first match.
23
+ *
24
+ * Implementations must be **pure** — no side effects, no navigation calls.
25
+ * The reconciler handles all navigation; adapters only compute URLs.
26
+ */
27
+ export interface ContextNavigationAdapter {
28
+ /** Unique identifier for logging/events. */
29
+ readonly id: string;
30
+ /**
31
+ * Self-selecting predicate: should this adapter handle navigation for
32
+ * the given app and URL?
33
+ */
34
+ canHandle(ctx: AdapterResolutionContext): boolean;
35
+ /**
36
+ * Build a URL that encodes the given context.
37
+ *
38
+ * @param args.context - The context to encode, or `null` to clear context from URL.
39
+ * @param args.currentURL - The current browser URL (absolute).
40
+ * @returns The target URL with context encoded, or `null` to skip navigation.
41
+ */
42
+ encode(args: {
43
+ context: ContextItem | null;
44
+ currentURL: URL;
45
+ }): URL | null;
46
+ /**
47
+ * Extract the context id from a URL.
48
+ *
49
+ * @param url - The URL to decode.
50
+ * @returns The context id if present, or `null` if not found.
51
+ */
52
+ decode(url: URL): string | null;
53
+ }
54
+ /**
55
+ * An adapter factory receives the resolution context and returns a
56
+ * fully-bound adapter, or `null` to indicate it cannot handle
57
+ * the current app/URL combination.
58
+ *
59
+ * Use a factory when the adapter needs runtime state from the app
60
+ * (e.g. custom path generators) that isn't available at registration time.
61
+ */
62
+ export type ContextNavigationAdapterFactory = (ctx: AdapterResolutionContext) => ContextNavigationAdapter | null;
63
+ /**
64
+ * An adapter registration — either a static adapter object or a factory
65
+ * function that produces one.
66
+ *
67
+ * - **Object** — must implement `canHandle`, `encode`, `decode`.
68
+ * The reconciler calls `canHandle` to determine if it applies.
69
+ * - **Function** — called with the resolution context, returns a bound
70
+ * adapter or `null` to skip. Implies the factory handles its own selection.
71
+ */
72
+ export type ContextNavigationAdapterInput = ContextNavigationAdapter | ContextNavigationAdapterFactory;
73
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAI7E;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,UAAU,EAAE,gBAAgB,CAAC;IAC7B,qEAAqE;IACrE,eAAe,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACrD,+BAA+B;IAC/B,UAAU,EAAE,GAAG,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,GAAG,EAAE,wBAAwB,GAAG,OAAO,CAAC;IAElD;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,GAAG,CAAA;KAAE,GAAG,GAAG,GAAG,IAAI,CAAC;IAE3E;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAC5C,GAAG,EAAE,wBAAwB,KAC1B,wBAAwB,GAAG,IAAI,CAAC;AAErC;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GACrC,wBAAwB,GACxB,+BAA+B,CAAC"}
@@ -0,0 +1,88 @@
1
+ import type { AppModulesInstance } from '@equinor/fusion-framework-module-app';
2
+ import type { ContextItem, ContextModule } from '@equinor/fusion-framework-module-context';
3
+ import type { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
4
+ import type { INavigationProvider } from '@equinor/fusion-framework-module-navigation';
5
+ import type { ContextNavigationAdapter } from './adapters/types';
6
+ import type { ContextNavigationConfig } from './types';
7
+ import type { ContextNavigationEventSource } from './create-context-navigation-plugin';
8
+ /**
9
+ * Set of normalized paths that the plugin itself has navigated to.
10
+ *
11
+ * The guard checks incoming navigations against this set and consumes
12
+ * (deletes) the matching token so a future back/forward to the same
13
+ * URL is not silently skipped. Using a Set handles concurrent writes
14
+ * without one overwriting another.
15
+ */
16
+ export type OwnNavigationTokens = Set<string>;
17
+ /**
18
+ * Dependencies injected into {@link applyNavigation}.
19
+ *
20
+ * These are shared across the plugin's reconciler and guard handlers so that
21
+ * navigation, event dispatch, and token tracking behave consistently regardless
22
+ * of which call-site triggers a navigation.
23
+ */
24
+ export interface ApplyNavigationDeps {
25
+ /** Event bus for dispatching cancelable lifecycle events to external listeners. */
26
+ event: IEventModuleProvider;
27
+ /** Navigation provider used to perform the actual URL transition. */
28
+ navigation: INavigationProvider;
29
+ /** Resolved plugin configuration (navigation options, adapters, callbacks). */
30
+ config: ContextNavigationConfig;
31
+ /** Event source token attached to every dispatched event for traceability. */
32
+ eventSource: ContextNavigationEventSource;
33
+ /**
34
+ * Set of own-navigation tokens.
35
+ * Written here after a successful navigation so the URL guard can
36
+ * distinguish plugin-initiated navigations from user-initiated ones.
37
+ */
38
+ ownNavTokens: OwnNavigationTokens;
39
+ /** Conditional debug logger scoped to this plugin instance. */
40
+ log: (msg: string) => void;
41
+ }
42
+ /**
43
+ * Payload describing the navigation that {@link applyNavigation} should attempt.
44
+ *
45
+ * Carries all the resolved information needed to encode a new URL and navigate:
46
+ * the target app, its modules, the selected adapter, the active context, and
47
+ * the URL to compare against.
48
+ */
49
+ export interface ApplyNavigationPayload {
50
+ /** The app key identifying which application this navigation targets. */
51
+ appKey: string;
52
+ /** The app's resolved module instances (needed for event detail payloads). */
53
+ appModules: AppModulesInstance<[ContextModule]>;
54
+ /** The adapter that will encode and decode context into/from the URL. */
55
+ adapter: ContextNavigationAdapter;
56
+ /** The context to encode into the URL, or `null` if context was cleared. */
57
+ context: ContextItem | null;
58
+ /** The current browser URL used as the baseline for comparison. */
59
+ currentURL: URL;
60
+ }
61
+ /**
62
+ * Apply a context-driven navigation if the adapter produces a different URL.
63
+ *
64
+ * This is the single codepath through which all plugin-initiated navigations flow.
65
+ * It performs four steps in sequence:
66
+ *
67
+ * 1. **Encode** — asks the adapter to produce a target URL from the active context.
68
+ * 2. **Compare** — skips if the target matches the current URL (no-op guard).
69
+ * 3. **Dispatch** — fires a cancelable `onContextNavigationNavigate` event so
70
+ * external listeners can veto or observe the transition.
71
+ * 4. **Navigate** — performs the actual URL transition and records an own-nav token
72
+ * so the URL guard knows to ignore the resulting navigation state change.
73
+ *
74
+ * @param payload - The navigation target details (app, adapter, context, URL).
75
+ * @param deps - Shared plugin dependencies (event bus, navigation provider, config).
76
+ * @param navOptionsOverride - Optional navigation options that override
77
+ * `config.navigationOptions` for this specific call. Used by app-switch
78
+ * reconciliation and URL-drift correction, which must always replace the
79
+ * current history entry regardless of the user's `replace` setting.
80
+ * @returns A promise that resolves after the transition is handled in this
81
+ * function (applied or skipped). It does not wait for browser-level
82
+ * navigation completion.
83
+ */
84
+ export declare function applyNavigation(payload: ApplyNavigationPayload, deps: ApplyNavigationDeps, navOptionsOverride?: {
85
+ replace?: boolean;
86
+ state?: unknown;
87
+ }): Promise<void>;
88
+ //# sourceMappingURL=apply-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-navigation.d.ts","sourceRoot":"","sources":["../../src/apply-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAEvF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EACV,uBAAuB,EAIxB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAGvF;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,KAAK,EAAE,oBAAoB,CAAC;IAC5B,qEAAqE;IACrE,UAAU,EAAE,mBAAmB,CAAC;IAChC,+EAA+E;IAC/E,MAAM,EAAE,uBAAuB,CAAC;IAChC,8EAA8E;IAC9E,WAAW,EAAE,4BAA4B,CAAC;IAC1C;;;;OAIG;IACH,YAAY,EAAE,mBAAmB,CAAC;IAClC,+DAA+D;IAC/D,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,UAAU,EAAE,kBAAkB,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;IAChD,yEAAyE;IACzE,OAAO,EAAE,wBAAwB,CAAC;IAClC,4EAA4E;IAC5E,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,mEAAmE;IACnE,UAAU,EAAE,GAAG,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,mBAAmB,EACzB,kBAAkB,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1D,OAAO,CAAC,IAAI,CAAC,CAuFf"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Query-parameter key used to carry the context id in query-routing mode.
3
+ *
4
+ * The `$` prefix is a Fusion convention that namespaces framework-managed
5
+ * parameters, distinguishing them from app-specific query params.
6
+ */
7
+ export declare const CONTEXT_QUERY_PARAM_KEY = "$contextId";
8
+ //# sourceMappingURL=context-query-param-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-query-param-key.d.ts","sourceRoot":"","sources":["../../../src/constants/context-query-param-key.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { CONTEXT_QUERY_PARAM_KEY } from './context-query-param-key';
2
+ export { UUID_PATTERN } from './uuid-pattern';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Regex matching a standard UUID (v4 format, case-insensitive).
3
+ *
4
+ * Used to identify whether a path segment is a context id vs. a route name.
5
+ * Context ids in Fusion are always UUIDs, so this is a reliable discriminator.
6
+ */
7
+ export declare const UUID_PATTERN: RegExp;
8
+ //# sourceMappingURL=uuid-pattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uuid-pattern.d.ts","sourceRoot":"","sources":["../../../src/constants/uuid-pattern.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAoE,CAAC"}