@harbour-enterprises/superdoc 0.8.32 → 0.8.33

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.
Files changed (30) hide show
  1. package/dist/chunks/{index-MTg0RB9I.cjs → index-BXKGjuVW.cjs} +1 -1
  2. package/dist/chunks/{index-f-drtAbP.cjs → index-CqRwYOdx.cjs} +1 -1
  3. package/dist/chunks/{index-4z9dCXD4.es.js → index-DjLrg1eZ.es.js} +2 -2
  4. package/dist/chunks/{index-C9CPh36N.es.js → index-dZKHAFXF.es.js} +1 -1
  5. package/dist/chunks/{super-editor.es-D3raD3o4.cjs → super-editor.es-Pzp2h43K.cjs} +2 -2
  6. package/dist/chunks/{super-editor.es-DoabJdTI.es.js → super-editor.es-bZrkdrc-.es.js} +3 -3
  7. package/dist/chunks/{url-BY6ThfSE.cjs → url-6Xu7gR4T.cjs} +1 -1
  8. package/dist/chunks/{url-CwZauKUC.es.js → url-BxDGAI6E.es.js} +1 -1
  9. package/dist/chunks/{xml-js-CCS2urF-.es.js → xml-js-BAML2_fM.es.js} +355 -366
  10. package/dist/chunks/xml-js-zhwNEV5e.cjs +10 -0
  11. package/dist/stores/comments-store.d.ts.map +1 -1
  12. package/dist/style.css +25 -25
  13. package/dist/super-editor/chunks/{converter-EhD8_EEa.js → converter-C3CzPl96.js} +2 -2
  14. package/dist/super-editor/chunks/{docx-zipper-B45oAPNp.js → docx-zipper-D2nN7zec.js} +1 -1
  15. package/dist/super-editor/chunks/{editor-CmesZx1J.js → editor-BOSveQEL.js} +3 -3
  16. package/dist/super-editor/chunks/{toolbar-ByGT4icp.js → toolbar-iwseevVu.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/super-editor.es.js +6 -6
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +20 -20
  26. package/dist/superdoc.es.js +693 -687
  27. package/dist/superdoc.umd.js +18 -9
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/chunks/xml-js-C-3oH1mO.cjs +0 -10
@@ -22052,7 +22052,7 @@ Actual: ` + h3.attribValue
22052
22052
  return;
22053
22053
  }
22054
22054
  }
22055
- static updateDocumentVersion(e = this.convertedXml, t = "0.8.32") {
22055
+ static updateDocumentVersion(e = this.convertedXml, t = "0.8.33") {
22056
22056
  const n = "docProps/custom.xml";
22057
22057
  e[n] || (e[n] = yu$2());
22058
22058
  const i3 = e["docProps/custom.xml"];
@@ -22252,7 +22252,7 @@ Actual: ` + h3.attribValue
22252
22252
  function yu$2() {
22253
22253
  return Tf$2;
22254
22254
  }
22255
- function wu$2(r22 = 2, e = "0.8.32") {
22255
+ function wu$2(r22 = 2, e = "0.8.33") {
22256
22256
  return {
22257
22257
  type: "element",
22258
22258
  name: "property",
@@ -33551,7 +33551,7 @@ Actual: ` + h3.attribValue
33551
33551
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
33552
33552
  */
33553
33553
  processCollaborationMigrations() {
33554
- if (console.debug("[checkVersionMigrations] Current editor version", "0.8.32"), !this.options.ydoc) return;
33554
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.8.33"), !this.options.ydoc) return;
33555
33555
  let r = this.options.ydoc.getMap("meta").get("version");
33556
33556
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
33557
33557
  const o = Ga$1(r) || [], s = this.state.plugins.find((c3) => c3.key.startsWith("y-sync"));
@@ -53190,6 +53190,8 @@ ${t}
53190
53190
  const getFloatingComments = computed(() => {
53191
53191
  const comments = getGroupedComments.value?.parentComments.filter((c3) => !c3.resolvedTime).filter((c3) => {
53192
53192
  const keys2 = Object.keys(editorCommentPositions.value);
53193
+ const isPdfComment = c3.selection?.source !== "super-editor";
53194
+ if (isPdfComment) return true;
53193
53195
  return keys2.includes(c3.commentId);
53194
53196
  });
53195
53197
  return comments;
@@ -64569,12 +64571,18 @@ ${style2}
64569
64571
  nextTick(() => {
64570
64572
  const id2 = commentId;
64571
64573
  if (renderedSizes.value.some((item) => item.id == id2)) return;
64574
+ const editorBounds = props.parent.getBoundingClientRect();
64572
64575
  const comment = getFloatingComments.value.find((c3) => c3.commentId === id2 || c3.importedId == id2);
64573
- const position = editorCommentPositions.value[id2]?.bounds;
64576
+ let position = editorCommentPositions.value[id2]?.bounds || {};
64577
+ if (props.currentDocument.type === "application/pdf") {
64578
+ Object.entries(comment.selection?.selectionBounds).forEach(([key, value]) => {
64579
+ position[key] = Number(value);
64580
+ });
64581
+ position.top += editorBounds.top;
64582
+ }
64574
64583
  if (!position) return;
64575
64584
  const scrollParent = findScrollParent(props.parent);
64576
64585
  scrollParent === window ? window.scrollY : scrollParent.scrollTop;
64577
- const editorBounds = props.parent.getBoundingClientRect();
64578
64586
  const bounds = elementRef.value?.getBoundingClientRect();
64579
64587
  const placement = {
64580
64588
  id: id2,
@@ -64671,7 +64679,7 @@ ${style2}
64671
64679
  };
64672
64680
  }
64673
64681
  };
64674
- const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-76d3706b"]]);
64682
+ const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e6543c90"]]);
64675
64683
  const _sfc_main$7 = {
64676
64684
  __name: "TextField",
64677
64685
  props: {
@@ -64915,7 +64923,7 @@ ${style2}
64915
64923
  const pageContainer = document.getElementById(`${id2}-page-${page + 1}`);
64916
64924
  if (!pageContainer) return;
64917
64925
  const pageBounds = pageContainer.getBoundingClientRect();
64918
- const pageInfo = doc2.pageContainers.find((p3) => p3.page === page + 1);
64926
+ const pageInfo = doc2.pageContainers.find((p3) => p3.page === page);
64919
64927
  const scale = pageBounds.height / pageInfo.containerBounds.originalHeight;
64920
64928
  const pageBottom = pageBounds.bottom - bounds.top;
64921
64929
  const pageLeft = pageBounds.left - bounds.left;
@@ -65143,6 +65151,7 @@ ${style2}
65143
65151
  if (!proxy.$superdoc.config.collaboration) isReady.value = true;
65144
65152
  }
65145
65153
  isFloatingCommentsReady.value = true;
65154
+ hasInitializedLocations.value = true;
65146
65155
  proxy.$superdoc.broadcastPdfDocumentReady();
65147
65156
  };
65148
65157
  const handleToolClick = (tool) => {
@@ -65573,7 +65582,7 @@ ${style2}
65573
65582
  };
65574
65583
  }
65575
65584
  };
65576
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3731e285"]]);
65585
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-58b14292"]]);
65577
65586
  const createSuperdocVueApp = () => {
65578
65587
  const app = createApp(App);
65579
65588
  const pinia = createPinia();
@@ -65665,7 +65674,7 @@ ${style2}
65665
65674
  this.config.colors = shuffleArray(this.config.colors);
65666
65675
  this.userColorMap = /* @__PURE__ */ new Map();
65667
65676
  this.colorIndex = 0;
65668
- this.version = "0.8.32";
65677
+ this.version = "0.8.33";
65669
65678
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
65670
65679
  this.superdocId = config.superdocId || v4();
65671
65680
  this.colors = this.config.colors;