@harbour-enterprises/superdoc 0.28.2 → 0.28.3
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/{PdfViewer-DpWYWlWj.es.js → PdfViewer-DUpLlOgk.es.js} +1 -1
- package/dist/chunks/{PdfViewer-lAbA0-lT.cjs → PdfViewer-QTV3RJM1.cjs} +1 -1
- package/dist/chunks/{index-Dz5_CDAf-B9kc0ArX.es.js → index-B3rVM2bJ-B62R9mgx.es.js} +1 -1
- package/dist/chunks/{index-Dz5_CDAf-C5D7BTD6.cjs → index-B3rVM2bJ-BgYPFhrh.cjs} +1 -1
- package/dist/chunks/{index-ByVhw_G0.cjs → index-CuXB3dyN.cjs} +3 -3
- package/dist/chunks/{index-Dw2T2UIP.es.js → index-DKtyoTAq.es.js} +3 -3
- package/dist/chunks/{super-editor.es-7iRvcDFc.cjs → super-editor.es-BKCxu5-_.cjs} +17 -9
- package/dist/chunks/{super-editor.es-DnZ5Ru-q.es.js → super-editor.es-BjTZa-cJ.es.js} +17 -9
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-C5g1OhUM.js → converter-CMtyH2w0.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-D9LLIDXC.js → docx-zipper-Pgf9i5kI.js} +1 -1
- package/dist/super-editor/chunks/{editor-CD7hiFDo.js → editor-C3KgN3zx.js} +18 -10
- package/dist/super-editor/chunks/{index-Dz5_CDAf.js → index-B3rVM2bJ.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BC_z_xMq.js → toolbar-TXkIPPvk.js} +2 -2
- 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 +6 -6
- 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 +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +19 -11
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -43222,7 +43222,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
43222
43222
|
static getStoredSuperdocVersion(docx) {
|
|
43223
43223
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
43224
43224
|
}
|
|
43225
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.
|
|
43225
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.2") {
|
|
43226
43226
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
43227
43227
|
}
|
|
43228
43228
|
/**
|
|
@@ -58508,9 +58508,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58508
58508
|
}
|
|
58509
58509
|
},
|
|
58510
58510
|
view() {
|
|
58511
|
-
let prevDoc;
|
|
58512
|
-
let prevActiveThreadId;
|
|
58511
|
+
let prevDoc = null;
|
|
58512
|
+
let prevActiveThreadId = null;
|
|
58513
58513
|
let prevAllCommentPositions = {};
|
|
58514
|
+
let hasEverEmitted = false;
|
|
58514
58515
|
return {
|
|
58515
58516
|
update(view) {
|
|
58516
58517
|
const { state: state2 } = view;
|
|
@@ -58521,14 +58522,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58521
58522
|
if (meta2?.type === "setActiveComment" || meta2?.forceUpdate) {
|
|
58522
58523
|
shouldUpdate = true;
|
|
58523
58524
|
}
|
|
58524
|
-
const docChanged = prevDoc
|
|
58525
|
+
const docChanged = !prevDoc || !prevDoc.eq(doc2);
|
|
58525
58526
|
if (docChanged) shouldUpdate = true;
|
|
58526
58527
|
const activeThreadChanged = prevActiveThreadId !== currentActiveThreadId;
|
|
58527
58528
|
if (activeThreadChanged) {
|
|
58528
58529
|
shouldUpdate = true;
|
|
58529
58530
|
prevActiveThreadId = currentActiveThreadId;
|
|
58530
58531
|
}
|
|
58531
|
-
const
|
|
58532
|
+
const isInitialLoad = prevDoc === null;
|
|
58533
|
+
const onlyActiveThreadChanged = !isInitialLoad && !docChanged && activeThreadChanged;
|
|
58532
58534
|
if (!shouldUpdate) return;
|
|
58533
58535
|
prevDoc = doc2;
|
|
58534
58536
|
shouldUpdate = false;
|
|
@@ -58608,8 +58610,11 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58608
58610
|
}
|
|
58609
58611
|
if (!onlyActiveThreadChanged) {
|
|
58610
58612
|
const positionsChanged = hasPositionsChanged(prevAllCommentPositions, allCommentPositions);
|
|
58611
|
-
|
|
58613
|
+
const hasComments = Object.keys(allCommentPositions).length > 0;
|
|
58614
|
+
const shouldEmitPositions = positionsChanged || !hasEverEmitted && hasComments;
|
|
58615
|
+
if (shouldEmitPositions) {
|
|
58612
58616
|
prevAllCommentPositions = allCommentPositions;
|
|
58617
|
+
hasEverEmitted = true;
|
|
58613
58618
|
editor.emit("comment-positions", { allCommentPositions });
|
|
58614
58619
|
}
|
|
58615
58620
|
}
|
|
@@ -58627,7 +58632,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
58627
58632
|
for (const key2 of currKeys) {
|
|
58628
58633
|
const prev = prevPositions[key2];
|
|
58629
58634
|
const curr = currPositions[key2];
|
|
58630
|
-
if (!prev || prev.
|
|
58635
|
+
if (!prev || !prev.bounds || !curr.bounds) {
|
|
58636
|
+
return true;
|
|
58637
|
+
}
|
|
58638
|
+
if (prev.bounds.top !== curr.bounds.top || prev.bounds.left !== curr.bounds.left) {
|
|
58631
58639
|
return true;
|
|
58632
58640
|
}
|
|
58633
58641
|
}
|
|
@@ -61399,7 +61407,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61399
61407
|
{ default: remarkStringify2 },
|
|
61400
61408
|
{ default: remarkGfm2 }
|
|
61401
61409
|
] = await Promise.all([
|
|
61402
|
-
Promise.resolve().then(() =>
|
|
61410
|
+
Promise.resolve().then(() => indexB3rVM2bJ),
|
|
61403
61411
|
Promise.resolve().then(() => indexDRCvimau),
|
|
61404
61412
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
61405
61413
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -61617,7 +61625,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61617
61625
|
* @returns {Object | void} Migration results
|
|
61618
61626
|
*/
|
|
61619
61627
|
processCollaborationMigrations() {
|
|
61620
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.28.
|
|
61628
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.28.2");
|
|
61621
61629
|
if (!this.options.ydoc) return;
|
|
61622
61630
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
61623
61631
|
let docVersion = metaMap.get("version");
|
|
@@ -117515,7 +117523,7 @@ ${style2}
|
|
|
117515
117523
|
this.config.colors = shuffleArray(this.config.colors);
|
|
117516
117524
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
117517
117525
|
this.colorIndex = 0;
|
|
117518
|
-
this.version = "0.28.
|
|
117526
|
+
this.version = "0.28.2";
|
|
117519
117527
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
117520
117528
|
this.superdocId = config2.superdocId || v4();
|
|
117521
117529
|
this.colors = this.config.colors;
|
|
@@ -119915,7 +119923,7 @@ ${style2}
|
|
|
119915
119923
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
119916
119924
|
);
|
|
119917
119925
|
}
|
|
119918
|
-
const
|
|
119926
|
+
const indexB3rVM2bJ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
119919
119927
|
__proto__: null,
|
|
119920
119928
|
unified
|
|
119921
119929
|
}, Symbol.toStringTag, { value: "Module" }));
|