superdoc 0.34.2 → 0.34.4
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-BX04ySvl.es.js → PdfViewer-CL_-YyBC.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BPJPigid.cjs → PdfViewer-CcDvbfeP.cjs} +1 -1
- package/dist/chunks/{index-SmCPSImB.cjs → index-Cp_Yy4vP.cjs} +7 -6
- package/dist/chunks/{index-Bc2gy2xA-Bf52dq22.cjs → index-DPjn4rpi-Bs9-iTbY.cjs} +1 -1
- package/dist/chunks/{index-Bc2gy2xA-CCcL61rB.es.js → index-DPjn4rpi-BwmVppCt.es.js} +1 -1
- package/dist/chunks/{index-BGN3hCnI.es.js → index-oLU8CBCH.es.js} +7 -6
- package/dist/chunks/{super-editor.es-DKkntOsz.cjs → super-editor.es-C2FJLfJa.cjs} +5 -8
- package/dist/chunks/{super-editor.es-1F-7gWB8.es.js → super-editor.es-C350__qM.es.js} +5 -8
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-D1KVwi0x.js → converter-KW3z-Mzc.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-n9jZYnn2.js → docx-zipper-CYtxqNuc.js} +1 -1
- package/dist/super-editor/chunks/{editor-CV34u8tn.js → editor-CTHJwQNA.js} +6 -9
- package/dist/super-editor/chunks/{index-Bc2gy2xA.js → index-DPjn4rpi.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BiyHvnpS.js → toolbar-BUz0UuKQ.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/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +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 +11 -13
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -35776,7 +35776,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35776
35776
|
static getStoredSuperdocVersion(docx) {
|
|
35777
35777
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35778
35778
|
}
|
|
35779
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.
|
|
35779
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.34.4") {
|
|
35780
35780
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35781
35781
|
}
|
|
35782
35782
|
/**
|
|
@@ -61553,12 +61553,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61553
61553
|
if (!this.schema) {
|
|
61554
61554
|
throw new Error("Schema is not initialized.");
|
|
61555
61555
|
}
|
|
61556
|
-
const topNodeName = this.schema.topNodeType?.name || "doc";
|
|
61557
|
-
const normalizedDoc = Array.isArray(doc2) ? { type: topNodeName, content: doc2 } : doc2 && typeof doc2 === "object" && doc2.type ? doc2.type === topNodeName || doc2.type === "doc" ? doc2 : { type: topNodeName, content: [doc2] } : (() => {
|
|
61558
|
-
throw new Error("Invalid document shape: expected a node object or an array of node objects.");
|
|
61559
|
-
})();
|
|
61560
61556
|
try {
|
|
61561
|
-
return this.schema.nodeFromJSON(
|
|
61557
|
+
if (Array.isArray(doc2)) return doc2.map((d2) => this.schema.nodeFromJSON(d2));
|
|
61558
|
+
return this.schema.nodeFromJSON(doc2);
|
|
61562
61559
|
} catch (error) {
|
|
61563
61560
|
const detail = error instanceof Error ? error.message : String(error);
|
|
61564
61561
|
const validationError = new Error(`Invalid document for current schema: ${detail}`);
|
|
@@ -61816,7 +61813,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61816
61813
|
{ default: remarkStringify2 },
|
|
61817
61814
|
{ default: remarkGfm2 }
|
|
61818
61815
|
] = await Promise.all([
|
|
61819
|
-
Promise.resolve().then(() =>
|
|
61816
|
+
Promise.resolve().then(() => indexDPjn4rpi),
|
|
61820
61817
|
Promise.resolve().then(() => indexDRCvimau),
|
|
61821
61818
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
61822
61819
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -62034,7 +62031,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
62034
62031
|
* @returns {Object | void} Migration results
|
|
62035
62032
|
*/
|
|
62036
62033
|
processCollaborationMigrations() {
|
|
62037
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.34.
|
|
62034
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.34.4");
|
|
62038
62035
|
if (!this.options.ydoc) return;
|
|
62039
62036
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
62040
62037
|
let docVersion = metaMap.get("version");
|
|
@@ -104528,7 +104525,7 @@ ${reason}`);
|
|
|
104528
104525
|
const processLoadedDocxComments = async ({ superdoc: superdoc2, editor, comments, documentId }) => {
|
|
104529
104526
|
const document2 = superdocStore.getDocument(documentId);
|
|
104530
104527
|
comments.forEach((comment2) => {
|
|
104531
|
-
const htmlContent =
|
|
104528
|
+
const htmlContent = getHtmlFromComment(comment2.textJson);
|
|
104532
104529
|
if (!htmlContent && !comment2.trackedChange) {
|
|
104533
104530
|
return;
|
|
104534
104531
|
}
|
|
@@ -104541,12 +104538,13 @@ ${reason}`);
|
|
|
104541
104538
|
isInternal: false,
|
|
104542
104539
|
parentCommentId: comment2.parentCommentId,
|
|
104543
104540
|
creatorName,
|
|
104541
|
+
createdTime: comment2.createdTime,
|
|
104544
104542
|
creatorEmail: comment2.creatorEmail,
|
|
104545
104543
|
importedAuthor: {
|
|
104546
104544
|
name: importedName,
|
|
104547
104545
|
email: comment2.creatorEmail
|
|
104548
104546
|
},
|
|
104549
|
-
commentText:
|
|
104547
|
+
commentText: getHtmlFromComment(comment2.textJson),
|
|
104550
104548
|
resolvedTime: comment2.isDone ? Date.now() : null,
|
|
104551
104549
|
resolvedByEmail: comment2.isDone ? comment2.creatorEmail : null,
|
|
104552
104550
|
resolvedByName: comment2.isDone ? importedName : null,
|
|
@@ -104654,7 +104652,7 @@ ${reason}`);
|
|
|
104654
104652
|
content: normalizedChildren
|
|
104655
104653
|
};
|
|
104656
104654
|
};
|
|
104657
|
-
const
|
|
104655
|
+
const getHtmlFromComment = (commentTextJson) => {
|
|
104658
104656
|
if (!commentTextJson.content?.length) return;
|
|
104659
104657
|
try {
|
|
104660
104658
|
const normalizedContent = normalizeCommentForEditor(commentTextJson);
|
|
@@ -118480,7 +118478,7 @@ ${style2}
|
|
|
118480
118478
|
this.config.colors = shuffleArray(this.config.colors);
|
|
118481
118479
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
118482
118480
|
this.colorIndex = 0;
|
|
118483
|
-
this.version = "0.34.
|
|
118481
|
+
this.version = "0.34.4";
|
|
118484
118482
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
118485
118483
|
this.superdocId = config2.superdocId || v4();
|
|
118486
118484
|
this.colors = this.config.colors;
|
|
@@ -120880,7 +120878,7 @@ ${style2}
|
|
|
120880
120878
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
120881
120879
|
);
|
|
120882
120880
|
}
|
|
120883
|
-
const
|
|
120881
|
+
const indexDPjn4rpi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
120884
120882
|
__proto__: null,
|
|
120885
120883
|
unified
|
|
120886
120884
|
}, Symbol.toStringTag, { value: "Module" }));
|