pdfjs-viewer-highlight-echo 5.4.460 → 5.4.462

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
@@ -21,8 +21,8 @@
21
21
  */
22
22
 
23
23
  /**
24
- * pdfjsVersion = 5.4.460
25
- * pdfjsBuild = 8489d7097
24
+ * pdfjsVersion = 5.4.462
25
+ * pdfjsBuild = 34e1cb08c
26
26
  */
27
27
  /******/ // The require scope
28
28
  /******/ var __webpack_require__ = {};
@@ -5770,6 +5770,14 @@ class AnnotationEditor {
5770
5770
  button.addEventListener("click", event => {
5771
5771
  event.stopPropagation();
5772
5772
  const editorRect = this.div.getBoundingClientRect();
5773
+ let selectedText = "";
5774
+ if (this.contentText) {
5775
+ selectedText = this.contentText;
5776
+ } else if (this.contentDiv) {
5777
+ selectedText = this.contentDiv.textContent || "";
5778
+ } else {
5779
+ selectedText = this.div.textContent || "";
5780
+ }
5773
5781
  const editorInfo = {
5774
5782
  editorId: this.id,
5775
5783
  editorType: this.editorType,
@@ -5788,7 +5796,7 @@ class AnnotationEditor {
5788
5796
  width: editorRect.width,
5789
5797
  height: editorRect.height
5790
5798
  },
5791
- textContent: this.div.textContent || ""
5799
+ textContent: selectedText
5792
5800
  };
5793
5801
  this._uiManager.saveSelectionAsJson("editor_save_button", editorInfo);
5794
5802
  });
@@ -14497,7 +14505,7 @@ function getDocument(src = {}) {
14497
14505
  }
14498
14506
  const docParams = {
14499
14507
  docId,
14500
- apiVersion: "5.4.460",
14508
+ apiVersion: "5.4.462",
14501
14509
  data,
14502
14510
  password,
14503
14511
  disableAutoFetch,
@@ -16162,8 +16170,8 @@ class InternalRenderTask {
16162
16170
  }
16163
16171
  }
16164
16172
  }
16165
- const version = "5.4.460";
16166
- const build = "8489d7097";
16173
+ const version = "5.4.462";
16174
+ const build = "34e1cb08c";
16167
16175
 
16168
16176
  ;// ./src/display/editor/color_picker.js
16169
16177
 
@@ -21373,6 +21381,9 @@ class HighlightEditor extends AnnotationEditor {
21373
21381
  numberOfColors: data.get("color").size
21374
21382
  };
21375
21383
  }
21384
+ get contentText() {
21385
+ return this.#text;
21386
+ }
21376
21387
  #createOutlines() {
21377
21388
  const outliner = new HighlightOutliner(this.#boxes, 0.001);
21378
21389
  this.#highlightOutlines = outliner.getOutlines();