@harbour-enterprises/superdoc 0.14.9-next.3 → 0.14.9-next.5
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-Cm485wgf.es.js → super-editor.es-BqxptPXi.es.js} +124 -17
- package/dist/chunks/{super-editor.es-D4w4gOxp.cjs → super-editor.es-CEXGZ_L5.cjs} +124 -17
- package/dist/core/SuperDoc.d.ts +1 -1
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-wprLSvGf.js → converter-BzUe-JDb.js} +134 -26
- package/dist/super-editor/chunks/{docx-zipper-XpZaObsQ.js → docx-zipper-DuNhxEi5.js} +1 -1
- package/dist/super-editor/chunks/{editor-B-syl6XT.js → editor-D24ByYzx.js} +17 -17
- package/dist/super-editor/chunks/{toolbar-D0Pksjxw.js → toolbar-CCP8GEjh.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +3 -10
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/inputRules/html/html-helpers.d.ts +4 -0
- package/dist/super-editor/core/inputRules/html/html-helpers.d.ts.map +1 -1
- package/dist/super-editor/core/migrations/0.14-listsv2/listsv2migration.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 +4 -4
- package/dist/superdoc.es.js +5 -5
- package/dist/superdoc.umd.js +127 -20
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -22715,6 +22715,113 @@ function createSingleItemList(li, tag, rootNumId, level, editor, NodeInterface)
|
|
|
22715
22715
|
newList.appendChild(newLi);
|
|
22716
22716
|
return newList;
|
|
22717
22717
|
}
|
|
22718
|
+
function unflattenListsInHtml(html) {
|
|
22719
|
+
const parser = new DOMParser();
|
|
22720
|
+
const doc2 = parser.parseFromString(html, "text/html");
|
|
22721
|
+
const allNodes = [...doc2.body.children];
|
|
22722
|
+
const listSequences = [];
|
|
22723
|
+
let currentSequence = null;
|
|
22724
|
+
allNodes.forEach((node2, index2) => {
|
|
22725
|
+
const isFlattenList = node2.tagName && (node2.tagName === "OL" || node2.tagName === "UL") && node2.hasAttribute("data-list-id");
|
|
22726
|
+
if (isFlattenList) {
|
|
22727
|
+
const listId = node2.getAttribute("data-list-id");
|
|
22728
|
+
if (currentSequence && currentSequence.id === listId) {
|
|
22729
|
+
currentSequence.lists.push({ element: node2, index: index2 });
|
|
22730
|
+
} else {
|
|
22731
|
+
currentSequence = {
|
|
22732
|
+
id: listId,
|
|
22733
|
+
lists: [{ element: node2, index: index2 }]
|
|
22734
|
+
};
|
|
22735
|
+
listSequences.push(currentSequence);
|
|
22736
|
+
}
|
|
22737
|
+
} else {
|
|
22738
|
+
currentSequence = null;
|
|
22739
|
+
}
|
|
22740
|
+
});
|
|
22741
|
+
listSequences.reverse().forEach((sequence) => {
|
|
22742
|
+
const sequenceLists = sequence.lists;
|
|
22743
|
+
if (sequenceLists.length === 0) {
|
|
22744
|
+
return;
|
|
22745
|
+
}
|
|
22746
|
+
const items = sequenceLists.map(({ element: list }) => {
|
|
22747
|
+
const liElement = list.querySelector("li");
|
|
22748
|
+
if (!liElement) return null;
|
|
22749
|
+
return {
|
|
22750
|
+
element: liElement,
|
|
22751
|
+
level: parseInt(liElement.getAttribute("data-level") || "0"),
|
|
22752
|
+
numFmt: liElement.getAttribute("data-num-fmt") || "bullet",
|
|
22753
|
+
listLevel: JSON.parse(liElement.getAttribute("data-list-level") || "[1]")
|
|
22754
|
+
};
|
|
22755
|
+
}).filter((item) => item !== null);
|
|
22756
|
+
if (items.length === 0) {
|
|
22757
|
+
return;
|
|
22758
|
+
}
|
|
22759
|
+
const rootList = buildNestedList({ items });
|
|
22760
|
+
const firstOriginalList = sequenceLists[0].element;
|
|
22761
|
+
firstOriginalList?.parentNode?.insertBefore(rootList, firstOriginalList);
|
|
22762
|
+
sequenceLists.forEach(({ element: list }) => {
|
|
22763
|
+
if (list.parentNode) list.parentNode.removeChild(list);
|
|
22764
|
+
});
|
|
22765
|
+
});
|
|
22766
|
+
return doc2.body.innerHTML;
|
|
22767
|
+
}
|
|
22768
|
+
function buildNestedList({ items }) {
|
|
22769
|
+
if (!items.length) {
|
|
22770
|
+
return null;
|
|
22771
|
+
}
|
|
22772
|
+
const [rootItem] = items;
|
|
22773
|
+
const doc2 = rootItem.element.ownerDocument;
|
|
22774
|
+
const isOrderedList = rootItem.numFmt && !["bullet", "none"].includes(rootItem.numFmt);
|
|
22775
|
+
const rootList = doc2.createElement(isOrderedList ? "ol" : "ul");
|
|
22776
|
+
if (isOrderedList && rootItem.listLevel?.[0] && rootItem.listLevel[0] > 1) {
|
|
22777
|
+
rootList.setAttribute("start", rootItem.listLevel[0]);
|
|
22778
|
+
}
|
|
22779
|
+
const lastLevelItem = /* @__PURE__ */ new Map();
|
|
22780
|
+
items.forEach((item) => {
|
|
22781
|
+
const { element: liElement, level, numFmt, listLevel } = item;
|
|
22782
|
+
const cleanLi = cleanListItem(liElement.cloneNode(true));
|
|
22783
|
+
if (level === 0) {
|
|
22784
|
+
rootList.append(cleanLi);
|
|
22785
|
+
lastLevelItem.set(0, cleanLi);
|
|
22786
|
+
} else {
|
|
22787
|
+
const parentLi = lastLevelItem.get(level - 1);
|
|
22788
|
+
if (!parentLi) {
|
|
22789
|
+
rootList.append(cleanLi);
|
|
22790
|
+
lastLevelItem.set(level, cleanLi);
|
|
22791
|
+
return;
|
|
22792
|
+
}
|
|
22793
|
+
let nestedList = null;
|
|
22794
|
+
[...parentLi.children].forEach((child) => {
|
|
22795
|
+
if (child.tagName && (child.tagName === "OL" || child.tagName === "UL")) {
|
|
22796
|
+
nestedList = child;
|
|
22797
|
+
}
|
|
22798
|
+
});
|
|
22799
|
+
if (!nestedList) {
|
|
22800
|
+
const listType = numFmt && !["bullet", "none"].includes(numFmt) ? "ol" : "ul";
|
|
22801
|
+
nestedList = doc2.createElement(listType);
|
|
22802
|
+
parentLi.append(nestedList);
|
|
22803
|
+
}
|
|
22804
|
+
nestedList.append(cleanLi);
|
|
22805
|
+
lastLevelItem.set(level, cleanLi);
|
|
22806
|
+
}
|
|
22807
|
+
});
|
|
22808
|
+
return rootList;
|
|
22809
|
+
}
|
|
22810
|
+
function cleanListItem(listItem) {
|
|
22811
|
+
const attrs = [
|
|
22812
|
+
"data-num-id",
|
|
22813
|
+
"data-level",
|
|
22814
|
+
"data-num-fmt",
|
|
22815
|
+
"data-lvl-text",
|
|
22816
|
+
"data-list-level",
|
|
22817
|
+
"data-marker-type",
|
|
22818
|
+
"aria-label"
|
|
22819
|
+
];
|
|
22820
|
+
attrs.forEach((attr) => {
|
|
22821
|
+
listItem.removeAttribute(attr);
|
|
22822
|
+
});
|
|
22823
|
+
return listItem;
|
|
22824
|
+
}
|
|
22718
22825
|
class InputRule {
|
|
22719
22826
|
constructor(config) {
|
|
22720
22827
|
__publicField$2(this, "match");
|
|
@@ -26359,7 +26466,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
26359
26466
|
return;
|
|
26360
26467
|
}
|
|
26361
26468
|
}
|
|
26362
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.
|
|
26469
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.5") {
|
|
26363
26470
|
const customLocation = "docProps/custom.xml";
|
|
26364
26471
|
if (!docx[customLocation]) {
|
|
26365
26472
|
docx[customLocation] = generateCustomXml();
|
|
@@ -26835,7 +26942,7 @@ function storeSuperdocVersion(docx) {
|
|
|
26835
26942
|
function generateCustomXml() {
|
|
26836
26943
|
return DEFAULT_CUSTOM_XML;
|
|
26837
26944
|
}
|
|
26838
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.
|
|
26945
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.5") {
|
|
26839
26946
|
return {
|
|
26840
26947
|
type: "element",
|
|
26841
26948
|
name: "property",
|
|
@@ -42096,6 +42203,9 @@ const generateMissingListDefinition = (listNode, editor) => {
|
|
|
42096
42203
|
const migrateParagraphFieldsListsV2 = async (annotationValues = [], editor) => {
|
|
42097
42204
|
const annotations = getAllFieldAnnotations(editor.state);
|
|
42098
42205
|
const newValues = [];
|
|
42206
|
+
if (!annotations.length) {
|
|
42207
|
+
return annotationValues;
|
|
42208
|
+
}
|
|
42099
42209
|
for (const annotation of annotations) {
|
|
42100
42210
|
const type2 = annotation.node?.attrs?.type;
|
|
42101
42211
|
const matchedAnnotation = annotationValues.find((v) => v.input_id === annotation.node.attrs.fieldId);
|
|
@@ -42722,9 +42832,6 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42722
42832
|
const attributes = typeof nameOrAttributes === "string" ? attributesOrUndefined : nameOrAttributes;
|
|
42723
42833
|
return isActive(this.state, name, attributes);
|
|
42724
42834
|
}
|
|
42725
|
-
/**
|
|
42726
|
-
* Get the document as JSON.
|
|
42727
|
-
*/
|
|
42728
42835
|
/**
|
|
42729
42836
|
* Get the editor content as JSON
|
|
42730
42837
|
* @returns {Object} Editor content as JSON
|
|
@@ -42732,18 +42839,20 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42732
42839
|
getJSON() {
|
|
42733
42840
|
return this.state.doc.toJSON();
|
|
42734
42841
|
}
|
|
42735
|
-
/**
|
|
42736
|
-
* Get HTML string of the document
|
|
42737
|
-
*/
|
|
42738
42842
|
/**
|
|
42739
42843
|
* Get the editor content as HTML
|
|
42740
42844
|
* @returns {string} Editor content as HTML
|
|
42741
42845
|
*/
|
|
42742
|
-
getHTML() {
|
|
42743
|
-
const
|
|
42846
|
+
getHTML({ unflattenLists = false } = {}) {
|
|
42847
|
+
const tempDocument = document.implementation.createHTMLDocument();
|
|
42848
|
+
const container = tempDocument.createElement("div");
|
|
42744
42849
|
const fragment = DOMSerializer.fromSchema(this.schema).serializeFragment(this.state.doc.content);
|
|
42745
|
-
|
|
42746
|
-
|
|
42850
|
+
container.appendChild(fragment);
|
|
42851
|
+
let html = container.innerHTML;
|
|
42852
|
+
if (unflattenLists) {
|
|
42853
|
+
html = unflattenListsInHtml(html);
|
|
42854
|
+
}
|
|
42855
|
+
return html;
|
|
42747
42856
|
}
|
|
42748
42857
|
/**
|
|
42749
42858
|
* Create a child editor linked to this editor.
|
|
@@ -42755,9 +42864,6 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42755
42864
|
createChildEditor(options2) {
|
|
42756
42865
|
return createLinkedChildEditor(this, options2);
|
|
42757
42866
|
}
|
|
42758
|
-
/**
|
|
42759
|
-
* Get page styles
|
|
42760
|
-
*/
|
|
42761
42867
|
/**
|
|
42762
42868
|
* Get page styles
|
|
42763
42869
|
* @returns {Object} Page styles
|
|
@@ -42922,7 +43028,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42922
43028
|
* @returns {Object | void} Migration results
|
|
42923
43029
|
*/
|
|
42924
43030
|
processCollaborationMigrations() {
|
|
42925
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.
|
|
43031
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.5");
|
|
42926
43032
|
if (!this.options.ydoc) return;
|
|
42927
43033
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
42928
43034
|
let docVersion = metaMap.get("version");
|
|
@@ -43052,7 +43158,8 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
43052
43158
|
*/
|
|
43053
43159
|
async migrateParagraphFields(annotationValues = []) {
|
|
43054
43160
|
if (!Array.isArray(annotationValues) || !annotationValues.length) return annotationValues;
|
|
43055
|
-
|
|
43161
|
+
const result = await migrateParagraphFieldsListsV2(annotationValues, this);
|
|
43162
|
+
return result;
|
|
43056
43163
|
}
|
|
43057
43164
|
/**
|
|
43058
43165
|
* Annotate the document with the given annotation values.
|
|
@@ -22732,6 +22732,113 @@ function createSingleItemList(li, tag, rootNumId, level, editor, NodeInterface)
|
|
|
22732
22732
|
newList.appendChild(newLi);
|
|
22733
22733
|
return newList;
|
|
22734
22734
|
}
|
|
22735
|
+
function unflattenListsInHtml(html) {
|
|
22736
|
+
const parser = new DOMParser();
|
|
22737
|
+
const doc2 = parser.parseFromString(html, "text/html");
|
|
22738
|
+
const allNodes = [...doc2.body.children];
|
|
22739
|
+
const listSequences = [];
|
|
22740
|
+
let currentSequence = null;
|
|
22741
|
+
allNodes.forEach((node2, index2) => {
|
|
22742
|
+
const isFlattenList = node2.tagName && (node2.tagName === "OL" || node2.tagName === "UL") && node2.hasAttribute("data-list-id");
|
|
22743
|
+
if (isFlattenList) {
|
|
22744
|
+
const listId = node2.getAttribute("data-list-id");
|
|
22745
|
+
if (currentSequence && currentSequence.id === listId) {
|
|
22746
|
+
currentSequence.lists.push({ element: node2, index: index2 });
|
|
22747
|
+
} else {
|
|
22748
|
+
currentSequence = {
|
|
22749
|
+
id: listId,
|
|
22750
|
+
lists: [{ element: node2, index: index2 }]
|
|
22751
|
+
};
|
|
22752
|
+
listSequences.push(currentSequence);
|
|
22753
|
+
}
|
|
22754
|
+
} else {
|
|
22755
|
+
currentSequence = null;
|
|
22756
|
+
}
|
|
22757
|
+
});
|
|
22758
|
+
listSequences.reverse().forEach((sequence) => {
|
|
22759
|
+
const sequenceLists = sequence.lists;
|
|
22760
|
+
if (sequenceLists.length === 0) {
|
|
22761
|
+
return;
|
|
22762
|
+
}
|
|
22763
|
+
const items = sequenceLists.map(({ element: list }) => {
|
|
22764
|
+
const liElement = list.querySelector("li");
|
|
22765
|
+
if (!liElement) return null;
|
|
22766
|
+
return {
|
|
22767
|
+
element: liElement,
|
|
22768
|
+
level: parseInt(liElement.getAttribute("data-level") || "0"),
|
|
22769
|
+
numFmt: liElement.getAttribute("data-num-fmt") || "bullet",
|
|
22770
|
+
listLevel: JSON.parse(liElement.getAttribute("data-list-level") || "[1]")
|
|
22771
|
+
};
|
|
22772
|
+
}).filter((item) => item !== null);
|
|
22773
|
+
if (items.length === 0) {
|
|
22774
|
+
return;
|
|
22775
|
+
}
|
|
22776
|
+
const rootList = buildNestedList({ items });
|
|
22777
|
+
const firstOriginalList = sequenceLists[0].element;
|
|
22778
|
+
firstOriginalList?.parentNode?.insertBefore(rootList, firstOriginalList);
|
|
22779
|
+
sequenceLists.forEach(({ element: list }) => {
|
|
22780
|
+
if (list.parentNode) list.parentNode.removeChild(list);
|
|
22781
|
+
});
|
|
22782
|
+
});
|
|
22783
|
+
return doc2.body.innerHTML;
|
|
22784
|
+
}
|
|
22785
|
+
function buildNestedList({ items }) {
|
|
22786
|
+
if (!items.length) {
|
|
22787
|
+
return null;
|
|
22788
|
+
}
|
|
22789
|
+
const [rootItem] = items;
|
|
22790
|
+
const doc2 = rootItem.element.ownerDocument;
|
|
22791
|
+
const isOrderedList = rootItem.numFmt && !["bullet", "none"].includes(rootItem.numFmt);
|
|
22792
|
+
const rootList = doc2.createElement(isOrderedList ? "ol" : "ul");
|
|
22793
|
+
if (isOrderedList && rootItem.listLevel?.[0] && rootItem.listLevel[0] > 1) {
|
|
22794
|
+
rootList.setAttribute("start", rootItem.listLevel[0]);
|
|
22795
|
+
}
|
|
22796
|
+
const lastLevelItem = /* @__PURE__ */ new Map();
|
|
22797
|
+
items.forEach((item) => {
|
|
22798
|
+
const { element: liElement, level, numFmt, listLevel } = item;
|
|
22799
|
+
const cleanLi = cleanListItem(liElement.cloneNode(true));
|
|
22800
|
+
if (level === 0) {
|
|
22801
|
+
rootList.append(cleanLi);
|
|
22802
|
+
lastLevelItem.set(0, cleanLi);
|
|
22803
|
+
} else {
|
|
22804
|
+
const parentLi = lastLevelItem.get(level - 1);
|
|
22805
|
+
if (!parentLi) {
|
|
22806
|
+
rootList.append(cleanLi);
|
|
22807
|
+
lastLevelItem.set(level, cleanLi);
|
|
22808
|
+
return;
|
|
22809
|
+
}
|
|
22810
|
+
let nestedList = null;
|
|
22811
|
+
[...parentLi.children].forEach((child) => {
|
|
22812
|
+
if (child.tagName && (child.tagName === "OL" || child.tagName === "UL")) {
|
|
22813
|
+
nestedList = child;
|
|
22814
|
+
}
|
|
22815
|
+
});
|
|
22816
|
+
if (!nestedList) {
|
|
22817
|
+
const listType = numFmt && !["bullet", "none"].includes(numFmt) ? "ol" : "ul";
|
|
22818
|
+
nestedList = doc2.createElement(listType);
|
|
22819
|
+
parentLi.append(nestedList);
|
|
22820
|
+
}
|
|
22821
|
+
nestedList.append(cleanLi);
|
|
22822
|
+
lastLevelItem.set(level, cleanLi);
|
|
22823
|
+
}
|
|
22824
|
+
});
|
|
22825
|
+
return rootList;
|
|
22826
|
+
}
|
|
22827
|
+
function cleanListItem(listItem) {
|
|
22828
|
+
const attrs = [
|
|
22829
|
+
"data-num-id",
|
|
22830
|
+
"data-level",
|
|
22831
|
+
"data-num-fmt",
|
|
22832
|
+
"data-lvl-text",
|
|
22833
|
+
"data-list-level",
|
|
22834
|
+
"data-marker-type",
|
|
22835
|
+
"aria-label"
|
|
22836
|
+
];
|
|
22837
|
+
attrs.forEach((attr) => {
|
|
22838
|
+
listItem.removeAttribute(attr);
|
|
22839
|
+
});
|
|
22840
|
+
return listItem;
|
|
22841
|
+
}
|
|
22735
22842
|
class InputRule {
|
|
22736
22843
|
constructor(config) {
|
|
22737
22844
|
__publicField$2(this, "match");
|
|
@@ -26376,7 +26483,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
26376
26483
|
return;
|
|
26377
26484
|
}
|
|
26378
26485
|
}
|
|
26379
|
-
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.
|
|
26486
|
+
static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.9-next.5") {
|
|
26380
26487
|
const customLocation = "docProps/custom.xml";
|
|
26381
26488
|
if (!docx[customLocation]) {
|
|
26382
26489
|
docx[customLocation] = generateCustomXml();
|
|
@@ -26852,7 +26959,7 @@ function storeSuperdocVersion(docx) {
|
|
|
26852
26959
|
function generateCustomXml() {
|
|
26853
26960
|
return DEFAULT_CUSTOM_XML;
|
|
26854
26961
|
}
|
|
26855
|
-
function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.
|
|
26962
|
+
function generateSuperdocVersion(pid = 2, version2 = "0.14.9-next.5") {
|
|
26856
26963
|
return {
|
|
26857
26964
|
type: "element",
|
|
26858
26965
|
name: "property",
|
|
@@ -42113,6 +42220,9 @@ const generateMissingListDefinition = (listNode, editor) => {
|
|
|
42113
42220
|
const migrateParagraphFieldsListsV2 = async (annotationValues = [], editor) => {
|
|
42114
42221
|
const annotations = getAllFieldAnnotations(editor.state);
|
|
42115
42222
|
const newValues = [];
|
|
42223
|
+
if (!annotations.length) {
|
|
42224
|
+
return annotationValues;
|
|
42225
|
+
}
|
|
42116
42226
|
for (const annotation of annotations) {
|
|
42117
42227
|
const type2 = annotation.node?.attrs?.type;
|
|
42118
42228
|
const matchedAnnotation = annotationValues.find((v) => v.input_id === annotation.node.attrs.fieldId);
|
|
@@ -42739,9 +42849,6 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42739
42849
|
const attributes = typeof nameOrAttributes === "string" ? attributesOrUndefined : nameOrAttributes;
|
|
42740
42850
|
return isActive(this.state, name, attributes);
|
|
42741
42851
|
}
|
|
42742
|
-
/**
|
|
42743
|
-
* Get the document as JSON.
|
|
42744
|
-
*/
|
|
42745
42852
|
/**
|
|
42746
42853
|
* Get the editor content as JSON
|
|
42747
42854
|
* @returns {Object} Editor content as JSON
|
|
@@ -42749,18 +42856,20 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42749
42856
|
getJSON() {
|
|
42750
42857
|
return this.state.doc.toJSON();
|
|
42751
42858
|
}
|
|
42752
|
-
/**
|
|
42753
|
-
* Get HTML string of the document
|
|
42754
|
-
*/
|
|
42755
42859
|
/**
|
|
42756
42860
|
* Get the editor content as HTML
|
|
42757
42861
|
* @returns {string} Editor content as HTML
|
|
42758
42862
|
*/
|
|
42759
|
-
getHTML() {
|
|
42760
|
-
const
|
|
42863
|
+
getHTML({ unflattenLists = false } = {}) {
|
|
42864
|
+
const tempDocument = document.implementation.createHTMLDocument();
|
|
42865
|
+
const container = tempDocument.createElement("div");
|
|
42761
42866
|
const fragment = DOMSerializer.fromSchema(this.schema).serializeFragment(this.state.doc.content);
|
|
42762
|
-
|
|
42763
|
-
|
|
42867
|
+
container.appendChild(fragment);
|
|
42868
|
+
let html = container.innerHTML;
|
|
42869
|
+
if (unflattenLists) {
|
|
42870
|
+
html = unflattenListsInHtml(html);
|
|
42871
|
+
}
|
|
42872
|
+
return html;
|
|
42764
42873
|
}
|
|
42765
42874
|
/**
|
|
42766
42875
|
* Create a child editor linked to this editor.
|
|
@@ -42772,9 +42881,6 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42772
42881
|
createChildEditor(options2) {
|
|
42773
42882
|
return createLinkedChildEditor(this, options2);
|
|
42774
42883
|
}
|
|
42775
|
-
/**
|
|
42776
|
-
* Get page styles
|
|
42777
|
-
*/
|
|
42778
42884
|
/**
|
|
42779
42885
|
* Get page styles
|
|
42780
42886
|
* @returns {Object} Page styles
|
|
@@ -42939,7 +43045,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
42939
43045
|
* @returns {Object | void} Migration results
|
|
42940
43046
|
*/
|
|
42941
43047
|
processCollaborationMigrations() {
|
|
42942
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.
|
|
43048
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.14.9-next.5");
|
|
42943
43049
|
if (!this.options.ydoc) return;
|
|
42944
43050
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
42945
43051
|
let docVersion = metaMap.get("version");
|
|
@@ -43069,7 +43175,8 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
43069
43175
|
*/
|
|
43070
43176
|
async migrateParagraphFields(annotationValues = []) {
|
|
43071
43177
|
if (!Array.isArray(annotationValues) || !annotationValues.length) return annotationValues;
|
|
43072
|
-
|
|
43178
|
+
const result = await migrateParagraphFieldsListsV2(annotationValues, this);
|
|
43179
|
+
return result;
|
|
43073
43180
|
}
|
|
43074
43181
|
/**
|
|
43075
43182
|
* Annotate the document with the given annotation values.
|
package/dist/core/SuperDoc.d.ts
CHANGED
|
@@ -262,7 +262,7 @@ export class SuperDoc extends EventEmitter<string | symbol, any> {
|
|
|
262
262
|
* Get the HTML content of all editors
|
|
263
263
|
* @returns {Array<string>} The HTML content of all editors
|
|
264
264
|
*/
|
|
265
|
-
getHTML(): Array<string>;
|
|
265
|
+
getHTML(options?: {}): Array<string>;
|
|
266
266
|
/**
|
|
267
267
|
* Lock the current superdoc
|
|
268
268
|
* @param {Boolean} isLocked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperDoc.d.ts","sourceRoot":"","sources":["../../src/core/SuperDoc.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;GAQG;AAEH,2EAA2E;AAE3E;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;GAMG;AACH;IACE,4BAA4B;IAC5B,qBADW,KAAK,CAAC,MAAM,CAAC,CACgB;IA0ExC;;OAEG;IACH,oBAFW,MAAM,EAKhB;IA9ED,qBAAqB;IACrB,SADW,MAAM,CACT;IAER,qBAAqB;IACrB,OADW,IAAI,EAAE,CACX;IAEN,4CAA4C;IAC5C,MADW,OAAO,KAAK,EAAE,GAAG,GAAG,SAAS,CACnC;IAEL,4EAA4E;IAC5E,UADW,OAAO,sBAAsB,EAAE,kBAAkB,GAAG,SAAS,CAC/D;IAET,qBAAqB;IACrB,QADW,MA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;0BASlB,0CAA0C;6BAJ5B,mCAAmC;8BAC7C,iEAAiE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
|
|
2
|
-
import { T as TextSelection } from "./chunks/converter-
|
|
3
|
-
import { _ as _export_sfc } from "./chunks/editor-
|
|
2
|
+
import { T as TextSelection } from "./chunks/converter-BzUe-JDb.js";
|
|
3
|
+
import { _ as _export_sfc } from "./chunks/editor-D24ByYzx.js";
|
|
4
4
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
5
5
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
6
6
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -22734,6 +22734,113 @@ function createSingleItemList(li, tag, rootNumId, level, editor, NodeInterface)
|
|
|
22734
22734
|
newList.appendChild(newLi);
|
|
22735
22735
|
return newList;
|
|
22736
22736
|
}
|
|
22737
|
+
function unflattenListsInHtml(html) {
|
|
22738
|
+
const parser = new DOMParser();
|
|
22739
|
+
const doc2 = parser.parseFromString(html, "text/html");
|
|
22740
|
+
const allNodes = [...doc2.body.children];
|
|
22741
|
+
const listSequences = [];
|
|
22742
|
+
let currentSequence = null;
|
|
22743
|
+
allNodes.forEach((node2, index) => {
|
|
22744
|
+
const isFlattenList = node2.tagName && (node2.tagName === "OL" || node2.tagName === "UL") && node2.hasAttribute("data-list-id");
|
|
22745
|
+
if (isFlattenList) {
|
|
22746
|
+
const listId = node2.getAttribute("data-list-id");
|
|
22747
|
+
if (currentSequence && currentSequence.id === listId) {
|
|
22748
|
+
currentSequence.lists.push({ element: node2, index });
|
|
22749
|
+
} else {
|
|
22750
|
+
currentSequence = {
|
|
22751
|
+
id: listId,
|
|
22752
|
+
lists: [{ element: node2, index }]
|
|
22753
|
+
};
|
|
22754
|
+
listSequences.push(currentSequence);
|
|
22755
|
+
}
|
|
22756
|
+
} else {
|
|
22757
|
+
currentSequence = null;
|
|
22758
|
+
}
|
|
22759
|
+
});
|
|
22760
|
+
listSequences.reverse().forEach((sequence) => {
|
|
22761
|
+
const sequenceLists = sequence.lists;
|
|
22762
|
+
if (sequenceLists.length === 0) {
|
|
22763
|
+
return;
|
|
22764
|
+
}
|
|
22765
|
+
const items = sequenceLists.map(({ element: list }) => {
|
|
22766
|
+
const liElement = list.querySelector("li");
|
|
22767
|
+
if (!liElement) return null;
|
|
22768
|
+
return {
|
|
22769
|
+
element: liElement,
|
|
22770
|
+
level: parseInt(liElement.getAttribute("data-level") || "0"),
|
|
22771
|
+
numFmt: liElement.getAttribute("data-num-fmt") || "bullet",
|
|
22772
|
+
listLevel: JSON.parse(liElement.getAttribute("data-list-level") || "[1]")
|
|
22773
|
+
};
|
|
22774
|
+
}).filter((item) => item !== null);
|
|
22775
|
+
if (items.length === 0) {
|
|
22776
|
+
return;
|
|
22777
|
+
}
|
|
22778
|
+
const rootList = buildNestedList({ items });
|
|
22779
|
+
const firstOriginalList = sequenceLists[0].element;
|
|
22780
|
+
firstOriginalList?.parentNode?.insertBefore(rootList, firstOriginalList);
|
|
22781
|
+
sequenceLists.forEach(({ element: list }) => {
|
|
22782
|
+
if (list.parentNode) list.parentNode.removeChild(list);
|
|
22783
|
+
});
|
|
22784
|
+
});
|
|
22785
|
+
return doc2.body.innerHTML;
|
|
22786
|
+
}
|
|
22787
|
+
function buildNestedList({ items }) {
|
|
22788
|
+
if (!items.length) {
|
|
22789
|
+
return null;
|
|
22790
|
+
}
|
|
22791
|
+
const [rootItem] = items;
|
|
22792
|
+
const doc2 = rootItem.element.ownerDocument;
|
|
22793
|
+
const isOrderedList = rootItem.numFmt && !["bullet", "none"].includes(rootItem.numFmt);
|
|
22794
|
+
const rootList = doc2.createElement(isOrderedList ? "ol" : "ul");
|
|
22795
|
+
if (isOrderedList && rootItem.listLevel?.[0] && rootItem.listLevel[0] > 1) {
|
|
22796
|
+
rootList.setAttribute("start", rootItem.listLevel[0]);
|
|
22797
|
+
}
|
|
22798
|
+
const lastLevelItem = /* @__PURE__ */ new Map();
|
|
22799
|
+
items.forEach((item) => {
|
|
22800
|
+
const { element: liElement, level, numFmt, listLevel } = item;
|
|
22801
|
+
const cleanLi = cleanListItem(liElement.cloneNode(true));
|
|
22802
|
+
if (level === 0) {
|
|
22803
|
+
rootList.append(cleanLi);
|
|
22804
|
+
lastLevelItem.set(0, cleanLi);
|
|
22805
|
+
} else {
|
|
22806
|
+
const parentLi = lastLevelItem.get(level - 1);
|
|
22807
|
+
if (!parentLi) {
|
|
22808
|
+
rootList.append(cleanLi);
|
|
22809
|
+
lastLevelItem.set(level, cleanLi);
|
|
22810
|
+
return;
|
|
22811
|
+
}
|
|
22812
|
+
let nestedList = null;
|
|
22813
|
+
[...parentLi.children].forEach((child) => {
|
|
22814
|
+
if (child.tagName && (child.tagName === "OL" || child.tagName === "UL")) {
|
|
22815
|
+
nestedList = child;
|
|
22816
|
+
}
|
|
22817
|
+
});
|
|
22818
|
+
if (!nestedList) {
|
|
22819
|
+
const listType = numFmt && !["bullet", "none"].includes(numFmt) ? "ol" : "ul";
|
|
22820
|
+
nestedList = doc2.createElement(listType);
|
|
22821
|
+
parentLi.append(nestedList);
|
|
22822
|
+
}
|
|
22823
|
+
nestedList.append(cleanLi);
|
|
22824
|
+
lastLevelItem.set(level, cleanLi);
|
|
22825
|
+
}
|
|
22826
|
+
});
|
|
22827
|
+
return rootList;
|
|
22828
|
+
}
|
|
22829
|
+
function cleanListItem(listItem) {
|
|
22830
|
+
const attrs = [
|
|
22831
|
+
"data-num-id",
|
|
22832
|
+
"data-level",
|
|
22833
|
+
"data-num-fmt",
|
|
22834
|
+
"data-lvl-text",
|
|
22835
|
+
"data-list-level",
|
|
22836
|
+
"data-marker-type",
|
|
22837
|
+
"aria-label"
|
|
22838
|
+
];
|
|
22839
|
+
attrs.forEach((attr) => {
|
|
22840
|
+
listItem.removeAttribute(attr);
|
|
22841
|
+
});
|
|
22842
|
+
return listItem;
|
|
22843
|
+
}
|
|
22737
22844
|
class InputRule {
|
|
22738
22845
|
constructor(config) {
|
|
22739
22846
|
__publicField(this, "match");
|
|
@@ -26378,7 +26485,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
26378
26485
|
return;
|
|
26379
26486
|
}
|
|
26380
26487
|
}
|
|
26381
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.
|
|
26488
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.14.9-next.5") {
|
|
26382
26489
|
const customLocation = "docProps/custom.xml";
|
|
26383
26490
|
if (!docx[customLocation]) {
|
|
26384
26491
|
docx[customLocation] = generateCustomXml();
|
|
@@ -26857,7 +26964,7 @@ function storeSuperdocVersion(docx) {
|
|
|
26857
26964
|
function generateCustomXml() {
|
|
26858
26965
|
return DEFAULT_CUSTOM_XML;
|
|
26859
26966
|
}
|
|
26860
|
-
function generateSuperdocVersion(pid = 2, version = "0.14.9-next.
|
|
26967
|
+
function generateSuperdocVersion(pid = 2, version = "0.14.9-next.5") {
|
|
26861
26968
|
return {
|
|
26862
26969
|
type: "element",
|
|
26863
26970
|
name: "property",
|
|
@@ -26920,30 +27027,31 @@ export {
|
|
|
26920
27027
|
EditorState as a7,
|
|
26921
27028
|
hasSomeParentWithClass as a8,
|
|
26922
27029
|
isActive as a9,
|
|
26923
|
-
|
|
26924
|
-
|
|
26925
|
-
|
|
26926
|
-
|
|
26927
|
-
|
|
26928
|
-
|
|
26929
|
-
|
|
26930
|
-
|
|
26931
|
-
|
|
26932
|
-
|
|
26933
|
-
|
|
26934
|
-
|
|
26935
|
-
|
|
26936
|
-
|
|
26937
|
-
|
|
26938
|
-
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
27030
|
+
unflattenListsInHtml as aa,
|
|
27031
|
+
parseSizeUnit as ab,
|
|
27032
|
+
minMax as ac,
|
|
27033
|
+
getLineHeightValueString as ad,
|
|
27034
|
+
InputRule as ae,
|
|
27035
|
+
kebabCase as af,
|
|
27036
|
+
generateOrderedListIndex as ag,
|
|
27037
|
+
getListItemStyleDefinitions as ah,
|
|
27038
|
+
docxNumberigHelpers as ai,
|
|
27039
|
+
parseIndentElement as aj,
|
|
27040
|
+
combineIndents as ak,
|
|
27041
|
+
getColStyleDeclaration as al,
|
|
27042
|
+
SelectionRange as am,
|
|
27043
|
+
Transform as an,
|
|
27044
|
+
isInTable as ao,
|
|
27045
|
+
createColGroup as ap,
|
|
27046
|
+
generateDocxRandomId as aq,
|
|
27047
|
+
commonjsGlobal as ar,
|
|
27048
|
+
getDefaultExportFromCjs$1 as as,
|
|
27049
|
+
getContentTypesFromXml as at,
|
|
27050
|
+
xmljs as au,
|
|
27051
|
+
vClickOutside as av,
|
|
27052
|
+
getActiveFormatting as aw,
|
|
27053
|
+
readFromClipboard as ax,
|
|
27054
|
+
handleClipboardPaste as ay,
|
|
26947
27055
|
getMarkType as b,
|
|
26948
27056
|
callOrGet as c,
|
|
26949
27057
|
getMarksFromSelection as d,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as process$1,
|
|
1
|
+
import { H as process$1, ar as commonjsGlobal, I as Buffer, as as getDefaultExportFromCjs, at as getContentTypesFromXml, au as xmljs } from "./converter-BzUe-JDb.js";
|
|
2
2
|
function commonjsRequire(path) {
|
|
3
3
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
4
4
|
}
|