@operato/shell 10.29.45 → 10.29.50
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/CHANGELOG.md +17 -0
- package/dist/src/router.js +3 -1
- package/dist/src/router.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -1076
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/test/fixtures/guarded-define.ts.html +0 -118
- package/coverage/lcov-report/test/fixtures/index.html +0 -161
- package/coverage/lcov-report/test/fixtures/no-registration.ts.html +0 -91
- package/coverage/lcov-report/test/fixtures/registers.ts.html +0 -118
- package/coverage/lcov-report/test/fixtures/unguarded-define.ts.html +0 -112
- package/coverage/lcov.info +0 -58613
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [10.29.50](https://github.com/hatiolab/operato/compare/v10.29.49...v10.29.50) (2026-10-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* **shell:** ignore anchors without href in router ([ad8c3fb](https://github.com/hatiolab/operato/commit/ad8c3fbe64db6702aba6edada7c70498f2a033e3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### [10.29.49](https://github.com/hatiolab/operato/compare/v10.29.48...v10.29.49) (2026-10-23)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @operato/shell
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
### [10.29.45](https://github.com/hatiolab/operato/compare/v10.29.44...v10.29.45) (2026-10-18)
|
|
7
24
|
|
|
8
25
|
|
package/dist/src/router.js
CHANGED
|
@@ -11,7 +11,9 @@ export const installRouter = (locationUpdatedCallback) => {
|
|
|
11
11
|
return;
|
|
12
12
|
const path = event.composedPath();
|
|
13
13
|
const anchor = path.find((node) => node instanceof HTMLAnchorElement);
|
|
14
|
-
|
|
14
|
+
// An anchor without href is an action/placeholder, not a navigation request.
|
|
15
|
+
// Its empty href property would otherwise resolve to <base href="/"> (e.g. grid pagers).
|
|
16
|
+
if (!anchor || !anchor.hasAttribute('href') || anchor.target || anchor.hasAttribute('download') || anchor.rel === 'external')
|
|
15
17
|
return;
|
|
16
18
|
const url = new URL(anchor.href, document.baseURI);
|
|
17
19
|
if (url.origin !== location.origin)
|
package/dist/src/router.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE3E,uFAAuF;AACvF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,uBAAqE,EAAE,EAAE;IACrG,MAAM,KAAK,GAAG,CAAC,KAAiB,EAAE,EAAE;QAClC,IACE,KAAK,CAAC,gBAAgB;YACtB,KAAK,CAAC,MAAM,KAAK,CAAC;YAClB,KAAK,CAAC,OAAO;YACb,KAAK,CAAC,OAAO;YACb,KAAK,CAAC,QAAQ;YACd,KAAK,CAAC,MAAM;YAEZ,OAAM;QACR,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,CAAA;QACjC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAA6B,EAAE,CAAC,IAAI,YAAY,iBAAiB,CAAC,CAAA;QAChG,IAAI,CAAC,MAAM,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AG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;IAClG,CAAC,CAAA;IACD,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAA;IACpH,OAAO,GAAG,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACjD,IAAI,EAAE,CAAA;IACR,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { addressController, writeAddress } from '@operato/utils/address.js'\n\n/** Link requests and committed entry notifications share the same address contract. */\nexport const installRouter = (locationUpdatedCallback: (location: URL, event: Event | null) => void) => {\n const click = (event: MouseEvent) => {\n if (\n event.defaultPrevented ||\n event.button !== 0 ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey\n )\n return\n const path = event.composedPath()\n const anchor = path.find((node): node is HTMLAnchorElement => node instanceof HTMLAnchorElement)\n // An anchor without href is an action/placeholder, not a navigation request.\n // Its empty href property would otherwise resolve to <base href=\"/\"> (e.g. grid pagers).\n if (!anchor || !anchor.hasAttribute('href') || anchor.target || anchor.hasAttribute('download') || anchor.rel === 'external') return\n const url = new URL(anchor.href, document.baseURI)\n if (url.origin !== location.origin) return\n event.preventDefault()\n // The anchor is the request's source: inside a popup, that popup is its origin.\n if (url.href !== location.href) void writeAddress(url, { source: anchor, intent: 'navigation' })\n }\n document.body.addEventListener('click', click)\n const stop = addressController().subscribe(entry => locationUpdatedCallback(entry.url, new Event('address-change')))\n return () => {\n document.body.removeEventListener('click', click)\n stop()\n }\n}\n"]}
|