Skip to content

Commit 70cddb6

Browse files
committed
Update to PDF.js v5.4.149
1 parent 08b3ba5 commit 70cddb6

File tree

10 files changed

+237
-229
lines changed

10 files changed

+237
-229
lines changed

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.4.54/web/compressed.tracemonkey-pldi-09.pdf'
170+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.149/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.4.54/web/compressed.tracemonkey-pldi-09.pdf'
144+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.149/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.4.54/web/compressed.tracemonkey-pldi-09.pdf'
141+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.149/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.4.54/web/compressed.tracemonkey-pldi-09.pdf'
80+
const pdf = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.149/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.4.54/web/compressed.tracemonkey-pldi-09.pdf'
35+
pdf.value = 'https://raw.githubusercontent.com/mozilla/pdf.js/v5.4.149/web/compressed.tracemonkey-pldi-09.pdf'
3636
}, loadingDelay.value * 1000)
3737
}
3838

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
},
2222
"peerDependencies": {
2323
"typescript": "^5.6.3"
24-
}
24+
},
25+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2526
}

packages/vue/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vue-pdfjs [![NPM Version](https://img.shields.io/npm/v/%40tuttarealstep%2Fvue-pdf.js)](https://www.npmjs.com/package/@tuttarealstep/vue-pdf.js)
1+
# vue-pdfjs [![NPM Version](https://img.shields.io/npm/v/%40tuttarealstep%2Fvue-pdf.js)](https://www.npmjs.com/package/@tuttarealstep/vue-pdf.js) [![MadeWithVueJs.com shield](https://madewithvuejs.com/storage/repo-shields/5902-shield.svg)](https://madewithvuejs.com/p/vue-pdfjs/shield-link)
22

33
`vue-pdfjs` is a Vue 3 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.
44

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.4",
4+
"version": "1.2.5",
55
"private": false,
66
"type": "module",
77
"author": "Stefano Valenzano (https://github.com/tuttarealstep)",
@@ -39,7 +39,7 @@
3939
"@fluent/bundle": "^0.18.0",
4040
"@fluent/dom": "^0.10.0",
4141
"ajv": "^8.17.1",
42-
"pdf.js": "git://github.com/mozilla/pdf.js.git#v5.4.54"
42+
"pdf.js": "git://github.com/mozilla/pdf.js.git#v5.4.149"
4343
},
4444
"peerDependencies": {
4545
"vue": "^3.4.29"

packages/vue/src/components/ToolbarContainer.vue

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ export interface ToolbarContainerProps {
4747
const props = defineProps<ToolbarContainerProps>()
4848
4949
function updateToolbarVisibility(options?: Record<string, boolean>) {
50-
if (!options) return;
51-
for (const [key, value] of Object.entries(options)) {
52-
const el = document.getElementById(key);
53-
if (el) {
54-
el.style.display = value === false ? 'none' : '';
50+
if (!options) return;
51+
for (const [key, value] of Object.entries(options)) {
52+
const el = document.getElementById(key);
53+
if (el) {
54+
el.style.display = value === false ? 'none' : '';
55+
}
5556
}
56-
}
5757
}
5858
5959
onMounted(() => {
60-
updateToolbarVisibility(props.options);
60+
updateToolbarVisibility(props.options);
6161
});
6262
6363
watch(() => props.options, (newOptions: Record<string, boolean> | undefined) => {
64-
updateToolbarVisibility(newOptions);
64+
updateToolbarVisibility(newOptions);
6565
}, { deep: true });
6666
6767
</script>
@@ -198,6 +198,32 @@ watch(() => props.options, (newOptions: Record<string, boolean> | undefined) =>
198198
</div>
199199
<div id="toolbarViewerRight" class="toolbarHorizontalGroup">
200200
<div id="editorModeButtons" class="toolbarHorizontalGroup" role="radiogroup">
201+
<div id="editorComment" class="toolbarButtonWithContainer" hidden="true">
202+
<button id="editorCommentButton" class="toolbarButton" type="button" tabindex="0" disabled
203+
role="radio" aria-expanded="false" aria-haspopup="true"
204+
aria-controls="editorCommentParamsToolbar" data-l10n-id="pdfjs-editor-comment-button">
205+
<span data-l10n-id="pdfjs-editor-comment-button-label"></span>
206+
</button>
207+
<div class="editorParamsToolbar sidebar hidden menu" id="editorCommentParamsToolbar">
208+
<div id="editorCommentsSidebar" class="menuContainer" role="landmark"
209+
aria-labelledby="editorCommentsSidebarHeader">
210+
<div id="editorCommentsSidebarHeader" role="heading" aria-level="2">
211+
<span class="commentCount">
212+
<span id="editorCommentsSidebarTitle"
213+
data-l10n-id="pdfjs-editor-comments-sidebar-title"
214+
data-l10n-args='{ "count": 0 }'></span>
215+
<span id="editorCommentsSidebarCount"></span>
216+
</span>
217+
<button id="editorCommentsSidebarCloseButton" type="button" tabindex="0"
218+
data-l10n-id="pdfjs-editor-comments-sidebar-close-button">
219+
<span
220+
data-l10n-id="pdfjs-editor-comments-sidebar-close-button-label"></span>
221+
</button>
222+
</div>
223+
<ul id="editorCommentsSidebarList"></ul>
224+
</div>
225+
</div>
226+
</div>
201227
<div id="editorSignature" class="toolbarButtonWithContainer" hidden="true">
202228
<button id="editorSignatureButton" class="toolbarButton" type="button" tabindex="0"
203229
:disabled="true" role="radio" aria-expanded="false" aria-haspopup="true"
@@ -463,7 +489,8 @@ watch(() => props.options, (newOptions: Record<string, boolean> | undefined) =>
463489
</button>
464490
</div>
465491

466-
<div id="imageAltTextSettingsSeparator" class="horizontalToolbarSeparator hidden"></div>
492+
<div id="imageAltTextSettingsSeparator" class="horizontalToolbarSeparator hidden">
493+
</div>
467494
<button id="imageAltTextSettings" type="button" class="toolbarButton labeled hidden"
468495
tabindex="0" data-l10n-id="pdfjs-image-alt-text-settings-button"
469496
aria-controls="altTextSettingsDialog">

0 commit comments

Comments
 (0)