Skip to content

Commit 2c12880

Browse files
committed
Update PDF.js version to v5.4.54 and adjust related components; add comment manager dialog and error handling elements. Fix css patch
1 parent a48097d commit 2c12880

File tree

13 files changed

+69
-12
lines changed

13 files changed

+69
-12
lines changed

bun.lockb

2.29 KB
Binary file not shown.

docs/components/APIReferenceDemo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function toggleSidebar() {
167167
168168
// New document input
169169
const newDocUrl = ref('')
170-
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.3.93/web/compressed.tracemonkey-pldi-09.pdf'
170+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.54/web/compressed.tracemonkey-pldi-09.pdf'
171171
const source = ref(pdf)
172172
173173
function resetPdfInfo() {

docs/components/CustomizationDemo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ watchedRefs.forEach(ref => {
141141
watch(ref, updateOptions)
142142
})
143143
144-
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.3.93/web/compressed.tracemonkey-pldi-09.pdf'
144+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.54/web/compressed.tracemonkey-pldi-09.pdf'
145145
146146
// Setup watchers for theme options
147147
import { watch } from 'vue'

docs/components/EventsDemo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function rotateClockwise() {
138138
vuepdfjs.value.pdfApp.eventBus.dispatch("rotatecw")
139139
}
140140
141-
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.3.93/web/compressed.tracemonkey-pldi-09.pdf'
141+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.54/web/compressed.tracemonkey-pldi-09.pdf'
142142
</script>
143143

144144
<template>

docs/components/PdfViewer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const onPdfAppLoaded = () => {
7777
vuepdfjs.value.pdfApp.eventBus.on('documenterror', onErrorHandler)
7878
}
7979
80-
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.3.93/web/compressed.tracemonkey-pldi-09.pdf'
80+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.54/web/compressed.tracemonkey-pldi-09.pdf'
8181
const source = ref(pdf)
8282
</script>
8383

docs/components/SlotsDemo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function loadPdf() {
3232
// Add artificial delay to show loading indicator
3333
setTimeout(() => {
3434
// Imposta l'URL del PDF dopo il ritardo
35-
pdf.value = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.3.93/web/compressed.tracemonkey-pldi-09.pdf'
35+
pdf.value = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.54/web/compressed.tracemonkey-pldi-09.pdf'
3636
}, loadingDelay.value * 1000)
3737
}
3838

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"devDependencies": {
1818
"@types/bun": "latest",
1919
"vitepress": "^1.6.3",
20-
"vitepress-plugin-llms": "^1.3.4"
20+
"vitepress-plugin-llms": "^1.7.2"
2121
},
2222
"peerDependencies": {
2323
"typescript": "^5.6.3"

packages/vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tuttarealstep/vue-pdf.js",
33
"description": "A Vue component for displaying PDF files using the standard `pdf.js` viewer. This package provides a simple and powerful integration to embed PDF viewers in Vue applications.",
4-
"version": "1.2.3",
4+
"version": "1.2.4",
55
"private": false,
66
"type": "module",
77
"author": "Stefano Valenzano (https://github.com/tuttarealstep)",
@@ -36,7 +36,7 @@
3636
"@fluent/bundle": "^0.18.0",
3737
"@fluent/dom": "^0.10.0",
3838
"ajv": "^8.17.1",
39-
"pdf.js": "git://github.com/mozilla/pdf.js.git#v5.3.93"
39+
"pdf.js": "git://github.com/mozilla/pdf.js.git#v5.4.54"
4040
},
4141
"peerDependencies": {
4242
"vue": "^3.4.29"

packages/vue/scripts/prebuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const patchViewerCss = () => {
134134

135135
const patchedContent = fileContent.replace(/html,\s+body\s+{/, '/* @@patchViewerCss \nhtml,\nbody {')
136136
.replace(/.hidden,\s+\[hidden\]\s+{\s+display:\s+none\s+!important;\s+}/,
137-
'.hidden,\n[hidden] {\n display: none !important;\n} */')
137+
'/* .hidden,\n[hidden] {\n display: none !important;\n} */')
138138

139139
fs.writeFileSync(filePath, patchedContent)
140140

packages/vue/src/components/DialogContainer.vue

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@
325325
<div id="addSignatureError" hidden="true" class="messageBar">
326326
<div>
327327
<div>
328-
<span class="title"
328+
<span id="addSignatureErrorTitle" class="title"
329329
data-l10n-id="pdfjs-editor-add-signature-image-upload-error-title"></span>
330-
<span class="description"
330+
<span id="addSignatureErrorDescription" class="description"
331331
data-l10n-id="pdfjs-editor-add-signature-image-upload-error-description"></span>
332332
</div>
333333
<button id="addSignatureErrorCloseButton" class="closeButton" type="button"
@@ -373,6 +373,41 @@
373373
</div>
374374
</dialog>
375375

376+
<dialog class="dialog commentManager" id="commentManagerDialog">
377+
<div class="mainContainer">
378+
<div id="commentManagerToolbar">
379+
<button id="commentActionsButton" class="toolbarButton" type="button" aria-expanded="false"
380+
aria-haspopup="true" aria-controls="commentActionsMenu" tabindex="0"
381+
data-l10n-id="pdfjs-editor-edit-comment-actions-button">
382+
<span data-l10n-id="pdfjs-editor-edit-comment-actions-button-label"></span>
383+
</button>
384+
<menu class="hidden" role="menu" id="commentActionsMenu">
385+
<button id="commentActionsEditButton" role="menuitem" type="button" tabindex="0">
386+
<span data-l10n-id="pdfjs-editor-edit-comment-actions-edit-button-label"></span>
387+
</button>
388+
<button id="commentActionsDeleteButton" role="menuitem" type="button" tabindex="0">
389+
<span data-l10n-id="pdfjs-editor-edit-comment-actions-delete-button-label"></span>
390+
</button>
391+
</menu>
392+
<button id="commentCloseButton" class="toolbarButton" type="button" tabindex="0"
393+
data-l10n-id="pdfjs-editor-edit-comment-close-button">
394+
<span data-l10n-id="pdfjs-editor-edit-comment-close-button-label"></span>
395+
</button>
396+
</div>
397+
<textarea class="hidden" id="commentManagerTextInput"
398+
data-l10n-id="pdfjs-editor-edit-comment-manager-text-input"></textarea>
399+
<div class="hidden" id="commentManagerTextView"></div>
400+
<div class="dialogButtonsGroup">
401+
<button id="commentManagerCancelButton" type="button" class="secondaryButton" tabindex="0">
402+
<span data-l10n-id="pdfjs-editor-edit-comment-manager-cancel-button"></span>
403+
</button>
404+
<button id="commentManagerSaveButton" type="button" class="primaryButton" disabled tabindex="0">
405+
<span data-l10n-id="pdfjs-editor-edit-comment-manager-save-button"></span>
406+
</button>
407+
</div>
408+
</div>
409+
</dialog>
410+
376411
<!--#if !MOZCENTRAL-->
377412
<dialog id="printServiceDialog" style="min-width: 200px;">
378413
<div class="row">

0 commit comments

Comments
 (0)