@genesislcap/foundation-ui 14.486.0 → 14.486.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.
@@ -1398,37 +1398,6 @@
1398
1398
  }
1399
1399
  ]
1400
1400
  },
1401
- {
1402
- "kind": "javascript-module",
1403
- "path": "src/_config/index.ts",
1404
- "declarations": [],
1405
- "exports": [
1406
- {
1407
- "kind": "js",
1408
- "name": "*",
1409
- "declaration": {
1410
- "name": "*",
1411
- "package": "./styles"
1412
- }
1413
- },
1414
- {
1415
- "kind": "js",
1416
- "name": "*",
1417
- "declaration": {
1418
- "name": "*",
1419
- "package": "./tokens"
1420
- }
1421
- },
1422
- {
1423
- "kind": "js",
1424
- "name": "*",
1425
- "declaration": {
1426
- "name": "*",
1427
- "package": "./values"
1428
- }
1429
- }
1430
- ]
1431
- },
1432
1401
  {
1433
1402
  "kind": "javascript-module",
1434
1403
  "path": "src/accordion-item/accordion-item.styles.ts",
@@ -1823,6 +1792,37 @@
1823
1792
  }
1824
1793
  ]
1825
1794
  },
1795
+ {
1796
+ "kind": "javascript-module",
1797
+ "path": "src/_config/index.ts",
1798
+ "declarations": [],
1799
+ "exports": [
1800
+ {
1801
+ "kind": "js",
1802
+ "name": "*",
1803
+ "declaration": {
1804
+ "name": "*",
1805
+ "package": "./styles"
1806
+ }
1807
+ },
1808
+ {
1809
+ "kind": "js",
1810
+ "name": "*",
1811
+ "declaration": {
1812
+ "name": "*",
1813
+ "package": "./tokens"
1814
+ }
1815
+ },
1816
+ {
1817
+ "kind": "js",
1818
+ "name": "*",
1819
+ "declaration": {
1820
+ "name": "*",
1821
+ "package": "./values"
1822
+ }
1823
+ }
1824
+ ]
1825
+ },
1826
1826
  {
1827
1827
  "kind": "javascript-module",
1828
1828
  "path": "src/actions-menu/actions-menu.styles.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/router/navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;oCAKO,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;qBAavE,MAAM;wBAUH,MAAM;wBAUN,MAAM;;;oCAKY,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;2BActE,WAAW,GAAG,MAAM,QAC1B,MAAM,WACJ,MAAM;8BASF,WAAW,GAAG,MAAM,QAC1B,MAAM,WACJ,MAAM;8BAQY,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;;EAOhF,CAAC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/router/navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBlC;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;oCAKO,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;qBAavE,MAAM;wBAWH,MAAM;wBAWN,MAAM;;;oCAKY,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;2BActE,WAAW,GAAG,MAAM,QAC1B,MAAM,WACJ,MAAM;8BASF,WAAW,GAAG,MAAM,QAC1B,MAAM,WACJ,MAAM;8BAQY,WAAW,GAAG,MAAM,QAAQ,MAAM,WAAU,MAAM;;EAOhF,CAAC"}
@@ -1,6 +1,22 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import { Route as FASTRoute } from '@microsoft/fast-router';
3
3
  import { findRouter, isAbsoluteUrl } from './utils';
4
+ /**
5
+ * `FoundationRouteNav.path.push`/`.replace` update the URL via raw `history.pushState`/
6
+ * `replaceState`, which browser-history-based routers other than `@microsoft/fast-router`
7
+ * (e.g. `react-router-dom`'s `BrowserRouter`) never observe on their own, since neither
8
+ * `pushState` nor `replaceState` fire any event. Dispatching a synthetic `popstate` closes
9
+ * that gap for those routers. It must be skipped when a `foundation-router`/`fast-router`
10
+ * element is mounted: fast-router's own `DefaultNavigationQueue` already listens for native
11
+ * `popstate` to support browser back/forward, and this call site also explicitly triggers
12
+ * `FASTRoute.path.trigger` below — an extra popstate would queue a second, duplicate
13
+ * navigation for the same path.
14
+ */
15
+ function notifyBrowserHistoryRouters() {
16
+ if (document.querySelector('foundation-router, fast-router') === null) {
17
+ window.dispatchEvent(new PopStateEvent('popstate'));
18
+ }
19
+ }
4
20
  /**
5
21
  * @beta
6
22
  * @privateRemarks
@@ -32,6 +48,7 @@ export const FoundationRouteNav = Object.freeze({
32
48
  return;
33
49
  }
34
50
  history.pushState({}, document.title, path);
51
+ notifyBrowserHistoryRouters();
35
52
  if (trigger) {
36
53
  FoundationRouteNav.path.trigger(path);
37
54
  }
@@ -42,6 +59,7 @@ export const FoundationRouteNav = Object.freeze({
42
59
  return;
43
60
  }
44
61
  history.replaceState({}, document.title, path);
62
+ notifyBrowserHistoryRouters();
45
63
  if (trigger) {
46
64
  FoundationRouteNav.path.trigger(path);
47
65
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "14.486.0",
4
+ "version": "14.486.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -85,13 +85,13 @@
85
85
  }
86
86
  },
87
87
  "devDependencies": {
88
- "@genesislcap/foundation-testing": "14.486.0",
89
- "@genesislcap/genx": "14.486.0",
90
- "@genesislcap/rollup-builder": "14.486.0",
91
- "@genesislcap/ts-builder": "14.486.0",
92
- "@genesislcap/uvu-playwright-builder": "14.486.0",
93
- "@genesislcap/vite-builder": "14.486.0",
94
- "@genesislcap/webpack-builder": "14.486.0",
88
+ "@genesislcap/foundation-testing": "14.486.1",
89
+ "@genesislcap/genx": "14.486.1",
90
+ "@genesislcap/rollup-builder": "14.486.1",
91
+ "@genesislcap/ts-builder": "14.486.1",
92
+ "@genesislcap/uvu-playwright-builder": "14.486.1",
93
+ "@genesislcap/vite-builder": "14.486.1",
94
+ "@genesislcap/webpack-builder": "14.486.1",
95
95
  "copyfiles": "^2.4.1"
96
96
  },
97
97
  "dependencies": {
@@ -100,16 +100,16 @@
100
100
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
101
101
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
102
102
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
103
- "@genesislcap/expression-builder": "14.486.0",
104
- "@genesislcap/foundation-ai": "14.486.0",
105
- "@genesislcap/foundation-comms": "14.486.0",
106
- "@genesislcap/foundation-criteria": "14.486.0",
107
- "@genesislcap/foundation-errors": "14.486.0",
108
- "@genesislcap/foundation-events": "14.486.0",
109
- "@genesislcap/foundation-logger": "14.486.0",
110
- "@genesislcap/foundation-notifications": "14.486.0",
111
- "@genesislcap/foundation-user": "14.486.0",
112
- "@genesislcap/foundation-utils": "14.486.0",
103
+ "@genesislcap/expression-builder": "14.486.1",
104
+ "@genesislcap/foundation-ai": "14.486.1",
105
+ "@genesislcap/foundation-comms": "14.486.1",
106
+ "@genesislcap/foundation-criteria": "14.486.1",
107
+ "@genesislcap/foundation-errors": "14.486.1",
108
+ "@genesislcap/foundation-events": "14.486.1",
109
+ "@genesislcap/foundation-logger": "14.486.1",
110
+ "@genesislcap/foundation-notifications": "14.486.1",
111
+ "@genesislcap/foundation-user": "14.486.1",
112
+ "@genesislcap/foundation-utils": "14.486.1",
113
113
  "@microsoft/fast-colors": "5.3.1",
114
114
  "@microsoft/fast-components": "2.30.6",
115
115
  "@microsoft/fast-element": "1.14.0",
@@ -142,5 +142,5 @@
142
142
  "require": "./dist/react.cjs"
143
143
  }
144
144
  },
145
- "gitHead": "5de11f8989291fe8aaf19a7048dd6be68c0be9c8"
145
+ "gitHead": "1e4e55b1ba9ef3aca8177127b52111d3ef0e53ae"
146
146
  }