@harbour-enterprises/superdoc 0.14.13 → 0.14.14-next.2
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-D971SpTa.es.js → super-editor.es-B88X0vir.es.js} +14 -15
- package/dist/chunks/{super-editor.es-Dd2aio_k.cjs → super-editor.es-D2X5tnhY.cjs} +14 -15
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-C5f6eTMy.js → converter-CV2vZYYK.js} +3 -3
- package/dist/super-editor/chunks/{docx-zipper-DucuzM0s.js → docx-zipper-DIL-peaj.js} +1 -1
- package/dist/super-editor/chunks/{editor-DHiDsdyh.js → editor-Bm6WIL0T.js} +13 -14
- package/dist/super-editor/chunks/{toolbar-4KoAQ2zZ.js → toolbar-CDRImUlK.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/commands/splitListItem.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/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- 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 +15 -16
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/superdoc.umd.js
CHANGED
|
@@ -33774,7 +33774,7 @@
|
|
|
33774
33774
|
}
|
|
33775
33775
|
}
|
|
33776
33776
|
_DocxExporter_instances = /* @__PURE__ */ new WeakSet();
|
|
33777
|
-
generate_xml_as_list_fn = function(data, debug =
|
|
33777
|
+
generate_xml_as_list_fn = function(data, debug = false) {
|
|
33778
33778
|
const json = JSON.parse(JSON.stringify(data));
|
|
33779
33779
|
const declaration = this.converter.declaration.attributes;
|
|
33780
33780
|
const xmlTag = `<?xml${Object.entries(declaration).map(([key, value]) => ` ${key}="${value}"`).join("")}?>`;
|
|
@@ -35726,7 +35726,7 @@
|
|
|
35726
35726
|
return;
|
|
35727
35727
|
}
|
|
35728
35728
|
}
|
|
35729
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.
|
|
35729
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.14-next.2") {
|
|
35730
35730
|
const customLocation = "docProps/custom.xml";
|
|
35731
35731
|
if (!docx[customLocation]) {
|
|
35732
35732
|
docx[customLocation] = generateCustomXml();
|
|
@@ -36204,7 +36204,7 @@
|
|
|
36204
36204
|
function generateCustomXml() {
|
|
36205
36205
|
return DEFAULT_CUSTOM_XML;
|
|
36206
36206
|
}
|
|
36207
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.14.
|
|
36207
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.14.14-next.2") {
|
|
36208
36208
|
return {
|
|
36209
36209
|
type: "element",
|
|
36210
36210
|
name: "property",
|
|
@@ -41127,6 +41127,7 @@
|
|
|
41127
41127
|
const paraOffset = $from.parentOffset;
|
|
41128
41128
|
const beforeCursor = paragraphNode.content.cut(0, paraOffset);
|
|
41129
41129
|
const afterCursor = paragraphNode.content.cut(paraOffset);
|
|
41130
|
+
let firstList, secondList;
|
|
41130
41131
|
const listItemHasMultipleParagraphs = listItemNode.childCount > 1;
|
|
41131
41132
|
if (listItemHasMultipleParagraphs) {
|
|
41132
41133
|
const paragraphIndex = $from.index(-1);
|
|
@@ -41164,19 +41165,19 @@
|
|
|
41164
41165
|
{ ...listItemNode.attrs },
|
|
41165
41166
|
Fragment.from(firstListContent)
|
|
41166
41167
|
);
|
|
41167
|
-
|
|
41168
|
+
firstList = editor.schema.nodes.orderedList.createAndFill(parentListNode.attrs, Fragment.from(firstListItem));
|
|
41168
41169
|
const secondListItem = editor.schema.nodes.listItem.create(
|
|
41169
41170
|
{ ...listItemNode.attrs },
|
|
41170
41171
|
Fragment.from(secondListContent)
|
|
41171
41172
|
);
|
|
41172
|
-
|
|
41173
|
+
secondList = editor.schema.nodes.orderedList.createAndFill(parentListNode.attrs, Fragment.from(secondListItem));
|
|
41173
41174
|
} else {
|
|
41174
41175
|
const firstParagraph = editor.schema.nodes.paragraph.create(paragraphNode.attrs, beforeCursor);
|
|
41175
41176
|
const firstListItem = editor.schema.nodes.listItem.create({ ...listItemNode.attrs }, firstParagraph);
|
|
41176
|
-
|
|
41177
|
+
firstList = editor.schema.nodes.orderedList.createAndFill(parentListNode.attrs, Fragment.from(firstListItem));
|
|
41177
41178
|
const secondParagraph = editor.schema.nodes.paragraph.create(paragraphNode.attrs, afterCursor);
|
|
41178
41179
|
const secondListItem = editor.schema.nodes.listItem.create({ ...listItemNode.attrs }, secondParagraph);
|
|
41179
|
-
|
|
41180
|
+
secondList = editor.schema.nodes.orderedList.createAndFill(parentListNode.attrs, Fragment.from(secondListItem));
|
|
41180
41181
|
}
|
|
41181
41182
|
if (!firstList || !secondList) return false;
|
|
41182
41183
|
const listStart = matchedParentList.pos;
|
|
@@ -49684,7 +49685,6 @@
|
|
|
49684
49685
|
});
|
|
49685
49686
|
if (appendToBody) document.body.appendChild(editorContainer);
|
|
49686
49687
|
const headerFooterEditor = new Editor({
|
|
49687
|
-
documentMode: editor.options.documentMode,
|
|
49688
49688
|
role: editor.options.role,
|
|
49689
49689
|
loadFromSchema: true,
|
|
49690
49690
|
mode: "docx",
|
|
@@ -51446,7 +51446,7 @@
|
|
|
51446
51446
|
if (firstChild && firstChild.type.name === "listItem") {
|
|
51447
51447
|
const { attrs } = firstChild;
|
|
51448
51448
|
const { level, listNumberingType } = attrs || {};
|
|
51449
|
-
if (typeof level ===
|
|
51449
|
+
if (typeof level === "undefined" || !listNumberingType) {
|
|
51450
51450
|
return true;
|
|
51451
51451
|
}
|
|
51452
51452
|
const childContent = firstChild?.content?.content;
|
|
@@ -52301,9 +52301,9 @@
|
|
|
52301
52301
|
* @returns {boolean} Whether migrations are needed
|
|
52302
52302
|
*/
|
|
52303
52303
|
static checkIfMigrationsNeeded(data) {
|
|
52304
|
-
|
|
52305
|
-
const migrations = getNecessaryMigrations(
|
|
52306
|
-
console.debug("[checkVersionMigrations] Migrations needed:",
|
|
52304
|
+
const dataVersion = version || "initial";
|
|
52305
|
+
const migrations = getNecessaryMigrations(dataVersion) || [];
|
|
52306
|
+
console.debug("[checkVersionMigrations] Migrations needed:", dataVersion, migrations.length);
|
|
52307
52307
|
return migrations.length > 0;
|
|
52308
52308
|
}
|
|
52309
52309
|
/**
|
|
@@ -52311,7 +52311,7 @@
|
|
|
52311
52311
|
* @returns {Object | void} Migration results
|
|
52312
52312
|
*/
|
|
52313
52313
|
processCollaborationMigrations() {
|
|
52314
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.14.
|
|
52314
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.14.14-next.2");
|
|
52315
52315
|
if (!this.options.ydoc) return;
|
|
52316
52316
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
52317
52317
|
let docVersion = metaMap.get("version");
|
|
@@ -54864,7 +54864,6 @@
|
|
|
54864
54864
|
},
|
|
54865
54865
|
styleId: {
|
|
54866
54866
|
rendered: false,
|
|
54867
|
-
keepOnSplit: true,
|
|
54868
54867
|
keepOnSplit: true
|
|
54869
54868
|
},
|
|
54870
54869
|
customFormat: {
|
|
@@ -59364,7 +59363,7 @@
|
|
|
59364
59363
|
...node2.attrs,
|
|
59365
59364
|
// reset displayLabel to default.
|
|
59366
59365
|
displayLabel,
|
|
59367
|
-
// reset attrs
|
|
59366
|
+
// reset attrs for specific types.
|
|
59368
59367
|
imageSrc: null,
|
|
59369
59368
|
rawHtml: null,
|
|
59370
59369
|
linkUrl: null
|
|
@@ -98377,7 +98376,7 @@ ${style2}
|
|
|
98377
98376
|
this.config.colors = shuffleArray(this.config.colors);
|
|
98378
98377
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
98379
98378
|
this.colorIndex = 0;
|
|
98380
|
-
this.version = "0.14.
|
|
98379
|
+
this.version = "0.14.14-next.2";
|
|
98381
98380
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
98382
98381
|
this.superdocId = config.superdocId || v4();
|
|
98383
98382
|
this.colors = this.config.colors;
|