@tindtechnologies/pdfjs-viewer 5.4.624-tind.4 → 5.4.624-tind.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/pdf.mjs
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* pdfjsVersion = 5.4.0
|
|
25
|
-
* pdfjsBuild =
|
|
25
|
+
* pdfjsBuild = 5e7462e
|
|
26
26
|
*/
|
|
27
27
|
/******/ // The require scope
|
|
28
28
|
/******/ var __webpack_require__ = {};
|
|
@@ -16121,7 +16121,7 @@ class InternalRenderTask {
|
|
|
16121
16121
|
}
|
|
16122
16122
|
}
|
|
16123
16123
|
const version = "5.4.0";
|
|
16124
|
-
const build = "
|
|
16124
|
+
const build = "5e7462e";
|
|
16125
16125
|
|
|
16126
16126
|
;// ./src/display/editor/color_picker.js
|
|
16127
16127
|
|
package/build/pdf.sandbox.mjs
CHANGED
package/build/pdf.worker.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const OPEN_PATCHED_FLAG = Symbol("tindPdfViewerApplicationOpenPatched");
|
|
2
2
|
const registeredDocuments = new WeakSet();
|
|
3
|
+
const SIDEBAR_VIEW_NONE = 0;
|
|
3
4
|
|
|
4
5
|
function patchPDFViewerApplicationOpen(evt) {
|
|
5
6
|
const sourceWindow = evt?.detail?.source;
|
|
@@ -14,9 +15,24 @@ function patchPDFViewerApplicationOpen(evt) {
|
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
17
|
|
|
18
|
+
const originalSetInitialView = app.setInitialView?.bind(app);
|
|
19
|
+
if (originalSetInitialView) {
|
|
20
|
+
// Force the initial sidebar state to "closed" after all startup state
|
|
21
|
+
// (preferences/history/document metadata) has been resolved.
|
|
22
|
+
app.setInitialView = (storedHash, options = {}) =>
|
|
23
|
+
originalSetInitialView(storedHash, {
|
|
24
|
+
...options,
|
|
25
|
+
sidebarView: SIDEBAR_VIEW_NONE,
|
|
26
|
+
});
|
|
27
|
+
} else {
|
|
28
|
+
// Fallback for unexpected viewer versions without `setInitialView`.
|
|
29
|
+
win.PDFViewerApplicationOptions?.set("sidebarViewOnLoad", SIDEBAR_VIEW_NONE);
|
|
30
|
+
}
|
|
31
|
+
|
|
17
32
|
const params = new URLSearchParams(win.location.search);
|
|
18
33
|
const rangeChunkSize = Number(params.get("chunksize"));
|
|
19
34
|
if (!Number.isInteger(rangeChunkSize) || rangeChunkSize <= 0) {
|
|
35
|
+
app[OPEN_PATCHED_FLAG] = true;
|
|
20
36
|
return;
|
|
21
37
|
}
|
|
22
38
|
|