From 2a239c881787e6f6c82856dfab73262c07195abe Mon Sep 17 00:00:00 2001 From: yinonov Date: Tue, 20 Dec 2022 12:32:46 +0200 Subject: [PATCH 01/51] fix(popover): support shadow tree elements lookup query selector looking for popover attributes will now search within shadow trees recursivly. Closes #44 --- package-lock.json | 13 +++++++++++++ package.json | 1 + src/popover.ts | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 207584e..ab7918d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "lint-staged": "^13.1.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.1", + "query-selector-shadow-dom": "^1.0.1", "stylelint-config-standard": "^29.0.0", "stylis": "^4.1.3", "ts-node": "^10.9.1", @@ -4259,6 +4260,12 @@ "node": ">=6" } }, + "node_modules/query-selector-shadow-dom": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz", + "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -8382,6 +8389,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "query-selector-shadow-dom": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz", + "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", diff --git a/package.json b/package.json index f1f4cfe..b3eda34 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "lint-staged": "^13.1.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.1", + "query-selector-shadow-dom": "^1.0.1", "stylelint-config-standard": "^29.0.0", "stylis": "^4.1.3", "ts-node": "^10.9.1", diff --git a/src/popover.ts b/src/popover.ts index 349b13a..159abdf 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,3 +1,5 @@ +import { querySelectorAllDeep } from 'query-selector-shadow-dom'; + export function isSupported() { return ( typeof HTMLElement !== 'undefined' && @@ -116,7 +118,7 @@ export function apply() { } // Dismiss open Popovers - for (const popover of doc.querySelectorAll( + for (const popover of querySelectorAllDeep( '[popover="" i].\\:open, [popover=auto i].\\:open', )) { if (popover instanceof HTMLElement && popover !== effectedPopover) From 614cd00f965592836d967dfc5931368f3b4c755f Mon Sep 17 00:00:00 2001 From: yinonov Date: Tue, 20 Dec 2022 13:21:02 +0200 Subject: [PATCH 02/51] refactor closest as well --- src/popover.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/popover.ts b/src/popover.ts index 159abdf..872e926 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -72,7 +72,10 @@ export function apply() { const target = event.target; if (!(target instanceof Element)) return; const doc = target.ownerDocument; - let effectedPopover: HTMLElement | null = target.closest('[popover]'); + let effectedPopover = (event + .composedPath() + .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || + null) as HTMLElement | null; const button = target.closest( '[popovertoggletarget],[popoverhidetarget],[popovershowtarget]', ); From 363c9a44f0a50061f9a8e439c6073336be241fe2 Mon Sep 17 00:00:00 2001 From: yinonov Date: Tue, 20 Dec 2022 13:22:28 +0200 Subject: [PATCH 03/51] code style --- src/popover.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 872e926..d666b26 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,5 +1,12 @@ import { querySelectorAllDeep } from 'query-selector-shadow-dom'; +function closestComposed(event: Event) { + return (event + .composedPath() + .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || + null) as HTMLElement | null; +} + export function isSupported() { return ( typeof HTMLElement !== 'undefined' && @@ -72,10 +79,7 @@ export function apply() { const target = event.target; if (!(target instanceof Element)) return; const doc = target.ownerDocument; - let effectedPopover = (event - .composedPath() - .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || - null) as HTMLElement | null; + let effectedPopover = closestComposed(event); const button = target.closest( '[popovertoggletarget],[popoverhidetarget],[popovershowtarget]', ); From 4c415af25203473e4c134951b7e8d9fbcb510f66 Mon Sep 17 00:00:00 2001 From: yinonov Date: Thu, 22 Dec 2022 18:36:33 +0200 Subject: [PATCH 04/51] patching attachShadow --- package-lock.json | 13 +++++++++++++ package.json | 1 + src/index.ts | 4 ++++ src/popover.ts | 28 ++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) diff --git a/package-lock.json b/package-lock.json index ab7918d..28f9aa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "devDependencies": { "@playwright/test": "^1.28.1", "@types/node": "^18.11.13", + "@types/query-selector-shadow-dom": "^1.0.0", "@typescript-eslint/eslint-plugin": "^5.46.0", "@typescript-eslint/parser": "^5.46.0", "esbuild": "^0.16.4", @@ -688,6 +689,12 @@ "dev": true, "peer": true }, + "node_modules/@types/query-selector-shadow-dom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.0.tgz", + "integrity": "sha512-cTGo8ZxW0WXFDV7gvL/XCq4213t6S/yWaSGqscnXUTNDWqwnsYKegB/VAzQDwzmACoLzIbGbYXdjJOgfPLu7Ig==", + "dev": true + }, "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -5819,6 +5826,12 @@ "dev": true, "peer": true }, + "@types/query-selector-shadow-dom": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.0.tgz", + "integrity": "sha512-cTGo8ZxW0WXFDV7gvL/XCq4213t6S/yWaSGqscnXUTNDWqwnsYKegB/VAzQDwzmACoLzIbGbYXdjJOgfPLu7Ig==", + "dev": true + }, "@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", diff --git a/package.json b/package.json index b3eda34..72ad7c6 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "devDependencies": { "@playwright/test": "^1.28.1", "@types/node": "^18.11.13", + "@types/query-selector-shadow-dom": "^1.0.0", "@typescript-eslint/eslint-plugin": "^5.46.0", "@typescript-eslint/parser": "^5.46.0", "esbuild": "^0.16.4", diff --git a/src/index.ts b/src/index.ts index 37b42b5..a54be53 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,10 @@ import { apply, isSupported } from './popover.js'; declare global { + interface Element { + _originalAttachShadow(init: ShadowRootInit): ShadowRoot; + } + interface HTMLElement { popover: 'auto' | 'manual' | null; showPopover(): void; diff --git a/src/popover.ts b/src/popover.ts index d666b26..3b3883b 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,5 +1,14 @@ import { querySelectorAllDeep } from 'query-selector-shadow-dom'; +function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { + Element.prototype._originalAttachShadow = Element.prototype.attachShadow; + Element.prototype.attachShadow = function (init) { + const shadowRoot = this._originalAttachShadow(init); + callback(shadowRoot); + return shadowRoot; + }; +} + function closestComposed(event: Event) { return (event .composedPath() @@ -19,6 +28,25 @@ const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; export function apply() { + // Create an observer instance linked to the callback function + const observer = new MutationObserver(console.log); + + const config = { + attributeFilter: ['popover'], + childList: true, + subtree: true, + }; + + // observe the document itself + observer.observe(document, config); + + function interceptor(shadowRoot: ShadowRoot) { + // observe attached shadow + observer.observe(shadowRoot, config); + } + + patchAttachShadow(interceptor); + const visibleElements = new WeakSet(); Object.defineProperties(HTMLElement.prototype, { From de4010744210b56348d7e61217f603ab1ae2db3c Mon Sep 17 00:00:00 2001 From: yinonov Date: Thu, 22 Dec 2022 18:40:28 +0200 Subject: [PATCH 05/51] update lock file --- package-lock.json | 660 +++++++++++++++++++++++----------------------- 1 file changed, 330 insertions(+), 330 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28f9aa9..56a5d18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "0.0.4", "license": "BSD-3-Clause", "devDependencies": { - "@playwright/test": "^1.28.1", - "@types/node": "^18.11.13", + "@playwright/test": "^1.29.0", + "@types/node": "^18.11.17", "@types/query-selector-shadow-dom": "^1.0.0", - "@typescript-eslint/eslint-plugin": "^5.46.0", - "@typescript-eslint/parser": "^5.46.0", - "esbuild": "^0.16.4", - "eslint": "^8.29.0", + "@typescript-eslint/eslint-plugin": "^5.46.1", + "@typescript-eslint/parser": "^5.46.1", + "esbuild": "^0.16.9", + "eslint": "^8.30.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -101,9 +101,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.4.tgz", - "integrity": "sha512-rZzb7r22m20S1S7ufIc6DC6W659yxoOrl7sKP1nCYhuvUlnCFHVSbATG4keGUtV8rDz11sRRDbWkvQZpzPaHiw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.10.tgz", + "integrity": "sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ==", "cpu": [ "arm" ], @@ -117,9 +117,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.4.tgz", - "integrity": "sha512-VPuTzXFm/m2fcGfN6CiwZTlLzxrKsWbPkG7ArRFpuxyaHUm/XFHQPD4xNwZT6uUmpIHhnSjcaCmcla8COzmZ5Q==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz", + "integrity": "sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw==", "cpu": [ "arm64" ], @@ -133,9 +133,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.4.tgz", - "integrity": "sha512-MW+B2O++BkcOfMWmuHXB15/l1i7wXhJFqbJhp82IBOais8RBEQv2vQz/jHrDEHaY2X0QY7Wfw86SBL2PbVOr0g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.10.tgz", + "integrity": "sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg==", "cpu": [ "x64" ], @@ -149,9 +149,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.4.tgz", - "integrity": "sha512-a28X1O//aOfxwJVZVs7ZfM8Tyih2Za4nKJrBwW5Wm4yKsnwBy9aiS/xwpxiiTRttw3EaTg4Srerhcm6z0bu9Wg==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.10.tgz", + "integrity": "sha512-bH/bpFwldyOKdi9HSLCLhhKeVgRYr9KblchwXgY2NeUHBB/BzTUHtUSBgGBmpydB1/4E37m+ggXXfSrnD7/E7g==", "cpu": [ "arm64" ], @@ -165,9 +165,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.4.tgz", - "integrity": "sha512-e3doCr6Ecfwd7VzlaQqEPrnbvvPjE9uoTpxG5pyLzr2rI2NMjDHmvY1E5EO81O/e9TUOLLkXA5m6T8lfjK9yAA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz", + "integrity": "sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ==", "cpu": [ "x64" ], @@ -181,9 +181,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.4.tgz", - "integrity": "sha512-Oup3G/QxBgvvqnXWrBed7xxkFNwAwJVHZcklWyQt7YCAL5bfUkaa6FVWnR78rNQiM8MqqLiT6ZTZSdUFuVIg1w==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz", + "integrity": "sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ==", "cpu": [ "arm64" ], @@ -197,9 +197,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.4.tgz", - "integrity": "sha512-vAP+eYOxlN/Bpo/TZmzEQapNS8W1njECrqkTpNgvXskkkJC2AwOXwZWai/Kc2vEFZUXQttx6UJbj9grqjD/+9Q==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz", + "integrity": "sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA==", "cpu": [ "x64" ], @@ -213,9 +213,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.4.tgz", - "integrity": "sha512-A47ZmtpIPyERxkSvIv+zLd6kNIOtJH03XA0Hy7jaceRDdQaQVGSDt4mZqpWqJYgDk9rg96aglbF6kCRvPGDSUA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz", + "integrity": "sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA==", "cpu": [ "arm" ], @@ -229,9 +229,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.4.tgz", - "integrity": "sha512-2zXoBhv4r5pZiyjBKrOdFP4CXOChxXiYD50LRUU+65DkdS5niPFHbboKZd/c81l0ezpw7AQnHeoCy5hFrzzs4g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz", + "integrity": "sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA==", "cpu": [ "arm64" ], @@ -245,9 +245,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.4.tgz", - "integrity": "sha512-uxdSrpe9wFhz4yBwt2kl2TxS/NWEINYBUFIxQtaEVtglm1eECvsj1vEKI0KX2k2wCe17zDdQ3v+jVxfwVfvvjw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz", + "integrity": "sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw==", "cpu": [ "ia32" ], @@ -261,9 +261,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.4.tgz", - "integrity": "sha512-peDrrUuxbZ9Jw+DwLCh/9xmZAk0p0K1iY5d2IcwmnN+B87xw7kujOkig6ZRcZqgrXgeRGurRHn0ENMAjjD5DEg==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz", + "integrity": "sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg==", "cpu": [ "loong64" ], @@ -277,9 +277,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.4.tgz", - "integrity": "sha512-sD9EEUoGtVhFjjsauWjflZklTNr57KdQ6xfloO4yH1u7vNQlOfAlhEzbyBKfgbJlW7rwXYBdl5/NcZ+Mg2XhQA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz", + "integrity": "sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA==", "cpu": [ "mips64el" ], @@ -293,9 +293,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.4.tgz", - "integrity": "sha512-X1HSqHUX9D+d0l6/nIh4ZZJ94eQky8d8z6yxAptpZE3FxCWYWvTDd9X9ST84MGZEJx04VYUD/AGgciddwO0b8g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz", + "integrity": "sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg==", "cpu": [ "ppc64" ], @@ -309,9 +309,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.4.tgz", - "integrity": "sha512-97ANpzyNp0GTXCt6SRdIx1ngwncpkV/z453ZuxbnBROCJ5p/55UjhbaG23UdHj88fGWLKPFtMoU4CBacz4j9FA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz", + "integrity": "sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw==", "cpu": [ "riscv64" ], @@ -325,9 +325,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.4.tgz", - "integrity": "sha512-pUvPQLPmbEeJRPjP0DYTC1vjHyhrnCklQmCGYbipkep+oyfTn7GTBJXoPodR7ZS5upmEyc8lzAkn2o29wD786A==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz", + "integrity": "sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw==", "cpu": [ "s390x" ], @@ -341,9 +341,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.4.tgz", - "integrity": "sha512-N55Q0mJs3Sl8+utPRPBrL6NLYZKBCLLx0bme/+RbjvMforTGGzFvsRl4xLTZMUBFC1poDzBEPTEu5nxizQ9Nlw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz", + "integrity": "sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA==", "cpu": [ "x64" ], @@ -357,9 +357,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.4.tgz", - "integrity": "sha512-LHSJLit8jCObEQNYkgsDYBh2JrJT53oJO2HVdkSYLa6+zuLJh0lAr06brXIkljrlI+N7NNW1IAXGn/6IZPi3YQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz", + "integrity": "sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA==", "cpu": [ "x64" ], @@ -373,9 +373,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.4.tgz", - "integrity": "sha512-nLgdc6tWEhcCFg/WVFaUxHcPK3AP/bh+KEwKtl69Ay5IBqUwKDaq/6Xk0E+fh/FGjnLwqFSsarsbPHeKM8t8Sw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz", + "integrity": "sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA==", "cpu": [ "x64" ], @@ -389,9 +389,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.4.tgz", - "integrity": "sha512-08SluG24GjPO3tXKk95/85n9kpyZtXCVwURR2i4myhrOfi3jspClV0xQQ0W0PYWHioJj+LejFMt41q+PG3mlAQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz", + "integrity": "sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg==", "cpu": [ "x64" ], @@ -405,9 +405,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.4.tgz", - "integrity": "sha512-yYiRDQcqLYQSvNQcBKN7XogbrSvBE45FEQdH8fuXPl7cngzkCvpsG2H9Uey39IjQ6gqqc+Q4VXYHsQcKW0OMjQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz", + "integrity": "sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw==", "cpu": [ "arm64" ], @@ -421,9 +421,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.4.tgz", - "integrity": "sha512-5rabnGIqexekYkh9zXG5waotq8mrdlRoBqAktjx2W3kb0zsI83mdCwrcAeKYirnUaTGztR5TxXcXmQrEzny83w==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz", + "integrity": "sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg==", "cpu": [ "ia32" ], @@ -437,9 +437,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.4.tgz", - "integrity": "sha512-sN/I8FMPtmtT2Yw+Dly8Ur5vQ5a/RmC8hW7jO9PtPSQUPkowxWpcUZnqOggU7VwyT3Xkj6vcXWd3V/qTXwultQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz", + "integrity": "sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw==", "cpu": [ "x64" ], @@ -453,15 +453,15 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -498,14 +498,14 @@ "dev": true }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" @@ -611,13 +611,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", - "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.1.tgz", + "integrity": "sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.28.1" + "playwright-core": "1.29.1" }, "bin": { "playwright": "cli.js" @@ -670,9 +670,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "18.11.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.13.tgz", - "integrity": "sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w==", + "version": "18.11.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.17.tgz", + "integrity": "sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -702,14 +702,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.0.tgz", - "integrity": "sha512-QrZqaIOzJAjv0sfjY4EjbXUi3ZOFpKfzntx22gPGr9pmFcTjcFw/1sS1LJhEubfAGwuLjNrPV0rH+D1/XZFy7Q==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.0.tgz", + "integrity": "sha512-AHZtlXAMGkDmyLuLZsRpH3p4G/1iARIwc/T0vIem2YB+xW6pZaXYXzCBnZSF/5fdM97R9QqZWZ+h3iW10XgevQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/type-utils": "5.46.0", - "@typescript-eslint/utils": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/type-utils": "5.47.0", + "@typescript-eslint/utils": "5.47.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -735,14 +735,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.46.0.tgz", - "integrity": "sha512-joNO6zMGUZg+C73vwrKXCd8usnsmOYmgW/w5ZW0pG0RGvqeznjtGDk61EqqTpNrFLUYBW2RSBFrxdAZMqA4OZA==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.0.tgz", + "integrity": "sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/typescript-estree": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/typescript-estree": "5.47.0", "debug": "^4.3.4" }, "engines": { @@ -762,13 +762,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.46.0.tgz", - "integrity": "sha512-7wWBq9d/GbPiIM6SqPK9tfynNxVbfpihoY5cSFMer19OYUA3l4powA2uv0AV2eAZV6KoAh6lkzxv4PoxOLh1oA==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz", + "integrity": "sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/visitor-keys": "5.46.0" + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/visitor-keys": "5.47.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -779,13 +779,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.46.0.tgz", - "integrity": "sha512-dwv4nimVIAsVS2dTA0MekkWaRnoYNXY26dKz8AN5W3cBFYwYGFQEqm/cG+TOoooKlncJS4RTbFKgcFY/pOiBCg==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.0.tgz", + "integrity": "sha512-1J+DFFrYoDUXQE1b7QjrNGARZE6uVhBqIvdaXTe5IN+NmEyD68qXR1qX1g2u4voA+nCaelQyG8w30SAOihhEYg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.46.0", - "@typescript-eslint/utils": "5.46.0", + "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/utils": "5.47.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -806,9 +806,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.46.0.tgz", - "integrity": "sha512-wHWgQHFB+qh6bu0IAPAJCdeCdI0wwzZnnWThlmHNY01XJ9Z97oKqKOzWYpR2I83QmshhQJl6LDM9TqMiMwJBTw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.0.tgz", + "integrity": "sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -819,13 +819,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.0.tgz", - "integrity": "sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz", + "integrity": "sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/visitor-keys": "5.46.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/visitor-keys": "5.47.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -846,16 +846,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.46.0.tgz", - "integrity": "sha512-4O+Ps1CRDw+D+R40JYh5GlKLQERXRKW5yIQoNDpmXPJ+C7kaPF9R7GWl+PxGgXjB3PQCqsaaZUpZ9dG4U6DO7g==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.0.tgz", + "integrity": "sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/typescript-estree": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/typescript-estree": "5.47.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -894,12 +894,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.0.tgz", - "integrity": "sha512-E13gBoIXmaNhwjipuvQg1ByqSAu/GbEpP/qzFihugJ+MomtoJtFAJG/+2DRPByf57B863m0/q7Zt16V9ohhANw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz", + "integrity": "sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.46.0", + "@typescript-eslint/types": "5.47.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1652,9 +1652,9 @@ } }, "node_modules/esbuild": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.4.tgz", - "integrity": "sha512-qQrPMQpPTWf8jHugLWHoGqZjApyx3OEm76dlTXobHwh/EBbavbRdjXdYi/GWr43GyN0sfpap14GPkb05NH3ROA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.10.tgz", + "integrity": "sha512-z5dIViHoVnw2l+NCJ3zj5behdXjYvXne9gL18OOivCadXDUhyDkeSvEtLcGVAJW2fNmh33TDUpsi704XYlDodw==", "dev": true, "hasInstallScript": true, "bin": { @@ -1664,28 +1664,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.16.4", - "@esbuild/android-arm64": "0.16.4", - "@esbuild/android-x64": "0.16.4", - "@esbuild/darwin-arm64": "0.16.4", - "@esbuild/darwin-x64": "0.16.4", - "@esbuild/freebsd-arm64": "0.16.4", - "@esbuild/freebsd-x64": "0.16.4", - "@esbuild/linux-arm": "0.16.4", - "@esbuild/linux-arm64": "0.16.4", - "@esbuild/linux-ia32": "0.16.4", - "@esbuild/linux-loong64": "0.16.4", - "@esbuild/linux-mips64el": "0.16.4", - "@esbuild/linux-ppc64": "0.16.4", - "@esbuild/linux-riscv64": "0.16.4", - "@esbuild/linux-s390x": "0.16.4", - "@esbuild/linux-x64": "0.16.4", - "@esbuild/netbsd-x64": "0.16.4", - "@esbuild/openbsd-x64": "0.16.4", - "@esbuild/sunos-x64": "0.16.4", - "@esbuild/win32-arm64": "0.16.4", - "@esbuild/win32-ia32": "0.16.4", - "@esbuild/win32-x64": "0.16.4" + "@esbuild/android-arm": "0.16.10", + "@esbuild/android-arm64": "0.16.10", + "@esbuild/android-x64": "0.16.10", + "@esbuild/darwin-arm64": "0.16.10", + "@esbuild/darwin-x64": "0.16.10", + "@esbuild/freebsd-arm64": "0.16.10", + "@esbuild/freebsd-x64": "0.16.10", + "@esbuild/linux-arm": "0.16.10", + "@esbuild/linux-arm64": "0.16.10", + "@esbuild/linux-ia32": "0.16.10", + "@esbuild/linux-loong64": "0.16.10", + "@esbuild/linux-mips64el": "0.16.10", + "@esbuild/linux-ppc64": "0.16.10", + "@esbuild/linux-riscv64": "0.16.10", + "@esbuild/linux-s390x": "0.16.10", + "@esbuild/linux-x64": "0.16.10", + "@esbuild/netbsd-x64": "0.16.10", + "@esbuild/openbsd-x64": "0.16.10", + "@esbuild/sunos-x64": "0.16.10", + "@esbuild/win32-arm64": "0.16.10", + "@esbuild/win32-ia32": "0.16.10", + "@esbuild/win32-x64": "0.16.10" } }, "node_modules/escape-string-regexp": { @@ -1698,13 +1698,13 @@ } }, "node_modules/eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -1723,7 +1723,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -2177,9 +2177,9 @@ } }, "node_modules/espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -2525,9 +2525,9 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -4134,9 +4134,9 @@ } }, "node_modules/playwright-core": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", - "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.1.tgz", + "integrity": "sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg==", "dev": true, "bin": { "playwright": "cli.js" @@ -5478,169 +5478,169 @@ "requires": {} }, "@esbuild/android-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.4.tgz", - "integrity": "sha512-rZzb7r22m20S1S7ufIc6DC6W659yxoOrl7sKP1nCYhuvUlnCFHVSbATG4keGUtV8rDz11sRRDbWkvQZpzPaHiw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.10.tgz", + "integrity": "sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.4.tgz", - "integrity": "sha512-VPuTzXFm/m2fcGfN6CiwZTlLzxrKsWbPkG7ArRFpuxyaHUm/XFHQPD4xNwZT6uUmpIHhnSjcaCmcla8COzmZ5Q==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz", + "integrity": "sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.4.tgz", - "integrity": "sha512-MW+B2O++BkcOfMWmuHXB15/l1i7wXhJFqbJhp82IBOais8RBEQv2vQz/jHrDEHaY2X0QY7Wfw86SBL2PbVOr0g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.10.tgz", + "integrity": "sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.4.tgz", - "integrity": "sha512-a28X1O//aOfxwJVZVs7ZfM8Tyih2Za4nKJrBwW5Wm4yKsnwBy9aiS/xwpxiiTRttw3EaTg4Srerhcm6z0bu9Wg==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.10.tgz", + "integrity": "sha512-bH/bpFwldyOKdi9HSLCLhhKeVgRYr9KblchwXgY2NeUHBB/BzTUHtUSBgGBmpydB1/4E37m+ggXXfSrnD7/E7g==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.4.tgz", - "integrity": "sha512-e3doCr6Ecfwd7VzlaQqEPrnbvvPjE9uoTpxG5pyLzr2rI2NMjDHmvY1E5EO81O/e9TUOLLkXA5m6T8lfjK9yAA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz", + "integrity": "sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.4.tgz", - "integrity": "sha512-Oup3G/QxBgvvqnXWrBed7xxkFNwAwJVHZcklWyQt7YCAL5bfUkaa6FVWnR78rNQiM8MqqLiT6ZTZSdUFuVIg1w==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz", + "integrity": "sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.4.tgz", - "integrity": "sha512-vAP+eYOxlN/Bpo/TZmzEQapNS8W1njECrqkTpNgvXskkkJC2AwOXwZWai/Kc2vEFZUXQttx6UJbj9grqjD/+9Q==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz", + "integrity": "sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.4.tgz", - "integrity": "sha512-A47ZmtpIPyERxkSvIv+zLd6kNIOtJH03XA0Hy7jaceRDdQaQVGSDt4mZqpWqJYgDk9rg96aglbF6kCRvPGDSUA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz", + "integrity": "sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.4.tgz", - "integrity": "sha512-2zXoBhv4r5pZiyjBKrOdFP4CXOChxXiYD50LRUU+65DkdS5niPFHbboKZd/c81l0ezpw7AQnHeoCy5hFrzzs4g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz", + "integrity": "sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.4.tgz", - "integrity": "sha512-uxdSrpe9wFhz4yBwt2kl2TxS/NWEINYBUFIxQtaEVtglm1eECvsj1vEKI0KX2k2wCe17zDdQ3v+jVxfwVfvvjw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz", + "integrity": "sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.4.tgz", - "integrity": "sha512-peDrrUuxbZ9Jw+DwLCh/9xmZAk0p0K1iY5d2IcwmnN+B87xw7kujOkig6ZRcZqgrXgeRGurRHn0ENMAjjD5DEg==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz", + "integrity": "sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.4.tgz", - "integrity": "sha512-sD9EEUoGtVhFjjsauWjflZklTNr57KdQ6xfloO4yH1u7vNQlOfAlhEzbyBKfgbJlW7rwXYBdl5/NcZ+Mg2XhQA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz", + "integrity": "sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.4.tgz", - "integrity": "sha512-X1HSqHUX9D+d0l6/nIh4ZZJ94eQky8d8z6yxAptpZE3FxCWYWvTDd9X9ST84MGZEJx04VYUD/AGgciddwO0b8g==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz", + "integrity": "sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.4.tgz", - "integrity": "sha512-97ANpzyNp0GTXCt6SRdIx1ngwncpkV/z453ZuxbnBROCJ5p/55UjhbaG23UdHj88fGWLKPFtMoU4CBacz4j9FA==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz", + "integrity": "sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.4.tgz", - "integrity": "sha512-pUvPQLPmbEeJRPjP0DYTC1vjHyhrnCklQmCGYbipkep+oyfTn7GTBJXoPodR7ZS5upmEyc8lzAkn2o29wD786A==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz", + "integrity": "sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.4.tgz", - "integrity": "sha512-N55Q0mJs3Sl8+utPRPBrL6NLYZKBCLLx0bme/+RbjvMforTGGzFvsRl4xLTZMUBFC1poDzBEPTEu5nxizQ9Nlw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz", + "integrity": "sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.4.tgz", - "integrity": "sha512-LHSJLit8jCObEQNYkgsDYBh2JrJT53oJO2HVdkSYLa6+zuLJh0lAr06brXIkljrlI+N7NNW1IAXGn/6IZPi3YQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz", + "integrity": "sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.4.tgz", - "integrity": "sha512-nLgdc6tWEhcCFg/WVFaUxHcPK3AP/bh+KEwKtl69Ay5IBqUwKDaq/6Xk0E+fh/FGjnLwqFSsarsbPHeKM8t8Sw==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz", + "integrity": "sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.4.tgz", - "integrity": "sha512-08SluG24GjPO3tXKk95/85n9kpyZtXCVwURR2i4myhrOfi3jspClV0xQQ0W0PYWHioJj+LejFMt41q+PG3mlAQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz", + "integrity": "sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.4.tgz", - "integrity": "sha512-yYiRDQcqLYQSvNQcBKN7XogbrSvBE45FEQdH8fuXPl7cngzkCvpsG2H9Uey39IjQ6gqqc+Q4VXYHsQcKW0OMjQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz", + "integrity": "sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.4.tgz", - "integrity": "sha512-5rabnGIqexekYkh9zXG5waotq8mrdlRoBqAktjx2W3kb0zsI83mdCwrcAeKYirnUaTGztR5TxXcXmQrEzny83w==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz", + "integrity": "sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.4.tgz", - "integrity": "sha512-sN/I8FMPtmtT2Yw+Dly8Ur5vQ5a/RmC8hW7jO9PtPSQUPkowxWpcUZnqOggU7VwyT3Xkj6vcXWd3V/qTXwultQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz", + "integrity": "sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw==", "dev": true, "optional": true }, "@eslint/eslintrc": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.3.tgz", - "integrity": "sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.0.tgz", + "integrity": "sha512-7yfvXy6MWLgWSFsLhz5yH3iQ52St8cdUY6FoGieKkRDVxuxmrNuUetIuu6cmjNWwniUHiWXjxCr5tTXDrbYS5A==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.4.0", - "globals": "^13.15.0", + "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -5669,14 +5669,14 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.6.tgz", - "integrity": "sha512-jJr+hPTJYKyDILJfhNSHsjiwXYf26Flsz8DvNndOsHs5pwSnpGUEy8yzF0JYhCEvTDdV2vuOK5tt8BVhwO5/hg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, "@humanwhocodes/module-importer": { @@ -5754,13 +5754,13 @@ } }, "@playwright/test": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", - "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.1.tgz", + "integrity": "sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.28.1" + "playwright-core": "1.29.1" } }, "@tsconfig/node10": { @@ -5807,9 +5807,9 @@ "peer": true }, "@types/node": { - "version": "18.11.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.13.tgz", - "integrity": "sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w==", + "version": "18.11.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.17.tgz", + "integrity": "sha512-HJSUJmni4BeDHhfzn6nF0sVmd1SMezP7/4F0Lq+aXzmp2xm9O7WXrUtHW/CHlYVtZUbByEvWidHqRtcJXGF2Ng==", "dev": true }, "@types/normalize-package-data": { @@ -5839,14 +5839,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.0.tgz", - "integrity": "sha512-QrZqaIOzJAjv0sfjY4EjbXUi3ZOFpKfzntx22gPGr9pmFcTjcFw/1sS1LJhEubfAGwuLjNrPV0rH+D1/XZFy7Q==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.0.tgz", + "integrity": "sha512-AHZtlXAMGkDmyLuLZsRpH3p4G/1iARIwc/T0vIem2YB+xW6pZaXYXzCBnZSF/5fdM97R9QqZWZ+h3iW10XgevQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/type-utils": "5.46.0", - "@typescript-eslint/utils": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/type-utils": "5.47.0", + "@typescript-eslint/utils": "5.47.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -5856,53 +5856,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.46.0.tgz", - "integrity": "sha512-joNO6zMGUZg+C73vwrKXCd8usnsmOYmgW/w5ZW0pG0RGvqeznjtGDk61EqqTpNrFLUYBW2RSBFrxdAZMqA4OZA==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.0.tgz", + "integrity": "sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/typescript-estree": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/typescript-estree": "5.47.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.46.0.tgz", - "integrity": "sha512-7wWBq9d/GbPiIM6SqPK9tfynNxVbfpihoY5cSFMer19OYUA3l4powA2uv0AV2eAZV6KoAh6lkzxv4PoxOLh1oA==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz", + "integrity": "sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/visitor-keys": "5.46.0" + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/visitor-keys": "5.47.0" } }, "@typescript-eslint/type-utils": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.46.0.tgz", - "integrity": "sha512-dwv4nimVIAsVS2dTA0MekkWaRnoYNXY26dKz8AN5W3cBFYwYGFQEqm/cG+TOoooKlncJS4RTbFKgcFY/pOiBCg==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.0.tgz", + "integrity": "sha512-1J+DFFrYoDUXQE1b7QjrNGARZE6uVhBqIvdaXTe5IN+NmEyD68qXR1qX1g2u4voA+nCaelQyG8w30SAOihhEYg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.46.0", - "@typescript-eslint/utils": "5.46.0", + "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/utils": "5.47.0", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.46.0.tgz", - "integrity": "sha512-wHWgQHFB+qh6bu0IAPAJCdeCdI0wwzZnnWThlmHNY01XJ9Z97oKqKOzWYpR2I83QmshhQJl6LDM9TqMiMwJBTw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.0.tgz", + "integrity": "sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.0.tgz", - "integrity": "sha512-kDLNn/tQP+Yp8Ro2dUpyyVV0Ksn2rmpPpB0/3MO874RNmXtypMwSeazjEN/Q6CTp8D7ExXAAekPEcCEB/vtJkw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz", + "integrity": "sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q==", "dev": true, "requires": { - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/visitor-keys": "5.46.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/visitor-keys": "5.47.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5911,16 +5911,16 @@ } }, "@typescript-eslint/utils": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.46.0.tgz", - "integrity": "sha512-4O+Ps1CRDw+D+R40JYh5GlKLQERXRKW5yIQoNDpmXPJ+C7kaPF9R7GWl+PxGgXjB3PQCqsaaZUpZ9dG4U6DO7g==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.0.tgz", + "integrity": "sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.46.0", - "@typescript-eslint/types": "5.46.0", - "@typescript-eslint/typescript-estree": "5.46.0", + "@typescript-eslint/scope-manager": "5.47.0", + "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/typescript-estree": "5.47.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -5945,12 +5945,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.46.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.0.tgz", - "integrity": "sha512-E13gBoIXmaNhwjipuvQg1ByqSAu/GbEpP/qzFihugJ+MomtoJtFAJG/+2DRPByf57B863m0/q7Zt16V9ohhANw==", + "version": "5.47.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz", + "integrity": "sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.46.0", + "@typescript-eslint/types": "5.47.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -6506,33 +6506,33 @@ } }, "esbuild": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.4.tgz", - "integrity": "sha512-qQrPMQpPTWf8jHugLWHoGqZjApyx3OEm76dlTXobHwh/EBbavbRdjXdYi/GWr43GyN0sfpap14GPkb05NH3ROA==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.16.4", - "@esbuild/android-arm64": "0.16.4", - "@esbuild/android-x64": "0.16.4", - "@esbuild/darwin-arm64": "0.16.4", - "@esbuild/darwin-x64": "0.16.4", - "@esbuild/freebsd-arm64": "0.16.4", - "@esbuild/freebsd-x64": "0.16.4", - "@esbuild/linux-arm": "0.16.4", - "@esbuild/linux-arm64": "0.16.4", - "@esbuild/linux-ia32": "0.16.4", - "@esbuild/linux-loong64": "0.16.4", - "@esbuild/linux-mips64el": "0.16.4", - "@esbuild/linux-ppc64": "0.16.4", - "@esbuild/linux-riscv64": "0.16.4", - "@esbuild/linux-s390x": "0.16.4", - "@esbuild/linux-x64": "0.16.4", - "@esbuild/netbsd-x64": "0.16.4", - "@esbuild/openbsd-x64": "0.16.4", - "@esbuild/sunos-x64": "0.16.4", - "@esbuild/win32-arm64": "0.16.4", - "@esbuild/win32-ia32": "0.16.4", - "@esbuild/win32-x64": "0.16.4" + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.10.tgz", + "integrity": "sha512-z5dIViHoVnw2l+NCJ3zj5behdXjYvXne9gL18OOivCadXDUhyDkeSvEtLcGVAJW2fNmh33TDUpsi704XYlDodw==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.16.10", + "@esbuild/android-arm64": "0.16.10", + "@esbuild/android-x64": "0.16.10", + "@esbuild/darwin-arm64": "0.16.10", + "@esbuild/darwin-x64": "0.16.10", + "@esbuild/freebsd-arm64": "0.16.10", + "@esbuild/freebsd-x64": "0.16.10", + "@esbuild/linux-arm": "0.16.10", + "@esbuild/linux-arm64": "0.16.10", + "@esbuild/linux-ia32": "0.16.10", + "@esbuild/linux-loong64": "0.16.10", + "@esbuild/linux-mips64el": "0.16.10", + "@esbuild/linux-ppc64": "0.16.10", + "@esbuild/linux-riscv64": "0.16.10", + "@esbuild/linux-s390x": "0.16.10", + "@esbuild/linux-x64": "0.16.10", + "@esbuild/netbsd-x64": "0.16.10", + "@esbuild/openbsd-x64": "0.16.10", + "@esbuild/sunos-x64": "0.16.10", + "@esbuild/win32-arm64": "0.16.10", + "@esbuild/win32-ia32": "0.16.10", + "@esbuild/win32-x64": "0.16.10" } }, "escape-string-regexp": { @@ -6542,13 +6542,13 @@ "dev": true }, "eslint": { - "version": "8.29.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.29.0.tgz", - "integrity": "sha512-isQ4EEiyUjZFbEKvEGJKKGBwXtvXX+zJbkVKCgTuB9t/+jUBcy8avhkEwWJecI15BkRkOYmvIM5ynbhRjEkoeg==", + "version": "8.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.30.0.tgz", + "integrity": "sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.3", - "@humanwhocodes/config-array": "^0.11.6", + "@eslint/eslintrc": "^1.4.0", + "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -6567,7 +6567,7 @@ "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.15.0", + "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", @@ -6890,9 +6890,9 @@ "dev": true }, "espree": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", - "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", + "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", "dev": true, "requires": { "acorn": "^8.8.0", @@ -7154,9 +7154,9 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -8318,9 +8318,9 @@ "dev": true }, "playwright-core": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", - "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.1.tgz", + "integrity": "sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg==", "dev": true }, "postcss": { From 564ecbef88033b9fe57dcd8ca32af39ea70dfa41 Mon Sep 17 00:00:00 2001 From: yinonov Date: Fri, 23 Dec 2022 11:45:58 +0200 Subject: [PATCH 06/51] shadow observar works --- src/popover.ts | 114 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 20 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 3b3883b..0dd7b6d 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,10 +1,49 @@ -import { querySelectorAllDeep } from 'query-selector-shadow-dom'; +const popoverSet = new Set(); + +const childOListCallback = (mutation: MutationRecord) => { + if (mutation.addedNodes.length > 0) { + mutation.addedNodes.forEach((node) => { + if (node instanceof HTMLElement) { + if (node.hasAttribute('popover')) { + console.log(node); + popoverSet.add(node); + } + } + }); + } -function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { + if (mutation.removedNodes.length > 0) { + console.log('do something about removed nodes'); + } +}; + +const callback = (mutationList: MutationRecord[]) => { + mutationList.forEach((mutation) => { + switch (mutation.type) { + case 'attributes': + switch (mutation.attributeName) { + case 'popover': + console.log('do something about popover attribute'); + break; + } + break; + case 'childList': + childOListCallback(mutation); + } + }); +}; + +const observer = new MutationObserver(callback); + +function patchAttachShadow() { Element.prototype._originalAttachShadow = Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { const shadowRoot = this._originalAttachShadow(init); - callback(shadowRoot); + observer.observe(shadowRoot, { + attributeFilter: ['popover'], + childList: true, + subtree: true, + }); return shadowRoot; }; } @@ -27,25 +66,58 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -export function apply() { - // Create an observer instance linked to the callback function - const observer = new MutationObserver(console.log); +class PopoverObserver { + #popovers = new Set(); - const config = { - attributeFilter: ['popover'], - childList: true, - subtree: true, - }; + #observer = new MutationObserver(this.#callback); - // observe the document itself - observer.observe(document, config); + #userPopoverChanged(target: Node) { + console.log(target); + } - function interceptor(shadowRoot: ShadowRoot) { - // observe attached shadow - observer.observe(shadowRoot, config); + #callback(mutationList: MutationRecord[]) { + mutationList.forEach((mutation) => { + switch (mutation.type) { + case 'attributes': + switch (mutation.attributeName) { + case 'popover': + this.#userPopoverChanged(mutation.target); + break; + } + break; + } + }); } - patchAttachShadow(interceptor); + add(tree: Document | ShadowRoot) { + const popovers = tree.querySelectorAll('[popover]'); + console.log(tree); + + popovers.forEach((popover) => { + console.log(popover instanceof HTMLElement); + if (popover instanceof HTMLElement) { + this.#popovers.add(popover); + console.log([...this.#popovers]); + } + }); + + this.#observer.observe(tree, { + attributeFilter: ['popover'], + childList: true, + subtree: true, + }); + } + + // get popovers() { + // return this.#popovers; + // } +} + +export function apply() { + // const popoverObserver = new PopoverObserver(); + // popoverObserver.add(document); + // patchAttachShadow((shadowRoot) => popoverObserver.add(shadowRoot)); + patchAttachShadow(); const visibleElements = new WeakSet(); @@ -152,10 +224,12 @@ export function apply() { } } + // extract to class getter + const openPopovers = [...popoverSet].filter((popoverEl) => + popoverEl.classList.contains(':open'), + ); // Dismiss open Popovers - for (const popover of querySelectorAllDeep( - '[popover="" i].\\:open, [popover=auto i].\\:open', - )) { + for (const popover of openPopovers) { if (popover instanceof HTMLElement && popover !== effectedPopover) popover.hidePopover(); } From b824ad09b8afa826a28b02771b0d187f46bdea52 Mon Sep 17 00:00:00 2001 From: yinonov Date: Fri, 23 Dec 2022 11:48:26 +0200 Subject: [PATCH 07/51] comment out class temporarily --- src/popover.ts | 92 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 0dd7b6d..ed6936d 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -66,52 +66,52 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -class PopoverObserver { - #popovers = new Set(); - - #observer = new MutationObserver(this.#callback); - - #userPopoverChanged(target: Node) { - console.log(target); - } - - #callback(mutationList: MutationRecord[]) { - mutationList.forEach((mutation) => { - switch (mutation.type) { - case 'attributes': - switch (mutation.attributeName) { - case 'popover': - this.#userPopoverChanged(mutation.target); - break; - } - break; - } - }); - } - - add(tree: Document | ShadowRoot) { - const popovers = tree.querySelectorAll('[popover]'); - console.log(tree); - - popovers.forEach((popover) => { - console.log(popover instanceof HTMLElement); - if (popover instanceof HTMLElement) { - this.#popovers.add(popover); - console.log([...this.#popovers]); - } - }); - - this.#observer.observe(tree, { - attributeFilter: ['popover'], - childList: true, - subtree: true, - }); - } - - // get popovers() { - // return this.#popovers; - // } -} +// class PopoverObserver { +// #popovers = new Set(); + +// #observer = new MutationObserver(this.#callback); + +// #userPopoverChanged(target: Node) { +// console.log(target); +// } + +// #callback(mutationList: MutationRecord[]) { +// mutationList.forEach((mutation) => { +// switch (mutation.type) { +// case 'attributes': +// switch (mutation.attributeName) { +// case 'popover': +// this.#userPopoverChanged(mutation.target); +// break; +// } +// break; +// } +// }); +// } + +// add(tree: Document | ShadowRoot) { +// const popovers = tree.querySelectorAll('[popover]'); +// console.log(tree); + +// popovers.forEach((popover) => { +// console.log(popover instanceof HTMLElement); +// if (popover instanceof HTMLElement) { +// this.#popovers.add(popover); +// console.log([...this.#popovers]); +// } +// }); + +// this.#observer.observe(tree, { +// attributeFilter: ['popover'], +// childList: true, +// subtree: true, +// }); +// } + +// // get popovers() { +// // return this.#popovers; +// // } +// } export function apply() { // const popoverObserver = new PopoverObserver(); From 77732e152e6afd9fdc2bfb856574e3b3af378eb2 Mon Sep 17 00:00:00 2001 From: yinonov Date: Fri, 23 Dec 2022 11:50:42 +0200 Subject: [PATCH 08/51] remove query-selector-shadow-dom --- package-lock.json | 582 ++++++++++++++++++++++------------------------ package.json | 2 - 2 files changed, 278 insertions(+), 306 deletions(-) diff --git a/package-lock.json b/package-lock.json index 56a5d18..bacbc2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@playwright/test": "^1.29.0", "@types/node": "^18.11.17", - "@types/query-selector-shadow-dom": "^1.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "esbuild": "^0.16.9", @@ -25,7 +24,6 @@ "lint-staged": "^13.1.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.1", - "query-selector-shadow-dom": "^1.0.1", "stylelint-config-standard": "^29.0.0", "stylis": "^4.1.3", "ts-node": "^10.9.1", @@ -101,9 +99,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.10.tgz", - "integrity": "sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.9.tgz", + "integrity": "sha512-kW5ccqWHVOOTGUkkJbtfoImtqu3kA1PFkivM+9QPFSHphPfPBlBalX9eDRqPK+wHCqKhU48/78T791qPgC9e9A==", "cpu": [ "arm" ], @@ -117,9 +115,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz", - "integrity": "sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.9.tgz", + "integrity": "sha512-ndIAZJUeLx4O+4AJbFQCurQW4VRUXjDsUvt1L+nP8bVELOWdmdCEOtlIweCUE6P+hU0uxYbEK2AEP0n5IVQvhg==", "cpu": [ "arm64" ], @@ -133,9 +131,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.10.tgz", - "integrity": "sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.9.tgz", + "integrity": "sha512-UbMcJB4EHrAVOnknQklREPgclNU2CPet2h+sCBCXmF2mfoYWopBn/CfTfeyOkb/JglOcdEADqAljFndMKnFtOw==", "cpu": [ "x64" ], @@ -149,9 +147,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.10.tgz", - "integrity": "sha512-bH/bpFwldyOKdi9HSLCLhhKeVgRYr9KblchwXgY2NeUHBB/BzTUHtUSBgGBmpydB1/4E37m+ggXXfSrnD7/E7g==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.9.tgz", + "integrity": "sha512-d7D7/nrt4CxPul98lx4PXhyNZwTYtbdaHhOSdXlZuu5zZIznjqtMqLac8Bv+IuT6SVHiHUwrkL6ywD7mOgLW+A==", "cpu": [ "arm64" ], @@ -165,9 +163,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz", - "integrity": "sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.9.tgz", + "integrity": "sha512-LZc+Wlz06AkJYtwWsBM3x2rSqTG8lntDuftsUNQ3fCx9ZttYtvlDcVtgb+NQ6t9s6K5No5zutN3pcjZEC2a4iQ==", "cpu": [ "x64" ], @@ -181,9 +179,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz", - "integrity": "sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.9.tgz", + "integrity": "sha512-gIj0UQZlQo93CHYouHKkpzP7AuruSaMIm1etcWIxccFEVqCN1xDr6BWlN9bM+ol/f0W9w3hx3HDuEwcJVtGneQ==", "cpu": [ "arm64" ], @@ -197,9 +195,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz", - "integrity": "sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.9.tgz", + "integrity": "sha512-GNors4vaMJ7lzGOuhzNc7jvgsQZqErGA8rsW+nck8N1nYu86CvsJW2seigVrQQWOV4QzEP8Zf3gm+QCjA2hnBQ==", "cpu": [ "x64" ], @@ -213,9 +211,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz", - "integrity": "sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.9.tgz", + "integrity": "sha512-cNx1EF99c2t1Ztn0lk9N+MuwBijGF8mH6nx9GFsB3e0lpUpPkCE/yt5d+7NP9EwJf5uzqdjutgVYoH1SNqzudA==", "cpu": [ "arm" ], @@ -229,9 +227,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz", - "integrity": "sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.9.tgz", + "integrity": "sha512-YPxQunReYp8RQ1FvexFrOEqqf+nLbS3bKVZF5FRT2uKM7Wio7BeATqAwO02AyrdSEntt3I5fhFsujUChIa8CZg==", "cpu": [ "arm64" ], @@ -245,9 +243,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz", - "integrity": "sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.9.tgz", + "integrity": "sha512-zb12ixDIKNwFpIqR00J88FFitVwOEwO78EiUi8wi8FXlmSc3GtUuKV/BSO+730Kglt0B47+ZrJN1BhhOxZaVrw==", "cpu": [ "ia32" ], @@ -261,9 +259,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz", - "integrity": "sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.9.tgz", + "integrity": "sha512-X8te4NLxtHiNT6H+4Pfm5RklzItA1Qy4nfyttihGGX+Koc53Ar20ViC+myY70QJ8PDEOehinXZj/F7QK3A+MKQ==", "cpu": [ "loong64" ], @@ -277,9 +275,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz", - "integrity": "sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.9.tgz", + "integrity": "sha512-ZqyMDLt02c5smoS3enlF54ndK5zK4IpClLTxF0hHfzHJlfm4y8IAkIF8LUW0W7zxcKy7oAwI7BRDqeVvC120SA==", "cpu": [ "mips64el" ], @@ -293,9 +291,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz", - "integrity": "sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.9.tgz", + "integrity": "sha512-k+ca5W5LDBEF3lfDwMV6YNXwm4wEpw9krMnNvvlNz3MrKSD2Eb2c861O0MaKrZkG/buTQAP4vkavbLwgIe6xjg==", "cpu": [ "ppc64" ], @@ -309,9 +307,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz", - "integrity": "sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.9.tgz", + "integrity": "sha512-GuInVdogjmg9DhgkEmNipHkC+3tzkanPJzgzTC2ihsvrruLyFoR1YrTGixblNSMPudQLpiqkcwGwwe0oqfrvfA==", "cpu": [ "riscv64" ], @@ -325,9 +323,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz", - "integrity": "sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.9.tgz", + "integrity": "sha512-49wQ0aYkvwXonGsxc7LuuLNICMX8XtO92Iqmug5Qau0kpnV6SP34jk+jIeu4suHwAbSbRhVFtDv75yRmyfQcHw==", "cpu": [ "s390x" ], @@ -341,9 +339,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz", - "integrity": "sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.9.tgz", + "integrity": "sha512-Nx4oKEAJ6EcQlt4dK7qJyuZUoXZG7CAeY22R7rqZijFzwFfMOD+gLP56uV7RrV86jGf8PeRY8TBsRmOcZoG42w==", "cpu": [ "x64" ], @@ -357,9 +355,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz", - "integrity": "sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.9.tgz", + "integrity": "sha512-d0WnpgJ+FTiMZXEQ1NOv9+0gvEhttbgKEvVqWWAtl1u9AvlspKXbodKHzQ5MLP6YV1y52Xp+p8FMYqj8ykTahg==", "cpu": [ "x64" ], @@ -373,9 +371,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz", - "integrity": "sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.9.tgz", + "integrity": "sha512-jccK11278dvEscHFfMk5EIPjF4wv1qGD0vps7mBV1a6TspdR36O28fgPem/SA/0pcsCPHjww5ouCLwP+JNAFlw==", "cpu": [ "x64" ], @@ -389,9 +387,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz", - "integrity": "sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.9.tgz", + "integrity": "sha512-OetwTSsv6mIDLqN7I7I2oX9MmHGwG+AP+wKIHvq+6sIHwcPPJqRx+DJB55jy9JG13CWcdcQno/7V5MTJ5a0xfQ==", "cpu": [ "x64" ], @@ -405,9 +403,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz", - "integrity": "sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.9.tgz", + "integrity": "sha512-tKSSSK6unhxbGbHg+Cc+JhRzemkcsX0tPBvG0m5qsWbkShDK9c+/LSb13L18LWVdOQZwuA55Vbakxmt6OjBDOQ==", "cpu": [ "arm64" ], @@ -421,9 +419,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz", - "integrity": "sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.9.tgz", + "integrity": "sha512-ZTQ5vhNS5gli0KK8I6/s6+LwXmNEfq1ftjnSVyyNm33dBw8zDpstqhGXYUbZSWWLvkqiRRjgxgmoncmi6Yy7Ng==", "cpu": [ "ia32" ], @@ -437,9 +435,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz", - "integrity": "sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.9.tgz", + "integrity": "sha512-C4ZX+YFIp6+lPrru3tpH6Gaapy8IBRHw/e7l63fzGDhn/EaiGpQgbIlT5paByyy+oMvRFQoxxyvC4LE0AjJMqQ==", "cpu": [ "x64" ], @@ -611,13 +609,13 @@ } }, "node_modules/@playwright/test": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.1.tgz", - "integrity": "sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.0.tgz", + "integrity": "sha512-gp5PVBenxTJsm2bATWDNc2CCnrL5OaA/MXQdJwwkGQtqTjmY+ZOqAdLqo49O9MLTDh2vYh+tHWDnmFsILnWaeA==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.29.1" + "playwright-core": "1.29.0" }, "bin": { "playwright": "cli.js" @@ -689,12 +687,6 @@ "dev": true, "peer": true }, - "node_modules/@types/query-selector-shadow-dom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.0.tgz", - "integrity": "sha512-cTGo8ZxW0WXFDV7gvL/XCq4213t6S/yWaSGqscnXUTNDWqwnsYKegB/VAzQDwzmACoLzIbGbYXdjJOgfPLu7Ig==", - "dev": true - }, "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -702,14 +694,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.0.tgz", - "integrity": "sha512-AHZtlXAMGkDmyLuLZsRpH3p4G/1iARIwc/T0vIem2YB+xW6pZaXYXzCBnZSF/5fdM97R9QqZWZ+h3iW10XgevQ==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.1.tgz", + "integrity": "sha512-YpzNv3aayRBwjs4J3oz65eVLXc9xx0PDbIRisHj+dYhvBn02MjYOD96P8YGiWEIFBrojaUjxvkaUpakD82phsA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/type-utils": "5.47.0", - "@typescript-eslint/utils": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/type-utils": "5.46.1", + "@typescript-eslint/utils": "5.46.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -735,14 +727,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.0.tgz", - "integrity": "sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.46.1.tgz", + "integrity": "sha512-RelQ5cGypPh4ySAtfIMBzBGyrNerQcmfA1oJvPj5f+H4jI59rl9xxpn4bonC0tQvUKOEN7eGBFWxFLK3Xepneg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/typescript-estree": "5.46.1", "debug": "^4.3.4" }, "engines": { @@ -762,13 +754,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz", - "integrity": "sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.46.1.tgz", + "integrity": "sha512-iOChVivo4jpwUdrJZyXSMrEIM/PvsbbDOX1y3UCKjSgWn+W89skxWaYXACQfxmIGhPVpRWK/VWPYc+bad6smIA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/visitor-keys": "5.47.0" + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/visitor-keys": "5.46.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -779,13 +771,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.0.tgz", - "integrity": "sha512-1J+DFFrYoDUXQE1b7QjrNGARZE6uVhBqIvdaXTe5IN+NmEyD68qXR1qX1g2u4voA+nCaelQyG8w30SAOihhEYg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.46.1.tgz", + "integrity": "sha512-V/zMyfI+jDmL1ADxfDxjZ0EMbtiVqj8LUGPAGyBkXXStWmCUErMpW873zEHsyguWCuq2iN4BrlWUkmuVj84yng==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.47.0", - "@typescript-eslint/utils": "5.47.0", + "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/utils": "5.46.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -806,9 +798,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.0.tgz", - "integrity": "sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.46.1.tgz", + "integrity": "sha512-Z5pvlCaZgU+93ryiYUwGwLl9AQVB/PQ1TsJ9NZ/gHzZjN7g9IAn6RSDkpCV8hqTwAiaj6fmCcKSQeBPlIpW28w==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -819,13 +811,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz", - "integrity": "sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.1.tgz", + "integrity": "sha512-j9W4t67QiNp90kh5Nbr1w92wzt+toiIsaVPnEblB2Ih2U9fqBTyqV9T3pYWZBRt6QoMh/zVWP59EpuCjc4VRBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/visitor-keys": "5.47.0", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/visitor-keys": "5.46.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -846,16 +838,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.0.tgz", - "integrity": "sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.46.1.tgz", + "integrity": "sha512-RBdBAGv3oEpFojaCYT4Ghn4775pdjvwfDOfQ2P6qzNVgQOVrnSPe5/Pb88kv7xzYQjoio0eKHKB9GJ16ieSxvA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/typescript-estree": "5.46.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -894,12 +886,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz", - "integrity": "sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.1.tgz", + "integrity": "sha512-jczZ9noovXwy59KjRTk1OftT78pwygdcmCuBf8yMoWt/8O8l+6x2LSEze0E4TeepXK4MezW3zGSyoDRZK7Y9cg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/types": "5.46.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -1652,9 +1644,9 @@ } }, "node_modules/esbuild": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.10.tgz", - "integrity": "sha512-z5dIViHoVnw2l+NCJ3zj5behdXjYvXne9gL18OOivCadXDUhyDkeSvEtLcGVAJW2fNmh33TDUpsi704XYlDodw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.9.tgz", + "integrity": "sha512-gkH83yHyijMSZcZFs1IWew342eMdFuWXmQo3zkDPTre25LIPBJsXryg02M3u8OpTwCJdBkdaQwqKkDLnAsAeLQ==", "dev": true, "hasInstallScript": true, "bin": { @@ -1664,28 +1656,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.16.10", - "@esbuild/android-arm64": "0.16.10", - "@esbuild/android-x64": "0.16.10", - "@esbuild/darwin-arm64": "0.16.10", - "@esbuild/darwin-x64": "0.16.10", - "@esbuild/freebsd-arm64": "0.16.10", - "@esbuild/freebsd-x64": "0.16.10", - "@esbuild/linux-arm": "0.16.10", - "@esbuild/linux-arm64": "0.16.10", - "@esbuild/linux-ia32": "0.16.10", - "@esbuild/linux-loong64": "0.16.10", - "@esbuild/linux-mips64el": "0.16.10", - "@esbuild/linux-ppc64": "0.16.10", - "@esbuild/linux-riscv64": "0.16.10", - "@esbuild/linux-s390x": "0.16.10", - "@esbuild/linux-x64": "0.16.10", - "@esbuild/netbsd-x64": "0.16.10", - "@esbuild/openbsd-x64": "0.16.10", - "@esbuild/sunos-x64": "0.16.10", - "@esbuild/win32-arm64": "0.16.10", - "@esbuild/win32-ia32": "0.16.10", - "@esbuild/win32-x64": "0.16.10" + "@esbuild/android-arm": "0.16.9", + "@esbuild/android-arm64": "0.16.9", + "@esbuild/android-x64": "0.16.9", + "@esbuild/darwin-arm64": "0.16.9", + "@esbuild/darwin-x64": "0.16.9", + "@esbuild/freebsd-arm64": "0.16.9", + "@esbuild/freebsd-x64": "0.16.9", + "@esbuild/linux-arm": "0.16.9", + "@esbuild/linux-arm64": "0.16.9", + "@esbuild/linux-ia32": "0.16.9", + "@esbuild/linux-loong64": "0.16.9", + "@esbuild/linux-mips64el": "0.16.9", + "@esbuild/linux-ppc64": "0.16.9", + "@esbuild/linux-riscv64": "0.16.9", + "@esbuild/linux-s390x": "0.16.9", + "@esbuild/linux-x64": "0.16.9", + "@esbuild/netbsd-x64": "0.16.9", + "@esbuild/openbsd-x64": "0.16.9", + "@esbuild/sunos-x64": "0.16.9", + "@esbuild/win32-arm64": "0.16.9", + "@esbuild/win32-ia32": "0.16.9", + "@esbuild/win32-x64": "0.16.9" } }, "node_modules/escape-string-regexp": { @@ -4134,9 +4126,9 @@ } }, "node_modules/playwright-core": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.1.tgz", - "integrity": "sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.0.tgz", + "integrity": "sha512-pboOm1m0RD6z1GtwAbEH60PYRfF87vKdzOSRw2RyO0Y0a7utrMyWN2Au1ojGvQr4umuBMODkKTv607YIRypDSQ==", "dev": true, "bin": { "playwright": "cli.js" @@ -4267,12 +4259,6 @@ "node": ">=6" } }, - "node_modules/query-selector-shadow-dom": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz", - "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", - "dev": true - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -5478,156 +5464,156 @@ "requires": {} }, "@esbuild/android-arm": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.10.tgz", - "integrity": "sha512-RmJjQTRrO6VwUWDrzTBLmV4OJZTarYsiepLGlF2rYTVB701hSorPywPGvP6d8HCuuRibyXa5JX4s3jN2kHEtjQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.9.tgz", + "integrity": "sha512-kW5ccqWHVOOTGUkkJbtfoImtqu3kA1PFkivM+9QPFSHphPfPBlBalX9eDRqPK+wHCqKhU48/78T791qPgC9e9A==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.10.tgz", - "integrity": "sha512-47Y+NwVKTldTlDhSgJHZ/RpvBQMUDG7eKihqaF/u6g7s0ZPz4J1vy8A3rwnnUOF2CuDn7w7Gj/QcMoWz3U3SJw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.9.tgz", + "integrity": "sha512-ndIAZJUeLx4O+4AJbFQCurQW4VRUXjDsUvt1L+nP8bVELOWdmdCEOtlIweCUE6P+hU0uxYbEK2AEP0n5IVQvhg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.10.tgz", - "integrity": "sha512-C4PfnrBMcuAcOurQzpF1tTtZz94IXO5JmICJJ3NFJRHbXXsQUg9RFG45KvydKqtFfBaFLCHpduUkUfXwIvGnRg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.9.tgz", + "integrity": "sha512-UbMcJB4EHrAVOnknQklREPgclNU2CPet2h+sCBCXmF2mfoYWopBn/CfTfeyOkb/JglOcdEADqAljFndMKnFtOw==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.10.tgz", - "integrity": "sha512-bH/bpFwldyOKdi9HSLCLhhKeVgRYr9KblchwXgY2NeUHBB/BzTUHtUSBgGBmpydB1/4E37m+ggXXfSrnD7/E7g==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.9.tgz", + "integrity": "sha512-d7D7/nrt4CxPul98lx4PXhyNZwTYtbdaHhOSdXlZuu5zZIznjqtMqLac8Bv+IuT6SVHiHUwrkL6ywD7mOgLW+A==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.10.tgz", - "integrity": "sha512-OXt7ijoLuy+AjDSKQWu+KdDFMBbdeaL6wtgMKtDUXKWHiAMKHan5+R1QAG6HD4+K0nnOvEJXKHeA9QhXNAjOTQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.9.tgz", + "integrity": "sha512-LZc+Wlz06AkJYtwWsBM3x2rSqTG8lntDuftsUNQ3fCx9ZttYtvlDcVtgb+NQ6t9s6K5No5zutN3pcjZEC2a4iQ==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.10.tgz", - "integrity": "sha512-shSQX/3GHuspE3Uxtq5kcFG/zqC+VuMnJkqV7LczO41cIe6CQaXHD3QdMLA4ziRq/m0vZo7JdterlgbmgNIAlQ==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.9.tgz", + "integrity": "sha512-gIj0UQZlQo93CHYouHKkpzP7AuruSaMIm1etcWIxccFEVqCN1xDr6BWlN9bM+ol/f0W9w3hx3HDuEwcJVtGneQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.10.tgz", - "integrity": "sha512-5YVc1zdeaJGASijZmTzSO4h6uKzsQGG3pkjI6fuXvolhm3hVRhZwnHJkforaZLmzvNv5Tb7a3QL2FAVmrgySIA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.9.tgz", + "integrity": "sha512-GNors4vaMJ7lzGOuhzNc7jvgsQZqErGA8rsW+nck8N1nYu86CvsJW2seigVrQQWOV4QzEP8Zf3gm+QCjA2hnBQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.10.tgz", - "integrity": "sha512-c360287ZWI2miBnvIj23bPyVctgzeMT2kQKR+x94pVqIN44h3GF8VMEs1SFPH1UgyDr3yBbx3vowDS1SVhyVhA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.9.tgz", + "integrity": "sha512-cNx1EF99c2t1Ztn0lk9N+MuwBijGF8mH6nx9GFsB3e0lpUpPkCE/yt5d+7NP9EwJf5uzqdjutgVYoH1SNqzudA==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.10.tgz", - "integrity": "sha512-2aqeNVxIaRfPcIaMZIFoblLh588sWyCbmj1HHCCs9WmeNWm+EIN0SmvsmPvTa/TsNZFKnxTcvkX2eszTcCqIrA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.9.tgz", + "integrity": "sha512-YPxQunReYp8RQ1FvexFrOEqqf+nLbS3bKVZF5FRT2uKM7Wio7BeATqAwO02AyrdSEntt3I5fhFsujUChIa8CZg==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.10.tgz", - "integrity": "sha512-sqMIEWeyrLGU7J5RB5fTkLRIFwsgsQ7ieWXlDLEmC2HblPYGb3AucD7inw2OrKFpRPKsec1l+lssiM3+NV5aOw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.9.tgz", + "integrity": "sha512-zb12ixDIKNwFpIqR00J88FFitVwOEwO78EiUi8wi8FXlmSc3GtUuKV/BSO+730Kglt0B47+ZrJN1BhhOxZaVrw==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.10.tgz", - "integrity": "sha512-O7Pd5hLEtTg37NC73pfhUOGTjx/+aXu5YoSq3ahCxcN7Bcr2F47mv+kG5t840thnsEzrv0oB70+LJu3gUgchvg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.9.tgz", + "integrity": "sha512-X8te4NLxtHiNT6H+4Pfm5RklzItA1Qy4nfyttihGGX+Koc53Ar20ViC+myY70QJ8PDEOehinXZj/F7QK3A+MKQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.10.tgz", - "integrity": "sha512-FN8mZOH7531iPHM0kaFhAOqqNHoAb6r/YHW2ZIxNi0a85UBi2DO4Vuyn7t1p4UN8a4LoAnLOT1PqNgHkgBJgbA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.9.tgz", + "integrity": "sha512-ZqyMDLt02c5smoS3enlF54ndK5zK4IpClLTxF0hHfzHJlfm4y8IAkIF8LUW0W7zxcKy7oAwI7BRDqeVvC120SA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.10.tgz", - "integrity": "sha512-Dg9RiqdvHOAWnOKIOTsIx8dFX9EDlY2IbPEY7YFzchrCiTZmMkD7jWA9UdZbNUygPjdmQBVPRCrLydReFlX9yg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.9.tgz", + "integrity": "sha512-k+ca5W5LDBEF3lfDwMV6YNXwm4wEpw9krMnNvvlNz3MrKSD2Eb2c861O0MaKrZkG/buTQAP4vkavbLwgIe6xjg==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.10.tgz", - "integrity": "sha512-XMqtpjwzbmlar0BJIxmzu/RZ7EWlfVfH68Vadrva0Wj5UKOdKvqskuev2jY2oPV3aoQUyXwnMbMrFmloO2GfAw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.9.tgz", + "integrity": "sha512-GuInVdogjmg9DhgkEmNipHkC+3tzkanPJzgzTC2ihsvrruLyFoR1YrTGixblNSMPudQLpiqkcwGwwe0oqfrvfA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.10.tgz", - "integrity": "sha512-fu7XtnoeRNFMx8DjK3gPWpFBDM2u5ba+FYwg27SjMJwKvJr4bDyKz5c+FLXLUSSAkMAt/UL+cUbEbra+rYtUgw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.9.tgz", + "integrity": "sha512-49wQ0aYkvwXonGsxc7LuuLNICMX8XtO92Iqmug5Qau0kpnV6SP34jk+jIeu4suHwAbSbRhVFtDv75yRmyfQcHw==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.10.tgz", - "integrity": "sha512-61lcjVC/RldNNMUzQQdyCWjCxp9YLEQgIxErxU9XluX7juBdGKb0pvddS0vPNuCvotRbzijZ1pzII+26haWzbA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.9.tgz", + "integrity": "sha512-Nx4oKEAJ6EcQlt4dK7qJyuZUoXZG7CAeY22R7rqZijFzwFfMOD+gLP56uV7RrV86jGf8PeRY8TBsRmOcZoG42w==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.10.tgz", - "integrity": "sha512-JeZXCX3viSA9j4HqSoygjssdqYdfHd6yCFWyfSekLbz4Ef+D2EjvsN02ZQPwYl5a5gg/ehdHgegHhlfOFP0HCA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.9.tgz", + "integrity": "sha512-d0WnpgJ+FTiMZXEQ1NOv9+0gvEhttbgKEvVqWWAtl1u9AvlspKXbodKHzQ5MLP6YV1y52Xp+p8FMYqj8ykTahg==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.10.tgz", - "integrity": "sha512-3qpxQKuEVIIg8SebpXsp82OBrqjPV/OwNWmG+TnZDr3VGyChNnGMHccC1xkbxCHDQNnnXjxhMQNyHmdFJbmbRA==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.9.tgz", + "integrity": "sha512-jccK11278dvEscHFfMk5EIPjF4wv1qGD0vps7mBV1a6TspdR36O28fgPem/SA/0pcsCPHjww5ouCLwP+JNAFlw==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.10.tgz", - "integrity": "sha512-z+q0xZ+et/7etz7WoMyXTHZ1rB8PMSNp/FOqURLJLOPb3GWJ2aj4oCqFCjPwEbW1rsT7JPpxeH/DwGAWk/I1Bg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.9.tgz", + "integrity": "sha512-OetwTSsv6mIDLqN7I7I2oX9MmHGwG+AP+wKIHvq+6sIHwcPPJqRx+DJB55jy9JG13CWcdcQno/7V5MTJ5a0xfQ==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.10.tgz", - "integrity": "sha512-+YYu5sbQ9npkNT9Dec+tn1F/kjg6SMgr6bfi/6FpXYZvCRfu2YFPZGb+3x8K30s8eRxFpoG4sGhiSUkr1xbHEw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.9.tgz", + "integrity": "sha512-tKSSSK6unhxbGbHg+Cc+JhRzemkcsX0tPBvG0m5qsWbkShDK9c+/LSb13L18LWVdOQZwuA55Vbakxmt6OjBDOQ==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.10.tgz", - "integrity": "sha512-Aw7Fupk7XNehR1ftHGYwUteyJ2q+em/aE+fVU3YMTBN2V5A7Z4aVCSV+SvCp9HIIHZavPFBpbdP3VfjQpdf6Xg==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.9.tgz", + "integrity": "sha512-ZTQ5vhNS5gli0KK8I6/s6+LwXmNEfq1ftjnSVyyNm33dBw8zDpstqhGXYUbZSWWLvkqiRRjgxgmoncmi6Yy7Ng==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.10.tgz", - "integrity": "sha512-qddWullt3sC1EIpfHvCRBq3H4g3L86DZpD6n8k2XFjFVyp01D++uNbN1hT/JRsHxTbyyemZcpwL5aRlJwc/zFw==", + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.9.tgz", + "integrity": "sha512-C4ZX+YFIp6+lPrru3tpH6Gaapy8IBRHw/e7l63fzGDhn/EaiGpQgbIlT5paByyy+oMvRFQoxxyvC4LE0AjJMqQ==", "dev": true, "optional": true }, @@ -5754,13 +5740,13 @@ } }, "@playwright/test": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.1.tgz", - "integrity": "sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.29.0.tgz", + "integrity": "sha512-gp5PVBenxTJsm2bATWDNc2CCnrL5OaA/MXQdJwwkGQtqTjmY+ZOqAdLqo49O9MLTDh2vYh+tHWDnmFsILnWaeA==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.29.1" + "playwright-core": "1.29.0" } }, "@tsconfig/node10": { @@ -5826,12 +5812,6 @@ "dev": true, "peer": true }, - "@types/query-selector-shadow-dom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.0.tgz", - "integrity": "sha512-cTGo8ZxW0WXFDV7gvL/XCq4213t6S/yWaSGqscnXUTNDWqwnsYKegB/VAzQDwzmACoLzIbGbYXdjJOgfPLu7Ig==", - "dev": true - }, "@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", @@ -5839,14 +5819,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.47.0.tgz", - "integrity": "sha512-AHZtlXAMGkDmyLuLZsRpH3p4G/1iARIwc/T0vIem2YB+xW6pZaXYXzCBnZSF/5fdM97R9QqZWZ+h3iW10XgevQ==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.46.1.tgz", + "integrity": "sha512-YpzNv3aayRBwjs4J3oz65eVLXc9xx0PDbIRisHj+dYhvBn02MjYOD96P8YGiWEIFBrojaUjxvkaUpakD82phsA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/type-utils": "5.47.0", - "@typescript-eslint/utils": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/type-utils": "5.46.1", + "@typescript-eslint/utils": "5.46.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -5856,53 +5836,53 @@ } }, "@typescript-eslint/parser": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.47.0.tgz", - "integrity": "sha512-udPU4ckK+R1JWCGdQC4Qa27NtBg7w020ffHqGyAK8pAgOVuNw7YaKXGChk+udh+iiGIJf6/E/0xhVXyPAbsczw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.46.1.tgz", + "integrity": "sha512-RelQ5cGypPh4ySAtfIMBzBGyrNerQcmfA1oJvPj5f+H4jI59rl9xxpn4bonC0tQvUKOEN7eGBFWxFLK3Xepneg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/typescript-estree": "5.46.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.47.0.tgz", - "integrity": "sha512-dvJab4bFf7JVvjPuh3sfBUWsiD73aiftKBpWSfi3sUkysDQ4W8x+ZcFpNp7Kgv0weldhpmMOZBjx1wKN8uWvAw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.46.1.tgz", + "integrity": "sha512-iOChVivo4jpwUdrJZyXSMrEIM/PvsbbDOX1y3UCKjSgWn+W89skxWaYXACQfxmIGhPVpRWK/VWPYc+bad6smIA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/visitor-keys": "5.47.0" + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/visitor-keys": "5.46.1" } }, "@typescript-eslint/type-utils": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.47.0.tgz", - "integrity": "sha512-1J+DFFrYoDUXQE1b7QjrNGARZE6uVhBqIvdaXTe5IN+NmEyD68qXR1qX1g2u4voA+nCaelQyG8w30SAOihhEYg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.46.1.tgz", + "integrity": "sha512-V/zMyfI+jDmL1ADxfDxjZ0EMbtiVqj8LUGPAGyBkXXStWmCUErMpW873zEHsyguWCuq2iN4BrlWUkmuVj84yng==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.47.0", - "@typescript-eslint/utils": "5.47.0", + "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/utils": "5.46.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.47.0.tgz", - "integrity": "sha512-eslFG0Qy8wpGzDdYKu58CEr3WLkjwC5Usa6XbuV89ce/yN5RITLe1O8e+WFEuxnfftHiJImkkOBADj58ahRxSg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.46.1.tgz", + "integrity": "sha512-Z5pvlCaZgU+93ryiYUwGwLl9AQVB/PQ1TsJ9NZ/gHzZjN7g9IAn6RSDkpCV8hqTwAiaj6fmCcKSQeBPlIpW28w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.0.tgz", - "integrity": "sha512-LxfKCG4bsRGq60Sqqu+34QT5qT2TEAHvSCCJ321uBWywgE2dS0LKcu5u+3sMGo+Vy9UmLOhdTw5JHzePV/1y4Q==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.46.1.tgz", + "integrity": "sha512-j9W4t67QiNp90kh5Nbr1w92wzt+toiIsaVPnEblB2Ih2U9fqBTyqV9T3pYWZBRt6QoMh/zVWP59EpuCjc4VRBg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/visitor-keys": "5.47.0", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/visitor-keys": "5.46.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -5911,16 +5891,16 @@ } }, "@typescript-eslint/utils": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.47.0.tgz", - "integrity": "sha512-U9xcc0N7xINrCdGVPwABjbAKqx4GK67xuMV87toI+HUqgXj26m6RBp9UshEXcTrgCkdGYFzgKLt8kxu49RilDw==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.46.1.tgz", + "integrity": "sha512-RBdBAGv3oEpFojaCYT4Ghn4775pdjvwfDOfQ2P6qzNVgQOVrnSPe5/Pb88kv7xzYQjoio0eKHKB9GJ16ieSxvA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.47.0", - "@typescript-eslint/types": "5.47.0", - "@typescript-eslint/typescript-estree": "5.47.0", + "@typescript-eslint/scope-manager": "5.46.1", + "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/typescript-estree": "5.46.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -5945,12 +5925,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.0.tgz", - "integrity": "sha512-ByPi5iMa6QqDXe/GmT/hR6MZtVPi0SqMQPDx15FczCBXJo/7M8T88xReOALAfpBLm+zxpPfmhuEvPb577JRAEg==", + "version": "5.46.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.46.1.tgz", + "integrity": "sha512-jczZ9noovXwy59KjRTk1OftT78pwygdcmCuBf8yMoWt/8O8l+6x2LSEze0E4TeepXK4MezW3zGSyoDRZK7Y9cg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.47.0", + "@typescript-eslint/types": "5.46.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -6506,33 +6486,33 @@ } }, "esbuild": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.10.tgz", - "integrity": "sha512-z5dIViHoVnw2l+NCJ3zj5behdXjYvXne9gL18OOivCadXDUhyDkeSvEtLcGVAJW2fNmh33TDUpsi704XYlDodw==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.16.10", - "@esbuild/android-arm64": "0.16.10", - "@esbuild/android-x64": "0.16.10", - "@esbuild/darwin-arm64": "0.16.10", - "@esbuild/darwin-x64": "0.16.10", - "@esbuild/freebsd-arm64": "0.16.10", - "@esbuild/freebsd-x64": "0.16.10", - "@esbuild/linux-arm": "0.16.10", - "@esbuild/linux-arm64": "0.16.10", - "@esbuild/linux-ia32": "0.16.10", - "@esbuild/linux-loong64": "0.16.10", - "@esbuild/linux-mips64el": "0.16.10", - "@esbuild/linux-ppc64": "0.16.10", - "@esbuild/linux-riscv64": "0.16.10", - "@esbuild/linux-s390x": "0.16.10", - "@esbuild/linux-x64": "0.16.10", - "@esbuild/netbsd-x64": "0.16.10", - "@esbuild/openbsd-x64": "0.16.10", - "@esbuild/sunos-x64": "0.16.10", - "@esbuild/win32-arm64": "0.16.10", - "@esbuild/win32-ia32": "0.16.10", - "@esbuild/win32-x64": "0.16.10" + "version": "0.16.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.9.tgz", + "integrity": "sha512-gkH83yHyijMSZcZFs1IWew342eMdFuWXmQo3zkDPTre25LIPBJsXryg02M3u8OpTwCJdBkdaQwqKkDLnAsAeLQ==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.16.9", + "@esbuild/android-arm64": "0.16.9", + "@esbuild/android-x64": "0.16.9", + "@esbuild/darwin-arm64": "0.16.9", + "@esbuild/darwin-x64": "0.16.9", + "@esbuild/freebsd-arm64": "0.16.9", + "@esbuild/freebsd-x64": "0.16.9", + "@esbuild/linux-arm": "0.16.9", + "@esbuild/linux-arm64": "0.16.9", + "@esbuild/linux-ia32": "0.16.9", + "@esbuild/linux-loong64": "0.16.9", + "@esbuild/linux-mips64el": "0.16.9", + "@esbuild/linux-ppc64": "0.16.9", + "@esbuild/linux-riscv64": "0.16.9", + "@esbuild/linux-s390x": "0.16.9", + "@esbuild/linux-x64": "0.16.9", + "@esbuild/netbsd-x64": "0.16.9", + "@esbuild/openbsd-x64": "0.16.9", + "@esbuild/sunos-x64": "0.16.9", + "@esbuild/win32-arm64": "0.16.9", + "@esbuild/win32-ia32": "0.16.9", + "@esbuild/win32-x64": "0.16.9" } }, "escape-string-regexp": { @@ -8318,9 +8298,9 @@ "dev": true }, "playwright-core": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.1.tgz", - "integrity": "sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.29.0.tgz", + "integrity": "sha512-pboOm1m0RD6z1GtwAbEH60PYRfF87vKdzOSRw2RyO0Y0a7utrMyWN2Au1ojGvQr4umuBMODkKTv607YIRypDSQ==", "dev": true }, "postcss": { @@ -8402,12 +8382,6 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "query-selector-shadow-dom": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/query-selector-shadow-dom/-/query-selector-shadow-dom-1.0.1.tgz", - "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", diff --git a/package.json b/package.json index 2095db8..2eeb379 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "devDependencies": { "@playwright/test": "^1.29.0", "@types/node": "^18.11.17", - "@types/query-selector-shadow-dom": "^1.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "esbuild": "^0.16.9", @@ -102,7 +101,6 @@ "lint-staged": "^13.1.0", "npm-run-all": "^4.1.5", "prettier": "^2.8.1", - "query-selector-shadow-dom": "^1.0.1", "stylelint-config-standard": "^29.0.0", "stylis": "^4.1.3", "ts-node": "^10.9.1", From 7693d580290fa774c2036b46ec35b1d27bf27f48 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 18:22:19 +0200 Subject: [PATCH 09/51] cover removed nodes and popover attribute mutations --- src/popover.ts | 56 ++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index ed6936d..36443f8 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,60 +1,67 @@ -const popoverSet = new Set(); +const popovers = new Set(); -const childOListCallback = (mutation: MutationRecord) => { +const handleChildListMutation = (mutation: MutationRecord) => { if (mutation.addedNodes.length > 0) { mutation.addedNodes.forEach((node) => { if (node instanceof HTMLElement) { if (node.hasAttribute('popover')) { - console.log(node); - popoverSet.add(node); + popovers.add(node); } } }); } - if (mutation.removedNodes.length > 0) { - console.log('do something about removed nodes'); + mutation.removedNodes.forEach((node) => { + if (node instanceof HTMLElement && node.hasAttribute('popover')) { + popovers.delete(node); + } + }); +}; + +const handlePopoverAttributeMutation = (mutation: MutationRecord) => { + if (mutation.target instanceof HTMLElement) { + if (mutation.target.hasAttribute('popover')) { + popovers.add(mutation.target); + } else { + popovers.delete(mutation.target); + } } }; -const callback = (mutationList: MutationRecord[]) => { +const handleMutation = (mutationList: MutationRecord[]) => { mutationList.forEach((mutation) => { switch (mutation.type) { case 'attributes': switch (mutation.attributeName) { case 'popover': - console.log('do something about popover attribute'); + handlePopoverAttributeMutation(mutation); break; } break; case 'childList': - childOListCallback(mutation); + handleChildListMutation(mutation); + break; } }); }; -const observer = new MutationObserver(callback); - function patchAttachShadow() { Element.prototype._originalAttachShadow = Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { const shadowRoot = this._originalAttachShadow(init); + + const observer = new MutationObserver(handleMutation); + observer.observe(shadowRoot, { attributeFilter: ['popover'], childList: true, subtree: true, }); + return shadowRoot; }; } -function closestComposed(event: Event) { - return (event - .composedPath() - .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || - null) as HTMLElement | null; -} - export function isSupported() { return ( typeof HTMLElement !== 'undefined' && @@ -179,7 +186,10 @@ export function apply() { const target = event.target; if (!(target instanceof Element)) return; const doc = target.ownerDocument; - let effectedPopover = closestComposed(event); + let effectedPopover = (event + .composedPath() + .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || + null) as HTMLElement | null; const button = target.closest( '[popovertoggletarget],[popoverhidetarget],[popovershowtarget]', ); @@ -224,13 +234,9 @@ export function apply() { } } - // extract to class getter - const openPopovers = [...popoverSet].filter((popoverEl) => - popoverEl.classList.contains(':open'), - ); // Dismiss open Popovers - for (const popover of openPopovers) { - if (popover instanceof HTMLElement && popover !== effectedPopover) + for (const popover of [...popovers]) { + if (popover.classList.contains(':open') && popover !== effectedPopover) popover.hidePopover(); } }); From 02f5555b5da4ee2de67b9d836bd10e7057ba11bc Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 19:02:56 +0200 Subject: [PATCH 10/51] organize code --- src/mutation.ts | 58 ++++++++++++++++++++++ src/popover.ts | 124 +++++------------------------------------------- 2 files changed, 69 insertions(+), 113 deletions(-) create mode 100644 src/mutation.ts diff --git a/src/mutation.ts b/src/mutation.ts new file mode 100644 index 0000000..dadd4c2 --- /dev/null +++ b/src/mutation.ts @@ -0,0 +1,58 @@ +const popovers = new Set(); + +const handleChildListMutation = (mutation: MutationRecord) => { + if (mutation.addedNodes.length > 0) { + mutation.addedNodes.forEach((node) => { + if (node instanceof HTMLElement) { + if (node.hasAttribute('popover')) { + popovers.add(node); + } + } + }); + } + + mutation.removedNodes.forEach((node) => { + if (node instanceof HTMLElement && node.hasAttribute('popover')) { + popovers.delete(node); + } + }); +}; + +const handlePopoverAttributeMutation = (mutation: MutationRecord) => { + if (mutation.target instanceof HTMLElement) { + if (mutation.target.hasAttribute('popover')) { + popovers.add(mutation.target); + } else { + popovers.delete(mutation.target); + } + } +}; + +const handleMutation = (mutationList: MutationRecord[]) => { + mutationList.forEach((mutation) => { + switch (mutation.type) { + case 'attributes': + switch (mutation.attributeName) { + case 'popover': + handlePopoverAttributeMutation(mutation); + break; + } + break; + case 'childList': + handleChildListMutation(mutation); + break; + } + }); +}; + +const observer = new MutationObserver(handleMutation); + +export const observeDocumentOrShadowRootMutations = ( + documentOrShadowRoot: Document | ShadowRoot, +) => { + observer.observe(documentOrShadowRoot, { + attributeFilter: ['popover'], + childList: true, + subtree: true, + }); +}; diff --git a/src/popover.ts b/src/popover.ts index 36443f8..79351e7 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,66 +1,4 @@ -const popovers = new Set(); - -const handleChildListMutation = (mutation: MutationRecord) => { - if (mutation.addedNodes.length > 0) { - mutation.addedNodes.forEach((node) => { - if (node instanceof HTMLElement) { - if (node.hasAttribute('popover')) { - popovers.add(node); - } - } - }); - } - - mutation.removedNodes.forEach((node) => { - if (node instanceof HTMLElement && node.hasAttribute('popover')) { - popovers.delete(node); - } - }); -}; - -const handlePopoverAttributeMutation = (mutation: MutationRecord) => { - if (mutation.target instanceof HTMLElement) { - if (mutation.target.hasAttribute('popover')) { - popovers.add(mutation.target); - } else { - popovers.delete(mutation.target); - } - } -}; - -const handleMutation = (mutationList: MutationRecord[]) => { - mutationList.forEach((mutation) => { - switch (mutation.type) { - case 'attributes': - switch (mutation.attributeName) { - case 'popover': - handlePopoverAttributeMutation(mutation); - break; - } - break; - case 'childList': - handleChildListMutation(mutation); - break; - } - }); -}; - -function patchAttachShadow() { - Element.prototype._originalAttachShadow = Element.prototype.attachShadow; - Element.prototype.attachShadow = function (init) { - const shadowRoot = this._originalAttachShadow(init); - - const observer = new MutationObserver(handleMutation); - - observer.observe(shadowRoot, { - attributeFilter: ['popover'], - childList: true, - subtree: true, - }); - - return shadowRoot; - }; -} +import { observeDocumentOrShadowRootMutations } from './mutation'; export function isSupported() { return ( @@ -73,58 +11,18 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -// class PopoverObserver { -// #popovers = new Set(); - -// #observer = new MutationObserver(this.#callback); - -// #userPopoverChanged(target: Node) { -// console.log(target); -// } - -// #callback(mutationList: MutationRecord[]) { -// mutationList.forEach((mutation) => { -// switch (mutation.type) { -// case 'attributes': -// switch (mutation.attributeName) { -// case 'popover': -// this.#userPopoverChanged(mutation.target); -// break; -// } -// break; -// } -// }); -// } - -// add(tree: Document | ShadowRoot) { -// const popovers = tree.querySelectorAll('[popover]'); -// console.log(tree); - -// popovers.forEach((popover) => { -// console.log(popover instanceof HTMLElement); -// if (popover instanceof HTMLElement) { -// this.#popovers.add(popover); -// console.log([...this.#popovers]); -// } -// }); - -// this.#observer.observe(tree, { -// attributeFilter: ['popover'], -// childList: true, -// subtree: true, -// }); -// } - -// // get popovers() { -// // return this.#popovers; -// // } -// } +function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { + Element.prototype._originalAttachShadow = Element.prototype.attachShadow; + Element.prototype.attachShadow = function (init) { + const shadowRoot = this._originalAttachShadow(init); + callback(shadowRoot); + return shadowRoot; + }; +} export function apply() { - // const popoverObserver = new PopoverObserver(); - // popoverObserver.add(document); - // patchAttachShadow((shadowRoot) => popoverObserver.add(shadowRoot)); - patchAttachShadow(); + observeDocumentOrShadowRootMutations(document); + patchAttachShadow(observeDocumentOrShadowRootMutations); const visibleElements = new WeakSet(); From ef3f7d72dd662fcb037d6ec8e7f2708917cea440 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 19:25:19 +0200 Subject: [PATCH 11/51] expose popovers set --- src/mutation.ts | 2 +- src/popover.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mutation.ts b/src/mutation.ts index dadd4c2..c032c93 100644 --- a/src/mutation.ts +++ b/src/mutation.ts @@ -1,4 +1,4 @@ -const popovers = new Set(); +export const popovers = new Set(); const handleChildListMutation = (mutation: MutationRecord) => { if (mutation.addedNodes.length > 0) { diff --git a/src/popover.ts b/src/popover.ts index 79351e7..7302ca6 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,4 +1,4 @@ -import { observeDocumentOrShadowRootMutations } from './mutation'; +import { observeDocumentOrShadowRootMutations, popovers } from './mutation'; export function isSupported() { return ( From 87fc1a0e840f4d600d7957e804cfbe89261f08d4 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 19:26:11 +0200 Subject: [PATCH 12/51] add file extension --- src/popover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popover.ts b/src/popover.ts index 7302ca6..efc3109 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,4 +1,4 @@ -import { observeDocumentOrShadowRootMutations, popovers } from './mutation'; +import { observeDocumentOrShadowRootMutations, popovers } from './mutation.js'; export function isSupported() { return ( From 754ff4554ac4ec797e4c9e6bd8c1ca9c46d43d35 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 19:53:49 +0200 Subject: [PATCH 13/51] suppoort document --- src/mutation.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mutation.ts b/src/mutation.ts index c032c93..fdb597f 100644 --- a/src/mutation.ts +++ b/src/mutation.ts @@ -50,6 +50,16 @@ const observer = new MutationObserver(handleMutation); export const observeDocumentOrShadowRootMutations = ( documentOrShadowRoot: Document | ShadowRoot, ) => { + // Document don't initially trigger childList mutations as + // opposed to ShadowRoots so we need to manually add the popovers + if (documentOrShadowRoot instanceof Document) { + documentOrShadowRoot.querySelectorAll('[popover]').forEach((popover) => { + if (popover instanceof HTMLElement) { + popovers.add(popover); + } + }); + } + observer.observe(documentOrShadowRoot, { attributeFilter: ['popover'], childList: true, From 65175baf944dfa3662c13cb258756c60c12ddcb9 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 25 Dec 2022 23:16:28 +0200 Subject: [PATCH 14/51] refactor composedPath to custom closest fn --- src/popover.ts | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index efc3109..899fe58 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -20,6 +20,25 @@ function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { }; } +const closestElement: (selector: string, target: Element) => Element | null = ( + selector: string, + target: Element, +) => { + const found = target.closest(selector); + + if (found) { + return found; + } + + const root = target.getRootNode(); + + if (root === document || !(root instanceof ShadowRoot)) { + return null; + } + + return closestElement(selector, root.host); +}; + export function apply() { observeDocumentOrShadowRootMutations(document); patchAttachShadow(observeDocumentOrShadowRootMutations); @@ -84,10 +103,10 @@ export function apply() { const target = event.target; if (!(target instanceof Element)) return; const doc = target.ownerDocument; - let effectedPopover = (event - .composedPath() - .find((el) => el instanceof HTMLElement && el.hasAttribute('popover')) || - null) as HTMLElement | null; + let effectedPopover = closestElement( + '[popover]', + target, + ) as HTMLElement | null; const button = target.closest( '[popovertoggletarget],[popoverhidetarget],[popovershowtarget]', ); From 663c9fbb3869093f0d0b653195a479955e88e398 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 26 Dec 2022 09:34:51 +0200 Subject: [PATCH 15/51] rename and style --- src/{mutation.ts => observar.ts} | 8 ++++---- src/popover.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/{mutation.ts => observar.ts} (87%) diff --git a/src/mutation.ts b/src/observar.ts similarity index 87% rename from src/mutation.ts rename to src/observar.ts index fdb597f..7f19acf 100644 --- a/src/mutation.ts +++ b/src/observar.ts @@ -47,12 +47,12 @@ const handleMutation = (mutationList: MutationRecord[]) => { const observer = new MutationObserver(handleMutation); -export const observeDocumentOrShadowRootMutations = ( +export const observePopoversMutations = ( documentOrShadowRoot: Document | ShadowRoot, ) => { - // Document don't initially trigger childList mutations as - // opposed to ShadowRoots so we need to manually add the popovers - if (documentOrShadowRoot instanceof Document) { + // Document don't initially trigger childList mutations as opposed + // to shadow roots. so we need to manually add the popovers to the set + if (documentOrShadowRoot === document) { documentOrShadowRoot.querySelectorAll('[popover]').forEach((popover) => { if (popover instanceof HTMLElement) { popovers.add(popover); diff --git a/src/popover.ts b/src/popover.ts index 899fe58..7414fd0 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,4 +1,4 @@ -import { observeDocumentOrShadowRootMutations, popovers } from './mutation.js'; +import { observePopoversMutations, popovers } from './observar.js'; export function isSupported() { return ( @@ -40,8 +40,8 @@ const closestElement: (selector: string, target: Element) => Element | null = ( }; export function apply() { - observeDocumentOrShadowRootMutations(document); - patchAttachShadow(observeDocumentOrShadowRootMutations); + observePopoversMutations(document); + patchAttachShadow(observePopoversMutations); const visibleElements = new WeakSet(); From b2415e8bd699e08d8209033cc47e3abf6c3fdff3 Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 1 Jan 2023 10:14:25 +0200 Subject: [PATCH 16/51] added a test --- index.html | 6 ++++++ tests/dismiss.spec.ts | 3 +++ 2 files changed, 9 insertions(+) diff --git a/index.html b/index.html index ed91067..15ce9e0 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ +

Popover Attribute Polyfill

@@ -22,6 +23,11 @@

Popover Attribute Polyfill

Popover 8 (auto)
Popover 9 (manual)
Popover 10 (manual)
+ + +
diff --git a/tests/dismiss.spec.ts b/tests/dismiss.spec.ts index 248b881..4831a65 100644 --- a/tests/dismiss.spec.ts +++ b/tests/dismiss.spec.ts @@ -15,6 +15,7 @@ test('click dismisses all auto popovers', async ({ page }) => { const popover9 = (await page.locator('#popover9')).nth(0); await expect(popover9).toBeHidden(); const popover10 = (await page.locator('#popover10')).nth(0); + const popover11 = (await page.locator('#popover11')).nth(0); await expect(popover10).toBeHidden(); await page.click('h1'); @@ -22,6 +23,8 @@ test('click dismisses all auto popovers', async ({ page }) => { await expect(popover8).toBeHidden(); await expect(popover9).toBeHidden(); await expect(popover10).toBeHidden(); + await expect(popover10).toBeHidden(); + await expect(popover11).toBeHidden(); }); test('click inside manual popover dismisses other auto popovers', async ({ From a38a512ca81381ec2adec823bdfeb1668107f2ed Mon Sep 17 00:00:00 2001 From: yinon Date: Sun, 1 Jan 2023 10:21:50 +0200 Subject: [PATCH 17/51] Update tests/dismiss.spec.ts --- tests/dismiss.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/dismiss.spec.ts b/tests/dismiss.spec.ts index 4831a65..ac673df 100644 --- a/tests/dismiss.spec.ts +++ b/tests/dismiss.spec.ts @@ -23,7 +23,6 @@ test('click dismisses all auto popovers', async ({ page }) => { await expect(popover8).toBeHidden(); await expect(popover9).toBeHidden(); await expect(popover10).toBeHidden(); - await expect(popover10).toBeHidden(); await expect(popover11).toBeHidden(); }); From 8bac7a2d5b74428c75ac08696ff197747722c72d Mon Sep 17 00:00:00 2001 From: yinonov Date: Sun, 1 Jan 2023 11:41:10 +0200 Subject: [PATCH 18/51] add --- index.html | 19 ++++++++++++++++--- src/popover.ts | 9 ++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 15ce9e0..cf75817 100644 --- a/index.html +++ b/index.html @@ -23,11 +23,18 @@

Popover Attribute Polyfill

Popover 8 (auto)
Popover 9 (manual)
Popover 10 (manual)
- + + + - +
@@ -44,6 +51,12 @@

Popover Attribute Polyfill

+ +
diff --git a/src/popover.ts b/src/popover.ts index 7414fd0..974d473 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -138,9 +138,12 @@ export function apply() { effectedPopover.hidePopover(); } } else if (isButton && button.hasAttribute('popovertoggletarget')) { - effectedPopover = doc.getElementById( - button.getAttribute('popovertoggletarget') || '', - ); + effectedPopover = + [...popovers].find( + (popover) => + popover.getAttribute('id') === + button.getAttribute('popovertoggletarget'), + ) || null; if (effectedPopover && effectedPopover.popover) { if (visibleElements.has(effectedPopover)) { From 28287903f6d738546c609743798df04aa0a58d95 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 00:18:35 +0200 Subject: [PATCH 19/51] fix popover query to filter manual popovers --- src/popover.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/popover.ts b/src/popover.ts index 974d473..0b8065a 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -156,7 +156,10 @@ export function apply() { // Dismiss open Popovers for (const popover of [...popovers]) { - if (popover.classList.contains(':open') && popover !== effectedPopover) + if ( + popover.matches('[popover="" i].\\:open, [popover=auto i].\\:open') && + popover !== effectedPopover + ) popover.hidePopover(); } }); From 3b0e8b7e25411e4ff1a42cf60f063d6d9ecec195 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 13:59:39 +0200 Subject: [PATCH 20/51] caveat --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 12eaa90..193d3f4 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,7 @@ attributes to the HTMLElement class. ## Contributing Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/blob/main/CONTRIBUTING.md). + +## Caveats + +- This polyfill does not work with declarative shadow Dom From 4378131a2bef7f6a53ada1b0053745268e325a79 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 14:13:48 +0200 Subject: [PATCH 21/51] repwrite caveats --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 193d3f4..d078981 100644 --- a/README.md +++ b/README.md @@ -81,4 +81,5 @@ Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/ ## Caveats -- This polyfill does not work with declarative shadow Dom +- Default styles are not applied to the shadow root of the element with the `popover` attribute. You will need to apply them yourself. +- Declarative shadow Dom is not supported. You will need to use the `showPopover` and `hidePopover` methods manually, with additional css styling, to show and hide the popover. From ac754dc062322967ff6ea1c3939e46a44c50e244 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 14:22:52 +0200 Subject: [PATCH 22/51] style custom element --- index.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index cf75817..ba91d7d 100644 --- a/index.html +++ b/index.html @@ -24,17 +24,13 @@

Popover Attribute Polyfill

Popover 9 (manual)
Popover 10 (manual)
- - - -
@@ -54,9 +50,6 @@

Popover Attribute Polyfill

-
From 65bc080e5ab53d81a191f2de85a63c2bceea4e3a Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 14:37:10 +0200 Subject: [PATCH 23/51] findEffectedPopover --- src/popover.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 0b8065a..3491d71 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -39,6 +39,14 @@ const closestElement: (selector: string, target: Element) => Element | null = ( return closestElement(selector, root.host); }; +const findEffectedPopover = ( + button: HTMLButtonElement, + attr: 'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget', +) => + [...popovers].find( + (popover) => popover.getAttribute('id') === button.getAttribute(attr), + ) || null; + export function apply() { observePopoversMutations(document); patchAttachShadow(observePopoversMutations); @@ -102,7 +110,6 @@ export function apply() { document.addEventListener('click', (event: Event) => { const target = event.target; if (!(target instanceof Element)) return; - const doc = target.ownerDocument; let effectedPopover = closestElement( '[popover]', target, @@ -114,9 +121,7 @@ export function apply() { // Handle Popover triggers if (isButton && button.hasAttribute('popovershowtarget')) { - effectedPopover = doc.getElementById( - button.getAttribute('popovershowtarget') || '', - ); + effectedPopover = findEffectedPopover(button, 'popovershowtarget'); if ( effectedPopover && @@ -126,8 +131,9 @@ export function apply() { effectedPopover.showPopover(); } } else if (isButton && button.hasAttribute('popoverhidetarget')) { - effectedPopover = doc.getElementById( - button.getAttribute('popoverhidetarget') || '', + effectedPopover = effectedPopover = findEffectedPopover( + button, + 'popoverhidetarget', ); if ( @@ -138,12 +144,7 @@ export function apply() { effectedPopover.hidePopover(); } } else if (isButton && button.hasAttribute('popovertoggletarget')) { - effectedPopover = - [...popovers].find( - (popover) => - popover.getAttribute('id') === - button.getAttribute('popovertoggletarget'), - ) || null; + effectedPopover = findEffectedPopover(button, 'popovertoggletarget'); if (effectedPopover && effectedPopover.popover) { if (visibleElements.has(effectedPopover)) { From d02016857124220ad9f7213a4ffe78866858cddf Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 17:38:00 +0200 Subject: [PATCH 24/51] triggering elements caveat --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d078981..cb9d967 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,4 @@ Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/ - Default styles are not applied to the shadow root of the element with the `popover` attribute. You will need to apply them yourself. - Declarative shadow Dom is not supported. You will need to use the `showPopover` and `hidePopover` methods manually, with additional css styling, to show and hide the popover. +- Triggering elements (elements matching attributes `'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget'`) must be present in the same ownerDocument as the element with the `popover` attribute. this is due to the same ID conflict that can occur if you have multiple elements with the same ID in different shadow roots. From 1542bf427f2d9f8d7c7bd45e058eb46bd6b84f13 Mon Sep 17 00:00:00 2001 From: yinonov Date: Mon, 2 Jan 2023 22:14:03 +0200 Subject: [PATCH 25/51] format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cb9d967..817657c 100644 --- a/README.md +++ b/README.md @@ -83,4 +83,4 @@ Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/ - Default styles are not applied to the shadow root of the element with the `popover` attribute. You will need to apply them yourself. - Declarative shadow Dom is not supported. You will need to use the `showPopover` and `hidePopover` methods manually, with additional css styling, to show and hide the popover. -- Triggering elements (elements matching attributes `'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget'`) must be present in the same ownerDocument as the element with the `popover` attribute. this is due to the same ID conflict that can occur if you have multiple elements with the same ID in different shadow roots. +- Triggering elements (elements matching attributes `'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget'`) must be present in the same `ownerDocument` as the element with the `popover` attribute. this is due to the same ID conflict that can occur if you have multiple elements with the same ID in different shadow roots. From eae2e2841bed2e4db94577f05bd6a035c27ba1eb Mon Sep 17 00:00:00 2001 From: yinonov Date: Tue, 3 Jan 2023 09:31:46 +0200 Subject: [PATCH 26/51] revert --- index.html | 9 ++++----- src/popover.ts | 24 ++++++++++-------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index ba91d7d..a3ea284 100644 --- a/index.html +++ b/index.html @@ -27,8 +27,10 @@

Popover Attribute Polyfill

@@ -47,9 +49,6 @@

Popover Attribute Polyfill

- diff --git a/src/popover.ts b/src/popover.ts index 3491d71..4682d3d 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -39,14 +39,6 @@ const closestElement: (selector: string, target: Element) => Element | null = ( return closestElement(selector, root.host); }; -const findEffectedPopover = ( - button: HTMLButtonElement, - attr: 'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget', -) => - [...popovers].find( - (popover) => popover.getAttribute('id') === button.getAttribute(attr), - ) || null; - export function apply() { observePopoversMutations(document); patchAttachShadow(observePopoversMutations); @@ -107,9 +99,10 @@ export function apply() { }, }); - document.addEventListener('click', (event: Event) => { + window.addEventListener('click', (event: Event) => { const target = event.target; if (!(target instanceof Element)) return; + const doc = target.ownerDocument; let effectedPopover = closestElement( '[popover]', target, @@ -121,7 +114,9 @@ export function apply() { // Handle Popover triggers if (isButton && button.hasAttribute('popovershowtarget')) { - effectedPopover = findEffectedPopover(button, 'popovershowtarget'); + effectedPopover = doc.getElementById( + button.getAttribute('popovershowtarget') || '', + ); if ( effectedPopover && @@ -131,9 +126,8 @@ export function apply() { effectedPopover.showPopover(); } } else if (isButton && button.hasAttribute('popoverhidetarget')) { - effectedPopover = effectedPopover = findEffectedPopover( - button, - 'popoverhidetarget', + effectedPopover = doc.getElementById( + button.getAttribute('popoverhidetarget') || '', ); if ( @@ -144,7 +138,9 @@ export function apply() { effectedPopover.hidePopover(); } } else if (isButton && button.hasAttribute('popovertoggletarget')) { - effectedPopover = findEffectedPopover(button, 'popovertoggletarget'); + effectedPopover = doc.getElementById( + button.getAttribute('popovertoggletarget') || '', + ); if (effectedPopover && effectedPopover.popover) { if (visibleElements.has(effectedPopover)) { From 37c852d856b6214fd64c8b3424dd95f23816e6af Mon Sep 17 00:00:00 2001 From: yinonov Date: Tue, 3 Jan 2023 09:32:06 +0200 Subject: [PATCH 27/51] revert --- src/popover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popover.ts b/src/popover.ts index 4682d3d..a47277e 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -99,7 +99,7 @@ export function apply() { }, }); - window.addEventListener('click', (event: Event) => { + document.addEventListener('click', (event: Event) => { const target = event.target; if (!(target instanceof Element)) return; const doc = target.ownerDocument; From 3a771c1047630af28a18681e09f7d724496befc3 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 16:15:40 +0200 Subject: [PATCH 28/51] support in tree trigerring elements --- index.html | 10 +++++----- src/popover.ts | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index a3ea284..bc8ef8d 100644 --- a/index.html +++ b/index.html @@ -26,11 +26,11 @@

Popover Attribute Polyfill

diff --git a/src/popover.ts b/src/popover.ts index a47277e..2dd2385 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -40,9 +40,6 @@ const closestElement: (selector: string, target: Element) => Element | null = ( }; export function apply() { - observePopoversMutations(document); - patchAttachShadow(observePopoversMutations); - const visibleElements = new WeakSet(); Object.defineProperties(HTMLElement.prototype, { @@ -99,10 +96,13 @@ export function apply() { }, }); - document.addEventListener('click', (event: Event) => { + const onClick = (event: Event) => { const target = event.target; if (!(target instanceof Element)) return; - const doc = target.ownerDocument; + const root = target.getRootNode(); + if (root instanceof ShadowRoot) { + event.stopPropagation(); + } else if (!(root instanceof Document)) return; let effectedPopover = closestElement( '[popover]', target, @@ -114,7 +114,7 @@ export function apply() { // Handle Popover triggers if (isButton && button.hasAttribute('popovershowtarget')) { - effectedPopover = doc.getElementById( + effectedPopover = root.getElementById( button.getAttribute('popovershowtarget') || '', ); @@ -126,7 +126,7 @@ export function apply() { effectedPopover.showPopover(); } } else if (isButton && button.hasAttribute('popoverhidetarget')) { - effectedPopover = doc.getElementById( + effectedPopover = root.getElementById( button.getAttribute('popoverhidetarget') || '', ); @@ -138,7 +138,7 @@ export function apply() { effectedPopover.hidePopover(); } } else if (isButton && button.hasAttribute('popovertoggletarget')) { - effectedPopover = doc.getElementById( + effectedPopover = root.getElementById( button.getAttribute('popovertoggletarget') || '', ); @@ -159,5 +159,20 @@ export function apply() { ) popover.hidePopover(); } + }; + + const hookClickEvents = ( + (callback: (event: Event) => void) => + (DocumentOrShadowRoot: Document | ShadowRoot) => { + DocumentOrShadowRoot.addEventListener('click', callback); + } + )(onClick); + + observePopoversMutations(document); + hookClickEvents(document); + + patchAttachShadow((shadowRoot: ShadowRoot) => { + observePopoversMutations(shadowRoot); + hookClickEvents(shadowRoot); }); } From 08433012afad57db28d9fdcfa6e0ee906052a20c Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 17:33:31 +0200 Subject: [PATCH 29/51] rename and ergonomics --- src/index.ts | 4 ++-- src/observar.ts | 10 ++++------ src/popover.ts | 17 +++++++++-------- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/index.ts b/src/index.ts index a54be53..063f9a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ -import { apply, isSupported } from './popover.js'; +import { apply, isSupported, ORIGINAL_ATTACH_SHADOW } from './popover.js'; declare global { interface Element { - _originalAttachShadow(init: ShadowRootInit): ShadowRoot; + [ORIGINAL_ATTACH_SHADOW](init: ShadowRootInit): ShadowRoot; } interface HTMLElement { diff --git a/src/observar.ts b/src/observar.ts index 7f19acf..43f81f0 100644 --- a/src/observar.ts +++ b/src/observar.ts @@ -47,20 +47,18 @@ const handleMutation = (mutationList: MutationRecord[]) => { const observer = new MutationObserver(handleMutation); -export const observePopoversMutations = ( - documentOrShadowRoot: Document | ShadowRoot, -) => { +export const observePopoversMutations = (root: Document | ShadowRoot) => { // Document don't initially trigger childList mutations as opposed // to shadow roots. so we need to manually add the popovers to the set - if (documentOrShadowRoot === document) { - documentOrShadowRoot.querySelectorAll('[popover]').forEach((popover) => { + if (root === document) { + root.querySelectorAll('[popover]').forEach((popover) => { if (popover instanceof HTMLElement) { popovers.add(popover); } }); } - observer.observe(documentOrShadowRoot, { + observer.observe(root, { attributeFilter: ['popover'], childList: true, subtree: true, diff --git a/src/popover.ts b/src/popover.ts index 2dd2385..1dc7876 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -11,10 +11,12 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; +export const ORIGINAL_ATTACH_SHADOW = Symbol('originalAttachShadow'); + function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { - Element.prototype._originalAttachShadow = Element.prototype.attachShadow; + Element.prototype[ORIGINAL_ATTACH_SHADOW] = Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { - const shadowRoot = this._originalAttachShadow(init); + const shadowRoot = this[ORIGINAL_ATTACH_SHADOW](init); callback(shadowRoot); return shadowRoot; }; @@ -161,18 +163,17 @@ export function apply() { } }; - const hookClickEvents = ( - (callback: (event: Event) => void) => - (DocumentOrShadowRoot: Document | ShadowRoot) => { - DocumentOrShadowRoot.addEventListener('click', callback); + const addOnClickEventListener = ( + (callback: (event: Event) => void) => (root: Document | ShadowRoot) => { + root.addEventListener('click', callback); } )(onClick); observePopoversMutations(document); - hookClickEvents(document); + addOnClickEventListener(document); patchAttachShadow((shadowRoot: ShadowRoot) => { observePopoversMutations(shadowRoot); - hookClickEvents(shadowRoot); + addOnClickEventListener(shadowRoot); }); } From 9255ba244299c0809d62d67223961f2f9d344810 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 17:56:57 +0200 Subject: [PATCH 30/51] narrow down caveats --- README.md | 9 +++------ tests/dismiss.spec.ts | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 817657c..e44945d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ with a `` tag: ``` +Note that default styles will not be applied to shadow tree. +Each shadow tree will need to include the styles explicitly. + ### With npm For more advanced configuration, you can install with @@ -78,9 +81,3 @@ attributes to the HTMLElement class. ## Contributing Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/blob/main/CONTRIBUTING.md). - -## Caveats - -- Default styles are not applied to the shadow root of the element with the `popover` attribute. You will need to apply them yourself. -- Declarative shadow Dom is not supported. You will need to use the `showPopover` and `hidePopover` methods manually, with additional css styling, to show and hide the popover. -- Triggering elements (elements matching attributes `'popovertoggletarget' | 'popoverhidetarget' | 'popovershowtarget'`) must be present in the same `ownerDocument` as the element with the `popover` attribute. this is due to the same ID conflict that can occur if you have multiple elements with the same ID in different shadow roots. diff --git a/tests/dismiss.spec.ts b/tests/dismiss.spec.ts index ac673df..d6ec3c4 100644 --- a/tests/dismiss.spec.ts +++ b/tests/dismiss.spec.ts @@ -15,15 +15,15 @@ test('click dismisses all auto popovers', async ({ page }) => { const popover9 = (await page.locator('#popover9')).nth(0); await expect(popover9).toBeHidden(); const popover10 = (await page.locator('#popover10')).nth(0); - const popover11 = (await page.locator('#popover11')).nth(0); await expect(popover10).toBeHidden(); + const shadowedPopover = (await page.locator('#shadowedPopover')).nth(0); + await expect(shadowedPopover).toBeHidden(); await page.click('h1'); await expect(popover7).toBeHidden(); await expect(popover8).toBeHidden(); await expect(popover9).toBeHidden(); await expect(popover10).toBeHidden(); - await expect(popover11).toBeHidden(); }); test('click inside manual popover dismisses other auto popovers', async ({ From 9d25d0fb97a36251d606d284c351f3cf60e742d1 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 18:19:35 +0200 Subject: [PATCH 31/51] simpler markup --- index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index bc8ef8d..da222eb 100644 --- a/index.html +++ b/index.html @@ -23,14 +23,15 @@

Popover Attribute Polyfill

Popover 8 (auto)
Popover 9 (manual)
Popover 10 (manual)
- +
From 7e303a2294eac611e8b84452609879b672cdc962 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 18:38:58 +0200 Subject: [PATCH 32/51] ORIGINAL_ATTACH_SHADOW_SYMBOL --- src/index.ts | 14 ++++++++++++-- src/popover.ts | 7 ++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 063f9a0..af19b07 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,12 @@ -import { apply, isSupported, ORIGINAL_ATTACH_SHADOW } from './popover.js'; +import { + apply, + isSupported, + ORIGINAL_ATTACH_SHADOW_SYMBOL, +} from './popover.js'; declare global { interface Element { - [ORIGINAL_ATTACH_SHADOW](init: ShadowRootInit): ShadowRoot; + [ORIGINAL_ATTACH_SHADOW_SYMBOL]: (init: ShadowRootInit) => ShadowRoot; } interface HTMLElement { @@ -13,3 +17,9 @@ declare global { } if (!isSupported()) apply(); + +// Also works. +class C { + static readonly StaticSymbol: unique symbol = Symbol(); +} +console.log(C); diff --git a/src/popover.ts b/src/popover.ts index 1dc7876..6baa2c6 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -11,12 +11,13 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -export const ORIGINAL_ATTACH_SHADOW = Symbol('originalAttachShadow'); +export const ORIGINAL_ATTACH_SHADOW_SYMBOL: unique symbol = Symbol(); function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { - Element.prototype[ORIGINAL_ATTACH_SHADOW] = Element.prototype.attachShadow; + Element.prototype[ORIGINAL_ATTACH_SHADOW_SYMBOL] = + Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { - const shadowRoot = this[ORIGINAL_ATTACH_SHADOW](init); + const shadowRoot = this[ORIGINAL_ATTACH_SHADOW_SYMBOL](init); callback(shadowRoot); return shadowRoot; }; From 2bf0ebb13d1273abfc9a2319a2462bb9ebc02571 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 18:40:10 +0200 Subject: [PATCH 33/51] clean up --- src/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index af19b07..9f0fd8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,9 +17,3 @@ declare global { } if (!isSupported()) apply(); - -// Also works. -class C { - static readonly StaticSymbol: unique symbol = Symbol(); -} -console.log(C); From 308535a428c660ad1bccf28633bdc430f0160889 Mon Sep 17 00:00:00 2001 From: yinon Date: Wed, 4 Jan 2023 19:08:44 +0200 Subject: [PATCH 34/51] Update src/popover.ts Co-authored-by: Keith Cirkel --- src/popover.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 6baa2c6..8e7df00 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -11,13 +11,11 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -export const ORIGINAL_ATTACH_SHADOW_SYMBOL: unique symbol = Symbol(); +export const originalAttachShadow = Element.prototype.attachShadow function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { - Element.prototype[ORIGINAL_ATTACH_SHADOW_SYMBOL] = - Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { - const shadowRoot = this[ORIGINAL_ATTACH_SHADOW_SYMBOL](init); + const shadowRoot = originalAttachShadow.call(this, init); callback(shadowRoot); return shadowRoot; }; From 60deec0cb8d0b8de0b74bf670a5636761b3366b4 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 19:09:06 +0200 Subject: [PATCH 35/51] simple monkey patch --- src/index.ts | 10 +--------- src/popover.ts | 6 ++---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9f0fd8c..37b42b5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,14 +1,6 @@ -import { - apply, - isSupported, - ORIGINAL_ATTACH_SHADOW_SYMBOL, -} from './popover.js'; +import { apply, isSupported } from './popover.js'; declare global { - interface Element { - [ORIGINAL_ATTACH_SHADOW_SYMBOL]: (init: ShadowRootInit) => ShadowRoot; - } - interface HTMLElement { popover: 'auto' | 'manual' | null; showPopover(): void; diff --git a/src/popover.ts b/src/popover.ts index 6baa2c6..391fd59 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -11,13 +11,11 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -export const ORIGINAL_ATTACH_SHADOW_SYMBOL: unique symbol = Symbol(); +export const originalAttachShadow = Element.prototype.attachShadow; function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { - Element.prototype[ORIGINAL_ATTACH_SHADOW_SYMBOL] = - Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { - const shadowRoot = this[ORIGINAL_ATTACH_SHADOW_SYMBOL](init); + const shadowRoot = originalAttachShadow.call(this, init); callback(shadowRoot); return shadowRoot; }; From d131ee2adb2a5ce577bb30bfdf209d6d09d2fad5 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 19:25:04 +0200 Subject: [PATCH 36/51] multi use of patching --- src/popover.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/popover.ts b/src/popover.ts index 391fd59..62e7c19 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -11,9 +11,8 @@ export function isSupported() { const notSupportedMessage = 'Not supported on element that does not have valid popover attribute'; -export const originalAttachShadow = Element.prototype.attachShadow; - function patchAttachShadow(callback: (shadowRoot: ShadowRoot) => void) { + const originalAttachShadow = Element.prototype.attachShadow; Element.prototype.attachShadow = function (init) { const shadowRoot = originalAttachShadow.call(this, init); callback(shadowRoot); @@ -171,8 +170,6 @@ export function apply() { observePopoversMutations(document); addOnClickEventListener(document); - patchAttachShadow((shadowRoot: ShadowRoot) => { - observePopoversMutations(shadowRoot); - addOnClickEventListener(shadowRoot); - }); + patchAttachShadow(observePopoversMutations); + patchAttachShadow(addOnClickEventListener); } From fe4ba1ad91dcbde42023fe63668ff1bc5a0ed6ac Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 20:10:25 +0200 Subject: [PATCH 37/51] test trigger in shadow --- tests/triggers.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/triggers.spec.ts b/tests/triggers.spec.ts index 25e7d3f..ea9effd 100644 --- a/tests/triggers.spec.ts +++ b/tests/triggers.spec.ts @@ -81,3 +81,16 @@ test('clicking button[popovershowtarget=popover5] then button[popoverhidetarget= await page.click('button[popoverhidetarget=popover5]'); await expect(popover).toBeHidden(); }); + +test('clicking button[popovertoggletarget=popover] should hide open popover in the same (shadow) tree scope', async ({ + page, +}) => { + const popover = (await page.locator('#popover')).nth(0); + await expect(popover).toBeHidden(); + await expect( + await popover.evaluate((node) => node.showPopover()), + ).toBeUndefined(); + await expect(popover).toBeVisible(); + await page.click('button[popovertoggletarget=popover]'); + await expect(popover).toBeHidden(); +}); From 3680d31bc7de71fc2b75ca39260bfd8cc63d08cb Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 4 Jan 2023 20:54:45 +0200 Subject: [PATCH 38/51] shadowedPopover --- index.html | 4 ++-- tests/triggers.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index da222eb..1119dae 100644 --- a/index.html +++ b/index.html @@ -28,10 +28,10 @@

Popover Attribute Polyfill

import sheet from './dist/popover.css' assert { type: 'css' }; const host = document.getElementById('host'); const shadowRoot = host.attachShadow({ mode: 'closed' }); - shadowRoot.innerHTML = ` -
Shadowed Popover (auto)
`; +
Shadowed Popover (auto)
`; shadowRoot.adoptedStyleSheets = [sheet]; diff --git a/tests/triggers.spec.ts b/tests/triggers.spec.ts index ea9effd..d4f39da 100644 --- a/tests/triggers.spec.ts +++ b/tests/triggers.spec.ts @@ -85,12 +85,12 @@ test('clicking button[popovershowtarget=popover5] then button[popoverhidetarget= test('clicking button[popovertoggletarget=popover] should hide open popover in the same (shadow) tree scope', async ({ page, }) => { - const popover = (await page.locator('#popover')).nth(0); + const popover = (await page.locator('#shadowedPopover')).nth(0); await expect(popover).toBeHidden(); await expect( await popover.evaluate((node) => node.showPopover()), ).toBeUndefined(); await expect(popover).toBeVisible(); - await page.click('button[popovertoggletarget=popover]'); + await page.click('button[popovertoggletarget=shadowedPopover]'); await expect(popover).toBeHidden(); }); From a88a114657d645dfa5edd0c69a440f03ce2cc1d8 Mon Sep 17 00:00:00 2001 From: yinon Date: Wed, 4 Jan 2023 22:08:43 +0200 Subject: [PATCH 39/51] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e44945d..9f79e69 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ with a `` tag: ``` -Note that default styles will not be applied to shadow tree. +Note that default styles will not be applied to shadow roots. Each shadow tree will need to include the styles explicitly. ### With npm From 2da982751135398546bbb534cbf3a9d0955f11d5 Mon Sep 17 00:00:00 2001 From: yinon Date: Wed, 4 Jan 2023 22:09:23 +0200 Subject: [PATCH 40/51] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f79e69..5496090 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ with a `` tag: ``` Note that default styles will not be applied to shadow roots. -Each shadow tree will need to include the styles explicitly. +Each root will need to include the styles explicitly. ### With npm From 853dcb3a9911eda4372ac861bafecbe8031bd876 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 11 Jan 2023 22:28:02 +0200 Subject: [PATCH 41/51] sync ChildListMutation nested popovers --- index.html | 4 +++- src/observar.ts | 36 ++++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 1119dae..e0068d1 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,9 @@

Popover Attribute Polyfill

shadowRoot.innerHTML = ` -
Shadowed Popover (auto)
`; +
+
Shadowed Popover (auto)
+
`; shadowRoot.adoptedStyleSheets = [sheet];
diff --git a/src/observar.ts b/src/observar.ts index 43f81f0..04edea2 100644 --- a/src/observar.ts +++ b/src/observar.ts @@ -1,21 +1,33 @@ export const popovers = new Set(); +const popoversSyncFactory = + (method: (value: HTMLElement) => void) => (node: Node) => { + if (node instanceof HTMLElement) { + if (node.hasAttribute('popover')) { + method(node); + } + + node.querySelectorAll('[popover]').forEach((popover) => { + if (popover instanceof HTMLElement) { + method(popover); + } + }); + } + }; + +const addPopoversToSet = popoversSyncFactory(popovers.add.bind(popovers)); +const removePopoversFromSet = popoversSyncFactory( + popovers.delete.bind(popovers), +); + const handleChildListMutation = (mutation: MutationRecord) => { if (mutation.addedNodes.length > 0) { - mutation.addedNodes.forEach((node) => { - if (node instanceof HTMLElement) { - if (node.hasAttribute('popover')) { - popovers.add(node); - } - } - }); + mutation.addedNodes.forEach(addPopoversToSet); } - mutation.removedNodes.forEach((node) => { - if (node instanceof HTMLElement && node.hasAttribute('popover')) { - popovers.delete(node); - } - }); + if (mutation.removedNodes.length > 0) { + mutation.removedNodes.forEach(removePopoversFromSet); + } }; const handlePopoverAttributeMutation = (mutation: MutationRecord) => { From 4d03147f3819b2c906370f7686e5fd3b76a81c63 Mon Sep 17 00:00:00 2001 From: yinonov Date: Wed, 11 Jan 2023 22:36:01 +0200 Subject: [PATCH 42/51] add nested test --- index.html | 6 +++++- tests/dismiss.spec.ts | 4 ++++ tests/triggers.spec.ts | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index e0068d1..248b5a0 100644 --- a/index.html +++ b/index.html @@ -31,8 +31,12 @@

Popover Attribute Polyfill

shadowRoot.innerHTML = ` + +
Shadowed Popover (auto)
-
Shadowed Popover (auto)
+
Shadowed Nested Popover (auto)
`; shadowRoot.adoptedStyleSheets = [sheet]; diff --git a/tests/dismiss.spec.ts b/tests/dismiss.spec.ts index d6ec3c4..604181b 100644 --- a/tests/dismiss.spec.ts +++ b/tests/dismiss.spec.ts @@ -18,6 +18,10 @@ test('click dismisses all auto popovers', async ({ page }) => { await expect(popover10).toBeHidden(); const shadowedPopover = (await page.locator('#shadowedPopover')).nth(0); await expect(shadowedPopover).toBeHidden(); + const shadowedNestedPopover = ( + await page.locator('#shadowedNestedPopover') + ).nth(0); + await expect(shadowedNestedPopover).toBeHidden(); await page.click('h1'); await expect(popover7).toBeHidden(); diff --git a/tests/triggers.spec.ts b/tests/triggers.spec.ts index d4f39da..f8aeed9 100644 --- a/tests/triggers.spec.ts +++ b/tests/triggers.spec.ts @@ -94,3 +94,16 @@ test('clicking button[popovertoggletarget=popover] should hide open popover in t await page.click('button[popovertoggletarget=shadowedPopover]'); await expect(popover).toBeHidden(); }); + +test('clicking button[popovertoggletarget=popover] should hide open nested popover in the same (shadow) tree scope', async ({ + page, +}) => { + const popover = (await page.locator('#shadowedNestedPopover')).nth(0); + await expect(popover).toBeHidden(); + await expect( + await popover.evaluate((node) => node.showPopover()), + ).toBeUndefined(); + await expect(popover).toBeVisible(); + await page.click('button[popovertoggletarget=shadowedNestedPopover]'); + await expect(popover).toBeHidden(); +}); From 697d4099b43ed95e9d2d906f35cbe677216678a2 Mon Sep 17 00:00:00 2001 From: yinonov Date: Thu, 12 Jan 2023 00:30:18 +0200 Subject: [PATCH 43/51] correct tests definitions --- tests/triggers.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/triggers.spec.ts b/tests/triggers.spec.ts index f8aeed9..1e2ab67 100644 --- a/tests/triggers.spec.ts +++ b/tests/triggers.spec.ts @@ -82,7 +82,7 @@ test('clicking button[popovershowtarget=popover5] then button[popoverhidetarget= await expect(popover).toBeHidden(); }); -test('clicking button[popovertoggletarget=popover] should hide open popover in the same (shadow) tree scope', async ({ +test('clicking button[popovertoggletarget=shadowedPopover] should hide open popover in the same (shadow) tree scope', async ({ page, }) => { const popover = (await page.locator('#shadowedPopover')).nth(0); @@ -95,7 +95,7 @@ test('clicking button[popovertoggletarget=popover] should hide open popover in t await expect(popover).toBeHidden(); }); -test('clicking button[popovertoggletarget=popover] should hide open nested popover in the same (shadow) tree scope', async ({ +test('clicking button[popovertoggletarget=shadowedNestedPopover] should hide open nested popover in the same (shadow) tree scope', async ({ page, }) => { const popover = (await page.locator('#shadowedNestedPopover')).nth(0); From d78777f9363a900f491ec69fa993d8fea9dd0b2c Mon Sep 17 00:00:00 2001 From: yinonov Date: Thu, 12 Jan 2023 08:54:27 +0200 Subject: [PATCH 44/51] testing against open shadowRoot --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 248b5a0..b241fb4 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@

Popover Attribute Polyfill

From 63bd3792796173aba48c8a880e977f647ea07c02 Mon Sep 17 00:00:00 2001 From: yinon Date: Fri, 13 Jan 2023 23:00:19 +0200 Subject: [PATCH 49/51] Update README.md Co-authored-by: Jonny Gerig Meyer --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e33914..f2a4145 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ with a `` tag: ``` Note that default styles will not be applied to shadow roots. -Each root node will need to include the styles on its separately. +Each root node will need to include the styles separately. ### With npm From 3e796a42c6b0a25516acae41e1a3d1d339972f2f Mon Sep 17 00:00:00 2001 From: yinon Date: Fri, 13 Jan 2023 23:00:37 +0200 Subject: [PATCH 50/51] Update src/observar.ts Co-authored-by: Jonny Gerig Meyer --- src/observar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observar.ts b/src/observar.ts index ebc35b5..25113a1 100644 --- a/src/observar.ts +++ b/src/observar.ts @@ -59,8 +59,8 @@ const handleMutation = (mutationList: MutationRecord[]) => { const observer = new MutationObserver(handleMutation); export const observePopoversMutations = (root: Document | ShadowRoot) => { - // Document don't initially trigger childList mutations as opposed - // to shadow roots. so we need to manually add the popovers to the set + // Documents don't initially trigger childList mutations as opposed + // to shadow roots, so we need to manually add the popovers to the set if (root === document) { root.querySelectorAll('[popover]').forEach((popover) => { if (popover instanceof HTMLElement) { From f0c89af4d4748ce741ca9a9aefd27b20346d8f2e Mon Sep 17 00:00:00 2001 From: yinonov Date: Sat, 14 Jan 2023 01:19:42 +0200 Subject: [PATCH 51/51] filename typo --- src/{observar.ts => observer.ts} | 0 src/popover.ts | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{observar.ts => observer.ts} (100%) diff --git a/src/observar.ts b/src/observer.ts similarity index 100% rename from src/observar.ts rename to src/observer.ts diff --git a/src/popover.ts b/src/popover.ts index 62e7c19..2bc05ec 100644 --- a/src/popover.ts +++ b/src/popover.ts @@ -1,4 +1,4 @@ -import { observePopoversMutations, popovers } from './observar.js'; +import { observePopoversMutations, popovers } from './observer.js'; export function isSupported() { return (