chore(deps): update dependency pdfjs-dist to v5.4.624 (#8582)
Some checks are pending
Checks / main (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Deploy Documentation / Build and Deploy Documentation (push) Waiting to run
Dev / Test development (push) Waiting to run
Dev / Build Docker image (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile) (push) Blocked by required conditions
Dev / Check Docker build (Dockerfile.alpine) (push) Blocked by required conditions
/ Check Docker build (Dockerfile) (push) Waiting to run
/ Check Docker build (Dockerfile.alpine) (push) Waiting to run
/ Build Docker images (Dockerfile, ubuntu-24.04-arm, linux/arm64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.alpine, ubuntu-latest, linux/amd64) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v7) (push) Blocked by required conditions
/ Build Docker images (Dockerfile.legacy, ubuntu-24.04-arm, linux/arm/v8) (push) Blocked by required conditions
/ Merge manifest lists (push) Blocked by required conditions
playwright / E2E tests on linux-arm64 (push) Waiting to run
playwright / E2E tests on linux-x64 (push) Waiting to run

This commit is contained in:
Elian Doran 2026-02-19 22:20:38 +02:00 committed by GitHub
commit 5da90f9e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 1529 additions and 363 deletions

View File

@ -10,6 +10,6 @@
"@triliumnext/commons": "workspace:*"
},
"devDependencies": {
"pdfjs-dist": "5.4.530"
"pdfjs-dist": "5.4.624"
}
}

View File

@ -21,6 +21,7 @@ async function main() {
}
patchCacheBuster(`${build.outDir}/web/viewer.html`);
build.copy(`viewer/images`, `web/images`);
build.copy(`viewer/wasm`, `web/wasm`);
// Copy the custom files.
await buildScript("web/custom.mjs");

View File

@ -0,0 +1,66 @@
import { join } from "path";
import packageJson from "../package.json" with { type: "json" };
import fs from "fs/promises";
import * as yauzl from "yauzl";
import { createWriteStream } from "fs";
const version = packageJson.devDependencies["pdfjs-dist"];
const url = `https://github.com/mozilla/pdf.js/releases/download/v${version}/pdfjs-${version}-dist.zip`;
const FILES_TO_COPY = [
"web/images/",
"web/locale/",
"web/viewer.css",
"web/viewer.html",
"web/viewer.mjs",
"web/wasm/"
];
async function main() {
console.log(`Downloading pdfjs-dist v${version} from ${url}...`);
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Failed to download pdfjs-dist from ${url}: ${response.status} ${response.statusText}`);
}
const buffer = await response.arrayBuffer();
yauzl.fromBuffer(Buffer.from(buffer), { lazyEntries: true }, (err, zip) => {
zip.readEntry();
zip.on("entry", (entry: yauzl.Entry) => {
if (entry.fileName.endsWith("/") || !FILES_TO_COPY.some(prefix => entry.fileName.startsWith(prefix))) {
// Directory entry or not in the list of files to copy, skip
console.log("Skipping", entry.fileName);
zip.readEntry();
return;
}
const relativePath = entry.fileName.substring("web/".length);
zip.openReadStream(entry, (err, readStream) => {
if (err) {
console.error(`Failed to read ${entry.fileName} from zip:`, err);
return;
}
const outPath = join(__dirname, "../viewer", relativePath);
const outStream = createWriteStream(outPath);
readStream.pipe(outStream);
outStream.on("finish", () => {
console.log(`Extracted ${relativePath} to ${outPath}`);
});
});
zip.readEntry();
});
zip.on("end", async () => {
console.log("Finished extracting pdfjs-dist files.");
await patchViewerHTML();
});
});
};
async function patchViewerHTML() {
const viewerPath = join(__dirname, "../viewer/viewer.html");
let content = await fs.readFile(viewerPath, "utf-8");
content = content.replace(` <link rel="stylesheet" href="viewer.css" />`, ` <link rel="stylesheet" href="viewer.css" />\n <link rel="stylesheet" href="custom.css" />`);
content = content.replace(` <script src="viewer.mjs" type="module"></script>`, ` <script src="custom.mjs" type="module"></script>\n <script src="viewer.mjs" type="module"></script>`);
await fs.writeFile(viewerPath, content, "utf-8");
}
main();

View File

@ -44,7 +44,7 @@ function hideSidebar() {
if (spacer instanceof HTMLElement && spacer.classList.contains("toolbarButtonSpacer")) {
spacer.remove();
}
toggleButtonEl.remove();
toggleButtonEl.style.display = "none";
}
}

View File

@ -167,10 +167,10 @@ pdfjs-printing-not-ready = Warnowanje: PDF njejo se za śišćanje dopołnje zac
## Tooltips and alt text for side panel toolbar buttons
pdfjs-toggle-sidebar-button =
.title = Bócnicu pokazaś/schowaś
.title = Bocnicu pokazaś/schowaś
pdfjs-toggle-sidebar-notification-button =
.title = Bocnicu pśešaltowaś (dokument rozrědowanje/pśipiski/warstwy wopśimujo)
pdfjs-toggle-sidebar-button-label = Bócnicu pokazaś/schowaś
pdfjs-toggle-sidebar-button-label = Bocnicu pokazaś/schowaś
pdfjs-document-outline-button =
.title = Dokumentowe naraźenje pokazaś (dwójne kliknjenje, aby se wšykne zapiski pokazali/schowali)
pdfjs-document-outline-button-label = Dokumentowa struktura
@ -389,9 +389,9 @@ pdfjs-editor-comments-sidebar-title =
*[other] { $count } komentarow
}
pdfjs-editor-comments-sidebar-close-button =
.title = Bócnicu zacyniś
.aria-label = Bócnicu zacyniś
pdfjs-editor-comments-sidebar-close-button-label = Bócnicu zacyniś
.title = Bocnicu zacyniś
.aria-label = Bocnicu zacyniś
pdfjs-editor-comments-sidebar-close-button-label = Bocnicu zacyniś
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = Wiźiśo něco wobspomnjeśa gódnego? Wuzwigniśo to a zawóstajśo komentar.
pdfjs-editor-comments-sidebar-no-comments-link = Dalšne informacije

View File

@ -561,6 +561,7 @@ pdfjs-editor-undo-bar-message-freetext = Text removed
pdfjs-editor-undo-bar-message-ink = Drawing removed
pdfjs-editor-undo-bar-message-stamp = Image removed
pdfjs-editor-undo-bar-message-signature = Signature removed
pdfjs-editor-undo-bar-message-comment = Comment removed
# Variables:
# $count (Number) - the number of removed annotations.
pdfjs-editor-undo-bar-message-multiple =

View File

@ -628,6 +628,11 @@ pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = Scomence a scrivi…
pdfjs-editor-edit-comment-dialog-cancel-button = Anule
## Edit a comment button in the editor toolbar
pdfjs-editor-add-comment-button =
.title = Zonte coment
## Main menu for adding/removing signatures
pdfjs-editor-delete-signature-button1 =

View File

@ -318,6 +318,12 @@ pdfjs-editor-signature-button-label = Қолтаңбаны қосу
## Default editor aria labels
# “Highlight” is a noun, the string is used on the editor for highlights.
pdfjs-editor-highlight-editor =
.aria-label = Ерекшелеу түзеткіші
# “Drawing” is a noun, the string is used on the editor for drawings.
pdfjs-editor-ink-editor =
.aria-label = Сурет салу түзеткіші
# Used when a signature editor is selected/hovered.
# Variables:
# $description (String) - a string describing/labeling the signature.
@ -380,6 +386,8 @@ pdfjs-editor-comments-sidebar-close-button =
.title = Бүйір панелін жабу
.aria-label = Бүйір панелін жабу
pdfjs-editor-comments-sidebar-close-button-label = Бүйір панелін жабу
# Instructional copy to add a comment by selecting text or an annotations.
pdfjs-editor-comments-sidebar-no-comments1 = Назар аударарлық бірдеңе көрдіңіз бе? Оны ерекшелеп, түсіндірме қалдырыңыз.
pdfjs-editor-comments-sidebar-no-comments-link = Көбірек білу
## Alt-text dialog
@ -513,6 +521,7 @@ pdfjs-editor-alt-text-settings-close-button = Жабу
## Accessibility labels (announced by screen readers) for objects added to the editor.
pdfjs-editor-highlight-added-alert = Ерекшелеу қосылды
pdfjs-editor-freetext-added-alert = Мәтін қосылды
pdfjs-editor-ink-added-alert = Сызба қосылды
pdfjs-editor-stamp-added-alert = Сурет қосылды
@ -586,6 +595,8 @@ pdfjs-editor-add-signature-save-checkbox = Қолтаңбаны сақтау
pdfjs-editor-add-signature-save-warning-message = Сақталған 5 қолтаңбаның шегіне жеттіңіз. Көбірек сақтау үшін біреуін алып тастаңыз.
pdfjs-editor-add-signature-image-upload-error-title = Суретті жүктеп жіберу мүмкін емес.
pdfjs-editor-add-signature-image-upload-error-description = Желі байланысын тексеріңіз немесе басқа бейнені қолданып көріңіз.
pdfjs-editor-add-signature-image-no-data-error-title = Бұл суретті қолтаңбаға түрлендіру мүмкін емес
pdfjs-editor-add-signature-image-no-data-error-description = Басқа суретті жүктеп салып көріңіз.
pdfjs-editor-add-signature-error-close-button = Жабу
## Dialog buttons
@ -594,10 +605,27 @@ pdfjs-editor-add-signature-cancel-button = Бас тарту
pdfjs-editor-add-signature-add-button = Қосу
pdfjs-editor-edit-signature-update-button = Жаңарту
## Comment popup
pdfjs-editor-edit-comment-popup-button-label = Түсіндірмені түзету
pdfjs-editor-edit-comment-popup-button =
.title = Түсіндірмені түзету
pdfjs-editor-delete-comment-popup-button-label = Түсіндірмені өшіру
pdfjs-editor-delete-comment-popup-button =
.title = Түсіндірмені өшіру
pdfjs-show-comment-button =
.title = Түсіндірмені көрсету
## Edit a comment dialog
# An existing comment is edited
pdfjs-editor-edit-comment-dialog-title-when-editing = Түсіндірмені түзету
pdfjs-editor-edit-comment-dialog-save-button-when-editing = Жаңарту
# No existing comment
pdfjs-editor-edit-comment-dialog-title-when-adding = Түсіндірмені қосу
pdfjs-editor-edit-comment-dialog-save-button-when-adding = Қосу
pdfjs-editor-edit-comment-dialog-text-input =
.placeholder = Теріп бастаңыз…
pdfjs-editor-edit-comment-dialog-cancel-button = Бас тарту
## Edit a comment button in the editor toolbar

View File

@ -309,6 +309,10 @@ pdfjs-editor-signature-add-signature-button-label = പുതിയ ഒപ്പ
# $description (String) - a string describing/labeling the signature.
pdfjs-editor-add-saved-signature-button =
.title = കരുതിവച്ച ഒപ്പു് : { $description }
pdfjs-editor-comments-sidebar-close-button =
.title = അണിവക്കം അടയ്ക്കുക
.aria-label = അണിവക്കം അടയ്ക്കുക
pdfjs-editor-comments-sidebar-close-button-label = അണിവക്കം അടയ്ക്കുക
## Alt-text dialog

View File

@ -70,10 +70,10 @@ pdfjs-page-rotate-ccw-button =
.title = Повернуть против часовой стрелки
pdfjs-page-rotate-ccw-button-label = Повернуть против часовой стрелки
pdfjs-cursor-text-select-tool-button =
.title = Включить Инструмент «Выделение текста»
.title = Включить инструмент «Выделение текста»
pdfjs-cursor-text-select-tool-button-label = Инструмент «Выделение текста»
pdfjs-cursor-hand-tool-button =
.title = Включить Инструмент «Рука»
.title = Включить инструмент «Рука»
pdfjs-cursor-hand-tool-button-label = Инструмент «Рука»
pdfjs-scroll-page-button =
.title = Использовать прокрутку страниц
@ -363,7 +363,7 @@ pdfjs-editor-free-highlight-thickness-input = Толщина
pdfjs-editor-free-highlight-thickness-title =
.title = Изменить толщину при выделении элементов, кроме текста
pdfjs-editor-add-signature-container =
.aria-label = Управление подписями и сохраненные подписи
.aria-label = Управление подписями и сохранённые подписи
pdfjs-editor-signature-add-signature-button =
.title = Добавить новую подпись
pdfjs-editor-signature-add-signature-button-label = Добавить новую подпись

View File

@ -883,6 +883,9 @@
}
.textLayer{
--csstools-color-scheme--light:initial;
color-scheme:only light;
position:absolute;
text-align:initial;
inset:0;
@ -5319,6 +5322,14 @@
gap:16px;
}
button.hasPopupMenu[aria-expanded="true"] + menu{
visibility:visible;
}
button.hasPopupMenu[aria-expanded="false"] + menu{
visibility:hidden;
}
.popupMenu{
--menuitem-checkmark-icon:url(images/checkmark.svg);
--menu-mark-icon-size:0;
@ -5437,6 +5448,7 @@
top:1px;
margin:0;
padding:5px;
box-sizing:border-box;
background:var(--menu-bg);
background-blend-mode:var(--menu-background-blend-mode);
@ -5780,25 +5792,35 @@
--csstools-light-dark-toggle--143:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--header-shadow:0 0.25px 0.75px -0.75px var(--csstools-light-dark-toggle--142, rgb(0 0 0 / 0.05)), 0 2px 6px -6px var(--csstools-light-dark-toggle--143, rgb(0 0 0 / 0.1));
--image-outline:none;
--image-border-width:4px;
--image-border-width:6px;
--csstools-light-dark-toggle--144:var(--csstools-color-scheme--light) #3a3944;
--image-border-color:var(--csstools-light-dark-toggle--144, #cfcfd8);
--csstools-light-dark-toggle--145:var(--csstools-color-scheme--light) #3a3944;
--image-hover-border-color:var(--csstools-light-dark-toggle--145, #cfcfd8);
--image-hover-border-color:#bfbfc9;
--image-current-border-color:var(--button-focus-outline-color);
--image-current-focused-outline-color:var(--image-hover-border-color);
--csstools-light-dark-toggle--146:var(--csstools-color-scheme--light) #23222b;
--image-page-number-bg:var(--csstools-light-dark-toggle--146, #f0f0f4);
--csstools-light-dark-toggle--145:var(--csstools-color-scheme--light) #23222b;
--image-page-number-bg:var(--csstools-light-dark-toggle--145, #f0f0f4);
--image-page-number-fg:var(--text-color);
--image-current-page-number-bg:var(--image-current-border-color);
--csstools-light-dark-toggle--146:var(--csstools-color-scheme--light) #15141a;
--image-current-page-number-fg:var(--csstools-light-dark-toggle--146, #fff);
--csstools-light-dark-toggle--147:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--148:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--147, rgb(0 0 0 / 0.05)), 0 0 0 1px var(--image-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--148, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--149:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--150:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-hover-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--149, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--150, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--151:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--152:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-current-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--151, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-current-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--152, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--150:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--csstools-light-dark-toggle--151:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-hover-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--149, rgb(0 0 0 / 0.05)), 0 0 0 1px var(--csstools-light-dark-toggle--150, rgb(21 20 26 / 0.1)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--151, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--152:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--153:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-current-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--152, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-current-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--153, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--154:var(--csstools-color-scheme--light) rgb(0 202 219 / 0.08);
--image-dragging-placeholder-bg:var(--csstools-light-dark-toggle--154, rgb(0 98 250 / 0.08));
--multiple-dragging-bg:white;
--image-multiple-dragging-shadow:0 0 0 var(--image-border-width) var(--image-current-border-color), var(--image-border-width) var(--image-border-width) 0 calc(var(--image-border-width) / 2) var(--multiple-dragging-bg), var(--image-border-width) var(--image-border-width) 0 calc(3 * var(--image-border-width) / 2) var(--image-current-border-color);
--image-dragging-shadow:0 0 0 var(--image-border-width) var(--image-current-border-color);
--csstools-light-dark-toggle--155:var(--csstools-color-scheme--light) #15141a;
--multiple-dragging-text-color:var(--csstools-light-dark-toggle--155, #fbfbfe);
}
@supports (color: light-dark(red, red)) and (color: rgb(0 0 0 / 0)){
@ -5857,16 +5879,26 @@
@supports (color: light-dark(red, red)){
#viewsManager{
--image-border-color:light-dark(#cfcfd8, #3a3944);
--image-hover-border-color:light-dark(#cfcfd8, #3a3944);
--image-page-number-bg:light-dark(#f0f0f4, #23222b);
--image-current-page-number-fg:light-dark(#fff, #15141a);
}
}
@supports (color: light-dark(red, red)) and (color: rgb(0 0 0 / 0)){
#viewsManager{
--image-shadow:0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)), 0 0 0 1px var(--image-border-color), 0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-hover-shadow:0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-hover-shadow:0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)), 0 0 0 1px light-dark(rgb(21 20 26 / 0.1), rgb(251 251 254 / 0.1)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-current-shadow:0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)), 0 0 0 var(--image-border-width) var(--image-current-border-color), 0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-dragging-placeholder-bg:light-dark(
rgb(0 98 250 / 0.08),
rgb(0 202 219 / 0.08)
);
}
}
@supports (color: light-dark(red, red)){
#viewsManager{
--multiple-dragging-text-color:light-dark(#fbfbfe, #15141a);
}
}
@ -5906,19 +5938,24 @@
--header-shadow:0 0.25px 0.75px -0.75px var(--csstools-light-dark-toggle--142, rgb(0 0 0 / 0.05)), 0 2px 6px -6px var(--csstools-light-dark-toggle--143, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--144:var(--csstools-color-scheme--light) #3a3944;
--image-border-color:var(--csstools-light-dark-toggle--144, #cfcfd8);
--csstools-light-dark-toggle--145:var(--csstools-color-scheme--light) #3a3944;
--image-hover-border-color:var(--csstools-light-dark-toggle--145, #cfcfd8);
--csstools-light-dark-toggle--146:var(--csstools-color-scheme--light) #23222b;
--image-page-number-bg:var(--csstools-light-dark-toggle--146, #f0f0f4);
--csstools-light-dark-toggle--145:var(--csstools-color-scheme--light) #23222b;
--image-page-number-bg:var(--csstools-light-dark-toggle--145, #f0f0f4);
--csstools-light-dark-toggle--146:var(--csstools-color-scheme--light) #15141a;
--image-current-page-number-fg:var(--csstools-light-dark-toggle--146, #fff);
--csstools-light-dark-toggle--147:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--148:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--147, rgb(0 0 0 / 0.05)), 0 0 0 1px var(--image-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--148, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--149:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--150:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-hover-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--149, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--150, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--151:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--152:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-current-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--151, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-current-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--152, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--150:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--csstools-light-dark-toggle--151:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-hover-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--149, rgb(0 0 0 / 0.05)), 0 0 0 1px var(--csstools-light-dark-toggle--150, rgb(21 20 26 / 0.1)), 0 0 0 var(--image-border-width) var(--image-hover-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--151, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--152:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--153:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--image-current-shadow:0 0.375px 1.5px 0 var(--csstools-light-dark-toggle--152, rgb(0 0 0 / 0.05)), 0 0 0 var(--image-border-width) var(--image-current-border-color), 0 3px 12px 0 var(--csstools-light-dark-toggle--153, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--154:var(--csstools-color-scheme--light) rgb(0 202 219 / 0.08);
--image-dragging-placeholder-bg:var(--csstools-light-dark-toggle--154, rgb(0 98 250 / 0.08));
--csstools-light-dark-toggle--155:var(--csstools-color-scheme--light) #15141a;
--multiple-dragging-text-color:var(--csstools-light-dark-toggle--155, #fbfbfe);
}
}
@ -5953,6 +5990,7 @@
--image-current-focused-outline-color:var(--image-hover-border-color);
--image-page-number-bg:ButtonFace;
--image-page-number-fg:CanvasText;
--multiple-dragging-bg:Canvas;
}
}
@ -6225,6 +6263,7 @@
:is(:is(:is(#viewsManager #viewsManagerHeader) #viewsManagerStatus) #viewsManagerStatusAction) #actionSelector{
height:32px;
min-width:115px;
width:auto;
display:block;
}
@ -6261,8 +6300,9 @@
background-color:var(--button-active-fg) !important;
}
:is(:is(:is(:is(#viewsManager #viewsManagerHeader) #viewsManagerStatus) #viewsManagerStatusAction) #actionSelector) > .contextMenu{
min-width:115px;
:is(:is(:is(:is(#viewsManager #viewsManagerHeader) #viewsManagerStatus) #viewsManagerStatusAction) #actionSelector) > .popupMenu{
width:auto;
z-index:1;
}
:is(:is(#viewsManager #viewsManagerHeader) #viewsManagerStatus) #viewsManagerStatusUndo{
@ -6354,6 +6394,10 @@
overflow:auto;
}
:is(#viewsManager #viewsManagerContent):has(#thumbnailsView.isDragging){
overflow-x:hidden;
}
:is(#viewsManager #viewsManagerContent) #thumbnailsView{
--thumbnail-width:126px;
@ -6362,11 +6406,36 @@
align-items:center;
justify-content:space-evenly;
padding:20px 32px;
gap:16px;
gap:20px;
width:100%;
box-sizing:border-box;
position:relative;
}
.isDragging:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView){
cursor:grabbing;
}
:is(.isDragging:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage:hover{
cursor:grabbing;
}
:is(:is(.isDragging:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage:hover):not([aria-current="page"]){
box-shadow:var(--image-shadow);
}
:is(.isDragging:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > input{
pointer-events:none;
}
.isDragging:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .dragMarker{
position:absolute;
top:0;
left:0;
border:2px solid var(--indicator-color);
contain:strict;
}
:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail{
display:inline-flex;
justify-content:center;
@ -6378,38 +6447,56 @@
scroll-margin-top:20px;
}
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > input{
display:none;
}
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail)::after{
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail):not(.isDragging)::after{
content:attr(page-number);
border-radius:8px;
background-color:var(--image-page-number-bg);
color:var(--image-page-number-fg);
position:absolute;
bottom:5px;
right:calc(var(--thumbnail-width) / 2);
inset-inline-end:calc(var(--thumbnail-width) / 2);
min-width:32px;
height:16px;
text-align:center;
translate:50%;
translate:calc(var(--dir-factor) * 50%);
font:menu;
font-size:13px;
font-style:normal;
font-weight:400;
line-height:normal;
pointer-events:none;
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail):has([aria-current="page"]):not(.isDragging)::after{
background-color:var(--image-current-page-number-bg);
color:var(--image-current-page-number-fg);
}
.isDragging:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > input{
visibility:hidden;
}
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > input{
margin:0;
}
:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage{
--thumbnail-dragging-scale:1.4;
width:var(--thumbnail-width);
border:none;
border-radius:8px;
box-shadow:var(--image-shadow);
box-sizing:content-box;
outline:var(--image-outline);
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
.missingThumbnailImage:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage){
@ -6435,13 +6522,67 @@
box-shadow:var(--image-current-shadow);
}
.placeholder:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage){
background-color:var(--image-dragging-placeholder-bg);
box-shadow:none !important;
}
.draggingThumbnail:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage){
position:absolute;
left:0;
top:0;
z-index:1;
transform-origin:0 0 0;
scale:calc(1 / var(--thumbnail-dragging-scale));
pointer-events:none;
box-shadow:var(--image-dragging-shadow);
}
.draggingThumbnail.multiple:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage){
box-shadow:var(--image-multiple-dragging-shadow);
}
.draggingThumbnail.multiple:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage) > img{
position:absolute;
top:0;
left:0;
width:var(--thumbnail-width);
border:none;
border-radius:8px;
box-sizing:content-box;
outline:none;
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
.draggingThumbnail.multiple:is(:is(:is(:is(#viewsManager #viewsManagerContent) #thumbnailsView) > .thumbnail) > .thumbnailImage)::after{
content:attr(data-multiple-count);
border-radius:calc(8px * var(--thumbnail-dragging-scale));
background-color:var(--indicator-color);
color:var(--multiple-dragging-text-color);
position:absolute;
inset-block-end:calc(4px * var(--thumbnail-dragging-scale));
inset-inline-start:calc(4px * var(--thumbnail-dragging-scale));
min-width:calc(32px * var(--thumbnail-dragging-scale));
height:calc(16px * var(--thumbnail-dragging-scale));
text-align:center;
font:menu;
font-size:calc(13px * var(--thumbnail-dragging-scale));
font-style:normal;
font-weight:400;
line-height:normal;
contain:strict;
}
:is(#viewsManager #viewsManagerContent) #attachmentsView{
--csstools-light-dark-toggle--153:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.8);
--attachment-color:var(--csstools-light-dark-toggle--153, rgb(0 0 0 / 0.8));
--csstools-light-dark-toggle--154:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.15);
--attachment-bg-color:var(--csstools-light-dark-toggle--154, rgb(0 0 0 / 0.15));
--csstools-light-dark-toggle--155:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.9);
--attachment-hover-color:var(--csstools-light-dark-toggle--155, rgb(0 0 0 / 0.9));
--csstools-light-dark-toggle--156:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.8);
--attachment-color:var(--csstools-light-dark-toggle--156, rgb(0 0 0 / 0.8));
--csstools-light-dark-toggle--157:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.15);
--attachment-bg-color:var(--csstools-light-dark-toggle--157, rgb(0 0 0 / 0.15));
--csstools-light-dark-toggle--158:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.9);
--attachment-hover-color:var(--csstools-light-dark-toggle--158, rgb(0 0 0 / 0.9));
}
@supports (color: light-dark(red, red)) and (color: rgb(0 0 0 / 0)){
@ -6461,12 +6602,12 @@
@supports not (color: light-dark(tan, tan)){
:is(:is(#viewsManager #viewsManagerContent) #attachmentsView) *{
--csstools-light-dark-toggle--153:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.8);
--attachment-color:var(--csstools-light-dark-toggle--153, rgb(0 0 0 / 0.8));
--csstools-light-dark-toggle--154:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.15);
--attachment-bg-color:var(--csstools-light-dark-toggle--154, rgb(0 0 0 / 0.15));
--csstools-light-dark-toggle--155:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.9);
--attachment-hover-color:var(--csstools-light-dark-toggle--155, rgb(0 0 0 / 0.9));
--csstools-light-dark-toggle--156:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.8);
--attachment-color:var(--csstools-light-dark-toggle--156, rgb(0 0 0 / 0.8));
--csstools-light-dark-toggle--157:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.15);
--attachment-bg-color:var(--csstools-light-dark-toggle--157, rgb(0 0 0 / 0.15));
--csstools-light-dark-toggle--158:var(--csstools-color-scheme--light) rgb(255 255 255 / 0.9);
--attachment-hover-color:var(--csstools-light-dark-toggle--158, rgb(0 0 0 / 0.9));
}
}
@ -6502,13 +6643,13 @@
}
.sidebar{
--csstools-light-dark-toggle--156:var(--csstools-color-scheme--light) #23222b;
--sidebar-bg-color:var(--csstools-light-dark-toggle--156, #fff);
--csstools-light-dark-toggle--157:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--sidebar-border-color:var(--csstools-light-dark-toggle--157, rgb(21 20 26 / 0.1));
--csstools-light-dark-toggle--158:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--159:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--sidebar-box-shadow:0 0.25px 0.75px var(--csstools-light-dark-toggle--158, rgb(0 0 0 / 0.05)), 0 2px 6px 0 var(--csstools-light-dark-toggle--159, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--159:var(--csstools-color-scheme--light) #23222b;
--sidebar-bg-color:var(--csstools-light-dark-toggle--159, #fff);
--csstools-light-dark-toggle--160:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--sidebar-border-color:var(--csstools-light-dark-toggle--160, rgb(21 20 26 / 0.1));
--csstools-light-dark-toggle--161:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--162:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--sidebar-box-shadow:0 0.25px 0.75px var(--csstools-light-dark-toggle--161, rgb(0 0 0 / 0.05)), 0 2px 6px 0 var(--csstools-light-dark-toggle--162, rgb(0 0 0 / 0.1));
--sidebar-backdrop-filter:none;
--sidebar-border-radius:8px;
--sidebar-padding:5px;
@ -6516,8 +6657,8 @@
--sidebar-max-width:632px;
--sidebar-width:239px;
--resizer-width:4px;
--csstools-light-dark-toggle--160:var(--csstools-color-scheme--light) #00cadb;
--resizer-hover-bg-color:var(--csstools-light-dark-toggle--160, #0062fa);
--csstools-light-dark-toggle--163:var(--csstools-color-scheme--light) #00cadb;
--resizer-hover-bg-color:var(--csstools-light-dark-toggle--163, #0062fa);
}
@supports (color: light-dark(red, red)){
@ -6545,15 +6686,15 @@
@supports not (color: light-dark(tan, tan)){
.sidebar *{
--csstools-light-dark-toggle--156:var(--csstools-color-scheme--light) #23222b;
--sidebar-bg-color:var(--csstools-light-dark-toggle--156, #fff);
--csstools-light-dark-toggle--157:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--sidebar-border-color:var(--csstools-light-dark-toggle--157, rgb(21 20 26 / 0.1));
--csstools-light-dark-toggle--158:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--159:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--sidebar-box-shadow:0 0.25px 0.75px var(--csstools-light-dark-toggle--158, rgb(0 0 0 / 0.05)), 0 2px 6px 0 var(--csstools-light-dark-toggle--159, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--160:var(--csstools-color-scheme--light) #00cadb;
--resizer-hover-bg-color:var(--csstools-light-dark-toggle--160, #0062fa);
--csstools-light-dark-toggle--159:var(--csstools-color-scheme--light) #23222b;
--sidebar-bg-color:var(--csstools-light-dark-toggle--159, #fff);
--csstools-light-dark-toggle--160:var(--csstools-color-scheme--light) rgb(251 251 254 / 0.1);
--sidebar-border-color:var(--csstools-light-dark-toggle--160, rgb(21 20 26 / 0.1));
--csstools-light-dark-toggle--161:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.2);
--csstools-light-dark-toggle--162:var(--csstools-color-scheme--light) rgb(0 0 0 / 0.4);
--sidebar-box-shadow:0 0.25px 0.75px var(--csstools-light-dark-toggle--161, rgb(0 0 0 / 0.05)), 0 2px 6px 0 var(--csstools-light-dark-toggle--162, rgb(0 0 0 / 0.1));
--csstools-light-dark-toggle--163:var(--csstools-color-scheme--light) #00cadb;
--resizer-hover-bg-color:var(--csstools-light-dark-toggle--163, #0062fa);
}
}
@ -6580,6 +6721,7 @@
max-width:var(--sidebar-max-width);
-webkit-backdrop-filter:var(--sidebar-backdrop-filter);
backdrop-filter:var(--sidebar-backdrop-filter);
box-sizing:border-box;
}
.sidebar .sidebarResizer{
@ -6631,8 +6773,8 @@
--page-border:9px solid transparent;
--spreadHorizontalWrapped-margin-LR:-3.5px;
--loading-icon-delay:400ms;
--csstools-light-dark-toggle--161:var(--csstools-color-scheme--light) #0df;
--focus-ring-color:var(--csstools-light-dark-toggle--161, #0060df);
--csstools-light-dark-toggle--164:var(--csstools-color-scheme--light) #0df;
--focus-ring-color:var(--csstools-light-dark-toggle--164, #0060df);
--focus-ring-outline:2px solid var(--focus-ring-color);
}
@ -6645,8 +6787,8 @@
@supports not (color: light-dark(tan, tan)){
:root *{
--csstools-light-dark-toggle--161:var(--csstools-color-scheme--light) #0df;
--focus-ring-color:var(--csstools-light-dark-toggle--161, #0060df);
--csstools-light-dark-toggle--164:var(--csstools-color-scheme--light) #0df;
--focus-ring-color:var(--csstools-light-dark-toggle--164, #0060df);
}
}

View File

@ -34,8 +34,8 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="viewer.css" />
<link rel="stylesheet" href="custom.css" />
<script src="custom.mjs" type="module"></script>
<script src="viewer.mjs" type="module"></script>
<script src="custom.mjs" type="module"></script>
<script src="viewer.mjs" type="module"></script>
</head>
<body tabindex="0">
@ -71,7 +71,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="viewsManagerTitle">
<div id="viewsManagerSelector">
<button
class="toolbarButton viewsManagerButton"
class="toolbarButton viewsManagerButton hasPopupMenu"
type="button"
id="viewsManagerSelectorButton"
tabindex="0"
@ -82,7 +82,7 @@ See https://github.com/adobe-type-tools/cmap-resources
>
<span data-l10n-id="pdfjs-views-manager-view-selector-button-label"></span>
</button>
<menu id="viewsManagerSelectorOptions" role="listbox" class="popupMenu hidden withMark">
<menu id="viewsManagerSelectorOptions" role="listbox" class="popupMenu withMark">
<li>
<button id="thumbnailsViewMenu" role="option" type="button" tabindex="-1">
<span data-l10n-id="pdfjs-views-manager-pages-option-label"></span>
@ -128,7 +128,7 @@ See https://github.com/adobe-type-tools/cmap-resources
</button>
</div>
<div id="viewsManagerStatus">
<div id="viewsManagerStatusAction" class="hidden">
<div id="viewsManagerStatusAction">
<span
id="viewsManagerStatusActionLabel"
class="viewsManagerStatusLabel"
@ -137,32 +137,33 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="actionSelector">
<button
id="viewsManagerStatusActionButton"
class="viewsManagerButton"
class="viewsManagerButton hasPopupMenu"
type="button"
tabindex="0"
aria-haspopup="menu"
aria-controls="viewsManagerStatusActionOptions"
aria-expanded="false"
>
<span data-l10n-id="pdfjs-views-manager-pages-status-action-button-label"></span>
</button>
<menu id="viewsManagerStatusActionOptions" class="popupMenu hidden">
<menu id="viewsManagerStatusActionOptions" class="popupMenu">
<li>
<button id="viewsManagerStatusActionCopy" class="noIcon" role="menuitem" type="button" tabindex="0">
<button id="viewsManagerStatusActionCopy" class="noIcon" role="menuitem" type="button" tabindex="0" disabled>
<span data-l10n-id="pdfjs-views-manager-pages-status-copy-button-label"></span>
</button>
</li>
<li>
<button id="viewsManagerStatusActionCut" class="noIcon" role="menuitem" type="button" tabindex="0">
<button id="viewsManagerStatusActionCut" class="noIcon" role="menuitem" type="button" tabindex="0" disabled>
<span data-l10n-id="pdfjs-views-manager-pages-status-cut-button-label"></span>
</button>
</li>
<li>
<button id="viewsManagerStatusActionDelete" class="noIcon" role="menuitem" type="button" tabindex="0">
<button id="viewsManagerStatusActionDelete" class="noIcon" role="menuitem" type="button" tabindex="0" disabled>
<span data-l10n-id="pdfjs-views-manager-pages-status-delete-button-label"></span>
</button>
</li>
<li>
<button id="viewsManagerStatusActionSaveAs" class="noIcon" role="menuitem" type="button" tabindex="0">
<button id="viewsManagerStatusActionSaveAs" class="noIcon" role="menuitem" type="button" tabindex="0" disabled>
<span data-l10n-id="pdfjs-views-manager-pages-status-save-as-button-label"></span>
</button>
</li>
@ -218,7 +219,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="attachmentsView" class="hidden"></div>
<div id="layersView" class="treeView hidden"></div>
</div>
<div id="viewsManagerResizer" class="sidebarResizer"></div>
<div id="viewsManagerResizer" class="sidebarResizer" role="separator" aria-controls="viewsManager" tabindex="0"></div>
</div>
<!-- sidebarContainer -->

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,196 @@
// Copyright 2014 The PDFium Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,39 @@
/*
* The copyright in this software is being made available under the 2-clauses
* BSD License, included below. This software may be subject to other third
* party and contributor rights, including patent rights, and no such rights
* are granted under this license.
*
* Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
* Copyright (c) 2002-2014, Professor Benoit Macq
* Copyright (c) 2003-2014, Antonin Descampe
* Copyright (c) 2003-2009, Francois-Olivier Devaux
* Copyright (c) 2005, Herve Drolon, FreeImage Team
* Copyright (c) 2002-2003, Yannick Verschueren
* Copyright (c) 2001-2003, David Janssens
* Copyright (c) 2011-2012, Centre National d'Etudes Spatiales (CNES), France
* Copyright (c) 2012, CS Systemes d'Information, France
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -0,0 +1,13 @@
Copyright 2026 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,22 @@
Copyright (c) 2024, Mozilla Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,22 @@
Copyright (c) 2025, Mozilla Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,21 @@
qcms
Copyright (C) 2009-2024 Mozilla Corporation
Copyright (C) 1998-2007 Marti Maria
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

17
pnpm-lock.yaml generated
View File

@ -1418,8 +1418,8 @@ importers:
version: link:../commons
devDependencies:
pdfjs-dist:
specifier: 5.4.530
version: 5.4.530
specifier: 5.4.624
version: 5.4.624
packages/share-theme:
dependencies:
@ -11360,6 +11360,9 @@ packages:
node-notifier@10.0.1:
resolution: {integrity: sha512-YX7TSyDukOZ0g+gmzjB6abKu+hTGvO8+8+gIFDsRCU2t8fLV/P2unmt+LGFaIa4y64aX98Qksa97rgz4vMNeLQ==}
node-readable-to-web-readable-stream@0.4.2:
resolution: {integrity: sha512-/cMZNI34v//jUTrI+UIo4ieHAB5EZRY/+7OmXZgBxaWBMcW2tGdceIw06RFxWxrKZ5Jp3sI2i5TsRo+CBhtVLQ==}
node-readfiles@0.2.0:
resolution: {integrity: sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==}
@ -11850,8 +11853,8 @@ packages:
resolution: {integrity: sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q==}
hasBin: true
pdfjs-dist@5.4.530:
resolution: {integrity: sha512-r1hWsSIGGmyYUAHR26zSXkxYWLXLMd6AwqcaFYG9YUZ0GBf5GvcjJSeo512tabM4GYFhxhl5pMCmPr7Q72Rq2Q==}
pdfjs-dist@5.4.624:
resolution: {integrity: sha512-sm6TxKTtWv1Oh6n3C6J6a8odejb5uO4A4zo/2dgkHuC0iu8ZMAXOezEODkVaoVp8nX1Xzr+0WxFJJmUr45hQzg==}
engines: {node: '>=20.16.0 || >=22.3.0'}
pe-library@1.0.1:
@ -28205,6 +28208,9 @@ snapshots:
uuid: 8.3.2
which: 2.0.2
node-readable-to-web-readable-stream@0.4.2:
optional: true
node-readfiles@0.2.0:
dependencies:
es6-promise: 3.3.1
@ -28780,9 +28786,10 @@ snapshots:
ieee754: 1.2.1
resolve-protobuf-schema: 2.1.0
pdfjs-dist@5.4.530:
pdfjs-dist@5.4.624:
optionalDependencies:
'@napi-rs/canvas': 0.1.88
node-readable-to-web-readable-stream: 0.4.2
pe-library@1.0.1: {}