@harbour-enterprises/superdoc 0.30.0-next.4 → 0.30.0-next.6
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-Sfmu-cdb.cjs → PdfViewer-Br3uLtct.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DyeZP8Nl.es.js → PdfViewer-CUTMj5RE.es.js} +1 -1
- package/dist/chunks/{index-BuNsREKD.cjs → index-BDHxhYs7.cjs} +7 -6
- package/dist/chunks/{index-BHHC2mqV.es.js → index-BKpU3J9C.es.js} +7 -6
- package/dist/chunks/{index-D6-7DIFN-BWm3AMeg.es.js → index-Cl-cHAOX-B0b2FNkc.es.js} +1 -1
- package/dist/chunks/{index-D6-7DIFN-Dhy8SBt-.cjs → index-Cl-cHAOX-KFl7ZmMz.cjs} +1 -1
- package/dist/chunks/{super-editor.es-Dg85Z65T.es.js → super-editor.es-BHj2Pdqj.es.js} +10 -10
- package/dist/chunks/{super-editor.es-c6saBc8S.cjs → super-editor.es-C5HSjMYm.cjs} +10 -10
- 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-OJmgERLD.js → converter-B2Oi2KIq.js} +4 -1
- package/dist/super-editor/chunks/{docx-zipper-DmTCMGub.js → docx-zipper-D26IydiB.js} +1 -1
- package/dist/super-editor/chunks/{editor-BV5Ao3FS.js → editor-Dvy9zQYS.js} +8 -11
- package/dist/super-editor/chunks/{index-D6-7DIFN.js → index-Cl-cHAOX.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-s_KEL20H.js → toolbar-C38kG3xU.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/super-converter/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.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 +16 -15
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -15397,6 +15397,9 @@
|
|
|
15397
15397
|
let [value, unit] = parseSizeUnit(lineHeight2);
|
|
15398
15398
|
if (Number.isNaN(value) || value === 0) return {};
|
|
15399
15399
|
if (lineRule === "atLeast" && value < 1) return {};
|
|
15400
|
+
if (!unit && value < 1) {
|
|
15401
|
+
value = 1;
|
|
15402
|
+
}
|
|
15400
15403
|
unit = unit ? unit : defaultUnit;
|
|
15401
15404
|
return isObject2 ? { ["line-height"]: `${value}${unit}` } : `line-height: ${value}${unit}`;
|
|
15402
15405
|
};
|
|
@@ -35264,7 +35267,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
35264
35267
|
static getStoredSuperdocVersion(docx) {
|
|
35265
35268
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
35266
35269
|
}
|
|
35267
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.30.0-next.
|
|
35270
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.30.0-next.6") {
|
|
35268
35271
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
35269
35272
|
}
|
|
35270
35273
|
/**
|
|
@@ -46709,7 +46712,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
46709
46712
|
beforeinput(view, e) {
|
|
46710
46713
|
let inputType = e.inputType;
|
|
46711
46714
|
let command2 = inputType == "historyUndo" ? undo$1 : inputType == "historyRedo" ? redo$1 : null;
|
|
46712
|
-
if (!command2)
|
|
46715
|
+
if (!command2 || !view.editable)
|
|
46713
46716
|
return false;
|
|
46714
46717
|
e.preventDefault();
|
|
46715
46718
|
return command2(view.state, view.dispatch);
|
|
@@ -60327,7 +60330,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60327
60330
|
{ default: remarkStringify2 },
|
|
60328
60331
|
{ default: remarkGfm2 }
|
|
60329
60332
|
] = await Promise.all([
|
|
60330
|
-
Promise.resolve().then(() =>
|
|
60333
|
+
Promise.resolve().then(() => indexClCHAOX),
|
|
60331
60334
|
Promise.resolve().then(() => indexDRCvimau),
|
|
60332
60335
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
60333
60336
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -60545,7 +60548,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
60545
60548
|
* @returns {Object | void} Migration results
|
|
60546
60549
|
*/
|
|
60547
60550
|
processCollaborationMigrations() {
|
|
60548
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.30.0-next.
|
|
60551
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.30.0-next.6");
|
|
60549
60552
|
if (!this.options.ydoc) return;
|
|
60550
60553
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
60551
60554
|
let docVersion = metaMap.get("version");
|
|
@@ -63141,12 +63144,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
63141
63144
|
content2 = node2.content;
|
|
63142
63145
|
}
|
|
63143
63146
|
const updatedNode = node2.type.create({ ...node2.attrs, ...options.attrs }, content2, node2.marks);
|
|
63144
|
-
try {
|
|
63145
|
-
updatedNode.check();
|
|
63146
|
-
} catch {
|
|
63147
|
-
console.error("Updated node does not conform to the schema");
|
|
63148
|
-
return false;
|
|
63149
|
-
}
|
|
63150
63147
|
tr.replaceWith(posFrom, posTo, updatedNode);
|
|
63151
63148
|
}
|
|
63152
63149
|
return true;
|
|
@@ -64167,6 +64164,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
64167
64164
|
const getSpacingStyleString = (spacing, marks, isListItem) => {
|
|
64168
64165
|
let { before, after, line, lineRule, beforeAutospacing, afterAutospacing } = spacing;
|
|
64169
64166
|
line = twipsToLines(line);
|
|
64167
|
+
if (line != null && line < 1) {
|
|
64168
|
+
line = 1;
|
|
64169
|
+
}
|
|
64170
64170
|
if (lineRule === "exact" && line) {
|
|
64171
64171
|
line = String(line);
|
|
64172
64172
|
}
|
|
@@ -102673,7 +102673,7 @@ ${reason}`);
|
|
|
102673
102673
|
const processLoadedDocxComments = async ({ superdoc: superdoc2, editor, comments, documentId }) => {
|
|
102674
102674
|
const document2 = superdocStore.getDocument(documentId);
|
|
102675
102675
|
comments.forEach((comment2) => {
|
|
102676
|
-
const htmlContent =
|
|
102676
|
+
const htmlContent = getHtmlFromComment(comment2.textJson);
|
|
102677
102677
|
if (!htmlContent && !comment2.trackedChange) {
|
|
102678
102678
|
return;
|
|
102679
102679
|
}
|
|
@@ -102686,12 +102686,13 @@ ${reason}`);
|
|
|
102686
102686
|
isInternal: false,
|
|
102687
102687
|
parentCommentId: comment2.parentCommentId,
|
|
102688
102688
|
creatorName,
|
|
102689
|
+
createdTime: comment2.createdTime,
|
|
102689
102690
|
creatorEmail: comment2.creatorEmail,
|
|
102690
102691
|
importedAuthor: {
|
|
102691
102692
|
name: importedName,
|
|
102692
102693
|
email: comment2.creatorEmail
|
|
102693
102694
|
},
|
|
102694
|
-
commentText:
|
|
102695
|
+
commentText: getHtmlFromComment(comment2.textJson),
|
|
102695
102696
|
resolvedTime: comment2.isDone ? Date.now() : null,
|
|
102696
102697
|
resolvedByEmail: comment2.isDone ? comment2.creatorEmail : null,
|
|
102697
102698
|
resolvedByName: comment2.isDone ? importedName : null,
|
|
@@ -102799,7 +102800,7 @@ ${reason}`);
|
|
|
102799
102800
|
content: normalizedChildren
|
|
102800
102801
|
};
|
|
102801
102802
|
};
|
|
102802
|
-
const
|
|
102803
|
+
const getHtmlFromComment = (commentTextJson) => {
|
|
102803
102804
|
if (!commentTextJson.content?.length) return;
|
|
102804
102805
|
try {
|
|
102805
102806
|
const normalizedContent = normalizeCommentForEditor(commentTextJson);
|
|
@@ -116625,7 +116626,7 @@ ${style2}
|
|
|
116625
116626
|
this.config.colors = shuffleArray(this.config.colors);
|
|
116626
116627
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
116627
116628
|
this.colorIndex = 0;
|
|
116628
|
-
this.version = "0.30.0-next.
|
|
116629
|
+
this.version = "0.30.0-next.6";
|
|
116629
116630
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
116630
116631
|
this.superdocId = config2.superdocId || v4();
|
|
116631
116632
|
this.colors = this.config.colors;
|
|
@@ -119025,7 +119026,7 @@ ${style2}
|
|
|
119025
119026
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
119026
119027
|
);
|
|
119027
119028
|
}
|
|
119028
|
-
const
|
|
119029
|
+
const indexClCHAOX = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
119029
119030
|
__proto__: null,
|
|
119030
119031
|
unified
|
|
119031
119032
|
}, Symbol.toStringTag, { value: "Module" }));
|