@harbour-enterprises/superdoc 1.0.0-beta.92 → 1.0.0-beta.93
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-CrMwuKcn.es.js → PdfViewer-DDlUqq8s.es.js} +1 -1
- package/dist/chunks/{PdfViewer-BYKB8fT_.cjs → PdfViewer-DbMCgjlc.cjs} +1 -1
- package/dist/chunks/{index-BZloH4nq.cjs → index-CIyFPdjr.cjs} +3 -3
- package/dist/chunks/{index-CqnVFwjL-zbanjw1O.cjs → index-Cyp2JwAE-BDSzsvVr.cjs} +1 -1
- package/dist/chunks/{index-CqnVFwjL-DJT5AqWq.es.js → index-Cyp2JwAE-C4V2XscX.es.js} +1 -1
- package/dist/chunks/{index-CUUqzJ4M.es.js → index-D1G3HZnw.es.js} +3 -3
- package/dist/chunks/{super-editor.es-ALp2ApyE.es.js → super-editor.es-BLW0IRfr.es.js} +174 -6
- package/dist/chunks/{super-editor.es-DvpDTsC4.cjs → super-editor.es-CZ_EMz2h.cjs} +174 -6
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CpOA_SSA.js → converter-CvPb50HR.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-zilXqAq6.js → docx-zipper-BWUuyGDp.js} +1 -1
- package/dist/super-editor/chunks/{editor-DvF9Gp0h.js → editor-CsWOz21v.js} +175 -7
- package/dist/super-editor/chunks/{index-CqnVFwjL.js → index-Cyp2JwAE.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-BVOTlKFf.js → toolbar-DjWypz4_.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 +176 -8
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -42398,7 +42398,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
42398
42398
|
static getStoredSuperdocVersion(docx) {
|
|
42399
42399
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42400
42400
|
}
|
|
42401
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.
|
|
42401
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.93") {
|
|
42402
42402
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42403
42403
|
}
|
|
42404
42404
|
/**
|
|
@@ -67461,7 +67461,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
67461
67461
|
const shouldSkipNodeView = (editor) => {
|
|
67462
67462
|
return isHeadless(editor);
|
|
67463
67463
|
};
|
|
67464
|
-
const summaryVersion = "1.0.0-beta.
|
|
67464
|
+
const summaryVersion = "1.0.0-beta.93";
|
|
67465
67465
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
67466
67466
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
67467
67467
|
function mapAttributes(attrs) {
|
|
@@ -68250,7 +68250,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68250
68250
|
{ default: remarkStringify2 },
|
|
68251
68251
|
{ default: remarkGfm2 }
|
|
68252
68252
|
] = await Promise.all([
|
|
68253
|
-
Promise.resolve().then(() =>
|
|
68253
|
+
Promise.resolve().then(() => indexCyp2JwAE),
|
|
68254
68254
|
Promise.resolve().then(() => indexDRCvimau),
|
|
68255
68255
|
Promise.resolve().then(() => indexC_x_N6Uh),
|
|
68256
68256
|
Promise.resolve().then(() => indexD_sWOSiG),
|
|
@@ -68455,7 +68455,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
68455
68455
|
* Process collaboration migrations
|
|
68456
68456
|
*/
|
|
68457
68457
|
processCollaborationMigrations() {
|
|
68458
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.
|
|
68458
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.93");
|
|
68459
68459
|
if (!this.options.ydoc) return;
|
|
68460
68460
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
68461
68461
|
let docVersion = metaMap.get("version");
|
|
@@ -85335,7 +85335,26 @@ ${l}
|
|
|
85335
85335
|
textRun.token ?? ""
|
|
85336
85336
|
].join(",");
|
|
85337
85337
|
}).join("|");
|
|
85338
|
-
|
|
85338
|
+
const attrs = block.attrs;
|
|
85339
|
+
const paragraphAttrsVersion = attrs ? [
|
|
85340
|
+
attrs.alignment ?? "",
|
|
85341
|
+
attrs.spacing?.before ?? "",
|
|
85342
|
+
attrs.spacing?.after ?? "",
|
|
85343
|
+
attrs.spacing?.line ?? "",
|
|
85344
|
+
attrs.spacing?.lineRule ?? "",
|
|
85345
|
+
attrs.indent?.left ?? "",
|
|
85346
|
+
attrs.indent?.right ?? "",
|
|
85347
|
+
attrs.indent?.firstLine ?? "",
|
|
85348
|
+
attrs.indent?.hanging ?? "",
|
|
85349
|
+
attrs.borders ? JSON.stringify(attrs.borders) : "",
|
|
85350
|
+
attrs.shading?.fill ?? "",
|
|
85351
|
+
attrs.shading?.color ?? "",
|
|
85352
|
+
attrs.direction ?? "",
|
|
85353
|
+
attrs.rtl ? "1" : "",
|
|
85354
|
+
attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
|
|
85355
|
+
].join(":") : "";
|
|
85356
|
+
const parts = [markerVersion, runsVersion, paragraphAttrsVersion].filter(Boolean);
|
|
85357
|
+
return parts.join("|");
|
|
85339
85358
|
}
|
|
85340
85359
|
if (block.kind === "list") {
|
|
85341
85360
|
return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
|
|
@@ -89082,6 +89101,33 @@ ${l}
|
|
|
89082
89101
|
const BYTES_PER_ENTRY_ESTIMATE = 5e3;
|
|
89083
89102
|
const NORMALIZED_WHITESPACE = /\s+/g;
|
|
89084
89103
|
const normalizeText = (text2) => text2.replace(NORMALIZED_WHITESPACE, " ");
|
|
89104
|
+
const hashParagraphBorder = (border) => {
|
|
89105
|
+
const parts = [];
|
|
89106
|
+
if (border.style !== void 0) parts.push(`s:${border.style}`);
|
|
89107
|
+
if (border.width !== void 0) parts.push(`w:${border.width}`);
|
|
89108
|
+
if (border.color !== void 0) parts.push(`c:${border.color}`);
|
|
89109
|
+
if (border.space !== void 0) parts.push(`sp:${border.space}`);
|
|
89110
|
+
return parts.join(",");
|
|
89111
|
+
};
|
|
89112
|
+
const hashParagraphBorders = (borders) => {
|
|
89113
|
+
const parts = [];
|
|
89114
|
+
if (borders.top) parts.push(`t:[${hashParagraphBorder(borders.top)}]`);
|
|
89115
|
+
if (borders.right) parts.push(`r:[${hashParagraphBorder(borders.right)}]`);
|
|
89116
|
+
if (borders.bottom) parts.push(`b:[${hashParagraphBorder(borders.bottom)}]`);
|
|
89117
|
+
if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
|
|
89118
|
+
return parts.join(";");
|
|
89119
|
+
};
|
|
89120
|
+
const hashParagraphFrame = (frame) => {
|
|
89121
|
+
const parts = [];
|
|
89122
|
+
if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
|
|
89123
|
+
if (frame.x !== void 0) parts.push(`x:${frame.x}`);
|
|
89124
|
+
if (frame.y !== void 0) parts.push(`y:${frame.y}`);
|
|
89125
|
+
if (frame.xAlign !== void 0) parts.push(`xa:${frame.xAlign}`);
|
|
89126
|
+
if (frame.yAlign !== void 0) parts.push(`ya:${frame.yAlign}`);
|
|
89127
|
+
if (frame.hAnchor !== void 0) parts.push(`ha:${frame.hAnchor}`);
|
|
89128
|
+
if (frame.vAnchor !== void 0) parts.push(`va:${frame.vAnchor}`);
|
|
89129
|
+
return parts.join(",");
|
|
89130
|
+
};
|
|
89085
89131
|
const hashRuns = (block) => {
|
|
89086
89132
|
if (block.kind === "table") {
|
|
89087
89133
|
const tableBlock = block;
|
|
@@ -89177,7 +89223,59 @@ ${l}
|
|
|
89177
89223
|
numberingKey = `|num:${np.numId ?? ""}:${np.ilvl ?? 0}:${markerTextKey}`;
|
|
89178
89224
|
}
|
|
89179
89225
|
}
|
|
89180
|
-
|
|
89226
|
+
let paragraphAttrsKey = "";
|
|
89227
|
+
if (block.attrs) {
|
|
89228
|
+
const attrs = block.attrs;
|
|
89229
|
+
const parts = [];
|
|
89230
|
+
if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
|
|
89231
|
+
if (attrs.spacing) {
|
|
89232
|
+
const s2 = attrs.spacing;
|
|
89233
|
+
if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
|
|
89234
|
+
if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
|
|
89235
|
+
if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
|
|
89236
|
+
if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
|
|
89237
|
+
}
|
|
89238
|
+
if (attrs.indent) {
|
|
89239
|
+
const ind = attrs.indent;
|
|
89240
|
+
if (ind.left !== void 0) parts.push(`il:${ind.left}`);
|
|
89241
|
+
if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
|
|
89242
|
+
if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
|
|
89243
|
+
if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
|
|
89244
|
+
}
|
|
89245
|
+
if (attrs.borders) {
|
|
89246
|
+
parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
|
|
89247
|
+
}
|
|
89248
|
+
if (attrs.shading) {
|
|
89249
|
+
const sh = attrs.shading;
|
|
89250
|
+
if (sh.fill) parts.push(`shf:${sh.fill}`);
|
|
89251
|
+
if (sh.color) parts.push(`shc:${sh.color}`);
|
|
89252
|
+
}
|
|
89253
|
+
if (attrs.tabs && attrs.tabs.length > 0) {
|
|
89254
|
+
const tabsHash = attrs.tabs.map((t) => `${t.val ?? ""}:${t.pos ?? ""}:${t.leader ?? ""}`).join(",");
|
|
89255
|
+
parts.push(`tb:${tabsHash}`);
|
|
89256
|
+
}
|
|
89257
|
+
if (attrs.direction) parts.push(`dir:${attrs.direction}`);
|
|
89258
|
+
if (attrs.rtl) parts.push("rtl");
|
|
89259
|
+
if (attrs.keepNext) parts.push("kn");
|
|
89260
|
+
if (attrs.keepLines) parts.push("kl");
|
|
89261
|
+
if (attrs.floatAlignment) parts.push(`fa:${attrs.floatAlignment}`);
|
|
89262
|
+
if (attrs.contextualSpacing) parts.push("cs");
|
|
89263
|
+
if (attrs.suppressFirstLineIndent) parts.push("sfi");
|
|
89264
|
+
if (attrs.dropCap) parts.push(`dc:${attrs.dropCap}`);
|
|
89265
|
+
if (attrs.dropCapDescriptor) {
|
|
89266
|
+
const dcd = attrs.dropCapDescriptor;
|
|
89267
|
+
parts.push(`dcd:${dcd.mode ?? ""}:${dcd.lines ?? ""}`);
|
|
89268
|
+
}
|
|
89269
|
+
if (attrs.frame) {
|
|
89270
|
+
parts.push(`fr:${hashParagraphFrame(attrs.frame)}`);
|
|
89271
|
+
}
|
|
89272
|
+
if (attrs.tabIntervalTwips !== void 0) parts.push(`ti:${attrs.tabIntervalTwips}`);
|
|
89273
|
+
if (attrs.decimalSeparator) parts.push(`ds:${attrs.decimalSeparator}`);
|
|
89274
|
+
if (parts.length > 0) {
|
|
89275
|
+
paragraphAttrsKey = `|pa:${parts.join(":")}`;
|
|
89276
|
+
}
|
|
89277
|
+
}
|
|
89278
|
+
return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}${paragraphAttrsKey}`;
|
|
89181
89279
|
};
|
|
89182
89280
|
const createStats = () => ({
|
|
89183
89281
|
hits: 0,
|
|
@@ -90062,6 +90160,75 @@ ${l}
|
|
|
90062
90160
|
}
|
|
90063
90161
|
return "";
|
|
90064
90162
|
};
|
|
90163
|
+
const paragraphSpacingEqual = (a2, b2) => {
|
|
90164
|
+
if (a2 === b2) return true;
|
|
90165
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90166
|
+
return a2.before === b2.before && a2.after === b2.after && a2.line === b2.line && a2.lineRule === b2.lineRule && a2.beforeAutospacing === b2.beforeAutospacing && a2.afterAutospacing === b2.afterAutospacing;
|
|
90167
|
+
};
|
|
90168
|
+
const paragraphIndentEqual = (a2, b2) => {
|
|
90169
|
+
if (a2 === b2) return true;
|
|
90170
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90171
|
+
return a2.left === b2.left && a2.right === b2.right && a2.firstLine === b2.firstLine && a2.hanging === b2.hanging;
|
|
90172
|
+
};
|
|
90173
|
+
const paragraphBorderEqual = (a2, b2) => {
|
|
90174
|
+
if (a2 === b2) return true;
|
|
90175
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90176
|
+
return a2.style === b2.style && a2.width === b2.width && a2.color === b2.color && a2.space === b2.space;
|
|
90177
|
+
};
|
|
90178
|
+
const paragraphBordersEqual = (a2, b2) => {
|
|
90179
|
+
if (a2 === b2) return true;
|
|
90180
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90181
|
+
return paragraphBorderEqual(a2.top, b2.top) && paragraphBorderEqual(a2.right, b2.right) && paragraphBorderEqual(a2.bottom, b2.bottom) && paragraphBorderEqual(a2.left, b2.left);
|
|
90182
|
+
};
|
|
90183
|
+
const paragraphShadingEqual = (a2, b2) => {
|
|
90184
|
+
if (a2 === b2) return true;
|
|
90185
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90186
|
+
return a2.fill === b2.fill && a2.color === b2.color && a2.val === b2.val && a2.themeColor === b2.themeColor && a2.themeFill === b2.themeFill && a2.themeFillShade === b2.themeFillShade && a2.themeFillTint === b2.themeFillTint && a2.themeShade === b2.themeShade && a2.themeTint === b2.themeTint;
|
|
90187
|
+
};
|
|
90188
|
+
const tabStopEqual = (a2, b2) => {
|
|
90189
|
+
return a2.val === b2.val && a2.pos === b2.pos && a2.leader === b2.leader;
|
|
90190
|
+
};
|
|
90191
|
+
const tabStopsEqual = (a2, b2) => {
|
|
90192
|
+
if (a2 === b2) return true;
|
|
90193
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90194
|
+
if (a2.length !== b2.length) return false;
|
|
90195
|
+
for (let i2 = 0; i2 < a2.length; i2 += 1) {
|
|
90196
|
+
if (!tabStopEqual(a2[i2], b2[i2])) return false;
|
|
90197
|
+
}
|
|
90198
|
+
return true;
|
|
90199
|
+
};
|
|
90200
|
+
const paragraphFrameEqual = (a2, b2) => {
|
|
90201
|
+
if (a2 === b2) return true;
|
|
90202
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90203
|
+
return a2.wrap === b2.wrap && a2.x === b2.x && a2.y === b2.y && a2.xAlign === b2.xAlign && a2.yAlign === b2.yAlign && a2.hAnchor === b2.hAnchor && a2.vAnchor === b2.vAnchor;
|
|
90204
|
+
};
|
|
90205
|
+
const dropCapDescriptorEqual = (a2, b2) => {
|
|
90206
|
+
if (a2 === b2) return true;
|
|
90207
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90208
|
+
if (a2.mode !== b2.mode || a2.lines !== b2.lines) return false;
|
|
90209
|
+
const runA = a2.run;
|
|
90210
|
+
const runB = b2.run;
|
|
90211
|
+
if (!runA || !runB) return !runA && !runB;
|
|
90212
|
+
if (runA.text !== runB.text || runA.fontFamily !== runB.fontFamily || runA.fontSize !== runB.fontSize || runA.bold !== runB.bold || runA.italic !== runB.italic || runA.color !== runB.color) {
|
|
90213
|
+
return false;
|
|
90214
|
+
}
|
|
90215
|
+
return true;
|
|
90216
|
+
};
|
|
90217
|
+
const paragraphAttrsEqual = (a2, b2) => {
|
|
90218
|
+
if (a2 === b2) return true;
|
|
90219
|
+
if (!a2 || !b2) return !a2 && !b2;
|
|
90220
|
+
if (a2.alignment !== b2.alignment || a2.contextualSpacing !== b2.contextualSpacing || a2.suppressFirstLineIndent !== b2.suppressFirstLineIndent || a2.dropCap !== b2.dropCap || a2.decimalSeparator !== b2.decimalSeparator || a2.tabIntervalTwips !== b2.tabIntervalTwips || a2.keepNext !== b2.keepNext || a2.keepLines !== b2.keepLines || a2.direction !== b2.direction || a2.rtl !== b2.rtl || a2.floatAlignment !== b2.floatAlignment) {
|
|
90221
|
+
return false;
|
|
90222
|
+
}
|
|
90223
|
+
if (!paragraphSpacingEqual(a2.spacing, b2.spacing)) return false;
|
|
90224
|
+
if (!paragraphIndentEqual(a2.indent, b2.indent)) return false;
|
|
90225
|
+
if (!paragraphBordersEqual(a2.borders, b2.borders)) return false;
|
|
90226
|
+
if (!paragraphShadingEqual(a2.shading, b2.shading)) return false;
|
|
90227
|
+
if (!tabStopsEqual(a2.tabs, b2.tabs)) return false;
|
|
90228
|
+
if (!paragraphFrameEqual(a2.frame, b2.frame)) return false;
|
|
90229
|
+
if (!dropCapDescriptorEqual(a2.dropCapDescriptor, b2.dropCapDescriptor)) return false;
|
|
90230
|
+
return true;
|
|
90231
|
+
};
|
|
90065
90232
|
const paragraphBlocksEqual = (a2, b2) => {
|
|
90066
90233
|
const aMode = a2.attrs?.trackedChangesMode ?? "review";
|
|
90067
90234
|
const bMode = b2.attrs?.trackedChangesMode ?? "review";
|
|
@@ -90069,6 +90236,7 @@ ${l}
|
|
|
90069
90236
|
const aEnabled = resolveTrackedChangesEnabled(a2.attrs, true);
|
|
90070
90237
|
const bEnabled = resolveTrackedChangesEnabled(b2.attrs, true);
|
|
90071
90238
|
if (aEnabled !== bEnabled) return false;
|
|
90239
|
+
if (!paragraphAttrsEqual(a2.attrs, b2.attrs)) return false;
|
|
90072
90240
|
if (a2.runs.length !== b2.runs.length) return false;
|
|
90073
90241
|
for (let i2 = 0; i2 < a2.runs.length; i2 += 1) {
|
|
90074
90242
|
const runA = a2.runs[i2];
|
|
@@ -151617,7 +151785,7 @@ ${style2}
|
|
|
151617
151785
|
this.config.colors = shuffleArray(this.config.colors);
|
|
151618
151786
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
151619
151787
|
this.colorIndex = 0;
|
|
151620
|
-
this.version = "1.0.0-beta.
|
|
151788
|
+
this.version = "1.0.0-beta.93";
|
|
151621
151789
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
151622
151790
|
this.superdocId = config2.superdocId || v4();
|
|
151623
151791
|
this.colors = this.config.colors;
|
|
@@ -154089,7 +154257,7 @@ ${style2}
|
|
|
154089
154257
|
value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
|
|
154090
154258
|
);
|
|
154091
154259
|
}
|
|
154092
|
-
const
|
|
154260
|
+
const indexCyp2JwAE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
154093
154261
|
__proto__: null,
|
|
154094
154262
|
unified
|
|
154095
154263
|
}, Symbol.toStringTag, { value: "Module" }));
|