From 34c2618ca04433f531bfe332bc2ed9b78fe99401 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 4 Mar 2026 13:05:07 +0100 Subject: [PATCH 01/59] feat: Increase drag over split threshold, b=no-bug, c=split-view --- prefs/zen/split-view.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prefs/zen/split-view.yaml b/prefs/zen/split-view.yaml index eb1223c09..869b4c459 100644 --- a/prefs/zen/split-view.yaml +++ b/prefs/zen/split-view.yaml @@ -18,4 +18,4 @@ value: 1000 - name: zen.splitView.drag-over-split-threshold - value: 25 + value: 40 From efae7418c4b7cb3a64e024fa2445cb80a5f04aec Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Thu, 5 Mar 2026 10:04:14 +0100 Subject: [PATCH 02/59] fix: Fixed new tabs not allowed to be opened, b=closes #12628, c=no-component --- src/browser/components/tabbrowser/content/tab-js.patch | 4 ++-- surfer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/components/tabbrowser/content/tab-js.patch b/src/browser/components/tabbrowser/content/tab-js.patch index e995a07b7..10781b429 100644 --- a/src/browser/components/tabbrowser/content/tab-js.patch +++ b/src/browser/components/tabbrowser/content/tab-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js -index 836bee14d2b63604688ebe477a5d915a5e99b305..53b6cb827b1199b314b0e6543055fe7b074b0dfa 100644 +index 836bee14d2b63604688ebe477a5d915a5e99b305..7e105a1ae07657b0a0e664a8e3d9d2eb894fa1d4 100644 --- a/browser/components/tabbrowser/content/tab.js +++ b/browser/components/tabbrowser/content/tab.js @@ -21,6 +21,7 @@ @@ -69,7 +69,7 @@ index 836bee14d2b63604688ebe477a5d915a5e99b305..53b6cb827b1199b314b0e6543055fe7b + // Recursively check all parent groups + let currentParent = this.group; + while (currentParent) { -+ if (currentParent.collapsed && !currentParent.activeTabs.includes(this)) { ++ if (currentParent.collapsed && !currentParent.activeTabs?.includes(this)) { + return false; + } + currentParent = currentParent.group; diff --git a/surfer.json b/surfer.json index 69c275859..c75f6a435 100644 --- a/surfer.json +++ b/surfer.json @@ -20,7 +20,7 @@ "brandShortName": "Zen", "brandFullName": "Zen Browser", "release": { - "displayVersion": "1.19.1b", + "displayVersion": "1.19.2b", "github": { "repo": "zen-browser/desktop" }, From d25a99cd21af508ccde4ef49341beae1a8191af5 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Thu, 5 Mar 2026 13:35:05 +0100 Subject: [PATCH 03/59] fix: remove duplicate patches, p=#12640 --- .../app/macbuild/Contents/Info-plist-in.patch | 13 --------- .../asyncshutdown/AsyncShutdown-sys-mjs.patch | 28 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 src/browser/app/macbuild/Contents/Info-plist-in.patch delete mode 100644 src/toolkit/components/asyncshutdown/AsyncShutdown-sys-mjs.patch diff --git a/src/browser/app/macbuild/Contents/Info-plist-in.patch b/src/browser/app/macbuild/Contents/Info-plist-in.patch deleted file mode 100644 index 3fa8021f7..000000000 --- a/src/browser/app/macbuild/Contents/Info-plist-in.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in -index 0c4fb837a24490c66b284abf2bd9299c2e021de0..ea28831b90662b12bdcb137c35b6bb83626c77e7 100644 ---- a/browser/app/macbuild/Contents/Info.plist.in -+++ b/browser/app/macbuild/Contents/Info.plist.in -@@ -190,8 +190,6 @@ - @MAC_APP_NAME@ @APP_VERSION@ - CFBundleIconFile - firefox.icns -- CFBundleIconName -- AppIcon - CFBundleIdentifier - @MOZ_MACBUNDLE_ID@ - CFBundleInfoDictionaryVersion diff --git a/src/toolkit/components/asyncshutdown/AsyncShutdown-sys-mjs.patch b/src/toolkit/components/asyncshutdown/AsyncShutdown-sys-mjs.patch deleted file mode 100644 index 336057c89..000000000 --- a/src/toolkit/components/asyncshutdown/AsyncShutdown-sys-mjs.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs b/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs -index 2aaef80411b2cef9563c49f23d36b08222b06b03..7bd15ebb0d9d09da57a287b47beb1f0e2e17d229 100644 ---- a/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs -+++ b/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs -@@ -492,6 +492,23 @@ function getPhase(topic) { - } - return undefined; - }, -+ -+ /** -+ * Reset the phase after a call to _trigger(). -+ * For testing purposes only. -+ */ -+ get _reset() { -+ let accepted = Services.prefs.getBoolPref( -+ "toolkit.asyncshutdown.testing", -+ false -+ ); -+ if (accepted) { -+ return () => { -+ spinner = new Spinner(topic); -+ }; -+ } -+ return undefined; -+ }, - }); - gPhases.set(topic, phase); - return phase; From 3f0f07ac3787f0971cc33a744cdbb6f4cab229aa Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Thu, 5 Mar 2026 14:41:55 +0100 Subject: [PATCH 04/59] fix: script interpreters and permissions, p=#12641 --- .github/workflows/src/release-build.sh | 2 +- locales/update-supported-languages.sh | 1 + scripts/download-language-packs.sh | 1 + scripts/fetch-formal-git-components.sh | 2 +- scripts/recalculate-patches.sh | 2 +- scripts/remove-failed-jobs.sh | 2 +- scripts/update-surfer.sh | 2 +- src/browser/themes/shared/zen-icons/update-resources.sh | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) mode change 100644 => 100755 locales/update-supported-languages.sh mode change 100644 => 100755 scripts/download-language-packs.sh mode change 100644 => 100755 scripts/fetch-formal-git-components.sh mode change 100644 => 100755 scripts/recalculate-patches.sh mode change 100644 => 100755 scripts/remove-failed-jobs.sh mode change 100644 => 100755 scripts/update-surfer.sh diff --git a/.github/workflows/src/release-build.sh b/.github/workflows/src/release-build.sh index 853f55b3a..e553f3942 100644 --- a/.github/workflows/src/release-build.sh +++ b/.github/workflows/src/release-build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xe diff --git a/locales/update-supported-languages.sh b/locales/update-supported-languages.sh old mode 100644 new mode 100755 index ae27a816c..43ba824b8 --- a/locales/update-supported-languages.sh +++ b/locales/update-supported-languages.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash LANGS_FILE="./supported-languages" # Clean up the file diff --git a/scripts/download-language-packs.sh b/scripts/download-language-packs.sh old mode 100644 new mode 100755 index aa4633ef7..5945ad0b8 --- a/scripts/download-language-packs.sh +++ b/scripts/download-language-packs.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/scripts/fetch-formal-git-components.sh b/scripts/fetch-formal-git-components.sh old mode 100644 new mode 100755 index 527483a3f..e40322ed2 --- a/scripts/fetch-formal-git-components.sh +++ b/scripts/fetch-formal-git-components.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/scripts/recalculate-patches.sh b/scripts/recalculate-patches.sh old mode 100644 new mode 100755 index b03cf83ce..2bb2d5e3e --- a/scripts/recalculate-patches.sh +++ b/scripts/recalculate-patches.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/scripts/remove-failed-jobs.sh b/scripts/remove-failed-jobs.sh old mode 100644 new mode 100755 index f3cd7da24..a3cfd554e --- a/scripts/remove-failed-jobs.sh +++ b/scripts/remove-failed-jobs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/scripts/update-surfer.sh b/scripts/update-surfer.sh old mode 100644 new mode 100755 index 7d720ab2a..157ca62d2 --- a/scripts/update-surfer.sh +++ b/scripts/update-surfer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. diff --git a/src/browser/themes/shared/zen-icons/update-resources.sh b/src/browser/themes/shared/zen-icons/update-resources.sh index 196e7f7f6..ee4bea86a 100755 --- a/src/browser/themes/shared/zen-icons/update-resources.sh +++ b/src/browser/themes/shared/zen-icons/update-resources.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. From dbf6daebdc088091fcd19e73dc0d2896cf6590d1 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:47:34 +0100 Subject: [PATCH 05/59] chore: add ignored files in recalculate-patches, p=#12642 --- scripts/recalculate-patches.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/recalculate-patches.sh b/scripts/recalculate-patches.sh index 2bb2d5e3e..f19684099 100755 --- a/scripts/recalculate-patches.sh +++ b/scripts/recalculate-patches.sh @@ -12,6 +12,9 @@ IGNORE_FILES=( "shared.nsh" "ignorePrefs.json" "moz.configure" + "AsyncShutdown.sys.mjs" + "Info.plist.in" + "firefox.js" ) # Recursively find all .patch files in the current directory and its subdirectories From ea358964848831db21946f85bff1a833e5f7d2f4 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Fri, 6 Mar 2026 00:43:38 +0100 Subject: [PATCH 06/59] feat: Small detail changes to control panel, b=no-bug, c=common --- src/browser/themes/shared/zen-icons/icons.css | 2 +- src/zen/common/styles/zen-single-components.css | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index 3d78a3e93..11927b00c 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -499,7 +499,7 @@ pointer-events: none; } - &:is([open], [starred]) image { + &:where([starred]) image { list-style-image: url("permissions-fill.svg"); } } diff --git a/src/zen/common/styles/zen-single-components.css b/src/zen/common/styles/zen-single-components.css index 23c7fe73b..5b1610525 100644 --- a/src/zen/common/styles/zen-single-components.css +++ b/src/zen/common/styles/zen-single-components.css @@ -377,6 +377,7 @@ .zen-site-data-section-header { font-weight: 600; + font-size: 12px; & label { margin: 0; @@ -546,11 +547,11 @@ background: linear-gradient(to bottom, light-dark(rgb(255, 255, 255), rgb(34, 34, 34)), light-dark(rgb(246, 246, 246), rgb(21, 21, 21))); box-shadow: - 0px 2px 4px rgba(0, 0, 0, 0.1), + 0px 1px 2px rgba(0, 0, 0, 0.1), inset 0px 1px 0px light-dark(transparent, rgba(255, 255, 255, 0.15)); border-radius: 6px; --base-border-color: light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.1)); - border: 1px solid light-dark(var(--base-border-color), rgb(21, 21, 21)); + border: 0.5px solid light-dark(var(--base-border-color), rgb(21, 21, 21)); } @media not (-moz-platform: macos) { From 0ee960e3a3dc47a05bb599f7690eb6ab65e162ea Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Sat, 7 Mar 2026 12:15:32 +0100 Subject: [PATCH 07/59] chore: Start making use of Mozilla's linter, p=#12656 --- .github/workflows/code-linter.yml | 32 +- .github/workflows/pr-test.yml | 24 +- .github/workflows/sync-upstream.yml | 9 +- .prettierignore | 42 - .prettierrc.json | 20 - package-lock.json | 4295 +---------------- package.json | 28 +- pyproject.toml | 9 - requirements.txt | 1 - src/-stylelintignore.patch | 31 + src/-stylelintrc-js.patch | 25 + src/eslint-file-globals-config-mjs.patch | 22 + src/eslint-ignores-config-mjs.patch | 12 + src/eslint-test-paths-config-mjs.patch | 12 + src/python/mozlint/mozlint/roller-py.patch | 12 + .../lib/configs/require-jsdoc-mjs.patch | 13 + src/tools/lint/ignorefile-yml.patch | 12 + src/tools/lint/rejected-words-yml.patch | 12 + src/zen/common/emojis/ZenEmojisData.min.mjs | 4 + .../common/styles/zen-browser-container.css | 3 + src/zen/common/styles/zen-browser-ui.css | 7 +- src/zen/common/styles/zen-omnibox.css | 27 +- .../common/styles/zen-overflowing-addons.css | 2 +- src/zen/common/styles/zen-panel-ui.css | 4 +- .../common/styles/zen-panels/bookmarks.css | 4 +- src/zen/common/styles/zen-panels/dialog.css | 1 - src/zen/common/styles/zen-popup.css | 20 +- .../styles/zen-sidebar-notification.css | 4 +- .../common/styles/zen-single-components.css | 26 +- src/zen/compact-mode/sidebar.inc.css | 8 +- src/zen/compact-mode/toolbar.inc.css | 2 +- src/zen/drag-and-drop/nsIZenDragAndDrop.idl | 1 - src/zen/drag-and-drop/nsZenDragAndDrop.cpp | 21 +- src/zen/drag-and-drop/nsZenDragAndDrop.h | 11 +- src/zen/folders/jar.inc.mn | 2 +- src/zen/folders/zen-folders.css | 9 +- src/zen/glance/jar.inc.mn | 2 +- src/zen/glance/zen-glance.css | 6 +- src/zen/images/favicons/tuta.svg | 3 + src/zen/media/zen-media-controls.css | 11 +- src/zen/mods/ZenStyleSheetCache.cpp | 22 +- src/zen/mods/ZenStyleSheetCache.h | 10 +- src/zen/mods/nsIZenModsBackend.idl | 1 - src/zen/mods/nsZenModsBackend.cpp | 14 +- src/zen/mods/nsZenModsBackend.h | 2 +- src/zen/sessionstore/ZenWindowSync.sys.mjs | 3 +- src/zen/split-view/jar.inc.mn | 2 +- .../zen-splitview-overlay.inc.xhtml | 2 +- src/zen/tabs/jar.inc.mn | 2 +- src/zen/tabs/zen-tabs/vertical-tabs.css | 47 +- src/zen/tests/compact_mode/browser.toml | 2 + .../tests/container_essentials/browser.toml | 3 +- src/zen/tests/folders/browser.toml | 27 +- src/zen/tests/glance/browser.toml | 14 +- src/zen/tests/live-folders/browser.toml | 8 +- .../mochitests/sandbox/mac_register_font.py | 112 +- .../mochitests/shell/mac_desktop_image.py | 252 +- src/zen/tests/pinned/browser.toml | 22 +- src/zen/tests/split_view/browser.toml | 14 +- src/zen/tests/tabs/browser.toml | 12 +- src/zen/tests/ub-actions/browser.toml | 4 +- src/zen/tests/urlbar/browser.toml | 1 + src/zen/tests/window_sync/browser.toml | 3 +- src/zen/tests/workspaces/browser.toml | 16 +- src/zen/toolkit/common/ZenCommonUtils.cpp | 41 +- src/zen/toolkit/common/ZenCommonUtils.h | 8 +- src/zen/toolkit/common/ZenShareInternal.h | 33 +- .../toolkit/common/cocoa/ZenHapticFeedback.mm | 5 +- .../toolkit/common/cocoa/ZenShareInternal.mm | 19 +- src/zen/toolkit/common/nsIZenCommonUtils.idl | 3 +- .../common/windows/ZenShareInternal.cpp | 16 +- src/zen/vendor/motion.min.mjs | 4 + src/zen/welcome/jar.inc.mn | 2 +- src/zen/welcome/zen-welcome.css | 3 +- src/zen/workspaces/create-workspace-form.css | 9 +- src/zen/workspaces/jar.inc.mn | 2 +- src/zen/workspaces/zen-gradient-generator.css | 19 +- src/zen/workspaces/zen-workspaces.css | 6 +- 78 files changed, 712 insertions(+), 4842 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc.json delete mode 100644 pyproject.toml create mode 100644 src/-stylelintignore.patch create mode 100644 src/-stylelintrc-js.patch create mode 100644 src/eslint-file-globals-config-mjs.patch create mode 100644 src/eslint-ignores-config-mjs.patch create mode 100644 src/eslint-test-paths-config-mjs.patch create mode 100644 src/python/mozlint/mozlint/roller-py.patch create mode 100644 src/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc-mjs.patch create mode 100644 src/tools/lint/ignorefile-yml.patch create mode 100644 src/tools/lint/rejected-words-yml.patch diff --git a/.github/workflows/code-linter.yml b/.github/workflows/code-linter.yml index 3bb902c32..04ee4408d 100644 --- a/.github/workflows/code-linter.yml +++ b/.github/workflows/code-linter.yml @@ -28,20 +28,32 @@ jobs: with: node-version-file: ".nvmrc" - - name: Setup and run autopep8 - if: ${{ contains(join(github.event.commits.*.modified, ' '), '.py') || contains(join(github.event.commits.*.added, ' '), '.py') || contains(join(github.event.commits.*.removed, ' '), '.py') }} - run: | - sudo apt install python3-autopep8 - autopep8 --diff scripts/ src/ - - name: Install dependencies run: npm ci - - name: Download Firefox - env: - ZEN_DOWNLOAD_DONT_INIT_GIT: "1" + - name: Restore Surfer engine cache + id: surfer-engine-cache + uses: actions/cache@v4 + with: + path: .surfer/engine/*.tar + key: surfer-engine-${{ hashFiles('surfer.json') }} + + - name: Setup Git run: | - npm run download + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Download Firefox + run: npm run download + + - name: Import patches + run: npm run import + + - name: Add .hgignore file to the engine dir + run: touch engine/.hgignore + + - name: Run Bootstrap + run: npm run bootstrap - name: Lint run: npm run lint diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 7070cccf8..5cc2bd6ae 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -28,13 +28,29 @@ jobs: - name: Install dependencies run: npm ci + - name: Restore Surfer engine cache + id: surfer-engine-cache + uses: actions/cache@v4 + with: + path: .surfer/engine/*.tar + key: surfer-engine-${{ hashFiles('surfer.json') }} + + - name: Setup Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Download Firefox and dependencies - env: - ZEN_DOWNLOAD_DONT_INIT_GIT: "1" run: npm run download - - name: Run linting - run: npm run lint + - name: Run Bootstrap + run: npm run bootstrap + + - name: Add .hgignore file to the engine dir + run: touch engine/.hgignore - name: Import patches run: npm run import + + - name: Run linting + run: npm run lint diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index a9f122e2b..ba7d6b620 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -73,8 +73,9 @@ jobs: npm run sync fi - - name: Install autopep8 - run: sudo apt install python3-autopep8 + - name: Run Bootstrap + if: steps.check-upstream-branch.outputs.branch_exists == 'false' + run: npm run bootstrap - name: Install requirements run: pip3 install -r requirements.txt @@ -82,7 +83,7 @@ jobs: - name: Check if any files changed id: git-check run: | - npm run pretty + npm run lint:fix if [ -n "$(git status --porcelain)" ]; then echo "files_changed=true" >> $GITHUB_OUTPUT else @@ -119,7 +120,7 @@ jobs: - name: Run formatter if: steps.check-upstream-branch.outputs.branch_exists == 'false' run: | - npm run pretty + npm run lint:fix - name: Create pull request uses: peter-evans/create-pull-request@v7 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index f47fa179c..000000000 --- a/.prettierignore +++ /dev/null @@ -1,42 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -engine/ - -**/*.html -**/*.xhtml -**/*.inc.xhtml -**/*.bundle.min.js -**/*.min.js -**/*.min.mjs - -**/*.svg - -**/*.inc.css - -surfer.json - -src/zen/tests/mochitests/* - -src/browser/app/profile/*.js -pnpm-lock.yaml - -**/engine/ - -docs/issue-metrics/*.md - -.husky/ - -# Some CSS files are preprocessed and prettier doesn't handle them well -# We also dont want to format the CSS files that are generated by the build -src/zen/tabs/zen-tabs.css -src/zen/common/styles/zen-theme.css -src/zen/compact-mode/zen-compact-mode.css -src/zen/common/ZenEmojis.mjs - -src/zen/split-view/zen-decks.css -src/zen/workspaces/zen-workspaces.css -src/zen/common/styles/zen-toolbar.css - -*.inc diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 967de9106..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "bracketSameLine": true, - "endOfLine": "lf", - "trailingComma": "es5", - "tabWidth": 2, - "useTabs": false, - "jsxSingleQuote": false, - "semi": true, - "printWidth": 100, - "plugins": ["prettier-plugin-sh"], - "overrides": [ - { - "files": "*.css", - "options": { - "parser": "css", - "printWidth": 160 - } - } - ] -} diff --git a/package-lock.json b/package-lock.json index 1e5cbcbf4..fde4e3044 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,33 +10,12 @@ "license": "MPL-2.0", "devDependencies": { "@babel/preset-typescript": "^7.27.0", - "@eslint/js": "^9.39.2", - "@eslint/json": "^0.14.0", - "@microsoft/eslint-plugin-sdl": "^1.1.0", "@zen-browser/surfer": "^1.13.1", - "eslint": "^9.39.2", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-eslint-plugin": "^7.3.0", - "eslint-plugin-html": "^8.1.3", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jest": "^29.12.1", - "eslint-plugin-json": "^4.0.1", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-lit": "^2.1.1", - "eslint-plugin-mozilla": "^4.3.3", - "eslint-plugin-no-unsanitized": "4.1.4", - "eslint-plugin-promise": "7.2.1", - "eslint-plugin-react": "7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-spidermonkey-js": "file:tools/eslint-plugin-spidermonkey-js", "formal-git": "^1.2.9", "globals": "^16.3.0", "husky": "^9.1.7", "lint-staged": "^15.3.0", - "prettier": "^3.4.2", - "prettier-plugin-sh": "^0.14.0", - "typescript": "^5.9.3", - "typescript-eslint": "^8.52.0" + "typescript": "^5.9.3" } }, "engine/tools/lint/eslint/eslint-plugin-spidermonkey-js": { @@ -531,297 +510,6 @@ "node": ">=6.9.0" } }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.78.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.78.0.tgz", - "integrity": "sha512-rQkU5u8hNAq2NVRzHnIUUvR6arbO0b6AOlvpTNS48CkiKSn/xtNfOzBK23JE4SiW89DgvU7GtxLVgV4Vn2HBAw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "^1.0.8", - "@typescript-eslint/types": "^8.46.4", - "comment-parser": "1.4.1", - "esquery": "^1.6.0", - "jsdoc-type-pratt-parser": "~7.0.0" - }, - "engines": { - "node": ">=20.11.0" - } - }, - "node_modules/@es-joy/resolve.exports": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@es-joy/resolve.exports/-/resolve.exports-1.2.0.tgz", - "integrity": "sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", - "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", - "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.39.2", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", - "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/json": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@eslint/json/-/json-0.14.0.tgz", - "integrity": "sha512-rvR/EZtvUG3p9uqrSmcDJPYSH7atmWr0RnFWN6m917MAPx82+zQgPUmDu0whPFG6XTyM0vB/hR6c1Q63OaYtCQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0", - "@eslint/plugin-kit": "^0.4.1", - "@humanwhocodes/momoa": "^3.3.10", - "natural-compare": "^1.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", - "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/momoa": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/momoa/-/momoa-3.3.10.tgz", - "integrity": "sha512-KWiFQpSAqEIyrTXko3hFNLeQvSK8zXlJQzhhxsyVn58WFRYXST99b3Nqnu+ttOtjds2Pl2grUHGpe2NzhPynuQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", @@ -875,67 +563,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@microsoft/eslint-plugin-sdl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@microsoft/eslint-plugin-sdl/-/eslint-plugin-sdl-1.1.0.tgz", - "integrity": "sha512-dxdNHOemLnBhfY3eByrujX9KyLigcNtW8sU+axzWv5nLGcsSBeKW2YYyTpfPo1hV8YPOmIGnfA4fZHyKVtWqBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-plugin-n": "17.10.3", - "eslint-plugin-react": "7.37.3", - "eslint-plugin-security": "1.4.0" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "eslint": "^9" - } - }, - "node_modules/@microsoft/eslint-plugin-sdl/node_modules/eslint-plugin-react": { - "version": "7.37.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz", - "integrity": "sha512-DomWuTQPFYZwF/7c9W2fkKkStqZmBd3uugfqBYLdkZ3Hii23WzZuOLUskGxB8qkSKqftxEeGL1TB2kMhrce0jA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.8", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/@microsoft/eslint-plugin-sdl/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@oozcitak/dom": { "version": "1.15.10", "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.10.tgz", @@ -1216,48 +843,6 @@ "node": ">= 10" } }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sindresorhus/base62": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/base62/-/base62-1.0.0.tgz", - "integrity": "sha512-TeheYy0ILzBEI/CO55CP6zJCSdSWeRtGnHy8U8dWSUH4I68iqTsy7HkMktR4xakThc9jotkPQUXT4ITdbV7cHA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/node": { "version": "17.0.45", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", @@ -1265,262 +850,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.52.0.tgz", - "integrity": "sha512-okqtOgqu2qmZJ5iN4TWlgfF171dZmx2FzdOv2K/ixL2LZWDStL8+JgQerI2sa8eAEfoydG9+0V96m7V+P8yE1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.52.0", - "@typescript-eslint/type-utils": "8.52.0", - "@typescript-eslint/utils": "8.52.0", - "@typescript-eslint/visitor-keys": "8.52.0", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.52.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.52.0.tgz", - "integrity": "sha512-iIACsx8pxRnguSYhHiMn2PvhvfpopO9FXHyn1mG5txZIsAaB6F0KwbFnUQN3KCiG3Jcuad/Cao2FAs1Wp7vAyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.52.0", - "@typescript-eslint/types": "8.52.0", - "@typescript-eslint/typescript-estree": "8.52.0", - "@typescript-eslint/visitor-keys": "8.52.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.52.0.tgz", - "integrity": "sha512-xD0MfdSdEmeFa3OmVqonHi+Cciab96ls1UhIF/qX/O/gPu5KXD0bY9lu33jj04fjzrXHcuvjBcBC+D3SNSadaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.52.0", - "@typescript-eslint/types": "^8.52.0", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.52.0.tgz", - "integrity": "sha512-ixxqmmCcc1Nf8S0mS0TkJ/3LKcC8mruYJPOU6Ia2F/zUUR4pApW7LzrpU3JmtePbRUTes9bEqRc1Gg4iyRnDzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.52.0", - "@typescript-eslint/visitor-keys": "8.52.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.52.0.tgz", - "integrity": "sha512-jl+8fzr/SdzdxWJznq5nvoI7qn2tNYV/ZBAEcaFMVXf+K6jmXvAFrgo/+5rxgnL152f//pDEAYAhhBAZGrVfwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.52.0.tgz", - "integrity": "sha512-JD3wKBRWglYRQkAtsyGz1AewDu3mTc7NtRjR/ceTyGoPqmdS5oCdx/oZMWD5Zuqmo6/MpsYs0wp6axNt88/2EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.52.0", - "@typescript-eslint/typescript-estree": "8.52.0", - "@typescript-eslint/utils": "8.52.0", - "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.52.0.tgz", - "integrity": "sha512-LWQV1V4q9V4cT4H5JCIx3481iIFxH1UkVk+ZkGGAV1ZGcjGI9IoFOfg3O6ywz8QqCDEp7Inlg6kovMofsNRaGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.52.0.tgz", - "integrity": "sha512-XP3LClsCc0FsTK5/frGjolyADTh3QmsLp6nKd476xNI9CsSsLnmn4f0jrzNoAulmxlmNIpeXuHYeEQv61Q6qeQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.52.0", - "@typescript-eslint/tsconfig-utils": "8.52.0", - "@typescript-eslint/types": "8.52.0", - "@typescript-eslint/visitor-keys": "8.52.0", - "debug": "^4.4.3", - "minimatch": "^9.0.5", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.52.0.tgz", - "integrity": "sha512-wYndVMWkweqHpEpwPhwqE2lnD2DxC6WVLupU/DOt/0/v+/+iQbbzO3jOHjmBMnhu0DgLULvOaU4h4pwHYi2oRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.52.0", - "@typescript-eslint/types": "8.52.0", - "@typescript-eslint/typescript-estree": "8.52.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.52.0.tgz", - "integrity": "sha512-ink3/Zofus34nmBsPjow63FP5M7IGff0RKAgqR6+CFpdk22M7aLwC9gOcLGYqr7MczLPzZVERW9hRog3O4n1sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.52.0", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@zen-browser/surfer": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.13.1.tgz", @@ -1555,46 +884,6 @@ "surfer": "dist/index.js" } }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/ansi-escapes": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", @@ -1640,194 +929,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -1835,13 +936,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ast-types-flow": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", - "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", - "dev": true, - "license": "MIT" - }, "node_modules/async-compat": { "version": "1.6.8", "resolved": "https://registry.npmjs.org/async-compat/-/async-compat-1.6.8.tgz", @@ -1856,16 +950,6 @@ "node": ">=0.8" } }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/async-icns": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/async-icns/-/async-icns-1.0.2.tgz", @@ -1896,32 +980,6 @@ "dev": true, "license": "MIT" }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axe-core": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.1.tgz", - "integrity": "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==", - "dev": true, - "license": "MPL-2.0", - "engines": { - "node": ">=4" - } - }, "node_modules/axios": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", @@ -1934,16 +992,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/b4a": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", @@ -1951,13 +999,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, "node_modules/bare-events": { "version": "2.5.4", "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", @@ -2101,17 +1142,6 @@ "node": ">= 0.4" } }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -2216,25 +1246,6 @@ "dev": true, "license": "(MIT OR Apache-2.0)" }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -2249,23 +1260,6 @@ "node": ">= 0.4" } }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/call-once-fn": { "version": "1.0.15", "resolved": "https://registry.npmjs.org/call-once-fn/-/call-once-fn-1.0.15.tgz", @@ -2276,16 +1270,6 @@ "node": ">=0.8" } }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001715", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz", @@ -2478,24 +1462,6 @@ "node": ">= 6" } }, - "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -2551,67 +1517,6 @@ "node": ">= 8" } }, - "node_modules/damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -2656,49 +1561,6 @@ "node": ">=4.0.0" } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2719,91 +1581,6 @@ "node": ">=8" } }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "BSD-2-Clause" - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", - "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2872,33 +1649,6 @@ "once": "^1.4.0" } }, - "node_modules/enhanced-resolve": { - "version": "5.18.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", - "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", - "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/environment": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", @@ -2912,75 +1662,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -3001,34 +1682,6 @@ "node": ">= 0.4" } }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-object-atoms": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", @@ -3058,37 +1711,6 @@ "node": ">= 0.4" } }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -3100,690 +1722,6 @@ "node": ">=6" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.39.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", - "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.1", - "@eslint/config-helpers": "^0.4.2", - "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.39.2", - "@eslint/plugin-kit": "^0.4.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-compat-utils": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz", - "integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "eslint": ">=6.0.0" - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.8", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", - "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "funding": { - "url": "https://opencollective.com/eslint-config-prettier" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", - "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-es-x": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.8.0.tgz", - "integrity": "sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/ota-meshi", - "https://opencollective.com/eslint" - ], - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.1.2", - "@eslint-community/regexpp": "^4.11.0", - "eslint-compat-utils": "^0.5.1" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": ">=8" - } - }, - "node_modules/eslint-plugin-eslint-plugin": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-7.3.0.tgz", - "integrity": "sha512-M9S7ihAFD91+FnSja0Joky+0xrJlgMqmy3WmbOJVNpnUqy49YqEImSdfuVbpnggVz3QinzIVPJh2cPYaJ1Z4TA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "estraverse": "^5.3.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.1 || >=24.0.0" - }, - "peerDependencies": { - "eslint": ">=9.0.0" - } - }, - "node_modules/eslint-plugin-html": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-8.1.3.tgz", - "integrity": "sha512-cnCdO7yb/jrvgSJJAfRkGDOwLu1AOvNdw8WCD6nh/2C4RnxuI4tz6QjMEAmmSiHSeugq/fXcIO8yBpIBQrMZCg==", - "dev": true, - "license": "ISC", - "dependencies": { - "htmlparser2": "^10.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", - "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-jest": { - "version": "29.12.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.12.1.tgz", - "integrity": "sha512-Rxo7r4jSANMBkXLICJKS0gjacgyopfNAsoS0e3R9AHnjoKuQOaaPfmsDJPi8UWwygI099OV/K/JhpYRVkxD4AA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/utils": "^8.0.0" - }, - "engines": { - "node": "^20.12.0 || ^22.0.0 || >=24.0.0" - }, - "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^8.0.0", - "eslint": "^8.57.0 || ^9.0.0", - "jest": "*" - }, - "peerDependenciesMeta": { - "@typescript-eslint/eslint-plugin": { - "optional": true - }, - "jest": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "61.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-61.7.1.tgz", - "integrity": "sha512-36DpldF95MlTX//n3/naULFVt8d1cV4jmSkx7ZKrE9ikkKHAgMLesuWp1SmwpVwAs5ndIM6abKd6PeOYZUgdWg==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.78.0", - "@es-joy/resolve.exports": "1.2.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.4.3", - "escape-string-regexp": "^4.0.0", - "espree": "^11.0.0", - "esquery": "^1.7.0", - "html-entities": "^2.6.0", - "object-deep-merge": "^2.0.0", - "parse-imports-exports": "^0.2.4", - "semver": "^7.7.3", - "spdx-expression-parse": "^4.0.0", - "to-valid-identifier": "^1.0.0" - }, - "engines": { - "node": ">=20.11.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/eslint-visitor-keys": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.0.tgz", - "integrity": "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/espree": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.0.0.tgz", - "integrity": "sha512-+gMeWRrIh/NsG+3NaLeWHuyeyk70p2tbvZIWBYcqQ4/7Xvars6GYTZNhF1sIeLcc6Wb11He5ffz3hsHyXFrw5A==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-4.0.1.tgz", - "integrity": "sha512-3An5ISV5dq/kHfXdNyY5TUe2ONC3yXFSkLX2gu+W8xAhKhfvrRvkSAeKXCxZqZ0KJLX15ojBuLPyj+UikQMkOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.21", - "vscode-json-languageservice": "^4.1.6" - }, - "engines": { - "node": ">=18.0" - } - }, - "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz", - "integrity": "sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "aria-query": "^5.3.2", - "array-includes": "^3.1.8", - "array.prototype.flatmap": "^1.3.2", - "ast-types-flow": "^0.0.8", - "axe-core": "^4.10.0", - "axobject-query": "^4.1.0", - "damerau-levenshtein": "^1.0.8", - "emoji-regex": "^9.2.2", - "hasown": "^2.0.2", - "jsx-ast-utils": "^3.3.5", - "language-tags": "^1.0.9", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "safe-regex-test": "^1.0.3", - "string.prototype.includes": "^2.0.1" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/eslint-plugin-lit": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-lit/-/eslint-plugin-lit-2.1.1.tgz", - "integrity": "sha512-qmyAOnnTCdS+vDnNxtCoF0icSKIio4GUv6ZLnaCtTX6G/YezRa6Ag6tOQ+MfV5Elvtw9CIXeliRX4mIBSwrPIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "eslint": ">= 8" - } - }, - "node_modules/eslint-plugin-mozilla": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-mozilla/-/eslint-plugin-mozilla-4.3.3.tgz", - "integrity": "sha512-Caxrl4pZoEV612oU4iGcRP+R4G7ooO1MpV5rTPCGKFTYVY6Iw3FEJ0AA+1mUY/rDIdqw7CxyV7+Hllzyh3UYlQ==", - "dev": true, - "license": "MPL-2.0", - "dependencies": { - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "estraverse": "^5.3.0", - "htmlparser2": "^10.0.0", - "toml-eslint-parser": "0.10.0" - }, - "engines": { - "node": ">=22.0.0" - }, - "peerDependencies": { - "@microsoft/eslint-plugin-sdl": "^1.0.0", - "eslint": "^9.0.0", - "eslint-plugin-jsdoc": "^61.0.0", - "eslint-plugin-no-unsanitized": "^4.1.0", - "eslint-plugin-promise": "^7.2.1" - }, - "peerDependenciesMeta": { - "@eslint-plugin-jsdoc": { - "optional": true - }, - "@microsoft/eslint-plugin-sdl": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-n": { - "version": "17.10.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.10.3.tgz", - "integrity": "sha512-ySZBfKe49nQZWR1yFaA0v/GsH6Fgp8ah6XV0WDz6CN8WO0ek4McMzb7A2xnf4DCYV43frjCygvb9f/wx7UUxRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "enhanced-resolve": "^5.17.0", - "eslint-plugin-es-x": "^7.5.0", - "get-tsconfig": "^4.7.0", - "globals": "^15.8.0", - "ignore": "^5.2.4", - "minimatch": "^9.0.5", - "semver": "^7.5.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": ">=8.23.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/eslint-plugin-n/node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-plugin-n/node_modules/minimatch": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", - "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.2" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/eslint-plugin-no-unsanitized": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-4.1.4.tgz", - "integrity": "sha512-cjAoZoq3J+5KJuycYYOWrc0/OpZ7pl2Z3ypfFq4GtaAgheg+L7YGxUo2YS3avIvo/dYU5/zR2hXu3v81M9NxhQ==", - "dev": true, - "license": "MPL-2.0", - "peerDependencies": { - "eslint": "^8 || ^9" - } - }, - "node_modules/eslint-plugin-promise": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-7.2.1.tgz", - "integrity": "sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-security": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-1.4.0.tgz", - "integrity": "sha512-xlS7P2PLMXeqfhyf3NpqbvbnW04kN8M9NtmhpR3XGyOvt/vNKS7XPXT5EDbwKW9vCjWH4PpfQvgD/+JgN0VJKA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "safe-regex": "^1.1.0" - } - }, - "node_modules/eslint-plugin-spidermonkey-js": { - "resolved": "tools/eslint-plugin-spidermonkey-js", - "link": true - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -3798,52 +1736,6 @@ "node": ">=4" } }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -3905,13 +1797,6 @@ "node": ">=0.8" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, "node_modules/fast-extract": { "version": "1.3.31", "resolved": "https://registry.npmjs.org/fast-extract/-/fast-extract-1.3.31.tgz", @@ -3960,20 +1845,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, "node_modules/fifo": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/fifo/-/fifo-2.4.1.tgz", @@ -3981,19 +1852,6 @@ "dev": true, "license": "MIT" }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -4007,44 +1865,6 @@ "node": ">=8" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, "node_modules/flush-write-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-2.0.0.tgz", @@ -4092,22 +1912,6 @@ } } }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/form-data": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", @@ -4168,37 +1972,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -4285,37 +2058,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-tsconfig": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", - "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -4323,19 +2065,6 @@ "dev": true, "license": "MIT" }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/globals": { "version": "16.3.0", "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", @@ -4349,23 +2078,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/globalyzer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", @@ -4400,19 +2112,6 @@ "dev": true, "license": "ISC" }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4423,35 +2122,6 @@ "node": ">=8" } }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -4501,44 +2171,6 @@ "node": ">= 0.4" } }, - "node_modules/html-entities": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", - "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT", - "peer": true - }, - "node_modules/htmlparser2": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.0.0.tgz", - "integrity": "sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.2.1", - "entities": "^6.0.0" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -4586,43 +2218,6 @@ ], "license": "BSD-3-Clause" }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4650,21 +2245,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -4685,24 +2265,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", @@ -4710,123 +2272,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-error": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", @@ -4834,32 +2279,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-fullwidth-code-point": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", @@ -4873,64 +2292,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4941,23 +2302,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", @@ -4965,25 +2309,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-relative": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", @@ -4997,35 +2322,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -5039,57 +2335,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -5103,52 +2348,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -5173,24 +2372,6 @@ "dev": true, "license": "ISC" }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5198,30 +2379,6 @@ "dev": true, "license": "MIT" }, - "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-7.0.0.tgz", - "integrity": "sha512-c7YbokssPOSHmqTbSAmTtnVgAVa/7lumWNYqomgd5KOMyPrRve2anx6lonfOsXEQacqF9FKVUj7bLg4vRSvdYA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=20.0.0" - } - }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -5235,27 +2392,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -5270,13 +2406,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -5290,32 +2419,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kleur": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", @@ -5326,40 +2429,6 @@ "node": ">=6" } }, - "node_modules/language-subtag-registry": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", - "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/language-tags": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", - "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "language-subtag-registry": "^0.3.20" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lifecycle": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lifecycle/-/lifecycle-1.0.4.tgz", @@ -5593,29 +2662,6 @@ "node": ">=18.0.0" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.compact": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/lodash.compact/-/lodash.compact-3.0.1.tgz", @@ -5623,13 +2669,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.throttle": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", @@ -5703,19 +2742,6 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -5817,19 +2843,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -5893,13 +2906,6 @@ "dev": true, "license": "MIT" }, - "node_modules/mvdan-sh": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/mvdan-sh/-/mvdan-sh-0.10.1.tgz", - "integrity": "sha512-kMbrH0EObaKmK3nVRKUIIya1dpASHIEusM13S4V1ViHFuxuNxCo+arxoa6j/dbV22YBGjl7UKJm9QQKJ2Crzhg==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/nanoassert": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-2.0.0.tgz", @@ -5914,13 +2920,6 @@ "dev": true, "license": "MIT" }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", @@ -5989,127 +2988,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-deep-merge": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.0.tgz", - "integrity": "sha512-3DC3UMpeffLTHiuXSy/UG4NOIYTLlY9u3V82+djSCLYClWobZiS4ivYzpIUWrRY/nfsJ8cWsKyG3QfyLePmhvg==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/on-one": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/on-one/-/on-one-0.1.4.tgz", @@ -6146,24 +3024,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/os-shim": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", @@ -6173,115 +3033,6 @@ "node": ">= 0.4.0" } }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-imports-exports": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz", - "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "parse-statements": "1.0.11" - } - }, - "node_modules/parse-statements": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz", - "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true, - "license": "MIT" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^6.0.1" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -6292,13 +3043,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -6360,16 +3104,6 @@ "node": ">=12.13.0" } }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/prebuild-install": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", @@ -6454,52 +3188,6 @@ "node": ">=6" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", - "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", - "dev": true, - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-sh": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/prettier-plugin-sh/-/prettier-plugin-sh-0.14.0.tgz", - "integrity": "sha512-hfXulj5+zEl/ulrO5kMuuTPKmXvOg0bnLHY1hKFNN/N+/903iZbNp8NyZBTsgI8dtkSgFfAEIQq0IQTyP1ZVFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mvdan-sh": "^0.10.1", - "sh-syntax": "^0.4.1" - }, - "engines": { - "node": ">=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - }, - "peerDependencies": { - "prettier": "^3.0.3" - } - }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -6542,18 +3230,6 @@ "node": ">=6" } }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -6584,16 +3260,6 @@ "pump": "^3.0.0" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/queue-cb": { "version": "1.4.16", "resolved": "https://registry.npmjs.org/queue-cb/-/queue-cb-1.4.16.tgz", @@ -6627,13 +3293,6 @@ "dev": true, "license": "ISC" }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT" - }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -6657,50 +3316,6 @@ "dev": true, "license": "MIT" }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", @@ -6722,38 +3337,6 @@ "semver": "bin/semver" } }, - "node_modules/reserved-identifiers": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/reserved-identifiers/-/reserved-identifiers-1.2.0.tgz", - "integrity": "sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", @@ -6764,16 +3347,6 @@ "node": ">=0.10.0" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -6820,16 +3393,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12" - } - }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", @@ -6862,33 +3425,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-array-concat/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6910,58 +3446,6 @@ ], "license": "MIT" }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-push-apply/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "ret": "~0.1.10" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/semver": { "version": "7.7.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", @@ -6975,71 +3459,6 @@ "node": ">=10" } }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/sh-syntax": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/sh-syntax/-/sh-syntax-0.4.2.tgz", - "integrity": "sha512-/l2UZ5fhGZLVZa16XQM9/Vq/hezGGbdHeVEA01uWjOL1+7Ek/gt6FquW0iKKws4a9AYPYvlz6RyVvjh3JxOteg==", - "dev": true, - "license": "MIT", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, "node_modules/sharp": { "version": "0.32.6", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", @@ -7104,82 +3523,6 @@ "hash-string": "^1.0.0" } }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -7281,34 +3624,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0", - "peer": true - }, - "node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.22", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", - "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", - "dev": true, - "license": "CC0-1.0", - "peer": true - }, "node_modules/speedometer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/speedometer/-/speedometer-1.0.0.tgz", @@ -7339,20 +3654,6 @@ "node": ">=0.8" } }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/stream-shift": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", @@ -7449,119 +3750,6 @@ "node": ">=8" } }, - "node_modules/string.prototype.includes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.1.tgz", - "integrity": "sha512-o7+c9bW6zpAdJHTtujeePODAhkuicdAryFsfVKwA+wGw89wJ4GTY484WTucM9hLtDEOpOvI+aHnzqnC5lHp4Rg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -7578,16 +3766,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -7621,29 +3799,6 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/tar-fs": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", @@ -7772,54 +3927,6 @@ "globrex": "^0.1.2" } }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7840,99 +3947,6 @@ "dev": true, "license": "MIT" }, - "node_modules/to-valid-identifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-valid-identifier/-/to-valid-identifier-1.0.0.tgz", - "integrity": "sha512-41wJyvKep3yT2tyPqX/4blcfybknGB4D+oETKLs7Q76UiPqRpUJK3hr1nxelyYO0PHKVzJwlu0aCeEAsGI6rpw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@sindresorhus/base62": "^1.0.0", - "reserved-identifiers": "^1.0.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/toml-eslint-parser": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/toml-eslint-parser/-/toml-eslint-parser-0.10.0.tgz", - "integrity": "sha512-khrZo4buq4qVmsGzS5yQjKe/WsFvV8fGfOjDQN0q4iy9FjRfPWRgTFrU8u1R2iu/SfWLhY9WnCi4Jhdrcbtg+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - } - }, - "node_modules/toml-eslint-parser/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/ts-api-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", - "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD" - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -7946,97 +3960,6 @@ "node": "*" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -8051,49 +3974,6 @@ "node": ">=14.17" } }, - "node_modules/typescript-eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.52.0.tgz", - "integrity": "sha512-atlQQJ2YkO4pfTVQmQ+wvYQwexPDOIgo+RaVcD7gHgzy/IQA+XTyuxNM9M9TVXvttkF7koBHmcwisKdOAf2EcA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.52.0", - "@typescript-eslint/parser": "8.52.0", - "@typescript-eslint/typescript-estree": "8.52.0", - "@typescript-eslint/utils": "8.52.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", @@ -8157,16 +4037,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -8174,48 +4044,6 @@ "dev": true, "license": "MIT" }, - "node_modules/vscode-json-languageservice": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.2.1.tgz", - "integrity": "sha512-xGmv9QIWs2H8obGbWg+sIPI/3/pFgj/5OWBhNzs00BkYQ9UaB2F6JJaGB/2/YOZJ3BvLXQTC4Q7muqU25QgAhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-languageserver-textdocument": "^1.0.3", - "vscode-languageserver-types": "^3.16.0", - "vscode-nls": "^5.0.0", - "vscode-uri": "^3.0.3" - } - }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-nls": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.2.0.tgz", - "integrity": "sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==", - "dev": true, - "license": "MIT" - }, - "node_modules/vscode-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", - "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", - "dev": true, - "license": "MIT" - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -8232,112 +4060,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type/node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", @@ -8472,19 +4194,6 @@ "node": ">= 14" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/zip": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/zip/-/zip-1.2.0.tgz", @@ -8521,7 +4230,7 @@ } }, "tools/eslint-plugin-spidermonkey-js": { - "dev": true, + "extraneous": true, "license": "MPL-2.0", "devDependencies": {}, "engines": { diff --git a/package.json b/package.json index 0a80cb901..bd8509d26 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,8 @@ "sync:raw": "surfer update", "sync:rc": "python3 scripts/update_ff.py --rc", "sync:l10n": "python3 scripts/update_ff.py --just-l10n", - "pretty": "prettier . --write --cache && autopep8 -r --in-place scripts/ src/ --exclude src/zen/tests/", - "lint": "npx eslint src/ && prettier . --check --cache", - "lint:fix": "npm run pretty && npx eslint src/ --fix", + "lint": "cd engine && ./mach lint zen", + "lint:fix": "npm run lint -- --fix", "prepare": "husky", "reset-ff": "surfer reset", "surfer": "surfer", @@ -51,32 +50,11 @@ "homepage": "https://github.com/zen-browser/desktop#readme", "devDependencies": { "@babel/preset-typescript": "^7.27.0", - "@eslint/js": "^9.39.2", - "@eslint/json": "^0.14.0", - "@microsoft/eslint-plugin-sdl": "^1.1.0", "@zen-browser/surfer": "^1.13.1", - "eslint": "^9.39.2", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-eslint-plugin": "^7.3.0", - "eslint-plugin-html": "^8.1.3", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jest": "^29.12.1", - "eslint-plugin-json": "^4.0.1", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-lit": "^2.1.1", - "eslint-plugin-mozilla": "^4.3.3", - "eslint-plugin-no-unsanitized": "4.1.4", - "eslint-plugin-promise": "7.2.1", - "eslint-plugin-react": "7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-spidermonkey-js": "file:tools/eslint-plugin-spidermonkey-js", "formal-git": "^1.2.9", "globals": "^16.3.0", "husky": "^9.1.7", "lint-staged": "^15.3.0", - "prettier": "^3.4.2", - "prettier-plugin-sh": "^0.14.0", - "typescript": "^5.9.3", - "typescript-eslint": "^8.52.0" + "typescript": "^5.9.3" } } diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 3f0c0bdce..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,9 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -[tool.autopep8] -max_line_length = 120 -recursive = true -aggressive = 3 -indent_size = 2 diff --git a/requirements.txt b/requirements.txt index d01dcfa80..45da7b672 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -autopep8==2.3.1 click==8.1.8 mypy-extensions==1.0.0 packaging==24.2 diff --git a/src/-stylelintignore.patch b/src/-stylelintignore.patch new file mode 100644 index 000000000..154a04f45 --- /dev/null +++ b/src/-stylelintignore.patch @@ -0,0 +1,31 @@ +diff --git a/.stylelintignore b/.stylelintignore +index 185490999507b8a5032977237af50f5e61c71df1..36f760f473b857e851134ceb62c837cb8d29c966 100644 +--- a/.stylelintignore ++++ b/.stylelintignore +@@ -106,3 +106,26 @@ build/pgo/blueprint/**/*.css + # under our control or we don't want to modify at this point: + testing/web-platform/mozilla/ + testing/web-platform/tests/ ++ ++**/*.bundle.min.js ++**/*.min.js ++**/*.min.mjs ++ ++**/*.svg ++ ++**/*.inc.css ++ ++zen/tests/mochitests/* ++ ++# Some CSS files are preprocessed and prettier doesn't handle them well ++# We also dont want to format the CSS files that are generated by the build ++zen/tabs/zen-tabs.css ++zen/common/styles/zen-theme.css ++zen/compact-mode/zen-compact-mode.css ++zen/common/ZenEmojis.mjs ++ ++zen/split-view/zen-decks.css ++zen/workspaces/zen-workspaces.css ++zen/common/styles/zen-toolbar.css ++ ++*.inc diff --git a/src/-stylelintrc-js.patch b/src/-stylelintrc-js.patch new file mode 100644 index 000000000..9e3900231 --- /dev/null +++ b/src/-stylelintrc-js.patch @@ -0,0 +1,25 @@ +diff --git a/.stylelintrc.js b/.stylelintrc.js +index 36719c9e152c34da2aa76fc74d74e58cb9e6b1cc..4226db2e0af4b36923a93dcd0b76e59f8508ba36 100644 +--- a/.stylelintrc.js ++++ b/.stylelintrc.js +@@ -67,7 +67,7 @@ module.exports = { + ], + + "max-nesting-depth": [ +- 3, ++ 6, + { + ignore: ["blockless-at-rules"], + }, +@@ -274,9 +274,9 @@ module.exports = { + // Remove this line setting `csscontrols/use-logical` to null after implementing fixes + "csstools/use-logical": null, + "stylelint-plugin-mozilla/no-base-design-tokens": true, +- "stylelint-plugin-mozilla/use-design-tokens": true, ++ "stylelint-plugin-mozilla/use-design-tokens": false, + "stylelint-plugin-mozilla/no-non-semantic-token-usage": true, +- "stylelint-plugin-mozilla/use-size-tokens": true, ++ "stylelint-plugin-mozilla/use-size-tokens": false, + }, + + overrides: [ diff --git a/src/eslint-file-globals-config-mjs.patch b/src/eslint-file-globals-config-mjs.patch new file mode 100644 index 000000000..d1149428e --- /dev/null +++ b/src/eslint-file-globals-config-mjs.patch @@ -0,0 +1,22 @@ +diff --git a/eslint-file-globals.config.mjs b/eslint-file-globals.config.mjs +index 00e49fce00efecab254aa1b8f0f0fe9ed2c24057..e9f390e15537d3d03a87f1c87099cb34698aee49 100644 +--- a/eslint-file-globals.config.mjs ++++ b/eslint-file-globals.config.mjs +@@ -22,6 +22,7 @@ + + import globals from "globals"; + import mozilla from "eslint-plugin-mozilla"; ++import zenGlobals from "./zen/zen.globals.mjs"; + + export default [ + { +@@ -550,4 +551,9 @@ export default [ + ], + languageOptions: { globals: globals.worker }, + }, ++ { ++ name: "zen-globals", ++ files: ["zen/**/!(*.sys).mjs", "zen/**/*.js"], ++ languageOptions: { globals: zenGlobals.reduce((acc, name) => ({ ...acc, [name]: "readonly" }), {}) }, ++ } + ]; diff --git a/src/eslint-ignores-config-mjs.patch b/src/eslint-ignores-config-mjs.patch new file mode 100644 index 000000000..42d5a8aa2 --- /dev/null +++ b/src/eslint-ignores-config-mjs.patch @@ -0,0 +1,12 @@ +diff --git a/eslint-ignores.config.mjs b/eslint-ignores.config.mjs +index 0cfd7e02ad58c331f48f1ba8e1588777e1ce2595..d85b95b18a7195b6794083af71cbe1947d9f2f9c 100644 +--- a/eslint-ignores.config.mjs ++++ b/eslint-ignores.config.mjs +@@ -312,4 +312,7 @@ export default [ + // Test files for circular import in modules. + "dom/base/test/jsmodules/import_circular.mjs", + "dom/base/test/jsmodules/import_circular_1.mjs", ++ ++ "**/*.min.mjs", ++ "zen/tests/**", + ]; diff --git a/src/eslint-test-paths-config-mjs.patch b/src/eslint-test-paths-config-mjs.patch new file mode 100644 index 000000000..34fea2e39 --- /dev/null +++ b/src/eslint-test-paths-config-mjs.patch @@ -0,0 +1,12 @@ +diff --git a/eslint-test-paths.config.mjs b/eslint-test-paths.config.mjs +index 53d97521a676d04212abb0263cb166da06c889e0..fa8c261de7a8663a369fb41671476d314722c025 100644 +--- a/eslint-test-paths.config.mjs ++++ b/eslint-test-paths.config.mjs +@@ -218,6 +218,7 @@ const extraBrowserTestPaths = [ + "toolkit/components/windowwatcher/test/", + "toolkit/mozapps/extensions/test/xpinstall/", + "uriloader/exthandler/tests/mochitest/", ++ "zen/tests/", + ]; + + // DO NOT add more items to this list. Please see the note at the top diff --git a/src/python/mozlint/mozlint/roller-py.patch b/src/python/mozlint/mozlint/roller-py.patch new file mode 100644 index 000000000..b3f21d87a --- /dev/null +++ b/src/python/mozlint/mozlint/roller-py.patch @@ -0,0 +1,12 @@ +diff --git a/python/mozlint/mozlint/roller.py b/python/mozlint/mozlint/roller.py +index aeafa93cc525d2846614b600e95fd817b832b0ef..69414ed032523f1b53b78ad867145efaea422c63 100644 +--- a/python/mozlint/mozlint/roller.py ++++ b/python/mozlint/mozlint/roller.py +@@ -92,7 +92,6 @@ def _run_worker(config, paths, **lintargs): + res = res or [] + else: + log.error(f"Unexpected result type received: {type(res)}") +- assert False + except Exception: + log.exception(f"{config['name']} failed") + res = 1 diff --git a/src/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc-mjs.patch b/src/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc-mjs.patch new file mode 100644 index 000000000..d2dee15ea --- /dev/null +++ b/src/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc-mjs.patch @@ -0,0 +1,13 @@ +diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc.mjs b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc.mjs +index 87fc32f6a1bdf21a56fb3ce18c767ebbb12c6d67..174fcc3a679ae655c9bce907461f9c3a9030c2a9 100644 +--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc.mjs ++++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/require-jsdoc.mjs +@@ -13,7 +13,7 @@ export default { + "error", + { + require: { +- ClassDeclaration: true, ++ ClassDeclaration: false, + FunctionDeclaration: false, + }, + }, diff --git a/src/tools/lint/ignorefile-yml.patch b/src/tools/lint/ignorefile-yml.patch new file mode 100644 index 000000000..32dd81e22 --- /dev/null +++ b/src/tools/lint/ignorefile-yml.patch @@ -0,0 +1,12 @@ +diff --git a/tools/lint/ignorefile.yml b/tools/lint/ignorefile.yml +index 5ae3b282a54c129bb16bca461470154e4a882618..f46c6256037cbef1392f8d070726d45dadac1289 100644 +--- a/tools/lint/ignorefile.yml ++++ b/tools/lint/ignorefile.yml +@@ -3,7 +3,6 @@ ignorefile: + description: Linter for .gitignore and .hgignore files + include: + - '.gitignore' +- - '.hgignore' + support-files: + - 'tools/lint/ignorefile**' + type: external diff --git a/src/tools/lint/rejected-words-yml.patch b/src/tools/lint/rejected-words-yml.patch new file mode 100644 index 000000000..e70062e59 --- /dev/null +++ b/src/tools/lint/rejected-words-yml.patch @@ -0,0 +1,12 @@ +diff --git a/tools/lint/rejected-words.yml b/tools/lint/rejected-words.yml +index d5ca2e05fb335fcd17d1559d5332ec4a43d7cd1d..1f34e8d5e05508fc541bc7aa6a779cd98206032a 100644 +--- a/tools/lint/rejected-words.yml ++++ b/tools/lint/rejected-words.yml +@@ -8,7 +8,6 @@ avoid-blacklist-and-whitelist: + ignore-case: true + # Based on codespell with idl and webidl added. + extensions: +- - js + - mjs + - jsx + - idl diff --git a/src/zen/common/emojis/ZenEmojisData.min.mjs b/src/zen/common/emojis/ZenEmojisData.min.mjs index 21fff5121..a9b4a5b01 100644 --- a/src/zen/common/emojis/ZenEmojisData.min.mjs +++ b/src/zen/common/emojis/ZenEmojisData.min.mjs @@ -1,2 +1,6 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + /* eslint-disable no-unused-vars */ var ZenEmojisData = [{"tags": ["cheerful", "cheery", "face", "grin", "grinning", "happy", "laugh", "nice", "smile", "smiling", "teeth"], "order": 1, "emoji": "😀"}, {"tags": ["awesome", "big", "eyes", "face", "grin", "grinning", "happy", "mouth", "open", "smile", "smiling", "teeth", "yay"], "order": 2, "emoji": "😃"}, {"tags": ["eye", "eyes", "face", "grin", "grinning", "happy", "laugh", "lol", "mouth", "open", "smile", "smiling"], "order": 3, "emoji": "😄"}, {"tags": ["beaming", "eye", "eyes", "face", "grin", "grinning", "happy", "nice", "smile", "smiling", "teeth"], "order": 4, "emoji": "😁"}, {"tags": ["closed", "eyes", "face", "grinning", "haha", "hahaha", "happy", "laugh", "lol", "mouth", "open", "rofl", "smile", "smiling", "squinting"], "order": 5, "emoji": "😆"}, {"tags": ["cold", "dejected", "excited", "face", "grinning", "mouth", "nervous", "open", "smile", "smiling", "stress", "stressed", "sweat"], "order": 6, "emoji": "😅"}, {"tags": ["crying", "face", "floor", "funny", "haha", "happy", "hehe", "hilarious", "joy", "laugh", "lmao", "lol", "rofl", "roflmao", "rolling", "tear"], "order": 7, "emoji": "🤣"}, {"tags": ["crying", "face", "feels", "funny", "haha", "happy", "hehe", "hilarious", "joy", "laugh", "lmao", "lol", "rofl", "roflmao", "tear"], "order": 8, "emoji": "😂"}, {"tags": ["face", "happy", "slightly", "smile", "smiling"], "order": 9, "emoji": "🙂"}, {"tags": ["face", "hehe", "smile", "upside-down"], "order": 10, "emoji": "🙃"}, {"tags": ["disappear", "dissolve", "embarrassed", "face", "haha", "heat", "hot", "liquid", "lol", "melt", "melting", "sarcasm", "sarcastic"], "order": 11, "emoji": "🫠"}, {"tags": ["face", "flirt", "heartbreaker", "sexy", "slide", "tease", "wink", "winking", "winks"], "order": 12, "emoji": "😉"}, {"tags": ["blush", "eye", "eyes", "face", "glad", "satisfied", "smile", "smiling"], "order": 13, "emoji": "😊"}, {"tags": ["angel", "angelic", "angels", "blessed", "face", "fairy", "fairytale", "fantasy", "halo", "happy", "innocent", "peaceful", "smile", "smiling", "spirit", "tale"], "order": 14, "emoji": "😇"}, {"tags": ["3", "adore", "crush", "face", "heart", "hearts", "ily", "love", "romance", "smile", "smiling", "you"], "order": 15, "emoji": "🥰"}, {"tags": ["143", "bae", "eye", "face", "feels", "heart-eyes", "hearts", "ily", "kisses", "love", "romance", "romantic", "smile", "xoxo"], "order": 16, "emoji": "😍"}, {"tags": ["excited", "eyes", "face", "grinning", "smile", "star", "starry-eyed", "wow"], "order": 17, "emoji": "🤩"}, {"tags": ["adorbs", "bae", "blowing", "face", "flirt", "heart", "ily", "kiss", "love", "lover", "miss", "muah", "romantic", "smooch", "xoxo", "you"], "order": 18, "emoji": "😘"}, {"tags": ["143", "date", "dating", "face", "flirt", "ily", "kiss", "love", "smooch", "smooches", "xoxo", "you"], "order": 19, "emoji": "😗"}, {"tags": ["face", "happy", "outlined", "relaxed", "smile", "smiling"], "order": 21, "emoji": "☺️"}, {"tags": ["143", "bae", "blush", "closed", "date", "dating", "eye", "eyes", "face", "flirt", "ily", "kisses", "kissing", "smooches", "xoxo"], "order": 22, "emoji": "😚"}, {"tags": ["143", "closed", "date", "dating", "eye", "eyes", "face", "flirt", "ily", "kiss", "kisses", "kissing", "love", "night", "smile", "smiling"], "order": 23, "emoji": "😙"}, {"tags": ["face", "glad", "grateful", "happy", "joy", "pain", "proud", "relieved", "smile", "smiley", "smiling", "tear", "touched"], "order": 24, "emoji": "🥲"}, {"tags": ["delicious", "eat", "face", "food", "full", "hungry", "savor", "smile", "smiling", "tasty", "um", "yum", "yummy"], "order": 25, "emoji": "😋"}, {"tags": ["awesome", "cool", "face", "nice", "party", "stuck-out", "sweet", "tongue"], "order": 26, "emoji": "😛"}, {"tags": ["crazy", "epic", "eye", "face", "funny", "joke", "loopy", "nutty", "party", "stuck-out", "tongue", "wacky", "weirdo", "wink", "winking", "yolo"], "order": 27, "emoji": "😜"}, {"tags": ["crazy", "eye", "eyes", "face", "goofy", "large", "small", "zany"], "order": 28, "emoji": "🤪"}, {"tags": ["closed", "eye", "eyes", "face", "gross", "horrible", "omg", "squinting", "stuck-out", "taste", "tongue", "whatever", "yolo"], "order": 29, "emoji": "😝"}, {"tags": ["face", "money", "money-mouth", "mouth", "paid"], "order": 30, "emoji": "🤑"}, {"tags": ["face", "hands", "hug", "hugging", "open", "smiling"], "order": 31, "emoji": "🤗"}, {"tags": ["face", "giggle", "giggling", "hand", "mouth", "oops", "realization", "secret", "shock", "sudden", "surprise", "whoops"], "order": 32, "emoji": "🤭"}, {"tags": ["amazement", "awe", "disbelief", "embarrass", "eyes", "face", "gasp", "hand", "mouth", "omg", "open", "over", "quiet", "scared", "shock", "surprise"], "order": 33, "emoji": "🫢"}, {"tags": ["captivated", "embarrass", "eye", "face", "hide", "hiding", "peek", "peeking", "peep", "scared", "shy", "stare"], "order": 34, "emoji": "🫣"}, {"tags": ["face", "quiet", "shh", "shush", "shushing"], "order": 35, "emoji": "🤫"}, {"tags": ["chin", "consider", "face", "hmm", "ponder", "pondering", "thinking", "wondering"], "order": 36, "emoji": "🤔"}, {"tags": ["face", "good", "luck", "ma’am", "ok", "respect", "salute", "saluting", "sir", "troops", "yes"], "order": 37, "emoji": "🫡"}, {"tags": ["face", "keep", "mouth", "quiet", "secret", "shut", "zip", "zipper", "zipper-mouth"], "order": 38, "emoji": "🤐"}, {"tags": ["disapproval", "disbelief", "distrust", "emoji", "eyebrow", "face", "hmm", "mild", "raised", "skeptic", "skeptical", "skepticism", "surprise", "what"], "order": 39, "emoji": "🤨"}, {"tags": ["awkward", "blank", "deadpan", "expressionless", "face", "fine", "jealous", "meh", "neutral", "oh", "shade", "straight", "unamused", "unhappy", "unimpressed", "whatever"], "order": 40, "emoji": "😐️"}, {"tags": ["awkward", "dead", "expressionless", "face", "fine", "inexpressive", "jealous", "meh", "not", "oh", "omg", "straight", "uh", "unhappy", "unimpressed", "whatever"], "order": 41, "emoji": "😑"}, {"tags": ["awkward", "blank", "expressionless", "face", "mouth", "mouthless", "mute", "quiet", "secret", "silence", "silent", "speechless"], "order": 42, "emoji": "😶"}, {"tags": ["depressed", "disappear", "dotted", "face", "hidden", "hide", "introvert", "invisible", "line", "meh", "whatever", "wtv"], "order": 43, "emoji": "🫥"}, {"tags": ["absentminded", "clouds", "face", "fog", "head"], "order": 44, "emoji": "😶‍🌫️"}, {"tags": ["boss", "dapper", "face", "flirt", "homie", "kidding", "leer", "shade", "slick", "sly", "smirk", "smug", "snicker", "suave", "suspicious", "swag"], "order": 46, "emoji": "😏"}, {"tags": ["...", "bored", "face", "fine", "jealous", "jel", "jelly", "pissed", "smh", "ugh", "uhh", "unamused", "unhappy", "weird", "whatever"], "order": 47, "emoji": "😒"}, {"tags": ["eyeroll", "eyes", "face", "rolling", "shade", "ugh", "whatever"], "order": 48, "emoji": "🙄"}, {"tags": ["awk", "awkward", "dentist", "face", "grimace", "grimacing", "grinning", "smile", "smiling"], "order": 49, "emoji": "😬"}, {"tags": ["blow", "blowing", "exhale", "exhaling", "exhausted", "face", "gasp", "groan", "relief", "sigh", "smiley", "smoke", "whisper", "whistle"], "order": 50, "emoji": "😮‍💨"}, {"tags": ["face", "liar", "lie", "lying", "pinocchio"], "order": 51, "emoji": "🤥"}, {"tags": ["crazy", "daze", "earthquake", "face", "omg", "panic", "shaking", "shock", "surprise", "vibrate", "whoa", "wow"], "order": 52, "emoji": "🫨"}, {"tags": ["head", "horizontally", "no", "shake", "shaking"], "order": 53, "emoji": "🙂‍↔️"}, {"tags": ["head", "nod", "shaking", "vertically", "yes"], "order": 55, "emoji": "🙂‍↕️"}, {"tags": ["calm", "face", "peace", "relief", "relieved", "zen"], "order": 57, "emoji": "😌"}, {"tags": ["awful", "bored", "dejected", "died", "disappointed", "face", "losing", "lost", "pensive", "sad", "sucks"], "order": 58, "emoji": "😔"}, {"tags": ["crying", "face", "good", "night", "sad", "sleep", "sleeping", "sleepy", "tired"], "order": 59, "emoji": "😪"}, {"tags": ["drooling", "face"], "order": 60, "emoji": "🤤"}, {"tags": ["bed", "bedtime", "face", "good", "goodnight", "nap", "night", "sleep", "sleeping", "tired", "whatever", "yawn", "zzz"], "order": 61, "emoji": "😴"}, {"tags": ["bags", "bored", "exhausted", "eyes", "face", "fatigued", "late", "sleepy", "tired", "weary"], "order": 62, "emoji": "🫩"}, {"tags": ["cold", "dentist", "dermatologist", "doctor", "dr", "face", "germs", "mask", "medical", "medicine", "sick"], "order": 63, "emoji": "😷"}, {"tags": ["face", "ill", "sick", "thermometer"], "order": 64, "emoji": "🤒"}, {"tags": ["bandage", "face", "head-bandage", "hurt", "injury", "ouch"], "order": 65, "emoji": "🤕"}, {"tags": ["face", "gross", "nasty", "nauseated", "sick", "vomit"], "order": 66, "emoji": "🤢"}, {"tags": ["barf", "ew", "face", "gross", "puke", "sick", "spew", "throw", "up", "vomit", "vomiting"], "order": 67, "emoji": "🤮"}, {"tags": ["face", "fever", "flu", "gesundheit", "sick", "sneeze", "sneezing"], "order": 68, "emoji": "🤧"}, {"tags": ["dying", "face", "feverish", "heat", "hot", "panting", "red-faced", "stroke", "sweating", "tongue"], "order": 69, "emoji": "🥵"}, {"tags": ["blue", "blue-faced", "cold", "face", "freezing", "frostbite", "icicles", "subzero", "teeth"], "order": 70, "emoji": "🥶"}, {"tags": ["dizzy", "drunk", "eyes", "face", "intoxicated", "mouth", "tipsy", "uneven", "wavy", "woozy"], "order": 71, "emoji": "🥴"}, {"tags": ["crossed-out", "dead", "dizzy", "eyes", "face", "feels", "knocked", "out", "sick", "tired"], "order": 72, "emoji": "😵"}, {"tags": ["confused", "dizzy", "eyes", "face", "hypnotized", "omg", "smiley", "spiral", "trouble", "whoa", "woah", "woozy"], "order": 73, "emoji": "😵‍💫"}, {"tags": ["blown", "explode", "exploding", "head", "mind", "mindblown", "no", "shocked", "way"], "order": 74, "emoji": "🤯"}, {"tags": ["cowboy", "cowgirl", "face", "hat"], "order": 75, "emoji": "🤠"}, {"tags": ["bday", "birthday", "celebrate", "celebration", "excited", "face", "happy", "hat", "hooray", "horn", "party", "partying"], "order": 76, "emoji": "🥳"}, {"tags": ["disguise", "eyebrow", "face", "glasses", "incognito", "moustache", "mustache", "nose", "person", "spy", "tache", "tash"], "order": 77, "emoji": "🥸"}, {"tags": ["awesome", "beach", "bright", "bro", "chilling", "cool", "face", "rad", "relaxed", "shades", "slay", "smile", "style", "sunglasses", "swag", "win"], "order": 78, "emoji": "😎"}, {"tags": ["brainy", "clever", "expert", "face", "geek", "gifted", "glasses", "intelligent", "nerd", "smart"], "order": 79, "emoji": "🤓"}, {"tags": ["classy", "face", "fancy", "monocle", "rich", "stuffy", "wealthy"], "order": 80, "emoji": "🧐"}, {"tags": ["befuddled", "confused", "confusing", "dunno", "face", "frown", "hm", "meh", "not", "sad", "sorry", "sure"], "order": 81, "emoji": "😕"}, {"tags": ["confused", "confusion", "diagonal", "disappointed", "doubt", "doubtful", "face", "frustrated", "frustration", "meh", "mouth", "skeptical", "unsure", "whatever", "wtv"], "order": 82, "emoji": "🫤"}, {"tags": ["anxious", "butterflies", "face", "nerves", "nervous", "sad", "stress", "stressed", "surprised", "worried", "worry"], "order": 83, "emoji": "😟"}, {"tags": ["face", "frown", "frowning", "sad", "slightly"], "order": 84, "emoji": "🙁"}, {"tags": ["face", "frown", "frowning", "sad"], "order": 86, "emoji": "☹️"}, {"tags": ["believe", "face", "forgot", "mouth", "omg", "open", "shocked", "surprised", "sympathy", "unbelievable", "unreal", "whoa", "wow", "you"], "order": 87, "emoji": "😮"}, {"tags": ["epic", "face", "hushed", "omg", "stunned", "surprised", "whoa", "woah"], "order": 88, "emoji": "😯"}, {"tags": ["astonished", "cost", "face", "no", "omg", "shocked", "totally", "way"], "order": 89, "emoji": "😲"}, {"tags": ["amazed", "awkward", "crazy", "dazed", "dead", "disbelief", "embarrassed", "face", "flushed", "geez", "heat", "hot", "impressed", "jeez", "what", "wow"], "order": 90, "emoji": "😳"}, {"tags": ["begging", "big", "eyes", "face", "mercy", "not", "pleading", "please", "pretty", "puppy", "sad", "why"], "order": 91, "emoji": "🥺"}, {"tags": ["admiration", "aww", "back", "cry", "embarrassed", "face", "feelings", "grateful", "gratitude", "holding", "joy", "please", "proud", "resist", "sad", "tears"], "order": 92, "emoji": "🥹"}, {"tags": ["caught", "face", "frown", "frowning", "guard", "mouth", "open", "scared", "scary", "surprise", "what", "wow"], "order": 93, "emoji": "😦"}, {"tags": ["anguished", "face", "forgot", "scared", "scary", "stressed", "surprise", "unhappy", "what", "wow"], "order": 94, "emoji": "😧"}, {"tags": ["afraid", "anxious", "blame", "face", "fear", "fearful", "scared", "worried"], "order": 95, "emoji": "😨"}, {"tags": ["anxious", "blue", "cold", "eek", "face", "mouth", "nervous", "open", "rushed", "scared", "sweat", "yikes"], "order": 96, "emoji": "😰"}, {"tags": ["anxious", "call", "close", "complicated", "disappointed", "face", "not", "relieved", "sad", "sweat", "time", "whew"], "order": 97, "emoji": "😥"}, {"tags": ["awful", "cry", "crying", "face", "feels", "miss", "sad", "tear", "triste", "unhappy"], "order": 98, "emoji": "😢"}, {"tags": ["bawling", "cry", "crying", "face", "loudly", "sad", "sob", "tear", "tears", "unhappy"], "order": 99, "emoji": "😭"}, {"tags": ["epic", "face", "fear", "fearful", "munch", "scared", "scream", "screamer", "screaming", "shocked", "surprised", "woah"], "order": 100, "emoji": "😱"}, {"tags": ["annoyed", "confounded", "confused", "cringe", "distraught", "face", "feels", "frustrated", "mad", "sad"], "order": 101, "emoji": "😖"}, {"tags": ["concentrate", "concentration", "face", "focus", "headache", "persevere", "persevering"], "order": 102, "emoji": "😣"}, {"tags": ["awful", "blame", "dejected", "disappointed", "face", "fail", "losing", "sad", "unhappy"], "order": 103, "emoji": "😞"}, {"tags": ["close", "cold", "downcast", "face", "feels", "headache", "nervous", "sad", "scared", "sweat", "yikes"], "order": 104, "emoji": "😓"}, {"tags": ["crying", "face", "fail", "feels", "hungry", "mad", "nooo", "sad", "sleepy", "tired", "unhappy", "weary"], "order": 105, "emoji": "😩"}, {"tags": ["cost", "face", "feels", "nap", "sad", "sneeze", "tired"], "order": 106, "emoji": "😫"}, {"tags": ["bedtime", "bored", "face", "goodnight", "nap", "night", "sleep", "sleepy", "tired", "whatever", "yawn", "yawning", "zzz"], "order": 107, "emoji": "🥱"}, {"tags": ["anger", "angry", "face", "feels", "fume", "fuming", "furious", "fury", "mad", "nose", "steam", "triumph", "unhappy", "won"], "order": 108, "emoji": "😤"}, {"tags": ["anger", "angry", "enraged", "face", "feels", "mad", "maddening", "pouting", "rage", "red", "shade", "unhappy", "upset"], "order": 109, "emoji": "😡"}, {"tags": ["anger", "angry", "blame", "face", "feels", "frustrated", "mad", "maddening", "rage", "shade", "unhappy", "upset"], "order": 110, "emoji": "😠"}, {"tags": ["censor", "cursing", "cussing", "face", "mad", "mouth", "pissed", "swearing", "symbols"], "order": 111, "emoji": "🤬"}, {"tags": ["demon", "devil", "evil", "face", "fairy", "fairytale", "fantasy", "horns", "purple", "shade", "smile", "smiling", "tale"], "order": 112, "emoji": "😈"}, {"tags": ["angry", "demon", "devil", "evil", "face", "fairy", "fairytale", "fantasy", "horns", "imp", "mischievous", "purple", "shade", "tale"], "order": 113, "emoji": "👿"}, {"tags": ["body", "dead", "death", "face", "fairy", "fairytale", "i’m", "lmao", "monster", "tale", "yolo"], "order": 114, "emoji": "💀"}, {"tags": ["bone", "crossbones", "dead", "death", "face", "monster", "skull"], "order": 116, "emoji": "☠️"}, {"tags": ["bs", "comic", "doo", "dung", "face", "fml", "monster", "pile", "poo", "poop", "smelly", "smh", "stink", "stinks", "stinky", "turd"], "order": 117, "emoji": "💩"}, {"tags": ["clown", "face"], "order": 118, "emoji": "🤡"}, {"tags": ["creature", "devil", "face", "fairy", "fairytale", "fantasy", "mask", "monster", "scary", "tale"], "order": 119, "emoji": "👹"}, {"tags": ["angry", "creature", "face", "fairy", "fairytale", "fantasy", "mask", "mean", "monster", "tale"], "order": 120, "emoji": "👺"}, {"tags": ["boo", "creature", "excited", "face", "fairy", "fairytale", "fantasy", "halloween", "haunting", "monster", "scary", "silly", "tale"], "order": 121, "emoji": "👻"}, {"tags": ["creature", "extraterrestrial", "face", "fairy", "fairytale", "fantasy", "monster", "space", "tale", "ufo"], "order": 122, "emoji": "👽️"}, {"tags": ["alien", "creature", "extraterrestrial", "face", "fairy", "fairytale", "fantasy", "game", "gamer", "games", "monster", "pixelated", "space", "tale", "ufo"], "order": 123, "emoji": "👾"}, {"tags": ["face", "monster"], "order": 124, "emoji": "🤖"}, {"tags": ["animal", "cat", "face", "grinning", "mouth", "open", "smile", "smiling"], "order": 125, "emoji": "😺"}, {"tags": ["animal", "cat", "eye", "eyes", "face", "grin", "grinning", "smile", "smiling"], "order": 126, "emoji": "😸"}, {"tags": ["animal", "cat", "face", "joy", "laugh", "laughing", "lol", "tear", "tears"], "order": 127, "emoji": "😹"}, {"tags": ["animal", "cat", "eye", "face", "heart", "heart-eyes", "love", "smile", "smiling"], "order": 128, "emoji": "😻"}, {"tags": ["animal", "cat", "face", "ironic", "smile", "wry"], "order": 129, "emoji": "😼"}, {"tags": ["animal", "cat", "closed", "eye", "eyes", "face", "kiss", "kissing"], "order": 130, "emoji": "😽"}, {"tags": ["animal", "cat", "face", "oh", "surprised", "weary"], "order": 131, "emoji": "🙀"}, {"tags": ["animal", "cat", "cry", "crying", "face", "sad", "tear"], "order": 132, "emoji": "😿"}, {"tags": ["animal", "cat", "face", "pouting"], "order": 133, "emoji": "😾"}, {"tags": ["embarrassed", "evil", "face", "forbidden", "forgot", "gesture", "hide", "monkey", "no", "omg", "prohibited", "scared", "secret", "smh", "watch"], "order": 134, "emoji": "🙈"}, {"tags": ["animal", "ears", "evil", "face", "forbidden", "gesture", "hear", "listen", "monkey", "no", "not", "prohibited", "secret", "shh", "tmi"], "order": 135, "emoji": "🙉"}, {"tags": ["animal", "evil", "face", "forbidden", "gesture", "monkey", "no", "not", "oops", "prohibited", "quiet", "secret", "speak", "stealth"], "order": 136, "emoji": "🙊"}, {"tags": ["heart", "letter", "love", "mail", "romance", "valentine"], "order": 137, "emoji": "💌"}, {"tags": ["143", "adorbs", "arrow", "cupid", "date", "emotion", "heart", "ily", "love", "romance", "valentine"], "order": 138, "emoji": "💘"}, {"tags": ["143", "anniversary", "emotion", "heart", "ily", "kisses", "ribbon", "valentine", "xoxo"], "order": 139, "emoji": "💝"}, {"tags": ["143", "emotion", "excited", "good", "heart", "ily", "kisses", "morning", "night", "sparkle", "sparkling", "xoxo"], "order": 140, "emoji": "💖"}, {"tags": ["143", "emotion", "excited", "growing", "heart", "heartpulse", "ily", "kisses", "muah", "nervous", "pulse", "xoxo"], "order": 141, "emoji": "💗"}, {"tags": ["143", "beating", "cardio", "emotion", "heart", "heartbeat", "ily", "love", "pulsating", "pulse"], "order": 142, "emoji": "💓"}, {"tags": ["143", "adorbs", "anniversary", "emotion", "heart", "hearts", "revolving"], "order": 143, "emoji": "💞"}, {"tags": ["143", "anniversary", "date", "dating", "emotion", "heart", "hearts", "ily", "kisses", "love", "loving", "two", "xoxo"], "order": 144, "emoji": "💕"}, {"tags": ["143", "decoration", "emotion", "heart", "hearth", "purple", "white"], "order": 145, "emoji": "💟"}, {"tags": ["exclamation", "heart", "heavy", "mark", "punctuation"], "order": 147, "emoji": "❣️"}, {"tags": ["break", "broken", "crushed", "emotion", "heart", "heartbroken", "lonely", "sad"], "order": 148, "emoji": "💔"}, {"tags": ["burn", "fire", "heart", "love", "lust", "sacred"], "order": 149, "emoji": "❤️‍🔥"}, {"tags": ["healthier", "heart", "improving", "mending", "recovering", "recuperating", "well"], "order": 151, "emoji": "❤️‍🩹"}, {"tags": ["emotion", "heart", "love", "red"], "order": 154, "emoji": "❤️"}, {"tags": ["143", "adorable", "cute", "emotion", "heart", "ily", "like", "love", "pink", "special", "sweet"], "order": 155, "emoji": "🩷"}, {"tags": ["143", "heart", "orange"], "order": 156, "emoji": "🧡"}, {"tags": ["143", "cardiac", "emotion", "heart", "ily", "love", "yellow"], "order": 157, "emoji": "💛"}, {"tags": ["143", "emotion", "green", "heart", "ily", "love", "romantic"], "order": 158, "emoji": "💚"}, {"tags": ["143", "blue", "emotion", "heart", "ily", "love", "romance"], "order": 159, "emoji": "💙"}, {"tags": ["143", "blue", "cute", "cyan", "emotion", "heart", "ily", "light", "like", "love", "sky", "special", "teal"], "order": 160, "emoji": "🩵"}, {"tags": ["143", "bestest", "emotion", "heart", "ily", "love", "purple"], "order": 161, "emoji": "💜"}, {"tags": ["143", "brown", "heart"], "order": 162, "emoji": "🤎"}, {"tags": ["black", "evil", "heart", "wicked"], "order": 163, "emoji": "🖤"}, {"tags": ["143", "emotion", "gray", "grey", "heart", "ily", "love", "silver", "slate", "special"], "order": 164, "emoji": "🩶"}, {"tags": ["143", "heart", "white"], "order": 165, "emoji": "🤍"}, {"tags": ["dating", "emotion", "heart", "kiss", "kissing", "lips", "mark", "romance", "sexy"], "order": 166, "emoji": "💋"}, {"tags": ["100", "a+", "agree", "clearly", "definitely", "faithful", "fleek", "full", "hundred", "keep", "perfect", "point", "score", "true", "truth", "yup"], "order": 167, "emoji": "💯"}, {"tags": ["anger", "angry", "comic", "mad", "symbol", "upset"], "order": 168, "emoji": "💢"}, {"tags": ["bomb", "boom", "collide", "comic", "explode"], "order": 169, "emoji": "💥"}, {"tags": ["comic", "shining", "shooting", "star", "stars"], "order": 170, "emoji": "💫"}, {"tags": ["comic", "drip", "droplet", "droplets", "drops", "splashing", "squirt", "sweat", "water", "wet", "work", "workout"], "order": 171, "emoji": "💦"}, {"tags": ["away", "cloud", "comic", "dash", "dashing", "fart", "fast", "go", "gone", "gotta", "running", "smoke"], "order": 172, "emoji": "💨"}, {"tags": ["hole"], "order": 174, "emoji": "🕳️"}, {"tags": ["balloon", "bubble", "comic", "dialog", "message", "sms", "speech", "talk", "text", "typing"], "order": 175, "emoji": "💬"}, {"tags": ["balloon", "bubble", "eye", "speech", "witness"], "order": 176, "emoji": "👁️‍🗨️"}, {"tags": ["balloon", "bubble", "dialog", "left", "speech"], "order": 181, "emoji": "🗨️"}, {"tags": ["anger", "angry", "balloon", "bubble", "mad", "right"], "order": 183, "emoji": "🗯️"}, {"tags": ["balloon", "bubble", "cartoon", "cloud", "comic", "daydream", "decisions", "dream", "idea", "invent", "invention", "realize", "think", "thoughts", "wonder"], "order": 184, "emoji": "💭"}, {"tags": ["comic", "good", "goodnight", "night", "sleep", "sleeping", "sleepy", "tired", "zzz"], "order": 185, "emoji": "💤"}, {"tags": ["bye", "cya", "g2g", "greetings", "gtg", "hand", "hello", "hey", "hi", "later", "outtie", "ttfn", "ttyl", "wave", "yo", "you"], "order": 186, "emoji": "👋"}, {"tags": ["back", "backhand", "hand", "raised"], "order": 192, "emoji": "🤚"}, {"tags": ["finger", "fingers", "hand", "raised", "splayed", "stop"], "order": 199, "emoji": "🖐️"}, {"tags": ["5", "five", "hand", "high", "raised", "stop"], "order": 205, "emoji": "✋️"}, {"tags": ["finger", "hand", "hands", "salute", "vulcan"], "order": 211, "emoji": "🖖"}, {"tags": ["hand", "handshake", "hold", "reach", "right", "rightward", "rightwards", "shake"], "order": 217, "emoji": "🫱"}, {"tags": ["hand", "handshake", "hold", "left", "leftward", "leftwards", "reach", "shake"], "order": 223, "emoji": "🫲"}, {"tags": ["dismiss", "down", "drop", "dropped", "hand", "palm", "pick", "shoo", "up"], "order": 229, "emoji": "🫳"}, {"tags": ["beckon", "catch", "come", "hand", "hold", "know", "lift", "me", "offer", "palm", "tell"], "order": 235, "emoji": "🫴"}, {"tags": ["block", "five", "halt", "hand", "high", "hold", "leftward", "leftwards", "pause", "push", "pushing", "refuse", "slap", "stop", "wait"], "order": 241, "emoji": "🫷"}, {"tags": ["block", "five", "halt", "hand", "high", "hold", "pause", "push", "pushing", "refuse", "rightward", "rightwards", "slap", "stop", "wait"], "order": 247, "emoji": "🫸"}, {"tags": ["awesome", "bet", "dope", "fleek", "fosho", "got", "gotcha", "hand", "legit", "ok", "okay", "pinch", "rad", "sure", "sweet", "three"], "order": 253, "emoji": "👌"}, {"tags": ["fingers", "gesture", "hand", "hold", "huh", "interrogation", "patience", "pinched", "relax", "sarcastic", "ugh", "what", "zip"], "order": 259, "emoji": "🤌"}, {"tags": ["amount", "bit", "fingers", "hand", "little", "pinching", "small", "sort"], "order": 265, "emoji": "🤏"}, {"tags": ["hand", "peace", "v", "victory"], "order": 272, "emoji": "✌️"}, {"tags": ["cross", "crossed", "finger", "fingers", "hand", "luck"], "order": 278, "emoji": "🤞"}, {"tags": ["<3", "crossed", "expensive", "finger", "hand", "heart", "index", "love", "money", "snap", "thumb"], "order": 284, "emoji": "🫰"}, {"tags": ["fingers", "gesture", "hand", "ily", "love", "love-you", "three", "you"], "order": 290, "emoji": "🤟"}, {"tags": ["finger", "hand", "horns", "rock-on", "sign"], "order": 296, "emoji": "🤘"}, {"tags": ["call", "hand", "hang", "loose", "me", "shaka"], "order": 302, "emoji": "🤙"}, {"tags": ["backhand", "finger", "hand", "index", "left", "point", "pointing"], "order": 308, "emoji": "👈️"}, {"tags": ["backhand", "finger", "hand", "index", "point", "pointing", "right"], "order": 314, "emoji": "👉️"}, {"tags": ["backhand", "finger", "hand", "index", "point", "pointing", "up"], "order": 320, "emoji": "👆️"}, {"tags": ["finger", "hand", "middle"], "order": 326, "emoji": "🖕"}, {"tags": ["backhand", "down", "finger", "hand", "index", "point", "pointing"], "order": 332, "emoji": "👇️"}, {"tags": ["finger", "hand", "index", "point", "pointing", "this", "up"], "order": 339, "emoji": "☝️"}, {"tags": ["at", "finger", "hand", "index", "pointing", "poke", "viewer", "you"], "order": 345, "emoji": "🫵"}, {"tags": ["+1", "good", "hand", "like", "thumb", "up", "yes"], "order": 351, "emoji": "👍️"}, {"tags": ["-1", "bad", "dislike", "down", "good", "hand", "no", "nope", "thumb", "thumbs"], "order": 357, "emoji": "👎️"}, {"tags": ["clenched", "fist", "hand", "punch", "raised", "solidarity"], "order": 363, "emoji": "✊️"}, {"tags": ["absolutely", "agree", "boom", "bro", "bruh", "bump", "clenched", "correct", "fist", "hand", "knuckle", "oncoming", "pound", "punch", "rock", "ttyl"], "order": 369, "emoji": "👊"}, {"tags": ["fist", "left-facing", "leftwards"], "order": 375, "emoji": "🤛"}, {"tags": ["fist", "right-facing", "rightwards"], "order": 381, "emoji": "🤜"}, {"tags": ["applause", "approval", "awesome", "clap", "congrats", "congratulations", "excited", "good", "great", "hand", "homie", "job", "nice", "prayed", "well", "yay"], "order": 387, "emoji": "👏"}, {"tags": ["celebration", "gesture", "hand", "hands", "hooray", "praise", "raised", "raising"], "order": 393, "emoji": "🙌"}, {"tags": ["<3", "hands", "heart", "love", "you"], "order": 399, "emoji": "🫶"}, {"tags": ["hand", "hands", "hug", "jazz", "open", "swerve"], "order": 405, "emoji": "👐"}, {"tags": ["cupped", "dua", "hands", "palms", "pray", "prayer", "together", "up", "wish"], "order": 411, "emoji": "🤲"}, {"tags": ["agreement", "deal", "hand", "meeting", "shake"], "order": 417, "emoji": "🤝"}, {"tags": ["appreciate", "ask", "beg", "blessed", "bow", "cmon", "five", "folded", "gesture", "hand", "high", "please", "pray", "thanks", "thx"], "order": 443, "emoji": "🙏"}, {"tags": ["hand", "write", "writing"], "order": 450, "emoji": "✍️"}, {"tags": ["bored", "care", "cosmetics", "done", "makeup", "manicure", "nail", "polish", "whatever"], "order": 456, "emoji": "💅"}, {"tags": ["camera", "phone"], "order": 462, "emoji": "🤳"}, {"tags": ["arm", "beast", "bench", "biceps", "bodybuilder", "bro", "curls", "flex", "gains", "gym", "jacked", "muscle", "press", "ripped", "strong", "weightlift"], "order": 468, "emoji": "💪"}, {"tags": ["accessibility", "arm", "mechanical", "prosthetic"], "order": 474, "emoji": "🦾"}, {"tags": ["accessibility", "leg", "mechanical", "prosthetic"], "order": 475, "emoji": "🦿"}, {"tags": ["bent", "foot", "kick", "knee", "limb"], "order": 476, "emoji": "🦵"}, {"tags": ["ankle", "feet", "kick", "stomp"], "order": 482, "emoji": "🦶"}, {"tags": ["body", "ears", "hear", "hearing", "listen", "listening", "sound"], "order": 488, "emoji": "👂️"}, {"tags": ["accessibility", "aid", "ear", "hard", "hearing"], "order": 494, "emoji": "🦻"}, {"tags": ["body", "noses", "nosey", "odor", "smell", "smells"], "order": 500, "emoji": "👃"}, {"tags": ["intelligent", "smart"], "order": 506, "emoji": "🧠"}, {"tags": ["anatomical", "beat", "cardiology", "heart", "heartbeat", "organ", "pulse", "real", "red"], "order": 507, "emoji": "🫀"}, {"tags": ["breath", "breathe", "exhalation", "inhalation", "lung", "organ", "respiration"], "order": 508, "emoji": "🫁"}, {"tags": ["dentist", "pearly", "teeth", "white"], "order": 509, "emoji": "🦷"}, {"tags": ["bones", "dog", "skeleton", "wishbone"], "order": 510, "emoji": "🦴"}, {"tags": ["body", "eye", "face", "googly", "look", "looking", "omg", "peep", "see", "seeing"], "order": 511, "emoji": "👀"}, {"tags": ["1", "body", "one"], "order": 513, "emoji": "👁️"}, {"tags": ["body", "lick", "slurp"], "order": 514, "emoji": "👅"}, {"tags": ["beauty", "body", "kiss", "kissing", "lips", "lipstick"], "order": 515, "emoji": "👄"}, {"tags": ["anxious", "bite", "biting", "fear", "flirt", "flirting", "kiss", "lip", "lipstick", "nervous", "sexy", "uncomfortable", "worried", "worry"], "order": 516, "emoji": "🫦"}, {"tags": ["babies", "children", "goo", "infant", "newborn", "pregnant", "young"], "order": 517, "emoji": "👶"}, {"tags": ["bright-eyed", "grandchild", "kid", "young", "younger"], "order": 523, "emoji": "🧒"}, {"tags": ["bright-eyed", "child", "grandson", "kid", "son", "young", "younger"], "order": 529, "emoji": "👦"}, {"tags": ["bright-eyed", "child", "daughter", "granddaughter", "kid", "virgo", "young", "younger", "zodiac"], "order": 535, "emoji": "👧"}, {"tags": ["adult"], "order": 541, "emoji": "🧑"}, {"tags": ["blond", "blond-haired", "human", "person"], "order": 547, "emoji": "👱"}, {"tags": ["adult", "bro"], "order": 553, "emoji": "👨"}, {"tags": ["beard", "bearded", "person", "whiskers"], "order": 559, "emoji": "🧔"}, {"tags": ["beard", "bearded", "man", "whiskers"], "order": 565, "emoji": "🧔‍♂️"}, {"tags": ["beard", "bearded", "whiskers", "woman"], "order": 577, "emoji": "🧔‍♀️"}, {"tags": ["adult", "bro", "man", "red hair"], "order": 589, "emoji": "👨‍🦰"}, {"tags": ["adult", "bro", "curly hair", "man"], "order": 595, "emoji": "👨‍🦱"}, {"tags": ["adult", "bro", "man", "white hair"], "order": 601, "emoji": "👨‍🦳"}, {"tags": ["adult", "bald", "bro", "man"], "order": 607, "emoji": "👨‍🦲"}, {"tags": ["adult", "lady"], "order": 613, "emoji": "👩"}, {"tags": ["adult", "lady", "red hair", "woman"], "order": 619, "emoji": "👩‍🦰"}, {"tags": ["adult", "person", "red hair"], "order": 625, "emoji": "🧑‍🦰"}, {"tags": ["adult", "curly hair", "lady", "woman"], "order": 631, "emoji": "👩‍🦱"}, {"tags": ["adult", "curly hair", "person"], "order": 637, "emoji": "🧑‍🦱"}, {"tags": ["adult", "lady", "white hair", "woman"], "order": 643, "emoji": "👩‍🦳"}, {"tags": ["adult", "person", "white hair"], "order": 649, "emoji": "🧑‍🦳"}, {"tags": ["adult", "bald", "lady", "woman"], "order": 655, "emoji": "👩‍🦲"}, {"tags": ["adult", "bald", "person"], "order": 661, "emoji": "🧑‍🦲"}, {"tags": ["blond", "blond-haired", "blonde", "hair", "woman"], "order": 667, "emoji": "👱‍♀️"}, {"tags": ["blond", "blond-haired", "hair", "man"], "order": 679, "emoji": "👱‍♂️"}, {"tags": ["adult", "elderly", "grandparent", "old", "person", "wise"], "order": 691, "emoji": "🧓"}, {"tags": ["adult", "bald", "elderly", "gramps", "grandfather", "grandpa", "man", "old", "wise"], "order": 697, "emoji": "👴"}, {"tags": ["adult", "elderly", "grandma", "grandmother", "granny", "lady", "old", "wise", "woman"], "order": 703, "emoji": "👵"}, {"tags": ["annoyed", "disappointed", "disgruntled", "disturbed", "frown", "frowning", "frustrated", "gesture", "irritated", "person", "upset"], "order": 709, "emoji": "🙍"}, {"tags": ["annoyed", "disappointed", "disgruntled", "disturbed", "frown", "frowning", "frustrated", "gesture", "irritated", "man", "upset"], "order": 715, "emoji": "🙍‍♂️"}, {"tags": ["annoyed", "disappointed", "disgruntled", "disturbed", "frown", "frowning", "frustrated", "gesture", "irritated", "upset", "woman"], "order": 727, "emoji": "🙍‍♀️"}, {"tags": ["disappointed", "downtrodden", "frown", "grimace", "person", "pouting", "scowl", "sulk", "upset", "whine"], "order": 739, "emoji": "🙎"}, {"tags": ["disappointed", "downtrodden", "frown", "grimace", "man", "pouting", "scowl", "sulk", "upset", "whine"], "order": 745, "emoji": "🙎‍♂️"}, {"tags": ["disappointed", "downtrodden", "frown", "grimace", "pouting", "scowl", "sulk", "upset", "whine", "woman"], "order": 757, "emoji": "🙎‍♀️"}, {"tags": ["forbidden", "gesture", "hand", "no", "not", "person", "prohibit"], "order": 769, "emoji": "🙅"}, {"tags": ["forbidden", "gesture", "hand", "man", "no", "not", "prohibit"], "order": 775, "emoji": "🙅‍♂️"}, {"tags": ["forbidden", "gesture", "hand", "no", "not", "prohibit", "woman"], "order": 787, "emoji": "🙅‍♀️"}, {"tags": ["exercise", "gesture", "gesturing", "hand", "ok", "omg", "person"], "order": 799, "emoji": "🙆"}, {"tags": ["exercise", "gesture", "gesturing", "hand", "man", "ok", "omg"], "order": 805, "emoji": "🙆‍♂️"}, {"tags": ["exercise", "gesture", "gesturing", "hand", "ok", "omg", "woman"], "order": 817, "emoji": "🙆‍♀️"}, {"tags": ["fetch", "flick", "flip", "gossip", "hand", "person", "sarcasm", "sarcastic", "sassy", "seriously", "tipping", "whatever"], "order": 829, "emoji": "💁"}, {"tags": ["fetch", "flick", "flip", "gossip", "hand", "man", "sarcasm", "sarcastic", "sassy", "seriously", "tipping", "whatever"], "order": 835, "emoji": "💁‍♂️"}, {"tags": ["fetch", "flick", "flip", "gossip", "hand", "sarcasm", "sarcastic", "sassy", "seriously", "tipping", "whatever", "woman"], "order": 847, "emoji": "💁‍♀️"}, {"tags": ["gesture", "hand", "here", "know", "me", "person", "pick", "question", "raise", "raising"], "order": 859, "emoji": "🙋"}, {"tags": ["gesture", "hand", "here", "know", "man", "me", "pick", "question", "raise", "raising"], "order": 865, "emoji": "🙋‍♂️"}, {"tags": ["gesture", "hand", "here", "know", "me", "pick", "question", "raise", "raising", "woman"], "order": 877, "emoji": "🙋‍♀️"}, {"tags": ["accessibility", "deaf", "ear", "gesture", "hear", "person"], "order": 889, "emoji": "🧏"}, {"tags": ["accessibility", "deaf", "ear", "gesture", "hear", "man"], "order": 895, "emoji": "🧏‍♂️"}, {"tags": ["accessibility", "deaf", "ear", "gesture", "hear", "woman"], "order": 907, "emoji": "🧏‍♀️"}, {"tags": ["apology", "ask", "beg", "bow", "bowing", "favor", "forgive", "gesture", "meditate", "meditation", "person", "pity", "regret", "sorry"], "order": 919, "emoji": "🙇"}, {"tags": ["apology", "ask", "beg", "bow", "bowing", "favor", "forgive", "gesture", "man", "meditate", "meditation", "pity", "regret", "sorry"], "order": 925, "emoji": "🙇‍♂️"}, {"tags": ["apology", "ask", "beg", "bow", "bowing", "favor", "forgive", "gesture", "meditate", "meditation", "pity", "regret", "sorry", "woman"], "order": 937, "emoji": "🙇‍♀️"}, {"tags": ["again", "bewilder", "disbelief", "exasperation", "facepalm", "no", "not", "oh", "omg", "person", "shock", "smh"], "order": 949, "emoji": "🤦"}, {"tags": ["again", "bewilder", "disbelief", "exasperation", "facepalm", "man", "no", "not", "oh", "omg", "shock", "smh"], "order": 955, "emoji": "🤦‍♂️"}, {"tags": ["again", "bewilder", "disbelief", "exasperation", "facepalm", "no", "not", "oh", "omg", "shock", "smh", "woman"], "order": 967, "emoji": "🤦‍♀️"}, {"tags": ["doubt", "dunno", "guess", "idk", "ignorance", "indifference", "knows", "maybe", "person", "shrug", "shrugging", "whatever", "who"], "order": 979, "emoji": "🤷"}, {"tags": ["doubt", "dunno", "guess", "idk", "ignorance", "indifference", "knows", "man", "maybe", "shrug", "shrugging", "whatever", "who"], "order": 985, "emoji": "🤷‍♂️"}, {"tags": ["doubt", "dunno", "guess", "idk", "ignorance", "indifference", "knows", "maybe", "shrug", "shrugging", "whatever", "who", "woman"], "order": 997, "emoji": "🤷‍♀️"}, {"tags": ["doctor", "health", "healthcare", "nurse", "therapist", "worker"], "order": 1009, "emoji": "🧑‍⚕️"}, {"tags": ["doctor", "health", "healthcare", "man", "nurse", "therapist", "worker"], "order": 1021, "emoji": "👨‍⚕️"}, {"tags": ["doctor", "health", "healthcare", "nurse", "therapist", "woman", "worker"], "order": 1033, "emoji": "👩‍⚕️"}, {"tags": ["graduate"], "order": 1045, "emoji": "🧑‍🎓"}, {"tags": ["graduate", "man", "student"], "order": 1051, "emoji": "👨‍🎓"}, {"tags": ["graduate", "student", "woman"], "order": 1057, "emoji": "👩‍🎓"}, {"tags": ["instructor", "lecturer", "professor"], "order": 1063, "emoji": "🧑‍🏫"}, {"tags": ["instructor", "lecturer", "man", "professor", "teacher"], "order": 1069, "emoji": "👨‍🏫"}, {"tags": ["instructor", "lecturer", "professor", "teacher", "woman"], "order": 1075, "emoji": "👩‍🏫"}, {"tags": ["justice", "law", "scales"], "order": 1081, "emoji": "🧑‍⚖️"}, {"tags": ["judge", "justice", "law", "man", "scales"], "order": 1093, "emoji": "👨‍⚖️"}, {"tags": ["judge", "justice", "law", "scales", "woman"], "order": 1105, "emoji": "👩‍⚖️"}, {"tags": ["gardener", "rancher"], "order": 1117, "emoji": "🧑‍🌾"}, {"tags": ["farmer", "gardener", "man", "rancher"], "order": 1123, "emoji": "👨‍🌾"}, {"tags": ["farmer", "gardener", "rancher", "woman"], "order": 1129, "emoji": "👩‍🌾"}, {"tags": ["chef"], "order": 1135, "emoji": "🧑‍🍳"}, {"tags": ["chef", "cook", "man"], "order": 1141, "emoji": "👨‍🍳"}, {"tags": ["chef", "cook", "woman"], "order": 1147, "emoji": "👩‍🍳"}, {"tags": ["electrician", "plumber", "tradesperson"], "order": 1153, "emoji": "🧑‍🔧"}, {"tags": ["electrician", "man", "mechanic", "plumber", "tradesperson"], "order": 1159, "emoji": "👨‍🔧"}, {"tags": ["electrician", "mechanic", "plumber", "tradesperson", "woman"], "order": 1165, "emoji": "👩‍🔧"}, {"tags": ["assembly", "factory", "industrial", "worker"], "order": 1171, "emoji": "🧑‍🏭"}, {"tags": ["assembly", "factory", "industrial", "man", "worker"], "order": 1177, "emoji": "👨‍🏭"}, {"tags": ["assembly", "factory", "industrial", "woman", "worker"], "order": 1183, "emoji": "👩‍🏭"}, {"tags": ["architect", "business", "manager", "office", "white-collar", "worker"], "order": 1189, "emoji": "🧑‍💼"}, {"tags": ["architect", "business", "man", "manager", "office", "white-collar", "worker"], "order": 1195, "emoji": "👨‍💼"}, {"tags": ["architect", "business", "manager", "office", "white-collar", "woman", "worker"], "order": 1201, "emoji": "👩‍💼"}, {"tags": ["biologist", "chemist", "engineer", "mathematician", "physicist"], "order": 1207, "emoji": "🧑‍🔬"}, {"tags": ["biologist", "chemist", "engineer", "man", "mathematician", "physicist", "scientist"], "order": 1213, "emoji": "👨‍🔬"}, {"tags": ["biologist", "chemist", "engineer", "mathematician", "physicist", "scientist", "woman"], "order": 1219, "emoji": "👩‍🔬"}, {"tags": ["coder", "computer", "developer", "inventor", "software"], "order": 1225, "emoji": "🧑‍💻"}, {"tags": ["coder", "computer", "developer", "inventor", "man", "software", "technologist"], "order": 1231, "emoji": "👨‍💻"}, {"tags": ["coder", "computer", "developer", "inventor", "software", "technologist", "woman"], "order": 1237, "emoji": "👩‍💻"}, {"tags": ["actor", "entertainer", "rock", "rockstar", "star"], "order": 1243, "emoji": "🧑‍🎤"}, {"tags": ["actor", "entertainer", "man", "rock", "rockstar", "singer", "star"], "order": 1249, "emoji": "👨‍🎤"}, {"tags": ["actor", "entertainer", "rock", "rockstar", "singer", "star", "woman"], "order": 1255, "emoji": "👩‍🎤"}, {"tags": ["palette"], "order": 1261, "emoji": "🧑‍🎨"}, {"tags": ["artist", "man", "palette"], "order": 1267, "emoji": "👨‍🎨"}, {"tags": ["artist", "palette", "woman"], "order": 1273, "emoji": "👩‍🎨"}, {"tags": ["plane"], "order": 1279, "emoji": "🧑‍✈️"}, {"tags": ["man", "pilot", "plane"], "order": 1291, "emoji": "👨‍✈️"}, {"tags": ["pilot", "plane", "woman"], "order": 1303, "emoji": "👩‍✈️"}, {"tags": ["rocket", "space"], "order": 1315, "emoji": "🧑‍🚀"}, {"tags": ["astronaut", "man", "rocket", "space"], "order": 1321, "emoji": "👨‍🚀"}, {"tags": ["astronaut", "rocket", "space", "woman"], "order": 1327, "emoji": "👩‍🚀"}, {"tags": ["fire", "firetruck"], "order": 1333, "emoji": "🧑‍🚒"}, {"tags": ["fire", "firefighter", "firetruck", "man"], "order": 1339, "emoji": "👨‍🚒"}, {"tags": ["fire", "firefighter", "firetruck", "woman"], "order": 1345, "emoji": "👩‍🚒"}, {"tags": ["apprehend", "arrest", "citation", "cop", "law", "officer", "over", "police", "pulled", "undercover"], "order": 1351, "emoji": "👮"}, {"tags": ["apprehend", "arrest", "citation", "cop", "law", "man", "officer", "over", "police", "pulled", "undercover"], "order": 1357, "emoji": "👮‍♂️"}, {"tags": ["apprehend", "arrest", "citation", "cop", "law", "officer", "over", "police", "pulled", "undercover", "woman"], "order": 1369, "emoji": "👮‍♀️"}, {"tags": ["sleuth", "spy"], "order": 1382, "emoji": "🕵️"}, {"tags": ["detective", "man", "sleuth", "spy"], "order": 1388, "emoji": "🕵️‍♂️"}, {"tags": ["detective", "sleuth", "spy", "woman"], "order": 1402, "emoji": "🕵️‍♀️"}, {"tags": ["buckingham", "helmet", "london", "palace"], "order": 1416, "emoji": "💂"}, {"tags": ["buckingham", "guard", "helmet", "london", "man", "palace"], "order": 1422, "emoji": "💂‍♂️"}, {"tags": ["buckingham", "guard", "helmet", "london", "palace", "woman"], "order": 1434, "emoji": "💂‍♀️"}, {"tags": ["assassin", "fight", "fighter", "hidden", "person", "secret", "skills", "sly", "soldier", "stealth", "war"], "order": 1446, "emoji": "🥷"}, {"tags": ["build", "construction", "fix", "hardhat", "hat", "man", "person", "rebuild", "remodel", "repair", "work", "worker"], "order": 1452, "emoji": "👷"}, {"tags": ["build", "construction", "fix", "hardhat", "hat", "man", "rebuild", "remodel", "repair", "work", "worker"], "order": 1458, "emoji": "👷‍♂️"}, {"tags": ["build", "construction", "fix", "hardhat", "hat", "man", "rebuild", "remodel", "repair", "woman", "work", "worker"], "order": 1470, "emoji": "👷‍♀️"}, {"tags": ["crown", "monarch", "noble", "person", "regal", "royal", "royalty"], "order": 1482, "emoji": "🫅"}, {"tags": ["crown", "fairy", "fairytale", "fantasy", "king", "royal", "royalty", "tale"], "order": 1488, "emoji": "🤴"}, {"tags": ["crown", "fairy", "fairytale", "fantasy", "queen", "royal", "royalty", "tale"], "order": 1494, "emoji": "👸"}, {"tags": ["person", "turban", "wearing"], "order": 1500, "emoji": "👳"}, {"tags": ["man", "turban", "wearing"], "order": 1506, "emoji": "👳‍♂️"}, {"tags": ["turban", "wearing", "woman"], "order": 1518, "emoji": "👳‍♀️"}, {"tags": ["cap", "chinese", "gua", "guapi", "hat", "mao", "person", "pi", "skullcap"], "order": 1530, "emoji": "👲"}, {"tags": ["bandana", "head", "headscarf", "hijab", "kerchief", "mantilla", "tichel", "woman"], "order": 1536, "emoji": "🧕"}, {"tags": ["formal", "person", "tuxedo", "wedding"], "order": 1542, "emoji": "🤵"}, {"tags": ["formal", "groom", "man", "tuxedo", "wedding"], "order": 1548, "emoji": "🤵‍♂️"}, {"tags": ["formal", "tuxedo", "wedding", "woman"], "order": 1560, "emoji": "🤵‍♀️"}, {"tags": ["person", "veil", "wedding"], "order": 1572, "emoji": "👰"}, {"tags": ["man", "veil", "wedding"], "order": 1578, "emoji": "👰‍♂️"}, {"tags": ["bride", "veil", "wedding", "woman"], "order": 1590, "emoji": "👰‍♀️"}, {"tags": ["pregnant", "woman"], "order": 1602, "emoji": "🤰"}, {"tags": ["belly", "bloated", "full", "man", "overeat", "pregnant"], "order": 1608, "emoji": "🫃"}, {"tags": ["belly", "bloated", "full", "overeat", "person", "pregnant", "stuffed"], "order": 1614, "emoji": "🫄"}, {"tags": ["baby", "breast", "feeding", "mom", "mother", "nursing", "woman"], "order": 1620, "emoji": "🤱"}, {"tags": ["baby", "feed", "feeding", "mom", "mother", "nanny", "newborn", "nursing", "woman"], "order": 1626, "emoji": "👩‍🍼"}, {"tags": ["baby", "dad", "father", "feed", "feeding", "man", "nanny", "newborn", "nursing"], "order": 1632, "emoji": "👨‍🍼"}, {"tags": ["baby", "feed", "feeding", "nanny", "newborn", "nursing", "parent"], "order": 1638, "emoji": "🧑‍🍼"}, {"tags": ["angel", "baby", "church", "face", "fairy", "fairytale", "fantasy", "tale"], "order": 1644, "emoji": "👼"}, {"tags": ["celebration", "christmas", "claus", "fairy", "fantasy", "father", "holiday", "merry", "santa", "tale", "xmas"], "order": 1650, "emoji": "🎅"}, {"tags": ["celebration", "christmas", "claus", "fairy", "fantasy", "holiday", "merry", "mother", "mrs", "santa", "tale", "xmas"], "order": 1656, "emoji": "🤶"}, {"tags": ["celebration", "christmas", "claus", "fairy", "fantasy", "holiday", "merry", "mx", "santa", "tale", "xmas"], "order": 1662, "emoji": "🧑‍🎄"}, {"tags": ["good", "hero", "superpower"], "order": 1668, "emoji": "🦸"}, {"tags": ["good", "hero", "man", "superhero", "superpower"], "order": 1674, "emoji": "🦸‍♂️"}, {"tags": ["good", "hero", "heroine", "superhero", "superpower", "woman"], "order": 1686, "emoji": "🦸‍♀️"}, {"tags": ["bad", "criminal", "evil", "superpower", "villain"], "order": 1698, "emoji": "🦹"}, {"tags": ["bad", "criminal", "evil", "man", "superpower", "supervillain", "villain"], "order": 1704, "emoji": "🦹‍♂️"}, {"tags": ["bad", "criminal", "evil", "superpower", "supervillain", "villain", "woman"], "order": 1716, "emoji": "🦹‍♀️"}, {"tags": ["fantasy", "magic", "play", "sorcerer", "sorceress", "sorcery", "spell", "summon", "witch", "wizard"], "order": 1728, "emoji": "🧙"}, {"tags": ["fantasy", "mage", "magic", "man", "play", "sorcerer", "sorceress", "sorcery", "spell", "summon", "witch", "wizard"], "order": 1734, "emoji": "🧙‍♂️"}, {"tags": ["fantasy", "mage", "magic", "play", "sorcerer", "sorceress", "sorcery", "spell", "summon", "witch", "wizard", "woman"], "order": 1746, "emoji": "🧙‍♀️"}, {"tags": ["fairytale", "fantasy", "myth", "person", "pixie", "tale", "wings"], "order": 1758, "emoji": "🧚"}, {"tags": ["fairy", "fairytale", "fantasy", "man", "myth", "oberon", "person", "pixie", "puck", "tale", "wings"], "order": 1764, "emoji": "🧚‍♂️"}, {"tags": ["fairy", "fairytale", "fantasy", "myth", "person", "pixie", "tale", "titania", "wings", "woman"], "order": 1776, "emoji": "🧚‍♀️"}, {"tags": ["blood", "dracula", "fangs", "halloween", "scary", "supernatural", "teeth", "undead"], "order": 1788, "emoji": "🧛"}, {"tags": ["blood", "fangs", "halloween", "man", "scary", "supernatural", "teeth", "undead", "vampire"], "order": 1794, "emoji": "🧛‍♂️"}, {"tags": ["blood", "fangs", "halloween", "scary", "supernatural", "teeth", "undead", "vampire", "woman"], "order": 1806, "emoji": "🧛‍♀️"}, {"tags": ["creature", "fairytale", "folklore", "ocean", "sea", "siren", "trident"], "order": 1818, "emoji": "🧜"}, {"tags": ["creature", "fairytale", "folklore", "neptune", "ocean", "poseidon", "sea", "siren", "trident", "triton"], "order": 1824, "emoji": "🧜‍♂️"}, {"tags": ["creature", "fairytale", "folklore", "merwoman", "ocean", "sea", "siren", "trident"], "order": 1836, "emoji": "🧜‍♀️"}, {"tags": ["elves", "enchantment", "fantasy", "folklore", "magic", "magical", "myth"], "order": 1848, "emoji": "🧝"}, {"tags": ["elf", "elves", "enchantment", "fantasy", "folklore", "magic", "magical", "man", "myth"], "order": 1854, "emoji": "🧝‍♂️"}, {"tags": ["elf", "elves", "enchantment", "fantasy", "folklore", "magic", "magical", "myth", "woman"], "order": 1866, "emoji": "🧝‍♀️"}, {"tags": ["djinn", "fantasy", "jinn", "lamp", "myth", "rub", "wishes"], "order": 1878, "emoji": "🧞"}, {"tags": ["djinn", "fantasy", "genie", "jinn", "lamp", "man", "myth", "rub", "wishes"], "order": 1879, "emoji": "🧞‍♂️"}, {"tags": ["djinn", "fantasy", "genie", "jinn", "lamp", "myth", "rub", "wishes", "woman"], "order": 1881, "emoji": "🧞‍♀️"}, {"tags": ["apocalypse", "dead", "halloween", "horror", "scary", "undead", "walking"], "order": 1883, "emoji": "🧟"}, {"tags": ["apocalypse", "dead", "halloween", "horror", "man", "scary", "undead", "walking", "zombie"], "order": 1884, "emoji": "🧟‍♂️"}, {"tags": ["apocalypse", "dead", "halloween", "horror", "scary", "undead", "walking", "woman", "zombie"], "order": 1886, "emoji": "🧟‍♀️"}, {"tags": ["fairy", "fantasy", "monster", "tale", "trolling"], "order": 1888, "emoji": "🧌"}, {"tags": ["face", "getting", "headache", "massage", "person", "relax", "relaxing", "salon", "soothe", "spa", "tension", "therapy", "treatment"], "order": 1889, "emoji": "💆"}, {"tags": ["face", "getting", "headache", "man", "massage", "relax", "relaxing", "salon", "soothe", "spa", "tension", "therapy", "treatment"], "order": 1895, "emoji": "💆‍♂️"}, {"tags": ["face", "getting", "headache", "massage", "relax", "relaxing", "salon", "soothe", "spa", "tension", "therapy", "treatment", "woman"], "order": 1907, "emoji": "💆‍♀️"}, {"tags": ["barber", "beauty", "chop", "cosmetology", "cut", "groom", "hair", "haircut", "parlor", "person", "shears", "style"], "order": 1919, "emoji": "💇"}, {"tags": ["barber", "beauty", "chop", "cosmetology", "cut", "groom", "hair", "haircut", "man", "parlor", "person", "shears", "style"], "order": 1925, "emoji": "💇‍♂️"}, {"tags": ["barber", "beauty", "chop", "cosmetology", "cut", "groom", "hair", "haircut", "parlor", "person", "shears", "style", "woman"], "order": 1937, "emoji": "💇‍♀️"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "person", "stride", "stroll", "walk", "walking"], "order": 1949, "emoji": "🚶"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "stride", "stroll", "walk", "walking"], "order": 1955, "emoji": "🚶‍♂️"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "stride", "stroll", "walk", "walking", "woman"], "order": 1967, "emoji": "🚶‍♀️"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "person", "stride", "stroll", "walk", "walking"], "order": 1979, "emoji": "🚶‍➡️"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "stride", "stroll", "walk", "walking", "woman"], "order": 1991, "emoji": "🚶‍♀️‍➡️"}, {"tags": ["amble", "gait", "hike", "man", "pace", "pedestrian", "stride", "stroll", "walk", "walking"], "order": 2015, "emoji": "🚶‍♂️‍➡️"}, {"tags": ["person", "stand", "standing"], "order": 2039, "emoji": "🧍"}, {"tags": ["man", "stand", "standing"], "order": 2045, "emoji": "🧍‍♂️"}, {"tags": ["stand", "standing", "woman"], "order": 2057, "emoji": "🧍‍♀️"}, {"tags": ["kneel", "kneeling", "knees", "person"], "order": 2069, "emoji": "🧎"}, {"tags": ["kneel", "kneeling", "knees", "man"], "order": 2075, "emoji": "🧎‍♂️"}, {"tags": ["kneel", "kneeling", "knees", "woman"], "order": 2087, "emoji": "🧎‍♀️"}, {"tags": ["kneel", "kneeling", "knees", "person"], "order": 2099, "emoji": "🧎‍➡️"}, {"tags": ["kneel", "kneeling", "knees", "woman"], "order": 2111, "emoji": "🧎‍♀️‍➡️"}, {"tags": ["kneel", "kneeling", "knees", "man"], "order": 2135, "emoji": "🧎‍♂️‍➡️"}, {"tags": ["accessibility", "blind", "cane", "person", "probing", "white"], "order": 2159, "emoji": "🧑‍🦯"}, {"tags": ["accessibility", "blind", "cane", "person", "probing", "white"], "order": 2165, "emoji": "🧑‍🦯‍➡️"}, {"tags": ["accessibility", "blind", "cane", "man", "probing", "white"], "order": 2177, "emoji": "👨‍🦯"}, {"tags": ["accessibility", "blind", "cane", "man", "probing", "white"], "order": 2183, "emoji": "👨‍🦯‍➡️"}, {"tags": ["accessibility", "blind", "cane", "probing", "white", "woman"], "order": 2195, "emoji": "👩‍🦯"}, {"tags": ["accessibility", "blind", "cane", "probing", "white", "woman"], "order": 2201, "emoji": "👩‍🦯‍➡️"}, {"tags": ["accessibility", "motorized", "person", "wheelchair"], "order": 2213, "emoji": "🧑‍🦼"}, {"tags": ["accessibility", "motorized", "person", "wheelchair"], "order": 2219, "emoji": "🧑‍🦼‍➡️"}, {"tags": ["accessibility", "man", "motorized", "wheelchair"], "order": 2231, "emoji": "👨‍🦼"}, {"tags": ["accessibility", "man", "motorized", "wheelchair"], "order": 2237, "emoji": "👨‍🦼‍➡️"}, {"tags": ["accessibility", "motorized", "wheelchair", "woman"], "order": 2249, "emoji": "👩‍🦼"}, {"tags": ["accessibility", "motorized", "wheelchair", "woman"], "order": 2255, "emoji": "👩‍🦼‍➡️"}, {"tags": ["accessibility", "manual", "person", "wheelchair"], "order": 2267, "emoji": "🧑‍🦽"}, {"tags": ["accessibility", "manual", "person", "wheelchair"], "order": 2273, "emoji": "🧑‍🦽‍➡️"}, {"tags": ["accessibility", "man", "manual", "wheelchair"], "order": 2285, "emoji": "👨‍🦽"}, {"tags": ["accessibility", "man", "manual", "wheelchair"], "order": 2291, "emoji": "👨‍🦽‍➡️"}, {"tags": ["accessibility", "manual", "wheelchair", "woman"], "order": 2303, "emoji": "👩‍🦽"}, {"tags": ["accessibility", "manual", "wheelchair", "woman"], "order": 2309, "emoji": "👩‍🦽‍➡️"}, {"tags": ["fast", "hurry", "marathon", "move", "person", "quick", "race", "racing", "run", "rush", "speed"], "order": 2321, "emoji": "🏃"}, {"tags": ["fast", "hurry", "man", "marathon", "move", "quick", "race", "racing", "run", "rush", "speed"], "order": 2327, "emoji": "🏃‍♂️"}, {"tags": ["fast", "hurry", "marathon", "move", "quick", "race", "racing", "run", "rush", "speed", "woman"], "order": 2339, "emoji": "🏃‍♀️"}, {"tags": ["fast", "hurry", "marathon", "move", "person", "quick", "race", "racing", "run", "rush", "speed"], "order": 2351, "emoji": "🏃‍➡️"}, {"tags": ["fast", "hurry", "marathon", "move", "quick", "race", "racing", "run", "rush", "speed", "woman"], "order": 2363, "emoji": "🏃‍♀️‍➡️"}, {"tags": ["fast", "hurry", "man", "marathon", "move", "quick", "race", "racing", "run", "rush", "speed"], "order": 2387, "emoji": "🏃‍♂️‍➡️"}, {"tags": ["dance", "dancer", "dancing", "elegant", "festive", "flair", "flamenco", "groove", "let’s", "salsa", "tango", "woman"], "order": 2411, "emoji": "💃"}, {"tags": ["dance", "dancer", "dancing", "elegant", "festive", "flair", "flamenco", "groove", "let’s", "man", "salsa", "tango"], "order": 2417, "emoji": "🕺"}, {"tags": ["business", "levitating", "person", "suit"], "order": 2424, "emoji": "🕴️"}, {"tags": ["bestie", "bff", "bunny", "counterpart", "dancer", "double", "ear", "identical", "pair", "party", "partying", "people", "soulmate", "twin", "twinsies"], "order": 2430, "emoji": "👯"}, {"tags": ["bestie", "bff", "bunny", "counterpart", "dancer", "double", "ear", "identical", "men", "pair", "party", "partying", "people", "soulmate", "twin", "twinsies"], "order": 2431, "emoji": "👯‍♂️"}, {"tags": ["bestie", "bff", "bunny", "counterpart", "dancer", "double", "ear", "identical", "pair", "party", "partying", "people", "soulmate", "twin", "twinsies", "women"], "order": 2433, "emoji": "👯‍♀️"}, {"tags": ["day", "luxurious", "pamper", "person", "relax", "room", "sauna", "spa", "steam", "steambath", "unwind"], "order": 2435, "emoji": "🧖"}, {"tags": ["day", "luxurious", "man", "pamper", "relax", "room", "sauna", "spa", "steam", "steambath", "unwind"], "order": 2441, "emoji": "🧖‍♂️"}, {"tags": ["day", "luxurious", "pamper", "relax", "room", "sauna", "spa", "steam", "steambath", "unwind", "woman"], "order": 2453, "emoji": "🧖‍♀️"}, {"tags": ["climb", "climber", "climbing", "mountain", "person", "rock", "scale", "up"], "order": 2465, "emoji": "🧗"}, {"tags": ["climb", "climber", "climbing", "man", "mountain", "rock", "scale", "up"], "order": 2471, "emoji": "🧗‍♂️"}, {"tags": ["climb", "climber", "climbing", "mountain", "rock", "scale", "up", "woman"], "order": 2483, "emoji": "🧗‍♀️"}, {"tags": ["fencer", "fencing", "person", "sword"], "order": 2495, "emoji": "🤺"}, {"tags": ["horse", "jockey", "racehorse", "racing", "riding", "sport"], "order": 2496, "emoji": "🏇"}, {"tags": ["ski", "snow"], "order": 2503, "emoji": "⛷️"}, {"tags": ["ski", "snow", "snowboard", "sport"], "order": 2504, "emoji": "🏂️"}, {"tags": ["ball", "birdie", "caddy", "driving", "golf", "golfing", "green", "person", "pga", "putt", "range", "tee"], "order": 2511, "emoji": "🏌️"}, {"tags": ["ball", "birdie", "caddy", "driving", "golf", "golfing", "green", "man", "pga", "putt", "range", "tee"], "order": 2517, "emoji": "🏌️‍♂️"}, {"tags": ["ball", "birdie", "caddy", "driving", "golf", "golfing", "green", "pga", "putt", "range", "tee", "woman"], "order": 2531, "emoji": "🏌️‍♀️"}, {"tags": ["beach", "ocean", "person", "sport", "surf", "surfer", "surfing", "swell", "waves"], "order": 2545, "emoji": "🏄️"}, {"tags": ["beach", "man", "ocean", "sport", "surf", "surfer", "surfing", "swell", "waves"], "order": 2551, "emoji": "🏄‍♂️"}, {"tags": ["beach", "ocean", "person", "sport", "surf", "surfer", "surfing", "swell", "waves"], "order": 2563, "emoji": "🏄‍♀️"}, {"tags": ["boat", "canoe", "cruise", "fishing", "lake", "oar", "paddle", "person", "raft", "river", "row", "rowboat", "rowing"], "order": 2575, "emoji": "🚣"}, {"tags": ["boat", "canoe", "cruise", "fishing", "lake", "man", "oar", "paddle", "raft", "river", "row", "rowboat", "rowing"], "order": 2581, "emoji": "🚣‍♂️"}, {"tags": ["boat", "canoe", "cruise", "fishing", "lake", "oar", "paddle", "raft", "river", "row", "rowboat", "rowing", "woman"], "order": 2593, "emoji": "🚣‍♀️"}, {"tags": ["freestyle", "person", "sport", "swim", "swimmer", "swimming", "triathlon"], "order": 2605, "emoji": "🏊️"}, {"tags": ["freestyle", "man", "sport", "swim", "swimmer", "swimming", "triathlon"], "order": 2611, "emoji": "🏊‍♂️"}, {"tags": ["freestyle", "man", "sport", "swim", "swimmer", "swimming", "triathlon"], "order": 2623, "emoji": "🏊‍♀️"}, {"tags": ["athletic", "ball", "basketball", "bouncing", "championship", "dribble", "net", "person", "player", "throw"], "order": 2636, "emoji": "⛹️"}, {"tags": ["athletic", "ball", "basketball", "bouncing", "championship", "dribble", "man", "net", "player", "throw"], "order": 2642, "emoji": "⛹️‍♂️"}, {"tags": ["athletic", "ball", "basketball", "bouncing", "championship", "dribble", "net", "player", "throw", "woman"], "order": 2656, "emoji": "⛹️‍♀️"}, {"tags": ["barbell", "bodybuilder", "deadlift", "lifter", "lifting", "person", "powerlifting", "weight", "weightlifter", "weights", "workout"], "order": 2671, "emoji": "🏋️"}, {"tags": ["barbell", "bodybuilder", "deadlift", "lifter", "lifting", "man", "powerlifting", "weight", "weightlifter", "weights", "workout"], "order": 2677, "emoji": "🏋️‍♂️"}, {"tags": ["barbell", "bodybuilder", "deadlift", "lifter", "lifting", "powerlifting", "weight", "weightlifter", "weights", "woman", "workout"], "order": 2691, "emoji": "🏋️‍♀️"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "person", "riding", "sport"], "order": 2705, "emoji": "🚴"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "man", "riding", "sport"], "order": 2711, "emoji": "🚴‍♂️"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "riding", "sport", "woman"], "order": 2723, "emoji": "🚴‍♀️"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "mountain", "person", "riding", "sport"], "order": 2735, "emoji": "🚵"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "man", "mountain", "riding", "sport"], "order": 2741, "emoji": "🚵‍♂️"}, {"tags": ["bicycle", "bicyclist", "bike", "biking", "cycle", "cyclist", "mountain", "riding", "sport", "woman"], "order": 2753, "emoji": "🚵‍♀️"}, {"tags": ["active", "cartwheel", "cartwheeling", "excited", "flip", "gymnastics", "happy", "person", "somersault"], "order": 2765, "emoji": "🤸"}, {"tags": ["active", "cartwheel", "cartwheeling", "excited", "flip", "gymnastics", "happy", "man", "somersault"], "order": 2771, "emoji": "🤸‍♂️"}, {"tags": ["active", "cartwheel", "cartwheeling", "excited", "flip", "gymnastics", "happy", "somersault", "woman"], "order": 2783, "emoji": "🤸‍♀️"}, {"tags": ["combat", "duel", "grapple", "people", "ring", "tournament", "wrestle", "wrestling"], "order": 2795, "emoji": "🤼"}, {"tags": ["combat", "duel", "grapple", "men", "ring", "tournament", "wrestle", "wrestling"], "order": 2796, "emoji": "🤼‍♂️"}, {"tags": ["combat", "duel", "grapple", "ring", "tournament", "women", "wrestle", "wrestling"], "order": 2798, "emoji": "🤼‍♀️"}, {"tags": ["person", "playing", "polo", "sport", "swimming", "water", "waterpolo"], "order": 2800, "emoji": "🤽"}, {"tags": ["man", "playing", "polo", "sport", "swimming", "water", "waterpolo"], "order": 2806, "emoji": "🤽‍♂️"}, {"tags": ["playing", "polo", "sport", "swimming", "water", "waterpolo", "woman"], "order": 2818, "emoji": "🤽‍♀️"}, {"tags": ["athletics", "ball", "catch", "chuck", "handball", "hurl", "lob", "person", "pitch", "playing", "sport", "throw", "toss"], "order": 2830, "emoji": "🤾"}, {"tags": ["athletics", "ball", "catch", "chuck", "handball", "hurl", "lob", "man", "pitch", "playing", "sport", "throw", "toss"], "order": 2836, "emoji": "🤾‍♂️"}, {"tags": ["athletics", "ball", "catch", "chuck", "handball", "hurl", "lob", "pitch", "playing", "sport", "throw", "toss", "woman"], "order": 2848, "emoji": "🤾‍♀️"}, {"tags": ["act", "balance", "balancing", "handle", "juggle", "juggling", "manage", "multitask", "person", "skill"], "order": 2860, "emoji": "🤹"}, {"tags": ["act", "balance", "balancing", "handle", "juggle", "juggling", "man", "manage", "multitask", "skill"], "order": 2866, "emoji": "🤹‍♂️"}, {"tags": ["act", "balance", "balancing", "handle", "juggle", "juggling", "manage", "multitask", "skill", "woman"], "order": 2878, "emoji": "🤹‍♀️"}, {"tags": ["cross", "legged", "legs", "lotus", "meditation", "peace", "person", "position", "relax", "serenity", "yoga", "yogi", "zen"], "order": 2890, "emoji": "🧘"}, {"tags": ["cross", "legged", "legs", "lotus", "man", "meditation", "peace", "position", "relax", "serenity", "yoga", "yogi", "zen"], "order": 2896, "emoji": "🧘‍♂️"}, {"tags": ["cross", "legged", "legs", "lotus", "meditation", "peace", "position", "relax", "serenity", "woman", "yoga", "yogi", "zen"], "order": 2908, "emoji": "🧘‍♀️"}, {"tags": ["bath", "bathtub", "person", "taking", "tub"], "order": 2920, "emoji": "🛀"}, {"tags": ["bed", "bedtime", "good", "goodnight", "hotel", "nap", "night", "person", "sleep", "tired", "zzz"], "order": 2926, "emoji": "🛌"}, {"tags": ["bae", "bestie", "bff", "couple", "dating", "flirt", "friends", "hand", "hold", "people", "twins"], "order": 2932, "emoji": "🧑‍🤝‍🧑"}, {"tags": ["bae", "bestie", "bff", "couple", "dating", "flirt", "friends", "girls", "hand", "hold", "sisters", "twins", "women"], "order": 2958, "emoji": "👭"}, {"tags": ["bae", "bestie", "bff", "couple", "dating", "flirt", "friends", "hand", "hold", "man", "twins", "woman"], "order": 2984, "emoji": "👫"}, {"tags": ["bae", "bestie", "bff", "boys", "brothers", "couple", "dating", "flirt", "friends", "hand", "hold", "men", "twins"], "order": 3010, "emoji": "👬"}, {"tags": ["anniversary", "babe", "bae", "couple", "date", "dating", "heart", "love", "mwah", "person", "romance", "together", "xoxo"], "order": 3036, "emoji": "💏"}, {"tags": ["anniversary", "babe", "bae", "couple", "date", "dating", "heart", "kiss", "love", "man", "mwah", "person", "romance", "together", "woman", "xoxo"], "order": 3082, "emoji": "👩‍❤️‍💋‍👨"}, {"tags": ["anniversary", "babe", "bae", "couple", "date", "dating", "heart", "kiss", "love", "man", "mwah", "person", "romance", "together", "xoxo"], "order": 3134, "emoji": "👨‍❤️‍💋‍👨"}, {"tags": ["anniversary", "babe", "bae", "couple", "date", "dating", "heart", "kiss", "love", "mwah", "person", "romance", "together", "woman", "xoxo"], "order": 3186, "emoji": "👩‍❤️‍💋‍👩"}, {"tags": ["anniversary", "babe", "bae", "couple", "dating", "heart", "kiss", "love", "person", "relationship", "romance", "together", "you"], "order": 3238, "emoji": "💑"}, {"tags": ["anniversary", "babe", "bae", "couple", "dating", "heart", "kiss", "love", "man", "person", "relationship", "romance", "together", "woman", "you"], "order": 3284, "emoji": "👩‍❤️‍👨"}, {"tags": ["anniversary", "babe", "bae", "couple", "dating", "heart", "kiss", "love", "man", "person", "relationship", "romance", "together", "you"], "order": 3336, "emoji": "👨‍❤️‍👨"}, {"tags": ["anniversary", "babe", "bae", "couple", "dating", "heart", "kiss", "love", "person", "relationship", "romance", "together", "woman", "you"], "order": 3388, "emoji": "👩‍❤️‍👩"}, {"tags": ["boy", "child", "family", "man", "woman"], "order": 3440, "emoji": "👨‍👩‍👦"}, {"tags": ["child", "family", "girl", "man", "woman"], "order": 3441, "emoji": "👨‍👩‍👧"}, {"tags": ["boy", "child", "family", "girl", "man", "woman"], "order": 3442, "emoji": "👨‍👩‍👧‍👦"}, {"tags": ["boy", "child", "family", "man", "woman"], "order": 3443, "emoji": "👨‍👩‍👦‍👦"}, {"tags": ["child", "family", "girl", "man", "woman"], "order": 3444, "emoji": "👨‍👩‍👧‍👧"}, {"tags": ["boy", "child", "family", "man"], "order": 3445, "emoji": "👨‍👨‍👦"}, {"tags": ["child", "family", "girl", "man"], "order": 3446, "emoji": "👨‍👨‍👧"}, {"tags": ["boy", "child", "family", "girl", "man"], "order": 3447, "emoji": "👨‍👨‍👧‍👦"}, {"tags": ["boy", "child", "family", "man"], "order": 3448, "emoji": "👨‍👨‍👦‍👦"}, {"tags": ["child", "family", "girl", "man"], "order": 3449, "emoji": "👨‍👨‍👧‍👧"}, {"tags": ["boy", "child", "family", "woman"], "order": 3450, "emoji": "👩‍👩‍👦"}, {"tags": ["child", "family", "girl", "woman"], "order": 3451, "emoji": "👩‍👩‍👧"}, {"tags": ["boy", "child", "family", "girl", "woman"], "order": 3452, "emoji": "👩‍👩‍👧‍👦"}, {"tags": ["boy", "child", "family", "woman"], "order": 3453, "emoji": "👩‍👩‍👦‍👦"}, {"tags": ["child", "family", "girl", "woman"], "order": 3454, "emoji": "👩‍👩‍👧‍👧"}, {"tags": ["boy", "child", "family", "man"], "order": 3455, "emoji": "👨‍👦"}, {"tags": ["boy", "child", "family", "man"], "order": 3456, "emoji": "👨‍👦‍👦"}, {"tags": ["child", "family", "girl", "man"], "order": 3457, "emoji": "👨‍👧"}, {"tags": ["boy", "child", "family", "girl", "man"], "order": 3458, "emoji": "👨‍👧‍👦"}, {"tags": ["child", "family", "girl", "man"], "order": 3459, "emoji": "👨‍👧‍👧"}, {"tags": ["boy", "child", "family", "woman"], "order": 3460, "emoji": "👩‍👦"}, {"tags": ["boy", "child", "family", "woman"], "order": 3461, "emoji": "👩‍👦‍👦"}, {"tags": ["child", "family", "girl", "woman"], "order": 3462, "emoji": "👩‍👧"}, {"tags": ["boy", "child", "family", "girl", "woman"], "order": 3463, "emoji": "👩‍👧‍👦"}, {"tags": ["child", "family", "girl", "woman"], "order": 3464, "emoji": "👩‍👧‍👧"}, {"tags": ["face", "head", "silhouette", "speak", "speaking"], "order": 3466, "emoji": "🗣️"}, {"tags": ["bust", "mysterious", "shadow", "silhouette"], "order": 3467, "emoji": "👤"}, {"tags": ["bff", "bust", "busts", "everyone", "friend", "friends", "people", "silhouette"], "order": 3468, "emoji": "👥"}, {"tags": ["comfort", "embrace", "farewell", "friendship", "goodbye", "hello", "hug", "hugging", "love", "people", "thanks"], "order": 3469, "emoji": "🫂"}, {"tags": ["child"], "order": 3470, "emoji": "👪️"}, {"tags": ["adult", "child", "family"], "order": 3471, "emoji": "🧑‍🧑‍🧒"}, {"tags": ["adult", "child", "family"], "order": 3472, "emoji": "🧑‍🧑‍🧒‍🧒"}, {"tags": ["adult", "child", "family"], "order": 3473, "emoji": "🧑‍🧒"}, {"tags": ["adult", "child", "family"], "order": 3474, "emoji": "🧑‍🧒‍🧒"}, {"tags": ["barefoot", "clothing", "footprint", "omw", "print", "walk"], "order": 3475, "emoji": "👣"}, {"tags": ["clue", "crime", "detective", "forensics", "identity", "mystery", "print", "safety", "trace"], "order": 3476, "emoji": "🫆"}, {"tags": ["1–2", "light", "skin", "tone", "type"], "order": 3477, "emoji": "🏻"}, {"tags": ["3", "medium-light", "skin", "tone", "type"], "order": 3478, "emoji": "🏼"}, {"tags": ["4", "medium", "skin", "tone", "type"], "order": 3479, "emoji": "🏽"}, {"tags": ["5", "medium-dark", "skin", "tone", "type"], "order": 3480, "emoji": "🏾"}, {"tags": ["6", "dark", "skin", "tone", "type"], "order": 3481, "emoji": "🏿"}, {"tags": ["ginger", "hair", "red", "redhead"], "order": 3482, "emoji": "🦰"}, {"tags": ["afro", "curly", "hair", "ringlets"], "order": 3483, "emoji": "🦱"}, {"tags": ["gray", "hair", "old", "white"], "order": 3484, "emoji": "🦳"}, {"tags": ["chemotherapy", "hair", "hairless", "no", "shaven"], "order": 3485, "emoji": "🦲"}, {"tags": ["animal", "banana", "face", "monkey"], "order": 3486, "emoji": "🐵"}, {"tags": ["animal", "banana"], "order": 3487, "emoji": "🐒"}, {"tags": ["animal"], "order": 3488, "emoji": "🦍"}, {"tags": ["animal", "ape", "monkey"], "order": 3489, "emoji": "🦧"}, {"tags": ["adorbs", "animal", "dog", "face", "pet", "puppies", "puppy"], "order": 3490, "emoji": "🐶"}, {"tags": ["animal", "animals", "dogs", "pet"], "order": 3491, "emoji": "🐕️"}, {"tags": ["accessibility", "animal", "blind", "dog", "guide"], "order": 3492, "emoji": "🦮"}, {"tags": ["accessibility", "animal", "assistance", "dog", "service"], "order": 3493, "emoji": "🐕‍🦺"}, {"tags": ["animal", "dog", "fluffy"], "order": 3494, "emoji": "🐩"}, {"tags": ["animal", "face"], "order": 3495, "emoji": "🐺"}, {"tags": ["animal", "face"], "order": 3496, "emoji": "🦊"}, {"tags": ["animal", "curious", "sly"], "order": 3497, "emoji": "🦝"}, {"tags": ["animal", "cat", "face", "kitten", "kitty", "pet"], "order": 3498, "emoji": "🐱"}, {"tags": ["animal", "animals", "cats", "kitten", "pet"], "order": 3499, "emoji": "🐈️"}, {"tags": ["animal", "black", "cat", "feline", "halloween", "meow", "unlucky"], "order": 3500, "emoji": "🐈‍⬛"}, {"tags": ["alpha", "animal", "face", "leo", "mane", "order", "rawr", "roar", "safari", "strong", "zodiac"], "order": 3501, "emoji": "🦁"}, {"tags": ["animal", "big", "cat", "face", "predator", "tiger"], "order": 3502, "emoji": "🐯"}, {"tags": ["animal", "big", "cat", "predator", "zoo"], "order": 3503, "emoji": "🐅"}, {"tags": ["animal", "big", "cat", "predator", "zoo"], "order": 3504, "emoji": "🐆"}, {"tags": ["animal", "dressage", "equine", "face", "farm", "horse", "horses"], "order": 3505, "emoji": "🐴"}, {"tags": ["alces", "animal", "antlers", "elk", "mammal"], "order": 3506, "emoji": "🫎"}, {"tags": ["animal", "ass", "burro", "hinny", "mammal", "mule", "stubborn"], "order": 3507, "emoji": "🫏"}, {"tags": ["animal", "equestrian", "farm", "racehorse", "racing"], "order": 3508, "emoji": "🐎"}, {"tags": ["face"], "order": 3509, "emoji": "🦄"}, {"tags": ["animal", "stripe"], "order": 3510, "emoji": "🦓"}, {"tags": ["animal"], "order": 3511, "emoji": "🦌"}, {"tags": ["animal", "buffalo", "herd", "wisent"], "order": 3512, "emoji": "🦬"}, {"tags": ["animal", "cow", "face", "farm", "milk", "moo"], "order": 3513, "emoji": "🐮"}, {"tags": ["animal", "animals", "bull", "farm", "taurus", "zodiac"], "order": 3514, "emoji": "🐂"}, {"tags": ["animal", "buffalo", "water", "zoo"], "order": 3515, "emoji": "🐃"}, {"tags": ["animal", "animals", "farm", "milk", "moo"], "order": 3516, "emoji": "🐄"}, {"tags": ["animal", "bacon", "face", "farm", "pig", "pork"], "order": 3517, "emoji": "🐷"}, {"tags": ["animal", "bacon", "farm", "pork", "sow"], "order": 3518, "emoji": "🐖"}, {"tags": ["animal", "pig"], "order": 3519, "emoji": "🐗"}, {"tags": ["animal", "face", "farm", "nose", "pig", "smell", "snout"], "order": 3520, "emoji": "🐽"}, {"tags": ["animal", "aries", "horns", "male", "sheep", "zodiac", "zoo"], "order": 3521, "emoji": "🐏"}, {"tags": ["animal", "baa", "farm", "female", "fluffy", "lamb", "sheep", "wool"], "order": 3522, "emoji": "🐑"}, {"tags": ["animal", "capricorn", "farm", "milk", "zodiac"], "order": 3523, "emoji": "🐐"}, {"tags": ["animal", "desert", "dromedary", "hump", "one"], "order": 3524, "emoji": "🐪"}, {"tags": ["animal", "bactrian", "camel", "desert", "hump", "two", "two-hump"], "order": 3525, "emoji": "🐫"}, {"tags": ["alpaca", "animal", "guanaco", "vicuña", "wool"], "order": 3526, "emoji": "🦙"}, {"tags": ["animal", "spots"], "order": 3527, "emoji": "🦒"}, {"tags": ["animal"], "order": 3528, "emoji": "🐘"}, {"tags": ["animal", "extinction", "large", "tusk", "wooly"], "order": 3529, "emoji": "🦣"}, {"tags": ["animal"], "order": 3530, "emoji": "🦏"}, {"tags": ["animal", "hippo"], "order": 3531, "emoji": "🦛"}, {"tags": ["animal", "face", "mouse"], "order": 3532, "emoji": "🐭"}, {"tags": ["animal", "animals"], "order": 3533, "emoji": "🐁"}, {"tags": ["animal"], "order": 3534, "emoji": "🐀"}, {"tags": ["animal", "face", "pet"], "order": 3535, "emoji": "🐹"}, {"tags": ["animal", "bunny", "face", "pet", "rabbit"], "order": 3536, "emoji": "🐰"}, {"tags": ["animal", "bunny", "pet"], "order": 3537, "emoji": "🐇"}, {"tags": ["animal", "squirrel"], "order": 3539, "emoji": "🐿️"}, {"tags": ["animal", "dam", "teeth"], "order": 3540, "emoji": "🦫"}, {"tags": ["animal", "spiny"], "order": 3541, "emoji": "🦔"}, {"tags": ["animal", "vampire"], "order": 3542, "emoji": "🦇"}, {"tags": ["animal", "face", "grizzly", "growl", "honey"], "order": 3543, "emoji": "🐻"}, {"tags": ["animal", "arctic", "bear", "polar", "white"], "order": 3544, "emoji": "🐻‍❄️"}, {"tags": ["animal", "australia", "bear", "down", "face", "marsupial", "under"], "order": 3546, "emoji": "🐨"}, {"tags": ["animal", "bamboo", "face"], "order": 3547, "emoji": "🐼"}, {"tags": ["lazy", "slow"], "order": 3548, "emoji": "🦥"}, {"tags": ["animal", "fishing", "playful"], "order": 3549, "emoji": "🦦"}, {"tags": ["animal", "stink"], "order": 3550, "emoji": "🦨"}, {"tags": ["animal", "joey", "jump", "marsupial"], "order": 3551, "emoji": "🦘"}, {"tags": ["animal", "honey", "pester"], "order": 3552, "emoji": "🦡"}, {"tags": ["feet", "paw", "paws", "print", "prints"], "order": 3553, "emoji": "🐾"}, {"tags": ["bird", "gobble", "thanksgiving"], "order": 3554, "emoji": "🦃"}, {"tags": ["animal", "bird", "ornithology"], "order": 3555, "emoji": "🐔"}, {"tags": ["animal", "bird", "ornithology"], "order": 3556, "emoji": "🐓"}, {"tags": ["animal", "baby", "bird", "chick", "egg", "hatching"], "order": 3557, "emoji": "🐣"}, {"tags": ["animal", "baby", "bird", "chick", "ornithology"], "order": 3558, "emoji": "🐤"}, {"tags": ["animal", "baby", "bird", "chick", "front-facing", "newborn", "ornithology"], "order": 3559, "emoji": "🐥"}, {"tags": ["animal", "ornithology"], "order": 3560, "emoji": "🐦️"}, {"tags": ["animal", "antarctica", "bird", "ornithology"], "order": 3561, "emoji": "🐧"}, {"tags": ["bird", "fly", "ornithology", "peace"], "order": 3563, "emoji": "🕊️"}, {"tags": ["animal", "bird", "ornithology"], "order": 3564, "emoji": "🦅"}, {"tags": ["animal", "bird", "ornithology"], "order": 3565, "emoji": "🦆"}, {"tags": ["animal", "bird", "cygnet", "duckling", "ornithology", "ugly"], "order": 3566, "emoji": "🦢"}, {"tags": ["animal", "bird", "ornithology", "wise"], "order": 3567, "emoji": "🦉"}, {"tags": ["animal", "bird", "extinction", "large", "ornithology"], "order": 3568, "emoji": "🦤"}, {"tags": ["bird", "flight", "light", "plumage"], "order": 3569, "emoji": "🪶"}, {"tags": ["animal", "bird", "flamboyant", "ornithology", "tropical"], "order": 3570, "emoji": "🦩"}, {"tags": ["animal", "bird", "colorful", "ornithology", "ostentatious", "peahen", "pretty", "proud"], "order": 3571, "emoji": "🦚"}, {"tags": ["animal", "bird", "ornithology", "pirate", "talk"], "order": 3572, "emoji": "🦜"}, {"tags": ["angelic", "ascend", "aviation", "bird", "fly", "flying", "heavenly", "mythology", "soar"], "order": 3573, "emoji": "🪽"}, {"tags": ["animal", "beak", "bird", "black", "caw", "corvid", "crow", "ornithology", "raven", "rook"], "order": 3574, "emoji": "🐦‍⬛"}, {"tags": ["animal", "bird", "duck", "flock", "fowl", "gaggle", "gander", "geese", "honk", "ornithology", "silly"], "order": 3575, "emoji": "🪿"}, {"tags": ["ascend", "ascension", "emerge", "fantasy", "firebird", "glory", "immortal", "rebirth", "reincarnation", "reinvent", "renewal", "revival", "revive", "rise", "transform"], "order": 3576, "emoji": "🐦‍🔥"}, {"tags": ["animal", "face"], "order": 3577, "emoji": "🐸"}, {"tags": ["animal", "zoo"], "order": 3578, "emoji": "🐊"}, {"tags": ["animal", "terrapin", "tortoise"], "order": 3579, "emoji": "🐢"}, {"tags": ["animal", "reptile"], "order": 3580, "emoji": "🦎"}, {"tags": ["animal", "bearer", "ophiuchus", "serpent", "zodiac"], "order": 3581, "emoji": "🐍"}, {"tags": ["animal", "dragon", "face", "fairy", "fairytale", "tale"], "order": 3582, "emoji": "🐲"}, {"tags": ["animal", "fairy", "fairytale", "knights", "tale"], "order": 3583, "emoji": "🐉"}, {"tags": ["brachiosaurus", "brontosaurus", "dinosaur", "diplodocus"], "order": 3584, "emoji": "🦕"}, {"tags": ["dinosaur", "rex", "t", "t-rex", "tyrannosaurus"], "order": 3585, "emoji": "🦖"}, {"tags": ["animal", "beach", "face", "ocean", "spouting", "whale"], "order": 3586, "emoji": "🐳"}, {"tags": ["animal", "beach", "ocean"], "order": 3587, "emoji": "🐋"}, {"tags": ["animal", "beach", "flipper", "ocean"], "order": 3588, "emoji": "🐬"}, {"tags": ["animal", "lion", "ocean", "sea"], "order": 3589, "emoji": "🦭"}, {"tags": ["animal", "dinner", "fishes", "fishing", "pisces", "zodiac"], "order": 3590, "emoji": "🐟️"}, {"tags": ["animal", "fish", "fishes", "tropical"], "order": 3591, "emoji": "🐠"}, {"tags": ["animal", "fish"], "order": 3592, "emoji": "🐡"}, {"tags": ["animal", "fish"], "order": 3593, "emoji": "🦈"}, {"tags": ["animal", "creature", "ocean"], "order": 3594, "emoji": "🐙"}, {"tags": ["animal", "beach", "conch", "sea", "shell", "spiral"], "order": 3595, "emoji": "🐚"}, {"tags": ["change", "climate", "ocean", "reef", "sea"], "order": 3596, "emoji": "🪸"}, {"tags": ["animal", "aquarium", "burn", "invertebrate", "jelly", "life", "marine", "ocean", "ouch", "plankton", "sea", "sting", "stinger", "tentacles"], "order": 3597, "emoji": "🪼"}, {"tags": ["cancer", "zodiac"], "order": 3598, "emoji": "🦀"}, {"tags": ["animal", "bisque", "claws", "seafood"], "order": 3599, "emoji": "🦞"}, {"tags": ["food", "shellfish", "small"], "order": 3600, "emoji": "🦐"}, {"tags": ["animal", "food", "mollusk"], "order": 3601, "emoji": "🦑"}, {"tags": ["diving", "pearl"], "order": 3602, "emoji": "🦪"}, {"tags": ["animal", "escargot", "garden", "nature", "slug"], "order": 3603, "emoji": "🐌"}, {"tags": ["insect", "pretty"], "order": 3604, "emoji": "🦋"}, {"tags": ["animal", "garden", "insect"], "order": 3605, "emoji": "🐛"}, {"tags": ["animal", "garden", "insect"], "order": 3606, "emoji": "🐜"}, {"tags": ["animal", "bee", "bumblebee", "honey", "insect", "nature", "spring"], "order": 3607, "emoji": "🐝"}, {"tags": ["animal", "bug", "insect"], "order": 3608, "emoji": "🪲"}, {"tags": ["animal", "beetle", "garden", "insect", "lady", "ladybird", "ladybug", "nature"], "order": 3609, "emoji": "🐞"}, {"tags": ["animal", "bug", "grasshopper", "insect", "orthoptera"], "order": 3610, "emoji": "🦗"}, {"tags": ["animal", "insect", "pest", "roach"], "order": 3611, "emoji": "🪳"}, {"tags": ["animal", "insect"], "order": 3613, "emoji": "🕷️"}, {"tags": ["spider", "web"], "order": 3615, "emoji": "🕸️"}, {"tags": ["scorpio", "scorpius", "zodiac"], "order": 3616, "emoji": "🦂"}, {"tags": ["bite", "disease", "fever", "insect", "malaria", "pest", "virus"], "order": 3617, "emoji": "🦟"}, {"tags": ["animal", "disease", "insect", "maggot", "pest", "rotting"], "order": 3618, "emoji": "🪰"}, {"tags": ["animal", "annelid", "earthworm", "parasite"], "order": 3619, "emoji": "🪱"}, {"tags": ["amoeba", "bacteria", "science", "virus"], "order": 3620, "emoji": "🦠"}, {"tags": ["anniversary", "birthday", "date", "flower", "love", "plant", "romance"], "order": 3621, "emoji": "💐"}, {"tags": ["blossom", "cherry", "flower", "plant", "spring", "springtime"], "order": 3622, "emoji": "🌸"}, {"tags": ["flower", "white"], "order": 3623, "emoji": "💮"}, {"tags": ["beauty", "buddhism", "calm", "flower", "hinduism", "peace", "purity", "serenity"], "order": 3624, "emoji": "🪷"}, {"tags": ["plant"], "order": 3626, "emoji": "🏵️"}, {"tags": ["beauty", "elegant", "flower", "love", "plant", "red", "valentine"], "order": 3627, "emoji": "🌹"}, {"tags": ["dying", "flower", "wilted"], "order": 3628, "emoji": "🥀"}, {"tags": ["flower", "plant"], "order": 3629, "emoji": "🌺"}, {"tags": ["flower", "outdoors", "plant", "sun"], "order": 3630, "emoji": "🌻"}, {"tags": ["buttercup", "dandelion", "flower", "plant"], "order": 3631, "emoji": "🌼"}, {"tags": ["blossom", "flower", "growth", "plant"], "order": 3632, "emoji": "🌷"}, {"tags": ["bloom", "bluebonnet", "flower", "indigo", "lavender", "lilac", "lupine", "plant", "purple", "shrub", "snapdragon", "spring", "violet"], "order": 3633, "emoji": "🪻"}, {"tags": ["plant", "sapling", "sprout", "young"], "order": 3634, "emoji": "🌱"}, {"tags": ["decor", "grow", "house", "nurturing", "plant", "pot", "potted"], "order": 3635, "emoji": "🪴"}, {"tags": ["christmas", "evergreen", "forest", "pine", "tree"], "order": 3636, "emoji": "🌲"}, {"tags": ["deciduous", "forest", "green", "habitat", "shedding", "tree"], "order": 3637, "emoji": "🌳"}, {"tags": ["beach", "palm", "plant", "tree", "tropical"], "order": 3638, "emoji": "🌴"}, {"tags": ["desert", "drought", "nature", "plant"], "order": 3639, "emoji": "🌵"}, {"tags": ["ear", "grain", "grains", "plant", "rice", "sheaf"], "order": 3640, "emoji": "🌾"}, {"tags": ["leaf", "plant"], "order": 3641, "emoji": "🌿"}, {"tags": ["irish", "plant"], "order": 3643, "emoji": "☘️"}, {"tags": ["4", "clover", "four", "four-leaf", "irish", "leaf", "lucky", "plant"], "order": 3644, "emoji": "🍀"}, {"tags": ["falling", "leaf", "maple"], "order": 3645, "emoji": "🍁"}, {"tags": ["autumn", "fall", "fallen", "falling", "leaf"], "order": 3646, "emoji": "🍂"}, {"tags": ["blow", "flutter", "fluttering", "leaf", "wind"], "order": 3647, "emoji": "🍃"}, {"tags": ["branch", "empty", "home", "nest", "nesting"], "order": 3648, "emoji": "🪹"}, {"tags": ["bird", "branch", "egg", "eggs", "nest", "nesting"], "order": 3649, "emoji": "🪺"}, {"tags": ["fungus", "toadstool"], "order": 3650, "emoji": "🍄"}, {"tags": ["bare", "barren", "branches", "dead", "drought", "leafless", "tree", "trunk", "winter", "wood"], "order": 3651, "emoji": "🪾"}, {"tags": ["dionysus", "fruit", "grape"], "order": 3652, "emoji": "🍇"}, {"tags": ["cantaloupe", "fruit"], "order": 3653, "emoji": "🍈"}, {"tags": ["fruit"], "order": 3654, "emoji": "🍉"}, {"tags": ["c", "citrus", "fruit", "nectarine", "orange", "vitamin"], "order": 3655, "emoji": "🍊"}, {"tags": ["citrus", "fruit", "sour"], "order": 3656, "emoji": "🍋"}, {"tags": ["acidity", "citrus", "cocktail", "fruit", "garnish", "key", "margarita", "mojito", "refreshing", "salsa", "sour", "tangy", "tequila", "tropical", "zest"], "order": 3657, "emoji": "🍋‍🟩"}, {"tags": ["fruit", "potassium"], "order": 3658, "emoji": "🍌"}, {"tags": ["colada", "fruit", "pina", "tropical"], "order": 3659, "emoji": "🍍"}, {"tags": ["food", "fruit", "tropical"], "order": 3660, "emoji": "🥭"}, {"tags": ["apple", "diet", "food", "fruit", "health", "red", "ripe"], "order": 3661, "emoji": "🍎"}, {"tags": ["apple", "fruit", "green"], "order": 3662, "emoji": "🍏"}, {"tags": ["fruit"], "order": 3663, "emoji": "🍐"}, {"tags": ["fruit"], "order": 3664, "emoji": "🍑"}, {"tags": ["berries", "cherry", "fruit", "red"], "order": 3665, "emoji": "🍒"}, {"tags": ["berry", "fruit"], "order": 3666, "emoji": "🍓"}, {"tags": ["berries", "berry", "bilberry", "blue", "blueberry", "food", "fruit"], "order": 3667, "emoji": "🫐"}, {"tags": ["food", "fruit", "kiwi"], "order": 3668, "emoji": "🥝"}, {"tags": ["food", "fruit", "vegetable"], "order": 3669, "emoji": "🍅"}, {"tags": ["food"], "order": 3670, "emoji": "🫒"}, {"tags": ["colada", "palm", "piña"], "order": 3671, "emoji": "🥥"}, {"tags": ["food", "fruit"], "order": 3672, "emoji": "🥑"}, {"tags": ["aubergine", "vegetable"], "order": 3673, "emoji": "🍆"}, {"tags": ["food", "vegetable"], "order": 3674, "emoji": "🥔"}, {"tags": ["food", "vegetable"], "order": 3675, "emoji": "🥕"}, {"tags": ["corn", "crops", "ear", "farm", "maize", "maze"], "order": 3676, "emoji": "🌽"}, {"tags": ["hot", "pepper"], "order": 3678, "emoji": "🌶️"}, {"tags": ["bell", "capsicum", "food", "pepper", "vegetable"], "order": 3679, "emoji": "🫑"}, {"tags": ["food", "pickle", "vegetable"], "order": 3680, "emoji": "🥒"}, {"tags": ["bok", "burgers", "cabbage", "choy", "green", "kale", "leafy", "lettuce", "salad"], "order": 3681, "emoji": "🥬"}, {"tags": ["cabbage", "wild"], "order": 3682, "emoji": "🥦"}, {"tags": ["flavoring"], "order": 3683, "emoji": "🧄"}, {"tags": ["flavoring"], "order": 3684, "emoji": "🧅"}, {"tags": ["food", "nut", "peanut", "vegetable"], "order": 3685, "emoji": "🥜"}, {"tags": ["food", "kidney", "legume", "small"], "order": 3686, "emoji": "🫘"}, {"tags": ["almond", "plant"], "order": 3687, "emoji": "🌰"}, {"tags": ["beer", "ginger", "health", "herb", "natural", "root", "spice"], "order": 3688, "emoji": "🫚"}, {"tags": ["beans", "beanstalk", "edamame", "legume", "pea", "pod", "soybean", "vegetable", "veggie"], "order": 3689, "emoji": "🫛"}, {"tags": ["food", "fungi", "fungus", "mushroom", "nature", "pizza", "portobello", "shiitake", "shroom", "spore", "sprout", "toppings", "truffle", "vegetable", "vegetarian", "veggie"], "order": 3690, "emoji": "🍄‍🟫"}, {"tags": ["beet", "food", "garden", "radish", "root", "salad", "turnip", "vegetable", "vegetarian"], "order": 3691, "emoji": "🫜"}, {"tags": ["carbs", "food", "grain", "loaf", "restaurant", "toast", "wheat"], "order": 3692, "emoji": "🍞"}, {"tags": ["bread", "breakfast", "crescent", "food", "french", "roll"], "order": 3693, "emoji": "🥐"}, {"tags": ["baguette", "bread", "food", "french"], "order": 3694, "emoji": "🥖"}, {"tags": ["arepa", "bread", "food", "gordita", "lavash", "naan", "pita"], "order": 3695, "emoji": "🫓"}, {"tags": ["convoluted", "twisted"], "order": 3696, "emoji": "🥨"}, {"tags": ["bakery", "bread", "breakfast", "schmear"], "order": 3697, "emoji": "🥯"}, {"tags": ["breakfast", "crêpe", "food", "hotcake", "pancake"], "order": 3698, "emoji": "🥞"}, {"tags": ["breakfast", "indecisive", "iron"], "order": 3699, "emoji": "🧇"}, {"tags": ["cheese", "wedge"], "order": 3700, "emoji": "🧀"}, {"tags": ["bone", "meat"], "order": 3701, "emoji": "🍖"}, {"tags": ["bone", "chicken", "drumstick", "hungry", "leg", "poultry", "turkey"], "order": 3702, "emoji": "🍗"}, {"tags": ["chop", "cut", "lambchop", "meat", "porkchop", "red", "steak"], "order": 3703, "emoji": "🥩"}, {"tags": ["breakfast", "food", "meat"], "order": 3704, "emoji": "🥓"}, {"tags": ["burger", "eat", "fast", "food", "hungry"], "order": 3705, "emoji": "🍔"}, {"tags": ["fast", "food", "french", "fries"], "order": 3706, "emoji": "🍟"}, {"tags": ["cheese", "food", "hungry", "pepperoni", "slice"], "order": 3707, "emoji": "🍕"}, {"tags": ["dog", "frankfurter", "hot", "hotdog", "sausage"], "order": 3708, "emoji": "🌭"}, {"tags": ["bread"], "order": 3709, "emoji": "🥪"}, {"tags": ["mexican"], "order": 3710, "emoji": "🌮"}, {"tags": ["mexican", "wrap"], "order": 3711, "emoji": "🌯"}, {"tags": ["food", "mexican", "pamonha", "wrapped"], "order": 3712, "emoji": "🫔"}, {"tags": ["falafel", "flatbread", "food", "gyro", "kebab", "stuffed"], "order": 3713, "emoji": "🥙"}, {"tags": ["chickpea", "meatball"], "order": 3714, "emoji": "🧆"}, {"tags": ["breakfast", "food"], "order": 3715, "emoji": "🥚"}, {"tags": ["breakfast", "easy", "egg", "fry", "frying", "over", "pan", "restaurant", "side", "sunny", "up"], "order": 3716, "emoji": "🍳"}, {"tags": ["casserole", "food", "paella", "pan", "shallow"], "order": 3717, "emoji": "🥘"}, {"tags": ["food", "pot", "soup", "stew"], "order": 3718, "emoji": "🍲"}, {"tags": ["cheese", "chocolate", "food", "melted", "pot", "ski"], "order": 3719, "emoji": "🫕"}, {"tags": ["bowl", "breakfast", "cereal", "congee", "oatmeal", "porridge", "spoon"], "order": 3720, "emoji": "🥣"}, {"tags": ["food", "green", "salad"], "order": 3721, "emoji": "🥗"}, {"tags": ["corn", "movie", "pop"], "order": 3722, "emoji": "🍿"}, {"tags": ["dairy"], "order": 3723, "emoji": "🧈"}, {"tags": ["condiment", "flavor", "mad", "salty", "shaker", "taste", "upset"], "order": 3724, "emoji": "🧂"}, {"tags": ["can", "canned", "food"], "order": 3725, "emoji": "🥫"}, {"tags": ["bento", "box", "food"], "order": 3726, "emoji": "🍱"}, {"tags": ["cracker", "food", "rice"], "order": 3727, "emoji": "🍘"}, {"tags": ["ball", "food", "japanese", "rice"], "order": 3728, "emoji": "🍙"}, {"tags": ["cooked", "food", "rice"], "order": 3729, "emoji": "🍚"}, {"tags": ["curry", "food", "rice"], "order": 3730, "emoji": "🍛"}, {"tags": ["bowl", "chopsticks", "food", "noodle", "pho", "ramen", "soup", "steaming"], "order": 3731, "emoji": "🍜"}, {"tags": ["food", "meatballs", "pasta", "restaurant"], "order": 3732, "emoji": "🍝"}, {"tags": ["food", "potato", "roasted", "sweet"], "order": 3733, "emoji": "🍠"}, {"tags": ["food", "kebab", "restaurant", "seafood", "skewer", "stick"], "order": 3734, "emoji": "🍢"}, {"tags": ["food"], "order": 3735, "emoji": "🍣"}, {"tags": ["fried", "prawn", "shrimp", "tempura"], "order": 3736, "emoji": "🍤"}, {"tags": ["cake", "fish", "food", "pastry", "restaurant", "swirl"], "order": 3737, "emoji": "🍥"}, {"tags": ["autumn", "cake", "festival", "moon", "yuèbǐng"], "order": 3738, "emoji": "🥮"}, {"tags": ["dessert", "japanese", "skewer", "stick", "sweet"], "order": 3739, "emoji": "🍡"}, {"tags": ["empanada", "gyōza", "jiaozi", "pierogi", "potsticker"], "order": 3740, "emoji": "🥟"}, {"tags": ["cookie", "fortune", "prophecy"], "order": 3741, "emoji": "🥠"}, {"tags": ["box", "chopsticks", "delivery", "food", "oyster", "pail", "takeout"], "order": 3742, "emoji": "🥡"}, {"tags": ["cream", "dessert", "food", "ice", "icecream", "restaurant", "serve", "soft", "sweet"], "order": 3743, "emoji": "🍦"}, {"tags": ["dessert", "ice", "restaurant", "shaved", "sweet"], "order": 3744, "emoji": "🍧"}, {"tags": ["cream", "dessert", "food", "ice", "restaurant", "sweet"], "order": 3745, "emoji": "🍨"}, {"tags": ["breakfast", "dessert", "donut", "food", "sweet"], "order": 3746, "emoji": "🍩"}, {"tags": ["chip", "chocolate", "dessert", "sweet"], "order": 3747, "emoji": "🍪"}, {"tags": ["bday", "birthday", "cake", "celebration", "dessert", "happy", "pastry", "sweet"], "order": 3748, "emoji": "🎂"}, {"tags": ["cake", "dessert", "pastry", "slice", "sweet"], "order": 3749, "emoji": "🍰"}, {"tags": ["bakery", "dessert", "sprinkles", "sugar", "sweet", "treat"], "order": 3750, "emoji": "🧁"}, {"tags": ["apple", "filling", "fruit", "meat", "pastry", "pumpkin", "slice"], "order": 3751, "emoji": "🥧"}, {"tags": ["bar", "candy", "chocolate", "dessert", "halloween", "sweet", "tooth"], "order": 3752, "emoji": "🍫"}, {"tags": ["cavities", "dessert", "halloween", "restaurant", "sweet", "tooth", "wrapper"], "order": 3753, "emoji": "🍬"}, {"tags": ["candy", "dessert", "food", "restaurant", "sweet"], "order": 3754, "emoji": "🍭"}, {"tags": ["dessert", "pudding", "sweet"], "order": 3755, "emoji": "🍮"}, {"tags": ["barrel", "bear", "food", "honey", "honeypot", "jar", "pot", "sweet"], "order": 3756, "emoji": "🍯"}, {"tags": ["babies", "baby", "birth", "born", "bottle", "drink", "infant", "milk", "newborn"], "order": 3757, "emoji": "🍼"}, {"tags": ["drink", "glass", "milk"], "order": 3758, "emoji": "🥛"}, {"tags": ["beverage", "cafe", "caffeine", "chai", "coffee", "drink", "hot", "morning", "steaming", "tea"], "order": 3759, "emoji": "☕️"}, {"tags": ["brew", "drink", "food", "pot", "tea"], "order": 3760, "emoji": "🫖"}, {"tags": ["beverage", "cup", "drink", "handle", "oolong", "tea", "teacup"], "order": 3761, "emoji": "🍵"}, {"tags": ["bar", "beverage", "bottle", "cup", "drink", "restaurant"], "order": 3762, "emoji": "🍶"}, {"tags": ["bar", "bottle", "cork", "drink", "popping"], "order": 3763, "emoji": "🍾"}, {"tags": ["alcohol", "bar", "beverage", "booze", "club", "drink", "drinking", "drinks", "glass", "restaurant", "wine"], "order": 3764, "emoji": "🍷"}, {"tags": ["alcohol", "bar", "booze", "club", "cocktail", "drink", "drinking", "drinks", "glass", "mad", "martini", "men"], "order": 3765, "emoji": "🍸️"}, {"tags": ["alcohol", "bar", "booze", "club", "cocktail", "drink", "drinking", "drinks", "drunk", "mai", "party", "tai", "tropical", "tropics"], "order": 3766, "emoji": "🍹"}, {"tags": ["alcohol", "ale", "bar", "beer", "booze", "drink", "drinking", "drinks", "mug", "octoberfest", "oktoberfest", "pint", "stein", "summer"], "order": 3767, "emoji": "🍺"}, {"tags": ["alcohol", "bar", "beer", "booze", "bottoms", "cheers", "clink", "clinking", "drinking", "drinks", "mugs"], "order": 3768, "emoji": "🍻"}, {"tags": ["celebrate", "clink", "clinking", "drink", "glass", "glasses"], "order": 3769, "emoji": "🥂"}, {"tags": ["glass", "liquor", "scotch", "shot", "tumbler", "whiskey", "whisky"], "order": 3770, "emoji": "🥃"}, {"tags": ["accident", "drink", "empty", "glass", "liquid", "oops", "pour", "pouring", "spill", "water"], "order": 3771, "emoji": "🫗"}, {"tags": ["cup", "drink", "juice", "malt", "soda", "soft", "straw", "water"], "order": 3772, "emoji": "🥤"}, {"tags": ["boba", "bubble", "food", "milk", "pearl", "tea"], "order": 3773, "emoji": "🧋"}, {"tags": ["beverage", "box", "juice", "straw", "sweet"], "order": 3774, "emoji": "🧃"}, {"tags": ["drink"], "order": 3775, "emoji": "🧉"}, {"tags": ["cold", "cube", "iceberg"], "order": 3776, "emoji": "🧊"}, {"tags": ["hashi", "jeotgarak", "kuaizi"], "order": 3777, "emoji": "🥢"}, {"tags": ["cooking", "dinner", "eat", "fork", "knife", "plate"], "order": 3779, "emoji": "🍽️"}, {"tags": ["breakfast", "breaky", "cooking", "cutlery", "delicious", "dinner", "eat", "feed", "food", "fork", "hungry", "knife", "lunch", "restaurant", "yum", "yummy"], "order": 3780, "emoji": "🍴"}, {"tags": ["eat", "tableware"], "order": 3781, "emoji": "🥄"}, {"tags": ["chef", "cooking", "hocho", "kitchen", "knife", "tool", "weapon"], "order": 3782, "emoji": "🔪"}, {"tags": ["condiment", "container", "empty", "nothing", "sauce", "store"], "order": 3783, "emoji": "🫙"}, {"tags": ["aquarius", "cooking", "drink", "jug", "tool", "weapon", "zodiac"], "order": 3784, "emoji": "🏺"}, {"tags": ["africa", "earth", "europe", "europe-africa", "globe", "showing", "world"], "order": 3785, "emoji": "🌍️"}, {"tags": ["americas", "earth", "globe", "showing", "world"], "order": 3786, "emoji": "🌎️"}, {"tags": ["asia", "asia-australia", "australia", "earth", "globe", "showing", "world"], "order": 3787, "emoji": "🌏️"}, {"tags": ["earth", "globe", "internet", "meridians", "web", "world", "worldwide"], "order": 3788, "emoji": "🌐"}, {"tags": ["map", "world"], "order": 3790, "emoji": "🗺️"}, {"tags": ["japan", "map"], "order": 3791, "emoji": "🗾"}, {"tags": ["direction", "magnetic", "navigation", "orienteering"], "order": 3792, "emoji": "🧭"}, {"tags": ["cold", "mountain", "snow", "snow-capped"], "order": 3794, "emoji": "🏔️"}, {"tags": ["mountain"], "order": 3796, "emoji": "⛰️"}, {"tags": ["eruption", "mountain", "nature"], "order": 3797, "emoji": "🌋"}, {"tags": ["fuji", "mount", "mountain", "nature"], "order": 3798, "emoji": "🗻"}, {"tags": ["camping"], "order": 3800, "emoji": "🏕️"}, {"tags": ["beach", "umbrella"], "order": 3802, "emoji": "🏖️"}, {"tags": ["desert"], "order": 3804, "emoji": "🏜️"}, {"tags": ["desert", "island"], "order": 3806, "emoji": "🏝️"}, {"tags": ["national", "park"], "order": 3808, "emoji": "🏞️"}, {"tags": ["stadium"], "order": 3810, "emoji": "🏟️"}, {"tags": ["building", "classical"], "order": 3812, "emoji": "🏛️"}, {"tags": ["building", "construction", "crane"], "order": 3814, "emoji": "🏗️"}, {"tags": ["bricks", "clay", "mortar", "wall"], "order": 3815, "emoji": "🧱"}, {"tags": ["boulder", "heavy", "solid", "stone", "tough"], "order": 3816, "emoji": "🪨"}, {"tags": ["log", "lumber", "timber"], "order": 3817, "emoji": "🪵"}, {"tags": ["home", "house", "roundhouse", "shelter", "yurt"], "order": 3818, "emoji": "🛖"}, {"tags": ["house"], "order": 3820, "emoji": "🏘️"}, {"tags": ["derelict", "home", "house"], "order": 3822, "emoji": "🏚️"}, {"tags": ["building", "country", "heart", "home", "ranch", "settle", "simple", "suburban", "suburbia", "where"], "order": 3823, "emoji": "🏠️"}, {"tags": ["building", "country", "garden", "heart", "home", "house", "ranch", "settle", "simple", "suburban", "suburbia", "where"], "order": 3824, "emoji": "🏡"}, {"tags": ["building", "city", "cubical", "job", "office"], "order": 3825, "emoji": "🏢"}, {"tags": ["building", "japanese", "office", "post"], "order": 3826, "emoji": "🏣"}, {"tags": ["building", "european", "office", "post"], "order": 3827, "emoji": "🏤"}, {"tags": ["building", "doctor", "medicine"], "order": 3828, "emoji": "🏥"}, {"tags": ["building"], "order": 3829, "emoji": "🏦"}, {"tags": ["building"], "order": 3830, "emoji": "🏨"}, {"tags": ["building", "hotel", "love"], "order": 3831, "emoji": "🏩"}, {"tags": ["24", "building", "convenience", "hours", "store"], "order": 3832, "emoji": "🏪"}, {"tags": ["building"], "order": 3833, "emoji": "🏫"}, {"tags": ["building", "department", "store"], "order": 3834, "emoji": "🏬"}, {"tags": ["building"], "order": 3835, "emoji": "🏭️"}, {"tags": ["building", "castle", "japanese"], "order": 3836, "emoji": "🏯"}, {"tags": ["building", "european"], "order": 3837, "emoji": "🏰"}, {"tags": ["chapel", "hitched", "nuptials", "romance"], "order": 3838, "emoji": "💒"}, {"tags": ["tokyo", "tower"], "order": 3839, "emoji": "🗼"}, {"tags": ["liberty", "new", "ny", "nyc", "statue", "york"], "order": 3840, "emoji": "🗽"}, {"tags": ["bless", "chapel", "christian", "cross", "religion"], "order": 3841, "emoji": "⛪️"}, {"tags": ["islam", "masjid", "muslim", "religion"], "order": 3842, "emoji": "🕌"}, {"tags": ["hindu", "temple"], "order": 3843, "emoji": "🛕"}, {"tags": ["jew", "jewish", "judaism", "religion", "temple"], "order": 3844, "emoji": "🕍"}, {"tags": ["religion", "shinto", "shrine"], "order": 3846, "emoji": "⛩️"}, {"tags": ["hajj", "islam", "muslim", "religion", "umrah"], "order": 3847, "emoji": "🕋"}, {"tags": ["fountain"], "order": 3848, "emoji": "⛲️"}, {"tags": ["camping"], "order": 3849, "emoji": "⛺️"}, {"tags": ["fog"], "order": 3850, "emoji": "🌁"}, {"tags": ["night", "star", "stars"], "order": 3851, "emoji": "🌃"}, {"tags": ["city"], "order": 3853, "emoji": "🏙️"}, {"tags": ["morning", "mountains", "over", "sun", "sunrise"], "order": 3854, "emoji": "🌄"}, {"tags": ["morning", "nature", "sun"], "order": 3855, "emoji": "🌅"}, {"tags": ["at", "building", "city", "cityscape", "dusk", "evening", "landscape", "sun", "sunset"], "order": 3856, "emoji": "🌆"}, {"tags": ["building", "dusk", "sun"], "order": 3857, "emoji": "🌇"}, {"tags": ["at", "bridge", "night"], "order": 3858, "emoji": "🌉"}, {"tags": ["hot", "hotsprings", "springs", "steaming"], "order": 3860, "emoji": "♨️"}, {"tags": ["carousel", "entertainment", "horse"], "order": 3861, "emoji": "🎠"}, {"tags": ["amusement", "park", "play", "playground", "playing", "slide", "sliding", "theme"], "order": 3862, "emoji": "🛝"}, {"tags": ["amusement", "ferris", "park", "theme", "wheel"], "order": 3863, "emoji": "🎡"}, {"tags": ["amusement", "coaster", "park", "roller", "theme"], "order": 3864, "emoji": "🎢"}, {"tags": ["barber", "cut", "fresh", "haircut", "pole", "shave"], "order": 3865, "emoji": "💈"}, {"tags": ["circus", "tent"], "order": 3866, "emoji": "🎪"}, {"tags": ["caboose", "engine", "railway", "steam", "train", "trains", "travel"], "order": 3867, "emoji": "🚂"}, {"tags": ["car", "electric", "railway", "train", "tram", "travel", "trolleybus"], "order": 3868, "emoji": "🚃"}, {"tags": ["high-speed", "railway", "shinkansen", "speed", "train"], "order": 3869, "emoji": "🚄"}, {"tags": ["bullet", "high-speed", "nose", "railway", "shinkansen", "speed", "train", "travel"], "order": 3870, "emoji": "🚅"}, {"tags": ["arrived", "choo", "railway"], "order": 3871, "emoji": "🚆"}, {"tags": ["subway", "travel"], "order": 3872, "emoji": "🚇️"}, {"tags": ["arrived", "light", "monorail", "rail", "railway"], "order": 3873, "emoji": "🚈"}, {"tags": ["railway", "train"], "order": 3874, "emoji": "🚉"}, {"tags": ["trolleybus"], "order": 3875, "emoji": "🚊"}, {"tags": ["vehicle"], "order": 3876, "emoji": "🚝"}, {"tags": ["car", "mountain", "railway", "trip"], "order": 3877, "emoji": "🚞"}, {"tags": ["bus", "car", "tram", "trolley", "trolleybus"], "order": 3878, "emoji": "🚋"}, {"tags": ["school", "vehicle"], "order": 3879, "emoji": "🚌"}, {"tags": ["bus", "cars", "oncoming"], "order": 3880, "emoji": "🚍️"}, {"tags": ["bus", "tram", "trolley"], "order": 3881, "emoji": "🚎"}, {"tags": ["bus", "drive", "van", "vehicle"], "order": 3882, "emoji": "🚐"}, {"tags": ["emergency", "vehicle"], "order": 3883, "emoji": "🚑️"}, {"tags": ["engine", "fire", "truck"], "order": 3884, "emoji": "🚒"}, {"tags": ["5–0", "car", "cops", "patrol", "police"], "order": 3885, "emoji": "🚓"}, {"tags": ["car", "oncoming", "police"], "order": 3886, "emoji": "🚔️"}, {"tags": ["cab", "cabbie", "car", "drive", "vehicle", "yellow"], "order": 3887, "emoji": "🚕"}, {"tags": ["cab", "cabbie", "cars", "drove", "hail", "oncoming", "taxi", "yellow"], "order": 3888, "emoji": "🚖"}, {"tags": ["car", "driving", "vehicle"], "order": 3889, "emoji": "🚗"}, {"tags": ["automobile", "car", "cars", "drove", "oncoming", "vehicle"], "order": 3890, "emoji": "🚘️"}, {"tags": ["car", "drive", "recreational", "sport", "sportutility", "utility", "vehicle"], "order": 3891, "emoji": "🚙"}, {"tags": ["automobile", "car", "flatbed", "pick-up", "pickup", "transportation", "truck"], "order": 3892, "emoji": "🛻"}, {"tags": ["car", "delivery", "drive", "truck", "vehicle"], "order": 3893, "emoji": "🚚"}, {"tags": ["articulated", "car", "drive", "lorry", "move", "semi", "truck", "vehicle"], "order": 3894, "emoji": "🚛"}, {"tags": ["vehicle"], "order": 3895, "emoji": "🚜"}, {"tags": ["car", "racing", "zoom"], "order": 3897, "emoji": "🏎️"}, {"tags": ["racing"], "order": 3899, "emoji": "🏍️"}, {"tags": ["motor", "scooter"], "order": 3900, "emoji": "🛵"}, {"tags": ["accessibility", "manual", "wheelchair"], "order": 3901, "emoji": "🦽"}, {"tags": ["accessibility", "motorized", "wheelchair"], "order": 3902, "emoji": "🦼"}, {"tags": ["auto", "rickshaw", "tuk"], "order": 3903, "emoji": "🛺"}, {"tags": ["bike", "class", "cycle", "cycling", "cyclist", "gang", "ride", "spin", "spinning"], "order": 3904, "emoji": "🚲️"}, {"tags": ["kick", "scooter"], "order": 3905, "emoji": "🛴"}, {"tags": ["board", "skate", "skater", "wheels"], "order": 3906, "emoji": "🛹"}, {"tags": ["blades", "roller", "skate", "skates", "sport"], "order": 3907, "emoji": "🛼"}, {"tags": ["bus", "busstop", "stop"], "order": 3908, "emoji": "🚏"}, {"tags": ["highway", "road"], "order": 3910, "emoji": "🛣️"}, {"tags": ["railway", "track", "train"], "order": 3912, "emoji": "🛤️"}, {"tags": ["drum", "oil"], "order": 3914, "emoji": "🛢️"}, {"tags": ["diesel", "fuel", "fuelpump", "gas", "gasoline", "pump", "station"], "order": 3915, "emoji": "⛽️"}, {"tags": ["car", "circle", "tire", "turn", "vehicle"], "order": 3916, "emoji": "🛞"}, {"tags": ["alarm", "alert", "beacon", "car", "emergency", "light", "police", "revolving", "siren"], "order": 3917, "emoji": "🚨"}, {"tags": ["horizontal", "intersection", "light", "signal", "stop", "stoplight", "traffic"], "order": 3918, "emoji": "🚥"}, {"tags": ["drove", "intersection", "light", "signal", "stop", "stoplight", "traffic", "vertical"], "order": 3919, "emoji": "🚦"}, {"tags": ["octagonal", "sign", "stop"], "order": 3920, "emoji": "🛑"}, {"tags": ["barrier"], "order": 3921, "emoji": "🚧"}, {"tags": ["ship", "tool"], "order": 3922, "emoji": "⚓️"}, {"tags": ["buoy", "float", "life", "lifesaver", "preserver", "rescue", "ring", "safety", "save", "saver", "swim"], "order": 3923, "emoji": "🛟"}, {"tags": ["boat", "resort", "sailing", "sea", "yacht"], "order": 3924, "emoji": "⛵️"}, {"tags": ["boat"], "order": 3925, "emoji": "🛶"}, {"tags": ["billionaire", "boat", "lake", "luxury", "millionaire", "summer", "travel"], "order": 3926, "emoji": "🚤"}, {"tags": ["passenger", "ship"], "order": 3928, "emoji": "🛳️"}, {"tags": ["boat", "passenger"], "order": 3930, "emoji": "⛴️"}, {"tags": ["boat", "motor", "motorboat"], "order": 3932, "emoji": "🛥️"}, {"tags": ["boat", "passenger", "travel"], "order": 3933, "emoji": "🚢"}, {"tags": ["aeroplane", "fly", "flying", "jet", "plane", "travel"], "order": 3935, "emoji": "✈️"}, {"tags": ["aeroplane", "airplane", "plane", "small"], "order": 3937, "emoji": "🛩️"}, {"tags": ["aeroplane", "airplane", "check-in", "departure", "departures", "plane"], "order": 3938, "emoji": "🛫"}, {"tags": ["aeroplane", "airplane", "arrival", "arrivals", "arriving", "landing", "plane"], "order": 3939, "emoji": "🛬"}, {"tags": ["hang-glide", "parasail", "skydive"], "order": 3940, "emoji": "🪂"}, {"tags": ["chair"], "order": 3941, "emoji": "💺"}, {"tags": ["copter", "roflcopter", "travel", "vehicle"], "order": 3942, "emoji": "🚁"}, {"tags": ["railway", "suspension"], "order": 3943, "emoji": "🚟"}, {"tags": ["cable", "cableway", "gondola", "lift", "mountain", "ski"], "order": 3944, "emoji": "🚠"}, {"tags": ["aerial", "cable", "car", "gondola", "ropeway", "tramway"], "order": 3945, "emoji": "🚡"}, {"tags": ["space"], "order": 3947, "emoji": "🛰️"}, {"tags": ["launch", "rockets", "space", "travel"], "order": 3948, "emoji": "🚀"}, {"tags": ["aliens", "extra", "flying", "saucer", "terrestrial", "ufo"], "order": 3949, "emoji": "🛸"}, {"tags": ["bell", "bellhop", "hotel"], "order": 3951, "emoji": "🛎️"}, {"tags": ["bag", "packing", "roller", "suitcase", "travel"], "order": 3952, "emoji": "🧳"}, {"tags": ["done", "hourglass", "sand", "time", "timer"], "order": 3953, "emoji": "⌛️"}, {"tags": ["done", "flowing", "hourglass", "hours", "not", "sand", "timer", "waiting", "yolo"], "order": 3954, "emoji": "⏳️"}, {"tags": ["clock", "time"], "order": 3955, "emoji": "⌚️"}, {"tags": ["alarm", "clock", "hours", "hrs", "late", "time", "waiting"], "order": 3956, "emoji": "⏰️"}, {"tags": ["clock", "time"], "order": 3958, "emoji": "⏱️"}, {"tags": ["clock", "timer"], "order": 3960, "emoji": "⏲️"}, {"tags": ["clock", "mantelpiece", "time"], "order": 3962, "emoji": "🕰️"}, {"tags": ["12", "12:00", "clock", "o’clock", "time", "twelve"], "order": 3963, "emoji": "🕛️"}, {"tags": ["12", "12:30", "30", "clock", "thirty", "time", "twelve"], "order": 3964, "emoji": "🕧️"}, {"tags": ["1", "1:00", "clock", "one", "o’clock", "time"], "order": 3965, "emoji": "🕐️"}, {"tags": ["1", "1:30", "30", "clock", "one", "thirty", "time"], "order": 3966, "emoji": "🕜️"}, {"tags": ["2", "2:00", "clock", "o’clock", "time", "two"], "order": 3967, "emoji": "🕑️"}, {"tags": ["2", "2:30", "30", "clock", "thirty", "time", "two"], "order": 3968, "emoji": "🕝️"}, {"tags": ["3", "3:00", "clock", "o’clock", "three", "time"], "order": 3969, "emoji": "🕒️"}, {"tags": ["3", "30", "3:30", "clock", "thirty", "three", "time"], "order": 3970, "emoji": "🕞️"}, {"tags": ["4", "4:00", "clock", "four", "o’clock", "time"], "order": 3971, "emoji": "🕓️"}, {"tags": ["30", "4", "4:30", "clock", "four", "thirty", "time"], "order": 3972, "emoji": "🕟️"}, {"tags": ["5", "5:00", "clock", "five", "o’clock", "time"], "order": 3973, "emoji": "🕔️"}, {"tags": ["30", "5", "5:30", "clock", "five", "thirty", "time"], "order": 3974, "emoji": "🕠️"}, {"tags": ["6", "6:00", "clock", "o’clock", "six", "time"], "order": 3975, "emoji": "🕕️"}, {"tags": ["30", "6", "6:30", "clock", "six", "thirty"], "order": 3976, "emoji": "🕡️"}, {"tags": ["0", "7", "7:00", "clock", "o’clock", "seven"], "order": 3977, "emoji": "🕖️"}, {"tags": ["30", "7", "7:30", "clock", "seven", "thirty"], "order": 3978, "emoji": "🕢️"}, {"tags": ["8", "8:00", "clock", "eight", "o’clock", "time"], "order": 3979, "emoji": "🕗️"}, {"tags": ["30", "8", "8:30", "clock", "eight", "thirty", "time"], "order": 3980, "emoji": "🕣️"}, {"tags": ["9", "9:00", "clock", "nine", "o’clock", "time"], "order": 3981, "emoji": "🕘️"}, {"tags": ["30", "9", "9:30", "clock", "nine", "thirty", "time"], "order": 3982, "emoji": "🕤️"}, {"tags": ["0", "10", "10:00", "clock", "o’clock", "ten"], "order": 3983, "emoji": "🕙️"}, {"tags": ["10", "10:30", "30", "clock", "ten", "thirty", "time"], "order": 3984, "emoji": "🕥️"}, {"tags": ["11", "11:00", "clock", "eleven", "o’clock", "time"], "order": 3985, "emoji": "🕚️"}, {"tags": ["11", "11:30", "30", "clock", "eleven", "thirty", "time"], "order": 3986, "emoji": "🕦️"}, {"tags": ["dark", "moon", "new", "space"], "order": 3987, "emoji": "🌑"}, {"tags": ["crescent", "dreams", "moon", "space", "waxing"], "order": 3988, "emoji": "🌒"}, {"tags": ["first", "moon", "quarter", "space"], "order": 3989, "emoji": "🌓"}, {"tags": ["gibbous", "moon", "space", "waxing"], "order": 3990, "emoji": "🌔"}, {"tags": ["full", "moon", "space"], "order": 3991, "emoji": "🌕️"}, {"tags": ["gibbous", "moon", "space", "waning"], "order": 3992, "emoji": "🌖"}, {"tags": ["last", "moon", "quarter", "space"], "order": 3993, "emoji": "🌗"}, {"tags": ["crescent", "moon", "space", "waning"], "order": 3994, "emoji": "🌘"}, {"tags": ["crescent", "moon", "ramadan", "space"], "order": 3995, "emoji": "🌙"}, {"tags": ["face", "moon", "new", "space"], "order": 3996, "emoji": "🌚"}, {"tags": ["face", "first", "moon", "quarter", "space"], "order": 3997, "emoji": "🌛"}, {"tags": ["dreams", "face", "last", "moon", "quarter"], "order": 3998, "emoji": "🌜️"}, {"tags": ["weather"], "order": 4000, "emoji": "🌡️"}, {"tags": ["bright", "rays", "space", "sunny", "weather"], "order": 4002, "emoji": "☀️"}, {"tags": ["bright", "face", "full", "moon"], "order": 4003, "emoji": "🌝"}, {"tags": ["beach", "bright", "day", "face", "heat", "shine", "sun", "sunny", "sunshine", "weather"], "order": 4004, "emoji": "🌞"}, {"tags": ["planet", "ringed", "saturn", "saturnine"], "order": 4005, "emoji": "🪐"}, {"tags": ["astronomy", "medium", "stars", "white"], "order": 4006, "emoji": "⭐️"}, {"tags": ["glittery", "glow", "glowing", "night", "shining", "sparkle", "star", "win"], "order": 4007, "emoji": "🌟"}, {"tags": ["falling", "night", "shooting", "space", "star"], "order": 4008, "emoji": "🌠"}, {"tags": ["milky", "space", "way"], "order": 4009, "emoji": "🌌"}, {"tags": ["weather"], "order": 4011, "emoji": "☁️"}, {"tags": ["behind", "cloud", "cloudy", "sun", "weather"], "order": 4012, "emoji": "⛅️"}, {"tags": ["cloud", "lightning", "rain", "thunder", "thunderstorm"], "order": 4014, "emoji": "⛈️"}, {"tags": ["behind", "cloud", "sun", "weather"], "order": 4016, "emoji": "🌤️"}, {"tags": ["behind", "cloud", "sun", "weather"], "order": 4018, "emoji": "🌥️"}, {"tags": ["behind", "cloud", "rain", "sun", "weather"], "order": 4020, "emoji": "🌦️"}, {"tags": ["cloud", "rain", "weather"], "order": 4022, "emoji": "🌧️"}, {"tags": ["cloud", "cold", "snow", "weather"], "order": 4024, "emoji": "🌨️"}, {"tags": ["cloud", "lightning", "weather"], "order": 4026, "emoji": "🌩️"}, {"tags": ["cloud", "weather", "whirlwind"], "order": 4028, "emoji": "🌪️"}, {"tags": ["cloud", "weather"], "order": 4030, "emoji": "🌫️"}, {"tags": ["blow", "cloud", "face", "wind"], "order": 4032, "emoji": "🌬️"}, {"tags": ["dizzy", "hurricane", "twister", "typhoon", "weather"], "order": 4033, "emoji": "🌀"}, {"tags": ["gay", "genderqueer", "glbt", "glbtq", "lesbian", "lgbt", "lgbtq", "lgbtqia", "nature", "pride", "queer", "rain", "trans", "transgender", "weather"], "order": 4034, "emoji": "🌈"}, {"tags": ["closed", "clothing", "rain", "umbrella"], "order": 4035, "emoji": "🌂"}, {"tags": ["clothing", "rain"], "order": 4037, "emoji": "☂️"}, {"tags": ["clothing", "drop", "drops", "rain", "umbrella", "weather"], "order": 4038, "emoji": "☔️"}, {"tags": ["ground", "rain", "sun", "umbrella"], "order": 4040, "emoji": "⛱️"}, {"tags": ["danger", "electric", "electricity", "high", "lightning", "nature", "thunder", "thunderbolt", "voltage", "zap"], "order": 4041, "emoji": "⚡️"}, {"tags": ["cold", "snow", "weather"], "order": 4043, "emoji": "❄️"}, {"tags": ["cold", "man", "snow"], "order": 4045, "emoji": "☃️"}, {"tags": ["cold", "man", "snow", "snowman"], "order": 4046, "emoji": "⛄️"}, {"tags": ["space"], "order": 4048, "emoji": "☄️"}, {"tags": ["af", "burn", "flame", "hot", "lit", "litaf", "tool"], "order": 4049, "emoji": "🔥"}, {"tags": ["cold", "comic", "drop", "nature", "sad", "sweat", "tear", "water", "weather"], "order": 4050, "emoji": "💧"}, {"tags": ["nature", "ocean", "surf", "surfer", "surfing", "water", "wave"], "order": 4051, "emoji": "🌊"}, {"tags": ["celebration", "halloween", "jack", "lantern", "pumpkin"], "order": 4052, "emoji": "🎃"}, {"tags": ["celebration", "christmas", "tree"], "order": 4053, "emoji": "🎄"}, {"tags": ["boom", "celebration", "entertainment", "yolo"], "order": 4054, "emoji": "🎆"}, {"tags": ["boom", "celebration", "fireworks", "sparkle"], "order": 4055, "emoji": "🎇"}, {"tags": ["dynamite", "explosive", "fire", "fireworks", "light", "pop", "popping", "spark"], "order": 4056, "emoji": "🧨"}, {"tags": ["*", "magic", "sparkle", "star"], "order": 4057, "emoji": "✨️"}, {"tags": ["birthday", "celebrate", "celebration"], "order": 4058, "emoji": "🎈"}, {"tags": ["awesome", "birthday", "celebrate", "celebration", "excited", "hooray", "party", "popper", "tada", "woohoo"], "order": 4059, "emoji": "🎉"}, {"tags": ["ball", "celebrate", "celebration", "confetti", "party", "woohoo"], "order": 4060, "emoji": "🎊"}, {"tags": ["banner", "celebration", "japanese", "tanabata", "tree"], "order": 4061, "emoji": "🎋"}, {"tags": ["bamboo", "celebration", "decoration", "japanese", "pine", "plant"], "order": 4062, "emoji": "🎍"}, {"tags": ["celebration", "doll", "dolls", "festival", "japanese"], "order": 4063, "emoji": "🎎"}, {"tags": ["carp", "celebration", "streamer"], "order": 4064, "emoji": "🎏"}, {"tags": ["bell", "celebration", "chime", "wind"], "order": 4065, "emoji": "🎐"}, {"tags": ["celebration", "ceremony", "moon", "viewing"], "order": 4066, "emoji": "🎑"}, {"tags": ["envelope", "gift", "good", "hóngbāo", "lai", "luck", "money", "red", "see"], "order": 4067, "emoji": "🧧"}, {"tags": ["celebration"], "order": 4068, "emoji": "🎀"}, {"tags": ["birthday", "bow", "box", "celebration", "christmas", "gift", "present", "surprise", "wrapped"], "order": 4069, "emoji": "🎁"}, {"tags": ["celebration", "reminder", "ribbon"], "order": 4071, "emoji": "🎗️"}, {"tags": ["admission", "ticket", "tickets"], "order": 4073, "emoji": "🎟️"}, {"tags": ["admission", "stub"], "order": 4074, "emoji": "🎫"}, {"tags": ["award", "celebration", "medal", "military"], "order": 4076, "emoji": "🎖️"}, {"tags": ["champion", "champs", "prize", "slay", "sport", "victory", "win", "winning"], "order": 4077, "emoji": "🏆️"}, {"tags": ["award", "gold", "medal", "sports", "winner"], "order": 4078, "emoji": "🏅"}, {"tags": ["1st", "first", "gold", "medal", "place"], "order": 4079, "emoji": "🥇"}, {"tags": ["2nd", "medal", "place", "second", "silver"], "order": 4080, "emoji": "🥈"}, {"tags": ["3rd", "bronze", "medal", "place", "third"], "order": 4081, "emoji": "🥉"}, {"tags": ["ball", "football", "futbol", "soccer", "sport"], "order": 4082, "emoji": "⚽️"}, {"tags": ["ball", "sport"], "order": 4083, "emoji": "⚾️"}, {"tags": ["ball", "glove", "sports", "underarm"], "order": 4084, "emoji": "🥎"}, {"tags": ["ball", "hoop", "sport"], "order": 4085, "emoji": "🏀"}, {"tags": ["ball", "game"], "order": 4086, "emoji": "🏐"}, {"tags": ["american", "ball", "bowl", "football", "sport", "super"], "order": 4087, "emoji": "🏈"}, {"tags": ["ball", "football", "rugby", "sport"], "order": 4088, "emoji": "🏉"}, {"tags": ["ball", "racquet", "sport"], "order": 4089, "emoji": "🎾"}, {"tags": ["disc", "flying", "ultimate"], "order": 4090, "emoji": "🥏"}, {"tags": ["ball", "game", "sport", "strike"], "order": 4091, "emoji": "🎳"}, {"tags": ["ball", "bat", "cricket", "game"], "order": 4092, "emoji": "🏏"}, {"tags": ["ball", "field", "game", "hockey", "stick"], "order": 4093, "emoji": "🏑"}, {"tags": ["game", "hockey", "ice", "puck", "stick"], "order": 4094, "emoji": "🏒"}, {"tags": ["ball", "goal", "sports", "stick"], "order": 4095, "emoji": "🥍"}, {"tags": ["ball", "bat", "game", "paddle", "ping", "pingpong", "pong", "table", "tennis"], "order": 4096, "emoji": "🏓"}, {"tags": ["birdie", "game", "racquet", "shuttlecock"], "order": 4097, "emoji": "🏸"}, {"tags": ["boxing", "glove"], "order": 4098, "emoji": "🥊"}, {"tags": ["arts", "judo", "karate", "martial", "taekwondo", "uniform"], "order": 4099, "emoji": "🥋"}, {"tags": ["goal", "net"], "order": 4100, "emoji": "🥅"}, {"tags": ["flag", "golf", "hole", "sport"], "order": 4101, "emoji": "⛳️"}, {"tags": ["ice", "skate", "skating"], "order": 4103, "emoji": "⛸️"}, {"tags": ["entertainment", "fish", "fishing", "pole", "sport"], "order": 4104, "emoji": "🎣"}, {"tags": ["diving", "mask", "scuba", "snorkeling"], "order": 4105, "emoji": "🤿"}, {"tags": ["athletics", "running", "sash", "shirt"], "order": 4106, "emoji": "🎽"}, {"tags": ["ski", "snow", "sport"], "order": 4107, "emoji": "🎿"}, {"tags": ["luge", "sledge", "sleigh", "snow", "toboggan"], "order": 4108, "emoji": "🛷"}, {"tags": ["curling", "game", "rock", "stone"], "order": 4109, "emoji": "🥌"}, {"tags": ["bull", "dart", "direct", "entertainment", "game", "hit", "target"], "order": 4110, "emoji": "🎯"}, {"tags": ["fluctuate", "toy"], "order": 4111, "emoji": "🪀"}, {"tags": ["fly", "soar"], "order": 4112, "emoji": "🪁"}, {"tags": ["gun", "handgun", "pistol", "revolver", "tool", "water", "weapon"], "order": 4113, "emoji": "🔫"}, {"tags": ["8", "8ball", "ball", "billiard", "eight", "game", "pool"], "order": 4114, "emoji": "🎱"}, {"tags": ["ball", "crystal", "fairy", "fairytale", "fantasy", "fortune", "future", "magic", "tale", "tool"], "order": 4115, "emoji": "🔮"}, {"tags": ["magic", "magician", "wand", "witch", "wizard"], "order": 4116, "emoji": "🪄"}, {"tags": ["controller", "entertainment", "game", "video"], "order": 4117, "emoji": "🎮️"}, {"tags": ["game", "video", "videogame"], "order": 4119, "emoji": "🕹️"}, {"tags": ["casino", "gamble", "gambling", "game", "machine", "slot", "slots"], "order": 4120, "emoji": "🎰"}, {"tags": ["dice", "die", "entertainment", "game"], "order": 4121, "emoji": "🎲"}, {"tags": ["clue", "interlocking", "jigsaw", "piece", "puzzle"], "order": 4122, "emoji": "🧩"}, {"tags": ["bear", "plaything", "plush", "stuffed", "teddy", "toy"], "order": 4123, "emoji": "🧸"}, {"tags": ["candy", "celebrate", "celebration", "cinco", "de", "festive", "mayo", "party", "pinada", "pinata"], "order": 4124, "emoji": "🪅"}, {"tags": ["ball", "dance", "disco", "glitter", "mirror", "party"], "order": 4125, "emoji": "🪩"}, {"tags": ["babooshka", "baboushka", "babushka", "doll", "dolls", "matryoshka", "nesting", "russia"], "order": 4126, "emoji": "🪆"}, {"tags": ["card", "game", "spade", "suit"], "order": 4128, "emoji": "♠️"}, {"tags": ["card", "emotion", "game", "heart", "hearts", "suit"], "order": 4130, "emoji": "♥️"}, {"tags": ["card", "diamond", "game", "suit"], "order": 4132, "emoji": "♦️"}, {"tags": ["card", "club", "clubs", "game", "suit"], "order": 4134, "emoji": "♣️"}, {"tags": ["chess", "dupe", "expendable", "pawn"], "order": 4136, "emoji": "♟️"}, {"tags": ["card", "game", "wildcard"], "order": 4137, "emoji": "🃏"}, {"tags": ["dragon", "game", "mahjong", "red"], "order": 4138, "emoji": "🀄️"}, {"tags": ["card", "cards", "flower", "game", "japanese", "playing"], "order": 4139, "emoji": "🎴"}, {"tags": ["actor", "actress", "art", "arts", "entertainment", "mask", "performing", "theater", "theatre", "thespian"], "order": 4140, "emoji": "🎭️"}, {"tags": ["art", "frame", "framed", "museum", "painting", "picture"], "order": 4142, "emoji": "🖼️"}, {"tags": ["art", "artist", "artsy", "arty", "colorful", "creative", "entertainment", "museum", "painter", "painting", "palette"], "order": 4143, "emoji": "🎨"}, {"tags": ["needle", "sewing", "spool", "string"], "order": 4144, "emoji": "🧵"}, {"tags": ["embroidery", "needle", "sew", "sewing", "stitches", "sutures", "tailoring", "thread"], "order": 4145, "emoji": "🪡"}, {"tags": ["ball", "crochet", "knit"], "order": 4146, "emoji": "🧶"}, {"tags": ["cord", "rope", "tangled", "tie", "twine", "twist"], "order": 4147, "emoji": "🪢"}, {"tags": ["clothing", "eye", "eyeglasses", "eyewear"], "order": 4148, "emoji": "👓️"}, {"tags": ["dark", "eye", "eyewear", "glasses"], "order": 4150, "emoji": "🕶️"}, {"tags": ["dive", "eye", "protection", "scuba", "swimming", "welding"], "order": 4151, "emoji": "🥽"}, {"tags": ["clothes", "coat", "doctor", "dr", "experiment", "jacket", "lab", "scientist", "white"], "order": 4152, "emoji": "🥼"}, {"tags": ["emergency", "safety", "vest"], "order": 4153, "emoji": "🦺"}, {"tags": ["clothing", "employed", "serious", "shirt", "tie"], "order": 4154, "emoji": "👔"}, {"tags": ["blue", "casual", "clothes", "clothing", "collar", "dressed", "shirt", "shopping", "tshirt", "weekend"], "order": 4155, "emoji": "👕"}, {"tags": ["blue", "casual", "clothes", "clothing", "denim", "dressed", "pants", "shopping", "trousers", "weekend"], "order": 4156, "emoji": "👖"}, {"tags": ["bundle", "cold", "neck", "up"], "order": 4157, "emoji": "🧣"}, {"tags": ["hand"], "order": 4158, "emoji": "🧤"}, {"tags": ["brr", "bundle", "cold", "jacket", "up"], "order": 4159, "emoji": "🧥"}, {"tags": ["stocking"], "order": 4160, "emoji": "🧦"}, {"tags": ["clothes", "clothing", "dressed", "fancy", "shopping"], "order": 4161, "emoji": "👗"}, {"tags": ["clothing", "comfortable"], "order": 4162, "emoji": "👘"}, {"tags": ["clothing", "dress"], "order": 4163, "emoji": "🥻"}, {"tags": ["bathing", "one-piece", "suit", "swimsuit"], "order": 4164, "emoji": "🩱"}, {"tags": ["bathing", "one-piece", "suit", "swimsuit", "underwear"], "order": 4165, "emoji": "🩲"}, {"tags": ["bathing", "pants", "suit", "swimsuit", "underwear"], "order": 4166, "emoji": "🩳"}, {"tags": ["bathing", "beach", "clothing", "pool", "suit", "swim"], "order": 4167, "emoji": "👙"}, {"tags": ["blouse", "clothes", "clothing", "collar", "dress", "dressed", "lady", "shirt", "shopping", "woman", "woman’s"], "order": 4168, "emoji": "👚"}, {"tags": ["clack", "clap", "cool", "cooling", "dance", "fan", "flirt", "flutter", "folding", "hand", "hot", "shy"], "order": 4169, "emoji": "🪭"}, {"tags": ["clothes", "clothing", "coin", "dress", "fancy", "handbag", "shopping"], "order": 4170, "emoji": "👛"}, {"tags": ["bag", "clothes", "clothing", "dress", "lady", "purse", "shopping"], "order": 4171, "emoji": "👜"}, {"tags": ["bag", "clothes", "clothing", "clutch", "dress", "handbag", "pouch", "purse"], "order": 4172, "emoji": "👝"}, {"tags": ["bag", "bags", "hotel", "shopping"], "order": 4174, "emoji": "🛍️"}, {"tags": ["backpacking", "bag", "bookbag", "education", "rucksack", "satchel", "school"], "order": 4175, "emoji": "🎒"}, {"tags": ["beach", "flip", "flop", "sandal", "sandals", "shoe", "thong", "thongs", "zōri"], "order": 4176, "emoji": "🩴"}, {"tags": ["brown", "clothes", "clothing", "feet", "foot", "kick", "man", "man’s", "shoe", "shoes", "shopping"], "order": 4177, "emoji": "👞"}, {"tags": ["athletic", "clothes", "clothing", "fast", "kick", "running", "shoe", "shoes", "shopping", "sneaker", "tennis"], "order": 4178, "emoji": "👟"}, {"tags": ["backpacking", "boot", "brown", "camping", "hiking", "outdoors", "shoe"], "order": 4179, "emoji": "🥾"}, {"tags": ["ballet", "comfy", "flat", "flats", "shoe", "slip-on", "slipper"], "order": 4180, "emoji": "🥿"}, {"tags": ["clothes", "clothing", "dress", "fashion", "heel", "heels", "high-heeled", "shoe", "shoes", "shopping", "stiletto", "woman"], "order": 4181, "emoji": "👠"}, {"tags": ["clothing", "sandal", "shoe", "woman", "woman’s"], "order": 4182, "emoji": "👡"}, {"tags": ["ballet", "dance", "shoes"], "order": 4183, "emoji": "🩰"}, {"tags": ["boot", "clothes", "clothing", "dress", "shoe", "shoes", "shopping", "woman", "woman’s"], "order": 4184, "emoji": "👢"}, {"tags": ["afro", "comb", "groom", "hair", "pick"], "order": 4185, "emoji": "🪮"}, {"tags": ["clothing", "family", "king", "medieval", "queen", "royal", "royalty", "win"], "order": 4186, "emoji": "👑"}, {"tags": ["clothes", "clothing", "garden", "hat", "hats", "party", "woman", "woman’s"], "order": 4187, "emoji": "👒"}, {"tags": ["clothes", "clothing", "fancy", "formal", "hat", "magic", "top", "tophat"], "order": 4188, "emoji": "🎩"}, {"tags": ["cap", "celebration", "clothing", "education", "graduation", "hat", "scholar"], "order": 4189, "emoji": "🎓️"}, {"tags": ["baseball", "bent", "billed", "cap", "dad", "hat"], "order": 4190, "emoji": "🧢"}, {"tags": ["army", "helmet", "military", "soldier", "war", "warrior"], "order": 4191, "emoji": "🪖"}, {"tags": ["aid", "cross", "face", "hat", "helmet", "rescue", "worker’s"], "order": 4193, "emoji": "⛑️"}, {"tags": ["beads", "clothing", "necklace", "prayer", "religion"], "order": 4194, "emoji": "📿"}, {"tags": ["cosmetics", "date", "makeup"], "order": 4195, "emoji": "💄"}, {"tags": ["diamond", "engaged", "engagement", "married", "romance", "shiny", "sparkling", "wedding"], "order": 4196, "emoji": "💍"}, {"tags": ["diamond", "engagement", "gem", "jewel", "money", "romance", "stone", "wedding"], "order": 4197, "emoji": "💎"}, {"tags": ["mute", "muted", "quiet", "silent", "sound", "speaker"], "order": 4198, "emoji": "🔇"}, {"tags": ["low", "soft", "sound", "speaker", "volume"], "order": 4199, "emoji": "🔈️"}, {"tags": ["medium", "sound", "speaker", "volume"], "order": 4200, "emoji": "🔉"}, {"tags": ["high", "loud", "music", "sound", "speaker", "volume"], "order": 4201, "emoji": "🔊"}, {"tags": ["address", "communication", "loud", "public", "sound"], "order": 4202, "emoji": "📢"}, {"tags": ["cheering", "sound"], "order": 4203, "emoji": "📣"}, {"tags": ["horn", "post", "postal"], "order": 4204, "emoji": "📯"}, {"tags": ["break", "church", "sound"], "order": 4205, "emoji": "🔔"}, {"tags": ["bell", "forbidden", "mute", "no", "not", "prohibited", "quiet", "silent", "slash", "sound"], "order": 4206, "emoji": "🔕"}, {"tags": ["music", "musical", "note", "score"], "order": 4207, "emoji": "🎼"}, {"tags": ["music", "musical", "note", "sound"], "order": 4208, "emoji": "🎵"}, {"tags": ["music", "musical", "note", "notes", "sound"], "order": 4209, "emoji": "🎶"}, {"tags": ["mic", "microphone", "music", "studio"], "order": 4211, "emoji": "🎙️"}, {"tags": ["level", "music", "slider"], "order": 4213, "emoji": "🎚️"}, {"tags": ["control", "knobs", "music"], "order": 4215, "emoji": "🎛️"}, {"tags": ["karaoke", "mic", "music", "sing", "sound"], "order": 4216, "emoji": "🎤"}, {"tags": ["earbud", "sound"], "order": 4217, "emoji": "🎧️"}, {"tags": ["entertainment", "tbt", "video"], "order": 4218, "emoji": "📻️"}, {"tags": ["instrument", "music", "sax"], "order": 4219, "emoji": "🎷"}, {"tags": ["box", "concertina", "instrument", "music", "squeeze", "squeezebox"], "order": 4220, "emoji": "🪗"}, {"tags": ["instrument", "music", "strat"], "order": 4221, "emoji": "🎸"}, {"tags": ["instrument", "keyboard", "music", "musical", "piano"], "order": 4222, "emoji": "🎹"}, {"tags": ["instrument", "music"], "order": 4223, "emoji": "🎺"}, {"tags": ["instrument", "music"], "order": 4224, "emoji": "🎻"}, {"tags": ["music", "stringed"], "order": 4225, "emoji": "🪕"}, {"tags": ["drumsticks", "music"], "order": 4226, "emoji": "🥁"}, {"tags": ["beat", "conga", "drum", "instrument", "long", "rhythm"], "order": 4227, "emoji": "🪘"}, {"tags": ["cha", "dance", "instrument", "music", "party", "percussion", "rattle", "shake", "shaker"], "order": 4228, "emoji": "🪇"}, {"tags": ["band", "fife", "flautist", "instrument", "marching", "music", "orchestra", "piccolo", "pipe", "recorder", "woodwind"], "order": 4229, "emoji": "🪈"}, {"tags": ["cupid", "instrument", "love", "music", "orchestra"], "order": 4230, "emoji": "🪉"}, {"tags": ["cell", "communication", "mobile", "phone", "telephone"], "order": 4231, "emoji": "📱"}, {"tags": ["arrow", "build", "call", "cell", "communication", "mobile", "phone", "receive", "telephone"], "order": 4232, "emoji": "📲"}, {"tags": ["phone"], "order": 4234, "emoji": "☎️"}, {"tags": ["communication", "phone", "receiver", "telephone", "voip"], "order": 4235, "emoji": "📞"}, {"tags": ["communication"], "order": 4236, "emoji": "📟️"}, {"tags": ["communication", "fax", "machine"], "order": 4237, "emoji": "📠"}, {"tags": ["battery"], "order": 4238, "emoji": "🔋"}, {"tags": ["battery", "drained", "electronic", "energy", "low", "power"], "order": 4239, "emoji": "🪫"}, {"tags": ["electric", "electricity", "plug"], "order": 4240, "emoji": "🔌"}, {"tags": ["computer", "office", "pc", "personal"], "order": 4241, "emoji": "💻️"}, {"tags": ["computer", "desktop", "monitor"], "order": 4243, "emoji": "🖥️"}, {"tags": ["computer"], "order": 4245, "emoji": "🖨️"}, {"tags": ["computer"], "order": 4247, "emoji": "⌨️"}, {"tags": ["computer", "mouse"], "order": 4249, "emoji": "🖱️"}, {"tags": ["computer"], "order": 4251, "emoji": "🖲️"}, {"tags": ["computer", "disk", "minidisk", "optical"], "order": 4252, "emoji": "💽"}, {"tags": ["computer", "disk", "floppy"], "order": 4253, "emoji": "💾"}, {"tags": ["blu-ray", "cd", "computer", "disk", "dvd", "optical"], "order": 4254, "emoji": "💿️"}, {"tags": ["blu-ray", "cd", "computer", "disk", "optical"], "order": 4255, "emoji": "📀"}, {"tags": ["calculation", "calculator"], "order": 4256, "emoji": "🧮"}, {"tags": ["bollywood", "camera", "cinema", "film", "hollywood", "movie", "record"], "order": 4257, "emoji": "🎥"}, {"tags": ["cinema", "film", "frames", "movie"], "order": 4259, "emoji": "🎞️"}, {"tags": ["cinema", "film", "movie", "projector", "video"], "order": 4261, "emoji": "📽️"}, {"tags": ["action", "board", "clapper", "movie"], "order": 4262, "emoji": "🎬️"}, {"tags": ["tv", "video"], "order": 4263, "emoji": "📺️"}, {"tags": ["photo", "selfie", "snap", "tbt", "trip", "video"], "order": 4264, "emoji": "📷️"}, {"tags": ["camera", "flash", "video"], "order": 4265, "emoji": "📸"}, {"tags": ["camcorder", "camera", "tbt", "video"], "order": 4266, "emoji": "📹️"}, {"tags": ["old", "school", "tape", "vcr", "vhs", "video"], "order": 4267, "emoji": "📼"}, {"tags": ["glass", "lab", "left", "left-pointing", "magnifying", "science", "search", "tilted", "tool"], "order": 4268, "emoji": "🔍️"}, {"tags": ["contact", "glass", "lab", "magnifying", "right", "right-pointing", "science", "search", "tilted", "tool"], "order": 4269, "emoji": "🔎"}, {"tags": ["light"], "order": 4271, "emoji": "🕯️"}, {"tags": ["bulb", "comic", "electric", "idea", "light"], "order": 4272, "emoji": "💡"}, {"tags": ["electric", "light", "tool", "torch"], "order": 4273, "emoji": "🔦"}, {"tags": ["bar", "lantern", "light", "paper", "red", "restaurant"], "order": 4274, "emoji": "🏮"}, {"tags": ["diya", "lamp", "light", "oil"], "order": 4275, "emoji": "🪔"}, {"tags": ["book", "cover", "decorated", "decorative", "education", "notebook", "school", "writing"], "order": 4276, "emoji": "📔"}, {"tags": ["book", "closed", "education"], "order": 4277, "emoji": "📕"}, {"tags": ["book", "education", "fantasy", "knowledge", "library", "novels", "open", "reading"], "order": 4278, "emoji": "📖"}, {"tags": ["book", "education", "fantasy", "green", "library", "reading"], "order": 4279, "emoji": "📗"}, {"tags": ["blue", "book", "education", "fantasy", "library", "reading"], "order": 4280, "emoji": "📘"}, {"tags": ["book", "education", "fantasy", "library", "orange", "reading"], "order": 4281, "emoji": "📙"}, {"tags": ["book", "education", "fantasy", "knowledge", "library", "novels", "reading", "school", "study"], "order": 4282, "emoji": "📚️"}, {"tags": ["notebook"], "order": 4283, "emoji": "📓"}, {"tags": ["notebook"], "order": 4284, "emoji": "📒"}, {"tags": ["curl", "document", "page", "paper"], "order": 4285, "emoji": "📃"}, {"tags": ["paper"], "order": 4286, "emoji": "📜"}, {"tags": ["document", "facing", "page", "paper", "up"], "order": 4287, "emoji": "📄"}, {"tags": ["communication", "news", "paper"], "order": 4288, "emoji": "📰"}, {"tags": ["news", "newspaper", "paper", "rolled", "rolled-up"], "order": 4290, "emoji": "🗞️"}, {"tags": ["bookmark", "mark", "marker", "tabs"], "order": 4291, "emoji": "📑"}, {"tags": ["mark"], "order": 4292, "emoji": "🔖"}, {"tags": ["tag"], "order": 4294, "emoji": "🏷️"}, {"tags": ["bag", "bank", "bet", "billion", "cash", "cost", "dollar", "gold", "million", "money", "moneybag", "paid", "paying", "pot", "rich", "win"], "order": 4295, "emoji": "💰️"}, {"tags": ["dollar", "euro", "gold", "metal", "money", "rich", "silver", "treasure"], "order": 4296, "emoji": "🪙"}, {"tags": ["bank", "banknote", "bill", "currency", "money", "note", "yen"], "order": 4297, "emoji": "💴"}, {"tags": ["bank", "banknote", "bill", "currency", "dollar", "money", "note"], "order": 4298, "emoji": "💵"}, {"tags": ["100", "bank", "banknote", "bill", "currency", "euro", "money", "note", "rich"], "order": 4299, "emoji": "💶"}, {"tags": ["bank", "banknote", "bill", "billion", "cash", "currency", "money", "note", "pound", "pounds"], "order": 4300, "emoji": "💷"}, {"tags": ["bank", "banknote", "bill", "billion", "cash", "dollar", "fly", "million", "money", "note", "pay", "wings"], "order": 4301, "emoji": "💸"}, {"tags": ["bank", "card", "cash", "charge", "credit", "money", "pay"], "order": 4302, "emoji": "💳️"}, {"tags": ["accounting", "bookkeeping", "evidence", "invoice", "proof"], "order": 4303, "emoji": "🧾"}, {"tags": ["bank", "chart", "currency", "graph", "growth", "increasing", "market", "money", "rise", "trend", "upward", "yen"], "order": 4304, "emoji": "💹"}, {"tags": ["e-mail", "email", "letter"], "order": 4306, "emoji": "✉️"}, {"tags": ["email", "letter", "mail"], "order": 4307, "emoji": "📧"}, {"tags": ["delivering", "e-mail", "email", "envelope", "incoming", "letter", "mail", "receive", "sent"], "order": 4308, "emoji": "📨"}, {"tags": ["arrow", "communication", "down", "e-mail", "email", "envelope", "letter", "mail", "outgoing", "send", "sent"], "order": 4309, "emoji": "📩"}, {"tags": ["box", "email", "letter", "mail", "outbox", "sent", "tray"], "order": 4310, "emoji": "📤️"}, {"tags": ["box", "email", "inbox", "letter", "mail", "receive", "tray", "zero"], "order": 4311, "emoji": "📥️"}, {"tags": ["box", "communication", "delivery", "parcel", "shipping"], "order": 4312, "emoji": "📦️"}, {"tags": ["closed", "communication", "flag", "mail", "mailbox", "postbox", "raised"], "order": 4313, "emoji": "📫️"}, {"tags": ["closed", "flag", "lowered", "mail", "mailbox", "postbox"], "order": 4314, "emoji": "📪️"}, {"tags": ["flag", "mail", "mailbox", "open", "postbox", "raised"], "order": 4315, "emoji": "📬️"}, {"tags": ["flag", "lowered", "mail", "mailbox", "open", "postbox"], "order": 4316, "emoji": "📭️"}, {"tags": ["mail", "mailbox"], "order": 4317, "emoji": "📮"}, {"tags": ["ballot", "box"], "order": 4319, "emoji": "🗳️"}, {"tags": ["pencil"], "order": 4321, "emoji": "✏️"}, {"tags": ["black", "nib", "pen"], "order": 4323, "emoji": "✒️"}, {"tags": ["fountain", "pen"], "order": 4325, "emoji": "🖋️"}, {"tags": ["ballpoint"], "order": 4327, "emoji": "🖊️"}, {"tags": ["painting"], "order": 4329, "emoji": "🖌️"}, {"tags": ["crayon"], "order": 4331, "emoji": "🖍️"}, {"tags": ["communication", "media", "notes", "pencil"], "order": 4332, "emoji": "📝"}, {"tags": ["office"], "order": 4333, "emoji": "💼"}, {"tags": ["file", "folder"], "order": 4334, "emoji": "📁"}, {"tags": ["file", "folder", "open"], "order": 4335, "emoji": "📂"}, {"tags": ["card", "dividers", "index"], "order": 4337, "emoji": "🗂️"}, {"tags": ["date"], "order": 4338, "emoji": "📅"}, {"tags": ["calendar", "tear-off"], "order": 4339, "emoji": "📆"}, {"tags": ["note", "notepad", "pad", "spiral"], "order": 4341, "emoji": "🗒️"}, {"tags": ["calendar", "pad", "spiral"], "order": 4343, "emoji": "🗓️"}, {"tags": ["card", "index", "old", "rolodex", "school"], "order": 4344, "emoji": "📇"}, {"tags": ["chart", "data", "graph", "growth", "increasing", "right", "trend", "up", "upward"], "order": 4345, "emoji": "📈"}, {"tags": ["chart", "data", "decreasing", "down", "downward", "graph", "negative", "trend"], "order": 4346, "emoji": "📉"}, {"tags": ["bar", "chart", "data", "graph"], "order": 4347, "emoji": "📊"}, {"tags": ["do", "list", "notes"], "order": 4348, "emoji": "📋️"}, {"tags": ["collage", "pin"], "order": 4349, "emoji": "📌"}, {"tags": ["location", "map", "pin", "pushpin", "round"], "order": 4350, "emoji": "📍"}, {"tags": ["paperclip"], "order": 4351, "emoji": "📎"}, {"tags": ["link", "linked", "paperclip", "paperclips"], "order": 4353, "emoji": "🖇️"}, {"tags": ["angle", "edge", "math", "ruler", "straight", "straightedge"], "order": 4354, "emoji": "📏"}, {"tags": ["angle", "math", "rule", "ruler", "set", "slide", "triangle", "triangular"], "order": 4355, "emoji": "📐"}, {"tags": ["cut", "cutting", "paper", "tool"], "order": 4357, "emoji": "✂️"}, {"tags": ["box", "card", "file"], "order": 4359, "emoji": "🗃️"}, {"tags": ["cabinet", "file", "filing", "paper"], "order": 4361, "emoji": "🗄️"}, {"tags": ["can", "garbage", "trash", "waste"], "order": 4363, "emoji": "🗑️"}, {"tags": ["closed", "lock", "private"], "order": 4364, "emoji": "🔒️"}, {"tags": ["cracked", "lock", "open", "unlock"], "order": 4365, "emoji": "🔓️"}, {"tags": ["ink", "lock", "locked", "nib", "pen", "privacy"], "order": 4366, "emoji": "🔏"}, {"tags": ["bike", "closed", "key", "lock", "locked", "secure"], "order": 4367, "emoji": "🔐"}, {"tags": ["keys", "lock", "major", "password", "unlock"], "order": 4368, "emoji": "🔑"}, {"tags": ["clue", "key", "lock", "old"], "order": 4370, "emoji": "🗝️"}, {"tags": ["home", "improvement", "repairs", "tool"], "order": 4371, "emoji": "🔨"}, {"tags": ["ax", "chop", "hatchet", "split", "wood"], "order": 4372, "emoji": "🪓"}, {"tags": ["hammer", "mining", "tool"], "order": 4374, "emoji": "⛏️"}, {"tags": ["hammer", "pick", "tool"], "order": 4376, "emoji": "⚒️"}, {"tags": ["hammer", "spanner", "tool", "wrench"], "order": 4378, "emoji": "🛠️"}, {"tags": ["knife", "weapon"], "order": 4380, "emoji": "🗡️"}, {"tags": ["crossed", "swords", "weapon"], "order": 4382, "emoji": "⚔️"}, {"tags": ["boom", "comic", "dangerous", "explosion", "hot"], "order": 4383, "emoji": "💣️"}, {"tags": ["rebound", "repercussion", "weapon"], "order": 4384, "emoji": "🪃"}, {"tags": ["archer", "archery", "arrow", "bow", "sagittarius", "tool", "weapon", "zodiac"], "order": 4385, "emoji": "🏹"}, {"tags": ["weapon"], "order": 4387, "emoji": "🛡️"}, {"tags": ["carpenter", "carpentry", "cut", "lumber", "saw", "tool", "trim"], "order": 4388, "emoji": "🪚"}, {"tags": ["home", "improvement", "spanner", "tool"], "order": 4389, "emoji": "🔧"}, {"tags": ["flathead", "handy", "screw", "tool"], "order": 4390, "emoji": "🪛"}, {"tags": ["bolt", "home", "improvement", "nut", "tool"], "order": 4391, "emoji": "🔩"}, {"tags": ["cog", "cogwheel", "tool"], "order": 4393, "emoji": "⚙️"}, {"tags": ["compress", "tool", "vice"], "order": 4395, "emoji": "🗜️"}, {"tags": ["balance", "justice", "libra", "scale", "scales", "tool", "weight", "zodiac"], "order": 4397, "emoji": "⚖️"}, {"tags": ["accessibility", "blind", "cane", "probing", "white"], "order": 4398, "emoji": "🦯"}, {"tags": ["links"], "order": 4399, "emoji": "🔗"}, {"tags": ["break", "breaking", "broken", "chain", "cuffs", "freedom"], "order": 4400, "emoji": "⛓️‍💥"}, {"tags": ["chain"], "order": 4403, "emoji": "⛓️"}, {"tags": ["catch", "crook", "curve", "ensnare", "point", "selling"], "order": 4404, "emoji": "🪝"}, {"tags": ["box", "chest", "mechanic", "red", "tool"], "order": 4405, "emoji": "🧰"}, {"tags": ["attraction", "horseshoe", "magnetic", "negative", "positive", "shape", "u"], "order": 4406, "emoji": "🧲"}, {"tags": ["climb", "rung", "step"], "order": 4407, "emoji": "🪜"}, {"tags": ["bury", "dig", "garden", "hole", "plant", "scoop", "snow", "spade"], "order": 4408, "emoji": "🪏"}, {"tags": ["chemistry", "tool"], "order": 4410, "emoji": "⚗️"}, {"tags": ["chemist", "chemistry", "experiment", "lab", "science", "test", "tube"], "order": 4411, "emoji": "🧪"}, {"tags": ["bacteria", "biologist", "biology", "culture", "dish", "lab", "petri"], "order": 4412, "emoji": "🧫"}, {"tags": ["biologist", "evolution", "gene", "genetics", "life"], "order": 4413, "emoji": "🧬"}, {"tags": ["experiment", "lab", "science", "tool"], "order": 4414, "emoji": "🔬"}, {"tags": ["contact", "extraterrestrial", "science", "tool"], "order": 4415, "emoji": "🔭"}, {"tags": ["aliens", "antenna", "contact", "dish", "satellite", "science"], "order": 4416, "emoji": "📡"}, {"tags": ["doctor", "flu", "medicine", "needle", "shot", "sick", "tool", "vaccination"], "order": 4417, "emoji": "💉"}, {"tags": ["bleed", "blood", "donation", "drop", "injury", "medicine", "menstruation"], "order": 4418, "emoji": "🩸"}, {"tags": ["doctor", "drugs", "medicated", "medicine", "pills", "sick", "vitamin"], "order": 4419, "emoji": "💊"}, {"tags": ["adhesive", "bandage"], "order": 4420, "emoji": "🩹"}, {"tags": ["aid", "cane", "disability", "help", "hurt", "injured", "mobility", "stick"], "order": 4421, "emoji": "🩼"}, {"tags": ["doctor", "heart", "medicine"], "order": 4422, "emoji": "🩺"}, {"tags": ["bones", "doctor", "medical", "skeleton", "skull", "xray"], "order": 4423, "emoji": "🩻"}, {"tags": ["back", "closet", "front"], "order": 4424, "emoji": "🚪"}, {"tags": ["accessibility", "hoist", "lift"], "order": 4425, "emoji": "🛗"}, {"tags": ["makeup", "reflection", "reflector", "speculum"], "order": 4426, "emoji": "🪞"}, {"tags": ["air", "frame", "fresh", "opening", "transparent", "view"], "order": 4427, "emoji": "🪟"}, {"tags": ["hotel", "sleep"], "order": 4429, "emoji": "🛏️"}, {"tags": ["couch", "hotel", "lamp"], "order": 4431, "emoji": "🛋️"}, {"tags": ["seat", "sit"], "order": 4432, "emoji": "🪑"}, {"tags": ["bathroom"], "order": 4433, "emoji": "🚽"}, {"tags": ["cup", "force", "plumber", "poop", "suction", "toilet"], "order": 4434, "emoji": "🪠"}, {"tags": ["water"], "order": 4435, "emoji": "🚿"}, {"tags": ["bath"], "order": 4436, "emoji": "🛁"}, {"tags": ["bait", "cheese", "lure", "mouse", "mousetrap", "snare", "trap"], "order": 4437, "emoji": "🪤"}, {"tags": ["sharp", "shave"], "order": 4438, "emoji": "🪒"}, {"tags": ["bottle", "lotion", "moisturizer", "shampoo", "sunscreen"], "order": 4439, "emoji": "🧴"}, {"tags": ["diaper", "pin", "punk", "rock", "safety"], "order": 4440, "emoji": "🧷"}, {"tags": ["cleaning", "sweeping", "witch"], "order": 4441, "emoji": "🧹"}, {"tags": ["farming", "laundry", "picnic"], "order": 4442, "emoji": "🧺"}, {"tags": ["paper", "roll", "toilet", "towels"], "order": 4443, "emoji": "🧻"}, {"tags": ["cask", "pail", "vat"], "order": 4444, "emoji": "🪣"}, {"tags": ["bar", "bathing", "clean", "cleaning", "lather", "soapdish"], "order": 4445, "emoji": "🧼"}, {"tags": ["bubble", "burp", "clean", "floating", "pearl", "soap", "underwater"], "order": 4446, "emoji": "🫧"}, {"tags": ["bathroom", "brush", "clean", "dental", "hygiene", "teeth", "toiletry"], "order": 4447, "emoji": "🪥"}, {"tags": ["absorbing", "cleaning", "porous", "soak"], "order": 4448, "emoji": "🧽"}, {"tags": ["extinguish", "extinguisher", "fire", "quench"], "order": 4449, "emoji": "🧯"}, {"tags": ["cart", "shopping", "trolley"], "order": 4450, "emoji": "🛒"}, {"tags": ["smoking"], "order": 4451, "emoji": "🚬"}, {"tags": ["dead", "death", "vampire"], "order": 4453, "emoji": "⚰️"}, {"tags": ["cemetery", "dead", "grave", "graveyard", "memorial", "rip", "tomb", "tombstone"], "order": 4454, "emoji": "🪦"}, {"tags": ["ashes", "death", "funeral", "urn"], "order": 4456, "emoji": "⚱️"}, {"tags": ["amulet", "bead", "blue", "charm", "evil-eye", "nazar", "talisman"], "order": 4457, "emoji": "🧿"}, {"tags": ["amulet", "fatima", "fortune", "guide", "hand", "mary", "miriam", "palm", "protect", "protection"], "order": 4458, "emoji": "🪬"}, {"tags": ["face", "moyai", "statue", "stoneface", "travel"], "order": 4459, "emoji": "🗿"}, {"tags": ["card", "demonstration", "notice", "picket", "plaque", "protest", "sign"], "order": 4460, "emoji": "🪧"}, {"tags": ["card", "credentials", "document", "id", "identification", "license", "security"], "order": 4461, "emoji": "🪪"}, {"tags": ["atm", "automated", "bank", "cash", "money", "sign", "teller"], "order": 4462, "emoji": "🏧"}, {"tags": ["bin", "litter", "litterbin", "sign"], "order": 4463, "emoji": "🚮"}, {"tags": ["drinking", "potable", "water"], "order": 4464, "emoji": "🚰"}, {"tags": ["access", "handicap", "symbol", "wheelchair"], "order": 4465, "emoji": "♿️"}, {"tags": ["bathroom", "lavatory", "man", "men’s", "restroom", "room", "toilet", "wc"], "order": 4466, "emoji": "🚹️"}, {"tags": ["bathroom", "lavatory", "restroom", "room", "toilet", "wc", "woman", "women’s"], "order": 4467, "emoji": "🚺️"}, {"tags": ["bathroom", "lavatory", "toilet", "wc"], "order": 4468, "emoji": "🚻"}, {"tags": ["baby", "changing", "symbol"], "order": 4469, "emoji": "🚼️"}, {"tags": ["bathroom", "closet", "lavatory", "restroom", "toilet", "water", "wc"], "order": 4470, "emoji": "🚾"}, {"tags": ["control", "passport"], "order": 4471, "emoji": "🛂"}, {"tags": ["packing"], "order": 4472, "emoji": "🛃"}, {"tags": ["arrived", "baggage", "bags", "case", "checked", "claim", "journey", "packing", "plane", "ready", "travel", "trip"], "order": 4473, "emoji": "🛄"}, {"tags": ["baggage", "case", "left", "locker", "luggage"], "order": 4474, "emoji": "🛅"}, {"tags": ["caution"], "order": 4476, "emoji": "⚠️"}, {"tags": ["child", "children", "crossing", "pedestrian", "traffic"], "order": 4477, "emoji": "🚸"}, {"tags": ["do", "entry", "fail", "forbidden", "no", "not", "pass", "prohibited", "traffic"], "order": 4478, "emoji": "⛔️"}, {"tags": ["entry", "forbidden", "no", "not", "smoke"], "order": 4479, "emoji": "🚫"}, {"tags": ["bicycle", "bicycles", "bike", "forbidden", "no", "not", "prohibited"], "order": 4480, "emoji": "🚳"}, {"tags": ["forbidden", "no", "not", "prohibited", "smoke", "smoking"], "order": 4481, "emoji": "🚭️"}, {"tags": ["forbidden", "litter", "littering", "no", "not", "prohibited"], "order": 4482, "emoji": "🚯"}, {"tags": ["dry", "non-drinking", "non-potable", "prohibited", "water"], "order": 4483, "emoji": "🚱"}, {"tags": ["forbidden", "no", "not", "pedestrian", "pedestrians", "prohibited"], "order": 4484, "emoji": "🚷"}, {"tags": ["cell", "forbidden", "mobile", "no", "not", "phone", "phones", "prohibited", "telephone"], "order": 4485, "emoji": "📵"}, {"tags": ["18", "age", "eighteen", "forbidden", "no", "not", "one", "prohibited", "restriction", "underage"], "order": 4486, "emoji": "🔞"}, {"tags": ["sign"], "order": 4488, "emoji": "☢️"}, {"tags": ["sign"], "order": 4490, "emoji": "☣️"}, {"tags": ["arrow", "cardinal", "direction", "north", "up"], "order": 4492, "emoji": "⬆️"}, {"tags": ["arrow", "direction", "intercardinal", "northeast", "up-right"], "order": 4494, "emoji": "↗️"}, {"tags": ["arrow", "cardinal", "direction", "east", "right"], "order": 4496, "emoji": "➡️"}, {"tags": ["arrow", "direction", "down-right", "intercardinal", "southeast"], "order": 4498, "emoji": "↘️"}, {"tags": ["arrow", "cardinal", "direction", "down", "south"], "order": 4500, "emoji": "⬇️"}, {"tags": ["arrow", "direction", "down-left", "intercardinal", "southwest"], "order": 4502, "emoji": "↙️"}, {"tags": ["arrow", "cardinal", "direction", "left", "west"], "order": 4504, "emoji": "⬅️"}, {"tags": ["arrow", "direction", "intercardinal", "northwest", "up-left"], "order": 4506, "emoji": "↖️"}, {"tags": ["arrow", "up-down"], "order": 4508, "emoji": "↕️"}, {"tags": ["arrow", "left-right"], "order": 4510, "emoji": "↔️"}, {"tags": ["arrow", "curving", "left", "right"], "order": 4512, "emoji": "↩️"}, {"tags": ["arrow", "curving", "left", "right"], "order": 4514, "emoji": "↪️"}, {"tags": ["arrow", "curving", "right", "up"], "order": 4516, "emoji": "⤴️"}, {"tags": ["arrow", "curving", "down", "right"], "order": 4518, "emoji": "⤵️"}, {"tags": ["arrow", "arrows", "clockwise", "refresh", "reload", "vertical"], "order": 4519, "emoji": "🔃"}, {"tags": ["again", "anticlockwise", "arrow", "arrows", "button", "counterclockwise", "deja", "refresh", "rewindershins", "vu"], "order": 4520, "emoji": "🔄"}, {"tags": ["arrow", "back"], "order": 4521, "emoji": "🔙"}, {"tags": ["arrow", "end"], "order": 4522, "emoji": "🔚"}, {"tags": ["arrow", "mark", "on!"], "order": 4523, "emoji": "🔛"}, {"tags": ["arrow", "brb", "omw", "soon"], "order": 4524, "emoji": "🔜"}, {"tags": ["arrow", "homie", "top", "up"], "order": 4525, "emoji": "🔝"}, {"tags": ["place", "pray", "religion", "worship"], "order": 4526, "emoji": "🛐"}, {"tags": ["atheist", "atom", "symbol"], "order": 4528, "emoji": "⚛️"}, {"tags": ["hindu", "religion"], "order": 4530, "emoji": "🕉️"}, {"tags": ["david", "jew", "jewish", "judaism", "religion", "star"], "order": 4532, "emoji": "✡️"}, {"tags": ["buddhist", "dharma", "religion", "wheel"], "order": 4534, "emoji": "☸️"}, {"tags": ["difficult", "lives", "religion", "tao", "taoist", "total", "yang", "yin", "yinyang"], "order": 4536, "emoji": "☯️"}, {"tags": ["christ", "christian", "cross", "latin", "religion"], "order": 4538, "emoji": "✝️"}, {"tags": ["christian", "cross", "orthodox", "religion"], "order": 4540, "emoji": "☦️"}, {"tags": ["crescent", "islam", "muslim", "ramadan", "religion", "star"], "order": 4542, "emoji": "☪️"}, {"tags": ["healing", "peace", "peaceful", "symbol"], "order": 4544, "emoji": "☮️"}, {"tags": ["candelabrum", "candlestick", "hanukkah", "jewish", "judaism", "religion"], "order": 4545, "emoji": "🕎"}, {"tags": ["dotted", "fortune", "jewish", "judaism", "six-pointed", "star"], "order": 4546, "emoji": "🔯"}, {"tags": ["deg", "fateh", "khalsa", "religion", "sikh", "sikhism", "tegh"], "order": 4547, "emoji": "🪯"}, {"tags": ["aries", "horoscope", "ram", "zodiac"], "order": 4548, "emoji": "♈️"}, {"tags": ["bull", "horoscope", "ox", "taurus", "zodiac"], "order": 4549, "emoji": "♉️"}, {"tags": ["gemini", "horoscope", "twins", "zodiac"], "order": 4550, "emoji": "♊️"}, {"tags": ["cancer", "crab", "horoscope", "zodiac"], "order": 4551, "emoji": "♋️"}, {"tags": ["horoscope", "leo", "lion", "zodiac"], "order": 4552, "emoji": "♌️"}, {"tags": ["horoscope", "virgo", "zodiac"], "order": 4553, "emoji": "♍️"}, {"tags": ["balance", "horoscope", "justice", "libra", "scales", "zodiac"], "order": 4554, "emoji": "♎️"}, {"tags": ["horoscope", "scorpio", "scorpion", "scorpius", "zodiac"], "order": 4555, "emoji": "♏️"}, {"tags": ["archer", "horoscope", "sagittarius", "zodiac"], "order": 4556, "emoji": "♐️"}, {"tags": ["capricorn", "goat", "horoscope", "zodiac"], "order": 4557, "emoji": "♑️"}, {"tags": ["aquarius", "bearer", "horoscope", "water", "zodiac"], "order": 4558, "emoji": "♒️"}, {"tags": ["fish", "horoscope", "pisces", "zodiac"], "order": 4559, "emoji": "♓️"}, {"tags": ["bearer", "ophiuchus", "serpent", "snake", "zodiac"], "order": 4560, "emoji": "⛎️"}, {"tags": ["arrow", "button", "crossed", "shuffle", "tracks"], "order": 4561, "emoji": "🔀"}, {"tags": ["arrow", "button", "clockwise", "repeat"], "order": 4562, "emoji": "🔁"}, {"tags": ["arrow", "button", "clockwise", "once", "repeat", "single"], "order": 4563, "emoji": "🔂"}, {"tags": ["arrow", "button", "play", "right", "triangle"], "order": 4565, "emoji": "▶️"}, {"tags": ["arrow", "button", "double", "fast", "fast-forward", "forward"], "order": 4566, "emoji": "⏩️"}, {"tags": ["arrow", "button", "next", "scene", "track", "triangle"], "order": 4568, "emoji": "⏭️"}, {"tags": ["arrow", "button", "pause", "play", "right", "triangle"], "order": 4570, "emoji": "⏯️"}, {"tags": ["arrow", "button", "left", "reverse", "triangle"], "order": 4572, "emoji": "◀️"}, {"tags": ["arrow", "button", "double", "fast", "reverse", "rewind"], "order": 4573, "emoji": "⏪️"}, {"tags": ["arrow", "button", "last", "previous", "scene", "track", "triangle"], "order": 4575, "emoji": "⏮️"}, {"tags": ["arrow", "button", "red", "up", "upwards"], "order": 4576, "emoji": "🔼"}, {"tags": ["arrow", "button", "double", "fast", "up"], "order": 4577, "emoji": "⏫️"}, {"tags": ["arrow", "button", "down", "downwards", "red"], "order": 4578, "emoji": "🔽"}, {"tags": ["arrow", "button", "double", "down", "fast"], "order": 4579, "emoji": "⏬️"}, {"tags": ["bar", "button", "double", "pause", "vertical"], "order": 4581, "emoji": "⏸️"}, {"tags": ["button", "square", "stop"], "order": 4583, "emoji": "⏹️"}, {"tags": ["button", "circle", "record"], "order": 4585, "emoji": "⏺️"}, {"tags": ["button", "eject"], "order": 4587, "emoji": "⏏️"}, {"tags": ["camera", "film", "movie"], "order": 4588, "emoji": "🎦"}, {"tags": ["brightness", "button", "dim", "low"], "order": 4589, "emoji": "🔅"}, {"tags": ["bright", "brightness", "button", "light"], "order": 4590, "emoji": "🔆"}, {"tags": ["antenna", "bar", "bars", "cell", "communication", "mobile", "phone", "signal", "telephone"], "order": 4591, "emoji": "📶"}, {"tags": ["broadband", "computer", "connectivity", "hotspot", "internet", "network", "router", "smartphone", "wi-fi", "wifi", "wlan"], "order": 4592, "emoji": "🛜"}, {"tags": ["cell", "communication", "mobile", "mode", "phone", "telephone", "vibration"], "order": 4593, "emoji": "📳"}, {"tags": ["cell", "mobile", "off", "phone", "telephone"], "order": 4594, "emoji": "📴"}, {"tags": ["female", "sign", "woman"], "order": 4596, "emoji": "♀️"}, {"tags": ["male", "man", "sign"], "order": 4598, "emoji": "♂️"}, {"tags": ["symbol", "transgender"], "order": 4600, "emoji": "⚧️"}, {"tags": ["cancel", "multiplication", "sign", "x", "×"], "order": 4602, "emoji": "✖️"}, {"tags": ["+"], "order": 4603, "emoji": "➕️"}, {"tags": ["-", "heavy", "math", "sign", "−"], "order": 4604, "emoji": "➖️"}, {"tags": ["division", "heavy", "math", "sign", "÷"], "order": 4605, "emoji": "➗️"}, {"tags": ["answer", "equal", "equality", "equals", "heavy", "math", "sign"], "order": 4606, "emoji": "🟰"}, {"tags": ["forever", "unbounded", "universal"], "order": 4608, "emoji": "♾️"}, {"tags": ["!", "!!", "bangbang", "double", "exclamation", "mark", "punctuation"], "order": 4610, "emoji": "‼️"}, {"tags": ["!", "!?", "?", "exclamation", "interrobang", "mark", "punctuation", "question"], "order": 4612, "emoji": "⁉️"}, {"tags": ["?", "mark", "punctuation", "question", "red"], "order": 4613, "emoji": "❓️"}, {"tags": ["?", "mark", "outlined", "punctuation", "question", "white"], "order": 4614, "emoji": "❔️"}, {"tags": ["!", "exclamation", "mark", "outlined", "punctuation", "white"], "order": 4615, "emoji": "❕️"}, {"tags": ["!", "exclamation", "mark", "punctuation", "red"], "order": 4616, "emoji": "❗️"}, {"tags": ["dash", "punctuation", "wavy"], "order": 4618, "emoji": "〰️"}, {"tags": ["bank", "currency", "exchange", "money"], "order": 4619, "emoji": "💱"}, {"tags": ["billion", "cash", "charge", "currency", "dollar", "heavy", "million", "money", "pay", "sign"], "order": 4620, "emoji": "💲"}, {"tags": ["aesculapius", "medical", "medicine", "staff", "symbol"], "order": 4622, "emoji": "⚕️"}, {"tags": ["recycle", "recycling", "symbol"], "order": 4624, "emoji": "♻️"}, {"tags": ["knights"], "order": 4626, "emoji": "⚜️"}, {"tags": ["anchor", "emblem", "poseidon", "ship", "tool", "trident"], "order": 4627, "emoji": "🔱"}, {"tags": ["badge", "name"], "order": 4628, "emoji": "📛"}, {"tags": ["beginner", "chevron", "green", "japanese", "leaf", "symbol", "tool", "yellow"], "order": 4629, "emoji": "🔰"}, {"tags": ["circle", "heavy", "hollow", "large", "o", "red"], "order": 4630, "emoji": "⭕️"}, {"tags": ["button", "check", "checked", "checkmark", "complete", "completed", "done", "fixed", "mark", "tick", "✓"], "order": 4631, "emoji": "✅️"}, {"tags": ["ballot", "box", "check", "checked", "done", "off", "tick", "✓"], "order": 4633, "emoji": "☑️"}, {"tags": ["check", "checked", "checkmark", "done", "heavy", "mark", "tick", "✓"], "order": 4635, "emoji": "✔️"}, {"tags": ["cancel", "cross", "mark", "multiplication", "multiply", "x", "×"], "order": 4636, "emoji": "❌️"}, {"tags": ["button", "cross", "mark", "multiplication", "multiply", "square", "x", "×"], "order": 4637, "emoji": "❎️"}, {"tags": ["curl", "curly", "loop"], "order": 4638, "emoji": "➰️"}, {"tags": ["curl", "curly", "double", "loop"], "order": 4639, "emoji": "➿️"}, {"tags": ["alternation", "mark", "part"], "order": 4641, "emoji": "〽️"}, {"tags": ["*", "asterisk", "eight-spoked"], "order": 4643, "emoji": "✳️"}, {"tags": ["*", "eight-pointed", "star"], "order": 4645, "emoji": "✴️"}, {"tags": ["*"], "order": 4647, "emoji": "❇️"}, {"tags": ["c"], "order": 4649, "emoji": "©️"}, {"tags": ["r"], "order": 4651, "emoji": "®️"}, {"tags": ["mark", "tm", "trade", "trademark"], "order": 4653, "emoji": "™️"}, {"tags": ["drip", "holi", "ink", "liquid", "mess", "paint", "spill", "stain"], "order": 4654, "emoji": "🫟"}, {"tags": ["keycap"], "order": 4655, "emoji": "#️⃣"}, {"tags": ["keycap"], "order": 4657, "emoji": "*️⃣"}, {"tags": ["keycap"], "order": 4659, "emoji": "0️⃣"}, {"tags": ["keycap"], "order": 4661, "emoji": "1️⃣"}, {"tags": ["keycap"], "order": 4663, "emoji": "2️⃣"}, {"tags": ["keycap"], "order": 4665, "emoji": "3️⃣"}, {"tags": ["keycap"], "order": 4667, "emoji": "4️⃣"}, {"tags": ["keycap"], "order": 4669, "emoji": "5️⃣"}, {"tags": ["keycap"], "order": 4671, "emoji": "6️⃣"}, {"tags": ["keycap"], "order": 4673, "emoji": "7️⃣"}, {"tags": ["keycap"], "order": 4675, "emoji": "8️⃣"}, {"tags": ["keycap"], "order": 4677, "emoji": "9️⃣"}, {"tags": ["keycap"], "order": 4679, "emoji": "🔟"}, {"tags": ["abcd", "input", "latin", "letters", "uppercase"], "order": 4680, "emoji": "🔠"}, {"tags": ["abcd", "input", "latin", "letters", "lowercase"], "order": 4681, "emoji": "🔡"}, {"tags": ["1234", "input", "numbers"], "order": 4682, "emoji": "🔢"}, {"tags": ["%", "&", "input", "symbols", "♪", "〒"], "order": 4683, "emoji": "🔣"}, {"tags": ["abc", "alphabet", "input", "latin", "letters"], "order": 4684, "emoji": "🔤"}, {"tags": ["blood", "button", "type"], "order": 4686, "emoji": "🅰️"}, {"tags": ["ab", "blood", "button", "type"], "order": 4687, "emoji": "🆎"}, {"tags": ["b", "blood", "button", "type"], "order": 4689, "emoji": "🅱️"}, {"tags": ["button", "cl"], "order": 4690, "emoji": "🆑"}, {"tags": ["button", "cool"], "order": 4691, "emoji": "🆒"}, {"tags": ["button", "free"], "order": 4692, "emoji": "🆓"}, {"tags": ["i"], "order": 4694, "emoji": "ℹ️"}, {"tags": ["button", "id", "identity"], "order": 4695, "emoji": "🆔"}, {"tags": ["circle", "circled", "m"], "order": 4697, "emoji": "Ⓜ️"}, {"tags": ["button", "new"], "order": 4698, "emoji": "🆕"}, {"tags": ["button", "ng"], "order": 4699, "emoji": "🆖"}, {"tags": ["blood", "button", "o", "type"], "order": 4701, "emoji": "🅾️"}, {"tags": ["button", "ok", "okay"], "order": 4702, "emoji": "🆗"}, {"tags": ["button", "p", "parking"], "order": 4704, "emoji": "🅿️"}, {"tags": ["button", "help", "sos"], "order": 4705, "emoji": "🆘"}, {"tags": ["button", "mark", "up", "up!"], "order": 4706, "emoji": "🆙"}, {"tags": ["button", "versus", "vs"], "order": 4707, "emoji": "🆚"}, {"tags": ["button", "here", "japanese", "katakana"], "order": 4708, "emoji": "🈁"}, {"tags": ["button", "charge", "japanese", "katakana", "service"], "order": 4710, "emoji": "🈂️"}, {"tags": ["amount", "button", "ideograph", "japanese", "monthly"], "order": 4712, "emoji": "🈷️"}, {"tags": ["button", "charge", "free", "ideograph", "japanese", "not"], "order": 4713, "emoji": "🈶"}, {"tags": ["button", "ideograph", "japanese", "reserved"], "order": 4714, "emoji": "🈯️"}, {"tags": ["bargain", "button", "ideograph", "japanese"], "order": 4715, "emoji": "🉐"}, {"tags": ["button", "discount", "ideograph", "japanese"], "order": 4716, "emoji": "🈹"}, {"tags": ["button", "charge", "free", "ideograph", "japanese"], "order": 4717, "emoji": "🈚️"}, {"tags": ["button", "ideograph", "japanese", "prohibited"], "order": 4718, "emoji": "🈲"}, {"tags": ["acceptable", "button", "ideograph", "japanese"], "order": 4719, "emoji": "🉑"}, {"tags": ["application", "button", "ideograph", "japanese"], "order": 4720, "emoji": "🈸"}, {"tags": ["button", "grade", "ideograph", "japanese", "passing"], "order": 4721, "emoji": "🈴"}, {"tags": ["button", "ideograph", "japanese", "vacancy"], "order": 4722, "emoji": "🈳"}, {"tags": ["button", "congratulations", "ideograph", "japanese"], "order": 4724, "emoji": "㊗️"}, {"tags": ["button", "ideograph", "japanese", "secret"], "order": 4726, "emoji": "㊙️"}, {"tags": ["business", "button", "ideograph", "japanese", "open"], "order": 4727, "emoji": "🈺"}, {"tags": ["button", "ideograph", "japanese", "no", "vacancy"], "order": 4728, "emoji": "🈵"}, {"tags": ["circle", "geometric", "red"], "order": 4729, "emoji": "🔴"}, {"tags": ["circle", "orange"], "order": 4730, "emoji": "🟠"}, {"tags": ["circle", "yellow"], "order": 4731, "emoji": "🟡"}, {"tags": ["circle", "green"], "order": 4732, "emoji": "🟢"}, {"tags": ["blue", "circle", "geometric"], "order": 4733, "emoji": "🔵"}, {"tags": ["circle", "purple"], "order": 4734, "emoji": "🟣"}, {"tags": ["brown", "circle"], "order": 4735, "emoji": "🟤"}, {"tags": ["black", "circle", "geometric"], "order": 4736, "emoji": "⚫️"}, {"tags": ["circle", "geometric", "white"], "order": 4737, "emoji": "⚪️"}, {"tags": ["card", "penalty", "red", "square"], "order": 4738, "emoji": "🟥"}, {"tags": ["orange", "square"], "order": 4739, "emoji": "🟧"}, {"tags": ["card", "penalty", "square", "yellow"], "order": 4740, "emoji": "🟨"}, {"tags": ["green", "square"], "order": 4741, "emoji": "🟩"}, {"tags": ["blue", "square"], "order": 4742, "emoji": "🟦"}, {"tags": ["purple", "square"], "order": 4743, "emoji": "🟪"}, {"tags": ["brown", "square"], "order": 4744, "emoji": "🟫"}, {"tags": ["black", "geometric", "large", "square"], "order": 4745, "emoji": "⬛️"}, {"tags": ["geometric", "large", "square", "white"], "order": 4746, "emoji": "⬜️"}, {"tags": ["black", "geometric", "medium", "square"], "order": 4748, "emoji": "◼️"}, {"tags": ["geometric", "medium", "square", "white"], "order": 4750, "emoji": "◻️"}, {"tags": ["black", "geometric", "medium-small", "square"], "order": 4751, "emoji": "◾️"}, {"tags": ["geometric", "medium-small", "square", "white"], "order": 4752, "emoji": "◽️"}, {"tags": ["black", "geometric", "small", "square"], "order": 4754, "emoji": "▪️"}, {"tags": ["geometric", "small", "square", "white"], "order": 4756, "emoji": "▫️"}, {"tags": ["diamond", "geometric", "large", "orange"], "order": 4757, "emoji": "🔶"}, {"tags": ["blue", "diamond", "geometric", "large"], "order": 4758, "emoji": "🔷"}, {"tags": ["diamond", "geometric", "orange", "small"], "order": 4759, "emoji": "🔸"}, {"tags": ["blue", "diamond", "geometric", "small"], "order": 4760, "emoji": "🔹"}, {"tags": ["geometric", "pointed", "red", "triangle", "up"], "order": 4761, "emoji": "🔺"}, {"tags": ["down", "geometric", "pointed", "red", "triangle"], "order": 4762, "emoji": "🔻"}, {"tags": ["comic", "diamond", "dot", "geometric"], "order": 4763, "emoji": "💠"}, {"tags": ["button", "geometric", "radio"], "order": 4764, "emoji": "🔘"}, {"tags": ["button", "geometric", "outlined", "square", "white"], "order": 4765, "emoji": "🔳"}, {"tags": ["black", "button", "geometric", "square"], "order": 4766, "emoji": "🔲"}, {"tags": ["checkered", "chequered", "finish", "flag", "flags", "game", "race", "racing", "sport", "win"], "order": 4767, "emoji": "🏁"}, {"tags": ["construction", "flag", "golf", "post", "triangular"], "order": 4768, "emoji": "🚩"}, {"tags": ["celebration", "cross", "crossed", "flags", "japanese"], "order": 4769, "emoji": "🎌"}, {"tags": ["black", "flag", "waving"], "order": 4770, "emoji": "🏴"}, {"tags": ["flag", "waving", "white"], "order": 4772, "emoji": "🏳️"}, {"tags": ["bisexual", "flag", "gay", "genderqueer", "glbt", "glbtq", "lesbian", "lgbt", "lgbtq", "lgbtqia", "pride", "queer", "rainbow", "trans", "transgender"], "order": 4773, "emoji": "🏳️‍🌈"}, {"tags": ["blue", "flag", "light", "pink", "transgender", "white"], "order": 4775, "emoji": "🏳️‍⚧️"}, {"tags": ["flag", "jolly", "pirate", "plunder", "roger", "treasure"], "order": 4779, "emoji": "🏴‍☠️"}, {"tags": ["AC", "flag"], "order": 4781, "emoji": "🇦🇨"}, {"tags": ["AD", "flag"], "order": 4782, "emoji": "🇦🇩"}, {"tags": ["AE", "flag"], "order": 4783, "emoji": "🇦🇪"}, {"tags": ["AF", "flag"], "order": 4784, "emoji": "🇦🇫"}, {"tags": ["AG", "flag"], "order": 4785, "emoji": "🇦🇬"}, {"tags": ["AI", "flag"], "order": 4786, "emoji": "🇦🇮"}, {"tags": ["AL", "flag"], "order": 4787, "emoji": "🇦🇱"}, {"tags": ["AM", "flag"], "order": 4788, "emoji": "🇦🇲"}, {"tags": ["AO", "flag"], "order": 4789, "emoji": "🇦🇴"}, {"tags": ["AQ", "flag"], "order": 4790, "emoji": "🇦🇶"}, {"tags": ["AR", "flag"], "order": 4791, "emoji": "🇦🇷"}, {"tags": ["AS", "flag"], "order": 4792, "emoji": "🇦🇸"}, {"tags": ["AT", "flag"], "order": 4793, "emoji": "🇦🇹"}, {"tags": ["AU", "flag"], "order": 4794, "emoji": "🇦🇺"}, {"tags": ["AW", "flag"], "order": 4795, "emoji": "🇦🇼"}, {"tags": ["AX", "flag"], "order": 4796, "emoji": "🇦🇽"}, {"tags": ["AZ", "flag"], "order": 4797, "emoji": "🇦🇿"}, {"tags": ["BA", "flag"], "order": 4798, "emoji": "🇧🇦"}, {"tags": ["BB", "flag"], "order": 4799, "emoji": "🇧🇧"}, {"tags": ["BD", "flag"], "order": 4800, "emoji": "🇧🇩"}, {"tags": ["BE", "flag"], "order": 4801, "emoji": "🇧🇪"}, {"tags": ["BF", "flag"], "order": 4802, "emoji": "🇧🇫"}, {"tags": ["BG", "flag"], "order": 4803, "emoji": "🇧🇬"}, {"tags": ["BH", "flag"], "order": 4804, "emoji": "🇧🇭"}, {"tags": ["BI", "flag"], "order": 4805, "emoji": "🇧🇮"}, {"tags": ["BJ", "flag"], "order": 4806, "emoji": "🇧🇯"}, {"tags": ["BL", "flag"], "order": 4807, "emoji": "🇧🇱"}, {"tags": ["BM", "flag"], "order": 4808, "emoji": "🇧🇲"}, {"tags": ["BN", "flag"], "order": 4809, "emoji": "🇧🇳"}, {"tags": ["BO", "flag"], "order": 4810, "emoji": "🇧🇴"}, {"tags": ["BQ", "flag"], "order": 4811, "emoji": "🇧🇶"}, {"tags": ["BR", "flag"], "order": 4812, "emoji": "🇧🇷"}, {"tags": ["BS", "flag"], "order": 4813, "emoji": "🇧🇸"}, {"tags": ["BT", "flag"], "order": 4814, "emoji": "🇧🇹"}, {"tags": ["BV", "flag"], "order": 4815, "emoji": "🇧🇻"}, {"tags": ["BW", "flag"], "order": 4816, "emoji": "🇧🇼"}, {"tags": ["BY", "flag"], "order": 4817, "emoji": "🇧🇾"}, {"tags": ["BZ", "flag"], "order": 4818, "emoji": "🇧🇿"}, {"tags": ["CA", "flag"], "order": 4819, "emoji": "🇨🇦"}, {"tags": ["CC", "flag"], "order": 4820, "emoji": "🇨🇨"}, {"tags": ["CD", "flag"], "order": 4821, "emoji": "🇨🇩"}, {"tags": ["CF", "flag"], "order": 4822, "emoji": "🇨🇫"}, {"tags": ["CG", "flag"], "order": 4823, "emoji": "🇨🇬"}, {"tags": ["CH", "flag"], "order": 4824, "emoji": "🇨🇭"}, {"tags": ["CI", "flag"], "order": 4825, "emoji": "🇨🇮"}, {"tags": ["CK", "flag"], "order": 4826, "emoji": "🇨🇰"}, {"tags": ["CL", "flag"], "order": 4827, "emoji": "🇨🇱"}, {"tags": ["CM", "flag"], "order": 4828, "emoji": "🇨🇲"}, {"tags": ["CN", "flag"], "order": 4829, "emoji": "🇨🇳"}, {"tags": ["CO", "flag"], "order": 4830, "emoji": "🇨🇴"}, {"tags": ["CP", "flag"], "order": 4831, "emoji": "🇨🇵"}, {"tags": ["CQ", "flag"], "order": 4832, "emoji": "🇨🇶"}, {"tags": ["CR", "flag"], "order": 4833, "emoji": "🇨🇷"}, {"tags": ["CU", "flag"], "order": 4834, "emoji": "🇨🇺"}, {"tags": ["CV", "flag"], "order": 4835, "emoji": "🇨🇻"}, {"tags": ["CW", "flag"], "order": 4836, "emoji": "🇨🇼"}, {"tags": ["CX", "flag"], "order": 4837, "emoji": "🇨🇽"}, {"tags": ["CY", "flag"], "order": 4838, "emoji": "🇨🇾"}, {"tags": ["CZ", "flag"], "order": 4839, "emoji": "🇨🇿"}, {"tags": ["DE", "flag"], "order": 4840, "emoji": "🇩🇪"}, {"tags": ["DG", "flag"], "order": 4841, "emoji": "🇩🇬"}, {"tags": ["DJ", "flag"], "order": 4842, "emoji": "🇩🇯"}, {"tags": ["DK", "flag"], "order": 4843, "emoji": "🇩🇰"}, {"tags": ["DM", "flag"], "order": 4844, "emoji": "🇩🇲"}, {"tags": ["DO", "flag"], "order": 4845, "emoji": "🇩🇴"}, {"tags": ["DZ", "flag"], "order": 4846, "emoji": "🇩🇿"}, {"tags": ["EA", "flag"], "order": 4847, "emoji": "🇪🇦"}, {"tags": ["EC", "flag"], "order": 4848, "emoji": "🇪🇨"}, {"tags": ["EE", "flag"], "order": 4849, "emoji": "🇪🇪"}, {"tags": ["EG", "flag"], "order": 4850, "emoji": "🇪🇬"}, {"tags": ["EH", "flag"], "order": 4851, "emoji": "🇪🇭"}, {"tags": ["ER", "flag"], "order": 4852, "emoji": "🇪🇷"}, {"tags": ["ES", "flag"], "order": 4853, "emoji": "🇪🇸"}, {"tags": ["ET", "flag"], "order": 4854, "emoji": "🇪🇹"}, {"tags": ["EU", "flag"], "order": 4855, "emoji": "🇪🇺"}, {"tags": ["FI", "flag"], "order": 4856, "emoji": "🇫🇮"}, {"tags": ["FJ", "flag"], "order": 4857, "emoji": "🇫🇯"}, {"tags": ["FK", "flag"], "order": 4858, "emoji": "🇫🇰"}, {"tags": ["FM", "flag"], "order": 4859, "emoji": "🇫🇲"}, {"tags": ["FO", "flag"], "order": 4860, "emoji": "🇫🇴"}, {"tags": ["FR", "flag"], "order": 4861, "emoji": "🇫🇷"}, {"tags": ["GA", "flag"], "order": 4862, "emoji": "🇬🇦"}, {"tags": ["GB", "flag"], "order": 4863, "emoji": "🇬🇧"}, {"tags": ["GD", "flag"], "order": 4864, "emoji": "🇬🇩"}, {"tags": ["GE", "flag"], "order": 4865, "emoji": "🇬🇪"}, {"tags": ["GF", "flag"], "order": 4866, "emoji": "🇬🇫"}, {"tags": ["GG", "flag"], "order": 4867, "emoji": "🇬🇬"}, {"tags": ["GH", "flag"], "order": 4868, "emoji": "🇬🇭"}, {"tags": ["GI", "flag"], "order": 4869, "emoji": "🇬🇮"}, {"tags": ["GL", "flag"], "order": 4870, "emoji": "🇬🇱"}, {"tags": ["GM", "flag"], "order": 4871, "emoji": "🇬🇲"}, {"tags": ["GN", "flag"], "order": 4872, "emoji": "🇬🇳"}, {"tags": ["GP", "flag"], "order": 4873, "emoji": "🇬🇵"}, {"tags": ["GQ", "flag"], "order": 4874, "emoji": "🇬🇶"}, {"tags": ["GR", "flag"], "order": 4875, "emoji": "🇬🇷"}, {"tags": ["GS", "flag"], "order": 4876, "emoji": "🇬🇸"}, {"tags": ["GT", "flag"], "order": 4877, "emoji": "🇬🇹"}, {"tags": ["GU", "flag"], "order": 4878, "emoji": "🇬🇺"}, {"tags": ["GW", "flag"], "order": 4879, "emoji": "🇬🇼"}, {"tags": ["GY", "flag"], "order": 4880, "emoji": "🇬🇾"}, {"tags": ["HK", "flag"], "order": 4881, "emoji": "🇭🇰"}, {"tags": ["HM", "flag"], "order": 4882, "emoji": "🇭🇲"}, {"tags": ["HN", "flag"], "order": 4883, "emoji": "🇭🇳"}, {"tags": ["HR", "flag"], "order": 4884, "emoji": "🇭🇷"}, {"tags": ["HT", "flag"], "order": 4885, "emoji": "🇭🇹"}, {"tags": ["HU", "flag"], "order": 4886, "emoji": "🇭🇺"}, {"tags": ["IC", "flag"], "order": 4887, "emoji": "🇮🇨"}, {"tags": ["ID", "flag"], "order": 4888, "emoji": "🇮🇩"}, {"tags": ["IE", "flag"], "order": 4889, "emoji": "🇮🇪"}, {"tags": ["IL", "flag"], "order": 4890, "emoji": "🇮🇱"}, {"tags": ["IM", "flag"], "order": 4891, "emoji": "🇮🇲"}, {"tags": ["IN", "flag"], "order": 4892, "emoji": "🇮🇳"}, {"tags": ["IO", "flag"], "order": 4893, "emoji": "🇮🇴"}, {"tags": ["IQ", "flag"], "order": 4894, "emoji": "🇮🇶"}, {"tags": ["IR", "flag"], "order": 4895, "emoji": "🇮🇷"}, {"tags": ["IS", "flag"], "order": 4896, "emoji": "🇮🇸"}, {"tags": ["IT", "flag"], "order": 4897, "emoji": "🇮🇹"}, {"tags": ["JE", "flag"], "order": 4898, "emoji": "🇯🇪"}, {"tags": ["JM", "flag"], "order": 4899, "emoji": "🇯🇲"}, {"tags": ["JO", "flag"], "order": 4900, "emoji": "🇯🇴"}, {"tags": ["JP", "flag"], "order": 4901, "emoji": "🇯🇵"}, {"tags": ["KE", "flag"], "order": 4902, "emoji": "🇰🇪"}, {"tags": ["KG", "flag"], "order": 4903, "emoji": "🇰🇬"}, {"tags": ["KH", "flag"], "order": 4904, "emoji": "🇰🇭"}, {"tags": ["KI", "flag"], "order": 4905, "emoji": "🇰🇮"}, {"tags": ["KM", "flag"], "order": 4906, "emoji": "🇰🇲"}, {"tags": ["KN", "flag"], "order": 4907, "emoji": "🇰🇳"}, {"tags": ["KP", "flag"], "order": 4908, "emoji": "🇰🇵"}, {"tags": ["KR", "flag"], "order": 4909, "emoji": "🇰🇷"}, {"tags": ["KW", "flag"], "order": 4910, "emoji": "🇰🇼"}, {"tags": ["KY", "flag"], "order": 4911, "emoji": "🇰🇾"}, {"tags": ["KZ", "flag"], "order": 4912, "emoji": "🇰🇿"}, {"tags": ["LA", "flag"], "order": 4913, "emoji": "🇱🇦"}, {"tags": ["LB", "flag"], "order": 4914, "emoji": "🇱🇧"}, {"tags": ["LC", "flag"], "order": 4915, "emoji": "🇱🇨"}, {"tags": ["LI", "flag"], "order": 4916, "emoji": "🇱🇮"}, {"tags": ["LK", "flag"], "order": 4917, "emoji": "🇱🇰"}, {"tags": ["LR", "flag"], "order": 4918, "emoji": "🇱🇷"}, {"tags": ["LS", "flag"], "order": 4919, "emoji": "🇱🇸"}, {"tags": ["LT", "flag"], "order": 4920, "emoji": "🇱🇹"}, {"tags": ["LU", "flag"], "order": 4921, "emoji": "🇱🇺"}, {"tags": ["LV", "flag"], "order": 4922, "emoji": "🇱🇻"}, {"tags": ["LY", "flag"], "order": 4923, "emoji": "🇱🇾"}, {"tags": ["MA", "flag"], "order": 4924, "emoji": "🇲🇦"}, {"tags": ["MC", "flag"], "order": 4925, "emoji": "🇲🇨"}, {"tags": ["MD", "flag"], "order": 4926, "emoji": "🇲🇩"}, {"tags": ["ME", "flag"], "order": 4927, "emoji": "🇲🇪"}, {"tags": ["MF", "flag"], "order": 4928, "emoji": "🇲🇫"}, {"tags": ["MG", "flag"], "order": 4929, "emoji": "🇲🇬"}, {"tags": ["MH", "flag"], "order": 4930, "emoji": "🇲🇭"}, {"tags": ["MK", "flag"], "order": 4931, "emoji": "🇲🇰"}, {"tags": ["ML", "flag"], "order": 4932, "emoji": "🇲🇱"}, {"tags": ["MM", "flag"], "order": 4933, "emoji": "🇲🇲"}, {"tags": ["MN", "flag"], "order": 4934, "emoji": "🇲🇳"}, {"tags": ["MO", "flag"], "order": 4935, "emoji": "🇲🇴"}, {"tags": ["MP", "flag"], "order": 4936, "emoji": "🇲🇵"}, {"tags": ["MQ", "flag"], "order": 4937, "emoji": "🇲🇶"}, {"tags": ["MR", "flag"], "order": 4938, "emoji": "🇲🇷"}, {"tags": ["MS", "flag"], "order": 4939, "emoji": "🇲🇸"}, {"tags": ["MT", "flag"], "order": 4940, "emoji": "🇲🇹"}, {"tags": ["MU", "flag"], "order": 4941, "emoji": "🇲🇺"}, {"tags": ["MV", "flag"], "order": 4942, "emoji": "🇲🇻"}, {"tags": ["MW", "flag"], "order": 4943, "emoji": "🇲🇼"}, {"tags": ["MX", "flag"], "order": 4944, "emoji": "🇲🇽"}, {"tags": ["MY", "flag"], "order": 4945, "emoji": "🇲🇾"}, {"tags": ["MZ", "flag"], "order": 4946, "emoji": "🇲🇿"}, {"tags": ["NA", "flag"], "order": 4947, "emoji": "🇳🇦"}, {"tags": ["NC", "flag"], "order": 4948, "emoji": "🇳🇨"}, {"tags": ["NE", "flag"], "order": 4949, "emoji": "🇳🇪"}, {"tags": ["NF", "flag"], "order": 4950, "emoji": "🇳🇫"}, {"tags": ["NG", "flag"], "order": 4951, "emoji": "🇳🇬"}, {"tags": ["NI", "flag"], "order": 4952, "emoji": "🇳🇮"}, {"tags": ["NL", "flag"], "order": 4953, "emoji": "🇳🇱"}, {"tags": ["NO", "flag"], "order": 4954, "emoji": "🇳🇴"}, {"tags": ["NP", "flag"], "order": 4955, "emoji": "🇳🇵"}, {"tags": ["NR", "flag"], "order": 4956, "emoji": "🇳🇷"}, {"tags": ["NU", "flag"], "order": 4957, "emoji": "🇳🇺"}, {"tags": ["NZ", "flag"], "order": 4958, "emoji": "🇳🇿"}, {"tags": ["OM", "flag"], "order": 4959, "emoji": "🇴🇲"}, {"tags": ["PA", "flag"], "order": 4960, "emoji": "🇵🇦"}, {"tags": ["PE", "flag"], "order": 4961, "emoji": "🇵🇪"}, {"tags": ["PF", "flag"], "order": 4962, "emoji": "🇵🇫"}, {"tags": ["PG", "flag"], "order": 4963, "emoji": "🇵🇬"}, {"tags": ["PH", "flag"], "order": 4964, "emoji": "🇵🇭"}, {"tags": ["PK", "flag"], "order": 4965, "emoji": "🇵🇰"}, {"tags": ["PL", "flag"], "order": 4966, "emoji": "🇵🇱"}, {"tags": ["PM", "flag"], "order": 4967, "emoji": "🇵🇲"}, {"tags": ["PN", "flag"], "order": 4968, "emoji": "🇵🇳"}, {"tags": ["PR", "flag"], "order": 4969, "emoji": "🇵🇷"}, {"tags": ["PS", "flag"], "order": 4970, "emoji": "🇵🇸"}, {"tags": ["PT", "flag"], "order": 4971, "emoji": "🇵🇹"}, {"tags": ["PW", "flag"], "order": 4972, "emoji": "🇵🇼"}, {"tags": ["PY", "flag"], "order": 4973, "emoji": "🇵🇾"}, {"tags": ["QA", "flag"], "order": 4974, "emoji": "🇶🇦"}, {"tags": ["RE", "flag"], "order": 4975, "emoji": "🇷🇪"}, {"tags": ["RO", "flag"], "order": 4976, "emoji": "🇷🇴"}, {"tags": ["RS", "flag"], "order": 4977, "emoji": "🇷🇸"}, {"tags": ["RU", "flag"], "order": 4978, "emoji": "🇷🇺"}, {"tags": ["RW", "flag"], "order": 4979, "emoji": "🇷🇼"}, {"tags": ["SA", "flag"], "order": 4980, "emoji": "🇸🇦"}, {"tags": ["SB", "flag"], "order": 4981, "emoji": "🇸🇧"}, {"tags": ["SC", "flag"], "order": 4982, "emoji": "🇸🇨"}, {"tags": ["SD", "flag"], "order": 4983, "emoji": "🇸🇩"}, {"tags": ["SE", "flag"], "order": 4984, "emoji": "🇸🇪"}, {"tags": ["SG", "flag"], "order": 4985, "emoji": "🇸🇬"}, {"tags": ["SH", "flag"], "order": 4986, "emoji": "🇸🇭"}, {"tags": ["SI", "flag"], "order": 4987, "emoji": "🇸🇮"}, {"tags": ["SJ", "flag"], "order": 4988, "emoji": "🇸🇯"}, {"tags": ["SK", "flag"], "order": 4989, "emoji": "🇸🇰"}, {"tags": ["SL", "flag"], "order": 4990, "emoji": "🇸🇱"}, {"tags": ["SM", "flag"], "order": 4991, "emoji": "🇸🇲"}, {"tags": ["SN", "flag"], "order": 4992, "emoji": "🇸🇳"}, {"tags": ["SO", "flag"], "order": 4993, "emoji": "🇸🇴"}, {"tags": ["SR", "flag"], "order": 4994, "emoji": "🇸🇷"}, {"tags": ["SS", "flag"], "order": 4995, "emoji": "🇸🇸"}, {"tags": ["ST", "flag"], "order": 4996, "emoji": "🇸🇹"}, {"tags": ["SV", "flag"], "order": 4997, "emoji": "🇸🇻"}, {"tags": ["SX", "flag"], "order": 4998, "emoji": "🇸🇽"}, {"tags": ["SY", "flag"], "order": 4999, "emoji": "🇸🇾"}, {"tags": ["SZ", "flag"], "order": 5000, "emoji": "🇸🇿"}, {"tags": ["TA", "flag"], "order": 5001, "emoji": "🇹🇦"}, {"tags": ["TC", "flag"], "order": 5002, "emoji": "🇹🇨"}, {"tags": ["TD", "flag"], "order": 5003, "emoji": "🇹🇩"}, {"tags": ["TF", "flag"], "order": 5004, "emoji": "🇹🇫"}, {"tags": ["TG", "flag"], "order": 5005, "emoji": "🇹🇬"}, {"tags": ["TH", "flag"], "order": 5006, "emoji": "🇹🇭"}, {"tags": ["TJ", "flag"], "order": 5007, "emoji": "🇹🇯"}, {"tags": ["TK", "flag"], "order": 5008, "emoji": "🇹🇰"}, {"tags": ["TL", "flag"], "order": 5009, "emoji": "🇹🇱"}, {"tags": ["TM", "flag"], "order": 5010, "emoji": "🇹🇲"}, {"tags": ["TN", "flag"], "order": 5011, "emoji": "🇹🇳"}, {"tags": ["TO", "flag"], "order": 5012, "emoji": "🇹🇴"}, {"tags": ["TR", "flag"], "order": 5013, "emoji": "🇹🇷"}, {"tags": ["TT", "flag"], "order": 5014, "emoji": "🇹🇹"}, {"tags": ["TV", "flag"], "order": 5015, "emoji": "🇹🇻"}, {"tags": ["TW", "flag"], "order": 5016, "emoji": "🇹🇼"}, {"tags": ["TZ", "flag"], "order": 5017, "emoji": "🇹🇿"}, {"tags": ["UA", "flag"], "order": 5018, "emoji": "🇺🇦"}, {"tags": ["UG", "flag"], "order": 5019, "emoji": "🇺🇬"}, {"tags": ["UM", "flag"], "order": 5020, "emoji": "🇺🇲"}, {"tags": ["UN", "flag"], "order": 5021, "emoji": "🇺🇳"}, {"tags": ["US", "flag"], "order": 5022, "emoji": "🇺🇸"}, {"tags": ["UY", "flag"], "order": 5023, "emoji": "🇺🇾"}, {"tags": ["UZ", "flag"], "order": 5024, "emoji": "🇺🇿"}, {"tags": ["VA", "flag"], "order": 5025, "emoji": "🇻🇦"}, {"tags": ["VC", "flag"], "order": 5026, "emoji": "🇻🇨"}, {"tags": ["VE", "flag"], "order": 5027, "emoji": "🇻🇪"}, {"tags": ["VG", "flag"], "order": 5028, "emoji": "🇻🇬"}, {"tags": ["VI", "flag"], "order": 5029, "emoji": "🇻🇮"}, {"tags": ["VN", "flag"], "order": 5030, "emoji": "🇻🇳"}, {"tags": ["VU", "flag"], "order": 5031, "emoji": "🇻🇺"}, {"tags": ["WF", "flag"], "order": 5032, "emoji": "🇼🇫"}, {"tags": ["WS", "flag"], "order": 5033, "emoji": "🇼🇸"}, {"tags": ["XK", "flag"], "order": 5034, "emoji": "🇽🇰"}, {"tags": ["YE", "flag"], "order": 5035, "emoji": "🇾🇪"}, {"tags": ["YT", "flag"], "order": 5036, "emoji": "🇾🇹"}, {"tags": ["ZA", "flag"], "order": 5037, "emoji": "🇿🇦"}, {"tags": ["ZM", "flag"], "order": 5038, "emoji": "🇿🇲"}, {"tags": ["ZW", "flag"], "order": 5039, "emoji": "🇿🇼"}, {"tags": ["flag", "gbeng"], "order": 5040, "emoji": "🏴󠁧󠁢󠁥󠁮󠁧󠁿"}, {"tags": ["flag", "gbsct"], "order": 5041, "emoji": "🏴󠁧󠁢󠁳󠁣󠁴󠁿"}, {"tags": ["flag", "gbwls"], "order": 5042, "emoji": "🏴󠁧󠁢󠁷󠁬󠁳󠁿"}] \ No newline at end of file diff --git a/src/zen/common/styles/zen-browser-container.css b/src/zen/common/styles/zen-browser-container.css index 5e29a4d0f..7c33d6831 100644 --- a/src/zen/common/styles/zen-browser-container.css +++ b/src/zen/common/styles/zen-browser-container.css @@ -22,12 +22,14 @@ } } + /* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("layout.css.prefers-color-scheme.content-override", 2) { & browser[type="content"] { color-scheme: env(-moz-content-preferred-color-scheme); } } + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.acrylic-elements") { & browser[type="content"] { /* For the rendering engine to apply layering optimizations. This @@ -37,6 +39,7 @@ } } + /* stylelint-disable-next-line media-query-no-invalid */ @media (not -moz-pref("zen.view.shift-down-site-on-hover")) and (not ((-moz-pref("zen.view.experimental-no-window-controls") or (not -moz-pref("zen.view.hide-window-controls"))) and -moz-pref("zen.view.use-single-toolbar"))) { .browserSidebarContainer:is(.deck-selected, [zen-split="true"]) .browserContainer { transition: margin var(--zen-hidden-toolbar-transition); diff --git a/src/zen/common/styles/zen-browser-ui.css b/src/zen/common/styles/zen-browser-ui.css index c3a0c46a0..75b49fc04 100644 --- a/src/zen/common/styles/zen-browser-ui.css +++ b/src/zen/common/styles/zen-browser-ui.css @@ -142,9 +142,10 @@ #zen-main-app-wrapper { background: var(--zen-themed-toolbar-bg-transparent); - /* See bug #8814, don't an overflow here as it causes issues + /* See bug #8814, don't add overflow here as it causes issues * with firefox's rendering of the tab bar */ + /* stylelint-disable-next-line media-query-no-invalid */ @media (-moz-pref("zen.view.grey-out-inactive-windows")) { &:-moz-window-inactive { background: InactiveCaption; @@ -155,6 +156,7 @@ z-index: 1; } + /* stylelint-disable-next-line media-query-no-invalid */ @media (-moz-windows-accent-color-in-titlebar) and ((-moz-windows-mica) or -moz-pref("browser.theme.windows.accent-color-in-tabs.enabled")) { background: ActiveCaption; color: CaptionText; @@ -207,6 +209,7 @@ } } + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.widget.mac.mono-window-controls") { :root:not([window-modal-open="true"]) .titlebar-buttonbox-container { color: var(--toolbox-textcolor); @@ -220,7 +223,7 @@ /* Draw 3 dots as background to represent the window controls, all with the same cololr as the titlebar */ background-image: radial-gradient(circle, var(--zen-toolbar-element-bg) var(--zen-traffic-light-size), transparent 0.5px); - background-size: 20px 22px; + background-size: var(--icon-size-medium) 22px; background-position: 53% 50%; @media (-moz-mac-tahoe-theme) { diff --git a/src/zen/common/styles/zen-omnibox.css b/src/zen/common/styles/zen-omnibox.css index fba61b8de..d3ee11dbd 100644 --- a/src/zen/common/styles/zen-omnibox.css +++ b/src/zen/common/styles/zen-omnibox.css @@ -119,7 +119,7 @@ } #urlbar .urlbar-input { - border-radius: 0px !important; + border-radius: 0 !important; } #urlbar .urlbar-input-box { @@ -174,7 +174,7 @@ & #identity-box { order: 999; - margin: 0px !important; + margin: 0 !important; } } @@ -189,12 +189,14 @@ } } +/* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.urlbar.single-toolbar-show-copy-url", false) { :root[zen-single-toolbar="true"] #zen-copy-url-button { display: none !important; } } +/* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("zen.urlbar.show-pip-button") { #picture-in-picture-button { display: none !important; @@ -259,14 +261,17 @@ & .urlbar-background { --zen-urlbar-background-base: light-dark(#fbfbfb, color-mix(in srgb, hsl(0, 0%, 6.7%), var(--zen-colors-primary) 30%)); + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.acrylic-elements") { --zen-urlbar-background-transparent: color-mix(in srgb, var(--zen-urlbar-background-base) 70%, transparent 30%); } background-color: var(--zen-urlbar-background-transparent, var(--zen-urlbar-background-base)) !important; - box-shadow: 0px 30px 140px -15px light-dark(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)) !important; + box-shadow: 0 30px 140px -15px light-dark(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)) !important; backdrop-filter: none !important; outline: 0.5px solid light-dark(rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.2)) !important; outline-offset: var(--zen-urlbar-outline-offset) !important; + + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.acrylic-elements") { backdrop-filter: blur(42px) saturate(110%) brightness(0.25) contrast(100%) !important; } @@ -324,8 +329,8 @@ & > image { margin-top: auto; margin-bottom: auto; - height: 24px; /* double 12px */ - width: 24px; + height: var(--size-item-medium); /* double 12px */ + width: var(--size-item-medium); padding: 4px !important; &:hover { @@ -502,13 +507,14 @@ height: var(--urlbar-height) !important; margin-inline: 0.15rem !important; :root:not([zen-single-toolbar="true"]) & { - max-height: 32px !important; + max-height: var(--size-item-large) !important; min-height: unset !important; margin-block: -1px !important; } } } +/* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("zen.urlbar.show-protections-icon") { #tracking-protection-icon-container { display: none !important; @@ -573,8 +579,8 @@ & img { -moz-context-properties: fill; fill: currentColor; - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); } &[hidden] { @@ -702,7 +708,7 @@ } #identity-box { - margin-inline-end: 0px; + margin-inline-end: 0; } } @@ -714,7 +720,7 @@ #urlbar-search-mode-indicator-title { font-weight: 600; - padding: 0px; + padding: 0; } /* These are buttons that we dont need to be @@ -727,6 +733,7 @@ display: none !important; } +/* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("zen.urlbar.show-contextual-id") { #userContext-icons { display: none !important; diff --git a/src/zen/common/styles/zen-overflowing-addons.css b/src/zen/common/styles/zen-overflowing-addons.css index 1d8d4aa24..cd68ea2f1 100644 --- a/src/zen/common/styles/zen-overflowing-addons.css +++ b/src/zen/common/styles/zen-overflowing-addons.css @@ -9,7 +9,7 @@ display: flex; gap: 8px; padding: 8px 2px; - padding-bottom: 0px; + padding-bottom: 0; & .unified-extensions-item { flex: 1; diff --git a/src/zen/common/styles/zen-panel-ui.css b/src/zen/common/styles/zen-panel-ui.css index a73437832..133085bf0 100644 --- a/src/zen/common/styles/zen-panel-ui.css +++ b/src/zen/common/styles/zen-panel-ui.css @@ -22,7 +22,7 @@ panel[type="arrow"]:not(#feature-callout) { transition-duration: 0s !important; &::part(content) { - /* Refrain from animating for now as we haven't found a + /* Refrain from animating for now as we haven't found a * way to properly animate the popup without having the mica * backdrop staying still while the popup animates */ animation: none !important; @@ -45,7 +45,7 @@ panel[type="arrow"]:not(#feature-callout) { /* Remove the shadow for the native panels, as macos already * adds the shadows to the window. This is specially important - * on Tahoe, where we *dont* apply an image mask, meaning that + * on Tahoe, where we *don't* apply an image mask, meaning that * trying to render a shadow would end up in having weird borders * around the panel */ --panel-shadow: none; diff --git a/src/zen/common/styles/zen-panels/bookmarks.css b/src/zen/common/styles/zen-panels/bookmarks.css index 35dc04006..58ebf9b05 100644 --- a/src/zen/common/styles/zen-panels/bookmarks.css +++ b/src/zen/common/styles/zen-panels/bookmarks.css @@ -21,8 +21,8 @@ } #zenEditBookmarkPanelFavicon { - width: 20px; - height: 20px; + width: var(--icon-size-medium); + height: var(--icon-size-medium); } #editBookmarkPanel .panel-header { diff --git a/src/zen/common/styles/zen-panels/dialog.css b/src/zen/common/styles/zen-panels/dialog.css index ad12f9c3a..4b41dd0dc 100644 --- a/src/zen/common/styles/zen-panels/dialog.css +++ b/src/zen/common/styles/zen-panels/dialog.css @@ -4,7 +4,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ .dialogBox { - border: none; outline: 1px solid light-dark(transparent, #646464); animation: zen-dialog-fade-in 0.3s ease-out; border-radius: 12px !important; diff --git a/src/zen/common/styles/zen-popup.css b/src/zen/common/styles/zen-popup.css index a414d6738..b20e23c53 100644 --- a/src/zen/common/styles/zen-popup.css +++ b/src/zen/common/styles/zen-popup.css @@ -92,8 +92,8 @@ panel { #appMenu-fxa-label2::before { content: ""; display: -moz-box; - height: 16px; - width: 16px; + height: var(--size-item-small); + width: var(--size-item-small); background: var(--avatar-image-url) 0/16px; scale: 1.25; border-radius: 99px; @@ -139,7 +139,7 @@ panel { border-inline-start: 1px solid var(--panel-separator-color); display: block; position: relative; - height: 32px; + height: var(--size-item-large); margin-block: calc(var(--uc-panel-zoom-button-padding) * -1); transform: translateX( calc(var(--uc-panel-zoom-button-inline-padding) * -1 - (var(--panel-separator-margin-vertical) + var(--uc-arrowpanel-menuitem-margin-block)) - 1px) @@ -147,8 +147,8 @@ panel { } #appMenu-zoomReset-button2 { - height: calc(16px + var(--uc-panel-zoom-button-padding) * 2); - min-height: calc(16px + var(--uc-panel-zoom-button-padding) * 2); + height: calc(var(--size-item-small) + var(--uc-panel-zoom-button-padding) * 2); + min-height: calc(var(--size-item-small) + var(--uc-panel-zoom-button-padding) * 2); } #appMenu-zoomReduce-button2:not([disabled], [open], :active):is(:hover), @@ -191,7 +191,7 @@ panel { #identity-popup-mainView-panel-header, #protections-popup-mainView-panel-header, .panel-header { - min-height: calc((var(--arrowpanel-menuitem-padding-block) + 4px) * 2 + 16px); + min-height: calc((var(--arrowpanel-menuitem-padding-block) + 4px) * 2 + var(--size-item-small)); } /* URL bar popup */ @@ -223,7 +223,7 @@ panel { .permission-popup-permission-item, #permission-popup-storage-access-permission-list-header { padding-block: 4px; - margin-block: 0px; + margin-block: 0; } #editBookmarkPanel > #editBookmarkHeaderSeparator, @@ -353,7 +353,7 @@ menuseparator { padding: var(--zen-toast-padding); border-radius: 10px; background: linear-gradient(to bottom, var(--zen-primary-color) -40%, color-mix(in srgb, var(--zen-primary-color), #0f0f0f 20%)); - box-shadow: light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)) 0px 0px 22px 2px; + box-shadow: light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)) 0 0 22px 2px; border: none; display: flex; font-weight: 600; @@ -386,10 +386,10 @@ menuseparator { & button { width: min-content; - padding: 0px 8px !important; + padding: 0 8px !important; min-width: unset !important; min-height: 28px; - margin: 0px !important; + margin: 0 !important; border-radius: 6px !important; border-top: 2px solid light-dark(transparent, rgba(255, 255, 255, 0.1)); color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)) !important; diff --git a/src/zen/common/styles/zen-sidebar-notification.css b/src/zen/common/styles/zen-sidebar-notification.css index 4ee269133..fdddbe549 100644 --- a/src/zen/common/styles/zen-sidebar-notification.css +++ b/src/zen/common/styles/zen-sidebar-notification.css @@ -107,8 +107,8 @@ & .zen-sidebar-notification-link-icon { pointer-events: none; - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); -moz-context-properties: fill, fill-opacity; fill: var(--special-color, currentColor); } diff --git a/src/zen/common/styles/zen-single-components.css b/src/zen/common/styles/zen-single-components.css index 5b1610525..4b1ed8898 100644 --- a/src/zen/common/styles/zen-single-components.css +++ b/src/zen/common/styles/zen-single-components.css @@ -24,6 +24,7 @@ display: none !important; } +/* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.disable-lightweight") { #customization-lwtheme-link { display: none !important; @@ -60,7 +61,7 @@ #PanelUI-zen-emojis-picker-header { gap: 10px; align-items: center; - padding: 0px 10px; + padding: 0 10px; padding-bottom: 6px; } @@ -147,7 +148,7 @@ .zen-emojis-picker-emoji { font-size: 14px; - padding: 0px !important; + padding: 0 !important; & image { display: none; } @@ -262,6 +263,7 @@ /* Status panel */ +/* stylelint-disable-next-line media-query-no-invalid */ @media (-moz-pref("zen.theme.styled-status-panel")) { #statuspanel { padding: 6px; @@ -334,8 +336,8 @@ & > * { background-color: color-mix(in srgb, currentcolor 6%, transparent); - width: 48px; - height: 32px; + width: var(--size-item-xlarge); + height: var(--size-item-large); margin: 0; justify-content: center; align-items: center; @@ -416,7 +418,7 @@ } .permission-popup-permission-label { - margin: 0px; + margin: 0; font-weight: 500; white-space: nowrap; overflow: hidden; @@ -447,8 +449,8 @@ position: absolute; inset: 1px; border-radius: 99px; - width: 32px; - height: 32px; + width: var(--size-item-large); + height: var(--size-item-large); background: var(--button-background-color-primary); opacity: 0.6; transition: @@ -491,12 +493,14 @@ } } +/* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.hide-unified-extensions-button") { #unified-extensions-button:not([showing]) { display: none !important; } } +/* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("zen.theme.hide-unified-extensions-button") { #zen-site-data-section-addons { display: none; @@ -519,8 +523,8 @@ -moz-context-properties: fill; fill: currentColor; color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)); - width: 48px; - height: 32px; + width: var(--size-item-xlarge); + height: var(--size-item-large); position: relative; &[disabled] { @@ -547,8 +551,8 @@ background: linear-gradient(to bottom, light-dark(rgb(255, 255, 255), rgb(34, 34, 34)), light-dark(rgb(246, 246, 246), rgb(21, 21, 21))); box-shadow: - 0px 1px 2px rgba(0, 0, 0, 0.1), - inset 0px 1px 0px light-dark(transparent, rgba(255, 255, 255, 0.15)); + 0 1px 2px rgba(0, 0, 0, 0.1), + inset 0 1px 0 light-dark(transparent, rgba(255, 255, 255, 0.15)); border-radius: 6px; --base-border-color: light-dark(rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.1)); border: 0.5px solid light-dark(var(--base-border-color), rgb(21, 21, 21)); diff --git a/src/zen/compact-mode/sidebar.inc.css b/src/zen/compact-mode/sidebar.inc.css index 6dc2b6eef..9d665df58 100644 --- a/src/zen/compact-mode/sidebar.inc.css +++ b/src/zen/compact-mode/sidebar.inc.css @@ -50,7 +50,7 @@ #navigator-toolbox { --zen-toolbox-max-width: 74px !important; --zen-compact-float: var(--zen-element-separation); - + :root[zen-no-padding='true'] & { --zen-compact-float: 10px; --zen-compact-top-toolbar-hidden-fix: var(--zen-compact-float); @@ -78,7 +78,7 @@ } :root:not([zen-single-toolbar='true']) & { bottom: calc(var(--zen-compact-float) / 2); - height: calc(100% - var(--zen-toolbar-height-with-bookmarks)); + height: calc(100% - var(--zen-toolbar-height-with-bookmarks)); @media -moz-pref('zen.view.compact.hide-toolbar') { height: calc(100% - var(--zen-compact-top-toolbar-hidden-fix, 0px)); } @@ -145,9 +145,9 @@ } #navigator-toolbox:is( - [zen-has-hover], [zen-user-show], + [zen-has-hover], [zen-user-show], [zen-has-empty-tab], [flash-popup], - [has-popup-menu], [movingtab], + [has-popup-menu], [movingtab], [zen-compact-mode-active] ), &[zen-renaming-tab='true'] #navigator-toolbox { diff --git a/src/zen/compact-mode/toolbar.inc.css b/src/zen/compact-mode/toolbar.inc.css index 96f7d478a..484f98c25 100644 --- a/src/zen/compact-mode/toolbar.inc.css +++ b/src/zen/compact-mode/toolbar.inc.css @@ -30,7 +30,7 @@ display: flex; } transition: height var(--zen-hidden-toolbar-transition); - + height: var(--zen-element-separation); overflow: clip; diff --git a/src/zen/drag-and-drop/nsIZenDragAndDrop.idl b/src/zen/drag-and-drop/nsIZenDragAndDrop.idl index c8fddbf20..af92f943b 100644 --- a/src/zen/drag-and-drop/nsIZenDragAndDrop.idl +++ b/src/zen/drag-and-drop/nsIZenDragAndDrop.idl @@ -22,4 +22,3 @@ interface nsIZenDragAndDrop : nsISupports { */ void onDragEnd(); }; - diff --git a/src/zen/drag-and-drop/nsZenDragAndDrop.cpp b/src/zen/drag-and-drop/nsZenDragAndDrop.cpp index 48246e842..c8c4fb792 100644 --- a/src/zen/drag-and-drop/nsZenDragAndDrop.cpp +++ b/src/zen/drag-and-drop/nsZenDragAndDrop.cpp @@ -10,26 +10,25 @@ namespace { static constexpr auto kZenDefaultDragImageOpacity = #if defined(MOZ_WIDGET_GTK) -// For GTK, the default is 0.5 (DRAG_IMAGE_ALPHA_LEVEL) to match -// the native behavior. Make sure its synced with the following variable: -// https://searchfox.org/firefox-main/rev/14c08f0368ead8bfdddec62f43e0bb5c8fd61289/widget/gtk/nsDragService.cpp#75 + // For GTK, the default is 0.5 (DRAG_IMAGE_ALPHA_LEVEL) to match + // the native behavior. Make sure its synced with the following variable: + // https://searchfox.org/firefox-main/rev/14c08f0368ead8bfdddec62f43e0bb5c8fd61289/widget/gtk/nsDragService.cpp#75 0.5f; #else -// For other platforms, the default is whatever the value of DRAG_TRANSLUCENCY -// is, defined in nsBaseDragService.h + // For other platforms, the default is whatever the value of + // DRAG_TRANSLUCENCY is, defined in nsBaseDragService.h DRAG_TRANSLUCENCY; #endif -} // namespace: +} // namespace // Use the macro to inject all of the definitions for nsISupports. NS_IMPL_ISUPPORTS(nsZenDragAndDrop, nsIZenDragAndDrop) -nsZenDragAndDrop::nsZenDragAndDrop() { - (void)this->OnDragEnd(); -} +nsZenDragAndDrop::nsZenDragAndDrop() { (void)this->OnDragEnd(); } -auto nsZenDragAndDrop::GetZenDragAndDropInstance() -> nsCOMPtr { +auto nsZenDragAndDrop::GetZenDragAndDropInstance() + -> nsCOMPtr { return do_GetService(ZEN_BOOSTS_BACKEND_CONTRACTID); } @@ -45,4 +44,4 @@ nsZenDragAndDrop::OnDragEnd() { return NS_OK; } -} // namespace: zen +} // namespace zen diff --git a/src/zen/drag-and-drop/nsZenDragAndDrop.h b/src/zen/drag-and-drop/nsZenDragAndDrop.h index d03990bfa..b5f593ba1 100644 --- a/src/zen/drag-and-drop/nsZenDragAndDrop.h +++ b/src/zen/drag-and-drop/nsZenDragAndDrop.h @@ -28,10 +28,11 @@ class nsZenDragAndDrop final : public nsIZenDragAndDrop { auto GetDragImageOpacity() const { return mDragImageOpacity; } /** - * @brief Get the singleton instance of nsZenDragAndDrop. There may be occasions - * where it won't be available (e.g. on the content process), so this may return - * nullptr. - * @return nsZenDragAndDrop* The singleton instance, or nullptr if not available + * @brief Get the singleton instance of nsZenDragAndDrop. There may be + * occasions where it won't be available (e.g. on the content process), so + * this may return nullptr. + * @return nsZenDragAndDrop* The singleton instance, or nullptr if not + * available */ static auto GetZenDragAndDropInstance() -> nsCOMPtr; @@ -40,6 +41,6 @@ class nsZenDragAndDrop final : public nsIZenDragAndDrop { float mDragImageOpacity{}; }; -} // namespace zen +} // namespace zen #endif diff --git a/src/zen/folders/jar.inc.mn b/src/zen/folders/jar.inc.mn index 971b59dfc..091b8bf6d 100644 --- a/src/zen/folders/jar.inc.mn +++ b/src/zen/folders/jar.inc.mn @@ -4,4 +4,4 @@ content/browser/zen-components/ZenFolder.mjs (../../zen/folders/ZenFolder.mjs) content/browser/zen-components/ZenFolders.mjs (../../zen/folders/ZenFolders.mjs) - content/browser/zen-styles/zen-folders.css (../../zen/folders/zen-folders.css) \ No newline at end of file + content/browser/zen-styles/zen-folders.css (../../zen/folders/zen-folders.css) diff --git a/src/zen/folders/zen-folders.css b/src/zen/folders/zen-folders.css index bdfa5ab15..cc82d727a 100644 --- a/src/zen/folders/zen-folders.css +++ b/src/zen/folders/zen-folders.css @@ -88,7 +88,6 @@ zen-folder { width: 28px; height: 28px; align-content: center; - pointer-events: none; position: absolute; pointer-events: none; @@ -266,8 +265,8 @@ zen-folder[collapsed] > .tab-group-container { } #zen-folder-tabs-popup .zen-folder-tabs-list-search-icon { - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); margin: 10px 2px 10px 10px; -moz-context-properties: fill; fill: currentColor; @@ -275,8 +274,8 @@ zen-folder[collapsed] > .tab-group-container { } .folders-tabs-list-item-icon { - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); flex-shrink: 0; margin-inline-end: 10px; margin-inline-start: 4px; diff --git a/src/zen/glance/jar.inc.mn b/src/zen/glance/jar.inc.mn index caeadcbe2..c7338b695 100644 --- a/src/zen/glance/jar.inc.mn +++ b/src/zen/glance/jar.inc.mn @@ -3,4 +3,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs) - content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css) \ No newline at end of file + content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css) diff --git a/src/zen/glance/zen-glance.css b/src/zen/glance/zen-glance.css index 5a667305f..47b0c0f91 100644 --- a/src/zen/glance/zen-glance.css +++ b/src/zen/glance/zen-glance.css @@ -23,8 +23,8 @@ } & toolbarbutton { - width: 32px; - height: 32px; + width: var(--size-item-large); + height: var(--size-item-large); background: color-mix(in srgb, light-dark(rgb(24, 24, 24), rgb(231, 231, 231)) 96%, var(--zen-primary-color)); transition: background 0.05s ease, @@ -65,7 +65,7 @@ width: fit-content; & label { display: block; - max-width: 0px; + max-width: 0; margin: 0; overflow: hidden; transition: diff --git a/src/zen/images/favicons/tuta.svg b/src/zen/images/favicons/tuta.svg index 5be5cdce0..fccdcc6bb 100644 --- a/src/zen/images/favicons/tuta.svg +++ b/src/zen/images/favicons/tuta.svg @@ -1,4 +1,7 @@ + diff --git a/src/zen/media/zen-media-controls.css b/src/zen/media/zen-media-controls.css index a30fca410..8b23e50ee 100644 --- a/src/zen/media/zen-media-controls.css +++ b/src/zen/media/zen-media-controls.css @@ -119,8 +119,6 @@ position: absolute; width: 110%; height: 110%; - background-repeat: no-repeat; - opacity: 1; background: url("chrome://browser/content/zen-images/note-indicator.svg") no-repeat; top: -70%; left: 50%; @@ -152,7 +150,6 @@ & > toolbaritem { flex-grow: 1; - padding: 0; transition: padding 0.3s ease-out; position: absolute; left: 0; @@ -216,7 +213,7 @@ } #zen-media-title { - height: 16px; + height: var(--size-item-small); font-size: math; } @@ -250,7 +247,7 @@ } & label { - min-height: 16px; + min-height: var(--size-item-small); margin-left: 0; font-weight: 500; position: relative; /* For the animation */ @@ -264,9 +261,9 @@ #zen-media-progress-hbox { flex-grow: 1; - height: 2rem; + height: var(--size-item-large); align-items: center; - padding-top: 0px !important; + padding-top: 0 !important; #zen-media-controls-toolbar[media-position-hidden] & { display: none; diff --git a/src/zen/mods/ZenStyleSheetCache.cpp b/src/zen/mods/ZenStyleSheetCache.cpp index 15ac59fd2..dccfbd4b6 100644 --- a/src/zen/mods/ZenStyleSheetCache.cpp +++ b/src/zen/mods/ZenStyleSheetCache.cpp @@ -15,11 +15,11 @@ #include "mozilla/GlobalStyleSheetCache.h" #include "mozilla/RefPtr.h" -#define GET_MODS_FILE(chromeFile, err) \ +#define GET_MODS_FILE(chromeFile, err) \ NS_GetSpecialDirectory(NS_APP_USER_CHROME_DIR, getter_AddRefs(chromeFile)); \ - if (!chromeFile) { \ - return err; \ - } \ + if (!chromeFile) { \ + return err; \ + } \ chromeFile->Append(ZEN_MODS_FILENAME); namespace zen { @@ -50,7 +50,7 @@ auto ZenStyleSheetCache::GetModsSheet() -> StyleSheet* { } auto ZenStyleSheetCache::LoadSheetFile(nsIFile* aFile, - css::SheetParsingMode aParsingMode) + css::SheetParsingMode aParsingMode) -> void { nsCOMPtr uri; NS_NewFileURI(getter_AddRefs(uri), aFile); @@ -66,7 +66,7 @@ auto ZenStyleSheetCache::LoadSheetFile(nsIFile* aFile, } mModsSheet = result.unwrapOr(nullptr); } - + /* static */ auto ZenStyleSheetCache::Singleton() -> ZenStyleSheetCache* { MOZ_ASSERT(NS_IsMainThread()); @@ -76,8 +76,9 @@ auto ZenStyleSheetCache::Singleton() -> ZenStyleSheetCache* { return gZenModsCache; } -nsresult ZenStyleSheetCache::RebuildModsStylesheets(const nsACString& aContents) { - // Re-parse the mods stylesheet. By doing so, we read +nsresult ZenStyleSheetCache::RebuildModsStylesheets( + const nsACString& aContents) { + // Re-parse the mods stylesheet. By doing so, we read // Once we have the data as a nsACString, we call ReparseSheet from the // StyleSheet class to re-parse the stylesheet. auto sheet = GetModsSheet(); @@ -92,7 +93,6 @@ nsresult ZenStyleSheetCache::RebuildModsStylesheets(const nsACString& aContents) return aRv.StealNSResult(); } +mozilla::StaticRefPtr ZenStyleSheetCache::gZenModsCache; -mozilla::StaticRefPtr ZenStyleSheetCache::gZenModsCache; - -} // namespace: zen \ No newline at end of file +} // namespace zen diff --git a/src/zen/mods/ZenStyleSheetCache.h b/src/zen/mods/ZenStyleSheetCache.h index 607a65f85..cb16fbf85 100644 --- a/src/zen/mods/ZenStyleSheetCache.h +++ b/src/zen/mods/ZenStyleSheetCache.h @@ -6,11 +6,10 @@ #define mozilla_ZenStyleSheetCache_h__ #include "mozilla/css/Loader.h" -#include "mozilla/NotNull.h" #include "mozilla/StaticPtr.h" #ifndef ZEN_MODS_FILENAME - #define ZEN_MODS_FILENAME u"zen-themes.css"_ns +# define ZEN_MODS_FILENAME u"zen-themes.css"_ns #endif namespace zen { @@ -38,6 +37,7 @@ class ZenStyleSheetCache final : public nsISupports { nsresult RebuildModsStylesheets(const nsACString& aContents); static auto Singleton() -> ZenStyleSheetCache*; + private: ZenStyleSheetCache() = default; ~ZenStyleSheetCache() = default; @@ -46,14 +46,14 @@ class ZenStyleSheetCache final : public nsISupports { * @brief Load the stylesheet from the given file. * @param aFile The file to load the stylesheet from. */ - auto LoadSheetFile(nsIFile* aFile, mozilla::css::SheetParsingMode aParsingMode) - -> void; + auto LoadSheetFile(nsIFile* aFile, + mozilla::css::SheetParsingMode aParsingMode) -> void; static mozilla::StaticRefPtr gZenModsCache; RefPtr mModsSheet; }; -} // namespace zen +} // namespace zen #endif diff --git a/src/zen/mods/nsIZenModsBackend.idl b/src/zen/mods/nsIZenModsBackend.idl index 8a2567fce..90838cf80 100644 --- a/src/zen/mods/nsIZenModsBackend.idl +++ b/src/zen/mods/nsIZenModsBackend.idl @@ -22,4 +22,3 @@ interface nsIZenModsBackend : nsISupports { */ void rebuildModsStyles(in ACString aContents); }; - diff --git a/src/zen/mods/nsZenModsBackend.cpp b/src/zen/mods/nsZenModsBackend.cpp index 7280d00a8..635bc3331 100644 --- a/src/zen/mods/nsZenModsBackend.cpp +++ b/src/zen/mods/nsZenModsBackend.cpp @@ -23,14 +23,12 @@ namespace { static auto GetZenStyleSheetCache() -> ZenStyleSheetCache* { return ZenStyleSheetCache::Singleton(); } -} +} // namespace // Use the macro to inject all of the definitions for nsISupports. NS_IMPL_ISUPPORTS(nsZenModsBackend, nsIZenModsBackend) -nsZenModsBackend::nsZenModsBackend() { - (void)CheckEnabled(); -} +nsZenModsBackend::nsZenModsBackend() { (void)CheckEnabled(); } auto nsZenModsBackend::CheckEnabled() -> void { // Check if the mods backend is enabled based on the preference. @@ -44,17 +42,19 @@ auto nsZenModsBackend::CheckEnabled() -> void { !mozilla::Preferences::GetBool("zen.themes.disable-all", false); } -auto nsZenModsBackend::RebuildModsStyles(const nsACString& aContents) -> nsresult { +auto nsZenModsBackend::RebuildModsStyles(const nsACString& aContents) + -> nsresult { // Notify that the mods stylesheets have been rebuilt. return GetZenStyleSheetCache()->RebuildModsStylesheets(aContents); } -} // namespace: zen +} // namespace zen auto nsStyleSheetService::ZenMarkStylesAsChanged() -> void { for (auto& presShell : mPresShells) { if (presShell) { - if (auto doc = presShell->GetDocument(); doc && doc->IsInChromeDocShell()) { + if (auto doc = presShell->GetDocument(); + doc && doc->IsInChromeDocShell()) { // Notify the document that styles have changed. doc->ApplicableStylesChanged(); } diff --git a/src/zen/mods/nsZenModsBackend.h b/src/zen/mods/nsZenModsBackend.h index 2c5e1fa6b..2929d7be1 100644 --- a/src/zen/mods/nsZenModsBackend.h +++ b/src/zen/mods/nsZenModsBackend.h @@ -31,6 +31,6 @@ class nsZenModsBackend final : public nsIZenModsBackend { bool mEnabled = false; }; -} // namespace zen +} // namespace zen #endif diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index f22d96505..bdd249a7b 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -716,7 +716,6 @@ class nsZenWindowSync { * @param {object} options - Options object. * @param {boolean} options.focus - Indicates if the tab should be focused after the swap. * @param {boolean} options.onClose - Indicates if the swap is done during a tab close operation. - * @returns {Promise|null} A promise that resolves when the tab state is flushed, or null if the swap cannot be performed. */ #swapBrowserDocShellsInner(aOurTab, aOtherTab, { focus = true, onClose = false } = {}) { // Can't swap between chrome and content processes. @@ -724,7 +723,7 @@ class nsZenWindowSync { this.log( `Cannot swap browsers between tabs ${aOurTab.id} and ${aOtherTab.id} due to process mismatch` ); - return null; + return; } // Running `swapBrowsersAndCloseOther` doesn't expect us to use the tab after // the operation, so it doesn't really care about cleaning up the other tab. diff --git a/src/zen/split-view/jar.inc.mn b/src/zen/split-view/jar.inc.mn index cc855a1cc..9aa52e0fc 100644 --- a/src/zen/split-view/jar.inc.mn +++ b/src/zen/split-view/jar.inc.mn @@ -3,4 +3,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. * content/browser/zen-styles/zen-decks.css (../../zen/split-view/zen-decks.css) - content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs) \ No newline at end of file + content/browser/zen-components/ZenViewSplitter.mjs (../../zen/split-view/ZenViewSplitter.mjs) diff --git a/src/zen/split-view/zen-splitview-overlay.inc.xhtml b/src/zen/split-view/zen-splitview-overlay.inc.xhtml index d1c6254d2..f93091ac7 100644 --- a/src/zen/split-view/zen-splitview-overlay.inc.xhtml +++ b/src/zen/split-view/zen-splitview-overlay.inc.xhtml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/src/zen/tabs/jar.inc.mn b/src/zen/tabs/jar.inc.mn index 30ed24016..ed348b83d 100644 --- a/src/zen/tabs/jar.inc.mn +++ b/src/zen/tabs/jar.inc.mn @@ -5,4 +5,4 @@ content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs) content/browser/zen-components/ZenEssentialsPromo.mjs (../../zen/tabs/ZenEssentialsPromo.mjs) * content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css) - content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css) \ No newline at end of file + content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css) diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 6e9591802..a125fd84d 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -30,6 +30,7 @@ Single Toolbar Mode Specific Styles (`zen-single-toolbar='true'`) ========================================================================== */ :root[zen-single-toolbar="true"] { + /* stylelint-disable-next-line media-query-no-invalid */ @media (-moz-platform: macos) and (not -moz-pref("zen.view.mac.show-three-dot-menu")) { &:not([customizing]) #PanelUI-button:not([open]):not([panelopen]) { position: absolute; @@ -51,6 +52,8 @@ /* ========================================================================== Vertical Tabs Mode Specific Styles (`zen.tabs.vertical` pref) ========================================================================== */ + +/* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.tabs.vertical") { :root:not([zen-window-buttons-reversed="true"]) { & .titlebar-buttonbox-container { @@ -160,9 +163,9 @@ } .zen-workspace-pinned-tabs-section[hide-separator] & { - height: 0px; + height: 0; opacity: 0; - padding-bottom: 0px; + padding-bottom: 0; } & toolbarbutton { @@ -196,7 +199,7 @@ & .toolbarbutton-icon { width: 10px; transition: transform 0.15s ease-in-out; - transform: translateY(0px); + transform: translateY(0); @starting-style { transform: translateY(-2px); @@ -293,7 +296,7 @@ --tab-inner-inline-margin: 0; position: relative; - border-bottom: 0px solid transparent !important; + border-bottom: 0 solid transparent !important; --tab-block-margin: 2px; --tab-selected-bgcolor: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18)); @@ -351,7 +354,7 @@ border-radius: var(--border-radius-medium) !important; & .tab-context-line { - margin: 0 0px !important; + margin: 0 0 !important; width: 3px !important; } } @@ -362,8 +365,8 @@ margin: 0 0 0 4px !important; --toolbarbutton-inner-padding: 0; --border-radius-medium: 8px; - width: 24px; - height: 24px; + width: var(--size-item-medium); + height: var(--size-item-medium); --tab-min-height: 24px; --tab-min-width: 24px; @@ -402,9 +405,7 @@ position: absolute; width: 110%; height: 110%; - background-repeat: no-repeat; - opacity: 1; - background: url("chrome://browser/content/zen-images/note-indicator.svg") no-repeat; + background: url("chrome://browser/content/zen-images/note-indicator.svg") no-repeat; top: -70%; left: 50%; transform: translateX(-50%); @@ -419,8 +420,8 @@ /* Additional styles for glance tabs in "essential" mode */ &[zen-essential="true"] .tabbrowser-tab { position: absolute; - top: 0px; - right: 0px; + top: 0; + right: 0; --tab-collapsed-width: 34px; --tab-min-height: 16px; @@ -448,7 +449,7 @@ #tabbrowser-arrowscrollbox { &::part(scrollbox) { - gap: 0px !important; + gap: 0 !important; } &::part(overflow-start-indicator), @@ -478,7 +479,7 @@ opacity 0.1s ease-in-out, margin 0.1s ease-in-out, max-height 0.1s ease-in-out; - max-height: 0px; + max-height: 0; opacity: 0; transform: translateY(-4px); font-size: x-small; @@ -586,8 +587,8 @@ } & image { - height: 16px; - width: 16px; + height: var(--size-item-small); + width: var(--size-item-small); padding: 0 !important; } @@ -923,8 +924,8 @@ color: inherit; fill: currentColor; padding: var(--tab-close-button-padding); - width: 24px; - height: 24px; + width: var(--size-item-medium); + height: var(--size-item-medium); outline: var(--toolbarbutton-outline); &:hover { @@ -951,8 +952,8 @@ & > image { list-style-image: var(--zen-original-tab-icon); - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); pointer-events: none; border-radius: 4px; } @@ -961,7 +962,7 @@ content: ""; display: block; width: 2.5px; - height: 16px; + height: var(--size-item-small); background: light-dark(rgba(66, 61, 61, 0.3), rgba(255, 255, 255, 0.3)); position: absolute; right: 0; @@ -1059,6 +1060,7 @@ -moz-user-focus: ignore !important; } +/* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.tabs.show-newtab-vertical") { #tabs-newtab-button { max-height: var(--tab-min-height); @@ -1089,6 +1091,7 @@ --zen-colors-border: var(--zen-colors-tertiary); } + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.view.show-newtab-button-top") { order: -1; } @@ -1192,6 +1195,7 @@ background: light-dark(rgba(0, 0, 0, 0.1), var(--tab-selected-bgcolor)); } + /* stylelint-disable-next-line media-query-no-invalid */ @media -moz-pref("zen.theme.essentials-favicon-bg") { &[visuallyselected] > .tab-stack > .tab-background { &::after { @@ -1340,6 +1344,7 @@ opacity: 0.7; } +/* stylelint-disable-next-line media-query-no-invalid */ @media (-moz-pref("zen.theme.hide-tab-throbber")) { .tab-throbber { display: none !important; diff --git a/src/zen/tests/compact_mode/browser.toml b/src/zen/tests/compact_mode/browser.toml index f22795810..48649c2bb 100644 --- a/src/zen/tests/compact_mode/browser.toml +++ b/src/zen/tests/compact_mode/browser.toml @@ -2,4 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +[DEFAULT] + ["browser_compact_mode_width.js"] diff --git a/src/zen/tests/container_essentials/browser.toml b/src/zen/tests/container_essentials/browser.toml index ce61074c9..9e70c24a6 100644 --- a/src/zen/tests/container_essentials/browser.toml +++ b/src/zen/tests/container_essentials/browser.toml @@ -6,4 +6,5 @@ prefs = ["zen.workspaces.separate-essentials=true"] ["browser_container_auto_switch.js"] -["browser_container_specific_essentials.js"] \ No newline at end of file + +["browser_container_specific_essentials.js"] diff --git a/src/zen/tests/folders/browser.toml b/src/zen/tests/folders/browser.toml index 1750f50b0..8c09afca2 100644 --- a/src/zen/tests/folders/browser.toml +++ b/src/zen/tests/folders/browser.toml @@ -8,17 +8,28 @@ support-files = [ "head.js", ] -["browser_folder_create.js"] -["browser_folder_subfolder.js"] ["browser_folder_basic_toggle.js"] -["browser_folder_owner_tabs.js"] + +["browser_folder_create.js"] + ["browser_folder_density.js"] -["browser_folder_max_subfolders.js"] + ["browser_folder_empty_tab.js"] -["browser_folder_multiselected.js"] -["browser_folder_visible_tabs.js"] -["browser_folder_level_checks.js"] -["browser_folder_reset_button.js"] ["browser_folder_issue_9885.js"] + ["browser_folder_issue_9981.js"] + +["browser_folder_level_checks.js"] + +["browser_folder_max_subfolders.js"] + +["browser_folder_multiselected.js"] + +["browser_folder_owner_tabs.js"] + +["browser_folder_reset_button.js"] + +["browser_folder_subfolder.js"] + +["browser_folder_visible_tabs.js"] diff --git a/src/zen/tests/glance/browser.toml b/src/zen/tests/glance/browser.toml index 6098fbf07..4e27371a2 100644 --- a/src/zen/tests/glance/browser.toml +++ b/src/zen/tests/glance/browser.toml @@ -8,9 +8,15 @@ support-files = [ ] ["browser_glance_basic.js"] -["browser_glance_expand.js"] + ["browser_glance_close.js"] -["browser_glance_next_tab.js"] -["browser_glance_prev_tab.js"] -["browser_glance_select_parent.js"] + ["browser_glance_close_select.js"] + +["browser_glance_expand.js"] + +["browser_glance_next_tab.js"] + +["browser_glance_prev_tab.js"] + +["browser_glance_select_parent.js"] diff --git a/src/zen/tests/live-folders/browser.toml b/src/zen/tests/live-folders/browser.toml index e4055420b..bd75b3725 100644 --- a/src/zen/tests/live-folders/browser.toml +++ b/src/zen/tests/live-folders/browser.toml @@ -2,6 +2,10 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -["browser_live_folder.js"] -["browser_rss_live_folder.js"] +[DEFAULT] + ["browser_github_live_folder.js"] + +["browser_live_folder.js"] + +["browser_rss_live_folder.js"] diff --git a/src/zen/tests/mochitests/sandbox/mac_register_font.py b/src/zen/tests/mochitests/sandbox/mac_register_font.py index d536abac1..549becf56 100755 --- a/src/zen/tests/mochitests/sandbox/mac_register_font.py +++ b/src/zen/tests/mochitests/sandbox/mac_register_font.py @@ -17,69 +17,69 @@ import CoreText def main(): - parser = argparse.ArgumentParser() - parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="print verbose registration failures", - default=False, - ) - parser.add_argument( - "file", nargs="*", help="font file to register or unregister", default=[] - ) - parser.add_argument( - "-u", - "--unregister", - action="store_true", - help="unregister the provided fonts", - default=False, - ) - parser.add_argument( - "-p", - "--persist-user", - action="store_true", - help="permanently register the font", - default=False, - ) + parser = argparse.ArgumentParser() + parser.add_argument( + "-v", + "--verbose", + action="store_true", + help="print verbose registration failures", + default=False, + ) + parser.add_argument( + "file", nargs="*", help="font file to register or unregister", default=[] + ) + parser.add_argument( + "-u", + "--unregister", + action="store_true", + help="unregister the provided fonts", + default=False, + ) + parser.add_argument( + "-p", + "--persist-user", + action="store_true", + help="permanently register the font", + default=False, + ) - args = parser.parse_args() + args = parser.parse_args() - if args.persist_user: - scope = CoreText.kCTFontManagerScopeUser - scopeDesc = "user" - else: - scope = CoreText.kCTFontManagerScopeSession - scopeDesc = "session" - - failureCount = 0 - for fontPath in args.file: - fontURL = Cocoa.NSURL.fileURLWithPath_(fontPath) - (result, error) = register_or_unregister_font(fontURL, args.unregister, scope) - if result: - print( - "%sregistered font %s with %s scope" - % (("un" if args.unregister else ""), fontPath, scopeDesc) - ) + if args.persist_user: + scope = CoreText.kCTFontManagerScopeUser + scopeDesc = "user" else: - print( - "Failed to %sregister font %s with %s scope" - % (("un" if args.unregister else ""), fontPath, scopeDesc) - ) - if args.verbose: - print(error) - failureCount += 1 + scope = CoreText.kCTFontManagerScopeSession + scopeDesc = "session" - sys.exit(failureCount) + failureCount = 0 + for fontPath in args.file: + fontURL = Cocoa.NSURL.fileURLWithPath_(fontPath) + (result, error) = register_or_unregister_font(fontURL, args.unregister, scope) + if result: + print( + "%sregistered font %s with %s scope" + % (("un" if args.unregister else ""), fontPath, scopeDesc) + ) + else: + print( + "Failed to %sregister font %s with %s scope" + % (("un" if args.unregister else ""), fontPath, scopeDesc) + ) + if args.verbose: + print(error) + failureCount += 1 + + sys.exit(failureCount) def register_or_unregister_font(fontURL, unregister, scope): - return ( - CoreText.CTFontManagerUnregisterFontsForURL(fontURL, scope, None) - if unregister - else CoreText.CTFontManagerRegisterFontsForURL(fontURL, scope, None) - ) + return ( + CoreText.CTFontManagerUnregisterFontsForURL(fontURL, scope, None) + if unregister + else CoreText.CTFontManagerRegisterFontsForURL(fontURL, scope, None) + ) if __name__ == "__main__": - main() + main() diff --git a/src/zen/tests/mochitests/shell/mac_desktop_image.py b/src/zen/tests/mochitests/shell/mac_desktop_image.py index d664a23cb..e3ccc7719 100755 --- a/src/zen/tests/mochitests/shell/mac_desktop_image.py +++ b/src/zen/tests/mochitests/shell/mac_desktop_image.py @@ -31,138 +31,138 @@ from Cocoa import NSURL def main(): - parser = argparse.ArgumentParser( - description="Utility to print, set, or " - + "check the path to image being used as " - + "the desktop background image. By " - + "default, prints the path to the " - + "current desktop background image." - ) - parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="print verbose debugging information", - default=False, - ) - group = parser.add_mutually_exclusive_group() - group.add_argument( - "-s", - "--set-background-image", - dest="newBackgroundImagePath", - required=False, - help="path to the new background image to set. A zero " - + "exit code indicates no errors occurred.", - default=None, - ) - group.add_argument( - "-c", - "--check-background-image", - dest="checkBackgroundImagePath", - required=False, - help="check if the provided background image path " - + "matches the provided path. A zero exit code " - + "indicates the paths match.", - default=None, - ) - args = parser.parse_args() - - # Using logging for verbose output - if args.verbose: - logging.basicConfig(level=logging.DEBUG) - else: - logging.basicConfig(level=logging.CRITICAL) - logger = logging.getLogger("desktopImage") - - # Print what we're going to do - if args.checkBackgroundImagePath is not None: - logger.debug( - "checking provided desktop image %s matches current " - "image" % args.checkBackgroundImagePath + parser = argparse.ArgumentParser( + description="Utility to print, set, or " + + "check the path to image being used as " + + "the desktop background image. By " + + "default, prints the path to the " + + "current desktop background image." ) - elif args.newBackgroundImagePath is not None: - logger.debug("setting image to %s " % args.newBackgroundImagePath) - else: - logger.debug("retrieving desktop image path") - - focussedScreen = NSScreen.mainScreen() - if not focussedScreen: - raise RuntimeError("mainScreen error") - - ws = NSWorkspace.sharedWorkspace() - if not ws: - raise RuntimeError("sharedWorkspace error") - - # If we're just checking the image path, check it and then return. - # A successful exit code (0) indicates the paths match. - if args.checkBackgroundImagePath is not None: - # Get existing desktop image path and resolve it - existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) - existingImagePath = existingImageURL.path() - existingImagePathReal = os.path.realpath(existingImagePath) - logger.debug("existing desktop image: %s" % existingImagePath) - logger.debug("existing desktop image realpath: %s" % existingImagePath) - - # Resolve the path we're going to check - checkImagePathReal = os.path.realpath(args.checkBackgroundImagePath) - logger.debug("check desktop image: %s" % args.checkBackgroundImagePath) - logger.debug("check desktop image realpath: %s" % checkImagePathReal) - - if existingImagePathReal == checkImagePathReal: - print("desktop image path matches provided path") - return True - - print("desktop image path does NOT match provided path") - return False - - # Log the current desktop image - if args.verbose: - existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) - logger.debug("existing desktop image: %s" % existingImageURL.path()) - - # Set the desktop image - if args.newBackgroundImagePath is not None: - newImagePath = args.newBackgroundImagePath - if not os.path.exists(newImagePath): - logger.critical("%s does not exist" % newImagePath) - return False - if not os.access(newImagePath, os.R_OK): - logger.critical("%s is not readable" % newImagePath) - return False - - logger.debug("new desktop image to set: %s" % newImagePath) - newImageURL = NSURL.fileURLWithPath_(newImagePath) - logger.debug("new desktop image URL to set: %s" % newImageURL) - - status = False - (status, error) = ws.setDesktopImageURL_forScreen_options_error_( - newImageURL, focussedScreen, None, None + parser.add_argument( + "-v", + "--verbose", + action="store_true", + help="print verbose debugging information", + default=False, ) - if not status: - raise RuntimeError("setDesktopImageURL error") + group = parser.add_mutually_exclusive_group() + group.add_argument( + "-s", + "--set-background-image", + dest="newBackgroundImagePath", + required=False, + help="path to the new background image to set. A zero " + + "exit code indicates no errors occurred.", + default=None, + ) + group.add_argument( + "-c", + "--check-background-image", + dest="checkBackgroundImagePath", + required=False, + help="check if the provided background image path " + + "matches the provided path. A zero exit code " + + "indicates the paths match.", + default=None, + ) + args = parser.parse_args() - # Print the current desktop image - imageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) - imagePath = imageURL.path() - imagePathReal = os.path.realpath(imagePath) - logger.debug("updated desktop image URL: %s" % imageURL) - logger.debug("updated desktop image path: %s" % imagePath) - logger.debug("updated desktop image path (resolved): %s" % imagePathReal) - print(imagePathReal) - return True + # Using logging for verbose output + if args.verbose: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.CRITICAL) + logger = logging.getLogger("desktopImage") + + # Print what we're going to do + if args.checkBackgroundImagePath is not None: + logger.debug( + "checking provided desktop image %s matches current " + "image" % args.checkBackgroundImagePath + ) + elif args.newBackgroundImagePath is not None: + logger.debug("setting image to %s " % args.newBackgroundImagePath) + else: + logger.debug("retrieving desktop image path") + + focussedScreen = NSScreen.mainScreen() + if not focussedScreen: + raise RuntimeError("mainScreen error") + + ws = NSWorkspace.sharedWorkspace() + if not ws: + raise RuntimeError("sharedWorkspace error") + + # If we're just checking the image path, check it and then return. + # A successful exit code (0) indicates the paths match. + if args.checkBackgroundImagePath is not None: + # Get existing desktop image path and resolve it + existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) + existingImagePath = existingImageURL.path() + existingImagePathReal = os.path.realpath(existingImagePath) + logger.debug("existing desktop image: %s" % existingImagePath) + logger.debug("existing desktop image realpath: %s" % existingImagePath) + + # Resolve the path we're going to check + checkImagePathReal = os.path.realpath(args.checkBackgroundImagePath) + logger.debug("check desktop image: %s" % args.checkBackgroundImagePath) + logger.debug("check desktop image realpath: %s" % checkImagePathReal) + + if existingImagePathReal == checkImagePathReal: + print("desktop image path matches provided path") + return True + + print("desktop image path does NOT match provided path") + return False + + # Log the current desktop image + if args.verbose: + existingImageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) + logger.debug("existing desktop image: %s" % existingImageURL.path()) + + # Set the desktop image + if args.newBackgroundImagePath is not None: + newImagePath = args.newBackgroundImagePath + if not os.path.exists(newImagePath): + logger.critical("%s does not exist" % newImagePath) + return False + if not os.access(newImagePath, os.R_OK): + logger.critical("%s is not readable" % newImagePath) + return False + + logger.debug("new desktop image to set: %s" % newImagePath) + newImageURL = NSURL.fileURLWithPath_(newImagePath) + logger.debug("new desktop image URL to set: %s" % newImageURL) + + status = False + (status, error) = ws.setDesktopImageURL_forScreen_options_error_( + newImageURL, focussedScreen, None, None + ) + if not status: + raise RuntimeError("setDesktopImageURL error") + + # Print the current desktop image + imageURL = getCurrentDesktopImageURL(focussedScreen, ws, logger) + imagePath = imageURL.path() + imagePathReal = os.path.realpath(imagePath) + logger.debug("updated desktop image URL: %s" % imageURL) + logger.debug("updated desktop image path: %s" % imagePath) + logger.debug("updated desktop image path (resolved): %s" % imagePathReal) + print(imagePathReal) + return True def getCurrentDesktopImageURL(focussedScreen, workspace, logger): - imageURL = workspace.desktopImageURLForScreen_(focussedScreen) - if not imageURL: - raise RuntimeError("desktopImageURLForScreen returned invalid URL") - if not imageURL.isFileURL(): - logger.warning("desktop image URL is not a file URL") - return imageURL + imageURL = workspace.desktopImageURLForScreen_(focussedScreen) + if not imageURL: + raise RuntimeError("desktopImageURLForScreen returned invalid URL") + if not imageURL.isFileURL(): + logger.warning("desktop image URL is not a file URL") + return imageURL if __name__ == "__main__": - if not main(): - sys.exit(1) - else: - sys.exit(0) + if not main(): + sys.exit(1) + else: + sys.exit(0) diff --git a/src/zen/tests/pinned/browser.toml b/src/zen/tests/pinned/browser.toml index d0013e231..bd5d6e5bf 100644 --- a/src/zen/tests/pinned/browser.toml +++ b/src/zen/tests/pinned/browser.toml @@ -5,14 +5,22 @@ [DEFAULT] prefs = ["zen.workspaces.separate-essentials=false"] -["browser_pinned_unload_changed.js"] -["browser_pinned_unload_noreset.js"] -["browser_pinned_nounload_reset.js"] -["browser_pinned_switch.js"] -["browser_pinned_reset_noswitch.js"] -["browser_pinned_close.js"] +["browser_issue_8726.js"] + ["browser_pinned_changed.js"] + +["browser_pinned_close.js"] + ["browser_pinned_created.js"] + +["browser_pinned_nounload_reset.js"] + +["browser_pinned_reset_noswitch.js"] + +["browser_pinned_switch.js"] + ["browser_pinned_to_essential.js"] -["browser_issue_8726.js"] +["browser_pinned_unload_changed.js"] + +["browser_pinned_unload_noreset.js"] diff --git a/src/zen/tests/split_view/browser.toml b/src/zen/tests/split_view/browser.toml index d2b498968..af1040a3e 100644 --- a/src/zen/tests/split_view/browser.toml +++ b/src/zen/tests/split_view/browser.toml @@ -9,9 +9,15 @@ support-files = [ ] ["browser_basic_split_view.js"] -["browser_split_inset_checks.js"] -["browser_split_groups.js"] + ["browser_split_browser_duplication.js"] -["browser_split_view_with_glance.js"] -["browser_split_view_with_folders.js"] + +["browser_split_groups.js"] + +["browser_split_inset_checks.js"] + ["browser_split_view_empty.js"] + +["browser_split_view_with_folders.js"] + +["browser_split_view_with_glance.js"] diff --git a/src/zen/tests/tabs/browser.toml b/src/zen/tests/tabs/browser.toml index f383ece5d..ba217cc18 100644 --- a/src/zen/tests/tabs/browser.toml +++ b/src/zen/tests/tabs/browser.toml @@ -7,12 +7,16 @@ support-files = [ "head.js", ] -["browser_tabs_empty_checks.js"] -["browser_tabs_close_recently.js"] -["browser_tabs_fetch_checks.js"] -["browser_tabs_cycle_by_attribute.js"] ["browser_drag_drop_vertical.js"] tags = [ "drag-drop", "vertical-tabs" ] + +["browser_tabs_close_recently.js"] + +["browser_tabs_cycle_by_attribute.js"] + +["browser_tabs_empty_checks.js"] + +["browser_tabs_fetch_checks.js"] diff --git a/src/zen/tests/ub-actions/browser.toml b/src/zen/tests/ub-actions/browser.toml index c3b3936c2..b0915f7ac 100644 --- a/src/zen/tests/ub-actions/browser.toml +++ b/src/zen/tests/ub-actions/browser.toml @@ -2,4 +2,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -["browser_ub_actions_search.js"] \ No newline at end of file +[DEFAULT] + +["browser_ub_actions_search.js"] diff --git a/src/zen/tests/urlbar/browser.toml b/src/zen/tests/urlbar/browser.toml index c451b796e..4f7b7194e 100644 --- a/src/zen/tests/urlbar/browser.toml +++ b/src/zen/tests/urlbar/browser.toml @@ -9,4 +9,5 @@ support-files = [ ] ["browser_floating_urlbar.js"] + ["browser_issue_7385.js"] diff --git a/src/zen/tests/window_sync/browser.toml b/src/zen/tests/window_sync/browser.toml index a25425af3..0a493436d 100644 --- a/src/zen/tests/window_sync/browser.toml +++ b/src/zen/tests/window_sync/browser.toml @@ -8,5 +8,6 @@ support-files = [ "head.js", ] -["browser_sync_tab_open.js"] ["browser_sync_tab_label.js"] + +["browser_sync_tab_open.js"] diff --git a/src/zen/tests/workspaces/browser.toml b/src/zen/tests/workspaces/browser.toml index d97d7ed65..ac77baa44 100644 --- a/src/zen/tests/workspaces/browser.toml +++ b/src/zen/tests/workspaces/browser.toml @@ -9,13 +9,19 @@ support-files = [ ] ["browser_basic_workspaces.js"] -["browser_workspace_bookmarks.js"] -["browser_double_click_newtab.js"] -["browser_overflow_scrollbox.js"] -["browser_issue_8699.js"] -["browser_issue_9900.js"] +["browser_double_click_newtab.js"] + ["browser_issue_10455.js"] +["browser_issue_8699.js"] + +["browser_issue_9900.js"] + +["browser_overflow_scrollbox.js"] + ["browser_private_mode.js"] + ["browser_private_mode_startup.js"] + +["browser_workspace_bookmarks.js"] diff --git a/src/zen/toolkit/common/ZenCommonUtils.cpp b/src/zen/toolkit/common/ZenCommonUtils.cpp index 154f3fbe7..a8d1e478d 100644 --- a/src/zen/toolkit/common/ZenCommonUtils.cpp +++ b/src/zen/toolkit/common/ZenCommonUtils.cpp @@ -25,10 +25,10 @@ using WindowGlobalChild = mozilla::dom::WindowGlobalChild; namespace { /** - * @brief Helper function to fetch the most recent window proxy. - * @param aWindow The window to query. - * @returns The most recent window. - */ + * @brief Helper function to fetch the most recent window proxy. + * @param aWindow The window to query. + * @returns The most recent window. + */ static nsresult GetMostRecentWindowProxy(mozIDOMWindowProxy** aWindow) { nsresult rv; nsCOMPtr med( @@ -40,9 +40,9 @@ static nsresult GetMostRecentWindowProxy(mozIDOMWindowProxy** aWindow) { return NS_ERROR_FAILURE; } /** - * @brief Helper function to query and get a reference to the window. - * @param aWindow The window to query. - */ + * @brief Helper function to query and get a reference to the window. + * @param aWindow The window to query. + */ static nsCOMPtr GetMostRecentWindow() { nsCOMPtr aWindow; nsresult rv = GetMostRecentWindowProxy(getter_AddRefs(aWindow)); @@ -51,12 +51,12 @@ static nsCOMPtr GetMostRecentWindow() { } return aWindow; } -} +} // namespace using mozilla::dom::WindowGlobalChild; #define NS_ZEN_CAN_SHARE_FAILURE() \ - *canShare = false; \ + *canShare = false; \ return NS_OK; NS_IMETHODIMP @@ -80,28 +80,29 @@ ZenCommonUtils::CanShare(bool* canShare) { } NS_IMETHODIMP -ZenCommonUtils::Share(nsIURI* url, const nsACString& title, const nsACString& text, - uint32_t aX, uint32_t aY, uint32_t aWidth, uint32_t aHeight) { +ZenCommonUtils::Share(nsIURI* url, const nsACString& title, + const nsACString& text, uint32_t aX, uint32_t aY, + uint32_t aWidth, uint32_t aHeight) { auto aWindow = GetMostRecentWindow(); if (!aWindow) { return NS_ERROR_NOT_AVAILABLE; } if (!IsSharingSupported()) { - return NS_OK; // We don't want to throw an error here + return NS_OK; // We don't want to throw an error here } return ShareInternal(aWindow, url, title, text, aX, aY, aWidth, aHeight); } -nsresult ZenCommonUtils::ShareInternal(nsCOMPtr& aWindow, nsIURI* url, - const nsACString& title, const nsACString& text, uint32_t aX, uint32_t aY, - uint32_t aWidth, uint32_t aHeight) { +nsresult ZenCommonUtils::ShareInternal(nsCOMPtr& aWindow, + nsIURI* url, const nsACString& title, + const nsACString& text, uint32_t aX, + uint32_t aY, uint32_t aWidth, + uint32_t aHeight) { // We shoud've had done pointer checks before, so we can assume // aWindow is valid. #ifdef NS_ZEN_CAN_SHARE_NATIVE - return ::nsZenNativeShareInternal::ShowNativeDialog( - aWindow, url, title, text, - aX, aY, aWidth, aHeight - ); + return ::nsZenNativeShareInternal::ShowNativeDialog(aWindow, url, title, text, + aX, aY, aWidth, aHeight); #else return NS_ERROR_NOT_IMPLEMENTED; #endif @@ -118,4 +119,4 @@ auto ZenCommonUtils::IsSharingSupported() -> bool { #endif } -} // namespace: zen \ No newline at end of file +} // namespace zen diff --git a/src/zen/toolkit/common/ZenCommonUtils.h b/src/zen/toolkit/common/ZenCommonUtils.h index ac51b5b37..d940d0286 100644 --- a/src/zen/toolkit/common/ZenCommonUtils.h +++ b/src/zen/toolkit/common/ZenCommonUtils.h @@ -40,9 +40,9 @@ class ZenCommonUtils final : public nsIZenCommonUtils { * @returns A promise that resolves when the share is complete. */ static auto ShareInternal(nsCOMPtr& aWindow, nsIURI* url, - const nsACString& title, const nsACString& text, uint32_t aX, uint32_t aY, - uint32_t aWidth, uint32_t aHeight) - -> nsresult; + const nsACString& title, const nsACString& text, + uint32_t aX, uint32_t aY, uint32_t aWidth, + uint32_t aHeight) -> nsresult; /** * @brief Helper function to play haptic feedback. */ @@ -56,6 +56,6 @@ class ZenCommonUtils final : public nsIZenCommonUtils { #endif }; -} // namespace zen +} // namespace zen #endif diff --git a/src/zen/toolkit/common/ZenShareInternal.h b/src/zen/toolkit/common/ZenShareInternal.h index fd0bee5cf..c3c53f5b7 100644 --- a/src/zen/toolkit/common/ZenShareInternal.h +++ b/src/zen/toolkit/common/ZenShareInternal.h @@ -12,26 +12,27 @@ #include "nsIURI.h" #if defined(XP_WIN) || defined(XP_MACOSX) -#define NS_ZEN_CAN_SHARE_NATIVE true +# define NS_ZEN_CAN_SHARE_NATIVE true class nsZenNativeShareInternal final { public: /** - * @brief Use the native share dialog. This only works on Windows and MacOS - * since the native share dialog is not available on other platforms. - * Macos does need pointer coordinates to show the share dialog while - * Windows does not since it just displays a dialog on the middle of the - * screen. - * @param aWindow The window to use for the share dialog. - * @param aUrl The URL to share. - * @param aTitle The title of the share. - * @param aText The text to share. - * @returns void - */ - static auto ShowNativeDialog(nsCOMPtr& aWindow, nsIURI* aUrl, - const nsACString& aTitle, const nsACString& aText, uint32_t aX = 0, uint32_t aY = 0, - uint32_t aWidth = 0, uint32_t aHeight = 0) - -> nsresult; + * @brief Use the native share dialog. This only works on Windows and MacOS + * since the native share dialog is not available on other platforms. + * Macos does need pointer coordinates to show the share dialog while + * Windows does not since it just displays a dialog on the middle of the + * screen. + * @param aWindow The window to use for the share dialog. + * @param aUrl The URL to share. + * @param aTitle The title of the share. + * @param aText The text to share. + * @returns void + */ + static auto ShowNativeDialog(nsCOMPtr& aWindow, + nsIURI* aUrl, const nsACString& aTitle, + const nsACString& aText, uint32_t aX = 0, + uint32_t aY = 0, uint32_t aWidth = 0, + uint32_t aHeight = 0) -> nsresult; nsZenNativeShareInternal() = default; ~nsZenNativeShareInternal() = default; diff --git a/src/zen/toolkit/common/cocoa/ZenHapticFeedback.mm b/src/zen/toolkit/common/cocoa/ZenHapticFeedback.mm index 060b6a426..ae8f3fc16 100644 --- a/src/zen/toolkit/common/cocoa/ZenHapticFeedback.mm +++ b/src/zen/toolkit/common/cocoa/ZenHapticFeedback.mm @@ -21,7 +21,8 @@ namespace zen { nsresult ZenCommonUtils::PlayHapticFeedbackInternal() { NS_OBJC_BEGIN_TRY_BLOCK_RETURN; if (@available(macOS 10.14, *)) { - id performer = [NSHapticFeedbackManager defaultPerformer]; + id performer = + [NSHapticFeedbackManager defaultPerformer]; [performer performFeedbackPattern:NSHapticFeedbackPatternAlignment performanceTime:NSHapticFeedbackPerformanceTimeDefault]; } @@ -29,4 +30,4 @@ nsresult ZenCommonUtils::PlayHapticFeedbackInternal() { NS_OBJC_END_TRY_BLOCK_RETURN(NS_OK); } -} +} // namespace zen diff --git a/src/zen/toolkit/common/cocoa/ZenShareInternal.mm b/src/zen/toolkit/common/cocoa/ZenShareInternal.mm index b59904b69..76f073510 100644 --- a/src/zen/toolkit/common/cocoa/ZenShareInternal.mm +++ b/src/zen/toolkit/common/cocoa/ZenShareInternal.mm @@ -26,8 +26,8 @@ using ::mozilla::widget::WidgetUtils; * @param a_nativeWindow The pointer to the native NSWindow. * @return NS_OK on success, or an error code on failure. */ -static nsresult GetNativeWindowPointerFromDOMWindow(mozIDOMWindowProxy* a_window, - NSWindow** a_nativeWindow) { +static nsresult GetNativeWindowPointerFromDOMWindow( + mozIDOMWindowProxy* a_window, NSWindow** a_nativeWindow) { *a_nativeWindow = nil; if (!a_window) return NS_ERROR_INVALID_ARG; nsPIDOMWindowOuter* win = nsPIDOMWindowOuter::From(a_window); @@ -38,12 +38,12 @@ static nsresult GetNativeWindowPointerFromDOMWindow(mozIDOMWindowProxy* a_window *a_nativeWindow = (NSWindow*)widget->GetNativeData(NS_NATIVE_WINDOW); return NS_OK; } -} +} // namespace zen -auto nsZenNativeShareInternal::ShowNativeDialog(nsCOMPtr& aWindow, - nsIURI* aUrl, const nsACString& aTitle, const nsACString& aText, uint32_t aX, uint32_t aY, - uint32_t aWidth, uint32_t aHeight) - -> nsresult { +auto nsZenNativeShareInternal::ShowNativeDialog( + nsCOMPtr& aWindow, nsIURI* aUrl, + const nsACString& aTitle, const nsACString& aText, uint32_t aX, uint32_t aY, + uint32_t aWidth, uint32_t aHeight) -> nsresult { // Just use the URL since apple doesn't support sharing text // and title in the share dialog nsAutoCString pageUrlAsStringTemp; @@ -53,9 +53,8 @@ auto nsZenNativeShareInternal::ShowNativeDialog(nsCOMPtr& aW } else { pageUrlAsStringTemp.SetIsVoid(true); } - NSURL* pageUrl = nsCocoaUtils::ToNSURL( - NS_ConvertUTF8toUTF16(pageUrlAsStringTemp) - ); + NSURL* pageUrl = + nsCocoaUtils::ToNSURL(NS_ConvertUTF8toUTF16(pageUrlAsStringTemp)); if (!pageUrl || (![pageUrl.scheme isEqualToString:@"https"] && ![pageUrl.scheme isEqualToString:@"http"])) { return NS_ERROR_FAILURE; diff --git a/src/zen/toolkit/common/nsIZenCommonUtils.idl b/src/zen/toolkit/common/nsIZenCommonUtils.idl index 1ceb714c2..bdfa2ac70 100644 --- a/src/zen/toolkit/common/nsIZenCommonUtils.idl +++ b/src/zen/toolkit/common/nsIZenCommonUtils.idl @@ -20,7 +20,7 @@ interface nsIZenCommonUtils : nsISupports { * @param y The y coordinate of the share dialog. * @returns A promise that resolves when the share is complete. */ - void share(in nsIURI url, in ACString title, in ACString text, + void share(in nsIURI url, in ACString title, in ACString text, in uint32_t x, in uint32_t y, in uint32_t width, in uint32_t height); /* * @brief Check if the current context can share data. @@ -33,4 +33,3 @@ interface nsIZenCommonUtils : nsISupports { */ void playHapticFeedback(); }; - diff --git a/src/zen/toolkit/common/windows/ZenShareInternal.cpp b/src/zen/toolkit/common/windows/ZenShareInternal.cpp index 3d7248ac4..29dfcd66b 100644 --- a/src/zen/toolkit/common/windows/ZenShareInternal.cpp +++ b/src/zen/toolkit/common/windows/ZenShareInternal.cpp @@ -7,22 +7,22 @@ namespace zen { /** -* @brief Helper function to convert UTF-8 to UTF-16. -* @param aStr The UTF-8 string to convert. -* @returns The converted UTF-16 string. -*/ + * @brief Helper function to convert UTF-8 to UTF-16. + * @param aStr The UTF-8 string to convert. + * @returns The converted UTF-16 string. + */ inline NS_ConvertUTF8toUTF16 NS_ConvertUTF8toUTF16_MaybeVoid( const nsACString& aStr) { auto str = NS_ConvertUTF8toUTF16(aStr); str.SetIsVoid(aStr.IsVoid()); return str; } -} // namespace: zen +} // namespace zen auto nsZenNativeShareInternal::ShowNativeDialog( - nsCOMPtr& aWindow, nsIURI* aUrl, const nsACString& aTitle, - const nsACString& aText, uint32_t aX, uint32_t aY, uint32_t aWidth, uint32_t aHeight) - -> nsresult { + nsCOMPtr& aWindow, nsIURI* aUrl, + const nsACString& aTitle, const nsACString& aText, uint32_t aX, uint32_t aY, + uint32_t aWidth, uint32_t aHeight) -> nsresult { nsAutoCString urlString; if (aUrl) { nsresult rv = aUrl->GetSpec(urlString); diff --git a/src/zen/vendor/motion.min.mjs b/src/zen/vendor/motion.min.mjs index aa1b6d592..80c0c23f6 100644 --- a/src/zen/vendor/motion.min.mjs +++ b/src/zen/vendor/motion.min.mjs @@ -1 +1,5 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ + !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={})}(this,function(t){"use strict";function e(t,e){-1===t.indexOf(e)&&t.push(e)}function n(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const i=(t,e,n)=>n>e?e:n{},t.invariant=()=>{},"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(t.warning=(t,e,n)=>{t||"undefined"==typeof console||console.warn(s(e,n))},t.invariant=(t,e,n)=>{if(!t)throw new Error(s(e,n))});const o={},r=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function a(t){return"object"==typeof t&&null!==t}const l=t=>/^0[^.\s]+$/u.test(t);function c(t){let e;return()=>(void 0===e&&(e=t()),e)}const u=t=>t,h=(t,e)=>n=>e(t(n)),d=(...t)=>t.reduce(h),p=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class m{constructor(){this.subscriptions=[]}add(t){return e(this.subscriptions,t),()=>n(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s1e3*t,y=t=>t/1e3;function g(t,e){return e?t*(1e3/e):0}const v=new Set;const x=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},T=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function w(t,e,n,i){if(t===e&&n===i)return u;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=T(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:T(s(t),e,i)}const b=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,S=t=>e=>1-t(1-e),A=w(.33,1.53,.69,.99),V=S(A),P=b(V),E=t=>(t*=2)<1?.5*V(t):.5*(2-Math.pow(2,-10*(t-1))),M=t=>1-Math.sin(Math.acos(t)),k=S(M),D=b(M),R=w(.42,0,1,1),B=w(0,0,.58,1),C=w(.42,0,.58,1);const j=t=>Array.isArray(t)&&"number"!=typeof t[0];function L(t,e){return j(t)?t[x(0,t.length,e)]:t}const O=t=>Array.isArray(t)&&"number"==typeof t[0],F={linear:u,easeIn:R,easeInOut:C,easeOut:B,circIn:M,circInOut:D,circOut:k,backIn:V,backInOut:P,backOut:A,anticipate:E},I=e=>{if(O(e)){t.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[n,i,s,o]=e;return w(n,i,s,o)}return"string"==typeof e?(t.invariant(void 0!==F[e],`Invalid easing type '${e}'`,"invalid-easing-type"),F[e]):e},W=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],N={value:null,addProjectionMetrics:null};function U(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=W.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(c),e&&N.value&&N.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(r,e?n:void 0),t),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:h,update:d,preRender:p,render:m,postRender:f}=a,y=()=>{const r=o.useManualTiming?s.timestamp:performance.now();n=!1,o.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(r-s.timestamp,40),1)),s.timestamp=r,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),h.process(s),d.process(s),p.process(s),m.process(s),f.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))};return{schedule:W.reduce((e,o)=>{const r=a[o];return e[o]=(e,o=!1,a=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(y)),r.schedule(e,o,a)),e},{}),cancel:t=>{for(let e=0;e(void 0===X&&G.set(K.isProcessing||o.useManualTiming?K.timestamp:performance.now()),X),set:t=>{X=t,queueMicrotask(H)}},q={layout:0,mainThread:0,waapi:0},Z=t=>e=>"string"==typeof e&&e.startsWith(t),_=Z("--"),J=Z("var(--"),Q=t=>!!J(t)&&tt.test(t.split("/*")[0].trim()),tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function et(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const nt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},it={...nt,transform:t=>i(0,1,t)},st={...nt,default:1},ot=t=>Math.round(1e5*t)/1e5,rt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const at=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,lt=(t,e)=>n=>Boolean("string"==typeof n&&at.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ct=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(rt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},ut={...nt,transform:t=>Math.round((t=>i(0,255,t))(t))},ht={test:lt("rgb","red"),parse:ct("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ut.transform(t)+", "+ut.transform(e)+", "+ut.transform(n)+", "+ot(it.transform(i))+")"};const dt={test:lt("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:ht.transform},pt=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),mt=pt("deg"),ft=pt("%"),yt=pt("px"),gt=pt("vh"),vt=pt("vw"),xt=(()=>({...ft,parse:t=>ft.parse(t)/100,transform:t=>ft.transform(100*t)}))(),Tt={test:lt("hsl","hue"),parse:ct("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ft.transform(ot(e))+", "+ft.transform(ot(n))+", "+ot(it.transform(i))+")"},wt={test:t=>ht.test(t)||dt.test(t)||Tt.test(t),parse:t=>ht.test(t)?ht.parse(t):Tt.test(t)?Tt.parse(t):dt.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?ht.transform(t):Tt.transform(t),getAnimatableNone:t=>{const e=wt.parse(t);return e.alpha=0,wt.transform(e)}},bt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const St="number",At="color",Vt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Pt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(Vt,t=>(wt.test(t)?(i.color.push(o),s.push(At),n.push(wt.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(St),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Et(t){return Pt(t).values}function Mt(t){const{split:e,types:n}=Pt(t),i=e.length;return t=>{let s="";for(let o=0;o"number"==typeof t?0:wt.test(t)?wt.getAnimatableNone(t):t;const Dt={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(rt)?.length||0)+(t.match(bt)?.length||0)>0},parse:Et,createTransformer:Mt,getAnimatableNone:function(t){const e=Et(t);return Mt(t)(e.map(kt))}};function Rt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Bt({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=Rt(a,i,t+1/3),o=Rt(a,i,t),r=Rt(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Ct(t,e){return n=>n>0?e:t}const jt=(t,e,n)=>t+(e-t)*n,Lt=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ot=[dt,ht,Tt];function Ft(e){const n=(i=e,Ot.find(t=>t.test(i)));var i;if(t.warning(Boolean(n),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(e);return n===Tt&&(s=Bt(s)),s}const It=(t,e)=>{const n=Ft(t),i=Ft(e);if(!n||!i)return Ct(t,e);const s={...n};return t=>(s.red=Lt(n.red,i.red,t),s.green=Lt(n.green,i.green,t),s.blue=Lt(n.blue,i.blue,t),s.alpha=jt(n.alpha,i.alpha,t),ht.transform(s))},Wt=new Set(["none","hidden"]);function Nt(t,e){return Wt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ut(t,e){return n=>jt(t,e,n)}function $t(t){return"number"==typeof t?Ut:"string"==typeof t?Q(t)?Ct:wt.test(t)?It:Yt:Array.isArray(t)?zt:"object"==typeof t?wt.test(t)?It:Kt:Ct}function zt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>$t(t)(t,e[n]));return t=>{for(let e=0;e{for(const e in i)n[e]=i[e](t);return n}}const Yt=(e,n)=>{const i=Dt.createTransformer(n),s=Pt(e),o=Pt(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Wt.has(e)&&!o.values.length||Wt.has(n)&&!s.values.length?Nt(e,n):d(zt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>$.update(e,t),stop:()=>z(e),now:()=>K.isProcessing?K.timestamp:G.now()}},Gt=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e=qt?1/0:e}function _t(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Zt(i),qt);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:y(s)}}function Jt(t,e,n){const i=Math.max(e-5,0);return g(n-t(i),e-i)}const Qt=100,te=10,ee=1,ne=0,ie=800,se=.3,oe=.3,re={granular:.01,default:2},ae={granular:.005,default:.5},le=.01,ce=10,ue=.05,he=1,de=.001;function pe({duration:e=ie,bounce:n=se,velocity:s=ne,mass:o=ee}){let r,a;t.warning(e<=f(ce),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-n;l=i(ue,he,l),e=i(le,ce,y(e)),l<1?(r=t=>{const n=t*l,i=n*e,o=n-s,r=fe(t,l),a=Math.exp(-i);return de-o/r*a},a=t=>{const n=t*l*e,i=n*s+s,o=Math.pow(l,2)*Math.pow(t,2)*e,a=Math.exp(-n),c=fe(Math.pow(t,2),l);return(-r(t)+de>0?-1:1)*((i-o)*a)/c}):(r=t=>Math.exp(-t*e)*((t-s)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(s-t)));const c=function(t,e,n){let i=n;for(let n=1;nvoid 0!==t[e])}function xe(t=oe,e=se){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const r=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ne,stiffness:Qt,damping:te,mass:ee,isResolvedFromDuration:!1,...t};if(!ve(t,ge)&&ve(t,ye))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(1.2*n),o=s*s,r=2*i(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:ee,stiffness:o,damping:r}}else{const n=pe({...t,velocity:0});e={...e,...n,mass:ee},e.isResolvedFromDuration=!0}return e}({...n,velocity:-y(n.velocity||0)}),g=p||0,v=u/(2*Math.sqrt(c*h)),x=a-r,T=y(Math.sqrt(c/h)),w=Math.abs(x)<5;let b;if(s||(s=w?re.granular:re.default),o||(o=w?ae.granular:ae.default),v<1){const t=fe(T,v);b=e=>{const n=Math.exp(-v*T*e);return a-n*((g+v*T*x)/t*Math.sin(t*e)+x*Math.cos(t*e))}}else if(1===v)b=t=>a-Math.exp(-T*t)*(x+(g+T*x)*t);else{const t=T*Math.sqrt(v*v-1);b=e=>{const n=Math.exp(-v*T*e),i=Math.min(t*e,300);return a-n*((g+v*T*x)*Math.sinh(i)+t*x*Math.cosh(i))/t}}const S={calculatedDuration:m&&d||null,next:t=>{const e=b(t);if(m)l.done=t>=d;else{let n=0===t?g:0;v<1&&(n=0===t?f(g):Jt(b,t,e));const i=Math.abs(n)<=s,r=Math.abs(a-e)<=o;l.done=i&&r}return l.value=l.done?a:e,l},toString:()=>{const t=Math.min(Zt(S),qt),e=Gt(e=>S.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return S}function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&el)&&(T=t,w=xe({keyframes:[d.value,p(d.value)],velocity:Jt(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function we(e,n,{clamp:s=!0,ease:r,mixer:a}={}){const l=e.length;if(t.invariant(l===n.length,"Both input and output ranges must be the same length","range-length"),1===l)return()=>n[0];if(2===l&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=function(t,e,n){const i=[],s=n||o.mix||Xt,r=t.length-1;for(let n=0;n{if(c&&t1)for(;if(i(e[0],e[l-1],t)):f}function be(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=p(0,e,i);t.push(jt(n,1,s))}}function Se(t){const e=[0];return be(e,t.length-1),e}function Ae(t,e){return t.map(t=>t*e)}function Ve(t,e){return t.map(()=>e||C).splice(0,t.length-1)}function Pe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=j(i)?i.map(I):I(i),o={done:!1,value:e[0]},r=we(Ae(n&&n.length===e.length?n:Se(e),t),e,{ease:Array.isArray(s)?s:Ve(e,s)});return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}xe.applyToOptions=t=>{const e=_t(t,100,xe);return t.ease=e.ease,t.duration=f(e.duration),t.type="keyframes",t};const Ee=t=>null!==t;function Me(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(Ee),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const ke={decay:Te,inertia:Te,tween:Pe,keyframes:Pe,spring:xe};function De(t){"string"==typeof t.type&&(t.type=ke[t.type])}class Re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Be=t=>t/100;class Ce extends Re{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==G.now()&&this.tick(G.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},q.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;De(t);const{type:e=Pe,repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||Pe;a!==Pe&&"number"!=typeof r[0]&&(this.mixKeyframes=d(Be,Xt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=Zt(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=n;if(h){const t=Math.min(this.currentTime,s)/a;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===d?(n=1-n,p&&(n-=p/a)):"mirror"===d&&(T=r)),x=i(0,1,n)*a}const w=v?{done:!1,value:u[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Te&&(w.value=Me(u,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return y(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(this.currentTime)}set time(t){t=f(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(G.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=y(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ht,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(G.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,q.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function je(t){for(let e=1;e180*t/Math.PI,Oe=t=>{const e=Le(Math.atan2(t[1],t[0]));return Ie(e)},Fe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Oe,rotateZ:Oe,skewX:t=>Le(Math.atan(t[1])),skewY:t=>Le(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ie=t=>((t%=360)<0&&(t+=360),t),We=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ne=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ue={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:We,scaleY:Ne,scale:t=>(We(t)+Ne(t))/2,rotateX:t=>Ie(Le(Math.atan2(t[6],t[5]))),rotateY:t=>Ie(Le(Math.atan2(-t[2],t[0]))),rotateZ:Oe,rotate:Oe,skewX:t=>Le(Math.atan(t[4])),skewY:t=>Le(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function $e(t){return t.includes("scale")?1:0}function ze(t,e){if(!t||"none"===t)return $e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ue,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Fe,s=e}if(!s)return $e(e);const o=i[e],r=s[1].split(",").map(Ye);return"function"==typeof o?o(r):r[o]}const Ke=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return ze(n,e)};function Ye(t){return parseFloat(t.trim())}const Xe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=(()=>new Set(Xe))(),Ge=t=>t===nt||t===yt,qe=new Set(["x","y","z"]),Ze=Xe.filter(t=>!qe.has(t));const _e={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>ze(e,"x"),y:(t,{transform:e})=>ze(e,"y")};_e.translateX=_e.x,_e.translateY=_e.y;const Je=new Set;let Qe=!1,tn=!1,en=!1;function nn(){if(tn){const t=Array.from(Je).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}tn=!1,Qe=!1,Je.forEach(t=>t.complete(en)),Je.clear()}function sn(){Je.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(tn=!0)})}function on(){en=!0,sn(),nn(),en=!1}class rn{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Je.add(this),Qe||(Qe=!0,$.read(sn),$.resolveKeyframes(nn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}je(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Je.delete(this)}cancel(){"scheduled"===this.state&&(Je.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const an=t=>t.startsWith("--");function ln(t,e,n){an(e)?t.style.setProperty(e,n):t.style[e]=n}const cn={};function un(t,e){const n=c(t);return()=>cn[e]??n()}const hn=un(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),dn=un(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),pn=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,mn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pn([0,.65,.55,1]),circOut:pn([.55,0,1,.45]),backIn:pn([.31,.01,.66,-.59]),backOut:pn([.33,1.53,.69,.99])};function fn(t,e){return t?"function"==typeof t?dn()?Gt(t,e):"ease-out":O(t)?pn(t):Array.isArray(t)?t.map(t=>fn(t,e)||mn.easeOut):mn[t]:void 0}function yn(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=fn(a,s);Array.isArray(h)&&(u.easing=h),N.value&&q.waapi++;const d={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};c&&(d.pseudoElement=c);const p=t.animate(u,d);return N.value&&p.finished.finally(()=>{q.waapi--}),p}function gn(t){return"function"==typeof t&&"applyToOptions"in t}function vn({type:t,...e}){return gn(t)&&dn()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xn extends Re{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=e,t.invariant("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=vn(e);this.animation=yn(n,i,s,c,o),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Me(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):ln(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return y(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+y(t)}get time(){return y(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=f(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&hn()?(this.animation.timeline=t,u):e(this)}}const Tn={anticipate:E,backInOut:P,circInOut:D};function wn(t){"string"==typeof t.ease&&t.ease in Tn&&(t.ease=Tn[t.ease])}class bn extends xn{constructor(t){wn(t),De(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:n,onComplete:s,element:o,...r}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const a=new Ce({...r,autoplay:!1}),l=Math.max(10,G.now()-this.startTime),c=i(0,10,l-10);e.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Sn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Dt.test(t)&&"0"!==t||t.startsWith("url(")));function An(t){t.duration=0,t.type="keyframes"}const Vn=new Set(["opacity","clipPath","filter","transform"]),Pn=c(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function En(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Pn()&&n&&Vn.has(n)&&("transform"!==n||!c)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class Mn extends Re{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=G.now();const h={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:c,...u},d=c?.KeyframeResolver||rn;this.keyframeResolver=new d(r,(t,e,n)=>this.onKeyframesResolved(t,e,h,!n),a,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:a,velocity:l,delay:c,isHandoff:h,onUpdate:d}=i;this.resolvedAt=G.now(),function(e,n,i,s){const o=e[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=e[e.length-1],a=Sn(o,n),l=Sn(r,n);return t.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=!h&&En(p),f=p.motionValue?.owner?.current,y=m?new bn({...p,element:f}):new Ce(p);y.finished.then(()=>{this.notifyFinished()}).catch(u),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),on()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class kn{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;ne.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Dn(this.animations,"duration")}get iterationDuration(){return Dn(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Dn(t,e){let n=0;for(let i=0;in&&(n=s)}return n}class Rn extends kn{then(t,e){return this.finished.finally(t).then(()=>{})}}class Bn extends xn{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const Cn=new WeakMap,jn=(t,e="")=>`${t}:${e}`;function Ln(t){const e=Cn.get(t)||new Map;return Cn.set(t,e),e}function On(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const Fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function In(t){const e=Fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Wn(e,n,i=1){t.invariant(i<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=In(e);if(!s)return;const a=window.getComputedStyle(n).getPropertyValue(s);if(a){const t=a.trim();return r(t)?parseFloat(t):t}return Q(o)?Wn(o,n,i+1):o}const Nn={type:"spring",stiffness:500,damping:25,restSpeed:10},Un={type:"keyframes",duration:.8},$n={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},zn=(t,{keyframes:e})=>e.length>2?Un:He.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Nn:$n,Kn=t=>null!==t;function Yn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Kn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function Xn(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Hn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Xn(n,t):n}function Gn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const qn=(t,e,n,i={},s,r)=>a=>{const l=Hn(i,t)||{},c=l.delay||i.delay||0;let{elapsed:u=0}=i;u-=f(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-u,onUpdate:t=>{e.set(t),l.onUpdate&&l.onUpdate(t)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:t,motionValue:e,element:r?void 0:s};Gn(l)||Object.assign(h,zn(t,h)),h.duration&&(h.duration=f(h.duration)),h.repeatDelay&&(h.repeatDelay=f(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let d=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(An(h),0===h.delay&&(d=!0)),(o.instantAnimations||o.skipAnimations||s?.shouldSkipAnimations)&&(d=!0,An(h),h.delay=0),h.allowFlatten=!l.type&&!l.ease,d&&!r&&void 0!==e.get()){const t=Yn(h.keyframes,l);if(void 0!==t)return void $.update(()=>{h.onUpdate(t),h.onComplete()})}return l.isSync?new Ce(h):new Mn(h)};function Zn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function _n(t,e,n,i){if("function"==typeof e){const[s,o]=Zn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Zn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function Jn(t,e,n){const i=t.getProps();return _n(i,e,void 0!==n?n:i.custom,t)}const Qn=new Set(["width","height","top","left","right","bottom",...Xe]),ti={current:void 0};class ei{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=G.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=G.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new m);const n=this.events[t].add(e);return"change"===t?()=>{n(),$.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ti.current&&ti.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=G.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return g(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ni(t,e){return new ei(t,e)}const ii=t=>Array.isArray(t);function si(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ni(n))}function oi(t){return ii(t)?t[t.length-1]||0:t}function ri(t,e){const n=Jn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){si(t,e,oi(o[e]))}}const ai=t=>Boolean(t&&t.getVelocity);function li(t){return Boolean(ai(t)&&t.add)}function ci(t,e){const n=t.getValue("willChange");if(li(n))return n.add(e);if(!n&&o.WillChange){const n=new o.WillChange("auto");t.addValue("willChange",n),n.add(e)}}function ui(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const hi="framerAppearId",di="data-"+ui(hi);function pi(t){return t.props[di]}function mi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function fi(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?Xn(o,l):l;const c=o?.reduceMotion;i&&(o=i);const u=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&mi(h,e))continue;const r={delay:n,...Hn(o||{},e)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(s)&&s===l&&!r.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=pi(t);if(n){const t=window.MotionHandoffAnimation(n,e,$);null!==t&&(r.startTime=t,d=!0)}}ci(t,e);const p=c??t.shouldReduceMotion;i.start(qn(e,i,s,p&&Qn.has(e)?{type:!1}:r,t,d));const m=i.animation;m&&u.push(m)}if(r){const e=()=>$.update(()=>{r&&ri(t,r)});u.length?Promise.all(u).then(e):e()}return u}function yi(t,e,n={}){const i=Jn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(fi(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(yi(l,e,{...r,delay:n+("function"==typeof i?0:i)+On(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function gi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>yi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=yi(t,e,n);else{const s="function"==typeof e?Jn(t,e,n.custom):e;i=Promise.all(fi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const vi=t=>e=>e.test(t),xi=[nt,yt,ft,mt,vt,gt,{test:t=>"auto"===t,parse:t=>t}],Ti=t=>xi.find(vi(t));function wi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||l(t))}const bi=new Set(["brightness","contrast","saturate","opacity"]);function Si(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(rt)||[];if(!i)return t;const s=n.replace(i,"");let o=bi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Ai=/\b([a-z-]*)\(.*?\)/gu,Vi={...Dt,getAnimatableNone:t=>{const e=t.match(Ai);return e?e.map(Si).join(" "):t}},Pi={...Dt,getAnimatableNone:t=>{const e=Dt.parse(t);return Dt.createTransformer(t)(e.map(t=>"number"==typeof t?0:"object"==typeof t?{...t,alpha:1}:t))}},Ei={...nt,transform:Math.round},Mi={rotate:mt,rotateX:mt,rotateY:mt,rotateZ:mt,scale:st,scaleX:st,scaleY:st,scaleZ:st,skew:mt,skewX:mt,skewY:mt,distance:yt,translateX:yt,translateY:yt,translateZ:yt,x:yt,y:yt,z:yt,perspective:yt,transformPerspective:yt,opacity:it,originX:xt,originY:xt,originZ:yt},ki={borderWidth:yt,borderTopWidth:yt,borderRightWidth:yt,borderBottomWidth:yt,borderLeftWidth:yt,borderRadius:yt,borderTopLeftRadius:yt,borderTopRightRadius:yt,borderBottomRightRadius:yt,borderBottomLeftRadius:yt,width:yt,maxWidth:yt,height:yt,maxHeight:yt,top:yt,right:yt,bottom:yt,left:yt,inset:yt,insetBlock:yt,insetBlockStart:yt,insetBlockEnd:yt,insetInline:yt,insetInlineStart:yt,insetInlineEnd:yt,padding:yt,paddingTop:yt,paddingRight:yt,paddingBottom:yt,paddingLeft:yt,paddingBlock:yt,paddingBlockStart:yt,paddingBlockEnd:yt,paddingInline:yt,paddingInlineStart:yt,paddingInlineEnd:yt,margin:yt,marginTop:yt,marginRight:yt,marginBottom:yt,marginLeft:yt,marginBlock:yt,marginBlockStart:yt,marginBlockEnd:yt,marginInline:yt,marginInlineStart:yt,marginInlineEnd:yt,fontSize:yt,backgroundPositionX:yt,backgroundPositionY:yt,...Mi,zIndex:Ei,fillOpacity:it,strokeOpacity:it,numOctaves:Ei},Di={...ki,color:wt,backgroundColor:wt,outlineColor:wt,fill:wt,stroke:wt,borderColor:wt,borderTopColor:wt,borderRightColor:wt,borderBottomColor:wt,borderLeftColor:wt,filter:Vi,WebkitFilter:Vi,mask:Pi,WebkitMask:Pi},Ri=t=>Di[t],Bi=new Set([Vi,Pi]);function Ci(t,e){let n=Ri(t);return Bi.has(n)||(n=Dt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ji=new Set(["auto","none","0"]);class Li extends rn{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Oi=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","fontSize","backgroundPositionX","backgroundPositionY"]);function Fi(t,e){for(let n=0;n{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Wi=new Set(["opacity","clipPath","filter","transform"]);function Ni(t,e,n){if(null==t)return[];if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(t=>null!=t)}function Ui(t){return(e,n)=>{const i=Ni(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const $i=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class zi{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const o=this.values.get(t);o&&o.onRemove();const r=()=>{const i=e.get();this.latest[t]=s?$i(i,ki[t]):i,n&&$.render(n)};r();const a=e.on("change",r);i&&e.addDependent(i);const l=()=>{a(),n&&z(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:l}),l}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function Ki(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new zi;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const Yi=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?ui(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},Xi=Ui(Ki(Yi)),Hi=Ki((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function Gi(t){return a(t)&&"offsetHeight"in t}const qi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const Zi=new Set(["originX","originY","originZ"]),_i=(t,e,n,i)=>{let s,o;return He.has(n)?(e.get("transform")||(Gi(t)||e.get("transformBox")||_i(t,e,"transformBox",new ei("fill-box")),e.set("transform",new ei("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=an(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},Ji=Ui(Ki(_i));const Qi=Ui(Ki((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return $.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>{const i=e.latest[n];t.setAttribute("stroke-dashoffset",""+-i)}):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new ei("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${n} ${i??1-Number(n)}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return Yi(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?_i:Yi)(t,e,n,i)}));const{schedule:ts,cancel:es}=U(queueMicrotask,!1),ns={x:!1,y:!1};function is(){return ns.x||ns.y}function ss(t,e){const n=Ni(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}const os=(t,e)=>!!e&&(t===e||os(t,e.parentElement)),rs=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,as=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ls(t){return as.has(t.tagName)||!0===t.isContentEditable}const cs=new Set(["INPUT","SELECT","TEXTAREA"]);const us=new WeakSet;function hs(t){return e=>{"Enter"===e.key&&t(e)}}function ds(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function ps(t){return rs(t)&&!is()}const ms=new WeakSet;function fs(t,e){const n=window.getComputedStyle(t);return an(e)?n.getPropertyValue(e):n[e]}function ys(t){return a(t)&&"ownerSVGElement"in t}const gs=new WeakMap;let vs;const xs=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ys(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ts=xs("inline","width","offsetWidth"),ws=xs("block","height","offsetHeight");function bs({target:t,borderBoxSize:e}){gs.get(t)?.forEach(n=>{n(t,{get width(){return Ts(t,e)},get height(){return ws(t,e)}})})}function Ss(t){t.forEach(bs)}function As(t,e){vs||"undefined"!=typeof ResizeObserver&&(vs=new ResizeObserver(Ss));const n=Ni(t);return n.forEach(t=>{let n=gs.get(t);n||(n=new Set,gs.set(t,n)),n.add(e),vs?.observe(t)}),()=>{n.forEach(t=>{const n=gs.get(t);n?.delete(e),n?.size||vs?.unobserve(t)})}}const Vs=new Set;let Ps;function Es(t){return Vs.add(t),Ps||(Ps=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Vs.forEach(e=>e(t))},window.addEventListener("resize",Ps)),()=>{Vs.delete(t),Vs.size||"function"!=typeof Ps||(window.removeEventListener("resize",Ps),Ps=void 0)}}function Ms(t,e){return"function"==typeof t?Es(t):As(t,e)}function ks(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return $.preUpdate(i,!0),()=>z(i)}function Ds(){const{value:t}=N;null!==t?(t.frameloop.rate.push(K.delta),t.animations.mainThread.push(q.mainThread),t.animations.waapi.push(q.waapi),t.animations.layout.push(q.layout)):z(Ds)}function Rs(t){return t.reduce((t,e)=>t+e,0)/t.length}function Bs(t,e=Rs){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Cs=t=>Math.round(1e3/t);function js(){N.value=null,N.addProjectionMetrics=null}function Ls(){const{value:t}=N;if(!t)throw new Error("Stats are not being measured");js(),z(Ds);const e={frameloop:{setup:Bs(t.frameloop.setup),rate:Bs(t.frameloop.rate),read:Bs(t.frameloop.read),resolveKeyframes:Bs(t.frameloop.resolveKeyframes),preUpdate:Bs(t.frameloop.preUpdate),update:Bs(t.frameloop.update),preRender:Bs(t.frameloop.preRender),render:Bs(t.frameloop.render),postRender:Bs(t.frameloop.postRender)},animations:{mainThread:Bs(t.animations.mainThread),waapi:Bs(t.animations.waapi),layout:Bs(t.animations.layout)},layoutProjection:{nodes:Bs(t.layoutProjection.nodes),calculatedTargetDeltas:Bs(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Bs(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Cs(n.min),n.max=Cs(n.max),n.avg=Cs(n.avg),[n.min,n.max]=[n.max,n.min],e}function Os(t){return ys(t)&&"svg"===t.tagName}function Fs(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Is(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=we(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Ws(t,e){const n=ni(ai(t)?t.get():t);return Ns(n,t,e),n}function Ns(t,e,n={}){const i=t.get();let s,o=null,r=i;const a="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,l=()=>{o&&(o.stop(),o=null)};if(t.attach((e,i)=>{r=e,s=t=>i(Us(t,a)),$.postRender(()=>{(()=>{l();const e=$s(t.get()),i=$s(r);e!==i&&(o=new Ce({keyframes:[e,i],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}))})(),t.events.animationStart?.notify(),o?.then(()=>{t.events.animationComplete?.notify()})})},l),ai(e)){const n=e.on("change",e=>t.set(Us(e,a))),i=t.on("destroy",n);return()=>{n(),i()}}return l}function Us(t,e){return e?t+e:t}function $s(t){return"number"==typeof t?t:parseFloat(t)}function zs(t){const e=[];ti.current=e;const n=t();ti.current=void 0;const i=ni(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>$.preRender(i,!1,!0),o=t.map(t=>t.on("change",s));e.on("destroy",()=>{o.forEach(t=>t()),z(i)})}(e,i,t),i}const Ks=[...xi,wt,Dt],Ys=t=>Ks.find(vi(t));function Xs(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Hs={},Gs=null;const qs=(t,e)=>{Hs[t]=e},Zs=()=>{Gs||(Gs=document.createElement("style"),Gs.id="motion-view");let t="";for(const e in Hs){const n=Hs[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}Gs.textContent=t,document.head.appendChild(Gs),Hs={}},_s=()=>{Gs&&Gs.parentElement&&Gs.parentElement.removeChild(Gs)};function Js(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function Qs(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function to(){return document.getAnimations().filter(Qs)}const eo=["layout","enter","exit","new","old"];function no(t){const{update:e,targets:n,options:i}=t;if(!document.startViewTransition)return new Promise(async t=>{await e(),t(new kn([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",n)||qs(":root",{"view-transition-name":"none"}),qs("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),Zs();const s=document.startViewTransition(async()=>{await e()});return s.finished.finally(()=>{_s()}),new Promise(t=>{s.ready.then(()=>{const e=to(),s=[];n.forEach((t,e)=>{for(const n of eo){if(!t[n])continue;const{keyframes:o,options:r}=t[n];for(let[t,a]of Object.entries(o)){if(!a)continue;const o={...Hn(i,t),...Hn(r,t)},l=Xs(n);if("opacity"===t&&!Array.isArray(a)){a=["new"===l?0:1,a]}"function"==typeof o.delay&&(o.delay=o.delay(0,1)),o.duration&&(o.duration=f(o.duration)),o.delay&&(o.delay=f(o.delay));const c=new xn({...o,element:document.documentElement,name:t,pseudoElement:`::view-transition-${l}(${e})`,keyframes:a});s.push(c)}}});for(const t of e){if("finished"===t.playState)continue;const{effect:e}=t;if(!(e&&e instanceof KeyframeEffect))continue;const{pseudoElement:o}=e;if(!o)continue;const r=Js(o);if(!r)continue;const a=n.get(r.layer);if(a)io(a,"enter")&&io(a,"exit")&&e.getKeyframes().some(t=>t.mixBlendMode)?s.push(new Bn(t)):t.cancel();else{const n="group"===r.type?"layout":"";let o={...Hn(i,n)};o.duration&&(o.duration=f(o.duration)),o=vn(o);const a=fn(o.ease,o.duration);e.updateTiming({delay:f(o.delay??0),duration:o.duration,easing:a}),s.push(new Bn(t))}}t(new kn(s))})})}function io(t,e){return t?.[e]?.keyframes.opacity}let so=[],oo=null;function ro(){oo=null;const[t]=so;var e;t&&(n(so,e=t),oo=e,no(e).then(t=>{e.notifyReady(t),t.finished.finally(ro)}))}function ao(){for(let t=so.length-1;t>=0;t--){const e=so[t],{interrupt:n}=e.options;if("immediate"===n){const n=so.slice(0,t+1).map(t=>t.update),i=so.slice(t+1);e.update=()=>{n.forEach(t=>t())},so=[e,...i];break}}oo&&"immediate"!==so[0]?.options.interrupt||ro()}class lo{constructor(t,e={}){var n;this.currentSubject="root",this.targets=new Map,this.notifyReady=u,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...e},n=this,so.push(n),ts.render(ao)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const co=()=>({translate:0,scale:1,origin:0,originPoint:0}),uo=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ho=()=>({min:0,max:0}),po=()=>({x:{min:0,max:0},y:{min:0,max:0}}),mo=new WeakMap;function fo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function yo(t){return"string"==typeof t||Array.isArray(t)}const go=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vo=["initial",...go];function xo(t){return fo(t.animate)||vo.some(e=>yo(t[e]))}function To(t){return Boolean(xo(t)||t.variants)}function wo(t,e,n){for(const i in e){const s=e[i],o=n[i];if(ai(s))t.addValue(i,s);else if(ai(o))t.addValue(i,ni(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,ni(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const bo={current:null},So={current:!1},Ao="undefined"!=typeof window;function Vo(){if(So.current=!0,Ao)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>bo.current=t.matches;t.addEventListener("change",e),e()}else bo.current=!1}const Po=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Eo={};class Mo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=rn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=G.now();this.renderScheduledAtthis.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(So.current||Vo(),this.shouldReduceMotion=bo.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),e.accelerate&&Wi.has(t)&&this.current instanceof HTMLElement){const{factory:n,keyframes:i,times:s,ease:o,duration:r}=e.accelerate,a=new xn({element:this.current,name:t,keyframes:i,times:s,ease:o,duration:f(r)}),l=n(a);return void this.valueSubscriptions.set(t,()=>{l(),a.cancel()})}const n=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&$.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Eo){const e=Eo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;ee.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=ni(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){let n=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=n&&("string"==typeof n&&(r(n)||l(n))?n=parseFloat(n):!Ys(n)&&Dt.test(e)&&(n=Ci(t,e)),this.setBaseTarget(t,ai(n)?n.get():n)),ai(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=_n(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||ai(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new m),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){ts.render(this.render)}}class ko extends Mo{constructor(){super(...arguments),this.KeyframeResolver=Li}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ai(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Do({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ro(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Bo(t){return void 0===t||1===t}function Co({scale:t,scaleX:e,scaleY:n}){return!Bo(t)||!Bo(e)||!Bo(n)}function jo(t){return Co(t)||Lo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Lo(t){return Oo(t.x)||Oo(t.y)}function Oo(t){return t&&"0%"!==t}function Fo(t,e,n){return n+e*(t-n)}function Io(t,e,n,i,s){return void 0!==s&&(t=Fo(t,s,i)),Fo(t,n,i)+e}function Wo(t,e=0,n=1,i,s){t.min=Io(t.min,e,n,i,s),t.max=Io(t.max,e,n,i,s)}function No(t,{x:e,y:n}){Wo(t.x,e.translate,e.scale,e.originPoint),Wo(t.y,n.translate,n.scale,n.originPoint)}const Uo=.999999999999,$o=1.0000000000001;function zo(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;aUo&&(e.x=1),e.y<$o&&e.y>Uo&&(e.y=1)}function Ko(t,e){t.min=t.min+e,t.max=t.max+e}function Yo(t,e,n,i,s=.5){Wo(t,e,n,jt(t.min,t.max,s),i)}function Xo(t,e){Yo(t.x,e.x,e.scaleX,e.scale,e.originX),Yo(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ho(t,e){return Do(Ro(t.getBoundingClientRect(),e))}const Go={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qo=Xe.length;function Zo(t,e,n){let i="",s=!0;for(let o=0;o{if(!e.target)return t;if("string"==typeof t){if(!yt.test(t))return t;t=parseFloat(t)}return`${Qo(t,e.target.x)}% ${Qo(t,e.target.y)}%`}},er={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Dt.parse(t);if(s.length>5)return i;const o=Dt.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const c=jt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=c),"number"==typeof s[3+r]&&(s[3+r]/=c),o(s)}},nr={borderRadius:{...tr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tr,borderTopRightRadius:tr,borderBottomLeftRadius:tr,borderBottomRightRadius:tr,boxShadow:er};function ir(t,{layout:e,layoutId:n}){return He.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!nr[t]||"opacity"===t)}function sr(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(ai(i[e])||s&&ai(s[e])||ir(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class or extends ko{constructor(){super(...arguments),this.type="html",this.renderInstance=Jo}readValueFromInstance(t,e){if(He.has(e))return this.projection?.isProjecting?$e(e):Ke(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(_(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ho(t,e)}build(t,e,n){_o(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return sr(t,e,n)}}class rr extends Mo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const ar={offset:"stroke-dashoffset",array:"stroke-dasharray"},lr={offset:"strokeDashoffset",array:"strokeDasharray"};function cr(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ar:lr;t[o.offset]=""+-i,t[o.array]=`${e} ${n}`}const ur=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(_o(t,a,c),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const t of ur)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&cr(h,s,o,r,!1)}const dr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),pr=t=>"string"==typeof t&&"svg"===t.toLowerCase();function mr(t,e,n,i){Jo(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(dr.has(n)?n:ui(n),e.attrs[n])}function fr(t,e,n){const i=sr(t,e,n);for(const n in t)if(ai(t[n])||ai(e[n])){i[-1!==Xe.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class yr extends ko{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=po}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const t=Ri(e);return t&&t.default||0}return e=dr.has(e)?e:ui(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return fr(t,e,n)}build(t,e,n){hr(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){mr(t,e,0,i)}mount(t){this.isSVGTag=pr(t.tagName),super.mount(t)}}const gr=vo.length;function vr(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&vr(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Rr(t,e,n,i){Dr(t.x,e.x,n.x,i?i.originX:void 0),Dr(t.y,e.y,n.y,i?i.originY:void 0)}function Br(t,e,n){t.min=n.min+e.min,t.max=t.min+Mr(e)}function Cr(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function jr(t,e,n){t.min=e.min-n.min,t.max=t.min+Mr(e)}function Lr(t,e,n){jr(t.x,e.x,n.x),jr(t.y,e.y,n.y)}function Or(t,e,n,i,s){return t=Fo(t-=e,1/n,i),void 0!==s&&(t=Fo(t,1/s,i)),t}function Fr(t,e=0,n=1,i=.5,s,o=t,r=t){if(ft.test(e)){e=parseFloat(e);e=jt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=jt(o.min,o.max,i);t===o&&(a-=e),t.min=Or(t.min,e,n,a,s),t.max=Or(t.max,e,n,a,s)}function Ir(t,e,[n,i,s],o,r){Fr(t,e[n],e[i],e[s],e.scale,o,r)}const Wr=["x","scaleX","originX"],Nr=["y","scaleY","originY"];function Ur(t,e,n,i){Ir(t.x,e,Wr,n?n.x:void 0,i?i.x:void 0),Ir(t.y,e,Nr,n?n.y:void 0,i?i.y:void 0)}function $r(t){return 0===t.translate&&1===t.scale}function zr(t){return $r(t.x)&&$r(t.y)}function Kr(t,e){return t.min===e.min&&t.max===e.max}function Yr(t,e){return Kr(t.x,e.x)&&Kr(t.y,e.y)}function Xr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Hr(t,e){return Xr(t.x,e.x)&&Xr(t.y,e.y)}function Gr(t){return Mr(t.x)/Mr(t.y)}function qr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Zr(t){return[t("x"),t("y")]}function _r(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const Jr=["TopLeft","TopRight","BottomLeft","BottomRight"],Qr=Jr.length,ta=t=>"string"==typeof t?parseFloat(t):t,ea=t=>"number"==typeof t||yt.test(t);function na(t,e,n,i,s,o){s?(t.opacity=jt(0,n.opacity??1,sa(i)),t.opacityExit=jt(e.opacity??1,0,oa(i))):o&&(t.opacity=jt(e.opacity??1,n.opacity??1,i));for(let s=0;sie?1:n(p(t,e,i))}function aa(t,e,n){const i=ai(t)?t:ni(t);return i.start(qn("",i,e,n)),i.animation}function la(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const ca=(t,e)=>t.depth-e.depth;class ua{constructor(){this.children=[],this.isDirty=!1}add(t){e(this.children,t),this.isDirty=!0}remove(t){n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ca),this.isDirty=!1,this.children.forEach(t)}}function ha(t,e){const n=G.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(z(i),t(o-e))};return $.setup(i,!0),()=>z(i)}function da(t,e){return ha(t,f(e))}function pa(t){return ai(t)?t.get():t}class ma{constructor(){this.members=[]}add(t){e(this.members,t);for(let e=this.members.length-1;e>=0;e--){const i=this.members[e];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;s&&!1===s.isConnected&&!1!==i.isPresent&&!i.snapshot&&n(this.members,i)}t.scheduleRender()}remove(t){if(n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t],i=e.instance;if(!1!==e.isPresent&&(!i||!1!==i.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender();const i=n.options.layoutDependency,s=t.options.layoutDependency;if(!(void 0!==i&&void 0!==s&&i===s)){const i=n.instance;i&&!1===i.isConnected&&!n.snapshot||(t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:o}=t.options;!1===o&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const fa={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ya={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ga=["","X","Y","Z"];let va=0;function xa(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Ta(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=pi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ta(i)}function wa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},n=e?.()){this.id=va++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,N.value&&(ya.nodes=ya.calculatedTargetDeltas=ya.calculatedProjections=0),this.nodes.forEach(Aa),this.nodes.forEach(Ra),this.nodes.forEach(Ba),this.nodes.forEach(Va),N.addProjectionMetrics&&N.addProjectionMetrics(ya)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;tthis.root.updateBlockedByResize=!1;$.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=ha(s,250),fa.hasAnimatedSinceResize&&(fa.hasAnimatedSinceResize=!1,this.nodes.forEach(Da)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Ia,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Hr(this.targetLayout,i),c=!e&&n;if(this.options.layoutRoot||this.resumeFrom||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Hn(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c)}else e||Da(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ca),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ta(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Mr(this.snapshot.measuredBox.x)||Mr(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t{const n=e/1e3;var l,d,p,m;La(o.x,t.x,n),La(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lr(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Oa(l.x,d.x,p.x,m),Oa(l.y,d.y,p.y,m),h&&Yr(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Pr(h,this.relativeTarget)),a&&(this.animationValues=s,na(s,i,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{fa.hasAnimatedSinceResize=!0,q.layout++,this.motionValue||(this.motionValue=ni(0)),this.motionValue.jump(0,!1),this.currentAnimation=aa(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{q.layout--},onComplete:()=>{q.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&$a(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Mr(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Mr(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Pr(e,n),Xo(e,s),Rr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ma);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&xa("z",t,i,this.animationValues);for(let e=0;et.currentAnimation?.stop()),this.root.nodes.forEach(Ea),this.root.sharedNodes.clear()}}}function ba(t){t.updateLayout()}function Sa(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Zr(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Mr(i);i.min=n[t].min,i.max=i.min+s}):$a(s,e.layoutBox,n)&&Zr(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Mr(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Rr(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Rr(a,t.applyTransform(i,!0),e.measuredBox):Rr(a,n,e.layoutBox);const l=!zr(r);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Lr(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Lr(a,n,o.layoutBox),Hr(r,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Aa(t){N.value&&ya.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Va(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Pa(t){t.clearSnapshot()}function Ea(t){t.clearMeasurements()}function Ma(t){t.isLayoutDirty=!1}function ka(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Da(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ra(t){t.resolveTargetDelta()}function Ba(t){t.calcProjection()}function Ca(t){t.resetSkewAndRotation()}function ja(t){t.removeLeadSnapshot()}function La(t,e,n){t.translate=jt(e.translate,0,n),t.scale=jt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Oa(t,e,n,i){t.min=jt(e.min,n.min,i),t.max=jt(e.max,n.max,i)}function Fa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ia={duration:.45,ease:[.4,0,.1,1]},Wa=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Na=Wa("applewebkit/")&&!Wa("chrome/")?Math.round:u;function Ua(t){t.min=Na(t.min),t.max=Na(t.max)}function $a(t,e,n){return"position"===t||"preserve-aspect"===t&&!kr(Gr(e),Gr(n),.2)}function za(t){return t!==t.root&&t.scroll?.wasRoot}const Ka=wa({attachResizeListener:(t,e)=>la(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ya=t=>!t.isLayoutDirty&&t.willUpdate(!1);const Xa={current:void 0},Ha=wa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xa.current){const t=new Ka({});t.mount(window),t.setOptions({layoutScroll:!0}),Xa.current=t}return Xa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ga="[data-layout], [data-layout-id]",qa=()=>{};function Za(t){const e=Array.from(t.querySelectorAll(Ga));return t instanceof Element&&t.matches(Ga)&&(e.includes(t)||e.unshift(t)),e}function _a(t){const e=t.getAttribute("data-layout-id")||void 0,n=t.getAttribute("data-layout");let i;return""===n||"true"===n?i=!0:n&&(i=n),{layout:i,layoutId:e}}function Ja(t,e,n){const i=mo.get(t),s=i??new or({props:{},presenceContext:null,visualState:{latestValues:{},renderState:{transform:{},transformOrigin:{},style:{},vars:{}}}},{allowProjection:!0});return i&&s.projection||(s.projection=new Ha(s.latestValues,e)),s.projection.setOptions({...n,visualElement:s}),s.current?s.projection.instance||s.projection.mount(t):s.mount(t),i||mo.set(t,s),{element:t,visualElement:s,projection:s.projection}}function Qa(t,e,n){let i=t.parentElement;for(;i;){const t=e.get(i);if(t)return t;if(i===n)break;i=i.parentElement}}const tl=$,el=W.reduce((t,e)=>(t[e]=t=>z(t),t),{});function nl(t){return"object"==typeof t&&!Array.isArray(t)}function il(t,e,n,i){return null==t?[]:"string"==typeof t&&nl(e)?Ni(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(t=>null!=t):[t]}function sl(t,e,n){return t*(e+1)}function ol(t,e,n,i){return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function rl(t,e,i,s,o,r){!function(t,e,i){for(let s=0;se&&o.at"number"==typeof t,ml=t=>t.every(pl);function fl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ys(t)&&!Os(t)?new yr(e):new or(e);n.mount(t),mo.set(t,n)}function yl(t){const e=new rr({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),mo.set(t,e)}function gl(e,n,i,s){const o=[];if(function(t,e){return ai(t)||"number"==typeof t||"string"==typeof t&&!nl(e)}(e,n))o.push(aa(e,nl(n)&&n.default||n,i&&i.default||i));else{if(null==e)return o;const r=il(e,n,s),a=r.length;t.invariant(Boolean(a),"No valid elements provided.","no-valid-elements");for(let t=0;t{const c=hl(e),{delay:u=0,times:h=Se(c),type:p=n.type||"keyframes",repeat:y,repeatType:g,repeatDelay:x=0,...T}=i;let{ease:w=n.ease||"easeOut",duration:b}=i;const S="function"==typeof u?u(a,l):u,A=c.length,V=gn(p)?p:o?.[p||"keyframes"];if(A<=2&&V){let t=100;if(2===A&&ml(c)){const e=c[1]-c[0];t=Math.abs(e)}const e={...n,...T};void 0!==b&&(e.duration=f(b));const i=_t(e,t,V);w=i.ease,b=i.duration}b??(b=r);const P=d+S;1===h.length&&0===h[0]&&(h[1]=1);const E=h.length-c.length;if(E>0&&be(h,E),1===c.length&&c.unshift(null),y){t.invariant(y<20,"Repeat count too high, must be less than 20","repeat-count-high"),b=sl(b,y);const e=[...c],n=[...h];w=Array.isArray(w)?[...w]:[w];const i=[...w];for(let t=0;t{for(const s in t){const o=t[s];o.sort(ll);const r=[],l=[],c=[];for(let t=0;t{if(Array.isArray(t)&&"function"==typeof t[0]){const e=t[0],n=ni(0);return n.on("change",e),1===t.length?[n,[0,1]]:2===t.length?[n,[0,1],t[1]]:[n,t[1],t[2]]}return t}),n,i,{spring:xe});return o.forEach(({keyframes:t,transition:e},n)=>{s.push(...gl(n,t,e))}),s}function xl(t={}){const{scope:e,reduceMotion:i}=t;return function(t,s,o){let r,a=[];if(l=t,Array.isArray(l)&&l.some(Array.isArray))a=vl(t,void 0!==i?{reduceMotion:i,...s}:s,e);else{const{onComplete:n,...l}=o||{};"function"==typeof n&&(r=n),a=gl(t,s,void 0!==i?{reduceMotion:i,...l}:l,e)}var l;const c=new Rn(a);return r&&c.finished.then(r),e&&(e.animations.push(c),c.finished.then(()=>{n(e.animations,c)})),c}}const Tl=xl();const wl=e=>function(n,i,s){return new Rn(function(e,n,i,s){if(null==e)return[];const o=Ni(e,s),r=o.length;t.invariant(Boolean(r),"No valid elements provided.","no-valid-elements");const a=[];for(let t=0;te.delete(n)),l.push(s)}return l}(n,i,s,e))},bl=wl(),Sl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Al(t,e,n,i){const s=n[e],{length:o,position:r}=Sl[e],a=s.current,l=n.time;s.current=t[`scroll${r}`],s.scrollLength=t[`scroll${o}`]-t[`client${o}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=p(0,s.scrollLength,s.current);const c=i-l;s.velocity=c>50?0:g(s.current-a,c)}const Vl={start:0,center:.5,end:1};function Pl(t,e,n=0){let i=0;if(t in Vl&&(t=Vl[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const El=[0,0];function Ml(t,e,n,i){let s=Array.isArray(t)?t:El,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Vl[t]?t:"0"]),o=Pl(s[0],n,i),r=Pl(s[1],e),o-r}const kl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Dl={x:0,y:0};function Rl(t,e,n){const{offset:s=kl.All}=n,{target:o=t,axis:r="y"}=n,a="y"===r?"height":"width",l=o!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(Gi(i))n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(o,t):Dl,c=o===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(o),u={width:t.clientWidth,height:t.clientHeight};e[r].offset.length=0;let h=!e[r].interpolate;const d=s.length;for(let t=0;t{!function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),function(t,e,n){Al(t,"x",e,n),Al(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Rl(t,n,i)},notify:()=>e(n)}}const Cl=new WeakMap,jl=new WeakMap,Ll=new WeakMap,Ol=new WeakMap,Fl=new WeakMap,Il=t=>t===document.scrollingElement?window:t;function Wl(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...i}={}){if(!e)return u;let s=Ll.get(e);s||(s=new Set,Ll.set(e,s));const o=Bl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},i);if(s.add(o),!Cl.has(e)){const t=()=>{for(const t of s)t.measure(K.timestamp);$.preUpdate(n)},n=()=>{for(const t of s)t.notify()},i=()=>$.read(t);Cl.set(e,i);const o=Il(e);window.addEventListener("resize",i),e!==document.documentElement&&jl.set(e,Ms(e,i)),o.addEventListener("scroll",i),i()}if(n&&!Fl.has(e)){const t=Cl.get(e),n={width:e.scrollWidth,height:e.scrollHeight};Ol.set(e,n);const i=()=>{const i=e.scrollWidth,s=e.scrollHeight;n.width===i&&n.height===s||(t(),n.width=i,n.height=s)},s=$.read(i,!0);Fl.set(e,s)}const r=Cl.get(e);return $.read(r,!1,!0),()=>{z(r);const t=Ll.get(e);if(!t)return;if(t.delete(o),t.size)return;const n=Cl.get(e);Cl.delete(e),n&&(Il(e).removeEventListener("scroll",n),jl.get(e)?.(),window.removeEventListener("resize",n));const i=Fl.get(e);i&&(z(i),Fl.delete(e)),Ol.delete(e)}}const Nl=new Map;function Ul({source:t,container:e,...n}){const{axis:i}=n;t&&(e=t);const s=Nl.get(e)??new Map;Nl.set(e,s);const o=n.target??"self",r=s.get(o)??{},a=i+(n.offset??[]).join(",");var l;return r[a]||(r[a]=(l=n.target,"undefined"!=typeof window&&!l&&hn()?new ScrollTimeline({source:e,axis:i}):function(t){const e={value:0},n=Wl(n=>{e.value=100*n[t.axis].progress},t);return{currentTime:e,cancel:n}}({container:e,...n}))),r[a]}const $l={some:0,all:1};const zl=(t,e)=>Math.abs(t-e);t.AsyncMotionValueAnimation=Mn,t.DOMKeyframesResolver=Li,t.DOMVisualElement=ko,t.DocumentProjectionNode=Ka,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=ua,t.GroupAnimation=kn,t.GroupAnimationWithThen=Rn,t.HTMLProjectionNode=Ha,t.HTMLVisualElement=or,t.JSAnimation=Ce,t.KeyframeResolver=rn,t.LayoutAnimationBuilder=class{constructor(t,e,n){this.sharedTransitions=new Map,this.notifyReady=qa,this.rejectReady=qa,this.scope=t,this.updateDom=e,this.defaultOptions=n,this.readyPromise=new Promise((t,e)=>{this.notifyReady=t,this.rejectReady=e}),$.postRender(()=>{this.start().then(this.notifyReady).catch(this.rejectReady)})}shared(t,e){return this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async start(){const t=Za(this.scope),e=this.buildRecords(t);e.forEach(({projection:t})=>{const e=Boolean(t.currentAnimation),n=Boolean(t.options.layoutId);if(e&&n){const e=function(t){const e=t.targetWithTransforms||t.target;if(!e)return;const n={x:{min:0,max:0},y:{min:0,max:0}},i={x:{min:0,max:0},y:{min:0,max:0}};return Pr(n,e),Pr(i,e),{animationId:t.root?.animationId??0,measuredBox:n,layoutBox:i,latestValues:t.animationValues||t.latestValues||{},source:t.id}}(t);e?t.snapshot=e:t.snapshot&&(t.snapshot=void 0)}else t.snapshot&&(t.currentAnimation||t.isProjecting())&&(t.snapshot=void 0);t.isPresent=!0,t.willUpdate()}),await this.updateDom();const n=Za(this.scope),i=this.buildRecords(n);this.handleExitingElements(e,i),i.forEach(({projection:t})=>{const e=t.instance,n=t.resumeFrom?.instance;if(!e||!n)return;if(!("style"in e))return;const i=e.style.transform,s=n.style.transform;i&&s&&i===s&&(e.style.transform="",e.style.transformOrigin="")}),i.forEach(({projection:t})=>{t.isPresent=!0});const s=function(t,e){const n=t[0]||e[0];return n?.projection.root}(i,e);s?.didUpdate(),await new Promise(t=>{$.postRender(()=>t())});const o=function(t){const e=new Set;return t.forEach(t=>{const n=t.projection.currentAnimation;n&&e.add(n)}),Array.from(e)}(i);return new kn(o)}buildRecords(t){const e=[],n=new Map;for(const i of t){const t=Qa(i,n,this.scope),{layout:s,layoutId:o}=_a(i),r=(o?this.sharedTransitions.get(o):void 0)||this.defaultOptions,a=Ja(i,t?.projection,{layout:s,layoutId:o,animationType:"string"==typeof s?s:"both",transition:r});n.set(i,a),e.push(a)}return e}handleExitingElements(t,e){const n=new Set(e.map(t=>t.element));t.forEach(t=>{n.has(t.element)||(t.projection.options.layoutId&&(t.projection.isPresent=!1,t.projection.relegate()),t.visualElement.unmount(),mo.delete(t.element))});const i=new Set(t.map(t=>t.element));e.forEach(({element:t,projection:e})=>{i.has(t)&&e.resumeFrom&&!e.resumeFrom.instance&&!e.isLead()&&(e.resumeFrom=void 0,e.snapshot=void 0)})}},t.MotionGlobalConfig=o,t.MotionValue=ei,t.NativeAnimation=xn,t.NativeAnimationExtended=bn,t.NativeAnimationWrapper=Bn,t.NodeStack=ma,t.ObjectVisualElement=rr,t.SVGVisualElement=yr,t.SubscriptionManager=m,t.ViewTransitionBuilder=lo,t.VisualElement=Mo,t.acceleratedValues=Wi,t.activeAnimations=q,t.addAttrValue=Yi,t.addDomEvent=la,t.addScaleCorrector=function(t){for(const e in t)nr[e]=t[e],_(e)&&(nr[e].isCSSVariable=!0)},t.addStyleValue=_i,t.addUniqueItem=e,t.addValueToWillChange=ci,t.alpha=it,t.analyseComplexValue=Pt,t.animate=Tl,t.animateMini=bl,t.animateMotionValue=qn,t.animateSingleValue=aa,t.animateTarget=fi,t.animateValue=function(t){return new Ce(t)},t.animateVariant=yi,t.animateView=function(t,e={}){return new lo(t,e)},t.animateVisualElement=gi,t.animationMapKey=jn,t.anticipate=E,t.applyAxisDelta=Wo,t.applyBoxDelta=No,t.applyGeneratorOptions=vn,t.applyPointDelta=Io,t.applyPxDefaults=Fi,t.applyTreeDeltas=zo,t.aspectRatio=Gr,t.attachFollow=Ns,t.attachSpring=function(t,e,n){return Ns(t,e,{type:"spring",...n})},t.attrEffect=Xi,t.axisDeltaEquals=qr,t.axisEquals=Kr,t.axisEqualsRounded=Xr,t.backIn=V,t.backInOut=P,t.backOut=A,t.boxEquals=Yr,t.boxEqualsRounded=Hr,t.buildHTMLStyles=_o,t.buildProjectionTransform=_r,t.buildSVGAttrs=hr,t.buildSVGPath=cr,t.buildTransform=Zo,t.calcAxisDelta=Dr,t.calcBoxDelta=Rr,t.calcChildStagger=On,t.calcGeneratorDuration=Zt,t.calcLength=Mr,t.calcRelativeAxis=Br,t.calcRelativeAxisPosition=jr,t.calcRelativeBox=Cr,t.calcRelativePosition=Lr,t.camelCaseAttributes=dr,t.camelToDash=ui,t.cancelFrame=z,t.cancelMicrotask=es,t.cancelSync=el,t.checkVariantsDidChange=br,t.circIn=M,t.circInOut=D,t.circOut=k,t.clamp=i,t.cleanDirtyNodes=Va,t.collectMotionValues=ti,t.color=wt,t.compareByDepth=ca,t.complex=Dt,t.containsCSSVariable=et,t.convertBoundingBoxToBox=Do,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=Ae,t.copyAxisDeltaInto=Er,t.copyAxisInto=Vr,t.copyBoxInto=Pr,t.correctBorderRadius=tr,t.correctBoxShadow=er,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>gi(t,e,n)))}(t),n=Ar(),i=!0;const s=e=>(n,i)=>{const s=Jn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=vr(t.parent)||{},l=[],c=new Set;let u={},h=1/0;for(let e=0;eh&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,A={...S,...b},V=e=>{x=!0,c.has(e)&&(T=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=b[t],n=S[t];if(u.hasOwnProperty(t))continue;let i=!1;i=ii(e)&&ii(n)?!xr(e,n):e!==n,i?null!=e?V(t):c.add(t):void 0!==e&&c.has(t)?V(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(u={...u,...b}),i&&t.blockInitialAnimation&&(x=!1);const P=g&&v;x&&(!P||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!P&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=Jn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=On(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(c.size){const e={};if("boolean"!=typeof r.initial){const n=Jn(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}c.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Ar()}}},t.createAxis=ho,t.createAxisDelta=co,t.createBox=po,t.createDelta=uo,t.createGeneratorEasing=_t,t.createProjectionNode=wa,t.createRenderBatcher=U,t.createScopedAnimate=xl,t.cubicBezier=w,t.cubicBezierAsString=pn,t.defaultEasing=Ve,t.defaultOffset=Se,t.defaultTransformValue=$e,t.defaultValueTypes=Di,t.degrees=mt,t.delay=da,t.delayInSeconds=da,t.dimensionValueTypes=xi,t.distance=zl,t.distance2D=function(t,e){const n=zl(t.x,e.x),i=zl(t.y,e.y);return Math.sqrt(n**2+i**2)},t.eachAxis=Zr,t.easeIn=R,t.easeInOut=C,t.easeOut=B,t.easingDefinitionToFunction=I,t.fillOffset=be,t.fillWildcards=je,t.findDimensionValueType=Ti,t.findValueType=Ys,t.flushKeyframeResolvers=on,t.followValue=Ws,t.frame=$,t.frameData=K,t.frameSteps=Y,t.generateLinearEasing=Gt,t.getAnimatableNone=Ci,t.getAnimationMap=Ln,t.getComputedStyle=fs,t.getDefaultTransition=zn,t.getDefaultValueType=Ri,t.getEasingForSegment=L,t.getFeatureDefinitions=function(){return Eo},t.getFinalKeyframe=Yn,t.getMixer=$t,t.getOptimisedAppearId=pi,t.getOriginIndex=Fs,t.getValueAsType=$i,t.getValueTransition=Hn,t.getVariableValue=Wn,t.getVariantContext=vr,t.getViewAnimationLayerInfo=Js,t.getViewAnimations=to,t.globalProjectionState=fa,t.has2DTranslate=Lo,t.hasReducedMotionListener=So,t.hasScale=Co,t.hasTransform=jo,t.hasWarned=function(t){return v.has(t)},t.hex=dt,t.hover=function(t,e,n={}){const[i,s,o]=ss(t,n);return i.forEach(t=>{let n,i=!1,o=!1;const r=e=>{n&&(n(e),n=void 0),t.removeEventListener("pointerleave",l)},a=t=>{i=!1,window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a),o&&(o=!1,r(t))},l=t=>{"touch"!==t.pointerType&&(i?o=!0:r(t))};t.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||is())return;o=!1;const r=e(t,i);"function"==typeof r&&(n=r,t.addEventListener("pointerleave",l,s))},s),t.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",a,s)},s)}),o},t.hsla=Tt,t.hslaToRgba=Bt,t.inView=function(t,e,{root:n,margin:i,amount:s="some"}={}){const o=Ni(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:$l[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()},t.inertia=Te,t.initPrefersReducedMotion=Vo,t.interpolate=we,t.invisibleValues=Wt,t.isAnimationControls=fo,t.isBezierDefinition=O,t.isCSSVariableName=_,t.isCSSVariableToken=Q,t.isControllingVariants=xo,t.isDeltaZero=zr,t.isDragActive=is,t.isDragging=ns,t.isEasingArray=j,t.isElementKeyboardAccessible=ls,t.isElementTextInput=function(t){return cs.has(t.tagName)||!0===t.isContentEditable},t.isForcedMotionValue=ir,t.isGenerator=gn,t.isHTMLElement=Gi,t.isKeyframesTarget=ii,t.isMotionValue=ai,t.isNear=kr,t.isNodeOrChild=os,t.isNumericalString=r,t.isObject=a,t.isPrimaryPointer=rs,t.isSVGElement=ys,t.isSVGSVGElement=Os,t.isSVGTag=pr,t.isTransitionDefined=Gn,t.isVariantLabel=yo,t.isVariantNode=To,t.isWaapiSupportedEasing=function t(e){return Boolean("function"==typeof e&&dn()||!e||"string"==typeof e&&(e in mn||dn())||O(e)||Array.isArray(e)&&e.every(t))},t.isWillChangeMotionValue=li,t.isZeroValueString=l,t.keyframes=Pe,t.makeAnimationInstant=An,t.mapEasingToNativeEasing=fn,t.mapValue=function(t,e,n,i){const s=Is(e,n,i);return zs(()=>s(t.get()))},t.maxGeneratorDuration=qt,t.measurePageBox=function(t,e,n){const i=Ho(t,n),{scroll:s}=e;return s&&(Ko(i.x,s.offset.x),Ko(i.y,s.offset.y)),i},t.measureViewportBox=Ho,t.memo=c,t.microtask=ts,t.millisecondsToSeconds=y,t.mirrorEasing=b,t.mix=Xt,t.mixArray=zt,t.mixColor=It,t.mixComplex=Yt,t.mixImmediate=Ct,t.mixLinearColor=Lt,t.mixNumber=jt,t.mixObject=Kt,t.mixValues=na,t.mixVisibility=Nt,t.motionValue=ni,t.moveItem=function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&it.forEach(Ya);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}},t.noop=u,t.number=nt,t.numberValueTypes=ki,t.observeTimeline=ks,t.optimizedAppearDataAttribute=di,t.optimizedAppearDataId=hi,t.parseAnimateLayoutArgs=function(t,e,n){return"function"==typeof t?{scope:document,updateDom:t,defaultOptions:e}:{scope:Ni(t)[0]||document,updateDom:e,defaultOptions:n}},t.parseCSSVariable=In,t.parseValueFromTransform=ze,t.percent=ft,t.pipe=d,t.pixelsToPercent=Qo,t.positionalKeys=Qn,t.prefersReducedMotion=bo,t.press=function(t,e,n={}){const[i,s,o]=ss(t,n),r=t=>{const i=t.currentTarget;if(!ps(t))return;if(ms.has(t))return;us.add(i),n.stopPropagation&&ms.add(t);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),us.has(i)&&us.delete(i),ps(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||os(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),Gi(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=hs(()=>{if(us.has(n))return;ds(n,"down");const t=hs(()=>{ds(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>ds(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),ls(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progress=p,t.progressPercentage=xt,t.propEffect=Hi,t.propagateDirtyNodes=Aa,t.px=yt,t.readTransformValue=Ke,t.recordStats=function(){if(N.value)throw js(),new Error("Stats are already being measured");const t=N;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},$.postRender(Ds,!0),Ls},t.removeAxisDelta=Fr,t.removeAxisTransforms=Ir,t.removeBoxTransforms=Ur,t.removeItem=n,t.removePointDelta=Or,t.renderHTML=Jo,t.renderSVG=mr,t.resize=Ms,t.resolveElements=Ni,t.resolveMotionValue=pa,t.resolveTransition=Xn,t.resolveVariant=Jn,t.resolveVariantFromProps=_n,t.reverseEasing=S,t.rgbUnit=ut,t.rgba=ht,t.rootProjectionNode=Xa,t.scale=st,t.scaleCorrectors=nr,t.scalePoint=Fo,t.scrapeHTMLMotionValuesFromProps=sr,t.scrapeSVGMotionValuesFromProps=fr,t.scroll=function(t,{axis:e="y",container:n=document.scrollingElement,...i}={}){if(!n)return u;const s={axis:e,container:n,...i};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)?Wl(n=>{t(n[e.axis].progress,n)},e):ks(t,Ul(e))}(t,s):function(t,e){const n=Ul(e);return t.attachTimeline({timeline:e.target?void 0:n,observe:t=>(t.pause(),ks(e=>{t.time=t.iterationDuration*e},n))})}(t,s)},t.scrollInfo=Wl,t.secondsToMilliseconds=f,t.setDragLock=function(t){return"x"===t||"y"===t?ns[t]?null:(ns[t]=!0,()=>{ns[t]=!1}):ns.x||ns.y?null:(ns.x=ns.y=!0,()=>{ns.x=ns.y=!1})},t.setFeatureDefinitions=function(t){Eo=t},t.setStyle=ln,t.setTarget=ri,t.spring=xe,t.springValue=function(t,e){return Ws(t,{type:"spring",...e})},t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:Fs(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=I(i)(l/e)*e}return e+l}},t.startWaapiAnimation=yn,t.statsBuffer=N,t.steps=function(t,e="end"){return n=>{const s=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,o="end"===e?Math.floor(s):Math.ceil(s);return i(0,1,o/t)}},t.styleEffect=Ji,t.supportedWaapiEasing=mn,t.supportsBrowserAnimation=En,t.supportsFlags=cn,t.supportsLinearEasing=dn,t.supportsPartialKeyframes=Ii,t.supportsScrollTimeline=hn,t.svgEffect=Qi,t.sync=tl,t.testValueType=vi,t.time=G,t.transform=Is,t.transformAxis=Yo,t.transformBox=Xo,t.transformBoxPoints=Ro,t.transformPropOrder=Xe,t.transformProps=He,t.transformValue=zs,t.transformValueTypes=Mi,t.translateAxis=Ko,t.updateMotionValuesFromProps=wo,t.variantPriorityOrder=go,t.variantProps=vo,t.velocityPerSecond=g,t.vh=gt,t.visualElementStore=mo,t.vw=vt,t.warnOnce=function(t,e,n){t||v.has(e)||(console.warn(s(e,n)),v.add(e))},t.wrap=x}); \ No newline at end of file diff --git a/src/zen/welcome/jar.inc.mn b/src/zen/welcome/jar.inc.mn index 9e7fc185b..7295cfbaf 100644 --- a/src/zen/welcome/jar.inc.mn +++ b/src/zen/welcome/jar.inc.mn @@ -3,4 +3,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. content/browser/zen-components/ZenWelcome.mjs (../../zen/welcome/ZenWelcome.mjs) - content/browser/zen-styles/zen-welcome.css (../../zen/welcome/zen-welcome.css) \ No newline at end of file + content/browser/zen-styles/zen-welcome.css (../../zen/welcome/zen-welcome.css) diff --git a/src/zen/welcome/zen-welcome.css b/src/zen/welcome/zen-welcome.css index 456f2aee0..54d2c7f10 100644 --- a/src/zen/welcome/zen-welcome.css +++ b/src/zen/welcome/zen-welcome.css @@ -62,7 +62,6 @@ display: none; background: var(--zen-branding-bg); border-radius: 1em; - overflow: hidden; position: relative; width: 60%; height: 60%; @@ -83,7 +82,7 @@ @media (max-width: 1000px) { width: 100%; height: 100%; - border-radius: 0px; + border-radius: 0; } #zen-welcome-page-sidebar { diff --git a/src/zen/workspaces/create-workspace-form.css b/src/zen/workspaces/create-workspace-form.css index 4e3ad350f..de51a4737 100644 --- a/src/zen/workspaces/create-workspace-form.css +++ b/src/zen/workspaces/create-workspace-form.css @@ -60,8 +60,8 @@ zen-workspace-creation { & .zen-workspace-creation-icon-label { position: relative; - width: 24px; - height: 20px; + width: var(--size-item-medium); + height: var(--icon-size-medium); justify-content: center; align-items: center; cursor: pointer; @@ -73,8 +73,8 @@ zen-workspace-creation { & image { position: absolute; - width: 16px; - height: 16px; + width: var(--size-item-small); + height: var(--size-item-small); -moz-context-properties: fill-opacity, fill; fill: currentColor; } @@ -132,7 +132,6 @@ zen-workspace-creation { & .zen-workspace-creation-profile { margin: 0; padding: 6px !important; - border-radius: 99px; padding-inline-end: 0; appearance: none; background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); diff --git a/src/zen/workspaces/jar.inc.mn b/src/zen/workspaces/jar.inc.mn index bbf8beb04..32c9919ab 100644 --- a/src/zen/workspaces/jar.inc.mn +++ b/src/zen/workspaces/jar.inc.mn @@ -9,4 +9,4 @@ content/browser/zen-components/ZenWorkspaceBookmarksStorage.js (../../zen/workspaces/ZenWorkspaceBookmarksStorage.js) content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs) * content/browser/zen-styles/zen-workspaces.css (../../zen/workspaces/zen-workspaces.css) - content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css) \ No newline at end of file + content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css) diff --git a/src/zen/workspaces/zen-gradient-generator.css b/src/zen/workspaces/zen-gradient-generator.css index c523951e7..9ba5bf9c5 100644 --- a/src/zen/workspaces/zen-gradient-generator.css +++ b/src/zen/workspaces/zen-gradient-generator.css @@ -158,8 +158,8 @@ background: var(--zen-theme-picker-dot-color); border: 1px solid var(--zen-colors-border); border-radius: 5px; - width: 20px; - height: 20px; + width: var(--icon-size-medium); + height: var(--icon-size-medium); margin-right: 10px; } @@ -200,7 +200,7 @@ content: ""; position: absolute; width: calc(100% - 8px); - height: 16px; + height: var(--size-item-small); background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); border-radius: 999px; pointer-events: none; @@ -257,8 +257,8 @@ & .zen-theme-picker-dot { position: fixed; z-index: 2; - width: 20px; - height: 20px; + width: var(--icon-size-medium); + height: var(--icon-size-medium); border-radius: 50%; background: var(--zen-theme-picker-dot-color); @media (-prefers-color-scheme: dark) { @@ -275,7 +275,6 @@ width: 38px; height: 38px; border-width: 4px; - z-index: 2; pointer-events: all; transition: transform 0.2s; z-index: 999; @@ -314,7 +313,7 @@ #PanelUI-zen-gradient-generator-scheme { display: flex; position: absolute; - bottom: 12px; + bottom: var(--size-item-xsmall); left: 50%; z-index: 1; transform: translateX(-50%); @@ -323,7 +322,6 @@ & button { border: none !important; padding: 0 !important; - min-width: fit-content !important; transition: background 0.2s; appearance: none; max-height: 30px; @@ -353,9 +351,10 @@ #PanelUI-zen-gradient-generator-scheme { top: 15px; - max-height: 32px; + max-height: var(--size-item-large); } +/* stylelint-disable-next-line media-query-no-invalid */ @media not -moz-pref("zen.theme.gradient.show-custom-colors") { #PanelUI-zen-gradient-generator-custom-colors { display: none !important; @@ -420,7 +419,7 @@ & #PanelUI-zen-gradient-generator-texture-handler { width: 6px; - height: 12px; + height: var(--size-item-xsmall); background: light-dark(#757575, #d1d1d1); position: absolute; transition: height 0.1s; diff --git a/src/zen/workspaces/zen-workspaces.css b/src/zen/workspaces/zen-workspaces.css index 8838ece39..45a81ecb5 100644 --- a/src/zen/workspaces/zen-workspaces.css +++ b/src/zen/workspaces/zen-workspaces.css @@ -55,7 +55,7 @@ &:is(img) { width: 14px; } - + &[no-icon='true'] { width: 6px; height: 6px; @@ -109,7 +109,7 @@ scale: 1 !important; } - /* Inlcude separately since ther'es a bug in the + /* Include separately since ther'es a bug in the * rendering of XUL in firefox */ & toolbarbutton:not([active='true']) { %include overflow-icons.inc.css @@ -298,7 +298,7 @@ } :root[zen-unsynced-window='true'] - #navigator-toolbox[zen-has-implicit-hover='true'] + #navigator-toolbox[zen-has-implicit-hover='true'] & .zen-workspaces-actions, :root:not([zen-unsynced-window]) &:hover .zen-workspaces-actions, & .zen-workspaces-actions[open='true'] { From 58ffcd13c8cd0cdbd25c7d85e04fc3ee815929e1 Mon Sep 17 00:00:00 2001 From: Slowlife Date: Sun, 8 Mar 2026 22:43:21 +0700 Subject: [PATCH 08/59] fix: allow all cross-origin loads for live folders, b=closes #12685, p=#12686 * fix: allow all cross-origin loads for live folders, b=closes #12685, c=folders * chore: undo style changes --- src/zen/live-folders/ZenLiveFolder.sys.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zen/live-folders/ZenLiveFolder.sys.mjs b/src/zen/live-folders/ZenLiveFolder.sys.mjs index 36d17d42f..8085b9a26 100644 --- a/src/zen/live-folders/ZenLiveFolder.sys.mjs +++ b/src/zen/live-folders/ZenLiveFolder.sys.mjs @@ -146,7 +146,8 @@ export class nsZenLiveFolderProvider { contentPolicyType: Ci.nsIContentPolicy.TYPE_SAVEAS_DOWNLOAD, loadingPrincipal: principal, securityFlags: - Ci.nsILoadInfo.SEC_REQUIRE_CORS_INHERITS_SEC_CONTEXT | Ci.nsILoadInfo.SEC_COOKIES_INCLUDE, + Ci.nsILoadInfo.SEC_ALLOW_CROSS_ORIGIN_SEC_CONTEXT_IS_NULL | + Ci.nsILoadInfo.SEC_COOKIES_INCLUDE, triggeringPrincipal: principal, }).QueryInterface(Ci.nsIHttpChannel); From dac4575a91789971f4694cc97533462339412c26 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Mon, 9 Mar 2026 11:04:23 +0100 Subject: [PATCH 09/59] chore: Add `.DS_Store` to gitignore, p=#12695 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e31fcdecd..0239f5075 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ target/ locales/firefox-l10n/ !src/toolkit/themes/shared/design-system/dist/ +.DS_Store From 64fc35658da24a735cc53af1c6aae6cb4be0aecd Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Mon, 9 Mar 2026 13:42:15 +0100 Subject: [PATCH 10/59] feat: Change selected tab when resetting pinned tab, p=#12696 --- src/zen/tabs/ZenPinnedTabManager.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs index 8bf52f019..ae994feb5 100644 --- a/src/zen/tabs/ZenPinnedTabManager.mjs +++ b/src/zen/tabs/ZenPinnedTabManager.mjs @@ -111,6 +111,7 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { _onTabResetPinButton(event, tab) { event.stopPropagation(); this._resetTabToStoredState(tab); + gBrowser.selectedTab = tab; } get enabled() { From 25c57403314814510364fd6c89dae22711bfa917 Mon Sep 17 00:00:00 2001 From: Ruben Fricke Date: Mon, 9 Mar 2026 18:04:08 +0100 Subject: [PATCH 11/59] fix: set zenDefaultUserContextId on live folder tabs, p=#12702 --- src/zen/live-folders/ZenLiveFoldersManager.sys.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs index ef7b515a1..7fe382914 100644 --- a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs +++ b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs @@ -407,6 +407,9 @@ class nsZenLiveFoldersManager { }); // createLazyBrowser can't be pinned by default this.window.gBrowser.pinTab(tab); + if (userContextId) { + tab.setAttribute("zenDefaultUserContextId", "true"); + } if (item.icon) { this.window.gBrowser.setIcon(tab, item.icon); if (tab.linkedBrowser) { From f718d4414e2ec213b36517ed78aea9b0683d651e Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:16:41 +0100 Subject: [PATCH 12/59] perf: Improved performance when switiching spaces, p=#12698 * perf: Improved performance when switiching spaces, b=no-bug, c=common, compact-mode, workspaces * chore: format, b=no-bug, c=workspaces --- package.json | 2 +- .../base/content/browser-box-inc-xhtml.patch | 16 +++- .../content/navigator-toolbox-inc-xhtml.patch | 13 +-- src/zen/common/modules/ZenStartup.mjs | 15 ---- src/zen/common/modules/ZenUIManager.mjs | 18 ++-- src/zen/compact-mode/ZenCompactMode.mjs | 3 +- src/zen/drag-and-drop/ZenDragAndDrop.js | 2 +- src/zen/workspaces/ZenGradientGenerator.mjs | 89 ++++++++++++------- src/zen/workspaces/ZenWorkspace.mjs | 3 +- src/zen/workspaces/ZenWorkspaces.mjs | 38 +++++--- 10 files changed, 121 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index bd8509d26..a34cc5117 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "sync:raw": "surfer update", "sync:rc": "python3 scripts/update_ff.py --rc", "sync:l10n": "python3 scripts/update_ff.py --just-l10n", - "lint": "cd engine && ./mach lint zen", + "lint": "cd engine && ./mach lint zen/", "lint:fix": "npm run lint -- --fix", "prepare": "husky", "reset-ff": "surfer reset", diff --git a/src/browser/base/content/browser-box-inc-xhtml.patch b/src/browser/base/content/browser-box-inc-xhtml.patch index c08f89aeb..6a066afe9 100644 --- a/src/browser/base/content/browser-box-inc-xhtml.patch +++ b/src/browser/base/content/browser-box-inc-xhtml.patch @@ -1,8 +1,18 @@ diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml -index 2faed30e09511c381051bc40910a883d1d7bc10d..6ba2d0d91235ed33e4b4bad281c974b5960beaa2 100644 +index 2faed30e09511c381051bc40910a883d1d7bc10d..3b8c89902502aa384473dd6f43be7ec49bad06ac 100644 --- a/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml -@@ -25,7 +25,13 @@ +@@ -3,6 +3,9 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + ++ ++ ++ + diff --git a/src/browser/base/content/navigator-toolbox-inc-xhtml.patch b/src/browser/base/content/navigator-toolbox-inc-xhtml.patch index 216ab51a4..25e327eca 100644 --- a/src/browser/base/content/navigator-toolbox-inc-xhtml.patch +++ b/src/browser/base/content/navigator-toolbox-inc-xhtml.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/navigator-toolbox.inc.xhtml b/browser/base/content/navigator-toolbox.inc.xhtml -index 4d4223c508560136aba220adb18528aac913a188..7e7432f7adb761a598d3e3e5ca4c6385a3bfe223 100644 +index 4d4223c508560136aba220adb18528aac913a188..10d4d9cecbb0e7cec9191d78fb81a57376b37ff1 100644 --- a/browser/base/content/navigator-toolbox.inc.xhtml +++ b/browser/base/content/navigator-toolbox.inc.xhtml @@ -2,7 +2,7 @@ @@ -11,7 +11,7 @@ index 4d4223c508560136aba220adb18528aac913a188..7e7432f7adb761a598d3e3e5ca4c6385 -@@ -18,9 +18,9 @@ +@@ -18,9 +18,12 @@ #include browser-menubar.inc @@ -19,10 +19,13 @@ index 4d4223c508560136aba220adb18528aac913a188..7e7432f7adb761a598d3e3e5ca4c6385 + ++ ++ ++ @@ -32,7 +35,7 @@ index 4d4223c508560136aba220adb18528aac913a188..7e7432f7adb761a598d3e3e5ca4c6385 -@@ -81,6 +84,7 @@ +@@ -81,6 +87,7 @@ tooltip="dynamic-shortcut-tooltip" data-l10n-id="tabs-toolbar-new-tab"/> @@ -40,7 +43,7 @@ index 4d4223c508560136aba220adb18528aac913a188..7e7432f7adb761a598d3e3e5ca4c6385 diff --git a/src/zen/common/modules/ZenStartup.mjs b/src/zen/common/modules/ZenStartup.mjs index db45653bd..5c40363f2 100644 --- a/src/zen/common/modules/ZenStartup.mjs +++ b/src/zen/common/modules/ZenStartup.mjs @@ -14,7 +14,6 @@ class ZenStartup { init() { this.openWatermark(); - this.#initBrowserBackground(); this.#changeSidebarLocation(); this.#zenInitBrowserLayout(); } @@ -26,20 +25,6 @@ class ZenStartup { ); } - #initBrowserBackground() { - const background = document.createXULElement("box"); - background.id = "zen-browser-background"; - background.classList.add("zen-browser-generic-background"); - const grain = document.createXULElement("box"); - grain.classList.add("zen-browser-grain"); - background.appendChild(grain); - document.getElementById("browser").prepend(background); - const toolbarBackground = background.cloneNode(true); - toolbarBackground.removeAttribute("id"); - toolbarBackground.classList.add("zen-toolbar-background"); - document.getElementById("titlebar").prepend(toolbarBackground); - } - #zenInitBrowserLayout() { if (this.#hasInitializedLayout) { return; diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index c97245211..fbac93493 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -221,11 +221,11 @@ window.gZenUIManager = { const kUrlbarHeight = 335; gURLBar.style.setProperty( "--zen-urlbar-top", - `${window.innerHeight / 2 - Math.max(kUrlbarHeight, gURLBar.getBoundingClientRect().height) / 2}px` + `${window.innerHeight / 2 - Math.max(kUrlbarHeight, window.windowUtils.getBoundsWithoutFlushing(gURLBar).height) / 2}px` ); gURLBar.style.setProperty("--zen-urlbar-width", `${Math.min(window.innerWidth / 2, 750)}px`); gZenVerticalTabsManager.actualWindowButtons.removeAttribute("zen-has-hover"); - gZenVerticalTabsManager.recalculateURLBarHeight(); + gZenVerticalTabsManager.recalculateURLBarHeight(true); if (!this._preventToolbarRebuild) { setTimeout(() => { gZenWorkspaces.updateTabsContainers(); @@ -1052,7 +1052,7 @@ window.gZenVerticalTabsManager = { } }, - recalculateURLBarHeight() { + recalculateURLBarHeight(updateFormat = false) { requestAnimationFrame(() => { requestAnimationFrame(() => { gURLBar.removeAttribute("--urlbar-height"); @@ -1065,7 +1065,9 @@ window.gZenVerticalTabsManager = { if (typeof height !== "undefined") { gURLBar.style.setProperty("--urlbar-height", `${height}px`); } - gURLBar.zenFormatURLValue(); + if (updateFormat) { + gURLBar.zenFormatURLValue(); + } }); }); }, @@ -1176,11 +1178,11 @@ window.gZenVerticalTabsManager = { appContentNavbarContaienr.append(windowButtons); } if (isCompactMode) { - titlebar.prepend(navBar); - titlebar.prepend(topButtons); + titlebar.moveBefore(navBar, titlebar.firstChild); + titlebar.moveBefore(topButtons, titlebar.firstChild); } else { - titlebar.before(topButtons); - titlebar.before(navBar); + titlebar.parentNode.moveBefore(topButtons, titlebar); + titlebar.parentNode.moveBefore(navBar, titlebar); } document.documentElement.setAttribute("zen-single-toolbar", true); this._hasSetSingleToolbar = true; diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index bf511b351..4f22e74cd 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -187,7 +187,7 @@ window.gZenCompactModeManager = { // This function is called after exiting DOM fullscreen mode, // so we do a bit of a hack to re-calculate the URL height if (aInstant) { - gZenVerticalTabsManager.recalculateURLBarHeight(); + gZenVerticalTabsManager.recalculateURLBarHeight(true); } if ( !aInstant && @@ -330,7 +330,6 @@ window.gZenCompactModeManager = { await this.animateCompactMode(); this.callAllEventListeners(); } - gZenUIManager.updateTabsToolbar(); if (isUrlbarFocused) { gURLBar.focus(); } diff --git a/src/zen/drag-and-drop/ZenDragAndDrop.js b/src/zen/drag-and-drop/ZenDragAndDrop.js index d40c9c282..9cc6f9f91 100644 --- a/src/zen/drag-and-drop/ZenDragAndDrop.js +++ b/src/zen/drag-and-drop/ZenDragAndDrop.js @@ -654,7 +654,7 @@ } let tabs = this.originalDragImageArgs[0].children; const { isDarkMode, isExplicitMode } = - gZenThemePicker.getGradientForWorkspace(spaceChanged); + gZenThemePicker.getGradientForWorkspace(spaceChanged, { getGradient: false }); for (let tab of tabs) { if (isExplicitMode) { tab.style.colorScheme = isDarkMode ? "dark" : "light"; diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index c0cec2bca..78d1c7961 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -53,6 +53,14 @@ ChromeUtils.defineLazyGetter(lazy, "MIN_OPACITY", () => { return parseFloat(document.getElementById("PanelUI-zen-gradient-generator-opacity").min); }); +ChromeUtils.defineLazyGetter(lazy, "browserBackgroundElement", () => { + return document.getElementById("zen-browser-background"); +}); + +ChromeUtils.defineLazyGetter(lazy, "toolbarBackgroundElement", () => { + return document.getElementById("zen-toolbar-background"); +}); + const EXPLICIT_LIGHTNESS_TYPE = "explicit-lightness"; const EXPLICIT_BLACKWHITE_TYPE = "explicit-black-white"; @@ -295,7 +303,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { initTextureInput() { const wrapper = document.getElementById("PanelUI-zen-gradient-generator-texture-wrapper"); - const wrapperWidth = wrapper.getBoundingClientRect().width; + const wrapperWidth = window.windowUtils.getBoundsWithoutFlushing(wrapper).width; // Add elements in a circular pattern, where the center is the center of the wrapper for (let i = 0; i < 16; i++) { const dot = document.createElement("div"); @@ -322,7 +330,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { onTextureMouseMove(event) { event.preventDefault(); const wrapper = document.getElementById("PanelUI-zen-gradient-generator-texture-wrapper"); - const wrapperRect = wrapper.getBoundingClientRect(); + const wrapperRect = window.windowUtils.getBoundsWithoutFlushing(wrapper); // Determine how much rotation there is based on the mouse position and the center of the wrapper const rotation = Math.atan2( event.clientY - wrapperRect.top - wrapperRect.height / 2, @@ -471,7 +479,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { getColorFromPosition(x, y, type = undefined) { // Return a color as hsl based on the position in the gradient const gradient = this.panel.querySelector(".zen-theme-picker-gradient"); - const rect = gradient.getBoundingClientRect(); + const rect = window.windowUtils.getBoundsWithoutFlushing(gradient); const padding = 30; // each side const dotHalfSize = 29; // half the size of the dot. -11 for correct centering x += dotHalfSize; @@ -747,7 +755,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } const dotPad = this.panel.querySelector(".zen-theme-picker-gradient"); - const rect = dotPad.getBoundingClientRect(); + const rect = window.windowUtils.getBoundsWithoutFlushing(dotPad); const padding = 0; let updatedDots = [...dots]; @@ -927,7 +935,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } const gradient = this.panel.querySelector(".zen-theme-picker-gradient"); - const rect = gradient.getBoundingClientRect(); + const rect = window.windowUtils.getBoundsWithoutFlushing(gradient); const padding = 0; const centerX = rect.left + rect.width / 2 - padding; @@ -1059,7 +1067,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { onDotMouseMove(event) { if (this.dragging) { event.preventDefault(); - const rect = this.panel.querySelector(".zen-theme-picker-gradient").getBoundingClientRect(); + const rect = window.windowUtils.getBoundsWithoutFlushing(this.panel.querySelector(".zen-theme-picker-gradient")); const padding = 0; // each side // do NOT let the ball be draged outside of an imaginary circle. You can drag it anywhere inside the circle // if the distance between the center of the circle and the dragged ball is bigger than the radius, then the ball @@ -1354,6 +1362,14 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { return isDarkMode ? [255, 255, 255, opacity] : [0, 0, 0, opacity]; // Default toolbar } + get browserBackgroundElement() { + return lazy.browserBackgroundElement; + } + + get toolbarBackgroundElement() { + return lazy.toolbarBackgroundElement; + } + onWorkspaceChange(workspace, skipUpdate = false, theme = null) { const uuid = workspace.uuid; // Use theme from workspace object or passed theme @@ -1369,16 +1385,16 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { return; } - if (theme === null) { - browser.gZenThemePicker.invalidateGradientCache(); - } - // Do not rebuild if the workspace is not the same as the current one const windowWorkspace = browser.gZenWorkspaces.getActiveWorkspace(); if (windowWorkspace.uuid !== uuid) { return; } + if (theme === null) { + browser.gZenThemePicker.invalidateGradientCache(uuid); + } + // get the theme from the window workspaceTheme = this.fixTheme(theme || windowWorkspace.theme); const docElement = browser.document.documentElement; @@ -1397,18 +1413,22 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } if (!skipUpdate) { - docElement.style.setProperty( + let backgroundElement = browser.gZenThemePicker.browserBackgroundElement; + let toolbarElement = browser.gZenThemePicker.toolbarBackgroundElement; + backgroundElement.style.setProperty( "--zen-main-browser-background-old", - docElement.style.getPropertyValue("--zen-main-browser-background") + backgroundElement.style.getPropertyValue("--zen-main-browser-background") ); - docElement.style.setProperty( + toolbarElement.style.setProperty( "--zen-main-browser-background-toolbar-old", - docElement.style.getPropertyValue("--zen-main-browser-background-toolbar") - ); - docElement.style.setProperty( - "--zen-background-opacity", - browser.gZenThemePicker.previousBackgroundOpacity ?? 1 + toolbarElement.style.getPropertyValue("--zen-main-browser-background-toolbar") ); + [backgroundElement, toolbarElement].forEach((element) => { + element.style.setProperty( + "--zen-background-opacity", + browser.gZenThemePicker.previousBackgroundOpacity ?? 1 + ); + }); if (browser.gZenThemePicker.previousBackgroundResolve) { browser.gZenThemePicker.previousBackgroundResolve(); } @@ -1490,7 +1510,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const textureSelectWrapper = browser.document.getElementById( "PanelUI-zen-gradient-generator-texture-wrapper" ); - const textureWrapperWidth = textureSelectWrapper.getBoundingClientRect().width; + const textureWrapperWidth = browser.windowUtils.getBoundsWithoutFlushing(textureSelectWrapper).width; // Dont show when hidden if (textureWrapperWidth) { // rotate and trasnform relative to the wrapper width depending on the texture value @@ -1532,8 +1552,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } } - docElement.style.setProperty("--zen-main-browser-background-toolbar", gradientToolbar); - docElement.style.setProperty("--zen-main-browser-background", gradient); + browser.gZenThemePicker.toolbarBackgroundElement + .style + .setProperty("--zen-main-browser-background-toolbar", gradientToolbar); + browser.gZenThemePicker.browserBackgroundElement + .style + .setProperty("--zen-main-browser-background", gradient); const isDarkModeWindow = browser.gZenThemePicker.isDarkMode; if (isDefaultTheme) { docElement.setAttribute("zen-default-theme", "true"); @@ -1588,9 +1612,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { let accentColor = Services.prefs.getStringPref("zen.theme.accent-color"); let rgb; if (accentColor === "AccentColor") { - const rawRgb = window.getComputedStyle( - document.getElementById("zen-browser-background") - ).color; + const rawRgb = window.getComputedStyle(lazy.browserBackgroundElement).color; rgb = rawRgb.match(/\d+/g).map(Number); // Match our theme a bit more, since we can't always expect the OS // to give us a color matching our theme scheme @@ -1735,23 +1757,28 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { return newPathData.trim(); } - invalidateGradientCache() { - this.#gradientsCache = {}; + invalidateGradientCache(uuid) { + delete this.#gradientsCache[uuid]; window.dispatchEvent(new Event("ZenGradientCacheChanged", { bubbles: true })); } - getGradientForWorkspace(workspace) { + getGradientForWorkspace(workspace, { getGradient = true } = {}) { const uuid = workspace.uuid; - if (this.#gradientsCache[uuid]) { - return this.#gradientsCache[uuid]; + let cachedData = this.#gradientsCache[uuid]; + if (cachedData && !(getGradient && !cachedData.gradient)) { + return cachedData; } const previousOpacity = this.currentOpacity; const previousLightness = this.#currentLightness; const theme = workspace.theme; this.currentOpacity = theme.opacity ?? 0.5; this.#currentLightness = theme.lightness ?? 50; - const gradient = this.getGradient(theme.gradientColors); - const toolbarGradient = this.getGradient(theme.gradientColors, true); + let gradient; + let toolbarGradient; + if (getGradient) { + gradient = this.getGradient(theme.gradientColors); + toolbarGradient = this.getGradient(theme.gradientColors, true); + } let dominantColor = this.getMostDominantColor(theme.gradientColors); const isDefaultTheme = !dominantColor; if (isDefaultTheme) { diff --git a/src/zen/workspaces/ZenWorkspace.mjs b/src/zen/workspaces/ZenWorkspace.mjs index 80eaea9fa..883e12358 100644 --- a/src/zen/workspaces/ZenWorkspace.mjs +++ b/src/zen/workspaces/ZenWorkspace.mjs @@ -361,7 +361,8 @@ export class nsZenWorkspace extends MozXULElement { #onGradientCacheChanged() { const { isDarkMode, isExplicitMode, toolbarColor, primaryColor } = gZenThemePicker.getGradientForWorkspace( - gZenWorkspaces.getWorkspaceFromId(this.workspaceUuid) + gZenWorkspaces.getWorkspaceFromId(this.workspaceUuid), + { getGradient: false } ); if (isExplicitMode) { this.style.colorScheme = isDarkMode ? "dark" : "light"; diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 64d39b63c..3dc0ab192 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -12,6 +12,14 @@ ChromeUtils.defineESModuleGetters(lazy, { ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs", }); +ChromeUtils.defineLazyGetter(lazy, "browserBackgroundElement", () => { + return document.getElementById("zen-browser-background"); +}); + +ChromeUtils.defineLazyGetter(lazy, "toolbarBackgroundElement", () => { + return document.getElementById("zen-toolbar-background"); +}); + /** * Zen Spaces manager. This class is mainly responsible for the UI * and user interactions but it also contains some logic to manage @@ -636,7 +644,9 @@ class nsZenWorkspaces { Services.prefs.setBoolPref("zen.swipe.is-fast-swipe", false); document.documentElement.removeAttribute("swipe-gesture"); gZenUIManager.tabsWrapper.style.removeProperty("scrollbar-width"); - document.documentElement.style.setProperty("--zen-background-opacity", "1"); + [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach((element) => { + element.style.setProperty("--zen-background-opacity", "1"); + }); delete this._hasAnimatedBackgrounds; this.updateTabsContainers(); document.removeEventListener("popupshown", this.popupOpenHandler, { once: true }); @@ -1555,6 +1565,7 @@ class nsZenWorkspaces { glanceTab.setAttribute("zen-workspace-id", workspaceID); } } + gBrowser.tabContainer._invalidateCachedTabs(); return true; } @@ -1781,14 +1792,16 @@ class nsZenWorkspaces { } = gZenThemePicker.getGradientForWorkspace(nextWorkspace); const existingGrain = gZenThemePicker.getGradientForWorkspace(workspace).grain; const percentage = Math.abs(offsetPixels) / 200; - document.documentElement.style.setProperty("--zen-background-opacity", 1 - percentage); + [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach((element) => { + element.style.setProperty("--zen-background-opacity", 1 - percentage); + }); if (!this._hasAnimatedBackgrounds) { this._hasAnimatedBackgrounds = true; - document.documentElement.style.setProperty( + lazy.browserBackgroundElement.style.setProperty( "--zen-main-browser-background-old", nextGradient ); - document.documentElement.style.setProperty( + lazy.toolbarBackgroundElement.style.setProperty( "--zen-main-browser-background-toolbar-old", nextToolbarGradient ); @@ -1885,7 +1898,7 @@ class nsZenWorkspaces { } document.documentElement.setAttribute("animating-background", "true"); if (shouldAnimate && previousWorkspace) { - let previousBackgroundOpacity = document.documentElement.style.getPropertyValue( + let previousBackgroundOpacity = lazy.browserBackgroundElement.style.getPropertyValue( "--zen-background-opacity" ); try { @@ -1902,13 +1915,16 @@ class nsZenWorkspaces { previousBackgroundOpacity = 1 - previousBackgroundOpacity; } gZenThemePicker.previousBackgroundOpacity = previousBackgroundOpacity; - document.documentElement.style.setProperty( - "--zen-background-opacity", - previousBackgroundOpacity - ); + let elements = [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement]; + elements.forEach((element) => { + element.style.setProperty( + "--zen-background-opacity", + previousBackgroundOpacity + ); + }); animations.push( gZenUIManager.motion.animate( - document.documentElement, + elements, { "--zen-background-opacity": [previousBackgroundOpacity, 1], }, @@ -2153,7 +2169,7 @@ class nsZenWorkspaces { } _shouldChangeToTab(aTab) { - return !(aTab?.pinned && aTab?.hasAttribute("pending")); + return !(aTab?.pinned && aTab?.hasAttribute("pending")) && !aTab?.closing; } async #shouldShowTabInCurrentWorkspace(tab) { From 4d56da43190b080efad23d0c1a742103a6a6134c Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Tue, 10 Mar 2026 11:18:02 +0100 Subject: [PATCH 13/59] chore: Make sure to run patch imports when syncing upstream, b=no-bug, c=workflows --- .github/workflows/sync-upstream.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index ba7d6b620..fd479e3e8 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -73,6 +73,10 @@ jobs: npm run sync fi + - name: Run Import + if: steps.check-upstream-branch.outputs.branch_exists == 'false' + run: npm run import + - name: Run Bootstrap if: steps.check-upstream-branch.outputs.branch_exists == 'false' run: npm run bootstrap From c4948ee0cd7808bb1f957949a50edc04a9800d89 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Tue, 10 Mar 2026 12:52:35 +0100 Subject: [PATCH 14/59] chore: Sync upstream Firefox to version 148.0.2, p=#12712 --- README.md | 2 +- build/firefox-cache/l10n-last-commit-hash | 2 +- surfer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3cc1fcc5e..20cdb6642 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne ### Firefox Versions - [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `148.0`! 🚀 -- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 148.0`! +- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 148.0.2`! ### Contributing diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index bf48d250f..0300497dd 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -40d4c2395112d4188721e69d338ee75bded8858a \ No newline at end of file +feb9bb27ea7a74dc7a50ab79c70f64b06cdeacc1 \ No newline at end of file diff --git a/surfer.json b/surfer.json index c75f6a435..fbaede384 100644 --- a/surfer.json +++ b/surfer.json @@ -6,7 +6,7 @@ "version": { "product": "firefox", "version": "148.0", - "candidate": "148.0", + "candidate": "148.0.2", "candidateBuild": 1 }, "buildOptions": { From 036cfb187ca92b0352e034f24d45e25b306a2e28 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Tue, 10 Mar 2026 21:34:24 +0100 Subject: [PATCH 15/59] chore: Run lint and fund dependencies, p=#12718 --- .github/workflows/code-linter.yml | 4 +- .github/workflows/pr-test.yml | 4 +- .github/workflows/sync-upstream.yml | 7 + package-lock.json | 168 +- package.json | 9 +- src/-prettierignore.patch | 17 + src/-stylelintignore.patch | 13 +- src/eslint-ignores-config-mjs.patch | 7 +- src/tools/lint/eslint/__init__-py.patch | 13 + src/zen/@types/lib.gecko.darwin.d.ts | 38 +- src/zen/@types/lib.gecko.dom.d.ts | 2827 +++++++++++++---- src/zen/@types/lib.gecko.glean.d.ts | 1250 ++++++-- src/zen/@types/lib.gecko.linux.d.ts | 6 +- src/zen/@types/lib.gecko.nsresult.d.ts | 3 +- src/zen/@types/lib.gecko.tweaks.d.ts | 8 +- src/zen/@types/lib.gecko.win32.d.ts | 61 +- src/zen/@types/lib.gecko.xpcom.d.ts | 2136 ++++++++++--- src/zen/@types/zen.d.ts | 33 +- src/zen/common/emojis/ZenEmojiPicker.mjs | 24 +- src/zen/common/modules/ZenCommonUtils.mjs | 26 +- src/zen/common/modules/ZenHasPolyfill.mjs | 33 +- src/zen/common/modules/ZenMenubar.mjs | 27 +- src/zen/common/modules/ZenSessionStore.mjs | 2 +- .../common/modules/ZenSidebarNotification.mjs | 27 +- src/zen/common/modules/ZenStartup.mjs | 26 +- src/zen/common/modules/ZenUIManager.mjs | 323 +- src/zen/common/modules/ZenUpdates.mjs | 9 +- src/zen/common/sys/ZenCustomizableUI.sys.mjs | 27 +- src/zen/common/sys/ZenUIMigration.sys.mjs | 53 +- src/zen/common/zen-sets.js | 280 +- src/zen/common/zenThemeModifier.js | 46 +- src/zen/compact-mode/ZenCompactMode.mjs | 187 +- src/zen/downloads/ZenDownloadAnimation.mjs | 71 +- src/zen/drag-and-drop/ZenDragAndDrop.js | 354 ++- src/zen/folders/ZenFolder.mjs | 29 +- src/zen/folders/ZenFolders.mjs | 285 +- src/zen/glance/ZenGlanceManager.mjs | 196 +- src/zen/glance/actors/ZenGlanceChild.sys.mjs | 8 +- src/zen/glance/actors/ZenGlanceParent.sys.mjs | 12 +- src/zen/glance/tests/GlanceTestUtils.sys.mjs | 4 +- src/zen/kbs/ZenKeyboardShortcuts.mjs | 116 +- src/zen/live-folders/ZenLiveFolder.sys.mjs | 30 +- .../ZenLiveFoldersManager.sys.mjs | 49 +- src/zen/live-folders/ZenLiveFoldersUI.mjs | 29 +- .../providers/GithubLiveFolder.sys.mjs | 22 +- .../providers/RssLiveFolder.sys.mjs | 61 +- src/zen/media/ZenMediaController.mjs | 184 +- src/zen/mods/ZenMods.mjs | 125 +- .../actors/ZenModsMarketplaceChild.sys.mjs | 36 +- .../actors/ZenModsMarketplaceParent.sys.mjs | 4 +- .../sessionstore/ZenSessionManager.sys.mjs | 176 +- src/zen/sessionstore/ZenWindowSync.sys.mjs | 307 +- src/zen/split-view/ZenViewSplitter.mjs | 433 ++- src/zen/tabs/ZenPinnedTabManager.mjs | 222 +- .../browser_compact_mode_width.js | 10 +- .../browser_container_auto_switch.js | 13 +- .../browser_container_specific_essentials.js | 16 +- .../tests/folders/browser_folder_density.js | 24 +- .../tests/folders/browser_folder_empty_tab.js | 15 +- .../folders/browser_folder_issue_9885.js | 5 +- .../folders/browser_folder_issue_9981.js | 33 +- .../folders/browser_folder_max_subfolders.js | 9 +- .../folders/browser_folder_multiselected.js | 17 +- .../folders/browser_folder_owner_tabs.js | 8 +- .../folders/browser_folder_reset_button.js | 35 +- .../folders/browser_folder_visible_tabs.js | 10 +- src/zen/tests/folders/head.js | 6 +- src/zen/tests/glance/browser_glance_basic.js | 2 +- src/zen/tests/glance/browser_glance_close.js | 4 +- .../glance/browser_glance_close_select.js | 14 +- src/zen/tests/glance/browser_glance_expand.js | 55 +- .../tests/glance/browser_glance_next_tab.js | 15 +- .../tests/glance/browser_glance_prev_tab.js | 15 +- .../glance/browser_glance_select_parent.js | 13 +- .../browser_github_live_folder.js | 23 +- .../tests/live-folders/browser_live_folder.js | 26 +- .../live-folders/browser_rss_live_folder.js | 12 +- src/zen/tests/pinned/browser_issue_8726.js | 10 +- .../tests/pinned/browser_pinned_changed.js | 44 +- src/zen/tests/pinned/browser_pinned_close.js | 27 +- .../tests/pinned/browser_pinned_created.js | 15 +- .../pinned/browser_pinned_nounload_reset.js | 62 +- .../pinned/browser_pinned_reset_noswitch.js | 62 +- src/zen/tests/pinned/browser_pinned_switch.js | 60 +- .../pinned/browser_pinned_to_essential.js | 11 +- .../pinned/browser_pinned_unload_changed.js | 66 +- .../pinned/browser_pinned_unload_noreset.js | 60 +- .../split_view/browser_basic_split_view.js | 3 +- .../browser_split_browser_duplication.js | 48 +- .../tests/split_view/browser_split_groups.js | 37 +- .../split_view/browser_split_inset_checks.js | 18 +- .../split_view/browser_split_view_empty.js | 12 +- .../browser_split_view_with_folders.js | 29 +- .../browser_split_view_with_glance.js | 21 +- src/zen/tests/split_view/head.js | 8 +- .../tests/tabs/browser_drag_drop_vertical.js | 24 +- .../tabs/browser_tabs_cycle_by_attribute.js | 29 +- .../tests/tabs/browser_tabs_empty_checks.js | 15 +- src/zen/tests/tabs/head.js | 141 +- .../ub-actions/browser_ub_actions_search.js | 12 +- .../tests/urlbar/browser_floating_urlbar.js | 5 +- src/zen/tests/urlbar/browser_issue_7385.js | 6 +- src/zen/tests/urlbar/head.js | 10 +- src/zen/tests/welcome/browser_welcome.js | 40 +- src/zen/tests/welcome/head.js | 4 +- .../window_sync/browser_sync_tab_label.js | 6 +- .../window_sync/browser_sync_tab_open.js | 6 +- src/zen/tests/window_sync/head.js | 10 +- .../workspaces/browser_basic_workspaces.js | 6 +- .../workspaces/browser_change_to_empty.js | 6 +- .../workspaces/browser_double_click_newtab.js | 12 +- .../tests/workspaces/browser_issue_10455.js | 11 +- .../tests/workspaces/browser_issue_8699.js | 21 +- .../tests/workspaces/browser_issue_9900.js | 12 +- .../workspaces/browser_overflow_scrollbox.js | 39 +- .../browser_private_mode_startup.js | 2 +- .../workspaces/browser_workspace_bookmarks.js | 26 +- .../workspaces/browser_workspace_unload.js | 35 +- src/zen/tests/workspaces/head.js | 75 +- src/zen/urlbar/ZenSiteDataPanel.sys.mjs | 138 +- src/zen/urlbar/ZenUBActionsProvider.sys.mjs | 85 +- src/zen/urlbar/ZenUBGlobalActions.sys.mjs | 51 +- src/zen/urlbar/ZenUBProvider.sys.mjs | 3 +- src/zen/urlbar/ZenUBResultsLearner.sys.mjs | 4 +- src/zen/welcome/ZenWelcome.mjs | 104 +- src/zen/workspaces/ZenGradientGenerator.mjs | 419 ++- src/zen/workspaces/ZenWorkspace.mjs | 91 +- .../ZenWorkspaceBookmarksStorage.js | 6 +- src/zen/workspaces/ZenWorkspaceCreation.mjs | 55 +- src/zen/workspaces/ZenWorkspaceIcons.mjs | 17 +- src/zen/workspaces/ZenWorkspaces.mjs | 756 +++-- 131 files changed, 10249 insertions(+), 3453 deletions(-) create mode 100644 src/-prettierignore.patch create mode 100644 src/tools/lint/eslint/__init__-py.patch diff --git a/.github/workflows/code-linter.yml b/.github/workflows/code-linter.yml index 04ee4408d..51dbfc2c1 100644 --- a/.github/workflows/code-linter.yml +++ b/.github/workflows/code-linter.yml @@ -33,9 +33,9 @@ jobs: - name: Restore Surfer engine cache id: surfer-engine-cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: - path: .surfer/engine/*.tar + path: .surfer/engine/ key: surfer-engine-${{ hashFiles('surfer.json') }} - name: Setup Git diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index 5cc2bd6ae..c23a051a1 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -30,9 +30,9 @@ jobs: - name: Restore Surfer engine cache id: surfer-engine-cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: - path: .surfer/engine/*.tar + path: .surfer/engine/ key: surfer-engine-${{ hashFiles('surfer.json') }} - name: Setup Git diff --git a/.github/workflows/sync-upstream.yml b/.github/workflows/sync-upstream.yml index fd479e3e8..066be05d1 100644 --- a/.github/workflows/sync-upstream.yml +++ b/.github/workflows/sync-upstream.yml @@ -60,6 +60,13 @@ jobs: npm run surfer -- ci --brand release fi + - name: Restore Surfer engine cache + id: surfer-engine-cache + uses: actions/cache@v5 + with: + path: .surfer/engine/ + key: surfer-engine-${{ hashFiles('surfer.json') }} + - name: Download Firefox and dependencies if: steps.check-upstream-branch.outputs.branch_exists == 'false' run: npm run download diff --git a/package-lock.json b/package-lock.json index fde4e3044..279cdb9e9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "license": "MPL-2.0", "devDependencies": { "@babel/preset-typescript": "^7.27.0", - "@zen-browser/surfer": "^1.13.1", + "@zen-browser/prettier": "^3.9.3", + "@zen-browser/surfer": "^1.13.4", "formal-git": "^1.2.9", "globals": "^16.3.0", "husky": "^9.1.7", @@ -564,55 +565,55 @@ } }, "node_modules/@oozcitak/dom": { - "version": "1.15.10", - "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.10.tgz", - "integrity": "sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-2.0.2.tgz", + "integrity": "sha512-GjpKhkSYC3Mj4+lfwEyI1dqnsKTgwGy48ytZEhm4A/xnH/8z9M3ZVXKr/YGQi3uCLs1AEBS+x5T2JPiueEDW8w==", "dev": true, "license": "MIT", "dependencies": { - "@oozcitak/infra": "1.0.8", - "@oozcitak/url": "1.0.4", - "@oozcitak/util": "8.3.8" + "@oozcitak/infra": "^2.0.2", + "@oozcitak/url": "^3.0.0", + "@oozcitak/util": "^10.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=20.0" } }, "node_modules/@oozcitak/infra": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz", - "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-2.0.2.tgz", + "integrity": "sha512-2g+E7hoE2dgCz/APPOEK5s3rMhJvNxSMBrP+U+j1OWsIbtSpWxxlUjq1lU8RIsFJNYv7NMlnVsCuHcUzJW+8vA==", "dev": true, "license": "MIT", "dependencies": { - "@oozcitak/util": "8.3.8" + "@oozcitak/util": "^10.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=20.0" } }, "node_modules/@oozcitak/url": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz", - "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-3.0.0.tgz", + "integrity": "sha512-ZKfET8Ak1wsLAiLWNfFkZc/BraDccuTJKR6svTYc7sVjbR+Iu0vtXdiDMY4o6jaFl5TW2TlS7jbLl4VovtAJWQ==", "dev": true, "license": "MIT", "dependencies": { - "@oozcitak/infra": "1.0.8", - "@oozcitak/util": "8.3.8" + "@oozcitak/infra": "^2.0.2", + "@oozcitak/util": "^10.0.0" }, "engines": { - "node": ">=8.0" + "node": ">=20.0" } }, "node_modules/@oozcitak/util": { - "version": "8.3.8", - "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz", - "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-10.0.0.tgz", + "integrity": "sha512-hAX0pT/73190NLqBPPWSdBVGtbY6VOhWYK3qqHqtXQ1gK7kS2yz4+ivsN07hpJ6I3aeMtKP6J6npsEKOAzuTLA==", "dev": true, "license": "MIT", "engines": { - "node": ">=8.0" + "node": ">=20.0" } }, "node_modules/@resvg/resvg-js": { @@ -850,10 +851,26 @@ "dev": true, "license": "MIT" }, + "node_modules/@zen-browser/prettier": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/@zen-browser/prettier/-/prettier-3.9.3.tgz", + "integrity": "sha512-+kdkatStC4kxDe7CZC4W3Xt3B7S9UsrpltaWdk9PnXQx0IMIjOJ6P1apWI3CQGyweDagBFu4ljA1wkxcbrJTqw==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/@zen-browser/surfer": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.13.1.tgz", - "integrity": "sha512-IMi/A+ee/z5tfwblvP/melZEzqczLhA7hU2hzQajW1bS7HLIvJN2vjfl1oT0TElmIHC6amrWNGl8HI3k4pgWog==", + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.13.4.tgz", + "integrity": "sha512-rpwceHYN3k1kaZP+IhAiZ5ksLgedqGv8uo8kqACFR4dDX/DO5P7XoCQtooOPrEyrxcI7uu/gI/xtuldfOBKUkQ==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -878,7 +895,7 @@ "semver": "^7.3.7", "sharp": "^0.32.6", "tiny-glob": "^0.2.9", - "xmlbuilder2": "^3.0.2" + "xmlbuilder2": "^4.0.3" }, "bin": { "surfer": "dist/index.js" @@ -929,6 +946,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -981,14 +1005,14 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", - "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", + "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", "dev": true, "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, @@ -1722,20 +1746,6 @@ "node": ">=6" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -1913,9 +1923,9 @@ } }, "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "dev": true, "license": "MIT", "dependencies": { @@ -2379,6 +2389,19 @@ "dev": true, "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -3631,13 +3654,6 @@ "dev": true, "license": "MIT" }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/stack-base-iterator": { "version": "1.1.20", "resolved": "https://registry.npmjs.org/stack-base-iterator/-/stack-base-iterator-1.1.20.tgz", @@ -4124,43 +4140,19 @@ "license": "ISC" }, "node_modules/xmlbuilder2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-3.1.1.tgz", - "integrity": "sha512-WCSfbfZnQDdLQLiMdGUQpMxxckeQ4oZNMNhLVkcekTu7xhD4tuUDyAPoY8CwXvBYE6LwBHd6QW2WZXlOWr1vCw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-4.0.3.tgz", + "integrity": "sha512-bx8Q1STctnNaaDymWnkfQLKofs0mGNN7rLLapJlGuV3VlvegD7Ls4ggMjE3aUSWItCCzU0PEv45lI87iSigiCA==", "dev": true, "license": "MIT", "dependencies": { - "@oozcitak/dom": "1.15.10", - "@oozcitak/infra": "1.0.8", - "@oozcitak/util": "8.3.8", - "js-yaml": "3.14.1" + "@oozcitak/dom": "^2.0.2", + "@oozcitak/infra": "^2.0.2", + "@oozcitak/util": "^10.0.0", + "js-yaml": "^4.1.1" }, "engines": { - "node": ">=12.0" - } - }, - "node_modules/xmlbuilder2/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "license": "MIT", - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/xmlbuilder2/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "node": ">=20.0" } }, "node_modules/xtend": { diff --git a/package.json b/package.json index a34cc5117..a9d156ad1 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "sync:raw": "surfer update", "sync:rc": "python3 scripts/update_ff.py --rc", "sync:l10n": "python3 scripts/update_ff.py --just-l10n", - "lint": "cd engine && ./mach lint zen/", + "lint": "cd engine && ./mach lint zen", "lint:fix": "npm run lint -- --fix", "prepare": "husky", "reset-ff": "surfer reset", @@ -50,11 +50,14 @@ "homepage": "https://github.com/zen-browser/desktop#readme", "devDependencies": { "@babel/preset-typescript": "^7.27.0", - "@zen-browser/surfer": "^1.13.1", + "@zen-browser/prettier": "^3.9.3", + "@zen-browser/surfer": "^1.13.4", "formal-git": "^1.2.9", "globals": "^16.3.0", "husky": "^9.1.7", "lint-staged": "^15.3.0", "typescript": "^5.9.3" - } + }, + "notes(private)": "We don't want to publish to npm, so this is marked as private", + "private": true } diff --git a/src/-prettierignore.patch b/src/-prettierignore.patch new file mode 100644 index 000000000..edcc3a185 --- /dev/null +++ b/src/-prettierignore.patch @@ -0,0 +1,17 @@ +diff --git a/.prettierignore b/.prettierignore +index cbca8bb4b36cecc44e6b498e9ef15bc4bdc21871..8f3a14e14a2d58875bdd6f04bd31f57e23073148 100644 +--- a/.prettierignore ++++ b/.prettierignore +@@ -1795,3 +1795,12 @@ tools/ts/test/baselines/ + try_task_config.json + xpcom/idl-parser/xpidl/fixtures/xpctest.d.json + **/package-lock.json ++ ++ ++*.bundle.min.js ++*.min.js ++*.min.mjs ++*.inc ++*/mochitests/* ++*.svg ++ diff --git a/src/-stylelintignore.patch b/src/-stylelintignore.patch index 154a04f45..3e44aac53 100644 --- a/src/-stylelintignore.patch +++ b/src/-stylelintignore.patch @@ -1,19 +1,13 @@ diff --git a/.stylelintignore b/.stylelintignore -index 185490999507b8a5032977237af50f5e61c71df1..36f760f473b857e851134ceb62c837cb8d29c966 100644 +index 185490999507b8a5032977237af50f5e61c71df1..e887fafa90b881e852a287ed8898638c995861ab 100644 --- a/.stylelintignore +++ b/.stylelintignore -@@ -106,3 +106,26 @@ build/pgo/blueprint/**/*.css +@@ -106,3 +106,19 @@ build/pgo/blueprint/**/*.css # under our control or we don't want to modify at this point: testing/web-platform/mozilla/ testing/web-platform/tests/ + -+**/*.bundle.min.js -+**/*.min.js -+**/*.min.mjs -+ -+**/*.svg -+ -+**/*.inc.css ++*.inc.css + +zen/tests/mochitests/* + @@ -22,7 +16,6 @@ index 185490999507b8a5032977237af50f5e61c71df1..36f760f473b857e851134ceb62c837cb +zen/tabs/zen-tabs.css +zen/common/styles/zen-theme.css +zen/compact-mode/zen-compact-mode.css -+zen/common/ZenEmojis.mjs + +zen/split-view/zen-decks.css +zen/workspaces/zen-workspaces.css diff --git a/src/eslint-ignores-config-mjs.patch b/src/eslint-ignores-config-mjs.patch index 42d5a8aa2..cd4d8a22c 100644 --- a/src/eslint-ignores-config-mjs.patch +++ b/src/eslint-ignores-config-mjs.patch @@ -1,12 +1,13 @@ diff --git a/eslint-ignores.config.mjs b/eslint-ignores.config.mjs -index 0cfd7e02ad58c331f48f1ba8e1588777e1ce2595..d85b95b18a7195b6794083af71cbe1947d9f2f9c 100644 +index 0cfd7e02ad58c331f48f1ba8e1588777e1ce2595..888674b5ed2b68dbe77eb177ba0947f94ed57c80 100644 --- a/eslint-ignores.config.mjs +++ b/eslint-ignores.config.mjs -@@ -312,4 +312,7 @@ export default [ +@@ -312,4 +312,8 @@ export default [ // Test files for circular import in modules. "dom/base/test/jsmodules/import_circular.mjs", "dom/base/test/jsmodules/import_circular_1.mjs", + -+ "**/*.min.mjs", ++ "zen/common/emojis/ZenEmojisData.min.mjs", + "zen/tests/**", ++ "zen/vendor/**", ]; diff --git a/src/tools/lint/eslint/__init__-py.patch b/src/tools/lint/eslint/__init__-py.patch new file mode 100644 index 000000000..880dae2c6 --- /dev/null +++ b/src/tools/lint/eslint/__init__-py.patch @@ -0,0 +1,13 @@ +diff --git a/tools/lint/eslint/__init__.py b/tools/lint/eslint/__init__.py +index cd45822500a8b5e1112efad81ed34e01c0dbcc19..9f47b4a46bf1c36db06b45e047a939ae08bcb703 100644 +--- a/tools/lint/eslint/__init__.py ++++ b/tools/lint/eslint/__init__.py +@@ -114,7 +114,7 @@ def lint(paths, config, binary=None, fix=None, rules=[], setup=None, **lintargs) + [ + binary, + os.path.join( +- module_path, "node_modules", "prettier", "bin", "prettier.cjs" ++ module_path, "..", "node_modules", "@zen-browser", "prettier", "bin", "prettier.cjs" + ), + "--list-different", + "--no-error-on-unmatched-pattern", diff --git a/src/zen/@types/lib.gecko.darwin.d.ts b/src/zen/@types/lib.gecko.darwin.d.ts index 209fd23ae..e83a0f0d2 100644 --- a/src/zen/@types/lib.gecko.darwin.d.ts +++ b/src/zen/@types/lib.gecko.darwin.d.ts @@ -53,9 +53,15 @@ declare global { dockMenu: nsIStandaloneNativeMenu; activateApplication(aIgnoreOtherApplications: boolean): void; badgeText: string; - setBadgeImage(aBadgeImage: imgIContainer, aPaintContext?: nsISVGPaintContext): void; + setBadgeImage( + aBadgeImage: imgIContainer, + aPaintContext?: nsISVGPaintContext + ): void; readonly isAppInDock: boolean; - ensureAppIsPinnedToDock(aAppPath?: string, aAppToReplacePath?: string): boolean; + ensureAppIsPinnedToDock( + aAppPath?: string, + aAppToReplacePath?: string + ): boolean; launchAppBundle( aAppBundle: nsIFile, aArgs: string[], @@ -70,7 +76,10 @@ declare global { }>; interface nsIMacFinderProgress extends nsISupports { - init(path: string, canceledCallback: nsIMacFinderProgressCanceledCallback): void; + init( + path: string, + canceledCallback: nsIMacFinderProgressCanceledCallback + ): void; updateProgress(currentProgress: u64, totalProgress: u64): void; end(): void; } @@ -86,7 +95,11 @@ declare global { // https://searchfox.org/mozilla-central/source/widget/nsIMacUserActivityUpdater.idl interface nsIMacUserActivityUpdater extends nsISupports { - updateLocation(pageUrl: string, pageTitle: string, window: nsIBaseWindow): void; + updateLocation( + pageUrl: string, + pageTitle: string, + window: nsIBaseWindow + ): void; } // https://searchfox.org/mozilla-central/source/widget/nsIMacWebAppUtils.idl @@ -120,7 +133,11 @@ declare global { readonly STATE_ERROR?: 3; readonly STATE_PAUSED?: 4; - setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void; + setProgressState( + state: nsTaskbarProgressState, + currentValue?: u64, + maxValue?: u64 + ): void; } // https://searchfox.org/mozilla-central/source/widget/nsITouchBarHelper.idl @@ -157,11 +174,18 @@ declare global { // https://searchfox.org/mozilla-central/source/widget/nsITouchBarUpdater.idl interface nsITouchBarUpdater extends nsISupports { - updateTouchBarInputs(aWindow: nsIBaseWindow, aInputs: nsITouchBarInput[]): void; + updateTouchBarInputs( + aWindow: nsIBaseWindow, + aInputs: nsITouchBarInput[] + ): void; enterCustomizeMode(): void; isTouchBarInitialized(): boolean; setTouchBarInitialized(aIsInitialized: boolean): void; - showPopover(aWindow: nsIBaseWindow, aPopover: nsITouchBarInput, aShowing: boolean): void; + showPopover( + aWindow: nsIBaseWindow, + aPopover: nsITouchBarInput, + aShowing: boolean + ): void; } // https://searchfox.org/mozilla-central/source/xpcom/base/nsIMacPreferencesReader.idl diff --git a/src/zen/@types/lib.gecko.dom.d.ts b/src/zen/@types/lib.gecko.dom.d.ts index b35a25143..49cad66a9 100644 --- a/src/zen/@types/lib.gecko.dom.d.ts +++ b/src/zen/@types/lib.gecko.dom.d.ts @@ -1603,7 +1603,8 @@ interface InferenceSessionSessionOptions { logSeverityLevel?: number; logVerbosityLevel?: number; optimizedModelFilePath?: string; - preferredOutputLocation?: TensorDataLocation | Record; + preferredOutputLocation?: + TensorDataLocation | Record; profileFilePrefix?: string; } @@ -4577,7 +4578,8 @@ interface sendAbuseReportOptions { authorization?: string | null; } -type EventListener = ((event: Event) => void) | { handleEvent(event: Event): void }; +type EventListener = + ((event: Event) => void) | { handleEvent(event: Event): void }; type MessageListener = | ((argument: ReceiveMessageArgument) => any) @@ -4612,7 +4614,8 @@ type ObserverCallback = | ((observer: FetchObserver) => void) | { handleEvent(observer: FetchObserver): void }; -type UncaughtRejectionObserver = ((p: any) => boolean) | { onLeftUncaught(p: any): boolean }; +type UncaughtRejectionObserver = + ((p: any) => boolean) | { onLeftUncaught(p: any): boolean }; type UniFFICallbackHandler = | (( @@ -4633,7 +4636,12 @@ type XPathNSResolver = | { lookupNamespaceURI(prefix: string | null): string | null }; interface ANGLE_instanced_arrays { - drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void; + drawArraysInstancedANGLE( + mode: GLenum, + first: GLint, + count: GLsizei, + primcount: GLsizei + ): void; drawElementsInstancedANGLE( mode: GLenum, count: GLsizei, @@ -4930,7 +4938,10 @@ declare var AnalyserNode: { }; interface Animatable { - animate(keyframes: any, options?: UnrestrictedDoubleOrKeyframeAnimationOptions): Animation; + animate( + keyframes: any, + options?: UnrestrictedDoubleOrKeyframeAnimationOptions + ): Animation; getAnimations(options?: GetAnimationsOptions): Animation[]; } @@ -4989,7 +5000,10 @@ interface Animation extends EventTarget { declare var Animation: { prototype: Animation; - new (effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; + new ( + effect?: AnimationEffect | null, + timeline?: AnimationTimeline | null + ): Animation; isInstance: IsInstance; }; @@ -5029,7 +5043,10 @@ interface AnimationPlaybackEvent extends Event { declare var AnimationPlaybackEvent: { prototype: AnimationPlaybackEvent; - new (type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent; + new ( + type: string, + eventInitDict?: AnimationPlaybackEventInit + ): AnimationPlaybackEvent; isInstance: IsInstance; }; @@ -5074,8 +5091,16 @@ interface AudioBuffer { readonly length: number; readonly numberOfChannels: number; readonly sampleRate: number; - copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void; - copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void; + copyFromChannel( + destination: Float32Array, + channelNumber: number, + startInChannel?: number + ): void; + copyToChannel( + source: Float32Array, + channelNumber: number, + startInChannel?: number + ): void; getChannelData(channel: number): Float32Array; } @@ -5085,7 +5110,8 @@ declare var AudioBuffer: { isInstance: IsInstance; }; -interface AudioBufferSourceNode extends AudioScheduledSourceNode, AudioNodePassThrough { +interface AudioBufferSourceNode + extends AudioScheduledSourceNode, AudioNodePassThrough { buffer: AudioBuffer | null; readonly detune: AudioParam; loop: boolean; @@ -5095,7 +5121,10 @@ interface AudioBufferSourceNode extends AudioScheduledSourceNode, AudioNodePassT start(when?: number, grainOffset?: number, grainDuration?: number): void; addEventListener( type: K, - listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: AudioBufferSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -5105,7 +5134,10 @@ interface AudioBufferSourceNode extends AudioScheduledSourceNode, AudioNodePassT ): void; removeEventListener( type: K, - listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: AudioBufferSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -5117,7 +5149,10 @@ interface AudioBufferSourceNode extends AudioScheduledSourceNode, AudioNodePassT declare var AudioBufferSourceNode: { prototype: AudioBufferSourceNode; - new (context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode; + new ( + context: BaseAudioContext, + options?: AudioBufferSourceOptions + ): AudioBufferSourceNode; isInstance: IsInstance; }; @@ -5125,10 +5160,14 @@ interface AudioContext extends BaseAudioContext { readonly baseLatency: number; readonly outputLatency: number; close(): Promise; - createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; + createMediaElementSource( + mediaElement: HTMLMediaElement + ): MediaElementAudioSourceNode; createMediaStreamDestination(): MediaStreamAudioDestinationNode; createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode; - createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode; + createMediaStreamTrackSource( + mediaStreamTrack: MediaStreamTrack + ): MediaStreamTrackAudioSourceNode; getOutputTimestamp(): AudioTimestamp; suspend(): Promise; addEventListener( @@ -5169,7 +5208,10 @@ interface AudioData { allocationSize(options: AudioDataCopyToOptions): number; clone(): AudioData; close(): void; - copyTo(destination: AllowSharedBufferSource, options: AudioDataCopyToOptions): void; + copyTo( + destination: AllowSharedBufferSource, + options: AudioDataCopyToOptions + ): void; } declare var AudioData: { @@ -5275,7 +5317,14 @@ declare var AudioEncoder: { }; interface AudioListener { - setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void; + setOrientation( + x: number, + y: number, + z: number, + xUp: number, + yUp: number, + zUp: number + ): void; setPosition(x: number, y: number, z: number): void; } @@ -5325,7 +5374,11 @@ interface AudioParam { cancelScheduledValues(startTime: number): AudioParam; exponentialRampToValueAtTime(value: number, endTime: number): AudioParam; linearRampToValueAtTime(value: number, endTime: number): AudioParam; - setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam; + setTargetAtTime( + target: number, + startTime: number, + timeConstant: number + ): AudioParam; setValueAtTime(value: number, startTime: number): AudioParam; setValueCurveAtTime( values: number[] | Float32Array, @@ -5376,7 +5429,10 @@ interface AudioScheduledSourceNode extends AudioNode { stop(when?: number): void; addEventListener( type: K, - listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: AudioScheduledSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -5386,7 +5442,10 @@ interface AudioScheduledSourceNode extends AudioNode { ): void; removeEventListener( type: K, - listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: AudioScheduledSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -5573,7 +5632,11 @@ interface BaseAudioContext extends EventTarget { readonly state: AudioContextState; createAnalyser(): AnalyserNode; createBiquadFilter(): BiquadFilterNode; - createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer; + createBuffer( + numberOfChannels: number, + length: number, + sampleRate: number + ): AudioBuffer; createBufferSource(): AudioBufferSourceNode; createChannelMerger(numberOfInputs?: number): ChannelMergerNode; createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode; @@ -5701,7 +5764,10 @@ interface BiquadFilterNode extends AudioNode, AudioNodePassThrough { declare var BiquadFilterNode: { prototype: BiquadFilterNode; - new (context: BaseAudioContext, options?: BiquadFilterOptions): BiquadFilterNode; + new ( + context: BaseAudioContext, + options?: BiquadFilterOptions + ): BiquadFilterNode; isInstance: IsInstance; }; @@ -5940,7 +6006,11 @@ interface CSSColor extends CSSColorValue { declare var CSSColor: { prototype: CSSColor; - new (colorSpace: CSSKeywordish, channels: CSSColorPercent[], alpha?: CSSNumberish): CSSColor; + new ( + colorSpace: CSSKeywordish, + channels: CSSColorPercent[], + alpha?: CSSNumberish + ): CSSColor; isInstance: IsInstance; }; @@ -6074,7 +6144,12 @@ interface CSSHSL extends CSSColorValue { declare var CSSHSL: { prototype: CSSHSL; - new (h: CSSColorAngle, s: CSSColorPercent, l: CSSColorPercent, alpha?: CSSColorPercent): CSSHSL; + new ( + h: CSSColorAngle, + s: CSSColorPercent, + l: CSSColorPercent, + alpha?: CSSColorPercent + ): CSSHSL; isInstance: IsInstance; }; @@ -6087,7 +6162,12 @@ interface CSSHWB extends CSSColorValue { declare var CSSHWB: { prototype: CSSHWB; - new (h: CSSNumericValue, w: CSSNumberish, b: CSSNumberish, alpha?: CSSNumberish): CSSHWB; + new ( + h: CSSNumericValue, + w: CSSNumberish, + b: CSSNumberish, + alpha?: CSSNumberish + ): CSSHWB; isInstance: IsInstance; }; @@ -6159,7 +6239,12 @@ interface CSSLCH extends CSSColorValue { declare var CSSLCH: { prototype: CSSLCH; - new (l: CSSColorPercent, c: CSSColorPercent, h: CSSColorAngle, alpha?: CSSColorPercent): CSSLCH; + new ( + l: CSSColorPercent, + c: CSSColorPercent, + h: CSSColorAngle, + alpha?: CSSColorPercent + ): CSSLCH; isInstance: IsInstance; }; @@ -6172,7 +6257,12 @@ interface CSSLab extends CSSColorValue { declare var CSSLab: { prototype: CSSLab; - new (l: CSSColorPercent, a: CSSColorNumber, b: CSSColorNumber, alpha?: CSSColorPercent): CSSLab; + new ( + l: CSSColorPercent, + a: CSSColorNumber, + b: CSSColorNumber, + alpha?: CSSColorPercent + ): CSSLab; isInstance: IsInstance; }; @@ -6215,7 +6305,11 @@ interface CSSMathClamp extends CSSMathValue { declare var CSSMathClamp: { prototype: CSSMathClamp; - new (lower: CSSNumberish, value: CSSNumberish, upper: CSSNumberish): CSSMathClamp; + new ( + lower: CSSNumberish, + value: CSSNumberish, + upper: CSSNumberish + ): CSSMathClamp; isInstance: IsInstance; }; @@ -6295,7 +6389,10 @@ interface CSSMatrixComponent extends CSSTransformComponent { declare var CSSMatrixComponent: { prototype: CSSMatrixComponent; - new (matrix: DOMMatrixReadOnly, options?: CSSMatrixComponentOptions): CSSMatrixComponent; + new ( + matrix: DOMMatrixReadOnly, + options?: CSSMatrixComponentOptions + ): CSSMatrixComponent; isInstance: IsInstance; }; @@ -6341,7 +6438,11 @@ declare var CSSNestedDeclarations: { interface CSSNumericArray { readonly length: number; forEach( - callbackfn: (value: CSSNumericValue, key: number, parent: CSSNumericArray) => void, + callbackfn: ( + value: CSSNumericValue, + key: number, + parent: CSSNumericArray + ) => void, thisArg?: any ): void; [index: number]: CSSNumericValue; @@ -6382,7 +6483,12 @@ interface CSSOKLCH extends CSSColorValue { declare var CSSOKLCH: { prototype: CSSOKLCH; - new (l: CSSColorPercent, c: CSSColorPercent, h: CSSColorAngle, alpha?: CSSColorPercent): CSSOKLCH; + new ( + l: CSSColorPercent, + c: CSSColorPercent, + h: CSSColorAngle, + alpha?: CSSColorPercent + ): CSSOKLCH; isInstance: IsInstance; }; @@ -6395,7 +6501,12 @@ interface CSSOKLab extends CSSColorValue { declare var CSSOKLab: { prototype: CSSOKLab; - new (l: CSSColorPercent, a: CSSColorNumber, b: CSSColorNumber, alpha?: CSSColorPercent): CSSOKLab; + new ( + l: CSSColorPercent, + a: CSSColorNumber, + b: CSSColorNumber, + alpha?: CSSColorPercent + ): CSSOKLab; isInstance: IsInstance; }; @@ -6516,7 +6627,12 @@ interface CSSRGB extends CSSColorValue { declare var CSSRGB: { prototype: CSSRGB; - new (r: CSSColorRGBComp, g: CSSColorRGBComp, b: CSSColorRGBComp, alpha?: CSSColorPercent): CSSRGB; + new ( + r: CSSColorRGBComp, + g: CSSColorRGBComp, + b: CSSColorRGBComp, + alpha?: CSSColorPercent + ): CSSRGB; isInstance: IsInstance; }; @@ -6530,7 +6646,12 @@ interface CSSRotate extends CSSTransformComponent { declare var CSSRotate: { prototype: CSSRotate; new (angle: CSSNumericValue): CSSRotate; - new (x: CSSNumberish, y: CSSNumberish, z: CSSNumberish, angle: CSSNumericValue): CSSRotate; + new ( + x: CSSNumberish, + y: CSSNumberish, + z: CSSNumberish, + angle: CSSNumericValue + ): CSSRotate; isInstance: IsInstance; }; @@ -7267,7 +7388,11 @@ interface CSSTransformValue extends CSSStyleValue { readonly length: number; toMatrix(): DOMMatrix; forEach( - callbackfn: (value: CSSTransformComponent, key: number, parent: CSSTransformValue) => void, + callbackfn: ( + value: CSSTransformComponent, + key: number, + parent: CSSTransformValue + ) => void, thisArg?: any ): void; [index: number]: CSSTransformComponent; @@ -7317,7 +7442,11 @@ interface CSSTranslate extends CSSTransformComponent { declare var CSSTranslate: { prototype: CSSTranslate; - new (x: CSSNumericValue, y: CSSNumericValue, z?: CSSNumericValue): CSSTranslate; + new ( + x: CSSNumericValue, + y: CSSNumericValue, + z?: CSSNumericValue + ): CSSTranslate; isInstance: IsInstance; }; @@ -7335,7 +7464,11 @@ declare var CSSUnitValue: { interface CSSUnparsedValue extends CSSStyleValue { readonly length: number; forEach( - callbackfn: (value: CSSUnparsedSegment, key: number, parent: CSSUnparsedValue) => void, + callbackfn: ( + value: CSSUnparsedSegment, + key: number, + parent: CSSUnparsedValue + ) => void, thisArg?: any ): void; [index: number]: CSSUnparsedSegment; @@ -7354,17 +7487,32 @@ interface CSSVariableReferenceValue { declare var CSSVariableReferenceValue: { prototype: CSSVariableReferenceValue; - new (variable: string, fallback?: CSSUnparsedValue | null): CSSVariableReferenceValue; + new ( + variable: string, + fallback?: CSSUnparsedValue | null + ): CSSVariableReferenceValue; isInstance: IsInstance; }; interface Cache { add(request: RequestInfo | URL): Promise; addAll(requests: RequestInfo[]): Promise; - delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; - keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise; - match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise; - matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise; + delete( + request: RequestInfo | URL, + options?: CacheQueryOptions + ): Promise; + keys( + request?: RequestInfo | URL, + options?: CacheQueryOptions + ): Promise; + match( + request: RequestInfo | URL, + options?: CacheQueryOptions + ): Promise; + matchAll( + request?: RequestInfo | URL, + options?: CacheQueryOptions + ): Promise; put(request: RequestInfo | URL, response: Response): Promise; } @@ -7378,7 +7526,10 @@ interface CacheStorage { delete(cacheName: string): Promise; has(cacheName: string): Promise; keys(): Promise; - match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise; + match( + request: RequestInfo | URL, + options?: MultiCacheQueryOptions + ): Promise; open(cacheName: string): Promise; } @@ -7431,7 +7582,11 @@ interface CanonicalBrowsingContext extends BrowsingContext { aRequireUserInteraction?: boolean, aUserActivation?: boolean ): void; - goToIndex(aIndex: number, aCancelContentJSEpoch?: number, aUserActivation?: boolean): void; + goToIndex( + aIndex: number, + aCancelContentJSEpoch?: number, + aUserActivation?: boolean + ): void; loadURI(aURI: URI, aOptions?: LoadURIOptions): void; notifyMediaMutedChanged(muted: boolean): void; notifyStartDelayedAutoplayMedia(): void; @@ -7460,7 +7615,10 @@ interface CanvasCaptureMediaStream extends MediaStream { requestFrame(): void; addEventListener( type: K, - listener: (this: CanvasCaptureMediaStream, ev: MediaStreamEventMap[K]) => any, + listener: ( + this: CanvasCaptureMediaStream, + ev: MediaStreamEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -7470,7 +7628,10 @@ interface CanvasCaptureMediaStream extends MediaStream { ): void; removeEventListener( type: K, - listener: (this: CanvasCaptureMediaStream, ev: MediaStreamEventMap[K]) => any, + listener: ( + this: CanvasCaptureMediaStream, + ev: MediaStreamEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -7494,7 +7655,13 @@ interface CanvasCompositing { interface CanvasDrawImage { contextProperties: CanvasContextProperties; drawImage(image: CanvasImageSource, dx: number, dy: number): void; - drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void; + drawImage( + image: CanvasImageSource, + dx: number, + dy: number, + dw: number, + dh: number + ): void; drawImage( image: CanvasImageSource, sx: number, @@ -7515,7 +7682,12 @@ interface CanvasDrawPath { fill(winding?: CanvasWindingRule): void; fill(path: Path2D, winding?: CanvasWindingRule): void; isPointInPath(x: number, y: number, winding?: CanvasWindingRule): boolean; - isPointInPath(path: Path2D, x: number, y: number, winding?: CanvasWindingRule): boolean; + isPointInPath( + path: Path2D, + x: number, + y: number, + winding?: CanvasWindingRule + ): boolean; isPointInStroke(x: number, y: number): boolean; isPointInStroke(path: Path2D, x: number, y: number): boolean; stroke(): void; @@ -7526,8 +7698,16 @@ interface CanvasFillStrokeStyles { fillStyle: string | CanvasGradient | CanvasPattern; strokeStyle: string | CanvasGradient | CanvasPattern; createConicGradient(angle: number, cx: number, cy: number): CanvasGradient; - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; - createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null; + createLinearGradient( + x0: number, + y0: number, + x1: number, + y1: number + ): CanvasGradient; + createPattern( + image: CanvasImageSource, + repetition: string | null + ): CanvasPattern | null; createRadialGradient( x0: number, y0: number, @@ -7592,7 +7772,14 @@ interface CanvasPathMethods { anticlockwise?: boolean ): void; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; + bezierCurveTo( + cp1x: number, + cp1y: number, + cp2x: number, + cp2y: number, + x: number, + y: number + ): void; closePath(): void; ellipse( x: number, @@ -7634,7 +7821,8 @@ interface CanvasRect { } interface CanvasRenderingContext2D - extends CanvasCompositing, + extends + CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, @@ -7719,9 +7907,23 @@ interface CanvasTransform { resetTransform(): void; rotate(angle: number): void; scale(x: number, y: number): void; - setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; + setTransform( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number + ): void; setTransform(transform?: DOMMatrix2DInit): void; - transform(a: number, b: number, c: number, d: number, e: number, f: number): void; + transform( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number + ): void; translate(x: number, y: number): void; } @@ -7756,7 +7958,10 @@ interface CaretStateChangedEvent extends Event { declare var CaretStateChangedEvent: { prototype: CaretStateChangedEvent; - new (type: string, eventInit?: CaretStateChangedEventInit): CaretStateChangedEvent; + new ( + type: string, + eventInit?: CaretStateChangedEventInit + ): CaretStateChangedEvent; isInstance: IsInstance; }; @@ -7764,7 +7969,10 @@ interface ChannelMergerNode extends AudioNode {} declare var ChannelMergerNode: { prototype: ChannelMergerNode; - new (context: BaseAudioContext, options?: ChannelMergerOptions): ChannelMergerNode; + new ( + context: BaseAudioContext, + options?: ChannelMergerOptions + ): ChannelMergerNode; isInstance: IsInstance; }; @@ -7772,7 +7980,10 @@ interface ChannelSplitterNode extends AudioNode {} declare var ChannelSplitterNode: { prototype: ChannelSplitterNode; - new (context: BaseAudioContext, options?: ChannelSplitterOptions): ChannelSplitterNode; + new ( + context: BaseAudioContext, + options?: ChannelSplitterOptions + ): ChannelSplitterNode; isInstance: IsInstance; }; @@ -7825,7 +8036,10 @@ interface ChannelWrapper extends EventTarget { options?: MozRequestMatchOptions ): boolean; redirectTo(url: URI): void; - registerTraceableChannel(extension: WebExtensionPolicy, remoteTab: RemoteTab | null): void; + registerTraceableChannel( + extension: WebExtensionPolicy, + remoteTab: RemoteTab | null + ): void; resume(): void; setRequestHeader(header: string, value: string, merge?: boolean): void; setResponseHeader(header: string, value: string, merge?: boolean): void; @@ -7914,7 +8128,11 @@ interface ChildSHistory { readonly index: number; readonly legacySHistory: nsISHistory; canGo(aOffset: number, aRequireUserInteraction?: boolean): boolean; - go(aOffset: number, aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; + go( + aOffset: number, + aRequireUserInteraction?: boolean, + aUserActivation?: boolean + ): void; reload(aReloadFlags: number): void; } @@ -7924,7 +8142,8 @@ declare var ChildSHistory: { isInstance: IsInstance; }; -interface ChromeMessageBroadcaster extends MessageBroadcaster, FrameScriptLoader {} +interface ChromeMessageBroadcaster + extends MessageBroadcaster, FrameScriptLoader {} declare var ChromeMessageBroadcaster: { prototype: ChromeMessageBroadcaster; @@ -8014,7 +8233,10 @@ interface ClipboardItem { declare var ClipboardItem: { prototype: ClipboardItem; new ( - items: Record>, + items: Record< + string, + ClipboardItemDataType | PromiseLike + >, options?: ClipboardItemOptions ): ClipboardItem; isInstance: IsInstance; @@ -8170,7 +8392,10 @@ interface ConstantSourceNode extends AudioScheduledSourceNode { readonly offset: AudioParam; addEventListener( type: K, - listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: ConstantSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -8180,7 +8405,10 @@ interface ConstantSourceNode extends AudioScheduledSourceNode { ): void; removeEventListener( type: K, - listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: ConstantSourceNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -8192,12 +8420,16 @@ interface ConstantSourceNode extends AudioScheduledSourceNode { declare var ConstantSourceNode: { prototype: ConstantSourceNode; - new (context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode; + new ( + context: BaseAudioContext, + options?: ConstantSourceOptions + ): ConstantSourceNode; isInstance: IsInstance; }; interface ContentFrameMessageManager - extends EventTarget, + extends + EventTarget, MessageListenerManagerMixin, MessageManagerGlobal, MessageSenderMixin, @@ -8214,7 +8446,8 @@ declare var ContentFrameMessageManager: { }; interface ContentProcessMessageManager - extends MessageListenerManagerMixin, + extends + MessageListenerManagerMixin, MessageManagerGlobal, MessageSenderMixin, SyncMessageSenderMixin { @@ -8406,7 +8639,10 @@ interface CustomElementRegistry { ): void; get(name: string): CustomElementConstructor | undefined; getName(constructor: CustomElementConstructor): string | null; - setElementCreationCallback(name: string, callback: CustomElementCreationCallback): void; + setElementCreationCallback( + name: string, + callback: CustomElementCreationCallback + ): void; upgrade(root: Node): void; whenDefined(name: string): Promise; } @@ -8419,7 +8655,12 @@ declare var CustomElementRegistry: { interface CustomEvent extends Event { readonly detail: any; - initCustomEvent(type: string, canBubble?: boolean, cancelable?: boolean, detail?: any): void; + initCustomEvent( + type: string, + canBubble?: boolean, + cancelable?: boolean, + detail?: any + ): void; } declare var CustomEvent: { @@ -8511,7 +8752,11 @@ interface DOMImplementation { qualifiedName: string | null, doctype?: DocumentType | null ): Document; - createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; + createDocumentType( + qualifiedName: string, + publicId: string, + systemId: string + ): DocumentType; createHTMLDocument(title?: string): Document; hasFeature(): boolean; } @@ -8572,10 +8817,20 @@ interface DOMMatrix extends DOMMatrixReadOnly { invertSelf(): DOMMatrix; multiplySelf(other?: DOMMatrixInit): DOMMatrix; preMultiplySelf(other?: DOMMatrixInit): DOMMatrix; - rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; + rotateAxisAngleSelf( + x?: number, + y?: number, + z?: number, + angle?: number + ): DOMMatrix; rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; - scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + scale3dSelf( + scale?: number, + originX?: number, + originY?: number, + originZ?: number + ): DOMMatrix; scaleSelf( scaleX?: number, scaleY?: number, @@ -8632,7 +8887,12 @@ interface DOMMatrixReadOnly { inverse(): DOMMatrix; multiply(other?: DOMMatrixInit): DOMMatrix; rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; - rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; + rotateAxisAngle( + x?: number, + y?: number, + z?: number, + angle?: number + ): DOMMatrix; rotateFromVector(x?: number, y?: number): DOMMatrix; scale( scaleX?: number, @@ -8642,7 +8902,12 @@ interface DOMMatrixReadOnly { originY?: number, originZ?: number ): DOMMatrix; - scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; + scale3d( + scale?: number, + originX?: number, + originY?: number, + originZ?: number + ): DOMMatrix; scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix; skewX(sx?: number): DOMMatrix; skewY(sy?: number): DOMMatrix; @@ -8725,7 +8990,12 @@ interface DOMQuad { declare var DOMQuad: { prototype: DOMQuad; - new (p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad; + new ( + p1?: DOMPointInit, + p2?: DOMPointInit, + p3?: DOMPointInit, + p4?: DOMPointInit + ): DOMQuad; new (rect: DOMRectReadOnly): DOMQuad; isInstance: IsInstance; fromQuad(other?: DOMQuadInit): DOMQuad; @@ -8772,7 +9042,12 @@ interface DOMRectReadOnly { declare var DOMRectReadOnly: { prototype: DOMRectReadOnly; - new (x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; + new ( + x?: number, + y?: number, + width?: number, + height?: number + ): DOMRectReadOnly; isInstance: IsInstance; fromRect(other?: DOMRectInit): DOMRectReadOnly; }; @@ -8810,7 +9085,11 @@ interface DOMTokenList { supports(token: string): boolean; toggle(token: string, force?: boolean): boolean; forEach( - callbackfn: (value: string | null, key: number, parent: DOMTokenList) => void, + callbackfn: ( + value: string | null, + key: number, + parent: DOMTokenList + ) => void, thisArg?: any ): void; [index: number]: string; @@ -8998,7 +9277,10 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; - new (type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; + new ( + type: string, + eventInitDict?: DeviceOrientationEventInit + ): DeviceOrientationEvent; isInstance: IsInstance; }; @@ -9022,7 +9304,8 @@ declare var Directory: { }; interface DocumentEventMap - extends GlobalEventHandlersEventMap, + extends + GlobalEventHandlersEventMap, OnErrorEventHandlerForNodesEventMap, TouchEventHandlersEventMap { fullscreenchange: Event; @@ -9034,7 +9317,8 @@ interface DocumentEventMap } interface Document - extends Node, + extends + Node, DocumentOrShadowRoot, FontFaceSource, GeometryUtils, @@ -9175,7 +9459,9 @@ interface Document createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; createEvent(eventInterface: "BlobEvent"): BlobEvent; - createEvent(eventInterface: "CSSCustomPropertyRegisteredEvent"): CSSCustomPropertyRegisteredEvent; + createEvent( + eventInterface: "CSSCustomPropertyRegisteredEvent" + ): CSSCustomPropertyRegisteredEvent; createEvent(eventInterface: "CaretStateChangedEvent"): CaretStateChangedEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; @@ -9195,7 +9481,9 @@ interface Document createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; createEvent(eventInterface: "FormDataEvent"): FormDataEvent; createEvent(eventInterface: "FrameCrashedEvent"): FrameCrashedEvent; - createEvent(eventInterface: "GPUUncapturedErrorEvent"): GPUUncapturedErrorEvent; + createEvent( + eventInterface: "GPUUncapturedErrorEvent" + ): GPUUncapturedErrorEvent; createEvent(eventInterface: "GamepadAxisMoveEvent"): GamepadAxisMoveEvent; createEvent(eventInterface: "GamepadButtonEvent"): GamepadButtonEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; @@ -9209,24 +9497,36 @@ interface Document createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaRecorderErrorEvent"): MediaRecorderErrorEvent; + createEvent( + eventInterface: "MediaRecorderErrorEvent" + ): MediaRecorderErrorEvent; createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; - createEvent(eventInterface: "MerchantValidationEvent"): MerchantValidationEvent; + createEvent( + eventInterface: "MerchantValidationEvent" + ): MerchantValidationEvent; createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; createEvent(eventInterface: "MouseEvents"): MouseEvent; createEvent(eventInterface: "MouseScrollEvent"): MouseScrollEvent; - createEvent(eventInterface: "MozSharedMapChangeEvent"): MozSharedMapChangeEvent; + createEvent( + eventInterface: "MozSharedMapChangeEvent" + ): MozSharedMapChangeEvent; createEvent(eventInterface: "NavigateEvent"): NavigateEvent; createEvent( eventInterface: "NavigationCurrentEntryChangeEvent" ): NavigationCurrentEntryChangeEvent; createEvent(eventInterface: "NotifyPaintEvent"): NotifyPaintEvent; - createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; + createEvent( + eventInterface: "OfflineAudioCompletionEvent" + ): OfflineAudioCompletionEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; - createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; + createEvent( + eventInterface: "PaymentMethodChangeEvent" + ): PaymentMethodChangeEvent; + createEvent( + eventInterface: "PaymentRequestUpdateEvent" + ): PaymentRequestUpdateEvent; createEvent(eventInterface: "PerformanceEntryEvent"): PerformanceEntryEvent; createEvent(eventInterface: "PluginCrashedEvent"): PluginCrashedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; @@ -9238,14 +9538,20 @@ interface Document createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; + createEvent( + eventInterface: "RTCPeerConnectionIceEvent" + ): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; createEvent(eventInterface: "RedirectBlockedEvent"): RedirectBlockedEvent; createEvent(eventInterface: "ScrollAreaEvent"): ScrollAreaEvent; - createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; + createEvent( + eventInterface: "SecurityPolicyViolationEvent" + ): SecurityPolicyViolationEvent; createEvent(eventInterface: "SimpleGestureEvent"): SimpleGestureEvent; createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; - createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; + createEvent( + eventInterface: "SpeechSynthesisErrorEvent" + ): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; createEvent(eventInterface: "StreamFilterDataEvent"): StreamFilterDataEvent; @@ -9257,7 +9563,9 @@ interface Document createEvent(eventInterface: "TCPServerSocketEvent"): TCPServerSocketEvent; createEvent(eventInterface: "TCPSocketErrorEvent"): TCPSocketErrorEvent; createEvent(eventInterface: "TCPSocketEvent"): TCPSocketEvent; - createEvent(eventInterface: "TaskPriorityChangeEvent"): TaskPriorityChangeEvent; + createEvent( + eventInterface: "TaskPriorityChangeEvent" + ): TaskPriorityChangeEvent; createEvent(eventInterface: "TextEvent"): TextEvent; createEvent(eventInterface: "TimeEvent"): TimeEvent; createEvent(eventInterface: "ToggleEvent"): ToggleEvent; @@ -9272,13 +9580,22 @@ interface Document createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface: "WheelEvent"): WheelEvent; createEvent(eventInterface: "XRInputSourceEvent"): XRInputSourceEvent; - createEvent(eventInterface: "XRInputSourcesChangeEvent"): XRInputSourcesChangeEvent; + createEvent( + eventInterface: "XRInputSourcesChangeEvent" + ): XRInputSourcesChangeEvent; createEvent(eventInterface: "XRReferenceSpaceEvent"): XRReferenceSpaceEvent; createEvent(eventInterface: "XRSessionEvent"): XRSessionEvent; createEvent(eventInterface: "XULCommandEvent"): XULCommandEvent; createEvent(eventInterface: string): Event; - createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator; - createProcessingInstruction(target: string, data: string): ProcessingInstruction; + createNodeIterator( + root: Node, + whatToShow?: number, + filter?: NodeFilter | null + ): NodeIterator; + createProcessingInstruction( + target: string, + data: string + ): ProcessingInstruction; createRange(): Range; createTextNode(data: string): Text; createTouch( @@ -9299,10 +9616,21 @@ interface Document createTouchList(touch: Touch, ...touches: Touch[]): TouchList; createTouchList(): TouchList; createTouchList(touches: Touch[]): TouchList; - createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker; - createXULElement(localName: string, options?: string | ElementCreationOptions): Element; + createTreeWalker( + root: Node, + whatToShow?: number, + filter?: NodeFilter | null + ): TreeWalker; + createXULElement( + localName: string, + options?: string | ElementCreationOptions + ): Element; enableStyleSheetsForSet(name: string | null): void; - execCommand(commandId: string, showUI?: boolean, value?: TrustedHTML | string): boolean; + execCommand( + commandId: string, + showUI?: boolean, + value?: TrustedHTML | string + ): boolean; exitFullscreen(): Promise; exitPointerLock(): void; getConnectedShadowRoots(): ShadowRoot[]; @@ -9322,7 +9650,10 @@ interface Document localName: K ): HTMLCollectionOf; getElementsByTagName(localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection; + getElementsByTagNameNS( + namespace: string | null, + localName: string + ): HTMLCollection; getFailedCertSecurityInfo(): FailedCertSecurityInfo; getNetErrorInfo(): NetErrorInfo; getSelection(): Selection | null; @@ -9333,7 +9664,10 @@ interface Document insertAnonymousContent(): AnonymousContent; isActive(): boolean; mozCancelFullScreen(): Promise; - mozSetImageElement(aImageElementId: string, aImageElement: Element | null): void; + mozSetImageElement( + aImageElementId: string, + aImageElement: Element | null + ): void; notifyUserGestureActivation(): void; open(unused1?: string, unused2?: string): Document; open(url: string, name: string, features: string): WindowProxy | null; @@ -9356,7 +9690,9 @@ interface Document setNotifyFetchSuccess(aShouldNotify: boolean): void; setNotifyFormOrPasswordRemoved(aShouldNotify: boolean): void; setSuppressedEventListener(aListener: EventListener | null): void; - startViewTransition(updateCallback?: ViewTransitionUpdateCallback): ViewTransition; + startViewTransition( + updateCallback?: ViewTransitionUpdateCallback + ): ViewTransition; synchronouslyUpdateRemoteBrowserDimensions(aIncludeInactive?: boolean): void; userInteractionForTesting(): void; write(...text: (TrustedHTML | string)[]): void; @@ -9394,7 +9730,10 @@ declare var Document: { readonly KEYPRESS_EVENT_MODEL_CONFLATED: 2; isInstance: IsInstance; parseHTML(html: string, options?: SetHTMLOptions): Document; - parseHTMLUnsafe(html: TrustedHTML | string, options?: SetHTMLUnsafeOptions): Document; + parseHTMLUnsafe( + html: TrustedHTML | string, + options?: SetHTMLUnsafeOptions + ): Document; }; interface DocumentFragment extends Node, NonElementParentNode, ParentNode {} @@ -9496,7 +9835,10 @@ interface DynamicsCompressorNode extends AudioNode, AudioNodePassThrough { declare var DynamicsCompressorNode: { prototype: DynamicsCompressorNode; - new (context: BaseAudioContext, options?: DynamicsCompressorOptions): DynamicsCompressorNode; + new ( + context: BaseAudioContext, + options?: DynamicsCompressorOptions + ): DynamicsCompressorNode; isInstance: IsInstance; }; @@ -9585,7 +9927,8 @@ interface ElementEventMap { } interface Element - extends Node, + extends + Node, ARIAMixin, Animatable, ChildNode, @@ -9641,7 +9984,10 @@ interface Element getAttributeNS(namespace: string | null, localName: string): string | null; getAttributeNames(): string[]; getAttributeNode(name: string): Attr | null; - getAttributeNodeNS(namespaceURI: string | null, localName: string): Attr | null; + getAttributeNodeNS( + namespaceURI: string | null, + localName: string + ): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; getElementsByClassName(classNames: string): HTMLCollection; @@ -9659,7 +10005,10 @@ interface Element localName: K ): HTMLCollectionOf; getElementsByTagName(localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollection; + getElementsByTagNameNS( + namespace: string | null, + localName: string + ): HTMLCollection; getElementsWithGrid(): Element[]; getGridFragments(): Grid[]; getHTML(options?: GetHTMLOptions): string; @@ -9694,14 +10043,25 @@ interface Element scrollTo(options?: ScrollToOptions): void; setAttribute(name: string, value: TrustedType | string): void; setAttributeDevtools(name: string, value: string): void; - setAttributeDevtoolsNS(namespace: string | null, name: string, value: string): void; - setAttributeNS(namespace: string | null, name: string, value: TrustedType | string): void; + setAttributeDevtoolsNS( + namespace: string | null, + name: string, + value: string + ): void; + setAttributeNS( + namespace: string | null, + name: string, + value: TrustedType | string + ): void; setAttributeNode(newAttr: Attr): Attr | null; setAttributeNodeNS(newAttr: Attr): Attr | null; setCapture(retargetToElement?: boolean): void; setCaptureAlways(retargetToElement?: boolean): void; setHTML(aInnerHTML: string, options?: SetHTMLOptions): void; - setHTMLUnsafe(html: TrustedHTML | string, options?: SetHTMLUnsafeOptions): void; + setHTMLUnsafe( + html: TrustedHTML | string, + options?: SetHTMLUnsafeOptions + ): void; setPointerCapture(pointerId: number): void; toggleAttribute(name: string, force?: boolean): boolean; webkitMatchesSelector(selector: string): boolean; @@ -9753,7 +10113,11 @@ interface ElementInternals extends ARIAMixin { value: File | string | FormData | null, state?: File | string | FormData | null ): void; - setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void; + setValidity( + flags?: ValidityStateFlags, + message?: string, + anchor?: HTMLElement + ): void; } declare var ElementInternals: { @@ -10068,8 +10432,14 @@ declare var File: { prototype: File; new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; isInstance: IsInstance; - createFromFileName(fileName: string, options?: ChromeFilePropertyBag): Promise; - createFromNsIFile(file: nsIFile, options?: ChromeFilePropertyBag): Promise; + createFromFileName( + fileName: string, + options?: ChromeFilePropertyBag + ): Promise; + createFromNsIFile( + file: nsIFile, + options?: ChromeFilePropertyBag + ): Promise; }; interface FileList { @@ -10181,7 +10551,10 @@ interface FileSystemDirectoryHandle extends FileSystemHandle { name: string, options?: FileSystemGetDirectoryOptions ): Promise; - getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise; + getFileHandle( + name: string, + options?: FileSystemGetFileOptions + ): Promise; removeEntry(name: string, options?: FileSystemRemoveOptions): Promise; resolve(possibleDescendant: FileSystemHandle): Promise; } @@ -10198,7 +10571,10 @@ interface FileSystemDirectoryIterator { } interface FileSystemDirectoryReader { - readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void; + readEntries( + successCallback: FileSystemEntriesCallback, + errorCallback?: ErrorCallback + ): void; } declare var FileSystemDirectoryReader: { @@ -10213,7 +10589,10 @@ interface FileSystemEntry { readonly isDirectory: boolean; readonly isFile: boolean; readonly name: string; - getParent(successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; + getParent( + successCallback?: FileSystemEntryCallback, + errorCallback?: ErrorCallback + ): void; } declare var FileSystemEntry: { @@ -10234,7 +10613,9 @@ declare var FileSystemFileEntry: { /** Available only in secure contexts. */ interface FileSystemFileHandle extends FileSystemHandle { - createWritable(options?: FileSystemCreateWritableOptions): Promise; + createWritable( + options?: FileSystemCreateWritableOptions + ): Promise; getFile(): Promise; } @@ -10320,15 +10701,25 @@ declare var FlexLineValues: { interface FluentBundle { readonly locales: string[]; - addResource(aResource: FluentResource, aOptions?: FluentBundleAddResourceOptions): void; - formatPattern(pattern: FluentPattern, aArgs?: L10nArgs | null, aErrors?: any): string; + addResource( + aResource: FluentResource, + aOptions?: FluentBundleAddResourceOptions + ): void; + formatPattern( + pattern: FluentPattern, + aArgs?: L10nArgs | null, + aErrors?: any + ): string; getMessage(id: string): FluentMessage | null; hasMessage(id: string): boolean; } declare var FluentBundle: { prototype: FluentBundle; - new (aLocales: string | string[], aOptions?: FluentBundleOptions): FluentBundle; + new ( + aLocales: string | string[], + aOptions?: FluentBundleOptions + ): FluentBundle; isInstance: IsInstance; }; @@ -10391,7 +10782,11 @@ interface FontFace { declare var FontFace: { prototype: FontFace; - new (family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; + new ( + family: string, + source: string | BinaryData, + descriptors?: FontFaceDescriptors + ): FontFace; isInstance: IsInstance; }; @@ -10455,7 +10850,10 @@ interface FontFaceSetLoadEvent extends Event { declare var FontFaceSetLoadEvent: { prototype: FontFaceSetLoadEvent; - new (type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent; + new ( + type: string, + eventInitDict?: FontFaceSetLoadEventInit + ): FontFaceSetLoadEvent; isInstance: IsInstance; }; @@ -10473,7 +10871,11 @@ interface FormData { set(name: string, value: Blob, filename?: string): void; set(name: string, value: string): void; forEach( - callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, + callbackfn: ( + value: FormDataEntryValue, + key: string, + parent: FormData + ) => void, thisArg?: any ): void; } @@ -10550,7 +10952,11 @@ declare var FrameLoader: { interface FrameScriptLoader { getDelayedFrameScripts(): any[][]; - loadFrameScript(url: string, allowDelayedLoad: boolean, runInGlobalScope?: boolean): void; + loadFrameScript( + url: string, + allowDelayedLoad: boolean, + runInGlobalScope?: boolean + ): void; removeDelayedFrameScript(url: string): void; } @@ -10558,7 +10964,9 @@ interface FrameScriptLoader { interface GPU { readonly wgslLanguageFeatures: WGSLLanguageFeatures; getPreferredCanvasFormat(): GPUTextureFormat; - requestAdapter(options?: GPURequestAdapterOptions): Promise; + requestAdapter( + options?: GPURequestAdapterOptions + ): Promise; } declare var GPU: { @@ -10646,7 +11054,11 @@ interface GPUBuffer extends GPUObjectBase { readonly usage: GPUFlagsConstant; destroy(): void; getMappedRange(offset?: GPUSize64, size?: GPUSize64): ArrayBuffer; - mapAsync(mode: GPUMapModeFlags, offset?: GPUSize64, size?: GPUSize64): Promise; + mapAsync( + mode: GPUMapModeFlags, + offset?: GPUSize64, + size?: GPUSize64 + ): Promise; unmap(): void; } @@ -10682,10 +11094,16 @@ declare var GPUCommandBuffer: { /** Available only in secure contexts. */ interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase { - beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder; + beginComputePass( + descriptor?: GPUComputePassDescriptor + ): GPUComputePassEncoder; beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder; clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; - copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void; + copyBufferToBuffer( + source: GPUBuffer, + destination: GPUBuffer, + size?: GPUSize64 + ): void; copyBufferToBuffer( source: GPUBuffer, sourceOffset: GPUSize64, @@ -10753,15 +11171,16 @@ declare var GPUCompilationMessage: { /** Available only in secure contexts. */ interface GPUComputePassEncoder - extends GPUBindingCommandsMixin, - GPUDebugCommandsMixin, - GPUObjectBase { + extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase { dispatchWorkgroups( workgroupCountX: GPUSize32, workgroupCountY?: GPUSize32, workgroupCountZ?: GPUSize32 ): void; - dispatchWorkgroupsIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + dispatchWorkgroupsIndirect( + indirectBuffer: GPUBuffer, + indirectOffset: GPUSize64 + ): void; end(): void; setPipeline(pipeline: GPUComputePipeline): void; } @@ -10800,21 +11219,39 @@ interface GPUDevice extends EventTarget, GPUObjectBase { onuncapturederror: ((this: GPUDevice, ev: Event) => any) | null; readonly queue: GPUQueue; createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup; - createBindGroupLayout(descriptor: GPUBindGroupLayoutDescriptor): GPUBindGroupLayout; + createBindGroupLayout( + descriptor: GPUBindGroupLayoutDescriptor + ): GPUBindGroupLayout; createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer; - createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder; - createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline; - createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise; - createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout; + createCommandEncoder( + descriptor?: GPUCommandEncoderDescriptor + ): GPUCommandEncoder; + createComputePipeline( + descriptor: GPUComputePipelineDescriptor + ): GPUComputePipeline; + createComputePipelineAsync( + descriptor: GPUComputePipelineDescriptor + ): Promise; + createPipelineLayout( + descriptor: GPUPipelineLayoutDescriptor + ): GPUPipelineLayout; createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet; - createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder; - createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline; - createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise; + createRenderBundleEncoder( + descriptor: GPURenderBundleEncoderDescriptor + ): GPURenderBundleEncoder; + createRenderPipeline( + descriptor: GPURenderPipelineDescriptor + ): GPURenderPipeline; + createRenderPipelineAsync( + descriptor: GPURenderPipelineDescriptor + ): Promise; createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler; createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule; createTexture(descriptor: GPUTextureDescriptor): GPUTexture; destroy(): void; - importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture; + importExternalTexture( + descriptor: GPUExternalTextureDescriptor + ): GPUExternalTexture; popErrorScope(): Promise; pushErrorScope(filter: GPUErrorFilter): void; addEventListener( @@ -10977,7 +11414,8 @@ declare var GPURenderBundle: { /** Available only in secure contexts. */ interface GPURenderBundleEncoder - extends GPUBindingCommandsMixin, + extends + GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { @@ -11004,7 +11442,10 @@ interface GPURenderCommandsMixin { baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32 ): void; - drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; + drawIndexedIndirect( + indirectBuffer: GPUBuffer, + indirectOffset: GPUSize64 + ): void; drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void; setIndexBuffer( buffer: GPUBuffer, @@ -11013,12 +11454,18 @@ interface GPURenderCommandsMixin { size?: GPUSize64 ): void; setPipeline(pipeline: GPURenderPipeline): void; - setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void; + setVertexBuffer( + slot: GPUIndex32, + buffer: GPUBuffer, + offset?: GPUSize64, + size?: GPUSize64 + ): void; } /** Available only in secure contexts. */ interface GPURenderPassEncoder - extends GPUBindingCommandsMixin, + extends + GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin { @@ -11082,7 +11529,11 @@ declare var GPUShaderModule: { /** Available only in secure contexts. */ interface GPUSupportedFeatures { forEach( - callbackfn: (value: string, key: string, parent: GPUSupportedFeatures) => void, + callbackfn: ( + value: string, + key: string, + parent: GPUSupportedFeatures + ) => void, thisArg?: any ): void; } @@ -11224,7 +11675,10 @@ interface GamepadAxisMoveEvent extends GamepadEvent { declare var GamepadAxisMoveEvent: { prototype: GamepadAxisMoveEvent; - new (type: string, eventInitDict?: GamepadAxisMoveEventInit): GamepadAxisMoveEvent; + new ( + type: string, + eventInitDict?: GamepadAxisMoveEventInit + ): GamepadAxisMoveEvent; isInstance: IsInstance; }; @@ -11246,7 +11700,10 @@ interface GamepadButtonEvent extends GamepadEvent { declare var GamepadButtonEvent: { prototype: GamepadButtonEvent; - new (type: string, eventInitDict?: GamepadButtonEventInit): GamepadButtonEvent; + new ( + type: string, + eventInitDict?: GamepadButtonEventInit + ): GamepadButtonEvent; isInstance: IsInstance; }; @@ -11860,7 +12317,8 @@ interface GlobalEventHandlers { onclick: ((this: GlobalEventHandlers, ev: Event) => any) | null; onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncommand: ((this: GlobalEventHandlers, ev: Event) => any) | null; - oncontentvisibilityautostatechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; + oncontentvisibilityautostatechange: + ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextmenu: ((this: GlobalEventHandlers, ev: Event) => any) | null; oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -11921,7 +12379,8 @@ interface GlobalEventHandlers { onresize: ((this: GlobalEventHandlers, ev: Event) => any) | null; onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onsecuritypolicyviolation: + ((this: GlobalEventHandlers, ev: Event) => any) | null; onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null; onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null; onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -11940,13 +12399,18 @@ interface GlobalEventHandlers { onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationiteration: + ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationstart: + ((this: GlobalEventHandlers, ev: Event) => any) | null; onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: Event) => any) | null; addEventListener( type: K, - listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, + listener: ( + this: GlobalEventHandlers, + ev: GlobalEventHandlersEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -11956,7 +12420,10 @@ interface GlobalEventHandlers { ): void; removeEventListener( type: K, - listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, + listener: ( + this: GlobalEventHandlers, + ev: GlobalEventHandlersEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -12252,7 +12719,8 @@ declare var HTMLBaseElement: { isInstance: IsInstance; }; -interface HTMLBodyElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {} +interface HTMLBodyElementEventMap + extends HTMLElementEventMap, WindowEventHandlersEventMap {} interface HTMLBodyElement extends HTMLElement, WindowEventHandlers { aLink: string; @@ -12639,13 +13107,15 @@ declare var HTMLDocument: { }; interface HTMLElementEventMap - extends ElementEventMap, + extends + ElementEventMap, GlobalEventHandlersEventMap, OnErrorEventHandlerForNodesEventMap, TouchEventHandlersEventMap {} interface HTMLElement - extends Element, + extends + Element, ElementCSSInlineStyle, ElementOffsetAttributes, GlobalEventHandlers, @@ -12707,7 +13177,8 @@ declare var HTMLElement: { isInstance: IsInstance; }; -interface HTMLEmbedElement extends HTMLElement, MozFrameLoaderOwner, MozObjectLoadingContent { +interface HTMLEmbedElement + extends HTMLElement, MozFrameLoaderOwner, MozObjectLoadingContent { align: string; height: string; name: string; @@ -12915,14 +13386,18 @@ declare var HTMLFrameElement: { isInstance: IsInstance; }; -interface HTMLFrameSetElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {} +interface HTMLFrameSetElementEventMap + extends HTMLElementEventMap, WindowEventHandlersEventMap {} interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers { cols: string; rows: string; addEventListener( type: K, - listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, + listener: ( + this: HTMLFrameSetElement, + ev: HTMLFrameSetElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -12932,7 +13407,10 @@ interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers { ): void; removeEventListener( type: K, - listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, + listener: ( + this: HTMLFrameSetElement, + ev: HTMLFrameSetElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -13196,7 +13674,8 @@ declare var HTMLImageElement: { }; interface HTMLInputElement - extends HTMLElement, + extends + HTMLElement, MozEditableElement, MozImageLoadingContent, PopoverInvokerElement { @@ -13595,7 +14074,11 @@ interface HTMLMediaElement extends HTMLElement { readonly videoTracks: VideoTrackList; readonly visiblePlayTime: number; volume: number; - addTextTrack(kind: TextTrackKind, label?: string, language?: string): TextTrack; + addTextTrack( + kind: TextTrackKind, + label?: string, + language?: string + ): TextTrack; canPlayType(type: string): string; fastSeek(time: number): void; hasSuspendTaint(): boolean; @@ -13610,7 +14093,10 @@ interface HTMLMediaElement extends HTMLElement { seekToNextFrame(): Promise; setAudioSinkFailedStartup(): void; setDecodeError(error: string): void; - setFormatDiagnosticsReportForMimeType(mimeType: string, error: DecoderDoctorReportType): void; + setFormatDiagnosticsReportForMimeType( + mimeType: string, + error: DecoderDoctorReportType + ): void; setMediaKeys(mediaKeys: MediaKeys | null): Promise; /** Available only in secure contexts. */ setSinkId(sinkId: string): Promise; @@ -13826,7 +14312,8 @@ declare var HTMLOListElement: { isInstance: IsInstance; }; -interface HTMLObjectElement extends HTMLElement, MozFrameLoaderOwner, MozObjectLoadingContent { +interface HTMLObjectElement + extends HTMLElement, MozFrameLoaderOwner, MozObjectLoadingContent { align: string; archive: string; border: string; @@ -13955,7 +14442,10 @@ declare var HTMLOptionElement: { interface HTMLOptionsCollection extends HTMLCollectionBase { length: number; selectedIndex: number; - add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void; + add( + element: HTMLOptionElement | HTMLOptGroupElement, + before?: HTMLElement | number | null + ): void; remove(index: number): void; } @@ -14269,7 +14759,10 @@ interface HTMLSelectElement extends HTMLElement { readonly validity: ValidityState; value: string; readonly willValidate: boolean; - add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void; + add( + element: HTMLOptionElement | HTMLOptGroupElement, + before?: HTMLElement | number | null + ): void; checkValidity(): boolean; getAutocompleteInfo(): AutocompleteInfo; item(index: number): Element | null; @@ -14445,7 +14938,10 @@ interface HTMLTableCaptionElement extends HTMLElement { align: string; addEventListener( type: K, - listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, + listener: ( + this: HTMLTableCaptionElement, + ev: HTMLElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -14455,7 +14951,10 @@ interface HTMLTableCaptionElement extends HTMLElement { ): void; removeEventListener( type: K, - listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, + listener: ( + this: HTMLTableCaptionElement, + ev: HTMLElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -14651,7 +15150,10 @@ interface HTMLTableSectionElement extends HTMLElement { insertRow(index?: number): HTMLElement; addEventListener( type: K, - listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, + listener: ( + this: HTMLTableSectionElement, + ev: HTMLElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -14661,7 +15163,10 @@ interface HTMLTableSectionElement extends HTMLElement { ): void; removeEventListener( type: K, - listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, + listener: ( + this: HTMLTableSectionElement, + ev: HTMLElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -15011,7 +15516,10 @@ interface Headers { getSetCookie(): string[]; has(name: string): boolean; set(name: string, value: string): void; - forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void; + forEach( + callbackfn: (value: string, key: string, parent: Headers) => void, + thisArg?: any + ): void; } declare var Headers: { @@ -15023,7 +15531,11 @@ declare var Headers: { interface HeapSnapshot { readonly creationTime: number | null; computeDominatorTree(): DominatorTree; - computeShortestPaths(start: NodeId, targets: NodeId[], maxNumPaths: number): any; + computeShortestPaths( + start: NodeId, + targets: NodeId[], + maxNumPaths: number + ): any; describeNode(breakdown: any, node: NodeId): any; takeCensus(options: any): any; } @@ -15038,7 +15550,11 @@ interface Highlight { priority: number; type: HighlightType; forEach( - callbackfn: (value: AbstractRange, key: AbstractRange, parent: Highlight) => void, + callbackfn: ( + value: AbstractRange, + key: AbstractRange, + parent: Highlight + ) => void, thisArg?: any ): void; } @@ -15051,7 +15567,11 @@ declare var Highlight: { interface HighlightRegistry { forEach( - callbackfn: (value: Highlight, key: string, parent: HighlightRegistry) => void, + callbackfn: ( + value: Highlight, + key: string, + parent: HighlightRegistry + ) => void, thisArg?: any ): void; } @@ -15124,7 +15644,10 @@ interface IDBDatabase extends EventTarget { onversionchange: ((this: IDBDatabase, ev: Event) => any) | null; readonly version: number; close(): void; - createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore( + name: string, + options?: IDBObjectStoreParameters + ): IDBObjectStore; deleteObjectStore(name: string): void; transaction( storeNames: string | string[], @@ -15169,7 +15692,11 @@ interface IDBFactory { options?: IDBOpenDBOptions ): IDBOpenDBRequest; open(name: string, version?: number): IDBOpenDBRequest; - openForPrincipal(principal: Principal, name: string, version: number): IDBOpenDBRequest; + openForPrincipal( + principal: Principal, + name: string, + version: number + ): IDBOpenDBRequest; openForPrincipal( principal: Principal, name: string, @@ -15218,7 +15745,12 @@ declare var IDBKeyRange: { prototype: IDBKeyRange; new (): IDBKeyRange; isInstance: IsInstance; - bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange; + bound( + lower: any, + upper: any, + lowerOpen?: boolean, + upperOpen?: boolean + ): IDBKeyRange; lowerBound(lower: any, open?: boolean): IDBKeyRange; only(value: any): IDBKeyRange; upperBound(upper: any, open?: boolean): IDBKeyRange; @@ -15386,7 +15918,10 @@ interface IDBVersionChangeEvent extends Event { declare var IDBVersionChangeEvent: { prototype: IDBVersionChangeEvent; - new (type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent; + new ( + type: string, + eventInitDict?: IDBVersionChangeEventInit + ): IDBVersionChangeEvent; isInstance: IsInstance; }; @@ -15766,7 +16301,10 @@ declare var IntersectionObserverEntry: { }; interface IntlUtils { - getDisplayNames(locales: string[], options?: DisplayNameOptions): DisplayNameResult; + getDisplayNames( + locales: string[], + options?: DisplayNameOptions + ): DisplayNameResult; isAppLocaleRTL(): boolean; } @@ -16254,7 +16792,10 @@ interface KeyboardEvent extends UIEvent, KeyEventMixin { declare var KeyboardEvent: { prototype: KeyboardEvent; - new (typeArg: string, keyboardEventInitDict?: KeyboardEventInit): KeyboardEvent; + new ( + typeArg: string, + keyboardEventInitDict?: KeyboardEventInit + ): KeyboardEvent; readonly DOM_KEY_LOCATION_STANDARD: 0x00; readonly DOM_KEY_LOCATION_LEFT: 0x01; readonly DOM_KEY_LOCATION_RIGHT: 0x02; @@ -16502,8 +17043,14 @@ declare var L10nFileSource: { interface L10nRegistry { clearSources(): void; - generateBundles(aLocales: string[], aResourceIds: L10nResourceId[]): FluentBundleAsyncIterator; - generateBundlesSync(aLocales: string[], aResourceIds: L10nResourceId[]): FluentBundleIterator; + generateBundles( + aLocales: string[], + aResourceIds: L10nResourceId[] + ): FluentBundleAsyncIterator; + generateBundlesSync( + aLocales: string[], + aResourceIds: L10nResourceId[] + ): FluentBundleIterator; getAvailableLocales(): string[]; getSource(aName: string): L10nFileSource | null; getSourceNames(): string[]; @@ -16537,7 +17084,11 @@ declare var LargestContentfulPaint: { }; interface LegacyMozTCPSocket { - listen(port: number, options?: ServerSocketOptions, backlog?: number): TCPServerSocket; + listen( + port: number, + options?: ServerSocketOptions, + backlog?: number + ): TCPServerSocket; open(host: string, port: number, options?: SocketOptions): TCPSocket; } @@ -16630,7 +17181,11 @@ declare var Lock: { interface LockManager { query(): Promise; request(name: string, callback: LockGrantedCallback): Promise; - request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise; + request( + name: string, + options: LockOptions, + callback: LockGrantedCallback + ): Promise; } declare var LockManager: { @@ -16684,7 +17239,10 @@ interface MIDIConnectionEvent extends Event { declare var MIDIConnectionEvent: { prototype: MIDIConnectionEvent; - new (type: string, eventInitDict?: MIDIConnectionEventInit): MIDIConnectionEvent; + new ( + type: string, + eventInitDict?: MIDIConnectionEventInit + ): MIDIConnectionEvent; isInstance: IsInstance; }; @@ -16841,13 +17399,17 @@ declare var MIDIPort: { /** Available only in secure contexts. */ interface MLS { deleteState(): Promise; - generateCredential(credentialContent: MLSBytesOrUint8ArrayOrUTF8String): Promise; + generateCredential( + credentialContent: MLSBytesOrUint8ArrayOrUTF8String + ): Promise; generateIdentity(): Promise; generateKeyPackage( clientId: MLSBytesOrUint8Array, credential: MLSBytesOrUint8Array ): Promise; - getGroupEpochFromMessage(message: MLSBytesOrUint8Array): Promise; + getGroupEpochFromMessage( + message: MLSBytesOrUint8Array + ): Promise; getGroupIdFromMessage(message: MLSBytesOrUint8Array): Promise; groupCreate( clientId: MLSBytesOrUint8Array, @@ -16857,7 +17419,10 @@ interface MLS { groupId: MLSBytesOrUint8Array, clientId: MLSBytesOrUint8Array ): Promise; - groupJoin(clientId: MLSBytesOrUint8Array, welcome: MLSBytesOrUint8Array): Promise; + groupJoin( + clientId: MLSBytesOrUint8Array, + welcome: MLSBytesOrUint8Array + ): Promise; } declare var MLS: { @@ -16949,18 +17514,23 @@ interface MatchPatternSet { declare var MatchPatternSet: { prototype: MatchPatternSet; - new (patterns: (string | MatchPattern)[], options?: MatchPatternOptions): MatchPatternSet; + new ( + patterns: (string | MatchPattern)[], + options?: MatchPatternOptions + ): MatchPatternSet; isInstance: IsInstance; }; interface MathMLElementEventMap - extends ElementEventMap, + extends + ElementEventMap, GlobalEventHandlersEventMap, OnErrorEventHandlerForNodesEventMap, TouchEventHandlersEventMap {} interface MathMLElement - extends Element, + extends + Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrForeignElement, @@ -16995,8 +17565,12 @@ declare var MathMLElement: { }; interface MediaCapabilities { - decodingInfo(configuration: MediaDecodingConfiguration): Promise; - encodingInfo(configuration: MediaEncodingConfiguration): Promise; + decodingInfo( + configuration: MediaDecodingConfiguration + ): Promise; + encodingInfo( + configuration: MediaEncodingConfiguration + ): Promise; } declare var MediaCapabilities: { @@ -17088,7 +17662,9 @@ interface MediaDevices extends EventTarget { ondevicechange: ((this: MediaDevices, ev: Event) => any) | null; enumerateDevices(): Promise; /** Available only in secure contexts. */ - getDisplayMedia(constraints?: DisplayMediaStreamConstraints): Promise; + getDisplayMedia( + constraints?: DisplayMediaStreamConstraints + ): Promise; getSupportedConstraints(): MediaTrackSupportedConstraints; getUserMedia(constraints?: MediaStreamConstraints): Promise; /** Available only in secure contexts. */ @@ -17127,7 +17703,10 @@ interface MediaElementAudioSourceNode extends AudioNode, AudioNodePassThrough { declare var MediaElementAudioSourceNode: { prototype: MediaElementAudioSourceNode; - new (context: AudioContext, options: MediaElementAudioSourceOptions): MediaElementAudioSourceNode; + new ( + context: AudioContext, + options: MediaElementAudioSourceOptions + ): MediaElementAudioSourceNode; isInstance: IsInstance; }; @@ -17138,7 +17717,10 @@ interface MediaEncryptedEvent extends Event { declare var MediaEncryptedEvent: { prototype: MediaEncryptedEvent; - new (type: string, eventInitDict?: MediaKeyNeededEventInit): MediaEncryptedEvent; + new ( + type: string, + eventInitDict?: MediaKeyNeededEventInit + ): MediaEncryptedEvent; isInstance: IsInstance; }; @@ -17178,7 +17760,10 @@ interface MediaKeyMessageEvent extends Event { declare var MediaKeyMessageEvent: { prototype: MediaKeyMessageEvent; - new (type: string, eventInitDict: MediaKeyMessageEventInit): MediaKeyMessageEvent; + new ( + type: string, + eventInitDict: MediaKeyMessageEventInit + ): MediaKeyMessageEvent; isInstance: IsInstance; }; @@ -17233,7 +17818,11 @@ interface MediaKeyStatusMap { get(keyId: BufferSource): MediaKeyStatus | undefined; has(keyId: BufferSource): boolean; forEach( - callbackfn: (value: MediaKeyStatus, key: ArrayBuffer, parent: MediaKeyStatusMap) => void, + callbackfn: ( + value: MediaKeyStatus, + key: ArrayBuffer, + parent: MediaKeyStatusMap + ) => void, thisArg?: any ): void; } @@ -17343,7 +17932,10 @@ interface MediaQueryListEvent extends Event { declare var MediaQueryListEvent: { prototype: MediaQueryListEvent; - new (type: string, eventInitDict?: MediaQueryListEventInit): MediaQueryListEvent; + new ( + type: string, + eventInitDict?: MediaQueryListEventInit + ): MediaQueryListEvent; isInstance: IsInstance; }; @@ -17398,7 +17990,11 @@ interface MediaRecorder extends EventTarget { declare var MediaRecorder: { prototype: MediaRecorder; new (stream: MediaStream, options?: MediaRecorderOptions): MediaRecorder; - new (node: AudioNode, output?: number, options?: MediaRecorderOptions): MediaRecorder; + new ( + node: AudioNode, + output?: number, + options?: MediaRecorderOptions + ): MediaRecorder; isInstance: IsInstance; isTypeSupported(type: string): boolean; }; @@ -17409,7 +18005,10 @@ interface MediaRecorderErrorEvent extends Event { declare var MediaRecorderErrorEvent: { prototype: MediaRecorderErrorEvent; - new (type: string, eventInitDict: MediaRecorderErrorEventInit): MediaRecorderErrorEvent; + new ( + type: string, + eventInitDict: MediaRecorderErrorEventInit + ): MediaRecorderErrorEvent; isInstance: IsInstance; }; @@ -17417,7 +18016,10 @@ interface MediaSession { metadata: MediaMetadata | null; playbackState: MediaSessionPlaybackState; notifyHandler(details: MediaSessionActionDetails): void; - setActionHandler(action: MediaSessionAction, handler: MediaSessionActionHandler | null): void; + setActionHandler( + action: MediaSessionAction, + handler: MediaSessionActionHandler | null + ): void; setPositionState(state?: MediaPositionState): void; } @@ -17531,7 +18133,10 @@ interface MediaStreamAudioDestinationNode extends AudioNode { declare var MediaStreamAudioDestinationNode: { prototype: MediaStreamAudioDestinationNode; - new (context: AudioContext, options?: AudioNodeOptions): MediaStreamAudioDestinationNode; + new ( + context: AudioContext, + options?: AudioNodeOptions + ): MediaStreamAudioDestinationNode; isInstance: IsInstance; }; @@ -17541,7 +18146,10 @@ interface MediaStreamAudioSourceNode extends AudioNode, AudioNodePassThrough { declare var MediaStreamAudioSourceNode: { prototype: MediaStreamAudioSourceNode; - new (context: AudioContext, options: MediaStreamAudioSourceOptions): MediaStreamAudioSourceNode; + new ( + context: AudioContext, + options: MediaStreamAudioSourceOptions + ): MediaStreamAudioSourceNode; isInstance: IsInstance; }; @@ -17611,7 +18219,8 @@ declare var MediaStreamTrack: { isInstance: IsInstance; }; -interface MediaStreamTrackAudioSourceNode extends AudioNode, AudioNodePassThrough {} +interface MediaStreamTrackAudioSourceNode + extends AudioNode, AudioNodePassThrough {} declare var MediaStreamTrackAudioSourceNode: { prototype: MediaStreamTrackAudioSourceNode; @@ -17628,7 +18237,10 @@ interface MediaStreamTrackEvent extends Event { declare var MediaStreamTrackEvent: { prototype: MediaStreamTrackEvent; - new (type: string, eventInitDict: MediaStreamTrackEventInit): MediaStreamTrackEvent; + new ( + type: string, + eventInitDict: MediaStreamTrackEventInit + ): MediaStreamTrackEvent; isInstance: IsInstance; }; @@ -17641,7 +18253,10 @@ interface MerchantValidationEvent extends Event { declare var MerchantValidationEvent: { prototype: MerchantValidationEvent; - new (type: string, eventInitDict?: MerchantValidationEventInit): MerchantValidationEvent; + new ( + type: string, + eventInitDict?: MerchantValidationEventInit + ): MerchantValidationEvent; isInstance: IsInstance; }; @@ -17709,7 +18324,10 @@ interface MessageListenerManagerMixin { ): void; addWeakMessageListener(messageName: string, listener: MessageListener): void; removeMessageListener(messageName: string, listener: MessageListener): void; - removeWeakMessageListener(messageName: string, listener: MessageListener): void; + removeWeakMessageListener( + messageName: string, + listener: MessageListener + ): void; } interface MessageManagerGlobal { @@ -17769,7 +18387,11 @@ declare var MessageSender: { interface MessageSenderMixin { readonly processMessageManager: MessageSender | null; readonly remoteType: string; - sendAsyncMessage(messageName?: string | null, obj?: any, transfers?: any): void; + sendAsyncMessage( + messageName?: string | null, + obj?: any, + transfers?: any + ): void; } interface MimeType { @@ -17939,7 +18561,10 @@ interface MozDocumentMatcher { readonly matches: MatchPatternSet; readonly originAttributesPatterns: any; matchesURI(uri: URI): boolean; - matchesWindowGlobal(windowGlobal: WindowGlobalChild, ignorePermissions?: boolean): boolean; + matchesWindowGlobal( + windowGlobal: WindowGlobalChild, + ignorePermissions?: boolean + ): boolean; } declare var MozDocumentMatcher: { @@ -18009,7 +18634,11 @@ interface MozSharedMap extends EventTarget { get(name: string): StructuredClonable; has(name: string): boolean; forEach( - callbackfn: (value: StructuredClonable, key: string, parent: MozSharedMap) => void, + callbackfn: ( + value: StructuredClonable, + key: string, + parent: MozSharedMap + ) => void, thisArg?: any ): void; } @@ -18172,7 +18801,10 @@ interface Navigation extends EventTarget { back(options?: NavigationOptions): NavigationResult; entries(): NavigationHistoryEntry[]; forward(options?: NavigationOptions): NavigationResult; - navigate(url: string | URL, options?: NavigationNavigateOptions): NavigationResult; + navigate( + url: string | URL, + options?: NavigationNavigateOptions + ): NavigationResult; reload(options?: NavigationReloadOptions): NavigationResult; traverseTo(key: string, options?: NavigationOptions): NavigationResult; updateCurrentEntry(options: NavigationUpdateCurrentEntryOptions): void; @@ -18259,7 +18891,10 @@ interface NavigationHistoryEntry extends EventTarget { getState(): any; addEventListener( type: K, - listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, + listener: ( + this: NavigationHistoryEntry, + ev: NavigationHistoryEntryEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -18269,7 +18904,10 @@ interface NavigationHistoryEntry extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: NavigationHistoryEntry, ev: NavigationHistoryEntryEventMap[K]) => any, + listener: ( + this: NavigationHistoryEntry, + ev: NavigationHistoryEntryEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -18323,7 +18961,8 @@ declare var NavigationTransition: { }; interface Navigator - extends GlobalPrivacyControl, + extends + GlobalPrivacyControl, NavigatorAutomationInformation, NavigatorConcurrentHardware, NavigatorContentUtils, @@ -18415,7 +19054,11 @@ interface NavigatorConcurrentHardware { } interface NavigatorContentUtils { - checkProtocolHandlerAllowed(scheme: string, handlerURI: URI, documentURI: URI): void; + checkProtocolHandlerAllowed( + scheme: string, + handlerURI: URI, + documentURI: URI + ): void; /** Available only in secure contexts. */ registerProtocolHandler(scheme: string, url: string): void; } @@ -18478,7 +19121,10 @@ interface NetworkInformation extends EventTarget { readonly type: ConnectionType; addEventListener( type: K, - listener: (this: NetworkInformation, ev: NetworkInformationEventMap[K]) => any, + listener: ( + this: NetworkInformation, + ev: NetworkInformationEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -18488,7 +19134,10 @@ interface NetworkInformation extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: NetworkInformation, ev: NetworkInformationEventMap[K]) => any, + listener: ( + this: NetworkInformation, + ev: NetworkInformationEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -18700,7 +19349,11 @@ declare var NotifyPaintEvent: { }; interface OES_draw_buffers_indexed { - blendEquationSeparateiOES(buf: GLuint, modeRGB: GLenum, modeAlpha: GLenum): void; + blendEquationSeparateiOES( + buf: GLuint, + modeRGB: GLenum, + modeAlpha: GLenum + ): void; blendEquationiOES(buf: GLuint, mode: GLenum): void; blendFuncSeparateiOES( buf: GLuint, @@ -18710,7 +19363,13 @@ interface OES_draw_buffers_indexed { dstAlpha: GLenum ): void; blendFunciOES(buf: GLuint, src: GLenum, dst: GLenum): void; - colorMaskiOES(buf: GLuint, r: GLboolean, g: GLboolean, b: GLboolean, a: GLboolean): void; + colorMaskiOES( + buf: GLuint, + r: GLboolean, + g: GLboolean, + b: GLboolean, + a: GLboolean + ): void; disableiOES(target: GLenum, index: GLuint): void; enableiOES(target: GLenum, index: GLuint): void; } @@ -18762,7 +19421,10 @@ interface OfflineAudioCompletionEvent extends Event { declare var OfflineAudioCompletionEvent: { prototype: OfflineAudioCompletionEvent; - new (type: string, eventInitDict: OfflineAudioCompletionEventInit): OfflineAudioCompletionEvent; + new ( + type: string, + eventInitDict: OfflineAudioCompletionEventInit + ): OfflineAudioCompletionEvent; isInstance: IsInstance; }; @@ -18776,7 +19438,10 @@ interface OfflineAudioContext extends BaseAudioContext { startRendering(): Promise; addEventListener( type: K, - listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, + listener: ( + this: OfflineAudioContext, + ev: OfflineAudioContextEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -18786,7 +19451,10 @@ interface OfflineAudioContext extends BaseAudioContext { ): void; removeEventListener( type: K, - listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, + listener: ( + this: OfflineAudioContext, + ev: OfflineAudioContextEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -18799,7 +19467,11 @@ interface OfflineAudioContext extends BaseAudioContext { declare var OfflineAudioContext: { prototype: OfflineAudioContext; new (contextOptions: OfflineAudioContextOptions): OfflineAudioContext; - new (numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext; + new ( + numberOfChannels: number, + length: number, + sampleRate: number + ): OfflineAudioContext; isInstance: IsInstance; }; @@ -18849,7 +19521,8 @@ declare var OffscreenCanvas: { }; interface OffscreenCanvasRenderingContext2D - extends CanvasCompositing, + extends + CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, @@ -18942,14 +19615,18 @@ interface OnErrorEventHandlerForWindow { ): void; } -interface OscillatorNode extends AudioScheduledSourceNode, AudioNodePassThrough { +interface OscillatorNode + extends AudioScheduledSourceNode, AudioNodePassThrough { readonly detune: AudioParam; readonly frequency: AudioParam; type: OscillatorType; setPeriodicWave(periodicWave: PeriodicWave): void; addEventListener( type: K, - listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: OscillatorNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -18959,7 +19636,10 @@ interface OscillatorNode extends AudioScheduledSourceNode, AudioNodePassThrough ): void; removeEventListener( type: K, - listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, + listener: ( + this: OscillatorNode, + ev: AudioScheduledSourceNodeEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -18982,7 +19662,10 @@ interface PageTransitionEvent extends Event { declare var PageTransitionEvent: { prototype: PageTransitionEvent; - new (type: string, eventInitDict?: PageTransitionEventInit): PageTransitionEvent; + new ( + type: string, + eventInitDict?: PageTransitionEventInit + ): PageTransitionEvent; isInstance: IsInstance; }; @@ -19056,7 +19739,9 @@ interface ParentNode { querySelector( selectors: K ): HTMLElementTagNameMap[K] | null; - querySelector(selectors: K): SVGElementTagNameMap[K] | null; + querySelector( + selectors: K + ): SVGElementTagNameMap[K] | null; querySelector( selectors: K ): MathMLElementTagNameMap[K] | null; @@ -19078,14 +19763,14 @@ interface ParentNode { querySelectorAll( selectors: K ): NodeListOf; - querySelectorAll(selectors: string): NodeListOf; + querySelectorAll( + selectors: string + ): NodeListOf; replaceChildren(...nodes: (Node | string)[]): void; } interface ParentProcessMessageManager - extends MessageBroadcaster, - GlobalProcessScriptLoader, - ProcessScriptLoader {} + extends MessageBroadcaster, GlobalProcessScriptLoader, ProcessScriptLoader {} declare var ParentProcessMessageManager: { prototype: ParentProcessMessageManager; @@ -19135,7 +19820,10 @@ interface PaymentMethodChangeEvent extends PaymentRequestUpdateEvent { declare var PaymentMethodChangeEvent: { prototype: PaymentMethodChangeEvent; - new (type: string, eventInitDict?: PaymentMethodChangeEventInit): PaymentMethodChangeEvent; + new ( + type: string, + eventInitDict?: PaymentMethodChangeEventInit + ): PaymentMethodChangeEvent; isInstance: IsInstance; }; @@ -19195,12 +19883,17 @@ declare var PaymentRequest: { /** Available only in secure contexts. */ interface PaymentRequestUpdateEvent extends Event { - updateWith(detailsPromise: PaymentDetailsUpdate | PromiseLike): void; + updateWith( + detailsPromise: PaymentDetailsUpdate | PromiseLike + ): void; } declare var PaymentRequestUpdateEvent: { prototype: PaymentRequestUpdateEvent; - new (type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent; + new ( + type: string, + eventInitDict?: PaymentRequestUpdateEventInit + ): PaymentRequestUpdateEvent; isInstance: IsInstance; }; @@ -19268,7 +19961,12 @@ interface PeerConnectionImpl { readonly privacyRequested: boolean; readonly sctp: RTCSctpTransport | null; readonly signalingState: RTCSignalingState; - addIceCandidate(candidate: string, mid: string, ufrag: string, level: number | null): void; + addIceCandidate( + candidate: string, + mid: string, + ufrag: string, + level: number | null + ): void; addTransceiver( init: RTCRtpTransceiverInit, kind: string, @@ -19291,8 +19989,16 @@ interface PeerConnectionImpl { ): RTCDataChannel; createOffer(options?: RTCOfferOptions): void; createdSender(sender: RTCRtpSender): boolean; - disablePacketDump(level: number, type: mozPacketDumpType, sending: boolean): void; - enablePacketDump(level: number, type: mozPacketDumpType, sending: boolean): void; + disablePacketDump( + level: number, + type: mozPacketDumpType, + sending: boolean + ): void; + enablePacketDump( + level: number, + type: mozPacketDumpType, + sending: boolean + ): void; getRemoteStreams(): MediaStream[]; getStats(selector: MediaStreamTrack | null): Promise; getTransceivers(): RTCRtpTransceiver[]; @@ -19325,8 +20031,18 @@ interface PeerConnectionObserver { onCreateAnswerSuccess(answer: string): void; onCreateOfferError(error: PCErrorData): void; onCreateOfferSuccess(offer: string): void; - onIceCandidate(level: number, mid: string, candidate: string, ufrag: string): void; - onPacket(level: number, type: mozPacketDumpType, sending: boolean, packet: ArrayBuffer): void; + onIceCandidate( + level: number, + mid: string, + candidate: string, + ufrag: string + ): void; + onPacket( + level: number, + type: mozPacketDumpType, + sending: boolean, + packet: ArrayBuffer + ): void; onSetDescriptionError(error: PCErrorData): void; onSetDescriptionSuccess(): void; onStateChange(state: PCObserverStateType): void; @@ -19418,7 +20134,10 @@ interface PerformanceEntryEvent extends Event { declare var PerformanceEntryEvent: { prototype: PerformanceEntryEvent; - new (type: string, eventInitDict?: PerformanceEntryEventInit): PerformanceEntryEvent; + new ( + type: string, + eventInitDict?: PerformanceEntryEventInit + ): PerformanceEntryEvent; isInstance: IsInstance; }; @@ -19961,7 +20680,10 @@ interface PluginCrashedEvent extends Event { declare var PluginCrashedEvent: { prototype: PluginCrashedEvent; - new (type: string, eventInitDict?: PluginCrashedEventInit): PluginCrashedEvent; + new ( + type: string, + eventInitDict?: PluginCrashedEventInit + ): PluginCrashedEvent; isInstance: IsInstance; }; @@ -20038,7 +20760,10 @@ interface PositionStateEvent extends Event { declare var PositionStateEvent: { prototype: PositionStateEvent; - new (type: string, eventInitDict?: PositionStateEventInit): PositionStateEvent; + new ( + type: string, + eventInitDict?: PositionStateEventInit + ): PositionStateEvent; isInstance: IsInstance; }; @@ -20114,7 +20839,10 @@ interface PromiseRejectionEvent extends Event { declare var PromiseRejectionEvent: { prototype: PromiseRejectionEvent; - new (type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent; + new ( + type: string, + eventInitDict: PromiseRejectionEventInit + ): PromiseRejectionEvent; isInstance: IsInstance; }; @@ -20144,7 +20872,9 @@ declare var PublicKeyCredential: { interface PushManager { getSubscription(): Promise; - permissionState(options?: PushSubscriptionOptionsInit): Promise; + permissionState( + options?: PushSubscriptionOptionsInit + ): Promise; subscribe(options?: PushSubscriptionOptionsInit): Promise; } @@ -20157,7 +20887,9 @@ declare var PushManager: { interface PushManagerImpl { getSubscription(): Promise; - permissionState(options?: PushSubscriptionOptionsInit): Promise; + permissionState( + options?: PushSubscriptionOptionsInit + ): Promise; subscribe(options?: PushSubscriptionOptionsInit): Promise; } @@ -20246,7 +20978,10 @@ interface RTCDTMFToneChangeEvent extends Event { declare var RTCDTMFToneChangeEvent: { prototype: RTCDTMFToneChangeEvent; - new (type: string, eventInitDict?: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent; + new ( + type: string, + eventInitDict?: RTCDTMFToneChangeEventInit + ): RTCDTMFToneChangeEvent; isInstance: IsInstance; }; @@ -20316,7 +21051,10 @@ interface RTCDataChannelEvent extends Event { declare var RTCDataChannelEvent: { prototype: RTCDataChannelEvent; - new (type: string, eventInitDict: RTCDataChannelEventInit): RTCDataChannelEvent; + new ( + type: string, + eventInitDict: RTCDataChannelEventInit + ): RTCDataChannelEvent; isInstance: IsInstance; }; @@ -20457,7 +21195,10 @@ interface RTCIdentityProviderRegistrar { options?: RTCIdentityProviderOptions ): Promise; register(idp: RTCIdentityProvider): void; - validateAssertion(assertion: string, origin: string): Promise; + validateAssertion( + assertion: string, + origin: string + ): Promise; } interface RTCPeerConnectionEventMap { @@ -20488,8 +21229,10 @@ interface RTCPeerConnection extends EventTarget { onconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; ondatachannel: ((this: RTCPeerConnection, ev: Event) => any) | null; onicecandidate: ((this: RTCPeerConnection, ev: Event) => any) | null; - oniceconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; - onicegatheringstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; + oniceconnectionstatechange: + ((this: RTCPeerConnection, ev: Event) => any) | null; + onicegatheringstatechange: + ((this: RTCPeerConnection, ev: Event) => any) | null; onnegotiationneeded: ((this: RTCPeerConnection, ev: Event) => any) | null; onsignalingstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null; ontrack: ((this: RTCPeerConnection, ev: Event) => any) | null; @@ -20499,7 +21242,9 @@ interface RTCPeerConnection extends EventTarget { readonly remoteDescription: RTCSessionDescription | null; readonly sctp: RTCSctpTransport | null; readonly signalingState: RTCSignalingState; - addIceCandidate(candidate?: RTCIceCandidateInit | RTCIceCandidate): Promise; + addIceCandidate( + candidate?: RTCIceCandidateInit | RTCIceCandidate + ): Promise; addIceCandidate( candidate: RTCIceCandidateInit, successCallback: VoidFunction, @@ -20517,7 +21262,10 @@ interface RTCPeerConnection extends EventTarget { successCallback: RTCSessionDescriptionCallback, failureCallback: RTCPeerConnectionErrorCallback ): Promise; - createDataChannel(label: string, dataChannelDict?: RTCDataChannelInit): RTCDataChannel; + createDataChannel( + label: string, + dataChannelDict?: RTCDataChannelInit + ): RTCDataChannel; createOffer(options?: RTCOfferOptions): Promise; createOffer( successCallback: RTCSessionDescriptionCallback, @@ -20532,14 +21280,27 @@ interface RTCPeerConnection extends EventTarget { getSenders(): RTCRtpSender[]; getStats(selector?: MediaStreamTrack | null): Promise; getTransceivers(): RTCRtpTransceiver[]; - mozDisablePacketDump(level: number, type: mozPacketDumpType, sending: boolean): void; - mozEnablePacketDump(level: number, type: mozPacketDumpType, sending: boolean): void; + mozDisablePacketDump( + level: number, + type: mozPacketDumpType, + sending: boolean + ): void; + mozEnablePacketDump( + level: number, + type: mozPacketDumpType, + sending: boolean + ): void; mozSetPacketCallback(callback: mozPacketCallback): void; removeTrack(sender: RTCRtpSender): void; restartIce(): void; setConfiguration(configuration?: RTCConfiguration): void; - setIdentityProvider(provider: string, options?: RTCIdentityProviderOptions): void; - setLocalDescription(description?: RTCLocalSessionDescriptionInit): Promise; + setIdentityProvider( + provider: string, + options?: RTCIdentityProviderOptions + ): void; + setLocalDescription( + description?: RTCLocalSessionDescriptionInit + ): Promise; setLocalDescription( description: RTCLocalSessionDescriptionInit, successCallback: VoidFunction, @@ -20553,7 +21314,10 @@ interface RTCPeerConnection extends EventTarget { ): Promise; addEventListener( type: K, - listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, + listener: ( + this: RTCPeerConnection, + ev: RTCPeerConnectionEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -20563,7 +21327,10 @@ interface RTCPeerConnection extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, + listener: ( + this: RTCPeerConnection, + ev: RTCPeerConnectionEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -20577,7 +21344,9 @@ declare var RTCPeerConnection: { prototype: RTCPeerConnection; new (configuration?: RTCConfiguration): RTCPeerConnection; isInstance: IsInstance; - generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise; + generateCertificate( + keygenAlgorithm: AlgorithmIdentifier + ): Promise; }; interface RTCPeerConnectionIceEvent extends Event { @@ -20586,12 +21355,17 @@ interface RTCPeerConnectionIceEvent extends Event { declare var RTCPeerConnectionIceEvent: { prototype: RTCPeerConnectionIceEvent; - new (type: string, eventInitDict?: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent; + new ( + type: string, + eventInitDict?: RTCPeerConnectionIceEventInit + ): RTCPeerConnectionIceEvent; isInstance: IsInstance; }; interface RTCPeerConnectionStatic { - registerPeerConnectionLifecycleCallback(cb: PeerConnectionLifecycleCallback): void; + registerPeerConnectionLifecycleCallback( + cb: PeerConnectionLifecycleCallback + ): void; } declare var RTCPeerConnectionStatic: { @@ -20825,8 +21599,14 @@ interface ReadableStream { readonly locked: boolean; cancel(reason?: any): Promise; getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; - pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; + pipeThrough( + transform: ReadableWritablePair, + options?: StreamPipeOptions + ): ReadableStream; + pipeTo( + destination: WritableStream, + options?: StreamPipeOptions + ): Promise; tee(): ReadableStream[]; } @@ -20899,7 +21679,10 @@ interface RedirectBlockedEvent extends Event { declare var RedirectBlockedEvent: { prototype: RedirectBlockedEvent; - new (type: string, eventInitDict?: RedirectBlockedEventInit): RedirectBlockedEvent; + new ( + type: string, + eventInitDict?: RedirectBlockedEventInit + ): RedirectBlockedEvent; isInstance: IsInstance; }; @@ -20934,7 +21717,10 @@ interface ReportingObserver { declare var ReportingObserver: { prototype: ReportingObserver; - new (callback: ReportingObserverCallback, options?: ReportingObserverOptions): ReportingObserver; + new ( + callback: ReportingObserverCallback, + options?: ReportingObserverOptions + ): ReportingObserver; isInstance: IsInstance; }; @@ -21017,7 +21803,14 @@ interface Response extends Body { declare var Response: { prototype: Response; new ( - body?: Blob | BufferSource | FormData | URLSearchParams | ReadableStream | string | null, + body?: + | Blob + | BufferSource + | FormData + | URLSearchParams + | ReadableStream + | string + | null, init?: ResponseInit ): Response; isInstance: IsInstance; @@ -21092,7 +21885,10 @@ declare var SVGAngle: { interface SVGAnimateElement extends SVGAnimationElement { addEventListener( type: K, - listener: (this: SVGAnimateElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21102,7 +21898,10 @@ interface SVGAnimateElement extends SVGAnimationElement { ): void; removeEventListener( type: K, - listener: (this: SVGAnimateElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21121,7 +21920,10 @@ declare var SVGAnimateElement: { interface SVGAnimateMotionElement extends SVGAnimationElement { addEventListener( type: K, - listener: (this: SVGAnimateMotionElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateMotionElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21131,7 +21933,10 @@ interface SVGAnimateMotionElement extends SVGAnimationElement { ): void; removeEventListener( type: K, - listener: (this: SVGAnimateMotionElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateMotionElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21150,7 +21955,10 @@ declare var SVGAnimateMotionElement: { interface SVGAnimateTransformElement extends SVGAnimationElement { addEventListener( type: K, - listener: (this: SVGAnimateTransformElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateTransformElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21160,7 +21968,10 @@ interface SVGAnimateTransformElement extends SVGAnimationElement { ): void; removeEventListener( type: K, - listener: (this: SVGAnimateTransformElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimateTransformElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21333,7 +22144,10 @@ interface SVGAnimationElement extends SVGElement, SVGTests { getStartTime(): number; addEventListener( type: K, - listener: (this: SVGAnimationElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimationElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21343,7 +22157,10 @@ interface SVGAnimationElement extends SVGElement, SVGTests { ): void; removeEventListener( type: K, - listener: (this: SVGAnimationElement, ev: SVGAnimationElementEventMap[K]) => any, + listener: ( + this: SVGAnimationElement, + ev: SVGAnimationElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21438,7 +22255,10 @@ interface SVGComponentTransferFunctionElement extends SVGElement { readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: 5; addEventListener( type: K, - listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGComponentTransferFunctionElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21448,7 +22268,10 @@ interface SVGComponentTransferFunctionElement extends SVGElement { ): void; removeEventListener( type: K, - listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGComponentTransferFunctionElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21529,14 +22352,16 @@ declare var SVGDescElement: { }; interface SVGElementEventMap - extends ElementEventMap, + extends + ElementEventMap, GlobalEventHandlersEventMap, OnErrorEventHandlerForNodesEventMap, TouchEventHandlersEventMap {} // @ts-ignore interface SVGElement - extends Element, + extends + Element, ElementCSSInlineStyle, GlobalEventHandlers, HTMLOrForeignElement, @@ -21608,7 +22433,8 @@ declare var SVGEllipseElement: { isInstance: IsInstance; }; -interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEBlendElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly in2: SVGAnimatedString; readonly mode: SVGAnimatedEnumeration; @@ -21674,7 +22500,8 @@ declare var SVGFEBlendElement: { isInstance: IsInstance; }; -interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEColorMatrixElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly type: SVGAnimatedEnumeration; readonly values: SVGAnimatedNumberList; @@ -21716,11 +22543,15 @@ declare var SVGFEColorMatrixElement: { isInstance: IsInstance; }; -interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEComponentTransferElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; addEventListener( type: K, - listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEComponentTransferElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21730,7 +22561,10 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt ): void; removeEventListener( type: K, - listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEComponentTransferElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21746,7 +22580,8 @@ declare var SVGFEComponentTransferElement: { isInstance: IsInstance; }; -interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFECompositeElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly in2: SVGAnimatedString; readonly k1: SVGAnimatedNumber; @@ -21798,7 +22633,8 @@ declare var SVGFECompositeElement: { isInstance: IsInstance; }; -interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEConvolveMatrixElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly bias: SVGAnimatedNumber; readonly divisor: SVGAnimatedNumber; readonly edgeMode: SVGAnimatedEnumeration; @@ -21817,7 +22653,10 @@ interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStand readonly SVG_EDGEMODE_NONE: 3; addEventListener( type: K, - listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEConvolveMatrixElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21827,7 +22666,10 @@ interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStand ): void; removeEventListener( type: K, - listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEConvolveMatrixElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21847,7 +22689,8 @@ declare var SVGFEConvolveMatrixElement: { isInstance: IsInstance; }; -interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEDiffuseLightingElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly diffuseConstant: SVGAnimatedNumber; readonly in1: SVGAnimatedString; readonly kernelUnitLengthX: SVGAnimatedNumber; @@ -21855,7 +22698,10 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan readonly surfaceScale: SVGAnimatedNumber; addEventListener( type: K, - listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDiffuseLightingElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21865,7 +22711,10 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan ): void; removeEventListener( type: K, - listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDiffuseLightingElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21881,7 +22730,8 @@ declare var SVGFEDiffuseLightingElement: { isInstance: IsInstance; }; -interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEDisplacementMapElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly in2: SVGAnimatedString; readonly scale: SVGAnimatedNumber; @@ -21894,7 +22744,10 @@ interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStan readonly SVG_CHANNEL_A: 4; addEventListener( type: K, - listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDisplacementMapElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21904,7 +22757,10 @@ interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStan ): void; removeEventListener( type: K, - listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDisplacementMapElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21930,7 +22786,10 @@ interface SVGFEDistantLightElement extends SVGElement { readonly elevation: SVGAnimatedNumber; addEventListener( type: K, - listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDistantLightElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -21940,7 +22799,10 @@ interface SVGFEDistantLightElement extends SVGElement { ): void; removeEventListener( type: K, - listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEDistantLightElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -21956,7 +22818,8 @@ declare var SVGFEDistantLightElement: { isInstance: IsInstance; }; -interface SVGFEDropShadowElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEDropShadowElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly dx: SVGAnimatedNumber; readonly dy: SVGAnimatedNumber; readonly in1: SVGAnimatedString; @@ -21991,7 +22854,8 @@ declare var SVGFEDropShadowElement: { isInstance: IsInstance; }; -interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEFloodElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { addEventListener( type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, @@ -22136,14 +23000,18 @@ declare var SVGFEFuncRElement: { isInstance: IsInstance; }; -interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEGaussianBlurElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly stdDeviationX: SVGAnimatedNumber; readonly stdDeviationY: SVGAnimatedNumber; setStdDeviation(stdDeviationX: number, stdDeviationY: number): void; addEventListener( type: K, - listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEGaussianBlurElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -22153,7 +23021,10 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar ): void; removeEventListener( type: K, - listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFEGaussianBlurElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -22170,9 +23041,7 @@ declare var SVGFEGaussianBlurElement: { }; interface SVGFEImageElement - extends SVGElement, - SVGFilterPrimitiveStandardAttributes, - SVGURIReference { + extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference { crossOrigin: string | null; fetchPriority: string; readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio; @@ -22204,7 +23073,8 @@ declare var SVGFEImageElement: { isInstance: IsInstance; }; -interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEMergeElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { addEventListener( type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, @@ -22263,7 +23133,8 @@ declare var SVGFEMergeNodeElement: { isInstance: IsInstance; }; -interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEMorphologyElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly operator: SVGAnimatedEnumeration; readonly radiusX: SVGAnimatedNumber; @@ -22302,7 +23173,8 @@ declare var SVGFEMorphologyElement: { isInstance: IsInstance; }; -interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFEOffsetElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly dx: SVGAnimatedNumber; readonly dy: SVGAnimatedNumber; readonly in1: SVGAnimatedString; @@ -22366,7 +23238,8 @@ declare var SVGFEPointLightElement: { isInstance: IsInstance; }; -interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFESpecularLightingElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; readonly kernelUnitLengthX: SVGAnimatedNumber; readonly kernelUnitLengthY: SVGAnimatedNumber; @@ -22375,7 +23248,10 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta readonly surfaceScale: SVGAnimatedNumber; addEventListener( type: K, - listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFESpecularLightingElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -22385,7 +23261,10 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta ): void; removeEventListener( type: K, - listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGFESpecularLightingElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -22438,7 +23317,8 @@ declare var SVGFESpotLightElement: { isInstance: IsInstance; }; -interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFETileElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; addEventListener( type: K, @@ -22468,7 +23348,8 @@ declare var SVGFETileElement: { isInstance: IsInstance; }; -interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { +interface SVGFETurbulenceElement + extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly baseFrequencyX: SVGAnimatedNumber; readonly baseFrequencyY: SVGAnimatedNumber; readonly numOctaves: SVGAnimatedInteger; @@ -22732,7 +23613,8 @@ declare var SVGGraphicsElement: { isInstance: IsInstance; }; -interface SVGImageElement extends SVGGraphicsElement, MozImageLoadingContent, SVGURIReference { +interface SVGImageElement + extends SVGGraphicsElement, MozImageLoadingContent, SVGURIReference { crossOrigin: string | null; decoding: string; fetchPriority: string; @@ -22869,7 +23751,10 @@ interface SVGLinearGradientElement extends SVGGradientElement { readonly y2: SVGAnimatedLength; addEventListener( type: K, - listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGLinearGradientElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -22879,7 +23764,10 @@ interface SVGLinearGradientElement extends SVGGradientElement { ): void; removeEventListener( type: K, - listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGLinearGradientElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -23139,7 +24027,8 @@ interface SVGPathSegment { values: number[] | Float32Array; } -interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGURIReference { +interface SVGPatternElement + extends SVGElement, SVGFitToViewBox, SVGURIReference { readonly height: SVGAnimatedLength; readonly patternContentUnits: SVGAnimatedEnumeration; readonly patternTransform: SVGAnimatedTransformList; @@ -23312,7 +24201,10 @@ interface SVGRadialGradientElement extends SVGGradientElement { readonly r: SVGAnimatedLength; addEventListener( type: K, - listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGRadialGradientElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -23322,7 +24214,10 @@ interface SVGRadialGradientElement extends SVGGradientElement { ): void; removeEventListener( type: K, - listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGRadialGradientElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -23386,7 +24281,8 @@ declare var SVGRectElement: { isInstance: IsInstance; }; -interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, SVGZoomAndPan { +interface SVGSVGElement + extends SVGGraphicsElement, SVGFitToViewBox, SVGZoomAndPan { currentScale: number; readonly currentTranslate: SVGPoint; readonly height: SVGAnimatedLength; @@ -23807,7 +24703,10 @@ interface SVGTextPositioningElement extends SVGTextContentElement { readonly y: SVGAnimatedLengthList; addEventListener( type: K, - listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGTextPositioningElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -23817,7 +24716,10 @@ interface SVGTextPositioningElement extends SVGTextContentElement { ): void; removeEventListener( type: K, - listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, + listener: ( + this: SVGTextPositioningElement, + ev: SVGElementEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24025,7 +24927,10 @@ declare var Sanitizer: { }; interface Scheduler { - postTask(callback: SchedulerPostTaskCallback, options?: SchedulerPostTaskOptions): Promise; + postTask( + callback: SchedulerPostTaskCallback, + options?: SchedulerPostTaskOptions + ): Promise; yield(): Promise; } @@ -24112,7 +25017,10 @@ interface ScreenOrientation extends EventTarget { unlock(): void; addEventListener( type: K, - listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, + listener: ( + this: ScreenOrientation, + ev: ScreenOrientationEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24122,7 +25030,10 @@ interface ScreenOrientation extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, + listener: ( + this: ScreenOrientation, + ev: ScreenOrientationEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24147,7 +25058,10 @@ interface ScriptProcessorNode extends AudioNode, AudioNodePassThrough { onaudioprocess: ((this: ScriptProcessorNode, ev: Event) => any) | null; addEventListener( type: K, - listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, + listener: ( + this: ScriptProcessorNode, + ev: ScriptProcessorNodeEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24157,7 +25071,10 @@ interface ScriptProcessorNode extends AudioNode, AudioNodePassThrough { ): void; removeEventListener( type: K, - listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, + listener: ( + this: ScriptProcessorNode, + ev: ScriptProcessorNodeEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24275,7 +25192,11 @@ interface Selection { aAltBackgroundColor: string ): void; setPosition(node: Node | null, offset?: number): void; - toStringWithFormat(formatType: string, flags: number, wrapColumn: number): string; + toStringWithFormat( + formatType: string, + flags: number, + wrapColumn: number + ): string; toString(): string; } @@ -24335,7 +25256,9 @@ interface ServiceWorkerContainer extends EventTarget { onmessage: ((this: ServiceWorkerContainer, ev: Event) => any) | null; onmessageerror: ((this: ServiceWorkerContainer, ev: Event) => any) | null; readonly ready: Promise; - getRegistration(documentURL?: string | URL): Promise; + getRegistration( + documentURL?: string | URL + ): Promise; getRegistrations(): Promise; register( scriptURL: TrustedScriptURL | string, @@ -24344,7 +25267,10 @@ interface ServiceWorkerContainer extends EventTarget { startMessages(): void; addEventListener( type: K, - listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, + listener: ( + this: ServiceWorkerContainer, + ev: ServiceWorkerContainerEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24354,7 +25280,10 @@ interface ServiceWorkerContainer extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, + listener: ( + this: ServiceWorkerContainer, + ev: ServiceWorkerContainerEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24390,7 +25319,10 @@ interface ServiceWorkerRegistration extends EventTarget { update(): Promise; addEventListener( type: K, - listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, + listener: ( + this: ServiceWorkerRegistration, + ev: ServiceWorkerRegistrationEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24400,7 +25332,10 @@ interface ServiceWorkerRegistration extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, + listener: ( + this: ServiceWorkerRegistration, + ev: ServiceWorkerRegistrationEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24460,10 +25395,17 @@ interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot { createElementAndAppendChildAt(parentNode: Node, localName: string): Node; getElementById(elementId: string): Element | null; getHTML(options?: GetHTMLOptions): string; - importNodeAndAppendChildAt(parentNode: Node, node: Node, deep?: boolean): Node; + importNodeAndAppendChildAt( + parentNode: Node, + node: Node, + deep?: boolean + ): Node; isUAWidget(): boolean; setHTML(aInnerHTML: string, options?: SetHTMLOptions): void; - setHTMLUnsafe(html: TrustedHTML | string, options?: SetHTMLUnsafeOptions): void; + setHTMLUnsafe( + html: TrustedHTML | string, + options?: SetHTMLUnsafeOptions + ): void; setIsUAWidget(): void; addEventListener( type: K, @@ -24519,7 +25461,10 @@ interface SharedWorker extends EventTarget, AbstractWorker { declare var SharedWorker: { prototype: SharedWorker; - new (scriptURL: TrustedScriptURL | string, options?: string | WorkerOptions): SharedWorker; + new ( + scriptURL: TrustedScriptURL | string, + options?: string | WorkerOptions + ): SharedWorker; isInstance: IsInstance; }; @@ -24725,7 +25670,10 @@ interface SpeechRecognition extends EventTarget { stop(): void; addEventListener( type: K, - listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, + listener: ( + this: SpeechRecognition, + ev: SpeechRecognitionEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24735,7 +25683,10 @@ interface SpeechRecognition extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, + listener: ( + this: SpeechRecognition, + ev: SpeechRecognitionEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24769,7 +25720,10 @@ interface SpeechRecognitionError extends Event { declare var SpeechRecognitionError: { prototype: SpeechRecognitionError; - new (type: string, eventInitDict?: SpeechRecognitionErrorInit): SpeechRecognitionError; + new ( + type: string, + eventInitDict?: SpeechRecognitionErrorInit + ): SpeechRecognitionError; isInstance: IsInstance; }; @@ -24782,7 +25736,10 @@ interface SpeechRecognitionEvent extends Event { declare var SpeechRecognitionEvent: { prototype: SpeechRecognitionEvent; - new (type: string, eventInitDict?: SpeechRecognitionEventInit): SpeechRecognitionEvent; + new ( + type: string, + eventInitDict?: SpeechRecognitionEventInit + ): SpeechRecognitionEvent; isInstance: IsInstance; }; @@ -24860,7 +25817,10 @@ interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent { declare var SpeechSynthesisErrorEvent: { prototype: SpeechSynthesisErrorEvent; - new (type: string, eventInitDict: SpeechSynthesisErrorEventInit): SpeechSynthesisErrorEvent; + new ( + type: string, + eventInitDict: SpeechSynthesisErrorEventInit + ): SpeechSynthesisErrorEvent; isInstance: IsInstance; }; @@ -24874,7 +25834,10 @@ interface SpeechSynthesisEvent extends Event { declare var SpeechSynthesisEvent: { prototype: SpeechSynthesisEvent; - new (type: string, eventInitDict: SpeechSynthesisEventInit): SpeechSynthesisEvent; + new ( + type: string, + eventInitDict: SpeechSynthesisEventInit + ): SpeechSynthesisEvent; isInstance: IsInstance; }; @@ -24909,7 +25872,10 @@ interface SpeechSynthesisUtterance extends EventTarget { volume: number; addEventListener( type: K, - listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, + listener: ( + this: SpeechSynthesisUtterance, + ev: SpeechSynthesisUtteranceEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -24919,7 +25885,10 @@ interface SpeechSynthesisUtterance extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, + listener: ( + this: SpeechSynthesisUtterance, + ev: SpeechSynthesisUtteranceEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -24964,7 +25933,10 @@ interface StereoPannerNode extends AudioNode, AudioNodePassThrough { declare var StereoPannerNode: { prototype: StereoPannerNode; - new (context: BaseAudioContext, options?: StereoPannerOptions): StereoPannerNode; + new ( + context: BaseAudioContext, + options?: StereoPannerOptions + ): StereoPannerNode; isInstance: IsInstance; }; @@ -25083,7 +26055,10 @@ interface StreamFilterDataEvent extends Event { declare var StreamFilterDataEvent: { prototype: StreamFilterDataEvent; - new (type: string, eventInitDict?: StreamFilterDataEventInit): StreamFilterDataEvent; + new ( + type: string, + eventInitDict?: StreamFilterDataEventInit + ): StreamFilterDataEvent; isInstance: IsInstance; }; @@ -25094,7 +26069,12 @@ interface StructuredCloneHolder { declare var StructuredCloneHolder: { prototype: StructuredCloneHolder; - new (name: string, anonymizedName: string | null, data: any, global?: any): StructuredCloneHolder; + new ( + name: string, + anonymizedName: string | null, + data: any, + global?: any + ): StructuredCloneHolder; isInstance: IsInstance; }; @@ -25128,7 +26108,11 @@ interface StylePropertyMapReadOnly { getAll(property: string): CSSStyleValue[]; has(property: string): boolean; forEach( - callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void, + callbackfn: ( + value: CSSStyleValue[], + key: string, + parent: StylePropertyMapReadOnly + ) => void, thisArg?: any ): void; } @@ -25191,7 +26175,10 @@ interface StyleSheetRemovedEvent extends Event { declare var StyleSheetRemovedEvent: { prototype: StyleSheetRemovedEvent; - new (type: string, eventInitDict?: StyleSheetRemovedEventInit): StyleSheetRemovedEvent; + new ( + type: string, + eventInitDict?: StyleSheetRemovedEventInit + ): StyleSheetRemovedEvent; isInstance: IsInstance; }; @@ -25207,7 +26194,11 @@ declare var SubmitEvent: { /** Available only in secure contexts. */ interface SubtleCrypto { - decrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise; + decrypt( + algorithm: AlgorithmIdentifier, + key: CryptoKey, + data: BufferSource + ): Promise; deriveBits( algorithm: AlgorithmIdentifier, baseKey: CryptoKey, @@ -25221,7 +26212,11 @@ interface SubtleCrypto { keyUsages: KeyUsage[] ): Promise; digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; - encrypt(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise; + encrypt( + algorithm: AlgorithmIdentifier, + key: CryptoKey, + data: BufferSource + ): Promise; exportKey(format: KeyFormat, key: CryptoKey): Promise; generateKey( algorithm: AlgorithmIdentifier, @@ -25235,7 +26230,11 @@ interface SubtleCrypto { extractable: boolean, keyUsages: KeyUsage[] ): Promise; - sign(algorithm: AlgorithmIdentifier, key: CryptoKey, data: BufferSource): Promise; + sign( + algorithm: AlgorithmIdentifier, + key: CryptoKey, + data: BufferSource + ): Promise; unwrapKey( format: KeyFormat, wrappedKey: BufferSource, @@ -25311,7 +26310,11 @@ interface TCPServerSocket extends EventTarget { declare var TCPServerSocket: { prototype: TCPServerSocket; - new (port: number, options?: ServerSocketOptions, backlog?: number): TCPServerSocket; + new ( + port: number, + options?: ServerSocketOptions, + backlog?: number + ): TCPServerSocket; isInstance: IsInstance; }; @@ -25321,7 +26324,10 @@ interface TCPServerSocketEvent extends Event { declare var TCPServerSocketEvent: { prototype: TCPServerSocketEvent; - new (type: string, eventInitDict?: TCPServerSocketEventInit): TCPServerSocketEvent; + new ( + type: string, + eventInitDict?: TCPServerSocketEventInit + ): TCPServerSocketEvent; isInstance: IsInstance; }; @@ -25389,7 +26395,10 @@ interface TCPSocketErrorEvent extends Event { declare var TCPSocketErrorEvent: { prototype: TCPSocketErrorEvent; - new (type: string, eventInitDict?: TCPSocketErrorEventInit): TCPSocketErrorEvent; + new ( + type: string, + eventInitDict?: TCPSocketErrorEventInit + ): TCPSocketErrorEvent; isInstance: IsInstance; }; @@ -25556,7 +26565,9 @@ interface TestInterfaceAsyncIterableSingle {} declare var TestInterfaceAsyncIterableSingle: { prototype: TestInterfaceAsyncIterableSingle; - new (options?: TestInterfaceAsyncIterableSingleOptions): TestInterfaceAsyncIterableSingle; + new ( + options?: TestInterfaceAsyncIterableSingleOptions + ): TestInterfaceAsyncIterableSingle; isInstance: IsInstance; }; @@ -25573,7 +26584,11 @@ declare var TestInterfaceAsyncIterableSingleWithArgs: { interface TestInterfaceIterableDouble { forEach( - callbackfn: (value: string, key: string, parent: TestInterfaceIterableDouble) => void, + callbackfn: ( + value: string, + key: string, + parent: TestInterfaceIterableDouble + ) => void, thisArg?: any ): void; } @@ -25604,7 +26619,11 @@ declare var TestInterfaceIterableDoubleUnion: { interface TestInterfaceIterableSingle { readonly length: number; forEach( - callbackfn: (value: number, key: number, parent: TestInterfaceIterableSingle) => void, + callbackfn: ( + value: number, + key: number, + parent: TestInterfaceIterableSingle + ) => void, thisArg?: any ): void; [index: number]: number; @@ -25633,8 +26652,12 @@ interface TestInterfaceJS extends EventTarget { getDictionaryAttr(): TestInterfaceJSDictionary; objectSequenceLength(seq: any[]): number; pingPongAny(arg: any): any; - pingPongDictionary(dict?: TestInterfaceJSDictionary): TestInterfaceJSDictionary; - pingPongDictionaryOrLong(dictOrLong?: TestInterfaceJSUnionableDictionary | number): number; + pingPongDictionary( + dict?: TestInterfaceJSDictionary + ): TestInterfaceJSDictionary; + pingPongDictionaryOrLong( + dictOrLong?: TestInterfaceJSUnionableDictionary | number + ): number; pingPongNullableUnion( something: TestInterfaceJS | number | null ): TestInterfaceJS | number | null; @@ -25642,7 +26665,9 @@ interface TestInterfaceJS extends EventTarget { pingPongObjectOrString(objOrString: any): any; pingPongRecord(rec: Record): string; pingPongUnion(something: TestInterfaceJS | number): TestInterfaceJS | number; - pingPongUnionContainingNull(something: TestInterfaceJS | string): string | TestInterfaceJS; + pingPongUnionContainingNull( + something: TestInterfaceJS | string + ): string | TestInterfaceJS; returnBadUnion(): Location | TestInterfaceJS; setDictionaryAttr(dict?: TestInterfaceJSDictionary): void; testPromiseWithDOMExceptionThrowingPromiseInit(): Promise; @@ -25687,7 +26712,11 @@ interface TestInterfaceJS extends EventTarget { declare var TestInterfaceJS: { prototype: TestInterfaceJS; - new (anyArg?: any, objectArg?: any, dictionaryArg?: TestInterfaceJSDictionary): TestInterfaceJS; + new ( + anyArg?: any, + objectArg?: any, + dictionaryArg?: TestInterfaceJSDictionary + ): TestInterfaceJS; isInstance: IsInstance; }; @@ -25706,7 +26735,11 @@ interface TestInterfaceMaplike { hasInternal(aKey: string): boolean; setInternal(aKey: string, aValue: number): void; forEach( - callbackfn: (value: number, key: string, parent: TestInterfaceMaplike) => void, + callbackfn: ( + value: number, + key: string, + parent: TestInterfaceMaplike + ) => void, thisArg?: any ): void; } @@ -25724,7 +26757,11 @@ interface TestInterfaceMaplikeJSObject { hasInternal(aKey: string): boolean; setInternal(aKey: string, aObject: any): void; forEach( - callbackfn: (value: any, key: string, parent: TestInterfaceMaplikeJSObject) => void, + callbackfn: ( + value: any, + key: string, + parent: TestInterfaceMaplikeJSObject + ) => void, thisArg?: any ): void; } @@ -25770,7 +26807,10 @@ interface TestInterfaceObservableArray { interfaceElementAtInternal(index: number): TestInterfaceObservableArray; interfaceLengthInternal(): number; interfaceRemoveLastElementInternal(): void; - interfaceReplaceElementAtInternal(index: number, value: TestInterfaceObservableArray): void; + interfaceReplaceElementAtInternal( + index: number, + value: TestInterfaceObservableArray + ): void; objectAppendElementInternal(value: any): void; objectElementAtInternal(index: number): any; objectLengthInternal(): number; @@ -25786,7 +26826,11 @@ declare var TestInterfaceObservableArray: { interface TestInterfaceSetlike { forEach( - callbackfn: (value: string, key: string, parent: TestInterfaceSetlike) => void, + callbackfn: ( + value: string, + key: string, + parent: TestInterfaceSetlike + ) => void, thisArg?: any ): void; } @@ -25799,7 +26843,11 @@ declare var TestInterfaceSetlike: { interface TestInterfaceSetlikeNode { forEach( - callbackfn: (value: Node, key: Node, parent: TestInterfaceSetlikeNode) => void, + callbackfn: ( + value: Node, + key: Node, + parent: TestInterfaceSetlikeNode + ) => void, thisArg?: any ): void; } @@ -25892,7 +26940,10 @@ declare var TextDecoderStream: { interface TextEncoder extends TextEncoderCommon { encode(input?: string): Uint8Array; - encodeInto(source: JSString, destination: Uint8Array): TextEncoderEncodeIntoResult; + encodeInto( + source: JSString, + destination: Uint8Array + ): TextEncoderEncodeIntoResult; } declare var TextEncoder: { @@ -26192,7 +27243,10 @@ interface TouchEventHandlers { ontouchstart: ((this: TouchEventHandlers, ev: Event) => any) | null; addEventListener( type: K, - listener: (this: TouchEventHandlers, ev: TouchEventHandlersEventMap[K]) => any, + listener: ( + this: TouchEventHandlers, + ev: TouchEventHandlersEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -26202,7 +27256,10 @@ interface TouchEventHandlers { ): void; removeEventListener( type: K, - listener: (this: TouchEventHandlers, ev: TouchEventHandlersEventMap[K]) => any, + listener: ( + this: TouchEventHandlers, + ev: TouchEventHandlersEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -26340,10 +27397,18 @@ declare var TreeContentView: { interface TreeView { readonly rowCount: number; selection: nsITreeSelection | null; - canDrop(row: number, orientation: number, dataTransfer: DataTransfer | null): boolean; + canDrop( + row: number, + orientation: number, + dataTransfer: DataTransfer | null + ): boolean; cycleCell(row: number, column: TreeColumn): void; cycleHeader(column: TreeColumn): void; - drop(row: number, orientation: number, dataTransfer: DataTransfer | null): void; + drop( + row: number, + orientation: number, + dataTransfer: DataTransfer | null + ): void; getCellProperties(row: number, column: TreeColumn): string; getCellText(row: number, column: TreeColumn): string; getCellValue(row: number, column: TreeColumn): string; @@ -26439,14 +27504,21 @@ interface TrustedTypePolicyFactory { readonly defaultPolicy: TrustedTypePolicy | null; readonly emptyHTML: TrustedHTML; readonly emptyScript: TrustedScript; - createPolicy(policyName: string, policyOptions?: TrustedTypePolicyOptions): TrustedTypePolicy; + createPolicy( + policyName: string, + policyOptions?: TrustedTypePolicyOptions + ): TrustedTypePolicy; getAttributeType( tagName: string, attribute: string, elementNs?: string | null, attrNs?: string | null ): string | null; - getPropertyType(tagName: string, property: string, elementNs?: string | null): string | null; + getPropertyType( + tagName: string, + property: string, + elementNs?: string | null + ): string | null; isHTML(value: any): boolean; isScript(value: any): boolean; isScriptURL(value: any): boolean; @@ -26597,7 +27669,11 @@ interface URLPattern { declare var URLPattern: { prototype: URLPattern; - new (input: URLPatternInput, baseURL: string, options?: URLPatternOptions): URLPattern; + new ( + input: URLPatternInput, + baseURL: string, + options?: URLPatternOptions + ): URLPattern; new (input?: URLPatternInput, options?: URLPatternOptions): URLPattern; isInstance: IsInstance; }; @@ -26649,7 +27725,10 @@ interface UserProximityEvent extends Event { declare var UserProximityEvent: { prototype: UserProximityEvent; - new (type: string, eventInitDict?: UserProximityEventInit): UserProximityEvent; + new ( + type: string, + eventInitDict?: UserProximityEventInit + ): UserProximityEvent; isInstance: IsInstance; }; @@ -26804,7 +27883,12 @@ interface VRMockDisplay { downDegree: number, leftDegree: number ): void; - setEyeOffset(eye: VREye, offsetX: number, offsetY: number, offsetZ: number): void; + setEyeOffset( + eye: VREye, + offsetX: number, + offsetY: number, + offsetZ: number + ): void; setEyeResolution(renderWidth: number, renderHeight: number): void; setMounted(mounted: boolean): void; setPose( @@ -26856,7 +27940,11 @@ interface VRServiceTest { stopTimer(): void; timeout(duration: number): void; wait(duration: number): void; - waitHapticIntensity(controllerIdx: number, hapticIdx: number, intensity: number): void; + waitHapticIntensity( + controllerIdx: number, + hapticIdx: number, + intensity: number + ): void; waitPresentationEnd(): void; waitPresentationStart(): void; waitSubmit(): void; @@ -27369,7 +28457,11 @@ interface WEBGL_provoking_vertex { /** Available only in secure contexts. */ interface WGSLLanguageFeatures { forEach( - callbackfn: (value: string, key: string, parent: WGSLLanguageFeatures) => void, + callbackfn: ( + value: string, + key: string, + parent: WGSLLanguageFeatures + ) => void, thisArg?: any ): void; } @@ -27519,7 +28611,8 @@ declare var WebExtensionPolicy: { isRestrictedURI(uri: URI): boolean; }; -interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGLRenderingContextBase {} +interface WebGL2RenderingContext + extends WebGL2RenderingContextBase, WebGLRenderingContextBase {} declare var WebGL2RenderingContext: { prototype: WebGL2RenderingContext; @@ -28089,7 +29182,11 @@ declare var WebGL2RenderingContext: { interface WebGL2RenderingContextBase { beginQuery(target: GLenum, query: WebGLQuery): void; beginTransformFeedback(primitiveMode: GLenum): void; - bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void; + bindBufferBase( + target: GLenum, + index: GLuint, + buffer: WebGLBuffer | null + ): void; bindBufferRange( target: GLenum, index: GLuint, @@ -28098,7 +29195,10 @@ interface WebGL2RenderingContextBase { size: GLsizeiptr ): void; bindSampler(unit: GLuint, sampler: WebGLSampler | null): void; - bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void; + bindTransformFeedback( + target: GLenum, + tf: WebGLTransformFeedback | null + ): void; bindVertexArray(array: WebGLVertexArrayObject | null): void; blitFramebuffer( srcX0: GLint, @@ -28122,7 +29222,11 @@ interface WebGL2RenderingContextBase { srcOffset: GLuint, length?: GLuint ): void; - bufferSubData(target: GLenum, offset: GLintptr, srcData: AllowSharedBufferSource): void; + bufferSubData( + target: GLenum, + offset: GLintptr, + srcData: AllowSharedBufferSource + ): void; bufferSubData( target: GLenum, dstByteOffset: GLintptr, @@ -28130,10 +29234,30 @@ interface WebGL2RenderingContextBase { srcOffset: GLuint, length?: GLuint ): void; - clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void; - clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void; - clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void; - clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void; + clearBufferfi( + buffer: GLenum, + drawbuffer: GLint, + depth: GLfloat, + stencil: GLint + ): void; + clearBufferfv( + buffer: GLenum, + drawbuffer: GLint, + values: Float32List, + srcOffset?: GLuint + ): void; + clearBufferiv( + buffer: GLenum, + drawbuffer: GLint, + values: Int32List, + srcOffset?: GLuint + ): void; + clearBufferuiv( + buffer: GLenum, + drawbuffer: GLint, + values: Uint32List, + srcOffset?: GLuint + ): void; clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum; compressedTexImage2D( target: GLenum, @@ -28256,7 +29380,12 @@ interface WebGL2RenderingContextBase { deleteSync(sync: WebGLSync | null): void; deleteTransformFeedback(tf: WebGLTransformFeedback | null): void; deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void; - drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void; + drawArraysInstanced( + mode: GLenum, + first: GLint, + count: GLsizei, + instanceCount: GLsizei + ): void; drawBuffers(buffers: GLenum[]): void; drawElementsInstanced( mode: GLenum, @@ -28283,13 +29412,20 @@ interface WebGL2RenderingContextBase { level: GLint, layer: GLint ): void; - getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null; + getActiveUniformBlockName( + program: WebGLProgram, + uniformBlockIndex: GLuint + ): string | null; getActiveUniformBlockParameter( program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum ): any; - getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any; + getActiveUniforms( + program: WebGLProgram, + uniformIndices: GLuint[], + pname: GLenum + ): any; getBufferSubData( target: GLenum, srcByteOffset: GLintptr, @@ -28299,14 +29435,24 @@ interface WebGL2RenderingContextBase { ): void; getFragDataLocation(program: WebGLProgram, name: string): GLint; getIndexedParameter(target: GLenum, index: GLuint): any; - getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any; + getInternalformatParameter( + target: GLenum, + internalformat: GLenum, + pname: GLenum + ): any; getQuery(target: GLenum, pname: GLenum): any; getQueryParameter(query: WebGLQuery, pname: GLenum): any; getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any; getSyncParameter(sync: WebGLSync, pname: GLenum): any; - getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null; + getTransformFeedbackVarying( + program: WebGLProgram, + index: GLuint + ): WebGLActiveInfo | null; getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint; - getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null; + getUniformIndices( + program: WebGLProgram, + uniformNames: string[] + ): GLuint[] | null; invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void; invalidateSubFramebuffer( target: GLenum, @@ -28956,7 +30102,11 @@ interface WebGL2RenderingContextBase { srcData: ArrayBufferView | null, srcOffset?: GLuint ): void; - transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void; + transformFeedbackVaryings( + program: WebGLProgram, + varyings: string[], + bufferMode: GLenum + ): void; uniform1fv( location: WebGLUniformLocation | null, data: Float32List, @@ -28988,7 +30138,11 @@ interface WebGL2RenderingContextBase { srcOffset?: GLuint, srcLength?: GLuint ): void; - uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void; + uniform2ui( + location: WebGLUniformLocation | null, + v0: GLuint, + v1: GLuint + ): void; uniform2uiv( location: WebGLUniformLocation | null, data: Uint32List, @@ -29007,7 +30161,12 @@ interface WebGL2RenderingContextBase { srcOffset?: GLuint, srcLength?: GLuint ): void; - uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void; + uniform3ui( + location: WebGLUniformLocation | null, + v0: GLuint, + v1: GLuint, + v2: GLuint + ): void; uniform3uiv( location: WebGLUniformLocation | null, data: Uint32List, @@ -29110,7 +30269,13 @@ interface WebGL2RenderingContextBase { vertexAttribDivisor(index: GLuint, divisor: GLuint): void; vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void; vertexAttribI4iv(index: GLuint, values: Int32List): void; - vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void; + vertexAttribI4ui( + index: GLuint, + x: GLuint, + y: GLuint, + z: GLuint, + w: GLuint + ): void; vertexAttribI4uiv(index: GLuint, values: Uint32List): void; vertexAttribIPointer( index: GLuint, @@ -29451,7 +30616,11 @@ interface WebGLRenderingContext extends WebGLRenderingContextBase { bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void; bufferData(target: GLenum, data: ArrayBuffer | null, usage: GLenum): void; bufferData(target: GLenum, data: ArrayBufferView, usage: GLenum): void; - bufferSubData(target: GLenum, offset: GLintptr, data: AllowSharedBufferSource): void; + bufferSubData( + target: GLenum, + offset: GLintptr, + data: AllowSharedBufferSource + ): void; compressedTexImage2D( target: GLenum, level: GLint, @@ -29959,19 +31128,32 @@ interface WebGLRenderingContextBase { bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void; bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void; bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void; - bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void; + bindRenderbuffer( + target: GLenum, + renderbuffer: WebGLRenderbuffer | null + ): void; bindTexture(target: GLenum, texture: WebGLTexture | null): void; blendColor(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat): void; blendEquation(mode: GLenum): void; blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void; blendFunc(sfactor: GLenum, dfactor: GLenum): void; - blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void; + blendFuncSeparate( + srcRGB: GLenum, + dstRGB: GLenum, + srcAlpha: GLenum, + dstAlpha: GLenum + ): void; checkFramebufferStatus(target: GLenum): GLenum; clear(mask: GLbitfield): void; clearColor(red: GLfloat, green: GLfloat, blue: GLfloat, alpha: GLfloat): void; clearDepth(depth: GLclampf): void; clearStencil(s: GLint): void; - colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void; + colorMask( + red: GLboolean, + green: GLboolean, + blue: GLboolean, + alpha: GLboolean + ): void; compileShader(shader: WebGLShader): void; copyTexImage2D( target: GLenum, @@ -30013,7 +31195,12 @@ interface WebGLRenderingContextBase { disable(cap: GLenum): void; disableVertexAttribArray(index: GLuint): void; drawArrays(mode: GLenum, first: GLint, count: GLsizei): void; - drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void; + drawElements( + mode: GLenum, + count: GLsizei, + type: GLenum, + offset: GLintptr + ): void; enable(cap: GLenum): void; enableVertexAttribArray(index: GLuint): void; finish(): void; @@ -30034,14 +31221,21 @@ interface WebGLRenderingContextBase { frontFace(mode: GLenum): void; generateMipmap(target: GLenum): void; getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null; - getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null; + getActiveUniform( + program: WebGLProgram, + index: GLuint + ): WebGLActiveInfo | null; getAttachedShaders(program: WebGLProgram): WebGLShader[] | null; getAttribLocation(program: WebGLProgram, name: string): GLint; getBufferParameter(target: GLenum, pname: GLenum): any; getContextAttributes(): WebGLContextAttributes | null; getError(): GLenum; getExtension(name: string): any; - getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any; + getFramebufferAttachmentParameter( + target: GLenum, + attachment: GLenum, + pname: GLenum + ): any; getParameter(pname: GLenum): any; getProgramInfoLog(program: WebGLProgram): string | null; getProgramParameter(program: WebGLProgram, pname: GLenum): any; @@ -30056,7 +31250,10 @@ interface WebGLRenderingContextBase { getSupportedExtensions(): string[] | null; getTexParameter(target: GLenum, pname: GLenum): any; getUniform(program: WebGLProgram, location: WebGLUniformLocation): any; - getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null; + getUniformLocation( + program: WebGLProgram, + name: string + ): WebGLUniformLocation | null; getVertexAttrib(index: GLuint, pname: GLenum): any; getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr; hint(target: GLenum, mode: GLenum): void; @@ -30083,19 +31280,43 @@ interface WebGLRenderingContextBase { scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; shaderSource(shader: WebGLShader, source: string): void; stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void; - stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void; + stencilFuncSeparate( + face: GLenum, + func: GLenum, + ref: GLint, + mask: GLuint + ): void; stencilMask(mask: GLuint): void; stencilMaskSeparate(face: GLenum, mask: GLuint): void; stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void; - stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void; + stencilOpSeparate( + face: GLenum, + fail: GLenum, + zfail: GLenum, + zpass: GLenum + ): void; texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void; texParameteri(target: GLenum, pname: GLenum, param: GLint): void; uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void; uniform1i(location: WebGLUniformLocation | null, x: GLint): void; - uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void; + uniform2f( + location: WebGLUniformLocation | null, + x: GLfloat, + y: GLfloat + ): void; uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void; - uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void; - uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void; + uniform3f( + location: WebGLUniformLocation | null, + x: GLfloat, + y: GLfloat, + z: GLfloat + ): void; + uniform3i( + location: WebGLUniformLocation | null, + x: GLint, + y: GLint, + z: GLint + ): void; uniform4f( location: WebGLUniformLocation | null, x: GLfloat, @@ -30103,7 +31324,13 @@ interface WebGLRenderingContextBase { z: GLfloat, w: GLfloat ): void; - uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void; + uniform4i( + location: WebGLUniformLocation | null, + x: GLint, + y: GLint, + z: GLint, + w: GLint + ): void; useProgram(program: WebGLProgram | null): void; validateProgram(program: WebGLProgram): void; vertexAttrib1f(indx: GLuint, x: GLfloat): void; @@ -30112,7 +31339,13 @@ interface WebGLRenderingContextBase { vertexAttrib2fv(indx: GLuint, values: Float32List): void; vertexAttrib3f(indx: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void; vertexAttrib3fv(indx: GLuint, values: Float32List): void; - vertexAttrib4f(indx: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void; + vertexAttrib4f( + indx: GLuint, + x: GLfloat, + y: GLfloat, + z: GLfloat, + w: GLfloat + ): void; vertexAttrib4fv(indx: GLuint, values: Float32List): void; vertexAttribPointer( indx: GLuint, @@ -30567,7 +31800,9 @@ interface WebTransport { createBidirectionalStream( options?: WebTransportSendStreamOptions ): Promise; - createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise; + createUnidirectionalStream( + options?: WebTransportSendStreamOptions + ): Promise; getStats(): Promise; } @@ -30664,7 +31899,8 @@ declare var WheelEvent: { }; interface WindowEventMap - extends GlobalEventHandlersEventMap, + extends + GlobalEventHandlersEventMap, OnErrorEventHandlerForWindowEventMap, TouchEventHandlersEventMap, WindowEventHandlersEventMap { @@ -30682,7 +31918,8 @@ interface WindowEventMap } interface Window - extends EventTarget, + extends + EventTarget, AnimationFrameProvider, GlobalCrypto, GlobalEventHandlers, @@ -30800,8 +32037,14 @@ interface Window focus(): void; getAttention(): void; getAttentionWithCycleCount(aCycleCount: number): void; - getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleProperties | null; - getDefaultComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration | null; + getComputedStyle( + elt: Element, + pseudoElt?: string | null + ): CSSStyleProperties | null; + getDefaultComputedStyle( + elt: Element, + pseudoElt?: string + ): CSSStyleDeclaration | null; getGroupMessageManager(aGroup: string): ChromeMessageBroadcaster; getInterface(iid: any): any; getRegionalPrefsLocales(): string[]; @@ -30816,7 +32059,11 @@ interface Window moveToWorkspace(workspaceID: string): void; mozScrollSnap(): void; notifyDefaultButtonLoaded(defaultButton: Element): void; - open(url?: string | URL, target?: string, features?: string): WindowProxy | null; + open( + url?: string | URL, + target?: string, + features?: string + ): WindowProxy | null; openDialog( url?: string, name?: string, @@ -30831,10 +32078,15 @@ interface Window listener?: nsIWebProgressListener | null, docShellToPreviewInto?: nsIDocShell | null ): WindowProxy | null; - promiseDocumentFlushed(callback: PromiseDocumentFlushedCallback): Promise; + promiseDocumentFlushed( + callback: PromiseDocumentFlushedCallback + ): Promise; prompt(message?: string, _default?: string): string | null; releaseEvents(): void; - requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number; + requestIdleCallback( + callback: IdleRequestCallback, + options?: IdleRequestOptions + ): number; resizeBy(x: number, y: number): void; resizeTo(x: number, y: number): void; restore(): void; @@ -30964,7 +32216,10 @@ interface WindowEventHandlers { onunload: ((this: WindowEventHandlers, ev: Event) => any) | null; addEventListener( type: K, - listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, + listener: ( + this: WindowEventHandlers, + ev: WindowEventHandlersEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -30974,7 +32229,10 @@ interface WindowEventHandlers { ): void; removeEventListener( type: K, - listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, + listener: ( + this: WindowEventHandlers, + ev: WindowEventHandlersEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -31065,7 +32323,10 @@ interface WindowOrWorkerGlobalScope { btoa(btoa: string): string; clearInterval(handle?: number): void; clearTimeout(handle?: number): void; - createImageBitmap(aImage: ImageBitmapSource, aOptions?: ImageBitmapOptions): Promise; + createImageBitmap( + aImage: ImageBitmapSource, + aOptions?: ImageBitmapOptions + ): Promise; createImageBitmap( aImage: ImageBitmapSource, aSx: number, @@ -31078,8 +32339,16 @@ interface WindowOrWorkerGlobalScope { isRFPTargetActive(aTargetName: string): boolean; queueMicrotask(callback: VoidFunction): void; reportError(e: any): void; - setInterval(handler: TimerHandler, timeout?: number, ...unused: any[]): number; - setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; + setInterval( + handler: TimerHandler, + timeout?: number, + ...unused: any[] + ): number; + setTimeout( + handler: TimerHandler, + timeout?: number, + ...arguments: any[] + ): number; structuredClone(value: any, options?: StructuredSerializeOptions): any; } @@ -31320,7 +32589,10 @@ interface XMLHttpRequestEventTarget extends EventTarget { ontimeout: ((this: XMLHttpRequestEventTarget, ev: Event) => any) | null; addEventListener( type: K, - listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, + listener: ( + this: XMLHttpRequestEventTarget, + ev: XMLHttpRequestEventTargetEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -31330,7 +32602,10 @@ interface XMLHttpRequestEventTarget extends EventTarget { ): void; removeEventListener( type: K, - listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, + listener: ( + this: XMLHttpRequestEventTarget, + ev: XMLHttpRequestEventTargetEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -31349,7 +32624,10 @@ declare var XMLHttpRequestEventTarget: { interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget { addEventListener( type: K, - listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, + listener: ( + this: XMLHttpRequestUpload, + ev: XMLHttpRequestEventTargetEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -31359,7 +32637,10 @@ interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget { ): void; removeEventListener( type: K, - listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, + listener: ( + this: XMLHttpRequestUpload, + ev: XMLHttpRequestEventTargetEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -31376,7 +32657,11 @@ declare var XMLHttpRequestUpload: { }; interface XMLSerializer { - serializeToStream(root: Node, stream: OutputStream, charset: string | null): void; + serializeToStream( + root: Node, + stream: OutputStream, + charset: string | null + ): void; serializeToString(root: Node): string; } @@ -31395,7 +32680,10 @@ declare var XPathEvaluator: { }; interface XPathEvaluatorMixin { - createExpression(expression: string, resolver?: XPathNSResolver | null): XPathExpression; + createExpression( + expression: string, + resolver?: XPathNSResolver | null + ): XPathExpression; createNSResolver(nodeResolver: Node): Node; evaluate( expression: string, @@ -31466,7 +32754,10 @@ interface XRBoundedReferenceSpace extends XRReferenceSpace { readonly boundsGeometry: DOMPointReadOnly[]; addEventListener( type: K, - listener: (this: XRBoundedReferenceSpace, ev: XRReferenceSpaceEventMap[K]) => any, + listener: ( + this: XRBoundedReferenceSpace, + ev: XRReferenceSpaceEventMap[K] + ) => any, options?: boolean | AddEventListenerOptions ): void; addEventListener( @@ -31476,7 +32767,10 @@ interface XRBoundedReferenceSpace extends XRReferenceSpace { ): void; removeEventListener( type: K, - listener: (this: XRBoundedReferenceSpace, ev: XRReferenceSpaceEventMap[K]) => any, + listener: ( + this: XRBoundedReferenceSpace, + ev: XRReferenceSpaceEventMap[K] + ) => any, options?: boolean | EventListenerOptions ): void; removeEventListener( @@ -31525,7 +32819,11 @@ declare var XRInputSource: { interface XRInputSourceArray { readonly length: number; forEach( - callbackfn: (value: XRInputSource, key: number, parent: XRInputSourceArray) => void, + callbackfn: ( + value: XRInputSource, + key: number, + parent: XRInputSourceArray + ) => void, thisArg?: any ): void; [index: number]: XRInputSource; @@ -31558,7 +32856,10 @@ interface XRInputSourcesChangeEvent extends Event { declare var XRInputSourcesChangeEvent: { prototype: XRInputSourcesChangeEvent; - new (type: string, eventInitDict: XRInputSourcesChangeEventInit): XRInputSourcesChangeEvent; + new ( + type: string, + eventInitDict: XRInputSourcesChangeEventInit + ): XRInputSourcesChangeEvent; isInstance: IsInstance; }; @@ -31618,7 +32919,10 @@ interface XRReferenceSpaceEvent extends Event { declare var XRReferenceSpaceEvent: { prototype: XRReferenceSpaceEvent; - new (type: string, eventInitDict: XRReferenceSpaceEventInit): XRReferenceSpaceEvent; + new ( + type: string, + eventInitDict: XRReferenceSpaceEventInit + ): XRReferenceSpaceEvent; isInstance: IsInstance; }; @@ -31740,7 +33044,10 @@ interface XRSystemEventMap { interface XRSystem extends EventTarget { ondevicechange: ((this: XRSystem, ev: Event) => any) | null; isSessionSupported(mode: XRSessionMode): Promise; - requestSession(mode: XRSessionMode, options?: XRSessionInit): Promise; + requestSession( + mode: XRSessionMode, + options?: XRSessionInit + ): Promise; addEventListener( type: K, listener: (this: XRSystem, ev: XRSystemEventMap[K]) => any, @@ -31831,11 +33138,18 @@ declare var XRWebGLLayer: { interface XSLTProcessor { flags: number; clearParameters(): void; - getParameter(namespaceURI: string | null, localName: string): XSLTParameterValue | null; + getParameter( + namespaceURI: string | null, + localName: string + ): XSLTParameterValue | null; importStylesheet(style: Node): void; removeParameter(namespaceURI: string | null, localName: string): void; reset(): void; - setParameter(namespaceURI: string | null, localName: string, value: XSLTParameterValue): void; + setParameter( + namespaceURI: string | null, + localName: string, + value: XSLTParameterValue + ): void; transformToDocument(source: Node): Document; transformToFragment(source: Node, output: Document): DocumentFragment; readonly DISABLE_ALL_LOADS: 1; @@ -31879,13 +33193,15 @@ declare var XULCommandEvent: { }; interface XULElementEventMap - extends ElementEventMap, + extends + ElementEventMap, GlobalEventHandlersEventMap, OnErrorEventHandlerForNodesEventMap, TouchEventHandlersEventMap {} interface XULElement - extends Element, + extends + Element, ElementCSSInlineStyle, ElementOffsetAttributes, GlobalEventHandlers, @@ -32150,7 +33466,11 @@ interface XULTreeElement extends XULElement { ensureCellIsVisible(row: number, col: TreeColumn | null): void; ensureRowIsVisible(index: number): void; getCellAt(x: number, y: number): TreeCellInfo; - getCoordsForCellItem(row: number, col: TreeColumn, element: string): DOMRect | null; + getCoordsForCellItem( + row: number, + col: TreeColumn, + element: string + ): DOMRect | null; getFirstVisibleRow(): number; getLastVisibleRow(): number; getPageLength(): number; @@ -32275,19 +33595,29 @@ declare namespace ChromeUtils { var aliveUtilityProcesses: number; var domProcessChild: nsIDOMProcessChild | null; var recentJSDevError: any; - function CreateOriginAttributesFromOriginSuffix(suffix: string): OriginAttributesDictionary; + function CreateOriginAttributesFromOriginSuffix( + suffix: string + ): OriginAttributesDictionary; function addProfilerMarker( name: string, options?: ProfilerMarkerOptions | number, text?: string ): void; function androidMoveTaskToBack(): void; - function base64URLDecode(string: string, options: Base64URLDecodeOptions): ArrayBuffer; - function base64URLEncode(source: BufferSource, options: Base64URLEncodeOptions): string; + function base64URLDecode( + string: string, + options: Base64URLDecodeOptions + ): ArrayBuffer; + function base64URLEncode( + source: BufferSource, + options: Base64URLEncodeOptions + ): string; function callFunctionAndLogException(targetGlobal: any, func: any): any; function clearBfcacheByPrincipal(principal: Principal): void; function clearMessagingLayerSecurityState(): void; - function clearMessagingLayerSecurityStateByPrincipal(principal: Principal): void; + function clearMessagingLayerSecurityStateByPrincipal( + principal: Principal + ): void; function clearMessagingLayerSecurityStateBySite( schemelessSite: string, pattern?: OriginAttributesPatternDictionary @@ -32307,7 +33637,9 @@ declare namespace ChromeUtils { loadingPrincipal: Principal ): ContentSecurityPolicy; function createError(message: string, stack?: any): any; - function createOriginAttributesFromOrigin(origin: string): OriginAttributesDictionary; + function createOriginAttributesFromOrigin( + origin: string + ): OriginAttributesDictionary; function dateNow(): number; function defineESModuleGetters( aTarget: any, @@ -32318,7 +33650,9 @@ declare namespace ChromeUtils { function enableAllPerfStatsFeatures(): void; function encodeURIForSrcset(uri: string): string; function endWheelTransaction(window: WindowProxy): Promise; - function ensureHeadlessContentProcess(aRemoteType: string): Promise; + function ensureHeadlessContentProcess( + aRemoteType: string + ): Promise; function ensureJSOracleStarted(): void; function fillNonDefaultOriginAttributes( originAttrs?: OriginAttributesDictionary @@ -32329,8 +33663,12 @@ declare namespace ChromeUtils { function getBaseDomainFromPartitionKey(partitionKey: string): string; function getCallerLocation(principal: Principal): any; function getClassName(obj: any, unwrap?: boolean): string; - function getFormAutofillConfidences(elements: Element[]): FormAutofillConfidences[]; - function getGMPContentDecryptionModuleInformation(): Promise; + function getFormAutofillConfidences( + elements: Element[] + ): FormAutofillConfidences[]; + function getGMPContentDecryptionModuleInformation(): Promise< + CDMInformation[] + >; function getGlobalWindowCommandEnabled(name: string): boolean | null; function getLibcConstants(): LibcConstants; function getObjectNodeId(obj: any): NodeId; @@ -32340,11 +33678,19 @@ declare namespace ChromeUtils { foreignContext?: boolean ): string; function getPopupControlState(): PopupBlockerState; - function getWMFContentDecryptionModuleInformation(): Promise; + function getWMFContentDecryptionModuleInformation(): Promise< + CDMInformation[] + >; function getXPCOMErrorName(aErrorCode: number): string; function hasReportingHeaderForOrigin(aOrigin: string): boolean; - function idleDispatch(callback: IdleRequestCallback, options?: IdleRequestOptions): void; - function importESModule(aResourceURI: string, aOptions?: ImportESModuleOptionsDictionary): any; + function idleDispatch( + callback: IdleRequestCallback, + options?: IdleRequestOptions + ): void; + function importESModule( + aResourceURI: string, + aOptions?: ImportESModuleOptionsDictionary + ): any; function isClassifierBlockingErrorCode(aError: number): boolean; function isDOMObject(obj: any, unwrap?: boolean): boolean; function isDarkBackground(element: Element): boolean; @@ -32365,11 +33711,19 @@ declare namespace ChromeUtils { originAttrs?: OriginAttributesDictionary, pattern?: OriginAttributesPatternDictionary ): boolean; - function originAttributesToSuffix(originAttrs?: OriginAttributesDictionary): string; + function originAttributesToSuffix( + originAttrs?: OriginAttributesDictionary + ): string; function privateNoteIntentionalCrash(): void; function readHeapSnapshot(filePath: string): HeapSnapshot; - function registerProcessActor(aName: string, aOptions?: ProcessActorOptions): void; - function registerWindowActor(aName: string, aOptions?: WindowActorOptions): void; + function registerProcessActor( + aName: string, + aOptions?: ProcessActorOptions + ): void; + function registerWindowActor( + aName: string, + aOptions?: WindowActorOptions + ): void; function releaseAssert(condition: boolean, message?: string): void; function requestProcInfo(): Promise; function resetLastExternalProtocolIframeAllowed(): void; @@ -32399,7 +33753,10 @@ declare namespace FuzzingFunctions { function memoryPressure(): void; function signalIPCReady(): void; function spinEventLoopFor(aMilliseconds: number): void; - function synthesizeKeyboardEvents(aKeyValue: string, aDictionary?: KeyboardEventInit): void; + function synthesizeKeyboardEvents( + aKeyValue: string, + aDictionary?: KeyboardEventInit + ): void; } declare namespace GPUBufferUsage {} @@ -32415,58 +33772,120 @@ declare namespace GPUTextureUsage {} declare namespace IOUtils { var profileBeforeChange: any; var sendTelemetry: any; - function computeHexDigest(path: string, method: HashAlgorithm): Promise; - function copy(sourcePath: string, destPath: string, options?: CopyOptions): Promise; + function computeHexDigest( + path: string, + method: HashAlgorithm + ): Promise; + function copy( + sourcePath: string, + destPath: string, + options?: CopyOptions + ): Promise; function createUniqueDirectory( parent: string, prefix: string, permissions?: number ): Promise; - function createUniqueFile(parent: string, prefix: string, permissions?: number): Promise; + function createUniqueFile( + parent: string, + prefix: string, + permissions?: number + ): Promise; function delMacXAttr(path: string, attr: string): Promise; function exists(path: string): Promise; - function getChildren(path: string, options?: GetChildrenOptions): Promise; + function getChildren( + path: string, + options?: GetChildrenOptions + ): Promise; function getDirectory(...components: string[]): Promise; function getFile(...components: string[]): Promise; function getMacXAttr(path: string, attr: string): Promise; function getWindowsAttributes(path: string): Promise; - function hasChildren(path: string, options?: HasChildrenOptions): Promise; + function hasChildren( + path: string, + options?: HasChildrenOptions + ): Promise; function hasMacXAttr(path: string, attr: string): Promise; - function makeDirectory(path: string, options?: MakeDirectoryOptions): Promise; - function move(sourcePath: string, destPath: string, options?: MoveOptions): Promise; + function makeDirectory( + path: string, + options?: MakeDirectoryOptions + ): Promise; + function move( + sourcePath: string, + destPath: string, + options?: MoveOptions + ): Promise; function read(path: string, opts?: ReadOptions): Promise; function readJSON(path: string, opts?: ReadUTF8Options): Promise; function readUTF8(path: string, opts?: ReadUTF8Options): Promise; function remove(path: string, options?: RemoveOptions): Promise; function setAccessTime(path: string, access?: number): Promise; - function setMacXAttr(path: string, attr: string, value: Uint8Array): Promise; - function setModificationTime(path: string, modification?: number): Promise; - function setPermissions(path: string, permissions: number, honorUmask?: boolean): Promise; + function setMacXAttr( + path: string, + attr: string, + value: Uint8Array + ): Promise; + function setModificationTime( + path: string, + modification?: number + ): Promise; + function setPermissions( + path: string, + permissions: number, + honorUmask?: boolean + ): Promise; function setWindowsAttributes( path: string, attrs?: WindowsFileAttributes, recursive?: boolean ): Promise; function stat(path: string): Promise; - function write(path: string, data: Uint8Array, options?: WriteOptions): Promise; - function writeJSON(path: string, value: any, options?: WriteOptions): Promise; - function writeUTF8(path: string, string: string, options?: WriteOptions): Promise; + function write( + path: string, + data: Uint8Array, + options?: WriteOptions + ): Promise; + function writeJSON( + path: string, + value: any, + options?: WriteOptions + ): Promise; + function writeUTF8( + path: string, + string: string, + options?: WriteOptions + ): Promise; } declare namespace InspectorUtils { - function addPseudoClassLock(element: Element, pseudoClass: string, enabled?: boolean): void; + function addPseudoClassLock( + element: Element, + pseudoClass: string, + enabled?: boolean + ): void; function clearPseudoClassLocks(element: Element): void; - function colorTo(fromColor: string, toColorSpace: string): InspectorColorToResult | null; + function colorTo( + fromColor: string, + toColorSpace: string + ): InspectorColorToResult | null; function colorToRGBA(colorString: string): InspectorRGBATuple | null; function containingBlockOf(element: Element): Element | null; function cssPropertyIsShorthand(property: string): boolean; - function cssPropertySupportsType(property: string, type: InspectorPropertyType): boolean; - function getAllStyleSheets(document: Document, documentOnly?: boolean): StyleSheet[]; + function cssPropertySupportsType( + property: string, + type: InspectorPropertyType + ): boolean; + function getAllStyleSheets( + document: Document, + documentOnly?: boolean + ): StyleSheet[]; function getBlockLineCounts(element: Element): number[] | null; function getCSSPropertyNames(options?: PropertyNamesOptions): string[]; function getCSSPropertyPrefs(): PropertyPref[]; function getCSSPseudoElementNames(): string[]; - function getCSSRegisteredProperties(document: Document): InspectorCSSPropertyDefinition[]; + function getCSSRegisteredProperties( + document: Document + ): InspectorCSSPropertyDefinition[]; function getCSSRegisteredProperty( document: Document, name: string @@ -32486,8 +33905,14 @@ declare namespace InspectorUtils { withStartingStyle?: boolean ): (CSSRule | InspectorDeclaration)[]; function getOverflowingChildrenOfElement(element: Element): NodeList; - function getParentForNode(node: Node, showingAnonymousContent: boolean): Node | null; - function getRegisteredCssHighlights(document: Document, activeOnly?: boolean): string[]; + function getParentForNode( + node: Node, + showingAnonymousContent: boolean + ): Node | null; + function getRegisteredCssHighlights( + document: Document, + activeOnly?: boolean + ): string[]; function getRelativeRuleLine(rule: CSSRule): number; function getRuleBodyText(initialText: string): string | null; function getRuleColumn(rule: CSSRule): number; @@ -32506,7 +33931,10 @@ declare namespace InspectorUtils { function hasRulesModifiedByCSSOM(sheet: CSSStyleSheet): boolean; function hsvToRgb(h: number, s: number, v: number): number[] | Float32Array; function isBlockContainer(element: Element): boolean; - function isCustomElementName(name: string | null, namespaceURI: string | null): boolean; + function isCustomElementName( + name: string | null, + namespaceURI: string | null + ): boolean; function isElementThemed(element: Element): boolean; function isIgnorableWhitespace(dataNode: CharacterData): boolean; function isInheritedProperty(document: Document, property: string): boolean; @@ -32528,12 +33956,26 @@ declare namespace InspectorUtils { ): string | null; function rgbToColorName(r: number, g: number, b: number): string; function rgbToHsv(r: number, g: number, b: number): number[] | Float32Array; - function rgbToNearestColorName(r: number, g: number, b: number): InspectorNearestColor; + function rgbToNearestColorName( + r: number, + g: number, + b: number + ): InspectorNearestColor; function setContentState(element: Element, state: number): boolean; - function setDynamicToolbarMaxHeight(aContext: BrowsingContext | null, aHeight: number): void; - function setVerticalClipping(aContext: BrowsingContext | null, aOffset: number): void; + function setDynamicToolbarMaxHeight( + aContext: BrowsingContext | null, + aHeight: number + ): void; + function setVerticalClipping( + aContext: BrowsingContext | null, + aOffset: number + ): void; function supports(conditionText: string, options?: SupportsOptions): boolean; - function valueMatchesSyntax(document: Document, value: string, syntax: string): boolean; + function valueMatchesSyntax( + document: Document, + value: string, + syntax: string + ): boolean; } declare namespace L10nOverlays { @@ -32544,7 +33986,10 @@ declare namespace L10nOverlays { } declare namespace MediaControlService { - function generateMediaControlKey(aKey: MediaControlKey, aSeekValue?: number): void; + function generateMediaControlKey( + aKey: MediaControlKey, + aSeekValue?: number + ): void; function getCurrentActiveMediaMetadata(): MediaMetadataInit; function getCurrentMediaSessionPlaybackState(): MediaSessionPlaybackState; } @@ -32571,18 +34016,33 @@ declare namespace PathUtils { function normalize(path: string): string; function parent(path: string, depth?: number): string | null; function split(path: string): string[]; - function splitRelative(path: string, options?: SplitRelativeOptions): string[]; + function splitRelative( + path: string, + options?: SplitRelativeOptions + ): string[]; function toExtendedWindowsPath(path: string): string; function toFileURI(path: string): string; } declare namespace PlacesObservers { var counts: PlacesEventCounts; - function addListener(eventTypes: PlacesEventType[], listener: PlacesEventCallback): void; - function addListener(eventTypes: PlacesEventType[], listener: PlacesWeakCallbackWrapper): void; + function addListener( + eventTypes: PlacesEventType[], + listener: PlacesEventCallback + ): void; + function addListener( + eventTypes: PlacesEventType[], + listener: PlacesWeakCallbackWrapper + ): void; function notifyListeners(events: PlacesEvent[]): void; - function removeListener(eventTypes: PlacesEventType[], listener: PlacesEventCallback): void; - function removeListener(eventTypes: PlacesEventType[], listener: PlacesWeakCallbackWrapper): void; + function removeListener( + eventTypes: PlacesEventType[], + listener: PlacesEventCallback + ): void; + function removeListener( + eventTypes: PlacesEventType[], + listener: PlacesWeakCallbackWrapper + ): void; } declare namespace PromiseDebugging { @@ -32592,7 +34052,9 @@ declare namespace PromiseDebugging { function getPromiseID(p: any): string; function getRejectionStack(p: any): any; function getState(p: any): PromiseDebuggingStateHolder; - function removeUncaughtRejectionObserver(o: UncaughtRejectionObserver): boolean; + function removeUncaughtRejectionObserver( + o: UncaughtRejectionObserver + ): boolean; } declare namespace SessionStoreUtils { @@ -32622,7 +34084,10 @@ declare namespace SessionStoreUtils { useCapture: boolean, mozSystemGroup?: boolean ): void; - function restoreDocShellCapabilities(docShell: nsIDocShell, disallowCapabilities: string): void; + function restoreDocShellCapabilities( + docShell: nsIDocShell, + disallowCapabilities: string + ): void; function restoreDocShellState( browsingContext: CanonicalBrowsingContext, url: string | null, @@ -32653,8 +34118,14 @@ declare namespace UniFFIScaffolding { id: UniFFIFunctionId, ...args: UniFFIScaffoldingValue[] ): UniFFIScaffoldingCallResult; - function deregisterCallbackHandler(interfaceId: UniFFICallbackInterfaceId): void; - function readPointer(id: UniFFIPointerId, buff: ArrayBuffer, position: number): UniFFIPointer; + function deregisterCallbackHandler( + interfaceId: UniFFICallbackInterfaceId + ): void; + function readPointer( + id: UniFFIPointerId, + buff: ArrayBuffer, + position: number + ): UniFFIPointer; function registerCallbackHandler( interfaceId: UniFFICallbackInterfaceId, handler: UniFFICallbackHandler @@ -32680,10 +34151,18 @@ declare namespace WebrtcGlobalInformation { var aecDebugLogDir: string; function clearAllStats(): void; function clearLogging(): void; - function getAllStats(callback: WebrtcGlobalStatisticsCallback, pcIdFilter?: string): void; - function getLogging(pattern: string, callback: WebrtcGlobalLoggingCallback): void; + function getAllStats( + callback: WebrtcGlobalStatisticsCallback, + pcIdFilter?: string + ): void; + function getLogging( + pattern: string, + callback: WebrtcGlobalLoggingCallback + ): void; function getMediaContext(): WebrtcGlobalMediaContext; - function getStatsHistoryPcIds(callback: WebrtcGlobalStatisticsHistoryPcIdsCallback): void; + function getStatsHistoryPcIds( + callback: WebrtcGlobalStatisticsHistoryPcIdsCallback + ): void; function getStatsHistorySince( callback: WebrtcGlobalStatisticsHistoryCallback, pcIdFilter: string, @@ -32862,7 +34341,13 @@ interface OnBeforeUnloadEventHandlerNonNull { } interface OnErrorEventHandlerNonNull { - (event: Event | string, source?: string, lineno?: number, column?: number, error?: any): any; + ( + event: Event | string, + source?: string, + lineno?: number, + column?: number, + error?: any + ): any; } interface PeerConnectionLifecycleCallback { @@ -32993,7 +34478,12 @@ interface XRFrameRequestCallback { } interface mozPacketCallback { - (level: number, type: mozPacketDumpType, sending: boolean, packet: ArrayBuffer): void; + ( + level: number, + type: mozPacketDumpType, + sending: boolean, + packet: ArrayBuffer + ): void; } interface HTMLElementTagNameMap { @@ -33144,7 +34634,10 @@ interface MathMLElementTagNameMap {} /** @deprecated Directly use HTMLElementTagNameMap or SVGElementTagNameMap as appropriate, instead. */ type ElementTagNameMap = HTMLElementTagNameMap & - Pick>; + Pick< + SVGElementTagNameMap, + Exclude + >; declare let Audio: { new (src?: string): HTMLAudioElement; @@ -33212,7 +34705,8 @@ declare let navigator: Navigator; declare let ondevicelight: ((this: Window, ev: Event) => any) | null; declare let ondevicemotion: ((this: Window, ev: Event) => any) | null; declare let ondeviceorientation: ((this: Window, ev: Event) => any) | null; -declare let ondeviceorientationabsolute: ((this: Window, ev: Event) => any) | null; +declare let ondeviceorientationabsolute: + ((this: Window, ev: Event) => any) | null; declare let onorientationchange: ((this: Window, ev: Event) => any) | null; declare let onuserproximity: ((this: Window, ev: Event) => any) | null; declare let onvrdisplayactivate: ((this: Window, ev: Event) => any) | null; @@ -33285,7 +34779,9 @@ declare function getDefaultComputedStyle( elt: Element, pseudoElt?: string ): CSSStyleDeclaration | null; -declare function getGroupMessageManager(aGroup: string): ChromeMessageBroadcaster; +declare function getGroupMessageManager( + aGroup: string +): ChromeMessageBroadcaster; declare function getInterface(iid: any): any; declare function getRegionalPrefsLocales(): string[]; declare function getSelection(): Selection | null; @@ -33299,22 +34795,35 @@ declare function moveTo(x: number, y: number): void; declare function moveToWorkspace(workspaceID: string): void; declare function mozScrollSnap(): void; declare function notifyDefaultButtonLoaded(defaultButton: Element): void; -declare function open(url?: string | URL, target?: string, features?: string): WindowProxy | null; +declare function open( + url?: string | URL, + target?: string, + features?: string +): WindowProxy | null; declare function openDialog( url?: string, name?: string, options?: string, ...extraArguments: any[] ): WindowProxy | null; -declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void; -declare function postMessage(message: any, options?: WindowPostMessageOptions): void; +declare function postMessage( + message: any, + targetOrigin: string, + transfer?: any[] +): void; +declare function postMessage( + message: any, + options?: WindowPostMessageOptions +): void; declare function print(): void; declare function printPreview( settings?: nsIPrintSettings | null, listener?: nsIWebProgressListener | null, docShellToPreviewInto?: nsIDocShell | null ): WindowProxy | null; -declare function promiseDocumentFlushed(callback: PromiseDocumentFlushedCallback): Promise; +declare function promiseDocumentFlushed( + callback: PromiseDocumentFlushedCallback +): Promise; declare function prompt(message?: string, _default?: string): string | null; declare function releaseEvents(): void; declare function requestIdleCallback( @@ -33334,7 +34843,10 @@ declare function scrollTo(x: number, y: number): void; declare function scrollTo(options?: ScrollToOptions): void; declare function setCursor(cursor: string): void; declare function setResizable(resizable: boolean): void; -declare function setScrollMarks(marks: number[], onHorizontalScrollbar?: boolean): void; +declare function setScrollMarks( + marks: number[], + onHorizontalScrollbar?: boolean +): void; declare function shouldReportForServiceWorkerScope(aScope: string): boolean; declare function sizeToContent(constraints?: SizeToContentConstraints): void; declare function stop(): void; @@ -33372,7 +34884,8 @@ declare let onchange: ((this: Window, ev: Event) => any) | null; declare let onclick: ((this: Window, ev: Event) => any) | null; declare let onclose: ((this: Window, ev: Event) => any) | null; declare let oncommand: ((this: Window, ev: Event) => any) | null; -declare let oncontentvisibilityautostatechange: ((this: Window, ev: Event) => any) | null; +declare let oncontentvisibilityautostatechange: + ((this: Window, ev: Event) => any) | null; declare let oncontextlost: ((this: Window, ev: Event) => any) | null; declare let oncontextmenu: ((this: Window, ev: Event) => any) | null; declare let oncontextrestored: ((this: Window, ev: Event) => any) | null; @@ -33433,7 +34946,8 @@ declare let onreset: ((this: Window, ev: Event) => any) | null; declare let onresize: ((this: Window, ev: Event) => any) | null; declare let onscroll: ((this: Window, ev: Event) => any) | null; declare let onscrollend: ((this: Window, ev: Event) => any) | null; -declare let onsecuritypolicyviolation: ((this: Window, ev: Event) => any) | null; +declare let onsecuritypolicyviolation: + ((this: Window, ev: Event) => any) | null; declare let onseeked: ((this: Window, ev: Event) => any) | null; declare let onseeking: ((this: Window, ev: Event) => any) | null; declare let onselect: ((this: Window, ev: Event) => any) | null; @@ -33452,7 +34966,8 @@ declare let ontransitionstart: ((this: Window, ev: Event) => any) | null; declare let onvolumechange: ((this: Window, ev: Event) => any) | null; declare let onwaiting: ((this: Window, ev: Event) => any) | null; declare let onwebkitanimationend: ((this: Window, ev: Event) => any) | null; -declare let onwebkitanimationiteration: ((this: Window, ev: Event) => any) | null; +declare let onwebkitanimationiteration: + ((this: Window, ev: Event) => any) | null; declare let onwebkitanimationstart: ((this: Window, ev: Event) => any) | null; declare let onwebkittransitionend: ((this: Window, ev: Event) => any) | null; declare let onwheel: ((this: Window, ev: Event) => any) | null; @@ -33504,13 +35019,27 @@ declare function createImageBitmap( aSh: number, aOptions?: ImageBitmapOptions ): Promise; -declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise; +declare function fetch( + input: RequestInfo | URL, + init?: RequestInit +): Promise; declare function isRFPTargetActive(aTargetName: string): boolean; declare function queueMicrotask(callback: VoidFunction): void; declare function reportError(e: any): void; -declare function setInterval(handler: TimerHandler, timeout?: number, ...unused: any[]): number; -declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number; -declare function structuredClone(value: any, options?: StructuredSerializeOptions): any; +declare function setInterval( + handler: TimerHandler, + timeout?: number, + ...unused: any[] +): number; +declare function setTimeout( + handler: TimerHandler, + timeout?: number, + ...arguments: any[] +): number; +declare function structuredClone( + value: any, + options?: StructuredSerializeOptions +): any; declare let sessionStorage: Storage | null; declare function addEventListener( type: K, @@ -33599,10 +35128,7 @@ type GPUBufferUsageFlags = number; type GPUColor = number[] | GPUColorDict; type GPUColorWriteFlags = number; type GPUCopyExternalImageSource = - | ImageBitmap - | HTMLImageElement - | HTMLCanvasElement - | OffscreenCanvas; + ImageBitmap | HTMLImageElement | HTMLCanvasElement | OffscreenCanvas; type GPUDepthBias = number; type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict; type GPUFlagsConstant = number; @@ -33625,7 +35151,8 @@ type GPUTextureUsageFlags = number; type GeometryNode = Text | Element | Document; type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement; type HeadersInit = string[][] | Record; -type ImageBitmapSource = CanvasImageSource | Blob | CanvasRenderingContext2D | ImageData; +type ImageBitmapSource = + CanvasImageSource | Blob | CanvasRenderingContext2D | ImageData; type ImageBufferSource = AllowSharedBufferSource | ReadableStream; type InferenceSessionFeedsType = InferenceSessionTensorMapType; type InferenceSessionReturnType = InferenceSessionTensorMapType; @@ -33669,14 +35196,16 @@ type PolicyContainer = nsIPolicyContainer; type Principal = nsIPrincipal; type PublicKeyCredentialClientCapabilities = Record; type RTCRtpTransform = RTCRtpScriptTransform; -type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; +type ReadableStreamReader = + ReadableStreamDefaultReader | ReadableStreamBYOBReader; type ReferrerInfo = nsIReferrerInfo; type RemoteTab = nsIRemoteTab; type ReportList = Report[]; type RequestInfo = Request | string; type SanitizerAttribute = string | SanitizerAttributeNamespace; type SanitizerElement = string | SanitizerElementNamespace; -type SanitizerElementWithAttributes = string | SanitizerElementNamespaceWithAttributes; +type SanitizerElementWithAttributes = + string | SanitizerElementNamespaceWithAttributes; type StackFrame = nsIStackFrame; type StringOrOpenPopupOptions = string | OpenPopupOptions; type StructuredClonable = any; @@ -33690,11 +35219,14 @@ type UniFFICallbackObjectHandle = number; type UniFFIFunctionId = number; type UniFFIPointerId = number; type UniFFIScaffoldingValue = number | ArrayBuffer | UniFFIPointer; -type UnrestrictedDoubleOrKeyframeAnimationOptions = number | KeyframeAnimationOptions; +type UnrestrictedDoubleOrKeyframeAnimationOptions = + number | KeyframeAnimationOptions; type VibratePattern = number | number[]; -type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; +type XMLHttpRequestBodyInit = + Blob | BufferSource | FormData | URLSearchParams | string; type XRWebGLRenderingContext = WebGLRenderingContext | WebGL2RenderingContext; -type XSLTParameterValue = number | boolean | string | Node | Node[] | XPathResult; +type XSLTParameterValue = + number | boolean | string | Node | Node[] | XPathResult; type XULCommandDispatcher = nsIDOMXULCommandDispatcher; type XULControllers = nsIControllers; type nsContentPolicyType = number; @@ -33729,15 +35261,10 @@ type BiquadFilterType = | "peaking"; type BitrateMode = "constant" | "variable"; type CSSBoxType = "border" | "content" | "margin" | "padding"; -type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; +type CSSMathOperator = + "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum"; type CSSNumericBaseType = - | "angle" - | "flex" - | "frequency" - | "length" - | "percent" - | "resolution" - | "time"; + "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time"; type CSSStyleSheetParsingMode = "agent" | "author" | "user"; type CacheStorageNamespace = "chrome" | "content"; type CallbackDebuggerNotificationPhase = "post" | "pre"; @@ -33765,8 +35292,10 @@ type CanvasFontVariantCaps = type CanvasLineCap = "butt" | "round" | "square"; type CanvasLineJoin = "bevel" | "miter" | "round"; type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; -type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; -type CanvasTextRendering = "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; +type CanvasTextBaseline = + "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; +type CanvasTextRendering = + "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; type CanvasWindingRule = "evenodd" | "nonzero"; type CaretChangedReason = | "dragcaret" @@ -33785,7 +35314,8 @@ type ColorGamut = "p3" | "rec2020" | "srgb"; type ColorSpaceConversion = "default" | "none"; type CompositeOperation = "accumulate" | "add" | "replace"; type CompressionFormat = "deflate" | "deflate-raw" | "gzip" | "zstd"; -type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "none" | "other" | "unknown" | "wifi"; +type ConnectionType = + "bluetooth" | "cellular" | "ethernet" | "none" | "other" | "unknown" | "wifi"; type ConsoleLevel = "error" | "log" | "warning"; type ConsoleLogLevel = | "All" @@ -33810,7 +35340,8 @@ type ContentScriptCssOrigin = "author" | "user"; type ContentScriptExecutionWorld = "ISOLATED" | "MAIN" | "USER_SCRIPT"; type ContentScriptRunAt = "document_end" | "document_idle" | "document_start"; type CookieSameSite = "lax" | "none" | "strict"; -type CredentialMediationRequirement = "conditional" | "optional" | "required" | "silent"; +type CredentialMediationRequirement = + "conditional" | "optional" | "required" | "silent"; type CredentialProtectionPolicy = | "userVerificationOptional" | "userVerificationOptionalWithCredentialIDList" @@ -33852,19 +35383,16 @@ type EncodedAudioChunkType = "delta" | "key"; type EncodedVideoChunkType = "delta" | "key"; type EndingType = "native" | "transparent"; type EventCallbackDebuggerNotificationType = - | "closewatcher" - | "global" - | "node" - | "websocket" - | "worker" - | "xhr"; -type FetchState = "aborted" | "complete" | "errored" | "requesting" | "responding"; + "closewatcher" | "global" | "node" | "websocket" | "worker" | "xhr"; +type FetchState = + "aborted" | "complete" | "errored" | "requesting" | "responding"; type FileSystemHandleKind = "directory" | "file"; type FileType = "directory" | "other" | "regular"; type FillMode = "auto" | "backwards" | "both" | "forwards" | "none"; type FlexItemClampState = "clamped_to_max" | "clamped_to_min" | "unclamped"; type FlexLineGrowthState = "growing" | "shrinking"; -type FlexPhysicalDirection = "horizontal-lr" | "horizontal-rl" | "vertical-bt" | "vertical-tb"; +type FlexPhysicalDirection = + "horizontal-lr" | "horizontal-rl" | "vertical-bt" | "vertical-tb"; type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; type FontFaceSetLoadStatus = "loaded" | "loading"; type ForceMediaDocument = "image" | "none" | "video"; @@ -33885,7 +35413,8 @@ type GPUBlendFactor = | "src-alpha" | "src-alpha-saturated" | "zero"; -type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract"; +type GPUBlendOperation = + "add" | "max" | "min" | "reverse-subtract" | "subtract"; type GPUBufferBindingType = "read-only-storage" | "storage" | "uniform"; type GPUBufferMapState = "mapped" | "pending" | "unmapped"; type GPUCanvasAlphaMode = "opaque" | "premultiplied"; @@ -34046,8 +35575,10 @@ type GPUTextureFormat = | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8"; -type GPUTextureSampleType = "depth" | "float" | "sint" | "uint" | "unfilterable-float"; -type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; +type GPUTextureSampleType = + "depth" | "float" | "sint" | "uint" | "unfilterable-float"; +type GPUTextureViewDimension = + "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array"; type GPUVertexFormat = | "float16" | "float16x2" @@ -34095,22 +35626,28 @@ type GamepadHand = "" | "left" | "right"; type GamepadHapticActuatorType = "vibration"; type GamepadLightIndicatorType = "on-off" | "rgb"; type GamepadMappingType = "" | "standard" | "xr-standard"; -type GetUserMediaRequestType = "getusermedia" | "recording-device-stopped" | "selectaudiooutput"; +type GetUserMediaRequestType = + "getusermedia" | "recording-device-stopped" | "selectaudiooutput"; type GridDeclaration = "explicit" | "implicit"; type GridTrackState = "removed" | "repeat" | "static"; -type HDCPVersion = "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3"; -type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software"; +type HDCPVersion = + "1.0" | "1.1" | "1.2" | "1.3" | "1.4" | "2.0" | "2.1" | "2.2" | "2.3"; +type HardwareAcceleration = + "no-preference" | "prefer-hardware" | "prefer-software"; type HashAlgorithm = "sha256" | "sha384" | "sha512"; type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; -type HeadersGuardEnum = "immutable" | "none" | "request" | "request-no-cors" | "response"; +type HeadersGuardEnum = + "immutable" | "none" | "request" | "request-no-cors" | "response"; type HighlightType = "grammar-error" | "highlight" | "spelling-error"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; type IDBTransactionDurability = "default" | "relaxed" | "strict"; -type IDBTransactionMode = "cleanup" | "readonly" | "readwrite" | "readwriteflush" | "versionchange"; +type IDBTransactionMode = + "cleanup" | "readonly" | "readwrite" | "readwriteflush" | "versionchange"; type IdentityCredentialRequestOptionsMode = "active" | "passive"; type ImageOrientation = "flipY" | "from-image" | "none"; -type ImportESModuleTargetGlobal = "contextual" | "current" | "devtools" | "shared"; +type ImportESModuleTargetGlobal = + "contextual" | "current" | "devtools" | "shared"; type InspectorPropertyType = "color" | "gradient" | "timing-function"; type IterationCompositeOperation = "accumulate" | "replace"; type JSRFPTarget = @@ -34122,7 +35659,8 @@ type JSRFPTarget = type L10nFileSourceHasFileStatus = "missing" | "present" | "unknown"; type LatencyMode = "quality" | "realtime"; type LineAlignSetting = "center" | "end" | "start"; -type LlamaKVCacheDtype = "f16" | "f32" | "q4_0" | "q4_1" | "q5_0" | "q5_1" | "q8_0"; +type LlamaKVCacheDtype = + "f16" | "f32" | "q4_0" | "q4_1" | "q5_0" | "q5_1" | "q8_0"; type LlamaSamplerType = | "dist" | "dry" @@ -34254,11 +35792,13 @@ type MozUrlClassificationFlags = type NavigationFocusReset = "after-transition" | "manual"; type NavigationHistoryBehavior = "auto" | "push" | "replace"; type NavigationScrollBehavior = "after-transition" | "manual"; -type NavigationTimingType = "back_forward" | "navigate" | "prerender" | "reload"; +type NavigationTimingType = + "back_forward" | "navigate" | "prerender" | "reload"; type NavigationType = "push" | "reload" | "replace" | "traverse"; type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; -type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; +type OffscreenRenderingContextId = + "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu"; type OpusBitstreamFormat = "ogg" | "opus"; type OrientationLockType = | "any" @@ -34277,10 +35817,7 @@ type OrientationType = type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle"; type OverSampleType = "2x" | "4x" | "none"; type OverridableErrorCategory = - | "domain-mismatch" - | "expired-or-not-yet-valid" - | "trust-error" - | "unset"; + "domain-mismatch" | "expired-or-not-yet-valid" | "trust-error" | "unset"; type PCError = | "InvalidAccessError" | "InvalidCharacterError" @@ -34332,7 +35869,8 @@ type PlacesEventType = | "page-visited" | "pages-rank-changed" | "purge-caches"; -type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; +type PlaybackDirection = + "alternate" | "alternate-reverse" | "normal" | "reverse"; type PopupBlockerState = | "openAbused" | "openAllowed" @@ -34351,8 +35889,10 @@ type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat"; type RTCCodecType = "decode" | "encode"; type RTCDataChannelState = "closed" | "closing" | "connecting" | "open"; type RTCDataChannelType = "arraybuffer" | "blob"; -type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution"; -type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new"; +type RTCDegradationPreference = + "balanced" | "maintain-framerate" | "maintain-resolution"; +type RTCDtlsTransportState = + "closed" | "connected" | "connecting" | "failed" | "new"; type RTCEncodedVideoFrameType = "delta" | "empty" | "key"; type RTCIceCandidateType = "host" | "prflx" | "relay" | "srflx"; type RTCIceComponent = "rtcp" | "rtp"; @@ -34384,14 +35924,10 @@ type RTCLifecycleEvent = | "icegatheringstatechange" | "initialized"; type RTCPeerConnectionState = - | "closed" - | "connected" - | "connecting" - | "disconnected" - | "failed" - | "new"; + "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new"; type RTCPriorityType = "high" | "low" | "medium" | "very-low"; -type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped"; +type RTCRtpTransceiverDirection = + "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped"; type RTCSctpTransportState = "closed" | "connected" | "connecting"; type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback"; type RTCSignalingState = @@ -34402,12 +35938,7 @@ type RTCSignalingState = | "have-remote-pranswer" | "stable"; type RTCStatsIceCandidatePairState = - | "cancelled" - | "failed" - | "frozen" - | "in-progress" - | "succeeded" - | "waiting"; + "cancelled" | "failed" | "frozen" | "in-progress" | "succeeded" | "waiting"; type RTCStatsType = | "candidate-pair" | "codec" @@ -34470,10 +36001,12 @@ type RequestDestination = type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; type RequestPriority = "auto" | "high" | "low"; type RequestRedirect = "error" | "follow" | "manual"; -type ResizeObserverBoxOptions = "border-box" | "content-box" | "device-pixel-content-box"; +type ResizeObserverBoxOptions = + "border-box" | "content-box" | "device-pixel-content-box"; type ResourceCacheTarget = "chrome" | "content"; type ResourceCacheType = "image" | "script" | "stylesheet"; -type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type ResponseType = + "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type SanitizerPresets = "default"; type ScreenColorGamut = "p3" | "rec2020" | "srgb"; type ScrollBehavior = "auto" | "instant" | "smooth"; @@ -34493,7 +36026,8 @@ type ServiceWorkerState = type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; type ShadowRootMode = "closed" | "open"; type SlotAssignmentMode = "manual" | "named"; -type SocketReadyState = "closed" | "closing" | "halfclosed" | "open" | "opening"; +type SocketReadyState = + "closed" | "closing" | "halfclosed" | "open" | "opening"; type SourceBufferAppendMode = "segments" | "sequence"; type SpeechRecognitionErrorCode = | "aborted" @@ -34534,17 +36068,22 @@ type SupportedType = type TCPReadyState = "closed" | "closing" | "connecting" | "open"; type TCPSocketBinaryType = "arraybuffer" | "string"; type TaskPriority = "background" | "user-blocking" | "user-visible"; -type TensorDataLocation = "cpu" | "cpu-pinned" | "gpu-buffer" | "ml-tensor" | "none" | "texture"; -type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles"; +type TensorDataLocation = + "cpu" | "cpu-pinned" | "gpu-buffer" | "ml-tensor" | "none" | "texture"; +type TextTrackKind = + "captions" | "chapters" | "descriptions" | "metadata" | "subtitles"; type TextTrackMode = "disabled" | "hidden" | "showing"; type TouchEventsOverride = "disabled" | "enabled" | "none"; type TransferFunction = "hlg" | "pq" | "srgb"; type UniFFIScaffoldingCallCode = "error" | "internal-error" | "success"; -type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted"; +type VRDisplayEventReason = + "mounted" | "navigation" | "requested" | "unmounted"; type VREye = "left" | "right"; -type VideoColorPrimaries = "bt2020" | "bt470bg" | "bt709" | "smpte170m" | "smpte432"; +type VideoColorPrimaries = + "bt2020" | "bt470bg" | "bt709" | "smpte170m" | "smpte432"; type VideoEncoderBitrateMode = "constant" | "quantizer" | "variable"; -type VideoMatrixCoefficients = "bt2020-ncl" | "bt470bg" | "bt709" | "rgb" | "smpte170m"; +type VideoMatrixCoefficients = + "bt2020-ncl" | "bt470bg" | "bt709" | "rgb" | "smpte170m"; type VideoPixelFormat = | "BGRA" | "BGRX" @@ -34570,12 +36109,7 @@ type VideoPixelFormat = | "RGBA" | "RGBX"; type VideoTransferCharacteristics = - | "bt709" - | "hlg" - | "iec61966-2-1" - | "linear" - | "pq" - | "smpte170m"; + "bt709" | "hlg" | "iec61966-2-1" | "linear" | "pq" | "smpte170m"; type VisibilityState = "hidden" | "visible"; type WakeLockType = "screen"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; @@ -34611,15 +36145,18 @@ type WebIDLUtilityActorName = | "windowsUtils"; type WebTransportCongestionControl = "default" | "low-latency" | "throughput"; type WebTransportErrorSource = "session" | "stream"; -type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable"; +type WebTransportReliabilityMode = + "pending" | "reliable-only" | "supports-unreliable"; type WireframeRectType = "background" | "image" | "text" | "unknown"; type WorkerType = "classic" | "module"; type WriteCommandType = "seek" | "truncate" | "write"; type WriteMode = "append" | "appendOrCreate" | "create" | "overwrite"; -type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text"; +type XMLHttpRequestResponseType = + "" | "arraybuffer" | "blob" | "document" | "json" | "text"; type XREye = "left" | "none" | "right"; type XRHandedness = "left" | "none" | "right"; -type XRReferenceSpaceType = "bounded-floor" | "local" | "local-floor" | "unbounded" | "viewer"; +type XRReferenceSpaceType = + "bounded-floor" | "local" | "local-floor" | "unbounded" | "viewer"; type XRSessionMode = "immersive-ar" | "immersive-vr" | "inline"; type XRTargetRayMode = "gaze" | "screen" | "tracked-pointer"; type XRVisibilityState = "hidden" | "visible" | "visible-blurred"; @@ -34630,7 +36167,11 @@ type mozPacketDumpType = "rtcp" | "rtp" | "srtcp" | "srtp"; ///////////////////////////// interface AudioParam { - setValueCurveAtTime(values: Iterable, startTime: number, duration: number): AudioParam; + setValueCurveAtTime( + values: Iterable, + startTime: number, + duration: number + ): AudioParam; } interface AudioParamMap extends ReadonlyMap {} @@ -34640,7 +36181,10 @@ interface AudioTrackList { } interface BaseAudioContext { - createIIRFilter(feedforward: Iterable, feedback: Iterable): IIRFilterNode; + createIIRFilter( + feedforward: Iterable, + feedback: Iterable + ): IIRFilterNode; createPeriodicWave( real: Iterable, imag: Iterable, @@ -34852,7 +36396,11 @@ interface Headers { } interface HeapSnapshot { - computeShortestPaths(start: NodeId, targets: Iterable, maxNumPaths: number): any; + computeShortestPaths( + start: NodeId, + targets: Iterable, + maxNumPaths: number + ): any; } interface Highlight extends Set {} @@ -34880,7 +36428,10 @@ interface ImageTrackList { } interface IntlUtils { - getDisplayNames(locales: Iterable, options?: DisplayNameOptions): DisplayNameResult; + getDisplayNames( + locales: Iterable, + options?: DisplayNameOptions + ): DisplayNameResult; } interface L10nRegistry { @@ -34989,7 +36540,10 @@ interface PaintRequestList { } interface PeerConnectionObserver { - fireTrackEvent(receiver: RTCRtpReceiver, streams: Iterable): void; + fireTrackEvent( + receiver: RTCRtpReceiver, + streams: Iterable + ): void; } interface PlacesEventCounts extends ReadonlyMap {} @@ -35130,7 +36684,10 @@ interface TestInterfaceMaplike extends Map {} interface TestInterfaceMaplikeJSObject extends ReadonlyMap {} -interface TestInterfaceMaplikeObject extends ReadonlyMap {} +interface TestInterfaceMaplikeObject extends ReadonlyMap< + string, + TestInterfaceMaplike +> {} interface TestInterfaceSetlike extends Set {} @@ -35197,8 +36754,15 @@ interface WebGL2RenderingContextBase { srcOffset?: GLuint ): void; drawBuffers(buffers: Iterable): void; - getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; - getUniformIndices(program: WebGLProgram, uniformNames: Iterable): GLuint[] | null; + getActiveUniforms( + program: WebGLProgram, + uniformIndices: Iterable, + pname: GLenum + ): any; + getUniformIndices( + program: WebGLProgram, + uniformNames: Iterable + ): GLuint[] | null; invalidateFramebuffer(target: GLenum, attachments: Iterable): void; invalidateSubFramebuffer( target: GLenum, @@ -35353,14 +36917,38 @@ interface WebGL2RenderingContextBase { } interface WebGLRenderingContext { - uniform1fv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform1iv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform2fv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform2iv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform3fv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform3iv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform4fv(location: WebGLUniformLocation | null, data: Iterable): void; - uniform4iv(location: WebGLUniformLocation | null, data: Iterable): void; + uniform1fv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform1iv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform2fv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform2iv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform3fv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform3iv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform4fv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; + uniform4iv( + location: WebGLUniformLocation | null, + data: Iterable + ): void; uniformMatrix2fv( location: WebGLUniformLocation | null, transpose: GLboolean, @@ -35386,8 +36974,15 @@ interface WebGLRenderingContextBase { } interface Window { - postMessage(message: any, targetOrigin: string, transfer?: Iterable): void; - setScrollMarks(marks: Iterable, onHorizontalScrollbar?: boolean): void; + postMessage( + message: any, + targetOrigin: string, + transfer?: Iterable + ): void; + setScrollMarks( + marks: Iterable, + onHorizontalScrollbar?: boolean + ): void; } interface Worker { @@ -35402,7 +36997,11 @@ interface XRInputSourceArray { } interface XSLTProcessor { - setParameter(namespaceURI: string | null, localName: string, value: Iterable): void; + setParameter( + namespaceURI: string | null, + localName: string, + value: Iterable + ): void; } ///////////////////////////// @@ -35417,7 +37016,9 @@ interface FileSystemDirectoryHandle { } interface ReadableStream { - [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator; + [Symbol.asyncIterator]( + options?: ReadableStreamIteratorOptions + ): AsyncIterableIterator; values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator; } @@ -35444,7 +37045,9 @@ interface TestInterfaceAsyncIterableSingleWithArgs { [Symbol.asyncIterator]( options?: TestInterfaceAsyncIteratorOptions ): AsyncIterableIterator; - values(options?: TestInterfaceAsyncIteratorOptions): AsyncIterableIterator; + values( + options?: TestInterfaceAsyncIteratorOptions + ): AsyncIterableIterator; } declare namespace CSS { diff --git a/src/zen/@types/lib.gecko.glean.d.ts b/src/zen/@types/lib.gecko.glean.d.ts index d08c39cc1..1c76502aa 100644 --- a/src/zen/@types/lib.gecko.glean.d.ts +++ b/src/zen/@types/lib.gecko.glean.d.ts @@ -77,7 +77,10 @@ interface GleanImpl { }; networking: { - captivePortalBannerDisplayTime: Record<"abort" | "dismiss" | "success", GleanCounter>; + captivePortalBannerDisplayTime: Record< + "abort" | "dismiss" | "success", + GleanCounter + >; captivePortalBannerDisplayed: GleanCounter; cacheMetadataFirstReadTime: GleanTimingDistribution; cacheMetadataSecondReadTime: GleanTimingDistribution; @@ -111,10 +114,16 @@ interface GleanImpl { >; cookiePurgeEntryMax: GleanCustomDistribution; cookiePurgeMax: GleanCustomDistribution; - cookieTimestampFixedCount: Record<"creationTime" | "lastAccessed", GleanCounter>; + cookieTimestampFixedCount: Record< + "creationTime" | "lastAccessed", + GleanCounter + >; dnsFailedLookupTime: GleanTimingDistribution; dnsLookupTime: GleanTimingDistribution; - dnsNativeCount: Record<"https_private" | "https_regular" | "private" | "regular", GleanCounter>; + dnsNativeCount: Record< + "https_private" | "https_regular" | "private" | "regular", + GleanCounter + >; dnsNativeHttpsCallTime: GleanTimingDistribution; dnsRenewalTime: GleanTimingDistribution; dnsRenewalTimeForTtl: GleanTimingDistribution; @@ -326,7 +335,10 @@ interface GleanImpl { | "other_5xx", GleanCounter >; - httpResponseVersion: Record<"http_1" | "http_2" | "http_3" | "unknown", GleanCounter>; + httpResponseVersion: Record< + "http_1" | "http_2" | "http_3" | "unknown", + GleanCounter + >; httpToHttpsUpgradeReason: Record< | "already_https" | "csp_uir" @@ -351,7 +363,10 @@ interface GleanImpl { "load_is_http" | "load_is_http_for_local_domain" | "load_is_https", GleanCounter >; - httpsRrPresented: Record<"none" | "presented" | "presented_with_http3", GleanCounter>; + httpsRrPresented: Record< + "none" | "presented" | "presented_with_http3", + GleanCounter + >; localNetworkAccess: Record< | "failure" | "private_to_local_http" @@ -364,7 +379,10 @@ interface GleanImpl { GleanCounter >; localNetworkAccessPort: GleanCustomDistribution; - localNetworkAccessPromptsShown: Record<"local_network" | "localhost", GleanCounter>; + localNetworkAccessPromptsShown: Record< + "local_network" | "localhost", + GleanCounter + >; localNetworkBlockedTracker: GleanCounter; osSocketLimitReached: GleanCounter; prcloseTcpBlockingTimeConnectivityChange: GleanTimingDistribution; @@ -393,13 +411,23 @@ interface GleanImpl { prconnectcontinueBlockingTimeOffline: GleanTimingDistribution; prconnectcontinueBlockingTimeShutdown: GleanTimingDistribution; proxyInfoType: Record< - "direct" | "http" | "https" | "socks4" | "socks4a" | "socks5" | "socks5h" | "unknown", + | "direct" + | "http" + | "https" + | "socks4" + | "socks4a" + | "socks5" + | "socks5h" + | "unknown", GleanCounter >; residualCacheFolderCount: GleanCounter; residualCacheFolderRemoval: Record<"failure" | "success", GleanCounter>; speculativeConnectOutcome: Record< - "aborted_https_not_enabled" | "aborted_socket_fail" | "aborted_socket_limit" | "successful", + | "aborted_https_not_enabled" + | "aborted_socket_fail" + | "aborted_socket_limit" + | "successful", GleanCounter >; sqliteCookiesBlockMainThread: GleanTimingDistribution; @@ -470,7 +498,12 @@ interface GleanImpl { GleanTimingDistribution >; trrFetchDuration: Record< - "h1" | "h1_network_only" | "h2" | "h2_network_only" | "h3" | "h3_network_only", + | "h1" + | "h1_network_only" + | "h2" + | "h2_network_only" + | "h3" + | "h3_network_only", GleanTimingDistribution >; trrFirstSentToLastReceived: Record< @@ -643,13 +676,23 @@ interface GleanImpl { GleanTimingDistribution >; connectionAddressType: Record< - "http_1_ipv4" | "http_1_ipv6" | "http_2_ipv4" | "http_2_ipv6" | "http_3_ipv4" | "http_3_ipv6", + | "http_1_ipv4" + | "http_1_ipv6" + | "http_2_ipv4" + | "http_2_ipv6" + | "http_3_ipv4" + | "http_3_ipv6", GleanCounter >; dataTransferredV3Kb: Record; http3Enabled: GleanBoolean; httpsRecordState: Record< - "all_excluded" | "invalid" | "no_default_alpn" | "others" | "succeeded" | "unmatched_cname", + | "all_excluded" + | "invalid" + | "no_default_alpn" + | "others" + | "succeeded" + | "unmatched_cname", GleanCounter >; httpsRrPrefsUsage: GleanQuantity; @@ -672,9 +715,15 @@ interface GleanImpl { clickFingerprinters: GleanEventNoExtras; clickFullReport: GleanEventNoExtras; clickMilestoneMessage: GleanEventNoExtras; - clickProtectionspopupCfr: GleanEventWithExtras<{ message?: string; value?: string }>; + clickProtectionspopupCfr: GleanEventWithExtras<{ + message?: string; + value?: string; + }>; clickSettings: GleanEventNoExtras; - clickSmartblockembedsToggle: GleanEventWithExtras<{ isBlock?: string; openingReason?: string }>; + clickSmartblockembedsToggle: GleanEventWithExtras<{ + isBlock?: string; + openingReason?: string; + }>; clickSocial: GleanEventNoExtras; clickSubviewSettings: GleanEventWithExtras<{ value?: string }>; clickTrackers: GleanEventNoExtras; @@ -686,7 +735,10 @@ interface GleanImpl { openingReason?: string; smartblockEmbedTogglesShown?: string; }>; - openProtectionspopupCfr: GleanEventWithExtras<{ message?: string; value?: string }>; + openProtectionspopupCfr: GleanEventWithExtras<{ + message?: string; + value?: string; + }>; smartblockembedsShown: GleanCounter; }; @@ -748,7 +800,11 @@ interface GleanImpl { changeLocation: GleanEventNoExtras; compressedArchiveSize: GleanMemoryDistribution; cookiesSize: GleanQuantity; - created: GleanEventWithExtras<{ encrypted?: string; location?: string; size?: string }>; + created: GleanEventWithExtras<{ + encrypted?: string; + location?: string; + size?: string; + }>; credentialsDataSize: GleanQuantity; enabled: GleanBoolean; error: GleanEventWithExtras<{ backup_step?: string; error_code?: string }>; @@ -830,18 +886,31 @@ interface GleanImpl { firefoxview: { cumulativeSearches: Record< - "history" | "opentabs" | "recentbrowsing" | "recentlyclosed" | "syncedtabs", + | "history" + | "opentabs" + | "recentbrowsing" + | "recentlyclosed" + | "syncedtabs", GleanCustomDistribution >; }; firefoxviewNext: { - browserContextMenuTabs: GleanEventWithExtras<{ menu_action?: string; page?: string }>; + browserContextMenuTabs: GleanEventWithExtras<{ + menu_action?: string; + page?: string; + }>; cardCollapsedCardContainer: GleanEventWithExtras<{ data_type?: string }>; cardExpandedCardContainer: GleanEventWithExtras<{ data_type?: string }>; - changePageNavigation: GleanEventWithExtras<{ page?: string; source?: string }>; + changePageNavigation: GleanEventWithExtras<{ + page?: string; + source?: string; + }>; closeOpenTabTabs: GleanEventNoExtras; - contextMenuTabs: GleanEventWithExtras<{ data_type?: string; menu_action?: string }>; + contextMenuTabs: GleanEventWithExtras<{ + data_type?: string; + menu_action?: string; + }>; dismissClosedTabTabs: GleanEventWithExtras<{ delta?: string; page?: string; @@ -852,11 +921,18 @@ interface GleanImpl { fxaMobileSync: GleanEventWithExtras<{ has_devices?: string }>; historyVisits: GleanEventNoExtras; openTabTabs: GleanEventWithExtras<{ page?: string; window?: string }>; - recentlyClosedTabs: GleanEventWithExtras<{ delta?: string; page?: string; position?: string }>; + recentlyClosedTabs: GleanEventWithExtras<{ + delta?: string; + page?: string; + position?: string; + }>; searchInitiatedSearch: GleanEventWithExtras<{ page?: string }>; searchShowAllShowallbutton: GleanEventWithExtras<{ section?: string }>; showAllHistoryTabs: GleanEventNoExtras; - sortHistoryTabs: GleanEventWithExtras<{ search_start?: string; sort_type?: string }>; + sortHistoryTabs: GleanEventWithExtras<{ + search_start?: string; + sort_type?: string; + }>; syncedTabsTabs: GleanEventWithExtras<{ page?: string }>; tabSelectedToolbarbutton: GleanEventNoExtras; }; @@ -872,15 +948,37 @@ interface GleanImpl { contextmenuRemove: GleanEventWithExtras<{ provider?: string }>; enabled: GleanBoolean; experimentCheckboxClick: GleanEventWithExtras<{ enabled?: string }>; - keyboardShortcut: GleanEventWithExtras<{ enabled?: string; sidebar?: string }>; - lengthDisclaimer: GleanEventWithExtras<{ length?: string; provider?: string; type?: string }>; - lengthDisclaimerDismissed: GleanEventWithExtras<{ provider?: string; type?: string }>; + keyboardShortcut: GleanEventWithExtras<{ + enabled?: string; + sidebar?: string; + }>; + lengthDisclaimer: GleanEventWithExtras<{ + length?: string; + provider?: string; + type?: string; + }>; + lengthDisclaimerDismissed: GleanEventWithExtras<{ + provider?: string; + type?: string; + }>; menu: GleanBoolean; onboardingClose: GleanEventWithExtras<{ provider?: string; step?: string }>; - onboardingFinish: GleanEventWithExtras<{ provider?: string; step?: string }>; - onboardingLearnMore: GleanEventWithExtras<{ provider?: string; step?: string }>; - onboardingProviderChoiceDisplayed: GleanEventWithExtras<{ provider?: string; step?: string }>; - onboardingProviderSelection: GleanEventWithExtras<{ provider?: string; step?: string }>; + onboardingFinish: GleanEventWithExtras<{ + provider?: string; + step?: string; + }>; + onboardingLearnMore: GleanEventWithExtras<{ + provider?: string; + step?: string; + }>; + onboardingProviderChoiceDisplayed: GleanEventWithExtras<{ + provider?: string; + step?: string; + }>; + onboardingProviderSelection: GleanEventWithExtras<{ + provider?: string; + step?: string; + }>; onboardingProviderTerms: GleanEventWithExtras<{ provider?: string; step?: string; @@ -896,7 +994,11 @@ interface GleanImpl { source?: string; }>; provider: GleanString; - providerChange: GleanEventWithExtras<{ current?: string; previous?: string; surface?: string }>; + providerChange: GleanEventWithExtras<{ + current?: string; + previous?: string; + surface?: string; + }>; shortcuts: GleanBoolean; shortcutsCheckboxClick: GleanEventWithExtras<{ enabled?: string }>; shortcutsCustom: GleanBoolean; @@ -918,9 +1020,15 @@ interface GleanImpl { }>; sidebar: GleanBoolean; sidebarCloseClick: GleanEventWithExtras<{ provider?: string }>; - sidebarMoreMenuClick: GleanEventWithExtras<{ action?: string; provider?: string }>; + sidebarMoreMenuClick: GleanEventWithExtras<{ + action?: string; + provider?: string; + }>; sidebarMoreMenuDisplay: GleanEventWithExtras<{ provider?: string }>; - sidebarProviderMenuClick: GleanEventWithExtras<{ action?: string; provider?: string }>; + sidebarProviderMenuClick: GleanEventWithExtras<{ + action?: string; + provider?: string; + }>; sidebarToggle: GleanEventWithExtras<{ opened?: string; provider?: string; @@ -939,7 +1047,11 @@ interface GleanImpl { aiOptin: GleanBoolean; cardAiConsent: GleanEventWithExtras<{ option?: string }>; cardClose: GleanEventWithExtras<{ duration?: string; tab?: string }>; - cardLink: GleanEventWithExtras<{ key_points?: string; source?: string; tab?: string }>; + cardLink: GleanEventWithExtras<{ + key_points?: string; + source?: string; + tab?: string; + }>; enabled: GleanBoolean; fetch: GleanEventWithExtras<{ description?: string; @@ -965,13 +1077,21 @@ interface GleanImpl { onboardingCard: GleanEventWithExtras<{ action?: string; type?: string }>; prefChanged: GleanEventWithExtras<{ enabled?: string; pref?: string }>; shortcut: GleanString; - start: GleanEventWithExtras<{ cached?: string; source?: string; tab?: string }>; + start: GleanEventWithExtras<{ + cached?: string; + source?: string; + tab?: string; + }>; }; ipprotection: { clickUpgradeButton: GleanEventNoExtras; enabled: GleanBoolean; - toggled: GleanEventWithExtras<{ duration?: string; enabled?: string; userAction?: string }>; + toggled: GleanEventWithExtras<{ + duration?: string; + enabled?: string; + userAction?: string; + }>; usageRx: GleanMemoryDistribution; usageTx: GleanMemoryDistribution; }; @@ -1047,7 +1167,10 @@ interface GleanImpl { }; browserLaunchedToHandle: { - systemNotification: GleanEventWithExtras<{ action?: string; name?: string }>; + systemNotification: GleanEventWithExtras<{ + action?: string; + name?: string; + }>; }; browserStartup: { @@ -1100,7 +1223,9 @@ interface GleanImpl { value?: string; }>; shadowedHtmlDocumentPropertyAccess: GleanEventWithExtras<{ name?: string }>; - shadowedHtmlFormElementPropertyAccess: GleanEventWithExtras<{ name?: string }>; + shadowedHtmlFormElementPropertyAccess: GleanEventWithExtras<{ + name?: string; + }>; cspViolationInternalPage: GleanEventWithExtras<{ blockeduridetails?: string; blockeduritype?: string; @@ -1113,8 +1238,14 @@ interface GleanImpl { sourcedetails?: string; sourcetype?: string; }>; - evalUsageParentProcess: GleanEventWithExtras<{ fileinfo?: string; value?: string }>; - evalUsageSystemContext: GleanEventWithExtras<{ fileinfo?: string; value?: string }>; + evalUsageParentProcess: GleanEventWithExtras<{ + fileinfo?: string; + value?: string; + }>; + evalUsageSystemContext: GleanEventWithExtras<{ + fileinfo?: string; + value?: string; + }>; httpsOnlyModeUpgradeTime: Record< | "sub_f_aborted" | "sub_f_cxnrefused" @@ -1655,12 +1786,18 @@ interface GleanImpl { addonXpiUsed: GleanBoolean; blockedSponsors: GleanStringList; closed: GleanEventWithExtras<{ newtab_visit_id?: string }>; - featureHighlightDismiss: GleanEventWithExtras<{ feature?: string; newtab_visit_id?: string }>; + featureHighlightDismiss: GleanEventWithExtras<{ + feature?: string; + newtab_visit_id?: string; + }>; featureHighlightImpression: GleanEventWithExtras<{ feature?: string; newtab_visit_id?: string; }>; - featureHighlightOpen: GleanEventWithExtras<{ feature?: string; newtab_visit_id?: string }>; + featureHighlightOpen: GleanEventWithExtras<{ + feature?: string; + newtab_visit_id?: string; + }>; highlightsEnabled: GleanBoolean; homepageCategory: GleanString; inlineSelectionClick: GleanEventWithExtras<{ @@ -1727,7 +1864,10 @@ interface GleanImpl { sovAllocation: GleanStringList; sponsNavTrafficRecvd: GleanMemoryDistribution; sponsNavTrafficSent: GleanMemoryDistribution; - tooltipClick: GleanEventWithExtras<{ feature?: string; newtab_visit_id?: string }>; + tooltipClick: GleanEventWithExtras<{ + feature?: string; + newtab_visit_id?: string; + }>; topicSelectionDismiss: GleanEventWithExtras<{ newtab_visit_id?: string }>; topicSelectionOpen: GleanEventWithExtras<{ newtab_visit_id?: string }>; topicSelectionTopicsSaved: GleanEventWithExtras<{ @@ -1736,8 +1876,14 @@ interface GleanImpl { previous_topics?: string; topics?: string; }>; - trendingSearchDismiss: GleanEventWithExtras<{ newtab_visit_id?: string; variant?: string }>; - trendingSearchImpression: GleanEventWithExtras<{ newtab_visit_id?: string; variant?: string }>; + trendingSearchDismiss: GleanEventWithExtras<{ + newtab_visit_id?: string; + variant?: string; + }>; + trendingSearchImpression: GleanEventWithExtras<{ + newtab_visit_id?: string; + variant?: string; + }>; trendingSearchSuggestionOpen: GleanEventWithExtras<{ newtab_visit_id?: string; variant?: string; @@ -1752,8 +1898,12 @@ interface GleanImpl { newtab_visit_id?: string; selected_wallpaper?: string; }>; - wallpaperHighlightCtaClick: GleanEventWithExtras<{ newtab_visit_id?: string }>; - wallpaperHighlightDismissed: GleanEventWithExtras<{ newtab_visit_id?: string }>; + wallpaperHighlightCtaClick: GleanEventWithExtras<{ + newtab_visit_id?: string; + }>; + wallpaperHighlightDismissed: GleanEventWithExtras<{ + newtab_visit_id?: string; + }>; weatherChangeDisplay: GleanEventWithExtras<{ newtab_visit_id?: string; weather_display_mode?: string; @@ -1773,7 +1923,10 @@ interface GleanImpl { newtab_visit_id?: string; }>; widgetsListsImpression: GleanEventWithExtras<{ newtab_visit_id?: string }>; - widgetsListsUserEvent: GleanEventWithExtras<{ newtab_visit_id?: string; user_action?: string }>; + widgetsListsUserEvent: GleanEventWithExtras<{ + newtab_visit_id?: string; + user_action?: string; + }>; widgetsTimerChangeDisplay: GleanEventWithExtras<{ display_status?: string; newtab_visit_id?: string; @@ -1783,7 +1936,10 @@ interface GleanImpl { display_status?: string; newtab_visit_id?: string; }>; - widgetsTimerUserEvent: GleanEventWithExtras<{ newtab_visit_id?: string; user_action?: string }>; + widgetsTimerUserEvent: GleanEventWithExtras<{ + newtab_visit_id?: string; + user_action?: string; + }>; }; newtabHandoffPreference: { @@ -2014,7 +2170,10 @@ interface GleanImpl { tile_id?: string; topic?: string; }>; - topicClick: GleanEventWithExtras<{ newtab_visit_id?: string; topic?: string }>; + topicClick: GleanEventWithExtras<{ + newtab_visit_id?: string; + topic?: string; + }>; }; topSites: { @@ -2082,7 +2241,10 @@ interface GleanImpl { position?: string; tile_id?: string; }>; - prefChanged: GleanEventWithExtras<{ new_value?: string; pref_name?: string }>; + prefChanged: GleanEventWithExtras<{ + new_value?: string; + pref_name?: string; + }>; rows: GleanQuantity; showPrivacyClick: GleanEventWithExtras<{ advertiser_name?: string; @@ -2113,7 +2275,10 @@ interface GleanImpl { historySidebar: { cumulativeFilterCount: GleanCustomDistribution; cumulativeSearches: GleanCustomDistribution; - filterType: Record<"day" | "dayandsite" | "lastvisited" | "site" | "visited", GleanCounter>; + filterType: Record< + "day" | "dayandsite" | "lastvisited" | "site" | "visited", + GleanCounter + >; lastvisitedTreeQueryTime: GleanTimingDistribution; }; @@ -2213,22 +2378,70 @@ interface GleanImpl { }; securityUiProtections: { - clickLwAboutLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickLwOpenButton: GleanEventWithExtras<{ category?: string; value?: string }>; - clickLwSyncLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickMobileAppLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickMtrAboutLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickMtrReportLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickMtrSignupButton: GleanEventWithExtras<{ category?: string; value?: string }>; - clickSettingsLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickTrackersAboutLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickVpnAppLinkAndroid: GleanEventWithExtras<{ category?: string; value?: string }>; - clickVpnAppLinkIos: GleanEventWithExtras<{ category?: string; value?: string }>; - clickVpnBannerClose: GleanEventWithExtras<{ category?: string; value?: string }>; - clickVpnBannerLink: GleanEventWithExtras<{ category?: string; value?: string }>; - clickVpnCardLink: GleanEventWithExtras<{ category?: string; value?: string }>; - closeProtectionReport: GleanEventWithExtras<{ category?: string; value?: string }>; - showProtectionReport: GleanEventWithExtras<{ category?: string; value?: string }>; + clickLwAboutLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickLwOpenButton: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickLwSyncLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickMobileAppLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickMtrAboutLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickMtrReportLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickMtrSignupButton: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickSettingsLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickTrackersAboutLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickVpnAppLinkAndroid: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickVpnAppLinkIos: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickVpnBannerClose: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickVpnBannerLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + clickVpnCardLink: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + closeProtectionReport: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; + showProtectionReport: GleanEventWithExtras<{ + category?: string; + value?: string; + }>; showVpnBanner: GleanEventWithExtras<{ category?: string; value?: string }>; }; @@ -2390,7 +2603,10 @@ interface GleanImpl { source?: string; }>; deprecatedCounts: Record; - searchFormCounts: GleanEventWithExtras<{ provider_id?: string; source?: string }>; + searchFormCounts: GleanEventWithExtras<{ + provider_id?: string; + source?: string; + }>; }; sapImpressionCounts: { @@ -2403,11 +2619,17 @@ interface GleanImpl { }; searchbar: { - selectedResultMethod: Record<"click" | "enter" | "enterSelection", GleanCounter>; + selectedResultMethod: Record< + "click" | "enter" | "enterSelection", + GleanCounter + >; }; serp: { - abandonment: GleanEventWithExtras<{ impression_id?: string; reason?: string }>; + abandonment: GleanEventWithExtras<{ + impression_id?: string; + reason?: string; + }>; adImpression: GleanEventWithExtras<{ ads_hidden?: string; ads_loaded?: string; @@ -2415,7 +2637,10 @@ interface GleanImpl { component?: string; impression_id?: string; }>; - adsBlockedCount: Record<"beyond_viewport" | "hidden_child" | "hidden_parent", GleanCounter>; + adsBlockedCount: Record< + "beyond_viewport" | "hidden_child" | "hidden_parent", + GleanCounter + >; categorization: GleanEventWithExtras<{ app_version?: string; channel?: string; @@ -2440,7 +2665,11 @@ interface GleanImpl { }>; categorizationDuration: GleanTimingDistribution; categorizationNoMapFound: GleanCounter; - engagement: GleanEventWithExtras<{ action?: string; impression_id?: string; target?: string }>; + engagement: GleanEventWithExtras<{ + action?: string; + impression_id?: string; + target?: string; + }>; experimentInfo: GleanObject; impression: GleanEventWithExtras<{ impression_id?: string; @@ -2494,7 +2723,10 @@ interface GleanImpl { readFile: GleanTimingDistribution; restoreWindow: GleanTimingDistribution; shutdownFlushAllOutcomes: Record< - "abnormal_content_shutdown" | "complete" | "oop_frameloader_crashed" | "timed_out", + | "abnormal_content_shutdown" + | "complete" + | "oop_frameloader_crashed" + | "timed_out", GleanCounter >; shutdownOk: Record<"false" | "true", GleanCounter>; @@ -2505,7 +2737,10 @@ interface GleanImpl { shutdownType: Record<"async" | "sync", GleanCounter>; startupInitSession: GleanTimingDistribution; startupOnloadInitialWindow: GleanTimingDistribution; - startupTimeline: Record<"sessionRestoreInitialized" | "sessionRestoreRestoring", GleanQuantity>; + startupTimeline: Record< + "sessionRestoreInitialized" | "sessionRestoreRestoring", + GleanQuantity + >; writeFile: GleanTimingDistribution; }; @@ -2523,7 +2758,10 @@ interface GleanImpl { notificationShown: GleanEventWithExtras<{ notification_detail?: string }>; recordsInteraction: GleanEventWithExtras<{ interaction_type?: string }>; recordsUpdate: GleanEventWithExtras<{ change_type?: string }>; - toolbarAction: GleanEventWithExtras<{ option_name?: string; trigger?: string }>; + toolbarAction: GleanEventWithExtras<{ + option_name?: string; + trigger?: string; + }>; }; extension: { @@ -2547,7 +2785,10 @@ interface GleanImpl { }; sidebar: { - addonIconClick: GleanEventWithExtras<{ addon_id?: string; sidebar_open?: string }>; + addonIconClick: GleanEventWithExtras<{ + addon_id?: string; + sidebar_open?: string; + }>; bookmarksIconClick: GleanEventWithExtras<{ sidebar_open?: string }>; chatbotIconClick: GleanEventWithExtras<{ sidebar_open?: string }>; displaySettings: GleanString; @@ -2556,7 +2797,11 @@ interface GleanImpl { keyboardShortcut: GleanEventWithExtras<{ opened?: string; panel?: string }>; link: Record; positionSettings: GleanString; - resize: GleanEventWithExtras<{ current?: string; percentage?: string; previous?: string }>; + resize: GleanEventWithExtras<{ + current?: string; + percentage?: string; + previous?: string; + }>; search: Record; syncedTabsIconClick: GleanEventWithExtras<{ sidebar_open?: string }>; tabsLayout: GleanString; @@ -2585,9 +2830,18 @@ interface GleanImpl { synced_tabs_loaded?: string; version?: string; }>; - clickFxaAppMenu: GleanEventWithExtras<{ filter?: string; tab_pos?: string }>; - clickFxaAvatarMenu: GleanEventWithExtras<{ filter?: string; tab_pos?: string }>; - clickSyncedTabsSidebar: GleanEventWithExtras<{ filter?: string; tab_pos?: string }>; + clickFxaAppMenu: GleanEventWithExtras<{ + filter?: string; + tab_pos?: string; + }>; + clickFxaAvatarMenu: GleanEventWithExtras<{ + filter?: string; + tab_pos?: string; + }>; + clickSyncedTabsSidebar: GleanEventWithExtras<{ + filter?: string; + tab_pos?: string; + }>; }; browserTabclose: { @@ -2651,7 +2905,9 @@ interface GleanImpl { linkHandling: { openFromExternalApp: GleanEventWithExtras<{ next_to_active_tab?: string }>; - openNextToActiveTabSettingsChange: GleanEventWithExtras<{ checked?: string }>; + openNextToActiveTabSettingsChange: GleanEventWithExtras<{ + checked?: string; + }>; openNextToActiveTabSettingsEnabled: GleanBoolean; }; @@ -2686,7 +2942,12 @@ interface GleanImpl { | "ungroup", GleanCounter >; - reopen: GleanEventWithExtras<{ id?: string; layout?: string; source?: string; type?: string }>; + reopen: GleanEventWithExtras<{ + id?: string; + layout?: string; + source?: string; + type?: string; + }>; save: GleanEventWithExtras<{ id?: string; user_triggered?: string }>; savedGroups: GleanQuantity; smartTab: GleanEventWithExtras<{ enabled?: string }>; @@ -2730,8 +2991,14 @@ interface GleanImpl { | "reorder", GleanCounter >; - tabsPerActiveGroup: Record<"average" | "max" | "median" | "min", GleanQuantity>; - tabsPerSavedGroup: Record<"average" | "max" | "median" | "min", GleanQuantity>; + tabsPerActiveGroup: Record< + "average" | "max" | "median" | "min", + GleanQuantity + >; + tabsPerSavedGroup: Record< + "average" | "max" | "median" | "min", + GleanQuantity + >; ungroup: GleanEventWithExtras<{ source?: string }>; }; @@ -2870,7 +3137,11 @@ interface GleanImpl { }>; exposure: GleanEventWithExtras<{ results?: string; terminal?: string }>; heuristicResultMissing: GleanRate; - keywordExposure: GleanEventWithExtras<{ keyword?: string; result?: string; terminal?: string }>; + keywordExposure: GleanEventWithExtras<{ + keyword?: string; + result?: string; + terminal?: string; + }>; prefMaxResults: GleanQuantity; prefSuggestAll: GleanBoolean; prefSuggestOnlineAvailable: GleanBoolean; @@ -2967,7 +3238,11 @@ interface GleanImpl { }; browserUsage: { - interaction: GleanEventWithExtras<{ flow_id?: string; source?: string; widget_id?: string }>; + interaction: GleanEventWithExtras<{ + flow_id?: string; + source?: string; + widget_id?: string; + }>; }; contextualServices: { @@ -2975,7 +3250,10 @@ interface GleanImpl { }; homepage: { - preferenceIgnore: GleanEventWithExtras<{ value?: string; webExtensionId?: string }>; + preferenceIgnore: GleanEventWithExtras<{ + value?: string; + webExtensionId?: string; + }>; }; installation: { @@ -3155,7 +3433,10 @@ interface GleanImpl { }; devtoolsInspector: { - fonteditorFontTypeDisplayed: Record<"nonvariable" | "variable", GleanCounter>; + fonteditorFontTypeDisplayed: Record< + "nonvariable" | "variable", + GleanCounter + >; newRootToReloadDelay: GleanTimingDistribution; nodeSelectionCount: GleanCounter; numberOfCssGridsInAPage: GleanCustomDistribution; @@ -3218,8 +3499,14 @@ interface GleanImpl { value?: string; width?: string; }>; - addBreakpointDebugger: GleanEventWithExtras<{ session_id?: string; value?: string }>; - blackboxDebugger: GleanEventWithExtras<{ session_id?: string; value?: string }>; + addBreakpointDebugger: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + blackboxDebugger: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; closeAdbgAboutdebugging: GleanEventWithExtras<{ session_id?: string; value?: string; @@ -3239,7 +3526,10 @@ interface GleanImpl { status?: string; value?: string; }>; - continueDebugger: GleanEventWithExtras<{ session_id?: string; value?: string }>; + continueDebugger: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; deactivateResponsiveDesign: GleanEventWithExtras<{ host?: string; session_id?: string; @@ -3270,8 +3560,14 @@ interface GleanImpl { time_open?: string; value?: string; }>; - editResendNetmonitor: GleanEventWithExtras<{ session_id?: string; value?: string }>; - editRuleRuleview: GleanEventWithExtras<{ session_id?: string; value?: string }>; + editResendNetmonitor: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + editRuleRuleview: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; enterAccessibility: GleanEventWithExtras<{ cold?: string; host?: string; @@ -3678,9 +3974,18 @@ interface GleanImpl { target_type?: string; value?: string; }>; - jumpToDefinitionWebconsole: GleanEventWithExtras<{ session_id?: string; value?: string }>; - jumpToSourceWebconsole: GleanEventWithExtras<{ session_id?: string; value?: string }>; - objectExpandedWebconsole: GleanEventWithExtras<{ session_id?: string; value?: string }>; + jumpToDefinitionWebconsole: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + jumpToSourceWebconsole: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + objectExpandedWebconsole: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; openAdbgAboutdebugging: GleanEventWithExtras<{ session_id?: string; value?: string; @@ -3708,10 +4013,22 @@ interface GleanImpl { session_id?: string; value?: string; }>; - persistChangedNetmonitor: GleanEventWithExtras<{ session_id?: string; value?: string }>; - persistChangedWebconsole: GleanEventWithExtras<{ session_id?: string; value?: string }>; - prettyPrintDebugger: GleanEventWithExtras<{ session_id?: string; value?: string }>; - removeBreakpointDebugger: GleanEventWithExtras<{ session_id?: string; value?: string }>; + persistChangedNetmonitor: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + persistChangedWebconsole: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + prettyPrintDebugger: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; + removeBreakpointDebugger: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; reverseSearchWebconsole: GleanEventWithExtras<{ functionality?: string; session_id?: string; @@ -3761,7 +4078,10 @@ interface GleanImpl { session_id?: string; value?: string; }>; - selectWsFrameNetmonitor: GleanEventWithExtras<{ session_id?: string; value?: string }>; + selectWsFrameNetmonitor: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; showProfilerAboutdebugging: GleanEventWithExtras<{ runtime_id?: string; session_id?: string; @@ -3781,7 +4101,10 @@ interface GleanImpl { session_id?: string; value?: string; }>; - startWorkerApplication: GleanEventWithExtras<{ session_id?: string; value?: string }>; + startWorkerApplication: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; throttleChangedNetmonitor: GleanEventWithExtras<{ mode?: string; session_id?: string; @@ -3829,7 +4152,10 @@ interface GleanImpl { time_open?: string; value?: string; }>; - unregisterWorkerApplication: GleanEventWithExtras<{ session_id?: string; value?: string }>; + unregisterWorkerApplication: GleanEventWithExtras<{ + session_id?: string; + value?: string; + }>; updateConnPromptAboutdebugging: GleanEventWithExtras<{ prompt_enabled?: string; runtime_id?: string; @@ -6327,7 +6653,10 @@ interface GleanImpl { mediadrm: { decryption: Record< - "has_hardware_clearlead" | "has_hardware_decryption" | "has_software_clearlead" | "has_wmf", + | "has_hardware_clearlead" + | "has_hardware_decryption" + | "has_software_clearlead" + | "has_wmf", GleanBoolean >; emePlayback: GleanEventWithExtras<{ @@ -6372,7 +6701,11 @@ interface GleanImpl { audiblePlayTimePercent: Record; codecUsed: Record; elementInPageCount: GleanCounter; - error: GleanEventWithExtras<{ error_name?: string; error_type?: string; key_system?: string }>; + error: GleanEventWithExtras<{ + error_name?: string; + error_type?: string; + key_system?: string; + }>; mediaPlayTime: Record; mkvCodecType: Record< | "AudioAac" @@ -6450,7 +6783,10 @@ interface GleanImpl { key_system?: string; mime_type?: string; }>; - deviceHardwareDecoderSupport: Record<"av1" | "h264" | "hevc" | "vp8" | "vp9", GleanBoolean>; + deviceHardwareDecoderSupport: Record< + "av1" | "h264" | "hevc" | "vp8" | "vp9", + GleanBoolean + >; firstFrameLoaded: GleanEventWithExtras<{ buffering_time?: string; decoder_name?: string; @@ -6513,8 +6849,14 @@ interface GleanImpl { mediaMp4Parse: { numSampleDescriptionEntries: GleanCustomDistribution; - sampleDescriptionEntriesHaveMultipleCodecs: Record<"false" | "true", GleanCounter>; - sampleDescriptionEntriesHaveMultipleCrypto: Record<"false" | "true", GleanCounter>; + sampleDescriptionEntriesHaveMultipleCodecs: Record< + "false" | "true", + GleanCounter + >; + sampleDescriptionEntriesHaveMultipleCrypto: Record< + "false" | "true", + GleanCounter + >; }; mfcdm: { @@ -6663,7 +7005,10 @@ interface GleanImpl { fullscreenTransitionBlack: GleanTimingDistribution; gcInProgress: GleanTimingDistribution; gcSliceDuringIdle: GleanCustomDistribution; - scriptLoadingSource: Record<"AltData" | "Inline" | "Source" | "SourceFallback", GleanCounter>; + scriptLoadingSource: Record< + "AltData" | "Inline" | "Source" | "SourceFallback", + GleanCounter + >; slowScriptNoticeCount: GleanCounter; slowScriptPageCount: GleanCounter; storageAccessApiUi: Record< @@ -6774,12 +7119,18 @@ interface GleanImpl { GleanCounter >; insecureContextPermissionRequest: GleanCounter; - permissionOrigin: Record<"first_party" | "nested_first_party" | "third_party", GleanCounter>; + permissionOrigin: Record< + "first_party" | "nested_first_party" | "third_party", + GleanCounter + >; requestPermissionOrigin: Record< "first_party" | "nested_first_party" | "third_party", GleanCounter >; - showOrigin: Record<"first_party" | "nested_first_party" | "third_party", GleanCounter>; + showOrigin: Record< + "first_party" | "nested_first_party" | "third_party", + GleanCounter + >; }; screenwakelock: { @@ -6855,7 +7206,10 @@ interface GleanImpl { mixedContent: { audio: Record< - "AudioNoUpFailure" | "AudioNoUpSuccess" | "AudioUpFailure" | "AudioUpSuccess", + | "AudioNoUpFailure" + | "AudioNoUpSuccess" + | "AudioUpFailure" + | "AudioUpSuccess", GleanCounter >; hsts: GleanCustomDistribution; @@ -6866,7 +7220,10 @@ interface GleanImpl { pageLoad: GleanCustomDistribution; unblockCounter: GleanCustomDistribution; video: Record< - "VideoNoUpFailure" | "VideoNoUpSuccess" | "VideoUpFailure" | "VideoUpSuccess", + | "VideoNoUpFailure" + | "VideoNoUpSuccess" + | "VideoUpFailure" + | "VideoUpSuccess", GleanCounter >; }; @@ -6884,13 +7241,19 @@ interface GleanImpl { scriptAllowedOpened: GleanEventNoExtras; scriptBlocked: GleanEventNoExtras; scriptBlockedOpened: GleanEventNoExtras; - scriptReported: GleanEventWithExtras<{ script_url?: string; user_email?: string }>; + scriptReported: GleanEventWithExtras<{ + script_url?: string; + user_email?: string; + }>; }; serviceWorker: { fetchEventChannelReset: Record; fetchEventDispatch: Record; - fetchEventFinishSynthesizedResponse: Record; + fetchEventFinishSynthesizedResponse: Record< + string, + GleanTimingDistribution + >; fetchInterceptionDuration: Record; isolatedLaunchTime: GleanTimingDistribution; launchTime: GleanTimingDistribution; @@ -6904,14 +7267,20 @@ interface GleanImpl { }; webauthnCreate: { - authenticatorAttachment: Record<"cross-platform" | "platform" | "unknown", GleanCounter>; + authenticatorAttachment: Record< + "cross-platform" | "platform" | "unknown", + GleanCounter + >; failure: GleanCounter; passkey: GleanCounter; success: GleanCounter; }; webauthnGet: { - authenticatorAttachment: Record<"cross-platform" | "platform" | "unknown", GleanCounter>; + authenticatorAttachment: Record< + "cross-platform" | "platform" | "unknown", + GleanCounter + >; failure: GleanCounter; success: GleanCounter; }; @@ -6926,7 +7295,10 @@ interface GleanImpl { htmleditors: { overriddenByBeforeinputListeners: Record<"false" | "true", GleanCounter>; withBeforeinputListeners: Record<"false" | "true", GleanCounter>; - withMutationObserversWithoutBeforeinputListeners: Record<"false" | "true", GleanCounter>; + withMutationObserversWithoutBeforeinputListeners: Record< + "false" | "true", + GleanCounter + >; }; permissions: { @@ -7013,11 +7385,23 @@ interface GleanImpl { gfxContent: { fullPaintTime: GleanTimingDistribution; - largePaintPhaseWeightFull: Record<"dl" | "fb" | "sb" | "wrdl", GleanCustomDistribution>; - largePaintPhaseWeightPartial: Record<"dl" | "fb" | "sb" | "wrdl", GleanCustomDistribution>; + largePaintPhaseWeightFull: Record< + "dl" | "fb" | "sb" | "wrdl", + GleanCustomDistribution + >; + largePaintPhaseWeightPartial: Record< + "dl" | "fb" | "sb" | "wrdl", + GleanCustomDistribution + >; paintTime: GleanTimingDistribution; - smallPaintPhaseWeightFull: Record<"dl" | "fb" | "sb" | "wrdl", GleanCustomDistribution>; - smallPaintPhaseWeightPartial: Record<"dl" | "fb" | "sb" | "wrdl", GleanCustomDistribution>; + smallPaintPhaseWeightFull: Record< + "dl" | "fb" | "sb" | "wrdl", + GleanCustomDistribution + >; + smallPaintPhaseWeightPartial: Record< + "dl" | "fb" | "sb" | "wrdl", + GleanCustomDistribution + >; }; gfxContentFrameTime: { @@ -7061,7 +7445,10 @@ interface GleanImpl { }; gpuProcess: { - crashFallbacks: Record<"decoding_disabled" | "disabled" | "none", GleanCounter>; + crashFallbacks: Record< + "decoding_disabled" | "disabled" | "none", + GleanCounter + >; featureStatus: GleanString; initializationTime: GleanTimingDistribution; launchTime: GleanTimingDistribution; @@ -7114,7 +7501,10 @@ interface GleanImpl { | "unsup_feature", GleanCounter >; - bitDepth: Record<"color_10" | "color_12" | "color_16" | "color_8" | "unknown", GleanCounter>; + bitDepth: Record< + "color_10" | "color_12" | "color_16" | "color_8" | "unknown", + GleanCounter + >; cicpCp: Record< | "bt2020" | "bt470bg" @@ -7231,7 +7621,10 @@ interface GleanImpl { pasp: Record<"absent" | "invalid" | "nonsquare" | "square", GleanCounter>; pixi: Record<"absent" | "bitstream_mismatch" | "valid", GleanCounter>; sequence: Record<"absent" | "present", GleanCounter>; - yuvColorSpace: Record<"bt2020" | "bt601" | "bt709" | "identity" | "unknown", GleanCounter>; + yuvColorSpace: Record< + "bt2020" | "bt601" | "bt709" | "identity" | "unknown", + GleanCounter + >; }; imageDecode: { @@ -7665,7 +8058,10 @@ interface GleanImpl { slowScriptWarning: { notifyDelay: GleanTimingDistribution; - shownBrowser: GleanEventWithExtras<{ hang_duration?: string; uri_type?: string }>; + shownBrowser: GleanEventWithExtras<{ + hang_duration?: string; + uri_type?: string; + }>; shownContent: GleanEventWithExtras<{ end_reason?: string; hang_duration?: string; @@ -7791,14 +8187,29 @@ interface GleanImpl { }; network: { - cacheEntryCount: Record<"SMARTSIZE" | "USERDEFINEDSIZE", GleanCustomDistribution>; + cacheEntryCount: Record< + "SMARTSIZE" | "USERDEFINEDSIZE", + GleanCustomDistribution + >; cacheEntryCountShare: Record< - "IMAGE" | "JAVASCRIPT" | "MEDIA" | "OTHER" | "STYLESHEET" | "UNKNOWN" | "WASM", + | "IMAGE" + | "JAVASCRIPT" + | "MEDIA" + | "OTHER" + | "STYLESHEET" + | "UNKNOWN" + | "WASM", GleanCustomDistribution >; cacheSize: Record<"SMARTSIZE" | "USERDEFINEDSIZE", GleanMemoryDistribution>; cacheSizeShare: Record< - "IMAGE" | "JAVASCRIPT" | "MEDIA" | "OTHER" | "STYLESHEET" | "UNKNOWN" | "WASM", + | "IMAGE" + | "JAVASCRIPT" + | "MEDIA" + | "OTHER" + | "STYLESHEET" + | "UNKNOWN" + | "WASM", GleanCustomDistribution >; cacheV2InputStreamStatus: GleanCustomDistribution; @@ -7826,7 +8237,10 @@ interface GleanImpl { GleanCounter >; alpnMismatchCount: Record; - asyncOpenChildToTransactionPendingExp: Record; + asyncOpenChildToTransactionPendingExp: Record< + string, + GleanTimingDistribution + >; backPressureSuspensionCpType: GleanCustomDistribution; backPressureSuspensionDelayTime: GleanTimingDistribution; backPressureSuspensionRate: Record< @@ -7842,7 +8256,10 @@ interface GleanImpl { completeLoad: GleanTimingDistribution; completeLoadCached: GleanTimingDistribution; completeLoadNet: GleanTimingDistribution; - corsAuthorizationHeader: Record<"allowed" | "covered_by_wildcard" | "disallowed", GleanCounter>; + corsAuthorizationHeader: Record< + "allowed" | "covered_by_wildcard" | "disallowed", + GleanCounter + >; dnsEnd: GleanTimingDistribution; dnsEndToConnectStartExp: Record; dnsStart: GleanTimingDistribution; @@ -7850,27 +8267,47 @@ interface GleanImpl { firstSentToLastReceived: GleanTimingDistribution; fontDownloadEnd: GleanTimingDistribution; http3CompleteLoad: Record< - "supports_http3_page" | "supports_http3_sub" | "uses_http3_page" | "uses_http3_sub", + | "supports_http3_page" + | "supports_http3_sub" + | "uses_http3_page" + | "uses_http3_sub", GleanTimingDistribution >; http3FirstSentToLastReceived: Record< - "supports_http3_page" | "supports_http3_sub" | "uses_http3_page" | "uses_http3_sub", + | "supports_http3_page" + | "supports_http3_sub" + | "uses_http3_page" + | "uses_http3_sub", GleanTimingDistribution >; http3OpenToFirstReceived: Record< - "supports_http3_page" | "supports_http3_sub" | "uses_http3_page" | "uses_http3_sub", + | "supports_http3_page" + | "supports_http3_sub" + | "uses_http3_page" + | "uses_http3_sub", GleanTimingDistribution >; http3OpenToFirstSent: Record< - "supports_http3_page" | "supports_http3_sub" | "uses_http3_page" | "uses_http3_sub", + | "supports_http3_page" + | "supports_http3_sub" + | "uses_http3_page" + | "uses_http3_sub", GleanTimingDistribution >; http3TlsHandshake: Record< - "supports_http3_page" | "supports_http3_sub" | "uses_http3_page" | "uses_http3_sub", + | "supports_http3_page" + | "supports_http3_sub" + | "uses_http3_page" + | "uses_http3_sub", GleanTimingDistribution >; httpFetchDuration: Record< - "h1_cloudflare" | "h1_others" | "h2_cloudflare" | "h2_others" | "h3_cloudflare" | "h3_others", + | "h1_cloudflare" + | "h1_others" + | "h2_cloudflare" + | "h2_others" + | "h3_cloudflare" + | "h3_others", GleanTimingDistribution >; httpRevalidation: GleanTimingDistribution; @@ -8213,7 +8650,10 @@ interface GleanImpl { trrRelevantSkipReasonNativeFailed: Record; trrRelevantSkipReasonNativeSuccess: Record; trrRelevantSkipReasonTrrFirst: Record; - trrRelevantSkipReasonTrrFirstTypeRec: Record; + trrRelevantSkipReasonTrrFirstTypeRec: Record< + string, + GleanCustomDistribution + >; trrSkipReasonNativeFailed: Record; trrSkipReasonNativeSuccess: Record; trrSkipReasonRetryFailed: Record; @@ -8270,7 +8710,14 @@ interface GleanImpl { prefetchIgnoreReason: GleanCustomDistribution; prefetchTime: GleanTimingDistribution; prefetchUseStatus: Record< - "Auth" | "Etag" | "Expired" | "Not200" | "Redirect" | "Used" | "WaitedTooLong" | "WouldVary", + | "Auth" + | "Etag" + | "Expired" + | "Not200" + | "Redirect" + | "Used" + | "WaitedTooLong" + | "WouldVary", GleanCounter >; subresourceDegradation: GleanCustomDistribution; @@ -8296,7 +8743,10 @@ interface GleanImpl { dnsHttpssvcRecordReceivingStage: GleanCustomDistribution; dntUsage: GleanCustomDistribution; echconfigSuccessRate: Record< - "EchConfigFailed" | "EchConfigSucceeded" | "NoEchConfigFailed" | "NoEchConfigSucceeded", + | "EchConfigFailed" + | "EchConfigSucceeded" + | "NoEchConfigFailed" + | "NoEchConfigSucceeded", GleanCounter >; http2FailBeforeSettings: Record<"false" | "true", GleanCounter>; @@ -8370,14 +8820,25 @@ interface GleanImpl { netwerk: { http30rttState: Record< - "conn_closed_by_necko" | "conn_error" | "not_used" | "rejected" | "succeeded", + | "conn_closed_by_necko" + | "conn_error" + | "not_used" + | "rejected" + | "succeeded", GleanCounter >; http30rttStateDuration: Record< - "conn_closed_by_necko" | "conn_error" | "not_used" | "rejected" | "succeeded", + | "conn_closed_by_necko" + | "conn_error" + | "not_used" + | "rejected" + | "succeeded", + GleanTimingDistribution + >; + http3TimeToReuseIdleConnection: Record< + "failed" | "succeeded", GleanTimingDistribution >; - http3TimeToReuseIdleConnection: Record<"failed" | "succeeded", GleanTimingDistribution>; parentConnectTimeout: GleanCounter; }; @@ -8481,7 +8942,12 @@ interface GleanImpl { certVerifier: { certRevocationMechanisms: Record< - "CRLite" | "CachedOCSP" | "OCSP" | "OneCRL" | "ShortValidity" | "StapledOCSP", + | "CRLite" + | "CachedOCSP" + | "OCSP" + | "OneCRL" + | "ShortValidity" + | "StapledOCSP", GleanCounter >; crliteStatus: Record< @@ -8555,7 +9021,10 @@ interface GleanImpl { pkcs11: { externalTrustAnchorModuleLoaded: GleanBoolean; thirdPartyModuleProfileEntries: GleanStringList; - thirdPartyModuleSignatureType: GleanEventWithExtras<{ filename?: string; signature?: string }>; + thirdPartyModuleSignatureType: GleanEventWithExtras<{ + filename?: string; + signature?: string; + }>; thirdPartyModulesLoaded: GleanQuantity; }; @@ -8581,7 +9050,10 @@ interface GleanImpl { sctsOrigin: GleanCustomDistribution; sctsPerConnection: GleanCustomDistribution; sctsVerificationStatus: GleanCustomDistribution; - timeUntilHandshakeFinishedKeyedByKa: Record; + timeUntilHandshakeFinishedKeyedByKa: Record< + string, + GleanTimingDistribution + >; timeUntilReady: GleanTimingDistribution; timeUntilReadyConservative: GleanTimingDistribution; timeUntilReadyEch: GleanTimingDistribution; @@ -8690,8 +9162,16 @@ interface GleanImpl { server_time?: string; stream_id?: string; }>; - connectAccount: GleanEventWithExtras<{ fxa?: string; sync?: string; value?: string }>; - disconnectAccount: GleanEventWithExtras<{ fxa?: string; sync?: string; value?: string }>; + connectAccount: GleanEventWithExtras<{ + fxa?: string; + sync?: string; + value?: string; + }>; + disconnectAccount: GleanEventWithExtras<{ + fxa?: string; + sync?: string; + value?: string; + }>; sendtabReceived: GleanEventWithExtras<{ flow_id?: string; hashed_device_id?: string; @@ -8710,7 +9190,10 @@ interface GleanImpl { syncSettings: { openChooseWhatToSyncMenu: GleanEventWithExtras<{ why?: string }>; - save: GleanEventWithExtras<{ disabled_engines?: string; enabled_engines?: string }>; + save: GleanEventWithExtras<{ + disabled_engines?: string; + enabled_engines?: string; + }>; }; fxaAppMenu: { @@ -8902,7 +9385,10 @@ interface GleanImpl { }; syncMergeDialog: { - clicked: GleanEventWithExtras<{ option_clicked?: string; variant_shown?: string }>; + clicked: GleanEventWithExtras<{ + option_clicked?: string; + variant_shown?: string; + }>; }; syncs: { @@ -8946,10 +9432,16 @@ interface GleanImpl { >; category: GleanQuantity; cookieBehavior: GleanCustomDistribution; - cryptominersBlockedCount: Record<"allowed" | "blocked" | "pageLoad", GleanCounter>; + cryptominersBlockedCount: Record< + "allowed" | "blocked" | "pageLoad", + GleanCounter + >; cryptominingBlockingEnabled: GleanBoolean; emailTrackerCount: Record< - "base_email_webapp" | "base_normal" | "content_email_webapp" | "content_normal", + | "base_email_webapp" + | "base_normal" + | "content_email_webapp" + | "content_normal", GleanCounter >; emailTrackerEmbeddedPerTab: Record< @@ -8961,7 +9453,10 @@ interface GleanImpl { | "content_normal", GleanCustomDistribution >; - fingerprintersBlockedCount: Record<"allowed" | "blocked" | "pageLoad", GleanCounter>; + fingerprintersBlockedCount: Record< + "allowed" | "blocked" | "pageLoad", + GleanCounter + >; fingerprintingBlockingEnabled: GleanBoolean; fontFingerprintingPerTab: Record<"false" | "true", GleanCounter>; queryStrippingCount: Record< @@ -9442,7 +9937,10 @@ interface GleanImpl { cancelCaptureDoorhanger: GleanEventWithExtras<{ value?: string }>; cancelEditDoorhanger: GleanEventWithExtras<{ value?: string }>; cancelUpdateDoorhanger: GleanEventWithExtras<{ value?: string }>; - clearedAddressForm: GleanEventWithExtras<{ field_name?: string; value?: string }>; + clearedAddressForm: GleanEventWithExtras<{ + field_name?: string; + value?: string; + }>; deleteManage: GleanEventWithExtras<{ value?: string }>; detectedAddressForm: GleanEventWithExtras<{ address_level1?: string; @@ -9523,7 +10021,10 @@ interface GleanImpl { learnMoreCaptureDoorhanger: GleanEventWithExtras<{ value?: string }>; learnMoreEditDoorhanger: GleanEventWithExtras<{ value?: string }>; learnMoreUpdateDoorhanger: GleanEventWithExtras<{ value?: string }>; - popupShownAddressForm: GleanEventWithExtras<{ field_name?: string; value?: string }>; + popupShownAddressForm: GleanEventWithExtras<{ + field_name?: string; + value?: string; + }>; prefCaptureDoorhanger: GleanEventWithExtras<{ value?: string }>; prefEditDoorhanger: GleanEventWithExtras<{ value?: string }>; prefUpdateDoorhanger: GleanEventWithExtras<{ value?: string }>; @@ -9664,7 +10165,10 @@ interface GleanImpl { formautofill: { availability: GleanBoolean; formSubmissionHeuristic: Record< - "form-removal-after-fetch" | "form-submit-event" | "iframe-pagehide" | "page-navigation", + | "form-removal-after-fetch" + | "form-submit-event" + | "iframe-pagehide" + | "page-navigation", GleanCounter >; iframeLayoutDetection: GleanEventWithExtras<{ @@ -9677,7 +10181,10 @@ interface GleanImpl { sandboxed?: string; }>; osAuthEnabled: GleanBoolean; - promptShownOsReauth: GleanEventWithExtras<{ result?: string; trigger?: string }>; + promptShownOsReauth: GleanEventWithExtras<{ + result?: string; + trigger?: string; + }>; requireOsReauthToggle: GleanEventWithExtras<{ toggle_state?: string }>; }; @@ -9700,7 +10207,10 @@ interface GleanImpl { initsDuringShutdown: GleanCounter; maxPingsPerMinute: GleanQuantity; subdirEntryErr: Record<"db" | "events" | "pending_pings", GleanCounter>; - subdirEntryMetadataErr: Record<"db" | "events" | "pending_pings", GleanCounter>; + subdirEntryMetadataErr: Record< + "db" | "events" | "pending_pings", + GleanCounter + >; subdirErr: Record<"db" | "events" | "pending_pings", GleanBoolean>; }; @@ -9735,13 +10245,19 @@ interface GleanImpl { keyedMobileOnly: Record; keyedReleaseOptin: Record; keyedReleaseOptout: Record; - mabelsBalloonLabels: Record<"celebratory" | "celebratory_and_snarky", GleanString>; + mabelsBalloonLabels: Record< + "celebratory" | "celebratory_and_snarky", + GleanString + >; mabelsBalloonStrings: Record; mabelsBathroomCounters: Record; mabelsCustomLabelLengths: Record; mabelsKitchenCounters: Record; mabelsLabelMaker: Record; - mabelsLabeledCounters: Record<"1st_counter" | "clean" | "next_to_the_fridge", GleanCounter>; + mabelsLabeledCounters: Record< + "1st_counter" | "clean" | "next_to_the_fridge", + GleanCounter + >; mabelsLikeBalloons: Record; mabelsLikeLabeledBalloons: Record<"birthday_party" | "water", GleanBoolean>; mainOnly: GleanQuantity; @@ -9784,7 +10300,11 @@ interface GleanImpl { aTimingDist: GleanTimingDistribution; aUrl: GleanUrl; aUuid: GleanUuid; - anEvent: GleanEventWithExtras<{ extra1?: string; extra2?: string; value?: string }>; + anEvent: GleanEventWithExtras<{ + extra1?: string; + extra2?: string; + value?: string; + }>; anExternalDenominator: GleanDenominator; anUnorderedBool: GleanBoolean; anUnorderedLabeledBoolean: Record; @@ -9826,38 +10346,128 @@ interface GleanImpl { messagingExperiments: { reachCfr: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFeatureCallout: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsBmbButton: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage1: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage10: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage11: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage12: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage13: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage14: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage15: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage16: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage17: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage18: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage19: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage2: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage20: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage21: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage22: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage23: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage24: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage25: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage3: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage4: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage5: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage6: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage7: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage8: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachFxmsMessage9: GleanEventWithExtras<{ branches?: string; value?: string }>; + reachFeatureCallout: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsBmbButton: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage1: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage10: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage11: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage12: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage13: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage14: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage15: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage16: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage17: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage18: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage19: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage2: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage20: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage21: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage22: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage23: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage24: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage25: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage3: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage4: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage5: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage6: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage7: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage8: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; + reachFxmsMessage9: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; reachInfobar: GleanEventWithExtras<{ branches?: string; value?: string }>; - reachMomentsPage: GleanEventWithExtras<{ branches?: string; value?: string }>; + reachMomentsPage: GleanEventWithExtras<{ + branches?: string; + value?: string; + }>; reachSpotlight: GleanEventWithExtras<{ branches?: string; value?: string }>; - targetingAttributeError: GleanEventWithExtras<{ source?: string; value?: string }>; - targetingAttributeTimeout: GleanEventWithExtras<{ source?: string; value?: string }>; + targetingAttributeError: GleanEventWithExtras<{ + source?: string; + value?: string; + }>; + targetingAttributeTimeout: GleanEventWithExtras<{ + source?: string; + value?: string; + }>; }; firefoxAiRuntime: { @@ -9985,7 +10595,11 @@ interface GleanImpl { nimbusEvents: { databaseWrite: GleanEventWithExtras<{ success?: string }>; - enrollFailed: GleanEventWithExtras<{ branch?: string; experiment?: string; reason?: string }>; + enrollFailed: GleanEventWithExtras<{ + branch?: string; + experiment?: string; + reason?: string; + }>; enrollment: GleanEventWithExtras<{ branch?: string; experiment?: string; @@ -9999,7 +10613,11 @@ interface GleanImpl { slug?: string; status?: string; }>; - exposure: GleanEventWithExtras<{ branch?: string; experiment?: string; feature_id?: string }>; + exposure: GleanEventWithExtras<{ + branch?: string; + experiment?: string; + feature_id?: string; + }>; isReady: GleanEventNoExtras; migration: GleanEventWithExtras<{ enrollments?: string; @@ -10021,7 +10639,10 @@ interface GleanImpl { total_store_count?: string; trigger?: string; }>; - unenrollFailed: GleanEventWithExtras<{ experiment?: string; reason?: string }>; + unenrollFailed: GleanEventWithExtras<{ + experiment?: string; + reason?: string; + }>; unenrollment: GleanEventWithExtras<{ branch?: string; changed_pref?: string; @@ -10430,12 +11051,30 @@ interface GleanImpl { pwmgr: { autocompleteFieldGeneratedpassword: GleanEventNoExtras; autocompleteShownGeneratedpassword: GleanEventNoExtras; - cancelExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - cancelNewLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - copyPassword: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - copyUsername: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - deleteExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - deleteNewLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + cancelExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + cancelNewLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + copyPassword: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + copyUsername: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + deleteExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + deleteNewLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; doorhangerSubmittedSave: GleanEventWithExtras<{ did_edit_pw?: string; did_edit_un?: string; @@ -10448,7 +11087,10 @@ interface GleanImpl { did_select_pw?: string; did_select_un?: string; }>; - editExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + editExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; filledFieldEditedGeneratedpassword: GleanEventNoExtras; filterList: GleanEventNoExtras; formAutofillResult: Record< @@ -10469,13 +11111,19 @@ interface GleanImpl { | "type_no_longer_password", GleanCounter >; - hidePassword: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + hidePassword: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; importLoginsFromFileCategorical: Record< "added" | "error" | "modified" | "no_change", GleanCounter >; isUsernameOnlyForm: Record<"false" | "true", GleanCounter>; - learnMoreVulnExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + learnMoreVulnExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; loginPageSafety: GleanCustomDistribution; mgmtMenuItemUsedExport: GleanEventNoExtras; mgmtMenuItemUsedExportComplete: GleanEventNoExtras; @@ -10495,11 +11143,17 @@ interface GleanImpl { openManagementPageinfo: GleanEventNoExtras; openManagementPreferences: GleanEventNoExtras; openManagementSnippet: GleanEventNoExtras; - openSiteExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + openSiteExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; osAuthEnabled: GleanBoolean; potentiallyBreachedPasswords: GleanQuantity; promptRememberAction: GleanCustomDistribution; - promptShownOsReauth: GleanEventWithExtras<{ result?: string; trigger?: string }>; + promptShownOsReauth: GleanEventWithExtras<{ + result?: string; + trigger?: string; + }>; promptUpdateAction: GleanCustomDistribution; reauthenticateMasterPassword: GleanEventWithExtras<{ auto_admin?: string; @@ -10517,7 +11171,10 @@ interface GleanImpl { operation?: string; run_id?: string; }>; - rustMigrationFailure: GleanEventWithExtras<{ error_message?: string; run_id?: string }>; + rustMigrationFailure: GleanEventWithExtras<{ + error_message?: string; + run_id?: string; + }>; rustMigrationStatus: GleanEventWithExtras<{ duration_ms?: string; had_errors?: string; @@ -10532,34 +11189,64 @@ interface GleanImpl { run_id?: string; status?: string; }>; - saveExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - saveNewLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + saveExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + saveNewLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; savedLoginUsedAuthLogin: GleanEventWithExtras<{ filled?: string }>; savedLoginUsedFormLogin: GleanEventWithExtras<{ filled?: string }>; savedLoginUsedFormPassword: GleanEventWithExtras<{ filled?: string }>; savedLoginUsedPromptLogin: GleanEventWithExtras<{ filled?: string }>; savingEnabled: GleanBoolean; - selectExistingLogin: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; - showPassword: GleanEventWithExtras<{ breached?: string; vulnerable?: string }>; + selectExistingLogin: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; + showPassword: GleanEventWithExtras<{ + breached?: string; + vulnerable?: string; + }>; signupFormDetection: GleanTimingDistribution; sortList: GleanEventWithExtras<{ sort_key?: string }>; }; relayIntegration: { - clickedFillUsername: GleanEventWithExtras<{ error_code?: string; value?: string }>; - clickedOfferRelay: GleanEventWithExtras<{ scenario?: string; value?: string }>; + clickedFillUsername: GleanEventWithExtras<{ + error_code?: string; + value?: string; + }>; + clickedOfferRelay: GleanEventWithExtras<{ + scenario?: string; + value?: string; + }>; disabledOptInPanel: GleanEventWithExtras<{ value?: string }>; disabledPrefChange: GleanEventNoExtras; enabledOptInPanel: GleanEventWithExtras<{ value?: string }>; enabledPrefChange: GleanEventNoExtras; getUnlimitedMasksReusePanel: GleanEventWithExtras<{ value?: string }>; - placedEmailMask: GleanEventWithExtras<{ error_code?: string; value?: string }>; + placedEmailMask: GleanEventWithExtras<{ + error_code?: string; + value?: string; + }>; postponedOptInPanel: GleanEventWithExtras<{ value?: string }>; reuseMaskReusePanel: GleanEventWithExtras<{ value?: string }>; - shownFillUsername: GleanEventWithExtras<{ error_code?: string; value?: string }>; - shownOfferRelay: GleanEventWithExtras<{ scenario?: string; value?: string }>; + shownFillUsername: GleanEventWithExtras<{ + error_code?: string; + value?: string; + }>; + shownOfferRelay: GleanEventWithExtras<{ + scenario?: string; + value?: string; + }>; shownOptInPanel: GleanEventWithExtras<{ value?: string }>; - shownReusePanel: GleanEventWithExtras<{ error_code?: string; value?: string }>; + shownReusePanel: GleanEventWithExtras<{ + error_code?: string; + value?: string; + }>; }; pdfjs: { @@ -10583,7 +11270,10 @@ interface GleanImpl { | "view_bookmark", GleanCounter >; - editing: Record<"freetext" | "ink" | "print" | "save" | "signature" | "stamp", GleanCounter>; + editing: Record< + "freetext" | "ink" | "print" | "save" | "signature" | "stamp", + GleanCounter + >; geckoview: Record< | "download_failed" | "download_succeeded" @@ -10621,8 +11311,14 @@ interface GleanImpl { deleted: GleanCounter; edited: GleanCounter; kind: Record<"free_highlight" | "highlight", GleanCounter>; - method: Record<"context_menu" | "floating_button" | "main_toolbar", GleanCounter>; - numberOfColors: Record<"five" | "four" | "one" | "three" | "two", GleanCounter>; + method: Record< + "context_menu" | "floating_button" | "main_toolbar", + GleanCounter + >; + numberOfColors: Record< + "five" | "four" | "one" | "three" | "two", + GleanCounter + >; print: GleanCounter; save: GleanCounter; thickness: GleanCustomDistribution; @@ -10635,7 +11331,10 @@ interface GleanImpl { added: Record<"with_alt_text" | "without_alt_text", GleanCounter>; altTextEdit: Record<"ai_generation" | "ask_to_edit", GleanBoolean>; iconClick: GleanEventNoExtras; - imageAdded: GleanEventWithExtras<{ alt_text_modal?: string; alt_text_type?: string }>; + imageAdded: GleanEventWithExtras<{ + alt_text_modal?: string; + alt_text_type?: string; + }>; imageSelected: GleanEventWithExtras<{ alt_text_modal?: string }>; }; @@ -10664,7 +11363,10 @@ interface GleanImpl { }; pdfjsSignature: { - added: GleanEventWithExtras<{ has_alt_text?: string; has_no_alt_text?: string }>; + added: GleanEventWithExtras<{ + has_alt_text?: string; + has_no_alt_text?: string; + }>; clear: Record<"draw" | "text" | "type", GleanCounter>; created: GleanEventWithExtras<{ description_changed?: string; @@ -10674,7 +11376,10 @@ interface GleanImpl { }>; deleteSaved: GleanEventWithExtras<{ saved_count?: string }>; editDescription: Record<"saved" | "unsaved", GleanCounter>; - inserted: GleanEventWithExtras<{ has_been_saved?: string; has_description?: string }>; + inserted: GleanEventWithExtras<{ + has_been_saved?: string; + has_description?: string; + }>; }; pictureinpicture: { @@ -10730,7 +11435,11 @@ interface GleanImpl { disableDialog?: string; firstTimeToggle?: string; }>; - resizePlayer: GleanEventWithExtras<{ height?: string; value?: string; width?: string }>; + resizePlayer: GleanEventWithExtras<{ + height?: string; + value?: string; + width?: string; + }>; sawToggleToggle: GleanEventWithExtras<{ firstTime?: string }>; subtitlesShownSubtitles: GleanEventWithExtras<{ webVTTSubtitles?: string }>; toggleEnabled: GleanBoolean; @@ -10813,7 +11522,10 @@ interface GleanImpl { previewOpenedTm: GleanCounter; settingsChanged: Record; silentPrint: GleanCounter; - targetType: Record<"pdf_file" | "pdf_unknown" | "unknown" | "xps_file", GleanCounter>; + targetType: Record< + "pdf_file" | "pdf_unknown" | "unknown" | "xps_file", + GleanCounter + >; }; power: { @@ -10840,7 +11552,12 @@ interface GleanImpl { GleanCounter >; cpuTimePerTrackerTypeMs: Record< - "ad" | "analytics" | "cryptomining" | "fingerprinting" | "social" | "unknown", + | "ad" + | "analytics" + | "cryptomining" + | "fingerprinting" + | "social" + | "unknown", GleanCounter >; energyPerProcessType: Record< @@ -12350,9 +13067,16 @@ interface GleanImpl { }; applicationReputation: { - binaryArchive: Record<"DmgFile" | "OtherBinaryFile" | "RarFile" | "ZipFile", GleanCounter>; + binaryArchive: Record< + "DmgFile" | "OtherBinaryFile" | "RarFile" | "ZipFile", + GleanCounter + >; binaryType: Record< - "BinaryFile" | "MissingFilename" | "MozNonBinaryFile" | "NonBinaryFile" | "UnknownFile", + | "BinaryFile" + | "MissingFilename" + | "MozNonBinaryFile" + | "NonBinaryFile" + | "UnknownFile", GleanCounter >; local: GleanCustomDistribution; @@ -12874,9 +13598,21 @@ interface GleanImpl { }; telemetryTest: { - test1Object1: GleanEventWithExtras<{ key1?: string; key2?: string; value?: string }>; - test2Object1: GleanEventWithExtras<{ key1?: string; key2?: string; value?: string }>; - test2Object2: GleanEventWithExtras<{ key1?: string; key2?: string; value?: string }>; + test1Object1: GleanEventWithExtras<{ + key1?: string; + key2?: string; + value?: string; + }>; + test2Object1: GleanEventWithExtras<{ + key1?: string; + key2?: string; + value?: string; + }>; + test2Object2: GleanEventWithExtras<{ + key1?: string; + key2?: string; + value?: string; + }>; }; thumbnails: { @@ -12932,16 +13668,25 @@ interface GleanImpl { translationsPanel: { aboutTranslations: GleanEventWithExtras<{ flow_id?: string }>; - alwaysOfferTranslations: GleanEventWithExtras<{ flow_id?: string; toggled_on?: string }>; + alwaysOfferTranslations: GleanEventWithExtras<{ + flow_id?: string; + toggled_on?: string; + }>; alwaysTranslateLanguage: GleanEventWithExtras<{ flow_id?: string; language?: string; toggled_on?: string; }>; cancelButton: GleanEventWithExtras<{ flow_id?: string }>; - changeFromLanguage: GleanEventWithExtras<{ flow_id?: string; language?: string }>; + changeFromLanguage: GleanEventWithExtras<{ + flow_id?: string; + language?: string; + }>; changeSourceLanguageButton: GleanEventWithExtras<{ flow_id?: string }>; - changeToLanguage: GleanEventWithExtras<{ flow_id?: string; language?: string }>; + changeToLanguage: GleanEventWithExtras<{ + flow_id?: string; + language?: string; + }>; close: GleanEventWithExtras<{ flow_id?: string }>; closeFromLanguageMenu: GleanEventWithExtras<{ flow_id?: string }>; closeSettingsMenu: GleanEventWithExtras<{ flow_id?: string }>; @@ -12954,7 +13699,10 @@ interface GleanImpl { language?: string; toggled_on?: string; }>; - neverTranslateSite: GleanEventWithExtras<{ flow_id?: string; toggled_on?: string }>; + neverTranslateSite: GleanEventWithExtras<{ + flow_id?: string; + toggled_on?: string; + }>; open: GleanEventWithExtras<{ auto_show?: string; document_language?: string; @@ -12978,7 +13726,10 @@ interface GleanImpl { language?: string; previous_language?: string; }>; - changeToLanguage: GleanEventWithExtras<{ flow_id?: string; language?: string }>; + changeToLanguage: GleanEventWithExtras<{ + flow_id?: string; + language?: string; + }>; close: GleanEventWithExtras<{ flow_id?: string }>; copyButton: GleanEventWithExtras<{ flow_id?: string }>; doneButton: GleanEventWithExtras<{ flow_id?: string }>; @@ -13230,7 +13981,9 @@ interface GleanImpl { fetchTime: GleanTimingDistribution; homeRegion: GleanString; storeRegionResult: Record< - "ignoredUnitedStatesIncorrectTimezone" | "setForRestOfWorld" | "setForUnitedStates", + | "ignoredUnitedStatesIncorrectTimezone" + | "setForRestOfWorld" + | "setForUnitedStates", GleanCounter >; }; @@ -13260,7 +14013,11 @@ interface GleanImpl { }; serviceRequest: { - bypassProxyInfo: GleanEventWithExtras<{ source?: string; type?: string; value?: string }>; + bypassProxyInfo: GleanEventWithExtras<{ + source?: string; + type?: string; + value?: string; + }>; }; defaultagent: { @@ -13355,7 +14112,10 @@ interface GleanImpl { step?: string; updated_from?: string; }>; - xpistatesWriteErrors: GleanEventWithExtras<{ error_type?: string; profile_state?: string }>; + xpistatesWriteErrors: GleanEventWithExtras<{ + error_type?: string; + profile_state?: string; + }>; disableDictionary: GleanEventWithExtras<{ blocklist_state?: string; method?: string; @@ -13875,7 +14635,9 @@ interface GleanImpl { lateStack: GleanText; parses: GleanTimingDistribution; rebuilds: Record< - "XPIDB_rebuildBadJSON_MS" | "XPIDB_rebuildReadFailed_MS" | "XPIDB_rebuildUnreadableDB_MS", + | "XPIDB_rebuildBadJSON_MS" + | "XPIDB_rebuildReadFailed_MS" + | "XPIDB_rebuildUnreadableDB_MS", GleanTimingDistribution >; startupError: GleanString; @@ -14172,7 +14934,9 @@ interface GleanPingsImpl { topSites: GleanPingNoReason; profiles: GleanPingNoReason; searchWith: GleanPingNoReason; - serpCategorization: GleanPingWithReason<"inactivity" | "startup" | "threshold_reached">; + serpCategorization: GleanPingWithReason< + "inactivity" | "startup" | "threshold_reached" + >; quickSuggest: GleanPingNoReason; quickSuggestDeletionRequest: GleanPingNoReason; urlbarKeywordExposure: GleanPingNoReason; @@ -14214,7 +14978,11 @@ interface GleanPingsImpl { } type GleanEventNoExtras = Omit & { record(_?: never) }; -type GleanEventWithExtras = Omit & { record(extras: T) }; +type GleanEventWithExtras = Omit & { + record(extras: T); +}; type GleanPingNoReason = Omit & { submit(_?: never) }; -type GleanPingWithReason = Omit & { submit(reason: T) }; +type GleanPingWithReason = Omit & { + submit(reason: T); +}; diff --git a/src/zen/@types/lib.gecko.linux.d.ts b/src/zen/@types/lib.gecko.linux.d.ts index 7308bb544..e83ac5907 100644 --- a/src/zen/@types/lib.gecko.linux.d.ts +++ b/src/zen/@types/lib.gecko.linux.d.ts @@ -51,7 +51,11 @@ declare global { readonly STATE_ERROR?: 3; readonly STATE_PAUSED?: 4; - setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void; + setProgressState( + state: nsTaskbarProgressState, + currentValue?: u64, + maxValue?: u64 + ): void; } interface nsIXPCComponents_Interfaces { diff --git a/src/zen/@types/lib.gecko.nsresult.d.ts b/src/zen/@types/lib.gecko.nsresult.d.ts index 450bac34b..09ce3bd26 100644 --- a/src/zen/@types/lib.gecko.nsresult.d.ts +++ b/src/zen/@types/lib.gecko.nsresult.d.ts @@ -705,4 +705,5 @@ interface nsIXPCComponents_Results { NS_ERROR_DOM_QM_CLIENT_INIT_ORIGIN_UNINITIALIZED: 0x80730001; } -type nsIXPCComponents_Values = nsIXPCComponents_Results[keyof nsIXPCComponents_Results]; +type nsIXPCComponents_Values = + nsIXPCComponents_Results[keyof nsIXPCComponents_Results]; diff --git a/src/zen/@types/lib.gecko.tweaks.d.ts b/src/zen/@types/lib.gecko.tweaks.d.ts index 9e3b512ba..a98c0bb27 100644 --- a/src/zen/@types/lib.gecko.tweaks.d.ts +++ b/src/zen/@types/lib.gecko.tweaks.d.ts @@ -33,11 +33,15 @@ interface Document { } type nsIGleanPingNoReason = { - [K in keyof nsIGleanPing]: K extends "submit" ? (_?: never) => void : nsIGleanPing[K]; + [K in keyof nsIGleanPing]: K extends "submit" + ? (_?: never) => void + : nsIGleanPing[K]; }; type nsIGleanPingWithReason = { - [K in keyof nsIGleanPing]: K extends "submit" ? (reason: T) => void : nsIGleanPing[K]; + [K in keyof nsIGleanPing]: K extends "submit" + ? (reason: T) => void + : nsIGleanPing[K]; }; interface MessageListenerManagerMixin { diff --git a/src/zen/@types/lib.gecko.win32.d.ts b/src/zen/@types/lib.gecko.win32.d.ts index 2a8cddafd..586573ecb 100644 --- a/src/zen/@types/lib.gecko.win32.d.ts +++ b/src/zen/@types/lib.gecko.win32.d.ts @@ -56,14 +56,18 @@ declare global { } interface nsIWindowsAlertNotification - extends nsIAlertNotification, + extends + nsIAlertNotification, Enums { imagePlacement: nsIWindowsAlertNotification.ImagePlacement; } interface nsIWindowsAlertsService extends nsIAlertsService { handleWindowsTag(aWindowsTag: string): Promise; - getXmlStringForWindowsAlert(aAlert: nsIAlertNotification, aWindowsTag?: string): string; + getXmlStringForWindowsAlert( + aAlert: nsIAlertNotification, + aWindowsTag?: string + ): string; removeAllNotificationsForInstall(): void; } @@ -86,9 +90,18 @@ declare global { aNotificationAction: string, daysSinceLastAppLaunch: u32 ): void; - setDefaultBrowserUserChoice(aAumid: string, aExtraFileExtensions: string[]): void; - setDefaultBrowserUserChoiceAsync(aAumid: string, aExtraFileExtensions: string[]): Promise; - setDefaultExtensionHandlersUserChoice(aAumid: string, aFileExtensions: string[]): void; + setDefaultBrowserUserChoice( + aAumid: string, + aExtraFileExtensions: string[] + ): void; + setDefaultBrowserUserChoiceAsync( + aAumid: string, + aExtraFileExtensions: string[] + ): Promise; + setDefaultExtensionHandlersUserChoice( + aAumid: string, + aFileExtensions: string[] + ): void; agentDisabled(): boolean; } @@ -124,11 +137,13 @@ declare enum nsIWindowsShellService_LaunchOnLoginEnabledEnumerator { declare global { namespace nsIWindowsShellService { - type LaunchOnLoginEnabledEnumerator = nsIWindowsShellService_LaunchOnLoginEnabledEnumerator; + type LaunchOnLoginEnabledEnumerator = + nsIWindowsShellService_LaunchOnLoginEnabledEnumerator; } interface nsIWindowsShellService - extends nsIShellService, + extends + nsIShellService, Enums { createShortcut( aBinary: nsIFile, @@ -149,13 +164,19 @@ declare global { pinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise; checkPinCurrentAppToTaskbarAsync(aPrivateBrowsing: boolean): Promise; isCurrentAppPinnedToTaskbarAsync(aumid: string): Promise; - pinShortcutToTaskbar(aAppUserModelId: string, aShortcutPath: string): Promise; + pinShortcutToTaskbar( + aAppUserModelId: string, + aShortcutPath: string + ): Promise; createWindowsIcon(aFile: nsIFile, aContainer: imgIContainer): Promise; unpinShortcutFromTaskbar(aShortcutPath: string): void; getTaskbarTabShortcutPath(aShortcutName: string): string; getTaskbarTabPins(): string[]; classifyShortcut(aPath: string): string; - hasPinnableShortcut(aAUMID: string, aPrivateBrowsing: boolean): Promise; + hasPinnableShortcut( + aAUMID: string, + aPrivateBrowsing: boolean + ): Promise; canSetDefaultBrowserUserChoice(): boolean; checkAllProgIDsExist(): boolean; checkBrowserUserChoiceHashes(): boolean; @@ -241,7 +262,11 @@ declare global { readonly height: u32; readonly thumbnailAspectRatio: float; requestPreview(aCallback: nsITaskbarPreviewCallback): void; - requestThumbnail(aCallback: nsITaskbarPreviewCallback, width: u32, height: u32): void; + requestThumbnail( + aCallback: nsITaskbarPreviewCallback, + width: u32, + height: u32 + ): void; onClose(): void; onActivate(): boolean; onClick(button: nsITaskbarPreviewButton): void; @@ -256,7 +281,11 @@ declare global { readonly STATE_ERROR?: 3; readonly STATE_PAUSED?: 4; - setProgressState(state: nsTaskbarProgressState, currentValue?: u64, maxValue?: u64): void; + setProgressState( + state: nsTaskbarProgressState, + currentValue?: u64, + maxValue?: u64 + ): void; } // https://searchfox.org/mozilla-central/source/widget/nsITaskbarTabPreview.idl @@ -288,7 +317,9 @@ declare global { ): nsITaskbarTabPreview; getTaskbarWindowPreview(shell: nsIDocShell): nsITaskbarWindowPreview; getTaskbarProgress(shell: nsIDocShell): nsITaskbarProgress; - getOverlayIconController(shell: nsIDocShell): nsITaskbarOverlayIconController; + getOverlayIconController( + shell: nsIDocShell + ): nsITaskbarOverlayIconController; createJumpListBuilder(aPrivateBrowsing: boolean): nsIJumpListBuilder; getGroupIdForWindow(aParent: mozIDOMWindow): string; setGroupIdForWindow(aParent: mozIDOMWindow, aIdentifier: string): void; @@ -304,7 +335,11 @@ declare global { aSmallIcon: imgIContainer, aLargeIcon: imgIContainer ): void; - setWindowIconFromExe(aWindow: mozIDOMWindowProxy, aExe: string, aIndex: u16): void; + setWindowIconFromExe( + aWindow: mozIDOMWindowProxy, + aExe: string, + aIndex: u16 + ): void; setWindowIconNoData(aWindow: mozIDOMWindowProxy): void; readonly inWin10TabletMode: boolean; readonly inWin11TabletMode: boolean; diff --git a/src/zen/@types/lib.gecko.xpcom.d.ts b/src/zen/@types/lib.gecko.xpcom.d.ts index 84facb30b..b1629155c 100644 --- a/src/zen/@types/lib.gecko.xpcom.d.ts +++ b/src/zen/@types/lib.gecko.xpcom.d.ts @@ -143,7 +143,10 @@ declare global { interface nsIBitsRequest extends nsIRequest { readonly bitsId: string; readonly transferError: nsBitsErrorType; - changeMonitorInterval(monitorIntervalMs: u32, callback: nsIBitsCallback): void; + changeMonitorInterval( + monitorIntervalMs: u32, + callback: nsIBitsCallback + ): void; cancelAsync(status: nsresult, callback: nsIBitsCallback): void; setPriorityHigh(callback: nsIBitsCallback): void; setPriorityLow(callback: nsIBitsCallback): void; @@ -193,7 +196,10 @@ declare global { getAccessibleFromCache(aNode: Node): nsIAccessible; setCacheDomains(aCacheDomains: u64): void; createAccessiblePivot(aRoot: nsIAccessible): nsIAccessiblePivot; - createTextLeafPoint(aAccessible: nsIAccessible, aOffset: i32): nsIAccessibleTextLeafPoint; + createTextLeafPoint( + aAccessible: nsIAccessible, + aOffset: i32 + ): nsIAccessibleTextLeafPoint; setLogging(aModules: string): void; isLogged(aModule: string): boolean; getConsumers(): string; @@ -835,7 +841,11 @@ declare global { startOffset: OutParam, endOffset: OutParam ): void; - setSelectionBounds(selectionNum: i32, startOffset: i32, endOffset: i32): void; + setSelectionBounds( + selectionNum: i32, + startOffset: i32, + endOffset: i32 + ): void; addSelection(startOffset: i32, endOffset: i32): void; removeSelection(selectionNum: i32): void; scrollSubstringTo(startIndex: i32, endIndex: i32, scrollType: u32): void; @@ -1033,7 +1043,10 @@ declare global { aInitialWidth: i32, aInitialHeight: i32 ): nsIAppWindow; - createWindowlessBrowser(aIsChrome?: boolean, aChromeMask?: u32): nsIWindowlessBrowser; + createWindowlessBrowser( + aIsChrome?: boolean, + aChromeMask?: u32 + ): nsIWindowlessBrowser; readonly hiddenWindow: nsIAppWindow; readonly hiddenDOMWindow: mozIDOMWindowProxy; registerTopLevelWindow(aWindow: nsIAppWindow): void; @@ -1058,7 +1071,10 @@ declare global { lockAspectRatio(aShouldLock: boolean): void; chromeFlags: u32; assumeChromeFlagsAreFrozen(): void; - createNewWindow(aChromeFlags: i32, aOpenWindowInfo: nsIOpenWindowInfo): nsIAppWindow; + createNewWindow( + aChromeFlags: i32, + aOpenWindowInfo: nsIOpenWindowInfo + ): nsIAppWindow; XULBrowserWindow: nsIXULBrowserWindow; readonly initialOpenWindowInfo: nsIOpenWindowInfo; needFastSnaphot(): void; @@ -1070,7 +1086,10 @@ declare global { interface nsIWindowMediator extends nsISupports { getEnumerator(aWindowType: string): nsISimpleEnumerator; getAppWindowEnumerator(aWindowType: string): nsISimpleEnumerator; - getZOrderAppWindowEnumerator(aWindowType: string, aFrontToBack: boolean): nsISimpleEnumerator; + getZOrderAppWindowEnumerator( + aWindowType: string, + aFrontToBack: boolean + ): nsISimpleEnumerator; getMostRecentWindow(aWindowType: string): mozIDOMWindowProxy; getMostRecentBrowserWindow(): mozIDOMWindowProxy; getMostRecentNonPBWindow(aWindowType: string): mozIDOMWindowProxy; @@ -1100,7 +1119,13 @@ declare global { interface nsIXULBrowserWindow extends nsISupports { setOverLink(link: string): void; - showTooltip(x: i32, y: i32, tooltip: string, direction: string, browser: Element): void; + showTooltip( + x: i32, + y: i32, + tooltip: string, + direction: string, + browser: Element + ): void; hideTooltip(): void; } @@ -1124,7 +1149,8 @@ declare global { type IDLShutdownPhase = nsIAppStartup_IDLShutdownPhase; } - interface nsIAppStartup extends nsISupports, Enums { + interface nsIAppStartup + extends nsISupports, Enums { readonly eConsiderQuit?: 1; readonly eAttemptQuit?: 2; readonly eForceQuit?: 3; @@ -1282,7 +1308,10 @@ declare global { } interface nsIAutoCompleteObserver extends nsISupports { - onSearchResult(search: nsIAutoCompleteSearch, result: nsIAutoCompleteResult): void; + onSearchResult( + search: nsIAutoCompleteSearch, + result: nsIAutoCompleteResult + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/autocomplete/nsIAutoCompleteSimpleResult.idl @@ -1367,7 +1396,11 @@ declare global { getExtensionPageCSP(aAddonId: string): string; getGeneratedBackgroundPageUrl(aAddonId: string): string; addonHasPermission(aAddonId: string, aPerm: string): boolean; - addonMayLoadURI(aAddonId: string, aURI: nsIURI, aExplicit?: boolean): boolean; + addonMayLoadURI( + aAddonId: string, + aURI: nsIURI, + aExplicit?: boolean + ): boolean; getExtensionName(aAddonId: string): string; sourceMayLoadExtensionURI( aSourceURI: nsIURI, @@ -1442,7 +1475,10 @@ declare global { isURIInList(list: string): boolean; isContentAccessibleAboutURI(): boolean; isSameOrigin(otherURI: nsIURI): boolean; - hasFirstpartyStorageAccess(aWindow: mozIDOMWindow, rejectedReason: OutParam): boolean; + hasFirstpartyStorageAccess( + aWindow: mozIDOMWindow, + rejectedReason: OutParam + ): boolean; readonly localStorageQuotaKey: string; readonly isOriginPotentiallyTrustworthy: boolean; readonly isLoopbackHost: boolean; @@ -1498,13 +1534,30 @@ declare global { flags?: u32, innerWindowID?: u64 ): void; - checkLoadURIStrWithPrincipalXPCOM(aPrincipal: nsIPrincipal, uri: string, flags: u32): void; - checkLoadURIStrWithPrincipal(aPrincipal: nsIPrincipal, uri: string, flags?: u32): void; + checkLoadURIStrWithPrincipalXPCOM( + aPrincipal: nsIPrincipal, + uri: string, + flags: u32 + ): void; + checkLoadURIStrWithPrincipal( + aPrincipal: nsIPrincipal, + uri: string, + flags?: u32 + ): void; inFileURIAllowlist(aUri: nsIURI): boolean; getSystemPrincipal(): nsIPrincipal; - getLoadContextContentPrincipal(uri: nsIURI, loadContext: nsILoadContext): nsIPrincipal; - getDocShellContentPrincipal(uri: nsIURI, docShell: nsIDocShell): nsIPrincipal; - principalWithOA(principal: nsIPrincipal, originAttributes: any): nsIPrincipal; + getLoadContextContentPrincipal( + uri: nsIURI, + loadContext: nsILoadContext + ): nsIPrincipal; + getDocShellContentPrincipal( + uri: nsIURI, + docShell: nsIDocShell + ): nsIPrincipal; + principalWithOA( + principal: nsIPrincipal, + originAttributes: any + ): nsIPrincipal; createContentPrincipal(uri: nsIURI, originAttributes: any): nsIPrincipal; createContentPrincipalFromOrigin(origin: string): nsIPrincipal; principalToJSON(principal: nsIPrincipal): string; @@ -1538,7 +1591,10 @@ declare global { } interface nsICaptivePortalDetector extends nsISupports { - checkCaptivePortal(ifname: string, callback: nsICaptivePortalCallback): void; + checkCaptivePortal( + ifname: string, + callback: nsICaptivePortalCallback + ): void; abort(ifname: string): void; cancelLogin(eventId: string): void; finishPreparation(ifname: string): void; @@ -1579,10 +1635,22 @@ declare global { // https://searchfox.org/mozilla-central/source/dom/commandhandler/nsICommandManager.idl interface nsICommandManager extends nsISupports { - addCommandObserver(aCommandObserver: nsIObserver, aCommandToObserve: string): void; - removeCommandObserver(aCommandObserver: nsIObserver, aCommandObserved: string): void; - isCommandSupported(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; - isCommandEnabled(aCommandName: string, aTargetWindow: mozIDOMWindowProxy): boolean; + addCommandObserver( + aCommandObserver: nsIObserver, + aCommandToObserve: string + ): void; + removeCommandObserver( + aCommandObserver: nsIObserver, + aCommandObserved: string + ): void; + isCommandSupported( + aCommandName: string, + aTargetWindow: mozIDOMWindowProxy + ): boolean; + isCommandEnabled( + aCommandName: string, + aTargetWindow: mozIDOMWindowProxy + ): boolean; getCommandState( aCommandName: string, aTargetWindow: mozIDOMWindowProxy, @@ -1807,7 +1875,8 @@ declare global { } interface nsIDocShell - extends nsIDocShellTreeItem, + extends + nsIDocShellTreeItem, Enums< typeof nsIDocShell_DocShellEnumeratorDirection & typeof nsIDocShell_AppType & @@ -1933,7 +2002,10 @@ declare global { // https://searchfox.org/mozilla-central/source/docshell/base/nsIDocShellTreeOwner.idl interface nsIDocShellTreeOwner extends nsISupports { - contentShellAdded(aContentShell: nsIDocShellTreeItem, aPrimary: boolean): void; + contentShellAdded( + aContentShell: nsIDocShellTreeItem, + aPrimary: boolean + ): void; contentShellRemoved(aContentShell: nsIDocShellTreeItem): void; readonly primaryContentShell: nsIDocShellTreeItem; remoteTabAdded(aTab: nsIRemoteTab, aPrimary: boolean): void; @@ -1999,9 +2071,11 @@ declare global { } interface nsIDocumentViewer - extends nsISupports, + extends + nsISupports, Enums< - typeof nsIDocumentViewer_PermitUnloadAction & typeof nsIDocumentViewer_PermitUnloadResult + typeof nsIDocumentViewer_PermitUnloadAction & + typeof nsIDocumentViewer_PermitUnloadResult > { readonly eDelayResize?: 1; @@ -2021,7 +2095,10 @@ declare global { sticky: boolean; open(aState: nsISupports, aSHEntry: nsISHEntry): void; clearHistoryEntry(): void; - setPageModeForTesting(aPageMode: boolean, aPrintSettings: nsIPrintSettings): void; + setPageModeForTesting( + aPageMode: boolean, + aPrintSettings: nsIPrintSettings + ): void; readonly historyEntry: nsISHEntry; readonly isTabModalPromptAllowed: boolean; isHidden: boolean; @@ -2087,7 +2164,10 @@ declare global { interface nsIReflowObserver extends nsISupports { reflow(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; - reflowInterruptible(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): void; + reflowInterruptible( + start: DOMHighResTimeStamp, + end: DOMHighResTimeStamp + ): void; } // https://searchfox.org/mozilla-central/source/docshell/base/nsIRefreshURI.idl @@ -2102,14 +2182,23 @@ declare global { // https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipListener.idl interface nsITooltipListener extends nsISupports { - onShowTooltip(aXCoords: i32, aYCoords: i32, aTipText: string, aTipDir: string): void; + onShowTooltip( + aXCoords: i32, + aYCoords: i32, + aTipText: string, + aTipDir: string + ): void; onHideTooltip(): void; } // https://searchfox.org/mozilla-central/source/docshell/base/nsITooltipTextProvider.idl interface nsITooltipTextProvider extends nsISupports { - getNodeText(aNode: Node, aText: OutParam, aDirection: OutParam): boolean; + getNodeText( + aNode: Node, + aText: OutParam, + aDirection: OutParam + ): boolean; } // https://searchfox.org/mozilla-central/source/docshell/base/nsIURIFixup.idl @@ -2136,9 +2225,16 @@ declare global { getFixupURIInfo(aURIText: string, aFixupFlags?: u32): nsIURIFixupInfo; webNavigationFlagsToFixupFlags(aURIText: string, aDocShellFlags: u32): u32; - keywordToURI(aKeyword: string, aIsPrivateContext?: boolean): nsIURIFixupInfo; + keywordToURI( + aKeyword: string, + aIsPrivateContext?: boolean + ): nsIURIFixupInfo; forceHttpFixup(aUriString: string): nsIURIFixupInfo; - checkHost(aURI: nsIURI, aListener: nsIDNSListener, aOriginAttributes?: any): void; + checkHost( + aURI: nsIURI, + aListener: nsIDNSListener, + aOriginAttributes?: any + ): void; isDomainKnown(aDomain: string): boolean; } @@ -2178,7 +2274,10 @@ declare global { readonly canGoBackIgnoringUserInteraction: boolean; readonly canGoForward: boolean; goBack(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; - goForward(aRequireUserInteraction?: boolean, aUserActivation?: boolean): void; + goForward( + aRequireUserInteraction?: boolean, + aUserActivation?: boolean + ): void; gotoIndex(index: i32, aUserActivation?: boolean): void; loadURI(aURI: nsIURI, aLoadURIOptions: any): void; fixupAndLoadURIString(aURIString: string, aLoadURIOptions: any): void; @@ -2288,8 +2387,7 @@ declare global { } interface nsIContentPolicy - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly REJECT_REQUEST?: -1; readonly REJECT_TYPE?: -2; readonly REJECT_SERVER?: -3; @@ -2311,8 +2409,15 @@ declare global { interface nsIDroppedLinkHandler extends nsISupports { canDropLink(aEvent: DragEvent, aAllowSameDocument: boolean): boolean; - dropLinks(aEvent: DragEvent, aDisallowInherit?: boolean): nsIDroppedLinkItem[]; - validateURIsForDrop(aEvent: DragEvent, aURIs: string[], aDisallowInherit?: boolean): void; + dropLinks( + aEvent: DragEvent, + aDisallowInherit?: boolean + ): nsIDroppedLinkItem[]; + validateURIsForDrop( + aEvent: DragEvent, + aURIs: string[], + aDisallowInherit?: boolean + ): void; queryLinks(aDataTransfer: DataTransfer): nsIDroppedLinkItem[]; getTriggeringPrincipal(aEvent: DragEvent): nsIPrincipal; getPolicyContainer(aEvent: DragEvent): nsIPolicyContainer; @@ -2334,8 +2439,14 @@ declare global { } interface nsIEventSourceEventService extends nsISupports { - addListener(aInnerWindowID: u64, aListener: nsIEventSourceEventListener): void; - removeListener(aInnerWindowID: u64, aListener: nsIEventSourceEventListener): void; + addListener( + aInnerWindowID: u64, + aListener: nsIEventSourceEventListener + ): void; + removeListener( + aInnerWindowID: u64, + aListener: nsIEventSourceEventListener + ): void; hasListenerFor(aInnerWindowID: u64): boolean; } @@ -2381,10 +2492,17 @@ declare global { } interface nsIScriptableContentIterator - extends nsISupports, + extends + nsISupports, Enums { - initWithRootNode(aType: nsIScriptableContentIterator.IteratorType, aRoot: Node): void; - initWithRange(aType: nsIScriptableContentIterator.IteratorType, aRange: Range): void; + initWithRootNode( + aType: nsIScriptableContentIterator.IteratorType, + aRoot: Node + ): void; + initWithRange( + aType: nsIScriptableContentIterator.IteratorType, + aRange: Range + ): void; initWithRangeAllowCrossShadowBoundary( aType: nsIScriptableContentIterator.IteratorType, aRange: Range @@ -2424,7 +2542,8 @@ declare global { } interface nsISelectionController - extends nsISelectionDisplay, + extends + nsISelectionDisplay, Enums { readonly SELECTION_NONE?: 0; readonly SELECTION_NORMAL?: 1; @@ -2516,7 +2635,12 @@ declare global { readonly NO_AMOUNT?: 7; readonly PARAGRAPH_AMOUNT?: 8; - notifySelectionChanged(doc: Document, sel: Selection, reason: i16, amount: i32): void; + notifySelectionChanged( + doc: Document, + sel: Selection, + reason: i16, + amount: i32 + ): void; } // https://searchfox.org/mozilla-central/source/dom/base/nsISlowScriptDebug.idl @@ -2625,7 +2749,11 @@ declare global { readonly referrerInfo: nsIReferrerInfo; isNavigating: boolean; mayEnableCharacterEncodingMenu: boolean; - updateForStateChange(aCharset: string, aDocumentURI: nsIURI, aContentType: string): void; + updateForStateChange( + aCharset: string, + aDocumentURI: nsIURI, + aContentType: string + ): void; updateWebNavigationForLocationChange( aCanGoBack: boolean, aCanGoBackIgnoringUserInteraction: boolean, @@ -2755,14 +2883,27 @@ declare global { // https://searchfox.org/mozilla-central/source/dom/interfaces/base/nsIContentPrefService2.idl interface nsIContentPrefObserver extends nsISupports { - onContentPrefSet(aGroup: string, aName: string, aValue: nsIVariant, aIsPrivate?: boolean): void; - onContentPrefRemoved(aGroup: string, aName: string, aIsPrivate?: boolean): void; + onContentPrefSet( + aGroup: string, + aName: string, + aValue: nsIVariant, + aIsPrivate?: boolean + ): void; + onContentPrefRemoved( + aGroup: string, + aName: string, + aIsPrivate?: boolean + ): void; } interface nsIContentPrefService2 extends nsISupports { readonly GROUP_NAME_MAX_LENGTH?: 2000; - getByName(name: string, context: nsILoadContext, callback: nsIContentPrefCallback2): void; + getByName( + name: string, + context: nsILoadContext, + callback: nsIContentPrefCallback2 + ): void; getByDomainAndName( domain: string, name: string, @@ -2775,8 +2916,16 @@ declare global { context: nsILoadContext, callback: nsIContentPrefCallback2 ): void; - getGlobal(name: string, context: nsILoadContext, callback: nsIContentPrefCallback2): void; - getCachedByDomainAndName(domain: string, name: string, context: nsILoadContext): nsIContentPref; + getGlobal( + name: string, + context: nsILoadContext, + callback: nsIContentPrefCallback2 + ): void; + getCachedByDomainAndName( + domain: string, + name: string, + context: nsILoadContext + ): nsIContentPref; getCachedBySubdomainAndName( domain: string, name: string, @@ -2808,7 +2957,11 @@ declare global { context: nsILoadContext, callback?: nsIContentPrefCallback2 ): void; - removeGlobal(name: string, context: nsILoadContext, callback?: nsIContentPrefCallback2): void; + removeGlobal( + name: string, + context: nsILoadContext, + callback?: nsIContentPrefCallback2 + ): void; removeByDomain( domain: string, context: nsILoadContext, @@ -2819,14 +2972,24 @@ declare global { context: nsILoadContext, callback?: nsIContentPrefCallback2 ): void; - removeByName(name: string, context: nsILoadContext, callback?: nsIContentPrefCallback2): void; - removeAllDomains(context: nsILoadContext, callback?: nsIContentPrefCallback2): void; + removeByName( + name: string, + context: nsILoadContext, + callback?: nsIContentPrefCallback2 + ): void; + removeAllDomains( + context: nsILoadContext, + callback?: nsIContentPrefCallback2 + ): void; removeAllDomainsSince( since: u64, context: nsILoadContext, callback?: nsIContentPrefCallback2 ): void; - removeAllGlobals(context: nsILoadContext, callback?: nsIContentPrefCallback2): void; + removeAllGlobals( + context: nsILoadContext, + callback?: nsIContentPrefCallback2 + ): void; addObserverForName(name: string, observer: nsIContentPrefObserver): void; removeObserverForName(name: string, observer: nsIContentPrefObserver): void; extractDomain(str: string): string; @@ -2875,8 +3038,7 @@ declare global { } interface nsIDOMWindowUtils - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly MODIFIER_ALT?: 1; readonly MODIFIER_CONTROL?: 2; readonly MODIFIER_SHIFT?: 4; @@ -3000,7 +3162,10 @@ declare global { readonly docCharsetIsForced: boolean; readonly physicalMillimeterInCSSPixels: float; getDocumentMetadata(aName: string): string; - getLastOverWindowPointerLocationInCSSPixels(aX: OutParam, aY: OutParam): void; + getLastOverWindowPointerLocationInCSSPixels( + aX: OutParam, + aY: OutParam + ): void; updateLayerTree(): void; readonly lastTransactionId: u64; getViewportInfo( @@ -3015,8 +3180,15 @@ declare global { aAutoSize: OutParam ): void; getViewportFitInfo(): string; - getDocumentViewerSize(aDisplayWidth: OutParam, aDisplayHeight: OutParam): void; - setMousewheelAutodir(aElement: Element, aEnabled: boolean, aHonourRoot: boolean): void; + getDocumentViewerSize( + aDisplayWidth: OutParam, + aDisplayHeight: OutParam + ): void; + setMousewheelAutodir( + aElement: Element, + aEnabled: boolean, + aHonourRoot: boolean + ): void; setDisplayPortForElement( aXPx: float, aYPx: float, @@ -3047,7 +3219,11 @@ declare global { ): void; setResolutionAndScaleTo(aResolution: float): void; getResolution(): float; - setRestoreResolution(aResolution: float, aDisplayWidth: u32, aDisplayHeight: u32): void; + setRestoreResolution( + aResolution: float, + aDisplayWidth: u32, + aDisplayHeight: u32 + ): void; isFirstPaint: boolean; getPresShellId(): u32; isCORSSafelistedRequestHeader(name: string, value: string): boolean; @@ -3174,7 +3350,11 @@ declare global { aCallback?: nsISynthesizedEventCallback, aElement?: Element ): void; - sendNativeTouchpadDoubleTap(aScreenX: i32, aScreenY: i32, aModifierFlags: i32): void; + sendNativeTouchpadDoubleTap( + aScreenX: i32, + aScreenY: i32, + aModifierFlags: i32 + ): void; sendNativeTouchpadPan( aEventPhase: u32, aScreenX: i32, @@ -3231,25 +3411,56 @@ declare global { readonly isInputTaskManagerSuspended: boolean; suppressEventHandling(aSuppress: boolean): void; disableNonTestMouseEvents(aDisable: boolean): void; - getScrollXY(aFlushLayout: boolean, aScrollX: OutParam, aScrollY: OutParam): void; + getScrollXY( + aFlushLayout: boolean, + aScrollX: OutParam, + aScrollY: OutParam + ): void; getScrollXYFloat( aFlushLayout: boolean, aScrollX: OutParam, aScrollY: OutParam ): void; - getScrollbarSize(aFlushLayout: boolean, aWidth: OutParam, aHeight: OutParam): void; + getScrollbarSize( + aFlushLayout: boolean, + aWidth: OutParam, + aHeight: OutParam + ): void; getBoundsWithoutFlushing(aElement: Element): DOMRect; getWidgetOpaqueRegion(): DOMRect[]; - scrollToVisual(aOffsetX: float, aOffsetY: float, aUpdateType: i32, aScrollMode: i32): void; + scrollToVisual( + aOffsetX: float, + aOffsetY: float, + aUpdateType: i32, + aScrollMode: i32 + ): void; getVisualViewportOffsetRelativeToLayoutViewport( aOffsetX: OutParam, aOffsetY: OutParam ): void; - getVisualViewportOffset(aOffsetX: OutParam, aOffsetY: OutParam): void; - transformRectLayoutToVisual(aX: float, aY: float, aWidth: float, aHeight: float): DOMRect; - toScreenRectInCSSUnits(aX: float, aY: float, aWidth: float, aHeight: float): DOMRect; + getVisualViewportOffset( + aOffsetX: OutParam, + aOffsetY: OutParam + ): void; + transformRectLayoutToVisual( + aX: float, + aY: float, + aWidth: float, + aHeight: float + ): DOMRect; + toScreenRectInCSSUnits( + aX: float, + aY: float, + aWidth: float, + aHeight: float + ): DOMRect; toScreenRect(aX: float, aY: float, aWidth: float, aHeight: float): DOMRect; - toTopLevelWidgetRect(aX: float, aY: float, aWidth: float, aHeight: float): DOMRect; + toTopLevelWidgetRect( + aX: float, + aY: float, + aWidth: float, + aHeight: float + ): DOMRect; convertFromParentProcessWidgetToLocal( aX: float, aY: float, @@ -3265,7 +3476,10 @@ declare global { readonly inputContextURI: nsIURI; readonly inputContextOrigin: u32; readonly nodeObservedByIMEContentObserver: Node; - dispatchDOMEventViaPresShellForTesting(aTarget: Node, aEvent: Event): boolean; + dispatchDOMEventViaPresShellForTesting( + aTarget: Node, + aEvent: Event + ): boolean; dispatchEventToChromeOnly(aTarget: EventTarget, aEvent: Event): boolean; getClassName(aObject: any): string; sendContentCommandEvent( @@ -3288,7 +3502,11 @@ declare global { remoteFrameFullscreenReverted(): void; handleFullscreenRequests(): boolean; exitFullscreen(aDontRestoreViewSize?: boolean): void; - sendSelectionSetEvent(aOffset: u32, aLength: u32, aAdditionalFlags?: u32): boolean; + sendSelectionSetEvent( + aOffset: u32, + aLength: u32, + aAdditionalFlags?: u32 + ): boolean; selectAtPoint(aX: float, aY: float, aSelectBehavior: u32): boolean; getVisitedDependentComputedStyle( aElement: Element, @@ -3373,7 +3591,11 @@ declare global { allowScriptsToClose(): void; readonly isParentWindowMainWidgetVisible: boolean; isNodeDisabledForEvents(aNode: Node): boolean; - getOMTAStyle(aElement: Element, aProperty: string, aPseudoElement?: string): string; + getOMTAStyle( + aElement: Element, + aProperty: string, + aPseudoElement?: string + ): string; setHandlingUserInput(aHandlingInput: boolean): nsIJSRAIIHelper; isKeyboardEventUserActivity(aKeyboardEvent: Event): boolean; getContentAPZTestData(aElement?: Element): any; @@ -3540,7 +3762,8 @@ declare global { type NavigationType = nsIRemoteTab_NavigationType; } - interface nsIRemoteTab extends nsISupports, Enums { + interface nsIRemoteTab + extends nsISupports, Enums { renderLayers: boolean; readonly hasLayers: boolean; priorityHint: boolean; @@ -3630,9 +3853,15 @@ declare global { interface nsIServiceWorkerManager extends nsISupports { reloadRegistrationsForTest(): void; - registerForTest(aPrincipal: nsIPrincipal, aScope: string, aScriptURL: string): Promise; + registerForTest( + aPrincipal: nsIPrincipal, + aScope: string, + aScriptURL: string + ): Promise; registerForAddonPrincipal(aPrincipal: nsIPrincipal): Promise; - getRegistrationForAddonPrincipal(aPrincipal: nsIPrincipal): nsIServiceWorkerRegistrationInfo; + getRegistrationForAddonPrincipal( + aPrincipal: nsIPrincipal + ): nsIServiceWorkerRegistrationInfo; wakeForExtensionAPIEvent( aExtensionBaseURL: string, aAPINamespace: string, @@ -3655,7 +3884,11 @@ declare global { aCallback: nsIServiceWorkerUnregisterCallback, aScope: string ): void; - sendPushEvent(aOriginAttributes: string, aScope: string, aDataBytes?: u8[]): void; + sendPushEvent( + aOriginAttributes: string, + aScope: string, + aDataBytes?: u8[] + ): void; sendPushSubscriptionChangeEvent( aOriginAttributes: string, scope: string, @@ -3709,14 +3942,25 @@ declare global { setCaretInPendingComposition(aOffset: u32): void; flushPendingComposition(aKeyboardEvent?: Event, aKeyFlags?: u32): boolean; commitComposition(aKeyboardEvent?: Event, aKeyFlags?: u32): void; - commitCompositionWith(aCommitString: string, aKeyboardEvent?: Event, aKeyFlags?: u32): boolean; + commitCompositionWith( + aCommitString: string, + aKeyboardEvent?: Event, + aKeyFlags?: u32 + ): boolean; cancelComposition(aKeyboardEvent?: Event, aKeyFlags?: u32): void; keydown(aKeyboardEvent: Event, aKeyFlags?: u32): u32; keyup(aKeyboardEvent: Event, aKeyFlags?: u32): boolean; - insertTextWithKeyPress(aString: string, aKeyboardEvent?: Event, aKeyFlags?: u32): boolean; + insertTextWithKeyPress( + aString: string, + aKeyboardEvent?: Event, + aKeyFlags?: u32 + ): boolean; getModifierState(aModifierKey: string): boolean; shareModifierStateOf(aOther: nsITextInputProcessor): void; - computeCodeValueOfNonPrintableKey(aKeyValue: string, aLocation?: any): string; + computeCodeValueOfNonPrintableKey( + aKeyValue: string, + aLocation?: any + ): string; guessCodeValueOfPrintableKeyInUSEnglishKeyboardLayout( aKeyValue: string, aLocation?: any @@ -3869,11 +4113,22 @@ declare global { interface nsICredentialChooserService extends nsISupports { fetchImageToDataURI(window: mozIDOMWindow, uri: nsIURI): Promise; - fetchWellKnown(uri: nsIURI, triggeringPrincipal: nsIPrincipal): Promise; + fetchWellKnown( + uri: nsIURI, + triggeringPrincipal: nsIPrincipal + ): Promise; fetchConfig(uri: nsIURI, triggeringPrincipal: nsIPrincipal): Promise; fetchAccounts(uri: nsIURI, triggeringPrincipal: nsIPrincipal): Promise; - fetchToken(uri: nsIURI, body: string, triggeringPrincipal: nsIPrincipal): Promise; - fetchDisconnect(uri: nsIURI, body: string, triggeringPrincipal: nsIPrincipal): Promise; + fetchToken( + uri: nsIURI, + body: string, + triggeringPrincipal: nsIPrincipal + ): Promise; + fetchDisconnect( + uri: nsIURI, + body: string, + triggeringPrincipal: nsIPrincipal + ): Promise; } // https://searchfox.org/mozilla-central/source/toolkit/components/credentialmanagement/nsICredentialChosenCallback.idl @@ -3916,7 +4171,11 @@ declare global { registered: OutParam, allowLogout: OutParam ): void; - delete(rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, credentialID: string): void; + delete( + rpPrincipal: nsIPrincipal, + idpPrincipal: nsIPrincipal, + credentialID: string + ): void; connected( rpPrincipal: nsIPrincipal, idpPrincipal: nsIPrincipal, @@ -4069,7 +4328,11 @@ declare global { }>; interface nsINotificationStorage extends nsISupports { - put(aOrigin: string, aEntry: nsINotificationStorageEntry, aScope: string): void; + put( + aOrigin: string, + aEntry: nsINotificationStorageEntry, + aScope: string + ): void; get( origin: string, scope: string, @@ -4362,14 +4625,24 @@ declare global { interface nsIPushNotifier extends nsISupports { notifyPush(scope: string, principal: nsIPrincipal, messageId: string): void; - notifyPushWithData(scope: string, principal: nsIPrincipal, messageId: string, data: u8[]): void; + notifyPushWithData( + scope: string, + principal: nsIPrincipal, + messageId: string, + data: u8[] + ): void; notifySubscriptionChange( scope: string, principal: nsIPrincipal, oldSubscription?: nsIPushSubscription ): void; notifySubscriptionModified(scope: string, principal: nsIPrincipal): void; - notifyError(scope: string, principal: nsIPrincipal, message: string, flags: u32): void; + notifyError( + scope: string, + principal: nsIPrincipal, + message: string, + flags: u32 + ): void; } interface nsIPushData extends nsISupports { @@ -4398,7 +4671,10 @@ declare global { } type nsIPushSubscriptionCallback = Callable<{ - onPushSubscription(status: nsresult, subscription: nsIPushSubscription): void; + onPushSubscription( + status: nsresult, + subscription: nsIPushSubscription + ): void; }>; type nsIUnsubscribeResultCallback = Callable<{ @@ -4413,7 +4689,11 @@ declare global { readonly pushTopic: string; readonly subscriptionChangeTopic: string; readonly subscriptionModifiedTopic: string; - subscribe(scope: string, principal: nsIPrincipal, callback: nsIPushSubscriptionCallback): void; + subscribe( + scope: string, + principal: nsIPrincipal, + callback: nsIPushSubscriptionCallback + ): void; subscribeWithKey( scope: string, principal: nsIPrincipal, @@ -4435,7 +4715,10 @@ declare global { originAttributesPattern: any, callback: nsIPushClearResultCallback ): void; - clearForPrincipal(principal: nsIPrincipal, callback: nsIPushClearResultCallback): void; + clearForPrincipal( + principal: nsIPrincipal, + callback: nsIPushClearResultCallback + ): void; } interface nsIPushQuotaManager extends nsISupports { @@ -4459,8 +4742,7 @@ declare global { } interface nsIQuotaArtificialFailure - extends nsISupports, - Enums {} + extends nsISupports, Enums {} // https://searchfox.org/mozilla-central/source/dom/quota/nsIQuotaCallbacks.idl @@ -4481,7 +4763,10 @@ declare global { temporaryStorageInitialized(): nsIQuotaRequest; temporaryGroupInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; persistentOriginInitialized(aPrincipal: nsIPrincipal): nsIQuotaRequest; - temporaryOriginInitialized(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; + temporaryOriginInitialized( + aPersistenceType: string, + aPrincipal: nsIPrincipal + ): nsIQuotaRequest; init(): nsIQuotaRequest; initializePersistentStorage(): nsIQuotaRequest; initTemporaryStorage(): nsIQuotaRequest; @@ -4493,15 +4778,24 @@ declare global { aPrincipal: nsIPrincipal, aCreateIfNonExistent?: boolean ): nsIQuotaRequest; - initializePersistentClient(aPrincipal: nsIPrincipal, aClientType: string): nsIQuotaRequest; + initializePersistentClient( + aPrincipal: nsIPrincipal, + aClientType: string + ): nsIQuotaRequest; initializeTemporaryClient( aPersistenceType: string, aPrincipal: nsIPrincipal, aClientType: string, aCreateIfNonExistent?: boolean ): nsIQuotaRequest; - getFullOriginMetadata(aPersistenceType: string, aPrincipal: nsIPrincipal): nsIQuotaRequest; - getUsage(aCallback: nsIQuotaUsageCallback, aGetAll?: boolean): nsIQuotaUsageRequest; + getFullOriginMetadata( + aPersistenceType: string, + aPrincipal: nsIPrincipal + ): nsIQuotaRequest; + getUsage( + aCallback: nsIQuotaUsageCallback, + aGetAll?: boolean + ): nsIQuotaUsageRequest; getUsageForPrincipal( aPrincipal: nsIPrincipal, aCallback: nsIQuotaUsageCallback @@ -4512,7 +4806,10 @@ declare global { clear(): nsIQuotaRequest; clearStoragesForPrivateBrowsing(): nsIQuotaRequest; clearStoragesForOriginAttributesPattern(aPattern: string): nsIQuotaRequest; - clearStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; + clearStoragesForPrincipal( + aPrincipal: nsIPrincipal, + aPersistenceType?: string + ): nsIQuotaRequest; clearStoragesForClient( aPrincipal: nsIPrincipal, aClientType: string, @@ -4523,7 +4820,10 @@ declare global { aPersistenceType?: string ): nsIQuotaRequest; reset(): nsIQuotaRequest; - resetStoragesForPrincipal(aPrincipal: nsIPrincipal, aPersistenceType?: string): nsIQuotaRequest; + resetStoragesForPrincipal( + aPrincipal: nsIPrincipal, + aPersistenceType?: string + ): nsIQuotaRequest; resetStoragesForClient( aPrincipal: nsIPrincipal, aClientType: string, @@ -4661,7 +4961,8 @@ declare global { } interface nsIContentSecurityPolicy - extends nsISerializable, + extends + nsISerializable, Enums< typeof nsIContentSecurityPolicy_CSPDirective & typeof nsIContentSecurityPolicy_RequireTrustedTypesForDirectiveState @@ -4674,7 +4975,11 @@ declare global { readonly upgradeInsecureRequests: boolean; readonly blockAllMixedContent: boolean; readonly enforcesFrameAncestors: boolean; - appendPolicy(policyString: string, reportOnly: boolean, deliveredViaMetaTag: boolean): void; + appendPolicy( + policyString: string, + reportOnly: boolean, + deliveredViaMetaTag: boolean + ): void; readonly requireTrustedTypesForDirectiveState: nsIContentSecurityPolicy.RequireTrustedTypesForDirectiveState; getAllowsInline( aDirective: nsIContentSecurityPolicy.CSPDirective, @@ -4764,8 +5069,7 @@ declare global { } interface nsIReferrerInfo - extends nsISerializable, - Enums { + extends nsISerializable, Enums { readonly originalReferrer: nsIURI; readonly referrerPolicy: nsIReferrerInfo.ReferrerPolicyIDL; getReferrerPolicyString(): string; @@ -4897,7 +5201,10 @@ declare global { // https://searchfox.org/mozilla-central/source/dom/interfaces/storage/nsIDOMStorageManager.idl interface nsIDOMStorageManager extends nsISupports { - precacheStorage(aPrincipal: nsIPrincipal, aStoragePrincipal: nsIPrincipal): Storage; + precacheStorage( + aPrincipal: nsIPrincipal, + aStoragePrincipal: nsIPrincipal + ): Storage; createStorage( aWindow: mozIDOMWindow, aPrincipal: nsIPrincipal, @@ -4937,7 +5244,10 @@ declare global { readonly PERMISSION_STATE_DENIED?: 2; readonly PERMISSION_STATE_AUTHORIZED?: 3; - getMediaCapturePermissionState(aVideo: OutParam, aAudio: OutParam): void; + getMediaCapturePermissionState( + aVideo: OutParam, + aAudio: OutParam + ): void; getAudioCapturePermissionState(aAudio: OutParam): void; getVideoCapturePermissionState(aVideo: OutParam): void; getScreenCapturePermissionState(aScreen: OutParam): void; @@ -5032,7 +5342,12 @@ declare global { dispatchPause(aElapsedTime: float, aCharIndex: u32): void; dispatchResume(aElapsedTime: float, aCharIndex: u32): void; dispatchError(aElapsedTime: float, aCharIndex: u32): void; - dispatchBoundary(aName: string, aElapsedTime: float, aCharIndex: u32, aCharLength?: u32): void; + dispatchBoundary( + aName: string, + aElapsedTime: float, + aCharIndex: u32, + aCharLength?: u32 + ): void; dispatchMark(aName: string, aElapsedTime: float, aCharIndex: u32): void; } @@ -5131,7 +5446,12 @@ declare global { // https://searchfox.org/mozilla-central/source/dom/xslt/xslt/txIEXSLTFunctions.idl interface txIEXSLTFunctions extends nsISupports { - match(str: string, regex: string, flags: string, doc: Document): DocumentFragment; + match( + str: string, + regex: string, + flags: string, + doc: Document + ): DocumentFragment; replace(str: string, regex: string, flags: string, replace: string): string; test(str: string, regex: string, flags: string): boolean; } @@ -5272,7 +5592,12 @@ declare global { interface nsIEditActionListener extends nsISupports { DidDeleteNode(aChild: Node, aResult: nsresult): void; - DidInsertText(aTextNode: CharacterData, aOffset: i32, aString: string, aResult: nsresult): void; + DidInsertText( + aTextNode: CharacterData, + aOffset: i32, + aString: string, + aResult: nsresult + ): void; WillDeleteText(aTextNode: CharacterData, aOffset: i32, aLength: i32): void; WillDeleteRanges(aRangesToDelete: Range[]): void; } @@ -5354,10 +5679,19 @@ declare global { selectAll(): void; beginningOfDocument(): void; endOfDocument(): void; - setAttribute(aElement: Element, attributestr: string, attvalue: string): void; + setAttribute( + aElement: Element, + attributestr: string, + attvalue: string + ): void; removeAttribute(aElement: Element, aAttribute: string): void; cloneAttributes(aDestElement: Element, aSourceElement: Element): void; - insertNode(node: Node, parent: Node, aPosition: u32, aPreserveSelection?: boolean): void; + insertNode( + node: Node, + parent: Node, + aPosition: u32, + aPreserveSelection?: boolean + ): void; deleteNode(child: Node, aPreserveSelection?: boolean): void; outputToString(formatType: string, flags: u32): string; addEditActionListener(listener: nsIEditActionListener): void; @@ -5381,7 +5715,11 @@ declare global { // https://searchfox.org/mozilla-central/source/editor/nsIEditorMailSupport.idl interface nsIEditorMailSupport extends nsISupports { - insertAsCitedQuotation(aQuotedText: string, aCitation: string, aInsertHTML: boolean): Node; + insertAsCitedQuotation( + aQuotedText: string, + aCitation: string, + aInsertHTML: boolean + ): Node; rewrap(aRespectNewlines: boolean): void; insertTextWithQuotations(aStringToInsert: string): void; wrapWidth: i32; @@ -5403,7 +5741,11 @@ declare global { GetSuggestedWord(): string; CheckCurrentWord(suggestedWord: string): boolean; suggest(aCheckingWorkd: string, aMaxCount: u32): Promise; - ReplaceWord(misspelledWord: string, replaceWord: string, allOccurrences: boolean): void; + ReplaceWord( + misspelledWord: string, + replaceWord: string, + allOccurrences: boolean + ): void; IgnoreWordAllOccurrences(word: string): void; AddWordToDictionary(word: string): void; RemoveWordFromDictionary(word: string): void; @@ -5436,7 +5778,11 @@ declare global { readonly eRight?: 2; readonly eJustify?: 3; - setInlineProperty(aProperty: string, aAttribute: string, aValue: string): void; + setInlineProperty( + aProperty: string, + aAttribute: string, + aValue: string + ): void; getInlinePropertyWithAttrValue( aProperty: string, aAttribute: string, @@ -5448,7 +5794,10 @@ declare global { removeInlineProperty(aProperty: string, aAttribute: string): void; nodeIsBlock(aNode: Node): boolean; insertHTML(aInputString: string): void; - insertElementAtSelection(aElement: Element, aDeleteSelection: boolean): void; + insertElementAtSelection( + aElement: Element, + aDeleteSelection: boolean + ): void; updateBaseURL(): void; selectElement(aElement: Element): void; getParagraphState(aMixed: OutParam): string; @@ -5467,7 +5816,11 @@ declare global { aDD: OutParam ): void; getAlignment(aMixed: OutParam, aAlign: OutParam): void; - makeOrChangeList(aListType: string, entireList: boolean, aBulletType: string): void; + makeOrChangeList( + aListType: string, + entireList: boolean, + aBulletType: string + ): void; removeList(aListType: string): void; getElementOrParentByTagName(aTagName: string, aNode: Node): Element; getSelectedElement(aTagName: string): nsISupports; @@ -5511,9 +5864,18 @@ declare global { readonly ePreviousColumn?: 1; readonly ePreviousRow?: 2; - insertTableCell(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; - insertTableColumn(aNumberOfColumnsToInsert: i32, aInsertAfterSelectedCell: boolean): void; - insertTableRow(aNumberOfRowsToInsert: i32, aInsertAfterSelectedCell: boolean): void; + insertTableCell( + aNumberOfColumnsToInsert: i32, + aInsertAfterSelectedCell: boolean + ): void; + insertTableColumn( + aNumberOfColumnsToInsert: i32, + aInsertAfterSelectedCell: boolean + ): void; + insertTableRow( + aNumberOfRowsToInsert: i32, + aInsertAfterSelectedCell: boolean + ): void; deleteTable(): void; deleteTableCellContents(): void; deleteTableCell(aNumberOfCellsToDelete: i32): void; @@ -5538,7 +5900,11 @@ declare global { aRowCount: OutParam, aColCount: OutParam ): void; - getCellAt(aTableElement: Element, aRowIndex: i32, aColumnIndex: i32): Element; + getCellAt( + aTableElement: Element, + aRowIndex: i32, + aColumnIndex: i32 + ): Element; getCellDataAt( aTableElement: Element, aRowIndex: i32, @@ -5553,9 +5919,15 @@ declare global { aIsSelected: OutParam ): void; getFirstRow(aTableElement: Element): Element; - getSelectedOrParentTableElement(aTagName: OutParam, aCount: OutParam): Element; + getSelectedOrParentTableElement( + aTagName: OutParam, + aCount: OutParam + ): Element; getSelectedCellsType(aElement: Element): u32; - getFirstSelectedCellInTable(aRowIndex: OutParam, aColIndex: OutParam): Element; + getFirstSelectedCellInTable( + aRowIndex: OutParam, + aColIndex: OutParam + ): Element; getSelectedCells(): Element[]; } @@ -5628,7 +6000,10 @@ declare global { aForceSave: boolean, aWindowContext?: nsIInterfaceRequestor ): nsIStreamListener; - applyDecodingForExtension(aExtension: string, aEncodingType: string): boolean; + applyDecodingForExtension( + aExtension: string, + aEncodingType: string + ): boolean; getPreferredDownloadsDirectory(): nsIFile; } @@ -5664,7 +6039,10 @@ declare global { aProtocolScheme: string, aFound: OutParam ): nsIHandlerInfo; - setProtocolHandlerDefaults(aHandlerInfo: nsIHandlerInfo, aOSHandlerExists: boolean): void; + setProtocolHandlerDefaults( + aHandlerInfo: nsIHandlerInfo, + aOSHandlerExists: boolean + ): void; loadURI( aURI: nsIURI, aTriggeringPrincipal?: nsIPrincipal, @@ -5734,7 +6112,12 @@ declare global { readonly FIND_PENDING?: 3; init(aDocShell: nsIDocShell): void; - find(aSearchString: string, aLinksOnly: boolean, aMode: u32, aDontIterateFrames: boolean): u16; + find( + aSearchString: string, + aLinksOnly: boolean, + aMode: u32, + aDontIterateFrames: boolean + ): u16; getFoundRange(): Range; setDocShell(aDocShell: nsIDocShell): void; setSelectionModeAndRepaint(toggle: i16): void; @@ -5762,7 +6145,11 @@ declare global { setLogPings(aEnableLogPings: boolean): void; setTagPings(aDebugTag: string): void; sendPing(aPingName: string): void; - setExperimentActive(aExperimentId: string, aBranch: string, aExtra?: any): void; + setExperimentActive( + aExperimentId: string, + aBranch: string, + aExtra?: any + ): void; setExperimentInactive(aExperimentId: string): void; testGetExperimentData(aExperimentId: string): any; applyServerKnobsConfig(aJsonConfig: string): void; @@ -5903,8 +6290,16 @@ declare global { ): void; HandleCharacterData(aData: string, aLength: u32): void; HandleProcessingInstruction(aTarget: string, aData: string): void; - HandleXMLDeclaration(aVersion: string, aEncoding: string, aStandalone: i32): void; - ReportError(aErrorText: string, aSourceText: string, aError: nsIScriptError): boolean; + HandleXMLDeclaration( + aVersion: string, + aEncoding: string, + aStandalone: i32 + ): void; + ReportError( + aErrorText: string, + aSourceText: string, + aError: nsIScriptError + ): boolean; } // https://searchfox.org/mozilla-central/source/netwerk/base/http-sfv/nsIStructuredFieldValues.idl @@ -6005,7 +6400,10 @@ declare global { interface imgICache extends nsISupports { clearCache(chrome?: any): void; removeEntriesFromPrincipalInAllProcesses(aPrincipal: nsIPrincipal): void; - removeEntriesFromSiteInAllProcesses(aBaseDomain: string, OriginAttributesPattern: any): void; + removeEntriesFromSiteInAllProcesses( + aBaseDomain: string, + OriginAttributesPattern: any + ): void; findEntryProperties(uri: nsIURI, doc?: Document): nsIProperties; respectPrivacyNotifications(): void; } @@ -6024,7 +6422,8 @@ declare global { type DecodeResult = imgIContainer_DecodeResult; } - interface imgIContainer extends nsISupports, Enums { + interface imgIContainer + extends nsISupports, Enums { readonly TYPE_RASTER?: 0; readonly TYPE_VECTOR?: 1; readonly TYPE_REQUEST?: 2; @@ -6088,7 +6487,12 @@ declare global { outputOptions: string, randomizationKey: string ): void; - startImageEncode(width: u32, height: u32, inputFormat: u32, outputOptions: string): void; + startImageEncode( + width: u32, + height: u32, + inputFormat: u32, + outputOptions: string + ): void; addImageFrame( data: u8[], length: u32, @@ -6200,8 +6604,15 @@ declare global { // https://searchfox.org/mozilla-central/source/image/imgITools.idl interface imgITools extends nsISupports { - decodeImageFromBuffer(aBuffer: string, aSize: u32, aMimeType: string): imgIContainer; - decodeImageFromArrayBuffer(aArrayBuffer: any, aMimeType: string): imgIContainer; + decodeImageFromBuffer( + aBuffer: string, + aSize: u32, + aMimeType: string + ): imgIContainer; + decodeImageFromArrayBuffer( + aArrayBuffer: any, + aMimeType: string + ): imgIContainer; decodeImageFromChannelAsync( aURI: nsIURI, aChannel: nsIChannel, @@ -6237,7 +6648,9 @@ declare global { aHeight: i32, outputOptions?: string ): nsIInputStream; - createScriptedObserver(aObserver: imgIScriptedNotificationObserver): imgINotificationObserver; + createScriptedObserver( + aObserver: imgIScriptedNotificationObserver + ): imgINotificationObserver; } type imgIContainerCallback = Callable<{ @@ -6368,9 +6781,12 @@ declare global { } interface nsIKeyValueService - extends nsISupports, - Enums { - getOrCreate(callback: nsIKeyValueDatabaseCallback, path: string, name: string): void; + extends nsISupports, Enums { + getOrCreate( + callback: nsIKeyValueDatabaseCallback, + path: string, + name: string + ): void; getOrCreateWithOptions( callback: nsIKeyValueDatabaseCallback, path: string, @@ -6405,8 +6821,12 @@ declare global { } interface nsIKeyValueImporter - extends nsIKeyValueImportSourceSpec, - Enums { + extends + nsIKeyValueImportSourceSpec, + Enums< + typeof nsIKeyValueImporter_ConflictPolicy & + typeof nsIKeyValueImporter_CleanupPolicy + > { readonly type: string; addPath(path: string): nsIKeyValueImportSourceSpec; import(callback: nsIKeyValueVoidCallback): void; @@ -6425,14 +6845,33 @@ declare global { isEmpty(callback: nsIKeyValueVariantCallback): void; count(callback: nsIKeyValueVariantCallback): void; size(callback: nsIKeyValueVariantCallback): void; - put(callback: nsIKeyValueVoidCallback, key: string, value: nsIVariant): void; - writeMany(callback: nsIKeyValueVoidCallback, pairs: nsIKeyValuePair[]): void; - get(callback: nsIKeyValueVariantCallback, key: string, defaultValue?: nsIVariant): void; + put( + callback: nsIKeyValueVoidCallback, + key: string, + value: nsIVariant + ): void; + writeMany( + callback: nsIKeyValueVoidCallback, + pairs: nsIKeyValuePair[] + ): void; + get( + callback: nsIKeyValueVariantCallback, + key: string, + defaultValue?: nsIVariant + ): void; has(callback: nsIKeyValueVariantCallback, key: string): void; delete(callback: nsIKeyValueVoidCallback, key: string): void; - deleteRange(callback: nsIKeyValueVoidCallback, fromKey?: string, toKey?: string): void; + deleteRange( + callback: nsIKeyValueVoidCallback, + fromKey?: string, + toKey?: string + ): void; clear(callback: nsIKeyValueVoidCallback): void; - enumerate(callback: nsIKeyValueEnumeratorCallback, fromKey?: string, toKey?: string): void; + enumerate( + callback: nsIKeyValueEnumeratorCallback, + fromKey?: string, + toKey?: string + ): void; close(callback: nsIKeyValueVoidCallback): void; } @@ -6622,7 +7061,11 @@ declare global { readonly systemLocales: string[]; readonly regionalPrefsLocales: string[]; readonly systemLocale: string; - getDateTimePattern(timeFormatStyle: i32, dateFormatStyle: i32, locale?: string): string; + getDateTimePattern( + timeFormatStyle: i32, + dateFormatStyle: i32, + locale?: string + ): string; } // https://searchfox.org/mozilla-central/source/toolkit/components/passwordmgr/nsILoginInfo.idl @@ -6681,8 +7124,16 @@ declare global { getAllDisabledHosts(): string[]; getLoginSavingEnabled(aHost: string): boolean; setLoginSavingEnabled(aHost: string, isEnabled: boolean): void; - findLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): nsILoginInfo[]; - countLogins(aOrigin: string, aActionOrigin: string, aHttpRealm: string): u32; + findLogins( + aOrigin: string, + aActionOrigin: string, + aHttpRealm: string + ): nsILoginInfo[]; + countLogins( + aOrigin: string, + aActionOrigin: string, + aHttpRealm: string + ): u32; searchLoginsAsync(matchData: any): Promise; searchLogins(matchData: nsIPropertyBag): nsILoginInfo[]; getSyncID(): Promise; @@ -6880,7 +7331,11 @@ declare global { aOriginalURI: nsIURI, aFlags: u32 ): string; - validateFileNameForSaving(aFileName: string, aType: string, aFlags: u32): string; + validateFileNameForSaving( + aFileName: string, + aType: string, + aFlags: u32 + ): string; } // https://searchfox.org/mozilla-central/source/toolkit/components/ml/nsIMLUtils.idl @@ -6899,7 +7354,12 @@ declare global { caseSensitive: boolean; entireWord: boolean; matchDiacritics: boolean; - Find(aPatText: string, aSearchRange: Range, aStartPoint: Range, aEndPoint: Range): Range; + Find( + aPatText: string, + aSearchRange: Range, + aStartPoint: Range, + aEndPoint: Range + ): Range; } // https://searchfox.org/mozilla-central/source/toolkit/components/find/nsIFindService.idl @@ -7000,7 +7460,10 @@ declare global { aCloseSource: boolean, aCloseSink: boolean ): void; - asyncCopy(aObserver: nsIRequestObserver, aObserverContext: nsISupports): void; + asyncCopy( + aObserver: nsIRequestObserver, + aObserverContext: nsISupports + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsIAsyncStreamCopier2.idl @@ -7014,7 +7477,10 @@ declare global { aCloseSource: boolean, aCloseSink: boolean ): void; - asyncCopy(aObserver: nsIRequestObserver, aObserverContext: nsISupports): void; + asyncCopy( + aObserver: nsIRequestObserver, + aObserverContext: nsISupports + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsIAsyncVerifyRedirectCallback.idl @@ -7097,7 +7563,11 @@ declare global { readonly LEVEL_PW_ENCRYPTED?: 1; readonly LEVEL_SECURE?: 2; - promptAuth(aChannel: nsIChannel, level: u32, authInfo: nsIAuthInformation): boolean; + promptAuth( + aChannel: nsIChannel, + level: u32, + authInfo: nsIAuthInformation + ): boolean; asyncPromptAuth( aChannel: nsIChannel, aCallback: nsIAuthPromptCallback, @@ -7200,7 +7670,8 @@ declare global { } interface nsICacheInfoChannel - extends nsISupports, + extends + nsISupports, Enums< typeof nsICacheInfoChannel_PreferredAlternativeDataDeliveryType & typeof nsICacheInfoChannel_CacheDisposition @@ -7222,7 +7693,10 @@ declare global { readonly alternativeDataType: string; readonly alternativeDataInputStream: nsIInputStream; getOriginalInputStream(aReceiver: nsIInputStreamReceiver): void; - openAlternativeOutputStream(type: string, predictedSize: i64): nsIAsyncOutputStream; + openAlternativeOutputStream( + type: string, + predictedSize: i64 + ): nsIAsyncOutputStream; getCacheDisposition(): nsICacheInfoChannel.CacheDisposition; } @@ -7343,7 +7817,8 @@ declare global { type FetchPriority = nsIClassOfService_FetchPriority; } - interface nsIClassOfService extends nsISupports, Enums { + interface nsIClassOfService + extends nsISupports, Enums { readonly Leader?: 1; readonly Follower?: 2; readonly Speculative?: 4; @@ -7395,7 +7870,8 @@ declare global { } interface nsIClassifiedChannel - extends nsISupports, + extends + nsISupports, Enums { setMatchedInfo(aList: string, aProvider: string, aFullHash: string): void; readonly matchedList: string; @@ -7414,7 +7890,11 @@ declare global { // https://searchfox.org/mozilla-central/source/netwerk/base/nsIContentSniffer.idl interface nsIContentSniffer extends nsISupports { - getMIMETypeFromContent(aRequest: nsIRequest, aData: u8[], aLength: u32): string; + getMIMETypeFromContent( + aRequest: nsIRequest, + aData: u8[], + aLength: u32 + ): string; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsIDHCPClient.idl @@ -7514,7 +7994,10 @@ declare global { } interface nsIAsyncFileMetadata extends nsIFileMetadata { - asyncFileMetadataWait(aCallback: nsIFileMetadataCallback, aEventTarget: nsIEventTarget): void; + asyncFileMetadataWait( + aCallback: nsIFileMetadataCallback, + aEventTarget: nsIEventTarget + ): void; } type nsIFileMetadataCallback = Callable<{ @@ -7555,7 +8038,10 @@ declare global { aSecurityFlags: u32, aContentPolicyType: nsContentPolicyType ): nsIChannel; - newChannelFromURIWithLoadInfo(aURI: nsIURI, aLoadInfo: nsILoadInfo): nsIChannel; + newChannelFromURIWithLoadInfo( + aURI: nsIURI, + aLoadInfo: nsILoadInfo + ): nsIChannel; newChannel( aSpec: string, aOriginCharset: string, @@ -7566,7 +8052,9 @@ declare global { aSecurityFlags: u32, aContentPolicyType: nsContentPolicyType ): nsIChannel; - newSuspendableChannelWrapper(innerChannel: nsIChannel): nsISuspendableChannelWrapper; + newSuspendableChannelWrapper( + innerChannel: nsIChannel + ): nsISuspendableChannelWrapper; newWebTransport(): nsIWebTransport; originAttributesForNetworkState(aChannel: nsIChannel): any; offline: boolean; @@ -7689,7 +8177,10 @@ declare global { readonly private: nsILoadContextInfo; readonly anonymous: nsILoadContextInfo; custom(aAnonymous: boolean, aOriginAttributes: any): nsILoadContextInfo; - fromLoadContext(aLoadContext: nsILoadContext, aAnonymous: boolean): nsILoadContextInfo; + fromLoadContext( + aLoadContext: nsILoadContext, + aAnonymous: boolean + ): nsILoadContextInfo; fromWindow(aWindow: nsIDOMWindow, aAnonymous: boolean): nsILoadContextInfo; } @@ -7699,7 +8190,11 @@ declare global { groupObserver: nsIRequestObserver; defaultLoadRequest: nsIRequest; addRequest(aRequest: nsIRequest, aContext: nsISupports): void; - removeRequest(aRequest: nsIRequest, aContext: nsISupports, aStatus: nsresult): void; + removeRequest( + aRequest: nsIRequest, + aContext: nsISupports, + aStatus: nsresult + ): void; readonly requests: nsISimpleEnumerator; totalKeepAliveBytes: u64; readonly activeCount: u32; @@ -7785,7 +8280,8 @@ declare global { } interface nsILoadInfo - extends nsISupports, + extends + nsISupports, Enums< typeof nsILoadInfo_StoragePermissionState & typeof nsILoadInfo_IPAddressSpace & @@ -7931,7 +8427,10 @@ declare global { originAttributes: any; initialSecurityCheckDone: boolean; loadTriggeredFromExternal: boolean; - appendRedirectHistoryEntry(channelToDeriveFrom: nsIChannel, isInternalRedirect: boolean): void; + appendRedirectHistoryEntry( + channelToDeriveFrom: nsIChannel, + isInternalRedirect: boolean + ): void; readonly redirectChainIncludingInternalRedirects: any; readonly redirectChain: any; readonly forcePreflight: boolean; @@ -8089,7 +8588,8 @@ declare global { } interface nsINetworkConnectivityService - extends nsISupports, + extends + nsISupports, Enums { DNSv4: nsINetworkConnectivityService.ConnectivityState; DNSv6: nsINetworkConnectivityService.ConnectivityState; @@ -8265,7 +8765,11 @@ declare global { type: string, permission: u32 ): void; - addDefaultFromPrincipal(principal: nsIPrincipal, type: string, permission: u32): void; + addDefaultFromPrincipal( + principal: nsIPrincipal, + type: string, + permission: u32 + ): void; removeFromPrincipal(principal: nsIPrincipal, type: string): void; removePermission(perm: nsIPermission): void; removeAll(): void; @@ -8273,11 +8777,21 @@ declare global { removeByType(type: string): void; removeAllExceptTypes(typeExceptions: string[]): void; removeByTypeSince(type: string, since: i64): void; - removeAllSinceWithTypeExceptions(since: i64, typeExceptions: string[]): void; + removeAllSinceWithTypeExceptions( + since: i64, + typeExceptions: string[] + ): void; testPermissionFromPrincipal(principal: nsIPrincipal, type: string): u32; - testExactPermissionFromPrincipal(principal: nsIPrincipal, type: string): u32; + testExactPermissionFromPrincipal( + principal: nsIPrincipal, + type: string + ): u32; testExactPermanentPermission(principal: nsIPrincipal, type: string): u32; - getPermissionObject(principal: nsIPrincipal, type: string, exactHost: boolean): nsIPermission; + getPermissionObject( + principal: nsIPrincipal, + type: string, + exactHost: boolean + ): nsIPermission; readonly all: nsIPermission[]; removePermissionsWithAttributes( patternAsJSON: string, @@ -8360,7 +8874,11 @@ declare global { checkMsg: string, checkValue: InOutParam ): boolean; - promptPassword(dialogTitle: string, text: string, password: InOutParam): boolean; + promptPassword( + dialogTitle: string, + text: string, + password: InOutParam + ): boolean; promptUsernameAndPassword( dialogTitle: string, text: string, @@ -8432,7 +8950,11 @@ declare global { } interface nsIProtocolProxyFilter extends nsISupports { - applyFilter(aURI: nsIURI, aProxy: nsIProxyInfo, aCallback: nsIProxyProtocolFilterResult): void; + applyFilter( + aURI: nsIURI, + aProxy: nsIProxyInfo, + aCallback: nsIProxyProtocolFilterResult + ): void; } interface nsIProtocolProxyChannelFilter extends nsISupports { @@ -8498,9 +9020,16 @@ declare global { aFailoverTimeout: u32, aFailoverProxy: nsIProxyInfo ): nsIProxyInfo; - getFailoverForProxy(aProxyInfo: nsIProxyInfo, aURI: nsIURI, aReason: nsresult): nsIProxyInfo; + getFailoverForProxy( + aProxyInfo: nsIProxyInfo, + aURI: nsIURI, + aReason: nsresult + ): nsIProxyInfo; registerFilter(aFilter: nsIProtocolProxyFilter, aPosition: u32): void; - registerChannelFilter(aFilter: nsIProtocolProxyChannelFilter, aPosition: u32): void; + registerChannelFilter( + aFilter: nsIProtocolProxyChannelFilter, + aPosition: u32 + ): void; unregisterFilter(aFilter: nsIProtocolProxyFilter): void; unregisterChannelFilter(aFilter: nsIProtocolProxyChannelFilter): void; readonly hasProxyFilterRegistered: boolean; @@ -8702,7 +9231,11 @@ declare global { init(aPort: i32, aLoopbackOnly: boolean, aBackLog: i32): void; initIPv6(aPort: i32, aLoopbackOnly: boolean, aBackLog: i32): void; initDualStack(aPort: i32, aBackLog: i32): void; - initSpecialConnection(aPort: i32, aFlags: nsServerSocketFlag, aBackLog: i32): void; + initSpecialConnection( + aPort: i32, + aFlags: nsServerSocketFlag, + aBackLog: i32 + ): void; initWithFilename(aPath: nsIFile, aPermissions: u32, aBacklog: i32): void; initWithAbstractAddress(aName: string, aBacklog: i32): void; close(): void; @@ -8711,7 +9244,10 @@ declare global { } interface nsIServerSocketListener extends nsISupports { - onSocketAccepted(aServ: nsIServerSocket, aTransport: nsISocketTransport): void; + onSocketAccepted( + aServ: nsIServerSocket, + aTransport: nsISocketTransport + ): void; onStopListening(aServ: nsIServerSocket, aStatus: nsresult): void; } @@ -8894,7 +9430,10 @@ declare global { } interface nsIStreamLoader extends nsIThreadRetargetableStreamListener { - init(aStreamObserver: nsIStreamLoaderObserver, aRequestObserver?: nsIRequestObserver): void; + init( + aStreamObserver: nsIStreamLoaderObserver, + aRequestObserver?: nsIRequestObserver + ): void; readonly numBytesRead: u32; readonly request: nsIRequest; } @@ -8902,7 +9441,10 @@ declare global { // https://searchfox.org/mozilla-central/source/netwerk/base/nsIStreamTransportService.idl interface nsIStreamTransportService extends nsISupports { - createInputTransport(aStream: nsIInputStream, aCloseWhenDone: boolean): nsITransport; + createInputTransport( + aStream: nsIInputStream, + aCloseWhenDone: boolean + ): nsITransport; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsISuspendableChannelWrapper.idl @@ -8920,9 +9462,19 @@ declare global { interface nsISystemProxySettings extends nsISupports { readonly mainThreadOnly: boolean; readonly PACURI: string; - getProxyForURI(testSpec: string, testScheme: string, testHost: string, testPort: i32): string; + getProxyForURI( + testSpec: string, + testScheme: string, + testHost: string, + testPort: i32 + ): string; readonly systemWPADSetting: boolean; - setSystemProxyInfo(host: string, port: i32, pacFileUrl: string, exclusionList: string[]): void; + setSystemProxyInfo( + host: string, + port: i32, + pacFileUrl: string, + exclusionList: string[] + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsITLSServerSocket.idl @@ -8962,7 +9514,10 @@ declare global { } interface nsITLSServerSecurityObserver extends nsISupports { - onHandshakeDone(aServer: nsITLSServerSocket, aStatus: nsITLSClientStatus): void; + onHandshakeDone( + aServer: nsITLSServerSocket, + aStatus: nsITLSClientStatus + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/base/nsIThreadRetargetableRequest.idl @@ -9008,7 +9563,8 @@ declare global { type BodyInfoAccess = nsITimedChannel_BodyInfoAccess; } - interface nsITimedChannel extends nsISupports, Enums { + interface nsITimedChannel + extends nsISupports, Enums { redirectCount: u8; internalRedirectCount: u8; initiatorType: string; @@ -9054,10 +9610,21 @@ declare global { readonly STATUS_READING?: 4915208; readonly STATUS_WRITING?: 4915209; - openInputStream(aFlags: u32, aSegmentSize: u32, aSegmentCount: u32): nsIInputStream; - openOutputStream(aFlags: u32, aSegmentSize: u32, aSegmentCount: u32): nsIOutputStream; + openInputStream( + aFlags: u32, + aSegmentSize: u32, + aSegmentCount: u32 + ): nsIInputStream; + openOutputStream( + aFlags: u32, + aSegmentSize: u32, + aSegmentCount: u32 + ): nsIOutputStream; close(aReason: nsresult): void; - setEventSink(aSink: nsITransportEventSink, aEventTarget: nsIEventTarget): void; + setEventSink( + aSink: nsITransportEventSink, + aEventTarget: nsIEventTarget + ): void; } interface nsITransportEventSink extends nsISupports { @@ -9078,7 +9645,12 @@ declare global { aPrincipal: nsIPrincipal, aAddressReuse?: boolean ): void; - init2(aAddr: string, aPort: i32, aPrincipal: nsIPrincipal, aAddressReuse?: boolean): void; + init2( + aAddr: string, + aPort: i32, + aPrincipal: nsIPrincipal, + aAddressReuse?: boolean + ): void; close(): void; asyncListen(aListener: nsIUDPSocketListener): void; readonly localAddr: nsINetAddr; @@ -9257,7 +9829,11 @@ declare global { // https://searchfox.org/mozilla-central/source/netwerk/base/nsIUploadChannel.idl interface nsIUploadChannel extends nsISupports { - setUploadStream(aStream: nsIInputStream, aContentType: string, aContentLength: i64): void; + setUploadStream( + aStream: nsIInputStream, + aContentType: string, + aContentLength: i64 + ): void; readonly uploadStream: nsIInputStream; } @@ -9353,7 +9929,10 @@ declare global { readonly dataSize: i64; readonly altDataSize: i64; readonly altDataType: string; - openAlternativeOutputStream(type: string, predictedSize: i64): nsIAsyncOutputStream; + openAlternativeOutputStream( + type: string, + predictedSize: i64 + ): nsIAsyncOutputStream; openAlternativeInputStream(type: string): nsIInputStream; readonly loadContextInfo: nsILoadContextInfo; setBypassWriterLock(aBypass: boolean): void; @@ -9378,7 +9957,11 @@ declare global { readonly ENTRY_NOT_WANTED?: 3; onCacheEntryCheck(aEntry: nsICacheEntry): u32; - onCacheEntryAvailable(aEntry: nsICacheEntry, aNew: boolean, aResult: nsresult): void; + onCacheEntryAvailable( + aEntry: nsICacheEntry, + aNew: boolean, + aResult: nsresult + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICachePurgeLock.idl @@ -9423,9 +10006,16 @@ declare global { aHasAltData: OutParam, aSizeInKB: OutParam ): void; - asyncDoomURI(aURI: nsIURI, aIdExtension: string, aCallback: nsICacheEntryDoomCallback): void; + asyncDoomURI( + aURI: nsIURI, + aIdExtension: string, + aCallback: nsICacheEntryDoomCallback + ): void; asyncEvictStorage(aCallback: nsICacheEntryDoomCallback): void; - asyncVisitStorage(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; + asyncVisitStorage( + aVisitor: nsICacheStorageVisitor, + aVisitEntries: boolean + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/cache2/nsICacheStorageService.idl @@ -9446,8 +10036,13 @@ declare global { clearAllOriginDictionaries(): void; purgeFromMemory(aWhat: u32): void; readonly ioTarget: nsIEventTarget; - asyncGetDiskConsumption(aObserver: nsICacheStorageConsumptionObserver): void; - asyncVisitAllStorages(aVisitor: nsICacheStorageVisitor, aVisitEntries: boolean): void; + asyncGetDiskConsumption( + aObserver: nsICacheStorageConsumptionObserver + ): void; + asyncVisitAllStorages( + aVisitor: nsICacheStorageVisitor, + aVisitEntries: boolean + ): void; } interface nsICacheStorageConsumptionObserver extends nsISupports { @@ -9551,7 +10146,12 @@ declare global { readonly cookies: nsICookie[]; readonly sessionCookies: nsICookie[]; getCookieBehavior(aIsPrivate: boolean): u32; - remove(aHost: string, aName: string, aPath: string, aOriginAttributes: any): void; + remove( + aHost: string, + aName: string, + aPath: string, + aOriginAttributes: any + ): void; add( aHost: string, aPath: string, @@ -9580,9 +10180,18 @@ declare global { aSchemeMap: nsICookie.schemeType, aIsPartitioned?: boolean ): nsICookieValidation; - cookieExists(aHost: string, aPath: string, aName: string, aOriginAttributes: any): boolean; + cookieExists( + aHost: string, + aPath: string, + aName: string, + aOriginAttributes: any + ): boolean; countCookiesFromHost(aHost: string): u32; - getCookiesFromHost(aHost: string, aOriginAttributes: any, aSorted?: boolean): nsICookie[]; + getCookiesFromHost( + aHost: string, + aOriginAttributes: any, + aSorted?: boolean + ): nsICookie[]; getCookiesWithOriginAttributes( aPattern: string, aHost?: string, @@ -9592,7 +10201,9 @@ declare global { removeCookiesFromExactHost(aHost: string, aPattern: string): void; removeAllSince(aSinceWhen: i64): Promise; getCookiesSince(aSinceWhen: i64): nsICookie[]; - addThirdPartyCookieBlockingExceptions(aExcpetions: nsIThirdPartyCookieExceptionEntry[]): void; + addThirdPartyCookieBlockingExceptions( + aExcpetions: nsIThirdPartyCookieExceptionEntry[] + ): void; removeThirdPartyCookieBlockingExceptions( aExceptions: nsIThirdPartyCookieExceptionEntry[] ): void; @@ -9616,7 +10227,8 @@ declare global { type Action = nsICookieNotification_Action; } - interface nsICookieNotification extends nsISupports, Enums { + interface nsICookieNotification + extends nsISupports, Enums { readonly action: nsICookieNotification.Action; readonly cookie: nsICookie; readonly baseDomain: string; @@ -9652,7 +10264,11 @@ declare global { readonly BEHAVIOR_LAST?: 5; getCookieStringFromHttp(aURI: nsIURI, aChannel: nsIChannel): string; - setCookieStringFromHttp(aURI: nsIURI, aCookie: string, aChannel: nsIChannel): void; + setCookieStringFromHttp( + aURI: nsIURI, + aCookie: string, + aChannel: nsIChannel + ): void; runInTransaction(aCallback: nsICookieTransactionCallback): void; } @@ -9684,8 +10300,7 @@ declare global { } interface nsICookieValidation - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly result: nsICookieValidation.ValidationError; readonly errorString: string; } @@ -9779,13 +10394,21 @@ declare global { aAllRecordsHaveEchConfig: OutParam, aAllRecordsInH3ExcludedList: OutParam ): nsISVCBRecord[]; - GetAllRecords(aNoHttp2: boolean, aNoHttp3: boolean, aCName: string): nsISVCBRecord[]; + GetAllRecords( + aNoHttp2: boolean, + aNoHttp3: boolean, + aCName: string + ): nsISVCBRecord[]; } // https://searchfox.org/mozilla-central/source/netwerk/dns/nsIDNSListener.idl interface nsIDNSListener extends nsISupports { - onLookupComplete(aRequest: nsICancelable, aRecord: nsIDNSRecord, aStatus: nsresult): void; + onLookupComplete( + aRequest: nsICancelable, + aRecord: nsIDNSRecord, + aStatus: nsresult + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/dns/nsIDNSRecord.idl @@ -9867,7 +10490,8 @@ declare global { } interface nsIDNSService - extends nsISupports, + extends + nsISupports, Enums< typeof nsIDNSService_ResolveType & typeof nsIDNSService_ResolverMode & @@ -10014,7 +10638,8 @@ declare global { type value = nsITRRSkipReason_value; } - interface nsITRRSkipReason extends nsISupports, Enums {} + interface nsITRRSkipReason + extends nsISupports, Enums {} // https://searchfox.org/mozilla-central/source/netwerk/dns/nsPIDNSService.idl @@ -10095,7 +10720,11 @@ declare global { // https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIEarlyHintObserver.idl interface nsIEarlyHintObserver extends nsISupports { - earlyHint(linkHeader: string, referrerPolicy: string, cspHeader: string): void; + earlyHint( + linkHeader: string, + referrerPolicy: string, + cspHeader: string + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsIHttpActivityObserver.idl @@ -10212,7 +10841,10 @@ declare global { getResponseHeader(header: string): string; setResponseHeader(header: string, value: string, merge: boolean): void; visitResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; - getOriginalResponseHeader(aHeader: string, aVisitor: nsIHttpHeaderVisitor): void; + getOriginalResponseHeader( + aHeader: string, + aVisitor: nsIHttpHeaderVisitor + ): void; visitOriginalResponseHeaders(aVisitor: nsIHttpHeaderVisitor): void; isNoStoreResponse(): boolean; isNoCacheResponse(): boolean; @@ -10220,7 +10852,11 @@ declare global { upgradeToSecure(): void; topLevelContentWindowId: u64; browserId: u64; - logBlockedCORSRequest(aMessage: string, aCategory: string, aIsWarning: boolean): void; + logBlockedCORSRequest( + aMessage: string, + aCategory: string, + aIsWarning: boolean + ): void; logMimeTypeMismatch( aMessageName: string, aWarning: boolean, @@ -10305,7 +10941,9 @@ declare global { setEarlyHintObserver(aObserver: nsIEarlyHintObserver): void; earlyHintPreloaderId: u64; readonly isProxyUsed: boolean; - setWebTransportSessionEventListener(aListener: WebTransportSessionEventListener): void; + setWebTransportSessionEventListener( + aListener: WebTransportSessionEventListener + ): void; earlyHintLinkType: u32; isUserAgentHeaderModified: boolean; setResponseOverride(aReplacedHttpResponse: nsIReplacedHttpResponse): void; @@ -10366,14 +11004,24 @@ declare global { } interface nsIObliviousHttp extends nsISupports { - encapsulateRequest(encodedConfig: u8[], request: u8[]): nsIObliviousHttpClientRequest; + encapsulateRequest( + encodedConfig: u8[], + request: u8[] + ): nsIObliviousHttpClientRequest; server(): nsIObliviousHttpServer; decodeConfigList(encodedConfigList: u8[]): u8[][]; } interface nsIObliviousHttpService extends nsISupports { - newChannel(relayURI: nsIURI, targetURI: nsIURI, encodedConfig: u8[]): nsIChannel; - getTRRSettings(relayURI: OutParam, encodedConfig: OutParam): void; + newChannel( + relayURI: nsIURI, + targetURI: nsIURI, + encodedConfig: u8[] + ): nsIChannel; + getTRRSettings( + relayURI: OutParam, + encodedConfig: OutParam + ): void; clearTRRConfig(): void; } @@ -10601,7 +11249,10 @@ declare global { pingInterval: u32; pingTimeout: u32; serial: u32; - setServerParameters(aProvider: nsITransportProvider, aNegotiatedExtensions: string): void; + setServerParameters( + aProvider: nsITransportProvider, + aNegotiatedExtensions: string + ): void; } // https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/nsIWebSocketEventService.idl @@ -10630,7 +11281,11 @@ declare global { readonly TYPE_BLOB?: 1; readonly TYPE_ARRAYBUFFER?: 2; - webSocketCreated(aWebSocketSerialID: u32, aURI: string, aProtocols: string): void; + webSocketCreated( + aWebSocketSerialID: u32, + aURI: string, + aProtocols: string + ): void; webSocketOpened( aWebSocketSerialID: u32, aEffectiveURI: string, @@ -10638,16 +11293,31 @@ declare global { aExtensions: string, aHttpChannelId: u64 ): void; - webSocketMessageAvailable(aWebSocketSerialID: u32, aMessage: string, aType: u16): void; - webSocketClosed(aWebSocketSerialID: u32, aWasClean: boolean, aCode: u16, aReason: string): void; + webSocketMessageAvailable( + aWebSocketSerialID: u32, + aMessage: string, + aType: u16 + ): void; + webSocketClosed( + aWebSocketSerialID: u32, + aWasClean: boolean, + aCode: u16, + aReason: string + ): void; frameReceived(aWebSocketSerialID: u32, aFrame: nsIWebSocketFrame): void; frameSent(aWebSocketSerialID: u32, aFrame: nsIWebSocketFrame): void; } interface nsIWebSocketEventService extends nsISupports { sendMessage(aWebSocketSerialID: u32, aMessage: string): void; - addListener(aInnerWindowID: u64, aListener: nsIWebSocketEventListener): void; - removeListener(aInnerWindowID: u64, aListener: nsIWebSocketEventListener): void; + addListener( + aInnerWindowID: u64, + aListener: nsIWebSocketEventListener + ): void; + removeListener( + aInnerWindowID: u64, + aListener: nsIWebSocketEventListener + ): void; hasListenerFor(aInnerWindowID: u64): boolean; } @@ -10689,8 +11359,12 @@ declare global { } interface nsIWebTransport - extends nsISupports, - Enums { + extends + nsISupports, + Enums< + typeof nsIWebTransport_WebTransportError & + typeof nsIWebTransport_HTTPVersion + > { asyncConnect( aURI: nsIURI, aDedicated: boolean, @@ -10702,8 +11376,12 @@ declare global { ): void; getStats(): void; closeSession(aErrorCode: u32, aReason: string): void; - createOutgoingBidirectionalStream(aListener: nsIWebTransportStreamCallback): void; - createOutgoingUnidirectionalStream(aListener: nsIWebTransportStreamCallback): void; + createOutgoingBidirectionalStream( + aListener: nsIWebTransportStreamCallback + ): void; + createOutgoingUnidirectionalStream( + aListener: nsIWebTransportStreamCallback + ): void; sendDatagram(aData: u8[], aTrackingId: u64): void; getMaxDatagramSize(): void; } @@ -10721,12 +11399,17 @@ declare global { } interface WebTransportSessionEventListener - extends nsISupports, + extends + nsISupports, Enums { onSessionReady(aSessionId: u64): void; onSessionClosed(aCleanly: boolean, aErrorCode: u32, aReason: string): void; - onIncomingBidirectionalStreamAvailable(aStream: nsIWebTransportBidirectionalStream): void; - onIncomingUnidirectionalStreamAvailable(aStream: nsIWebTransportReceiveStream): void; + onIncomingBidirectionalStreamAvailable( + aStream: nsIWebTransportBidirectionalStream + ): void; + onIncomingUnidirectionalStreamAvailable( + aStream: nsIWebTransportReceiveStream + ): void; onStopSending(aStreamId: u64, aError: nsresult): void; onResetReceived(aStreamId: u64, aError: nsresult): void; onDatagramReceived(aData: u8[]): void; @@ -10738,7 +11421,9 @@ declare global { } interface nsIWebTransportStreamCallback extends nsISupports { - onBidirectionalStreamReady(aStream: nsIWebTransportBidirectionalStream): void; + onBidirectionalStreamReady( + aStream: nsIWebTransportBidirectionalStream + ): void; onUnidirectionalStreamReady(aStream: nsIWebTransportSendStream): void; onError(aError: u8): void; } @@ -10845,7 +11530,12 @@ declare global { readonly blockFileDownloadsEnabled: boolean; isAllowed(aAction: i16, aUri?: nsIURI): boolean; readonly loggingEnabled: boolean; - log(aEntryType: i16, aFlag: boolean, aSource: nsIURI, aTarget?: nsIFile): void; + log( + aEntryType: i16, + aFlag: boolean, + aSource: nsIURI, + aTarget?: nsIFile + ): void; } // https://searchfox.org/mozilla-central/source/dom/media/bridge/IPeerConnection.idl @@ -10919,10 +11609,16 @@ declare global { aCert: nsIX509Cert, aIsTemporary: OutParam ): boolean; - clearValidityOverride(aHostName: string, aPort: i32, aOriginAttributes: any): void; + clearValidityOverride( + aHostName: string, + aPort: i32, + aOriginAttributes: any + ): void; clearAllOverrides(): void; getOverrides(): nsICertOverride[]; - setDisableAllSecurityChecksAndLetAttackersInterceptMyData(aDisable: boolean): void; + setDisableAllSecurityChecksAndLetAttackersInterceptMyData( + aDisable: boolean + ): void; setDisableAllSecurityChecksAndLetAttackersInterceptMyDataForUserContext( aUserContextId: u32, aDisable: boolean @@ -10974,14 +11670,29 @@ declare global { readonly TRUST_ANCHOR?: 1; hasPriorData(type: u8, callback: nsICertStorageCallback): void; - setRevocations(revocations: nsIRevocationState[], callback: nsICertStorageCallback): void; - getRevocationState(issuer: u8[], serial: u8[], subject: u8[], pubkey: u8[]): i16; + setRevocations( + revocations: nsIRevocationState[], + callback: nsICertStorageCallback + ): void; + getRevocationState( + issuer: u8[], + serial: u8[], + subject: u8[], + pubkey: u8[] + ): i16; setFullCRLiteFilter(filter: u8[], callback: nsICertStorageCallback): void; - addCRLiteDelta(delta: u8[], filename: string, callback: nsICertStorageCallback): void; + addCRLiteDelta( + delta: u8[], + filename: string, + callback: nsICertStorageCallback + ): void; testNoteCRLiteUpdateTime(callback: nsICertStorageCallback): void; addCerts(certs: nsICertInfo[], callback: nsICertStorageCallback): void; TestHelperAddCert(cert: string, subject: string, trust: i16): void; - removeCertsByHashes(hashes: string[], callback: nsICertStorageCallback): void; + removeCertsByHashes( + hashes: string[], + callback: nsICertStorageCallback + ): void; findCertsBySubject(subject: u8[]): u8[][]; hasAllCertsByHash(hashes: u8[][]): boolean; findCertByHash(cert_hash: u8[]): u8[]; @@ -11009,8 +11720,14 @@ declare global { cert: nsIX509Cert, trust: OutParam ): boolean; - setPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; - getPKCS12FilePassword(ctx: nsIInterfaceRequestor, password: OutParam): boolean; + setPKCS12FilePassword( + ctx: nsIInterfaceRequestor, + password: OutParam + ): boolean; + getPKCS12FilePassword( + ctx: nsIInterfaceRequestor, + password: OutParam + ): boolean; } // https://searchfox.org/mozilla-central/source/security/manager/ssl/nsIClientAuthDialogService.idl @@ -11053,8 +11770,7 @@ declare global { } interface nsIClientAuthRememberService - extends nsISupports, - Enums { + extends nsISupports, Enums { forgetRememberedDecision(key: string): void; getDecisions(): nsIClientAuthRememberRecord[]; rememberDecisionScriptable( @@ -11120,8 +11836,7 @@ declare global { } interface nsIDataStorageManager - extends nsISupports, - Enums { + extends nsISupports, Enums { get(dataStorage: nsIDataStorageManager.DataStorage): nsIDataStorage; } } // global @@ -11137,7 +11852,8 @@ declare global { type DataType = nsIDataStorage_DataType; } - interface nsIDataStorage extends nsISupports, Enums { + interface nsIDataStorage + extends nsISupports, Enums { get(key: string, type: nsIDataStorage.DataType): string; put(key: string, value: string, type: nsIDataStorage.DataType): void; remove(key: string, type: nsIDataStorage.DataType): void; @@ -11337,8 +12053,7 @@ declare global { } interface nsISiteSecurityService - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly Success?: 0; readonly ERROR_UNKNOWN?: 1; readonly ERROR_COULD_NOT_PARSE_HEADER?: 3; @@ -11390,7 +12105,11 @@ declare global { readonly earlyDataAccepted: boolean; driveHandshake(): void; joinConnection(npnProtocol: string, hostname: string, port: i32): boolean; - testJoinConnection(npnProtocol: string, hostname: string, port: i32): boolean; + testJoinConnection( + npnProtocol: string, + hostname: string, + port: i32 + ): boolean; isAcceptableForHost(hostname: string): boolean; readonly KEAUsed: i16; readonly KEAKeyBits: u32; @@ -11428,11 +12147,13 @@ declare enum nsITransportSecurityInfo_OverridableErrorCategory { declare global { namespace nsITransportSecurityInfo { - type OverridableErrorCategory = nsITransportSecurityInfo_OverridableErrorCategory; + type OverridableErrorCategory = + nsITransportSecurityInfo_OverridableErrorCategory; } interface nsITransportSecurityInfo - extends nsISupports, + extends + nsISupports, Enums { readonly SSL_VERSION_3?: 0; readonly TLS_VERSION_1?: 1; @@ -11519,8 +12240,7 @@ declare global { } interface nsIAppSignatureInfo - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly signerCert: nsIX509Cert; readonly signatureAlgorithm: nsIAppSignatureInfo.SignatureAlgorithm; } @@ -11576,7 +12296,8 @@ declare global { } interface nsIX509CertDB - extends nsISupports, + extends + nsISupports, Enums< typeof nsIX509CertDB_VerifyUsage & typeof nsIX509CertDB_QWACType & @@ -11601,16 +12322,33 @@ declare global { readonly FLAG_MUST_BE_EV?: 2; findCertByDBKey(aDBkey: string): nsIX509Cert; - importCertificates(data: u8[], length: u32, type: u32, ctx: nsIInterfaceRequestor): void; - importEmailCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; - importUserCertificate(data: u8[], length: u32, ctx: nsIInterfaceRequestor): void; + importCertificates( + data: u8[], + length: u32, + type: u32, + ctx: nsIInterfaceRequestor + ): void; + importEmailCertificate( + data: u8[], + length: u32, + ctx: nsIInterfaceRequestor + ): void; + importUserCertificate( + data: u8[], + length: u32, + ctx: nsIInterfaceRequestor + ): void; deleteCertificate(aCert: nsIX509Cert): void; setCertTrust(cert: nsIX509Cert, type: u32, trust: u32): void; setCertTrustFromString(cert: nsIX509Cert, trustString: string): void; isCertTrusted(cert: nsIX509Cert, certType: u32, trustType: u32): boolean; importCertsFromFile(aFile: nsIFile, aType: u32): void; importPKCS12File(aFile: nsIFile, aPassword: string): u32; - exportPKCS12File(aFile: nsIFile, aCerts: nsIX509Cert[], aPassword: string): u32; + exportPKCS12File( + aFile: nsIFile, + aCerts: nsIX509Cert[], + aPassword: string + ): u32; constructX509FromBase64(base64: string): nsIX509Cert; constructX509(certDER: u8[]): nsIX509Cert; openSignedAppFileAsync( @@ -11718,9 +12456,11 @@ declare global { } interface mozIPlacesAutoComplete - extends nsISupports, + extends + nsISupports, Enums< - typeof mozIPlacesAutoComplete_MatchBehaviors & typeof mozIPlacesAutoComplete_SearchBehaviors + typeof mozIPlacesAutoComplete_MatchBehaviors & + typeof mozIPlacesAutoComplete_SearchBehaviors > {} // https://searchfox.org/mozilla-central/source/toolkit/components/places/mozIPlacesPendingOperation.idl @@ -11732,8 +12472,18 @@ declare global { // https://searchfox.org/mozilla-central/source/toolkit/components/places/mozISyncedBookmarksMirror.idl interface mozISyncedBookmarksMirrorProgressListener extends nsISupports { - onFetchLocalTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; - onFetchRemoteTree(took: i64, itemCount: i64, deletedCount: i64, problems: nsIPropertyBag): void; + onFetchLocalTree( + took: i64, + itemCount: i64, + deletedCount: i64, + problems: nsIPropertyBag + ): void; + onFetchRemoteTree( + took: i64, + itemCount: i64, + deletedCount: i64, + problems: nsIPropertyBag + ): void; onMerge(took: i64, counts: nsIPropertyBag): void; onApply(took: i64): void; } @@ -11765,7 +12515,8 @@ declare global { } interface mozISyncedBookmarksMerger - extends nsISupports, + extends + nsISupports, Enums< typeof mozISyncedBookmarksMerger_SyncedItemKinds & typeof mozISyncedBookmarksMerger_SyncedItemValidity @@ -11801,7 +12552,11 @@ declare global { isRichIcon?: boolean ): Promise; getFaviconForPage(aPageURI: nsIURI, aPreferredWidth?: u16): Promise; - tryCopyFavicons(aFromPageURI: nsIURI, aToPageURI: nsIURI, aFaviconLoadType: u32): Promise; + tryCopyFavicons( + aFromPageURI: nsIURI, + aToPageURI: nsIURI, + aFaviconLoadType: u32 + ): Promise; } interface nsIFavicon extends nsISupports { @@ -11838,9 +12593,11 @@ declare global { } interface nsINavBookmarksService - extends nsISupports, + extends + nsISupports, Enums< - typeof nsINavBookmarksService_BookmarkType & typeof nsINavBookmarksService_ChangeSource + typeof nsINavBookmarksService_BookmarkType & + typeof nsINavBookmarksService_ChangeSource > { readonly DEFAULT_INDEX?: -1; readonly SYNC_STATUS_UNKNOWN?: 0; @@ -11858,10 +12615,20 @@ declare global { aSource?: u16 ): i64; removeItem(aItemId: i64, aSource?: u16): void; - createFolder(aParentFolder: i64, name: string, index: i32, aGuid?: string, aSource?: u16): i64; + createFolder( + aParentFolder: i64, + name: string, + index: i32, + aGuid?: string, + aSource?: u16 + ): i64; setItemTitle(aItemId: i64, aTitle: string, aSource?: u16): void; getItemTitle(aItemId: i64): string; - setItemLastModified(aItemId: i64, aLastModified: PRTime, aSource?: u16): void; + setItemLastModified( + aItemId: i64, + aLastModified: PRTime, + aSource?: u16 + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/places/nsINavHistoryService.idl @@ -11881,8 +12648,7 @@ declare global { } interface nsINavHistoryResultNode - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly parent: nsINavHistoryContainerResultNode; readonly parentResult: nsINavHistoryResult; readonly uri: string; @@ -11951,9 +12717,18 @@ declare global { aOldAccessCount: u32 ): void; nodeTagsChanged(aNode: nsINavHistoryResultNode): void; - nodeKeywordChanged(aNode: nsINavHistoryResultNode, aNewKeyword: string): void; - nodeDateAddedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; - nodeLastModifiedChanged(aNode: nsINavHistoryResultNode, aNewValue: PRTime): void; + nodeKeywordChanged( + aNode: nsINavHistoryResultNode, + aNewKeyword: string + ): void; + nodeDateAddedChanged( + aNode: nsINavHistoryResultNode, + aNewValue: PRTime + ): void; + nodeLastModifiedChanged( + aNode: nsINavHistoryResultNode, + aNewValue: PRTime + ): void; containerStateChanged( aContainerNode: nsINavHistoryContainerResultNode, aOldState: u32, @@ -11968,7 +12743,10 @@ declare global { interface nsINavHistoryResult extends nsISupports { sortingMode: u16; suppressNotifications: boolean; - addObserver(aObserver: nsINavHistoryResultObserver, aOwnsWeak?: boolean): void; + addObserver( + aObserver: nsINavHistoryResultObserver, + aOwnsWeak?: boolean + ): void; removeObserver(aObserver: nsINavHistoryResultObserver): void; readonly root: nsINavHistoryContainerResultNode; onBeginUpdateBatch(): void; @@ -12048,9 +12826,11 @@ declare global { } interface nsINavHistoryQueryOptions - extends nsISupports, + extends + nsISupports, Enums< - typeof nsINavHistoryQueryOptions_SortByType & typeof nsINavHistoryQueryOptions_ResultType + typeof nsINavHistoryQueryOptions_SortByType & + typeof nsINavHistoryQueryOptions_ResultType > { readonly QUERY_TYPE_HISTORY?: 0; readonly QUERY_TYPE_BOOKMARKS?: 1; @@ -12086,8 +12866,7 @@ declare global { } interface nsINavHistoryService - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly DATABASE_SCHEMA_VERSION?: 82; readonly DATABASE_STATUS_OK?: 0; readonly DATABASE_STATUS_CREATE?: 1; @@ -12115,10 +12894,17 @@ declare global { aQuery: OutParam, options: OutParam ): void; - queryToQueryString(aQuery: nsINavHistoryQuery, options: nsINavHistoryQueryOptions): string; + queryToQueryString( + aQuery: nsINavHistoryQuery, + options: nsINavHistoryQueryOptions + ): string; readonly historyDisabled: boolean; makeGuid(): string; - pageFrecencyThreshold(aVisitAgeInDays: i32, aNumVisits: i32, aBookmarked: boolean): i64; + pageFrecencyThreshold( + aVisitAgeInDays: i32, + aNumVisits: i32, + aBookmarked: boolean + ): i64; hashURL(aSpec: string, aMode?: string): u64; isFrecencyDecaying: boolean; readonly isAlternativeFrecencyEnabled: boolean; @@ -12166,7 +12952,10 @@ declare global { setStringPref(aPrefName: string, aValue: string): void; getIntPref(aPrefName: string, aDefaultValue?: i32): i32; setIntPref(aPrefName: string, aValue: i32): void; - getComplexValue(aPrefName: string, aType: T): nsQIResult; + getComplexValue( + aPrefName: string, + aType: T + ): nsQIResult; setComplexValue(aPrefName: string, aType: nsID, aValue: nsISupports): void; clearUserPref(aPrefName: string): void; lockPref(aPrefName: string): void; @@ -12177,7 +12966,11 @@ declare global { unlockPref(aPrefName: string): void; deleteBranch(aStartingAt: string): void; getChildList(aStartingAt: string): string[]; - addObserver(aDomain: string, aObserver: nsIObserver, aHoldWeak?: boolean): void; + addObserver( + aDomain: string, + aObserver: nsIObserver, + aHoldWeak?: boolean + ): void; removeObserver(aDomain: string, aObserver: nsIObserver): void; } @@ -12206,7 +12999,13 @@ declare global { isSticky: boolean, isLocked: boolean ): void; - onIntPref(kind: string, name: string, value: i32, isSticky: boolean, isLocked: boolean): void; + onIntPref( + kind: string, + name: string, + value: i32, + isSticky: boolean, + isLocked: boolean + ): void; onBoolPref( kind: string, name: string, @@ -12220,7 +13019,10 @@ declare global { interface nsIPrefService extends nsISupports { resetPrefs(): void; savePrefFile(aFile: nsIFile): void; - backupPrefFile(aFile: nsIFile, aOverrideMap?: nsIPrefOverrideMap): Promise; + backupPrefFile( + aFile: nsIFile, + aOverrideMap?: nsIPrefOverrideMap + ): Promise; getBranch(aPrefRoot: string): nsIPrefBranch; getDefaultBranch(aPrefRoot: string): nsIPrefBranch; readonly dirty: boolean; @@ -12228,7 +13030,11 @@ declare global { readUserPrefsFromFile(aFile: nsIFile): void; readStats(callback: nsIPrefStatsCallback): void; resetStats(): void; - parsePrefsFromBuffer(bytes: u8[], observer: nsIPrefObserver, pathLabel?: string): void; + parsePrefsFromBuffer( + bytes: u8[], + observer: nsIPrefObserver, + pathLabel?: string + ): void; readonly userPrefsFileLastModifiedAtStartup: PRTime; readonly prefsJsPreamble: string; } @@ -12306,7 +13112,10 @@ declare global { getProfileDataAsync(aSinceTime?: double): Promise; getProfileDataAsArrayBuffer(aSinceTime?: double): Promise; getProfileDataAsGzippedArrayBuffer(aSinceTime?: double): Promise; - dumpProfileToFileAsync(aFilename: string, aSinceTime?: double): Promise; + dumpProfileToFileAsync( + aFilename: string, + aSinceTime?: double + ): Promise; dumpProfileToFile(aFilename: string): void; IsActive(): boolean; ClearAllPages(): void; @@ -12410,12 +13219,21 @@ declare global { readonly storageVersion: i32; readonly allowSkippedRecord: boolean; getLastSync(callback: mozIBridgedSyncEngineCallback): void; - setLastSync(lastSyncMillis: i64, callback: mozIBridgedSyncEngineCallback): void; + setLastSync( + lastSyncMillis: i64, + callback: mozIBridgedSyncEngineCallback + ): void; getSyncId(callback: mozIBridgedSyncEngineCallback): void; resetSyncId(callback: mozIBridgedSyncEngineCallback): void; - ensureCurrentSyncId(newSyncId: string, callback: mozIBridgedSyncEngineCallback): void; + ensureCurrentSyncId( + newSyncId: string, + callback: mozIBridgedSyncEngineCallback + ): void; syncStarted(callback: mozIBridgedSyncEngineCallback): void; - storeIncoming(incomingEnvelopesAsJSON: string[], callback: mozIBridgedSyncEngineCallback): void; + storeIncoming( + incomingEnvelopesAsJSON: string[], + callback: mozIBridgedSyncEngineCallback + ): void; apply(callback: mozIBridgedSyncEngineApplyCallback): void; setUploaded( newTimestampMillis: i64, @@ -12461,15 +13279,29 @@ declare global { scroll: string; addTextField(aIsXPath: boolean, aIdOrXPath: string, aValue: string): void; addCheckbox(aIsXPath: boolean, aIdOrXPath: string, aValue: boolean): void; - addFileList(aIsXPath: boolean, aIdOrXPath: string, aType: string, aFileList: string[]): void; + addFileList( + aIsXPath: boolean, + aIdOrXPath: string, + aType: string, + aFileList: string[] + ): void; addSingleSelect( aIsXPath: boolean, aIdOrXPath: string, aSelectedIndex: u32, aValue: string ): void; - addMultipleSelect(aIsXPath: boolean, aIdOrXPath: string, aValues: string[]): void; - addCustomElement(aIsXPath: boolean, aIdOrXPath: string, aValue: any, aState: any): void; + addMultipleSelect( + aIsXPath: boolean, + aIdOrXPath: string, + aValues: string[] + ): void; + addCustomElement( + aIsXPath: boolean, + aIdOrXPath: string, + aValue: any, + aState: any + ): void; addChild(aChild: nsISessionStoreRestoreData, aIndex: u32): void; } @@ -12485,7 +13317,11 @@ declare global { isDefaultBrowser(aForAllTypes?: boolean): boolean; setDefaultBrowser(aForAllUsers: boolean): void; - setDesktopBackground(aElement: Element, aPosition: i32, aImageName: string): void; + setDesktopBackground( + aElement: Element, + aPosition: i32, + aImageName: string + ): void; desktopBackgroundColor: u32; } @@ -12548,7 +13384,11 @@ declare global { abandonBFCacheEntry(): void; sharesDocumentWith(aEntry: nsISHEntry): boolean; setLoadTypeAsHistory(): void; - AddChild(aChild: nsISHEntry, aOffset: i32, aUseRemoteSubframes?: boolean): void; + AddChild( + aChild: nsISHEntry, + aOffset: i32, + aUseRemoteSubframes?: boolean + ): void; GetChildAt(aIndex: i32): nsISHEntry; readonly bfcacheID: u64; wireframe: any; @@ -12639,7 +13479,10 @@ declare global { variableLimit: i32; readonly transactionInProgress: boolean; asyncClose(aCallback?: mozIStorageCompletionCallback): void; - asyncClone(aReadOnly: boolean, aCallback: mozIStorageCompletionCallback): void; + asyncClone( + aReadOnly: boolean, + aCallback: mozIStorageCompletionCallback + ): void; readonly databaseFile: nsIFile; interrupt(): void; asyncVacuum( @@ -12656,8 +13499,15 @@ declare global { aSQLStatement: string, aCallback?: mozIStorageStatementCallback ): mozIStoragePendingStatement; - loadExtension(aExtensionName: string, aCallback?: mozIStorageCompletionCallback): void; - createFunction(aFunctionName: string, aNumArguments: i32, aFunction: mozIStorageFunction): void; + loadExtension( + aExtensionName: string, + aCallback?: mozIStorageCompletionCallback + ): void; + createFunction( + aFunctionName: string, + aNumArguments: i32, + aFunction: mozIStorageFunction + ): void; removeFunction(aFunctionName: string): void; setProgressHandler( aGranularity: i32, @@ -12686,7 +13536,9 @@ declare global { finalize(): void; bindParameters(aParameters: mozIStorageBindingParamsArray): void; newBindingParamsArray(): mozIStorageBindingParamsArray; - executeAsync(aCallback?: mozIStorageStatementCallback): mozIStoragePendingStatement; + executeAsync( + aCallback?: mozIStorageStatementCallback + ): mozIStoragePendingStatement; readonly state: i32; escapeStringForLIKE(aValue: string, aEscapeChar: string): string; escapeUTF8StringForLIKE(aValue: string, aEscapeChar: string): string; @@ -12835,8 +13687,14 @@ declare global { aName?: string, aConnectionFlags?: u32 ): mozIStorageConnection; - openDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; - openUnsharedDatabase(aDatabaseFile: nsIFile, aConnectionFlags?: u32): mozIStorageConnection; + openDatabase( + aDatabaseFile: nsIFile, + aConnectionFlags?: u32 + ): mozIStorageConnection; + openUnsharedDatabase( + aDatabaseFile: nsIFile, + aConnectionFlags?: u32 + ): mozIStorageConnection; openDatabaseWithFileURL( aFileURL: nsIFileURL, aTelemetryFilename?: string, @@ -12955,7 +13813,11 @@ declare global { aClearStore?: boolean, aFilterTest?: boolean ): any; - getSnapshotForScalars(aStoreName?: string, aClearStore?: boolean, aFilterTest?: boolean): any; + getSnapshotForScalars( + aStoreName?: string, + aClearStore?: boolean, + aFilterTest?: boolean + ): any; getSnapshotForKeyedScalars( aStoreName?: string, aClearStore?: boolean, @@ -13001,7 +13863,11 @@ declare global { start_ipv6(port: i32): void; start_dualStack(port: i32): void; stop(callback: nsIHttpServerStoppedCallback): void; - registerFile(path: string, file: nsIFile, handler?: nsIHttpRequestHandler): void; + registerFile( + path: string, + file: nsIFile, + handler?: nsIHttpRequestHandler + ): void; registerPathHandler(path: string, handler: nsIHttpRequestHandler): void; registerPrefixHandler(prefix: string, handler: nsIHttpRequestHandler): void; registerErrorHandler(code: u32, handler: nsIHttpRequestHandler): void; @@ -13051,7 +13917,11 @@ declare global { } interface nsIHttpResponse extends nsISupports { - setStatusLine(httpVersion: string, statusCode: u16, description: string): void; + setStatusLine( + httpVersion: string, + statusCode: u16, + description: string + ): void; setHeader(name: string, value: string, merge?: boolean): void; setHeaderNoCheck(name: string, value: string): void; readonly bodyOutputStream: nsIOutputStream; @@ -13104,10 +13974,12 @@ declare global { } interface nsIBounceTrackingProtection - extends nsISupports, - Enums { + extends nsISupports, Enums { clearAll(): void; - clearBySiteHostAndOriginAttributes(aSiteHost: string, originAttributes: any): void; + clearBySiteHostAndOriginAttributes( + aSiteHost: string, + originAttributes: any + ): void; clearBySiteHostAndOriginAttributesPattern( aSiteHost: string, aOriginAttributesPattern: any @@ -13120,22 +13992,34 @@ declare global { testGetSiteHostExceptions(): string[]; testRunPurgeBounceTrackers(): Promise; testClearExpiredUserActivations(): void; - testGetBounceTrackerCandidateHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; - testGetUserActivationHosts(originAttributes: any): nsIBounceTrackingMapEntry[]; + testGetBounceTrackerCandidateHosts( + originAttributes: any + ): nsIBounceTrackingMapEntry[]; + testGetUserActivationHosts( + originAttributes: any + ): nsIBounceTrackingMapEntry[]; testAddBounceTrackerCandidate( originAttributes: any, aSiteHost: string, aBounceTime: PRTime ): void; - testAddUserActivation(originAttributes: any, aSiteHost: string, aActivationTime: PRTime): void; - testGetRecentlyPurgedTrackers(originAttributes: any): nsIBounceTrackingPurgeEntry[]; + testAddUserActivation( + originAttributes: any, + aSiteHost: string, + aActivationTime: PRTime + ): void; + testGetRecentlyPurgedTrackers( + originAttributes: any + ): nsIBounceTrackingPurgeEntry[]; testMaybeMigrateUserInteractionPermissions(): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIContentBlockingAllowList.idl interface nsIContentBlockingAllowList extends nsISupports { - computeContentBlockingAllowListPrincipal(aPrincipal: nsIPrincipal): nsIPrincipal; + computeContentBlockingAllowListPrincipal( + aPrincipal: nsIPrincipal + ): nsIPrincipal; } // https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPartitioningExceptionListService.idl @@ -13145,8 +14029,12 @@ declare global { }>; interface nsIPartitioningExceptionListService extends nsISupports { - registerAndRunExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; - unregisterExceptionListObserver(aObserver: nsIPartitioningExceptionListObserver): void; + registerAndRunExceptionListObserver( + aObserver: nsIPartitioningExceptionListObserver + ): void; + unregisterExceptionListObserver( + aObserver: nsIPartitioningExceptionListObserver + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/antitracking/nsIPurgeTrackerService.idl @@ -13200,9 +14088,13 @@ declare global { interface nsIURLQueryStrippingListService extends nsISupports { registerAndRunObserver(aObserver: nsIURLQueryStrippingListObserver): void; - registerAndRunObserverStripOnShare(aObserver: nsIURLQueryStrippingListObserver): void; + registerAndRunObserverStripOnShare( + aObserver: nsIURLQueryStrippingListObserver + ): void; unregisterObserver(aObserver: nsIURLQueryStrippingListObserver): void; - unregisterStripOnShareObserver(aObserver: nsIURLQueryStrippingListObserver): void; + unregisterStripOnShareObserver( + aObserver: nsIURLQueryStrippingListObserver + ): void; clearLists(): void; testWaitForInit(): Promise; testSetList(testFile: any): Promise; @@ -13262,7 +14154,10 @@ declare global { // https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksManager.idl interface nsIBackgroundTasksManager extends nsICommandLineHandler { - runBackgroundTaskNamed(aTaskName: string, aCommandLine: nsICommandLine): void; + runBackgroundTaskNamed( + aTaskName: string, + aCommandLine: nsICommandLine + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/nsIBackgroundTasksRunner.idl @@ -13376,7 +14271,10 @@ declare global { aFrom?: PRTime, aCallback?: nsIClearDataCallback ): void; - cleanupAfterDeletionAtShutdown(aFlags: u32, aCallback: nsIClearDataCallback): void; + cleanupAfterDeletionAtShutdown( + aFlags: u32, + aCallback: nsIClearDataCallback + ): void; hostMatchesSite( aHost: string, aOriginAttributes: any, @@ -13413,7 +14311,8 @@ declare global { } interface nsIContentAnalysisAcknowledgement - extends nsISupports, + extends + nsISupports, Enums< typeof nsIContentAnalysisAcknowledgement_Result & typeof nsIContentAnalysisAcknowledgement_FinalAction @@ -13453,9 +14352,11 @@ declare global { } interface nsIContentAnalysisResponse - extends nsIContentAnalysisResult, + extends + nsIContentAnalysisResult, Enums< - typeof nsIContentAnalysisResponse_Action & typeof nsIContentAnalysisResponse_CancelError + typeof nsIContentAnalysisResponse_Action & + typeof nsIContentAnalysisResponse_CancelError > { readonly action: nsIContentAnalysisResponse.Action; readonly cancelError: nsIContentAnalysisResponse.CancelError; @@ -13515,7 +14416,8 @@ declare global { } interface nsIContentAnalysisRequest - extends nsISupports, + extends + nsISupports, Enums< typeof nsIContentAnalysisRequest_AnalysisType & typeof nsIContentAnalysisRequest_Reason & @@ -13622,7 +14524,8 @@ declare global { type RunContext = nsIClickRule_RunContext; } - interface nsIClickRule extends nsISupports, Enums { + interface nsIClickRule + extends nsISupports, Enums { readonly presence: string; readonly skipPresenceVisibilityCheck: boolean; readonly runContext: nsIClickRule.RunContext; @@ -13689,16 +14592,26 @@ declare global { type Modes = nsICookieBannerService_Modes; } - interface nsICookieBannerService extends nsISupports, Enums { + interface nsICookieBannerService + extends nsISupports, Enums { readonly isEnabled: boolean; readonly rules: nsICookieBannerRule[]; resetRules(doImport?: boolean): void; - getCookiesForURI(aURI: nsIURI, aIsPrivateBrowsing: boolean): nsICookieRule[]; - getClickRulesForDomain(aDomain: string, aIsTopLevel: boolean): nsIClickRule[]; + getCookiesForURI( + aURI: nsIURI, + aIsPrivateBrowsing: boolean + ): nsICookieRule[]; + getClickRulesForDomain( + aDomain: string, + aIsTopLevel: boolean + ): nsIClickRule[]; insertRule(aRule: nsICookieBannerRule): void; removeRule(aRule: nsICookieBannerRule): void; hasRuleForBrowsingContextTree(aBrowsingContext: BrowsingContext): boolean; - getDomainPref(aTopLevelURI: nsIURI, aIsPrivate: boolean): nsICookieBannerService.Modes; + getDomainPref( + aTopLevelURI: nsIURI, + aIsPrivate: boolean + ): nsICookieBannerService.Modes; setDomainPref( aTopLevelURI: nsIURI, aMode: nsICookieBannerService.Modes, @@ -13715,7 +14628,11 @@ declare global { aIsTopLevel: boolean, aIsPrivate: boolean ): boolean; - markSiteExecuted(aSite: string, aIsTopLevel: boolean, aIsPrivate: boolean): void; + markSiteExecuted( + aSite: string, + aIsTopLevel: boolean, + aIsPrivate: boolean + ): void; removeExecutedRecordForSite(aSite: string, aIsPrivate: boolean): void; removeAllExecutedRecords(aIsPrivate: boolean): void; } @@ -13845,7 +14762,10 @@ declare global { } interface nsISearchEngine extends nsISupports { - getSubmission(searchTerms: string, responseType?: string): nsISearchSubmission; + getSubmission( + searchTerms: string, + responseType?: string + ): nsISearchSubmission; readonly searchURLWithNoTerms: nsIURI; searchTermFromResult(uri: nsIURI): string; readonly searchUrlQueryParamName: string; @@ -13912,7 +14832,8 @@ declare global { } interface nsISearchService - extends nsISupports, + extends + nsISupports, Enums< typeof nsISearchService_OpenSearchInstallErrors & typeof nsISearchService_DefaultEngineChangeReason @@ -13923,7 +14844,11 @@ declare global { readonly hasSuccessfullyInitialized: boolean; runBackgroundChecks(): Promise; resetToAppDefaultEngine(): void; - addOpenSearchEngine(engineURL: string, iconURL: string, originAttributes?: any): Promise; + addOpenSearchEngine( + engineURL: string, + iconURL: string, + originAttributes?: any + ): Promise; addUserEngine(formInfo: any): Promise; addEnginesFromExtension(extension: any): Promise; restoreDefaultEngines(): void; @@ -13988,7 +14913,11 @@ declare global { } interface nsIProfileMigrator extends nsISupports { - migrate(aStartup: nsIProfileStartup, aKey: string, aProfileName?: string): void; + migrate( + aStartup: nsIProfileStartup, + aKey: string, + aProfileName?: string + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/profile/nsIProfileUnlocker.idl @@ -14046,7 +14975,8 @@ declare global { } interface nsIToolkitProfileService - extends nsISupports, + extends + nsISupports, Enums< typeof nsIToolkitProfileService_downgradeUIFlags & typeof nsIToolkitProfileService_downgradeUIChoice & @@ -14069,12 +14999,19 @@ declare global { getProfileByName(aName: string): nsIToolkitProfile; getProfileByDir(aRootDir: nsIFile, aLocalDir?: nsIFile): nsIToolkitProfile; createProfile(aRootDir: nsIFile, aName: string): nsIToolkitProfile; - createUniqueProfile(aRootDir: nsIFile, aNamePrefix: string): nsIToolkitProfile; + createUniqueProfile( + aRootDir: nsIFile, + aNamePrefix: string + ): nsIToolkitProfile; readonly profileCount: u32; flush(): void; asyncFlush(): Promise; asyncFlushCurrentProfile(): Promise; - removeProfileFilesByPath(aRootDir: nsIFile, aLocalDir: nsIFile, aTimeout: u32): Promise; + removeProfileFilesByPath( + aRootDir: nsIFile, + aLocalDir: nsIFile, + aTimeout: u32 + ): Promise; } // https://searchfox.org/mozilla-central/source/toolkit/components/remote/nsIRemoteService.idl @@ -14153,7 +15090,12 @@ declare global { // https://searchfox.org/mozilla-central/source/toolkit/components/timermanager/nsIUpdateTimerManager.idl interface nsIUpdateTimerManager extends nsISupports { - registerTimer(id: string, callback: nsITimerCallback, interval: u32, skipFirst?: boolean): void; + registerTimer( + id: string, + callback: nsITimerCallback, + interval: u32, + skipFirst?: boolean + ): void; unregisterTimer(id: string): void; } @@ -14392,7 +15334,10 @@ declare global { aRequest: nsIRequest, aContentHandler: OutParam ): boolean; - isPreferred(aContentType: string, aDesiredContentType: OutParam): boolean; + isPreferred( + aContentType: string, + aDesiredContentType: OutParam + ): boolean; canHandleContent( aContentType: string, aIsContentPreferred: boolean, @@ -14411,7 +15356,11 @@ declare global { registerContentListener(aContentListener: nsIURIContentListener): void; unRegisterContentListener(aContentListener: nsIURIContentListener): void; - openURI(aChannel: nsIChannel, aFlags: u32, aWindowContext: nsIInterfaceRequestor): void; + openURI( + aChannel: nsIChannel, + aFlags: u32, + aWindowContext: nsIInterfaceRequestor + ): void; openChannel( aChannel: nsIChannel, aFlags: u32, @@ -14436,7 +15385,10 @@ declare global { readonly NOTIFY_CONTENT_BLOCKING?: 512; readonly NOTIFY_ALL?: 1023; - addProgressListener(aListener: nsIWebProgressListener, aNotifyMask: u32): void; + addProgressListener( + aListener: nsIWebProgressListener, + aNotifyMask: u32 + ): void; removeProgressListener(aListener: nsIWebProgressListener): void; readonly browsingContext: BrowsingContext; readonly DOMWindow: mozIDOMWindowProxy; @@ -14539,8 +15491,16 @@ declare global { aStatus: nsresult, aMessage: string ): void; - onSecurityChange(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aState: u32): void; - onContentBlockingEvent(aWebProgress: nsIWebProgress, aRequest: nsIRequest, aEvent: u32): void; + onSecurityChange( + aWebProgress: nsIWebProgress, + aRequest: nsIRequest, + aState: u32 + ): void; + onContentBlockingEvent( + aWebProgress: nsIWebProgress, + aRequest: nsIRequest, + aEvent: u32 + ): void; } // https://searchfox.org/mozilla-central/source/uriloader/base/nsIWebProgressListener2.idl @@ -14599,7 +15559,10 @@ declare global { }>; interface nsIURIClassifier extends nsISupports { - classify(aPrincipal: nsIPrincipal, aCallback: nsIURIClassifierCallback): boolean; + classify( + aPrincipal: nsIPrincipal, + aCallback: nsIURIClassifierCallback + ): boolean; asyncClassifyLocalWithFeatures( aURI: nsIURI, aFeatures: nsIUrlClassifierFeature[], @@ -14633,7 +15596,11 @@ declare global { interface nsIUrlClassifierExceptionList extends nsISupports { init(aFeature: string): void; addEntry(aEntry: nsIUrlClassifierExceptionListEntry): void; - matches(aURI: nsIURI, aTopLevelURI: nsIURI, aIsPrivateBrowsing: boolean): boolean; + matches( + aURI: nsIURI, + aTopLevelURI: nsIURI, + aIsPrivateBrowsing: boolean + ): boolean; testGetEntries(): nsIUrlClassifierExceptionListEntry[]; } @@ -14652,7 +15619,8 @@ declare global { } interface nsIUrlClassifierExceptionListEntry - extends nsISupports, + extends + nsISupports, Enums { init( aCategory: nsIUrlClassifierExceptionListEntry.Category, @@ -14662,7 +15630,11 @@ declare global { aFilterContentBlockingCategories: string[], aClassifierFeatures: string[] ): void; - matches(aURI: nsIURI, aTopLevelURI: nsIURI, aIsPrivateBrowsing: boolean): boolean; + matches( + aURI: nsIURI, + aTopLevelURI: nsIURI, + aIsPrivateBrowsing: boolean + ): boolean; readonly category: nsIUrlClassifierExceptionListEntry.Category; readonly urlPattern: string; readonly topLevelUrlPattern: string; @@ -14712,8 +15684,12 @@ declare global { } interface nsIUrlClassifierFeature - extends nsISupports, - Enums { + extends + nsISupports, + Enums< + typeof nsIUrlClassifierFeature_listType & + typeof nsIUrlClassifierFeature_URIType + > { readonly name: string; readonly exceptionList: nsIUrlClassifierExceptionList; } @@ -14779,11 +15755,22 @@ declare global { } interface nsIUrlClassifierDBService extends nsISupports { - lookup(principal: nsIPrincipal, tables: string, c: nsIUrlClassifierCallback): void; + lookup( + principal: nsIPrincipal, + tables: string, + c: nsIUrlClassifierCallback + ): void; getTables(c: nsIUrlClassifierCallback): void; - setHashCompleter(tableName: string, completer: nsIUrlClassifierHashCompleter): void; + setHashCompleter( + tableName: string, + completer: nsIUrlClassifierHashCompleter + ): void; clearLastResults(): void; - beginUpdate(updater: nsIUrlClassifierUpdateObserver, tables: string, provider: string): void; + beginUpdate( + updater: nsIUrlClassifierUpdateObserver, + tables: string, + provider: string + ): void; beginStream(table: string): void; updateStream(updateChunk: string): void; finishStream(): void; @@ -14845,7 +15832,10 @@ declare global { }>; interface nsIUrlClassifierInfo extends nsISupports { - getCacheInfo(table: string, callback: nsIUrlClassifierGetCacheCallback): void; + getCacheInfo( + table: string, + callback: nsIUrlClassifierGetCacheCallback + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/url-classifier/nsIUrlClassifierPrefixSet.idl @@ -14918,7 +15908,11 @@ declare global { aPrefixes: string[] ): string; makeFindFullHashRequestV5(aHashPrefixes: string[]): string; - makeThreatHitReport(aChannel: nsIChannel, aListName: string, aHashBase64: string): string; + makeThreatHitReport( + aChannel: nsIChannel, + aListName: string, + aHashBase64: string + ): string; parseFindFullHashResponseV4( aResponse: string, aCallback: nsIUrlClassifierParseFindFullHashCallback @@ -15104,7 +16098,11 @@ declare global { interface nsIWebBrowserPersistURIMap extends nsISupports { readonly numMappedURIs: u32; - getURIMapping(aIndex: u32, aMapFrom: OutParam, aMapTo: OutParam): void; + getURIMapping( + aIndex: u32, + aMapFrom: OutParam, + aMapTo: OutParam + ): void; readonly targetBaseURI: string; } @@ -15144,7 +16142,10 @@ declare global { aDocument: nsIWebBrowserPersistDocument, aSubDocument: nsIWebBrowserPersistDocument ): void; - visitBrowsingContext(aDocument: nsIWebBrowserPersistDocument, aContext: BrowsingContext): void; + visitBrowsingContext( + aDocument: nsIWebBrowserPersistDocument, + aContext: BrowsingContext + ): void; endVisit(aDocument: nsIWebBrowserPersistDocument, aStatus: nsresult): void; } @@ -15165,7 +16166,11 @@ declare global { // https://searchfox.org/mozilla-central/source/toolkit/components/extensions/extIWebNavigation.idl interface extIWebNavigation extends nsISupports { - onDocumentChange(bc: BrowsingContext, transitionData: any, location: nsIURI): void; + onDocumentChange( + bc: BrowsingContext, + transitionData: any, + location: nsIURI + ): void; onHistoryChange( bc: BrowsingContext, transitionData: any, @@ -15173,8 +16178,17 @@ declare global { isHistoryStateUpdated: boolean, isReferenceFragmentUpdated: boolean ): void; - onStateChange(bc: BrowsingContext, requestURI: nsIURI, status: nsresult, stateFlags: u32): void; - onCreatedNavigationTarget(bc: BrowsingContext, sourceBC: BrowsingContext, url: string): void; + onStateChange( + bc: BrowsingContext, + requestURI: nsIURI, + status: nsresult, + stateFlags: u32 + ): void; + onCreatedNavigationTarget( + bc: BrowsingContext, + sourceBC: BrowsingContext, + url: string + ): void; onDOMContentLoaded(bc: BrowsingContext, documentURI: nsIURI): void; } @@ -15205,7 +16219,8 @@ declare global { } interface mozIExtensionListenerCallOptions - extends nsISupports, + extends + nsISupports, Enums< typeof mozIExtensionListenerCallOptions_APIObjectType & typeof mozIExtensionListenerCallOptions_CallbackType @@ -15217,7 +16232,10 @@ declare global { } interface mozIExtensionEventListener extends nsISupports { - callListener(args: any[], listenerCallOptions?: mozIExtensionListenerCallOptions): Promise; + callListener( + args: any[], + listenerCallOptions?: mozIExtensionListenerCallOptions + ): Promise; } } // global @@ -15236,8 +16254,7 @@ declare global { } interface mozIExtensionAPIRequest - extends nsISupports, - Enums { + extends nsISupports, Enums { toString(): string; readonly requestType: string; readonly apiNamespace: string; @@ -15263,7 +16280,8 @@ declare global { } interface mozIExtensionAPIRequestResult - extends nsISupports, + extends + nsISupports, Enums { readonly type: mozIExtensionAPIRequestResult.ResultType; readonly value: any; @@ -15278,8 +16296,14 @@ declare global { extension: nsISupports, serviceWorkerInfo: mozIExtensionServiceWorkerInfo ): void; - onExtensionWorkerLoaded(extension: nsISupports, serviceWorkerDescriptorId: u64): void; - onExtensionWorkerDestroyed(extension: nsISupports, serviceWorkerDescriptorId: u64): void; + onExtensionWorkerLoaded( + extension: nsISupports, + serviceWorkerDescriptorId: u64 + ): void; + onExtensionWorkerDestroyed( + extension: nsISupports, + serviceWorkerDescriptorId: u64 + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/extensions/mozIExtensionProcessScript.idl @@ -15290,7 +16314,11 @@ declare global { contentScript: WebExtensionContentScript, window: mozIDOMWindow ): Promise; - initExtensionDocument(extension: nsISupports, doc: Document, privileged: boolean): void; + initExtensionDocument( + extension: nsISupports, + doc: Document, + privileged: boolean + ): void; } // https://searchfox.org/mozilla-central/source/toolkit/components/extensions/nsINativeMessagingPortal.idl @@ -15300,7 +16328,11 @@ declare global { readonly available: Promise; createSession(aApplication: string): Promise; closeSession(aHandle: string): Promise; - getManifest(aHandle: string, aName: string, aExtension: string): Promise; + getManifest( + aHandle: string, + aName: string, + aExtension: string + ): Promise; start(aHandle: string, aName: string, aExtension: string): Promise; } @@ -15320,7 +16352,10 @@ declare global { flush(): void; watch(callback: nsIWebVTTListener): void; cancel(): void; - convertCueToDOMTree(window: mozIDOMWindow, cue: nsISupports): DocumentFragment; + convertCueToDOMTree( + window: mozIDOMWindow, + cue: nsISupports + ): DocumentFragment; processCues( window: mozIDOMWindow, cues: nsIVariant, @@ -15380,7 +16415,10 @@ declare global { interface nsIClipboardDataSnapshot extends nsISupports { readonly valid: boolean; readonly flavorList: string[]; - getData(aTransferable: nsITransferable, aCallback: nsIAsyncClipboardRequestCallback): void; + getData( + aTransferable: nsITransferable, + aCallback: nsIAsyncClipboardRequestCallback + ): void; getDataSync(aTransferable: nsITransferable): void; } @@ -15402,7 +16440,8 @@ declare global { type ClipboardType = nsIClipboard_ClipboardType; } - interface nsIClipboard extends nsISupports, Enums { + interface nsIClipboard + extends nsISupports, Enums { setData( aTransferable: nsITransferable, anOwner: nsIClipboardOwner, @@ -15436,7 +16475,9 @@ declare global { aFlavorList: string[], aWhichClipboard: nsIClipboard.ClipboardType ): boolean; - isClipboardTypeSupported(aWhichClipboard: nsIClipboard.ClipboardType): boolean; + isClipboardTypeSupported( + aWhichClipboard: nsIClipboard.ClipboardType + ): boolean; } // https://searchfox.org/mozilla-central/source/widget/nsIClipboardHelper.idl @@ -15452,7 +16493,8 @@ declare global { type SensitiveData = nsIClipboardHelper_SensitiveData; } - interface nsIClipboardHelper extends nsISupports, Enums { + interface nsIClipboardHelper + extends nsISupports, Enums { copyStringToClipboard( aString: string, aClipboardID: nsIClipboard.ClipboardType, @@ -15506,7 +16548,10 @@ declare global { readonly DRAGDROP_ACTION_UNINITIALIZED?: 64; getCurrentSession(aWidgetProvider?: nsISupports): nsIDragSession; - startDragSessionForTests(aWidgetProvider: nsISupports, aAllowedEffect: u32): void; + startDragSessionForTests( + aWidgetProvider: nsISupports, + aAllowedEffect: u32 + ): void; suppress(): void; unsuppress(): void; getMockDragController(): nsIMockDragServiceController; @@ -15574,7 +16619,8 @@ declare global { } interface nsIFilePicker - extends nsISupports, + extends + nsISupports, Enums< typeof nsIFilePicker_Mode & typeof nsIFilePicker_ResultCode & @@ -15592,7 +16638,11 @@ declare global { readonly filterVideo?: 512; readonly filterPDF?: 1024; - init(browsingContext: BrowsingContext, title: string, mode: nsIFilePicker.Mode): void; + init( + browsingContext: BrowsingContext, + title: string, + mode: nsIFilePicker.Mode + ): void; isModeSupported(mode: nsIFilePicker.Mode): Promise; appendFilters(filterMask: i32): void; appendFilter(title: string, filter: string): void; @@ -15663,11 +16713,13 @@ declare enum nsIGfxInfo_FontVisibilityDeviceDetermination { declare global { namespace nsIGfxInfo { - type FontVisibilityDeviceDetermination = nsIGfxInfo_FontVisibilityDeviceDetermination; + type FontVisibilityDeviceDetermination = + nsIGfxInfo_FontVisibilityDeviceDetermination; } interface nsIGfxInfo - extends nsISupports, + extends + nsISupports, Enums { readonly DWriteEnabled: boolean; readonly EmbeddedInFirefoxReality: boolean; @@ -15710,7 +16762,10 @@ declare global { getMonitors(): any; getFailures(indices: OutParam): string[]; getFeatureStatus(aFeature: i32, aFailureId?: OutParam): i32; - getFeatureStatusStr(aFeature: string, aFailureId?: OutParam): string; + getFeatureStatusStr( + aFeature: string, + aFailureId?: OutParam + ): string; getFeatureSuggestedDriverVersion(aFeature: i32): string; getFeatureSuggestedDriverVersionStr(aFeature: string): string; getInfo(): any; @@ -15729,8 +16784,17 @@ declare global { spoofDeviceID(aDeviceID: string): void; spoofDriverVersion(aDriverVersion: string): void; spoofOSVersion(aVersion: u32): void; - spoofOSVersionEx(aMajor: u32, aMinor: u32, aBuild: u32, aRevision: u32): void; - spoofMonitorInfo(aScreenCount: u32, aMinRefreshRate: i32, aMaxRefreshRate: i32): void; + spoofOSVersionEx( + aMajor: u32, + aMinor: u32, + aBuild: u32, + aRevision: u32 + ): void; + spoofMonitorInfo( + aScreenCount: u32, + aMinRefreshRate: i32, + aMaxRefreshRate: i32 + ): void; } // https://searchfox.org/mozilla-central/source/widget/nsIMockDragServiceController.idl @@ -15752,8 +16816,7 @@ declare global { } interface nsIMockDragServiceController - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly mockDragService: nsIDragService; sendEvent( aBC: BrowsingContext, @@ -15793,7 +16856,10 @@ declare global { aHaveSelection: boolean, aPrintSettings: nsIPrintSettings ): void; - showPageSetupDialog(aParent: mozIDOMWindowProxy, aPrintSettings: nsIPrintSettings): void; + showPageSetupDialog( + aParent: mozIDOMWindowProxy, + aPrintSettings: nsIPrintSettings + ): void; } // https://searchfox.org/mozilla-central/source/widget/nsIPrintSettings.idl @@ -15811,8 +16877,7 @@ declare global { } interface nsIPrintSettings - extends nsISupports, - Enums { + extends nsISupports, Enums { readonly kInitSaveHeaderLeft?: 2; readonly kInitSaveHeaderCenter?: 4; readonly kInitSaveHeaderRight?: 8; @@ -15851,7 +16916,10 @@ declare global { readonly kDuplexFlipOnLongEdge?: 1; readonly kDuplexFlipOnShortEdge?: 2; - GetEffectivePageSize(aWidth: OutParam, aHeight: OutParam): void; + GetEffectivePageSize( + aWidth: OutParam, + aHeight: OutParam + ): void; clone(): nsIPrintSettings; assign(aPS: nsIPrintSettings): void; equivalentTo(aPrintSettings: nsIPrintSettings): boolean; @@ -15912,13 +16980,19 @@ declare global { interface nsIPrintSettingsService extends nsISupports { createNewPrintSettings(): nsIPrintSettings; readonly lastUsedPrinterName: string; - initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; + initPrintSettingsFromPrinter( + aPrinterName: string, + aPrintSettings: nsIPrintSettings + ): void; initPrintSettingsFromPrefs( aPrintSettings: nsIPrintSettings, aUsePrinterNamePrefix: boolean, aFlags: u32 ): void; - maybeSavePrintSettingsToPrefs(aPrintSettings: nsIPrintSettings, aFlags: u32): void; + maybeSavePrintSettingsToPrefs( + aPrintSettings: nsIPrintSettings, + aFlags: u32 + ): void; maybeSaveLastUsedPrinterNameToPrefs(aPrinterName: string): void; } @@ -15943,7 +17017,10 @@ declare global { // https://searchfox.org/mozilla-central/source/widget/nsIPrinterList.idl interface nsIPrinterList extends nsISupports { - initPrintSettingsFromPrinter(aPrinterName: string, aPrintSettings: nsIPrintSettings): void; + initPrintSettingsFromPrinter( + aPrinterName: string, + aPrintSettings: nsIPrintSettings + ): void; readonly systemDefaultPrinterName: string; getPrinterByName(aPrinterName: string): Promise; getPrinterBySystemName(aPrinterName: string): Promise; @@ -16043,7 +17120,10 @@ declare global { init(aContext: nsILoadContext): void; flavorsTransferableCanExport(): string[]; getTransferData(aFlavor: string, aData: OutParam): void; - getAnyTransferData(aFlavor: OutParam, aData: OutParam): void; + getAnyTransferData( + aFlavor: OutParam, + aData: OutParam + ): void; flavorsTransferableCanImport(): string[]; setTransferData(aFlavor: string, aData: nsISupports): void; clearAllData(): void; @@ -16113,13 +17193,19 @@ declare global { interface nsIPromptCollection extends nsISupports { asyncBeforeUnloadCheck(aBrowsingContext: BrowsingContext): Promise; confirmRepost(aBrowsingContext: BrowsingContext): boolean; - confirmFolderUpload(aBrowsingContext: BrowsingContext, aDirectoryName: string): boolean; + confirmFolderUpload( + aBrowsingContext: BrowsingContext, + aDirectoryName: string + ): boolean; } // https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptFactory.idl interface nsIPromptFactory extends nsISupports { - getPrompt(aParent: mozIDOMWindowProxy, iid: T): nsQIResult; + getPrompt( + aParent: mozIDOMWindowProxy, + iid: T + ): nsQIResult; } // https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl @@ -16151,7 +17237,11 @@ declare global { readonly MODAL_TYPE_WINDOW?: 3; readonly MODAL_TYPE_INTERNAL_WINDOW?: 4; - alert(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): void; + alert( + aParent: mozIDOMWindowProxy, + aDialogTitle: string, + aText: string + ): void; alertBC( aBrowsingContext: BrowsingContext, modalType: u32, @@ -16187,7 +17277,11 @@ declare global { aCheckMsg: string, aCheckState: boolean ): Promise; - confirm(aParent: mozIDOMWindowProxy, aDialogTitle: string, aText: string): boolean; + confirm( + aParent: mozIDOMWindowProxy, + aDialogTitle: string, + aText: string + ): boolean; confirmBC( aBrowsingContext: BrowsingContext, modalType: u32, @@ -16443,9 +17537,13 @@ declare global { type OutputMode = nsIConsoleService_OutputMode; } - interface nsIConsoleService extends nsISupports, Enums { + interface nsIConsoleService + extends nsISupports, Enums { logMessage(message: nsIConsoleMessage): void; - logMessageWithMode(message: nsIConsoleMessage, mode: nsIConsoleService.OutputMode): void; + logMessageWithMode( + message: nsIConsoleMessage, + mode: nsIConsoleService.OutputMode + ): void; logStringMessage(message: string): void; getMessageArray(): nsIConsoleMessage[]; registerListener(listener: nsIConsoleListener): void; @@ -16457,7 +17555,11 @@ declare global { // https://searchfox.org/mozilla-central/source/xpcom/base/nsICycleCollectorListener.idl interface nsICycleCollectorHandler extends nsISupports { - noteRefCountedObject(aAddress: string, aRefCount: u32, aObjectDescription: string): void; + noteRefCountedObject( + aAddress: string, + aRefCount: u32, + aObjectDescription: string + ): void; noteGCedObject( aAddress: string, aMarked: boolean, @@ -16556,7 +17658,10 @@ declare global { aDumpChildProcesses: boolean, aCallback: nsIDumpGCAndCCLogsCallback ): void; - dumpGCAndCCLogsToSink(aDumpAllTraces: boolean, aSink: nsICycleCollectorLogSink): void; + dumpGCAndCCLogsToSink( + aDumpAllTraces: boolean, + aSink: nsICycleCollectorLogSink + ): void; } // https://searchfox.org/mozilla-central/source/xpcom/base/nsIMemoryReporter.idl @@ -16582,7 +17687,11 @@ declare global { readonly UNITS_COUNT_CUMULATIVE?: 2; readonly UNITS_PERCENTAGE?: 3; - collectReports(callback: nsIHandleReportCallback, data: nsISupports, anonymize: boolean): void; + collectReports( + callback: nsIHandleReportCallback, + data: nsISupports, + anonymize: boolean + ): void; } type nsIFinishReportingCallback = Callable<{ @@ -16705,7 +17814,11 @@ declare global { aPersist: boolean, aReplace: boolean ): string; - deleteCategoryEntry(aCategory: string, aEntry: string, aPersist: boolean): void; + deleteCategoryEntry( + aCategory: string, + aEntry: string, + aPersist: boolean + ): void; deleteCategory(aCategory: string): void; enumerateCategory(aCategory: string): nsISimpleEnumerator; enumerateCategories(): nsISimpleEnumerator; @@ -16730,7 +17843,10 @@ declare global { interface nsIComponentManager extends nsISupports { getClassObject(aClass: nsID, aIID: T): nsQIResult; - getClassObjectByContractID(aContractID: string, aIID: T): nsQIResult; + getClassObjectByContractID( + aContractID: string, + aIID: T + ): nsQIResult; getManifestLocations(): nsIArray; getComponentESModules(): nsIUTF8StringEnumerator; } @@ -16762,7 +17878,10 @@ declare global { interface nsIServiceManager extends nsISupports { getService(aClass: nsID, aIID: T): nsQIResult; - getServiceByContractID(aContractID: string, aIID: T): nsQIResult; + getServiceByContractID( + aContractID: string, + aIID: T + ): nsQIResult; isServiceInstantiated(aClass: nsID, aIID: nsID): boolean; isServiceInstantiatedByContractID(aContractID: string, aIID: nsID): boolean; } @@ -16822,9 +17941,17 @@ declare global { // https://searchfox.org/mozilla-central/source/xpcom/ds/nsIObserverService.idl interface nsIObserverService extends nsISupports { - addObserver(anObserver: nsIObserver, aTopic: string, ownsWeak?: boolean): void; + addObserver( + anObserver: nsIObserver, + aTopic: string, + ownsWeak?: boolean + ): void; removeObserver(anObserver: nsIObserver, aTopic: string): void; - notifyObservers(aSubject: nsISupports, aTopic: string, someData?: string): void; + notifyObservers( + aSubject: nsISupports, + aTopic: string, + someData?: string + ): void; enumerateObservers(aTopic: string): nsISimpleEnumerator; } @@ -16879,7 +18006,10 @@ declare global { getPropertyAsACString(prop: string): string; getPropertyAsAUTF8String(prop: string): string; getPropertyAsBool(prop: string): boolean; - getPropertyAsInterface(prop: string, iid: T): nsQIResult; + getPropertyAsInterface( + prop: string, + iid: T + ): nsQIResult; get(prop: string): nsIVariant; hasKey(prop: string): boolean; } @@ -17217,7 +18347,12 @@ declare global { readonly DEFAULT_REPLACEMENT_CHARACTER?: 65533; readonly ERRORS_ARE_FATAL?: 0; - init(aStream: nsIInputStream, aCharset: string, aBufferSize: i32, aReplacementChar: u16): void; + init( + aStream: nsIInputStream, + aCharset: string, + aBufferSize: i32, + aReplacementChar: u16 + ): void; } // https://searchfox.org/mozilla-central/source/xpcom/io/nsIConverterOutputStream.idl @@ -17376,7 +18511,11 @@ declare global { interface nsIObjectOutputStream extends nsIBinaryOutputStream { writeObject(aObject: nsISupports, aIsStrongRef: boolean): void; writeSingleRefObject(aObject: nsISupports): void; - writeCompoundObject(aObject: nsISupports, aIID: nsID, aIsStrongRef: boolean): void; + writeCompoundObject( + aObject: nsISupports, + aIID: nsID, + aIsStrongRef: boolean + ): void; writeID(aID: nsID): void; } @@ -17698,7 +18837,8 @@ declare global { } interface nsIXULRuntime - extends nsISupports, + extends + nsISupports, Enums< typeof nsIXULRuntime_ExperimentStatus & typeof nsIXULRuntime_ContentWin32kLockdownState & @@ -17786,7 +18926,8 @@ declare global { type DispatchFlags = nsIEventTarget_DispatchFlags; } - interface nsIEventTarget extends nsISupports, Enums { + interface nsIEventTarget + extends nsISupports, Enums { isOnCurrentThread(): boolean; dispatch(event: nsIRunnable, flags: nsIEventTarget.DispatchFlags): void; } @@ -17805,9 +18946,19 @@ declare global { init(executable: nsIFile): void; kill(): void; run(blocking: boolean, args: string[], count: u32): void; - runAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; + runAsync( + args: string[], + count: u32, + observer?: nsIObserver, + holdWeak?: boolean + ): void; runw(blocking: boolean, args: string[], count: u32): void; - runwAsync(args: string[], count: u32, observer?: nsIObserver, holdWeak?: boolean): void; + runwAsync( + args: string[], + count: u32, + observer?: nsIObserver, + holdWeak?: boolean + ): void; startHidden: boolean; noShell: boolean; readonly pid: u32; @@ -17865,7 +19016,8 @@ declare global { type QoSPriority = nsIThread_QoSPriority; } - interface nsIThread extends nsISerialEventTarget, Enums { + interface nsIThread + extends nsISerialEventTarget, Enums { shutdown(): void; hasPendingEvents(): boolean; hasPendingHighPriorityEvents(): boolean; @@ -17926,7 +19078,11 @@ declare global { readonly TYPE_ONE_SHOT_LOW_PRIORITY?: 5; init(aObserver: nsIObserver, aDelayInMs: u32, aType: u32): void; - initWithCallback(aCallback: nsITimerCallback, aDelayInMs: u32, aType: u32): void; + initWithCallback( + aCallback: nsITimerCallback, + aDelayInMs: u32, + aType: u32 + ): void; cancel(): void; delay: u32; type: u32; @@ -18014,7 +19170,11 @@ declare global { intentionallyLeak(): void; getJSTestingFunctions(): any; getFunctionSourceLocation(func: any): any; - callFunctionWithAsyncStack(func: any, stack: nsIStackFrame, asyncCause: string): any; + callFunctionWithAsyncStack( + func: any, + stack: nsIStackFrame, + asyncCause: string + ): any; getGlobalForObject(obj: any): any; isProxy(vobject: any): boolean; exportFunction(vfunction: any, vscope: any, voptions?: any): any; @@ -18048,7 +19208,11 @@ declare global { readUTF8File(file: nsIFile): string; readUTF8URI(url: nsIURI): string; createSpellChecker(): nsIEditorSpellCheck; - createCommandLine(args: string[], workingDir: nsIFile, state: u32): nsISupports; + createCommandLine( + args: string[], + workingDir: nsIFile, + state: u32 + ): nsISupports; createCommandParams(): nsICommandParams; createLoadContext(): nsILoadContext; createPrivateLoadContext(): nsILoadContext; @@ -18099,11 +19263,25 @@ declare global { interface nsIXPCTestBug809674 extends nsISupports { addArgs(x: u32, y: u32): u32; - addSubMulArgs(x: u32, y: u32, subOut: OutParam, mulOut: OutParam): u32; + addSubMulArgs( + x: u32, + y: u32, + subOut: OutParam, + mulOut: OutParam + ): u32; addVals(x: any, y: any): any; methodNoArgs(): u32; methodNoArgsNoRetVal(): void; - addMany(x1: u32, x2: u32, x3: u32, x4: u32, x5: u32, x6: u32, x7: u32, x8: u32): u32; + addMany( + x1: u32, + x2: u32, + x3: u32, + x4: u32, + x5: u32, + x6: u32, + x7: u32, + x8: u32 + ): u32; valProperty: any; uintProperty: u32; methodWithOptionalArgc(): void; @@ -18138,8 +19316,12 @@ declare global { } interface nsIXPCTestCEnums - extends nsISupports, - Enums { + extends + nsISupports, + Enums< + typeof nsIXPCTestCEnums_testFlagsExplicit & + typeof nsIXPCTestCEnums_testFlagsImplicit + > { readonly testConst?: 1; testCEnumInput(abc: nsIXPCTestCEnums.testFlagsExplicit): void; @@ -18251,7 +19433,10 @@ declare global { ): any[]; testOutAString(o: OutParam): void; testStringArrayOptionalSize(a: string[], aLength?: u32): string; - testOmittedOptionalOut(aJSObj: nsIXPCTestParams, aOut?: OutParam): void; + testOmittedOptionalOut( + aJSObj: nsIXPCTestParams, + aOut?: OutParam + ): void; readonly testNaN: double; } @@ -18277,7 +19462,9 @@ declare global { }>; interface nsIXPCTestUtils extends nsISupports { - doubleWrapFunction(f: nsIXPCTestFunctionInterface): nsIXPCTestFunctionInterface; + doubleWrapFunction( + f: nsIXPCTestFunctionInterface + ): nsIXPCTestFunctionInterface; } interface nsIXPCTestTypeScript extends nsISupports { @@ -18305,8 +19492,14 @@ declare global { } interface nsICommandController extends nsISupports { - getCommandStateWithParams(command: string, aCommandParams: nsICommandParams): void; - doCommandWithParams(command: string, aCommandParams: nsICommandParams): void; + getCommandStateWithParams( + command: string, + aCommandParams: nsICommandParams + ): void; + doCommandWithParams( + command: string, + aCommandParams: nsICommandParams + ): void; getSupportedCommands(): string[]; } @@ -18354,8 +19547,17 @@ declare global { open(aFile: nsIFile, aIoFlags: i32): void; getEntry(aZipEntry: string): nsIZipEntry; hasEntry(aZipEntry: string): boolean; - addEntryDirectory(aZipEntry: string, aModTime: PRTime, aQueue: boolean): void; - addEntryFile(aZipEntry: string, aCompression: i32, aFile: nsIFile, aQueue: boolean): void; + addEntryDirectory( + aZipEntry: string, + aModTime: PRTime, + aQueue: boolean + ): void; + addEntryFile( + aZipEntry: string, + aCompression: i32, + aFile: nsIFile, + aQueue: boolean + ): void; addEntryChannel( aZipEntry: string, aModTime: PRTime, @@ -18424,7 +19626,10 @@ declare global { nsIWindowMediatorListener: nsJSIID; nsIWindowlessBrowser: nsJSIID; nsIXULBrowserWindow: nsJSIID; - nsIAppStartup: nsJSIID; + nsIAppStartup: nsJSIID< + nsIAppStartup, + typeof nsIAppStartup_IDLShutdownPhase + >; nsIAutoCompleteController: nsJSIID; nsIAutoCompleteInput: nsJSIID; nsIAutoCompletePopup: nsJSIID; @@ -18474,7 +19679,8 @@ declare global { nsIDocumentLoaderFactory: nsJSIID; nsIDocumentViewer: nsJSIID< nsIDocumentViewer, - typeof nsIDocumentViewer_PermitUnloadAction & typeof nsIDocumentViewer_PermitUnloadResult + typeof nsIDocumentViewer_PermitUnloadAction & + typeof nsIDocumentViewer_PermitUnloadResult >; nsIDocumentViewerEdit: nsJSIID; nsILoadContext: nsJSIID; @@ -18491,7 +19697,10 @@ declare global { nsIWebPageDescriptor: nsJSIID; mozIDOMWindow: nsJSIID; mozIDOMWindowProxy: nsJSIID; - nsIContentPolicy: nsJSIID; + nsIContentPolicy: nsJSIID< + nsIContentPolicy, + typeof nsIContentPolicy_nsContentPolicyType + >; nsIDroppedLinkItem: nsJSIID; nsIDroppedLinkHandler: nsJSIID; nsIEventSourceEventListener: nsJSIID; @@ -18536,7 +19745,10 @@ declare global { nsIDOMGlobalPropertyInitializer: nsJSIID; nsIDOMWindow: nsJSIID; nsISynthesizedEventCallback: nsJSIID; - nsIDOMWindowUtils: nsJSIID; + nsIDOMWindowUtils: nsJSIID< + nsIDOMWindowUtils, + typeof nsIDOMWindowUtils_AsyncEnabledOption + >; nsITranslationNodeList: nsJSIID; nsIJSRAIIHelper: nsJSIID; nsIFocusManager: nsJSIID; @@ -18637,7 +19849,10 @@ declare global { nsICSPEventListener: nsJSIID; nsIIntegrityPolicy: nsJSIID; nsIPolicyContainer: nsJSIID; - nsIReferrerInfo: nsJSIID; + nsIReferrerInfo: nsJSIID< + nsIReferrerInfo, + typeof nsIReferrerInfo_ReferrerPolicyIDL + >; nsIHttpsOnlyModePermission: nsJSIID; nsIDocumentEncoderNodeFixup: nsJSIID; nsIDocumentEncoder: nsJSIID; @@ -18744,11 +19959,15 @@ declare global { nsIZipReaderCache: nsJSIID; IJSDebugger: nsJSIID; nsIJSInspector: nsJSIID; - nsIKeyValueService: nsJSIID; + nsIKeyValueService: nsJSIID< + nsIKeyValueService, + typeof nsIKeyValueService_RecoveryStrategy + >; nsIKeyValueImportSourceSpec: nsJSIID; nsIKeyValueImporter: nsJSIID< nsIKeyValueImporter, - typeof nsIKeyValueImporter_ConflictPolicy & typeof nsIKeyValueImporter_CleanupPolicy + typeof nsIKeyValueImporter_ConflictPolicy & + typeof nsIKeyValueImporter_CleanupPolicy >; nsIKeyValueDatabaseImportOptions: nsJSIID; nsIKeyValueDatabase: nsJSIID; @@ -18822,7 +20041,10 @@ declare global { nsIIdentChannel: nsJSIID; nsIChannelEventSink: nsJSIID; nsIChildChannel: nsJSIID; - nsIClassOfService: nsJSIID; + nsIClassOfService: nsJSIID< + nsIClassOfService, + typeof nsIClassOfService_FetchPriority + >; nsIClassifiedChannel: nsJSIID< nsIClassifiedChannel, typeof nsIClassifiedChannel_ClassificationFlags @@ -18945,7 +20167,10 @@ declare global { nsIInputChannelThrottleQueue: nsJSIID; nsIThrottledInputChannel: nsJSIID; nsIServerTiming: nsJSIID; - nsITimedChannel: nsJSIID; + nsITimedChannel: nsJSIID< + nsITimedChannel, + typeof nsITimedChannel_BodyInfoAccess + >; nsITraceableChannel: nsJSIID; nsITransport: nsJSIID; nsITransportEventSink: nsJSIID; @@ -18977,11 +20202,17 @@ declare global { nsICookie: nsJSIID; nsICookieJarSettings: nsJSIID; nsICookieManager: nsJSIID; - nsICookieNotification: nsJSIID; + nsICookieNotification: nsJSIID< + nsICookieNotification, + typeof nsICookieNotification_Action + >; nsICookiePermission: nsJSIID; nsICookieTransactionCallback: nsJSIID; nsICookieService: nsJSIID; - nsICookieValidation: nsJSIID; + nsICookieValidation: nsJSIID< + nsICookieValidation, + typeof nsICookieValidation_ValidationError + >; nsIThirdPartyCookieBlockingExceptionListService: nsJSIID; nsIThirdPartyCookieExceptionEntry: nsJSIID; nsIDNSAdditionalInfo: nsJSIID; @@ -19061,7 +20292,8 @@ declare global { nsIWebSocketListener: nsJSIID; nsIWebTransport: nsJSIID< nsIWebTransport, - typeof nsIWebTransport_WebTransportError & typeof nsIWebTransport_HTTPVersion + typeof nsIWebTransport_WebTransportError & + typeof nsIWebTransport_HTTPVersion >; WebTransportSessionEventListener: nsJSIID< WebTransportSessionEventListener, @@ -19102,7 +20334,10 @@ declare global { >; nsIContentSignatureVerifier: nsJSIID; nsICryptoHash: nsJSIID; - nsIDataStorageManager: nsJSIID; + nsIDataStorageManager: nsJSIID< + nsIDataStorageManager, + typeof nsIDataStorageManager_DataStorage + >; nsIDataStorage: nsJSIID; nsIDataStorageItem: nsJSIID; nsINSSComponent: nsJSIID; @@ -19150,7 +20385,8 @@ declare global { mozIAsyncHistory: nsJSIID; mozIPlacesAutoComplete: nsJSIID< mozIPlacesAutoComplete, - typeof mozIPlacesAutoComplete_MatchBehaviors & typeof mozIPlacesAutoComplete_SearchBehaviors + typeof mozIPlacesAutoComplete_MatchBehaviors & + typeof mozIPlacesAutoComplete_SearchBehaviors >; mozIPlacesPendingOperation: nsJSIID; mozISyncedBookmarksMirrorProgressListener: nsJSIID; @@ -19164,7 +20400,8 @@ declare global { nsIFavicon: nsJSIID; nsINavBookmarksService: nsJSIID< nsINavBookmarksService, - typeof nsINavBookmarksService_BookmarkType & typeof nsINavBookmarksService_ChangeSource + typeof nsINavBookmarksService_BookmarkType & + typeof nsINavBookmarksService_ChangeSource >; nsINavHistoryResultNode: nsJSIID< nsINavHistoryResultNode, @@ -19177,9 +20414,13 @@ declare global { nsINavHistoryQuery: nsJSIID; nsINavHistoryQueryOptions: nsJSIID< nsINavHistoryQueryOptions, - typeof nsINavHistoryQueryOptions_SortByType & typeof nsINavHistoryQueryOptions_ResultType + typeof nsINavHistoryQueryOptions_SortByType & + typeof nsINavHistoryQueryOptions_ResultType + >; + nsINavHistoryService: nsJSIID< + nsINavHistoryService, + typeof nsINavHistoryService_TransitionType >; - nsINavHistoryService: nsJSIID; nsIPlacesPreviewsHelperService: nsJSIID; nsITaggingService: nsJSIID; nsIPrefBranch: nsJSIID; @@ -19278,7 +20519,8 @@ declare global { nsIContentAnalysisResult: nsJSIID; nsIContentAnalysisResponse: nsJSIID< nsIContentAnalysisResponse, - typeof nsIContentAnalysisResponse_Action & typeof nsIContentAnalysisResponse_CancelError + typeof nsIContentAnalysisResponse_Action & + typeof nsIContentAnalysisResponse_CancelError >; nsIClientDownloadResource: nsJSIID; nsIContentAnalysisRequest: nsJSIID< @@ -19293,7 +20535,10 @@ declare global { nsIClickRule: nsJSIID; nsICookieBannerListService: nsJSIID; nsICookieBannerRule: nsJSIID; - nsICookieBannerService: nsJSIID; + nsICookieBannerService: nsJSIID< + nsICookieBannerService, + typeof nsICookieBannerService_Modes + >; nsICookieBannerTelemetryService: nsJSIID; nsICookieRule: nsJSIID; nsICrashService: nsJSIID; @@ -19374,7 +20619,8 @@ declare global { nsIUrlClassifierExceptionListService: nsJSIID; nsIUrlClassifierFeature: nsJSIID< nsIUrlClassifierFeature, - typeof nsIUrlClassifierFeature_listType & typeof nsIUrlClassifierFeature_URIType + typeof nsIUrlClassifierFeature_listType & + typeof nsIUrlClassifierFeature_URIType >; nsIUrlClassifierFeatureResult: nsJSIID; nsIUrlClassifierFeatureCallback: nsJSIID; @@ -19436,7 +20682,10 @@ declare global { nsIClipboardDataSnapshot: nsJSIID; nsIClipboardGetDataSnapshotCallback: nsJSIID; nsIClipboard: nsJSIID; - nsIClipboardHelper: nsJSIID; + nsIClipboardHelper: nsJSIID< + nsIClipboardHelper, + typeof nsIClipboardHelper_SensitiveData + >; nsIClipboardOwner: nsJSIID; nsIColorPickerShownCallback: nsJSIID; nsIColorPicker: nsJSIID; @@ -19451,7 +20700,10 @@ declare global { >; nsIFilePickerShownCallback: nsJSIID; nsIFormatConverter: nsJSIID; - nsIGfxInfo: nsJSIID; + nsIGfxInfo: nsJSIID< + nsIGfxInfo, + typeof nsIGfxInfo_FontVisibilityDeviceDetermination + >; nsIGfxInfoDebug: nsJSIID; nsIMockDragServiceController: nsJSIID< nsIMockDragServiceController, @@ -19460,7 +20712,10 @@ declare global { nsIPaper: nsJSIID; nsIPaperMargin: nsJSIID; nsIPrintDialogService: nsJSIID; - nsIPrintSettings: nsJSIID; + nsIPrintSettings: nsJSIID< + nsIPrintSettings, + typeof nsIPrintSettings_OutputDestinationType + >; nsIPrintSettingsService: nsJSIID; nsIPrinterInfo: nsJSIID; nsIPrinter: nsJSIID; @@ -19486,7 +20741,10 @@ declare global { nsIAvailableMemoryWatcherBase: nsJSIID; nsIConsoleListener: nsJSIID; nsIConsoleMessage: nsJSIID; - nsIConsoleService: nsJSIID; + nsIConsoleService: nsJSIID< + nsIConsoleService, + typeof nsIConsoleService_OutputMode + >; nsICycleCollectorHandler: nsJSIID; nsICycleCollectorLogSink: nsJSIID; nsICycleCollectorListener: nsJSIID; @@ -19620,7 +20878,10 @@ declare global { typeof nsIXULRuntime_FissionDecisionStatus >; nsIEnvironment: nsJSIID; - nsIEventTarget: nsJSIID; + nsIEventTarget: nsJSIID< + nsIEventTarget, + typeof nsIEventTarget_DispatchFlags + >; nsINamed: nsJSIID; nsIProcess: nsJSIID; nsIRunnable: nsJSIID; @@ -19652,7 +20913,8 @@ declare global { nsIXPCTestBug809674: nsJSIID; nsIXPCTestCEnums: nsJSIID< nsIXPCTestCEnums, - typeof nsIXPCTestCEnums_testFlagsExplicit & typeof nsIXPCTestCEnums_testFlagsImplicit + typeof nsIXPCTestCEnums_testFlagsExplicit & + typeof nsIXPCTestCEnums_testFlagsImplicit >; nsIXPCTestInterfaceA: nsJSIID; nsIXPCTestInterfaceB: nsJSIID; diff --git a/src/zen/@types/zen.d.ts b/src/zen/@types/zen.d.ts index e677a5e55..2a063614b 100644 --- a/src/zen/@types/zen.d.ts +++ b/src/zen/@types/zen.d.ts @@ -88,7 +88,9 @@ declare namespace MockedExports { * * Then add the file path to the KnownModules above. */ - importESModule: (module: S) => KnownModules[S]; + importESModule: ( + module: S + ) => KnownModules[S]; defineESModuleGetters: (target: any, mappings: any) => void; } @@ -160,7 +162,11 @@ declare namespace MockedExports { setIntPref: SetPref; getBoolPref: GetPref; setBoolPref: SetPref; - addObserver: (aDomain: string, aObserver: PrefObserver, aHoldWeak?: boolean) => void; + addObserver: ( + aDomain: string, + aObserver: PrefObserver, + aHoldWeak?: boolean + ) => void; removeObserver: (aDomain: string, aObserver: PrefObserver) => void; }; @@ -299,7 +305,11 @@ declare namespace MockedExports { class nsIFilePicker {} interface FilePicker { - init: (browsingContext: BrowsingContext, title: string, mode: number) => void; + init: ( + browsingContext: BrowsingContext, + title: string, + mode: number + ) => void; open: (callback: (rv: number) => unknown) => void; // The following are enum values. modeGetFolder: number; @@ -330,7 +340,11 @@ declare namespace MockedExports { * This function sets the attributes data-l10n-id and possibly data-l10n-args * on the element. */ - setAttributes(target: Element, id?: string, args?: Record): void; + setAttributes( + target: Element, + id?: string, + args?: Record + ): void; } } @@ -365,7 +379,8 @@ declare interface ChromeDocument extends Document { * Create a XUL element of a specific type. Right now this function * only refines iframes, but more tags could be added. */ - createXULElement: ((type: "iframe") => XULIframeElement) & ((type: string) => XULElement); + createXULElement: ((type: "iframe") => XULIframeElement) & + ((type: string) => XULElement); /** * This is a fluent instance connected to this document. @@ -406,7 +421,9 @@ declare interface Window { userContextId: number; forceNonPrivate: boolean; relatedToCurrent: boolean; - resolveOnContentBrowserCreated: (contentBrowser: MockedExports.ChromeBrowser) => unknown; + resolveOnContentBrowserCreated: ( + contentBrowser: MockedExports.ChromeBrowser + ) => unknown; }> ) => void; openTrustedLinkIn: ( @@ -417,7 +434,9 @@ declare interface Window { userContextId: number; forceNonPrivate: boolean; relatedToCurrent: boolean; - resolveOnContentBrowserCreated: (contentBrowser: MockedExports.ChromeBrowser) => unknown; + resolveOnContentBrowserCreated: ( + contentBrowser: MockedExports.ChromeBrowser + ) => unknown; }> ) => void; } diff --git a/src/zen/common/emojis/ZenEmojiPicker.mjs b/src/zen/common/emojis/ZenEmojiPicker.mjs index c734f91a0..cf651e23c 100644 --- a/src/zen/common/emojis/ZenEmojiPicker.mjs +++ b/src/zen/common/emojis/ZenEmojiPicker.mjs @@ -63,7 +63,9 @@ class nsZenEmojiPicker extends nsZenDOMOperatedFeature { case "command": if (event.target.id === "PanelUI-zen-emojis-picker-none") { this.#selectEmoji(null); - } else if (event.target.id === "PanelUI-zen-emojis-picker-change-emojis") { + } else if ( + event.target.id === "PanelUI-zen-emojis-picker-change-emojis" + ) { this.#changePage(false); } else if (event.target.id === "PanelUI-zen-emojis-picker-change-svg") { this.#changePage(true); @@ -104,7 +106,9 @@ class nsZenEmojiPicker extends nsZenDOMOperatedFeature { #changePage(toSvg = false) { const itemToScroll = toSvg ? this.svgList - : document.getElementById("PanelUI-zen-emojis-picker-pages").querySelector('[emojis="true"]'); + : document + .getElementById("PanelUI-zen-emojis-picker-pages") + .querySelector('[emojis="true"]'); itemToScroll.scrollIntoView({ behavior: "smooth", block: "nearest", @@ -137,15 +141,19 @@ class nsZenEmojiPicker extends nsZenDOMOperatedFeature { const value = input.value.trim().toLowerCase(); // search for emojis.tags and order by emojis.order const filteredEmojis = this.#emojis - .filter((emoji) => { - return emoji.tags.some((tag) => tag.toLowerCase().includes(value)); + .filter(emoji => { + return emoji.tags.some(tag => tag.toLowerCase().includes(value)); }) .sort((a, b) => a.order - b.order); for (const button of this.emojiList.children) { const buttonEmoji = button.getAttribute("label"); - const emojiObject = filteredEmojis.find((emoji) => emoji.emoji === buttonEmoji); + const emojiObject = filteredEmojis.find( + emoji => emoji.emoji === buttonEmoji + ); if (emojiObject) { - button.hidden = !emojiObject.tags.some((tag) => tag.toLowerCase().includes(value)); + button.hidden = !emojiObject.tags.some(tag => + tag.toLowerCase().includes(value) + ); button.style.order = emojiObject.order; } else { button.hidden = true; @@ -205,7 +213,9 @@ class nsZenEmojiPicker extends nsZenDOMOperatedFeature { this.svgList.innerHTML = ""; if (!this.#hasSelection) { - this.#currentPromiseReject?.(new Error("Emoji picker closed without selection")); + this.#currentPromiseReject?.( + new Error("Emoji picker closed without selection") + ); } else if (!this.#closeOnSelect) { this.#currentPromiseResolve?.(this.#lastSelectedEmoji); } diff --git a/src/zen/common/modules/ZenCommonUtils.mjs b/src/zen/common/modules/ZenCommonUtils.mjs index f4e7b8867..6376c9618 100644 --- a/src/zen/common/modules/ZenCommonUtils.mjs +++ b/src/zen/common/modules/ZenCommonUtils.mjs @@ -78,7 +78,9 @@ export class nsZenDOMOperatedFeature { export class nsZenPreloadedFeature { constructor() { var initBound = this.init.bind(this); - document.addEventListener("MozBeforeInitialXULLayout", initBound, { once: true }); + document.addEventListener("MozBeforeInitialXULLayout", initBound, { + once: true, + }); } } @@ -92,7 +94,7 @@ window.gZenCommonActions = { if (Services.zen.canShare() && displaySpec.startsWith("http")) { button = { id: "zen-copy-current-url-button", - command: (event) => { + command: event => { const buttonRect = event.target.getBoundingClientRect(); /* eslint-disable mozilla/valid-services */ Services.zen.share( @@ -107,7 +109,10 @@ window.gZenCommonActions = { }, }; } - gZenUIManager.showToast("zen-copy-current-url-confirmation", { button, timeout: 3000 }); + gZenUIManager.showToast("zen-copy-current-url-confirmation", { + button, + timeout: 3000, + }); }, copyCurrentURLAsMarkdownToClipboard() { @@ -115,7 +120,9 @@ window.gZenCommonActions = { const tabTitle = gBrowser.selectedTab.label; const markdownLink = `[${tabTitle}](${currentUrl.displaySpec})`; ClipboardHelper.copyString(markdownLink); - gZenUIManager.showToast("zen-copy-current-url-as-markdown-confirmation", { timeout: 3000 }); + gZenUIManager.showToast("zen-copy-current-url-as-markdown-confirmation", { + timeout: 3000, + }); }, throttle(f, delay) { @@ -134,10 +141,17 @@ window.gZenCommonActions = { * @returns {boolean} True if the tab should be closed on back */ shouldCloseTabOnBack() { - if (!Services.prefs.getBoolPref("zen.tabs.close-on-back-with-no-history", true)) { + if ( + !Services.prefs.getBoolPref( + "zen.tabs.close-on-back-with-no-history", + true + ) + ) { return false; } const tab = gBrowser.selectedTab; - return Boolean(tab.owner && !tab.pinned && !tab.hasAttribute("zen-empty-tab")); + return Boolean( + tab.owner && !tab.pinned && !tab.hasAttribute("zen-empty-tab") + ); }, }; diff --git a/src/zen/common/modules/ZenHasPolyfill.mjs b/src/zen/common/modules/ZenHasPolyfill.mjs index 9b4e2c3dd..986559d7f 100644 --- a/src/zen/common/modules/ZenHasPolyfill.mjs +++ b/src/zen/common/modules/ZenHasPolyfill.mjs @@ -14,7 +14,12 @@ class nsHasPolyfill { * @param {string} stateAttribute * @param {Array} attributeFilter */ - observeSelectorExistence(element, descendantSelectors, stateAttribute, attributeFilter = []) { + observeSelectorExistence( + element, + descendantSelectors, + stateAttribute, + attributeFilter = [] + ) { const updateState = () => { const exists = descendantSelectors.some(({ selector }) => { let selected = element.querySelector(selector); @@ -26,10 +31,18 @@ class nsHasPolyfill { const { exists: shouldExist = true } = descendantSelectors; if (exists === shouldExist) { if (!element.hasAttribute(stateAttribute)) { - gZenCompactModeManager._setElementExpandAttribute(element, true, stateAttribute); + gZenCompactModeManager._setElementExpandAttribute( + element, + true, + stateAttribute + ); } } else if (element.hasAttribute(stateAttribute)) { - gZenCompactModeManager._setElementExpandAttribute(element, false, stateAttribute); + gZenCompactModeManager._setElementExpandAttribute( + element, + false, + stateAttribute + ); } }; @@ -46,31 +59,35 @@ class nsHasPolyfill { } disconnectObserver(observerId) { - const index = this.observers.findIndex((o) => o.id === observerId); + const index = this.observers.findIndex(o => o.id === observerId); if (index !== -1) { this.observers[index].observer.disconnect(); } } connectObserver(observerId) { - const observer = this.observers.find((o) => o.id === observerId); + const observer = this.observers.find(o => o.id === observerId); if (observer) { observer.observer.observe(observer.element, { childList: true, subtree: true, attributes: true, - attributeFilter: observer.attributeFilter.length ? observer.attributeFilter : undefined, + attributeFilter: observer.attributeFilter.length + ? observer.attributeFilter + : undefined, }); } } destroy() { - this.observers.forEach((observer) => observer.observer.disconnect()); + this.observers.forEach(observer => observer.observer.disconnect()); this.observers = []; } } const hasPolyfillInstance = new nsHasPolyfill(); -window.addEventListener("unload", () => hasPolyfillInstance.destroy(), { once: true }); +window.addEventListener("unload", () => hasPolyfillInstance.destroy(), { + once: true, +}); window.ZenHasPolyfill = hasPolyfillInstance; diff --git a/src/zen/common/modules/ZenMenubar.mjs b/src/zen/common/modules/ZenMenubar.mjs index ae7d872f7..9616d0228 100644 --- a/src/zen/common/modules/ZenMenubar.mjs +++ b/src/zen/common/modules/ZenMenubar.mjs @@ -38,7 +38,7 @@ export class nsZenMenuBar { `); const menu = appearanceMenu.querySelector("menu"); - menu.addEventListener("command", (event) => { + menu.addEventListener("command", event => { const type = event.target.getAttribute("data-type"); const schemeValue = WINDOW_SCHEME_MAPPING[type]; Services.prefs.setIntPref(WINDOW_SCHEME_PREF, schemeValue); @@ -97,15 +97,17 @@ export class nsZenMenuBar { `); document.getElementById("view-menu").after(spacesMenubar); - document.getElementById("zen-spaces-menubar").addEventListener("popupshowing", () => { - if (AppConstants.platform === "linux") { - // On linux, there seems to be a bug where the menu freezes up and makes the browser - // suppiciously unresponsive if we try to update the menu while it's opening. - // See https://github.com/zen-browser/desktop/issues/12024 - return; - } - gZenWorkspaces.updateWorkspacesChangeContextMenu(); - }); + document + .getElementById("zen-spaces-menubar") + .addEventListener("popupshowing", () => { + if (AppConstants.platform === "linux") { + // On linux, there seems to be a bug where the menu freezes up and makes the browser + // suppiciously unresponsive if we try to update the menu while it's opening. + // See https://github.com/zen-browser/desktop/issues/12024 + return; + } + gZenWorkspaces.updateWorkspacesChangeContextMenu(); + }); } #initAppMenu() { @@ -133,7 +135,10 @@ export class nsZenMenuBar { if (!Services.prefs.getBoolPref("zen.window-sync.enabled", true)) { return; } - const itemsToHide = ["appMenuRecentlyClosedWindows", "historyUndoWindowMenu"]; + const itemsToHide = [ + "appMenuRecentlyClosedWindows", + "historyUndoWindowMenu", + ]; for (const id of itemsToHide) { const element = PanelMultiView.getViewNode(document, id); element.setAttribute("hidden", "true"); diff --git a/src/zen/common/modules/ZenSessionStore.mjs b/src/zen/common/modules/ZenSessionStore.mjs index 4f5674f55..8c276614c 100644 --- a/src/zen/common/modules/ZenSessionStore.mjs +++ b/src/zen/common/modules/ZenSessionStore.mjs @@ -9,7 +9,7 @@ class ZenSessionStore extends nsZenPreloadedFeature { this.#waitAndCleanup(); } - promiseInitialized = new Promise((resolve) => { + promiseInitialized = new Promise(resolve => { this._resolveInitialized = resolve; }); diff --git a/src/zen/common/modules/ZenSidebarNotification.mjs b/src/zen/common/modules/ZenSidebarNotification.mjs index e40d4c340..f5e134ffa 100644 --- a/src/zen/common/modules/ZenSidebarNotification.mjs +++ b/src/zen/common/modules/ZenSidebarNotification.mjs @@ -47,19 +47,24 @@ class ZenSidebarNotification extends MozLitElement { return html` + href="chrome://browser/content/zen-styles/zen-sidebar-notification.css" + />
-
this.remove()}> + data-l10n-id=${this.headingL10nId} + > +
this.remove()} + >
${this.links.map( - (link) => html` + link => html` ` )} diff --git a/src/zen/common/modules/ZenStartup.mjs b/src/zen/common/modules/ZenStartup.mjs index 5c40363f2..d64378d3b 100644 --- a/src/zen/common/modules/ZenStartup.mjs +++ b/src/zen/common/modules/ZenStartup.mjs @@ -45,7 +45,9 @@ class ZenStartup { } // Fix notification deck - const deckTemplate = document.getElementById("tab-notification-deck-template"); + const deckTemplate = document.getElementById( + "tab-notification-deck-template" + ); if (deckTemplate) { document.getElementById("zen-appcontent-wrapper").prepend(deckTemplate); } @@ -88,7 +90,9 @@ class ZenStartup { // Just in case we didn't get the right size. gZenUIManager.updateTabsToolbar(); this.closeWatermark(); - document.getElementById("tabbrowser-arrowscrollbox").setAttribute("orient", "vertical"); + document + .getElementById("tabbrowser-arrowscrollbox") + .setAttribute("orient", "vertical"); this.isReady = true; }); } @@ -106,10 +110,14 @@ class ZenStartup { closeWatermark() { document.documentElement.removeAttribute("zen-before-loaded"); if (this.#shouldUseWatermark) { - let elementsToIgnore = this.#watermarkIgnoreElements.map((id) => "#" + id).join(", "); + let elementsToIgnore = this.#watermarkIgnoreElements + .map(id => "#" + id) + .join(", "); gZenUIManager.motion .animate( - "#browser > *:not(" + elementsToIgnore + "), #urlbar, #tabbrowser-tabbox > *", + "#browser > *:not(" + + elementsToIgnore + + "), #urlbar, #tabbrowser-tabbox > *", { opacity: [0, 1], }, @@ -148,8 +156,14 @@ class ZenStartup { #checkForWelcomePage() { if (!Services.prefs.getBoolPref("zen.welcome-screen.seen", false)) { Services.prefs.setBoolPref("zen.welcome-screen.seen", true); - Services.prefs.setStringPref("zen.updates.last-build-id", Services.appinfo.appBuildID); - Services.prefs.setStringPref("zen.updates.last-version", Services.appinfo.version); + Services.prefs.setStringPref( + "zen.updates.last-build-id", + Services.appinfo.appBuildID + ); + Services.prefs.setStringPref( + "zen.updates.last-version", + Services.appinfo.version + ); Services.scriptloader.loadSubScript( "chrome://browser/content/zen-components/ZenWelcome.mjs", window diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index fbac93493..0178322ec 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -10,7 +10,10 @@ window.gZenUIManager = { _hoverPausedForExpand: false, _hasLoadedDOM: false, testingEnabled: Services.prefs.getBoolPref("zen.testing.enabled", false), - profilingEnabled: Services.prefs.getBoolPref("zen.testing.profiling.enabled", false), + profilingEnabled: Services.prefs.getBoolPref( + "zen.testing.profiling.enabled", + false + ), _lastClickPosition: null, @@ -22,7 +25,11 @@ window.gZenUIManager = { document.addEventListener("popupshowing", this.onPopupShowing.bind(this)); document.addEventListener("popuphidden", this.onPopupHidden.bind(this)); - document.addEventListener("mousedown", this.handleMouseDown.bind(this), true); + document.addEventListener( + "mousedown", + this.handleMouseDown.bind(this), + true + ); ChromeUtils.defineLazyGetter(this, "motion", () => { Services.scriptloader.loadSubScript( @@ -40,7 +47,9 @@ window.gZenUIManager = { new ResizeObserver( gZenCommonActions.throttle( - gZenCompactModeManager.getAndApplySidebarWidth.bind(gZenCompactModeManager), + gZenCompactModeManager.getAndApplySidebarWidth.bind( + gZenCompactModeManager + ), Services.prefs.getIntPref("zen.view.sidebar-height-throttle", 500) ) ).observe(gNavToolbox); @@ -82,7 +91,10 @@ window.gZenUIManager = { rawKeyframes = { ...rawKeyframes }; // Convert 'y' property to 'transform' with translateY and 'x' to translateX, // and 'scale' to 'transform' with scale. - if ((rawKeyframes.y || rawKeyframes.x || rawKeyframes.scale) && !rawKeyframes.transform) { + if ( + (rawKeyframes.y || rawKeyframes.x || rawKeyframes.scale) && + !rawKeyframes.transform + ) { const yValues = rawKeyframes.y || []; const xValues = rawKeyframes.x || []; const scaleValues = rawKeyframes.scale || []; @@ -90,14 +102,23 @@ window.gZenUIManager = { delete rawKeyframes.x; delete rawKeyframes.scale; rawKeyframes.transform = []; - if (yValues.length !== 0 && xValues.length !== 0 && yValues.length !== xValues.length) { + if ( + yValues.length !== 0 && + xValues.length !== 0 && + yValues.length !== xValues.length + ) { console.error("y and x keyframes must have the same length"); } - const keyframeLength = Math.max(yValues.length, xValues.length, scaleValues.length); + const keyframeLength = Math.max( + yValues.length, + xValues.length, + scaleValues.length + ); for (let i = 0; i < keyframeLength; i++) { const y = yValues[i] !== undefined ? `translateY(${yValues[i]}px)` : ""; const x = xValues[i] !== undefined ? `translateX(${xValues[i]}px)` : ""; - const scale = scaleValues[i] !== undefined ? `scale(${scaleValues[i]})` : ""; + const scale = + scaleValues[i] !== undefined ? `scale(${scaleValues[i]})` : ""; rawKeyframes.transform.push(`${x} ${y} ${scale}`.trim()); } } @@ -109,7 +130,7 @@ window.gZenUIManager = { } keyframes.push(frame); } - return await new Promise((resolve) => { + return await new Promise(resolve => { const animation = element.animate(keyframes, ...args); animation.onfinish = () => resolve(); }); @@ -117,10 +138,19 @@ window.gZenUIManager = { _addNewCustomizableButtonsIfNeeded() { const kPref = "zen.ui.migration.compact-mode-button-added"; - let navbarPlacements = CustomizableUI.getWidgetIdsInArea("zen-sidebar-top-buttons"); + let navbarPlacements = CustomizableUI.getWidgetIdsInArea( + "zen-sidebar-top-buttons" + ); try { - if (!navbarPlacements.length && !Services.prefs.getBoolPref(kPref, false)) { - CustomizableUI.addWidgetToArea("zen-toggle-compact-mode", "zen-sidebar-top-buttons", 0); + if ( + !navbarPlacements.length && + !Services.prefs.getBoolPref(kPref, false) + ) { + CustomizableUI.addWidgetToArea( + "zen-toggle-compact-mode", + "zen-sidebar-top-buttons", + 0 + ); gZenVerticalTabsManager._topButtonsSeparatorElement.before( document.getElementById("zen-toggle-compact-mode") ); @@ -138,7 +168,7 @@ window.gZenUIManager = { // is ran before this function. document.documentElement.setAttribute("zen-has-bookmarks", "true"); } - bookmarkToolbar.addEventListener("toolbarvisibilitychange", (event) => { + bookmarkToolbar.addEventListener("toolbarvisibilitychange", event => { const visible = event.detail.visible; if (visible) { document.documentElement.setAttribute("zen-has-bookmarks", "true"); @@ -223,8 +253,13 @@ window.gZenUIManager = { "--zen-urlbar-top", `${window.innerHeight / 2 - Math.max(kUrlbarHeight, window.windowUtils.getBoundsWithoutFlushing(gURLBar).height) / 2}px` ); - gURLBar.style.setProperty("--zen-urlbar-width", `${Math.min(window.innerWidth / 2, 750)}px`); - gZenVerticalTabsManager.actualWindowButtons.removeAttribute("zen-has-hover"); + gURLBar.style.setProperty( + "--zen-urlbar-width", + `${Math.min(window.innerWidth / 2, 750)}px` + ); + gZenVerticalTabsManager.actualWindowButtons.removeAttribute( + "zen-has-hover" + ); gZenVerticalTabsManager.recalculateURLBarHeight(true); if (!this._preventToolbarRebuild) { setTimeout(() => { @@ -256,7 +291,10 @@ window.gZenUIManager = { openAndChangeToTab(url, options) { if (window.ownerGlobal.parent) { - const tab = window.ownerGlobal.parent.gBrowser.addTrustedTab(url, options); + const tab = window.ownerGlobal.parent.gBrowser.addTrustedTab( + url, + options + ); window.ownerGlobal.parent.gBrowser.selectedTab = tab; return tab; } @@ -270,7 +308,10 @@ window.gZenUIManager = { }, createValidXULText(text) { - return text.replace(/&/g, "&").replace(//g, ">"); + return text + .replace(/&/g, "&") + .replace(//g, ">"); }, /** @@ -302,7 +343,11 @@ window.gZenUIManager = { continue; } document.removeEventListener("mousemove", this.__removeHasPopupAttribute); - gZenCompactModeManager._setElementExpandAttribute(el, true, "has-popup-menu"); + gZenCompactModeManager._setElementExpandAttribute( + el, + true, + "has-popup-menu" + ); this.__currentPopup = showEvent.target; this.__currentPopupTrackElement = el; break; @@ -315,11 +360,21 @@ window.gZenUIManager = { } const element = this.__currentPopupTrackElement; if (document.getElementById("main-window").matches(":hover")) { - gZenCompactModeManager._setElementExpandAttribute(element, false, "has-popup-menu"); + gZenCompactModeManager._setElementExpandAttribute( + element, + false, + "has-popup-menu" + ); } else { this.__removeHasPopupAttribute = () => - gZenCompactModeManager._setElementExpandAttribute(element, false, "has-popup-menu"); - document.addEventListener("mousemove", this.__removeHasPopupAttribute, { once: true }); + gZenCompactModeManager._setElementExpandAttribute( + element, + false, + "has-popup-menu" + ); + document.addEventListener("mousemove", this.__removeHasPopupAttribute, { + once: true, + }); } this.__currentPopup = null; this.__currentPopupTrackElement = null; @@ -347,9 +402,11 @@ window.gZenUIManager = { const input = gURLBar; if (gURLBar.hasAttribute("breakout-extend") && !this._animatingSearchMode) { this._animatingSearchMode = true; - this.motion.animate(input, { scale: [1, 0.98, 1] }, { duration: 0.25 }).then(() => { - delete this._animatingSearchMode; - }); + this.motion + .animate(input, { scale: [1, 0.98, 1] }, { duration: 0.25 }) + .then(() => { + delete this._animatingSearchMode; + }); if (searchMode) { gURLBar.setAttribute("animate-searchmode", "true"); this._animatingSearchModeTimeout = setTimeout(() => { @@ -416,7 +473,12 @@ window.gZenUIManager = { return true; }, - handleNewTab(werePassedURL, searchClipboard, where, overridePreferance = false) { + handleNewTab( + werePassedURL, + searchClipboard, + where, + overridePreferance = false + ) { // Validate browser state first if (!this._validateBrowserState()) { console.warn("Browser state invalid for new tab operation"); @@ -548,7 +610,9 @@ window.gZenUIManager = { if (isFocusedBefore) { setTimeout(() => { window.dispatchEvent( - new CustomEvent("ZenURLBarClosed", { detail: { onSwitch, onElementPicked } }) + new CustomEvent("ZenURLBarClosed", { + detail: { onSwitch, onElementPicked }, + }) ); gURLBar.view.close({ elementPicked: onElementPicked }); gURLBar.updateTextOverflow(); @@ -559,8 +623,15 @@ window.gZenUIManager = { // Ensure tab and browser are valid before updating state const selectedTab = gBrowser.selectedTab; - if (selectedTab && selectedTab.linkedBrowser && !selectedTab.closing && onSwitch) { - const browserState = gURLBar.getBrowserState(selectedTab.linkedBrowser); + if ( + selectedTab && + selectedTab.linkedBrowser && + !selectedTab.closing && + onSwitch + ) { + const browserState = gURLBar.getBrowserState( + selectedTab.linkedBrowser + ); if (browserState) { browserState.urlbarFocused = false; } @@ -574,7 +645,10 @@ window.gZenUIManager = { if (gURLBar.hasAttribute("breakout-extend")) { return aURL; } - if (gZenVerticalTabsManager._hasSetSingleToolbar && this.urlbarShowDomainOnly) { + if ( + gZenVerticalTabsManager._hasSetSingleToolbar && + this.urlbarShowDomainOnly + ) { let url = BrowserUIUtils.removeSingleTrailingSlashFromURL(aURL); return url.startsWith("https://") ? url.split("/")[2] : url; } @@ -639,7 +713,11 @@ window.gZenUIManager = { return; } this.motion - .animate(toast, { opacity: [1, 0], scale: [1, 0.5] }, { duration: 0.2, bounce: 0 }) + .animate( + toast, + { opacity: [1, 0], scale: [1, 0.5] }, + { duration: 0.2, bounce: 0 } + ) .then(() => { toast.remove(); if (this._toastContainer.children.length === 0) { @@ -648,7 +726,11 @@ window.gZenUIManager = { }); }; if (reused) { - await this.motion.animate(toast, { scale: 0.2 }, { duration: 0.1, bounce: 0 }); + await this.motion.animate( + toast, + { scale: 0.2 }, + { duration: 0.1, bounce: 0 } + ); } else { toast.addEventListener("mouseover", () => { if (this._toastTimeouts[messageId]) { @@ -659,17 +741,27 @@ window.gZenUIManager = { if (this._toastTimeouts[messageId]) { clearTimeout(this._toastTimeouts[messageId]); } - this._toastTimeouts[messageId] = setTimeout(timeoutFunction, options.timeout || 2000); + this._toastTimeouts[messageId] = setTimeout( + timeoutFunction, + options.timeout || 2000 + ); }); } if (!toast.style.transform) { toast.style.transform = "scale(0)"; } - await this.motion.animate(toast, { scale: 1 }, { type: "spring", bounce: 0.2, duration: 0.5 }); + await this.motion.animate( + toast, + { scale: 1 }, + { type: "spring", bounce: 0.2, duration: 0.5 } + ); if (this._toastTimeouts[messageId]) { clearTimeout(this._toastTimeouts[messageId]); } - this._toastTimeouts[messageId] = setTimeout(timeoutFunction, options.timeout || 2000); + this._toastTimeouts[messageId] = setTimeout( + timeoutFunction, + options.timeout || 2000 + ); }, panelUIPosition(panel, anchor) { @@ -722,10 +814,12 @@ window.gZenUIManager = { block = "topleft"; } if ( - (gZenVerticalTabsManager._hasSetSingleToolbar && gZenVerticalTabsManager._prefsRightSide) || + (gZenVerticalTabsManager._hasSetSingleToolbar && + gZenVerticalTabsManager._prefsRightSide) || (panel?.id === "zen-unified-site-data-panel" && !gZenVerticalTabsManager._hasSetSingleToolbar) || - (panel?.id === "unified-extensions-panel" && gZenVerticalTabsManager._hasSetSingleToolbar) + (panel?.id === "unified-extensions-panel" && + gZenVerticalTabsManager._hasSetSingleToolbar) ) { block = "bottomright"; inline = "topright"; @@ -787,14 +881,20 @@ window.gZenVerticalTabsManager = { return !( window.AppConstants.platform === "macosx" || window.matchMedia("(-moz-gtk-csd-reversed-placement)").matches || - Services.prefs.getBoolPref("zen.view.experimental-force-window-controls-left") + Services.prefs.getBoolPref( + "zen.view.experimental-force-window-controls-left" + ) ); }); ChromeUtils.defineLazyGetter(this, "hidesTabsToolbar", () => { return ( - document.documentElement.getAttribute("chromehidden")?.includes("toolbar") || - document.documentElement.getAttribute("chromehidden")?.includes("menubar") + document.documentElement + .getAttribute("chromehidden") + ?.includes("toolbar") || + document.documentElement + .getAttribute("chromehidden") + ?.includes("menubar") ); }); @@ -808,22 +908,35 @@ window.gZenVerticalTabsManager = { var onPrefChange = this._onPrefChange.bind(this); this.initializePreferences(onPrefChange); - this._toolbarOriginalParent = document.getElementById("nav-bar").parentElement; + this._toolbarOriginalParent = + document.getElementById("nav-bar").parentElement; gZenCompactModeManager.addEventListener(updateEvent); this.initRightSideOrderContextMenu(); - window.addEventListener("customizationstarting", this._preCustomize.bind(this)); - window.addEventListener("aftercustomization", this._postCustomize.bind(this)); + window.addEventListener( + "customizationstarting", + this._preCustomize.bind(this) + ); + window.addEventListener( + "aftercustomization", + this._postCustomize.bind(this) + ); this._updateEvent(); if (!this.isWindowsStyledButtons) { - document.documentElement.setAttribute("zen-window-buttons-reversed", true); + document.documentElement.setAttribute( + "zen-window-buttons-reversed", + true + ); } this._renameTabHalt = this.renameTabHalt.bind(this); - gBrowser.tabContainer.addEventListener("dblclick", this.renameTabStart.bind(this)); + gBrowser.tabContainer.addEventListener( + "dblclick", + this.renameTabStart.bind(this) + ); }, toggleExpand() { @@ -896,7 +1009,7 @@ window.gZenVerticalTabsManager = { } ) .then(() => {}) - .catch((err) => { + .catch(err => { console.error(err); }) .finally(() => { @@ -905,7 +1018,8 @@ window.gZenVerticalTabsManager = { aItem.style.removeProperty("opacity"); }); const itemLabel = - aItem.querySelector(".tab-group-label-container") || aItem.querySelector(".tab-content"); + aItem.querySelector(".tab-group-label-container") || + aItem.querySelector(".tab-content"); gZenUIManager.motion .animate( itemLabel, @@ -918,7 +1032,7 @@ window.gZenVerticalTabsManager = { } ) .then(() => {}) - .catch((err) => { + .catch(err => { console.error(err); }) .finally(() => { @@ -971,7 +1085,7 @@ window.gZenVerticalTabsManager = { }, async _preCustomize() { - await this._multiWindowFeature.foreachWindowAsActive(async (browser) => { + await this._multiWindowFeature.foreachWindowAsActive(async browser => { browser.gZenVerticalTabsManager._updateEvent({ forCustomizableMode: true, dontRebuildAreas: true, @@ -984,7 +1098,7 @@ window.gZenVerticalTabsManager = { _postCustomize() { // No need to use `await` here, because the customization is already done - this._multiWindowFeature.foreachWindowAsActive(async (browser) => { + this._multiWindowFeature.foreachWindowAsActive(async browser => { browser.gZenVerticalTabsManager._updateEvent({ dontRebuildAreas: true }); }); }, @@ -1028,7 +1142,7 @@ window.gZenVerticalTabsManager = { }, _initWaitPromise() { - this._waitPromise = new Promise((resolve) => { + this._waitPromise = new Promise(resolve => { this._resolveWaitPromise = resolve; }); }, @@ -1037,8 +1151,12 @@ window.gZenVerticalTabsManager = { this._resolveWaitPromise(); // only run if we are in the active window - await this._multiWindowFeature.foreachWindowAsActive(async (browser) => { - if (browser.gZenVerticalTabsManager._multiWindowFeature.windowIsActive(browser)) { + await this._multiWindowFeature.foreachWindowAsActive(async browser => { + if ( + browser.gZenVerticalTabsManager._multiWindowFeature.windowIsActive( + browser + ) + ) { return; } await browser.gZenVerticalTabsManager._waitPromise; @@ -1089,17 +1207,22 @@ window.gZenVerticalTabsManager = { } const topButtons = document.getElementById("zen-sidebar-top-buttons"); - const isCompactMode = gZenCompactModeManager.preference && !forCustomizableMode; + const isCompactMode = + gZenCompactModeManager.preference && !forCustomizableMode; const isVerticalTabs = this._prefsVerticalTabs || forCustomizableMode; const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs; const isRightSide = this._prefsRightSide && isVerticalTabs; const isSingleToolbar = - ((this._prefsUseSingleToolbar && isVerticalTabs && isSidebarExpanded) || !isVerticalTabs) && + ((this._prefsUseSingleToolbar && isVerticalTabs && isSidebarExpanded) || + !isVerticalTabs) && !forCustomizableMode && !this.hidesTabsToolbar; const titlebar = document.getElementById("titlebar"); - gBrowser.tabContainer.setAttribute("orient", isVerticalTabs ? "vertical" : "horizontal"); + gBrowser.tabContainer.setAttribute( + "orient", + isVerticalTabs ? "vertical" : "horizontal" + ); gBrowser.tabContainer.arrowScrollbox.setAttribute( "orient", isVerticalTabs ? "vertical" : "horizontal" @@ -1110,7 +1233,9 @@ window.gZenVerticalTabsManager = { isVerticalTabs ? "vertical" : "horizontal" ); - const buttonsTarget = document.getElementById("zen-sidebar-top-buttons-customization-target"); + const buttonsTarget = document.getElementById( + "zen-sidebar-top-buttons-customization-target" + ); if (isRightSide) { this.navigatorToolbox.setAttribute("zen-right-side", "true"); document.documentElement.setAttribute("zen-right-side", "true"); @@ -1121,7 +1246,9 @@ window.gZenVerticalTabsManager = { delete this._hadSidebarCollapse; if (isSidebarExpanded) { - this._hadSidebarCollapse = !document.documentElement.hasAttribute("zen-sidebar-expanded"); + this._hadSidebarCollapse = !document.documentElement.hasAttribute( + "zen-sidebar-expanded" + ); this.navigatorToolbox.setAttribute("zen-sidebar-expanded", "true"); document.documentElement.setAttribute("zen-sidebar-expanded", "true"); gBrowser.tabContainer.setAttribute("expanded", "true"); @@ -1131,8 +1258,12 @@ window.gZenVerticalTabsManager = { gBrowser.tabContainer.removeAttribute("expanded"); } - const appContentNavbarContaienr = document.getElementById("zen-appcontent-navbar-container"); - const appContentNavbarWrapper = document.getElementById("zen-appcontent-navbar-wrapper"); + const appContentNavbarContaienr = document.getElementById( + "zen-appcontent-navbar-container" + ); + const appContentNavbarWrapper = document.getElementById( + "zen-appcontent-navbar-wrapper" + ); appContentNavbarWrapper.style.transition = "none"; let shouldHide = false; if ( @@ -1148,12 +1279,16 @@ window.gZenVerticalTabsManager = { } // Check if the sidebar is in hover mode - if (!this.navigatorToolbox.hasAttribute("zen-right-side") && !isCompactMode) { + if ( + !this.navigatorToolbox.hasAttribute("zen-right-side") && + !isCompactMode + ) { this.navigatorToolbox.prepend(topButtons); } let windowButtons = this.actualWindowButtons; - let doNotChangeWindowButtons = !isCompactMode && isRightSide && this.isWindowsStyledButtons; + let doNotChangeWindowButtons = + !isCompactMode && isRightSide && this.isWindowsStyledButtons; const navBar = document.getElementById("nav-bar"); if (isSingleToolbar) { @@ -1169,11 +1304,15 @@ window.gZenVerticalTabsManager = { for (const button of elements) { this._topButtonsSeparatorElement.after(button); } - buttonsTarget.prepend(document.getElementById("unified-extensions-button")); + buttonsTarget.prepend( + document.getElementById("unified-extensions-button") + ); const panelUIButton = document.getElementById("PanelUI-button"); buttonsTarget.prepend(panelUIButton); panelUIButton.setAttribute("overflows", "false"); - buttonsTarget.parentElement.append(document.getElementById("nav-bar-overflow-button")); + buttonsTarget.parentElement.append( + document.getElementById("nav-bar-overflow-button") + ); if (this.isWindowsStyledButtons && !doNotChangeWindowButtons) { appContentNavbarContaienr.append(windowButtons); } @@ -1194,7 +1333,9 @@ window.gZenVerticalTabsManager = { '#zen-sidebar-top-buttons-customization-target > :is([cui-areatype="toolbar"], .chromeclass-toolbar-additional)' ); for (const button of elements) { - document.getElementById("nav-bar-customization-target").append(button); + document + .getElementById("nav-bar-customization-target") + .append(button); } this._topButtonsSeparatorElement.remove(); document.documentElement.removeAttribute("zen-single-toolbar"); @@ -1227,7 +1368,9 @@ window.gZenVerticalTabsManager = { topButtons.prepend(windowButtons); } - const canHideTabBarPref = Services.prefs.getBoolPref("zen.view.compact.hide-tabbar"); + const canHideTabBarPref = Services.prefs.getBoolPref( + "zen.view.compact.hide-tabbar" + ); const captionsShouldStayOnSidebar = !canHideTabBarPref && ((!this.isWindowsStyledButtons && !isRightSide) || @@ -1240,7 +1383,12 @@ window.gZenVerticalTabsManager = { } // Case: single toolbar, compact mode, right side and windows styled buttons - if (isSingleToolbar && isCompactMode && isRightSide && this.isWindowsStyledButtons) { + if ( + isSingleToolbar && + isCompactMode && + isRightSide && + this.isWindowsStyledButtons + ) { topButtons.prepend(windowButtons); } @@ -1286,9 +1434,15 @@ window.gZenVerticalTabsManager = { this._hasSetSingleToolbar && Services.prefs.getBoolPref("zen.view.overflow-webext-toolbar", true) ) { - topButtons.setAttribute("addon-webext-overflowtarget", "zen-overflow-extensions-list"); + topButtons.setAttribute( + "addon-webext-overflowtarget", + "zen-overflow-extensions-list" + ); } else { - topButtons.setAttribute("addon-webext-overflowtarget", "overflowed-extensions-list"); + topButtons.setAttribute( + "addon-webext-overflowtarget", + "overflowed-extensions-list" + ); } gZenCompactModeManager.updateCompactModeContext(isSingleToolbar); @@ -1321,11 +1475,15 @@ window.gZenVerticalTabsManager = { }, rebuildAreas() { - CustomizableUI.zenInternalCU._rebuildRegisteredAreas(/* zenDontRebuildCollapsed */ true); + CustomizableUI.zenInternalCU._rebuildRegisteredAreas( + /* zenDontRebuildCollapsed */ true + ); }, _updateMaxWidth() { - const maxWidth = Services.prefs.getIntPref("zen.view.sidebar-expanded.max-width"); + const maxWidth = Services.prefs.getIntPref( + "zen.view.sidebar-expanded.max-width" + ); const toolbox = gNavToolbox; if (!this._prefsCompactMode) { toolbox.style.maxWidth = `${maxWidth}px`; @@ -1398,7 +1556,9 @@ window.gZenVerticalTabsManager = { ); } - const editorContainer = this._tabEdited.querySelector(".tab-editor-container"); + const editorContainer = this._tabEdited.querySelector( + ".tab-editor-container" + ); if (editorContainer) { editorContainer.remove(); } @@ -1426,21 +1586,30 @@ window.gZenVerticalTabsManager = { ) { return; } - if (isTab && !target.closest(".tab-label-container") && event.type === "dblclick") { + if ( + isTab && + !target.closest(".tab-label-container") && + event.type === "dblclick" + ) { return; } this._tabEdited = target.closest(".tabbrowser-tab") || target.closest(".zen-current-workspace-indicator-name") || (event.explicit && target.closest(".tab-group-label")); - if (!this._tabEdited || (this._tabEdited.hasAttribute("zen-essential") && isTab)) { + if ( + !this._tabEdited || + (this._tabEdited.hasAttribute("zen-essential") && isTab) + ) { this._tabEdited = null; return; } gZenFolders.cancelPopupTimer(); event.stopPropagation?.(); document.documentElement.setAttribute("zen-renaming-tab", "true"); - const label = isTab ? this._tabEdited.querySelector(".tab-label-container") : this._tabEdited; + const label = isTab + ? this._tabEdited.querySelector(".tab-label-container") + : this._tabEdited; label.classList.add("tab-label-container-editing"); if (isTab) { @@ -1457,7 +1626,9 @@ window.gZenVerticalTabsManager = { input.addEventListener("keydown", this.renameTabKeydown.bind(this)); if (isTab) { - const containerHtml = this._tabEdited.querySelector(".tab-editor-container"); + const containerHtml = this._tabEdited.querySelector( + ".tab-editor-container" + ); containerHtml.appendChild(input); } else { this._tabEdited.after(input); @@ -1473,7 +1644,9 @@ window.gZenVerticalTabsManager = { return; } document.documentElement.removeAttribute("zen-renaming-tab"); - const editorContainer = this._tabEdited.querySelector(".tab-editor-container"); + const editorContainer = this._tabEdited.querySelector( + ".tab-editor-container" + ); let input = document.getElementById("tab-label-input"); input.remove(); if (editorContainer) { diff --git a/src/zen/common/modules/ZenUpdates.mjs b/src/zen/common/modules/ZenUpdates.mjs index 298f2a66a..867bbd53f 100644 --- a/src/zen/common/modules/ZenUpdates.mjs +++ b/src/zen/common/modules/ZenUpdates.mjs @@ -17,12 +17,17 @@ export default function checkForZenUpdates() { !gZenUIManager.testingEnabled && Services.prefs.getBoolPref(ZEN_UPDATE_SHOW, true) ) { - const updateUrl = Services.prefs.getStringPref("app.releaseNotesURL.prompt", ""); + const updateUrl = Services.prefs.getStringPref( + "app.releaseNotesURL.prompt", + "" + ); createSidebarNotification({ headingL10nId: "zen-sidebar-notification-updated-heading", links: [ { - url: Services.urlFormatter.formatURL(updateUrl.replace("%VERSION%", version)), + url: Services.urlFormatter.formatURL( + updateUrl.replace("%VERSION%", version) + ), l10nId: "zen-sidebar-notification-updated", special: true, icon: "chrome://browser/skin/zen-icons/heart-circle-fill.svg", diff --git a/src/zen/common/sys/ZenCustomizableUI.sys.mjs b/src/zen/common/sys/ZenCustomizableUI.sys.mjs index 4adc45706..7a48b7f5c 100644 --- a/src/zen/common/sys/ZenCustomizableUI.sys.mjs +++ b/src/zen/common/sys/ZenCustomizableUI.sys.mjs @@ -8,7 +8,11 @@ export const ZenCustomizableUI = new (class { constructor() {} TYPE_TOOLBAR = "toolbar"; - defaultSidebarIcons = ["downloads-button", "zen-workspaces-button", "zen-create-new-button"]; + defaultSidebarIcons = [ + "downloads-button", + "zen-workspaces-button", + "zen-create-new-button", + ]; startup(CustomizableUIInternal) { CustomizableUIInternal.registerArea( @@ -39,7 +43,8 @@ export const ZenCustomizableUI = new (class { } #addSidebarButtons(window) { - const kDefaultSidebarWidth = AppConstants.platform === "macosx" ? "230px" : "186px"; + const kDefaultSidebarWidth = + AppConstants.platform === "macosx" ? "230px" : "186px"; const toolbox = window.gNavToolbox; // Set a splitter to navigator-toolbox @@ -81,7 +86,7 @@ export const ZenCustomizableUI = new (class { `); toolbox.prepend(sidebarBox); - new window.MutationObserver((e) => { + new window.MutationObserver(e => { if (e[0].type !== "attributes" || e[0].attributeName !== "width") { return; } @@ -96,7 +101,7 @@ export const ZenCustomizableUI = new (class { toolbox.style.width = width; toolbox.setAttribute("width", width); - splitter.addEventListener("dblclick", (e) => { + splitter.addEventListener("dblclick", e => { if (e.button !== 0) { return; } @@ -104,7 +109,9 @@ export const ZenCustomizableUI = new (class { toolbox.setAttribute("width", kDefaultSidebarWidth); }); - const newTab = window.document.getElementById("vertical-tabs-newtab-button"); + const newTab = window.document.getElementById( + "vertical-tabs-newtab-button" + ); newTab.classList.add("zen-sidebar-action-button"); for (let id of this.defaultSidebarIcons) { @@ -124,7 +131,7 @@ export const ZenCustomizableUI = new (class { // If we use "mousedown" event for private windows (which open a new tab on "click"), we might end up with // the urlbar flicking and therefore we use "command" event to avoid that. let isPrivateMode = window.gZenWorkspaces.privateWindowOrDisabled; - button.addEventListener(isPrivateMode ? "command" : "mousedown", (event) => { + button.addEventListener(isPrivateMode ? "command" : "mousedown", event => { if (isPrivateMode) { window.document.getElementById("cmd_newNavigatorTab").doCommand(); return; @@ -146,7 +153,9 @@ export const ZenCustomizableUI = new (class { } #moveWindowButtons(window) { - const windowControls = window.document.getElementsByClassName("titlebar-buttonbox-container"); + const windowControls = window.document.getElementsByClassName( + "titlebar-buttonbox-container" + ); const toolboxIcons = window.document.getElementById( "zen-sidebar-top-buttons-customization-target" ); @@ -173,7 +182,9 @@ export const ZenCustomizableUI = new (class { wrapper.prepend(elem); } } - window.document.getElementById("stop-reload-button").removeAttribute("overflows"); + window.document + .getElementById("stop-reload-button") + .removeAttribute("overflows"); } _dispatchResizeEvent(window) { diff --git a/src/zen/common/sys/ZenUIMigration.sys.mjs b/src/zen/common/sys/ZenUIMigration.sys.mjs index 1c6cac68e..d025d97df 100644 --- a/src/zen/common/sys/ZenUIMigration.sys.mjs +++ b/src/zen/common/sys/ZenUIMigration.sys.mjs @@ -24,7 +24,9 @@ class nsZenUIMigration { } this.clearVariables(); if (this.shouldRestart) { - Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); + Services.startup.quit( + Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart + ); } } @@ -61,13 +63,24 @@ class nsZenUIMigration { userContentFile.append("userContent.css"); Services.prefs.setBoolPref( "zen.workspaces.separate-essentials", - Services.prefs.getBoolPref("zen.workspaces.container-specific-essentials-enabled", false) + Services.prefs.getBoolPref( + "zen.workspaces.container-specific-essentials-enabled", + false + ) + ); + const theme = Services.prefs.getIntPref( + "layout.css.prefers-color-scheme.content-override", + 0 ); - const theme = Services.prefs.getIntPref("layout.css.prefers-color-scheme.content-override", 0); Services.prefs.setIntPref("zen.view.window.scheme", theme); if (userChromeFile.exists() || userContentFile.exists()) { - Services.prefs.setBoolPref("toolkit.legacyUserProfileCustomizations.stylesheets", true); - console.warn("ZenUIMigration: User stylesheets detected, enabling legacy stylesheets."); + Services.prefs.setBoolPref( + "toolkit.legacyUserProfileCustomizations.stylesheets", + true + ); + console.warn( + "ZenUIMigration: User stylesheets detected, enabling legacy stylesheets." + ); this.shouldRestart = true; } } @@ -79,7 +92,11 @@ class nsZenUIMigration { } _migrateV3() { - if (Services.prefs.getStringPref("zen.theme.accent-color", "").startsWith("system")) { + if ( + Services.prefs + .getStringPref("zen.theme.accent-color", "") + .startsWith("system") + ) { Services.prefs.setStringPref("zen.theme.accent-color", "AccentColor"); } } @@ -100,20 +117,23 @@ class nsZenUIMigration { lazy.SessionStore.promiseAllWindowsRestored.then(() => { const win = Services.wm.getMostRecentWindow("navigator:browser"); win.setTimeout(async () => { - const [title, message, learnMore, accept] = await win.document.l10n.formatMessages([ - "zen-window-sync-migration-dialog-title", - "zen-window-sync-migration-dialog-message", - "zen-window-sync-migration-dialog-learn-more", - "zen-window-sync-migration-dialog-accept", - ]); + const [title, message, learnMore, accept] = + await win.document.l10n.formatMessages([ + "zen-window-sync-migration-dialog-title", + "zen-window-sync-migration-dialog-message", + "zen-window-sync-migration-dialog-learn-more", + "zen-window-sync-migration-dialog-accept", + ]); // buttonPressed will be 0 for cancel, 1 for "more info" let buttonPressed = Services.prompt.confirmEx( win, title.value, message.value, - Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + - Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_IS_STRING, + Services.prompt.BUTTON_POS_0 * + Services.prompt.BUTTON_TITLE_IS_STRING + + Services.prompt.BUTTON_POS_1 * + Services.prompt.BUTTON_TITLE_IS_STRING, learnMore.value, accept.value, null, @@ -122,7 +142,10 @@ class nsZenUIMigration { ); // User has clicked on "Learn More" if (buttonPressed === 0) { - win.openTrustedLinkIn("https://docs.zen-browser.app/user-manual/window-sync", "tab"); + win.openTrustedLinkIn( + "https://docs.zen-browser.app/user-manual/window-sync", + "tab" + ); } }, 1000); }); diff --git a/src/zen/common/zen-sets.js b/src/zen/common/zen-sets.js index bc87d6625..c2959fd16 100644 --- a/src/zen/common/zen-sets.js +++ b/src/zen/common/zen-sets.js @@ -6,146 +6,152 @@ document.addEventListener( "MozBeforeInitialXULLayout", () => { // defined in browser-sets.inc - // eslint-disable-next-line complexity - document.getElementById("zenCommandSet").addEventListener("command", (event) => { - switch (event.target.id) { - case "cmd_zenCompactModeToggle": - gZenCompactModeManager.toggle(); - break; - case "cmd_toggleCompactModeIgnoreHover": - gZenCompactModeManager.toggle(true); - break; - case "cmd_zenCompactModeShowSidebar": - gZenCompactModeManager.toggleSidebar(); - break; - case "cmd_zenWorkspaceForward": - gZenWorkspaces.changeWorkspaceShortcut(); - break; - case "cmd_zenWorkspaceBackward": - gZenWorkspaces.changeWorkspaceShortcut(-1); - break; - case "cmd_zenSplitViewGrid": - gZenViewSplitter.toggleShortcut("grid"); - break; - case "cmd_zenSplitViewVertical": - gZenViewSplitter.toggleShortcut("vsep"); - break; - case "cmd_zenSplitViewHorizontal": - gZenViewSplitter.toggleShortcut("hsep"); - break; - case "cmd_zenSplitViewUnsplit": - gZenViewSplitter.toggleShortcut("unsplit"); - break; - case "cmd_zenSplitViewContextMenu": - gZenViewSplitter.contextSplitTabs(); - break; - case "cmd_zenCopyCurrentURLMarkdown": - gZenCommonActions.copyCurrentURLAsMarkdownToClipboard(); - break; - case "cmd_zenCopyCurrentURL": - gZenCommonActions.copyCurrentURLToClipboard(); - break; - case "cmd_zenPinnedTabReset": - gZenPinnedTabManager.resetPinnedTab(gBrowser.selectedTab); - break; - case "cmd_zenPinnedTabResetNoTab": - gZenPinnedTabManager.resetPinnedTab(); - break; - case "cmd_zenToggleSidebar": - gZenVerticalTabsManager.toggleExpand(); - break; - case "cmd_zenOpenZenThemePicker": - gZenThemePicker.openThemePicker(event); - break; - case "cmd_zenChangeWorkspaceTab": - gZenWorkspaces.changeTabWorkspace( - event.sourceEvent.target.getAttribute("zen-workspace-id") - ); - break; - case "cmd_zenToggleTabsOnRight": - gZenVerticalTabsManager.toggleTabsOnRight(); - break; - case "cmd_zenSplitViewLinkInNewTab": - gZenViewSplitter.splitLinkInNewTab(); - break; - case "cmd_zenNewEmptySplit": - setTimeout(() => { - gZenViewSplitter.createEmptySplit(); - }, 0); - break; - case "cmd_zenReplacePinnedUrlWithCurrent": - gZenPinnedTabManager.replacePinnedUrlWithCurrent(); - break; - case "cmd_contextZenAddToEssentials": - gZenPinnedTabManager.addToEssentials(); - break; - case "cmd_contextZenRemoveFromEssentials": - gZenPinnedTabManager.removeEssentials(); - break; - case "cmd_zenCtxDeleteWorkspace": - gZenWorkspaces.contextDeleteWorkspace(event); - break; - case "cmd_zenChangeWorkspaceName": - gZenVerticalTabsManager.renameTabStart({ - target: gZenWorkspaces.activeWorkspaceIndicator.querySelector( - ".zen-current-workspace-indicator-name" - ), - }); - break; - case "cmd_zenChangeWorkspaceIcon": - gZenWorkspaces.changeWorkspaceIcon(); - break; - case "cmd_zenReorderWorkspaces": - gZenUIManager.showToast("zen-workspaces-how-to-reorder-title", { - timeout: 9000, - descriptionId: "zen-workspaces-how-to-reorder-desc", - }); - break; - case "cmd_zenOpenWorkspaceCreation": - gZenWorkspaces.openWorkspaceCreation(event); - break; - case "cmd_zenOpenFolderCreation": - gZenFolders.createFolder([], { - renameFolder: true, - }); - break; - case "cmd_zenTogglePinTab": { - const currentTab = gBrowser.selectedTab; - if (currentTab && !currentTab.hasAttribute("zen-empty-tab")) { - if (currentTab.pinned) { - gBrowser.unpinTab(currentTab); - } else { - gBrowser.pinTab(currentTab); + document + .getElementById("zenCommandSet") + // eslint-disable-next-line complexity + .addEventListener("command", event => { + switch (event.target.id) { + case "cmd_zenCompactModeToggle": + gZenCompactModeManager.toggle(); + break; + case "cmd_toggleCompactModeIgnoreHover": + gZenCompactModeManager.toggle(true); + break; + case "cmd_zenCompactModeShowSidebar": + gZenCompactModeManager.toggleSidebar(); + break; + case "cmd_zenWorkspaceForward": + gZenWorkspaces.changeWorkspaceShortcut(); + break; + case "cmd_zenWorkspaceBackward": + gZenWorkspaces.changeWorkspaceShortcut(-1); + break; + case "cmd_zenSplitViewGrid": + gZenViewSplitter.toggleShortcut("grid"); + break; + case "cmd_zenSplitViewVertical": + gZenViewSplitter.toggleShortcut("vsep"); + break; + case "cmd_zenSplitViewHorizontal": + gZenViewSplitter.toggleShortcut("hsep"); + break; + case "cmd_zenSplitViewUnsplit": + gZenViewSplitter.toggleShortcut("unsplit"); + break; + case "cmd_zenSplitViewContextMenu": + gZenViewSplitter.contextSplitTabs(); + break; + case "cmd_zenCopyCurrentURLMarkdown": + gZenCommonActions.copyCurrentURLAsMarkdownToClipboard(); + break; + case "cmd_zenCopyCurrentURL": + gZenCommonActions.copyCurrentURLToClipboard(); + break; + case "cmd_zenPinnedTabReset": + gZenPinnedTabManager.resetPinnedTab(gBrowser.selectedTab); + break; + case "cmd_zenPinnedTabResetNoTab": + gZenPinnedTabManager.resetPinnedTab(); + break; + case "cmd_zenToggleSidebar": + gZenVerticalTabsManager.toggleExpand(); + break; + case "cmd_zenOpenZenThemePicker": + gZenThemePicker.openThemePicker(event); + break; + case "cmd_zenChangeWorkspaceTab": + gZenWorkspaces.changeTabWorkspace( + event.sourceEvent.target.getAttribute("zen-workspace-id") + ); + break; + case "cmd_zenToggleTabsOnRight": + gZenVerticalTabsManager.toggleTabsOnRight(); + break; + case "cmd_zenSplitViewLinkInNewTab": + gZenViewSplitter.splitLinkInNewTab(); + break; + case "cmd_zenNewEmptySplit": + setTimeout(() => { + gZenViewSplitter.createEmptySplit(); + }, 0); + break; + case "cmd_zenReplacePinnedUrlWithCurrent": + gZenPinnedTabManager.replacePinnedUrlWithCurrent(); + break; + case "cmd_contextZenAddToEssentials": + gZenPinnedTabManager.addToEssentials(); + break; + case "cmd_contextZenRemoveFromEssentials": + gZenPinnedTabManager.removeEssentials(); + break; + case "cmd_zenCtxDeleteWorkspace": + gZenWorkspaces.contextDeleteWorkspace(event); + break; + case "cmd_zenChangeWorkspaceName": + gZenVerticalTabsManager.renameTabStart({ + target: gZenWorkspaces.activeWorkspaceIndicator.querySelector( + ".zen-current-workspace-indicator-name" + ), + }); + break; + case "cmd_zenChangeWorkspaceIcon": + gZenWorkspaces.changeWorkspaceIcon(); + break; + case "cmd_zenReorderWorkspaces": + gZenUIManager.showToast("zen-workspaces-how-to-reorder-title", { + timeout: 9000, + descriptionId: "zen-workspaces-how-to-reorder-desc", + }); + break; + case "cmd_zenOpenWorkspaceCreation": + gZenWorkspaces.openWorkspaceCreation(event); + break; + case "cmd_zenOpenFolderCreation": + gZenFolders.createFolder([], { + renameFolder: true, + }); + break; + case "cmd_zenTogglePinTab": { + const currentTab = gBrowser.selectedTab; + if (currentTab && !currentTab.hasAttribute("zen-empty-tab")) { + if (currentTab.pinned) { + gBrowser.unpinTab(currentTab); + } else { + gBrowser.pinTab(currentTab); + } } + break; } - break; - } - case "cmd_zenCloseUnpinnedTabs": - gZenWorkspaces.closeAllUnpinnedTabs(); - break; - case "cmd_zenUnloadWorkspace": { - gZenWorkspaces.unloadWorkspace(); - break; - } - case "cmd_zenNewNavigatorUnsynced": - OpenBrowserWindow({ zenSyncedWindow: false }); - break; - case "cmd_zenNewLiveFolder": { - const { ZenLiveFoldersManager } = ChromeUtils.importESModule( - "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs" - ); - ZenLiveFoldersManager.handleEvent(event); - break; - } - default: - gZenGlanceManager.handleMainCommandSet(event); - if (event.target.id.startsWith("cmd_zenWorkspaceSwitch")) { - const index = parseInt(event.target.id.replace("cmd_zenWorkspaceSwitch", ""), 10) - 1; - gZenWorkspaces.shortcutSwitchTo(index); + case "cmd_zenCloseUnpinnedTabs": + gZenWorkspaces.closeAllUnpinnedTabs(); + break; + case "cmd_zenUnloadWorkspace": { + gZenWorkspaces.unloadWorkspace(); + break; } - break; - } - }); + case "cmd_zenNewNavigatorUnsynced": + OpenBrowserWindow({ zenSyncedWindow: false }); + break; + case "cmd_zenNewLiveFolder": { + const { ZenLiveFoldersManager } = ChromeUtils.importESModule( + "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs" + ); + ZenLiveFoldersManager.handleEvent(event); + break; + } + default: + gZenGlanceManager.handleMainCommandSet(event); + if (event.target.id.startsWith("cmd_zenWorkspaceSwitch")) { + const index = + parseInt( + event.target.id.replace("cmd_zenWorkspaceSwitch", ""), + 10 + ) - 1; + gZenWorkspaces.shortcutSwitchTo(index); + } + break; + } + }); }, { once: true } ); diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js index 7cc3eeff3..40845b827 100644 --- a/src/zen/common/zenThemeModifier.js +++ b/src/zen/common/zenThemeModifier.js @@ -38,7 +38,8 @@ * begin listening to changes in preferred color scheme. */ init() { - this._inMainBrowserWindow = window.location.href == "chrome://browser/content/browser.xhtml"; + this._inMainBrowserWindow = + window.location.href == "chrome://browser/content/browser.xhtml"; this.listenForEvents(); this.updateAllThemeBasics(); }, @@ -91,14 +92,23 @@ }, updateBorderRadius() { - const borderRadius = Services.prefs.getIntPref("zen.theme.border-radius", -1); + const borderRadius = Services.prefs.getIntPref( + "zen.theme.border-radius", + -1 + ); // -1 is the default value, will use platform-native values // otherwise, use the custom value if (borderRadius == -1) { if (AppConstants.platform == "macosx") { - const targetRadius = window.matchMedia("(-moz-mac-tahoe-theme)").matches ? 16 : 10; - document.documentElement.style.setProperty("--zen-border-radius", targetRadius + "px"); + const targetRadius = window.matchMedia("(-moz-mac-tahoe-theme)") + .matches + ? 16 + : 10; + document.documentElement.style.setProperty( + "--zen-border-radius", + targetRadius + "px" + ); } else if (AppConstants.platform == "linux") { // Linux uses GTK CSD titlebar radius, default to 8px document.documentElement.style.setProperty( @@ -107,11 +117,17 @@ ); } else { // Windows defaults to 8px - document.documentElement.style.setProperty("--zen-border-radius", "8px"); + document.documentElement.style.setProperty( + "--zen-border-radius", + "8px" + ); } } else { // Use the overridden value - document.documentElement.style.setProperty("--zen-border-radius", borderRadius + "px"); + document.documentElement.style.setProperty( + "--zen-border-radius", + borderRadius + "px" + ); } }, @@ -121,14 +137,19 @@ if ( document.documentElement.hasAttribute("inFullscreen") && window.gZenCompactModeManager?.preference && - !document.getElementById("tabbrowser-tabbox")?.hasAttribute("zen-split-view") && + !document + .getElementById("tabbrowser-tabbox") + ?.hasAttribute("zen-split-view") && Services.prefs.getBoolPref("zen.view.borderless-fullscreen", true) ) { separation = 0; } // In order to still use it on fullscreen, even if it's 0px, add .1px (almost invisible) separation = Math.max(kMinElementSeparation, separation); - document.documentElement.style.setProperty("--zen-element-separation", separation + "px"); + document.documentElement.style.setProperty( + "--zen-element-separation", + separation + "px" + ); if (separation == kMinElementSeparation) { document.documentElement.setAttribute("zen-no-padding", true); } else { @@ -147,8 +168,13 @@ * Update the accent color. */ updateAccentColor() { - const accentColor = Services.prefs.getStringPref("zen.theme.accent-color"); - document.documentElement.style.setProperty("--zen-primary-color", accentColor); + const accentColor = Services.prefs.getStringPref( + "zen.theme.accent-color" + ); + document.documentElement.style.setProperty( + "--zen-primary-color", + accentColor + ); }, }; diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index 4f22e74cd..3e5dfb0db 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -44,14 +44,20 @@ window.gZenCompactModeManager = { _removeHoverFrames: {}, // Delay to avoid flickering when hovering over the sidebar - HOVER_HACK_DELAY: Services.prefs.getIntPref("zen.view.compact.hover-hack-delay", 0), + HOVER_HACK_DELAY: Services.prefs.getIntPref( + "zen.view.compact.hover-hack-delay", + 0 + ), preInit() { this._wasInCompactMode = Services.prefs.getBoolPref( "zen.view.compact.enable-at-startup", false ); - this._canDebugLog = Services.prefs.getBoolPref("zen.view.compact.debug", false); + this._canDebugLog = Services.prefs.getBoolPref( + "zen.view.compact.debug", + false + ); this.addContextMenu(); }, @@ -60,12 +66,18 @@ window.gZenCompactModeManager = { this.addMouseActions(); const tabIsRightObserver = this._updateSidebarIsOnRight.bind(this); - Services.prefs.addObserver("zen.tabs.vertical.right-side", tabIsRightObserver); + Services.prefs.addObserver( + "zen.tabs.vertical.right-side", + tabIsRightObserver + ); window.addEventListener( "unload", () => { - Services.prefs.removeObserver("zen.tabs.vertical.right-side", tabIsRightObserver); + Services.prefs.removeObserver( + "zen.tabs.vertical.right-side", + tabIsRightObserver + ); }, { once: true } ); @@ -78,7 +90,9 @@ window.gZenCompactModeManager = { this.addHasPolyfillObserver(); // Clear hover states when window state changes (minimize, maximize, etc.) - window.addEventListener("sizemodechange", () => this._clearAllHoverStates()); + window.addEventListener("sizemodechange", () => + this._clearAllHoverStates() + ); this._canShowBackgroundTabToast = Services.prefs.getBoolPref( "zen.view.compact.show-background-tab-toast", @@ -86,7 +100,7 @@ window.gZenCompactModeManager = { ); if (AppConstants.platform == "macosx") { - window.addEventListener("mouseover", (event) => { + window.addEventListener("mouseover", event => { const buttons = gZenVerticalTabsManager.actualWindowButtons; if (event.target.closest(".titlebar-buttonbox-container") === buttons) { return; @@ -112,7 +126,9 @@ window.gZenCompactModeManager = { }, get shouldBeCompact() { - return !document.documentElement.getAttribute("chromehidden")?.includes("toolbar"); + return !document.documentElement + .getAttribute("chromehidden") + ?.includes("toolbar"); }, set preference(value) { @@ -147,7 +163,9 @@ window.gZenCompactModeManager = { if (typeof this._sidebarIsOnRight !== "undefined") { return this._sidebarIsOnRight; } - this._sidebarIsOnRight = Services.prefs.getBoolPref("zen.tabs.vertical.right-side"); + this._sidebarIsOnRight = Services.prefs.getBoolPref( + "zen.tabs.vertical.right-side" + ); return this._sidebarIsOnRight; }, @@ -156,7 +174,12 @@ window.gZenCompactModeManager = { }, addHasPolyfillObserver() { - const attributes = ["panelopen", "open", "breakout-extend", "zen-floating-urlbar"]; + const attributes = [ + "panelopen", + "open", + "breakout-extend", + "zen-floating-urlbar", + ]; this.sidebarObserverId = ZenHasPolyfill.observeSelectorExistence( this.sidebar, [ @@ -230,7 +253,9 @@ window.gZenCompactModeManager = { updateCompactModeContext(isSingleToolbar) { const isIllegalState = this.checkIfIllegalState(); - const menuitem = document.getElementById("zen-context-menu-compact-mode-toggle"); + const menuitem = document.getElementById( + "zen-context-menu-compact-mode-toggle" + ); const menu = document.getElementById("zen-context-menu-compact-mode"); if (!menu) { return; @@ -292,7 +317,8 @@ window.gZenCompactModeManager = { // on macos: collapsed + left side + only toolbar // on windows: collapsed + right side + only toolbar const closelyIllegalState = - (isLeftSideButtons && !isRightSidebar) || (!isLeftSideButtons && isRightSidebar); + (isLeftSideButtons && !isRightSidebar) || + (!isLeftSideButtons && isRightSidebar); if (closelyIllegalState && canHideToolbar && !canHideSidebar) { // This state is illegal Services.prefs.setBoolPref("zen.view.compact.hide-tabbar", true); @@ -304,7 +330,7 @@ window.gZenCompactModeManager = { }, callAllEventListeners() { - this._eventListeners.forEach((callback) => callback()); + this._eventListeners.forEach(callback => callback()); }, addEventListener(callback) { @@ -338,7 +364,9 @@ window.gZenCompactModeManager = { } else { ZenHasPolyfill.disconnectObserver(this.sidebarObserverId); } - window.dispatchEvent(new CustomEvent("ZenCompactMode:Toggled", { detail: this.preference })); + window.dispatchEvent( + new CustomEvent("ZenCompactMode:Toggled", { detail: this.preference }) + ); }, // NOTE: Dont actually use event, it's just so we make sure @@ -350,14 +378,20 @@ window.gZenCompactModeManager = { } let sidebarWidth = this.sidebar.getBoundingClientRect().width; const shouldRecalculate = - this.preference || document.documentElement.hasAttribute("zen-creating-workspace"); - const sidebarExpanded = document.documentElement.hasAttribute("zen-sidebar-expanded"); + this.preference || + document.documentElement.hasAttribute("zen-creating-workspace"); + const sidebarExpanded = document.documentElement.hasAttribute( + "zen-sidebar-expanded" + ); if (sidebarWidth > 1) { if (shouldRecalculate && sidebarExpanded) { sidebarWidth = Math.max(sidebarWidth, 150); } // Second variable to get the genuine width of the sidebar - this.sidebar.style.setProperty("--actual-zen-sidebar-width", `${sidebarWidth}px`); + this.sidebar.style.setProperty( + "--actual-zen-sidebar-width", + `${sidebarWidth}px` + ); window.dispatchEvent(new window.Event("resize")); // To recalculate the layout if ( event && @@ -368,7 +402,10 @@ window.gZenCompactModeManager = { return; } delete gZenVerticalTabsManager._hadSidebarCollapse; - this.sidebar.style.setProperty("--zen-sidebar-width", `${sidebarWidth}px`); + this.sidebar.style.setProperty( + "--zen-sidebar-width", + `${sidebarWidth}px` + ); } return sidebarWidth; }, @@ -390,14 +427,16 @@ window.gZenCompactModeManager = { animateCompactMode() { // Get the splitter width before hiding it (we need to hide it before animating on right) document.documentElement.setAttribute("zen-compact-animating", "true"); - return new Promise((resolve) => { + return new Promise(resolve => { // We need to set the splitter width before hiding it let splitterWidth = document .getElementById("zen-sidebar-splitter") .getBoundingClientRect().width; const isCompactMode = this.preference; const canHideSidebar = this.canHideSidebar; - let canAnimate = lazy.COMPACT_MODE_CAN_ANIMATE_SIDEBAR && !this.isSidebarPotentiallyOpen(); + let canAnimate = + lazy.COMPACT_MODE_CAN_ANIMATE_SIDEBAR && + !this.isSidebarPotentiallyOpen(); if (typeof this._wasInCompactMode !== "undefined") { canAnimate = false; delete this._wasInCompactMode; @@ -443,8 +482,14 @@ window.gZenCompactModeManager = { .animate( this.sidebar, { - marginRight: [0, this.sidebarIsOnRight ? `-${sidebarWidth}px` : 0], - marginLeft: [0, this.sidebarIsOnRight ? 0 : `-${sidebarWidth}px`], + marginRight: [ + 0, + this.sidebarIsOnRight ? `-${sidebarWidth}px` : 0, + ], + marginLeft: [ + 0, + this.sidebarIsOnRight ? 0 : `-${sidebarWidth}px`, + ], }, { ease: "easeIn", @@ -511,7 +556,9 @@ window.gZenCompactModeManager = { ) .then(() => { this.sidebar.removeAttribute("animate"); - document.getElementById("browser").style.removeProperty("overflow"); + document + .getElementById("browser") + .style.removeProperty("overflow"); this.sidebar.style.transition = "none"; this.sidebar.style.removeProperty("margin-right"); this.sidebar.style.removeProperty("margin-left"); @@ -533,7 +580,9 @@ window.gZenCompactModeManager = { }, updateContextMenu() { - const toggle = document.getElementById("zen-context-menu-compact-mode-toggle"); + const toggle = document.getElementById( + "zen-context-menu-compact-mode-toggle" + ); if (!toggle) { return; } @@ -569,7 +618,9 @@ window.gZenCompactModeManager = { }, _updateSidebarIsOnRight() { - this._sidebarIsOnRight = Services.prefs.getBoolPref("zen.tabs.vertical.right-side"); + this._sidebarIsOnRight = Services.prefs.getBoolPref( + "zen.tabs.vertical.right-side" + ); }, toggleSidebar() { @@ -580,7 +631,9 @@ window.gZenCompactModeManager = { if (this._hideAfterHoverDuration) { return this._hideAfterHoverDuration; } - return Services.prefs.getIntPref("zen.view.compact.toolbar-hide-after-hover.duration"); + return Services.prefs.getIntPref( + "zen.view.compact.toolbar-hide-after-hover.duration" + ); }, get hoverableElements() { @@ -613,7 +666,9 @@ window.gZenCompactModeManager = { if (this._flashTimeouts[id]) { clearTimeout(this._flashTimeouts[id]); } else { - requestAnimationFrame(() => this._setElementExpandAttribute(element, true, attrName)); + requestAnimationFrame(() => + this._setElementExpandAttribute(element, true, attrName) + ); } this._flashTimeouts[id] = setTimeout(() => { window.requestAnimationFrame(() => { @@ -629,11 +684,18 @@ window.gZenCompactModeManager = { }, _setElementExpandAttribute(element, value, attr = "zen-has-hover") { - const kVerifiedAttributes = ["zen-has-hover", "has-popup-menu", "zen-compact-mode-active"]; + const kVerifiedAttributes = [ + "zen-has-hover", + "has-popup-menu", + "zen-compact-mode-active", + ]; const isToolbar = element.id === "zen-appcontent-navbar-wrapper"; this.log("Setting", attr, "to", value, "on element", element?.id); if (value) { - if (attr === "zen-has-hover" && element !== gZenVerticalTabsManager.actualWindowButtons) { + if ( + attr === "zen-has-hover" && + element !== gZenVerticalTabsManager.actualWindowButtons + ) { element.setAttribute("zen-has-implicit-hover", "true"); if (!lazy.COMPACT_MODE_SHOW_SIDEBAR_AND_TOOLBAR_ON_HOVER) { return; @@ -659,7 +721,9 @@ window.gZenCompactModeManager = { // Only remove if none of the verified attributes are present if ( isToolbar && - !kVerifiedAttributes.some((verifiedAttr) => element.hasAttribute(verifiedAttr)) + !kVerifiedAttributes.some(verifiedAttr => + element.hasAttribute(verifiedAttr) + ) ) { gBrowser.tabpanels.removeAttribute("has-toolbar-hovered"); } @@ -667,11 +731,14 @@ window.gZenCompactModeManager = { }, addMouseActions() { - gURLBar.addEventListener("mouseenter", (event) => { + gURLBar.addEventListener("mouseenter", event => { this.log("Mouse entered URL bar:", event.target); if (event.target.closest("#urlbar[zen-floating-urlbar]")) { window.requestAnimationFrame(() => { - this._setElementExpandAttribute(gZenVerticalTabsManager.actualWindowButtons, false); + this._setElementExpandAttribute( + gZenVerticalTabsManager.actualWindowButtons, + false + ); }); this._hasHoveredUrlbar = true; } @@ -685,7 +752,7 @@ window.gZenCompactModeManager = { this._setElementExpandAttribute(target, true); } - const onEnter = (event) => { + const onEnter = event => { setTimeout(() => { if (event.type === "mouseenter" && !event.target.matches(":hover")) { return; @@ -697,7 +764,9 @@ window.gZenCompactModeManager = { this.clearFlashTimeout("has-hover" + target.id); window.requestAnimationFrame(() => { if ( - document.documentElement.getAttribute("supress-primary-adjustment") === "true" || + document.documentElement.getAttribute( + "supress-primary-adjustment" + ) === "true" || this._hasHoveredUrlbar || this._ignoreNextHover || target.hasAttribute("zen-has-hover") @@ -709,9 +778,10 @@ window.gZenCompactModeManager = { }, this.HOVER_HACK_DELAY); }; - const onLeave = (event) => { + const onLeave = event => { if (AppConstants.platform == "macosx") { - const buttonRect = gZenVerticalTabsManager.actualWindowButtons.getBoundingClientRect(); + const buttonRect = + gZenVerticalTabsManager.actualWindowButtons.getBoundingClientRect(); const MAC_WINDOW_BUTTONS_X_BORDER = buttonRect.width + buttonRect.x; const MAC_WINDOW_BUTTONS_Y_BORDER = buttonRect.height + buttonRect.y; if ( @@ -734,8 +804,12 @@ window.gZenCompactModeManager = { } if ( - event.explicitOriginalTarget?.closest?.("#urlbar[zen-floating-urlbar]") || - (document.documentElement.getAttribute("supress-primary-adjustment") === "true" && + event.explicitOriginalTarget?.closest?.( + "#urlbar[zen-floating-urlbar]" + ) || + (document.documentElement.getAttribute( + "supress-primary-adjustment" + ) === "true" && gZenVerticalTabsManager._hasSetSingleToolbar) || this._hasHoveredUrlbar || this._ignoreNextHover || @@ -758,8 +832,8 @@ window.gZenCompactModeManager = { "zen-has-hover" ); } else { - this._removeHoverFrames[target.id] = window.requestAnimationFrame(() => - this._setElementExpandAttribute(target, false) + this._removeHoverFrames[target.id] = window.requestAnimationFrame( + () => this._setElementExpandAttribute(target, false) ); } }, this.HOVER_HACK_DELAY); @@ -772,9 +846,12 @@ window.gZenCompactModeManager = { target.addEventListener("dragleave", onLeave); } - document.documentElement.addEventListener("mouseleave", (event) => { + document.documentElement.addEventListener("mouseleave", event => { setTimeout(() => { - const screenEdgeCrossed = this._getCrossedEdge(event.pageX, event.pageY); + const screenEdgeCrossed = this._getCrossedEdge( + event.pageX, + event.pageY + ); if (!screenEdgeCrossed) { return; } @@ -783,8 +860,19 @@ window.gZenCompactModeManager = { continue; } const target = entry.element; - const boundAxis = entry.screenEdge === "right" || entry.screenEdge === "left" ? "y" : "x"; - if (!this._positionInBounds(boundAxis, target, event.pageX, event.pageY, 7)) { + const boundAxis = + entry.screenEdge === "right" || entry.screenEdge === "left" + ? "y" + : "x"; + if ( + !this._positionInBounds( + boundAxis, + target, + event.pageX, + event.pageY, + 7 + ) + ) { continue; } window.cancelAnimationFrame(this._removeHoverFrames[target.id]); @@ -821,7 +909,12 @@ window.gZenCompactModeManager = { }); }, - _getCrossedEdge(posX, posY, element = document.documentElement, maxDistance = 10) { + _getCrossedEdge( + posX, + posY, + element = document.documentElement, + maxDistance = 10 + ) { const targetBox = element.getBoundingClientRect(); posX = Math.max(targetBox.left, Math.min(posX, targetBox.right)); posY = Math.max(targetBox.top, Math.min(posY, targetBox.bottom)); @@ -843,7 +936,11 @@ window.gZenCompactModeManager = { // Clear hover attributes from all hoverable elements for (let entry of this.hoverableElements) { const target = entry.element; - if (target && !target.matches(":hover") && target.hasAttribute("zen-has-hover")) { + if ( + target && + !target.matches(":hover") && + target.hasAttribute("zen-has-hover") + ) { this._setElementExpandAttribute(target, false); this.clearFlashTimeout("has-hover" + target.id); } diff --git a/src/zen/downloads/ZenDownloadAnimation.mjs b/src/zen/downloads/ZenDownloadAnimation.mjs index 84c36a052..8ef63f2bf 100644 --- a/src/zen/downloads/ZenDownloadAnimation.mjs +++ b/src/zen/downloads/ZenDownloadAnimation.mjs @@ -86,7 +86,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { ); this.shadowRoot.appendChild(link); } catch (error) { - console.error(`[${nsZenDownloadAnimationElement.name}] Error loading arc styles: ${error}`); + console.error( + `[${nsZenDownloadAnimationElement.name}] Error loading arc styles: ${error}` + ); } } @@ -99,7 +101,8 @@ class nsZenDownloadAnimationElement extends HTMLElement { } // Determine animation target position - const { endPosition, isDownloadButtonVisible } = this.#determineEndPosition(); + const { endPosition, isDownloadButtonVisible } = + this.#determineEndPosition(); const areTabsPositionedRight = this.#areTabsOnRightSide(); // Create and prepare the arc animation element @@ -131,7 +134,10 @@ class nsZenDownloadAnimationElement extends HTMLElement { } #areTabsOnRightSide() { - const position = Services.prefs.getIntPref("zen.downloads.icon-popup-position", 0); + const position = Services.prefs.getIntPref( + "zen.downloads.icon-popup-position", + 0 + ); if (position === 1) { return false; } @@ -143,7 +149,8 @@ class nsZenDownloadAnimationElement extends HTMLElement { #determineEndPosition() { const downloadsButton = document.getElementById("downloads-button"); - const isDownloadButtonVisible = downloadsButton && this.#isElementVisible(downloadsButton); + const isDownloadButtonVisible = + downloadsButton && this.#isElementVisible(downloadsButton); let endPosition = { clientX: 0, clientY: 0 }; @@ -161,7 +168,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { const wrapperRect = wrapper.getBoundingClientRect(); endPosition = { - clientX: areTabsPositionedRight ? wrapperRect.right - 42 : wrapperRect.left + 42, + clientX: areTabsPositionedRight + ? wrapperRect.right - 42 + : wrapperRect.left + 42, clientY: wrapperRect.bottom - 40, }; } @@ -179,7 +188,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { `; const fragment = window.MozXULElement.parseXULToFragment(arcAnimationHTML); - const animationElement = fragment.querySelector(".zen-download-arc-animation"); + const animationElement = fragment.querySelector( + ".zen-download-arc-animation" + ); Object.assign(animationElement.style, { left: `${startPosition.clientX}px`, @@ -194,7 +205,10 @@ class nsZenDownloadAnimationElement extends HTMLElement { #calculateOptimalArc(startPosition, endPosition, distance) { // Calculate available space for the arc - const availableTopSpace = Math.min(startPosition.clientY, endPosition.clientY); + const availableTopSpace = Math.min( + startPosition.clientY, + endPosition.clientY + ); const viewportHeight = window.innerHeight; const availableBottomSpace = viewportHeight - Math.max(startPosition.clientY, endPosition.clientY); @@ -203,7 +217,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { const shouldArcDownward = availableBottomSpace > availableTopSpace; // Use the space in the direction we're arcing - const availableSpace = shouldArcDownward ? availableBottomSpace : availableTopSpace; + const availableSpace = shouldArcDownward + ? availableBottomSpace + : availableTopSpace; // Limit arc height to a percentage of the available space const arcHeight = Math.min( @@ -233,19 +249,30 @@ class nsZenDownloadAnimationElement extends HTMLElement { } await gZenUIManager.motion.animate(arcAnimationElement, sequence, { - duration: Services.prefs.getIntPref("zen.downloads.download-animation-duration") / 1000, + duration: + Services.prefs.getIntPref( + "zen.downloads.download-animation-duration" + ) / 1000, easing: "cubic-bezier(0.37, 0, 0.63, 1)", fill: "forwards", }); this.#cleanArcAnimation(arcAnimationElement); } catch (error) { - console.error("[nsZenDownloadAnimationElement] Error in animation sequence:", error); + console.error( + "[nsZenDownloadAnimationElement] Error in animation sequence:", + error + ); this.#cleanArcAnimation(arcAnimationElement); } } - #createArcAnimationSequence(distanceX, distanceY, arcHeight, shouldArcDownward) { + #createArcAnimationSequence( + distanceX, + distanceY, + arcHeight, + shouldArcDownward + ) { const sequence = { offset: [], opacity: [], transform: [] }; const arcDirection = shouldArcDownward ? 1 : -1; @@ -284,7 +311,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { // Position on arc const x = distanceX * eased; - const y = distanceY * eased + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2); + const y = + distanceY * eased + + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2); // Calculate rotation to point in the direction of movement let rotation = previousRotation; @@ -293,10 +322,12 @@ class nsZenDownloadAnimationElement extends HTMLElement { const prevX = distanceX * prevEased; const prevAdjustedProgress = prevEased * 2 - 1; - const prevVerticalOffset = arcDirection * arcHeight * (1 - prevAdjustedProgress * 2); + const prevVerticalOffset = + arcDirection * arcHeight * (1 - prevAdjustedProgress * 2); const prevY = distanceY * prevEased + prevVerticalOffset; - const targetRotation = Math.atan2(y - prevY, x - prevX) * (180 / Math.PI); + const targetRotation = + Math.atan2(y - prevY, x - prevX) * (180 / Math.PI); rotation += (targetRotation - previousRotation) * 0.01; previousRotation = rotation; @@ -353,8 +384,11 @@ class nsZenDownloadAnimationElement extends HTMLElement { const sideProp = areTabsPositionedRight ? "right" : "left"; - const fragment = window.MozXULElement.parseXULToFragment(boxAnimationHTML); - this.#boxAnimationElement = fragment.querySelector(".zen-download-box-animation"); + const fragment = + window.MozXULElement.parseXULToFragment(boxAnimationHTML); + this.#boxAnimationElement = fragment.querySelector( + ".zen-download-box-animation" + ); Object.assign(this.#boxAnimationElement.style, { bottom: "24px", @@ -405,7 +439,10 @@ class nsZenDownloadAnimationElement extends HTMLElement { } #getBoxAnimationDurationMs() { - return Services.prefs.getIntPref("zen.downloads.download-animation-duration") + 200; + return ( + Services.prefs.getIntPref("zen.downloads.download-animation-duration") + + 200 + ); } async #finishBoxAnimation(areTabsPositionedRight) { diff --git a/src/zen/drag-and-drop/ZenDragAndDrop.js b/src/zen/drag-and-drop/ZenDragAndDrop.js index 9cc6f9f91..7534706b9 100644 --- a/src/zen/drag-and-drop/ZenDragAndDrop.js +++ b/src/zen/drag-and-drop/ZenDragAndDrop.js @@ -8,9 +8,10 @@ // Wrap in a block to prevent leaking to window scope. { - const isTab = (element) => gBrowser.isTab(element); - const isTabGroupLabel = (element) => gBrowser.isTabGroupLabel(element); - const isEssentialsPromo = (element) => element?.tagName.toUpperCase() == "ZEN-ESSENTIALS-PROMO"; + const isTab = element => gBrowser.isTab(element); + const isTabGroupLabel = element => gBrowser.isTabGroupLabel(element); + const isEssentialsPromo = element => + element?.tagName.toUpperCase() == "ZEN-ESSENTIALS-PROMO"; /** * The elements in the tab strip from `this.ariaFocusableItems` that contain @@ -34,7 +35,7 @@ * @param {MozTabbrowserTab|typeof MozTabbrowserTabGroup.labelElement} element * @returns {MozTabbrowserTab|vbox} */ - const elementToMove = (element) => { + const elementToMove = element => { if ( !element || element.closest(".zen-current-workspace-indicator") || @@ -118,9 +119,13 @@ init() { super.init(); this.handle_windowDragEnter = this.handle_windowDragEnter.bind(this); - window.addEventListener("dragleave", this.handle_windowDragLeave.bind(this), { - capture: true, - }); + window.addEventListener( + "dragleave", + this.handle_windowDragLeave.bind(this), + { + capture: true, + } + ); } startTabDrag(event, tab, ...args) { @@ -133,7 +138,11 @@ tab = tab.group; } const draggingTabs = tab.multiselected ? gBrowser.selectedTabs : [tab]; - const { offsetX, offsetY } = this.#getDragImageOffset(event, tab, draggingTabs); + const { offsetX, offsetY } = this.#getDragImageOffset( + event, + tab, + draggingTabs + ); const dragImage = this.#createDragImageForTabs(draggingTabs); this.originalDragImageArgs = [dragImage, offsetX, offsetY]; dt.setDragImage(...this.originalDragImageArgs); @@ -146,7 +155,9 @@ const periphery = gZenWorkspaces.activeWorkspaceElement.querySelector( "#tabbrowser-arrowscrollbox-periphery" ); - const tabRect = window.windowUtils.getBoundsWithoutFlushing(movingTabs[0]); + const tabRect = window.windowUtils.getBoundsWithoutFlushing( + movingTabs[0] + ); const wrapper = document.createElement("div"); let movingTabsCount = Math.min(movingTabs.length, 3); wrapper.style.width = tabRect.width + "px"; @@ -160,7 +171,8 @@ if (tab.hasAttribute("zen-essential")) { const rect = tab.getBoundingClientRect(); tabClone.style.minWidth = tabClone.style.maxWidth = `${rect.width}px`; - tabClone.style.minHeight = tabClone.style.maxHeight = `${rect.height}px`; + tabClone.style.minHeight = + tabClone.style.maxHeight = `${rect.height}px`; if (tabClone.hasAttribute("visuallyselected")) { tabClone.style.transform = "translate(-50%, -50%)"; } @@ -181,9 +193,16 @@ if (isTab(tabClone)) { // We need to limit the label content so the drag image doesn't grow too big. const label = tabClone.textLabel; - const tabLabelParentWidth = label.parentElement.getBoundingClientRect().width; - label.textContent = label.textContent.slice(0, Math.floor(tabLabelParentWidth / 6)); - } else if (gBrowser.isTabGroup(tabClone) && tabClone.hasAttribute("split-view-group")) { + const tabLabelParentWidth = + label.parentElement.getBoundingClientRect().width; + label.textContent = label.textContent.slice( + 0, + Math.floor(tabLabelParentWidth / 6) + ); + } else if ( + gBrowser.isTabGroup(tabClone) && + tabClone.hasAttribute("split-view-group") + ) { let tabs = tab.tabs; for (let j = 0; j < tabs.length; j++) { const tabInGroup = tabs[j]; @@ -220,7 +239,10 @@ // eslint-disable-next-line complexity _animateTabMove(event) { let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0); - if (event.target.closest("#zen-essentials") && !isEssentialsPromo(event.target)) { + if ( + event.target.closest("#zen-essentials") && + !isEssentialsPromo(event.target) + ) { if (!isTab(draggedTab)) { this.clearDragOverVisuals(); return; @@ -242,7 +264,9 @@ tabs = [...movingTabs]; } - let screen = this._tabbrowserTabs.verticalMode ? event.screenY : event.screenX; + let screen = this._tabbrowserTabs.verticalMode + ? event.screenY + : event.screenX; if (screen == dragData.animLastScreenPos) { return; } @@ -255,9 +279,11 @@ tabs.reverse(); } - let bounds = (ele) => window.windowUtils.getBoundsWithoutFlushing(ele); + let bounds = ele => window.windowUtils.getBoundsWithoutFlushing(ele); let logicalForward = screenForward != this._rtlMode; - let screenAxis = this._tabbrowserTabs.verticalMode ? "screenY" : "screenX"; + let screenAxis = this._tabbrowserTabs.verticalMode + ? "screenY" + : "screenX"; let size = this._tabbrowserTabs.verticalMode ? "height" : "width"; let { width: tabWidth, height: tabHeight } = bounds(draggedTab); let tabSize = this._tabbrowserTabs.verticalMode ? tabHeight : tabWidth; @@ -275,7 +301,7 @@ ); let lastMovingTab = movingTabs.at(-1); let firstMovingTab = movingTabs[0]; - let endEdge = (ele) => ele[screenAxis] + bounds(ele)[size]; + let endEdge = ele => ele[screenAxis] + bounds(ele)[size]; let lastMovingTabScreen = endEdge(lastMovingTab); let firstMovingTabScreen = firstMovingTab[screenAxis]; let shiftSize = lastMovingTabScreen - firstMovingTabScreen; @@ -298,7 +324,8 @@ // Center the tab under the cursor if the tab is not under the cursor while dragging let draggedTabScreenAxis = draggedTab[screenAxis] + translate; if ( - (screen < draggedTabScreenAxis || screen > draggedTabScreenAxis + tabSize) && + (screen < draggedTabScreenAxis || + screen > draggedTabScreenAxis + tabSize) && draggedTabScreenAxis + tabSize < endBound && draggedTabScreenAxis > startBound ) { @@ -309,7 +336,7 @@ dragData.translatePos = translate; - tabs = tabs.filter((t) => !movingTabsSet.has(t) || t == draggedTab); + tabs = tabs.filter(t => !movingTabsSet.has(t) || t == draggedTab); /** * When the `draggedTab` is just starting to move, the `draggedTab` is in @@ -333,16 +360,23 @@ * @returns {number} */ let getTabShift = (item, dropElementIndex) => { - if (item.elementIndex < draggedTab.elementIndex && item.elementIndex >= dropElementIndex) { + if ( + item.elementIndex < draggedTab.elementIndex && + item.elementIndex >= dropElementIndex + ) { return this._rtlMode ? -shiftSize : shiftSize; } - if (item.elementIndex > draggedTab.elementIndex && item.elementIndex < dropElementIndex) { + if ( + item.elementIndex > draggedTab.elementIndex && + item.elementIndex < dropElementIndex + ) { return this._rtlMode ? shiftSize : -shiftSize; } return 0; }; - let oldDropElementIndex = dragData.animDropElementIndex ?? movingTabs[0].elementIndex; + let oldDropElementIndex = + dragData.animDropElementIndex ?? movingTabs[0].elementIndex; /** * Returns the higher % by which one element overlaps another @@ -423,7 +457,9 @@ * time. */ let getOverlappedElement = () => { - let point = (screenForward ? lastMovingTabScreen : firstMovingTabScreen) + translate; + let point = + (screenForward ? lastMovingTabScreen : firstMovingTabScreen) + + translate; let low = 0; let high = tabs.length - 1; while (low <= high) { @@ -433,7 +469,9 @@ } let element = tabs[mid]; let elementForSize = elementToMove(element); - screen = elementForSize[screenAxis] + getTabShift(element, oldDropElementIndex); + screen = + elementForSize[screenAxis] + + getTabShift(element, oldDropElementIndex); if (screen > point) { high = mid - 1; @@ -489,11 +527,18 @@ // 4) we just started dragging and the `oldDropElementIndex` has its default // valuë of `movingTabs[0].elementIndex`. In this case, the drop element // shouldn't be a moving tab, so keep it `undefined`. - let lastPossibleDropElement = this._rtlMode ? tabs.find((t) => t != draggedTab) : undefined; - let maxElementIndexForDropElement = lastPossibleDropElement?.elementIndex; + let lastPossibleDropElement = this._rtlMode + ? tabs.find(t => t != draggedTab) + : undefined; + let maxElementIndexForDropElement = + lastPossibleDropElement?.elementIndex; if (Number.isInteger(maxElementIndexForDropElement)) { - let index = Math.min(oldDropElementIndex, maxElementIndexForDropElement); - let oldDropElementCandidate = this._tabbrowserTabs.ariaFocusableItems.at(index); + let index = Math.min( + oldDropElementIndex, + maxElementIndexForDropElement + ); + let oldDropElementCandidate = + this._tabbrowserTabs.ariaFocusableItems.at(index); if (!movingTabsSet.has(oldDropElementCandidate)) { dropElement = oldDropElementCandidate; } @@ -507,7 +552,8 @@ let dropElementForOverlap = elementToMove(dropElement); let dropElementScreen = dropElementForOverlap[screenAxis]; - let dropElementPos = dropElementScreen + getTabShift(dropElement, oldDropElementIndex); + let dropElementPos = + dropElementScreen + getTabShift(dropElement, oldDropElementIndex); let dropElementSize = bounds(dropElementForOverlap)[size]; let firstMovingTabPos = firstMovingTabScreen + translate; overlapPercent = greatestOverlap( @@ -518,7 +564,9 @@ ); moveOverThreshold = gBrowser._tabGroupsEnabled - ? Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100 + ? Services.prefs.getIntPref( + "browser.tabs.dragDrop.moveOverThresholdPercent" + ) / 100 : 0.5; moveOverThreshold = Math.min(1, Math.max(0, moveOverThreshold)); let shouldMoveOver = overlapPercent > moveOverThreshold; @@ -536,7 +584,8 @@ // Recalculate the overlap with the updated drop index for when the // drop element moves over. - dropElementPos = dropElementScreen + getTabShift(dropElement, newDropElementIndex); + dropElementPos = + dropElementScreen + getTabShift(dropElement, newDropElementIndex); overlapPercent = greatestOverlap( firstMovingTabPos, shiftSize, @@ -611,17 +660,25 @@ } #shouldSwitchSpace(event) { - const padding = Services.prefs.getIntPref("zen.workspaces.dnd-switch-padding"); + const padding = Services.prefs.getIntPref( + "zen.workspaces.dnd-switch-padding" + ); // If we are hovering over the edges of the gNavToolbox or the splitter, we // can change the workspace after a short delay. const splitter = document.getElementById("zen-sidebar-splitter"); let rect = window.windowUtils.getBoundsWithoutFlushing(gNavToolbox); - if (!(gZenCompactModeManager.preference && gZenCompactModeManager.canHideSidebar)) { - rect.width += window.windowUtils.getBoundsWithoutFlushing(splitter).width; + if (!( + gZenCompactModeManager.preference && + gZenCompactModeManager.canHideSidebar + )) { + rect.width += + window.windowUtils.getBoundsWithoutFlushing(splitter).width; } const { clientX } = event; - const isNearLeftEdge = clientX >= rect.left - padding && clientX <= rect.left + padding; - const isNearRightEdge = clientX >= rect.right - padding && clientX <= rect.right + padding; + const isNearLeftEdge = + clientX >= rect.left - padding && clientX <= rect.left + padding; + const isNearRightEdge = + clientX >= rect.right - padding && clientX <= rect.right + padding; return { isNearLeftEdge, isNearRightEdge }; } @@ -639,14 +696,19 @@ this.clearSpaceSwitchTimer(); return; } - const { isNearLeftEdge, isNearRightEdge } = this.#shouldSwitchSpace(event); + const { isNearLeftEdge, isNearRightEdge } = + this.#shouldSwitchSpace(event); if (isNearLeftEdge || isNearRightEdge) { if (!this.#changeSpaceTimer) { this.#changeSpaceTimer = setTimeout(() => { this.clearDragOverVisuals(); gZenWorkspaces - .changeWorkspaceShortcut(isNearLeftEdge ? -1 : 1, false, /* Disable wrapping */ true) - .then((spaceChanged) => { + .changeWorkspaceShortcut( + isNearLeftEdge ? -1 : 1, + false, + /* Disable wrapping */ true + ) + .then(spaceChanged => { if (AppConstants.platform !== "macosx") { // See the hack in #createDragImageForTabs for more details which // explains why we need to do this on non-macOS platforms. @@ -654,7 +716,9 @@ } let tabs = this.originalDragImageArgs[0].children; const { isDarkMode, isExplicitMode } = - gZenThemePicker.getGradientForWorkspace(spaceChanged, { getGradient: false }); + gZenThemePicker.getGradientForWorkspace(spaceChanged, { + getGradient: false, + }); for (let tab of tabs) { if (isExplicitMode) { tab.style.colorScheme = isDarkMode ? "dark" : "light"; @@ -725,7 +789,10 @@ const edgeZoneThreshold = this._dndSplitThreshold / 100; const overlapRatioY = (clientY - targetTop) / targetHeight; - if (overlapRatioY < edgeZoneThreshold || overlapRatioY > 1 - edgeZoneThreshold) { + if ( + overlapRatioY < edgeZoneThreshold || + overlapRatioY > 1 - edgeZoneThreshold + ) { this._clearDragOverSplit(); return; } @@ -815,7 +882,10 @@ return; } const { innerWidth: winWidth, innerHeight: winHeight } = window; - let allowedMargin = Services.prefs.getIntPref("zen.tabs.dnd-outside-window-margin", 5); + let allowedMargin = Services.prefs.getIntPref( + "zen.tabs.dnd-outside-window-margin", + 5 + ); const isOutOfWindow = clientX <= allowedMargin || clientX >= winWidth - allowedMargin || @@ -881,7 +951,9 @@ gBrowser.selectedTab = draggedTab; } else if (isTabGroupLabel(draggedTab)) { draggedTab = draggedTab.group; - gZenFolders.changeFolderToSpace(draggedTab, activeWorkspace, { hasDndSwitch: true }); + gZenFolders.changeFolderToSpace(draggedTab, activeWorkspace, { + hasDndSwitch: true, + }); } } } @@ -922,7 +994,8 @@ } if ( isTabGroupLabel(draggedTab) || - (isTab(draggedTab) && draggedTab.group?.hasAttribute("split-view-group")) + (isTab(draggedTab) && + draggedTab.group?.hasAttribute("split-view-group")) ) { draggedTab = draggedTab.group; } @@ -939,7 +1012,8 @@ !dropElement || dropElement.hasAttribute("zen-essential") || draggedTab.hasAttribute("zen-essential") || - draggedTab.getAttribute("zen-workspace-id") != gZenWorkspaces.activeWorkspace || + draggedTab.getAttribute("zen-workspace-id") != + gZenWorkspaces.activeWorkspace || !dropElement.visible || !draggedTab.visible || draggedTab.ownerGlobal !== window @@ -949,7 +1023,7 @@ this.#isAnimatingTabMove = true; const animateElement = (ele, translateY) => { ele.style.transform = `translateY(${translateY}px)`; - let animateInternal = (resolve) => { + let animateInternal = resolve => { const clearStyles = () => { ele.style.transform = ""; ele.style.zIndex = ""; @@ -960,7 +1034,11 @@ return; } gZenUIManager - .elementAnimate(ele, { y: [translateY, 0] }, { duration: 100, easing: "ease-out" }) + .elementAnimate( + ele, + { y: [translateY, 0] }, + { duration: 100, easing: "ease-out" } + ) .then(() => { clearStyles(); }) @@ -969,7 +1047,7 @@ // Wait for the next event loop tick to ensure the initial transform style is applied. // We need to ensure the element has already been moved in the DOM before starting the animation. animations.push( - new Promise((resolve) => + new Promise(resolve => setTimeout(() => { setTimeout(() => animateInternal(resolve), 0); }) @@ -1025,7 +1103,9 @@ : -rect.height * tabsInBetween.length; draggedTabTranslateY += extraTranslate * - (focusableDraggedTab.elementIndex > focusableDropElement.elementIndex ? 1 : -1); + (focusableDraggedTab.elementIndex > focusableDropElement.elementIndex + ? 1 + : -1); draggedTab.style.zIndex = "9"; animateElement(draggedTab, draggedTabTranslateY); } catch (e) { @@ -1043,7 +1123,8 @@ let ownerGlobal = draggedTab?.ownerGlobal; draggedTab.style.visibility = ""; let thisFromGlobal = ownerGlobal?.gBrowser.tabContainer.tabDragAndDrop; - let currentEssenialContainer = ownerGlobal.gZenWorkspaces.getCurrentEssentialsContainer(); + let currentEssenialContainer = + ownerGlobal.gZenWorkspaces.getCurrentEssentialsContainer(); if (currentEssenialContainer?.essentialsPromo) { currentEssenialContainer.essentialsPromo.remove(); } @@ -1057,9 +1138,13 @@ thisFromGlobal._clearDragOverSplit(); this.#maybeClearVerticalPinnedGridDragOver(); thisFromGlobal.originalDragImageArgs = []; - window.removeEventListener("dragenter", thisFromGlobal.handle_windowDragEnter, { - capture: true, - }); + window.removeEventListener( + "dragenter", + thisFromGlobal.handle_windowDragEnter, + { + capture: true, + } + ); this.#isOutOfWindow = false; if (thisFromGlobal._browserDragImageWrapper) { thisFromGlobal._browserDragImageWrapper.remove(); @@ -1119,8 +1204,13 @@ return true; } if (folder.isLiveFolder) { - const liveFolderItemId = draggedTab.getAttribute("zen-live-folder-item-id"); - if (!liveFolderItemId || !liveFolderItemId.startsWith(`${folder.id}:`)) { + const liveFolderItemId = draggedTab.getAttribute( + "zen-live-folder-item-id" + ); + if ( + !liveFolderItemId || + !liveFolderItemId.startsWith(`${folder.id}:`) + ) { return false; } } @@ -1144,12 +1234,16 @@ let hoveringPeriphery = !!event.target.closest( ":is(#tabbrowser-arrowscrollbox-periphery, .pinned-tabs-container-separator)" ); - if (event.target.classList.contains("zen-workspace-empty-space") || hoveringPeriphery) { + if ( + event.target.classList.contains("zen-workspace-empty-space") || + hoveringPeriphery + ) { let lastTab = gBrowser.tabs.at(-1); let pinnedTabsCount = gBrowser._numVisiblePinTabsWithoutCollapsed; // Only if there are no normal tabs to drop after - showIndicatorUnderNewTabButton = lastTab.hasAttribute("zen-empty-tab"); + showIndicatorUnderNewTabButton = + lastTab.hasAttribute("zen-empty-tab"); let useLastPinnd = (hoveringPeriphery || (showIndicatorUnderNewTabButton && @@ -1187,12 +1281,18 @@ let possibleFolderElement = dropElement.parentElement; let isZenFolder = possibleFolderElement?.isZenFolder; let canHightlightGroup = - gZenFolders.highlightGroupOnDragOver(possibleFolderElement, movingTabs) || !isZenFolder; + gZenFolders.highlightGroupOnDragOver( + possibleFolderElement, + movingTabs + ) || !isZenFolder; let rect = window.windowUtils.getBoundsWithoutFlushing(dropElement); const overlapPercent = (event.clientY - rect.top) / rect.height; // We wan't to leave a small threshold (20% for example) so we can drag tabs below and above // a folder label without dragging into the folder. - let threshold = Services.prefs.getIntPref("zen.tabs.folder-dragover-threshold-percent") / 100; + let threshold = + Services.prefs.getIntPref( + "zen.tabs.folder-dragover-threshold-percent" + ) / 100; let dropIntoFolder = isZenFolder && (overlapPercent < threshold || @@ -1211,7 +1311,8 @@ if ( isTabGroupLabel(draggedTab) && draggedTab.group?.isZenFolder && - (((isTab(dropElement) || dropElement.hasAttribute("split-view-group")) && + (((isTab(dropElement) || + dropElement.hasAttribute("split-view-group")) && (!dropElement.pinned || dropElement.hasAttribute("zen-essential"))) || showIndicatorUnderNewTabButton) ) { @@ -1226,12 +1327,16 @@ dropElement.hasAttribute("split-view-group") ) { if (showIndicatorUnderNewTabButton) { - rect = window.windowUtils.getBoundsWithoutFlushing(this.#dragShiftableItems.at(-1)); + rect = window.windowUtils.getBoundsWithoutFlushing( + this.#dragShiftableItems.at(-1) + ); } const indicator = gZenPinnedTabManager.dragIndicator; let top = 0; threshold = - Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100; + Services.prefs.getIntPref( + "browser.tabs.dragDrop.moveOverThresholdPercent" + ) / 100; if (overlapPercent > threshold || showIndicatorUnderNewTabButton) { top = Math.round(rect.top + rect.height) + "px"; dropBefore = false; @@ -1243,23 +1348,36 @@ shouldPlayHapticFeedback = true; } indicator.setAttribute("orientation", "horizontal"); - indicator.style.setProperty("--indicator-left", rect.left + separation / 2 + "px"); - indicator.style.setProperty("--indicator-width", rect.width - separation + "px"); + indicator.style.setProperty( + "--indicator-left", + rect.left + separation / 2 + "px" + ); + indicator.style.setProperty( + "--indicator-width", + rect.width - separation + "px" + ); indicator.style.top = top; indicator.style.removeProperty("left"); this.#removeDragOverBackground(); if (!isTab(dropElement) && dropElement?.parentElement?.isZenFolder) { dropElement = dropElement.parentElement; } - } else if (dropElement.classList.contains("zen-drop-target") && canHightlightGroup) { + } else if ( + dropElement.classList.contains("zen-drop-target") && + canHightlightGroup + ) { shouldPlayHapticFeedback = - this.#applyDragOverBackground(dropElement) && !gZenPinnedTabManager._dragIndicator; + this.#applyDragOverBackground(dropElement) && + !gZenPinnedTabManager._dragIndicator; gZenPinnedTabManager.removeTabContainersDragoverClass(); dropElement = dropElement.parentElement?.labelElement || dropElement; if (dropElement.classList.contains("zen-current-workspace-indicator")) { dropElement = - elementToMove(this._tabbrowserTabs.ariaFocusableItems.at(gBrowser._numZenEssentials)) || - dropElement; + elementToMove( + this._tabbrowserTabs.ariaFocusableItems.at( + gBrowser._numZenEssentials + ) + ) || dropElement; dropBefore = true; } } @@ -1305,12 +1423,17 @@ if (!this._fakeEssentialTab) { const numEssentials = gBrowser._numZenEssentials; - let pinnedTabs = this._tabbrowserTabs.ariaFocusableItems.slice(0, numEssentials); + let pinnedTabs = this._tabbrowserTabs.ariaFocusableItems.slice( + 0, + numEssentials + ); this._fakeEssentialTab = document.createXULElement("vbox"); this._fakeEssentialTab.elementIndex = numEssentials; delete dragData.animDropElementIndex; if (!draggedTab.hasAttribute("zen-essential")) { - event.target.closest(".zen-essentials-container").appendChild(this._fakeEssentialTab); + event.target + .closest(".zen-essentials-container") + .appendChild(this._fakeEssentialTab); gZenWorkspaces.updateTabsContainers(); pinnedTabs.push(this._fakeEssentialTab); this._fakeEssentialTab.getBoundingClientRect(); // Initialize layout @@ -1318,8 +1441,9 @@ this.#makeDragImageEssential(event); let tabsPerRow = 0; let position = RTL_UI - ? window.windowUtils.getBoundsWithoutFlushing(this._tabbrowserTabs.pinnedTabsContainer) - .right + ? window.windowUtils.getBoundsWithoutFlushing( + this._tabbrowserTabs.pinnedTabsContainer + ).right : 0; for (let pinnedTab of pinnedTabs) { let tabPosition; @@ -1341,13 +1465,19 @@ this.#maxTabsPerRow = tabsPerRow; } let usingFakeElement = !!this._fakeEssentialTab.parentElement; - let elementMoving = usingFakeElement ? this._fakeEssentialTab : draggedTab; + let elementMoving = usingFakeElement + ? this._fakeEssentialTab + : draggedTab; if (usingFakeElement) { movingTabs = [this._fakeEssentialTab]; } - let dragDataScreenX = usingFakeElement ? this._fakeEssentialTab.screenX : dragData.screenX; - let dragDataScreenY = usingFakeElement ? this._fakeEssentialTab.screenY : dragData.screenY; + let dragDataScreenX = usingFakeElement + ? this._fakeEssentialTab.screenX + : dragData.screenX; + let dragDataScreenY = usingFakeElement + ? this._fakeEssentialTab.screenY + : dragData.screenY; dragData.animLastScreenX ??= dragDataScreenX; dragData.animLastScreenY ??= dragDataScreenY; @@ -1355,11 +1485,17 @@ let screenX = event.screenX; let screenY = event.screenY; - if (screenY == dragData.animLastScreenY && screenX == dragData.animLastScreenX) { + if ( + screenY == dragData.animLastScreenY && + screenX == dragData.animLastScreenX + ) { return; } - let tabs = this._tabbrowserTabs.visibleTabs.slice(0, gBrowser._numZenEssentials); + let tabs = this._tabbrowserTabs.visibleTabs.slice( + 0, + gBrowser._numZenEssentials + ); if (usingFakeElement) { tabs.push(this._fakeEssentialTab); } @@ -1369,7 +1505,8 @@ dragData.animLastScreenY = screenY; dragData.animLastScreenX = screenX; - let { width: tabWidth, height: tabHeight } = elementMoving.getBoundingClientRect(); + let { width: tabWidth, height: tabHeight } = + elementMoving.getBoundingClientRect(); tabWidth += 4; // Add 6px to account for the gap tabHeight += 4; let shiftSizeX = tabWidth; @@ -1383,11 +1520,16 @@ let lastTab = tabs.at(-1); if (RTL_UI) { firstTabInRow = - tabs.length >= this.#maxTabsPerRow ? tabs[this.#maxTabsPerRow - 1] : lastTab; + tabs.length >= this.#maxTabsPerRow + ? tabs[this.#maxTabsPerRow - 1] + : lastTab; lastTabInRow = tabs[0]; } else { firstTabInRow = tabs[0]; - lastTabInRow = tabs.length >= this.#maxTabsPerRow ? tabs[this.#maxTabsPerRow - 1] : lastTab; + lastTabInRow = + tabs.length >= this.#maxTabsPerRow + ? tabs[this.#maxTabsPerRow - 1] + : lastTab; } let lastMovingTabScreenX = movingTabs.at(-1).screenX; let lastMovingTabScreenY = movingTabs.at(-1).screenY; @@ -1436,7 +1578,7 @@ // * We're doing a binary search in order to reduce the amount of // tabs we need to check. - tabs = tabs.filter((t) => !movingTabs.includes(t) || t == elementMoving); + tabs = tabs.filter(t => !movingTabs.includes(t) || t == elementMoving); let firstTabCenterX = firstMovingTabScreenX + translateX + tabWidth / 2; let lastTabCenterX = lastMovingTabScreenX + translateX + tabWidth / 2; let tabCenterX = directionX ? lastTabCenterX : firstTabCenterX; @@ -1447,25 +1589,37 @@ let shiftNumber = this.#maxTabsPerRow - movingTabs.length; let getTabShift = (tab, dropIndex) => { - if (tab.elementIndex < elementMoving.elementIndex && tab.elementIndex >= dropIndex) { + if ( + tab.elementIndex < elementMoving.elementIndex && + tab.elementIndex >= dropIndex + ) { // If tab is at the end of a row, shift back and down let tabRow = Math.ceil((tab.elementIndex + 1) / this.#maxTabsPerRow); let shiftedTabRow = Math.ceil( (tab.elementIndex + 1 + movingTabs.length) / this.#maxTabsPerRow ); if (tab.elementIndex && tabRow != shiftedTabRow) { - return [RTL_UI ? tabWidth * shiftNumber : -tabWidth * shiftNumber, shiftSizeY]; + return [ + RTL_UI ? tabWidth * shiftNumber : -tabWidth * shiftNumber, + shiftSizeY, + ]; } return [RTL_UI ? -shiftSizeX : shiftSizeX, 0]; } - if (tab.elementIndex > elementMoving.elementIndex && tab.elementIndex < dropIndex) { + if ( + tab.elementIndex > elementMoving.elementIndex && + tab.elementIndex < dropIndex + ) { // If tab is not index 0 and at the start of a row, shift across and up let tabRow = Math.floor(tab.elementIndex / this.#maxTabsPerRow); let shiftedTabRow = Math.floor( (tab.elementIndex - movingTabs.length) / this.#maxTabsPerRow ); if (tab.elementIndex && tabRow != shiftedTabRow) { - return [RTL_UI ? -tabWidth * shiftNumber : tabWidth * shiftNumber, -shiftSizeY]; + return [ + RTL_UI ? -tabWidth * shiftNumber : tabWidth * shiftNumber, + -shiftSizeY, + ]; } return [RTL_UI ? shiftSizeX : -shiftSizeX, 0]; } @@ -1475,7 +1629,8 @@ let low = 0; let high = tabs.length - 1; let newIndex = -1; - let oldIndex = dragData.animDropElementIndex ?? movingTabs[0].elementIndex; + let oldIndex = + dragData.animDropElementIndex ?? movingTabs[0].elementIndex; while (low <= high) { let mid = Math.floor((low + high) / 2); if (tabs[mid] == elementMoving && ++mid > high) { @@ -1489,9 +1644,13 @@ low = mid + 1; } else if (screenY > tabCenterY) { high = mid - 1; - } else if (RTL_UI ? screenX + tabWidth < tabCenterX : screenX > tabCenterX) { + } else if ( + RTL_UI ? screenX + tabWidth < tabCenterX : screenX > tabCenterX + ) { high = mid - 1; - } else if (RTL_UI ? screenX > tabCenterX : screenX + tabWidth < tabCenterX) { + } else if ( + RTL_UI ? screenX > tabCenterX : screenX + tabWidth < tabCenterX + ) { low = mid + 1; } else { newIndex = tabs[mid].elementIndex; @@ -1523,7 +1682,8 @@ for (let tab of tabs) { if (tab != draggedTab) { let [shiftX, shiftY] = getTabShift(tab, newIndex); - tab.style.transform = shiftX || shiftY ? `translate(${shiftX}px, ${shiftY}px)` : ""; + tab.style.transform = + shiftX || shiftY ? `translate(${shiftX}px, ${shiftY}px)` : ""; } } } @@ -1532,7 +1692,10 @@ if (this._fakeEssentialTab) { this._fakeEssentialTab.remove(); delete this._fakeEssentialTab; - for (let tab of this._tabbrowserTabs.visibleTabs.slice(0, gBrowser._numZenEssentials)) { + for (let tab of this._tabbrowserTabs.visibleTabs.slice( + 0, + gBrowser._numZenEssentials + )) { tab.style.transform = ""; } gZenWorkspaces.updateTabsContainers(); @@ -1551,8 +1714,13 @@ tab.setAttribute("zen-essential", "true"); tab.setAttribute("pinned", "true"); tab.setAttribute("selected", "true"); - const draggedTabRect = window.windowUtils.getBoundsWithoutFlushing(this._fakeEssentialTab); - tab.style.minWidth = tab.style.maxWidth = wrapper.style.width = draggedTabRect.width + "px"; + const draggedTabRect = window.windowUtils.getBoundsWithoutFlushing( + this._fakeEssentialTab + ); + tab.style.minWidth = + tab.style.maxWidth = + wrapper.style.width = + draggedTabRect.width + "px"; tab.style.minHeight = tab.style.maxHeight = wrapper.style.height = diff --git a/src/zen/folders/ZenFolder.mjs b/src/zen/folders/ZenFolder.mjs index 992a8c9c2..abd7e162e 100644 --- a/src/zen/folders/ZenFolder.mjs +++ b/src/zen/folders/ZenFolder.mjs @@ -4,7 +4,8 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - ZenLiveFoldersManager: "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", + ZenLiveFoldersManager: + "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", }); export class nsZenFolder extends MozTabbrowserTabGroup { @@ -77,7 +78,7 @@ export class nsZenFolder extends MozTabbrowserTabGroup { this.labelElement.parentElement.setAttribute("context", "zenFolderActions"); - this.labelElement.onRenameFinished = (newLabel) => { + this.labelElement.onRenameFinished = newLabel => { this.name = newLabel.trim() || "Folder"; const event = new CustomEvent("ZenFolderRenamed", { bubbles: true, @@ -127,7 +128,9 @@ export class nsZenFolder extends MozTabbrowserTabGroup { get childActiveGroups() { if (this.tagName === "zen-workspace-collapsible-pins") { - return Array.from(this.parentElement.querySelectorAll("zen-folder[has-active]")); + return Array.from( + this.parentElement.querySelectorAll("zen-folder[has-active]") + ); } return Array.from(this.querySelectorAll("zen-folder[has-active]")); } @@ -193,7 +196,7 @@ export class nsZenFolder extends MozTabbrowserTabGroup { get allItems() { return [...this.groupContainer.children].filter( - (child) => + child => !( child.classList.contains("zen-tab-group-start") || child.classList.contains("pinned-tabs-container-separator") @@ -227,7 +230,9 @@ export class nsZenFolder extends MozTabbrowserTabGroup { } else { const folders = new Map(); for (let tab of this._activeTabs) { - const group = tab?.group?.hasAttribute("split-view-group") ? tab?.group?.group : tab?.group; + const group = tab?.group?.hasAttribute("split-view-group") + ? tab?.group?.group + : tab?.group; if (!folders.has(group?.id)) { folders.set(group?.id, group?.activeGroups?.at(-1)); } @@ -247,7 +252,10 @@ export class nsZenFolder extends MozTabbrowserTabGroup { } get resetButton() { - return this.labelElement.parentElement?.querySelector(".tab-reset-button") ?? null; + return ( + this.labelElement.parentElement?.querySelector(".tab-reset-button") ?? + null + ); } unloadAllTabs(event) { @@ -280,8 +288,13 @@ export class nsZenFolder extends MozTabbrowserTabGroup { addTabs(tabs) { super.addTabs(tabs); - if (this.collapsed && !gZenFolders._sessionRestoring && this.isLiveFolder && tabs.length) { - tabs.forEach((tab) => { + if ( + this.collapsed && + !gZenFolders._sessionRestoring && + this.isLiveFolder && + tabs.length + ) { + tabs.forEach(tab => { tab.setAttribute("folder-active", "true"); }); gZenFolders.animateCollapse(this); diff --git a/src/zen/folders/ZenFolders.mjs b/src/zen/folders/ZenFolders.mjs index 48df746df..31d3cbf41 100644 --- a/src/zen/folders/ZenFolders.mjs +++ b/src/zen/folders/ZenFolders.mjs @@ -36,7 +36,10 @@ function groupIsCollapsiblePins(group) { } class nsZenFolders extends nsZenDOMOperatedFeature { - #ZEN_MAX_SUBFOLDERS = Services.prefs.getIntPref("zen.folders.max-subfolders", 5); + #ZEN_MAX_SUBFOLDERS = Services.prefs.getIntPref( + "zen.folders.max-subfolders", + 5 + ); #popup = null; #popupTimer = null; @@ -69,10 +72,12 @@ class nsZenFolders extends nsZenDOMOperatedFeature { const contextMenuItemsToolbar = window.MozXULElement.parseXULToFragment( `` ); - document.getElementById("toolbar-context-openANewTab").after(contextMenuItemsToolbar); + document + .getElementById("toolbar-context-openANewTab") + .after(contextMenuItemsToolbar); const folderActionsMenu = document.getElementById("zenFolderActions"); - folderActionsMenu.addEventListener("popupshowing", (event) => { + folderActionsMenu.addEventListener("popupshowing", event => { const target = event.explicitOriginalTarget; let folder; if (gBrowser.isTabGroupLabel(target)) { @@ -93,7 +98,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { this.#lastFolderContextMenu = folder; gZenLiveFoldersUI.buildContextMenu(folder); - const newSubfolderItem = document.getElementById("context_zenFolderNewSubfolder"); + const newSubfolderItem = document.getElementById( + "context_zenFolderNewSubfolder" + ); newSubfolderItem.setAttribute( "disabled", folder.level >= this.#ZEN_MAX_SUBFOLDERS - 1 ? "true" : "false" @@ -105,7 +112,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { changeFolderSpace.innerHTML = ""; for (const workspace of [...gZenWorkspaces.getWorkspaces()].reverse()) { const item = gZenWorkspaces.generateMenuItemForWorkspace(workspace); - item.addEventListener("command", (event) => { + item.addEventListener("command", event => { if (!this.#lastFolderContextMenu) { return; } @@ -120,7 +127,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { folderActionsMenu.addEventListener( "popuphidden", - (event) => { + event => { if (event.target === folderActionsMenu) { this.#lastFolderContextMenu = null; } @@ -128,7 +135,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { { once: true } ); - folderActionsMenu.addEventListener("command", (event) => { + folderActionsMenu.addEventListener("command", event => { if (!this.#lastFolderContextMenu) { return; } @@ -198,12 +205,17 @@ class nsZenFolders extends nsZenDOMOperatedFeature { window.addEventListener("TabSelect", this); window.addEventListener("TabOpen", this); const onNewFolder = this.#onNewFolder.bind(this); - document.getElementById("zen-context-menu-new-folder").addEventListener("command", onNewFolder); + document + .getElementById("zen-context-menu-new-folder") + .addEventListener("command", onNewFolder); document .getElementById("zen-context-menu-new-folder-toolbar") .addEventListener("command", onNewFolder); SessionStore.promiseInitialized.then(() => { - gBrowser.tabContainer.addEventListener("dragstart", this.cancelPopupTimer.bind(this)); + gBrowser.tabContainer.addEventListener( + "dragstart", + this.cancelPopupTimer.bind(this) + ); }); } @@ -234,7 +246,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } } - if (group.hasAttribute("split-view-group") && group.hasAttribute("zen-pinned-changed")) { + if ( + group.hasAttribute("split-view-group") && + group.hasAttribute("zen-pinned-changed") + ) { // zen-pinned-changed remove it and set it to had-zen-pinned-changed to keep // track of the original pinned state group.removeAttribute("zen-pinned-changed"); @@ -258,9 +273,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { const isActiveFolder = parentFolder?.activeGroups?.length > 0; const isSplitView = folder.hasAttribute("split-view-group"); if (isActiveFolder && isSplitView) { - parentFolder.activeTabs = [...new Set([...parentFolder.activeTabs, ...folder.tabs])].sort( - (a, b) => a._tPos > b._tPos - ); + parentFolder.activeTabs = [ + ...new Set([...parentFolder.activeTabs, ...folder.tabs]), + ].sort((a, b) => a._tPos > b._tPos); } parentFolder.collapsed = isActiveFolder; } @@ -314,7 +329,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { async on_TabUngrouped(event) { const tab = event.detail; const group = event.target; - if (group.hasAttribute("split-view-group") && tab.hasAttribute("had-zen-pinned-changed")) { + if ( + group.hasAttribute("split-view-group") && + tab.hasAttribute("had-zen-pinned-changed") + ) { tab.setAttribute("zen-pinned-changed", true); tab.removeAttribute("had-zen-pinned-changed"); } @@ -381,7 +399,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } #onNewFolder(event) { - const isFromToolbar = event.target.id === "zen-context-menu-new-folder-toolbar"; + const isFromToolbar = + event.target.id === "zen-context-menu-new-folder-toolbar"; const contextMenu = event.target.parentElement; let tabs = TabContextMenu.contextTab?.multiselected ? gBrowser.selectedTabs @@ -401,7 +420,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } // Prevent create folder inside Live Folder - const thereIsOneLiveFolderTab = tabs?.some((tab) => + const thereIsOneLiveFolderTab = tabs?.some(tab => tab.hasAttribute("zen-live-folder-item-id") ); if (thereIsOneLiveFolderTab) { @@ -423,7 +442,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { async #convertFolderToSpace(folder) { const currentWorkspace = gZenWorkspaces.getActiveWorkspaceFromCache(); - let selectedTab = folder.tabs.find((tab) => tab.selected); + let selectedTab = folder.tabs.find(tab => tab.selected); const icon = folder.icon?.querySelector("svg .icon image"); const newSpace = await gZenWorkspaces.createAndSaveWorkspace( @@ -432,20 +451,23 @@ class nsZenFolders extends nsZenDOMOperatedFeature { /* dontChange= */ false, currentWorkspace.containerTabId, { - beforeChangeCallback: async (newWorkspace) => { - await new Promise((resolve) => { + beforeChangeCallback: async newWorkspace => { + await new Promise(resolve => { requestAnimationFrame(async () => { const workspacePinnedContainer = gZenWorkspaces.workspaceElement( newWorkspace.uuid ).pinnedTabsContainer; - const tabs = folder.allItems.filter((tab) => !tab.hasAttribute("zen-empty-tab")); + const tabs = folder.allItems.filter( + tab => !tab.hasAttribute("zen-empty-tab") + ); workspacePinnedContainer.append(...tabs); await folder.delete(); gBrowser.tabContainer._invalidateCachedTabs(); if (selectedTab) { selectedTab.setAttribute("zen-workspace-id", newWorkspace.uuid); selectedTab.removeAttribute("folder-active"); - gZenWorkspaces.lastSelectedWorkspaceTabs[newWorkspace.uuid] = selectedTab; + gZenWorkspaces.lastSelectedWorkspaceTabs[newWorkspace.uuid] = + selectedTab; } resolve(); }); @@ -461,7 +483,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { tab.style.height = ""; } gBrowser.TabStateFlusher.flush(tab.linkedBrowser); - if (gZenWorkspaces.lastSelectedWorkspaceTabs[currentWorkspace.uuid] === tab) { + if ( + gZenWorkspaces.lastSelectedWorkspaceTabs[currentWorkspace.uuid] === tab + ) { // This tab is no longer the last selected tab in the previous workspace because it's being moved to // the current workspace delete gZenWorkspaces.lastSelectedWorkspaceTabs[currentWorkspace.uuid]; @@ -496,7 +520,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } } - folder.dispatchEvent(new CustomEvent("ZenFolderChangedWorkspace", { bubbles: true })); + folder.dispatchEvent( + new CustomEvent("ZenFolderChangedWorkspace", { bubbles: true }) + ); if (!hasDndSwitch) { gZenWorkspaces.changeWorkspaceWithID(workspaceId).then(() => { @@ -513,8 +539,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { createFolder(tabs = [], options = {}) { const filteredTabs = tabs - .filter((tab) => !tab.hasAttribute("zen-essential")) - .map((tab) => { + .filter(tab => !tab.hasAttribute("zen-essential")) + .map(tab => { gBrowser.pinTab(tab); if (tab?.group?.hasAttribute("split-view-group")) { tab = tab.group; @@ -526,9 +552,12 @@ class nsZenFolders extends nsZenDOMOperatedFeature { options.workspaceId )?.pinnedTabsContainer; const pinnedContainer = - options.workspaceId && workspacePinned ? workspacePinned : gZenWorkspaces.pinnedTabsContainer; + options.workspaceId && workspacePinned + ? workspacePinned + : gZenWorkspaces.pinnedTabsContainer; const insertBefore = - options.insertBefore || pinnedContainer.querySelector(".pinned-tabs-container-separator"); + options.insertBefore || + pinnedContainer.querySelector(".pinned-tabs-container-separator"); const emptyTab = gBrowser.addTab("about:blank", { skipAnimation: true, pinned: true, @@ -557,7 +586,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // deliberate user action indicating the tab has importance for the user. // Without this, it is not possible to save and close a tab group with // a short lifetime. - folder.tabs.forEach((tab) => { + folder.tabs.forEach(tab => { gBrowser.TabStateFlusher.flush(tab.linkedBrowser); }); @@ -572,7 +601,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } _createFolderNode(options = {}) { - const folder = document.createXULElement("zen-folder", { is: "zen-folder" }); + const folder = document.createXULElement("zen-folder", { + is: "zen-folder", + }); let id = options.id; if (!id) { // Note: If this changes, make sure to also update the @@ -587,14 +618,17 @@ class nsZenFolders extends nsZenDOMOperatedFeature { folder.color = "zen-workspace-color"; folder.isLiveFolder = options.isLiveFolder; - folder.setAttribute("zen-workspace-id", options.workspaceId || gZenWorkspaces.activeWorkspace); + folder.setAttribute( + "zen-workspace-id", + options.workspaceId || gZenWorkspaces.activeWorkspace + ); // note: We set if the folder is collapsed some time after creation. // we do this to ensure marginBottom is set correctly in the case // that we want it to initially be collapsed. setTimeout( // eslint-disable-next-line no-shadow - (folder) => { + folder => { folder.collapsed = !!options.collapsed; }, 0, @@ -618,7 +652,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { gBrowser.pinTab(otherTab); } this._piningFolder = false; - gBrowser.pinnedTabsContainer.insertBefore(group, gBrowser.pinnedTabsContainer.lastChild); + gBrowser.pinnedTabsContainer.insertBefore( + group, + gBrowser.pinnedTabsContainer.lastChild + ); gBrowser.tabContainer._invalidateCachedTabs(); return true; } @@ -649,13 +686,18 @@ class nsZenFolders extends nsZenDOMOperatedFeature { openTabsPopup(event) { event.stopPropagation(); - if (document.documentElement.getAttribute("zen-renaming-tab") || gURLBar.focused) { + if ( + document.documentElement.getAttribute("zen-renaming-tab") || + gURLBar.focused + ) { return; } const activeGroup = event.target.parentElement; if ( - activeGroup.tabs.filter((tab) => this.#shouldAppearOnTabSearch(tab, activeGroup)).length === 0 + activeGroup.tabs.filter(tab => + this.#shouldAppearOnTabSearch(tab, activeGroup) + ).length === 0 ) { // If the group has no tabs, we don't show the popup return; @@ -679,31 +721,38 @@ class nsZenFolders extends nsZenDOMOperatedFeature { foundTabs++; } } - document.getElementById("zen-folder-tabs-search-no-results").hidden = foundTabs > 0; + document.getElementById("zen-folder-tabs-search-no-results").hidden = + foundTabs > 0; }; search.addEventListener("input", onSearchInput); - const onKeyDown = (event) => { + const onKeyDown = event => { // Arrow down and up to navigate through the list if (event.key === "ArrowDown" || event.key === "ArrowUp") { event.preventDefault(); - const items = Array.from(tabsList.children).filter((item) => !item.hidden); + const items = Array.from(tabsList.children).filter( + item => !item.hidden + ); if (items.length === 0) { return; } - let index = items.indexOf(tabsList.querySelector(".folders-tabs-list-item[selected]")); + let index = items.indexOf( + tabsList.querySelector(".folders-tabs-list-item[selected]") + ); if (event.key === "ArrowDown") { index = (index + 1) % items.length; } else if (event.key === "ArrowUp") { index = (index - 1 + items.length) % items.length; } - items.forEach((item) => item.removeAttribute("selected")); + items.forEach(item => item.removeAttribute("selected")); const targetItem = items[index]; targetItem.setAttribute("selected", "true"); targetItem.scrollIntoView({ block: "start", behavior: "smooth" }); } else if (event.key === "Enter") { // Enter to select the currently highlighted item - const highlightedItem = tabsList.querySelector(".folders-tabs-list-item[selected]"); + const highlightedItem = tabsList.querySelector( + ".folders-tabs-list-item[selected]" + ); if (highlightedItem) { highlightedItem.click(); } @@ -714,7 +763,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { const target = event.target; target.setAttribute("open", true); - const handlePopupHidden = (event) => { + const handlePopupHidden = event => { if (event.target !== this.#popup) { return; } @@ -733,14 +782,19 @@ class nsZenFolders extends nsZenDOMOperatedFeature { { once: true } ); - this.#popup.addEventListener("popuphidden", handlePopupHidden, { once: true }); + this.#popup.addEventListener("popuphidden", handlePopupHidden, { + once: true, + }); this.#popup.openPopup(target, this.#searchPopupOptions); } get #searchPopupOptions() { const isRightSide = gZenVerticalTabsManager._prefsRightSide; const position = isRightSide ? "topleft topright" : "topright topleft"; - let size = Math.min(this.#popup.querySelector("#zen-folder-tabs-list").children.length, 6); + let size = Math.min( + this.#popup.querySelector("#zen-folder-tabs-list").children.length, + 6 + ); size *= 48; return { position, @@ -756,7 +810,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // account for the visibility of the tab itself, it's just a literal // representation of the `hidden` attribute. const tabIsInActiveGroup = group.activeTabs.includes(tab); - return !tabIsInActiveGroup && !(tab.hidden || tab.hasAttribute("zen-empty-tab")); + return ( + !tabIsInActiveGroup && !(tab.hidden || tab.hasAttribute("zen-empty-tab")) + ); } #populateTabsList(group) { @@ -786,7 +842,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // We don't need to do anything if the URL is invalid. e.g. about:blank } let tabLabel = tab.label || ""; - let iconURL = gBrowser.getIcon(tab) || PlacesUtils.favicons.defaultFavicon.spec; + let iconURL = + gBrowser.getIcon(tab) || PlacesUtils.favicons.defaultFavicon.spec; icon.src = iconURL; @@ -809,7 +866,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { item.setAttribute("selected", "true"); } - item.setAttribute("data-label", `${tabLabel.toLowerCase()} ${tabURL.toLowerCase()}`); + item.setAttribute( + "data-label", + `${tabLabel.toLowerCase()} ${tabURL.toLowerCase()}` + ); item.addEventListener("click", () => { gBrowser.selectedTab = tab; @@ -846,11 +906,17 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } // eslint-disable-next-line complexity - setFolderIndentation(tabs, groupElem = undefined, forCollapse = true, animate = true) { + setFolderIndentation( + tabs, + groupElem = undefined, + forCollapse = true, + animate = true + ) { if (!gZenPinnedTabManager.expandedSidebarMode) { return; } - const isSpaceCollapsed = gZenWorkspaces.activeWorkspaceElement?.hasCollapsedPinnedTabs; + const isSpaceCollapsed = + gZenWorkspaces.activeWorkspaceElement?.hasCollapsedPinnedTabs; let tab = tabs[0]; let isTab = false; @@ -863,7 +929,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } if ( gBrowser.isTab(groupElem) && - (!(groupElem.hasAttribute("zen-empty-tab") && groupElem.group === tab.group) || + (!( + groupElem.hasAttribute("zen-empty-tab") && groupElem.group === tab.group + ) || groupElem?.hasAttribute("zen-empty-tab")) ) { groupElem = groupElem.group; @@ -893,7 +961,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } } for (const tabItem of tabs) { - if (gBrowser.isTabGroupLabel(tabItem) || tabItem.group?.hasAttribute("split-view-group")) { + if ( + gBrowser.isTabGroupLabel(tabItem) || + tabItem.group?.hasAttribute("split-view-group") + ) { tabItem.group.style.setProperty("--zen-folder-indent", `${spacing}px`); continue; } @@ -915,9 +986,11 @@ class nsZenFolders extends nsZenDOMOperatedFeature { onlySvgIcons: true, allowNone: Boolean(group.iconURL), closeOnSelect: false, - onSelect: (icon) => { + onSelect: icon => { this.setFolderUserIcon(group, icon); - group.dispatchEvent(new CustomEvent("TabGroupUpdate", { bubbles: true })); + group.dispatchEvent( + new CustomEvent("TabGroupUpdate", { bubbles: true }) + ); }, }); } @@ -948,7 +1021,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { const labelContainer = group.querySelector(".tab-group-label-container"); // Setup mouseenter/mouseleave events for the folder - labelContainer.addEventListener("mouseenter", (event) => { + labelContainer.addEventListener("mouseenter", event => { if ( !group.collapsed || !Services.prefs.getBoolPref("zen.folders.search.enabled") || @@ -977,7 +1050,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } storeDataForSessionStore() { - const folders = Array.from(gBrowser.tabContainer.querySelectorAll("zen-folder")); + const folders = Array.from( + gBrowser.tabContainer.querySelectorAll("zen-folder") + ); const splitGroups = Array.from( gBrowser.tabContainer.querySelectorAll("tab-group[split-view-group]") ); @@ -1004,8 +1079,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { continue; } const emptyFolderTabs = folder.tabs - .filter((tab) => tab.hasAttribute("zen-empty-tab")) - .map((tab) => tab.getAttribute("id")); + .filter(tab => tab.hasAttribute("zen-empty-tab")) + .map(tab => tab.getAttribute("id")); let prevSiblingInfo = null; const prevSibling = folder.previousElementSibling; @@ -1014,7 +1089,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { if (prevSibling) { if (gBrowser.isTabGroup(prevSibling)) { prevSiblingInfo = { type: "group", id: prevSibling.id }; - } else if (gBrowser.isTab(prevSibling) && prevSibling.hasAttribute("id")) { + } else if ( + gBrowser.isTab(prevSibling) && + prevSibling.hasAttribute("id") + ) { prevSiblingInfo = { type: "tab", id: prevSibling.getAttribute("id") }; } else { prevSiblingInfo = { type: "start", id: null }; @@ -1061,8 +1139,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { tabFolderWorkingData.set(folderData.id, workingData); const oldGroup = document.getElementById(folderData.id); - folderData.emptyTabIds.forEach((id) => { - oldGroup?.querySelector(`tab[id="${id}"]`)?.setAttribute("zen-empty-tab", true); + folderData.emptyTabIds.forEach(id => { + oldGroup + ?.querySelector(`tab[id="${id}"]`) + ?.setAttribute("zen-empty-tab", true); }); if (gBrowser.isTabGroup(oldGroup)) { if (!folderData.splitViewGroup) { @@ -1097,7 +1177,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } } - for (const { node, containingTabsFragment } of tabFolderWorkingData.values()) { + for (const { + node, + containingTabsFragment, + } of tabFolderWorkingData.values()) { if (node) { node.appendChild(containingTabsFragment); } @@ -1111,7 +1194,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { switch (stateData?.prevSiblingInfo?.type) { case "tab": case "group": { - const item = document.getElementById(stateData.prevSiblingInfo.id); + const item = document.getElementById( + stateData.prevSiblingInfo.id + ); if (item) { item.after(node); break; @@ -1124,7 +1209,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } default: { // Should insert after zen-empty-tab - const start = parentWorkingData.node.groupStartElement.nextElementSibling; + const start = + parentWorkingData.node.groupStartElement.nextElementSibling; start.after(node); } } @@ -1161,10 +1247,11 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } if ( folder?.isZenFolder && - (!folder.hasAttribute("split-view-group") || !folder.hasAttribute("selected")) && + (!folder.hasAttribute("split-view-group") || + !folder.hasAttribute("selected")) && !( folder.level >= this.#ZEN_MAX_SUBFOLDERS && - movingTabs?.some((t) => gBrowser.isTabGroupLabel(t)) + movingTabs?.some(t => gBrowser.isTabGroupLabel(t)) ) ) { if (folder.collapsed) { @@ -1189,8 +1276,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { #normalizeGroupItems(items) { return items - .filter((item) => !item.hasAttribute("zen-empty-tab")) - .map((item) => { + .filter(item => !item.hasAttribute("zen-empty-tab")) + .map(item => { if (gBrowser.isTabGroup(item)) { item = item.firstChild; } else if (gBrowser.isTabGroupLabel(item)) { @@ -1217,11 +1304,15 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } #collectGroupItems(group, opts = {}) { - const { selectedTabs = [], splitViewIds = new Set(), activeFoldersIds = new Set() } = opts; + const { + selectedTabs = [], + splitViewIds = new Set(), + activeFoldersIds = new Set(), + } = opts; const folders = new Map(); return group.childGroupsAndTabs - .filter((item) => !item.hasAttribute("zen-empty-tab")) - .map((item) => { + .filter(item => !item.hasAttribute("zen-empty-tab")) + .map(item => { const isSplitView = item.group?.hasAttribute?.("split-view-group"); const itemGroup = isSplitView ? item.group.group : item.group; if (!folders.has(itemGroup?.id)) { @@ -1255,7 +1346,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { #createAnimation(items, targetState, opts, callback = () => {}) { items = Array.isArray(items) ? items : [items]; - return items.map((item) => + return items.map(item => gZenUIManager.motion.animate(item, targetState, opts).then(callback) ); } @@ -1265,7 +1356,8 @@ class nsZenFolders extends nsZenDOMOperatedFeature { if (selectedTabs.length) { return heightShift; } - heightShift += window.windowUtils.getBoundsWithoutFlushing(tabsContainer).height; + heightShift += + window.windowUtils.getBoundsWithoutFlushing(tabsContainer).height; if (tabsContainer.separatorElement) { heightShift -= window.windowUtils.getBoundsWithoutFlushing( tabsContainer.separatorElement @@ -1296,7 +1388,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { splitViewIds, activeFoldersIds, }); - const collapsedHeight = this.#calculateHeightShift(tabsContainer, selectedTabs); + const collapsedHeight = this.#calculateHeightShift( + tabsContainer, + selectedTabs + ); if (selectedTabs.length) { for (let i = 0; i < groupItems.length; i++) { @@ -1316,7 +1411,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { if (activeFolderId && activeFoldersIds.has(activeFolderId)) { // If item is tab-group-label-container we should hide it. // Other items between tab-group-labe-container and folder-active tab should be visible cuz they are hidden by margin-top - if (item.parentElement.id !== activeFolderId && !item.hasAttribute("folder-active")) { + if ( + item.parentElement.id !== activeFolderId && + !item.hasAttribute("folder-active") + ) { continue; } } @@ -1329,7 +1427,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { group.setAttribute("has-active", "true"); group.activeTabs = selectedTabs; - selectedTabs.forEach((tab) => { + selectedTabs.forEach(tab => { this.setFolderIndentation([tab], group, /* for collapse = */ true); }); } @@ -1346,7 +1444,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { ...this.#createAnimation( groupStart, { - marginTop: -(collapsedHeight + 4 * (selectedTabs.length === 0 ? 1 : 0)), + marginTop: -( + collapsedHeight + + 4 * (selectedTabs.length === 0 ? 1 : 0) + ), }, { duration, ease: "easeInOut" } ) @@ -1438,7 +1539,11 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } let activeGroup = folders.get(tabGroup?.id); if (activeGroup) { - this.setFolderIndentation([tab], activeGroup, /* for collapse = */ true); + this.setFolderIndentation( + [tab], + activeGroup, + /* for collapse = */ true + ); } else { // Since the folder is now expanded, we should remove active attribute // to the tab that was previously visible @@ -1536,7 +1641,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { async animateUnload(group, tabToUnload, ungroup = false) { const isSplitView = tabToUnload.group?.hasAttribute("split-view-group"); - if ((!group?.isZenFolder || !isSplitView) && !tabToUnload.hasAttribute("folder-active")) { + if ( + (!group?.isZenFolder || !isSplitView) && + !tabToUnload.hasAttribute("folder-active") + ) { return; } const animations = []; @@ -1544,7 +1652,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { const activeGroups = group.activeGroups; for (const folder of activeGroups) { - folder.activeTabs = folder.activeTabs.filter((tab) => tab !== tabToUnload); + folder.activeTabs = folder.activeTabs.filter(tab => tab !== tabToUnload); if (folder.activeTabs.length === 0) { lastTab = true; @@ -1561,7 +1669,10 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // the correct container size in the DOM tabsContainer.offsetHeight; tabsContainer.setAttribute("hidden", true); - const collapsedHeight = this.#calculateHeightShift(tabsContainer, []); + const collapsedHeight = this.#calculateHeightShift( + tabsContainer, + [] + ); groupStart.style.marginTop = `${-(collapsedHeight + 4)}px`; }; @@ -1612,7 +1723,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // Await the tab unload animation first await Promise.all(tabUnloadAnimations); - await Promise.all(animations.map((item) => (typeof item === "function" ? item() : item))); + await Promise.all( + animations.map(item => (typeof item === "function" ? item() : item)) + ); this.#animationCount -= 1; gBrowser.tabContainer._invalidateCachedTabs(); } @@ -1639,7 +1752,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { ? tab.group.group : tab?.group; while (currentGroup) { - const activeTabs = selectedTabs.filter((t) => currentGroup.tabs.includes(t)); + const activeTabs = selectedTabs.filter(t => + currentGroup.tabs.includes(t) + ); if (activeTabs.length) { if (currentGroup.collapsed) { if (currentGroup.hasAttribute("has-active")) { @@ -1717,7 +1832,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { // FIXME: This is a hack to fix the animations not working properly this.styleCleanup(itemsToShow); - itemsToHide.forEach((item) => { + itemsToHide.forEach(item => { item.style.opacity = 0; item.style.height = 0; }); @@ -1764,7 +1879,9 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } const groupStart = group.groupStartElement; const tabsContainer = group.groupContainer; - const heightContainer = expand ? 0 : this.#calculateHeightShift(tabsContainer, []); + const heightContainer = expand + ? 0 + : this.#calculateHeightShift(tabsContainer, []); tabsContainer.style.overflow = "clip"; this.#createAnimation( @@ -1777,7 +1894,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { } styleCleanup(items) { - items.forEach((item) => { + items.forEach(item => { item.style.removeProperty("opacity"); item.style.removeProperty("height"); }); diff --git a/src/zen/glance/ZenGlanceManager.mjs b/src/zen/glance/ZenGlanceManager.mjs index d33740cf0..1013fbe88 100644 --- a/src/zen/glance/ZenGlanceManager.mjs +++ b/src/zen/glance/ZenGlanceManager.mjs @@ -37,7 +37,8 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { ARC_HEIGHT_RATIO: 0.2, // Arc height = distance * ratio (capped at MAX_ARC_HEIGHT) }); - #GLANCE_ANIMATION_DURATION = Services.prefs.getIntPref("zen.glance.animation-duration") / 1000; + #GLANCE_ANIMATION_DURATION = + Services.prefs.getIntPref("zen.glance.animation-duration") / 1000; init() { this.#setupEventListeners(); @@ -74,9 +75,13 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { menuitem.setAttribute("hidden", "true"); menuitem.setAttribute("data-l10n-id", "zen-open-link-in-glance"); - menuitem.addEventListener("command", () => this.openGlance({ url: gContextMenu.linkURL })); + menuitem.addEventListener("command", () => + this.openGlance({ url: gContextMenu.linkURL }) + ); - document.getElementById("context-sep-open").insertAdjacentElement("beforebegin", menuitem); + document + .getElementById("context-sep-open") + .insertAdjacentElement("beforebegin", menuitem); } /** @@ -175,7 +180,8 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { currentTab._selected = true; const newTab = - existingTab ?? gBrowser.addTrustedTab(Services.io.newURI(url).spec, newTabOptions); + existingTab ?? + gBrowser.addTrustedTab(Services.io.newURI(url).spec, newTabOptions); this.#configureNewTab(newTab, currentTab, newUUID); this.#registerGlance(newTab, currentTab, newUUID); @@ -355,7 +361,11 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.#setAnimationState(true); const currentTab = ownerTab ?? gBrowser.selectedTab; - const browserElement = this.#createBrowserElement(data.url, currentTab, existingTab); + const browserElement = this.#createBrowserElement( + data.url, + currentTab, + existingTab + ); this.fillOverlay(browserElement); this.overlay.classList.add("zen-glance-overlay"); @@ -386,7 +396,7 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { // until a better solution is found). If we do it inside the requestAnimationFrame, // we see flashing and if we do it directly, the animation does not play at all. // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { + return new Promise(async resolve => { // Recalculate location. When opening from pinned tabs, // view splitter doesn't catch if the tab is a glance tab or not. gZenViewSplitter.onLocationChange(browserElement); @@ -496,7 +506,8 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { const imageDataElement = this.#createGlancePreviewElement(data.elementData); this.browserWrapper.prepend(imageDataElement); - this.#glances.get(this.#currentGlanceID).elementImageData = data.elementData; + this.#glances.get(this.#currentGlanceID).elementImageData = + data.elementData; gZenUIManager.motion.animate( imageDataElement, @@ -518,7 +529,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @param {Browser} browserElement - The browser element */ #configureBrowserElement(browserElement) { - const rect = window.windowUtils.getBoundsWithoutFlushing(this.browserWrapper.parentElement); + const rect = window.windowUtils.getBoundsWithoutFlushing( + this.browserWrapper.parentElement + ); const minWidth = rect.width * 0.85; const minHeight = rect.height * 0.85; @@ -574,7 +587,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.#animateParentBackground(); gZenUIManager.motion .animate(this.browserWrapper, arcSequence, { - duration: gZenUIManager.testingEnabled ? 0 : this.#GLANCE_ANIMATION_DURATION, + duration: gZenUIManager.testingEnabled + ? 0 + : this.#GLANCE_ANIMATION_DURATION, ease: "easeInOut", }) .then(() => { @@ -595,7 +610,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { // Calculate start and end positions based on direction let startPosition, endPosition; - const tabPanelsRect = window.windowUtils.getBoundsWithoutFlushing(gBrowser.tabpanels); + const tabPanelsRect = window.windowUtils.getBoundsWithoutFlushing( + gBrowser.tabpanels + ); const widthPercent = 0.85; if (direction === "opening") { @@ -658,12 +675,17 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { // First, create the main animation steps for (let i = 0; i <= steps; i++) { const progress = i / steps; - const eased = direction === "opening" ? easeOutBack(progress) : easeOutCubic(progress); + const eased = + direction === "opening" + ? easeOutBack(progress) + : easeOutCubic(progress); // Calculate size interpolation - const currentWidth = startPosition.width + (endPosition.width - startPosition.width) * eased; + const currentWidth = + startPosition.width + (endPosition.width - startPosition.width) * eased; const currentHeight = - startPosition.height + (endPosition.height - startPosition.height) * eased; + startPosition.height + + (endPosition.height - startPosition.height) * eased; // Calculate position on arc const distanceX = endPosition.x - startPosition.x; @@ -671,7 +693,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { const x = startPosition.x + distanceX * eased; const y = - startPosition.y + distanceY * eased + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2); + startPosition.y + + distanceY * eased + + arcDirection * arcHeight * (1 - (2 * eased - 1) ** 2); sequence.top.push(`${y}px`); sequence.left.push(`${x}px`); @@ -707,13 +731,16 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { // Calculate available space for the arc const availableTopSpace = Math.min(startPosition.y, endPosition.y); const viewportHeight = window.innerHeight; - const availableBottomSpace = viewportHeight - Math.max(startPosition.y, endPosition.y); + const availableBottomSpace = + viewportHeight - Math.max(startPosition.y, endPosition.y); // Determine if we should arc downward or upward based on available space const shouldArcDownward = availableBottomSpace > availableTopSpace; // Use the space in the direction we're arcing - const availableSpace = shouldArcDownward ? availableBottomSpace : availableTopSpace; + const availableSpace = shouldArcDownward + ? availableBottomSpace + : availableTopSpace; // Limit arc height to a percentage of the available space const arcHeight = Math.min( @@ -792,12 +819,17 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { return; } - const browserSidebarContainer = this.#currentParentTab?.linkedBrowser?.closest( - ".browserSidebarContainer" + const browserSidebarContainer = + this.#currentParentTab?.linkedBrowser?.closest( + ".browserSidebarContainer" + ); + const sidebarButtons = this.browserWrapper.querySelector( + ".zen-glance-sidebar-container" ); - const sidebarButtons = this.browserWrapper.querySelector(".zen-glance-sidebar-container"); - if (this.#handleConfirmationTimeout(onTabClose, hasFocused, sidebarButtons)) { + if ( + this.#handleConfirmationTimeout(onTabClose, hasFocused, sidebarButtons) + ) { return; } @@ -851,8 +883,15 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @returns {boolean} True if should return early */ #handleConfirmationTimeout(onTabClose, hasFocused, sidebarButtons) { - if (onTabClose && hasFocused && !this.#confirmationTimeout && sidebarButtons) { - const cancelButton = sidebarButtons.querySelector(".zen-glance-sidebar-close"); + if ( + onTabClose && + hasFocused && + !this.#confirmationTimeout && + sidebarButtons + ) { + const cancelButton = sidebarButtons.querySelector( + ".zen-glance-sidebar-close" + ); cancelButton.setAttribute("waitconfirmation", true); this.#confirmationTimeout = setTimeout(() => { cancelButton.removeAttribute("waitconfirmation"); @@ -871,7 +910,12 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @param {Element} sidebarButtons - The sidebar buttons * @param {string} setNewID - New glance ID to set */ - #animateGlanceClosing(onTabClose, browserSidebarContainer, sidebarButtons, setNewID) { + #animateGlanceClosing( + onTabClose, + browserSidebarContainer, + sidebarButtons, + setNewID + ) { if (this.closingGlance) { return; } @@ -976,14 +1020,19 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @returns {Promise} Promise that resolves when complete */ #executeClosingAnimation(setNewID, onTabClose) { - return new Promise((resolve) => { - const originalPosition = this.#glances.get(this.#currentGlanceID).originalPosition; - const elementImageData = this.#glances.get(this.#currentGlanceID).elementImageData; + return new Promise(resolve => { + const originalPosition = this.#glances.get( + this.#currentGlanceID + ).originalPosition; + const elementImageData = this.#glances.get( + this.#currentGlanceID + ).elementImageData; this.#addElementPreview(elementImageData); // Create curved closing animation sequence - const closingData = this.#createClosingDataFromOriginalPosition(originalPosition); + const closingData = + this.#createClosingDataFromOriginalPosition(originalPosition); const arcSequence = this.#createGlanceArcSequence(closingData, "closing"); gZenUIManager.motion @@ -993,7 +1042,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { }) .then(() => { // Remove element preview after closing animation - const elementPreview = this.browserWrapper.querySelector(".zen-glance-element-preview"); + const elementPreview = this.browserWrapper.querySelector( + ".zen-glance-element-preview" + ); if (elementPreview) { elementPreview.remove(); } @@ -1031,7 +1082,8 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { */ #addElementPreview(elementImageData) { if (elementImageData) { - const imageDataElement = this.#createGlancePreviewElement(elementImageData); + const imageDataElement = + this.#createGlancePreviewElement(elementImageData); this.browserWrapper.prepend(imageDataElement); } } @@ -1081,7 +1133,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.overlay.classList.remove("zen-glance-overlay"); gBrowser ._getSwitcher() - .setTabStateNoAction(lastCurrentTab, gBrowser.AsyncTabSwitcher.STATE_UNLOADED); + .setTabStateNoAction( + lastCurrentTab, + gBrowser.AsyncTabSwitcher.STATE_UNLOADED + ); if (!this.#currentParentTab.selected) { this.#currentParentTab._visuallySelected = false; @@ -1107,7 +1162,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.#ignoreClose = true; lastCurrentTab.dispatchEvent(new Event("GlanceClose", { bubbles: true })); - gBrowser.removeTab(lastCurrentTab, { animate: true, skipPermitUnload: true }); + gBrowser.removeTab(lastCurrentTab, { + animate: true, + skipPermitUnload: true, + }); gBrowser.tabContainer._invalidateCachedTabs(); } @@ -1192,7 +1250,12 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.#removeParentBackground(parentHasBrowser, browserContainer); if (!justAnimateParent && this.overlay) { - this.#resetGlanceStates(closeCurrentTab, closeParentTab, parentHasBrowser, browserContainer); + this.#resetGlanceStates( + closeCurrentTab, + closeParentTab, + parentHasBrowser, + browserContainer + ); } if (clearID) { @@ -1220,8 +1283,16 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @param {boolean} parentHasBrowser - Whether parent has browser * @param {Element} browserContainer - The browser container */ - #resetGlanceStates(closeCurrentTab, closeParentTab, parentHasBrowser, browserContainer) { - if (parentHasBrowser && !this.#currentParentTab.hasAttribute("split-view")) { + #resetGlanceStates( + closeCurrentTab, + closeParentTab, + parentHasBrowser, + browserContainer + ) { + if ( + parentHasBrowser && + !this.#currentParentTab.hasAttribute("split-view") + ) { if (closeParentTab) { browserContainer.classList.remove("deck-selected"); } @@ -1258,7 +1329,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.quickOpenGlance(); if (prevTab && prevTab.linkedBrowser) { prevTab.linkedBrowser.docShellIsActive = false; - prevTab.linkedBrowser.closest(".browserSidebarContainer").classList.remove("deck-selected"); + prevTab.linkedBrowser + .closest(".browserSidebarContainer") + .classList.remove("deck-selected"); } } } @@ -1284,7 +1357,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { return; } - if (this.#currentGlanceID && this.#currentGlanceID !== tab.getAttribute("glance-id")) { + if ( + this.#currentGlanceID && + this.#currentGlanceID !== tab.getAttribute("glance-id") + ) { this.quickCloseGlance(); } @@ -1375,7 +1451,11 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @returns {boolean} True if valid */ #isValidGlanceUrl(urlSpec) { - return urlSpec.startsWith("http") || urlSpec.startsWith("https") || urlSpec.startsWith("file"); + return ( + urlSpec.startsWith("http") || + urlSpec.startsWith("https") || + urlSpec.startsWith("file") + ); } /** @@ -1465,10 +1545,14 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { this.#handleZenFolderPinning(); gBrowser.moveTabAfter(this.#currentTab, this.#currentParentTab); - const browserRect = window.windowUtils.getBoundsWithoutFlushing(this.browserWrapper); + const browserRect = window.windowUtils.getBoundsWithoutFlushing( + this.browserWrapper + ); this.#prepareTabForFullOpen(); - const sidebarButtons = this.browserWrapper.querySelector(".zen-glance-sidebar-container"); + const sidebarButtons = this.browserWrapper.querySelector( + ".zen-glance-sidebar-container" + ); if (sidebarButtons) { sidebarButtons.remove(); } @@ -1493,7 +1577,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { */ #handleZenFolderPinning() { const isZenFolder = this.#currentParentTab?.group?.isZenFolder; - if (Services.prefs.getBoolPref("zen.folders.owned-tabs-in-folder") && isZenFolder) { + if ( + Services.prefs.getBoolPref("zen.folders.owned-tabs-in-folder") && + isZenFolder + ) { gBrowser.pinTab(this.#currentTab); } } @@ -1551,7 +1638,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @param {Event} event - The bookmark click event */ openGlanceForBookmark(event) { - const activationMethod = Services.prefs.getStringPref("zen.glance.activation-method", "ctrl"); + const activationMethod = Services.prefs.getStringPref( + "zen.glance.activation-method", + "ctrl" + ); if (!this.#isActivationKeyPressed(event, activationMethod)) { return; @@ -1590,7 +1680,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { */ #createGlanceDataFromBookmark(event) { const rect = window.windowUtils.getBoundsWithoutFlushing(event.target); - const tabPanelRect = window.windowUtils.getBoundsWithoutFlushing(gBrowser.tabpanels); + const tabPanelRect = window.windowUtils.getBoundsWithoutFlushing( + gBrowser.tabpanels + ); // the bookmark is most likely outisde the tabpanel, so we need to give a negative number // so it can be corrected later // eslint-disable-next-line no-shadow @@ -1631,7 +1723,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { gZenViewSplitter.splitTabs([currentTab, currentParentTab], "vsep", 1); - const browserContainer = currentTab.linkedBrowser?.closest(".browserSidebarContainer"); + const browserContainer = currentTab.linkedBrowser?.closest( + ".browserSidebarContainer" + ); if (!gReduceMotion && browserContainer) { gZenViewSplitter.animateBrowserDrop(browserContainer); } @@ -1644,7 +1738,10 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { */ #handleZenFolderPinningForSplit(parentTab) { const isZenFolder = parentTab?.group?.isZenFolder; - if (Services.prefs.getBoolPref("zen.folders.owned-tabs-in-folder") && isZenFolder) { + if ( + Services.prefs.getBoolPref("zen.folders.owned-tabs-in-folder") && + isZenFolder + ) { gBrowser.pinTab(this.#currentTab); } } @@ -1657,7 +1754,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { */ getTabOrGlanceParent(tab) { if (tab?.hasAttribute("glance-id") && this.#glances) { - const parentTab = this.#glances.get(tab.getAttribute("glance-id"))?.parentTab; + const parentTab = this.#glances.get( + tab.getAttribute("glance-id") + )?.parentTab; if (parentTab) { return parentTab; } @@ -1702,7 +1801,8 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { if (currentGlanceID && oldGlanceID) { return ( - currentGlanceID === oldGlanceID && oldPanel.classList.contains("zen-glance-background") + currentGlanceID === oldGlanceID && + oldPanel.classList.contains("zen-glance-background") ); } @@ -1752,7 +1852,9 @@ class nsZenGlanceManager extends nsZenDOMOperatedFeature { * @param {Tab} parentTab - Parent tab */ #openGlanceForSearch(currentTab, parentTab) { - const browserRect = window.windowUtils.getBoundsWithoutFlushing(gBrowser.tabbox); + const browserRect = window.windowUtils.getBoundsWithoutFlushing( + gBrowser.tabbox + ); const clickPosition = gZenUIManager._lastClickPosition || { clientX: browserRect.width / 2, clientY: browserRect.height / 2, diff --git a/src/zen/glance/actors/ZenGlanceChild.sys.mjs b/src/zen/glance/actors/ZenGlanceChild.sys.mjs index be742b247..6583c9ef2 100644 --- a/src/zen/glance/actors/ZenGlanceChild.sys.mjs +++ b/src/zen/glance/actors/ZenGlanceChild.sys.mjs @@ -17,7 +17,9 @@ export class ZenGlanceChild extends JSWindowActorChild { } async #initActivationMethod() { - this.#activationMethod = await this.sendQuery("ZenGlance:GetActivationMethod"); + this.#activationMethod = await this.sendQuery( + "ZenGlance:GetActivationMethod" + ); } #ensureOnlyKeyModifiers(event) { @@ -114,7 +116,9 @@ export class ZenGlanceChild extends JSWindowActorChild { return; } this.sendAsyncMessage("ZenGlance:CloseGlance", { - hasFocused: this.contentWindow.document.activeElement !== this.contentWindow.document.body, + hasFocused: + this.contentWindow.document.activeElement !== + this.contentWindow.document.body, }); } diff --git a/src/zen/glance/actors/ZenGlanceParent.sys.mjs b/src/zen/glance/actors/ZenGlanceParent.sys.mjs index 9c2aa9278..e5a366867 100644 --- a/src/zen/glance/actors/ZenGlanceParent.sys.mjs +++ b/src/zen/glance/actors/ZenGlanceParent.sys.mjs @@ -12,7 +12,10 @@ export class ZenGlanceParent extends JSWindowActorParent { async receiveMessage(message) { switch (message.name) { case "ZenGlance:GetActivationMethod": { - return Services.prefs.getStringPref("zen.glance.activation-method", "ctrl"); + return Services.prefs.getStringPref( + "zen.glance.activation-method", + "ctrl" + ); } case "ZenGlance:OpenGlance": { this.openGlance(this.browsingContext.topChromeWindow, message.data); @@ -23,11 +26,14 @@ export class ZenGlanceParent extends JSWindowActorParent { onTabClose: true, ...message.data, }; - this.browsingContext.topChromeWindow.gZenGlanceManager.closeGlance(params); + this.browsingContext.topChromeWindow.gZenGlanceManager.closeGlance( + params + ); break; } case "ZenGlance:RecordLinkClickData": { - this.browsingContext.topChromeWindow.gZenGlanceManager.lastLinkClickData = message.data; + this.browsingContext.topChromeWindow.gZenGlanceManager.lastLinkClickData = + message.data; break; } default: diff --git a/src/zen/glance/tests/GlanceTestUtils.sys.mjs b/src/zen/glance/tests/GlanceTestUtils.sys.mjs index 97bebf25f..e6d907908 100644 --- a/src/zen/glance/tests/GlanceTestUtils.sys.mjs +++ b/src/zen/glance/tests/GlanceTestUtils.sys.mjs @@ -4,7 +4,7 @@ export function openGlanceOnTab(window, callback, close = true) { // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { + return new Promise(async resolve => { window.gZenGlanceManager .openGlance({ url: "https://example.com", @@ -13,7 +13,7 @@ export function openGlanceOnTab(window, callback, close = true) { width: 0, height: 0, }) - .then(async (glanceTab) => { + .then(async glanceTab => { await callback(glanceTab); if (close) { window.gZenGlanceManager diff --git a/src/zen/kbs/ZenKeyboardShortcuts.mjs b/src/zen/kbs/ZenKeyboardShortcuts.mjs index ef3a916cf..bceb9e66b 100644 --- a/src/zen/kbs/ZenKeyboardShortcuts.mjs +++ b/src/zen/kbs/ZenKeyboardShortcuts.mjs @@ -111,16 +111,15 @@ const defaultKeyboardGroups = { "zen-bidi-switch-direction-shortcut", "zen-screenshot-shortcut", ], - devTools: [ - /*Filled automatically*/ - ], + devTools: [/*Filled automatically*/], }; const fixedL10nIds = { cmd_findPrevious: "zen-search-find-again-shortcut-prev", "Browser:ReloadSkipCache": "zen-nav-reload-shortcut-skip-cache", cmd_close: "zen-close-tab-shortcut", - "History:RestoreLastClosedTabOrWindowOrSession": "zen-restore-last-closed-tab-shortcut", + "History:RestoreLastClosedTabOrWindowOrSession": + "zen-restore-last-closed-tab-shortcut", }; const ZEN_MAIN_KEYSET_ID = "mainKeyset"; @@ -191,7 +190,13 @@ export class nsKeyShortcutModifiers { } // used to avoid any future changes to the object - static fromObject({ ctrl = false, alt = false, shift = false, meta = false, accel = false }) { + static fromObject({ + ctrl = false, + alt = false, + shift = false, + meta = false, + accel = false, + }) { return new nsKeyShortcutModifiers(ctrl, alt, shift, meta, accel); } @@ -270,7 +275,9 @@ export class nsKeyShortcutModifiers { } areAnyActive() { - return this.#control || this.#alt || this.#shift || this.#meta || this.#accel; + return ( + this.#control || this.#alt || this.#shift || this.#meta || this.#accel + ); } get control() { @@ -385,7 +392,9 @@ class KeyShortcut { KeyShortcut.sanitizeL10nId(key.getAttribute("data-l10n-id")), key.getAttribute("id") ), - nsKeyShortcutModifiers.parseFromXHTMLAttribute(key.getAttribute("modifiers")), + nsKeyShortcutModifiers.parseFromXHTMLAttribute( + key.getAttribute("modifiers") + ), key.getAttribute("command"), key.getAttribute("data-l10n-id"), key.getAttribute("disabled") == "true", @@ -589,7 +598,11 @@ class KeyShortcut { } isUserEditable() { - if (!this.#id || this.#internal || (this.#group == FIREFOX_SHORTCUTS_GROUP && this.#disabled)) { + if ( + !this.#id || + this.#internal || + (this.#group == FIREFOX_SHORTCUTS_GROUP && this.#disabled) + ) { return false; } return true; @@ -653,10 +666,14 @@ class nsZenKeyboardShortcutsLoader { let keySet = document.getElementById(ZEN_MAIN_KEYSET_ID); let newShortcutList = []; - const correctDefaultShortcut = (shortcut) => { + const correctDefaultShortcut = shortcut => { if (shortcut.getID() === "key_savePage") { shortcut.setModifiers( - nsKeyShortcutModifiers.fromObject({ accel: true, alt: true, shift: true }) + nsKeyShortcutModifiers.fromObject({ + accel: true, + alt: true, + shift: true, + }) ); } }; @@ -801,7 +818,10 @@ class nsZenKeyboardShortcutsLoader { } let parsed = KeyShortcut.parseFromXHTML(key, { group: "devTools" }); // Move "inspector" shortcut to use "L" key instead of "I" - if (parsed.getID() == "key_inspector" || parsed.getID() == "key_inspectorMac") { + if ( + parsed.getID() == "key_inspector" || + parsed.getID() == "key_inspectorMac" + ) { parsed.setNewBinding("L"); } newShortcutList.push(parsed); @@ -869,7 +889,7 @@ class nsZenKeyboardShortcutsVersioner { fillDefaultIfNotPresent(data) { for (let shortcut of nsZenKeyboardShortcutsLoader.zenGetDefaultShortcuts()) { // If it has an ID and we dont find it in the data, we add it - if (shortcut.getID() && !data.find((s) => s.getID() == shortcut.getID())) { + if (shortcut.getID() && !data.find(s => s.getID() == shortcut.getID())) { data.push(shortcut); } } @@ -919,7 +939,8 @@ class nsZenKeyboardShortcutsVersioner { // detection for internal keys was not working properly, so every internal // shortcut was being saved as a user-editable shortcut. // This migration will fix this issue. - const defaultShortcuts = nsZenKeyboardShortcutsLoader.zenGetDefaultShortcuts(); + const defaultShortcuts = + nsZenKeyboardShortcutsLoader.zenGetDefaultShortcuts(); // Get the default shortcut, compare the id and set the internal flag if needed for (let shortcut of data) { for (let defaultShortcut of defaultShortcuts) { @@ -933,7 +954,7 @@ class nsZenKeyboardShortcutsVersioner { // Migrate from 3 to 4 // In this new version, we are just removing the 'zen-toggle-sidebar' shortcut // since it's not used anymore. - data = data.filter((shortcut) => shortcut.getID() != "zen-toggle-sidebar"); + data = data.filter(shortcut => shortcut.getID() != "zen-toggle-sidebar"); } if (version < 5) { // Migrate from 4 to 5 @@ -968,11 +989,14 @@ class nsZenKeyboardShortcutsVersioner { if (version < 7) { // Migrate from 6 to 7 // In this new version, we add the devtools shortcuts - const listener = (event) => { + const listener = event => { event.stopPropagation(); - const devToolsShortcuts = nsZenKeyboardShortcutsLoader.zenGetDefaultDevToolsShortcuts(); - gZenKeyboardShortcutsManager.updatedDefaultDevtoolsShortcuts(devToolsShortcuts); + const devToolsShortcuts = + nsZenKeyboardShortcutsLoader.zenGetDefaultDevToolsShortcuts(); + gZenKeyboardShortcutsManager.updatedDefaultDevtoolsShortcuts( + devToolsShortcuts + ); window.removeEventListener("zen-devtools-keyset-added", listener); }; @@ -991,7 +1015,11 @@ class nsZenKeyboardShortcutsVersioner { "C", "", ZEN_OTHER_SHORTCUTS_GROUP, - nsKeyShortcutModifiers.fromObject({ accel: true, shift: true, alt: true }), + nsKeyShortcutModifiers.fromObject({ + accel: true, + shift: true, + alt: true, + }), "cmd_zenCopyCurrentURLMarkdown", "zen-text-action-copy-url-markdown-shortcut" ) @@ -1001,7 +1029,9 @@ class nsZenKeyboardShortcutsVersioner { // Migrate from version 8 to 9 // Due to security concerns, replace "code:" actions with corresponding IDs // we also remove 'zen-toggle-web-panel' since it's not used anymore - data = data.filter((shortcut) => shortcut.getID() != "zen-toggle-web-panel"); + data = data.filter( + shortcut => shortcut.getID() != "zen-toggle-web-panel" + ); for (let shortcut of data) { if (shortcut.getAction()?.startsWith("code:")) { const id = shortcut.getID(); @@ -1084,7 +1114,11 @@ class nsZenKeyboardShortcutsVersioner { // - Remove the built-in "Open File" keybinding; menu item remains available // - Remove default "Bookmark All Tabs" keybinding (Ctrl+Shift+D) to avoid conflict // - Remove "Stop" keybinding to avoid conflict with Firefox's built-in binding - const shouldBeEmptyShortcuts = ["openFileKb", "bookmarkAllTabsKb", "key_stop"]; + const shouldBeEmptyShortcuts = [ + "openFileKb", + "bookmarkAllTabsKb", + "key_stop", + ]; for (let shortcut of data) { if (shouldBeEmptyShortcuts.includes(shortcut.getID?.())) { shortcut.shouldBeEmpty = true; @@ -1092,7 +1126,9 @@ class nsZenKeyboardShortcutsVersioner { } // Also remove zen-compact-mode-show-toolbar - data = data.filter((shortcut) => shortcut.getID() != "zen-compact-mode-show-toolbar"); + data = data.filter( + shortcut => shortcut.getID() != "zen-compact-mode-show-toolbar" + ); } if (version < 13) { @@ -1130,7 +1166,10 @@ class nsZenKeyboardShortcutsVersioner { let emptySplitFound = false, undoCloseWindowFound = false; for (let shortcut of data) { - if (shortcut.getID() == "zen-new-empty-split-view" && AppConstants.platform == "macosx") { + if ( + shortcut.getID() == "zen-new-empty-split-view" && + AppConstants.platform == "macosx" + ) { if (shortcut.getKeyName() == "+") { shortcut.setNewBinding("*"); } @@ -1179,7 +1218,10 @@ window.gZenKeyboardShortcutsManager = { "zen.keyboard.shortcuts.disable-mainkeyset-clear", false ); - window.addEventListener("zen-devtools-keyset-added", this._hasAddedDevtoolShortcuts.bind(this)); + window.addEventListener( + "zen-devtools-keyset-added", + this._hasAddedDevtoolShortcuts.bind(this) + ); this.init(); }, @@ -1188,11 +1230,14 @@ window.gZenKeyboardShortcutsManager = { if (this.inBrowserView) { const loadedShortcuts = await this._loadSaved(); - this._currentShortcutList = this.versioner.fixedKeyboardShortcuts(loadedShortcuts); + this._currentShortcutList = + this.versioner.fixedKeyboardShortcuts(loadedShortcuts); this._applyShortcuts(); await this._saveShortcuts(); - window.dispatchEvent(new Event("ZenKeyboardShortcutsReady", { bubbles: true })); + window.dispatchEvent( + new Event("ZenKeyboardShortcutsReady", { bubbles: true }) + ); } }, @@ -1210,12 +1255,16 @@ window.gZenKeyboardShortcutsManager = { try { return KeyShortcut.parseFromSaved(data); } catch (e) { - console.error("Zen CKS: Error parsing saved shortcuts. Resetting to defaults...", e); + console.error( + "Zen CKS: Error parsing saved shortcuts. Resetting to defaults...", + e + ); gNotificationBox.appendNotification( "zen-shortcuts-corrupted", { label: { "l10n-id": "zen-shortcuts-corrupted" }, - image: "chrome://browser/skin/notification-icons/persistent-storage-blocked.svg", + image: + "chrome://browser/skin/notification-icons/persistent-storage-blocked.svg", priority: gNotificationBox.PRIORITY_WARNING_HIGH, }, [] @@ -1325,12 +1374,17 @@ window.gZenKeyboardShortcutsManager = { if (!browser.gZenKeyboardShortcutsManager?._hasToLoadDevtools) { return; } - let devtoolsKeyset = browser.gZenKeyboardShortcutsManager.getZenDevtoolsKeyset(browser); + let devtoolsKeyset = + browser.gZenKeyboardShortcutsManager.getZenDevtoolsKeyset(browser); for (let key of this._currentShortcutList) { if (key.getGroup() != "devTools") { continue; } - if (nsZenKeyboardShortcutsLoader.IGNORED_DEVTOOLS_SHORTCUTS.includes(key.getID())) { + if ( + nsZenKeyboardShortcutsLoader.IGNORED_DEVTOOLS_SHORTCUTS.includes( + key.getID() + ) + ) { continue; } const originalKey = browser.document.getElementById(key.getID()); @@ -1345,7 +1399,9 @@ window.gZenKeyboardShortcutsManager = { } } - const originalDevKeyset = browser.document.getElementById(ZEN_DEVTOOLS_KEYSET_ID); + const originalDevKeyset = browser.document.getElementById( + ZEN_DEVTOOLS_KEYSET_ID + ); originalDevKeyset.after(devtoolsKeyset); }, diff --git a/src/zen/live-folders/ZenLiveFolder.sys.mjs b/src/zen/live-folders/ZenLiveFolder.sys.mjs index 8085b9a26..821a1fb29 100644 --- a/src/zen/live-folders/ZenLiveFolder.sys.mjs +++ b/src/zen/live-folders/ZenLiveFolder.sys.mjs @@ -5,7 +5,8 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { NetUtil: "resource://gre/modules/NetUtil.sys.mjs", DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs", - NetworkHelper: "resource://devtools/shared/network-observer/NetworkHelper.sys.mjs", + NetworkHelper: + "resource://devtools/shared/network-observer/NetworkHelper.sys.mjs", }); export class nsZenLiveFolderProvider { @@ -135,7 +136,10 @@ export class nsZenLiveFolderProvider { userContextId = space.containerTabId || 0; } } - const principal = Services.scriptSecurityManager.createContentPrincipal(uri, { userContextId }); + const principal = Services.scriptSecurityManager.createContentPrincipal( + uri, + { userContextId } + ); const channel = lazy.NetUtil.newChannel({ uri, @@ -169,7 +173,7 @@ export class nsZenLiveFolderProvider { byteChunks.push(lazy.NetUtil.readInputStream(stream, count)); } }, - onStartRequest: (request) => { + onStartRequest: request => { const http = request.QueryInterface(Ci.nsIHttpChannel); try { @@ -182,7 +186,10 @@ export class nsZenLiveFolderProvider { contentType = http.getResponseHeader("content-type"); } catch (ex) {} - if (contentType && !lazy.NetworkHelper.isTextMimeType(contentType.split(";")[0].trim())) { + if ( + contentType && + !lazy.NetworkHelper.isTextMimeType(contentType.split(";")[0].trim()) + ) { request.cancel(Cr.NS_ERROR_FILE_UNKNOWN_TYPE); } @@ -215,7 +222,9 @@ export class nsZenLiveFolderProvider { let effectiveCharset = "utf-8"; - const mimeType = contentType ? contentType.split(";")[0].trim().toLowerCase() : ""; + const mimeType = contentType + ? contentType.split(";")[0].trim().toLowerCase() + : ""; if (mimeType === "text/html") { effectiveCharset = this.sniffCharset(bytes, headerCharset); } else if (headerCharset) { @@ -252,7 +261,12 @@ export class nsZenLiveFolderProvider { */ sniffCharset(bytes, headerCharset = "") { // 1. BOM detection (highest priority) - if (bytes.length >= 3 && bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf) { + if ( + bytes.length >= 3 && + bytes[0] === 0xef && + bytes[1] === 0xbb && + bytes[2] === 0xbf + ) { return "utf-8"; } if (bytes.length >= 2) { @@ -269,7 +283,9 @@ export class nsZenLiveFolderProvider { // is more likely to be correct. try { const headLen = Math.min(bytes.length, 8192); - const head = new TextDecoder("windows-1252").decode(bytes.subarray(0, headLen)); + const head = new TextDecoder("windows-1252").decode( + bytes.subarray(0, headLen) + ); const metaCharsetRegex = / !itemId.startsWith(prefix)) + Array.from(this.dismissedItems).filter( + itemId => !itemId.startsWith(prefix) + ) ); if (deleteFolder) { @@ -351,7 +358,9 @@ class nsZenLiveFoldersManager { } // itemid -> id:itemid - const itemIds = new Set(items.map((item) => this.#makeCompositeId(liveFolder.id, item.id))); + const itemIds = new Set( + items.map(item => this.#makeCompositeId(liveFolder.id, item.id)) + ); const outdatedTabs = []; const existingItemIds = new Set(); @@ -377,7 +386,10 @@ class nsZenLiveFoldersManager { // Remove the dismissed items that are no longer in the given list for (const dismissedItemId of this.dismissedItems) { - if (dismissedItemId.startsWith(`${liveFolder.id}:`) && !itemIds.has(dismissedItemId)) { + if ( + dismissedItemId.startsWith(`${liveFolder.id}:`) && + !itemIds.has(dismissedItemId) + ) { this.dismissedItems.delete(dismissedItemId); } } @@ -392,11 +404,14 @@ class nsZenLiveFoldersManager { // Only add the items that are not already in the folder and was not dismissed by the user const newItems = items - .filter((item) => { + .filter(item => { const compositeId = this.#makeCompositeId(liveFolder.id, item.id); - return !existingItemIds.has(compositeId) && !this.dismissedItems.has(compositeId); + return ( + !existingItemIds.has(compositeId) && + !this.dismissedItems.has(compositeId) + ); }) - .map((item) => { + .map(item => { const tab = this.window.gBrowser.addTrustedTab(item.url, { createLazyBrowser: true, inBackground: true, @@ -418,7 +433,10 @@ class nsZenLiveFoldersManager { }); } } - tab.setAttribute("zen-live-folder-item-id", this.#makeCompositeId(liveFolder.id, item.id)); + tab.setAttribute( + "zen-live-folder-item-id", + this.#makeCompositeId(liveFolder.id, item.id) + ); if (item.subtitle) { tab.setAttribute("zen-show-sublabel", item.subtitle); const tabLabel = tab.querySelector(".zen-tab-sublabel"); @@ -471,7 +489,10 @@ class nsZenLiveFoldersManager { if (!this.window) { return null; } - const folder = lazy.ZenWindowSync.getItemFromWindow(this.window, liveFolder.id); + const folder = lazy.ZenWindowSync.getItemFromWindow( + this.window, + liveFolder.id + ); if (folder?.isZenFolder) { return folder; } @@ -516,7 +537,7 @@ class nsZenLiveFoldersManager { let data = []; for (let [id, liveFolder] of this.liveFolders) { const prefix = `${id}:`; - const dismissedItems = Array.from(this.dismissedItems).filter((itemId) => + const dismissedItems = Array.from(this.dismissedItems).filter(itemId => itemId.startsWith(prefix) ); @@ -568,7 +589,7 @@ class nsZenLiveFoldersManager { continue; } - const folder = folders.find((x) => x.id === entry.id); + const folder = folders.find(x => x.id === entry.id); if (!folder) { // No point restore if the live folder can't find its folder continue; @@ -585,7 +606,7 @@ class nsZenLiveFoldersManager { liveFolder.tabsState = entry.tabsState || []; liveFolder.state.lastErrorId = entry.data.state.lastErrorId; if (entry.dismissedItems && Array.isArray(entry.dismissedItems)) { - entry.dismissedItems.forEach((id) => this.dismissedItems.add(id)); + entry.dismissedItems.forEach(id => this.dismissedItems.add(id)); } liveFolder.start(); diff --git a/src/zen/live-folders/ZenLiveFoldersUI.mjs b/src/zen/live-folders/ZenLiveFoldersUI.mjs index beef84d3f..fa1e1b8bc 100644 --- a/src/zen/live-folders/ZenLiveFoldersUI.mjs +++ b/src/zen/live-folders/ZenLiveFoldersUI.mjs @@ -4,7 +4,8 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - ZenLiveFoldersManager: "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", + ZenLiveFoldersManager: + "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", }); class nsZenLiveFoldersUI { @@ -13,7 +14,7 @@ class nsZenLiveFoldersUI { .getElementById("context_zenLiveFolderOptions") .querySelector("menupopup"); - popup.addEventListener("command", (event) => { + popup.addEventListener("command", event => { const option = event.target; const folderId = option.getAttribute("option-folder"); @@ -36,7 +37,9 @@ class nsZenLiveFoldersUI { } #restoreUIStateForLiveFolder(liveFolder) { - const folder = window.gZenWorkspaces.allTabGroups.find((x) => x.id === liveFolder.id); + const folder = window.gZenWorkspaces.allTabGroups.find( + x => x.id === liveFolder.id + ); if (!folder) { return; } @@ -47,7 +50,9 @@ class nsZenLiveFoldersUI { } for (const { itemId, label } of liveFolder.tabsState) { - const tab = folder.tabs.find((t) => t.getAttribute("zen-live-folder-item-id") === itemId); + const tab = folder.tabs.find( + t => t.getAttribute("zen-live-folder-item-id") === itemId + ); if (tab && label) { const tabLabel = tab.querySelector(".zen-tab-sublabel"); tab.setAttribute("zen-show-sublabel", label); @@ -122,7 +127,9 @@ class nsZenLiveFoldersUI { } buildContextMenu(folder) { - const optionsElement = document.getElementById("context_zenLiveFolderOptions"); + const optionsElement = document.getElementById( + "context_zenLiveFolderOptions" + ); let hidden = true; if (folder.isLiveFolder) { @@ -141,8 +148,9 @@ class nsZenLiveFoldersUI { intervals.push({ hours }); } - intervals = intervals.map((entry) => { - const ms = "mins" in entry ? entry.mins * MINUTE_MS : entry.hours * HOUR_MS; + intervals = intervals.map(entry => { + const ms = + "mins" in entry ? entry.mins * MINUTE_MS : entry.hours * HOUR_MS; return { l10nId: @@ -162,7 +170,8 @@ class nsZenLiveFoldersUI { const contextMenuItems = [ { key: "lastFetched", - l10nId: liveFolder.state.lastErrorId || "zen-live-folder-last-fetched", + l10nId: + liveFolder.state.lastErrorId || "zen-live-folder-last-fetched", l10nArgs: { time: this.#timeAgo(liveFolder.state.lastFetched) }, disabled: true, }, @@ -194,7 +203,9 @@ class nsZenLiveFoldersUI { return "-"; } - const rtf = new Intl.RelativeTimeFormat(Services.locale.appLocaleAsBCP47, { numeric: "auto" }); + const rtf = new Intl.RelativeTimeFormat(Services.locale.appLocaleAsBCP47, { + numeric: "auto", + }); const secondsDiff = (date - Date.now()) / 1000; const absSeconds = Math.abs(secondsDiff); diff --git a/src/zen/live-folders/providers/GithubLiveFolder.sys.mjs b/src/zen/live-folders/providers/GithubLiveFolder.sys.mjs index 4667905c0..bd8074fea 100644 --- a/src/zen/live-folders/providers/GithubLiveFolder.sys.mjs +++ b/src/zen/live-folders/providers/GithubLiveFolder.sys.mjs @@ -47,9 +47,15 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider { const activeRepos = new Set(); if (issues.length) { - const authors = document.querySelectorAll("a[class^=IssueItem-module__authorCreatedLink]"); - const titles = document.querySelectorAll("div[class^=Title-module__container]"); - const links = document.querySelectorAll('[data-testid="issue-pr-title-link"]'); + const authors = document.querySelectorAll( + "a[class^=IssueItem-module__authorCreatedLink]" + ); + const titles = document.querySelectorAll( + "div[class^=Title-module__container]" + ); + const links = document.querySelectorAll( + '[data-testid="issue-pr-title-link"]' + ); for (let i = 0; i < issues.length; i++) { const [rawRepo, rawNumber] = issues[i].childNodes; @@ -131,7 +137,7 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider { let outputString = ""; for (const option of options) { if (Array.isArray(option)) { - const enabledOptions = option.filter((x) => x.enabled).map((x) => x.value); + const enabledOptions = option.filter(x => x.enabled).map(x => x.value); if (enabledOptions.length) { outputString += ` (${enabledOptions.join(" OR ")}) `; } @@ -151,7 +157,7 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider { const excluded = this.state.options.repoExcludes; const repoOptions = Array.from(this.state.repos.union(excluded)) .sort((a, b) => a.localeCompare(b)) - .map((repo) => ({ + .map(repo => ({ l10nId: "zen-live-folder-github-option-repo", l10nArgs: { repo }, @@ -204,7 +210,7 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider { const key = option.getAttribute("option-key"); const checked = option.getAttribute("checked") === "true"; - if (!this.options.some((x) => x.key === key)) { + if (!this.options.some(x => x.key === key)) { return; } @@ -235,7 +241,9 @@ export class nsGithubLiveFolderProvider extends nsZenLiveFolderProvider { switch (errorId) { case "zen-live-folder-github-no-auth": { - const tab = this.manager.window.gBrowser.addTrustedTab("https://github.com/login"); + const tab = this.manager.window.gBrowser.addTrustedTab( + "https://github.com/login" + ); this.manager.window.gBrowser.selectedTab = tab; break; } diff --git a/src/zen/live-folders/providers/RssLiveFolder.sys.mjs b/src/zen/live-folders/providers/RssLiveFolder.sys.mjs index 95367798f..eff6bed3c 100644 --- a/src/zen/live-folders/providers/RssLiveFolder.sys.mjs +++ b/src/zen/live-folders/providers/RssLiveFolder.sys.mjs @@ -39,29 +39,35 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { const elements = doc.querySelectorAll(selector); const items = Array.from(elements) - .map((item) => { + .map(item => { const title = item.querySelector("title")?.textContent || ""; const linkNode = item.querySelector("link"); const url = - isAtom && linkNode ? linkNode.getAttribute("href") : linkNode?.textContent || ""; + isAtom && linkNode + ? linkNode.getAttribute("href") + : linkNode?.textContent || ""; const guid = item.querySelector(isAtom ? "id" : "guid")?.textContent; const id = guid || url; - const dateStr = item.querySelector(isAtom ? "updated" : "pubDate")?.textContent; + const dateStr = item.querySelector( + isAtom ? "updated" : "pubDate" + )?.textContent; const date = dateStr ? new Date(dateStr) : null; return { title, url, id, date }; }) - .filter((item) => { + .filter(item => { if (!item.url || !item.date) { return false; } if (!this.state.timeRange) { return true; } - return !isNaN(item.date.getTime()) && item.date.getTime() >= cutoffTime; + return ( + !isNaN(item.date.getTime()) && item.date.getTime() >= cutoffTime + ); }) .slice(0, this.state.maxItems); for (let item of items) { @@ -99,7 +105,7 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { _buildItemLimitOptions() { const entries = [5, 10, 25, 50]; - return entries.map((entry) => { + return entries.map(entry => { return this._buildRadioOption({ key: "maxItems", value: entry, @@ -128,13 +134,15 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { l10nId: "zen-live-folder-time-range-all-time", }), { type: "separator" }, - ...entries.map((entry) => { + ...entries.map(entry => { const isDays = "days" in entry; return this._buildRadioOption({ key: "timeRange", value: entry.ms, - l10nId: isDays ? "zen-live-folder-time-range-days" : "zen-live-folder-time-range-hours", + l10nId: isDays + ? "zen-live-folder-time-range-days" + : "zen-live-folder-time-range-hours", l10nArgs: isDays ? { days: entry.days } : { hours: entry.hours }, }); }), @@ -165,7 +173,10 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { try { const response = await fetch(url); if (!response.ok) { - return { label: "", icon: window.gZenEmojiPicker.getSVGURL("logo-rss.svg") }; + return { + label: "", + icon: window.gZenEmojiPicker.getSVGURL("logo-rss.svg"), + }; } const text = await response.text(); @@ -175,14 +186,20 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { const title = ( isAtom ? doc.querySelector("feed > title")?.textContent - : doc.querySelector("rss > channel > title, channel > title")?.textContent + : doc.querySelector("rss > channel > title, channel > title") + ?.textContent )?.trim(); const linkNode = isAtom - ? doc.querySelector("feed > link[rel='alternate'][href], feed > link[href]") + ? doc.querySelector( + "feed > link[rel='alternate'][href], feed > link[href]" + ) : doc.querySelector("rss > channel > link, channel > link"); const feedLink = - (isAtom ? linkNode?.getAttribute("href") : linkNode?.textContent)?.trim() || ""; + (isAtom + ? linkNode?.getAttribute("href") + : linkNode?.textContent + )?.trim() || ""; const faviconPageUrl = feedLink ? new URL(feedLink, url).href : url; let favicon = await lazy.PlacesUtils.favicons.getFaviconForPage( @@ -191,16 +208,23 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { return { label: title || "", - icon: favicon?.dataURI.spec || window.gZenEmojiPicker.getSVGURL("logo-rss.svg"), + icon: + favicon?.dataURI.spec || + window.gZenEmojiPicker.getSVGURL("logo-rss.svg"), }; } catch (e) { - return { label: "", icon: window.gZenEmojiPicker.getSVGURL("logo-rss.svg") }; + return { + label: "", + icon: window.gZenEmojiPicker.getSVGURL("logo-rss.svg"), + }; } } static async promptForFeedUrl(window, initialUrl = "") { const input = { value: initialUrl }; - const [prompt] = await lazy.l10n.formatValues(["zen-live-folder-rss-prompt-feed-url"]); + const [prompt] = await lazy.l10n.formatValues([ + "zen-live-folder-rss-prompt-feed-url", + ]); const promptOk = Services.prompt.prompt(window, prompt, null, input, null, { value: null, }); @@ -228,7 +252,10 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { } async getMetadata() { - return nsRssLiveFolderProvider.getMetadata(this.state.url, this.manager.window); + return nsRssLiveFolderProvider.getMetadata( + this.state.url, + this.manager.window + ); } async onOptionTrigger(option) { @@ -237,7 +264,7 @@ export class nsRssLiveFolderProvider extends nsZenLiveFolderProvider { const key = option.getAttribute("option-key"); const value = option.getAttribute("option-value"); - if (!this.options.some((x) => x.key === key)) { + if (!this.options.some(x => x.key === key)) { return; } diff --git a/src/zen/media/ZenMediaController.mjs b/src/zen/media/ZenMediaController.mjs index 9a396fc84..bb91a97a9 100644 --- a/src/zen/media/ZenMediaController.mjs +++ b/src/zen/media/ZenMediaController.mjs @@ -43,12 +43,16 @@ class nsZenMediaController { this.mediaTitle = document.querySelector("#zen-media-title"); this.mediaArtist = document.querySelector("#zen-media-artist"); - this.mediaControlBar = document.querySelector("#zen-media-controls-toolbar"); + this.mediaControlBar = document.querySelector( + "#zen-media-controls-toolbar" + ); this.mediaProgressBar = document.querySelector("#zen-media-progress-bar"); this.mediaCurrentTime = document.querySelector("#zen-media-current-time"); this.mediaDuration = document.querySelector("#zen-media-duration"); this.mediaFocusButton = document.querySelector("#zen-media-focus-button"); - this.mediaProgressBarContainer = document.querySelector("#zen-media-progress-hbox"); + this.mediaProgressBarContainer = document.querySelector( + "#zen-media-progress-hbox" + ); this.onPositionstateChange = this._onPositionstateChange.bind(this); this.onPlaybackstateChange = this._onPlaybackstateChange.bind(this); @@ -61,14 +65,14 @@ class nsZenMediaController { } #initEventListeners() { - this.mediaControlBar.addEventListener("mousedown", (event) => { + this.mediaControlBar.addEventListener("mousedown", event => { if (event.target.closest(":is(toolbarbutton,#zen-media-progress-hbox)")) { return; } this.onMediaFocus(); }); - this.mediaControlBar.addEventListener("command", (event) => { + this.mediaControlBar.addEventListener("command", event => { const button = event.target.closest("toolbarbutton"); if (!button) { return; @@ -104,10 +108,16 @@ class nsZenMediaController { } }); - this.mediaProgressBar.addEventListener("input", this.onMediaSeekDrag.bind(this)); - this.mediaProgressBar.addEventListener("change", this.onMediaSeekComplete.bind(this)); + this.mediaProgressBar.addEventListener( + "input", + this.onMediaSeekDrag.bind(this) + ); + this.mediaProgressBar.addEventListener( + "change", + this.onMediaSeekComplete.bind(this) + ); - window.addEventListener("TabSelect", (event) => { + window.addEventListener("TabSelect", event => { if (this.isSharing) { return; } @@ -140,7 +150,7 @@ class nsZenMediaController { window.addEventListener("TabClose", onTabDiscardedOrClosed); window.addEventListener("TabBrowserDiscarded", onTabDiscardedOrClosed); - window.addEventListener("DOMAudioPlaybackStarted", (event) => { + window.addEventListener("DOMAudioPlaybackStarted", event => { setTimeout(() => { if ( this._currentMediaController?.isPlaying && @@ -154,15 +164,21 @@ class nsZenMediaController { } }, 1000); - this.activateMediaControls(event.target.browsingContext.mediaController, event.target); + this.activateMediaControls( + event.target.browsingContext.mediaController, + event.target + ); }); - window.addEventListener("DOMAudioPlaybackStopped", () => this.updateMuteState()); + window.addEventListener("DOMAudioPlaybackStopped", () => + this.updateMuteState() + ); } onTabDiscardedOrClosed(event) { const { linkedBrowser } = event.target; - const isCurrentBrowser = linkedBrowser?.browserId === this._currentBrowser?.browserId; + const isCurrentBrowser = + linkedBrowser?.browserId === this._currentBrowser?.browserId; if (isCurrentBrowser) { this.isSharing = false; @@ -186,11 +202,26 @@ class nsZenMediaController { shouldHide = true ) { if (shouldForget && mediaController) { - mediaController.removeEventListener("pictureinpicturemodechange", this.onPipModeChange); - mediaController.removeEventListener("positionstatechange", this.onPositionstateChange); - mediaController.removeEventListener("playbackstatechange", this.onPlaybackstateChange); - mediaController.removeEventListener("supportedkeyschange", this.onSupportedKeysChange); - mediaController.removeEventListener("metadatachange", this.onMetadataChange); + mediaController.removeEventListener( + "pictureinpicturemodechange", + this.onPipModeChange + ); + mediaController.removeEventListener( + "positionstatechange", + this.onPositionstateChange + ); + mediaController.removeEventListener( + "playbackstatechange", + this.onPlaybackstateChange + ); + mediaController.removeEventListener( + "supportedkeyschange", + this.onSupportedKeysChange + ); + mediaController.removeEventListener( + "metadatachange", + this.onMetadataChange + ); mediaController.removeEventListener("deactivated", this.onDeactivated); this.mediaControllersMap.delete(mediaController.id); @@ -219,7 +250,10 @@ class nsZenMediaController { set isSharing(value) { if (this._currentBrowser?.browsingContext && !value) { - const webRTC = this._currentBrowser.browsingContext.currentWindowGlobal.getActor("WebRTC"); + const webRTC = + this._currentBrowser.browsingContext.currentWindowGlobal.getActor( + "WebRTC" + ); webRTC.sendAsyncMessage("webrtc:UnmuteMicrophone"); webRTC.sendAsyncMessage("webrtc:UnmuteCamera"); } @@ -281,7 +315,9 @@ class nsZenMediaController { this.mediaControlBar.removeAttribute("hidden"); window.requestAnimationFrame(() => { this.mediaControlBar.style.height = - this.mediaControlBar.querySelector("toolbaritem").getBoundingClientRect().height + "px"; + this.mediaControlBar + .querySelector("toolbaritem") + .getBoundingClientRect().height + "px"; this.mediaControlBar.style.opacity = 0; gZenUIManager.updateTabsToolbar(); gZenUIManager.motion.animate( @@ -326,7 +362,8 @@ class nsZenMediaController { } const iconURL = - this._currentBrowser.mIconURL || `page-icon:${this._currentBrowser.currentURI.spec}`; + this._currentBrowser.mIconURL || + `page-icon:${this._currentBrowser.currentURI.spec}`; this.mediaFocusButton.style.listStyleImage = `url(${iconURL})`; this.mediaTitle.textContent = metadata.title || ""; @@ -341,8 +378,11 @@ class nsZenMediaController { this.updateMediaPosition(); for (const key of this.supportedKeys) { - const button = this.mediaControlBar.querySelector(`#zen-media-${key}-button`); - button.disabled = !this._currentMediaController.supportedKeys.includes(key); + const button = this.mediaControlBar.querySelector( + `#zen-media-${key}-button` + ); + button.disabled = + !this._currentMediaController.supportedKeys.includes(key); } } @@ -350,7 +390,10 @@ class nsZenMediaController { this.updateMuteState(); this.switchController(); - if (!mediaController.isActive || this._currentBrowser?.browserId === browser.browserId) { + if ( + !mediaController.isActive || + this._currentBrowser?.browserId === browser.browserId + ) { return; } @@ -370,21 +413,36 @@ class nsZenMediaController { this.setupMediaControlUI(metadata, positionState); } - mediaController.addEventListener("pictureinpicturemodechange", this.onPipModeChange); - mediaController.addEventListener("positionstatechange", this.onPositionstateChange); - mediaController.addEventListener("playbackstatechange", this.onPlaybackstateChange); - mediaController.addEventListener("supportedkeyschange", this.onSupportedKeysChange); + mediaController.addEventListener( + "pictureinpicturemodechange", + this.onPipModeChange + ); + mediaController.addEventListener( + "positionstatechange", + this.onPositionstateChange + ); + mediaController.addEventListener( + "playbackstatechange", + this.onPlaybackstateChange + ); + mediaController.addEventListener( + "supportedkeyschange", + this.onSupportedKeysChange + ); mediaController.addEventListener("metadatachange", this.onMetadataChange); mediaController.addEventListener("deactivated", this.onDeactivated); } activateMediaDeviceControls(browser) { - if (browser?.browsingContext.currentWindowGlobal.hasActivePeerConnections()) { + if ( + browser?.browsingContext.currentWindowGlobal.hasActivePeerConnections() + ) { this.mediaControlBar.removeAttribute("can-pip"); this._currentBrowser = browser; const tab = window.gBrowser.getTabForBrowser(browser); - const iconURL = browser.mIconURL || `page-icon:${browser.currentURI.spec}`; + const iconURL = + browser.mIconURL || `page-icon:${browser.currentURI.spec}`; this.isSharing = true; @@ -401,14 +459,16 @@ class nsZenMediaController { for (const browser of window.gBrowser.browsers) { const isMatch = browser.innerWindowID === windowId; - const isCurrentBrowser = this._currentBrowser?.browserId === browser.browserId; + const isCurrentBrowser = + this._currentBrowser?.browserId === browser.browserId; const shouldShow = showCameraIndicator || showMicrophoneIndicator; if (!isMatch) { continue; } if (shouldShow && !(isCurrentBrowser && this.isSharing)) { - const webRTC = browser.browsingContext.currentWindowGlobal.getActor("WebRTC"); + const webRTC = + browser.browsingContext.currentWindowGlobal.getActor("WebRTC"); webRTC.sendAsyncMessage("webrtc:UnmuteMicrophone"); webRTC.sendAsyncMessage("webrtc:UnmuteCamera"); @@ -417,9 +477,11 @@ class nsZenMediaController { } if (this._currentMediaController) { this._currentMediaController.pause(); - this.deinitMediaController(this._currentMediaController, true, true).then(() => - this.activateMediaDeviceControls(browser) - ); + this.deinitMediaController( + this._currentMediaController, + true, + true + ).then(() => this.activateMediaDeviceControls(browser)); } else { this.activateMediaDeviceControls(browser); } @@ -457,7 +519,9 @@ class nsZenMediaController { return; } for (const key of this.supportedKeys) { - const button = this.mediaControlBar.querySelector(`#zen-media-${key}-button`); + const button = this.mediaControlBar.querySelector( + `#zen-media-${key}-button` + ); button.disabled = !event.target.supportedKeys.includes(key); } } @@ -505,7 +569,7 @@ class nsZenMediaController { if (!this._currentMediaController?.isPlaying || force) { const nextController = Array.from(this.mediaControllersMap.values()) .filter( - (ctrl) => + ctrl => ctrl.controller.isPlaying && gBrowser.selectedBrowser.browserId !== ctrl.browser.browserId && ctrl.controller.id !== this._currentMediaController?.id @@ -514,13 +578,23 @@ class nsZenMediaController { .shift(); if (nextController) { - this.deinitMediaController(this._currentMediaController, false, true).then(() => { - this.setupMediaController(nextController.controller, nextController.browser); - const elapsedTime = Math.floor((Date.now() - nextController.lastUpdated) / 1000); + this.deinitMediaController( + this._currentMediaController, + false, + true + ).then(() => { + this.setupMediaController( + nextController.controller, + nextController.browser + ); + const elapsedTime = Math.floor( + (Date.now() - nextController.lastUpdated) / 1000 + ); this.setupMediaControlUI(nextController.controller.getMetadata(), { position: - nextController.position + (nextController.controller.isPlaying ? elapsedTime : 0), + nextController.position + + (nextController.controller.isPlaying ? elapsedTime : 0), duration: nextController.duration, playbackRate: nextController.playbackRate, }); @@ -550,9 +624,14 @@ class nsZenMediaController { return; } - this.mediaCurrentTime.textContent = this.formatSecondsToTime(this._currentPosition); - this.mediaDuration.textContent = this.formatSecondsToTime(this._currentDuration); - this.mediaProgressBar.value = (this._currentPosition / this._currentDuration) * 100; + this.mediaCurrentTime.textContent = this.formatSecondsToTime( + this._currentPosition + ); + this.mediaDuration.textContent = this.formatSecondsToTime( + this._currentDuration + ); + this.mediaProgressBar.value = + (this._currentPosition / this._currentDuration) * 100; this._mediaUpdateInterval = setInterval(() => { if (this._currentMediaController?.isPlaying) { @@ -560,8 +639,11 @@ class nsZenMediaController { if (this._currentPosition > this._currentDuration) { this._currentPosition = this._currentDuration; } - this.mediaCurrentTime.textContent = this.formatSecondsToTime(this._currentPosition); - this.mediaProgressBar.value = (this._currentPosition / this._currentDuration) * 100; + this.mediaCurrentTime.textContent = this.formatSecondsToTime( + this._currentPosition + ); + this.mediaProgressBar.value = + (this._currentPosition / this._currentDuration) * 100; } else { clearInterval(this._mediaUpdateInterval); this._mediaUpdateInterval = null; @@ -730,7 +812,10 @@ class nsZenMediaController { if (!this._currentBrowser) { return; } - this.mediaControlBar.toggleAttribute("muted", this._currentBrowser.audioMuted); + this.mediaControlBar.toggleAttribute( + "muted", + this._currentBrowser.audioMuted + ); } updatePipButton() { @@ -741,10 +826,11 @@ class nsZenMediaController { return; } - const { totalPipCount, totalPipDisabled } = PictureInPicture.getEligiblePipVideoCount( - this._currentBrowser - ); - const canPip = totalPipCount === 1 || (totalPipDisabled > 0 && lazy.RESPECT_PIP_DISABLED); + const { totalPipCount, totalPipDisabled } = + PictureInPicture.getEligiblePipVideoCount(this._currentBrowser); + const canPip = + totalPipCount === 1 || + (totalPipDisabled > 0 && lazy.RESPECT_PIP_DISABLED); this.mediaControlBar.toggleAttribute("can-pip", canPip); } diff --git a/src/zen/mods/ZenMods.mjs b/src/zen/mods/ZenMods.mjs index c22c17890..a050c92d3 100644 --- a/src/zen/mods/ZenMods.mjs +++ b/src/zen/mods/ZenMods.mjs @@ -38,7 +38,9 @@ class nsZenMods extends nsZenPreloadedFeature { get #modsBackend() { if (!this.#_modsBackend) { - this.#_modsBackend = Cc["@mozilla.org/zen/mods-backend;1"].getService(Ci.nsIZenModsBackend); + this.#_modsBackend = Cc["@mozilla.org/zen/mods-backend;1"].getService( + Ci.nsIZenModsBackend + ); } return this.#_modsBackend; } @@ -78,7 +80,7 @@ class nsZenMods extends nsZenPreloadedFeature { await this.#writeStylesheet(mods); const modsWithPreferences = await Promise.all( - mods.map(async (mod) => { + mods.map(async mod => { const preferences = await this.getModPreferences(mod); return { @@ -103,7 +105,7 @@ class nsZenMods extends nsZenPreloadedFeature { } const modsObject = await this.getMods(); const mods = Object.values(modsObject).filter( - (mod) => mod.enabled === undefined || mod.enabled + mod => mod.enabled === undefined || mod.enabled ); // eslint-disable-next-line no-shadow @@ -131,9 +133,13 @@ class nsZenMods extends nsZenPreloadedFeature { } const getProperty = - type === "checkbox" ? Services.prefs.getBoolPref : Services.prefs.getStringPref; + type === "checkbox" + ? Services.prefs.getBoolPref + : Services.prefs.getStringPref; const setProperty = - type === "checkbox" ? Services.prefs.setBoolPref : Services.prefs.setStringPref; + type === "checkbox" + ? Services.prefs.setBoolPref + : Services.prefs.setStringPref; try { getProperty(property); @@ -155,7 +161,9 @@ class nsZenMods extends nsZenPreloadedFeature { setProperty( property, - typeof defaultValue === "boolean" ? defaultValue : defaultValue.toString() + typeof defaultValue === "boolean" + ? defaultValue + : defaultValue.toString() ); } } @@ -175,10 +183,14 @@ class nsZenMods extends nsZenPreloadedFeature { element.remove(); } - for (const { property } of preferences.filter(({ type }) => type !== "checkbox")) { + for (const { property } of preferences.filter( + ({ type }) => type !== "checkbox" + )) { const sanitizedProperty = property?.replaceAll(/\./g, "-"); - browser.document.querySelector(":root").style.removeProperty(`--${sanitizedProperty}`); + browser.document + .querySelector(":root") + .style.removeProperty(`--${sanitizedProperty}`); } continue; @@ -303,7 +315,9 @@ class nsZenMods extends nsZenPreloadedFeature { const response = await fetch(url); if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status} for url: ${url}`); + throw new Error( + `HTTP error! status: ${response.status} for url: ${url}` + ); } const data = await response.text(); @@ -316,14 +330,18 @@ class nsZenMods extends nsZenPreloadedFeature { } catch (e) { attempt++; if (attempt >= maxRetries) { - console.error("[ZenMods]: Error downloading file after retries", url, e); + console.error( + "[ZenMods]: Error downloading file after retries", + url, + e + ); } else { console.warn( `[ZenMods]: Download failed (attempt ${attempt} of ${maxRetries}), retrying in ${retryDelayMs}ms...`, url, e ); - await new Promise((res) => setTimeout(res, retryDelayMs)); + await new Promise(res => setTimeout(res, retryDelayMs)); } } } @@ -409,7 +427,11 @@ class nsZenMods extends nsZenPreloadedFeature { } async getModPreferences(mod) { - const modPath = PathUtils.join(this.modsRootPath, mod.id, "preferences.json"); + const modPath = PathUtils.join( + this.modsRootPath, + mod.id, + "preferences.json" + ); if (!(await IOUtils.exists(modPath)) || !mod.preferences) { return []; @@ -419,10 +441,15 @@ class nsZenMods extends nsZenPreloadedFeature { const preferences = await IOUtils.readJSON(modPath); return preferences.filter(({ disabledOn = [] }) => { - return !disabledOn.includes(gZenOperatingSystemCommonUtils.currentOperatingSystem); + return !disabledOn.includes( + gZenOperatingSystemCommonUtils.currentOperatingSystem + ); }); } catch (e) { - console.error(`[ZenMods]: Error reading mod preferences for ${mod.name}:`, e); + console.error( + `[ZenMods]: Error reading mod preferences for ${mod.name}:`, + e + ); return []; } } @@ -443,7 +470,7 @@ class nsZenMods extends nsZenPreloadedFeature { const mods = await this.#getEnabledMods(); const modsWithPreferences = await Promise.all( - mods.map(async (mod) => { + mods.map(async mod => { const preferences = await this.getModPreferences(mod); return { @@ -475,21 +502,38 @@ class nsZenMods extends nsZenPreloadedFeature { console.error("[ZenMods]: Error loading Zen Mods:", e); } - Services.prefs.addObserver(this.updatePref, this.#rebuildModsStylesheet.bind(this)); - Services.prefs.addObserver("zen.themes.disable-all", this.#handleDisableMods.bind(this)); + Services.prefs.addObserver( + this.updatePref, + this.#rebuildModsStylesheet.bind(this) + ); + Services.prefs.addObserver( + "zen.themes.disable-all", + this.#handleDisableMods.bind(this) + ); } #setNewMilestoneIfNeeded() { - const previousMilestone = Services.prefs.getStringPref("zen.mods.milestone", ""); + const previousMilestone = Services.prefs.getStringPref( + "zen.mods.milestone", + "" + ); if (previousMilestone != Services.appinfo.version) { - Services.prefs.setStringPref("zen.mods.milestone", Services.appinfo.version); + Services.prefs.setStringPref( + "zen.mods.milestone", + Services.appinfo.version + ); Services.prefs.clearUserPref("zen.mods.last-update"); } } #shouldAutoUpdate() { - const daysBeforeUpdate = Services.prefs.getIntPref("zen.mods.auto-update-days"); - const lastUpdatedSec = Services.prefs.getIntPref("zen.mods.last-update", -1); + const daysBeforeUpdate = Services.prefs.getIntPref( + "zen.mods.auto-update-days" + ); + const lastUpdatedSec = Services.prefs.getIntPref( + "zen.mods.last-update", + -1 + ); const nowSec = Math.floor(Date.now() / 1000); const daysSinceUpdate = (nowSec - lastUpdatedSec) / (60 * 60 * 24); @@ -504,7 +548,7 @@ class nsZenMods extends nsZenPreloadedFeature { const mods = await this.getMods(); const updates = await Promise.all( - Object.values(mods).map(async (currentMod) => { + Object.values(mods).map(async currentMod => { try { const possibleNewModVersion = await this.requestMod(currentMod.id); @@ -513,7 +557,10 @@ class nsZenMods extends nsZenPreloadedFeature { } if ( - !this.#compareVersions(possibleNewModVersion.version, currentMod.version ?? "0.0.0") && + !this.#compareVersions( + possibleNewModVersion.version, + currentMod.version ?? "0.0.0" + ) && possibleNewModVersion.version != currentMod.version ) { console.warn( @@ -539,8 +586,11 @@ class nsZenMods extends nsZenPreloadedFeature { ); await this.updateMods(mods); - Services.prefs.setIntPref("zen.mods.last-update", Math.floor(Date.now() / 1000)); - return updates.filter((update) => { + Services.prefs.setIntPref( + "zen.mods.last-update", + Math.floor(Date.now() / 1000) + ); + return updates.filter(update => { return update !== null; }); } @@ -595,7 +645,10 @@ class nsZenMods extends nsZenPreloadedFeature { } triggerModsUpdate() { - Services.prefs.setBoolPref(this.updatePref, !Services.prefs.getBoolPref(this.updatePref)); + Services.prefs.setBoolPref( + this.updatePref, + !Services.prefs.getBoolPref(this.updatePref) + ); } async installMod(mod) { @@ -603,11 +656,20 @@ class nsZenMods extends nsZenPreloadedFeature { const modPath = PathUtils.join(this.modsRootPath, mod.id); await IOUtils.makeDirectory(modPath, { ignoreExisting: true }); - await this.#downloadUrlToFile(mod.style, PathUtils.join(modPath, "chrome.css")); - await this.#downloadUrlToFile(mod.readme, PathUtils.join(modPath, "readme.md")); + await this.#downloadUrlToFile( + mod.style, + PathUtils.join(modPath, "chrome.css") + ); + await this.#downloadUrlToFile( + mod.readme, + PathUtils.join(modPath, "readme.md") + ); if (mod.preferences) { - await this.#downloadUrlToFile(mod.preferences, PathUtils.join(modPath, "preferences.json")); + await this.#downloadUrlToFile( + mod.preferences, + PathUtils.join(modPath, "preferences.json") + ); } } catch (e) { console.error("[ZenMods]: Error installing mod", mod.id, e); @@ -652,7 +714,10 @@ class nsZenMods extends nsZenPreloadedFeature { console.error(`[ZenMods]: Error parsing mod ${modId} info:`, e); } } else { - console.error(`[ZenMods]: Error fetching mod ${modId} info:`, data.status); + console.error( + `[ZenMods]: Error fetching mod ${modId} info:`, + data.status + ); } return null; diff --git a/src/zen/mods/actors/ZenModsMarketplaceChild.sys.mjs b/src/zen/mods/actors/ZenModsMarketplaceChild.sys.mjs index abfc10aed..ac409fed5 100644 --- a/src/zen/mods/actors/ZenModsMarketplaceChild.sys.mjs +++ b/src/zen/mods/actors/ZenModsMarketplaceChild.sys.mjs @@ -45,11 +45,15 @@ export class ZenModsMarketplaceChild extends JSWindowActorChild { } get actionButtonUninstall() { - return this.contentWindow.document.getElementById("install-theme-uninstall"); + return this.contentWindow.document.getElementById( + "install-theme-uninstall" + ); } async isThemeInstalled(themeId) { - return await this.sendQuery("ZenModsMarketplace:IsModInstalled", { themeId }); + return await this.sendQuery("ZenModsMarketplace:IsModInstalled", { + themeId, + }); } async receiveMessage(message) { @@ -79,7 +83,9 @@ export class ZenModsMarketplaceChild extends JSWindowActorChild { const updates = message.data.updates; this.contentWindow.document.dispatchEvent( - new CustomEvent("ZenModsMarketplace:CheckForUpdatesFinished", { detail: { updates } }) + new CustomEvent("ZenModsMarketplace:CheckForUpdatesFinished", { + detail: { updates }, + }) ); break; @@ -88,15 +94,21 @@ export class ZenModsMarketplaceChild extends JSWindowActorChild { } injectMarketplaceAPI() { - Cu.exportFunction(this.handleModInstallationEvent.bind(this), this.contentWindow, { - defineAs: "ZenInstallMod", - }); + Cu.exportFunction( + this.handleModInstallationEvent.bind(this), + this.contentWindow, + { + defineAs: "ZenInstallMod", + } + ); } async addButtons() { const actionButton = this.actionButton; const actionButtonUninstall = this.actionButtonUninstall; - const errorMessage = this.contentWindow.document.getElementById("install-theme-error"); + const errorMessage = this.contentWindow.document.getElementById( + "install-theme-error" + ); if (!actionButton || !actionButtonUninstall) { return; } @@ -110,8 +122,14 @@ export class ZenModsMarketplaceChild extends JSWindowActorChild { actionButton.classList.remove("hidden"); } - actionButton.addEventListener("click", this.handleModInstallationEvent.bind(this)); - actionButtonUninstall.addEventListener("click", this.handleModUninstallEvent.bind(this)); + actionButton.addEventListener( + "click", + this.handleModInstallationEvent.bind(this) + ); + actionButtonUninstall.addEventListener( + "click", + this.handleModUninstallEvent.bind(this) + ); } async handleModUninstallEvent(event) { diff --git a/src/zen/mods/actors/ZenModsMarketplaceParent.sys.mjs b/src/zen/mods/actors/ZenModsMarketplaceParent.sys.mjs index 19f73dac7..305254de3 100644 --- a/src/zen/mods/actors/ZenModsMarketplaceParent.sys.mjs +++ b/src/zen/mods/actors/ZenModsMarketplaceParent.sys.mjs @@ -46,7 +46,9 @@ export class ZenModsMarketplaceParent extends JSWindowActorParent { } case "ZenModsMarketplace:CheckForUpdates": { const updates = await this.modsManager.checkForModsUpdates(); - this.sendAsyncMessage("ZenModsMarketplace:CheckForUpdatesFinished", { updates }); + this.sendAsyncMessage("ZenModsMarketplace:CheckForUpdatesFinished", { + updates, + }); break; } diff --git a/src/zen/sessionstore/ZenSessionManager.sys.mjs b/src/zen/sessionstore/ZenSessionManager.sys.mjs index fcd443d80..7b854e437 100644 --- a/src/zen/sessionstore/ZenSessionManager.sys.mjs +++ b/src/zen/sessionstore/ZenSessionManager.sys.mjs @@ -8,7 +8,8 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { - ZenLiveFoldersManager: "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", + ZenLiveFoldersManager: + "resource:///modules/zen/ZenLiveFoldersManager.sys.mjs", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs", SessionStartup: "resource:///modules/sessionstore/SessionStartup.sys.mjs", @@ -17,7 +18,12 @@ ChromeUtils.defineESModuleGetters(lazy, { DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs", }); -XPCOMUtils.defineLazyPreferenceGetter(lazy, "gShouldLog", "zen.session-store.log", true); +XPCOMUtils.defineLazyPreferenceGetter( + lazy, + "gShouldLog", + "zen.session-store.log", + true +); XPCOMUtils.defineLazyPreferenceGetter( lazy, "gMaxSessionBackups", @@ -31,7 +37,10 @@ XPCOMUtils.defineLazyPreferenceGetter( 3 ); -const SHOULD_BACKUP_FILE = Services.prefs.getBoolPref("zen.session-store.backup-file", true); +const SHOULD_BACKUP_FILE = Services.prefs.getBoolPref( + "zen.session-store.backup-file", + true +); const FILE_NAME = "zen-sessions.jsonlz4"; const LAST_BUILD_ID_PREF = "zen.session-store.last-build-id"; @@ -120,7 +129,7 @@ export class nsZenSessionManager { try { let files = await IOUtils.getChildren(this.#backupFolderPath); files = files - .filter((file) => file.startsWith(prefix)) + .filter(file => file.startsWith(prefix)) .sort() .reverse(); backupFiles.push(files[0]); @@ -142,9 +151,11 @@ export class nsZenSessionManager { ); const db = await PlacesUtils.promiseDBConnection(); let data = {}; - let rows = await db.execute("SELECT * FROM zen_workspaces ORDER BY created_at ASC"); + let rows = await db.execute( + "SELECT * FROM zen_workspaces ORDER BY created_at ASC" + ); try { - data.spaces = rows.map((row) => ({ + data.spaces = rows.map(row => ({ uuid: row.getResultByName("uuid"), name: row.getResultByName("name"), icon: row.getResultByName("icon"), @@ -162,11 +173,14 @@ export class nsZenSessionManager { })); } catch (e) { /* ignore errors reading spaces data, as it is not critical and we want to migrate even if we fail to read it */ - console.error("Failed to read spaces data from database during migration", e); + console.error( + "Failed to read spaces data from database during migration", + e + ); } try { rows = await db.execute("SELECT * FROM zen_pins ORDER BY position ASC"); - data.pins = rows.map((row) => ({ + data.pins = rows.map(row => ({ uuid: row.getResultByName("uuid"), title: row.getResultByName("title"), url: row.getResultByName("url"), @@ -178,11 +192,16 @@ export class nsZenSessionManager { parentUuid: row.getResultByName("folder_parent_uuid"), editedTitle: Boolean(row.getResultByName("edited_title")), folderIcon: row.getResultByName("folder_icon"), - isFolderCollapsed: Boolean(row.getResultByName("is_folder_collapsed")), + isFolderCollapsed: Boolean( + row.getResultByName("is_folder_collapsed") + ), })); } catch (e) { /* ignore errors reading pins data, as it is not critical and we want to migrate even if we fail to read it */ - console.error("Failed to read pins data from database during migration", e); + console.error( + "Failed to read pins data from database during migration", + e + ); } try { data.recoveryData = await IOUtils.readJSON( @@ -263,14 +282,19 @@ export class nsZenSessionManager { } this.#sidebar = this._dataFromFile || {}; if (!this.#sidebar.spaces?.length && !this._shouldRunMigration) { - this.log("No spaces data found in session file, running migration", this.#sidebar); + this.log( + "No spaces data found in session file, running migration", + this.#sidebar + ); // If we have no spaces data, we should run migration // to restore them from the database. Note we also do a // check if we already planned to run migration for optimization. this._shouldRunMigration = true; await this.#getDataFromDBForMigration(); } - if (Services.prefs.getBoolPref("zen.session-store.log-tab-entries", false)) { + if ( + Services.prefs.getBoolPref("zen.session-store.log-tab-entries", false) + ) { for (const tab of this.#sidebar.tabs || []) { this.log("Tab entry in session file:", tab); } @@ -285,15 +309,19 @@ export class nsZenSessionManager { if (buildIdChanged) { // If the build ID has changed since the last session, it means the user has updated the app, // so we should not remove the unpinned tabs as they might want to keep them after the update. - this.log("Build ID has changed since last session, not restoring only pinned tabs", { - buildId, - lastBuildId, - }); + this.log( + "Build ID has changed since last session, not restoring only pinned tabs", + { + buildId, + lastBuildId, + } + ); Services.prefs.setStringPref(LAST_BUILD_ID_PREF, buildId); return false; } return ( - Services.prefs.getIntPref("browser.startup.page", 1) !== BROWSER_STARTUP_RESUME_SESSION || + Services.prefs.getIntPref("browser.startup.page", 1) !== + BROWSER_STARTUP_RESUME_SESSION || lazy.PrivateBrowsingUtils.permanentPrivateBrowsing ); } @@ -325,7 +353,7 @@ export class nsZenSessionManager { this.log("Window sync disabled, restoring only pinned tabs"); for (let i = 0; i < initialState.windows.length; i++) { let winData = initialState.windows[i]; - winData.tabs = (winData.tabs || []).filter((tab) => tab.pinned); + winData.tabs = (winData.tabs || []).filter(tab => tab.pinned); } } return initialState; @@ -335,7 +363,7 @@ export class nsZenSessionManager { true ); if (initialState?.windows?.length && !allowRestoreUnsynced) { - initialState.windows = initialState.windows.filter((win) => { + initialState.windows = initialState.windows.filter(win => { if (win.isZenUnsynced) { this.log("Skipping unsynced window during restore"); } @@ -348,7 +376,11 @@ export class nsZenSessionManager { // This would happen on first run after having a single private window // open when quitting the app, for example. let normalWindowsExist = initialState?.windows?.some( - (win) => !win.isPrivate && !win.isPopup && !win.isTaskbarTab && !win.isZenUnsynced + win => + !win.isPrivate && + !win.isPopup && + !win.isTaskbarTab && + !win.isZenUnsynced ); if (!initialState?.windows?.length || !normalWindowsExist) { this.log("No windows found in initial state, creating an empty one"); @@ -376,20 +408,31 @@ export class nsZenSessionManager { } // When we don't have browser.startup.page set to resume session, // we only want to restore the pinned tabs into the new windows. - if (this.#shouldRestoreOnlyPinned && !this.#shouldRestoreFromCrash && this.#sidebar?.tabs) { + if ( + this.#shouldRestoreOnlyPinned && + !this.#shouldRestoreFromCrash && + this.#sidebar?.tabs + ) { this.log("Restoring only pinned tabs into windows"); const sidebar = this.#sidebar; - sidebar.tabs = (sidebar.tabs || []).filter((tab) => tab.pinned); + sidebar.tabs = (sidebar.tabs || []).filter(tab => tab.pinned); this.#sidebar = sidebar; } // Restore all windows with the same sidebar object, this will // guarantee that all tabs, groups, folders and split view data // are properly synced across all windows. if (!this._shouldRunMigration) { - this.log(`Restoring Zen session data into ${initialState.windows?.length || 0} windows`); + this.log( + `Restoring Zen session data into ${initialState.windows?.length || 0} windows` + ); for (let i = 0; i < initialState.windows.length; i++) { let winData = initialState.windows[i]; - if (winData.isZenUnsynced || winData.isPrivate || winData.isPopup || winData.isTaskbarTab) { + if ( + winData.isZenUnsynced || + winData.isPrivate || + winData.isPopup || + winData.isTaskbarTab + ) { continue; } this.#restoreWindowData(winData); @@ -441,7 +484,9 @@ export class nsZenSessionManager { !initialState?.windows?.length && (initialState?.lastSessionState || initialState?.deferredInitialState) ) { - initialState = { ...(initialState.lastSessionState || initialState.deferredInitialState) }; + initialState = { + ...(initialState.lastSessionState || initialState.deferredInitialState), + }; } // There might be cases where there are no windows in the // initial state, for example if the user had 'restore previous @@ -449,7 +494,7 @@ export class nsZenSessionManager { // to restore the last closed normal window. if (!initialState?.windows?.length) { let normalClosedWindow = initialState?._closedWindows?.find( - (win) => !win.isPopup && !win.isTaskbarTab && !win.isPrivate + win => !win.isPopup && !win.isTaskbarTab && !win.isPrivate ); if (normalClosedWindow) { initialState.windows = [Cu.cloneInto(normalClosedWindow, {})]; @@ -466,15 +511,21 @@ export class nsZenSessionManager { } for (const winData of initialState?.windows || []) { winData.spaces = - (winData.spaces?.length ? winData.spaces : this._migrationData?.spaces) || []; + (winData.spaces?.length + ? winData.spaces + : this._migrationData?.spaces) || []; if (winData.tabs) { for (const tabData of winData.tabs) { let storeId = tabData.zenSyncId || tabData.zenPinnedId; - const pinData = this._migrationData?.pins?.find((pin) => pin.uuid === storeId); + const pinData = this._migrationData?.pins?.find( + pin => pin.uuid === storeId + ); // We need to migrate the static label from the pin data as this information // was not stored in the session file before. if (pinData) { - tabData.zenStaticLabel = pinData.editedTitle ? pinData.title : undefined; + tabData.zenStaticLabel = pinData.editedTitle + ? pinData.title + : undefined; } } } @@ -497,8 +548,8 @@ export class nsZenSessionManager { * @param {object} aWindow - The window data object to filter. */ #filterUnpinnedTabs(aWindow) { - aWindow.tabs = aWindow.tabs.filter((tab) => tab.pinned); - aWindow.groups = aWindow.groups?.filter((group) => group.pinned); + aWindow.tabs = aWindow.tabs.filter(tab => tab.pinned); + aWindow.groups = aWindow.groups?.filter(group => group.pinned); } /** @@ -508,7 +559,9 @@ export class nsZenSessionManager { * @returns {boolean} True if the window is saveable, false otherwise. */ #isWindowSaveable(aWinData) { - return !aWinData.isPopup && !aWinData.isTaskbarTab && !aWinData.isZenUnsynced; + return ( + !aWinData.isPopup && !aWinData.isTaskbarTab && !aWinData.isZenUnsynced + ); } /** @@ -521,17 +574,19 @@ export class nsZenSessionManager { */ saveState(state, soon = false) { let windows = state?.windows || []; - windows = windows.filter((win) => this.#isWindowSaveable(win)); + windows = windows.filter(win => this.#isWindowSaveable(win)); if (!windows.length) { // Don't save (or even collect) anything in permanent private // browsing mode. We also don't want to save if there are no windows. return; } const cleanPath = PathUtils.join(this.#backupFolderPath, "clean.jsonlz4"); - IOUtils.copy(this.#storeFilePath, cleanPath, { recursive: true }).catch(() => { - /* ignore errors creating clean backup, as it is not critical and - * we want to save the session even if we fail to create it */ - }); + IOUtils.copy(this.#storeFilePath, cleanPath, { recursive: true }).catch( + () => { + /* ignore errors creating clean backup, as it is not critical and + * we want to save the session even if we fail to create it */ + } + ); this.#collectWindowData(windows); // This would save the data to disk asynchronously or when quitting the app. let sidebar = this.#sidebar; @@ -591,19 +646,24 @@ export class nsZenSessionManager { const todayFilePath = PathUtils.join(backupFolder, todayFileName); const sessionFilePath = this.#file.path; this.log(`Backing up session file to ${todayFileName}`); - await IOUtils.copy(sessionFilePath, todayFilePath, { noOverwrite: false }); + await IOUtils.copy(sessionFilePath, todayFilePath, { + noOverwrite: false, + }); // Now we need to check if we have exceeded the maximum // number of backups allowed, and delete the oldest ones // if needed. let prefix = PathUtils.join(backupFolder, "zen-sessions-"); let files = await IOUtils.getChildren(backupFolder); - files = files.filter((file) => file.startsWith(prefix)).sort(); + files = files.filter(file => file.startsWith(prefix)).sort(); for (let i = 0; i < files.length - lazy.gMaxSessionBackups; i++) { this.log(`Deleting old backup file ${files[i]}`); await IOUtils.remove(files[i]); } } catch (e) { - console.error("ZenSessionManager: Failed to create session file backups", e); + console.error( + "ZenSessionManager: Failed to create session file backups", + e + ); } } @@ -618,7 +678,12 @@ export class nsZenSessionManager { // We only want to save the *last* normal window that is closed. // If its not the last window, we can still update the sidebar object // based on other open windows. - if (aWinData.isPopup || aWinData.isTaskbarTab || aWinData.isZenUnsynced || !isLastWindow) { + if ( + aWinData.isPopup || + aWinData.isTaskbarTab || + aWinData.isZenUnsynced || + !isLastWindow + ) { return; } this.log("Saving closed window session data into Zen session store"); @@ -652,7 +717,7 @@ export class nsZenSessionManager { * @returns {Array} The filtered array of tab data objects. */ #filterUnusedTabs(tabs) { - return tabs.filter((tab) => { + return tabs.filter(tab => { // We need to ignore empty tabs with no group association // as they are not useful to restore. return !(tab.zenIsEmpty && !tab.groupId); @@ -673,13 +738,18 @@ export class nsZenSessionManager { // state when multiple windows are open. Note that if we a tab without // this flag set in any other window, we just add it anyway. for (const tabData of window.tabs || []) { - if (!tabIdRelationMap.has(tabData.zenSyncId) || tabData._zenIsActiveTab) { + if ( + !tabIdRelationMap.has(tabData.zenSyncId) || + tabData._zenIsActiveTab + ) { tabIdRelationMap.set(tabData.zenSyncId, tabData); } } } - sidebarData.tabs = this.#filterUnusedTabs(Array.from(tabIdRelationMap.values())); + sidebarData.tabs = this.#filterUnusedTabs( + Array.from(tabIdRelationMap.values()) + ); let firstWindow = aStateWindows[0]; sidebarData.folders = firstWindow.folders; @@ -704,10 +774,10 @@ export class nsZenSessionManager { // tabs in the window data and keep the pinned tabs from the window data, // as they should be the same as the ones in the sidebar. if (lazy.gSyncOnlyPinnedTabs) { - let pinnedTabs = (sidebar.tabs || []).filter((tab) => tab.pinned); + let pinnedTabs = (sidebar.tabs || []).filter(tab => tab.pinned); let unpinedWindowTabs = []; if (!this.#shouldRestoreOnlyPinned) { - unpinedWindowTabs = (aWindowData.tabs || []).filter((tab) => !tab.pinned); + unpinedWindowTabs = (aWindowData.tabs || []).filter(tab => !tab.pinned); } aWindowData.tabs = [...pinnedTabs, ...unpinedWindowTabs]; @@ -719,7 +789,10 @@ export class nsZenSessionManager { ]; // Same thing with groups, we restore all the groups from the sidebar, if they don't have any // existing tabs in the window, they should be a no-op. - aWindowData.groups = [...(sidebar.groups || []), ...(aWindowData.groups || [])]; + aWindowData.groups = [ + ...(sidebar.groups || []), + ...(aWindowData.groups || []), + ]; } else { aWindowData.tabs = sidebar.tabs || []; aWindowData.splitViewData = sidebar.splitViewData; @@ -755,11 +828,16 @@ export class nsZenSessionManager { this.log("Restoring new window with Zen session data"); const state = lazy.SessionStore.getCurrentState(true); const windows = (state.windows || []).filter( - (win) => !win.isPrivate && !win.isPopup && !win.isTaskbarTab && !win.isZenUnsynced + win => + !win.isPrivate && + !win.isPopup && + !win.isTaskbarTab && + !win.isZenUnsynced ); let windowToClone = windows[0] || {}; let newWindow = Cu.cloneInto(windowToClone, {}); - let shouldRestoreOnlyPinned = !lazy.gWindowSyncEnabled || lazy.gSyncOnlyPinnedTabs; + let shouldRestoreOnlyPinned = + !lazy.gWindowSyncEnabled || lazy.gSyncOnlyPinnedTabs; if (windows.length < 2) { // We only want to restore the sidebar object if we found // only one normal window to clone from (which is the one diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index bdd249a7b..22a53199f 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -19,16 +19,29 @@ ChromeUtils.defineESModuleGetters(lazy, { RunState: "resource:///modules/sessionstore/RunState.sys.mjs", }); -XPCOMUtils.defineLazyPreferenceGetter(lazy, "gWindowSyncEnabled", "zen.window-sync.enabled", true); +XPCOMUtils.defineLazyPreferenceGetter( + lazy, + "gWindowSyncEnabled", + "zen.window-sync.enabled", + true +); XPCOMUtils.defineLazyPreferenceGetter( lazy, "gSyncOnlyPinnedTabs", "zen.window-sync.sync-only-pinned-tabs", true ); -XPCOMUtils.defineLazyPreferenceGetter(lazy, "gShouldLog", "zen.window-sync.log", true); +XPCOMUtils.defineLazyPreferenceGetter( + lazy, + "gShouldLog", + "zen.window-sync.log", + true +); -const OBSERVING = ["browser-window-before-show", "sessionstore-windows-restored"]; +const OBSERVING = [ + "browser-window-before-show", + "sessionstore-windows-restored", +]; const INSTANT_EVENTS = ["SSWindowClosing", "TabSelect", "focus"]; const UNSYNCED_WINDOW_EVENTS = ["TabOpen"]; const EVENTS = [ @@ -131,7 +144,11 @@ class nsZenWindowSync { #browserWindows = { *[Symbol.iterator]() { for (let window of lazy.BrowserWindowTracker.orderedWindows) { - if (window.__SSi && !window.closed && !window.gZenWorkspaces?.privateWindowOrDisabled) { + if ( + window.__SSi && + !window.closed && + !window.gZenWorkspaces?.privateWindowOrDisabled + ) { yield window; } } @@ -223,8 +240,13 @@ class nsZenWindowSync { aWindow.arguments.length > 1 && !!this.#browserWindowsList.length)) ) { - this.log("Not syncing new window due to unsynced argument or existing synced windows"); - aWindow.document.documentElement.setAttribute("zen-unsynced-window", "true"); + this.log( + "Not syncing new window due to unsynced argument or existing synced windows" + ); + aWindow.document.documentElement.setAttribute( + "zen-unsynced-window", + "true" + ); for (let eventName of UNSYNCED_WINDOW_EVENTS) { aWindow.addEventListener(eventName, this, true); } @@ -244,7 +266,7 @@ class nsZenWindowSync { // assign one and sync it to other windows. // This should only happen really when updating from an older version // that didn't have this feature. - await this.#runOnAllWindowsAsync(null, async (aWindow) => { + await this.#runOnAllWindowsAsync(null, async aWindow => { const { gZenWorkspaces } = aWindow; this.#onWindowBeforeShow(aWindow); await gZenWorkspaces.promiseInitialized; @@ -255,7 +277,10 @@ class nsZenWindowSync { if (tab.pinned && !tab._zenPinnedInitialState) { await this.setPinnedTabState(tab); } - if (!lazy.gWindowSyncEnabled || (lazy.gSyncOnlyPinnedTabs && !tab.pinned)) { + if ( + !lazy.gWindowSyncEnabled || + (lazy.gSyncOnlyPinnedTabs && !tab.pinned) + ) { tab._zenContentsVisible = true; } } @@ -331,14 +356,20 @@ class nsZenWindowSync { ) { return; } - if (!lazy.gWindowSyncEnabled && !UNSYNCED_WINDOW_EVENTS.includes(aEvent.type)) { + if ( + !lazy.gWindowSyncEnabled && + !UNSYNCED_WINDOW_EVENTS.includes(aEvent.type) + ) { return; } if (INSTANT_EVENTS.includes(aEvent.type)) { this.#handleNextEventInternal(aEvent); return; } - if (this.#eventHandlingContext.window && this.#eventHandlingContext.window !== window) { + if ( + this.#eventHandlingContext.window && + this.#eventHandlingContext.window !== window + ) { // We're already handling an event for another window. // To avoid re-entrancy issues, we skip this event. return; @@ -347,7 +378,7 @@ class nsZenWindowSync { this.#eventHandlingContext.eventCount++; this.#eventHandlingContext.window = window; let resolveNewPromise; - this.#eventHandlingContext.lastHandlerPromise = new Promise((resolve) => { + this.#eventHandlingContext.lastHandlerPromise = new Promise(resolve => { resolveNewPromise = resolve; }); // Wait for the last handler to finish before processing the next event. @@ -433,7 +464,10 @@ class nsZenWindowSync { */ #maybeSyncAttributeChange(aOriginalItem, aTargetItem, aAttributeName) { if (aOriginalItem.hasAttribute(aAttributeName)) { - aTargetItem.setAttribute(aAttributeName, aOriginalItem.getAttribute(aAttributeName)); + aTargetItem.setAttribute( + aAttributeName, + aOriginalItem.getAttribute(aAttributeName) + ); } else { aTargetItem.removeAttribute(aAttributeName); } @@ -475,12 +509,24 @@ class nsZenWindowSync { } } if (flags & SYNC_FLAG_MOVE && !aTargetItem.hasAttribute("zen-empty-tab")) { - this.#maybeSyncAttributeChange(aOriginalItem, aTargetItem, "zen-workspace-id"); + this.#maybeSyncAttributeChange( + aOriginalItem, + aTargetItem, + "zen-workspace-id" + ); this.#syncItemPosition(aOriginalItem, aTargetItem, aWindow); } if (aOriginalItem.hasAttribute("zen-live-folder-item-id")) { - this.#maybeSyncAttributeChange(aOriginalItem, aTargetItem, "zen-live-folder-item-id"); - this.#maybeSyncAttributeChange(aOriginalItem, aTargetItem, "zen-show-sublabel"); + this.#maybeSyncAttributeChange( + aOriginalItem, + aTargetItem, + "zen-live-folder-item-id" + ); + this.#maybeSyncAttributeChange( + aOriginalItem, + aTargetItem, + "zen-show-sublabel" + ); this.#syncTabSubtitle(aWindow, aOriginalItem, aTargetItem); } else if (aTargetItem.hasAttribute("zen-live-folder-item-id")) { aTargetItem.removeAttribute("zen-live-folder-item-id"); @@ -527,7 +573,10 @@ class nsZenWindowSync { if (originalIsEssential) { gZenPinnedTabManager.addToEssentials(aTargetItem); } else { - gZenPinnedTabManager.removeEssentials(aTargetItem, /* unpin= */ !targetIsPinned); + gZenPinnedTabManager.removeEssentials( + aTargetItem, + /* unpin= */ !targetIsPinned + ); } } else if (originalIsPinned !== targetIsPinned) { if (originalIsPinned) { @@ -556,7 +605,12 @@ class nsZenWindowSync { * @param {boolean} options.isEssential - Indicates if the item is essential. * @param {boolean} options.isPinned - Indicates if the item is pinned. */ - #moveItemToMatchOriginal(aOriginalItem, aTargetItem, aWindow, { isEssential, isPinned }) { + #moveItemToMatchOriginal( + aOriginalItem, + aTargetItem, + aWindow, + { isEssential, isPinned } + ) { const { gBrowser, gZenWorkspaces } = aWindow; let originalSibling = aOriginalItem.previousElementSibling; if (originalSibling?.classList.contains("space-fake-collapsible-start")) { @@ -564,9 +618,13 @@ class nsZenWindowSync { originalSibling = originalSibling.previousElementSibling; } let isFirstTab = true; - if (gBrowser.isTabGroup(originalSibling) || gBrowser.isTab(originalSibling)) { + if ( + gBrowser.isTabGroup(originalSibling) || + gBrowser.isTab(originalSibling) + ) { isFirstTab = - !originalSibling.hasAttribute("id") || originalSibling.hasAttribute("zen-empty-tab"); + !originalSibling.hasAttribute("id") || + originalSibling.hasAttribute("zen-empty-tab"); } gBrowser.zenHandleTabMove(aTargetItem, () => { @@ -574,7 +632,10 @@ class nsZenWindowSync { let container; const parentGroup = aOriginalItem.group; if (parentGroup?.hasAttribute("id")) { - container = this.getItemFromWindow(aWindow, parentGroup.getAttribute("id")); + container = this.getItemFromWindow( + aWindow, + parentGroup.getAttribute("id") + ); if (container) { if (container?.tabs?.length) { // First tab in folders is the empty tab placeholder. @@ -622,8 +683,13 @@ class nsZenWindowSync { */ #syncItemForAllWindows(aItem, flags = 0) { const window = aItem.ownerGlobal; - this.#runOnAllWindows(window, (win) => { - this.#syncItemWithOriginal(aItem, this.getItemFromWindow(win, aItem.id), win, flags); + this.#runOnAllWindows(window, win => { + this.#syncItemWithOriginal( + aItem, + this.getItemFromWindow(win, aItem.id), + win, + flags + ); }); } @@ -678,7 +744,12 @@ class nsZenWindowSync { // Restore the listeners for the swapped in tab. if (!onClose && filter) { - tabListener = new otherTabBrowser.zenTabProgressListener(aTab, otherBrowser, true, false); + tabListener = new otherTabBrowser.zenTabProgressListener( + aTab, + otherBrowser, + true, + false + ); otherTabBrowser._tabListeners.set(aTab, tabListener); const notifyAll = Ci.nsIWebProgress.NOTIFY_ALL; @@ -702,7 +773,10 @@ class nsZenWindowSync { return true; } // Can't swap between chrome and content processes. - if (aOurTab.linkedBrowser.isRemoteBrowser != aOtherTab.linkedBrowser.isRemoteBrowser) { + if ( + aOurTab.linkedBrowser.isRemoteBrowser != + aOtherTab.linkedBrowser.isRemoteBrowser + ) { return false; } return true; @@ -717,7 +791,11 @@ class nsZenWindowSync { * @param {boolean} options.focus - Indicates if the tab should be focused after the swap. * @param {boolean} options.onClose - Indicates if the swap is done during a tab close operation. */ - #swapBrowserDocShellsInner(aOurTab, aOtherTab, { focus = true, onClose = false } = {}) { + #swapBrowserDocShellsInner( + aOurTab, + aOtherTab, + { focus = true, onClose = false } = {} + ) { // Can't swap between chrome and content processes. if (!this.#canSwapBrowsers(aOurTab, aOtherTab)) { this.log( @@ -732,7 +810,11 @@ class nsZenWindowSync { aOtherTab, () => { this.log(`Swapping docshells between windows for tab ${aOurTab.id}`); - aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther(aOurTab, aOtherTab, false); + aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther( + aOurTab, + aOtherTab, + false + ); // Swap permanent keys if (!onClose) { @@ -764,16 +846,25 @@ class nsZenWindowSync { (aOtherTab.linkedBrowser?.currentURI.spec !== "about:blank" || aOtherTab.hasAttribute("busy")) ) { - this.log(`Loading about:blank in our tab ${aOtherTab.id} before swap`); + this.log( + `Loading about:blank in our tab ${aOtherTab.id} before swap` + ); aOtherTab.linkedBrowser.loadURI(Services.io.newURI("about:blank"), { - triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(), + triggeringPrincipal: + Services.scriptSecurityManager.getSystemPrincipal(), loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, }); } }, onClose ); - const kAttributesToRemove = ["muted", "soundplaying", "sharing", "pictureinpicture", "busy"]; + const kAttributesToRemove = [ + "muted", + "soundplaying", + "sharing", + "pictureinpicture", + "busy", + ]; // swapBrowsersAndCloseOther already takes care of transferring attributes like 'muted', // but we need to manually remove some attributes from the other tab. for (let attr of kAttributesToRemove) { @@ -799,16 +890,17 @@ class nsZenWindowSync { const ourBrowser = aOurTab.linkedBrowser; const otherBrowser = aOtherTab.linkedBrowser; // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { + return new Promise(async resolve => { if (callback) { - const browserBlob = await aOtherTab.ownerGlobal.PageThumbs.captureToBlob( - aOtherTab.linkedBrowser, - { - fullScale: true, - fullViewport: true, - backgroundColor: "transparent", - } - ); + const browserBlob = + await aOtherTab.ownerGlobal.PageThumbs.captureToBlob( + aOtherTab.linkedBrowser, + { + fullScale: true, + fullViewport: true, + backgroundColor: "transparent", + } + ); let mySrc = await new Promise((r, re) => { const reader = new FileReader(); @@ -851,7 +943,7 @@ class nsZenWindowSync { const img = doc.createElement("img"); img.className = "zen-pseudo-browser-image"; img.src = aSrc; - let promise = new Promise((resolve) => { + let promise = new Promise(resolve => { if (img.complete) { resolve(); return; @@ -874,9 +966,11 @@ class nsZenWindowSync { * @param {object} aBrowser - The browser element to remove the pseudo image for. */ #maybeRemovePseudoImageForBrowser(aBrowser) { - const elements = aBrowser.parentNode?.querySelectorAll(".zen-pseudo-browser-image"); + const elements = aBrowser.parentNode?.querySelectorAll( + ".zen-pseudo-browser-image" + ); if (elements) { - elements.forEach((element) => element.remove()); + elements.forEach(element => element.remove()); } } @@ -889,8 +983,12 @@ class nsZenWindowSync { * @param {Function} filter - A function to filter the tabs. * @returns {object | null} The active tab from other windows if found, otherwise null. */ - #getActiveTabFromOtherWindows(aWindow, aTabId, filter = (tab) => tab?._zenContentsVisible) { - return this.#runOnAllWindows(aWindow, (win) => { + #getActiveTabFromOtherWindows( + aWindow, + aTabId, + filter = tab => tab?._zenContentsVisible + ) { + return this.#runOnAllWindows(aWindow, win => { const tab = this.getItemFromWindow(win, aTabId); if (filter(tab)) { return tab; @@ -905,13 +1003,16 @@ class nsZenWindowSync { * @param {Window} aWindow - The window to move active tabs from. */ #moveAllActiveTabsToOtherWindowsForClose(aWindow) { - const mostRecentWindow = this.#browserWindowsList.find((win) => win !== aWindow); + const mostRecentWindow = this.#browserWindowsList.find( + win => win !== aWindow + ); if (!mostRecentWindow || !aWindow.gZenWorkspaces) { return; } - const activeTabsOnClosedWindow = aWindow.gZenWorkspaces.allStoredTabs.filter( - (tab) => tab._zenContentsVisible - ); + const activeTabsOnClosedWindow = + aWindow.gZenWorkspaces.allStoredTabs.filter( + tab => tab._zenContentsVisible + ); for (let tab of activeTabsOnClosedWindow) { const targetTab = this.getItemFromWindow(mostRecentWindow, tab.id); if (targetTab) { @@ -925,7 +1026,10 @@ class nsZenWindowSync { focus: targetTab.selected, onClose: true, }); - this.#swapedTabsEntriesForWC.set(tab.linkedBrowser.permanentKey, targetTab); + this.#swapedTabsEntriesForWC.set( + tab.linkedBrowser.permanentKey, + targetTab + ); // We can animate later, whats important is to always stay on the same // process and avoid async operations here to avoid the closed window // being unloaded before the swap is done. @@ -942,16 +1046,24 @@ class nsZenWindowSync { */ async #onTabSwitchOrWindowFocus(aWindow, aPreviousTab = null) { let activeBrowsers = aWindow.gBrowser.selectedBrowsers; - let activeTabs = activeBrowsers.map((browser) => aWindow.gBrowser.getTabForBrowser(browser)); + let activeTabs = activeBrowsers.map(browser => + aWindow.gBrowser.getTabForBrowser(browser) + ); // Ignore previous tabs that are still "active". These scenarios could happen for example, // when selecting on a split view tab that was already active. - if (aPreviousTab?._zenContentsVisible && !activeTabs.includes(aPreviousTab)) { + if ( + aPreviousTab?._zenContentsVisible && + !activeTabs.includes(aPreviousTab) + ) { let tabsToSwap = aPreviousTab.group?.hasAttribute("split-view-group") ? aPreviousTab.group.tabs : [aPreviousTab]; for (const tab of tabsToSwap) { - const otherTabToShow = this.#getActiveTabFromOtherWindows(aWindow, tab.id, (t) => - t?.splitView ? t.group.tabs.some((st) => st.selected) : t?.selected + const otherTabToShow = this.#getActiveTabFromOtherWindows( + aWindow, + tab.id, + t => + t?.splitView ? t.group.tabs.some(st => st.selected) : t?.selected ); if (otherTabToShow) { otherTabToShow._zenContentsVisible = true; @@ -962,14 +1074,22 @@ class nsZenWindowSync { } let promises = []; for (const selectedTab of activeTabs) { - if (selectedTab._zenContentsVisible || selectedTab.hasAttribute("zen-empty-tab")) { + if ( + selectedTab._zenContentsVisible || + selectedTab.hasAttribute("zen-empty-tab") + ) { continue; } - const otherSelectedTab = this.#getActiveTabFromOtherWindows(aWindow, selectedTab.id); + const otherSelectedTab = this.#getActiveTabFromOtherWindows( + aWindow, + selectedTab.id + ); selectedTab._zenContentsVisible = true; if (otherSelectedTab) { delete otherSelectedTab._zenContentsVisible; - promises.push(this.#swapBrowserDocShellsAsync(selectedTab, otherSelectedTab)); + promises.push( + this.#swapBrowserDocShellsAsync(selectedTab, otherSelectedTab) + ); } } await Promise.all(promises); @@ -1000,7 +1120,9 @@ class nsZenWindowSync { if (aTab.linkedBrowser) { cachedState = lazy.TabStateCache.get(aTab.linkedBrowser.permanentKey); } - return cachedState?.history?.entries ? Cu.cloneInto(cachedState.history, {}) : { entries: [] }; + return cachedState?.history?.entries + ? Cu.cloneInto(cachedState.history, {}) + : { entries: [] }; } /** @@ -1028,7 +1150,8 @@ class nsZenWindowSync { return this.#maybeFlushTabState(aTab).finally(() => { this.log(`Setting pinned initial state for tab ${aTab.id}`); let { entries, index } = this.#getTabEntriesFromCache(aTab); - let image = aTab.getAttribute("image") || aTab.ownerGlobal.gBrowser.getIcon(aTab); + let image = + aTab.getAttribute("image") || aTab.ownerGlobal.gBrowser.getIcon(aTab); let activeIndex = typeof index === "number" ? index : entries.length; // Tab state cache gives us the index starting from 1 instead of 0. activeIndex--; @@ -1038,7 +1161,7 @@ class nsZenWindowSync { entry: (entries[activeIndex] || entries[0]) ?? null, image, }; - this.#runOnAllWindows(null, (win) => { + this.#runOnAllWindows(null, win => { const targetTab = this.getItemFromWindow(win, aTab.id); if (targetTab) { targetTab._zenPinnedInitialState = initialState; @@ -1053,7 +1176,7 @@ class nsZenWindowSync { * @param {Array} aWorkspaces - The workspaces to propagate. */ propagateWorkspacesToAllWindows(aWorkspaces) { - this.#runOnAllWindows(null, (win) => { + this.#runOnAllWindows(null, win => { win.gZenWorkspaces.propagateWorkspaces(aWorkspaces); }); } @@ -1067,7 +1190,7 @@ class nsZenWindowSync { */ moveTabsToSyncedWorkspace(aWindow, aWorkspaceId) { const tabsToMove = aWindow.gZenWorkspaces.allStoredTabs.filter( - (tab) => !tab.hasAttribute("zen-empty-tab") + tab => !tab.hasAttribute("zen-empty-tab") ); const selectedTab = aWindow.gBrowser.selectedTab; let win = this.firstSyncedWindow; @@ -1093,7 +1216,11 @@ class nsZenWindowSync { }; if (!win) { this.log("No synced window found, creating a new one"); - win = aWindow.gBrowser.replaceTabWithWindow(selectedTab, {}, /* zenForceSync = */ true); + win = aWindow.gBrowser.replaceTabWithWindow( + selectedTab, + {}, + /* zenForceSync = */ true + ); win.gZenWorkspaces.promiseInitialized.then(() => { moveAllTabsToWindow(); }); @@ -1111,8 +1238,9 @@ class nsZenWindowSync { if (!aTab?._zenPinnedInitialState || aTab._zenPinnedInitialState.image) { return; } - let image = aTab.getAttribute("image") || aTab.ownerGlobal.gBrowser.getIcon(aTab); - this.#runOnAllWindows(null, (win) => { + let image = + aTab.getAttribute("image") || aTab.ownerGlobal.gBrowser.getIcon(aTab); + this.#runOnAllWindows(null, win => { const targetTab = this.getItemFromWindow(win, aTab.id); if (targetTab) { targetTab._zenPinnedInitialState.image = image; @@ -1138,7 +1266,7 @@ class nsZenWindowSync { if (isUnsyncedWindow || !lazy.gWindowSyncEnabled) { return; } - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const newTab = win.gBrowser.addTrustedTab("about:blank", { animate: true, createLazyBrowser: true, @@ -1180,7 +1308,7 @@ class nsZenWindowSync { if (lazy.gSyncOnlyPinnedTabs && !tab.pinned) { return; } - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const targetTab = this.getItemFromWindow(win, tab.id); if (targetTab) { targetTab.ownerGlobal.gBrowser.hideTab(targetTab); @@ -1194,7 +1322,7 @@ class nsZenWindowSync { if (lazy.gSyncOnlyPinnedTabs && !tab.pinned) { return; } - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const targetTab = this.getItemFromWindow(win, tab.id); if (targetTab) { targetTab.ownerGlobal.gBrowser.showTab(targetTab); @@ -1228,7 +1356,7 @@ class nsZenWindowSync { on_TabUnpinned(aEvent) { const tab = aEvent.target; - this.#runOnAllWindows(null, (win) => { + this.#runOnAllWindows(null, win => { const targetTab = this.getItemFromWindow(win, tab.id); if (targetTab) { delete targetTab._zenPinnedInitialState; @@ -1252,7 +1380,7 @@ class nsZenWindowSync { on_TabClose(aEvent) { const tab = aEvent.target; const window = tab.ownerGlobal; - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const targetTab = this.getItemFromWindow(win, tab.id); if (targetTab) { win.gBrowser.removeTab(targetTab, { animate: true }); @@ -1278,7 +1406,7 @@ class nsZenWindowSync { this.#lastFocusedWindow = new WeakRef(window); this.#lastSelectedTab = new WeakRef(window.gBrowser.selectedTab); // eslint-disable-next-line no-async-promise-executor - this.#docShellSwitchPromise = new Promise(async (resolve) => { + this.#docShellSwitchPromise = new Promise(async resolve => { await promise; await this.#onTabSwitchOrWindowFocus(window); resolve(); @@ -1294,7 +1422,7 @@ class nsZenWindowSync { const previousTab = aEvent.detail.previousTab; let promise = this.#docShellSwitchPromise; // eslint-disable-next-line no-async-promise-executor - this.#docShellSwitchPromise = new Promise(async (resolve) => { + this.#docShellSwitchPromise = new Promise(async resolve => { await promise; await this.#onTabSwitchOrWindowFocus(tab.ownerGlobal, previousTab); resolve(); @@ -1332,7 +1460,9 @@ class nsZenWindowSync { // flush the tab state, the title might not be correct. if (activePageData && win?.gBrowser) { win.gBrowser.setInitialTabTitle(tab, activePageData.title, { - isContentTitle: activePageData.title && activePageData.title != activePageData.url, + isContentTitle: + activePageData.title && + activePageData.title != activePageData.url, }); } } catch (e) { @@ -1359,7 +1489,7 @@ class nsZenWindowSync { return; // Split view groups are synced via ZenSplitViewTabsSplit event. } // Tab groups already have an ID upon creation. - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { // Check if a group with this ID already exists in the target window. const existingGroup = this.getItemFromWindow(win, tabGroup.id); if (existingGroup) { @@ -1386,7 +1516,7 @@ class nsZenWindowSync { on_TabGroupRemoved(aEvent) { const tabGroup = aEvent.target; const window = tabGroup.ownerGlobal; - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const targetGroup = this.getItemFromWindow(win, tabGroup.id); if (targetGroup) { if (targetGroup.isZenFolder) { @@ -1403,7 +1533,10 @@ class nsZenWindowSync { } on_TabGroupUpdate(aEvent) { - return this.#delegateGenericSyncEvent(aEvent, SYNC_FLAG_ICON | SYNC_FLAG_LABEL); + return this.#delegateGenericSyncEvent( + aEvent, + SYNC_FLAG_ICON | SYNC_FLAG_LABEL + ); } on_TabUngrouped() { @@ -1417,7 +1550,7 @@ class nsZenWindowSync { on_ZenTabRemovedFromSplit(aEvent) { const tab = aEvent.target; const window = tab.ownerGlobal; - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const targetTab = this.getItemFromWindow(win, tab.id); if (targetTab && win.gZenViewSplitter) { win.gZenViewSplitter.removeTabFromGroup(targetTab); @@ -1429,23 +1562,33 @@ class nsZenWindowSync { const tabGroup = aEvent.target; const window = tabGroup.ownerGlobal; const tabs = tabGroup.tabs; - this.#runOnAllWindows(window, (win) => { + this.#runOnAllWindows(window, win => { const otherWindowTabs = tabs - .map((tab) => this.getItemFromWindow(win, tab.id)) + .map(tab => this.getItemFromWindow(win, tab.id)) .filter(Boolean); if (otherWindowTabs.length && win.gZenViewSplitter) { - const group = win.gZenViewSplitter.splitTabs(otherWindowTabs, undefined, -1, { - groupFetchId: tabGroup.id, - }); + const group = win.gZenViewSplitter.splitTabs( + otherWindowTabs, + undefined, + -1, + { + groupFetchId: tabGroup.id, + } + ); if (group) { let otherTabGroup = group.tabs[0].group; otherTabGroup.id = tabGroup.id; - this.#syncItemWithOriginal(aEvent.target, otherTabGroup, win, SYNC_FLAG_MOVE); + this.#syncItemWithOriginal( + aEvent.target, + otherTabGroup, + win, + SYNC_FLAG_MOVE + ); } } }); - return new Promise((resolve) => { + return new Promise(resolve => { lazy.setTimeout(() => { this.#onTabSwitchOrWindowFocus(window, null).finally(resolve); }, 0); diff --git a/src/zen/split-view/ZenViewSplitter.mjs b/src/zen/split-view/ZenViewSplitter.mjs index d1cd28fef..e6a7206ce 100644 --- a/src/zen/split-view/ZenViewSplitter.mjs +++ b/src/zen/split-view/ZenViewSplitter.mjs @@ -51,7 +51,7 @@ class nsSplitNode extends nsSplitLeafNode { set children(children) { if (children) { - children.forEach((c) => (c.parent = this)); + children.forEach(c => (c.parent = this)); } this._children = children; } @@ -111,7 +111,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { ); window.addEventListener("TabClose", this.handleTabClose.bind(this)); - window.addEventListener("TabBrowserDiscarded", this.handleTabBrowserDiscarded.bind(this)); + window.addEventListener( + "TabBrowserDiscarded", + this.handleTabBrowserDiscarded.bind(this) + ); window.addEventListener("TabSelect", this.onTabSelect.bind(this)); this.initializeContextMenu(); this.insertIntoContextMenu(); @@ -127,7 +130,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // Add drag over listener to the browser view if (Services.prefs.getBoolPref("zen.splitView.enable-tab-drop")) { const tabBox = document.getElementById("tabbrowser-tabbox"); - tabBox.addEventListener("dragover", this.onBrowserDragOverToSplit.bind(this)); + tabBox.addEventListener( + "dragover", + this.onBrowserDragOverToSplit.bind(this) + ); this.onBrowserDragEndToSplit = this.onBrowserDragEndToSplit.bind(this); } } @@ -151,7 +157,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (tab === this._lastOpenedTab) { this._lastOpenedTab = null; } - const groupIndex = this._data.findIndex((group) => group.tabs.includes(tab)); + const groupIndex = this._data.findIndex(group => group.tabs.includes(tab)); if (groupIndex < 0) { return; } @@ -206,7 +212,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { { forUnsplit = false, dontRebuildGrid = false, changeTab = true } = {} ) { if (typeof groupIndex === "undefined") { - groupIndex = this._data.findIndex((group) => group.tabs.includes(tab)); + groupIndex = this._data.findIndex(group => group.tabs.includes(tab)); } // If groupIndex === -1, so `this._data.findIndex` couldn't find the split group if (groupIndex < 0) { @@ -232,7 +238,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this.removeGroup(groupIndex); if (changeTab) { gBrowser.selectedTab = remainingTabs[remainingTabs.length - 1]; - document.getElementById("cmd_zenNewEmptySplit").removeAttribute("disabled"); + document + .getElementById("cmd_zenNewEmptySplit") + .removeAttribute("disabled"); } } else { const node = this.getSplitNodeFromTab(tab); @@ -272,10 +280,22 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const quarterHeight = height / 4; const edges = [ - { side: "left", dist: clientX - panelsRect.left, threshold: quarterWidth }, - { side: "right", dist: panelsRect.right - clientX, threshold: quarterWidth }, + { + side: "left", + dist: clientX - panelsRect.left, + threshold: quarterWidth, + }, + { + side: "right", + dist: panelsRect.right - clientX, + threshold: quarterWidth, + }, { side: "top", dist: clientY - panelsRect.top, threshold: quarterHeight }, - { side: "bottom", dist: panelsRect.bottom - clientY, threshold: quarterHeight }, + { + side: "bottom", + dist: panelsRect.bottom - clientY, + threshold: quarterHeight, + }, ]; let closestEdge = null; @@ -309,7 +329,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { ) { return; } - gBrowser.tabContainer.tabDragAndDrop.finishMoveTogetherSelectedTabs(draggedTab); + gBrowser.tabContainer.tabDragAndDrop.finishMoveTogetherSelectedTabs( + draggedTab + ); } else { return; } @@ -326,7 +348,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (!draggedTab || this._canDrop || this._hasAnimated || this.fakeBrowser) { return; } - if (draggedTab.splitView || draggedTab.hasAttribute("zen-live-folder-item-id")) { + if ( + draggedTab.splitView || + draggedTab.hasAttribute("zen-live-folder-item-id") + ) { return; } const currentView = this._data[this._lastOpenedTab.splitViewValue]; @@ -349,19 +374,18 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return; } // first quarter or last quarter of the screen, but not the middle - if ( - !( - event.clientX < panelsRect.left + panelsWidth / 4 || - event.clientX > panelsRect.left + (panelsWidth / 4) * 3 || - event.clientY < panelsRect.top + panelsHeight / 4 || - event.clientY > panelsRect.top + (panelsHeight / 4) * 3 - ) - ) { + if (!( + event.clientX < panelsRect.left + panelsWidth / 4 || + event.clientX > panelsRect.left + (panelsWidth / 4) * 3 || + event.clientY < panelsRect.top + panelsHeight / 4 || + event.clientY > panelsRect.top + (panelsHeight / 4) * 3 + )) { return; } dt.mozCursor = "default"; if (!this._dndElement) { - const originalDNDArgs = gBrowser.tabContainer.tabDragAndDrop.originalDragImageArgs; + const originalDNDArgs = + gBrowser.tabContainer.tabDragAndDrop.originalDragImageArgs; requestAnimationFrame(() => { dt.updateDragImage( this.#getDragImageForSplit(draggedTab), @@ -397,7 +421,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (!browser) { continue; } - const { width: browserWidth, height: browserHeight } = browser.getBoundingClientRect(); + const { width: browserWidth, height: browserHeight } = + browser.getBoundingClientRect(); // Only apply it to the left side because if we add it to the right side, // we wont be able to move the element to the left. // FIXME: This is a workaround, we should find a better way to do this @@ -411,7 +436,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } } this.fakeBrowser = document.createXULElement("vbox"); - window.addEventListener("dragend", this.onBrowserDragEndToSplit, { once: true }); + window.addEventListener("dragend", this.onBrowserDragEndToSplit, { + once: true, + }); const padding = ZenThemeModifier.elementSeparation; this.fakeBrowser.setAttribute("flex", "1"); this.fakeBrowser.id = "zen-split-view-fake-browser"; @@ -479,7 +506,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { .closest(".browserSidebarContainer") .classList.remove("deck-selected"); } - this.fakeBrowser.addEventListener("dragleave", this.onBrowserDragEndToSplit); + this.fakeBrowser.addEventListener( + "dragleave", + this.onBrowserDragEndToSplit + ); this._canDrop = true; }); } @@ -490,7 +520,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return; } const panelsRect = gBrowser.tabbox.getBoundingClientRect(); - const fakeBrowserRect = this.fakeBrowser && this.fakeBrowser.getBoundingClientRect(); + const fakeBrowserRect = + this.fakeBrowser && this.fakeBrowser.getBoundingClientRect(); if ( ((fakeBrowserRect && event.clientX > fakeBrowserRect.left && @@ -595,7 +626,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { parent.children.splice(childIndex, 1); if (parent.children.length !== 1) { const otherNodeIncrease = 100 / (100 - toRemove.sizeInParent); - parent.children.forEach((c) => (c.sizeInParent *= otherNodeIncrease)); + parent.children.forEach(c => (c.sizeInParent *= otherNodeIncrease)); return parent; } // node that is not a leaf cannot have less than 2 children, this makes for better resizing @@ -609,7 +640,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { parent.parent.children[idx] = leftOverChild; } else { // node cannot have same direction as it's parent - leftOverChild.children.forEach((c) => { + leftOverChild.children.forEach(c => { c.sizeInParent *= leftOverChild.sizeInParent / 100; c.parent = parent.parent; }); @@ -619,7 +650,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this._removeNodeSplitters(parent, false); return parent.parent; } - const viewData = Object.values(this._data).find((s) => s.layoutTree === parent); + const viewData = Object.values(this._data).find( + s => s.layoutTree === parent + ); viewData.layoutTree = leftOverChild; leftOverChild.positionToRoot = null; leftOverChild.parent = null; @@ -632,13 +665,13 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { * @private */ _removeNodeSplitters(node, recursive) { - this.getSplitters(node)?.forEach((s) => s.remove()); + this.getSplitters(node)?.forEach(s => s.remove()); this._splitNodeToSplitters.delete(node); if (!recursive) { return; } if (node && node.children) { - node.children.forEach((c) => this._removeNodeSplitters(c)); + node.children.forEach(c => this._removeNodeSplitters(c)); } } @@ -666,20 +699,28 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this._thumnailCanvas.width = 280 * devicePixelRatio; this._thumnailCanvas.height = 140 * devicePixelRatio; } - const browsers = this._data[this.currentView].tabs.map((t) => t.linkedBrowser); - browsers.forEach((b) => { + const browsers = this._data[this.currentView].tabs.map( + t => t.linkedBrowser + ); + browsers.forEach(b => { b.style.pointerEvents = "none"; b.style.opacity = ".85"; }); if (!tabDrag) { - this.tabBrowserPanel.addEventListener("dragstart", this.onBrowserDragStart); + this.tabBrowserPanel.addEventListener( + "dragstart", + this.onBrowserDragStart + ); this.tabBrowserPanel.addEventListener("dragend", this.onBrowserDragEnd); } this.tabBrowserPanel.addEventListener("dragover", this.onBrowserDragOver); this.tabBrowserPanel.addEventListener("drop", this.onBrowserDrop); - this.tabBrowserPanel.addEventListener("click", this.disableTabRearrangeView); + this.tabBrowserPanel.addEventListener( + "click", + this.disableTabRearrangeView + ); window.addEventListener("keydown", this.disableTabRearrangeView); } @@ -704,13 +745,24 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return; } - this.tabBrowserPanel.removeEventListener("dragstart", this.onBrowserDragStart); - this.tabBrowserPanel.removeEventListener("dragover", this.onBrowserDragOver); + this.tabBrowserPanel.removeEventListener( + "dragstart", + this.onBrowserDragStart + ); + this.tabBrowserPanel.removeEventListener( + "dragover", + this.onBrowserDragOver + ); this.tabBrowserPanel.removeEventListener("drop", this.onBrowserDrop); - this.tabBrowserPanel.removeEventListener("click", this.disableTabRearrangeView); + this.tabBrowserPanel.removeEventListener( + "click", + this.disableTabRearrangeView + ); window.removeEventListener("keydown", this.disableTabRearrangeView); - const browsers = this._data[this.rearrangeViewView].tabs.map((t) => t.linkedBrowser); - browsers.forEach((b) => { + const browsers = this._data[this.rearrangeViewView].tabs.map( + t => t.linkedBrowser + ); + browsers.forEach(b => { b.style.pointerEvents = ""; b.style.opacity = ""; }); @@ -718,7 +770,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this.rearrangeViewView = null; }; - onBrowserDragStart = (event) => { + onBrowserDragStart = event => { if (!this.splitViewActive) { return; } @@ -726,7 +778,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { let browser; let isSplitHeaderDrag = false; - const container = event.target.closest(".browserSidebarContainer[zen-split]"); + const container = event.target.closest( + ".browserSidebarContainer[zen-split]" + ); if (container && event.target.closest(".zen-tab-rearrange-button")) { // Split tab header drag case const containerRect = container.getBoundingClientRect(); @@ -765,14 +819,20 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } browser.style.opacity = ".2"; - event.dataTransfer.setData("text/plain", browser.closest(".browserSidebarContainer").id); + event.dataTransfer.setData( + "text/plain", + browser.closest(".browserSidebarContainer").id + ); this._draggingTab = tab; // Canvas setup for drag image let scale = window.devicePixelRatio; let canvas = this._dndCanvas; if (!canvas) { - this._dndCanvas = canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); + this._dndCanvas = canvas = document.createElementNS( + "http://www.w3.org/1999/xhtml", + "canvas" + ); canvas.style.width = "100%"; canvas.style.height = "100%"; } @@ -792,7 +852,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // using updateDragImage. On Linux, we can use a panel. if (platform === "win" || platform === "macosx") { captureListener = () => { - event.dataTransfer.updateDragImage(canvas, dragImageOffset, dragImageOffset); + event.dataTransfer.updateDragImage( + canvas, + dragImageOffset, + dragImageOffset + ); }; } else { // Create a panel to use it in setDragImage @@ -803,7 +867,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this._dndPanel = document.createXULElement("panel"); this._dndPanel.className = "dragfeedback-tab"; this._dndPanel.setAttribute("type", "drag"); - let wrapper = document.createElementNS("http://www.w3.org/1999/xhtml", "div"); + let wrapper = document.createElementNS( + "http://www.w3.org/1999/xhtml", + "div" + ); wrapper.style.width = "160px"; wrapper.style.height = "90px"; wrapper.appendChild(canvas); @@ -816,18 +883,18 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // since we can update the image during the dnd. PageThumbs.captureToCanvas(browser, canvas) .then(captureListener) - .catch((e) => console.error(e)); + .catch(e => console.error(e)); } else { // For the non e10s case we can just use PageThumbs // sync, so let's use the canvas for setDragImage. - PageThumbs.captureToCanvas(browser, canvas).catch((e) => console.error(e)); + PageThumbs.captureToCanvas(browser, canvas).catch(e => console.error(e)); dragImageOffset = dragImageOffset * scale; } event.dataTransfer.setDragImage(toDrag, dragImageOffset, dragImageOffset); return true; }; - onBrowserDragOver = (event) => { + onBrowserDragOver = event => { event.preventDefault(); const browser = event.target.querySelector("browser"); if (!browser) { @@ -850,23 +917,32 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const posToRoot = { ...splitNode.positionToRoot }; const browserRect = browser.getBoundingClientRect(); - const hoverSide = this.calculateHoverSide(event.clientX, event.clientY, browserRect); + const hoverSide = this.calculateHoverSide( + event.clientX, + event.clientY, + browserRect + ); if (hoverSide !== "center") { const isVertical = hoverSide === "top" || hoverSide === "bottom"; const browserSize = - 100 - (isVertical ? posToRoot.top + posToRoot.bottom : posToRoot.right + posToRoot.left); + 100 - + (isVertical + ? posToRoot.top + posToRoot.bottom + : posToRoot.right + posToRoot.left); const reduce = browserSize * 0.5; posToRoot[this._oppositeSide(hoverSide)] += reduce; } const newInset = `${posToRoot.top}% ${posToRoot.right}% ${posToRoot.bottom}% ${posToRoot.left}%`; if (this.dropZone.style.inset !== newInset) { - window.requestAnimationFrame(() => (this.dropZone.style.inset = newInset)); + window.requestAnimationFrame( + () => (this.dropZone.style.inset = newInset) + ); } }; - onBrowserDragEnd = (event) => { + onBrowserDragEnd = event => { this.dropZone?.removeAttribute("enabled"); // If we don't have drag state, just clean up what we can @@ -908,8 +984,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } calculateHoverSide(x, y, elementRect) { - const hPixelHoverSize = ((elementRect.right - elementRect.left) * this._edgeHoverSize) / 100; - const vPixelHoverSize = ((elementRect.bottom - elementRect.top) * this._edgeHoverSize) / 100; + const hPixelHoverSize = + ((elementRect.right - elementRect.left) * this._edgeHoverSize) / 100; + const vPixelHoverSize = + ((elementRect.bottom - elementRect.top) * this._edgeHoverSize) / 100; if (x <= elementRect.left + hPixelHoverSize) { return "left"; } @@ -925,7 +1003,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return "center"; } - onBrowserDrop = (event) => { + onBrowserDrop = event => { const browserDroppedOn = event.target.querySelector("browser"); if (!browserDroppedOn) { return; @@ -935,7 +1013,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (!droppedTab) { return; } - const droppedOnTab = gBrowser.getTabForBrowser(event.target.querySelector("browser")); + const droppedOnTab = gBrowser.getTabForBrowser( + event.target.querySelector("browser") + ); if (droppedTab === droppedOnTab) { return; } @@ -981,7 +1061,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { * @param {number} sizeOfInsertedNode percentage of node width or height that nodeToInsert will take */ splitIntoNode(node, nodeToInsert, side, sizeOfInsertedNode) { - const splitDirection = side === "left" || side === "right" ? "row" : "column"; + const splitDirection = + side === "left" || side === "right" ? "row" : "column"; const splitPosition = side === "left" || side === "top" ? 0 : 1; let nodeSize; @@ -997,7 +1078,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const nodeIndex = node.parent.children.indexOf(node); node.parent.children[nodeIndex] = newParent; } else { - const viewData = Object.values(this._data).find((s) => s.layoutTree === node); + const viewData = Object.values(this._data).find( + s => s.layoutTree === node + ); viewData.layoutTree = newParent; } newParent.addChild(node); @@ -1084,7 +1167,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const tabCountInfo = JSON.stringify({ tabCount: window.gBrowser.selectedTabs.length, }); - document.getElementById("context_zenSplitTabs").setAttribute("data-l10n-args", tabCountInfo); + document + .getElementById("context_zenSplitTabs") + .setAttribute("data-l10n-args", tabCountInfo); const splitTabs = document.getElementById("context_zenSplitTabs"); if (!this.contextCanSplitTabs()) { splitTabs.setAttribute("hidden", "true"); @@ -1137,7 +1222,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { window.gContextMenu.mediaURL || window.gContextMenu.contentData.docLocation || window.gContextMenu.target.ownerDocument.location.href; - const currentTab = gZenGlanceManager.getTabOrGlanceParent(window.gBrowser.selectedTab); + const currentTab = gZenGlanceManager.getTabOrGlanceParent( + window.gBrowser.selectedTab + ); const newTab = this.openAndSwitchToTab(url, { inBackground: false }); this.splitTabs([currentTab, newTab], undefined, 1); } @@ -1199,7 +1286,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } this._maybeRemoveFakeBrowser(); { - const shouldDisableEmptySplits = tab.hasAttribute("zen-empty-tab") || tab.splitView; + const shouldDisableEmptySplits = + tab.hasAttribute("zen-empty-tab") || tab.splitView; const command = document.getElementById("cmd_zenNewEmptySplit"); if (shouldDisableEmptySplits) { command.setAttribute("disabled", "true"); @@ -1245,21 +1333,23 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const tabIndexToUse = Math.max(0, initialIndex); return this.#withoutSplitViewTransition(() => { // TODO: Add support for splitting essential tabs - tabs = tabs.filter((t) => !t.hidden && !t.hasAttribute("zen-empty-tab")); + tabs = tabs.filter(t => !t.hidden && !t.hasAttribute("zen-empty-tab")); if (tabs.length < 2 || tabs.length > this.MAX_TABS) { return; } - const existingSplitTab = tabs.find((tab) => tab.splitView); + const existingSplitTab = tabs.find(tab => tab.splitView); let shouldActivateSplit = (initialIndex >= 0 || tabs.includes(window.gBrowser.selectedTab)) && !this._sessionRestoring; if (existingSplitTab) { this._moveTabsToContainer(tabs, tabs[tabIndexToUse]); - const groupIndex = this._data.findIndex((group) => group.tabs.includes(existingSplitTab)); + const groupIndex = this._data.findIndex(group => + group.tabs.includes(existingSplitTab) + ); const group = this._data[groupIndex]; const gridTypeChange = gridType && group.gridType !== gridType; - const newTabsAdded = tabs.find((t) => !group.tabs.includes(t)); + const newTabsAdded = tabs.find(t => !group.tabs.includes(t)); if (group.tabs.length >= this.MAX_TABS) { return; } @@ -1275,7 +1365,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { for (let i = 0; i < tabs.length; i++) { const tab = tabs[i]; if (!group.tabs.includes(tab)) { - gBrowser.moveTabToExistingGroup(tab, this._getSplitViewGroup(tabs, groupFetchId)); + gBrowser.moveTabToExistingGroup( + tab, + this._getSplitViewGroup(tabs, groupFetchId) + ); group.tabs.push(tab); this.addTabToSplit(tab, group.layoutTree, false); tab.splitView = true; @@ -1294,12 +1387,20 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // We are here if none of the tabs have been previously split // If there's ANY pinned tab on the list, we clone the pinned tab // state to all the tabs - const allArePinned = tabs.every((tab) => tab.pinned); - const thereIsOnePinned = tabs.some((tab) => tab.pinned); - const thereIsOneEssential = tabs.some((tab) => tab.hasAttribute("zen-essential")); - const thereIsOneLiveFolder = tabs.some((tab) => tab.hasAttribute("zen-live-folder-item-id")); + const allArePinned = tabs.every(tab => tab.pinned); + const thereIsOnePinned = tabs.some(tab => tab.pinned); + const thereIsOneEssential = tabs.some(tab => + tab.hasAttribute("zen-essential") + ); + const thereIsOneLiveFolder = tabs.some(tab => + tab.hasAttribute("zen-live-folder-item-id") + ); - if (thereIsOneEssential || (thereIsOnePinned && !allArePinned) || thereIsOneLiveFolder) { + if ( + thereIsOneEssential || + (thereIsOnePinned && !allArePinned) || + thereIsOneLiveFolder + ) { for (let i = 0; i < tabs.length; i++) { const tab = tabs[i]; if (tab.pinned) { @@ -1345,7 +1446,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { addTabToSplit(tab, splitNode, prepend = true) { const reduce = splitNode.children.length / (splitNode.children.length + 1); - splitNode.children.forEach((c) => (c.sizeInParent *= reduce)); + splitNode.children.forEach(c => (c.sizeInParent *= reduce)); splitNode.addChild(new nsSplitLeafNode(tab, (1 - reduce) * 100), prepend); } @@ -1356,7 +1457,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { */ updateSplitView(tab) { const oldView = this.currentView; - const newView = this._data.findIndex((group) => group.tabs.includes(tab)); + const newView = this._data.findIndex(group => group.tabs.includes(tab)); if (newView === oldView && oldView < 0) { return; @@ -1386,11 +1487,15 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } this.removeSplitters(); this.tabBrowserPanel.removeAttribute("zen-split-view"); - document.getElementById("tabbrowser-tabbox").removeAttribute("zen-split-view"); + document + .getElementById("tabbrowser-tabbox") + .removeAttribute("zen-split-view"); this.currentView = -1; this.toggleWrapperDisplay(false); this.maybeDisableOpeningTabOnSplitView(); - window.dispatchEvent(new CustomEvent("ZenViewSplitter:SplitViewDeactivated")); + window.dispatchEvent( + new CustomEvent("ZenViewSplitter:SplitViewDeactivated") + ); } /** @@ -1409,7 +1514,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (reset) { this.removeSplitters(); } - splitData.tabs.forEach((tab) => { + splitData.tabs.forEach(tab => { if (tab.hasAttribute("pending")) { gBrowser.getBrowserForTab(tab).reload(); } @@ -1422,7 +1527,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this.applyGridToTabs(splitData.tabs); this.tabBrowserPanel.setAttribute("zen-split-view", "true"); - document.getElementById("tabbrowser-tabbox").setAttribute("zen-split-view", "true"); + document + .getElementById("tabbrowser-tabbox") + .setAttribute("zen-split-view", "true"); this.applyGridLayout(splitData.layoutTree); this.setTabsDocShellState(splitData.tabs, true); @@ -1434,10 +1541,14 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { let rootNode; if (gridType === "vsep" || (tabs.length === 2 && gridType === "grid")) { rootNode = new nsSplitNode("row"); - rootNode.children = tabs.map((tab) => new nsSplitLeafNode(tab, 100 / tabs.length)); + rootNode.children = tabs.map( + tab => new nsSplitLeafNode(tab, 100 / tabs.length) + ); } else if (gridType === "hsep") { rootNode = new nsSplitNode("column"); - rootNode.children = tabs.map((tab) => new nsSplitLeafNode(tab, 100 / tabs.length)); + rootNode.children = tabs.map( + tab => new nsSplitLeafNode(tab, 100 / tabs.length) + ); } else if (gridType === "grid") { rootNode = new nsSplitNode("row"); const rowWidth = 100 / Math.ceil(tabs.length / 2); @@ -1450,7 +1561,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { rootNode.addChild(columnNode, false); } if (tabs.length % 2 !== 0) { - rootNode.addChild(new nsSplitLeafNode(tabs[tabs.length - 1], rowWidth), false); + rootNode.addChild( + new nsSplitLeafNode(tabs[tabs.length - 1], rowWidth), + false + ); } } @@ -1463,7 +1577,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { * @param {Tab[]} tabs - The tabs to apply the grid layout to. */ applyGridToTabs(tabs) { - tabs.forEach((tab) => { + tabs.forEach(tab => { tab.splitView = true; tab.splitViewValue = this.currentView; tab.setAttribute("split-view", "true"); @@ -1496,7 +1610,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { header.classList.add("zen-view-splitter-header"); const removeButton = document.createXULElement("toolbarbutton"); removeButton.classList.add("zen-tab-unsplit-button"); - removeButton.addEventListener("click", (event) => { + removeButton.addEventListener("click", event => { this.removeTabFromSplit(event, container); }); const rearrangeButton = document.createXULElement("toolbarbutton"); @@ -1508,7 +1622,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } _removeHeader(container) { - const header = container.querySelector(".zen-view-splitter-header-container"); + const header = container.querySelector( + ".zen-view-splitter-header-container" + ); if (header) { header.remove(); } @@ -1525,14 +1641,18 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } const nodeRootPosition = splitNode.positionToRoot; if (!splitNode.children) { - const browserContainer = splitNode.tab.linkedBrowser.closest(".browserSidebarContainer"); + const browserContainer = splitNode.tab.linkedBrowser.closest( + ".browserSidebarContainer" + ); browserContainer.style.inset = `${nodeRootPosition.top}% ${nodeRootPosition.right}% ${nodeRootPosition.bottom}% ${nodeRootPosition.left}%`; this._tabToSplitNode.set(splitNode.tab, splitNode); return; } - const rootToNodeWidthRatio = (100 - nodeRootPosition.right - nodeRootPosition.left) / 100; - const rootToNodeHeightRatio = (100 - nodeRootPosition.bottom - nodeRootPosition.top) / 100; + const rootToNodeWidthRatio = + (100 - nodeRootPosition.right - nodeRootPosition.left) / 100; + const rootToNodeHeightRatio = + (100 - nodeRootPosition.bottom - nodeRootPosition.top) / 100; const splittersNeeded = splitNode.children.length - 1; const currentSplitters = this.getSplitters(splitNode, splittersNeeded); @@ -1542,8 +1662,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { splitNode.children.forEach((childNode, i) => { const childRootPosition = { top: topOffset, - right: 100 - (leftOffset + childNode.widthInParent * rootToNodeWidthRatio), - bottom: 100 - (topOffset + childNode.heightInParent * rootToNodeHeightRatio), + right: + 100 - (leftOffset + childNode.widthInParent * rootToNodeWidthRatio), + bottom: + 100 - (topOffset + childNode.heightInParent * rootToNodeHeightRatio), left: leftOffset, }; childNode.positionToRoot = childRootPosition; @@ -1604,7 +1726,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { currentSplitters[i].parentSplitNode = parentNode; } if (currentSplitters.length > splittersNeeded) { - currentSplitters.slice(splittersNeeded - currentSplitters.length).forEach((s) => s.remove()); + currentSplitters + .slice(splittersNeeded - currentSplitters.length) + .forEach(s => s.remove()); currentSplitters = currentSplitters.slice(0, splittersNeeded); } this._splitNodeToSplitters.set(parentNode, currentSplitters); @@ -1613,8 +1737,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { removeSplitters() { [...this.overlay.children] - .filter((c) => c.classList.contains("zen-split-view-splitter")) - .forEach((s) => s.remove()); + .filter(c => c.classList.contains("zen-split-view-splitter")) + .forEach(s => s.remove()); this._splitNodeToSplitters.clear(); } @@ -1640,20 +1764,20 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { * * @param {Event} event - The event. */ - _handleTabEvent = (event) => { + _handleTabEvent = event => { if (this.rearrangeViewEnabled) { return; } const container = event.currentTarget.closest(".browserSidebarContainer"); const tab = window.gBrowser.tabs.find( - (t) => t.linkedBrowser?.closest(".browserSidebarContainer") === container + t => t.linkedBrowser?.closest(".browserSidebarContainer") === container ); if (tab) { window.gBrowser.selectedTab = tab; } }; - handleSplitterMouseDown = (event) => { + handleSplitterMouseDown = event => { this.tabBrowserPanel.setAttribute("zen-split-resizing", true); const isVertical = event.target.getAttribute("orient") === "vertical"; const dimension = isVertical ? "width" : "height"; @@ -1664,15 +1788,21 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { const splitNode = event.target.parentSplitNode; let rootToNodeSize; if (isVertical) { - rootToNodeSize = 100 / (100 - splitNode.positionToRoot.right - splitNode.positionToRoot.left); + rootToNodeSize = + 100 / + (100 - splitNode.positionToRoot.right - splitNode.positionToRoot.left); } else { - rootToNodeSize = 100 / (100 - splitNode.positionToRoot.bottom - splitNode.positionToRoot.top); + rootToNodeSize = + 100 / + (100 - splitNode.positionToRoot.bottom - splitNode.positionToRoot.top); } - const originalSizes = splitNode.children.map((c) => c.sizeInParent); + const originalSizes = splitNode.children.map(c => c.sizeInParent); - const dragFunc = (dEvent) => { + const dragFunc = dEvent => { requestAnimationFrame(() => { - originalSizes.forEach((s, i) => (splitNode.children[i].sizeInParent = s)); // reset changes + originalSizes.forEach( + (s, i) => (splitNode.children[i].sizeInParent = s) + ); // reset changes const movement = dEvent[clientAxis] - startPosition; let movementPercent = @@ -1687,7 +1817,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { i += movementPercent < 0 ? -1 : 1 ) { const current = originalSizes[i]; - const newSize = Math.max(this.minResizeWidth, current - reducingMovement); + const newSize = Math.max( + this.minResizeWidth, + current - reducingMovement + ); splitNode.children[i].sizeInParent = newSize; const amountReduced = current - newSize; reducingMovement -= amountReduced; @@ -1695,7 +1828,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { break; } } - const increasingMovement = Math.max(movementPercent, -movementPercent) - reducingMovement; + const increasingMovement = + Math.max(movementPercent, -movementPercent) - reducingMovement; const increaseIndex = gridIdx + (movementPercent < 0 ? 1 : 0); splitNode.children[increaseIndex].sizeInParent = originalSizes[increaseIndex] + increasingMovement; @@ -1772,9 +1906,14 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { */ updatePanelUI(panel) { for (const gridType of ["hsep", "vsep", "grid", "unsplit"]) { - const selector = panel.querySelector(`.zen-split-view-modifier-preview.${gridType}`); + const selector = panel.querySelector( + `.zen-split-view-modifier-preview.${gridType}` + ); selector.classList.remove("active"); - if (this.currentView >= 0 && this._data[this.currentView].gridType === gridType) { + if ( + this.currentView >= 0 && + this._data[this.currentView].gridType === gridType + ) { selector.classList.add("active"); } } @@ -1818,13 +1957,13 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { let nextTabIndex = tabs.indexOf(gBrowser.selectedTab) + 1; if (nextTabIndex >= tabs.length) { // Find the first non-hidden tab - nextTabIndex = tabs.findIndex((tab) => !tab.hidden); + nextTabIndex = tabs.findIndex(tab => !tab.hidden); } else if (nextTabIndex < 0) { // reverse find the first non-hidden tab nextTabIndex = tabs .slice() .reverse() - .findIndex((tab) => !tab.hidden); + .findIndex(tab => !tab.hidden); } const selected_tabs = gBrowser.selectedTab.multiselected ? gBrowser.selectedTabs @@ -1834,7 +1973,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (this.currentView >= 0) { const splitViewId = this._data[this.currentView].groupId; const sameSplitView = selected_tabs.every( - (tab) => !tab?.group || tab.group.id === splitViewId + tab => !tab?.group || tab.group.id === splitViewId ); if (!sameSplitView) { return; @@ -1854,7 +1993,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (browser) { const tab = gBrowser.getTabForBrowser(browser); if (tab) { - const groupIndex = this._data.findIndex((group) => group.tabs.includes(tab)); + const groupIndex = this._data.findIndex(group => + group.tabs.includes(tab) + ); this.deactivateCurrentSplitView(); if (groupIndex >= 0) { this.removeTabFromGroup(tab, groupIndex, { forUnsplit: true }); @@ -1948,7 +2089,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return false; } - let droppedOnTab = gZenGlanceManager.getTabOrGlanceParent(gBrowser.getTabForBrowser(browser)); + let droppedOnTab = gZenGlanceManager.getTabOrGlanceParent( + gBrowser.getTabForBrowser(browser) + ); if (droppedOnTab === this._draggingTab) { this.createEmptySplit(dropSide); return true; @@ -1956,7 +2099,9 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { gBrowser.selectedTab = this._draggingTab; this._draggingTab = null; - const browserContainer = draggedTab.linkedBrowser?.closest(".browserSidebarContainer"); + const browserContainer = draggedTab.linkedBrowser?.closest( + ".browserSidebarContainer" + ); if (browserContainer) { browserContainer.style.opacity = "0"; } @@ -1971,9 +2116,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // If there's ANY pinned tab on the list, we clone the pinned tab // state to all the tabs let tempTabs = [draggedTab, droppedOnTab]; - const allArePinned = tempTabs.every((tab) => tab.pinned); - const thereIsOnePinned = tempTabs.some((tab) => tab.pinned); - const thereIsOneEssential = tempTabs.some((tab) => tab.hasAttribute("zen-essential")); + const allArePinned = tempTabs.every(tab => tab.pinned); + const thereIsOnePinned = tempTabs.some(tab => tab.pinned); + const thereIsOneEssential = tempTabs.some(tab => + tab.hasAttribute("zen-essential") + ); if (thereIsOneEssential || (thereIsOnePinned && !allArePinned)) { for (let i = 0; i < tempTabs.length; i++) { @@ -1988,13 +2135,21 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (droppedOnTab.splitView) { // Add to existing split view - const groupIndex = this._data.findIndex((group) => group.tabs.includes(droppedOnTab)); + const groupIndex = this._data.findIndex(group => + group.tabs.includes(droppedOnTab) + ); const group = this._data[groupIndex]; - if (!group.tabs.includes(draggedTab) && group.tabs.length < this.MAX_TABS) { + if ( + !group.tabs.includes(draggedTab) && + group.tabs.length < this.MAX_TABS + ) { // First move the tab to the split view group let splitGroup = droppedOnTab.group; - if (splitGroup && (!draggedTab.group || draggedTab.group !== splitGroup)) { + if ( + splitGroup && + (!draggedTab.group || draggedTab.group !== splitGroup) + ) { this._moveTabsToContainer([draggedTab], droppedOnTab); gBrowser.moveTabToExistingGroup(draggedTab, splitGroup); if (hoverSide === "left" || hoverSide === "top") { @@ -2012,7 +2167,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { // If dropping on a side, wrap entire layout in a new split at the root level if (hoverSide !== "center") { - const splitDirection = hoverSide === "left" || hoverSide === "right" ? "row" : "column"; + const splitDirection = + hoverSide === "left" || hoverSide === "right" ? "row" : "column"; const rootNode = group.layoutTree; const prepend = hoverSide === "left" || hoverSide === "top"; @@ -2021,7 +2177,12 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { this.addTabToSplit(draggedTab, rootNode, prepend); } else { // Different direction, wrap root in a new split node - this.splitIntoNode(rootNode, new nsSplitLeafNode(draggedTab, 50), hoverSide, 0.5); + this.splitIntoNode( + rootNode, + new nsSplitLeafNode(draggedTab, 50), + hoverSide, + 0.5 + ); } } else { this.addTabToSplit(draggedTab, group.layoutTree); @@ -2031,7 +2192,8 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } } else { // Create new split view with layout based on drop position - const gridType = dropSide === "top" || dropSide === "bottom" ? "hsep" : "vsep"; + const gridType = + dropSide === "top" || dropSide === "bottom" ? "hsep" : "vsep"; const topOrLeft = dropSide === "top" || dropSide === "left"; // Put tabs always as if it was dropped from the left @@ -2112,12 +2274,14 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { * @returns {TabGroup} The tab group for split view tabs */ _getSplitViewGroup(tabs, id = null) { - if (tabs.some((tab) => tab.hasAttribute("zen-essential"))) { + if (tabs.some(tab => tab.hasAttribute("zen-essential"))) { return null; } // Try to find an existing split view group - let splitGroup = tabs?.find((tab) => tab.group?.hasAttribute("split-view-group"))?.group; + let splitGroup = tabs?.find(tab => + tab.group?.hasAttribute("split-view-group") + )?.group; if (splitGroup) { return splitGroup; } @@ -2138,7 +2302,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { } storeDataForSessionStore() { - const serializeNode = (node) => { + const serializeNode = node => { if (node.tab) { return { type: "leaf", @@ -2151,17 +2315,17 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { type: "splitter", direction: node.direction, sizeInParent: node.sizeInParent, - children: node._children.map((child) => serializeNode(child)), + children: node._children.map(child => serializeNode(child)), }; }; - return this._data.map((group) => { + return this._data.map(group => { const serializedTree = serializeNode(group.layoutTree); return { groupId: group.groupId, gridType: group.gridType, layoutTree: serializedTree, - tabs: group.tabs.map((tab) => tab.id), + tabs: group.tabs.map(tab => tab.id), }; }); } @@ -2188,7 +2352,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return; } - const deserializeNode = (nodeData) => { + const deserializeNode = nodeData => { if (nodeData.type === "leaf") { const tab = document.getElementById(nodeData.tabId); if (!tab) { @@ -2197,7 +2361,10 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { return new nsSplitLeafNode(tab, nodeData.sizeInParent); } - const splitter = new nsSplitNode(nodeData.direction, nodeData.sizeInParent); + const splitter = new nsSplitNode( + nodeData.direction, + nodeData.sizeInParent + ); splitter._children = []; for (const childData of nodeData.children) { @@ -2291,9 +2458,11 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { setTimeout(() => { window.addEventListener( "ZenURLBarClosed", - (event) => { + event => { const { onElementPicked, onSwitch } = event.detail; - const groupIndex = this._data.findIndex((group) => group.tabs.includes(emptyTab)); + const groupIndex = this._data.findIndex(group => + group.tabs.includes(emptyTab) + ); const newSelectedTab = gBrowser.selectedTab; const cleanup = () => { this.removeTabFromGroup(emptyTab, groupIndex, { @@ -2313,11 +2482,15 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { cleanup(); return; } - this.removeTabFromGroup(emptyTab, groupIndex, { forUnsplit: true }); + this.removeTabFromGroup(emptyTab, groupIndex, { + forUnsplit: true, + }); gBrowser.selectedTab = selectedTab; this.resetTabState(emptyTab, false); this.splitTabs( - topOrLeft ? [newSelectedTab, selectedTab] : [selectedTab, newSelectedTab], + topOrLeft + ? [newSelectedTab, selectedTab] + : [selectedTab, newSelectedTab], gridType, topOrLeft ? 0 : 1 ); @@ -2336,7 +2509,7 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature { if (this.currentView < 0) { return []; } - return this._data[this.currentView].tabs.map((tab) => tab.linkedBrowser); + return this._data[this.currentView].tabs.map(tab => tab.linkedBrowser); } } diff --git a/src/zen/tabs/ZenPinnedTabManager.mjs b/src/zen/tabs/ZenPinnedTabManager.mjs index ae994feb5..e25742191 100644 --- a/src/zen/tabs/ZenPinnedTabManager.mjs +++ b/src/zen/tabs/ZenPinnedTabManager.mjs @@ -67,7 +67,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { if (!this.enabled) { return; } - this._canLog = Services.prefs.getBoolPref("zen.pinned-tab-manager.debug", false); + this._canLog = Services.prefs.getBoolPref( + "zen.pinned-tab-manager.debug", + false + ); this.observer = new ZenPinnedTabsObserver(); this._initClosePinnedTabShortcut(); this._insertItemsIntoTabContextMenu(); @@ -97,7 +100,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } onTabIconChanged(tab, url = null) { - tab.dispatchEvent(new CustomEvent("ZenTabIconChanged", { bubbles: true, detail: { tab } })); + tab.dispatchEvent( + new CustomEvent("ZenTabIconChanged", { bubbles: true, detail: { tab } }) + ); if (tab.hasAttribute("zen-essential")) { this.setEssentialTabIcon(tab, url); } @@ -158,7 +163,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { const tab = e.target?.closest("tab"); if (e.button === 1 && tab) { await this.onCloseTabShortcut(e, tab, { - closeIfPending: Services.prefs.getBoolPref("zen.pinned-tab-manager.wheel-close-if-pending"), + closeIfPending: Services.prefs.getBoolPref( + "zen.pinned-tab-manager.wheel-close-if-pending" + ), }); } } @@ -211,13 +218,13 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { const pinnedTabs = [ ...new Set( tabs - .flatMap((tab) => { + .flatMap(tab => { if (tab.group?.hasAttribute("split-view-group")) { return tab.group.tabs; } return tab; }) - .filter((tab) => tab?.pinned) + .filter(tab => tab?.pinned) ), ]; @@ -225,7 +232,7 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { return; } - const selectedTabs = pinnedTabs.filter((tab) => tab.selected); + const selectedTabs = pinnedTabs.filter(tab => tab.selected); event.stopPropagation(); event.preventDefault(); @@ -234,8 +241,13 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { behavior = "unload-switch"; } - if (alwaysUnload && ["close", "reset", "switch", "reset-switch"].includes(behavior)) { - behavior = behavior.contains("reset") ? "reset-unload-switch" : "unload-switch"; + if ( + alwaysUnload && + ["close", "reset", "switch", "reset-switch"].includes(behavior) + ) { + behavior = behavior.contains("reset") + ? "reset-unload-switch" + : "unload-switch"; } switch (behavior) { @@ -256,19 +268,23 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { // before we used to just ignore it but now we need to fully close // it as well. gZenGlanceManager.manageTabClose(tab.glanceTab); - await new Promise((resolve) => { + await new Promise(resolve => { let hasRan = false; const onGlanceClose = () => { hasRan = true; resolve(); }; - window.addEventListener("GlanceClose", onGlanceClose, { once: true }); + window.addEventListener("GlanceClose", onGlanceClose, { + once: true, + }); // Set a timeout to resolve the promise if the event doesn't fire. // We do this to prevent any future issues where glance woudnt close such as // glance requering to ask for permit unload. setTimeout(() => { if (!hasRan) { - console.warn("GlanceClose event did not fire within 3 seconds"); + console.warn( + "GlanceClose event did not fire within 3 seconds" + ); resolve(); } }, 3000); @@ -285,11 +301,15 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { await gZenFolders.animateUnloadAll(folderToUnload); } const allAreUnloaded = pinnedTabs.every( - (tab) => tab.hasAttribute("pending") && !tab.hasAttribute("zen-essential") + tab => + tab.hasAttribute("pending") && + !tab.hasAttribute("zen-essential") ); for (const tabItem of pinnedTabs) { if (allAreUnloaded && closeIfPending) { - await this.onCloseTabShortcut(event, tabItem, { behavior: "close" }); + await this.onCloseTabShortcut(event, tabItem, { + behavior: "close", + }); return; } } @@ -323,10 +343,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { if (selectedTab !== gBrowser.selectedTab) { return; } - const findNextTab = (direction) => + const findNextTab = direction => gBrowser.tabContainer.findNextTab(selectedTab, { direction, - filter: (tab) => !tab.hidden && !tab.pinned, + filter: tab => !tab.hidden && !tab.pinned, }); let nextTab = findNextTab(1) || findNextTab(-1); @@ -441,8 +461,14 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { // eslint-disable-next-line no-shadow const tab = tabs[i]; tab.removeAttribute("zen-essential"); - if (gZenWorkspaces.workspaceEnabled && gZenWorkspaces.getActiveWorkspaceFromCache().uuid) { - tab.setAttribute("zen-workspace-id", gZenWorkspaces.getActiveWorkspaceFromCache().uuid); + if ( + gZenWorkspaces.workspaceEnabled && + gZenWorkspaces.getActiveWorkspaceFromCache().uuid + ) { + tab.setAttribute( + "zen-workspace-id", + gZenWorkspaces.getActiveWorkspaceFromCache().uuid + ); } if (unpin) { gBrowser.unpinTab(tab); @@ -500,28 +526,32 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { `); document.getElementById("context_pinTab")?.before(element); - document.getElementById("context_zen-edit-tab-title").addEventListener("command", (event) => { - gZenVerticalTabsManager.renameTabStart(event); - }); - document.getElementById("context_zen-edit-tab-icon").addEventListener("command", () => { - const tab = TabContextMenu.contextTab; - gZenEmojiPicker.open(tab.iconImage, { - emojiAsSVG: true, - closeOnSelect: false, - allowNone: Boolean(tab.zenStaticIcon), - onSelect: (icon) => { - if (icon) { - tab.zenStaticIcon = icon; - } else { - delete tab.zenStaticIcon; - } - gBrowser.setIcon(tab, icon); - lazy.TabStateCache.update(tab.permanentKey, { - image: null, - }); - }, + document + .getElementById("context_zen-edit-tab-title") + .addEventListener("command", event => { + gZenVerticalTabsManager.renameTabStart(event); + }); + document + .getElementById("context_zen-edit-tab-icon") + .addEventListener("command", () => { + const tab = TabContextMenu.contextTab; + gZenEmojiPicker.open(tab.iconImage, { + emojiAsSVG: true, + closeOnSelect: false, + allowNone: Boolean(tab.zenStaticIcon), + onSelect: icon => { + if (icon) { + tab.zenStaticIcon = icon; + } else { + delete tab.zenStaticIcon; + } + gBrowser.setIcon(tab, icon); + lazy.TabStateCache.update(tab.permanentKey, { + image: null, + }); + }, + }); }); - }); } updatePinnedTabContextMenu(contextTab) { @@ -531,12 +561,16 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } const isVisible = contextTab.pinned && !contextTab.multiselected; const isEssential = contextTab.getAttribute("zen-essential"); - const zenAddEssential = document.getElementById("context_zen-add-essential"); - const zenResetPinnedTab = document.getElementById("context_zen-reset-pinned-tab"); + const zenAddEssential = document.getElementById( + "context_zen-add-essential" + ); + const zenResetPinnedTab = document.getElementById( + "context_zen-reset-pinned-tab" + ); const zenReplacePinnedUrl = document.getElementById( "context_zen-replace-pinned-url-with-current" ); - [zenResetPinnedTab, zenReplacePinnedUrl].forEach((element) => { + [zenResetPinnedTab, zenReplacePinnedUrl].forEach(element => { if (element) { element.hidden = !isVisible; document.l10n.setArgs(element, { isEssential }); @@ -548,19 +582,23 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { num: gBrowser._numZenEssentials, max: this.maxEssentialTabs, }) - .then((badgeText) => { + .then(badgeText => { zenAddEssential.setAttribute("badge", badgeText); }); document .getElementById("cmd_contextZenAddToEssentials") .setAttribute("disabled", !this.canEssentialBeAdded(contextTab)); - document.getElementById("context_closeTab").hidden = contextTab.hasAttribute("zen-essential"); - document.getElementById("context_zen-remove-essential").hidden = !isEssential; + document.getElementById("context_closeTab").hidden = + contextTab.hasAttribute("zen-essential"); + document.getElementById("context_zen-remove-essential").hidden = + !isEssential; document.getElementById("context_unpinTab").hidden = document.getElementById("context_unpinTab").hidden || isEssential; document.getElementById("context_unpinSelectedTabs").hidden = - document.getElementById("context_unpinSelectedTabs").hidden || isEssential; - document.getElementById("context_zen-pinned-tab-separator").hidden = !isVisible; + document.getElementById("context_unpinSelectedTabs").hidden || + isEssential; + document.getElementById("context_zen-pinned-tab-separator").hidden = + !isVisible; document.getElementById("context_zen-edit-tab-title").hidden = isEssential || !Services.prefs.getBoolPref("zen.tabs.rename-tabs") || @@ -568,12 +606,17 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } // eslint-disable-next-line complexity - moveToAnotherTabContainerIfNecessary(event, draggedTab, movingTabs, dropIndex) { + moveToAnotherTabContainerIfNecessary( + event, + draggedTab, + movingTabs, + dropIndex + ) { let newIndex = dropIndex; let fromDifferentWindow = false; movingTabs = Array.from(movingTabs || draggedTab) .reverse() - .map((tab) => { + .map(tab => { if (!gBrowser.isTab(tab)) { return tab; } @@ -582,13 +625,12 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { fromDifferentWindow = true; if ( !tab.hasAttribute("zen-essential") && - tab.getAttribute("zen-workspace-id") != gZenWorkspaces.activeWorkspace + tab.getAttribute("zen-workspace-id") != + gZenWorkspaces.activeWorkspace ) { workspaceId = gZenWorkspaces.activeWorkspace; - tab.ownerGlobal.gBrowser.selectedTab = tab.ownerGlobal.gBrowser._findTabToBlurTo( - tab, - movingTabs - ); + tab.ownerGlobal.gBrowser.selectedTab = + tab.ownerGlobal.gBrowser._findTabToBlurTo(tab, movingTabs); tab.ownerGlobal.gZenWorkspaces.moveTabToWorkspace(tab, workspaceId); } // Move the tabs into this window. To avoid multiple tab-switches in @@ -617,14 +659,17 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { const pinnedTabsTarget = event.target.closest( ":is(.zen-current-workspace-indicator, .zen-workspace-pinned-tabs-section)" ); - const essentialTabsTarget = event.target.closest(".zen-essentials-container"); + const essentialTabsTarget = event.target.closest( + ".zen-essentials-container" + ); const tabsTarget = !pinnedTabsTarget; - let currentEssenialContainer = gZenWorkspaces.getCurrentEssentialsContainer(); + let currentEssenialContainer = + gZenWorkspaces.getCurrentEssentialsContainer(); if (currentEssenialContainer?.essentialsPromo) { currentEssenialContainer.essentialsPromo.remove(); } - movingTabs = movingTabs.filter((tab) => + movingTabs = movingTabs.filter(tab => gBrowser.isTabGroupLabel(tab) && tab.group?.isZenFolder ? !tabsTarget && !essentialTabsTarget : true @@ -651,7 +696,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { let isRegularTabs = false; // Check for essentials container if (essentialTabsTarget) { - if (!tab.hasAttribute("zen-essential") && !tab?.group?.hasAttribute("split-view-group")) { + if ( + !tab.hasAttribute("zen-essential") && + !tab?.group?.hasAttribute("split-view-group") + ) { moved = true; isVertical = false; hasActuallyMoved = this.addToEssentials(tab); @@ -775,7 +823,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } else { tab.setAttribute("zen-pinned-changed", "true"); } - tab.style.setProperty("--zen-original-tab-icon", `url(${tab._zenPinnedInitialState.image})`); + tab.style.setProperty( + "--zen-original-tab-icon", + `url(${tab._zenPinnedInitialState.image})` + ); } removeTabContainersDragoverClass(hideIndicator = true) { @@ -796,7 +847,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } get expandedSidebarMode() { - return document.documentElement.getAttribute("zen-sidebar-expanded") === "true"; + return ( + document.documentElement.getAttribute("zen-sidebar-expanded") === "true" + ); } canEssentialBeAdded(tab) { @@ -823,16 +876,24 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { this.removeTabContainersDragoverClass(); return; } - const pinnedTabsTarget = event.target.closest(".zen-workspace-pinned-tabs-section"); - const essentialTabsTarget = event.target.closest(".zen-essentials-container"); - const tabsTarget = event.target.closest(".zen-workspace-normal-tabs-section"); + const pinnedTabsTarget = event.target.closest( + ".zen-workspace-pinned-tabs-section" + ); + const essentialTabsTarget = event.target.closest( + ".zen-essentials-container" + ); + const tabsTarget = event.target.closest( + ".zen-workspace-normal-tabs-section" + ); const folderTarget = event.target.closest("zen-folder"); let targetTab = event.target.closest(".tabbrowser-tab"); targetTab = targetTab?.group || targetTab; draggedTab = draggedTab?.group?.hasAttribute("split-view-group") ? draggedTab.group : draggedTab; - const isHoveringIndicator = !!event.target.closest(".zen-current-workspace-indicator"); + const isHoveringIndicator = !!event.target.closest( + ".zen-current-workspace-indicator" + ); if (isHoveringIndicator) { this.removeTabContainersDragoverClass(false); gZenWorkspaces.activeWorkspaceIndicator?.setAttribute("open", true); @@ -848,7 +909,10 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { // Decide whether we should show a dragover class for the given target if (essentialTabsTarget) { - if (!draggedTab.hasAttribute("zen-essential") && this.canEssentialBeAdded(draggedTab)) { + if ( + !draggedTab.hasAttribute("zen-essential") && + this.canEssentialBeAdded(draggedTab) + ) { shouldAddDragOverElement = true; isVertical = false; } @@ -862,7 +926,11 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } } - if (!shouldAddDragOverElement || (!targetTab && !folderTarget) || !targetTab) { + if ( + !shouldAddDragOverElement || + (!targetTab && !folderTarget) || + !targetTab + ) { this.removeTabContainersDragoverClass(!isHoveringIndicator); return; } @@ -885,8 +953,14 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { shouldPlayHapticFeedback = true; } indicator.setAttribute("orientation", "horizontal"); - indicator.style.setProperty("--indicator-left", rect.left + separation / 2 + "px"); - indicator.style.setProperty("--indicator-width", rect.width - separation + "px"); + indicator.style.setProperty( + "--indicator-left", + rect.left + separation / 2 + "px" + ); + indicator.style.setProperty( + "--indicator-width", + rect.width - separation + "px" + ); indicator.style.top = top; indicator.style.removeProperty("left"); } else { @@ -903,8 +977,14 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { shouldPlayHapticFeedback = true; } indicator.setAttribute("orientation", "vertical"); - indicator.style.setProperty("--indicator-top", rect.top + separation / 2 + "px"); - indicator.style.setProperty("--indicator-height", rect.height - separation + "px"); + indicator.style.setProperty( + "--indicator-top", + rect.top + separation / 2 + "px" + ); + indicator.style.setProperty( + "--indicator-height", + rect.height - separation + "px" + ); indicator.style.left = left; indicator.style.removeProperty("top"); } @@ -915,7 +995,9 @@ class nsZenPinnedTabManager extends nsZenDOMOperatedFeature { } onTabLabelChanged(tab) { - tab.dispatchEvent(new CustomEvent("ZenTabLabelChanged", { bubbles: true, detail: { tab } })); + tab.dispatchEvent( + new CustomEvent("ZenTabLabelChanged", { bubbles: true, detail: { tab } }) + ); } } diff --git a/src/zen/tests/compact_mode/browser_compact_mode_width.js b/src/zen/tests/compact_mode/browser_compact_mode_width.js index cb5896a73..39707b5e2 100644 --- a/src/zen/tests/compact_mode/browser_compact_mode_width.js +++ b/src/zen/tests/compact_mode/browser_compact_mode_width.js @@ -5,7 +5,7 @@ function goToRightSideTabs(callback) { // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { + return new Promise(async resolve => { await SpecialPowers.pushPrefEnv({ set: [["zen.tabs.vertical.right-side", true]], }); @@ -23,13 +23,13 @@ function goToRightSideTabs(callback) { async function testSidebarWidth() { let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); let hasRan = false; const ogSize = gNavToolbox.getBoundingClientRect().width; - const onCompactChanged = (_event) => { + const onCompactChanged = _event => { if (hasRan) { // eslint-disable-next-line mozilla/no-arbitrary-setTimeout setTimeout(() => { @@ -40,7 +40,9 @@ async function testSidebarWidth() { } // eslint-disable-next-line mozilla/no-arbitrary-setTimeout setTimeout(() => { - const newSize = gNavToolbox.style.getPropertyValue("--zen-sidebar-width").replace("px", ""); + const newSize = gNavToolbox.style + .getPropertyValue("--zen-sidebar-width") + .replace("px", ""); Assert.equal( newSize, ogSize, diff --git a/src/zen/tests/container_essentials/browser_container_auto_switch.js b/src/zen/tests/container_essentials/browser_container_auto_switch.js index c29a2aad6..62728a5ea 100644 --- a/src/zen/tests/container_essentials/browser_container_auto_switch.js +++ b/src/zen/tests/container_essentials/browser_container_auto_switch.js @@ -4,7 +4,12 @@ "use strict"; add_task(async function test_Container_Essentials_Auto_Swithc() { - await gZenWorkspaces.createAndSaveWorkspace("Container Profile 1", undefined, false, 1); + await gZenWorkspaces.createAndSaveWorkspace( + "Container Profile 1", + undefined, + false, + 1 + ); const workspaces = gZenWorkspaces.getWorkspaces(); Assert.strictEqual(workspaces.length, 2, "Two workspaces should exist."); @@ -15,12 +20,14 @@ add_task(async function test_Container_Essentials_Auto_Swithc() { ok(newTab, "New tab should be opened."); gZenPinnedTabManager.addToEssentials(newTab); ok( - newTab.hasAttribute("zen-essential") && newTab.parentNode.getAttribute("container") == "1", + newTab.hasAttribute("zen-essential") && + newTab.parentNode.getAttribute("container") == "1", "New tab should be marked as essential." ); ok( gBrowser.tabs.find( - (t) => t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 + t => + t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 ), "New tab should be marked as essential." ); diff --git a/src/zen/tests/container_essentials/browser_container_specific_essentials.js b/src/zen/tests/container_essentials/browser_container_specific_essentials.js index 75974498d..4097e4027 100644 --- a/src/zen/tests/container_essentials/browser_container_specific_essentials.js +++ b/src/zen/tests/container_essentials/browser_container_specific_essentials.js @@ -4,7 +4,12 @@ "use strict"; add_task(async function test_Check_Creation() { - await gZenWorkspaces.createAndSaveWorkspace("Container Profile 1", undefined, false, 1); + await gZenWorkspaces.createAndSaveWorkspace( + "Container Profile 1", + undefined, + false, + 1 + ); const workspaces = gZenWorkspaces.getWorkspaces(); Assert.strictEqual(workspaces.length, 2, "Two workspaces should exist."); @@ -16,12 +21,14 @@ add_task(async function test_Check_Creation() { ok(newTab, "New tab should be opened."); gZenPinnedTabManager.addToEssentials(newTab); ok( - newTab.hasAttribute("zen-essential") && newTab.parentNode.getAttribute("container") == "1", + newTab.hasAttribute("zen-essential") && + newTab.parentNode.getAttribute("container") == "1", "New tab should be marked as essential." ); ok( gBrowser.tabs.find( - (t) => t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 + t => + t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 ), "New tab should be marked as essential." ); @@ -31,7 +38,8 @@ add_task(async function test_Check_Creation() { await gZenWorkspaces.changeWorkspace(workspaces[0]); ok( !gBrowser.tabs.find( - (t) => t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 + t => + t.hasAttribute("zen-essential") && t.getAttribute("usercontextid") == 1 ), "No essential tabs should be found in the original workspace." ); diff --git a/src/zen/tests/folders/browser_folder_density.js b/src/zen/tests/folders/browser_folder_density.js index 3a726559f..ca8b497ef 100644 --- a/src/zen/tests/folders/browser_folder_density.js +++ b/src/zen/tests/folders/browser_folder_density.js @@ -11,15 +11,31 @@ add_task(async function test_Folder_Density() { let tabRect = tab.getBoundingClientRect(); let folderRect = folder.labelElement.parentElement.getBoundingClientRect(); - Assert.equal(tabRect.height, folderRect.height, "Folder height matches tab height"); - Assert.equal(tabRect.width, folderRect.width, "Folder width matches tab width"); + Assert.equal( + tabRect.height, + folderRect.height, + "Folder height matches tab height" + ); + Assert.equal( + tabRect.width, + folderRect.width, + "Folder width matches tab width" + ); gUIDensity.update(gUIDensity.MODE_TOUCH); tabRect = tab.getBoundingClientRect(); folderRect = folder.getBoundingClientRect(); - Assert.equal(tabRect.height, folderRect.height, "Folder height matches tab height"); - Assert.equal(tabRect.width, folderRect.width, "Folder width matches tab width"); + Assert.equal( + tabRect.height, + folderRect.height, + "Folder height matches tab height" + ); + Assert.equal( + tabRect.width, + folderRect.width, + "Folder width matches tab width" + ); gUIDensity.update(); await removeFolder(folder); diff --git a/src/zen/tests/folders/browser_folder_empty_tab.js b/src/zen/tests/folders/browser_folder_empty_tab.js index a1fe7760f..b14809b60 100644 --- a/src/zen/tests/folders/browser_folder_empty_tab.js +++ b/src/zen/tests/folders/browser_folder_empty_tab.js @@ -4,17 +4,26 @@ "use strict"; add_task(async function test_Empty_Tab_First() { - const [tab1, tab2] = await Promise.all([addTabTo(gBrowser), addTabTo(gBrowser)]); + const [tab1, tab2] = await Promise.all([ + addTabTo(gBrowser), + addTabTo(gBrowser), + ]); const folder = await gZenFolders.createFolder([tab1], { renameFolder: false, }); Assert.equal(folder.tabs.length, 2, "Folder should contain the original tab"); - ok(folder.tabs[0].hasAttribute("zen-empty-tab"), "First tab should be an empty tab"); + ok( + folder.tabs[0].hasAttribute("zen-empty-tab"), + "First tab should be an empty tab" + ); folder.appendChild(tab2); Assert.equal(folder.tabs.length, 3, "Folder should contain the second tab"); - ok(folder.tabs[0].hasAttribute("zen-empty-tab"), "First tab should be an empty tab"); + ok( + folder.tabs[0].hasAttribute("zen-empty-tab"), + "First tab should be an empty tab" + ); await removeFolder(folder); }); diff --git a/src/zen/tests/folders/browser_folder_issue_9885.js b/src/zen/tests/folders/browser_folder_issue_9885.js index 9d30e6aae..a5b7d9087 100644 --- a/src/zen/tests/folders/browser_folder_issue_9885.js +++ b/src/zen/tests/folders/browser_folder_issue_9885.js @@ -21,7 +21,10 @@ add_task(async function test_Issue_9885() { subfolder.labelElement.click(); ok(subfolder.collapsed, "Subfolder should be collapsed after clicking on it"); - ok(!parent.collapsed, "Parent folder should be collapsed after clicking on subfolder"); + ok( + !parent.collapsed, + "Parent folder should be collapsed after clicking on subfolder" + ); await removeFolder(subfolder); await removeFolder(parent); diff --git a/src/zen/tests/folders/browser_folder_issue_9981.js b/src/zen/tests/folders/browser_folder_issue_9981.js index b09114d0f..aacd01d14 100644 --- a/src/zen/tests/folders/browser_folder_issue_9981.js +++ b/src/zen/tests/folders/browser_folder_issue_9981.js @@ -14,10 +14,17 @@ add_task(async function test_Issue_9981() { gBrowser.addRangeToMultiSelectedTabs(tab1, tab2); ok(tab1.multiselected, "Tab 1 should be multiselected"); ok(tab2.multiselected, "Tab 2 should be multiselected"); - Assert.equal(gBrowser.multiSelectedTabsCount, 2, "There should be 2 multiselected tabs"); - await new Promise((resolve) => setTimeout(resolve, 0)); + Assert.equal( + gBrowser.multiSelectedTabsCount, + 2, + "There should be 2 multiselected tabs" + ); + await new Promise(resolve => setTimeout(resolve, 0)); - const collapseEvent = BrowserTestUtils.waitForEvent(window, "TabGroupCollapse"); + const collapseEvent = BrowserTestUtils.waitForEvent( + window, + "TabGroupCollapse" + ); EventUtils.synthesizeMouseAtCenter(folder.labelElement, {}); await collapseEvent; @@ -26,15 +33,27 @@ add_task(async function test_Issue_9981() { Assert.equal(folder.activeTabs.length, 2, "Folder should have 2 active tabs"); - ok(tab1.hasAttribute("folder-active"), "Tab 1 should be in the active folder"); - ok(tab2.hasAttribute("folder-active"), "Tab 2 should be in the active folder"); + ok( + tab1.hasAttribute("folder-active"), + "Tab 1 should be in the active folder" + ); + ok( + tab2.hasAttribute("folder-active"), + "Tab 2 should be in the active folder" + ); const tab2ResetButton = tab2.querySelector(".tab-reset-button"); tab2ResetButton.style.display = "flex"; EventUtils.synthesizeMouseAtCenter(tab2ResetButton, {}); - ok(tab1.hasAttribute("folder-active"), "Tab 1 should be in the active folder"); - ok(!tab2.hasAttribute("folder-active"), "Tab 2 should not be in the active folder"); + ok( + tab1.hasAttribute("folder-active"), + "Tab 1 should be in the active folder" + ); + ok( + !tab2.hasAttribute("folder-active"), + "Tab 2 should not be in the active folder" + ); await removeFolder(folder); }); diff --git a/src/zen/tests/folders/browser_folder_max_subfolders.js b/src/zen/tests/folders/browser_folder_max_subfolders.js index 16725e2aa..62b3b9a22 100644 --- a/src/zen/tests/folders/browser_folder_max_subfolders.js +++ b/src/zen/tests/folders/browser_folder_max_subfolders.js @@ -11,7 +11,9 @@ add_task(async function test_Max_Subfolders() { renameFolder: false, }); - const subfolderItem = document.getElementById("context_zenFolderNewSubfolder"); + const subfolderItem = document.getElementById( + "context_zenFolderNewSubfolder" + ); let currentFolder = folder; for (let i = 1; i < TEST_MAX_FOLDERS; i++) { await openFolderContextMenu(currentFolder); @@ -20,7 +22,10 @@ add_task(async function test_Max_Subfolders() { "true", `Subfolder item should be enabled` ); - const folderCreateEvent = BrowserTestUtils.waitForEvent(window, "TabGroupCreate"); + const folderCreateEvent = BrowserTestUtils.waitForEvent( + window, + "TabGroupCreate" + ); EventUtils.synthesizeMouseAtCenter(subfolderItem, {}); await folderCreateEvent; const items = currentFolder.allItems; diff --git a/src/zen/tests/folders/browser_folder_multiselected.js b/src/zen/tests/folders/browser_folder_multiselected.js index 6a31a5384..b8017d47b 100644 --- a/src/zen/tests/folders/browser_folder_multiselected.js +++ b/src/zen/tests/folders/browser_folder_multiselected.js @@ -12,14 +12,25 @@ add_task(async function test_Folder_Multiselected_Tabs() { gBrowser.addRangeToMultiSelectedTabs(tab1, tab2); ok(tab1.multiselected, "Tab 1 should be multiselected"); ok(tab2.multiselected, "Tab 2 should be multiselected"); - Assert.greater(gBrowser.multiSelectedTabsCount, 1, "There should be 2 multiselected tabs"); + Assert.greater( + gBrowser.multiSelectedTabsCount, + 1, + "There should be 2 multiselected tabs" + ); - const collapseEvent = BrowserTestUtils.waitForEvent(window, "TabGroupCollapse"); + const collapseEvent = BrowserTestUtils.waitForEvent( + window, + "TabGroupCollapse" + ); folder.collapsed = true; await collapseEvent; ok(tab2.multiselected, "Tab 2 should not be multiselected"); - Assert.equal(gBrowser.multiSelectedTabsCount, 3, "There should be 3 multiselected tabs"); + Assert.equal( + gBrowser.multiSelectedTabsCount, + 3, + "There should be 3 multiselected tabs" + ); for (const t of [tab1, tab2]) { BrowserTestUtils.removeTab(t); diff --git a/src/zen/tests/folders/browser_folder_owner_tabs.js b/src/zen/tests/folders/browser_folder_owner_tabs.js index 01d0c1320..7d3f8dc99 100644 --- a/src/zen/tests/folders/browser_folder_owner_tabs.js +++ b/src/zen/tests/folders/browser_folder_owner_tabs.js @@ -13,7 +13,8 @@ add_task(async function test_Duplicate_Tab_Inside_Folder() { renameFolder: false, }); gBrowser.selectedTab = tab; - const triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal(); + const triggeringPrincipal = + Services.scriptSecurityManager.getSystemPrincipal(); gBrowser.addTab("https://example.com", { tabIndex: undefined, relatedToCurrent: true, @@ -28,7 +29,7 @@ add_task(async function test_Duplicate_Tab_Inside_Folder() { ); /* eslint-disable mozilla/no-arbitrary-setTimeout */ - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise(resolve => setTimeout(resolve, 100)); for (const t of folder.tabs) { ok(t.pinned, "All tabs in the folder should be pinned"); @@ -49,7 +50,8 @@ add_task(async function test_Duplicate_Tab_Inside_Folder_Unpinned() { renameFolder: false, }); gBrowser.selectedTab = tab; - const triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal(); + const triggeringPrincipal = + Services.scriptSecurityManager.getSystemPrincipal(); let newTab = gBrowser.addTab("https://example.com", { tabIndex: undefined, relatedToCurrent: true, diff --git a/src/zen/tests/folders/browser_folder_reset_button.js b/src/zen/tests/folders/browser_folder_reset_button.js index 256d27f21..6ef988773 100644 --- a/src/zen/tests/folders/browser_folder_reset_button.js +++ b/src/zen/tests/folders/browser_folder_reset_button.js @@ -14,10 +14,17 @@ add_task(async function test_Issue_() { gBrowser.addRangeToMultiSelectedTabs(tab1, tab2); ok(tab1.multiselected, "Tab 1 should be multiselected"); ok(tab2.multiselected, "Tab 2 should be multiselected"); - Assert.equal(gBrowser.multiSelectedTabsCount, 2, "There should be 2 multiselected tabs"); - await new Promise((resolve) => setTimeout(resolve, 0)); + Assert.equal( + gBrowser.multiSelectedTabsCount, + 2, + "There should be 2 multiselected tabs" + ); + await new Promise(resolve => setTimeout(resolve, 0)); - const collapseEvent = BrowserTestUtils.waitForEvent(window, "TabGroupCollapse"); + const collapseEvent = BrowserTestUtils.waitForEvent( + window, + "TabGroupCollapse" + ); EventUtils.synthesizeMouseAtCenter(folder.labelElement, {}); await collapseEvent; @@ -26,16 +33,28 @@ add_task(async function test_Issue_() { Assert.equal(folder.activeTabs.length, 2, "Folder should have 2 active tabs"); - ok(tab1.hasAttribute("folder-active"), "Tab 1 should be in the active folder"); - ok(tab2.hasAttribute("folder-active"), "Tab 2 should be in the active folder"); + ok( + tab1.hasAttribute("folder-active"), + "Tab 1 should be in the active folder" + ); + ok( + tab2.hasAttribute("folder-active"), + "Tab 2 should be in the active folder" + ); EventUtils.synthesizeMouseAtCenter(folder.resetButton, {}); - await new Promise((resolve) => + await new Promise(resolve => /* eslint-disable mozilla/no-arbitrary-setTimeout */ setTimeout(() => { - ok(!tab1.hasAttribute("folder-active"), "Tab 1 should not be in the active folder"); - ok(!tab2.hasAttribute("folder-active"), "Tab 2 should not be in the active folder"); + ok( + !tab1.hasAttribute("folder-active"), + "Tab 1 should not be in the active folder" + ); + ok( + !tab2.hasAttribute("folder-active"), + "Tab 2 should not be in the active folder" + ); resolve(); }, 500) ); diff --git a/src/zen/tests/folders/browser_folder_visible_tabs.js b/src/zen/tests/folders/browser_folder_visible_tabs.js index 99beb7d35..2cba246fb 100644 --- a/src/zen/tests/folders/browser_folder_visible_tabs.js +++ b/src/zen/tests/folders/browser_folder_visible_tabs.js @@ -33,7 +33,10 @@ add_task(async function test_Visible_Selected() { gBrowser.selectedTab = tab; folder.collapsed = true; ok(tab.visible, "Tab is visible in the folder when collapsed"); - ok(tab.hasAttribute("folder-active"), "Tab is marked as active in the folder when selected"); + ok( + tab.hasAttribute("folder-active"), + "Tab is marked as active in the folder when selected" + ); ok( tab.group.hasAttribute("has-active"), "Tab group is marked as active when the tab is selected" @@ -63,7 +66,10 @@ add_task(async function test_Visible_Not_Selected() { folder.collapsed = true; gBrowser.selectedTab = originalTab; ok(tab.visible, "Tab is visible in the folder when collapsed"); - ok(tab.hasAttribute("folder-active"), "Tab is marked as active in the folder when selected"); + ok( + tab.hasAttribute("folder-active"), + "Tab is marked as active in the folder when selected" + ); ok( tab.group.hasAttribute("has-active"), "Tab group is marked as active when the tab is selected" diff --git a/src/zen/tests/folders/head.js b/src/zen/tests/folders/head.js index a5fbc5f12..e3d14953d 100644 --- a/src/zen/tests/folders/head.js +++ b/src/zen/tests/folders/head.js @@ -21,7 +21,11 @@ async function openFolderContextMenu(folder) { await menuEvent; } -async function addTabTo(targetBrowser, url = "http://mochi.test:8888/", params = {}) { +async function addTabTo( + targetBrowser, + url = "http://mochi.test:8888/", + params = {} +) { params.skipAnimation = true; const tab = BrowserTestUtils.addTab(targetBrowser, url, params); const browser = targetBrowser.getBrowserForTab(tab); diff --git a/src/zen/tests/glance/browser_glance_basic.js b/src/zen/tests/glance/browser_glance_basic.js index 1e055eb19..8977ba02d 100644 --- a/src/zen/tests/glance/browser_glance_basic.js +++ b/src/zen/tests/glance/browser_glance_basic.js @@ -4,7 +4,7 @@ "use strict"; add_task(async function test_Glance_Basic_Open() { - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { ok( glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should have the zen-glance-tab attribute" diff --git a/src/zen/tests/glance/browser_glance_close.js b/src/zen/tests/glance/browser_glance_close.js index 5c65a0ee9..f638db1f2 100644 --- a/src/zen/tests/glance/browser_glance_close.js +++ b/src/zen/tests/glance/browser_glance_close.js @@ -5,13 +5,13 @@ add_task(async function test_Glance_Basic_Close() { const currentTab = gBrowser.selectedTab; - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { ok( currentTab.hasAttribute("glance-id"), "The glance tab should have the zen-glance-tab attribute" ); await BrowserTestUtils.removeTab(glanceTab); - await new Promise((resolve) => { + await new Promise(resolve => { /* eslint-disable mozilla/no-arbitrary-setTimeout */ setTimeout(() => { resolve(); diff --git a/src/zen/tests/glance/browser_glance_close_select.js b/src/zen/tests/glance/browser_glance_close_select.js index 7e43720c3..b6e2df55c 100644 --- a/src/zen/tests/glance/browser_glance_close_select.js +++ b/src/zen/tests/glance/browser_glance_close_select.js @@ -4,7 +4,7 @@ "use strict"; async function openAndCloseGlance() { - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { ok( glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should have the zen-glance-tab attribute" @@ -15,7 +15,11 @@ async function openAndCloseGlance() { add_task(async function test_Glance_Close_No_Tabs() { const currentTab = gBrowser.selectedTab; await openAndCloseGlance(); - Assert.equal(gBrowser.selectedTab, currentTab, "The original tab should be selected"); + Assert.equal( + gBrowser.selectedTab, + currentTab, + "The original tab should be selected" + ); ok(currentTab.selected, "The original tab should be visually selected"); }); @@ -27,7 +31,11 @@ add_task(async function test_Glance_Close_With_Next_Tab() { const selectedTab = gBrowser.selectedTab; Assert.notEqual(selectedTab, originalTab, "A new tab should be selected"); await openAndCloseGlance(); - Assert.equal(gBrowser.selectedTab, selectedTab, "The new tab should still be selected"); + Assert.equal( + gBrowser.selectedTab, + selectedTab, + "The new tab should still be selected" + ); ok(selectedTab.selected, "The new tab should be visually selected"); gBrowser.selectedTab = originalTab; diff --git a/src/zen/tests/glance/browser_glance_expand.js b/src/zen/tests/glance/browser_glance_expand.js index 0c29cb70a..74c3ca660 100644 --- a/src/zen/tests/glance/browser_glance_expand.js +++ b/src/zen/tests/glance/browser_glance_expand.js @@ -5,14 +5,14 @@ add_task(async function test_Glance_Basic_Open() { const selectedTab = gBrowser.selectedTab; - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { await gZenGlanceManager.fullyOpenGlance(); ok( !glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should not have the zen-glance-tab attribute" ); Assert.strictEqual( - gBrowser.tabs.filter((tab) => tab.hasAttribute("zen-glance-tab")).length, + gBrowser.tabs.filter(tab => tab.hasAttribute("zen-glance-tab")).length, 0, "There should be no zen-glance-tab attribute on any tab" ); @@ -28,14 +28,18 @@ add_task(async function test_Glance_Basic_Open() { add_task(async function test_Glance_Open_Sibling() { const tabsToRemove = []; for (let i = 0; i < 5; i++) { - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); tabsToRemove.push(gBrowser.selectedTab); } gBrowser.selectedTab = gBrowser.tabs[2]; const selectedTab = gBrowser.selectedTab; - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { await gZenGlanceManager.fullyOpenGlance(); Assert.equal( glanceTab._tPos, @@ -53,18 +57,22 @@ add_task(async function test_Glance_Open_Sibling() { add_task(async function test_Glance_Basic_Open() { const tabsToRemove = []; for (let i = 0; i < 3; i++) { - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); gBrowser.pinTab(gBrowser.selectedTab); tabsToRemove.push(gBrowser.selectedTab); } - gBrowser.selectedTab = gBrowser.tabs.find((tab) => tab.pinned); + gBrowser.selectedTab = gBrowser.tabs.find(tab => tab.pinned); - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { await gZenGlanceManager.fullyOpenGlance(); Assert.equal( glanceTab, - gBrowser.visibleTabs.find((tab) => !tab.pinned), + gBrowser.visibleTabs.find(tab => !tab.pinned), "The glance tab should be the first normal tab (Ignoring empty tabs)" ); BrowserTestUtils.removeTab(glanceTab); @@ -79,18 +87,21 @@ add_task(async function test_Glance_New_From_essential() { ok(true, "todo:"); return; // TODO: Fix this test, it currently fails /* eslint-disable no-unreachable, no-unused-vars */ - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/" }, async (browser) => { - const selectedTab = gBrowser.selectedTab; - gZenPinnedTabManager.addToEssentials(selectedTab); - await openGlanceOnTab(async (glanceTab) => { - await gZenGlanceManager.fullyOpenGlance(); - ok(!glanceTab.pinned, "The glance tab should not be pinned"); - ok( - !glanceTab.parentNode.hasAttribute("container"), - "The glance tab should not be in an essentials container" - ); - await BrowserTestUtils.removeTab(gBrowser.selectedTab); - await BrowserTestUtils.removeTab(glanceTab); - }, false); - }); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/" }, + async browser => { + const selectedTab = gBrowser.selectedTab; + gZenPinnedTabManager.addToEssentials(selectedTab); + await openGlanceOnTab(async glanceTab => { + await gZenGlanceManager.fullyOpenGlance(); + ok(!glanceTab.pinned, "The glance tab should not be pinned"); + ok( + !glanceTab.parentNode.hasAttribute("container"), + "The glance tab should not be in an essentials container" + ); + await BrowserTestUtils.removeTab(gBrowser.selectedTab); + await BrowserTestUtils.removeTab(glanceTab); + }, false); + } + ); }); diff --git a/src/zen/tests/glance/browser_glance_next_tab.js b/src/zen/tests/glance/browser_glance_next_tab.js index 50e102a60..e891927fd 100644 --- a/src/zen/tests/glance/browser_glance_next_tab.js +++ b/src/zen/tests/glance/browser_glance_next_tab.js @@ -5,14 +5,19 @@ add_task(async function test_Glance_Next_Tab() { const tabToCheck = gBrowser.selectedTab; - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true, { - skipAnimation: true, - }); - await openGlanceOnTab(async (glanceTab) => { + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true, + { + skipAnimation: true, + } + ); + await openGlanceOnTab(async glanceTab => { gBrowser.tabContainer.advanceSelectedTab(1); const nextTab = gBrowser.selectedTab; gBrowser.selectedTab = glanceTab; - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(() => { Assert.equal(nextTab, tabToCheck, "Next glance tab should equal"); resolve(); diff --git a/src/zen/tests/glance/browser_glance_prev_tab.js b/src/zen/tests/glance/browser_glance_prev_tab.js index d669b721b..c69c34a5c 100644 --- a/src/zen/tests/glance/browser_glance_prev_tab.js +++ b/src/zen/tests/glance/browser_glance_prev_tab.js @@ -4,16 +4,21 @@ "use strict"; add_task(async function test_Glance_Prev_Tab() { - await openGlanceOnTab(async (glanceTab) => { - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true, { - skipAnimation: true, - }); + await openGlanceOnTab(async glanceTab => { + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true, + { + skipAnimation: true, + } + ); const tabToCheck = gBrowser.selectedTab; gBrowser.selectedTab = glanceTab; gBrowser.tabContainer.advanceSelectedTab(-1); const prevTab = gBrowser.selectedTab; gBrowser.selectedTab = glanceTab; - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(() => { Assert.equal(prevTab, tabToCheck, "Previous glance tab should equal"); resolve(); diff --git a/src/zen/tests/glance/browser_glance_select_parent.js b/src/zen/tests/glance/browser_glance_select_parent.js index 7f6d6a3e5..48a519419 100644 --- a/src/zen/tests/glance/browser_glance_select_parent.js +++ b/src/zen/tests/glance/browser_glance_select_parent.js @@ -4,14 +4,19 @@ "use strict"; add_task(async function test_Glance_Select_Parent() { - await openGlanceOnTab(async (glanceTab) => { + await openGlanceOnTab(async glanceTab => { ok( glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should have the zen-glance-tab attribute" ); - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true, { - skipAnimation: true, - }); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true, + { + skipAnimation: true, + } + ); const tabToRemove = gBrowser.selectedTab; gBrowser.selectedTab = gZenGlanceManager.getTabOrGlanceParent(glanceTab); await BrowserTestUtils.waitForCondition(() => { diff --git a/src/zen/tests/live-folders/browser_github_live_folder.js b/src/zen/tests/live-folders/browser_github_live_folder.js index d318ad940..ded5e5116 100644 --- a/src/zen/tests/live-folders/browser_github_live_folder.js +++ b/src/zen/tests/live-folders/browser_github_live_folder.js @@ -5,7 +5,8 @@ ChromeUtils.defineESModuleGetters(this, { sinon: "resource://testing-common/Sinon.sys.mjs", - nsGithubLiveFolderProvider: "resource:///modules/zen/GithubLiveFolder.sys.mjs", + nsGithubLiveFolderProvider: + "resource:///modules/zen/GithubLiveFolder.sys.mjs", }); function getGithubProviderForTest(sandbox, customOptions = {}) { @@ -39,7 +40,9 @@ function getGithubProviderForTest(sandbox, customOptions = {}) { } add_task(async function test_fetch_items_url_construction() { - info("should construct the correct GitHub search URL based on default options"); + info( + "should construct the correct GitHub search URL based on default options" + ); let sandbox = sinon.createSandbox(); @@ -69,7 +72,10 @@ add_task(async function test_fetch_items_url_construction() { Assert.ok(query.includes("is:pr"), "Should include is:PR"); Assert.ok(query.includes("author:@me"), "Should include author:@me"); Assert.ok(!query.includes("assignee:@me"), "Should NOT include assignee:@me"); - Assert.ok(!query.includes("review-requested:@me"), "Should NOT include review-requested"); + Assert.ok( + !query.includes("review-requested:@me"), + "Should NOT include review-requested" + ); sandbox.restore(); }); @@ -97,7 +103,10 @@ add_task(async function test_fetch_items_url_complex_options() { Assert.ok(query.includes("author:@me"), "Should include author"); Assert.ok(query.includes("assignee:@me"), "Should include assignee"); - Assert.ok(query.includes("review-requested:@me"), "Should include review-requested"); + Assert.ok( + query.includes("review-requested:@me"), + "Should include review-requested" + ); Assert.ok(query.includes(" OR "), "Should contain OR operators"); sandbox.restore(); @@ -159,7 +168,11 @@ add_task(async function test_fetch_network_error() { instance.fetch.rejects(new Error("Network down")); const errorId = await instance.fetchItems(); - Assert.equal(errorId, "zen-live-folder-failed-fetch", "Should return an error on failed fetch"); + Assert.equal( + errorId, + "zen-live-folder-failed-fetch", + "Should return an error on failed fetch" + ); sandbox.restore(); }); diff --git a/src/zen/tests/live-folders/browser_live_folder.js b/src/zen/tests/live-folders/browser_live_folder.js index 5aee5f92b..366374839 100644 --- a/src/zen/tests/live-folders/browser_live_folder.js +++ b/src/zen/tests/live-folders/browser_live_folder.js @@ -9,7 +9,7 @@ ChromeUtils.defineESModuleGetters(this, { }); function sleep(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); + return new Promise(resolve => setTimeout(resolve, ms)); } describe("Zen Live Folder Scheduling", () => { @@ -64,7 +64,11 @@ describe("Zen Live Folder Scheduling", () => { const startSpy = sandbox.spy(instance, "start"); await sleep(INTERVAL + INTERVAL_OFFSET); - Assert.equal(fetchStub.callCount, 1, "Should have fetched once after the first interval"); + Assert.equal( + fetchStub.callCount, + 1, + "Should have fetched once after the first interval" + ); await sleep(INTERVAL + INTERVAL_OFFSET); Assert.equal(fetchStub.callCount, 2, "Should have fetched 2 times"); @@ -107,7 +111,11 @@ describe("Zen Live Folder Scheduling", () => { Assert.equal(fetchStub.callCount, 1, "Should have fetched once"); await sleep(INTERVAL + INTERVAL_OFFSET); - Assert.equal(fetchStub.callCount, 2, "Should have fetched once with normal interval"); + Assert.equal( + fetchStub.callCount, + 2, + "Should have fetched once with normal interval" + ); }); it("should re-start the timer if interval was changed", async () => { @@ -121,7 +129,11 @@ describe("Zen Live Folder Scheduling", () => { sinon.assert.notCalled(fetchStub); await sleep(INTERVAL + INTERVAL_OFFSET); - Assert.equal(fetchStub.callCount, 1, "Should have fetched once after the first interval"); + Assert.equal( + fetchStub.callCount, + 1, + "Should have fetched once after the first interval" + ); const NEW_INTERVAL = 500; instance.state.interval = NEW_INTERVAL; @@ -130,6 +142,10 @@ describe("Zen Live Folder Scheduling", () => { instance.start(); await sleep(NEW_INTERVAL + INTERVAL_OFFSET); - Assert.equal(fetchStub.callCount, 2, "Should have once after the new interval"); + Assert.equal( + fetchStub.callCount, + 2, + "Should have once after the new interval" + ); }); }); diff --git a/src/zen/tests/live-folders/browser_rss_live_folder.js b/src/zen/tests/live-folders/browser_rss_live_folder.js index ad2ceb60b..aef39b9da 100644 --- a/src/zen/tests/live-folders/browser_rss_live_folder.js +++ b/src/zen/tests/live-folders/browser_rss_live_folder.js @@ -210,7 +210,11 @@ add_task(async function test_invalid_dates() { const items = await instance.fetchItems(); - Assert.equal(items.length, 0, "Items with invalid/missing dates should be filtered"); + Assert.equal( + items.length, + 0, + "Items with invalid/missing dates should be filtered" + ); sandbox.restore(); }); @@ -223,7 +227,11 @@ add_task(async function test_fetch_network_error() { instance.fetch.rejects(new Error("Network down")); const items = await instance.fetchItems(); - Assert.equal(items, "zen-live-folder-failed-fetch", "Should return an error on failed fetch"); + Assert.equal( + items, + "zen-live-folder-failed-fetch", + "Should return an error on failed fetch" + ); sandbox.restore(); }); diff --git a/src/zen/tests/pinned/browser_issue_8726.js b/src/zen/tests/pinned/browser_issue_8726.js index 433a2baed..38d522944 100644 --- a/src/zen/tests/pinned/browser_issue_8726.js +++ b/src/zen/tests/pinned/browser_issue_8726.js @@ -8,7 +8,10 @@ const { TabStateFlusher } = ChromeUtils.importESModule( ); async function makeNewEmptyTab() { - let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank"); + let tab = await BrowserTestUtils.openNewForegroundTab( + gBrowser, + "about:blank" + ); gBrowser.selectedTab = tab; return tab; } @@ -55,7 +58,10 @@ add_task(async function test_Restore_Essential_Tab() { await TabStateFlusher.flushWindow(window); SessionWindowUI.restoreLastClosedTabOrWindowOrSession(window); tab = gBrowser.selectedTab; - ok(tab.hasAttribute("zen-essential"), "The tab should be marked as essential after restore"); + ok( + tab.hasAttribute("zen-essential"), + "The tab should be marked as essential after restore" + ); ok( tab.parentElement.closest(".zen-essentials-container"), "The tab should be in the essentials tabs section after restore" diff --git a/src/zen/tests/pinned/browser_pinned_changed.js b/src/zen/tests/pinned/browser_pinned_changed.js index 5cf1ff7fb..008744e99 100644 --- a/src/zen/tests/pinned/browser_pinned_changed.js +++ b/src/zen/tests/pinned/browser_pinned_changed.js @@ -5,28 +5,38 @@ add_task(async function test_Changed_Pinned() { let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - ok(tab.pinned, "The tab should be pinned after calling gBrowser.pinTab()"); - - await gBrowser.TabStateFlusher.flush(browser); - await new Promise((r) => setTimeout(r, 500)); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - setTimeout(() => { ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + tab.pinned, + "The tab should be pinned after calling gBrowser.pinTab()" ); - resolvePromise(); - }, 500); - await promise; - }); + await gBrowser.TabStateFlusher.flush(browser); + await new Promise(r => setTimeout(r, 500)); + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" + ); + setTimeout(() => { + ok( + tab.hasAttribute("zen-pinned-changed"), + "The tab should have a zen-pinned-changed attribute after being pinned" + ); + resolvePromise(); + }, 500); + + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_close.js b/src/zen/tests/pinned/browser_pinned_close.js index 55b56fc8e..b20b56e0b 100644 --- a/src/zen/tests/pinned/browser_pinned_close.js +++ b/src/zen/tests/pinned/browser_pinned_close.js @@ -9,20 +9,23 @@ add_task(async function test_Unload_NoReset_Pinned() { }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - document.getElementById("cmd_close").doCommand(); - // eslint-disable-next-line mozilla/no-arbitrary-setTimeout - setTimeout(() => { - ok(tab.closing, "The tab should be closing after being closed"); - resolvePromise(); - }, 100); - await promise; - }); + document.getElementById("cmd_close").doCommand(); + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + setTimeout(() => { + ok(tab.closing, "The tab should be closing after being closed"); + resolvePromise(); + }, 100); + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_created.js b/src/zen/tests/pinned/browser_pinned_created.js index 221f27548..184889034 100644 --- a/src/zen/tests/pinned/browser_pinned_created.js +++ b/src/zen/tests/pinned/browser_pinned_created.js @@ -5,11 +5,15 @@ add_task(async function test_Create_Pinned() { let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); const newTab = gBrowser.selectedTab; gBrowser.pinTab(newTab); @@ -17,9 +21,12 @@ add_task(async function test_Create_Pinned() { ok(newTab.pinned, "The tab should be pinned after calling gBrowser.pinTab()"); - await new Promise((r) => setTimeout(r, 500)); + await new Promise(r => setTimeout(r, 500)); const pinObject = newTab._zenPinnedInitialState; - ok(pinObject, "The pin object should be created in the tab's _zenPinnedInitialState"); + ok( + pinObject, + "The pin object should be created in the tab's _zenPinnedInitialState" + ); Assert.equal( pinObject.entry.url, "https://example.com/", diff --git a/src/zen/tests/pinned/browser_pinned_nounload_reset.js b/src/zen/tests/pinned/browser_pinned_nounload_reset.js index 062f72d15..2e6395411 100644 --- a/src/zen/tests/pinned/browser_pinned_nounload_reset.js +++ b/src/zen/tests/pinned/browser_pinned_nounload_reset.js @@ -9,38 +9,48 @@ add_task(async function test_NoUnload_Changed_Pinned() { }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - await gBrowser.TabStateFlusher.flush(browser); - setTimeout(() => { - ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" ); - document.getElementById("cmd_close").doCommand(); - // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + await gBrowser.TabStateFlusher.flush(browser); setTimeout(() => { ok( - !tab.hasAttribute("zen-pinned-changed"), - "The tab should not have a zen-pinned-changed attribute after being closed" + tab.hasAttribute("zen-pinned-changed"), + "The tab should have a zen-pinned-changed attribute after being pinned" ); - ok(!tab.hasAttribute("discarded"), "The tab should not be discarded after being closed"); - Assert.notEqual( - tab, - gBrowser.selectedTab, - "The tab should not be selected after being closed" - ); - resolvePromise(); - }, 100); - }, 0); - await promise; - }); + document.getElementById("cmd_close").doCommand(); + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + setTimeout(() => { + ok( + !tab.hasAttribute("zen-pinned-changed"), + "The tab should not have a zen-pinned-changed attribute after being closed" + ); + ok( + !tab.hasAttribute("discarded"), + "The tab should not be discarded after being closed" + ); + Assert.notEqual( + tab, + gBrowser.selectedTab, + "The tab should not be selected after being closed" + ); + resolvePromise(); + }, 100); + }, 0); + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_reset_noswitch.js b/src/zen/tests/pinned/browser_pinned_reset_noswitch.js index 236d5bca9..87bc3342b 100644 --- a/src/zen/tests/pinned/browser_pinned_reset_noswitch.js +++ b/src/zen/tests/pinned/browser_pinned_reset_noswitch.js @@ -9,38 +9,48 @@ add_task(async function test_Unload_NoReset_Pinned() { }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - await gBrowser.TabStateFlusher.flush(browser); - setTimeout(() => { - ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" ); - document.getElementById("cmd_close").doCommand(); - // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + await gBrowser.TabStateFlusher.flush(browser); setTimeout(() => { ok( - !tab.hasAttribute("zen-pinned-changed"), - "The tab should not have a zen-pinned-changed attribute after being closed" + tab.hasAttribute("zen-pinned-changed"), + "The tab should have a zen-pinned-changed attribute after being pinned" ); - ok(!tab.hasAttribute("discarded"), "The tab should not be discarded after being closed"); - Assert.strictEqual( - tab, - gBrowser.selectedTab, - "The tab should not be selected after being closed" - ); - resolvePromise(); - }, 100); - }, 0); - await promise; - }); + document.getElementById("cmd_close").doCommand(); + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + setTimeout(() => { + ok( + !tab.hasAttribute("zen-pinned-changed"), + "The tab should not have a zen-pinned-changed attribute after being closed" + ); + ok( + !tab.hasAttribute("discarded"), + "The tab should not be discarded after being closed" + ); + Assert.strictEqual( + tab, + gBrowser.selectedTab, + "The tab should not be selected after being closed" + ); + resolvePromise(); + }, 100); + }, 0); + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_switch.js b/src/zen/tests/pinned/browser_pinned_switch.js index 39a575110..c2e89e843 100644 --- a/src/zen/tests/pinned/browser_pinned_switch.js +++ b/src/zen/tests/pinned/browser_pinned_switch.js @@ -9,38 +9,48 @@ add_task(async function test_Unload_NoReset_Pinned() { }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - await gBrowser.TabStateFlusher.flush(browser); - setTimeout(() => { - ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" ); - document.getElementById("cmd_close").doCommand(); - // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + await gBrowser.TabStateFlusher.flush(browser); setTimeout(() => { ok( tab.hasAttribute("zen-pinned-changed"), - "The tab should not have a zen-pinned-changed attribute after being closed" + "The tab should have a zen-pinned-changed attribute after being pinned" ); - ok(!tab.hasAttribute("discarded"), "The tab should not be discarded after being closed"); - Assert.notEqual( - tab, - gBrowser.selectedTab, - "The tab should not be selected after being closed" - ); - resolvePromise(); - }, 100); - }, 0); - await promise; - }); + document.getElementById("cmd_close").doCommand(); + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + setTimeout(() => { + ok( + tab.hasAttribute("zen-pinned-changed"), + "The tab should not have a zen-pinned-changed attribute after being closed" + ); + ok( + !tab.hasAttribute("discarded"), + "The tab should not be discarded after being closed" + ); + Assert.notEqual( + tab, + gBrowser.selectedTab, + "The tab should not be selected after being closed" + ); + resolvePromise(); + }, 100); + }, 0); + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_to_essential.js b/src/zen/tests/pinned/browser_pinned_to_essential.js index 9833ab6be..acdadaad3 100644 --- a/src/zen/tests/pinned/browser_pinned_to_essential.js +++ b/src/zen/tests/pinned/browser_pinned_to_essential.js @@ -5,11 +5,15 @@ add_task(async function test_Pinned_To_Essential() { let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); const newTab = gBrowser.selectedTab; gBrowser.pinTab(newTab); @@ -18,7 +22,8 @@ add_task(async function test_Pinned_To_Essential() { gZenPinnedTabManager.addToEssentials(newTab); ok( - newTab.hasAttribute("zen-essential") && newTab.parentNode.getAttribute("container") == "0", + newTab.hasAttribute("zen-essential") && + newTab.parentNode.getAttribute("container") == "0", "New tab should be marked as essential." ); diff --git a/src/zen/tests/pinned/browser_pinned_unload_changed.js b/src/zen/tests/pinned/browser_pinned_unload_changed.js index 6c9ae4c54..b2e0a1979 100644 --- a/src/zen/tests/pinned/browser_pinned_unload_changed.js +++ b/src/zen/tests/pinned/browser_pinned_unload_changed.js @@ -5,43 +5,55 @@ add_task(async function test_Unload_Changed_Pinned() { await SpecialPowers.pushPrefEnv({ - set: [["zen.pinned-tab-manager.close-shortcut-behavior", "reset-unload-switch"]], + set: [ + ["zen.pinned-tab-manager.close-shortcut-behavior", "reset-unload-switch"], + ], }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - await gBrowser.TabStateFlusher.flush(browser); - setTimeout(() => { - ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" ); - document.getElementById("cmd_close").doCommand(); - // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + await gBrowser.TabStateFlusher.flush(browser); setTimeout(() => { ok( - !tab.hasAttribute("zen-pinned-changed"), - "The tab should not have a zen-pinned-changed attribute after being closed" + tab.hasAttribute("zen-pinned-changed"), + "The tab should have a zen-pinned-changed attribute after being pinned" ); + document.getElementById("cmd_close").doCommand(); + // eslint-disable-next-line mozilla/no-arbitrary-setTimeout + setTimeout(() => { + ok( + !tab.hasAttribute("zen-pinned-changed"), + "The tab should not have a zen-pinned-changed attribute after being closed" + ); - ok(tab.hasAttribute("discarded"), "The tab should not be discarded after being closed"); - Assert.notEqual( - tab, - gBrowser.selectedTab, - "The tab should not be selected after being closed" - ); - resolvePromise(); - }, 100); - }, 0); - await promise; - }); + ok( + tab.hasAttribute("discarded"), + "The tab should not be discarded after being closed" + ); + Assert.notEqual( + tab, + gBrowser.selectedTab, + "The tab should not be selected after being closed" + ); + resolvePromise(); + }, 100); + }, 0); + await promise; + } + ); }); diff --git a/src/zen/tests/pinned/browser_pinned_unload_noreset.js b/src/zen/tests/pinned/browser_pinned_unload_noreset.js index 099222447..308fde46d 100644 --- a/src/zen/tests/pinned/browser_pinned_unload_noreset.js +++ b/src/zen/tests/pinned/browser_pinned_unload_noreset.js @@ -9,39 +9,49 @@ add_task(async function test_Unload_NoReset_Pinned() { }); let resolvePromise; - const promise = new Promise((resolve) => { + const promise = new Promise(resolve => { resolvePromise = resolve; }); - await BrowserTestUtils.withNewTab({ gBrowser, url: "https://example.com/1" }, async (browser) => { - const tab = gBrowser.getTabForBrowser(browser); - gBrowser.pinTab(tab); + await BrowserTestUtils.withNewTab( + { gBrowser, url: "https://example.com/1" }, + async browser => { + const tab = gBrowser.getTabForBrowser(browser); + gBrowser.pinTab(tab); - BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); - await BrowserTestUtils.browserLoaded(browser, false, "https://example.com/2"); - await gBrowser.TabStateFlusher.flush(browser); - /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ - setTimeout(() => { - ok( - tab.hasAttribute("zen-pinned-changed"), - "The tab should have a zen-pinned-changed attribute after being pinned" + BrowserTestUtils.startLoadingURIString(browser, "https://example.com/2"); + await BrowserTestUtils.browserLoaded( + browser, + false, + "https://example.com/2" ); - document.getElementById("cmd_close").doCommand(); + await gBrowser.TabStateFlusher.flush(browser); /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ setTimeout(() => { ok( tab.hasAttribute("zen-pinned-changed"), - "The tab should not have a zen-pinned-changed attribute after being closed" + "The tab should have a zen-pinned-changed attribute after being pinned" ); - ok(tab.hasAttribute("discarded"), "The tab should not be discarded after being closed"); - Assert.notEqual( - tab, - gBrowser.selectedTab, - "The tab should not be selected after being closed" - ); - resolvePromise(); - }, 100); - }, 0); - await promise; - }); + document.getElementById("cmd_close").doCommand(); + /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ + setTimeout(() => { + ok( + tab.hasAttribute("zen-pinned-changed"), + "The tab should not have a zen-pinned-changed attribute after being closed" + ); + ok( + tab.hasAttribute("discarded"), + "The tab should not be discarded after being closed" + ); + Assert.notEqual( + tab, + gBrowser.selectedTab, + "The tab should not be selected after being closed" + ); + resolvePromise(); + }, 100); + }, 0); + await promise; + } + ); }); diff --git a/src/zen/tests/split_view/browser_basic_split_view.js b/src/zen/tests/split_view/browser_basic_split_view.js index c1c39d480..2784052a7 100644 --- a/src/zen/tests/split_view/browser_basic_split_view.js +++ b/src/zen/tests/split_view/browser_basic_split_view.js @@ -19,7 +19,8 @@ add_task(async function test_Basic_Split_View() { add_task(async function test_Browser_Elements_Attributes() { await basicSplitNTabs(() => { Assert.equal( - document.querySelectorAll('.browserSidebarContainer[zen-split="true"]').length, + document.querySelectorAll('.browserSidebarContainer[zen-split="true"]') + .length, 2, "There should be two split browser sidebars" ); diff --git a/src/zen/tests/split_view/browser_split_browser_duplication.js b/src/zen/tests/split_view/browser_split_browser_duplication.js index 4355e2b0a..0b98821d1 100644 --- a/src/zen/tests/split_view/browser_split_browser_duplication.js +++ b/src/zen/tests/split_view/browser_split_browser_duplication.js @@ -17,20 +17,29 @@ add_task(async function test_Basic_Split_View_Duplication() { "There should be four tabs after pinning the second tab" ); await createSplitView([normal, pinned], "grid"); - ok(!pinned.group, "The pinned tab should not be in a split group after duplication"); + ok( + !pinned.group, + "The pinned tab should not be in a split group after duplication" + ); ok( normal.group.hasAttribute("split-view-group"), "The normal tab should be in a split group after duplication" ); const group = normal.group; for (const tab of group.tabs) { - Assert.ok(!tab.pinned, "All tabs in the split group should not be pinned after duplication"); + Assert.ok( + !tab.pinned, + "All tabs in the split group should not be pinned after duplication" + ); Assert.ok( tab.splitView, "All tabs in the split group should be in a split view after duplication" ); } - Assert.ok(!group.pinned, "The split group should not be pinned after duplication"); + Assert.ok( + !group.pinned, + "The split group should not be pinned after duplication" + ); for (const tab of [pinned, ...group.tabs]) { await BrowserTestUtils.removeTab(tab); } @@ -46,9 +55,16 @@ add_task(async function test_Split_View_Duplication_Both_Pinned() { gBrowser.pinTab(tab1); gBrowser.pinTab(tab2); await Promise.all([pinEvent1, pinEvent2]); - Assert.strictEqual(gBrowser.tabs.length, 4, "There should be four tabs after pinning both tabs"); + Assert.strictEqual( + gBrowser.tabs.length, + 4, + "There should be four tabs after pinning both tabs" + ); await createSplitView([tab1, tab2], "grid"); - ok(tab1.group, "The first pinned tab should be in a split group after duplication"); + ok( + tab1.group, + "The first pinned tab should be in a split group after duplication" + ); Assert.strictEqual( tab2.group, tab1.group, @@ -60,13 +76,19 @@ add_task(async function test_Split_View_Duplication_Both_Pinned() { "There should not be any duplicate tabs after pinning both tabs" ); for (const tab of tab1.group.tabs) { - Assert.ok(tab.pinned, "All tabs in the split group should be pinned after duplication"); + Assert.ok( + tab.pinned, + "All tabs in the split group should be pinned after duplication" + ); Assert.ok( tab.splitView, "All tabs in the split group should be in a split view after duplication" ); } - Assert.ok(tab1.group.pinned, "The split group should be pinned after duplication of both tabs"); + Assert.ok( + tab1.group.pinned, + "The split group should be pinned after duplication of both tabs" + ); for (const tab of tab1.group.tabs) { await BrowserTestUtils.removeTab(tab); } @@ -116,7 +138,7 @@ add_task(async function test_Split_View_Duplication_Essential() { const essentials = await Promise.all( [...Array(2)].map((_, i) => addTabTo(gBrowser, getUrlForNthTab(i + 1))) ); - essentials.forEach((tab) => { + essentials.forEach(tab => { gZenPinnedTabManager.addToEssentials(tab); }); Assert.strictEqual( @@ -131,8 +153,14 @@ add_task(async function test_Split_View_Duplication_Essential() { "There should be six tabs after creating a split view with two essential tabs" ); for (const tab of essentials) { - ok(!tab.group, "Each essential tab should not be in a split group after duplication"); - ok(!tab.splitView, "Each essential tab should not be in a split view after duplication"); + ok( + !tab.group, + "Each essential tab should not be in a split group after duplication" + ); + ok( + !tab.splitView, + "Each essential tab should not be in a split view after duplication" + ); } for (const tab of gBrowser.tabs) { if (existingTabs.includes(tab)) { diff --git a/src/zen/tests/split_view/browser_split_groups.js b/src/zen/tests/split_view/browser_split_groups.js index 7ba57d239..a3874c076 100644 --- a/src/zen/tests/split_view/browser_split_groups.js +++ b/src/zen/tests/split_view/browser_split_groups.js @@ -4,21 +4,34 @@ "use strict"; add_task(async function test_Basic_Split_Groups() { - await basicSplitNTabs(async (tabs) => { - ok(tabs[0].group.hasAttribute("split-view-group"), "The first tab should be in a split group"); - Assert.equal(tabs[0].group.tabs.length, 2, "The first split group should contain two tabs"); + await basicSplitNTabs(async tabs => { + ok( + tabs[0].group.hasAttribute("split-view-group"), + "The first tab should be in a split group" + ); + Assert.equal( + tabs[0].group.tabs.length, + 2, + "The first split group should contain two tabs" + ); }); }); add_task(async function test_Basic_Split_Groups_Pinning() { - await basicSplitNTabs(async (tabs) => { + await basicSplitNTabs(async tabs => { const group = tabs[0].group; - ok(group.hasAttribute("split-view-group"), "The first tab should be in a split group"); + ok( + group.hasAttribute("split-view-group"), + "The first tab should be in a split group" + ); const pinEvent = BrowserTestUtils.waitForEvent(tabs[0], "TabPinned"); gBrowser.pinTab(tabs[0]); await pinEvent; for (const tab of tabs) { - ok(tab.pinned, "All tabs in the split group should be pinned after pinning the first tab"); + ok( + tab.pinned, + "All tabs in the split group should be pinned after pinning the first tab" + ); Assert.strictEqual( tab.group, group, @@ -40,15 +53,21 @@ add_task(async function test_Basic_Split_Groups_Pinning() { "All tabs in the split group should remain in the same group after unpinning" ); } - ok(!group.pinned, "The split group should be unpinned after unpinning a tab"); + ok( + !group.pinned, + "The split group should be unpinned after unpinning a tab" + ); }); }); add_task(async function test_Basic_Unsplit_Group_Removed() { let group; - await basicSplitNTabs(async (tabs) => { + await basicSplitNTabs(async tabs => { group = tabs[0].group; }); ok(group, "The split group should exist"); - ok(!group.parentNode, "The split group should be removed from the DOM after unsplitting"); + ok( + !group.parentNode, + "The split group should be removed from the DOM after unsplitting" + ); }); diff --git a/src/zen/tests/split_view/browser_split_inset_checks.js b/src/zen/tests/split_view/browser_split_inset_checks.js index 30c544c34..e1e829681 100644 --- a/src/zen/tests/split_view/browser_split_inset_checks.js +++ b/src/zen/tests/split_view/browser_split_inset_checks.js @@ -6,7 +6,9 @@ add_task(async function test_Basic_Split_View_Inset() { let viewsToCheck = []; await basicSplitNTabs(() => { - viewsToCheck = document.querySelectorAll('.browserSidebarContainer[zen-split="true"]'); + viewsToCheck = document.querySelectorAll( + '.browserSidebarContainer[zen-split="true"]' + ); ok(viewsToCheck.length, "There should be split views present"); Assert.equal( viewsToCheck[0].style.inset, @@ -20,13 +22,19 @@ add_task(async function test_Basic_Split_View_Inset() { ); }); for (const view of viewsToCheck) { - Assert.equal(view.style.inset, "", "The unsplit view should not have correct inset style"); + Assert.equal( + view.style.inset, + "", + "The unsplit view should not have correct inset style" + ); } }); add_task(async function test_Horizontal_Split_Inset() { await basicSplitNTabs(() => { - const viewsToCheck = document.querySelectorAll('.browserSidebarContainer[zen-split="true"]'); + const viewsToCheck = document.querySelectorAll( + '.browserSidebarContainer[zen-split="true"]' + ); ok(viewsToCheck.length, "There should be split views present"); Assert.equal( viewsToCheck[0].style.inset, @@ -44,7 +52,9 @@ add_task(async function test_Horizontal_Split_Inset() { add_task(async function test_3_Splits_Grid_Inset() { await basicSplitNTabs( () => { - const viewsToCheck = document.querySelectorAll('.browserSidebarContainer[zen-split="true"]'); + const viewsToCheck = document.querySelectorAll( + '.browserSidebarContainer[zen-split="true"]' + ); ok(viewsToCheck.length, "There should be split views present"); Assert.equal( viewsToCheck[0].style.inset, diff --git a/src/zen/tests/split_view/browser_split_view_empty.js b/src/zen/tests/split_view/browser_split_view_empty.js index 1abe7342d..6fbddbd74 100644 --- a/src/zen/tests/split_view/browser_split_view_empty.js +++ b/src/zen/tests/split_view/browser_split_view_empty.js @@ -25,7 +25,7 @@ add_task(async function test_Split_View_Empty() { let result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0); EventUtils.synthesizeMouseAtCenter(result.element.row, {}); await waitForActivationPromise; - await new Promise((resolve) => { + await new Promise(resolve => { /* eslint-disable mozilla/no-arbitrary-setTimeout */ setTimeout(async () => { resolve(); @@ -36,8 +36,14 @@ add_task(async function test_Split_View_Empty() { gBrowser.tabpanels.hasAttribute("zen-split-view"), "The split view should not have crashed with two tabs in it" ); - ok(!gZenWorkspaces._emptyTab.splitView, "The empty tab should not be in split view"); - ok(!gZenWorkspaces._emptyTab.group, "The empty tab should not be in a group"); + ok( + !gZenWorkspaces._emptyTab.splitView, + "The empty tab should not be in split view" + ); + ok( + !gZenWorkspaces._emptyTab.group, + "The empty tab should not be in a group" + ); ok(selectedTab.splitView, "The selected tab should be in split view"); ok(originalTab.splitView, "The original tab should be in split view"); Assert.equal( diff --git a/src/zen/tests/split_view/browser_split_view_with_folders.js b/src/zen/tests/split_view/browser_split_view_with_folders.js index 2558d6980..6f2887819 100644 --- a/src/zen/tests/split_view/browser_split_view_with_folders.js +++ b/src/zen/tests/split_view/browser_split_view_with_folders.js @@ -13,13 +13,25 @@ add_task(async function test_Split_View_Inside_Folder() { gBrowser.pinTab(tab1); gBrowser.pinTab(tab2); await Promise.all([pinEvent1, pinEvent2]); - Assert.strictEqual(gBrowser.tabs.length, 4, "There should be four tabs after pinning both tabs"); + Assert.strictEqual( + gBrowser.tabs.length, + 4, + "There should be four tabs after pinning both tabs" + ); const folder = await gZenFolders.createFolder([tab1, tab2], { renameFolder: false, label: "test", }); - Assert.equal(tab1.group, folder, "The first pinned tab should be in the folder group"); - Assert.equal(tab2.group, folder, "The second pinned tab should be in the folder group"); + Assert.equal( + tab1.group, + folder, + "The first pinned tab should be in the folder group" + ); + Assert.equal( + tab2.group, + folder, + "The second pinned tab should be in the folder group" + ); await createSplitView([tab1, tab2], "grid"); Assert.strictEqual( tab2.group, @@ -30,8 +42,15 @@ add_task(async function test_Split_View_Inside_Folder() { tab1.group.hasAttribute("split-view-group"), "The first pinned tab should be in a split group after duplication" ); - Assert.ok(tab1.group.pinned, "The split group should be pinned after duplication of both tabs"); - Assert.equal(tab1.group.group, folder, "The split group should be the folder after duplication"); + Assert.ok( + tab1.group.pinned, + "The split group should be pinned after duplication of both tabs" + ); + Assert.equal( + tab1.group.group, + folder, + "The split group should be the folder after duplication" + ); const removeEvent = BrowserTestUtils.waitForEvent(window, "TabGroupRemoved"); folder.delete(); await removeEvent; diff --git a/src/zen/tests/split_view/browser_split_view_with_glance.js b/src/zen/tests/split_view/browser_split_view_with_glance.js index 3752f1a69..ced3d6bcd 100644 --- a/src/zen/tests/split_view/browser_split_view_with_glance.js +++ b/src/zen/tests/split_view/browser_split_view_with_glance.js @@ -9,7 +9,7 @@ const { openGlanceOnTab } = ChromeUtils.importESModule( add_task(async function test_Basic_Split_View_Glance() { await basicSplitNTabs(async () => { - await openGlanceOnTab(window, async (glanceTab) => { + await openGlanceOnTab(window, async glanceTab => { ok( glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should have the zen-glance-tab attribute" @@ -23,23 +23,28 @@ add_task(async function test_Basic_Split_View_Glance() { }); add_task(async function test_Basic_Split_View_Glance_Expand() { - await basicSplitNTabs(async (tabs) => { + await basicSplitNTabs(async tabs => { await openGlanceOnTab( window, - async (glanceTab) => { + async glanceTab => { await gZenGlanceManager.fullyOpenGlance(); ok( !glanceTab.hasAttribute("zen-glance-tab"), "The glance tab should not have the zen-glance-tab attribute after expanding" ); - ok(!glanceTab.group, "The glance tab should not be in a split group after expanding"); + ok( + !glanceTab.group, + "The glance tab should not be in a split group after expanding" + ); for (const tab of tabs) { ok( tab.group.hasAttribute("split-view-group"), "All tabs in the split view should still be in a split group after expanding glance" ); } - const selectedBrowser = document.querySelectorAll(".browserSidebarContainer.deck-selected"); + const selectedBrowser = document.querySelectorAll( + ".browserSidebarContainer.deck-selected" + ); Assert.equal( selectedBrowser.length, 1, @@ -57,7 +62,9 @@ add_task(async function test_Basic_Split_View_Glance_No_More_Split() { async () => { await openGlanceOnTab(window, () => { Assert.strictEqual( - document.getElementById("cmd_zenGlanceSplit").getAttribute("disabled"), + document + .getElementById("cmd_zenGlanceSplit") + .getAttribute("disabled"), "true", "The split command should be disabled when glance is open" ); @@ -73,7 +80,7 @@ add_task(async function test_Basic_Split_View_Glance_Split() { gBrowser.selectedTab = tab; await openGlanceOnTab( window, - async (glanceTab) => { + async glanceTab => { const waitForSplitPromise = BrowserTestUtils.waitForEvent( window, "ZenViewSplitter:SplitViewActivated" diff --git a/src/zen/tests/split_view/head.js b/src/zen/tests/split_view/head.js index 47d7fe7c8..39549ad2a 100644 --- a/src/zen/tests/split_view/head.js +++ b/src/zen/tests/split_view/head.js @@ -3,7 +3,11 @@ "use strict"; -async function addTabTo(targetBrowser, url = "http://mochi.test:8888/", params = {}) { +async function addTabTo( + targetBrowser, + url = "http://mochi.test:8888/", + params = {} +) { params.skipAnimation = true; const tab = BrowserTestUtils.addTab(targetBrowser, url, params); const browser = targetBrowser.getBrowserForTab(tab); @@ -22,7 +26,7 @@ async function createSplitView(tabs, type = "grid") { ); gZenViewSplitter.splitTabs(tabs, type); await waitForActivationPromise; - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(async () => { resolve(); }, 100); diff --git a/src/zen/tests/tabs/browser_drag_drop_vertical.js b/src/zen/tests/tabs/browser_drag_drop_vertical.js index fcaa72f4c..5a2eb476f 100644 --- a/src/zen/tests/tabs/browser_drag_drop_vertical.js +++ b/src/zen/tests/tabs/browser_drag_drop_vertical.js @@ -9,8 +9,12 @@ const URL3 = "data:text/plain,tab3"; const threshold = Math.min( 1.0, - Math.max(0.5, Services.prefs.getIntPref("browser.tabs.dragDrop.moveOverThresholdPercent") / 100) + - 0.01 + Math.max( + 0.5, + Services.prefs.getIntPref( + "browser.tabs.dragDrop.moveOverThresholdPercent" + ) / 100 + ) + 0.01 ); /** @@ -36,7 +40,7 @@ async function drop(source, target, clientX, clientY, win) { * @param {Element} el * @returns {DOMRect} */ -const bounds = (el) => window.windowUtils.getBoundsWithoutFlushing(el); +const bounds = el => window.windowUtils.getBoundsWithoutFlushing(el); /** * Virtually drag and drop one tab strip item after another. @@ -71,7 +75,9 @@ async function dropBefore(itemToDrag, itemToDropBefore, win) { const midline = rect.left + 0.5 * rect.width; // Point where top edge of `itemToDrag` overlaps `itemToDropBefore` enough // for `itemToDrag` to come before. - const beforePoint = Math.floor(rect.top + (1 - threshold - 0.5) * rect.height); + const beforePoint = Math.floor( + rect.top + (1 - threshold - 0.5) * rect.height + ); const dragTo = beforePoint + sourceRect.height / 2; await drop(itemToDrag, itemToDropBefore, midline, dragTo, win); } @@ -81,7 +87,9 @@ async function dropBefore(itemToDrag, itemToDropBefore, win) { */ async function ensureNotOverflowing() { const tabHeight = Number.parseFloat( - getComputedStyle(gBrowser.tabs[0]).getPropertyValue("--tab-height-with-margin-padding") + getComputedStyle(gBrowser.tabs[0]).getPropertyValue( + "--tab-height-with-margin-padding" + ) ); const requiredTabSpace = tabHeight * gBrowser.tabs.length; const scrollboxWidth = gBrowser.tabContainer.arrowScrollbox.scrollSize; @@ -118,7 +126,11 @@ add_setup(async () => { BrowserTestUtils.removeTab(tabToRemove); const emptyTab = gBrowser.tabs[0]; - Assert.deepEqual(gBrowser.tabs, [emptyTab, tab1, tab2, tab3], "confirm tabs' starting order"); + Assert.deepEqual( + gBrowser.tabs, + [emptyTab, tab1, tab2, tab3], + "confirm tabs' starting order" + ); await ensureNotOverflowing(); diff --git a/src/zen/tests/tabs/browser_tabs_cycle_by_attribute.js b/src/zen/tests/tabs/browser_tabs_cycle_by_attribute.js index 5e7934134..acd73939c 100644 --- a/src/zen/tests/tabs/browser_tabs_cycle_by_attribute.js +++ b/src/zen/tests/tabs/browser_tabs_cycle_by_attribute.js @@ -16,7 +16,10 @@ const URL6 = "data:text/plain,tab6"; * @param {MozTabbrowserTab} tab - tab to select */ async function selectTab(tab) { - const onSelect = BrowserTestUtils.waitForEvent(gBrowser.tabContainer, "TabSelect"); + const onSelect = BrowserTestUtils.waitForEvent( + gBrowser.tabContainer, + "TabSelect" + ); gBrowser.selectedTab = tab; await onSelect; } @@ -37,22 +40,29 @@ add_setup(async () => { gZenPinnedTabManager.addToEssentials(tabs.slice(0, 3)); await BrowserTestUtils.waitForCondition( - () => tabs.slice(0, 3).every((tab) => tab.hasAttribute("zen-essential")), + () => tabs.slice(0, 3).every(tab => tab.hasAttribute("zen-essential")), "all essentials ready" ); - const essentialTabs = gBrowser.tabs.filter((tab) => tab.hasAttribute("zen-essential")); + const essentialTabs = gBrowser.tabs.filter(tab => + tab.hasAttribute("zen-essential") + ); Assert.equal(essentialTabs.length, 3, "3 essential tabs created"); const workspaceTabs = gBrowser.tabs.filter( - (tab) => !tab.hasAttribute("zen-essential") && !tab.hasAttribute("zen-empty-tab") + tab => + !tab.hasAttribute("zen-essential") && !tab.hasAttribute("zen-empty-tab") + ); + Assert.equal( + workspaceTabs.length, + 3, + "3 workspace tabs created, excluding empty tab" ); - Assert.equal(workspaceTabs.length, 3, "3 workspace tabs created, excluding empty tab"); registerCleanupFunction(async () => { // replace the default new tab in the test window addTabTo(gBrowser, "about:blank"); - tabs.forEach((element) => { + tabs.forEach(element => { BrowserTestUtils.removeTab(element); }); await SpecialPowers.popPrefEnv(); @@ -64,7 +74,9 @@ add_task(async function cycleTabsByAttribute() { set: [["zen.tabs.ctrl-tab.ignore-essential-tabs", true]], }); - const essentialTabs = gBrowser.tabs.filter((tab) => tab.hasAttribute("zen-essential")); + const essentialTabs = gBrowser.tabs.filter(tab => + tab.hasAttribute("zen-essential") + ); await selectTab(essentialTabs[0]); gBrowser.tabContainer.advanceSelectedTab(1, true); @@ -77,7 +89,8 @@ add_task(async function cycleTabsByAttribute() { ); const workspaceTabs = gBrowser.tabs.filter( - (tab) => !tab.hasAttribute("zen-essential") && !tab.hasAttribute("zen-empty-tab") + tab => + !tab.hasAttribute("zen-essential") && !tab.hasAttribute("zen-empty-tab") ); await selectTab(workspaceTabs[0]); diff --git a/src/zen/tests/tabs/browser_tabs_empty_checks.js b/src/zen/tests/tabs/browser_tabs_empty_checks.js index 0694275dc..f383b5330 100644 --- a/src/zen/tests/tabs/browser_tabs_empty_checks.js +++ b/src/zen/tests/tabs/browser_tabs_empty_checks.js @@ -7,7 +7,10 @@ add_task(async function test_Empty_Tab_Transparent() { const emptyTab = gZenWorkspaces._emptyTab; ok(emptyTab, "Empty tab should exist"); ok(emptyTab.parentElement, "Empty tab should be in the DOM"); - ok(emptyTab.hasAttribute("zen-empty-tab"), "Empty tab should have the zen-empty-tab attribute"); + ok( + emptyTab.hasAttribute("zen-empty-tab"), + "Empty tab should have the zen-empty-tab attribute" + ); ok( emptyTab.linkedBrowser.hasAttribute("transparent"), "Empty tab should have the transparent attribute" @@ -15,14 +18,20 @@ add_task(async function test_Empty_Tab_Transparent() { }); add_task(async function test_Empty_Tab_Always_First() { - ok(gBrowser.tabs[0].hasAttribute("zen-empty-tab"), "First tab should be the empty tab"); + ok( + gBrowser.tabs[0].hasAttribute("zen-empty-tab"), + "First tab should be the empty tab" + ); await BrowserTestUtils.withNewTab( { gBrowser, url: "https://example.com", }, async () => { - ok(gBrowser.tabs[0].hasAttribute("zen-empty-tab"), "First tab should be the empty tab"); + ok( + gBrowser.tabs[0].hasAttribute("zen-empty-tab"), + "First tab should be the empty tab" + ); } ); }); diff --git a/src/zen/tests/tabs/head.js b/src/zen/tests/tabs/head.js index 61d6a9aa5..76104f295 100644 --- a/src/zen/tests/tabs/head.js +++ b/src/zen/tests/tabs/head.js @@ -37,7 +37,11 @@ function updateTabContextMenu(tab) { var evt = new Event(""); tab.dispatchEvent(evt); menu.openPopup(tab, "end_after", 0, 0, true, false, evt); - is(window.TabContextMenu.contextTab, tab, "TabContextMenu context is the expected tab"); + is( + window.TabContextMenu.contextTab, + tab, + "TabContextMenu context is the expected tab" + ); menu.hidePopup(); } @@ -63,7 +67,11 @@ async function addTab(url = "http://mochi.test:8888/", params) { return addTabTo(gBrowser, url, params); } -async function addTabTo(targetBrowser, url = "http://mochi.test:8888/", params = {}) { +async function addTabTo( + targetBrowser, + url = "http://mochi.test:8888/", + params = {} +) { params.skipAnimation = true; const tab = BrowserTestUtils.addTab(targetBrowser, url, params); const browser = targetBrowser.getBrowserForTab(tab); @@ -106,7 +114,7 @@ async function wait_for_tab_playing_event(tab, expectPlaying) { ok(true, "The tab should " + (expectPlaying ? "" : "not ") + "be playing"); return true; } - return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, (event) => { + return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, event => { if (event.detail.changed.includes("soundplaying")) { is( tab.hasAttribute("soundplaying"), @@ -126,20 +134,29 @@ async function wait_for_tab_playing_event(tab, expectPlaying) { async function wait_for_tab_media_blocked_event(tab, expectMediaBlocked) { if (tab.activeMediaBlocked == expectMediaBlocked) { - ok(true, "The tab should " + (expectMediaBlocked ? "" : "not ") + "be activemedia-blocked"); + ok( + true, + "The tab should " + + (expectMediaBlocked ? "" : "not ") + + "be activemedia-blocked" + ); return true; } - return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, (event) => { + return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, event => { if (event.detail.changed.includes("activemedia-blocked")) { is( tab.hasAttribute("activemedia-blocked"), expectMediaBlocked, - "The tab should " + (expectMediaBlocked ? "" : "not ") + "be activemedia-blocked" + "The tab should " + + (expectMediaBlocked ? "" : "not ") + + "be activemedia-blocked" ); is( tab.activeMediaBlocked, expectMediaBlocked, - "The tab should " + (expectMediaBlocked ? "" : "not ") + "be activemedia-blocked" + "The tab should " + + (expectMediaBlocked ? "" : "not ") + + "be activemedia-blocked" ); return true; } @@ -212,7 +229,7 @@ function leave_icon(icon) { let everMutedTabs = new WeakSet(); function get_wait_for_mute_promise(tab, expectMuted) { - return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, (event) => { + return BrowserTestUtils.waitForEvent(tab, "TabAttrModified", false, event => { if ( event.detail.changed.includes("muted") || event.detail.changed.includes("activemedia-blocked") @@ -232,7 +249,11 @@ function get_wait_for_mute_promise(tab, expectMuted) { everMutedTabs.add(tab); is(tab.muteReason, null, "The tab should have a null muteReason value"); } else { - is(tab.muteReason, undefined, "The tab should have an undefined muteReason value"); + is( + tab.muteReason, + undefined, + "The tab should have an undefined muteReason value" + ); } return true; } @@ -306,7 +327,10 @@ async function dragAndDrop( return tab1.elementIndex != originalIndex; }, "Waiting for tab position to be updated"); } else if (destWindow != origWindow) { - await BrowserTestUtils.waitForCondition(() => tab1.closing, "Waiting for tab closing"); + await BrowserTestUtils.waitForCondition( + () => tab1.closing, + "Waiting for tab closing" + ); } } @@ -360,7 +384,8 @@ function test_url_for_process_types({ const CHROME_PROCESS = E10SUtils.NOT_REMOTE; const WEB_CONTENT_PROCESS = E10SUtils.WEB_REMOTE_TYPE; const PRIVILEGEDABOUT_CONTENT_PROCESS = E10SUtils.PRIVILEGEDABOUT_REMOTE_TYPE; - const PRIVILEGEDMOZILLA_CONTENT_PROCESS = E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE; + const PRIVILEGEDMOZILLA_CONTENT_PROCESS = + E10SUtils.PRIVILEGEDMOZILLA_REMOTE_TYPE; const EXTENSION_PROCESS = E10SUtils.EXTENSION_REMOTE_TYPE; is( @@ -369,33 +394,57 @@ function test_url_for_process_types({ "Check URL in chrome process." ); is( - E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, WEB_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url, + /* fission */ false, + WEB_CONTENT_PROCESS + ), webContentResult, "Check URL in web content process." ); is( - E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, PRIVILEGEDABOUT_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url, + /* fission */ false, + PRIVILEGEDABOUT_CONTENT_PROCESS + ), privilegedAboutContentResult, "Check URL in privileged about content process." ); is( - E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, PRIVILEGEDMOZILLA_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url, + /* fission */ false, + PRIVILEGEDMOZILLA_CONTENT_PROCESS + ), privilegedMozillaContentResult, "Check URL in privileged mozilla content process." ); is( - E10SUtils.canLoadURIInRemoteType(url, /* fission */ false, EXTENSION_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url, + /* fission */ false, + EXTENSION_PROCESS + ), extensionProcessResult, "Check URL in extension process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, CHROME_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "#foo", + /* fission */ false, + CHROME_PROCESS + ), chromeResult, "Check URL with ref in chrome process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, WEB_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "#foo", + /* fission */ false, + WEB_CONTENT_PROCESS + ), webContentResult, "Check URL with ref in web content process." ); @@ -418,18 +467,30 @@ function test_url_for_process_types({ "Check URL with ref in privileged mozilla content process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "#foo", /* fission */ false, EXTENSION_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "#foo", + /* fission */ false, + EXTENSION_PROCESS + ), extensionProcessResult, "Check URL with ref in extension process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, CHROME_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo", + /* fission */ false, + CHROME_PROCESS + ), chromeResult, "Check URL with query in chrome process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, WEB_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo", + /* fission */ false, + WEB_CONTENT_PROCESS + ), webContentResult, "Check URL with query in web content process." ); @@ -452,18 +513,30 @@ function test_url_for_process_types({ "Check URL with query in privileged mozilla content process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo", /* fission */ false, EXTENSION_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo", + /* fission */ false, + EXTENSION_PROCESS + ), extensionProcessResult, "Check URL with query in extension process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, CHROME_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo#bar", + /* fission */ false, + CHROME_PROCESS + ), chromeResult, "Check URL with query and ref in chrome process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, WEB_CONTENT_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo#bar", + /* fission */ false, + WEB_CONTENT_PROCESS + ), webContentResult, "Check URL with query and ref in web content process." ); @@ -486,7 +559,11 @@ function test_url_for_process_types({ "Check URL with query and ref in privileged mozilla content process." ); is( - E10SUtils.canLoadURIInRemoteType(url + "?foo#bar", /* fission */ false, EXTENSION_PROCESS), + E10SUtils.canLoadURIInRemoteType( + url + "?foo#bar", + /* fission */ false, + EXTENSION_PROCESS + ), extensionProcessResult, "Check URL with query and ref in extension process." ); @@ -505,7 +582,10 @@ function fileURL(filename) { * Get a http URL for the local file name. */ function httpURL(filename, host = "https://example.com/") { - let root = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", host); + let root = getRootDirectory(gTestPath).replace( + "chrome://mochitests/content/", + host + ); return root + filename; } @@ -533,9 +613,16 @@ async function getContextMenu(triggerNode, contextMenuId) { let win = triggerNode.ownerGlobal; triggerNode.scrollIntoView({ behavior: "instant" }); const contextMenu = win.document.getElementById(contextMenuId); - const contextMenuShown = BrowserTestUtils.waitForPopupEvent(contextMenu, "shown"); + const contextMenuShown = BrowserTestUtils.waitForPopupEvent( + contextMenu, + "shown" + ); - EventUtils.synthesizeMouseAtCenter(triggerNode, { type: "contextmenu", button: 2 }, win); + EventUtils.synthesizeMouseAtCenter( + triggerNode, + { type: "contextmenu", button: 2 }, + win + ); await contextMenuShown; return contextMenu; } diff --git a/src/zen/tests/ub-actions/browser_ub_actions_search.js b/src/zen/tests/ub-actions/browser_ub_actions_search.js index ba961eab2..82e2f7b69 100644 --- a/src/zen/tests/ub-actions/browser_ub_actions_search.js +++ b/src/zen/tests/ub-actions/browser_ub_actions_search.js @@ -20,10 +20,16 @@ add_task(async function test_Ub_Actions_Search() { waitForFocus, value: label, }); - await new Promise((resolve) => + await new Promise(resolve => setTimeout(async () => { - let index = typeof action.suggestedIndex === "number" ? action.suggestedIndex : Infinity; - let { result } = await UrlbarTestUtils.getRowAt(window, Math.min(index, 1)); + let index = + typeof action.suggestedIndex === "number" + ? action.suggestedIndex + : Infinity; + let { result } = await UrlbarTestUtils.getRowAt( + window, + Math.min(index, 1) + ); Assert.equal(result.providerName, "ZenUrlbarProviderGlobalActions"); Assert.equal(result.payload.title, label); resolve(); diff --git a/src/zen/tests/urlbar/browser_floating_urlbar.js b/src/zen/tests/urlbar/browser_floating_urlbar.js index 02c52ce26..303ad0c7c 100644 --- a/src/zen/tests/urlbar/browser_floating_urlbar.js +++ b/src/zen/tests/urlbar/browser_floating_urlbar.js @@ -18,7 +18,10 @@ add_task(async function test_Floating_Urlbar() { value: "https://example.com/", }); - ok(gURLBar.textbox.hasAttribute("zen-floating-urlbar"), "URL bar should be in floating mode"); + ok( + gURLBar.textbox.hasAttribute("zen-floating-urlbar"), + "URL bar should be in floating mode" + ); }); add_task(async function test_Click_Shoudnt_FLoat_Urlbar() { diff --git a/src/zen/tests/urlbar/browser_issue_7385.js b/src/zen/tests/urlbar/browser_issue_7385.js index 991d1931f..b77187e9d 100644 --- a/src/zen/tests/urlbar/browser_issue_7385.js +++ b/src/zen/tests/urlbar/browser_issue_7385.js @@ -21,7 +21,11 @@ add_task(async function test_Selection_Remains_Double_Toolbar() { await selectWithMouseDrag(100, 200); Assert.greater(gURLBar.selectionStart, 0, "Selection start is positive."); - Assert.greater(gURLBar.selectionEnd, gURLBar.selectionStart, "Selection is not empty."); + Assert.greater( + gURLBar.selectionEnd, + gURLBar.selectionStart, + "Selection is not empty." + ); Assert.equal(gURLBar.value, untrimmedValue, `Value should be untrimmed`); diff --git a/src/zen/tests/urlbar/head.js b/src/zen/tests/urlbar/head.js index cb89787fa..29eaebf2c 100644 --- a/src/zen/tests/urlbar/head.js +++ b/src/zen/tests/urlbar/head.js @@ -35,13 +35,19 @@ function selectWithMouseDrag(fromX, toX, win = window) { { type: "mousemove" }, target.ownerGlobal ); - EventUtils.synthesizeMouse(target, toX, rect.height / 2, { type: "mouseup" }, target.ownerGlobal); + EventUtils.synthesizeMouse( + target, + toX, + rect.height / 2, + { type: "mouseup" }, + target.ownerGlobal + ); return promise; } function goToMultipleLayouts(callback) { // eslint-disable-next-line no-async-promise-executor - return new Promise(async (resolve) => { + return new Promise(async resolve => { await SpecialPowers.pushPrefEnv({ set: [["zen.view.use-single-toolbar", false]], }); diff --git a/src/zen/tests/welcome/browser_welcome.js b/src/zen/tests/welcome/browser_welcome.js index c9f773050..5e8e48540 100644 --- a/src/zen/tests/welcome/browser_welcome.js +++ b/src/zen/tests/welcome/browser_welcome.js @@ -7,7 +7,7 @@ add_task(async function test_Welcome_Steps() { const selectedTab = gBrowser.selectedTab; - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(async () => { await waitForFocus(); await EventUtils.synthesizeMouseAtCenter( @@ -28,7 +28,9 @@ add_task(async function test_Welcome_Steps() { const welcomeContent = document.getElementById("zen-welcome-page-content"); - for (const button of document.querySelectorAll("#zen-welcome-page-sidebar-buttons button")) { + for (const button of document.querySelectorAll( + "#zen-welcome-page-sidebar-buttons button" + )) { Assert.notStrictEqual( getComputedStyle(button).pointerEvents, "none", @@ -54,11 +56,14 @@ add_task(async function test_Welcome_Steps() { await EventUtils.synthesizeMouseAtCenter(welcomeContent.children[1], {}); - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(async () => { let engineName = await Services.search.getDefault(); const selectedLabel = welcomeContent.children[1]; - ok(selectedLabel.querySelector("input").checked, "The selected label should be checked"); + ok( + selectedLabel.querySelector("input").checked, + "The selected label should be checked" + ); Assert.equal( engineName.name, selectedLabel.querySelector("label").textContent.trim(), @@ -71,7 +76,7 @@ add_task(async function test_Welcome_Steps() { await goNextWelcomePage("zen-generic-next"); ok(true, "Welcome Search Step Test Finished"); - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(async () => { const essentials = welcomeContent.querySelector( "#zen-welcome-initial-essentials-browser-sidebar-essentials" @@ -102,12 +107,15 @@ add_task(async function test_Welcome_Steps() { essentials[2].getAttribute("data-url"), ]; for (const url of urlsToCheck) { - ok(url.startsWith("https://"), `The URL "${url}" should start with "https://"`); + ok( + url.startsWith("https://"), + `The URL "${url}" should start with "https://"` + ); } await goNextWelcomePage("zen-generic-next"); - await new Promise((r) => { + await new Promise(r => { setTimeout(async () => { for (const url of urlsToCheck) { ok( @@ -128,7 +136,7 @@ add_task(async function test_Welcome_Steps() { await goNextWelcomePage("zen-welcome-start-browsing"); ok(true, "Welcome Finish Step Test Finished"); - await new Promise((resolve) => { + await new Promise(resolve => { setTimeout(async () => { Assert.greater( gBrowser._numZenEssentials, @@ -136,14 +144,20 @@ add_task(async function test_Welcome_Steps() { "There should be more than 3 Zen Essentials after the welcome process" ); Assert.equal( - gBrowser.tabs.filter((tab) => tab.pinned && !tab.hasAttribute("zen-essential")).length, + gBrowser.tabs.filter( + tab => tab.pinned && !tab.hasAttribute("zen-essential") + ).length, 3, "There should be 3 pinned tabs after the welcome process" ); gBrowser.selectedTab = selectedTab; const groups = gBrowser.tabGroups; - Assert.equal(groups.length, 1, "There should be one tab group after the welcome process"); + Assert.equal( + groups.length, + 1, + "There should be one tab group after the welcome process" + ); const group = groups[0]; Assert.equal( group.tabs.length, @@ -165,7 +179,11 @@ add_task(async function test_Welcome_Steps() { tab.hasAttribute("zen-workspace-id"), "Pinned tabs should have a zen-workspace-id attribute" ); - Assert.equal(tab.group, group, "Pinned tabs should belong to the first tab group"); + Assert.equal( + tab.group, + group, + "Pinned tabs should belong to the first tab group" + ); } } } diff --git a/src/zen/tests/welcome/head.js b/src/zen/tests/welcome/head.js index 0ac97496d..f5ad262ae 100644 --- a/src/zen/tests/welcome/head.js +++ b/src/zen/tests/welcome/head.js @@ -4,7 +4,7 @@ async function goNextWelcomePage(l10nId) { /* eslint-disable-next-line no-async-promise-executor */ - await new Promise(async (resolve) => { + await new Promise(async resolve => { const button = document.querySelector( `#zen-welcome-page-sidebar-buttons button[data-l10n-id="${l10nId}"]` ); @@ -21,5 +21,5 @@ async function goNextWelcomePage(l10nId) { } async function waitForFocus(...args) { - await new Promise((resolve) => SimpleTest.waitForFocus(resolve, ...args)); + await new Promise(resolve => SimpleTest.waitForFocus(resolve, ...args)); } diff --git a/src/zen/tests/window_sync/browser_sync_tab_label.js b/src/zen/tests/window_sync/browser_sync_tab_label.js index 9e89f0690..731922093 100644 --- a/src/zen/tests/window_sync/browser_sync_tab_label.js +++ b/src/zen/tests/window_sync/browser_sync_tab_label.js @@ -10,7 +10,11 @@ add_task(async function test_SimpleLabelChange() { await runSyncAction( () => { gBrowser._setTabLabel(newTab, newLabel); - Assert.equal(newTab.label, newLabel, "The original tab label should be changed"); + Assert.equal( + newTab.label, + newLabel, + "The original tab label should be changed" + ); }, async () => { Assert.equal( diff --git a/src/zen/tests/window_sync/browser_sync_tab_open.js b/src/zen/tests/window_sync/browser_sync_tab_open.js index e92d1eebf..7dddf1834 100644 --- a/src/zen/tests/window_sync/browser_sync_tab_open.js +++ b/src/zen/tests/window_sync/browser_sync_tab_open.js @@ -9,6 +9,10 @@ add_task(async function test_SimpleTabOpen() { let otherTab = gZenWindowSync.getItemFromWindow(win, tabId); Assert.ok(otherTab, "The opened tab should be found in the synced window"); Assert.ok(newTab._zenContentsVisible, "The opened tab should be visible"); - Assert.equal(otherTab.id, tabId, "The opened tab ID should match the synced tab ID"); + Assert.equal( + otherTab.id, + tabId, + "The opened tab ID should match the synced tab ID" + ); }); }); diff --git a/src/zen/tests/window_sync/head.js b/src/zen/tests/window_sync/head.js index cc0e06b94..036d6c585 100644 --- a/src/zen/tests/window_sync/head.js +++ b/src/zen/tests/window_sync/head.js @@ -11,7 +11,7 @@ async function withNewSyncedWindow(action) { } async function runSyncAction(action, callback, type) { - await new Promise((resolve) => { + await new Promise(resolve => { window.gZenWindowSync.addSyncHandler(async function handler(aEvent) { if (aEvent.type === type) { window.gZenWindowSync.removeSyncHandler(handler); @@ -29,12 +29,14 @@ function getTabState(tab) { async function withNewTabAndWindow(action) { let newTab = null; - await withNewSyncedWindow(async (win) => { + await withNewSyncedWindow(async win => { await runSyncAction( () => { - newTab = gBrowser.addTrustedTab("https://example.com/", { inBackground: true }); + newTab = gBrowser.addTrustedTab("https://example.com/", { + inBackground: true, + }); }, - async (aEvent) => { + async aEvent => { Assert.equal(aEvent.type, "TabOpen", "Event type should be TabOpen"); await action(newTab, win); }, diff --git a/src/zen/tests/workspaces/browser_basic_workspaces.js b/src/zen/tests/workspaces/browser_basic_workspaces.js index 8c63657ae..e3ec5f6e3 100644 --- a/src/zen/tests/workspaces/browser_basic_workspaces.js +++ b/src/zen/tests/workspaces/browser_basic_workspaces.js @@ -25,7 +25,11 @@ add_task(async function test_Check_Creation() { await gZenWorkspaces.removeWorkspace(gZenWorkspaces.activeWorkspace); const workspacesAfterRemove = gZenWorkspaces.getWorkspaces(); - Assert.strictEqual(workspacesAfterRemove.workspaces.length, 1, "One workspace should exist."); + Assert.strictEqual( + workspacesAfterRemove.workspaces.length, + 1, + "One workspace should exist." + ); Assert.strictEqual( workspacesAfterRemove[0].uuid, currentWorkspaceUUID, diff --git a/src/zen/tests/workspaces/browser_change_to_empty.js b/src/zen/tests/workspaces/browser_change_to_empty.js index 0f4ca68bf..558500d33 100644 --- a/src/zen/tests/workspaces/browser_change_to_empty.js +++ b/src/zen/tests/workspaces/browser_change_to_empty.js @@ -25,6 +25,10 @@ add_task(async function test_Change_To_Empty() { ); const workspacesAfterRemove = gZenWorkspaces.getWorkspaces(); - Assert.strictEqual(workspacesAfterRemove.length, 1, "One workspace should exist."); + Assert.strictEqual( + workspacesAfterRemove.length, + 1, + "One workspace should exist." + ); Assert.strictEqual(gBrowser.tabs.length, 2, "There should be two tabs."); }); diff --git a/src/zen/tests/workspaces/browser_double_click_newtab.js b/src/zen/tests/workspaces/browser_double_click_newtab.js index 024d114f1..422ddde01 100644 --- a/src/zen/tests/workspaces/browser_double_click_newtab.js +++ b/src/zen/tests/workspaces/browser_double_click_newtab.js @@ -14,12 +14,16 @@ add_setup(async function () { }); add_task(async function test_Check_Creation() { - const placeToDoubleClick = gZenWorkspaces.activeWorkspaceElement.querySelector( - ".zen-workspace-empty-space" - ); + const placeToDoubleClick = + gZenWorkspaces.activeWorkspaceElement.querySelector( + ".zen-workspace-empty-space" + ); ok(placeToDoubleClick, "We should have found the place to double click."); EventUtils.sendMouseEvent({ type: "dblclick" }, placeToDoubleClick, window); - await TestUtils.waitForCondition(() => gBrowser.tabs.length === 3, "New tab should be opened."); + await TestUtils.waitForCondition( + () => gBrowser.tabs.length === 3, + "New tab should be opened." + ); ok(true, "New tab should be opened."); await BrowserTestUtils.removeTab(gBrowser.tabs[1]); Assert.strictEqual(gBrowser.tabs.length, 2, "There should be one tab."); diff --git a/src/zen/tests/workspaces/browser_issue_10455.js b/src/zen/tests/workspaces/browser_issue_10455.js index 7deefcee8..a4cf4115d 100644 --- a/src/zen/tests/workspaces/browser_issue_10455.js +++ b/src/zen/tests/workspaces/browser_issue_10455.js @@ -36,8 +36,15 @@ add_task(async function test_Issue_10455_Dont_Close() { ); newWindow.BrowserCommands.closeTabOrWindow(); - Assert.strictEqual(newWindow.gBrowser.tabs.length, 1, "Window should still have one tab"); - ok(newWindow.gBrowser.selectedTab.hasAttribute("zen-empty-tab"), "Tab should be a zen empty tab"); + Assert.strictEqual( + newWindow.gBrowser.tabs.length, + 1, + "Window should still have one tab" + ); + ok( + newWindow.gBrowser.selectedTab.hasAttribute("zen-empty-tab"), + "Tab should be a zen empty tab" + ); ok(!newWindow.closing, "Window should be closing"); await BrowserTestUtils.closeWindow(newWindow); diff --git a/src/zen/tests/workspaces/browser_issue_8699.js b/src/zen/tests/workspaces/browser_issue_8699.js index ae71c2a73..70e48df7b 100644 --- a/src/zen/tests/workspaces/browser_issue_8699.js +++ b/src/zen/tests/workspaces/browser_issue_8699.js @@ -26,13 +26,17 @@ add_task(async function test_Restore_Closed_Tabs() { gBrowser.removeTabs(tabsToClose); gBrowser.selectedTab = selected; await TabStateFlusher.flushWindow(window); - await new Promise((resolve) => { + await new Promise(resolve => { Assert.equal( gBrowser.selectedTab, selected, "Current tab should still be selected after closing tabs" ); - Assert.equal(gBrowser.tabs.length, 2, "There should be one tab left after closing all tabs"); + Assert.equal( + gBrowser.tabs.length, + 2, + "There should be one tab left after closing all tabs" + ); SessionWindowUI.restoreLastClosedTabOrWindowOrSession(window); ok(!selected.selected, "Current tab should not be selected after restore"); Assert.equal( @@ -42,10 +46,15 @@ add_task(async function test_Restore_Closed_Tabs() { ); resolve(); }); - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "about:blank", true, { - skipAnimation: true, - }); - for (const tab of gBrowser.tabs.filter((t) => !tabsToIgnore.includes(t))) { + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "about:blank", + true, + { + skipAnimation: true, + } + ); + for (const tab of gBrowser.tabs.filter(t => !tabsToIgnore.includes(t))) { await BrowserTestUtils.removeTab(tab); } }); diff --git a/src/zen/tests/workspaces/browser_issue_9900.js b/src/zen/tests/workspaces/browser_issue_9900.js index b0fdc3518..aca2c4a74 100644 --- a/src/zen/tests/workspaces/browser_issue_9900.js +++ b/src/zen/tests/workspaces/browser_issue_9900.js @@ -16,7 +16,11 @@ add_task(async function test_Invalid_Workspace_Emoji() { name: "👍 test test", }; const icon = gZenWorkspaces.getWorkspaceIcon(fakeWorkspace); - Assert.equal(icon, "👍", "Emoji icon should match the first character of the workspace name"); + Assert.equal( + icon, + "👍", + "Emoji icon should match the first character of the workspace name" + ); }); add_task(async function test_Invalid_Workspace_Name() { @@ -24,7 +28,11 @@ add_task(async function test_Invalid_Workspace_Name() { name: "my workspace", }; const icon = gZenWorkspaces.getWorkspaceIcon(fakeWorkspace); - Assert.equal(icon, "M", "Icon should match the first character of the workspace name"); + Assert.equal( + icon, + "M", + "Icon should match the first character of the workspace name" + ); }); add_task(async function test_Invalid_Workspace_Name() { diff --git a/src/zen/tests/workspaces/browser_overflow_scrollbox.js b/src/zen/tests/workspaces/browser_overflow_scrollbox.js index f177350ec..2d39b4a33 100644 --- a/src/zen/tests/workspaces/browser_overflow_scrollbox.js +++ b/src/zen/tests/workspaces/browser_overflow_scrollbox.js @@ -9,33 +9,56 @@ add_task(async function test_Check_ScrollBox_Overflow() { const selectedTab = gBrowser.selectedTab; const tabsToRemove = []; while (!scrollbox.overflowing) { - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); tabsToRemove.push(gBrowser.selectedTab); } // An extra tab to ensure the scrollbox is overflowing - await BrowserTestUtils.openNewForegroundTab(window.gBrowser, "https://example.com/", true); + await BrowserTestUtils.openNewForegroundTab( + window.gBrowser, + "https://example.com/", + true + ); tabsToRemove.push(gBrowser.selectedTab); - ok(scrollbox.overflowing, "The scrollbox should be overflowing after opening enough tabs"); + ok( + scrollbox.overflowing, + "The scrollbox should be overflowing after opening enough tabs" + ); - Assert.strictEqual(scrollbox.scrollPosition, 0, "The scrollbox should be scrolled to the top"); + Assert.strictEqual( + scrollbox.scrollPosition, + 0, + "The scrollbox should be scrolled to the top" + ); gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1]; - await new Promise((resolve) => { + await new Promise(resolve => { /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ setTimeout(() => { - Assert.greater(scrollbox.scrollPosition, 0, "The scrollbox should be scrolled to the bottom"); + Assert.greater( + scrollbox.scrollPosition, + 0, + "The scrollbox should be scrolled to the bottom" + ); resolve(); }, 200); }); gBrowser.selectedTab = gBrowser.visibleTabs[0]; - await new Promise((resolve) => { + await new Promise(resolve => { /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ setTimeout(() => { // TODO: Use a real scroll position check instead of a hardcoded value - Assert.less(scrollbox.scrollPosition, 60, "The scrollbox should be scrolled to the top"); + Assert.less( + scrollbox.scrollPosition, + 60, + "The scrollbox should be scrolled to the top" + ); resolve(); }, 200); }); diff --git a/src/zen/tests/workspaces/browser_private_mode_startup.js b/src/zen/tests/workspaces/browser_private_mode_startup.js index 4e0224b71..b6bad1984 100644 --- a/src/zen/tests/workspaces/browser_private_mode_startup.js +++ b/src/zen/tests/workspaces/browser_private_mode_startup.js @@ -8,7 +8,7 @@ add_task(async function test_Private_Mode_Startup() { private: true, }); await privateWindow.gZenWorkspaces.promiseInitialized; - await new Promise((resolve) => { + await new Promise(resolve => { /* eslint-disable-next-line mozilla/no-arbitrary-setTimeout */ setTimeout(() => { Assert.equal( diff --git a/src/zen/tests/workspaces/browser_workspace_bookmarks.js b/src/zen/tests/workspaces/browser_workspace_bookmarks.js index 1c83dbf42..b3c7f2749 100644 --- a/src/zen/tests/workspaces/browser_workspace_bookmarks.js +++ b/src/zen/tests/workspaces/browser_workspace_bookmarks.js @@ -19,7 +19,8 @@ function getToolbarNodeForItemGuid(aItemTitle) { } function isToolbarVisible(aToolbar) { - let hidingAttribute = aToolbar.getAttribute("type") == "menubar" ? "autohide" : "collapsed"; + let hidingAttribute = + aToolbar.getAttribute("type") == "menubar" ? "autohide" : "collapsed"; let hidingValue = aToolbar.getAttribute(hidingAttribute)?.toLowerCase(); // Check for both collapsed="true" and collapsed="collapsed" return hidingValue !== "true" && hidingValue !== hidingAttribute; @@ -27,7 +28,9 @@ function isToolbarVisible(aToolbar) { function promiseSetToolbarVisibility(aToolbar, aVisible) { if (isToolbarVisible(aToolbar) != aVisible) { - let visibilityChanged = TestUtils.waitForCondition(() => aToolbar.collapsed != aVisible); + let visibilityChanged = TestUtils.waitForCondition( + () => aToolbar.collapsed != aVisible + ); setToolbarVisibility(aToolbar, aVisible, undefined, false); return visibilityChanged; } @@ -41,14 +44,19 @@ async function changeWorkspaceForBookmark(aBookmark, aWorkspace) { false, async function openPropertiesDialog() { let placesContext = document.getElementById("placesContext"); - let promisePopup = BrowserTestUtils.waitForEvent(placesContext, "popupshown"); + let promisePopup = BrowserTestUtils.waitForEvent( + placesContext, + "popupshown" + ); EventUtils.synthesizeMouseAtCenter(toolbarNode, { button: 2, type: "contextmenu", }); await promisePopup; - let properties = document.getElementById("placesContext_show_bookmark:info"); + let properties = document.getElementById( + "placesContext_show_bookmark:info" + ); placesContext.activateItem(properties, {}); }, async function test(dialogWin) { @@ -63,7 +71,9 @@ async function changeWorkspaceForBookmark(aBookmark, aWorkspace) { openWorkspaceSelectorButton.click(); await setTimeout(() => {}, 100); - const checkbox = dialogWin.document.querySelector(`input[value="${aWorkspace.uuid}"]`); + const checkbox = dialogWin.document.querySelector( + `input[value="${aWorkspace.uuid}"]` + ); // Check the checkbox for the workspace. checkbox.click(); @@ -128,7 +138,7 @@ add_task(async function test_workspace_bookmark() { await changeWorkspaceForBookmark(bookmark1, firstWorkspace); - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise(resolve => setTimeout(resolve, 100)); const bookmark2 = await PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.toolbarGuid, title: "workspace2", @@ -138,14 +148,14 @@ add_task(async function test_workspace_bookmark() { await changeWorkspaceForBookmark(bookmark2, secondWorkspace); await gZenWorkspaces.changeWorkspace(secondWorkspace); - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise(resolve => setTimeout(resolve, 100)); const toolbarNode1 = getToolbarNodeForItemGuid(bookmark1.title); const toolbarNode2 = getToolbarNodeForItemGuid(bookmark2.title); ok(!toolbarNode1, "Bookmark1 should not be in the toolbar"); ok(toolbarNode2, "Bookmark2 should be in the toolbar"); await gZenWorkspaces.changeWorkspace(firstWorkspace); - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise(resolve => setTimeout(resolve, 100)); const toolbarNode3 = getToolbarNodeForItemGuid(bookmark1.title); const toolbarNode4 = getToolbarNodeForItemGuid(bookmark2.title); ok(toolbarNode3, "Bookmark1 should be in the toolbar"); diff --git a/src/zen/tests/workspaces/browser_workspace_unload.js b/src/zen/tests/workspaces/browser_workspace_unload.js index 7497a0ef1..ec3954962 100644 --- a/src/zen/tests/workspaces/browser_workspace_unload.js +++ b/src/zen/tests/workspaces/browser_workspace_unload.js @@ -5,7 +5,8 @@ // verify that workspace unloading works add_task(async function test_UnloadWorkspace_WithMultipleTabs() { - const workspaceId = await gZenWorkspaces.createAndSaveWorkspace("Test Workspace 1"); + const workspaceId = + await gZenWorkspaces.createAndSaveWorkspace("Test Workspace 1"); const tabs = []; for (let i = 0; i < 3; i++) { const tab = await BrowserTestUtils.openNewForegroundTab( @@ -35,7 +36,8 @@ add_task(async function test_UnloadWorkspace_WithMultipleTabs() { // verify that essential tabs are not unloaded add_task(async function test_UnloadWorkspace_WithEssentialTabs() { - const workspaceId = await gZenWorkspaces.createAndSaveWorkspace("Test Workspace 2"); + const workspaceId = + await gZenWorkspaces.createAndSaveWorkspace("Test Workspace 2"); const regularTab = await BrowserTestUtils.openNewForegroundTab( window.gBrowser, @@ -59,7 +61,10 @@ add_task(async function test_UnloadWorkspace_WithEssentialTabs() { ok(regularTab.hasAttribute("pending"), "Regular tab should be unloaded"); ok(!regularTab.linkedPanel, "Regular tab should not have linked panel"); - ok(!essentialTab.hasAttribute("pending"), "Essential tab should not be unloaded"); + ok( + !essentialTab.hasAttribute("pending"), + "Essential tab should not be unloaded" + ); ok(essentialTab.linkedPanel, "Essential tab should still have linked panel"); await gZenWorkspaces.removeWorkspace(workspaceId); @@ -70,7 +75,9 @@ add_task(async function test_UnloadWorkspace_TargetedWorkspaceIsolation() { const inActiveWorkspaceId = await gZenWorkspaces.createAndSaveWorkspace( "Test In-Active Workspace" ); - const activeWorkspaceId = await gZenWorkspaces.createAndSaveWorkspace("Test Active Workspace"); + const activeWorkspaceId = await gZenWorkspaces.createAndSaveWorkspace( + "Test Active Workspace" + ); const inActiveWorkspaceTabs = []; for (let i = 0; i < 2; i++) { @@ -99,13 +106,25 @@ add_task(async function test_UnloadWorkspace_TargetedWorkspaceIsolation() { await gZenWorkspaces.unloadWorkspace(); // this unloads the latest created workspace -> activeWorkspaceId for (const tab of activeWorkspaceTabs) { - ok(tab.hasAttribute("pending"), "Active workspace tab should be pending after unload"); - ok(!tab.linkedPanel, "Active workspace tab should not have linked panel after unload"); + ok( + tab.hasAttribute("pending"), + "Active workspace tab should be pending after unload" + ); + ok( + !tab.linkedPanel, + "Active workspace tab should not have linked panel after unload" + ); } for (const tab of inActiveWorkspaceTabs) { - ok(!tab.hasAttribute("pending"), "In-Active workspace tab should NOT be pending after unload"); - ok(tab.linkedPanel, "In-Active workspace tab should still have linked panel after unload"); + ok( + !tab.hasAttribute("pending"), + "In-Active workspace tab should NOT be pending after unload" + ); + ok( + tab.linkedPanel, + "In-Active workspace tab should still have linked panel after unload" + ); } await gZenWorkspaces.removeWorkspace(inActiveWorkspaceId); diff --git a/src/zen/tests/workspaces/head.js b/src/zen/tests/workspaces/head.js index 4f0f97f8a..d8d160c20 100644 --- a/src/zen/tests/workspaces/head.js +++ b/src/zen/tests/workspaces/head.js @@ -8,8 +8,14 @@ const TAB_STATE_NEEDS_RESTORE = 1; const TAB_STATE_RESTORING = 2; const ROOT = getRootDirectory(gTestPath); -const HTTPROOT = ROOT.replace("chrome://mochitests/content/", "https://example.com/"); -const HTTPSROOT = ROOT.replace("chrome://mochitests/content/", "https://example.com/"); +const HTTPROOT = ROOT.replace( + "chrome://mochitests/content/", + "https://example.com/" +); +const HTTPSROOT = ROOT.replace( + "chrome://mochitests/content/", + "https://example.com/" +); const { SessionSaver } = ChromeUtils.importESModule( "resource:///modules/sessionstore/SessionSaver.sys.mjs" @@ -102,13 +108,13 @@ function promiseTabState(tab, state) { } function promiseWindowRestoring(win) { - return new Promise((resolve) => + return new Promise(resolve => win.addEventListener("SSWindowRestoring", resolve, { once: true }) ); } function promiseWindowRestored(win) { - return new Promise((resolve) => + return new Promise(resolve => win.addEventListener("SSWindowRestored", resolve, { once: true }) ); } @@ -119,7 +125,11 @@ async function setBrowserState(state, win = window) { } async function setWindowState(win, state, overwrite = false) { - ss.setWindowState(win, typeof state != "string" ? JSON.stringify(state) : state, overwrite); + ss.setWindowState( + win, + typeof state != "string" ? JSON.stringify(state) : state, + overwrite + ); await promiseWindowRestored(win); } @@ -164,12 +174,13 @@ function waitForTopic(aTopic, aTimeout, aCallback) { * otherwise, it is passed |false|. */ function waitForSaveState(aCallback) { - let timeout = 100 + Services.prefs.getIntPref("browser.sessionstore.interval"); + let timeout = + 100 + Services.prefs.getIntPref("browser.sessionstore.interval"); return waitForTopic("sessionstore-state-write-complete", timeout, aCallback); } function promiseSaveState() { return new Promise((resolve, reject) => { - waitForSaveState((isSuccessful) => { + waitForSaveState(isSuccessful => { if (!isSuccessful) { reject(new Error("Save state timeout")); } else { @@ -208,7 +219,11 @@ var promiseForEachSessionRestoreFile = async function (cb) { } }; -function promiseBrowserLoaded(aBrowser, ignoreSubFrames = true, wantLoad = null) { +function promiseBrowserLoaded( + aBrowser, + ignoreSubFrames = true, + wantLoad = null +) { return BrowserTestUtils.browserLoaded(aBrowser, !ignoreSubFrames, wantLoad); } @@ -224,7 +239,7 @@ function whenWindowLoaded(aWindow, aCallback) { ); } function promiseWindowLoaded(aWindow) { - return new Promise((resolve) => whenWindowLoaded(aWindow, resolve)); + return new Promise(resolve => whenWindowLoaded(aWindow, resolve)); } var gUniqueCounter = 0; @@ -357,12 +372,12 @@ function forgetClosedTabs(win) { function forgetSavedTabGroups() { const tabGroups = ss.getSavedTabGroups(); - tabGroups.forEach((tabGroup) => ss.forgetSavedTabGroup(tabGroup.id)); + tabGroups.forEach(tabGroup => ss.forgetSavedTabGroup(tabGroup.id)); } function forgetClosedTabGroups(win) { const tabGroups = ss.getClosedTabGroups(win); - tabGroups.forEach((tabGroup) => ss.forgetClosedTabGroup(win, tabGroup.id)); + tabGroups.forEach(tabGroup => ss.forgetClosedTabGroup(win, tabGroup.id)); } /** @@ -385,10 +400,15 @@ function whenNewWindowLoaded(aOptions, aCallback) { url = "about:privatebrowsing"; } - let win = openDialog(AppConstants.BROWSER_CHROME_URL, "", "chrome,all,dialog=no" + features, url); + let win = openDialog( + AppConstants.BROWSER_CHROME_URL, + "", + "chrome,all,dialog=no" + features, + url + ); let delayedStartup = promiseDelayedStartupFinished(win); - let browserLoaded = new Promise((resolve) => { + let browserLoaded = new Promise(resolve => { if (url == "about:blank") { resolve(); return; @@ -407,7 +427,7 @@ function whenNewWindowLoaded(aOptions, aCallback) { Promise.all([delayedStartup, browserLoaded]).then(() => aCallback(win)); } function promiseNewWindowLoaded(aOptions) { - return new Promise((resolve) => whenNewWindowLoaded(aOptions, resolve)); + return new Promise(resolve => whenNewWindowLoaded(aOptions, resolve)); } /** @@ -427,7 +447,7 @@ function whenDelayedStartupFinished(aWindow, aCallback) { }, "browser-delayed-startup-finished"); } function promiseDelayedStartupFinished(aWindow) { - return new Promise((resolve) => whenDelayedStartupFinished(aWindow, resolve)); + return new Promise(resolve => whenDelayedStartupFinished(aWindow, resolve)); } function promiseTabRestored(tab) { @@ -462,7 +482,7 @@ function modifySessionStorage(browser, storageData, storageOptions = {}) { let isClearing = !keys.size; let storage = frame.sessionStorage; - return new Promise((resolve) => { + return new Promise(resolve => { docShell.chromeEventHandler.addEventListener( "MozSessionStorageChanged", function onStorageChanged(event) { @@ -504,7 +524,7 @@ function popPrefs() { function setScrollPosition(bc, x, y) { return SpecialPowers.spawn(bc, [x, y], (childX, childY) => { - return new Promise((resolve) => { + return new Promise(resolve => { content.addEventListener( "mozvisualscroll", function onScroll(event) { @@ -563,7 +583,7 @@ function setPropertyOfFormField(browserContext, selector, propName, newValue) { } function promiseOnHistoryReplaceEntry(browser) { - return new Promise((resolve) => { + return new Promise(resolve => { let sessionHistory = browser.browsingContext?.sessionHistory; if (sessionHistory) { var historyListener = { @@ -578,7 +598,10 @@ function promiseOnHistoryReplaceEntry(browser) { resolve(); }, - QueryInterface: ChromeUtils.generateQI(["nsISHistoryListener", "nsISupportsWeakReference"]), + QueryInterface: ChromeUtils.generateQI([ + "nsISHistoryListener", + "nsISupportsWeakReference", + ]), }; sessionHistory.addSHistoryListener(historyListener); @@ -622,7 +645,7 @@ function openAndCloseTab(window, url) { */ function promiseSessionStoreLoads(numberOfLoads) { let loadsSeen = 0; - return new Promise((resolve) => { + return new Promise(resolve => { Services.obs.addObserver(function obs(browser) { loadsSeen++; if (loadsSeen == numberOfLoads) { @@ -652,7 +675,11 @@ async function openTabMenuFor(tab) { let tabMenu = tab.ownerDocument.getElementById("tabContextMenu"); let tabMenuShown = BrowserTestUtils.waitForEvent(tabMenu, "popupshown"); - EventUtils.synthesizeMouseAtCenter(tab, { type: "contextmenu" }, tab.ownerGlobal); + EventUtils.synthesizeMouseAtCenter( + tab, + { type: "contextmenu" }, + tab.ownerGlobal + ); await tabMenuShown; return tabMenu; @@ -670,9 +697,9 @@ var withBookmarksDialog = async function (autoCancel, openFn, taskFn, closeFn) { isSubDialog: true, }); } else { - dialogPromise = BrowserTestUtils.domWindowOpenedAndLoaded(null, (win) => { + dialogPromise = BrowserTestUtils.domWindowOpenedAndLoaded(null, win => { return win.document.documentURI.startsWith(dialogUrl); - }).then((win) => { + }).then(win => { ok( win.location.href.startsWith(dialogUrl), "The bookmark properties dialog is open: " + win.location.href @@ -681,7 +708,7 @@ var withBookmarksDialog = async function (autoCancel, openFn, taskFn, closeFn) { return SimpleTest.promiseFocus(win).then(() => win); }); } - let dialogClosePromise = dialogPromise.then((win) => { + let dialogClosePromise = dialogPromise.then(win => { if (!hasDialogBox) { return BrowserTestUtils.domWindowClosed(win); } diff --git a/src/zen/urlbar/ZenSiteDataPanel.sys.mjs b/src/zen/urlbar/ZenSiteDataPanel.sys.mjs index 608d5a858..9bb07bf3d 100644 --- a/src/zen/urlbar/ZenSiteDataPanel.sys.mjs +++ b/src/zen/urlbar/ZenSiteDataPanel.sys.mjs @@ -34,7 +34,9 @@ export class nsZenSiteDataPanel { this.window.gUnifiedExtensions._panel = this.unifiedPanel; // Remove the old permissions dialog - this.document.getElementById("unified-extensions-panel-template")?.remove(); + this.document + .getElementById("unified-extensions-panel-template") + ?.remove(); } else { this.extensionsPanel = this.#initExtensionsPanel(); } @@ -52,7 +54,9 @@ export class nsZenSiteDataPanel { this.anchor = button.querySelector("#zen-site-data-icon-button"); this.document.getElementById("identity-icon-box").before(button); - this.extensionsPanelButton = this.document.getElementById("unified-extensions-button"); + this.extensionsPanelButton = this.document.getElementById( + "unified-extensions-button" + ); this.window.gUnifiedExtensions._button = ADDONS_BUTTONS_HIDDEN ? this.anchor : this.extensionsPanelButton; @@ -69,8 +73,12 @@ export class nsZenSiteDataPanel { #initEventListeners() { this.unifiedPanel.addEventListener("popupshowing", this); - this.document.getElementById("zen-site-data-manage-addons").addEventListener("click", this); - this.document.getElementById("zen-site-data-settings-more").addEventListener("click", this); + this.document + .getElementById("zen-site-data-manage-addons") + .addEventListener("click", this); + this.document + .getElementById("zen-site-data-settings-more") + .addEventListener("click", this); this.anchor.addEventListener("click", this); const kCommandIDs = [ "zen-site-data-header-share", @@ -126,7 +134,7 @@ export class nsZenSiteDataPanel { #initContextMenuEventListener() { const kCommands = { - context_zenClearSiteData: (event) => { + context_zenClearSiteData: event => { this.window.gIdentityHandler.clearSiteData(event); }, context_zenOpenGetAddons: () => { @@ -195,8 +203,11 @@ export class nsZenSiteDataPanel { #setSiteHeader() { { - const button = this.document.getElementById("zen-site-data-header-reader-mode"); - const urlbarButton = this.window.document.getElementById("reader-mode-button"); + const button = this.document.getElementById( + "zen-site-data-header-reader-mode" + ); + const urlbarButton = + this.window.document.getElementById("reader-mode-button"); const isActive = urlbarButton?.hasAttribute("readeractive"); const isVisible = !urlbarButton?.hidden || isActive; @@ -206,10 +217,15 @@ export class nsZenSiteDataPanel { } else { button.classList.remove("active"); } - this.document.l10n.setAttributes(button, urlbarButton?.getAttribute("data-l10n-id")); + this.document.l10n.setAttributes( + button, + urlbarButton?.getAttribute("data-l10n-id") + ); } { - const button = this.document.getElementById("zen-site-data-header-bookmark"); + const button = this.document.getElementById( + "zen-site-data-header-bookmark" + ); const isPageBookmarked = this.#currentPageIsBookmarked; if (isPageBookmarked) { @@ -253,7 +269,10 @@ export class nsZenSiteDataPanel { let identity; if (gIdentityHandler._pageExtensionPolicy) { - this.document.l10n.setAttributes(button, "zen-site-data-security-info-extension"); + this.document.l10n.setAttributes( + button, + "zen-site-data-security-info-extension" + ); identity = "extension"; } else if ( gIdentityHandler._uriHasHost && @@ -262,10 +281,16 @@ export class nsZenSiteDataPanel { !gIdentityHandler._isCertErrorPage && !gIdentityHandler._isAboutHttpsOnlyErrorPage ) { - this.document.l10n.setAttributes(button, "zen-site-data-security-info-secure"); + this.document.l10n.setAttributes( + button, + "zen-site-data-security-info-secure" + ); identity = "secure"; } else { - this.document.l10n.setAttributes(button, "zen-site-data-security-info-not-secure"); + this.document.l10n.setAttributes( + button, + "zen-site-data-security-info-not-secure" + ); identity = "not-secure"; } @@ -279,14 +304,18 @@ export class nsZenSiteDataPanel { const section = list.closest(".zen-site-data-section"); // show permission icons - let permissions = SitePermissions.getAllPermissionDetailsForBrowser(gBrowser.selectedBrowser); + let permissions = SitePermissions.getAllPermissionDetailsForBrowser( + gBrowser.selectedBrowser + ); // Don't display origin-keyed 3rdPartyStorage permissions that are covered by // site-keyed 3rdPartyFrameStorage permissions. let thirdPartyStorageSites = new Set( permissions .map(function (permission) { - let [id, key] = permission.id.split(SitePermissions.PERM_KEY_DELIMITER); + let [id, key] = permission.id.split( + SitePermissions.PERM_KEY_DELIMITER + ); if (id == "3rdPartyFrameStorage" || id == "3rdPartyStorage") { return key; } @@ -313,7 +342,7 @@ export class nsZenSiteDataPanel { this._sharingState = gBrowser.selectedTab._sharingState; if (this._sharingState?.geo) { - let geoPermission = permissions.find((perm) => perm.id === "geo"); + let geoPermission = permissions.find(perm => perm.id === "geo"); if (!geoPermission) { permissions.push({ id: "geo", @@ -325,7 +354,7 @@ export class nsZenSiteDataPanel { } if (this._sharingState?.xr) { - let xrPermission = permissions.find((perm) => perm.id === "xr"); + let xrPermission = permissions.find(perm => perm.id === "xr"); if (!xrPermission) { permissions.push({ id: "xr", @@ -344,7 +373,9 @@ export class nsZenSiteDataPanel { if (webrtcState[id]) { let found = false; for (let permission of permissions) { - let [permId] = permission.id.split(SitePermissions.PERM_KEY_DELIMITER); + let [permId] = permission.id.split( + SitePermissions.PERM_KEY_DELIMITER + ); if (permId != id || permission.state != SitePermissions.ALLOW) { continue; } @@ -374,7 +405,9 @@ export class nsZenSiteDataPanel { ) { permissions.push({ id: "site-protection", - state: gProtectionsHandler.hasException ? SitePermissions.BLOCK : SitePermissions.ALLOW, + state: gProtectionsHandler.hasException + ? SitePermissions.BLOCK + : SitePermissions.ALLOW, scope: SitePermissions.SCOPE_PERSISTENT, }); } @@ -398,7 +431,11 @@ export class nsZenSiteDataPanel { continue; } - let [item, isCrossSiteCookie] = this.#createPermissionItem(id, key, permission); + let [item, isCrossSiteCookie] = this.#createPermissionItem( + id, + key, + permission + ); if (item) { if (isCrossSiteCookie) { crossSiteCookieElements.push(item); @@ -415,7 +452,8 @@ export class nsZenSiteDataPanel { separator.after(elem); } - separator.hidden = !settingElements.length || !crossSiteCookieElements.length; + separator.hidden = + !settingElements.length || !crossSiteCookieElements.length; section.hidden = list.childElementCount < 2; // only the separator } @@ -453,10 +491,16 @@ export class nsZenSiteDataPanel { container.setAttribute("align", "center"); container.setAttribute("role", "group"); - container.setAttribute("state", permission.state == SitePermissions.ALLOW ? "allow" : "block"); + container.setAttribute( + "state", + permission.state == SitePermissions.ALLOW ? "allow" : "block" + ); let img = this.document.createXULElement("toolbarbutton"); - img.classList.add("permission-popup-permission-icon", "zen-site-data-permission-icon"); + img.classList.add( + "permission-popup-permission-icon", + "zen-site-data-permission-icon" + ); img.setAttribute("closemenu", "none"); if (this.#iconMap[id]) { img.classList.add(`zen-permission-${this.#iconMap[id]}-icon`); @@ -472,24 +516,36 @@ export class nsZenSiteDataPanel { nameLabel.setAttribute("flex", "1"); nameLabel.setAttribute("class", "permission-popup-permission-label"); if (isCrossSiteCookie) { - this.document.l10n.setAttributes(nameLabel, "zen-site-data-setting-cross-site"); + this.document.l10n.setAttributes( + nameLabel, + "zen-site-data-setting-cross-site" + ); } else { let label = SitePermissions.getPermissionLabel(permission.id); if (label) { nameLabel.textContent = label; } else { - this.document.l10n.setAttributes(nameLabel, "zen-site-data-setting-" + idNoSuffix); + this.document.l10n.setAttributes( + nameLabel, + "zen-site-data-setting-" + idNoSuffix + ); } } labelContainer.appendChild(nameLabel); let stateLabel = this.document.createXULElement("label"); - stateLabel.setAttribute("class", "zen-permission-popup-permission-state-label"); + stateLabel.setAttribute( + "class", + "zen-permission-popup-permission-state-label" + ); if (isCrossSiteCookie) { // The key should be the site for cross-site cookies. stateLabel.textContent = key; } else { - stateLabel.setAttribute("data-l10n-id", this.#getPermissionStateLabelId(permission)); + stateLabel.setAttribute( + "data-l10n-id", + this.#getPermissionStateLabelId(permission) + ); } labelContainer.appendChild(stateLabel); @@ -502,7 +558,9 @@ export class nsZenSiteDataPanel { #openGetAddons() { const { switchToTabHavingURI } = this.window; - let amoUrl = Services.urlFormatter.formatURLPref("extensions.getAddons.link.url"); + let amoUrl = Services.urlFormatter.formatURLPref( + "extensions.getAddons.link.url" + ); switchToTabHavingURI(amoUrl, true); } @@ -585,16 +643,26 @@ export class nsZenSiteDataPanel { gProtectionsHandler.enableForCurrentPage(); } } else { - SitePermissions.setForPrincipal(gBrowser.contentPrincipal, permission.id, newState); + SitePermissions.setForPrincipal( + gBrowser.contentPrincipal, + permission.id, + newState + ); } const isCrossSiteCookie = permission.id.startsWith("3rdPartyStorage"); - label.parentNode.setAttribute("state", newState == SitePermissions.ALLOW ? "allow" : "block"); + label.parentNode.setAttribute( + "state", + newState == SitePermissions.ALLOW ? "allow" : "block" + ); label._permission.state = newState; if (!isCrossSiteCookie) { label .querySelector(".zen-permission-popup-permission-state-label") - .setAttribute("data-l10n-id", this.#getPermissionStateLabelId(label._permission)); + .setAttribute( + "data-l10n-id", + this.#getPermissionStateLabelId(label._permission) + ); } } @@ -627,7 +695,9 @@ export class nsZenSiteDataPanel { if (!item) { break; } - const label = item.querySelector(".permission-popup-permission-label-container"); + const label = item.querySelector( + ".permission-popup-permission-label-container" + ); if (label?._permission) { this.#onPermissionClick(label); } @@ -659,13 +729,15 @@ export class nsZenSiteDataPanel { Services.prefs.setBoolPref(kPref, false); const { gBrowser, gZenWorkspaces } = this.window; await gZenWorkspaces.promiseInitialized; - await new Promise((resolve) => { + await new Promise(resolve => { const checkEmptyTab = () => { if (!gBrowser.selectedTab.hasAttribute("zen-empty-tab")) { resolve(); return; } - this.window.addEventListener("TabSelect", checkEmptyTab, { once: true }); + this.window.addEventListener("TabSelect", checkEmptyTab, { + once: true, + }); }; checkEmptyTab(); }); diff --git a/src/zen/urlbar/ZenUBActionsProvider.sys.mjs b/src/zen/urlbar/ZenUBActionsProvider.sys.mjs index 0f9a1a9e0..8adf50107 100644 --- a/src/zen/urlbar/ZenUBActionsProvider.sys.mjs +++ b/src/zen/urlbar/ZenUBActionsProvider.sys.mjs @@ -80,7 +80,12 @@ function payloadAndSimpleHighlights(tokens, payloadInfo) { payload[name] = valueOrValues; } } - if (!payload.title && !payload.fallbackTitle && payload.url && typeof payload.url == "string") { + if ( + !payload.title && + !payload.fallbackTitle && + payload.url && + typeof payload.url == "string" + ) { // If there's no title, show the domain as the title. Not all valid URLs // have a domain. highlightTypes.title = UrlbarUtils.HIGHLIGHT.TYPED; @@ -107,7 +112,9 @@ function payloadAndSimpleHighlights(tokens, payloadInfo) { for (let [name, highlightType] of Object.entries(highlightTypes)) { let value = payload[name]; let highlights = Array.isArray(value) - ? value.map((subval) => UrlbarUtils.getTokenMatches(tokens, subval, highlightType)) + ? value.map(subval => + UrlbarUtils.getTokenMatches(tokens, subval, highlightType) + ) : UrlbarUtils.getTokenMatches(tokens, value || "", highlightType); if (highlights.length) { payloadHighlights[name] = highlights; @@ -148,7 +155,8 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { */ async isActive(queryContext) { return ( - queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS || + queryContext.searchMode?.source == + UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS || (lazy.enabledPref && queryContext.searchString && queryContext.searchString.length < UrlbarUtils.MAX_TEXT_LENGTH && @@ -196,12 +204,14 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { } return addons .filter( - (addon) => + addon => addon.isActive && !addon.isSystem && - window.gUnifiedExtensions.browserActionFor(window.WebExtensionPolicy.getByID(addon.id)) + window.gUnifiedExtensions.browserActionFor( + window.WebExtensionPolicy.getByID(addon.id) + ) ) - .map((addon) => { + .map(addon => { return { icon: "chrome://browser/skin/zen-icons/extension.svg", label: "Extension", @@ -221,7 +231,7 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { */ async #getAvailableActions(window) { return globalActions - .filter((a) => a.isAvailable(window)) + .filter(a => a.isAvailable(window)) .concat(this.#getWorkspaceActions(window)) .concat(await this.#getExtensionActions(window)); } @@ -243,7 +253,10 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { } const label = action.extraPayload?.prettyName || action.label; const score = this.#calculateFuzzyScore(label, query); - if (score > (isPrefixed ? MINIMUM_PREFIXED_QUERY_SCORE : MINIMUM_QUERY_SCORE)) { + if ( + score > + (isPrefixed ? MINIMUM_PREFIXED_QUERY_SCORE : MINIMUM_QUERY_SCORE) + ) { results.push({ score, action, @@ -253,9 +266,9 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { results.sort((a, b) => b.score - a.score); // We must show all we can when prefixed, to avoid showing no results. if (isPrefixed) { - return results.map((r) => r.action); + return results.map(r => r.action); } - return results.slice(0, MAX_RECENT_ACTIONS).map((r) => r.action); + return results.slice(0, MAX_RECENT_ACTIONS).map(r => r.action); } /** @@ -294,10 +307,16 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { let lastMatchIndex = -1; let consecutiveMatches = 0; for (let targetIndex = 0; targetIndex < targetLen; targetIndex++) { - if (queryIndex < queryLen && targetLower[targetIndex] === queryLower[queryIndex]) { + if ( + queryIndex < queryLen && + targetLower[targetIndex] === queryLower[queryIndex] + ) { let bonus = 10; // Bonus for matching at the beginning of a word - if (targetIndex === 0 || [" ", "-", "_"].includes(targetLower[targetIndex - 1])) { + if ( + targetIndex === 0 || + [" ", "-", "_"].includes(targetLower[targetIndex - 1]) + ) { bonus += 15; } // Bonus for consecutive matches @@ -322,7 +341,8 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { async startQuery(queryContext, addCallback) { const query = queryContext.trimmedLowerCaseSearchString; - const isPrefixed = queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS; + const isPrefixed = + queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS; if (!query && !isPrefixed) { return; } @@ -341,17 +361,21 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { zenCommand: action.command, dynamicType: DYNAMIC_TYPE_NAME, zenAction: true, - query: isPrefixed ? action.label.trimStart() : queryContext.searchString, + query: isPrefixed + ? action.label.trimStart() + : queryContext.searchString, icon: action.icon, - shortcutContent: ownerGlobal.gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand( - action.command - ), + shortcutContent: + ownerGlobal.gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand( + action.command + ), keywords: action.label.split(" "), ...action.extraPayload, }); const shouldBePrioritized = - zenUrlbarResultsLearner.shouldPrioritize(action.commandId) && !isPrefixed; + zenUrlbarResultsLearner.shouldPrioritize(action.commandId) && + !isPrefixed; let result = new lazy.UrlbarResult({ type: UrlbarUtils.RESULT_TYPE.DYNAMIC, source: UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS, @@ -371,14 +395,16 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { finalResults.push(result); } let i = 0; - zenUrlbarResultsLearner.sortCommandsByPriority(finalResults).forEach((result) => { - if (isPrefixed && i === 0 && query.length > 1) { - result.heuristic = true; - delete result.suggestedIndex; - } - addCallback(this, result); - i++; - }); + zenUrlbarResultsLearner + .sortCommandsByPriority(finalResults) + .forEach(result => { + if (isPrefixed && i === 0 && query.length > 1) { + result.heuristic = true; + delete result.suggestedIndex; + } + addCallback(this, result); + i++; + }); } /** @@ -401,7 +427,8 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { getViewUpdate(result) { const prettyIconIsSvg = result.payload.prettyIcon && - (result.payload.prettyIcon.endsWith(".svg") || result.payload.prettyIcon.endsWith(".png")); + (result.payload.prettyIcon.endsWith(".svg") || + result.payload.prettyIcon.endsWith(".png")); return { icon: { attributes: { @@ -495,7 +522,9 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider { if (details?.provider === this.name) { usedCommand = details.result?.commandId; } - zenUrlbarResultsLearner.recordExecution(usedCommand, [...this.#seenCommands]); + zenUrlbarResultsLearner.recordExecution(usedCommand, [ + ...this.#seenCommands, + ]); } this.#seenCommands = new Set(); } diff --git a/src/zen/urlbar/ZenUBGlobalActions.sys.mjs b/src/zen/urlbar/ZenUBGlobalActions.sys.mjs index f8dbbb71c..607b05ada 100644 --- a/src/zen/urlbar/ZenUBGlobalActions.sys.mjs +++ b/src/zen/urlbar/ZenUBGlobalActions.sys.mjs @@ -6,7 +6,12 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {}; -XPCOMUtils.defineLazyPreferenceGetter(lazy, "currentTheme", "zen.view.window.scheme", 2); +XPCOMUtils.defineLazyPreferenceGetter( + lazy, + "currentTheme", + "zen.view.window.scheme", + 2 +); function isNotEmptyTab(window) { return !window.gBrowser.selectedTab.hasAttribute("zen-empty-tab"); @@ -40,7 +45,7 @@ const globalActionsTemplate = [ }, { label: "Settings", - command: (window) => window.openPreferences(), + command: window => window.openPreferences(), icon: "chrome://browser/skin/zen-icons/settings.svg", }, { @@ -62,7 +67,7 @@ const globalActionsTemplate = [ label: "Pin Tab", command: "cmd_zenTogglePinTab", icon: "chrome://browser/skin/zen-icons/pin.svg", - isAvailable: (window) => { + isAvailable: window => { const tab = window.gBrowser.selectedTab; return !tab.hasAttribute("zen-empty-tab") && !tab.pinned; }, @@ -71,7 +76,7 @@ const globalActionsTemplate = [ label: "Unpin Tab", command: "cmd_zenTogglePinTab", icon: "chrome://browser/skin/zen-icons/unpin.svg", - isAvailable: (window) => { + isAvailable: window => { const tab = window.gBrowser.selectedTab; return !tab.hasAttribute("zen-empty-tab") && tab.pinned; }, @@ -80,7 +85,7 @@ const globalActionsTemplate = [ label: "Next Space", command: "cmd_zenWorkspaceForward", icon: "chrome://browser/skin/zen-icons/forward.svg", - isAvailable: (window) => { + isAvailable: window => { return window.gZenWorkspaces._workspaceCache.length > 1; }, }, @@ -88,7 +93,7 @@ const globalActionsTemplate = [ label: "Previous Space", command: "cmd_zenWorkspaceBackward", icon: "chrome://browser/skin/zen-icons/back.svg", - isAvailable: (window) => { + isAvailable: window => { // This also covers the case of being in private mode return window.gZenWorkspaces._workspaceCache.length > 1; }, @@ -97,7 +102,7 @@ const globalActionsTemplate = [ label: "Close Tab", command: "cmd_close", icon: "chrome://browser/skin/zen-icons/close.svg", - isAvailable: (window) => { + isAvailable: window => { return isNotEmptyTab(window); }, }, @@ -125,7 +130,7 @@ const globalActionsTemplate = [ label: "Capture Screenshot", command: "Browser:Screenshot", icon: "chrome://browser/skin/zen-icons/screenshot.svg", - isAvailable: (window) => { + isAvailable: window => { return isNotEmptyTab(window); }, }, @@ -136,26 +141,30 @@ const globalActionsTemplate = [ }, { label: "Add to Essentials", - command: (window) => window.gZenPinnedTabManager.addToEssentials(window.gBrowser.selectedTab), - isAvailable: (window) => { + command: window => + window.gZenPinnedTabManager.addToEssentials(window.gBrowser.selectedTab), + isAvailable: window => { return ( - window.gZenPinnedTabManager.canEssentialBeAdded(window.gBrowser.selectedTab) && - !window.gBrowser.selectedTab.hasAttribute("zen-essential") + window.gZenPinnedTabManager.canEssentialBeAdded( + window.gBrowser.selectedTab + ) && !window.gBrowser.selectedTab.hasAttribute("zen-essential") ); }, icon: "chrome://browser/skin/zen-icons/essential-add.svg", }, { label: "Remove from Essentials", - command: (window) => window.gZenPinnedTabManager.removeEssentials(window.gBrowser.selectedTab), - isAvailable: (window) => window.gBrowser.selectedTab.hasAttribute("zen-essential"), + command: window => + window.gZenPinnedTabManager.removeEssentials(window.gBrowser.selectedTab), + isAvailable: window => + window.gBrowser.selectedTab.hasAttribute("zen-essential"), icon: "chrome://browser/skin/zen-icons/essential-remove.svg", }, { label: "Find in Page", command: "cmd_find", icon: "chrome://browser/skin/zen-icons/search-page.svg", - isAvailable: (window) => { + isAvailable: window => { return isNotEmptyTab(window); }, }, @@ -192,15 +201,19 @@ const globalActionsTemplate = [ label: "Print", command: "cmd_print", icon: "chrome://browser/skin/zen-icons/print.svg", - isAvailable: (window) => { + isAvailable: window => { return isNotEmptyTab(window); }, }, ]; -export const globalActions = globalActionsTemplate.map((action) => ({ - isAvailable: (window) => { - return window.document.getElementById(action.command)?.getAttribute("disabled") !== "true"; +export const globalActions = globalActionsTemplate.map(action => ({ + isAvailable: window => { + return ( + window.document + .getElementById(action.command) + ?.getAttribute("disabled") !== "true" + ); }, commandId: typeof action.command === "string" diff --git a/src/zen/urlbar/ZenUBProvider.sys.mjs b/src/zen/urlbar/ZenUBProvider.sys.mjs index 2b6210d3f..cd1d65c1e 100644 --- a/src/zen/urlbar/ZenUBProvider.sys.mjs +++ b/src/zen/urlbar/ZenUBProvider.sys.mjs @@ -7,7 +7,8 @@ import { UrlbarProvidersManager } from "moz-src:///browser/components/urlbar/Url const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { /* eslint-disable mozilla/valid-lazy */ - ZenUrlbarProviderGlobalActions: "resource:///modules/ZenUBActionsProvider.sys.mjs", + ZenUrlbarProviderGlobalActions: + "resource:///modules/ZenUBActionsProvider.sys.mjs", }); export function registerZenUrlbarProviders() { diff --git a/src/zen/urlbar/ZenUBResultsLearner.sys.mjs b/src/zen/urlbar/ZenUBResultsLearner.sys.mjs index 473503085..c4d92fe85 100644 --- a/src/zen/urlbar/ZenUBResultsLearner.sys.mjs +++ b/src/zen/urlbar/ZenUBResultsLearner.sys.mjs @@ -111,7 +111,9 @@ class ZenUrlbarResultsLearner { */ sortCommandsByPriority(commands) { const db = this.database; - return commands.sort((a, b) => (db[b.commandId] || 0) - (db[a.commandId] || 0)); + return commands.sort( + (a, b) => (db[b.commandId] || 0) - (db[a.commandId] || 0) + ); } } diff --git a/src/zen/welcome/ZenWelcome.mjs b/src/zen/welcome/ZenWelcome.mjs index ebe9ae990..59806986b 100644 --- a/src/zen/welcome/ZenWelcome.mjs +++ b/src/zen/welcome/ZenWelcome.mjs @@ -5,7 +5,10 @@ { let _tabsToPinEssentials = []; - const kZenElementsToIgnore = ["zen-browser-background", "zen-toast-container"]; + const kZenElementsToIgnore = [ + "zen-browser-background", + "zen-toast-container", + ]; function clearBrowserElements() { for (const element of document.getElementById("browser").children) { @@ -63,7 +66,7 @@ } const blob = await response.blob(); const reader = new FileReader(); - const data = await new Promise((resolve) => { + const data = await new Promise(resolve => { reader.onloadend = () => { const base64Data = reader.result.split(",")[1]; _iconToData[iconURL] = `data:${blob.type};base64,${base64Data}`; @@ -89,12 +92,19 @@ document.getElementById("zen-welcome-pages").style.display = "flex"; document.getElementById("zen-welcome-start").remove(); window.maximize(); - animate("#zen-welcome-pages", { opacity: [0, 1] }, { delay: 0.2, duration: 0.1 }); + animate( + "#zen-welcome-pages", + { opacity: [0, 1] }, + { delay: 0.2, duration: 0.1 } + ); } async fadeInTitles(page) { - const [title1, description1, description2] = await document.l10n.formatValues(page.text); - const titleElement = document.getElementById("zen-welcome-page-sidebar-content"); + const [title1, description1, description2] = + await document.l10n.formatValues(page.text); + const titleElement = document.getElementById( + "zen-welcome-page-sidebar-content" + ); /* eslint-disable no-unsanitized/property */ titleElement.innerHTML = `${title1}${description1}` + @@ -111,7 +121,9 @@ } async fadeInButtons(page) { - const buttons = document.getElementById("zen-welcome-page-sidebar-buttons"); + const buttons = document.getElementById( + "zen-welcome-page-sidebar-buttons" + ); let i = 0; const insertedButtons = []; for (const button of page.buttons) { @@ -167,8 +179,10 @@ delay: getMotion().stagger(0.1, { startDelay: 0.4 }), } ); - document.getElementById("zen-welcome-page-sidebar-buttons").innerHTML = ""; - document.getElementById("zen-welcome-page-sidebar-content").innerHTML = ""; + document.getElementById("zen-welcome-page-sidebar-buttons").innerHTML = + ""; + document.getElementById("zen-welcome-page-sidebar-content").innerHTML = + ""; } async fadeOutTitles() { @@ -213,7 +227,10 @@ this.finish(); return; } - await Promise.all([this.fadeInTitles(currentPage), this.fadeInButtons(currentPage)]); + await Promise.all([ + this.fadeInTitles(currentPage), + this.fadeInButtons(currentPage), + ]); await currentPage.fadeIn(); await this.fadeInContent(); } @@ -221,7 +238,11 @@ async finish() { _iconToData = undefined; // Unload icon data gZenWorkspaces.reorganizeTabsAfterWelcome(); - await animate("#zen-welcome-page-content", { x: [0, "100%"] }, { bounce: 0 }); + await animate( + "#zen-welcome-page-content", + { x: [0, "100%"] }, + { bounce: 0 } + ); document.getElementById("zen-welcome-page-content").remove(); await this.animHeart(); await this.#pinRemainingTabs(); @@ -236,8 +257,12 @@ element.style.removeProperty("display"); } gZenUIManager.updateTabsToolbar(); - let elementsToIgnore = kZenElementsToIgnore.map((id) => `#${id}`).join(", "); - await animate(`#browser > *:not(${elementsToIgnore})`, { opacity: [0, 1] }); + let elementsToIgnore = kZenElementsToIgnore + .map(id => `#${id}`) + .join(", "); + await animate(`#browser > *:not(${elementsToIgnore})`, { + opacity: [0, 1], + }); gZenUIManager.showToast("zen-welcome-finished"); } @@ -290,7 +315,7 @@ getEngines() { return this._engines.filter( - (engine) => + engine => !( engine.name.toLowerCase().includes("wikipedia") || engine.name.toLowerCase().includes("ebay") @@ -310,7 +335,7 @@ } getEngineByName(aName) { - return this._engines.find((engine) => engine.name == aName); + return this._engines.find(engine => engine.name == aName); } _cloneEngine(aEngine) { @@ -359,8 +384,12 @@ MigrationUtils.showMigrationWizard(window, { isStartupMigration: true, }); - document.querySelector("#zen-welcome-page-sidebar-buttons button").remove(); - const newButton = document.querySelector("#zen-welcome-page-sidebar-buttons button"); + document + .querySelector("#zen-welcome-page-sidebar-buttons button") + .remove(); + const newButton = document.querySelector( + "#zen-welcome-page-sidebar-buttons button" + ); newButton.classList.add("primary"); document.l10n.setAttributes(newButton, "zen-generic-next"); return false; @@ -385,7 +414,9 @@ `; const fragment = window.MozXULElement.parseXULToFragment(xul); - document.getElementById("zen-welcome-page-content").appendChild(fragment); + document + .getElementById("zen-welcome-page-content") + .appendChild(fragment); }, async fadeOut() { const shouldSetDefault = document.getElementById( @@ -431,7 +462,7 @@ const defaultEngine = await Services.search.getDefault(); const promises = []; - engineStore.getEngines().forEach((engine) => { + engineStore.getEngines().forEach(engine => { const label = document.createElement("label"); const engineId = engine.name.replace(/\s+/g, "-").toLowerCase(); label.setAttribute("for", engineId); @@ -449,7 +480,10 @@ const icon = document.createElement("img"); promises.push( (async () => { - icon.setAttribute("src", await engine.originalEngine.getIconURL()); + icon.setAttribute( + "src", + await engine.originalEngine.getIconURL() + ); })() ); icon.setAttribute("width", "32"); @@ -468,7 +502,9 @@ await Promise.all(promises); }, async fadeOut() { - document.getElementById("zen-welcome-page-content").removeAttribute("select-engine"); + document + .getElementById("zen-welcome-page-content") + .removeAttribute("select-engine"); }, }, { @@ -553,10 +589,14 @@ `; const fragment = window.MozXULElement.parseXULToFragment(xul); - document.getElementById("zen-welcome-page-content").appendChild(fragment); document - .getElementById("zen-welcome-initial-essentials-browser-sidebar-essentials") - .addEventListener("click", async (event) => { + .getElementById("zen-welcome-page-content") + .appendChild(fragment); + document + .getElementById( + "zen-welcome-initial-essentials-browser-sidebar-essentials" + ) + .addEventListener("click", async event => { const tab = event.target.closest(".tabbrowser-tab"); if (!tab) { return; @@ -566,12 +606,14 @@ }, async fadeOut() { const selectedTabs = document - .getElementById("zen-welcome-initial-essentials-browser-sidebar-essentials") + .getElementById( + "zen-welcome-initial-essentials-browser-sidebar-essentials" + ) .querySelectorAll(".tabbrowser-tab[visuallyselected]"); if (selectedTabs.length) { await PlacesUtils.history.insertMany( - [...selectedTabs].map((tab) => ({ + [...selectedTabs].map(tab => ({ url: tab.getAttribute("data-url"), visits: [ { @@ -591,9 +633,13 @@ inBackground: true, createLazyBrowser: true, }); - let essentialIconUrl = tab.style.getPropertyValue("--zen-essential-tab-icon"); + let essentialIconUrl = tab.style.getPropertyValue( + "--zen-essential-tab-icon" + ); // Remove url() from the icon URL - essentialIconUrl = essentialIconUrl.replace(/url\(['"]?/, "").replace(/['"]?\)/, ""); + essentialIconUrl = essentialIconUrl + .replace(/url\(['"]?/, "") + .replace(/['"]?\)/, ""); essentialIconUrl = await getIconData(essentialIconUrl); // Update the persistent tab state cache with |tabData| information. TabStateCache.update(createdTab.linkedBrowser.permanentKey, { @@ -625,7 +671,9 @@ fadeIn() { const anchor = document.createElement("div"); anchor.id = "zen-welcome-workspace-colors-anchor"; - document.getElementById("zen-welcome-page-content").appendChild(anchor); + document + .getElementById("zen-welcome-page-content") + .appendChild(anchor); gZenThemePicker.panel.setAttribute("noautohide", "true"); gZenThemePicker.panel.setAttribute("consumeoutsideclicks", "false"); gZenThemePicker.panel.setAttribute("nonnativepopover", "true"); diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index 78d1c7961..885141ae6 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -11,7 +11,7 @@ function parseSinePath(pathStr) { return points; } - commands.forEach((command) => { + commands.forEach(command => { const type = command.charAt(0); const coordsStr = command.slice(1).trim(); const coords = coordsStr.split(/[\s,]+/).map(Number); @@ -46,11 +46,15 @@ function parseSinePath(pathStr) { const lazy = {}; ChromeUtils.defineLazyGetter(lazy, "MAX_OPACITY", () => { - return parseFloat(document.getElementById("PanelUI-zen-gradient-generator-opacity").max); + return parseFloat( + document.getElementById("PanelUI-zen-gradient-generator-opacity").max + ); }); ChromeUtils.defineLazyGetter(lazy, "MIN_OPACITY", () => { - return parseFloat(document.getElementById("PanelUI-zen-gradient-generator-opacity").min); + return parseFloat( + document.getElementById("PanelUI-zen-gradient-generator-opacity").min + ); }); ChromeUtils.defineLazyGetter(lazy, "browserBackgroundElement", () => { @@ -76,7 +80,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { useAlgo = ""; #currentLightness = 50; - #allowTransparencyOnSidebar = Services.prefs.getBoolPref("zen.theme.acrylic-elements", false); + #allowTransparencyOnSidebar = Services.prefs.getBoolPref( + "zen.theme.acrylic-elements", + false + ); #linePath = `M 51.373 27.395 L 367.037 27.395`; #sinePath = `M 51.373 27.395 C 60.14 -8.503 68.906 -8.503 77.671 27.395 C 86.438 63.293 95.205 63.293 103.971 27.395 C 112.738 -8.503 121.504 -8.503 130.271 27.395 C 139.037 63.293 147.803 63.293 156.57 27.395 C 165.335 -8.503 174.101 -8.503 182.868 27.395 C 191.634 63.293 200.4 63.293 209.167 27.395 C 217.933 -8.503 226.7 -8.503 235.467 27.395 C 244.233 63.293 252.999 63.293 261.765 27.395 C 270.531 -8.503 279.297 -8.503 288.064 27.395 C 296.83 63.293 305.596 63.293 314.363 27.395 C 323.13 -8.503 331.896 -8.503 340.662 27.395 M 314.438 27.395 C 323.204 -8.503 331.97 -8.503 340.737 27.395 C 349.503 63.293 358.27 63.293 367.037 27.395`; @@ -88,20 +95,26 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { constructor() { super(); - if (!gZenWorkspaces.shouldHaveWorkspaces || gZenWorkspaces.privateWindowOrDisabled) { + if ( + !gZenWorkspaces.shouldHaveWorkspaces || + gZenWorkspaces.privateWindowOrDisabled + ) { return; } - this.promiseInitialized = new Promise((resolve) => { + this.promiseInitialized = new Promise(resolve => { this._resolveInitialized = resolve; }); this.dragStartPosition = null; - this.isLegacyVersion = Services.prefs.getIntPref("zen.theme.gradient-legacy-version", 1) === 0; + this.isLegacyVersion = + Services.prefs.getIntPref("zen.theme.gradient-legacy-version", 1) === 0; ChromeUtils.defineLazyGetter(this, "panel", () => document.getElementById("PanelUI-zen-gradient-generator") ); - ChromeUtils.defineLazyGetter(this, "toolbox", () => document.getElementById("TabsToolbar")); + ChromeUtils.defineLazyGetter(this, "toolbox", () => + document.getElementById("TabsToolbar") + ); ChromeUtils.defineLazyGetter(this, "customColorInput", () => document.getElementById("PanelUI-zen-gradient-generator-custom-input") ); @@ -110,11 +123,19 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { ); ChromeUtils.defineLazyGetter(this, "sliderWavePath", () => - document.getElementById("PanelUI-zen-gradient-slider-wave").querySelector("path") + document + .getElementById("PanelUI-zen-gradient-slider-wave") + .querySelector("path") ); - this.panel.addEventListener("popupshowing", this.handlePanelOpen.bind(this)); - this.panel.addEventListener("popuphidden", this.handlePanelClose.bind(this)); + this.panel.addEventListener( + "popupshowing", + this.handlePanelOpen.bind(this) + ); + this.panel.addEventListener( + "popuphidden", + this.handlePanelClose.bind(this) + ); this.panel.addEventListener("command", this.handlePanelCommand.bind(this)); document @@ -134,7 +155,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { this.initColorPages(); const darkModeChange = this.handleDarkModeChange.bind(this); - window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", darkModeChange); + window + .matchMedia("(prefers-color-scheme: dark)") + .addEventListener("change", darkModeChange); XPCOMUtils.defineLazyPreferenceGetter( this, @@ -144,7 +167,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { darkModeChange ); - XPCOMUtils.defineLazyPreferenceGetter(this, "darkModeBias", "zen.theme.dark-mode-bias", "0.5"); + XPCOMUtils.defineLazyPreferenceGetter( + this, + "darkModeBias", + "zen.theme.dark-mode-bias", + "0.5" + ); } handleDarkModeChange() { @@ -199,7 +227,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } initCustomColorInput() { - this.customColorInput.addEventListener("change", (event) => { + this.customColorInput.addEventListener("change", event => { // Prevent the popup from closing when the input is focused this.openThemePicker(event); }); @@ -208,7 +236,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { initPredefinedColors() { document .getElementById("PanelUI-zen-gradient-generator-color-pages") - .addEventListener("click", async (event) => { + .addEventListener("click", async event => { const target = event.target; const rawPosition = target.getAttribute("data-position"); if (!rawPosition) { @@ -223,9 +251,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } this.dots = this.dots.slice(0, numDots); } - const type = target.getAttribute("data-type") || EXPLICIT_LIGHTNESS_TYPE; + const type = + target.getAttribute("data-type") || EXPLICIT_LIGHTNESS_TYPE; // Generate new gradient from the single color given - const [x, y] = rawPosition.split(",").map((pos) => parseInt(pos)); + const [x, y] = rawPosition.split(",").map(pos => parseInt(pos)); let dots = [ { ID: 0, @@ -252,40 +281,53 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } initColorPages() { - const leftButton = document.getElementById("PanelUI-zen-gradient-generator-color-page-left"); - const rightButton = document.getElementById("PanelUI-zen-gradient-generator-color-page-right"); - const pagesWrapper = document.getElementById("PanelUI-zen-gradient-generator-color-pages"); + const leftButton = document.getElementById( + "PanelUI-zen-gradient-generator-color-page-left" + ); + const rightButton = document.getElementById( + "PanelUI-zen-gradient-generator-color-page-right" + ); + const pagesWrapper = document.getElementById( + "PanelUI-zen-gradient-generator-color-pages" + ); const pages = pagesWrapper.children; - pagesWrapper.addEventListener("wheel", (event) => { + pagesWrapper.addEventListener("wheel", event => { event.preventDefault(); event.stopPropagation(); }); leftButton.addEventListener("command", () => { this.#colorPage = (this.#colorPage - 1 + pages.length) % pages.length; // Scroll to the next page, by using scrollLeft - pagesWrapper.scrollLeft = (this.#colorPage * pagesWrapper.scrollWidth) / pages.length; + pagesWrapper.scrollLeft = + (this.#colorPage * pagesWrapper.scrollWidth) / pages.length; rightButton.disabled = false; leftButton.disabled = this.#colorPage === 0; }); rightButton.addEventListener("command", () => { this.#colorPage = (this.#colorPage + 1) % pages.length; // Scroll to the next page, by using scrollLeft - pagesWrapper.scrollLeft = (this.#colorPage * pagesWrapper.scrollWidth) / pages.length; + pagesWrapper.scrollLeft = + (this.#colorPage * pagesWrapper.scrollWidth) / pages.length; leftButton.disabled = false; rightButton.disabled = this.#colorPage === pages.length - 1; }); } initSchemeButtons() { - const buttons = document.getElementById("PanelUI-zen-gradient-generator-scheme"); - buttons.addEventListener("click", (event) => { + const buttons = document.getElementById( + "PanelUI-zen-gradient-generator-scheme" + ); + buttons.addEventListener("click", event => { const target = event.target.closest(".subviewbutton"); if (!target) { return; } event.preventDefault(); event.stopPropagation(); - const scheme = target.id.replace("PanelUI-zen-gradient-generator-scheme-", ""); + const scheme = target.id.replace( + "PanelUI-zen-gradient-generator-scheme-", + "" + ); if (!scheme) { return; } @@ -302,8 +344,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } initTextureInput() { - const wrapper = document.getElementById("PanelUI-zen-gradient-generator-texture-wrapper"); - const wrapperWidth = window.windowUtils.getBoundsWithoutFlushing(wrapper).width; + const wrapper = document.getElementById( + "PanelUI-zen-gradient-generator-texture-wrapper" + ); + const wrapperWidth = + window.windowUtils.getBoundsWithoutFlushing(wrapper).width; // Add elements in a circular pattern, where the center is the center of the wrapper for (let i = 0; i < 16; i++) { const dot = document.createElement("div"); @@ -315,7 +360,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } this._textureHandler = document.createElement("div"); this._textureHandler.id = "PanelUI-zen-gradient-generator-texture-handler"; - this._textureHandler.addEventListener("mousedown", this.onTextureHandlerMouseDown.bind(this)); + this._textureHandler.addEventListener( + "mousedown", + this.onTextureHandlerMouseDown.bind(this) + ); wrapper.appendChild(this._textureHandler); } @@ -329,7 +377,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { onTextureMouseMove(event) { event.preventDefault(); - const wrapper = document.getElementById("PanelUI-zen-gradient-generator-texture-wrapper"); + const wrapper = document.getElementById( + "PanelUI-zen-gradient-generator-texture-wrapper" + ); const wrapperRect = window.windowUtils.getBoundsWithoutFlushing(wrapper); // Determine how much rotation there is based on the mouse position and the center of the wrapper const rotation = Math.atan2( @@ -471,8 +521,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const [hue, saturation] = this.rgbToHsl(r, g, b); const angle = (hue / 360) * 2 * Math.PI; // Convert to radians const normalizedSaturation = saturation / 100; // Convert to [0, 1] - const x = centerX + radius * normalizedSaturation * Math.cos(angle) - padding; - const y = centerY + radius * normalizedSaturation * Math.sin(angle) - padding; + const x = + centerX + radius * normalizedSaturation * Math.cos(angle) - padding; + const y = + centerY + radius * normalizedSaturation * Math.sin(angle) - padding; return { x, y }; } @@ -510,7 +562,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { saturation = 0; lightness = Math.round((1 - normalizedDistance) * 100); } - const [r, g, b] = this.hslToRgb(hue / 360, saturation / 100, lightness / 100); + const [r, g, b] = this.hslToRgb( + hue / 360, + saturation / 100, + lightness / 100 + ); return [ Math.min(255, Math.max(0, r)), Math.min(255, Math.max(0, g)), @@ -537,7 +593,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { dot.style.opacity = 0; dot.style.setProperty("--zen-theme-picker-dot-color", color.c); } else { - const { x, y } = color.position || this.calculateInitialPosition([r, g, b]); + const { x, y } = + color.position || this.calculateInitialPosition([r, g, b]); const dotPad = this.panel.querySelector(".zen-theme-picker-gradient"); dot.classList.add("zen-theme-picker-dot"); @@ -552,7 +609,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { dotPad.appendChild(dot); let id = this.dots.length; - dot.style.setProperty("--zen-theme-picker-dot-color", `rgb(${r}, ${g}, ${b})`); + dot.style.setProperty( + "--zen-theme-picker-dot-color", + `rgb(${r}, ${g}, ${b})` + ); dot.setAttribute("data-position", this.getJSONPos(x, y)); dot.setAttribute("data-type", color.type); @@ -577,11 +637,15 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { `); - listItems.querySelector(".zen-theme-picker-custom-list-item").setAttribute("data-color", color); + listItems + .querySelector(".zen-theme-picker-custom-list-item") + .setAttribute("data-color", color); listItems .querySelector(".zen-theme-picker-dot") .style.setProperty("--zen-theme-picker-dot-color", color); - listItems.querySelector(".zen-theme-picker-custom-list-item-label").textContent = color; + listItems.querySelector( + ".zen-theme-picker-custom-list-item-label" + ).textContent = color; listItems .querySelector(".zen-theme-picker-custom-list-item-remove") .addEventListener("command", this.removeCustomColor.bind(this)); @@ -597,7 +661,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } let colorOpacity = - document.getElementById("PanelUI-zen-gradient-generator-custom-opacity")?.value ?? 1; + document.getElementById("PanelUI-zen-gradient-generator-custom-opacity") + ?.value ?? 1; // Convert the opacity into a hex value if it's not already if (colorOpacity < 1) { // e.g. if opacity is 1, we add to the color FF, if it's 0.5 we add 80, etc. @@ -624,9 +689,13 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { dot.classList.add("zen-theme-picker-dot", "hidden", "custom"); dot.style.opacity = 0; dot.style.setProperty("--zen-theme-picker-dot-color", color); - this.panel.querySelector("#PanelUI-zen-gradient-generator-custom-list").prepend(dot); + this.panel + .querySelector("#PanelUI-zen-gradient-generator-custom-list") + .prepend(dot); this.customColorInput.value = ""; - document.getElementById("PanelUI-zen-gradient-generator-custom-opacity").value = 1; + document.getElementById( + "PanelUI-zen-gradient-generator-custom-opacity" + ).value = 1; this.updateCurrentWorkspace(); } @@ -663,7 +732,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { id = 0; dot.classList.add("primary"); - const existingPrimaryDot = this.dots.find((d) => d.ID === 0); + const existingPrimaryDot = this.dots.find(d => d.ID === 0); if (existingPrimaryDot) { existingPrimaryDot.ID = this.dots.length; existingPrimaryDot.element.classList.remove("primary"); @@ -679,7 +748,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { "--zen-theme-picker-dot-color", `rgb(${colorFromPos[0]}, ${colorFromPos[1]}, ${colorFromPos[2]})` ); - dot.setAttribute("data-position", this.getJSONPos(relativePosition.x, relativePosition.y)); + dot.setAttribute( + "data-position", + this.getJSONPos(relativePosition.x, relativePosition.y) + ); dot.setAttribute("data-type", dotData.type); this.dots.push({ @@ -701,20 +773,24 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { /* eslint-disable no-shadow */ function getColorHarmonyType(numDots, dots) { if (useHarmony !== "") { - const selectedHarmony = colorHarmonies.find((harmony) => harmony.type === useHarmony); + const selectedHarmony = colorHarmonies.find( + harmony => harmony.type === useHarmony + ); if (selectedHarmony) { if (action === "remove") { if (dots.length !== 0) { return colorHarmonies.find( - (harmony) => harmony.angles.length === selectedHarmony.angles.length - 1 + harmony => + harmony.angles.length === selectedHarmony.angles.length - 1 ); } return { type: "floating", angles: [] }; } if (action === "add") { return colorHarmonies.find( - (harmony) => harmony.angles.length === selectedHarmony.angles.length + 1 + harmony => + harmony.angles.length === selectedHarmony.angles.length + 1 ); } if (action === "update") { @@ -724,19 +800,19 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } if (action === "remove") { - let harmony = colorHarmonies.find((h) => h.angles.length === numDots); + let harmony = colorHarmonies.find(h => h.angles.length === numDots); // If we are coming from 3 analogous dots, we should now go to singleAnalogous if // there are 2 dots left if (harmony.type === "analogous" && numDots === 1) { - harmony = colorHarmonies.find((h) => h.type === "singleAnalogous"); + harmony = colorHarmonies.find(h => h.type === "singleAnalogous"); } return harmony; } if (action === "add") { - return colorHarmonies.find((h) => h.angles.length + 1 === numDots); + return colorHarmonies.find(h => h.angles.length + 1 === numDots); } if (action === "update") { - return colorHarmonies.find((h) => h.angles.length + 1 === numDots); + return colorHarmonies.find(h => h.angles.length + 1 === numDots); } return null; } @@ -771,7 +847,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { return dots; } - let primaryDot = dots.find((dot) => dot.ID === 0); + let primaryDot = dots.find(dot => dot.ID === 0); if (!primaryDot) { return []; } @@ -822,8 +898,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { Services.prefs.setIntPref("zen.theme.gradient-legacy-version", 1); } - colorPositions.forEach((dotPosition) => { - const existingDot = this.dots.find((dot) => dot.ID === dotPosition.ID); + colorPositions.forEach(dotPosition => { + const existingDot = this.dots.find(dot => dot.ID === dotPosition.ID); if (existingDot) { existingDot.type = dotPosition.type; @@ -849,7 +925,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { existingDot.element, { left: existingDot.element.style.left - ? [existingDot.element.style.left, `${dotPosition.position.x}px`] + ? [ + existingDot.element.style.left, + `${dotPosition.position.x}px`, + ] : `${dotPosition.position.x}px`, top: existingDot.element.style.top ? [existingDot.element.style.top, `${dotPosition.position.y}px`] @@ -887,7 +966,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { if (this.dots.length >= nsZenThemePicker.MAX_DOTS) { return; } - let colorPositions = this.calculateCompliments(this.dots, "add", this.useAlgo); + let colorPositions = this.calculateCompliments( + this.dots, + "add", + this.useAlgo + ); this.handleColorPositions(colorPositions); this.updateCurrentWorkspace(); @@ -914,17 +997,28 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { this.handleColorPositions(colorPositions); this.updateCurrentWorkspace(); return; - } else if (target.id === "PanelUI-zen-gradient-generator-color-toggle-algo") { + } else if ( + target.id === "PanelUI-zen-gradient-generator-color-toggle-algo" + ) { const applicableHarmonies = this.colorHarmonies.filter( - (harmony) => harmony.angles.length + 1 === this.dots.length + harmony => harmony.angles.length + 1 === this.dots.length ); - let currentIndex = applicableHarmonies.findIndex((harmony) => harmony.type === this.useAlgo); + let currentIndex = applicableHarmonies.findIndex( + harmony => harmony.type === this.useAlgo + ); - const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % applicableHarmonies.length; + const nextIndex = + currentIndex === -1 + ? 0 + : (currentIndex + 1) % applicableHarmonies.length; this.useAlgo = applicableHarmonies[nextIndex].type; - let colorPositions = this.calculateCompliments(this.dots, "update", this.useAlgo); + let colorPositions = this.calculateCompliments( + this.dots, + "update", + this.useAlgo + ); this.handleColorPositions(colorPositions); this.updateCurrentWorkspace(); return; @@ -946,9 +1040,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const clickedElement = event.target; let clickedDot = null; - const existingPrimaryDot = this.dots.find((d) => d.ID === 0); + const existingPrimaryDot = this.dots.find(d => d.ID === 0); - clickedDot = this.dots.find((dot) => dot.element === clickedElement); + clickedDot = this.dots.find(dot => dot.element === clickedElement); if (clickedDot) { // TODO: this doesnt work and needs to be fixed @@ -956,12 +1050,18 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { clickedDot.ID = 0; clickedDot.element.style.zIndex = 999; - let colorPositions = this.calculateCompliments(this.dots, "update", this.useAlgo); + let colorPositions = this.calculateCompliments( + this.dots, + "update", + this.useAlgo + ); this.handleColorPositions(colorPositions); return; } - const distance = Math.sqrt((pixelX - centerX) ** 2 + (pixelY - centerY) ** 2); + const distance = Math.sqrt( + (pixelX - centerX) ** 2 + (pixelY - centerY) ** 2 + ); if (distance > radius) { const angle = Math.atan2(pixelY - centerY, pixelX - centerX); pixelX = centerX + Math.cos(angle) * radius; @@ -981,7 +1081,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { y: relativeY, }; - let colorPositions = this.calculateCompliments(this.dots, "update", this.useAlgo); + let colorPositions = this.calculateCompliments( + this.dots, + "update", + this.useAlgo + ); this.handleColorPositions(colorPositions); this.updateCurrentWorkspace(true); @@ -1004,7 +1108,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { if (event.button === 2) { return; } - const draggedDot = this.dots.find((dot) => dot.element === event.target); + const draggedDot = this.dots.find(dot => dot.element === event.target); if (draggedDot) { event.preventDefault(); this.dragging = true; @@ -1027,7 +1131,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { if (!event.target.classList.contains("zen-theme-picker-dot")) { return; } - this.dots = this.dots.filter((dot) => dot.element !== event.target); + this.dots = this.dots.filter(dot => dot.element !== event.target); event.target.remove(); this.dots.sort((a, b) => a.ID - b.ID); @@ -1067,7 +1171,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { onDotMouseMove(event) { if (this.dragging) { event.preventDefault(); - const rect = window.windowUtils.getBoundsWithoutFlushing(this.panel.querySelector(".zen-theme-picker-gradient")); + const rect = window.windowUtils.getBoundsWithoutFlushing( + this.panel.querySelector(".zen-theme-picker-gradient") + ); const padding = 0; // each side // do NOT let the ball be draged outside of an imaginary circle. You can drag it anywhere inside the circle // if the distance between the center of the circle and the dragged ball is bigger than the radius, then the ball @@ -1078,7 +1184,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const radius = (rect.width - padding) / 2; let pixelX = event.clientX; let pixelY = event.clientY; - const distance = Math.sqrt((pixelX - centerX) ** 2 + (pixelY - centerY) ** 2); + const distance = Math.sqrt( + (pixelX - centerX) ** 2 + (pixelY - centerY) ** 2 + ); if (distance > radius) { const angle = Math.atan2(pixelY - centerY, pixelX - centerX); pixelX = centerX + Math.cos(angle) * radius; @@ -1089,14 +1197,18 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const relativeX = pixelX - rect.left; const relativeY = pixelY - rect.top; - const draggedDot = this.dots.find((dot) => dot.element === this.draggedDot); + const draggedDot = this.dots.find(dot => dot.element === this.draggedDot); draggedDot.element.style.left = `${relativeX}px`; draggedDot.element.style.top = `${relativeY}px`; draggedDot.position = { x: relativeX, y: relativeY, }; - let colorPositions = this.calculateCompliments(this.dots, "update", this.useAlgo); + let colorPositions = this.calculateCompliments( + this.dots, + "update", + this.useAlgo + ); this.handleColorPositions(colorPositions); this.updateCurrentWorkspace(); @@ -1154,7 +1266,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { if (colorToBlend) { const blendedAlpha = Math.min( 1, - opacity + lazy.MIN_OPACITY + colorToBlendOpacity * (1 - (opacity + lazy.MIN_OPACITY)) + opacity + + lazy.MIN_OPACITY + + colorToBlendOpacity * (1 - (opacity + lazy.MIN_OPACITY)) ); baseColor = this.blendColors(baseColor, colorToBlend, blendedAlpha * 100); if (AppConstants.platform !== "macosx") { @@ -1192,7 +1306,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { luminance([r, g, b]) { // These magic numbers are extracted from the wikipedia article on relative luminance // https://en.wikipedia.org/wiki/Relative_luminance - var a = [r, g, b].map((v) => { + var a = [r, g, b].map(v => { v /= 255; return v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4); }); @@ -1234,9 +1348,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { return this.getSingleRGBColor(themedColors[0], forToolbar); } // If there are custom colors, we just return a linear gradient with all colors - if (themedColors.find((color) => color.isCustom)) { + if (themedColors.find(color => color.isCustom)) { // Just return a linear gradient with all colors - const gradientColors = themedColors.map((color) => this.getSingleRGBColor(color, forToolbar)); + const gradientColors = themedColors.map(color => + this.getSingleRGBColor(color, forToolbar) + ); // Divide all colors evenly in the gradient const colorStops = gradientColors .map((color, index) => { @@ -1295,8 +1411,16 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } // Composite text color over background - darkText = this.blendColors(bg, darkText.slice(0, 3), (1 - darkText[3]) * 100); - lightText = this.blendColors(bg, lightText.slice(0, 3), (1 - lightText[3]) * 100); + darkText = this.blendColors( + bg, + darkText.slice(0, 3), + (1 - darkText[3]) * 100 + ); + lightText = this.blendColors( + bg, + lightText.slice(0, 3), + (1 - lightText[3]) * 100 + ); const darkContrast = this.contrastRatio(bg, darkText); const lightContrast = this.contrastRatio(bg, lightText); @@ -1307,14 +1431,17 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { static getTheme(colors = [], opacity = 0.5, texture = 0) { return { type: "gradient", - gradientColors: colors ? colors.filter((color) => color) : [], // remove undefined + gradientColors: colors ? colors.filter(color => color) : [], // remove undefined opacity, texture, }; } updateNoise(texture) { - document.documentElement.style.setProperty("--zen-grainy-background-opacity", texture); + document.documentElement.style.setProperty( + "--zen-grainy-background-opacity", + texture + ); document.documentElement.setAttribute( "zen-show-grainy-background", texture > 0 ? "true" : "false" @@ -1328,7 +1455,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { if (hex.length === 3) { hex = hex .split("") - .map((char) => char + char) + .map(char => char + char) .join(""); } return [ @@ -1376,7 +1503,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { let workspaceTheme = theme || workspace.theme; /* eslint-disable complexity */ - this.forEachWindowSync((browser) => { + this.forEachWindowSync(browser => { if (!browser.gZenThemePicker?.promiseInitialized) { return; } @@ -1400,30 +1527,39 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const docElement = browser.document.documentElement; if (!skipUpdate) { - for (const dot of browser.gZenThemePicker.panel.querySelectorAll(".zen-theme-picker-dot")) { + for (const dot of browser.gZenThemePicker.panel.querySelectorAll( + ".zen-theme-picker-dot" + )) { dot.remove(); } } if (theme) { - const workspaceElement = browser.gZenWorkspaces.workspaceElement(windowWorkspace.uuid); + const workspaceElement = browser.gZenWorkspaces.workspaceElement( + windowWorkspace.uuid + ); if (workspaceElement) { workspaceElement.clearThemeStyles(); } } if (!skipUpdate) { - let backgroundElement = browser.gZenThemePicker.browserBackgroundElement; + let backgroundElement = + browser.gZenThemePicker.browserBackgroundElement; let toolbarElement = browser.gZenThemePicker.toolbarBackgroundElement; backgroundElement.style.setProperty( "--zen-main-browser-background-old", - backgroundElement.style.getPropertyValue("--zen-main-browser-background") + backgroundElement.style.getPropertyValue( + "--zen-main-browser-background" + ) ); toolbarElement.style.setProperty( "--zen-main-browser-background-toolbar-old", - toolbarElement.style.getPropertyValue("--zen-main-browser-background-toolbar") + toolbarElement.style.getPropertyValue( + "--zen-main-browser-background-toolbar" + ) ); - [backgroundElement, toolbarElement].forEach((element) => { + [backgroundElement, toolbarElement].forEach(element => { element.style.setProperty( "--zen-background-opacity", browser.gZenThemePicker.previousBackgroundOpacity ?? 1 @@ -1440,7 +1576,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { browser.gZenThemePicker.currentOpacity = workspaceTheme.opacity ?? 0.5; browser.gZenThemePicker.currentTexture = workspaceTheme.texture ?? 0; - let dominantColor = this.getMostDominantColor(workspaceTheme.gradientColors); + let dominantColor = this.getMostDominantColor( + workspaceTheme.gradientColors + ); const isDefaultTheme = !dominantColor; if (isDefaultTheme) { dominantColor = this.getNativeAccentColor(); @@ -1463,7 +1601,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } else if (opacity > lazy.MAX_OPACITY) { opacity = 1; } else { - opacity = (opacity - lazy.MIN_OPACITY) / (lazy.MAX_OPACITY - lazy.MIN_OPACITY); + opacity = + (opacity - lazy.MIN_OPACITY) / + (lazy.MAX_OPACITY - lazy.MIN_OPACITY); } if (isDefaultTheme) { opacity = 1; // If it's the default theme, we want the wave to be @@ -1476,8 +1616,14 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { thirdStop.setAttribute("offset", `${opacity * 100}%`); const interpolatedPath = this.#interpolateWavePath(opacity); svg.setAttribute("d", interpolatedPath); - opacitySlider.style.setProperty("--zen-thumb-height", `${40 + opacity * 15}px`); - opacitySlider.style.setProperty("--zen-thumb-width", `${10 + opacity * 15}px`); + opacitySlider.style.setProperty( + "--zen-thumb-height", + `${40 + opacity * 15}px` + ); + opacitySlider.style.setProperty( + "--zen-thumb-width", + `${10 + opacity * 15}px` + ); svg.style.stroke = interpolatedPath === this.#linePath ? thirdStop.getAttribute("stop-color") @@ -1510,7 +1656,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const textureSelectWrapper = browser.document.getElementById( "PanelUI-zen-gradient-generator-texture-wrapper" ); - const textureWrapperWidth = browser.windowUtils.getBoundsWithoutFlushing(textureSelectWrapper).width; + const textureWrapperWidth = + browser.windowUtils.getBoundsWithoutFlushing( + textureSelectWrapper + ).width; // Dont show when hidden if (textureWrapperWidth) { // rotate and trasnform relative to the wrapper width depending on the texture value @@ -1521,12 +1670,16 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { // add top and left to center the texture handler in relation with textureWrapperWidth // based on the rotation /* eslint-disable no-shadow */ - let top = Math.sin((rotation * Math.PI) / 180) * (textureWrapperWidth / 2) - 6; - let left = Math.cos((rotation * Math.PI) / 180) * (textureWrapperWidth / 2) - 3; + let top = + Math.sin((rotation * Math.PI) / 180) * (textureWrapperWidth / 2) - 6; + let left = + Math.cos((rotation * Math.PI) / 180) * (textureWrapperWidth / 2) - 3; textureHandler.style.top = `${textureWrapperWidth / 2 + top}px`; textureHandler.style.left = `${textureWrapperWidth / 2 + left}px`; // Highlight the 16 buttons based on the texture value - let buttons = browser.document.querySelectorAll(".zen-theme-picker-texture-dot"); + let buttons = browser.document.querySelectorAll( + ".zen-theme-picker-texture-dot" + ); let i = 4; for (const button of buttons) { button.classList.toggle("active", i / 16 <= textureValue); @@ -1538,7 +1691,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } } - const gradient = browser.gZenThemePicker.getGradient(workspaceTheme.gradientColors); + const gradient = browser.gZenThemePicker.getGradient( + workspaceTheme.gradientColors + ); const gradientToolbar = browser.gZenThemePicker.getGradient( workspaceTheme.gradientColors, true @@ -1552,12 +1707,14 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } } - browser.gZenThemePicker.toolbarBackgroundElement - .style - .setProperty("--zen-main-browser-background-toolbar", gradientToolbar); - browser.gZenThemePicker.browserBackgroundElement - .style - .setProperty("--zen-main-browser-background", gradient); + browser.gZenThemePicker.toolbarBackgroundElement.style.setProperty( + "--zen-main-browser-background-toolbar", + gradientToolbar + ); + browser.gZenThemePicker.browserBackgroundElement.style.setProperty( + "--zen-main-browser-background", + gradient + ); const isDarkModeWindow = browser.gZenThemePicker.isDarkMode; if (isDefaultTheme) { docElement.setAttribute("zen-default-theme", "true"); @@ -1571,7 +1728,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { // Should be set to `this.isLegacyVersion` but for some reason it is set to undefined if we open a private window, // so instead get the pref value directly. browser.gZenThemePicker.isLegacyVersion = - Services.prefs.getIntPref("zen.theme.gradient-legacy-version", 1) === 0; + Services.prefs.getIntPref("zen.theme.gradient-legacy-version", 1) === + 0; let isDarkMode = isDarkModeWindow; if (!isDefaultTheme && !this.isLegacyVersion) { @@ -1582,7 +1740,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } else { docElement.removeAttribute("zen-should-be-dark-mode"); if (!this.isLegacyVersion) { - browser.gZenThemePicker.panel.setAttribute("invalidate-controls", "true"); + browser.gZenThemePicker.panel.setAttribute( + "invalidate-controls", + "true" + ); } } // Set `--toolbox-textcolor` to have a contrast with the primary color @@ -1602,7 +1763,10 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { fixTheme(theme) { // add a primary color if there isn't one - if (!theme.gradientColors.find((color) => color.isPrimary) && theme.gradientColors.length) { + if ( + !theme.gradientColors.find(color => color.isPrimary) && + theme.gradientColors.length + ) { theme.gradientColors[0].isPrimary = true; } return theme; @@ -1612,7 +1776,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { let accentColor = Services.prefs.getStringPref("zen.theme.accent-color"); let rgb; if (accentColor === "AccentColor") { - const rawRgb = window.getComputedStyle(lazy.browserBackgroundElement).color; + const rawRgb = window.getComputedStyle( + lazy.browserBackgroundElement + ).color; rgb = rawRgb.match(/\d+/g).map(Number); // Match our theme a bit more, since we can't always expect the OS // to give us a color matching our theme scheme @@ -1640,7 +1806,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const color = target.getAttribute("data-color"); const dots = this.panel.querySelectorAll(".zen-theme-picker-dot"); for (const dot of dots) { - if (dot.style.getPropertyValue("--zen-theme-picker-dot-color") === color) { + if ( + dot.style.getPropertyValue("--zen-theme-picker-dot-color") === color + ) { dot.remove(); break; } @@ -1650,7 +1818,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } getPrimaryColor(colors) { - const primaryColor = colors.find((color) => color.isPrimary); + const primaryColor = colors.find(color => color.isPrimary); if (primaryColor) { return primaryColor.c; } @@ -1671,9 +1839,13 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { this.updated = skipSave; const dots = this.panel.querySelectorAll(".zen-theme-picker-dot"); const colors = Array.from(dots) - .sort((a, b) => a.getAttribute("data-index") - b.getAttribute("data-index")) - .map((dot) => { - const color = dot.style.getPropertyValue("--zen-theme-picker-dot-color"); + .sort( + (a, b) => a.getAttribute("data-index") - b.getAttribute("data-index") + ) + .map(dot => { + const color = dot.style.getPropertyValue( + "--zen-theme-picker-dot-color" + ); const isPrimary = dot.classList.contains("primary"); if (color === "undefined") { @@ -1682,7 +1854,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { const isCustom = dot.classList.contains("custom"); const algorithm = this.useAlgo; const position = - dot.getAttribute("data-position") && JSON.parse(dot.getAttribute("data-position")); + dot.getAttribute("data-position") && + JSON.parse(dot.getAttribute("data-position")); const type = dot.getAttribute("data-type"); return { c: isCustom ? color : color.match(/\d+/g).map(Number), @@ -1694,8 +1867,12 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { type, }; }) - .filter((color) => Boolean(color)); // remove nulls - const gradient = nsZenThemePicker.getTheme(colors, this.currentOpacity, this.currentTexture); + .filter(color => Boolean(color)); // remove nulls + const gradient = nsZenThemePicker.getTheme( + colors, + this.currentOpacity, + this.currentTexture + ); let currentWorkspace = gZenWorkspaces.getActiveWorkspace(); if (!skipSave) { @@ -1703,7 +1880,11 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { gZenWorkspaces.saveWorkspace(currentWorkspace); } - this.onWorkspaceChange(currentWorkspace, skipSave, skipSave ? gradient : null); + this.onWorkspaceChange( + currentWorkspace, + skipSave, + skipSave ? gradient : null + ); } handlePanelClose() { @@ -1735,7 +1916,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { } const t = progress; let newPathData = ""; - this.#sinePoints.forEach((p) => { + this.#sinePoints.forEach(p => { switch (p.type) { case "M": { const interpolatedY = referenceY + (p.y - referenceY) * t; @@ -1759,7 +1940,9 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { invalidateGradientCache(uuid) { delete this.#gradientsCache[uuid]; - window.dispatchEvent(new Event("ZenGradientCacheChanged", { bubbles: true })); + window.dispatchEvent( + new Event("ZenGradientCacheChanged", { bubbles: true }) + ); } getGradientForWorkspace(workspace, { getGradient = true } = {}) { @@ -1776,8 +1959,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { let gradient; let toolbarGradient; if (getGradient) { - gradient = this.getGradient(theme.gradientColors); - toolbarGradient = this.getGradient(theme.gradientColors, true); + gradient = this.getGradient(theme.gradientColors); + toolbarGradient = this.getGradient(theme.gradientColors, true); } let dominantColor = this.getMostDominantColor(theme.gradientColors); const isDefaultTheme = !dominantColor; diff --git a/src/zen/workspaces/ZenWorkspace.mjs b/src/zen/workspaces/ZenWorkspace.mjs index 883e12358..d024ded06 100644 --- a/src/zen/workspaces/ZenWorkspace.mjs +++ b/src/zen/workspaces/ZenWorkspace.mjs @@ -22,7 +22,9 @@ class nsZenCollapsiblePins extends nsZenFolder { get groupStartElement() { // Fetch this instead of the tab-group-start since it is not guaranteed this // element will be the first child of the pinned tabs container. - return this.#spaceElement.pinnedTabsContainer.querySelector(".space-fake-collapsible-start"); + return this.#spaceElement.pinnedTabsContainer.querySelector( + ".space-fake-collapsible-start" + ); } get collapsed() { @@ -114,12 +116,17 @@ export class nsZenWorkspace extends MozXULElement { this.#hasConnected = true; this.appendChild(this.constructor.fragment); - this.tabsContainer = this.querySelector(".zen-workspace-normal-tabs-section"); - this.indicator = this.querySelector(".zen-current-workspace-indicator"); - this.pinnedTabsContainer = this.querySelector(".zen-workspace-pinned-tabs-section"); - this.pinnedTabsContainer.separatorElement = this.pinnedTabsContainer.querySelector( - ".pinned-tabs-container-separator" + this.tabsContainer = this.querySelector( + ".zen-workspace-normal-tabs-section" ); + this.indicator = this.querySelector(".zen-current-workspace-indicator"); + this.pinnedTabsContainer = this.querySelector( + ".zen-workspace-pinned-tabs-section" + ); + this.pinnedTabsContainer.separatorElement = + this.pinnedTabsContainer.querySelector( + ".pinned-tabs-container-separator" + ); this.initializeAttributeInheritance(); this.scrollbox = this.querySelector("arrowscrollbox"); @@ -132,9 +139,11 @@ export class nsZenWorkspace extends MozXULElement { this.scrollbox.addEventListener("underflow", this); this.scrollbox.addEventListener("overflow", this); - const indicatorName = this.indicator.querySelector(".zen-current-workspace-indicator-name"); + const indicatorName = this.indicator.querySelector( + ".zen-current-workspace-indicator-name" + ); indicatorName.onRenameFinished = this.onIndicatorRenameFinished.bind(this); - indicatorName.addEventListener("dblclick", (event) => { + indicatorName.addEventListener("dblclick", event => { if (this.hasPinnedTabs) { // Prevent renaming when there are pinned tabs event.stopPropagation(); @@ -142,7 +151,8 @@ export class nsZenWorkspace extends MozXULElement { }); this.pinnedTabsContainer.scrollbox = this.scrollbox; - this.#initialPinnedElementChildrenCount = this.pinnedTabsContainer.children.length; + this.#initialPinnedElementChildrenCount = + this.pinnedTabsContainer.children.length; if (document.documentElement.hasAttribute("zen-unsynced-window")) { this.indicator.removeAttribute("context"); @@ -154,7 +164,7 @@ export class nsZenWorkspace extends MozXULElement { this.indicator .querySelector(".zen-current-workspace-indicator-icon") - .addEventListener("dblclick", (event) => { + .addEventListener("dblclick", event => { if (this.hasPinnedTabs) { return; } @@ -162,7 +172,7 @@ export class nsZenWorkspace extends MozXULElement { gZenWorkspaces.changeWorkspaceIcon(); }); - this.indicator.addEventListener("click", (event) => { + this.indicator.addEventListener("click", event => { if (this.hasPinnedTabs && event.button === 0) { event.stopPropagation(); this.collapsiblePins.toggle(); @@ -170,27 +180,36 @@ export class nsZenWorkspace extends MozXULElement { }); if (!gZenWorkspaces.currentWindowIsSyncing) { - let actionsButton = this.indicator.querySelector(".zen-workspaces-actions"); + let actionsButton = this.indicator.querySelector( + ".zen-workspaces-actions" + ); const moveTabToFragment = window.MozXULElement.parseXULToFragment( nsZenWorkspace.moveTabToButtonMarkup ); actionsButton.after(moveTabToFragment); actionsButton.setAttribute("hidden", "true"); actionsButton = actionsButton.nextElementSibling; - actionsButton.addEventListener("command", (event) => { + actionsButton.addEventListener("command", event => { event.stopPropagation(); this.#openMoveTabsToWorkspacePanel(event.target); }); } this.scrollbox._getScrollableElements = () => { - const children = [...this.pinnedTabsContainer.children, ...this.tabsContainer.children]; - if (Services.prefs.getBoolPref("zen.view.show-newtab-button-top", false)) { + const children = [ + ...this.pinnedTabsContainer.children, + ...this.tabsContainer.children, + ]; + if ( + Services.prefs.getBoolPref("zen.view.show-newtab-button-top", false) + ) { // Move the perifery to the first non-pinned tab - const periphery = this.tabsContainer.querySelector("#tabbrowser-arrowscrollbox-periphery"); + const periphery = this.tabsContainer.querySelector( + "#tabbrowser-arrowscrollbox-periphery" + ); if (periphery) { const firstNonPinnedTabIndex = children.findIndex( - (child) => gBrowser.isTab(child) && !child.pinned + child => gBrowser.isTab(child) && !child.pinned ); if (firstNonPinnedTabIndex > -1) { // Change to new location and remove from the old one on the list @@ -209,7 +228,7 @@ export class nsZenWorkspace extends MozXULElement { ); }; - this.scrollbox._canScrollToElement = (element) => { + this.scrollbox._canScrollToElement = element => { if (gBrowser.isTab(element)) { return ( !element.hasAttribute("zen-essential") && @@ -242,13 +261,18 @@ export class nsZenWorkspace extends MozXULElement { this.tabsContainer.setAttribute("zen-workspace-id", this.id); this.pinnedTabsContainer.setAttribute("zen-workspace-id", this.id); - this.collapsiblePins = document.createXULElement("zen-workspace-collapsible-pins"); + this.collapsiblePins = document.createXULElement( + "zen-workspace-collapsible-pins" + ); this.prepend(this.collapsiblePins); this.#updateOverflow(); this.onGradientCacheChanged = this.#onGradientCacheChanged.bind(this); - window.addEventListener("ZenGradientCacheChanged", this.onGradientCacheChanged); + window.addEventListener( + "ZenGradientCacheChanged", + this.onGradientCacheChanged + ); this.pinnedTabsContainer.addEventListener("TabPinned", () => { // If a tab is pinned and the pinned tabs section is collapsed, uncollapse it. @@ -263,7 +287,7 @@ export class nsZenWorkspace extends MozXULElement { this.addEventListener("TabPinned", tabPinCallback); this.addEventListener("TabUnpinned", tabPinCallback); - this.addEventListener("TabClose", (event) => { + this.addEventListener("TabClose", event => { if (event.target.pinned) { tabPinCallback(); } @@ -271,7 +295,10 @@ export class nsZenWorkspace extends MozXULElement { } disconnectedCallback() { - window.removeEventListener("ZenGradientCacheChanged", this.onGradientCacheChanged); + window.removeEventListener( + "ZenGradientCacheChanged", + this.onGradientCacheChanged + ); } get active() { @@ -329,10 +356,14 @@ export class nsZenWorkspace extends MozXULElement { return; } let workspaces = gZenWorkspaces.getWorkspaces(); - let workspaceData = workspaces.find((workspace) => workspace.uuid === this.workspaceUuid); + let workspaceData = workspaces.find( + workspace => workspace.uuid === this.workspaceUuid + ); workspaceData.name = newName; await gZenWorkspaces.saveWorkspace(workspaceData); - this.indicator.querySelector(".zen-current-workspace-indicator-name").textContent = newName; + this.indicator.querySelector( + ".zen-current-workspace-indicator-name" + ).textContent = newName; gZenUIManager.showToast("zen-workspace-renamed-toast"); } @@ -342,7 +373,7 @@ export class nsZenWorkspace extends MozXULElement { const target = event.target; target.setAttribute("open", "true"); this.indicator.setAttribute("open", "true"); - const handlePopupHidden = (event) => { + const handlePopupHidden = event => { if (event.target !== popup) { return; } @@ -369,12 +400,18 @@ export class nsZenWorkspace extends MozXULElement { } else { this.style.colorScheme = ""; } - this.style.setProperty("--toolbox-textcolor", `rgb(${toolbarColor.join(",")})`); + this.style.setProperty( + "--toolbox-textcolor", + `rgb(${toolbarColor.join(",")})` + ); this.style.setProperty("--zen-primary-color", primaryColor); } checkPinsExistence() { - if (this.pinnedTabsContainer.children.length > this.#initialPinnedElementChildrenCount) { + if ( + this.pinnedTabsContainer.children.length > + this.#initialPinnedElementChildrenCount + ) { this.setAttribute("haspinnedtabs", "true"); } else { this.removeAttribute("haspinnedtabs"); diff --git a/src/zen/workspaces/ZenWorkspaceBookmarksStorage.js b/src/zen/workspaces/ZenWorkspaceBookmarksStorage.js index 547ed5783..e9d94e06c 100644 --- a/src/zen/workspaces/ZenWorkspaceBookmarksStorage.js +++ b/src/zen/workspaces/ZenWorkspaceBookmarksStorage.js @@ -19,7 +19,7 @@ window.ZenWorkspaceBookmarksStorage = { async _ensureTable() { await this.lazy.PlacesUtils.withConnectionWrapper( "ZenWorkspaceBookmarksStorage.init", - async (db) => { + async db => { // Create table using GUIDs instead of IDs await db.execute(` CREATE TABLE IF NOT EXISTS zen_bookmarks_workspaces ( @@ -102,7 +102,7 @@ window.ZenWorkspaceBookmarksStorage = { { bookmark_guid: bookmarkGuid } ); - return rows.map((row) => row.getResultByName("workspace_uuid")); + return rows.map(row => row.getResultByName("workspace_uuid")); }, /** @@ -164,7 +164,7 @@ window.ZenWorkspaceBookmarksStorage = { async clearChangedIDs() { await this.lazy.PlacesUtils.withConnectionWrapper( "ZenWorkspaceBookmarksStorage.clearChangedIDs", - async (db) => { + async db => { await db.execute(`DELETE FROM zen_bookmarks_workspaces_changes`); } ); diff --git a/src/zen/workspaces/ZenWorkspaceCreation.mjs b/src/zen/workspaces/ZenWorkspaceCreation.mjs index 98904dd09..69b8316cf 100644 --- a/src/zen/workspaces/ZenWorkspaceCreation.mjs +++ b/src/zen/workspaces/ZenWorkspaceCreation.mjs @@ -5,7 +5,7 @@ class nsZenWorkspaceCreation extends MozXULElement { #wasInCollapsedMode = false; - promiseInitialized = new Promise((resolve) => { + promiseInitialized = new Promise(resolve => { this.resolveInitialized = resolve; }); @@ -96,8 +96,12 @@ class nsZenWorkspaceCreation extends MozXULElement { this.inputName = this.querySelector(".zen-workspace-creation-name"); this.inputIcon = this.querySelector(".zen-workspace-creation-icon-label"); this.inputProfile = this.querySelector(".zen-workspace-creation-profile"); - this.createButton = this.querySelector(".zen-workspace-creation-create-button"); - this.cancelButton = this.querySelector(".zen-workspace-creation-cancel-button"); + this.createButton = this.querySelector( + ".zen-workspace-creation-create-button" + ); + this.cancelButton = this.querySelector( + ".zen-workspace-creation-cancel-button" + ); for (const element of this.elementsToAnimate) { element.style.opacity = 0; @@ -114,7 +118,8 @@ class nsZenWorkspaceCreation extends MozXULElement { .getInterface(Ci.nsIAppWindow) .rollupAllPopups(); - this.handleZenWorkspacesChangeBind = this.handleZenWorkspacesChange.bind(this); + this.handleZenWorkspacesChangeBind = + this.handleZenWorkspacesChange.bind(this); for (const element of this.parentElement.children) { if (element !== this) { @@ -130,8 +135,14 @@ class nsZenWorkspaceCreation extends MozXULElement { } } - this.createButton.addEventListener("command", this.onCreateButtonCommand.bind(this)); - this.cancelButton.addEventListener("command", this.onCancelButtonCommand.bind(this)); + this.createButton.addEventListener( + "command", + this.onCreateButtonCommand.bind(this) + ); + this.cancelButton.addEventListener( + "command", + this.onCancelButtonCommand.bind(this) + ); this.inputName.addEventListener("input", () => { this.createButton.disabled = !this.inputName.value.trim(); @@ -139,12 +150,23 @@ class nsZenWorkspaceCreation extends MozXULElement { this.inputIcon.addEventListener("command", this.onIconCommand.bind(this)); - this.profilesPopup = this.querySelector(".zen-workspace-creation-profiles-popup"); + this.profilesPopup = this.querySelector( + ".zen-workspace-creation-profiles-popup" + ); if (gZenWorkspaces.shouldShowContainers) { - this.inputProfile.addEventListener("command", this.onProfileCommand.bind(this)); - this.profilesPopup.addEventListener("popupshown", this.onProfilePopupShown.bind(this)); - this.profilesPopup.addEventListener("command", this.onProfilePopupCommand.bind(this)); + this.inputProfile.addEventListener( + "command", + this.onProfileCommand.bind(this) + ); + this.profilesPopup.addEventListener( + "popupshown", + this.onProfilePopupShown.bind(this) + ); + this.profilesPopup.addEventListener( + "command", + this.onProfilePopupCommand.bind(this) + ); this.currentProfile = { id: 0, @@ -154,7 +176,8 @@ class nsZenWorkspaceCreation extends MozXULElement { this.inputProfile.parentNode.hidden = true; } - document.getElementById("zen-sidebar-splitter").style.pointerEvents = "none"; + document.getElementById("zen-sidebar-splitter").style.pointerEvents = + "none"; gZenUIManager.motion .animate( @@ -220,7 +243,7 @@ class nsZenWorkspaceCreation extends MozXULElement { onIconCommand(event) { gZenEmojiPicker.open(event.target, { closeOnSelect: false, - onSelect: async (icon) => { + onSelect: async icon => { const isSvg = icon && icon.endsWith(".svg"); if (isSvg) { this.inputIcon.label = ""; @@ -256,7 +279,9 @@ class nsZenWorkspaceCreation extends MozXULElement { } onProfilePopupCommand(event) { - let userContextId = parseInt(event.target.getAttribute("data-usercontextid")); + let userContextId = parseInt( + event.target.getAttribute("data-usercontextid") + ); if (isNaN(userContextId)) { return; } @@ -267,7 +292,9 @@ class nsZenWorkspaceCreation extends MozXULElement { } finishSetup() { - gZenWorkspaces.addChangeListeners(this.handleZenWorkspacesChangeBind, { once: true }); + gZenWorkspaces.addChangeListeners(this.handleZenWorkspacesChangeBind, { + once: true, + }); } async handleZenWorkspacesChange() { diff --git a/src/zen/workspaces/ZenWorkspaceIcons.mjs b/src/zen/workspaces/ZenWorkspaceIcons.mjs index d9c88f1c2..a15bcc083 100644 --- a/src/zen/workspaces/ZenWorkspaceIcons.mjs +++ b/src/zen/workspaces/ZenWorkspaceIcons.mjs @@ -14,7 +14,7 @@ class nsZenWorkspaceIcons extends MozXULElement { window.addEventListener("ZenWorkspacesUIUpdate", this, true); this.initDragAndDrop(); - this.addEventListener("mouseover", (e) => { + this.addEventListener("mouseover", e => { if (this.isReorderMode) { return; } @@ -29,13 +29,14 @@ class nsZenWorkspaceIcons extends MozXULElement { let dragStart = 0; let draggedTab = null; - this.addEventListener("mousedown", (e) => { + this.addEventListener("mousedown", e => { const target = e.target.closest("toolbarbutton[zen-workspace-id]"); if (!target || e.button != 0 || e.ctrlKey || e.shiftKey || e.altKey) { return; } - const isVertical = document.documentElement.getAttribute("zen-sidebar-expanded") != "true"; + const isVertical = + document.documentElement.getAttribute("zen-sidebar-expanded") != "true"; const clientPos = isVertical ? "clientY" : "clientX"; this.isReorderMode = false; @@ -45,7 +46,7 @@ class nsZenWorkspaceIcons extends MozXULElement { e.stopPropagation(); - const mouseMoveHandler = (moveEvent) => { + const mouseMoveHandler = moveEvent => { if (Math.abs(moveEvent[clientPos] - dragStart) > 5) { this.isReorderMode = true; } @@ -66,7 +67,8 @@ class nsZenWorkspaceIcons extends MozXULElement { const nextSibling = draggedTab.nextSibling; if ( mouse < - rect[isVertical ? "top" : "left"] + rect[isVertical ? "height" : "width"] / 2 + rect[isVertical ? "top" : "left"] + + rect[isVertical ? "height" : "width"] / 2 ) { this.insertBefore(draggedTab, tab); } else { @@ -87,7 +89,10 @@ class nsZenWorkspaceIcons extends MozXULElement { draggedTab.removeAttribute("dragged"); - this.reorderWorkspaceToIndex(draggedTab, Array.from(this.children).indexOf(draggedTab)); + this.reorderWorkspaceToIndex( + draggedTab, + Array.from(this.children).indexOf(draggedTab) + ); draggedTab = null; this.isReorderMode = false; diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 3dc0ab192..fbe5a4e9e 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -58,11 +58,11 @@ class nsZenWorkspaces { "BMB_mobileBookmarks", ]; - promisePinnedInitialized = new Promise((resolve) => { + promisePinnedInitialized = new Promise(resolve => { this._resolvePinnedInitialized = resolve; }); - promiseInitialized = new Promise((resolve) => { + promiseInitialized = new Promise(resolve => { this._resolveInitialized = resolve; }); @@ -70,7 +70,10 @@ class nsZenWorkspaces { if (this.privateWindowOrDisabled) { return; } - await Promise.all([this.promisePinnedInitialized, SessionStore.promiseAllWindowsRestored]); + await Promise.all([ + this.promisePinnedInitialized, + SessionStore.promiseAllWindowsRestored, + ]); } async init() { @@ -86,7 +89,9 @@ class nsZenWorkspaces { if (!this.shouldHaveWorkspaces) { this._resolveInitialized(); - console.warn("gZenWorkspaces: !!! gZenWorkspaces is disabled in hidden windows !!!"); + console.warn( + "gZenWorkspaces: !!! gZenWorkspaces is disabled in hidden windows !!!" + ); return; // We are in a hidden window, don't initialize gZenWorkspaces } @@ -131,7 +136,10 @@ class nsZenWorkspaces { ChromeUtils.defineLazyGetter(this, "workspaceIcons", () => document.getElementById("zen-workspaces-button") ); - this.#activeWorkspace ||= Services.prefs.getStringPref("zen.workspaces.active", ""); + this.#activeWorkspace ||= Services.prefs.getStringPref( + "zen.workspaces.active", + "" + ); if (this.isPrivateWindow) { document.documentElement.setAttribute("zen-private-window", "true"); @@ -155,7 +163,10 @@ class nsZenWorkspaces { }; Services.obs.addObserver(observerFunction, "workspace-bookmarks-updated"); window.addEventListener("unload", () => { - Services.obs.removeObserver(observerFunction, "workspace-bookmarks-updated"); + Services.obs.removeObserver( + observerFunction, + "workspace-bookmarks-updated" + ); }); } } @@ -216,11 +227,15 @@ class nsZenWorkspaces { // Check if we need to debounce const now = Date.now(); - const timeSinceLastSelection = now - this._tabSelectionState.lastSelectionTime; + const timeSinceLastSelection = + now - this._tabSelectionState.lastSelectionTime; if (timeSinceLastSelection < this._tabSelectionState.debounceTime) { - await new Promise((resolve) => - setTimeout(resolve, this._tabSelectionState.debounceTime - timeSinceLastSelection) + await new Promise(resolve => + setTimeout( + resolve, + this._tabSelectionState.debounceTime - timeSinceLastSelection + ) ); } @@ -269,7 +284,9 @@ class nsZenWorkspaces { } // Fall back to creating a new tab - const newTabUrl = newTabTarget || Services.prefs.getStringPref("browser.startup.homepage"); + const newTabUrl = + newTabTarget || + Services.prefs.getStringPref("browser.startup.homepage"); let tab = gZenUIManager.openAndChangeToTab(newTabUrl); // Set workspace ID if available @@ -340,7 +357,10 @@ class nsZenWorkspaces { } get activeScrollbox() { - return this.activeWorkspaceElement?.scrollbox ?? gBrowser.tabContainer.arrowScrollbox; + return ( + this.activeWorkspaceElement?.scrollbox ?? + gBrowser.tabContainer.arrowScrollbox + ); } get tabboxChildren() { @@ -348,7 +368,9 @@ class nsZenWorkspaces { } get tabboxChildrenWithoutEmpty() { - return this.tabboxChildren.filter((child) => !child.hasAttribute("zen-empty-tab")); + return this.tabboxChildren.filter( + child => !child.hasAttribute("zen-empty-tab") + ); } get shouldAnimateEssentials() { @@ -370,7 +392,9 @@ class nsZenWorkspaces { } #initializeTabsStripSections() { - const perifery = document.getElementById("tabbrowser-arrowscrollbox-periphery"); + const perifery = document.getElementById( + "tabbrowser-arrowscrollbox-periphery" + ); perifery.setAttribute("hidden", "true"); const tabs = gBrowser.tabContainer.allTabs; const workspaces = this.getWorkspaces(); @@ -378,12 +402,12 @@ class nsZenWorkspaces { this.#createWorkspaceTabsSection(workspace, tabs); } if (tabs.length) { - const defaultSelectedContainer = this.workspaceElement(this.activeWorkspace)?.querySelector( - ".zen-workspace-normal-tabs-section" - ); - const pinnedContainer = this.workspaceElement(this.activeWorkspace)?.querySelector( - ".zen-workspace-pinned-tabs-section" - ); + const defaultSelectedContainer = this.workspaceElement( + this.activeWorkspace + )?.querySelector(".zen-workspace-normal-tabs-section"); + const pinnedContainer = this.workspaceElement( + this.activeWorkspace + )?.querySelector(".zen-workspace-pinned-tabs-section"); // New profile with no workspaces does not have a default selected container if (defaultSelectedContainer) { for (const tab of tabs) { @@ -395,7 +419,10 @@ class nsZenWorkspaces { continue; } // before to the last child (perifery) - defaultSelectedContainer.insertBefore(tab, defaultSelectedContainer.lastChild); + defaultSelectedContainer.insertBefore( + tab, + defaultSelectedContainer.lastChild + ); } } gBrowser.tabContainer._invalidateCachedTabs(); @@ -418,10 +445,13 @@ class nsZenWorkspaces { ); if (!essentialsContainer) { essentialsContainer = document.createXULElement("hbox"); - essentialsContainer.className = "zen-essentials-container zen-workspace-tabs-section"; + essentialsContainer.className = + "zen-essentials-container zen-workspace-tabs-section"; essentialsContainer.setAttribute("flex", "1"); essentialsContainer.setAttribute("container", container); - document.getElementById("zen-essentials").appendChild(essentialsContainer); + document + .getElementById("zen-essentials") + .appendChild(essentialsContainer); // Set an initial hidden state if the essentials section is not supposed // to be shown on the current workspace @@ -466,12 +496,12 @@ class nsZenWorkspaces { let section = spaceElement.tabsContainer; let pinnedSection = spaceElement.pinnedTabsContainer; const workspaceTabs = Array.from(tabs).filter( - (tab) => + tab => tab.getAttribute("zen-workspace-id") === workspace.uuid && !tab.hasAttribute("zen-essential") ); let folders = new Set(); - const getFolderRoot = (tab) => { + const getFolderRoot = tab => { let root = tab?.group; while (root?.group) { root = root?.group; @@ -516,7 +546,11 @@ class nsZenWorkspaces { window.removeEventListener("AppCommand", HandleAppCommandEvent, true); // Add our handler first - window.addEventListener("AppCommand", this._handleAppCommand.bind(this), true); + window.addEventListener( + "AppCommand", + this._handleAppCommand.bind(this), + true + ); // Re-add original handler window.addEventListener("AppCommand", HandleAppCommandEvent, true); @@ -561,7 +595,7 @@ class nsZenWorkspaces { toolbox.addEventListener( "wheel", - (event) => { + event => { if (this.privateWindowOrDisabled) { return; } @@ -617,7 +651,9 @@ class nsZenWorkspaces { const elements = [ gNavToolbox, // event handlers do not work on elements inside shadow DOM so we need to attach them directly - document.getElementById("tabbrowser-arrowscrollbox").shadowRoot.querySelector("scrollbox"), + document + .getElementById("tabbrowser-arrowscrollbox") + .shadowRoot.querySelector("scrollbox"), ]; // Attach gesture handlers to each element @@ -630,13 +666,29 @@ class nsZenWorkspaces { } attachGestureHandlers(element) { - element.addEventListener("MozSwipeGestureMayStart", this._handleSwipeMayStart.bind(this), true); - element.addEventListener("MozSwipeGestureStart", this._handleSwipeStart.bind(this), true); - element.addEventListener("MozSwipeGestureUpdate", this._handleSwipeUpdate.bind(this), true); + element.addEventListener( + "MozSwipeGestureMayStart", + this._handleSwipeMayStart.bind(this), + true + ); + element.addEventListener( + "MozSwipeGestureStart", + this._handleSwipeStart.bind(this), + true + ); + element.addEventListener( + "MozSwipeGestureUpdate", + this._handleSwipeUpdate.bind(this), + true + ); // Use MozSwipeGesture instead of MozSwipeGestureEnd because MozSwipeGestureEnd is fired after animation ends, // while MozSwipeGesture is fired immediately after swipe ends. - element.addEventListener("MozSwipeGesture", this._handleSwipeEnd.bind(this), true); + element.addEventListener( + "MozSwipeGesture", + this._handleSwipeEnd.bind(this), + true + ); element.addEventListener( "MozSwipeGestureEnd", @@ -644,12 +696,16 @@ class nsZenWorkspaces { Services.prefs.setBoolPref("zen.swipe.is-fast-swipe", false); document.documentElement.removeAttribute("swipe-gesture"); gZenUIManager.tabsWrapper.style.removeProperty("scrollbar-width"); - [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach((element) => { - element.style.setProperty("--zen-background-opacity", "1"); - }); + [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach( + element => { + element.style.setProperty("--zen-background-opacity", "1"); + } + ); delete this._hasAnimatedBackgrounds; this.updateTabsContainers(); - document.removeEventListener("popupshown", this.popupOpenHandler, { once: true }); + document.removeEventListener("popupshown", this.popupOpenHandler, { + once: true, + }); }, true ); @@ -677,7 +733,10 @@ class nsZenWorkspaces { } // Only handle horizontal swipes - if (event.direction === event.DIRECTION_LEFT || event.direction === event.DIRECTION_RIGHT) { + if ( + event.direction === event.DIRECTION_LEFT || + event.direction === event.DIRECTION_RIGHT + ) { event.preventDefault(); event.stopPropagation(); @@ -694,7 +753,9 @@ class nsZenWorkspaces { gZenFolders.cancelPopupTimer(); document.documentElement.setAttribute("swipe-gesture", "true"); - document.addEventListener("popupshown", this.popupOpenHandler, { once: true }); + document.addEventListener("popupshown", this.popupOpenHandler, { + once: true, + }); event.preventDefault(); event.stopPropagation(); @@ -716,14 +777,19 @@ class nsZenWorkspaces { const delta = event.delta * 300; const stripWidth = - window.windowUtils.getBoundsWithoutFlushing(document.getElementById("navigator-toolbox")) - .width + - window.windowUtils.getBoundsWithoutFlushing(document.getElementById("zen-sidebar-splitter")) - .width * + window.windowUtils.getBoundsWithoutFlushing( + document.getElementById("navigator-toolbox") + ).width + + window.windowUtils.getBoundsWithoutFlushing( + document.getElementById("zen-sidebar-splitter") + ).width * 2; let translateX = this._swipeState.lastDelta + delta; // Add a force multiplier as we are translating the strip depending on how close to the edge we are - let forceMultiplier = Math.min(1, 1 - Math.abs(translateX) / (stripWidth * 4.5)); // 4.5 instead of 4 to add a bit of a buffer + let forceMultiplier = Math.min( + 1, + 1 - Math.abs(translateX) / (stripWidth * 4.5) + ); // 4.5 instead of 4 to add a bit of a buffer if (forceMultiplier > 0.5) { translateX *= forceMultiplier; this._swipeState.lastDelta = delta + (translateX - delta) * 0.5; @@ -747,7 +813,8 @@ class nsZenWorkspaces { event.preventDefault(); event.stopPropagation(); const isRTL = document.documentElement.matches(":-moz-locale-dir(rtl)"); - const moveForward = (event.direction === SimpleGestureEvent.DIRECTION_RIGHT) !== isRTL; + const moveForward = + (event.direction === SimpleGestureEvent.DIRECTION_RIGHT) !== isRTL; const rawDirection = moveForward ? 1 : -1; const direction = this.naturalScroll ? -1 : 1; @@ -767,7 +834,7 @@ class nsZenWorkspaces { set activeWorkspace(value) { const spaces = this.getWorkspaces(); - if (!spaces.some((ws) => ws.uuid === value)) { + if (!spaces.some(ws => ws.uuid === value)) { value = spaces[0]?.uuid || ""; } if (value === this.#activeWorkspace) { @@ -789,7 +856,10 @@ class nsZenWorkspaces { chromeFlags & Ci.nsIWebBrowserChrome.CHROME_TOOLBAR || chromeFlags & Ci.nsIWebBrowserChrome.CHROME_MENUBAR; } - return this._shouldHaveWorkspaces && !document.documentElement.hasAttribute("taskbartab"); + return ( + this._shouldHaveWorkspaces && + !document.documentElement.hasAttribute("taskbartab") + ); } get isPrivateWindow() { @@ -818,7 +888,7 @@ class nsZenWorkspaces { getWorkspaceFromId(id) { try { - return this.getWorkspaces().find((workspace) => workspace.uuid === id); + return this.getWorkspaces().find(workspace => workspace.uuid === id); } catch { return null; } @@ -886,7 +956,8 @@ class nsZenWorkspaces { this._workspaceCache = spacesFromStore.length ? [...spacesFromStore] : [this.#createWorkspaceData("Space", undefined)]; - this.activeWorkspace = aWinData.activeZenSpace || this._workspaceCache[0].uuid; + this.activeWorkspace = + aWinData.activeZenSpace || this._workspaceCache[0].uuid; let promise = this.#initializeWorkspaces(); for (const workspace of spacesFromStore) { const element = this.workspaceElement(workspace.uuid); @@ -944,7 +1015,10 @@ class nsZenWorkspaces { window.addEventListener("TabUnpinned", tabUpdateListener); window.addEventListener("aftercustomization", tabUpdateListener); window.addEventListener("TabSelect", this.onLocationChange.bind(this)); - window.addEventListener("TabBrowserInserted", this.onTabBrowserInserted.bind(this)); + window.addEventListener( + "TabBrowserInserted", + this.onTabBrowserInserted.bind(this) + ); this.updateWorkspacesChangeContextMenu(); })(); @@ -957,7 +1031,7 @@ class nsZenWorkspaces { await this.promiseInitialized; let showed = false; let resolveSelectPromise; - let selectPromise = new Promise((resolve) => { + let selectPromise = new Promise(resolve => { resolveSelectPromise = resolve; }); @@ -975,18 +1049,27 @@ class nsZenWorkspaces { ) { gBrowser.selectedTab = this._initialTab; this.moveTabToWorkspace(this._initialTab, this.activeWorkspace); - gBrowser.moveTabTo(this._initialTab, { forceUngrouped: true, tabIndex: 0 }); + gBrowser.moveTabTo(this._initialTab, { + forceUngrouped: true, + tabIndex: 0, + }); removedEmptyTab = true; delete this._initialTab; } - if (this._tabToRemoveForEmpty && !removedEmptyTab && !this._shouldOverrideTabs) { - const tabs = gBrowser.tabs.filter((tab) => !tab.collapsed); + if ( + this._tabToRemoveForEmpty && + !removedEmptyTab && + !this._shouldOverrideTabs + ) { + const tabs = gBrowser.tabs.filter(tab => !tab.collapsed); if ( typeof this._tabToSelect === "number" && this._tabToSelect >= 0 && tabs[this._tabToSelect] && - (await this.#shouldShowTabInCurrentWorkspace(tabs[this._tabToSelect])) && + (await this.#shouldShowTabInCurrentWorkspace( + tabs[this._tabToSelect] + )) && tabs[this._tabToSelect] !== this._tabToRemoveForEmpty ) { this.log(`Found tab to select: ${this._tabToSelect}, ${tabs.length}`); @@ -1048,9 +1131,12 @@ class nsZenWorkspaces { ) { // Go through each tab and see if there's another tab with the same startup URL. // If we do find one, remove it. - const newTabUrl = Services.prefs.getStringPref("browser.startup.homepage"); + const newTabUrl = Services.prefs.getStringPref( + "browser.startup.homepage" + ); const tabs = gBrowser.tabs.filter( - (tab) => !tab.collapsed && !tab.hasAttribute("zen-empty-tab") && !tab.pinned + tab => + !tab.collapsed && !tab.hasAttribute("zen-empty-tab") && !tab.pinned ); for (const tab of tabs) { if (tab._originalUrl === newTabUrl && tab !== gBrowser.selectedTab) { @@ -1061,7 +1147,9 @@ class nsZenWorkspaces { } } - window.dispatchEvent(new CustomEvent("AfterWorkspacesSessionRestore", { bubbles: true })); + window.dispatchEvent( + new CustomEvent("AfterWorkspacesSessionRestore", { bubbles: true }) + ); } handleInitialTab(tab, isEmpty) { @@ -1069,7 +1157,10 @@ class nsZenWorkspaces { return; } // note: We cant access `gZenVerticalTabsManager._canReplaceNewTab` this early - if (isEmpty && Services.prefs.getBoolPref("zen.urlbar.replace-newtab", true)) { + if ( + isEmpty && + Services.prefs.getBoolPref("zen.urlbar.replace-newtab", true) + ) { tab._markedForReplacement = true; this._tabToRemoveForEmpty = tab; } else { @@ -1085,7 +1176,8 @@ class nsZenWorkspaces { if (this.#contextMenuData?.workspaceId) { anchor = this.#contextMenuData.originalTarget; } - const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace; + const workspaceId = + this.#contextMenuData?.workspaceId || this.activeWorkspace; if (!anchor) { return; } @@ -1097,7 +1189,7 @@ class nsZenWorkspaces { gZenEmojiPicker.open(anchor, { closeOnSelect: false, allowNone: hasNoIcon, - onSelect: async (icon) => { + onSelect: async icon => { const workspace = this.getWorkspaceFromId(workspaceId); if (!workspace) { console.warn("No active workspace found to change icon"); @@ -1125,7 +1217,7 @@ class nsZenWorkspaces { if ( (workspaceID && !tab.hasAttribute("zen-essential") && - !workspaces.find((workspace) => workspace.uuid === workspaceID)) || + !workspaces.find(workspace => workspace.uuid === workspaceID)) || // Also remove empty tabs that are supposed to be from parent folders but // they dont exist anymore (tab.pinned && tab.hasAttribute("zen-empty-tab") && !tab.group) @@ -1142,7 +1234,11 @@ class nsZenWorkspaces { } handleTabBeforeClose(tab, closeWindowWithLastTab) { - if (!this.workspaceEnabled || this.__contextIsDelete || this._removedByStartupPage) { + if ( + !this.workspaceEnabled || + this.__contextIsDelete || + this._removedByStartupPage + ) { return null; } @@ -1153,10 +1249,12 @@ class nsZenWorkspaces { let tabs = gBrowser.visibleTabs; let tabsPinned = tabs.filter( - (t) => !this.shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned + t => !this.shouldOpenNewTabIfLastUnpinnedTabIsClosed || !t.pinned ); const shouldCloseWindow = - closeWindowWithLastTab != null ? closeWindowWithLastTab : this.shouldCloseWindow(); + closeWindowWithLastTab != null + ? closeWindowWithLastTab + : this.shouldCloseWindow(); if (tabs.length === 1 && tabs[0] === tab) { if (shouldCloseWindow) { // We've already called beforeunload on all the relevant tabs if we get here, @@ -1186,7 +1284,10 @@ class nsZenWorkspaces { addPopupListeners() { const workspaceActions = document.getElementById("zenWorkspaceMoreActions"); - workspaceActions.addEventListener("popupshowing", this.updateWorkspaceActionsMenu.bind(this)); + workspaceActions.addEventListener( + "popupshowing", + this.updateWorkspaceActionsMenu.bind(this) + ); workspaceActions.addEventListener("popuphidden", () => { setTimeout(() => { setTimeout(() => { @@ -1256,10 +1357,14 @@ class nsZenWorkspaces { originalTarget: target, }; const workspaceName = document.getElementById("context_zenEditWorkspace"); - const themePicker = document.getElementById("context_zenChangeWorkspaceTheme"); + const themePicker = document.getElementById( + "context_zenChangeWorkspaceTheme" + ); /* We can't show the rename input properly in collapsed state, so hide the workspace edit input */ - const isCollapsed = !Services.prefs.getBoolPref("zen.view.sidebar-expanded"); + const isCollapsed = !Services.prefs.getBoolPref( + "zen.view.sidebar-expanded" + ); workspaceName.hidden = isCollapsed || (this.#contextMenuData.workspaceId && @@ -1268,15 +1373,19 @@ class nsZenWorkspaces { this.#contextMenuData.workspaceId && this.#contextMenuData.workspaceId !== this.activeWorkspace; const separator = document.getElementById("context_zenWorkspacesSeparator"); - for (const item of event.target.querySelectorAll(".zen-workspace-context-menu-item")) { + for (const item of event.target.querySelectorAll( + ".zen-workspace-context-menu-item" + )) { item.remove(); } if (!this.#contextMenuData.workspaceId) { separator.hidden = false; for (const workspace of this.getWorkspaces().reverse()) { const item = this.generateMenuItemForWorkspace(workspace); - item.addEventListener("command", (e) => { - this.changeWorkspaceWithID(e.target.closest("menuitem").getAttribute("zen-workspace-id")); + item.addEventListener("command", e => { + this.changeWorkspaceWithID( + e.target.closest("menuitem").getAttribute("zen-workspace-id") + ); }); separator.after(item); } @@ -1312,7 +1421,9 @@ class nsZenWorkspaces { return; } const workspacesData = this._workspaceCache; - const index = workspacesData.findIndex((ws) => ws.uuid === workspaceData.uuid); + const index = workspacesData.findIndex( + ws => ws.uuid === workspaceData.uuid + ); if (index !== -1) { workspacesData[index] = workspaceData; } else { @@ -1324,7 +1435,9 @@ class nsZenWorkspaces { removeWorkspace(windowID) { let workspacesData = this.getWorkspaces(); // Remove the workspace from the cache - workspacesData = workspacesData.filter((workspace) => workspace.uuid !== windowID); + workspacesData = workspacesData.filter( + workspace => workspace.uuid !== windowID + ); this.#propagateWorkspaceData(workspacesData); } @@ -1345,7 +1458,10 @@ class nsZenWorkspaces { return workspace.icon; } try { - return new Intl.Segmenter().segment(workspace.name).containing().segment.toUpperCase(); + return new Intl.Segmenter() + .segment(workspace.name) + .containing() + .segment.toUpperCase(); } catch { return Array.from(workspace.name)[0]?.toUpperCase(); } @@ -1362,8 +1478,12 @@ class nsZenWorkspaces { if (!this.#hasInitialized || this.privateWindowOrDisabled) { return; } - window.dispatchEvent(new CustomEvent("ZenWorkspaceDataChanged"), { bubbles: true }); - window.gZenWindowSync.propagateWorkspacesToAllWindows(aSpaceData ?? this._workspaceCache); + window.dispatchEvent(new CustomEvent("ZenWorkspaceDataChanged"), { + bubbles: true, + }); + window.gZenWindowSync.propagateWorkspacesToAllWindows( + aSpaceData ?? this._workspaceCache + ); } propagateWorkspaces(aWorkspaces) { @@ -1374,13 +1494,13 @@ class nsZenWorkspaces { for (const previousWorkspace of previousWorkspaces) { if ( this.workspaceElement(previousWorkspace.uuid) && - !aWorkspaces.find((w) => w.uuid === previousWorkspace.uuid) + !aWorkspaces.find(w => w.uuid === previousWorkspace.uuid) ) { let promise = Promise.resolve(); if (this.isWorkspaceActive(previousWorkspace)) { // If the removed workspace was active, switch to another one const newActiveWorkspace = - aWorkspaces.find((w) => w.uuid !== previousWorkspace.uuid) || null; + aWorkspaces.find(w => w.uuid !== previousWorkspace.uuid) || null; promise = this.changeWorkspace(newActiveWorkspace); } promise = promise.then(() => { @@ -1405,10 +1525,16 @@ class nsZenWorkspaces { const workspaceElement = this.workspaceElement(workspace.uuid); if (workspaceElement) { if (previousElement === null) { - arrowScrollbox.moveBefore(workspaceElement, arrowScrollbox.firstChild); + arrowScrollbox.moveBefore( + workspaceElement, + arrowScrollbox.firstChild + ); hasChanged = true; } else if (previousElement.nextSibling !== workspaceElement) { - arrowScrollbox.moveBefore(workspaceElement, previousElement.nextSibling); + arrowScrollbox.moveBefore( + workspaceElement, + previousElement.nextSibling + ); hasChanged = true; } previousElement = workspaceElement; @@ -1430,7 +1556,7 @@ class nsZenWorkspaces { return; } const workspaces = this._workspaceCache; - const workspace = workspaces.find((w) => w.uuid === id); + const workspace = workspaces.find(w => w.uuid === id); if (!workspace) { console.warn(`Workspace with ID ${id} not found for reordering.`); return; @@ -1444,7 +1570,9 @@ class nsZenWorkspaces { workspaces.splice(currentIndex, 1); // Insert the workspace at the new position if (newPosition < 0 || newPosition > workspaces.length) { - console.warn(`Invalid position ${newPosition} for reordering workspace with ID ${id}.`); + console.warn( + `Invalid position ${newPosition} for reordering workspace with ID ${id}.` + ); return; } workspaces.splice(newPosition, 0, workspace); @@ -1459,10 +1587,13 @@ class nsZenWorkspaces { const previousWorkspace = this.getActiveWorkspace(); document.documentElement.setAttribute("zen-creating-workspace", "true"); await this.createAndSaveWorkspace("Space", undefined, false, 0, { - beforeChangeCallback: async (workspace) => { + beforeChangeCallback: async workspace => { createForm = document.createXULElement("zen-workspace-creation"); createForm.setAttribute("workspace-id", workspace.uuid); - createForm.setAttribute("previous-workspace-id", previousWorkspace?.uuid || ""); + createForm.setAttribute( + "previous-workspace-id", + previousWorkspace?.uuid || "" + ); gBrowser.tabContainer.after(createForm); await createForm.promiseInitialized; }, @@ -1472,13 +1603,21 @@ class nsZenWorkspaces { #unpinnedTabsInWorkspace(workspaceID) { return Array.from(this.allStoredTabs).filter( - (tab) => tab.getAttribute("zen-workspace-id") === workspaceID && tab.visible && !tab.pinned + tab => + tab.getAttribute("zen-workspace-id") === workspaceID && + tab.visible && + !tab.pinned ); } #getClosableTabs(tabs) { - const remainingTabs = tabs.filter((tab) => { - const attributes = ["selected", "multiselected", "pictureinpicture", "soundplaying"]; + const remainingTabs = tabs.filter(tab => { + const attributes = [ + "selected", + "multiselected", + "pictureinpicture", + "soundplaying", + ]; for (const attr of attributes) { if (tab.hasAttribute(attr)) { return false; @@ -1506,10 +1645,11 @@ class nsZenWorkspaces { } async unloadWorkspace() { - const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace; + const workspaceId = + this.#contextMenuData?.workspaceId || this.activeWorkspace; const tabsToUnload = this.allStoredTabs.filter( - (tab) => + tab => tab.getAttribute("zen-workspace-id") === workspaceId && !tab.hasAttribute("zen-empty-tab") && !tab.hasAttribute("zen-essential") && @@ -1574,7 +1714,11 @@ class nsZenWorkspaces { let tabCount = 0; for (let tab of gBrowser.tabs) { const isEssential = tab.getAttribute("zen-essential") === "true"; - if (!tab.hasAttribute("zen-workspace-id") && !tab.pinned && !isEssential) { + if ( + !tab.hasAttribute("zen-workspace-id") && + !tab.pinned && + !isEssential + ) { this.moveTabToWorkspace(tab, space.uuid); tabCount++; } @@ -1600,7 +1744,9 @@ class nsZenWorkspaces { if (!this._changeListeners) { return; } - this._changeListeners = this._changeListeners.filter((listener) => listener.func !== func); + this._changeListeners = this._changeListeners.filter( + listener => listener.func !== func + ); } async changeWorkspaceWithID(workspaceID, ...args) { @@ -1633,7 +1779,11 @@ class nsZenWorkspaces { const previousWorkspace = this.getActiveWorkspace(); alwaysChange = alwaysChange || onInit; this.activeWorkspace = workspace.uuid; - if (previousWorkspace && previousWorkspace.uuid === workspace.uuid && !alwaysChange) { + if ( + previousWorkspace && + previousWorkspace.uuid === workspace.uuid && + !alwaysChange + ) { this._cancelSwipeAnimation(); return; } @@ -1649,7 +1799,8 @@ class nsZenWorkspaces { // note: We are calling this even though it is also called in `updateTabsContainers`. This is mostly // due to a race condition where the workspace strip is not updated before the tabs are moved. this.makeSureEmptyTabIsFirst(); - gBrowser.pinnedTabsContainer = this.pinnedTabsContainer || gBrowser.pinnedTabsContainer; + gBrowser.pinnedTabsContainer = + this.pinnedTabsContainer || gBrowser.pinnedTabsContainer; gBrowser.tabContainer.pinnedTabsContainer = this.pinnedTabsContainer || gBrowser.tabContainer.pinnedTabsContainer; @@ -1660,13 +1811,19 @@ class nsZenWorkspaces { // Second pass: Handle tab selection this.tabContainer._invalidateCachedTabs(); - const tabToSelect = await this._handleTabSelection(workspace, onInit, previousWorkspace.uuid); + const tabToSelect = await this._handleTabSelection( + workspace, + onInit, + previousWorkspace.uuid + ); if (tabToSelect.linkedBrowser) { gBrowser.warmupTab(tabToSelect); } // Update UI and state - const previousWorkspaceIndex = workspaces.findIndex((w) => w.uuid === previousWorkspace.uuid); + const previousWorkspaceIndex = workspaces.findIndex( + w => w.uuid === previousWorkspace.uuid + ); await this.#updateWorkspaceState(workspace, onInit, tabToSelect, { previousWorkspaceIndex, previousWorkspace, @@ -1698,7 +1855,7 @@ class nsZenWorkspaces { const usedGroups = new Set(); let tPos = 0; // _tPos is used for the session store, not needed for folders let pPos = 0; // _pPos is used for the pinned tabs manager - const recurseFolder = (tab) => { + const recurseFolder = tab => { if (tab.group) { recurseFolder(tab.group); if (!usedGroups.has(tab.group.id)) { @@ -1716,10 +1873,18 @@ class nsZenWorkspaces { } } - #updatePaddingTopOnTabs(workspaceElement, essentialContainer, forAnimation = false) { + #updatePaddingTopOnTabs( + workspaceElement, + essentialContainer, + forAnimation = false + ) { if ( workspaceElement && - !(this.#inChangingWorkspace && !forAnimation && !this._alwaysAnimatePaddingTop) + !( + this.#inChangingWorkspace && + !forAnimation && + !this._alwaysAnimatePaddingTop + ) ) { delete this._alwaysAnimatePaddingTop; const essentialsHeight = @@ -1730,14 +1895,18 @@ class nsZenWorkspaces { } } - _organizeWorkspaceStripLocations(workspace, justMove = false, offsetPixels = 0) { + _organizeWorkspaceStripLocations( + workspace, + justMove = false, + offsetPixels = 0 + ) { if (document.documentElement.hasAttribute("zen-creating-workspace")) { // If we are creating a workspace, we don't want to animate the strip return; } this._organizingWorkspaceStrip = true; const workspaces = this.getWorkspaces(); - let workspaceIndex = workspaces.findIndex((w) => w.uuid === workspace.uuid); + let workspaceIndex = workspaces.findIndex(w => w.uuid === workspace.uuid); if (!justMove) { this._fixIndicatorsNames(workspaces); } @@ -1749,7 +1918,8 @@ class nsZenWorkspaces { workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)]?.containerTabId; for (const otherWorkspace of workspaces) { const element = this.workspaceElement(otherWorkspace.uuid); - const newTransform = -(workspaceIndex - workspaces.indexOf(otherWorkspace)) * 100; + const newTransform = + -(workspaceIndex - workspaces.indexOf(otherWorkspace)) * 100; element.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`; } // Hide other essentials with different containerTabId @@ -1783,18 +1953,25 @@ class nsZenWorkspaces { } if (offsetPixels) { // Find the next workspace we are scrolling to - const nextWorkspace = workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)]; + const nextWorkspace = + workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)]; if (nextWorkspace) { const { gradient: nextGradient, grain: nextGrain, toolbarGradient: nextToolbarGradient, } = gZenThemePicker.getGradientForWorkspace(nextWorkspace); - const existingGrain = gZenThemePicker.getGradientForWorkspace(workspace).grain; + const existingGrain = + gZenThemePicker.getGradientForWorkspace(workspace).grain; const percentage = Math.abs(offsetPixels) / 200; - [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach((element) => { - element.style.setProperty("--zen-background-opacity", 1 - percentage); - }); + [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement].forEach( + element => { + element.style.setProperty( + "--zen-background-opacity", + 1 - percentage + ); + } + ); if (!this._hasAnimatedBackgrounds) { this._hasAnimatedBackgrounds = true; lazy.browserBackgroundElement.style.setProperty( @@ -1815,7 +1992,8 @@ class nsZenWorkspaces { const maxGrain = Math.max(existingGrain, nextGrain); const grainValue = minGrain + - (maxGrain - minGrain) * (existingGrain > nextGrain ? 1 - percentage : percentage); + (maxGrain - minGrain) * + (existingGrain > nextGrain ? 1 - percentage : percentage); if (!this.#inChangingWorkspace) { gZenThemePicker.updateNoise(grainValue); } @@ -1830,9 +2008,15 @@ class nsZenWorkspaces { if (!workspaceIndicator) { return; } - const indicatorName = workspaceIndicator.querySelector(".zen-current-workspace-indicator-name"); - const indicatorIcon = workspaceIndicator.querySelector(".zen-current-workspace-indicator-icon"); - const iconStack = workspaceIndicator.querySelector(".zen-current-workspace-indicator-stack"); + const indicatorName = workspaceIndicator.querySelector( + ".zen-current-workspace-indicator-name" + ); + const indicatorIcon = workspaceIndicator.querySelector( + ".zen-current-workspace-indicator-icon" + ); + const iconStack = workspaceIndicator.querySelector( + ".zen-current-workspace-indicator-stack" + ); if (this.workspaceHasIcon(currentWorkspace)) { indicatorIcon.removeAttribute("no-icon"); @@ -1855,7 +2039,9 @@ class nsZenWorkspaces { _fixIndicatorsNames(workspaces) { for (const workspace of workspaces) { - const workspaceIndicator = this.workspaceElement(workspace.uuid)?.indicator; + const workspaceIndicator = this.workspaceElement( + workspace.uuid + )?.indicator; this.updateWorkspaceIndicator(workspace, workspaceIndicator); } } @@ -1865,22 +2051,35 @@ class nsZenWorkspaces { newWorkspace, shouldAnimate, tabToSelect = null, - { previousWorkspaceIndex = null, previousWorkspace = null, onInit = false } = {} + { + previousWorkspaceIndex = null, + previousWorkspace = null, + onInit = false, + } = {} ) { gZenUIManager.tabsWrapper.style.scrollbarWidth = "none"; const kGlobalAnimationDuration = 0.2; this._animatingChange = true; const animations = []; const workspaces = this.getWorkspaces(); - const newWorkspaceIndex = workspaces.findIndex((w) => w.uuid === newWorkspace.uuid); + const newWorkspaceIndex = workspaces.findIndex( + w => w.uuid === newWorkspace.uuid + ); const isGoingLeft = newWorkspaceIndex <= previousWorkspaceIndex; const clonedEssentials = []; if (shouldAnimate && this.shouldAnimateEssentials && previousWorkspace) { for (const workspace of workspaces) { - const essentialsContainer = this.getEssentialsSection(workspace.containerTabId); - if (clonedEssentials[clonedEssentials.length - 1]?.contextId == workspace.containerTabId) { + const essentialsContainer = this.getEssentialsSection( + workspace.containerTabId + ); + if ( + clonedEssentials[clonedEssentials.length - 1]?.contextId == + workspace.containerTabId + ) { clonedEssentials[clonedEssentials.length - 1].repeat++; - clonedEssentials[clonedEssentials.length - 1].workspaces.push(workspace); + clonedEssentials[clonedEssentials.length - 1].workspaces.push( + workspace + ); continue; } essentialsContainer.setAttribute("hidden", "true"); @@ -1898,9 +2097,10 @@ class nsZenWorkspaces { } document.documentElement.setAttribute("animating-background", "true"); if (shouldAnimate && previousWorkspace) { - let previousBackgroundOpacity = lazy.browserBackgroundElement.style.getPropertyValue( - "--zen-background-opacity" - ); + let previousBackgroundOpacity = + lazy.browserBackgroundElement.style.getPropertyValue( + "--zen-background-opacity" + ); try { // Prevent NaN from being set if (previousBackgroundOpacity) { @@ -1915,8 +2115,11 @@ class nsZenWorkspaces { previousBackgroundOpacity = 1 - previousBackgroundOpacity; } gZenThemePicker.previousBackgroundOpacity = previousBackgroundOpacity; - let elements = [lazy.browserBackgroundElement, lazy.toolbarBackgroundElement]; - elements.forEach((element) => { + let elements = [ + lazy.browserBackgroundElement, + lazy.toolbarBackgroundElement, + ]; + elements.forEach(element => { element.style.setProperty( "--zen-background-opacity", previousBackgroundOpacity @@ -1942,7 +2145,9 @@ class nsZenWorkspaces { } const existingTransform = element.style.transform; const elementWorkspaceId = element.id; - const elementWorkspaceIndex = workspaces.findIndex((w) => w.uuid === elementWorkspaceId); + const elementWorkspaceIndex = workspaces.findIndex( + w => w.uuid === elementWorkspaceId + ); const offset = -(newWorkspaceIndex - elementWorkspaceIndex) * 100; const newTransform = `translateX(${offset}%)`; if (shouldAnimate) { @@ -1951,7 +2156,9 @@ class nsZenWorkspaces { gZenUIManager.motion.animate( element, { - transform: existingTransform ? [existingTransform, newTransform] : newTransform, + transform: existingTransform + ? [existingTransform, newTransform] + : newTransform, paddingTop: existingTransform ? [existingPaddingTop, existingPaddingTop] : existingPaddingTop, @@ -1973,15 +2180,19 @@ class nsZenWorkspaces { } if (this.shouldAnimateEssentials && previousWorkspace) { // Animate essentials - const newWorkspaceEssentialsContainer = clonedEssentials.find((cloned) => - cloned.workspaces.some((w) => w.uuid === newWorkspace.uuid) + const newWorkspaceEssentialsContainer = clonedEssentials.find(cloned => + cloned.workspaces.some(w => w.uuid === newWorkspace.uuid) ); // Get a list of essentials containers that are in between the first and last workspace - const essentialsContainersInBetween = clonedEssentials.filter((cloned) => { + const essentialsContainersInBetween = clonedEssentials.filter(cloned => { const essentialsWorkspaces = cloned.workspaces; - const firstIndex = workspaces.findIndex((w) => w.uuid === essentialsWorkspaces[0].uuid); + const firstIndex = workspaces.findIndex( + w => w.uuid === essentialsWorkspaces[0].uuid + ); const lastIndex = workspaces.findIndex( - (w) => w.uuid === essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid + w => + w.uuid === + essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid ); const [start, end] = [ @@ -2010,10 +2221,12 @@ class nsZenWorkspaces { // Get the index from first and last workspace const firstWorkspaceIndex = workspaces.findIndex( - (w) => w.uuid === essentialsWorkspaces[0].uuid + w => w.uuid === essentialsWorkspaces[0].uuid ); const lastWorkspaceIndex = workspaces.findIndex( - (w) => w.uuid === essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid + w => + w.uuid === + essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid ); cloned.originalContainer.style.removeProperty("transform"); // Check if the container is even going to appear on the screen, to save on animation @@ -2024,10 +2237,14 @@ class nsZenWorkspaces { // so we need to check if any of the workspaces in the container are between the // first and last workspace. !essentialsContainersInBetween.find( - (ce) => - ce.workspaces.some((w) => w.uuid === essentialsWorkspaces[0].uuid) && + ce => ce.workspaces.some( - (w) => w.uuid === essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid + w => w.uuid === essentialsWorkspaces[0].uuid + ) && + ce.workspaces.some( + w => + w.uuid === + essentialsWorkspaces[essentialsWorkspaces.length - 1].uuid ) ) ) { @@ -2035,12 +2252,16 @@ class nsZenWorkspaces { } cloned.originalContainer.parentNode.appendChild(container); let stepsInBetween = - Math.abs(newWorkspaceIndex - (isGoingLeft ? firstWorkspaceIndex : lastWorkspaceIndex)) + - 1; + Math.abs( + newWorkspaceIndex - + (isGoingLeft ? firstWorkspaceIndex : lastWorkspaceIndex) + ) + 1; const usingSameContainer = - newWorkspaceEssentialsContainer?.workspaces.some((w) => w.uuid === newWorkspace.uuid) && newWorkspaceEssentialsContainer?.workspaces.some( - (w) => w.uuid === previousWorkspace.uuid + w => w.uuid === newWorkspace.uuid + ) && + newWorkspaceEssentialsContainer?.workspaces.some( + w => w.uuid === previousWorkspace.uuid ); let newOffset = -( @@ -2060,8 +2281,8 @@ class nsZenWorkspaces { // we can simply not animate the essentials if ( usingSameContainer && - essentialsWorkspaces.some((w) => w.uuid === newWorkspace.uuid) && - essentialsWorkspaces.some((w) => w.uuid === previousWorkspace.uuid) + essentialsWorkspaces.some(w => w.uuid === newWorkspace.uuid) && + essentialsWorkspaces.some(w => w.uuid === previousWorkspace.uuid) ) { newOffset = 0; existingOffset = 0; @@ -2089,12 +2310,20 @@ class nsZenWorkspaces { } // Special case: going forward from single reused container to a new one - if (!usingSameContainer && !isGoingLeft && lastWorkspaceIndex === newWorkspaceIndex - 1) { + if ( + !usingSameContainer && + !isGoingLeft && + lastWorkspaceIndex === newWorkspaceIndex - 1 + ) { existingOffset = 0; newOffset = -100; stepsInBetween = 1; } - if (!usingSameContainer && isGoingLeft && firstWorkspaceIndex === newWorkspaceIndex + 1) { + if ( + !usingSameContainer && + isGoingLeft && + firstWorkspaceIndex === newWorkspaceIndex + 1 + ) { existingOffset = 0; newOffset = 100; stepsInBetween = 1; @@ -2109,7 +2338,11 @@ class nsZenWorkspaces { newOffset = 0; stepsInBetween = 1; } - if (!usingSameContainer && !isGoingLeft && firstWorkspaceIndex === newWorkspaceIndex) { + if ( + !usingSameContainer && + !isGoingLeft && + firstWorkspaceIndex === newWorkspaceIndex + ) { existingOffset = 100; newOffset = 0; stepsInBetween = 1; @@ -2145,13 +2378,15 @@ class nsZenWorkspaces { gZenUIManager._preventToolbarRebuild = true; gZenUIManager.updateTabsToolbar(); } - let promiseTimeout = new Promise((resolve) => + let promiseTimeout = new Promise(resolve => setTimeout(resolve, kGlobalAnimationDuration * 1000 + 50) ); // See issue https://github.com/zen-browser/desktop/issues/9334, we need to add // some sort of timeout to the animation promise, just in case it gets stuck. // We are doing a race between the timeout and the animations finishing. - await Promise.race([Promise.all(animations), promiseTimeout]).catch(console.error); + await Promise.race([Promise.all(animations), promiseTimeout]).catch( + console.error + ); document.documentElement.removeAttribute("animating-background"); if (shouldAnimate) { for (const cloned of clonedEssentials) { @@ -2160,7 +2395,9 @@ class nsZenWorkspaces { this._alwaysAnimatePaddingTop = true; this.updateTabsContainers(); } - const essentialsContainer = this.getEssentialsSection(newWorkspace.containerTabId); + const essentialsContainer = this.getEssentialsSection( + newWorkspace.containerTabId + ); essentialsContainer.removeAttribute("hidden"); essentialsContainer.style.transform = "none"; gBrowser.tabContainer._invalidateCachedTabs(); @@ -2213,7 +2450,9 @@ class nsZenWorkspaces { return ( !tabContextId || tabContextId === "0" || - !workspaces.some((workspace) => workspace.containerTabId === parseInt(tabContextId, 10)) + !workspaces.some( + workspace => workspace.containerTabId === parseInt(tabContextId, 10) + ) ); } @@ -2246,13 +2485,18 @@ class nsZenWorkspaces { // Try last selected tab if it is visible if ( lastSelectedTab && - this._shouldShowTab(lastSelectedTab, workspace.uuid, containerId, workspaces) + this._shouldShowTab( + lastSelectedTab, + workspace.uuid, + containerId, + workspaces + ) ) { tabToSelect = lastSelectedTab; } // Find first suitable tab else { - tabToSelect = gBrowser.visibleTabs.find((tab) => !tab.pinned); + tabToSelect = gBrowser.visibleTabs.find(tab => !tab.pinned); if (!tabToSelect && gBrowser.visibleTabs.length) { tabToSelect = gBrowser.visibleTabs[gBrowser.visibleTabs.length - 1]; } @@ -2289,7 +2533,11 @@ class nsZenWorkspaces { document.documentElement.setAttribute("zen-workspace-id", workspace.uuid); // Recalculate new tab observers - gBrowser.tabContainer.observe(null, "nsPref:changed", "privacy.userContext.enabled"); + gBrowser.tabContainer.observe( + null, + "nsPref:changed", + "privacy.userContext.enabled" + ); gBrowser.tabContainer.arrowScrollbox = this.activeScrollbox; @@ -2300,11 +2548,16 @@ class nsZenWorkspaces { gZenUIManager.tabsWrapper.scrollbarWidth = "none"; this.workspaceIcons.activeIndex = workspace.uuid; - await this._animateTabs(workspace, !onInit && !this._animatingChange, tabToSelect, { - previousWorkspaceIndex, - previousWorkspace, - onInit, - }); + await this._animateTabs( + workspace, + !onInit && !this._animatingChange, + tabToSelect, + { + previousWorkspaceIndex, + previousWorkspace, + onInit, + } + ); this._organizeWorkspaceStripLocations(workspace, true); gZenUIManager.tabsWrapper.style.scrollbarWidth = ""; @@ -2336,7 +2589,10 @@ class nsZenWorkspaces { gBrowser.showTab(tab); } for (const tab of gBrowser.tabs) { - if (!tab.hasAttribute("zen-workspace-id") && !tab.hasAttribute("zen-workspace-id")) { + if ( + !tab.hasAttribute("zen-workspace-id") && + !tab.hasAttribute("zen-workspace-id") + ) { tab.setAttribute("zen-workspace-id", workspace.uuid); } } @@ -2390,7 +2646,9 @@ class nsZenWorkspaces { let itemsToFill = [menubar.querySelector("menupopup"), menuPopup]; for (const popup of itemsToFill) { let isMoveTabPopup = popup.id === menuPopupID; - for (const item of popup.querySelectorAll(".zen-workspace-context-menu-item")) { + for (const item of popup.querySelectorAll( + ".zen-workspace-context-menu-item" + )) { item.remove(); } const separator = document.createXULElement("menuseparator"); @@ -2401,7 +2659,9 @@ class nsZenWorkspaces { popup.appendChild(separator); } let i = 0; - for (let workspace of isMoveTabPopup ? workspaces.reverse() : workspaces) { + for (let workspace of isMoveTabPopup + ? workspaces.reverse() + : workspaces) { const menuItem = this.generateMenuItemForWorkspace( workspace, /* disableCurrent = */ isMoveTabPopup @@ -2425,8 +2685,11 @@ class nsZenWorkspaces { #createWorkspaceData(name, icon, containerTabId = 0) { if (!this.currentWindowIsSyncing) { - containerTabId = parseInt(gBrowser.selectedTab.getAttribute("usercontextid")) || 0; - let label = ContextualIdentityService.getUserContextLabel(containerTabId) || "Default"; + containerTabId = + parseInt(gBrowser.selectedTab.getAttribute("usercontextid")) || 0; + let label = + ContextualIdentityService.getUserContextLabel(containerTabId) || + "Default"; name = this.isPrivateWindow ? "Incognito" : label; if (this.isPrivateWindow) { icon = gZenEmojiPicker.getSVGURL("eye.svg"); @@ -2453,8 +2716,10 @@ class nsZenWorkspaces { return null; } // get extra tabs remaning (e.g. on new profiles) and just move them to the new workspace - const extraTabs = Array.from(gBrowser.tabContainer.arrowScrollbox.children).filter( - (child) => + const extraTabs = Array.from( + gBrowser.tabContainer.arrowScrollbox.children + ).filter( + child => gBrowser.isTab(child) && !child.hasAttribute("zen-workspace-id") && !child.hasAttribute("zen-empty-tab") && @@ -2498,12 +2763,22 @@ class nsZenWorkspaces { this.onPinnedTabsResize( // This is what happens when we join a resize observer, an event listener // while using it as a method. - [{ target: (target?.target ? target.target : target) ?? this.pinnedTabsContainer }], + [ + { + target: + (target?.target ? target.target : target) ?? + this.pinnedTabsContainer, + }, + ], forAnimation ); } - updateShouldHideSeparator(arrowScrollbox, pinnedContainer, fromTabSelection = false) { + updateShouldHideSeparator( + arrowScrollbox, + pinnedContainer, + fromTabSelection = false + ) { const visibleTabsFound = () => { let count = 0; for (const child of arrowScrollbox.children) { @@ -2532,7 +2807,9 @@ class nsZenWorkspaces { const workspaceID = pinnedContainer.getAttribute("zen-workspace-id"); const tabs = this.#unpinnedTabsInWorkspace(workspaceID); const closableTabs = this.#getClosableTabs(tabs); - const button = pinnedContainer.querySelector(".zen-workspace-close-unpinned-tabs-button"); + const button = pinnedContainer.querySelector( + ".zen-workspace-close-unpinned-tabs-button" + ); if (tabs.length === closableTabs.length) { button.setAttribute("can-close", "true"); } else { @@ -2559,14 +2836,19 @@ class nsZenWorkspaces { for (const entry of entries) { let originalWorkspaceId = entry.target.getAttribute("zen-workspace-id"); if (!originalWorkspaceId) { - originalWorkspaceId = entry.target.closest("zen-workspace")?.id || this.activeWorkspace; + originalWorkspaceId = + entry.target.closest("zen-workspace")?.id || this.activeWorkspace; } const workspacesIds = []; if (entry.target.closest("#zen-essentials")) { // Get all workspaces that have the same userContextId - const userContextId = parseInt(entry.target.getAttribute("container") || "0"); - const workspaces = this.getWorkspaces().filter((w) => w.containerTabId === userContextId); - workspacesIds.push(...workspaces.map((w) => w.uuid)); + const userContextId = parseInt( + entry.target.getAttribute("container") || "0" + ); + const workspaces = this.getWorkspaces().filter( + w => w.containerTabId === userContextId + ); + workspacesIds.push(...workspaces.map(w => w.uuid)); } else { workspacesIds.push(originalWorkspaceId); } @@ -2574,12 +2856,17 @@ class nsZenWorkspaces { const workspaceElement = this.workspaceElement(workspaceId); const workspaceObject = this.getWorkspaceFromId(workspaceId); if (!workspaceElement || !workspaceObject) { - console.warn("Workspace element or object not found for id", workspaceId); + console.warn( + "Workspace element or object not found for id", + workspaceId + ); continue; } const arrowScrollbox = workspaceElement.tabsContainer; const pinnedContainer = workspaceElement.pinnedTabsContainer; - const essentialContainer = this.getEssentialsSection(workspaceObject.containerTabId); + const essentialContainer = this.getEssentialsSection( + workspaceObject.containerTabId + ); const essentialNumChildren = essentialContainer.children.length; let essentialHackType = 0; if (essentialNumChildren === 6 || essentialNumChildren === 9) { @@ -2594,7 +2881,11 @@ class nsZenWorkspaces { } else { essentialContainer.removeAttribute("data-hack-type"); } - this.#updatePaddingTopOnTabs(workspaceElement, essentialContainer, forAnimation); + this.#updatePaddingTopOnTabs( + workspaceElement, + essentialContainer, + forAnimation + ); this.updateShouldHideSeparator(arrowScrollbox, pinnedContainer); } } @@ -2610,8 +2901,12 @@ class nsZenWorkspaces { } if (workspaceID) { - if (tab.hasAttribute("change-workspace") && this.moveTabToWorkspace(tab, workspaceID)) { - this.lastSelectedWorkspaceTabs[workspaceID] = gZenGlanceManager.getTabOrGlanceParent(tab); + if ( + tab.hasAttribute("change-workspace") && + this.moveTabToWorkspace(tab, workspaceID) + ) { + this.lastSelectedWorkspaceTabs[workspaceID] = + gZenGlanceManager.getTabOrGlanceParent(tab); tab.removeAttribute("change-workspace"); const workspace = this.getWorkspaceFromId(workspaceID); setTimeout(() => { @@ -2636,14 +2931,21 @@ class nsZenWorkspaces { #changeToEmptyTab() { const isEmpty = gBrowser.selectedTab.hasAttribute("zen-empty-tab"); - gZenCompactModeManager.sidebar.toggleAttribute("zen-has-empty-tab", isEmpty); + gZenCompactModeManager.sidebar.toggleAttribute( + "zen-has-empty-tab", + isEmpty + ); document.documentElement.setAttribute("zen-has-empty-tab", isEmpty); } async onLocationChange(event) { let tab = event.target; this.#changeToEmptyTab(); - if (!this.workspaceEnabled || this.#inChangingWorkspace || this._isClosingWindow) { + if ( + !this.workspaceEnabled || + this.#inChangingWorkspace || + this._isClosingWindow + ) { return; } @@ -2666,11 +2968,16 @@ class nsZenWorkspaces { // Only update last selected tab for non-essential tabs in their workspace if (workspaceID === activeWorkspace.uuid) { - this.lastSelectedWorkspaceTabs[workspaceID] = gZenGlanceManager.getTabOrGlanceParent(tab); + this.lastSelectedWorkspaceTabs[workspaceID] = + gZenGlanceManager.getTabOrGlanceParent(tab); } // Switch workspace if needed - if (workspaceID && workspaceID !== activeWorkspace.uuid && this._hasInitializedTabsStrip) { + if ( + workspaceID && + workspaceID !== activeWorkspace.uuid && + this._hasInitializedTabsStrip + ) { const workspaceToChange = this.getWorkspaceFromId(workspaceID); if (!workspaceToChange) { return; @@ -2685,15 +2992,19 @@ class nsZenWorkspaces { this._organizingWorkspaceStrip = true; let workspaces = this.getWorkspaces(); let workspace = workspaces.find( - (w) => w.uuid === (this.#contextMenuData?.workspaceId || this.activeWorkspace) + w => + w.uuid === (this.#contextMenuData?.workspaceId || this.activeWorkspace) + ); + let userContextId = parseInt( + event.target.getAttribute("data-usercontextid") ); - let userContextId = parseInt(event.target.getAttribute("data-usercontextid")); workspace.containerTabId = userContextId + 0; // +0 to convert to number this.saveWorkspace(workspace); } async closeAllUnpinnedTabs() { - const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace; + const workspaceId = + this.#contextMenuData?.workspaceId || this.activeWorkspace; const unpinnedTabs = this.#unpinnedTabsInWorkspace(workspaceId); const closableTabs = this.#getClosableTabs(unpinnedTabs); @@ -2702,9 +3013,10 @@ class nsZenWorkspaces { } this.#deleteAllUnpinnedTabsInWorkspace(closableTabs); - const restoreClosedTabsShortcut = gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand( - "History:RestoreLastClosedTabOrWindowOrSession" - ); + const restoreClosedTabsShortcut = + gZenKeyboardShortcutsManager.getShortcutDisplayFromCommand( + "History:RestoreLastClosedTabOrWindowOrSession" + ); gZenUIManager.showToast("zen-workspaces-close-all-unpinned-tabs-toast", { l10nArgs: { @@ -2714,7 +3026,8 @@ class nsZenWorkspaces { } async contextDeleteWorkspace() { - const workspaceId = this.#contextMenuData?.workspaceId || this.activeWorkspace; + const workspaceId = + this.#contextMenuData?.workspaceId || this.activeWorkspace; const [title, body] = await document.l10n.formatValues([ { id: "zen-workspaces-delete-workspace-title" }, { @@ -2734,7 +3047,11 @@ class nsZenWorkspaces { return tab; } - async changeWorkspaceShortcut(offset = 1, whileScrolling = false, disableWrap = false) { + async changeWorkspaceShortcut( + offset = 1, + whileScrolling = false, + disableWrap = false + ) { // Cycle through workspaces let workspaces = this.getWorkspaces(); let activeWorkspace = this.getActiveWorkspace(); @@ -2762,7 +3079,7 @@ class nsZenWorkspaces { "cmd_zenOpenWorkspaceCreation", "zen-context-menu-new-folder-toolbar", ]; - commandsToDisable.forEach((cmd) => { + commandsToDisable.forEach(cmd => { const element = document.getElementById(cmd); if (element) { element.setAttribute("disabled", true); @@ -2776,7 +3093,8 @@ class nsZenWorkspaces { ? gBrowser.selectedTabs : [TabContextMenu.contextTab]; document.getElementById("tabContextMenu").hidePopup(); - const previousWorkspaceID = document.documentElement.getAttribute("zen-workspace-id"); + const previousWorkspaceID = + document.documentElement.getAttribute("zen-workspace-id"); for (let tab of tabs) { this.moveTabToWorkspace(tab, workspaceID); if (this.lastSelectedWorkspaceTabs[previousWorkspaceID] === tab) { @@ -2786,11 +3104,12 @@ class nsZenWorkspaces { } } // Make sure we select the last tab in the new workspace - this.lastSelectedWorkspaceTabs[workspaceID] = gZenGlanceManager.getTabOrGlanceParent( - tabs[tabs.length - 1] - ); + this.lastSelectedWorkspaceTabs[workspaceID] = + gZenGlanceManager.getTabOrGlanceParent(tabs[tabs.length - 1]); const workspaces = this.getWorkspaces(); - await this.changeWorkspace(workspaces.find((workspace) => workspace.uuid === workspaceID)); + await this.changeWorkspace( + workspaces.find(workspace => workspace.uuid === workspaceID) + ); } // Tab browser utilities @@ -2808,7 +3127,7 @@ class nsZenWorkspaces { ) { // Find all workspaces that match the given userContextId const matchingWorkspaces = this._workspaceCache.filter( - (workspace) => workspace.containerTabId === userContextId + workspace => workspace.containerTabId === userContextId ); // Check if exactly one workspace matches @@ -2838,9 +3157,13 @@ class nsZenWorkspaces { const containerId = aTab.getAttribute("usercontextid") ?? "0"; // Return all tabs that are not on the same workspace return gBrowser.tabs.filter( - (tab) => - !this._shouldShowTab(tab, tabWorkspaceId, containerId, this._workspaceCache) && - !tab.hasAttribute("zen-empty-tab") + tab => + !this._shouldShowTab( + tab, + tabWorkspaceId, + containerId, + this._workspaceCache + ) && !tab.hasAttribute("zen-empty-tab") ); } @@ -2900,7 +3223,11 @@ class nsZenWorkspaces { // Make the active workspace first workspaces = workspaces.sort((a, b) => /* eslint-disable no-nested-ternary */ - a.uuid === this.activeWorkspace ? -1 : b.uuid === this.activeWorkspace ? 1 : 0 + a.uuid === this.activeWorkspace + ? -1 + : b.uuid === this.activeWorkspace + ? 1 + : 0 ); for (const workspace of workspaces) { const container = this.workspaceElement(workspace.uuid); @@ -2910,7 +3237,11 @@ class nsZenWorkspaces { } } } - const containers = [...essentialsContainer, ...pinnedContainers, ...normalContainers]; + const containers = [ + ...essentialsContainer, + ...pinnedContainers, + ...normalContainers, + ]; for (const container of containers) { if (container.hasAttribute("cloned")) { continue; @@ -2939,7 +3270,7 @@ class nsZenWorkspaces { get allTabGroups() { if (!this._hasInitializedTabsStrip) { let children = this.tabboxChildren; - return children.filter((node) => gBrowser.isTabGroup(node)); + return children.filter(node => gBrowser.isTabGroup(node)); } const pinnedContainers = []; const normalContainers = []; @@ -2983,7 +3314,9 @@ class nsZenWorkspaces { reorganizeTabsAfterWelcome() { const children = gBrowser.tabContainer.arrowScrollbox.children; - const remainingTabs = Array.from(children).filter((child) => gBrowser.isTab(child)); + const remainingTabs = Array.from(children).filter(child => + gBrowser.isTab(child) + ); for (const tab of remainingTabs) { this.moveTabToWorkspace(tab, this.activeWorkspace); } @@ -3007,7 +3340,12 @@ class nsZenWorkspaces { } // Validate tab state - if (tab.closing || !tab.ownerGlobal || tab.ownerGlobal.closed || !tab.linkedBrowser) { + if ( + tab.closing || + !tab.ownerGlobal || + tab.ownerGlobal.closed || + !tab.linkedBrowser + ) { console.warn("Tab is no longer valid, cannot select it"); return; } @@ -3018,25 +3356,32 @@ class nsZenWorkspaces { if ( (tab.getAttribute("zen-workspace-id") !== this.activeWorkspace && !tab.hasAttribute("zen-essential")) || - (currentWorkspace.containerTabId !== parseInt(tab.parentNode.getAttribute("container")) && + (currentWorkspace.containerTabId !== + parseInt(tab.parentNode.getAttribute("container")) && this.containerSpecificEssentials) ) { // Use a mutex-like approach to prevent concurrent workspace changes if (this._workspaceChangeInProgress) { - console.warn("Workspace change already in progress, deferring tab switch"); + console.warn( + "Workspace change already in progress, deferring tab switch" + ); return; } let workspaceToSwitch = undefined; if (tab.hasAttribute("zen-essential")) { // Find first workspace with the same container - const containerTabId = parseInt(tab.parentNode.getAttribute("container")); + const containerTabId = parseInt( + tab.parentNode.getAttribute("container") + ); // +0 to convert to number workspaceToSwitch = this._workspaceCache.find( - (workspace) => workspace.containerTabId + 0 === containerTabId + workspace => workspace.containerTabId + 0 === containerTabId ); } else { - workspaceToSwitch = this.getWorkspaceFromId(tab.getAttribute("zen-workspace-id")); + workspaceToSwitch = this.getWorkspaceFromId( + tab.getAttribute("zen-workspace-id") + ); } if (!workspaceToSwitch) { console.error("No workspace found for tab, cannot switch"); @@ -3070,7 +3415,7 @@ class nsZenWorkspaces { return 0; } const activeWorkspace = this.activeWorkspace; - const workspace = workspaces.find((w) => w.uuid === activeWorkspace); + const workspace = workspaces.find(w => w.uuid === activeWorkspace); return workspace.containerTabId; } @@ -3114,7 +3459,8 @@ class nsZenWorkspaces { // Set the width of each icon to the maximum size they can fit on const widthPerButton = Math.max( - (parent.clientWidth - separation * (parent.children.length - 1)) / parent.children.length, + (parent.clientWidth - separation * (parent.children.length - 1)) / + parent.children.length, minButtonSize ); for (const icon of parent.children) { From 9c1164b9bcbb7a73bed16193bba769213121f91c Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:23:24 +0100 Subject: [PATCH 16/59] chore: Sync upstream to `Firefox 148.0.2` (#12724) --- README.md | 2 +- build/firefox-cache/l10n-last-commit-hash | 2 +- surfer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 20cdb6642..8482e4ec2 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne ### Firefox Versions -- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `148.0`! 🚀 +- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `148.0.2`! 🚀 - [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 148.0.2`! ### Contributing diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index 0300497dd..7057faa04 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -feb9bb27ea7a74dc7a50ab79c70f64b06cdeacc1 \ No newline at end of file +7b8f3620beb1de157d972de32f9f34320f0ae189 \ No newline at end of file diff --git a/surfer.json b/surfer.json index fbaede384..c2d36b089 100644 --- a/surfer.json +++ b/surfer.json @@ -5,7 +5,7 @@ "binaryName": "zen", "version": { "product": "firefox", - "version": "148.0", + "version": "148.0.2", "candidate": "148.0.2", "candidateBuild": 1 }, From eb176edf8ba09a0d6f8882596caa4ae9833200f3 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 11 Mar 2026 00:30:15 +0100 Subject: [PATCH 17/59] fix: Fixed race condition happening when moving tabs to a synced window, b=closes #12707, c=common --- src/zen/common/modules/ZenStartup.mjs | 5 ++++ src/zen/sessionstore/ZenWindowSync.sys.mjs | 29 ++++++++++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/zen/common/modules/ZenStartup.mjs b/src/zen/common/modules/ZenStartup.mjs index d64378d3b..31c339d21 100644 --- a/src/zen/common/modules/ZenStartup.mjs +++ b/src/zen/common/modules/ZenStartup.mjs @@ -11,6 +11,9 @@ class ZenStartup { #hasInitializedLayout = false; isReady = false; + promiseInitialized = new Promise(resolve => { + this.promiseInitializedResolve = resolve; + }); init() { this.openWatermark(); @@ -94,6 +97,8 @@ class ZenStartup { .getElementById("tabbrowser-arrowscrollbox") .setAttribute("orient", "vertical"); this.isReady = true; + this.promiseInitializedResolve(); + delete this.promiseInitializedResolve; }); } diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 22a53199f..2b95cf218 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -810,11 +810,18 @@ class nsZenWindowSync { aOtherTab, () => { this.log(`Swapping docshells between windows for tab ${aOurTab.id}`); - aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther( - aOurTab, - aOtherTab, - false - ); + try { + aOurTab.ownerGlobal.gBrowser.swapBrowsersAndCloseOther( + aOurTab, + aOtherTab, + false + ); + } catch (e) { + console.error( + `Error swapping browsers for tabs ${aOurTab.id} and ${aOtherTab.id}:`, + e + ); + } // Swap permanent keys if (!onClose) { @@ -1221,9 +1228,15 @@ class nsZenWindowSync { {}, /* zenForceSync = */ true ); - win.gZenWorkspaces.promiseInitialized.then(() => { - moveAllTabsToWindow(); - }); + win.addEventListener( + "MozBeforeInitialXULLayout", + () => { + win.gZenStartup.promiseInitialized.then(() => { + moveAllTabsToWindow(); + }); + }, + { once: true } + ); return; } moveAllTabsToWindow(true); From 23ceaf77213680460d0b4cc3bf95ed9a855e7e31 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 11 Mar 2026 00:57:38 +0100 Subject: [PATCH 18/59] feat: Make sure to add checks for invalid essential items, b=no-bug, c=workspaces --- src/zen/drag-and-drop/ZenDragAndDrop.js | 4 ++++ src/zen/workspaces/ZenWorkspaces.mjs | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/zen/drag-and-drop/ZenDragAndDrop.js b/src/zen/drag-and-drop/ZenDragAndDrop.js index 7534706b9..fbe896e32 100644 --- a/src/zen/drag-and-drop/ZenDragAndDrop.js +++ b/src/zen/drag-and-drop/ZenDragAndDrop.js @@ -1229,6 +1229,10 @@ let showIndicatorUnderNewTabButton = false; let dropBefore = false; let dropElementFromEvent = event.target.closest(dropZoneSelector); + if (!dropElement && dropElementFromEvent?.isZenFolder) { + // If we're dragging over a folder, we want to show the indicator on the folder itself, not the label. + dropElementFromEvent = dropElementFromEvent.labelElement; + } dropElement = dropElementFromEvent || dropElement; if (!dropElementFromEvent) { let hoveringPeriphery = !!event.target.closest( diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index fbe5a4e9e..d66024bec 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2072,14 +2072,10 @@ class nsZenWorkspaces { const essentialsContainer = this.getEssentialsSection( workspace.containerTabId ); - if ( - clonedEssentials[clonedEssentials.length - 1]?.contextId == - workspace.containerTabId - ) { - clonedEssentials[clonedEssentials.length - 1].repeat++; - clonedEssentials[clonedEssentials.length - 1].workspaces.push( - workspace - ); + let lastCloned = clonedEssentials[clonedEssentials.length - 1]; + if (lastCloned && lastCloned.contextId == workspace.containerTabId) { + lastCloned.repeat++; + lastCloned.workspaces.push(workspace); continue; } essentialsContainer.setAttribute("hidden", "true"); From 544fd480b19788622ab7d05180a2c67379182574 Mon Sep 17 00:00:00 2001 From: Thomas <150849104+Lecloow@users.noreply.github.com> Date: Wed, 11 Mar 2026 18:46:27 +0100 Subject: [PATCH 19/59] feat: close new tab popup on Cmd/Ctrl + T, p=#12734 --- src/zen/common/modules/ZenUIManager.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index 0178322ec..11a0fffd6 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -500,6 +500,12 @@ window.gZenUIManager = { return false; } + // Close the new tab popup on cmd/ctrl + t + if (!overridePreferance && gURLBar.hasAttribute("zen-newtab")) { + this.handleUrlbarClose(); + return true; + } + // Clear any existing timeout if (this._clearTimeout) { clearTimeout(this._clearTimeout); From 0ac56e9d04ede47327476bd6483e794f2c2e1b3a Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Wed, 11 Mar 2026 19:03:28 +0100 Subject: [PATCH 20/59] fix: Fixed chrome hide toolbar flag not being respected, b=closes #12736, c=no-component --- src/browser/base/content/browser-box-inc-xhtml.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/base/content/browser-box-inc-xhtml.patch b/src/browser/base/content/browser-box-inc-xhtml.patch index 6a066afe9..7e8420c22 100644 --- a/src/browser/base/content/browser-box-inc-xhtml.patch +++ b/src/browser/base/content/browser-box-inc-xhtml.patch @@ -1,5 +1,5 @@ diff --git a/browser/base/content/browser-box.inc.xhtml b/browser/base/content/browser-box.inc.xhtml -index 2faed30e09511c381051bc40910a883d1d7bc10d..3b8c89902502aa384473dd6f43be7ec49bad06ac 100644 +index 2faed30e09511c381051bc40910a883d1d7bc10d..959fa83f647a8919641c5b852a4cb8814fca9ab5 100644 --- a/browser/base/content/browser-box.inc.xhtml +++ b/browser/base/content/browser-box.inc.xhtml @@ -3,6 +3,9 @@ @@ -17,7 +17,7 @@ index 2faed30e09511c381051bc40910a883d1d7bc10d..3b8c89902502aa384473dd6f43be7ec4