@harbour-enterprises/superdoc 0.8.31 → 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.
- package/dist/chunks/{super-editor.es-DW8rMUBO.cjs → super-editor.es-Pzp2h43K.cjs} +3 -3
- package/dist/chunks/{super-editor.es-DiQ6ytI2.es.js → super-editor.es-bZrkdrc-.es.js} +4 -4
- package/dist/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +25 -25
- package/dist/super-editor/chunks/{converter-BE8UkEHA.js → converter-C3CzPl96.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-B7iW1WqK.js → docx-zipper-D2nN7zec.js} +1 -1
- package/dist/super-editor/chunks/{editor-D7e-8Caj.js → editor-BOSveQEL.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-C_A0zvKt.js → toolbar-iwseevVu.js} +2 -2
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +7 -7
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +20 -20
- package/dist/superdoc.es.js +690 -684
- package/dist/superdoc.umd.js +19 -10
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -22052,7 +22052,7 @@ Actual: ` + h3.attribValue
|
|
|
22052
22052
|
return;
|
|
22053
22053
|
}
|
|
22054
22054
|
}
|
|
22055
|
-
static updateDocumentVersion(e = this.convertedXml, t = "0.8.
|
|
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.
|
|
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.
|
|
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"));
|
|
@@ -50497,7 +50497,7 @@ ${t}
|
|
|
50497
50497
|
}
|
|
50498
50498
|
}
|
|
50499
50499
|
L = /* @__PURE__ */ new WeakSet(), Ze = function() {
|
|
50500
|
-
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length
|
|
50500
|
+
this.config.groups && !Array.isArray(this.config.groups) && Object.keys(this.config.groups).length && (this.config.toolbarGroups = Object.keys(this.config.groups));
|
|
50501
50501
|
}, fe = /* @__PURE__ */ new WeakMap(), Be = function(o, n, e = false) {
|
|
50502
50502
|
const i3 = document.documentElement.clientWidth, { defaultItems: c3, overflowItems: l } = Wn(o, e, i3, this.role, n);
|
|
50503
50503
|
let a = [
|
|
@@ -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
|
-
|
|
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-
|
|
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
|
|
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-
|
|
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.
|
|
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;
|