Skip to content

Commit

Permalink
Update PDF.js to v3.10.111
Browse files Browse the repository at this point in the history
  • Loading branch information
tamuratak committed Sep 2, 2023
1 parent 7de8ca1 commit c3e2bd4
Show file tree
Hide file tree
Showing 61 changed files with 1,027 additions and 267 deletions.
22 changes: 11 additions & 11 deletions dev/viewer/viewer.html.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ../tmp/pdfjs-3.9/web/viewer.html 2023-07-30 12:52:46.000000000 +0900
+++ viewer/viewer.html 2023-08-01 08:15:36.000000000 +0900
--- ../tmp/pdfjs-3.10/web/viewer.html 2023-08-27 17:53:36.000000000 +0900
+++ viewer/viewer.html 2023-09-02 10:03:30.000000000 +0900
@@ -25,18 +25,25 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
Expand All @@ -12,19 +12,19 @@
-<script src="../build/pdf.js"></script>
-
+ <!--
+ Because latexworkshop.css is loaded after viewer.css,
+ we can override viewer.css by editing latexworkshop.css.
+ DONT EDIT viewer.css. EDIT latexworkshop.css instead.
+ Because latextoybox.css is loaded after viewer.css,
+ we can override viewer.css by editing latextoybox.css.
+ DONT EDIT viewer.css. EDIT latextoybox.css instead.
+ -->
<link rel="stylesheet" href="viewer.css">

- <script src="viewer.js"></script>
+ <link rel="stylesheet" href="latexworkshop.css">
+ <link rel="stylesheet" href="latextoybox.css">
+
+
+<!-- This snippet is used in production (included from viewer.html) -->
+<link rel="resource" type="application/l10n" href="locale/locale.properties">
+<script src="/out/viewer/latexworkshop.js" type="module"></script>
+<script src="/out/viewer/latextoybox.js" type="module"></script>
</head>

- <body tabindex="1">
Expand All @@ -41,7 +41,7 @@
</div> <!-- sidebarContainer -->

<div id="mainContainer">
@@ -229,6 +236,14 @@
@@ -237,6 +244,14 @@
</button>
</div>

Expand All @@ -56,7 +56,7 @@
<div class="horizontalToolbarSeparator"></div>

<button id="documentProperties" class="secondaryToolbarButton" title="Document Properties…" tabindex="69" data-l10n-id="document_properties" aria-controls="documentPropertiesDialog">
@@ -237,13 +252,20 @@
@@ -245,13 +260,20 @@
</div>
</div> <!-- secondaryToolbar -->

Expand All @@ -78,7 +78,7 @@
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
<span data-l10n-id="findbar_label">Find</span>
@@ -318,6 +340,15 @@
@@ -326,6 +348,15 @@
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
Expand All @@ -94,7 +94,7 @@
</select>
</span>
</div>
@@ -333,6 +364,7 @@
@@ -341,6 +372,7 @@

<div id="viewerContainer" tabindex="0">
<div id="viewer" class="pdfViewer"></div>
Expand Down
18 changes: 9 additions & 9 deletions dev/viewer/viewer.js.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ../tmp/pdfjs-3.9/web/viewer.js 2023-07-30 12:53:02.000000000 +0900
+++ viewer/viewer.js 2023-08-01 08:15:36.000000000 +0900
--- ../tmp/pdfjs-3.10/web/viewer.js 2023-08-27 17:53:52.000000000 +0900
+++ viewer/viewer.js 2023-09-02 10:04:39.000000000 +0900
@@ -43,10 +43,10 @@
exports.GenericCom = GenericCom;
class GenericPreferences extends _preferences.BasePreferences {
Expand All @@ -22,7 +22,7 @@
},
setTitle(title = this._title) {
this._title = title;
@@ -4888,7 +4888,7 @@
@@ -4889,7 +4889,7 @@
};
exports.FindState = FindState;
const FIND_TIMEOUT = 250;
Expand All @@ -31,7 +31,7 @@
const MATCH_SCROLL_OFFSET_LEFT = -400;
const CHARACTERS_TO_NORMALIZE = {
"\u2010": "-",
@@ -7469,7 +7469,7 @@
@@ -7489,7 +7489,7 @@
this.#dispatchEvent();
return;
}
Expand All @@ -40,7 +40,7 @@
if (!this.isInitialEventDispatched) {
this.#dispatchEvent();
}
@@ -8367,7 +8367,7 @@
@@ -8387,7 +8387,7 @@
this.#annotationEditorMode = options.annotationEditorMode ?? _pdfjsLib.AnnotationEditorType.NONE;
this.imageResourcesPath = options.imageResourcesPath || "";
this.enablePrintAutoRotate = options.enablePrintAutoRotate || false;
Expand All @@ -49,7 +49,7 @@
if (options.useOnlyCssZoom) {
console.error("useOnlyCssZoom was removed, please use `maxCanvasPixels = 0` instead.");
options.maxCanvasPixels = 0;
@@ -12211,10 +12211,10 @@
@@ -12232,10 +12232,10 @@
}
async _writeToStorage() {
const databaseStr = JSON.stringify(this.database);
Expand All @@ -62,7 +62,7 @@
}
async set(name, val) {
await this._initializedPromise;
@@ -13060,7 +13060,7 @@
@@ -13081,7 +13081,7 @@
function getL10nData(key, args, fallback) {
var data = gL10nData[key];
if (!data) {
Expand All @@ -71,7 +71,7 @@
if (!fallback) {
return null;
}
@@ -13496,6 +13496,9 @@
@@ -13517,6 +13517,9 @@
}
window.addEventListener("keydown", function (event) {
if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) {
Expand All @@ -81,7 +81,7 @@
window.print();
event.preventDefault();
event.stopImmediatePropagation();
@@ -13766,7 +13769,7 @@
@@ -13789,7 +13792,7 @@
try {
parent.document.dispatchEvent(event);
} catch (ex) {
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@
"latex-utensils": "6.1.0",
"mathjax-full": "3.2.2",
"micromatch": "4.0.5",
"pdfjs-dist": "3.9.179",
"pdfjs-dist": "3.10.111",
"workerpool": "6.4.2",
"ws": "8.13.0"
},
Expand Down
28 changes: 26 additions & 2 deletions viewer/locale/ach/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ open_file.title=Yab Pwail
open_file_label=Yab
print.title=Go
print_label=Go
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
# LOCALIZATION NOTE (open_in_app_label): This string is used in Firefox for Android. Length of the translation matters since we are in a mobile context, with limited screen estate.

# Secondary toolbar and context menu
tools.title=Gintic
Expand Down Expand Up @@ -126,6 +131,7 @@ thumbs_label=Cal
findbar.title=Nong iye gin acoya
findbar_label=Nong

# LOCALIZATION NOTE (page_landmark): "{{page}}" will be replaced by the page number.
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
Expand All @@ -141,10 +147,18 @@ find_previous.title=Nong timme pa lok mukato
find_previous_label=Mukato
find_next.title=Nong timme pa lok malubo
find_next_label=Malubo
find_highlight=Wer weng
find_highlight=Ket Lanyut I Weng
find_match_case_label=Lok marwate
find_reached_top=Oo iwi gin acoya, omede ki i tere
find_reached_bottom=Oo i agiki me gin acoya, omede ki iwiye
# LOCALIZATION NOTE (find_match_count): The supported plural forms are
# [one|two|few|many|other], with [other] as the default value.
# "{{current}}" and "{{total}}" will be replaced by a number representing the
# index of the currently active find result, respectively a number representing
# the total number of matches in the document.
# LOCALIZATION NOTE (find_match_count_limit): The supported plural forms are
# [zero|one|two|few|many|other], with [other] as the default value.
# "{{limit}}" will be replaced by a numerical value.
find_not_found=Lok pe ononge

# Predefined zoom values
Expand All @@ -156,13 +170,16 @@ page_scale_actual=Dite kikome
# numerical scale value.
page_scale_percent={{scale}}%

# Loading indicator messages
loading_error=Bal otime kun cano PDF.
invalid_file_error=Pwail me PDF ma pe atir onyo obale woko.
missing_file_error=Pwail me PDF tye ka rem.
unexpected_response_error=Lagam mape kigeno pa lapok tic.

rendering_error=Bal otime i kare me nyuto pot buk.

# LOCALIZATION NOTE (annotation_date_string): "{{date}}" and "{{time}}" will be
# replaced by the modification date, and time, of the annotation.

# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
Expand All @@ -177,3 +194,10 @@ printing_not_supported=Ciko: Layeny ma pe teno goyo liweng.
printing_not_ready=Ciko: PDF pe ocane weng me agoya.
web_fonts_disabled=Kijuko dit pa coc me kakube woko: pe romo tic ki dit pa coc me PDF ma kiketo i kine.

# Editor



# Editor Parameters

# Editor aria
11 changes: 11 additions & 0 deletions viewer/locale/be/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ print.title=Друкаваць
print_label=Друкаваць
save.title=Захаваць
save_label=Захаваць
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
download_button.title=Сцягнуць
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
download_button_label=Сцягнуць
bookmark1.title=Дзейная старонка (паглядзець URL-адрас з дзейнай старонкі)
bookmark1_label=Цяперашняя старонка
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
Expand Down Expand Up @@ -244,6 +249,9 @@ editor_ink2_label=Маляваць
editor_stamp.title=Дадаць выяву
editor_stamp_label=Дадаць выяву

editor_stamp1.title=Дадаць або змяніць выявы
editor_stamp1_label=Дадаць або змяніць выявы

free_text2_default_content=Пачніце набор тэксту…

# Editor Parameters
Expand All @@ -253,6 +261,9 @@ editor_ink_color=Колер
editor_ink_thickness=Таўшчыня
editor_ink_opacity=Непразрыстасць

editor_stamp_add_image_label=Дадаць выяву
editor_stamp_add_image.title=Дадаць выяву

# Editor aria
editor_free_text2_aria_label=Тэкставы рэдактар
editor_ink2_aria_label=Графічны рэдактар
Expand Down
11 changes: 11 additions & 0 deletions viewer/locale/cs/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ print.title=Vytiskne dokument
print_label=Vytisknout
save.title=Uložit
save_label=Uložit
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
download_button.title=Stáhnout
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
download_button_label=Stáhnout
bookmark1.title=Aktuální stránka (zobrazit URL od aktuální stránky)
bookmark1_label=Aktuální stránka
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
Expand Down Expand Up @@ -244,6 +249,9 @@ editor_ink2_label=Kreslení
editor_stamp.title=Přidat obrázek
editor_stamp_label=Přidat obrázek

editor_stamp1.title=Přidání či úprava obrázků
editor_stamp1_label=Přidání či úprava obrázků

free_text2_default_content=Začněte psát…

# Editor Parameters
Expand All @@ -253,6 +261,9 @@ editor_ink_color=Barva
editor_ink_thickness=Tloušťka
editor_ink_opacity=Průhlednost

editor_stamp_add_image_label=Přidat obrázek
editor_stamp_add_image.title=Přidat obrázek

# Editor aria
editor_free_text2_aria_label=Textový editor
editor_ink2_aria_label=Editor kreslení
Expand Down
11 changes: 11 additions & 0 deletions viewer/locale/cy/viewer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ print.title=Argraffu
print_label=Argraffu
save.title=Cadw
save_label=Cadw
# LOCALIZATION NOTE (download_button.title): used in Firefox for Android as a tooltip for the download button (“download” is a verb).
download_button.title=Llwytho i Lawr
# LOCALIZATION NOTE (download_button_label): used in Firefox for Android as a label for the download button (“download” is a verb).
# Length of the translation matters since we are in a mobile context, with limited screen estate.
download_button_label=Llwytho i Lawr
bookmark1.title=Tudalen Gyfredol (Gweld URL o'r Dudalen Gyfredol)
bookmark1_label=Tudalen Gyfredol
# LOCALIZATION NOTE (open_in_app.title): This string is used in Firefox for Android.
Expand Down Expand Up @@ -244,6 +249,9 @@ editor_ink2_label=Lluniadu
editor_stamp.title=Ychwanegu delwedd
editor_stamp_label=Ychwanegu delwedd

editor_stamp1.title=Ychwanegu neu olygu delweddau
editor_stamp1_label=Ychwanegu neu olygu delweddau

free_text2_default_content=Cychwyn teipio…

# Editor Parameters
Expand All @@ -253,6 +261,9 @@ editor_ink_color=Lliw
editor_ink_thickness=Trwch
editor_ink_opacity=Didreiddedd

editor_stamp_add_image_label=Ychwanegu delwedd
editor_stamp_add_image.title=Ychwanegu delwedd

# Editor aria
editor_free_text2_aria_label=Golygydd Testun
editor_ink2_aria_label=Golygydd Lluniadu
Expand Down
Loading

0 comments on commit c3e2bd4

Please sign in to comment.