@moku-labs/web 2.4.9 → 2.4.11

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/dist/browser.mjs CHANGED
@@ -3662,7 +3662,8 @@ function attachNavigationApi(navigation, handlers, navigate = (pathname, _scroll
3662
3662
  const onNavigate = (navEvent) => {
3663
3663
  if (isOwnPush()) return;
3664
3664
  const url = new URL(navEvent.destination.url);
3665
- if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest) return;
3665
+ const isScriptReplace = navEvent.navigationType === "replace" && !navEvent.userInitiated && !navEvent.destination.sameDocument;
3666
+ if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest || isScriptReplace) return;
3666
3667
  if (!isInternalLink(url)) return;
3667
3668
  if (pathWithSearch(url) === pathWithSearch(location)) {
3668
3669
  navEvent.intercept({ handler: () => {
package/dist/index.cjs CHANGED
@@ -10756,7 +10756,8 @@ function attachNavigationApi(navigation, handlers, navigate = (pathname, _scroll
10756
10756
  const onNavigate = (navEvent) => {
10757
10757
  if (isOwnPush()) return;
10758
10758
  const url = new URL(navEvent.destination.url);
10759
- if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest) return;
10759
+ const isScriptReplace = navEvent.navigationType === "replace" && !navEvent.userInitiated && !navEvent.destination.sameDocument;
10760
+ if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest || isScriptReplace) return;
10760
10761
  if (!isInternalLink(url)) return;
10761
10762
  if (pathWithSearch(url) === pathWithSearch(location)) {
10762
10763
  navEvent.intercept({ handler: () => {
package/dist/index.mjs CHANGED
@@ -10712,7 +10712,8 @@ function attachNavigationApi(navigation, handlers, navigate = (pathname, _scroll
10712
10712
  const onNavigate = (navEvent) => {
10713
10713
  if (isOwnPush()) return;
10714
10714
  const url = new URL(navEvent.destination.url);
10715
- if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest) return;
10715
+ const isScriptReplace = navEvent.navigationType === "replace" && !navEvent.userInitiated && !navEvent.destination.sameDocument;
10716
+ if (!navEvent.canIntercept || navEvent.hashChange || navEvent.downloadRequest || isScriptReplace) return;
10716
10717
  if (!isInternalLink(url)) return;
10717
10718
  if (pathWithSearch(url) === pathWithSearch(location)) {
10718
10719
  navEvent.intercept({ handler: () => {
package/package.json CHANGED
@@ -116,9 +116,9 @@
116
116
  },
117
117
  "devDependencies": {
118
118
  "@biomejs/biome": "2.4.16",
119
- "@moku-labs/ci": "1.5.5",
120
- "@moku-labs/common": "0.3.7",
121
- "@moku-labs/core": "1.7.5",
119
+ "@moku-labs/ci": "1.5.7",
120
+ "@moku-labs/common": "0.3.10",
121
+ "@moku-labs/core": "1.7.6",
122
122
  "@types/bun": "1.4.2",
123
123
  "@vitest/coverage-istanbul": "4.0.18",
124
124
  "eslint": "9.39.3",
@@ -139,5 +139,5 @@
139
139
  "typescript-eslint": "8.58.0",
140
140
  "vitest": "4.0.18"
141
141
  },
142
- "version": "2.4.9"
142
+ "version": "2.4.11"
143
143
  }