@tindtechnologies/pdfjs-viewer 5.4.624-tind.4 → 5.4.624-tind.5

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 = cf046ea
25
+ * pdfjsBuild = 9d59081
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 = "cf046ea";
16124
+ const build = "9d59081";
16125
16125
 
16126
16126
  ;// ./src/display/editor/color_picker.js
16127
16127
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  /**
24
24
  * pdfjsVersion = 5.4.0
25
- * pdfjsBuild = cf046ea
25
+ * pdfjsBuild = 9d59081
26
26
  */
27
27
  /******/ // The require scope
28
28
  /******/ var __webpack_require__ = {};
@@ -22,7 +22,7 @@
22
22
 
23
23
  /**
24
24
  * pdfjsVersion = 5.4.0
25
- * pdfjsBuild = cf046ea
25
+ * pdfjsBuild = 9d59081
26
26
  */
27
27
  /******/ // The require scope
28
28
  /******/ var __webpack_require__ = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tindtechnologies/pdfjs-viewer",
3
- "version": "5.4.624-tind.4",
3
+ "version": "5.4.624-tind.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/tind/pdfjs-viewer"
@@ -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;
@@ -10,13 +11,18 @@ function patchPDFViewerApplicationOpen(evt) {
10
11
 
11
12
  const win = sourceWindow || window;
12
13
  const app = win.PDFViewerApplication;
13
- if (!app || app[OPEN_PATCHED_FLAG]) {
14
+ const appOptions = win.PDFViewerApplicationOptions;
15
+ if (!app || !appOptions || app[OPEN_PATCHED_FLAG]) {
14
16
  return;
15
17
  }
16
18
 
19
+ // Force the initial sidebar state to "closed" and ignore stored view history.
20
+ appOptions.set("sidebarViewOnLoad", SIDEBAR_VIEW_NONE);
21
+
17
22
  const params = new URLSearchParams(win.location.search);
18
23
  const rangeChunkSize = Number(params.get("chunksize"));
19
24
  if (!Number.isInteger(rangeChunkSize) || rangeChunkSize <= 0) {
25
+ app[OPEN_PATCHED_FLAG] = true;
20
26
  return;
21
27
  }
22
28
 
package/web/viewer.mjs CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  /**
24
24
  * pdfjsVersion = 5.4.0
25
- * pdfjsBuild = cf046ea
25
+ * pdfjsBuild = 9d59081
26
26
  */
27
27
  /******/ // The require scope
28
28
  /******/ var __webpack_require__ = {};