@harbour-enterprises/superdoc 0.10.65 → 0.10.67
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-Br9eH3cn.es.js → super-editor.es-BRYxQzRj.es.js} +33 -21
- package/dist/chunks/{super-editor.es-zve2N3NE.cjs → super-editor.es-Bcx9TKdw.cjs} +7 -7
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{converter-CPw1nhKU.js → converter-Dz-K_mnV.js} +380 -368
- package/dist/super-editor/chunks/{docx-zipper-DmUudu9K.js → docx-zipper-Dx87uIsl.js} +3 -3
- package/dist/super-editor/chunks/{editor-ByusZHOE.js → editor-rrhXdIHQ.js} +4 -4
- package/dist/super-editor/chunks/{toolbar-BwyACjtB.js → toolbar-Cl1-XAHv.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/trackChangesImporter.d.ts.map +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 +3 -3
- package/dist/superdoc.umd.js +385 -373
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -15265,17 +15265,27 @@ function mv(t) {
|
|
|
15265
15265
|
}
|
|
15266
15266
|
const D6 = (t) => {
|
|
15267
15267
|
const { nodes: e, nodeListHandler: n } = t;
|
|
15268
|
-
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins"))
|
|
15268
|
+
if (e.length === 0 || !(e[0].name === "w:del" || e[0].name === "w:ins" || e[0].name === "w:sdt"))
|
|
15269
15269
|
return { nodes: [], consumed: 0 };
|
|
15270
|
-
const r = e[0]
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15270
|
+
const r = e[0];
|
|
15271
|
+
let o;
|
|
15272
|
+
if (["w:ins", "w:del"].includes(r.name))
|
|
15273
|
+
o = r;
|
|
15274
|
+
else {
|
|
15275
|
+
const d = r.elements.find((f) => f.name === "w:sdtContent")?.elements.find((f) => ["w:ins", "w:del"].includes(f.name));
|
|
15276
|
+
d && (o = d);
|
|
15277
|
+
}
|
|
15278
|
+
if (!o)
|
|
15279
|
+
return { nodes: [], consumed: 0 };
|
|
15280
|
+
const { name: i } = o, { attributes: s, elements: a } = Fo(o), l = n.handler({ ...t, insideTrackChange: !0, nodes: a }), c = i === "w:del" ? wt : Wt, u = {
|
|
15281
|
+
id: s["w:id"],
|
|
15282
|
+
date: s["w:date"],
|
|
15283
|
+
author: s["w:author"],
|
|
15284
|
+
authorEmail: s["w:authorEmail"]
|
|
15275
15285
|
};
|
|
15276
|
-
return
|
|
15277
|
-
|
|
15278
|
-
}), { nodes:
|
|
15286
|
+
return l.forEach((d) => {
|
|
15287
|
+
d.marks === void 0 && (d.marks = []), d.marks.push({ type: c, attrs: u });
|
|
15288
|
+
}), { nodes: l, consumed: 1 };
|
|
15279
15289
|
}, _6 = {
|
|
15280
15290
|
handlerName: "trackChangeNodeHandler",
|
|
15281
15291
|
handler: D6
|
|
@@ -16558,7 +16568,7 @@ const hs = class Tv {
|
|
|
16558
16568
|
return;
|
|
16559
16569
|
}
|
|
16560
16570
|
}
|
|
16561
|
-
static updateDocumentVersion(e = this.convertedXml, n = "0.10.
|
|
16571
|
+
static updateDocumentVersion(e = this.convertedXml, n = "0.10.67") {
|
|
16562
16572
|
const r = "docProps/custom.xml";
|
|
16563
16573
|
e[r] || (e[r] = Ov());
|
|
16564
16574
|
const o = e["docProps/custom.xml"];
|
|
@@ -16607,18 +16617,20 @@ const hs = class Tv {
|
|
|
16607
16617
|
}, []), r = this.convertedXml["word/_rels/fontTable.xml.rels"]?.elements.find((s) => s.name === "Relationships") || {}, { elements: o } = r;
|
|
16608
16618
|
let i = "";
|
|
16609
16619
|
for (const s of n) {
|
|
16610
|
-
const a = o.find((
|
|
16620
|
+
const a = o.find((y) => y.attributes.Id === s.attributes["r:id"])?.attributes?.Target;
|
|
16611
16621
|
if (!a) return;
|
|
16612
|
-
const l =
|
|
16622
|
+
const l = this.fonts[`word/${a}`]?.buffer;
|
|
16613
16623
|
if (!l) return;
|
|
16614
|
-
const c =
|
|
16624
|
+
const c = r4(l, s.attributes["w:fontKey"]);
|
|
16625
|
+
if (!c) return;
|
|
16626
|
+
const u = new Blob([c], { type: "font/ttf" }), d = URL.createObjectURL(u), f = s.name.includes("Regular"), p = s.name.includes("Bold"), h = s.name.includes("Italic"), m = s.name.includes("Light");
|
|
16615
16627
|
i += `
|
|
16616
16628
|
@font-face {
|
|
16617
|
-
font-style: ${
|
|
16618
|
-
font-weight: ${
|
|
16629
|
+
font-style: ${h ? "italic" : "normal"};
|
|
16630
|
+
font-weight: ${f ? "normal" : p ? "bold" : m ? "200" : "normal"};
|
|
16619
16631
|
font-display: swap;
|
|
16620
16632
|
font-family: ${s.fontFamily};
|
|
16621
|
-
src: url(${
|
|
16633
|
+
src: url(${d}) format('truetype');
|
|
16622
16634
|
}
|
|
16623
16635
|
`;
|
|
16624
16636
|
}
|
|
@@ -16819,7 +16831,7 @@ function R$(t) {
|
|
|
16819
16831
|
function Ov() {
|
|
16820
16832
|
return i4;
|
|
16821
16833
|
}
|
|
16822
|
-
function Mv(t = 2, e = "0.10.
|
|
16834
|
+
function Mv(t = 2, e = "0.10.67") {
|
|
16823
16835
|
return {
|
|
16824
16836
|
type: "element",
|
|
16825
16837
|
name: "property",
|
|
@@ -19190,8 +19202,8 @@ let ay = class {
|
|
|
19190
19202
|
const p = new File([u], c.name, { type: u.type }), h = URL.createObjectURL(p);
|
|
19191
19203
|
this.media[c.name] = h;
|
|
19192
19204
|
}
|
|
19193
|
-
else if (
|
|
19194
|
-
const u = await c.async("
|
|
19205
|
+
else if (c.name.startsWith("word/fonts") && c.name !== "word/fonts/") {
|
|
19206
|
+
const u = await c.async("uint8array");
|
|
19195
19207
|
this.fonts[c.name] = u;
|
|
19196
19208
|
}
|
|
19197
19209
|
}
|
|
@@ -29291,7 +29303,7 @@ const w8 = class $x extends yM {
|
|
|
29291
29303
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
29292
29304
|
*/
|
|
29293
29305
|
processCollaborationMigrations() {
|
|
29294
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.
|
|
29306
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.67"), !this.options.ydoc) return;
|
|
29295
29307
|
let e = this.options.ydoc.getMap("meta").get("version");
|
|
29296
29308
|
e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
|
|
29297
29309
|
const n = iw(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
|
|
@@ -29324,7 +29336,7 @@ pi = /* @__PURE__ */ new WeakMap(), xx = /* @__PURE__ */ new WeakMap(), We = /*
|
|
|
29324
29336
|
}
|
|
29325
29337
|
t.element = t.isHeadless ? null : t.element || document.createElement("div");
|
|
29326
29338
|
}, Sx = function(t) {
|
|
29327
|
-
Ne(this, We, nd).call(this), Ne(this, We, rd).call(this), Ne(this, We, od).call(this), Ne(this, We, Tf).call(this), Ne(this, We, Of).call(this), Ne(this, We, sw).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), Ne(this, We, ad).call(this), this.initDefaultStyles(), this.setDocumentMode(t.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", Ne(this, We, td)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", Ne(this, We, aw)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (Ne(this, We, ys).call(this), Ne(this, We, gs).call(this)), window.setTimeout(() => {
|
|
29339
|
+
Ne(this, We, nd).call(this), Ne(this, We, rd).call(this), Ne(this, We, od).call(this), Ne(this, We, Tf).call(this), Ne(this, We, Of).call(this), this.options.isHeadless || Ne(this, We, sw).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), Ne(this, We, ad).call(this), this.initDefaultStyles(), this.setDocumentMode(t.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", Ne(this, We, td)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", Ne(this, We, aw)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (Ne(this, We, ys).call(this), Ne(this, We, gs).call(this)), window.setTimeout(() => {
|
|
29328
29340
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
29329
29341
|
}, 0));
|
|
29330
29342
|
}, Cf = function(t) {
|