@harbour-enterprises/superdoc 0.6.45 → 0.6.47
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-oxGmJoDr.js → super-editor.es-BimqHKz4.js} +15 -17
- package/dist/chunks/super-editor.es-BimqHKz4.js.map +1 -0
- package/dist/super-editor/chunks/{converter-BdP8QDs2.js → converter-RUbkHvVA.js} +3 -3
- package/dist/super-editor/chunks/{converter-BdP8QDs2.js.map → converter-RUbkHvVA.js.map} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-C_rx6KHO.js → docx-zipper-BbeRnWFQ.js} +7 -6
- package/dist/super-editor/chunks/docx-zipper-BbeRnWFQ.js.map +1 -0
- package/dist/super-editor/chunks/{editor-l2eNM1kh.js → editor-n0njCfa5.js} +10 -13
- package/dist/super-editor/chunks/editor-n0njCfa5.js.map +1 -0
- package/dist/super-editor/chunks/{toolbar-Cct-ap6j.js → toolbar-CMCaGLDm.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-Cct-ap6j.js.map → toolbar-CMCaGLDm.js.map} +1 -1
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/DocxZipper.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/comment/comments-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.es.js +1 -1
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +15 -17
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/super-editor.es-oxGmJoDr.js.map +0 -1
- package/dist/super-editor/chunks/docx-zipper-C_rx6KHO.js.map +0 -1
- package/dist/super-editor/chunks/editor-l2eNM1kh.js.map +0 -1
|
@@ -20570,7 +20570,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
20570
20570
|
return;
|
|
20571
20571
|
}
|
|
20572
20572
|
}
|
|
20573
|
-
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.
|
|
20573
|
+
static updateDocumentVersion(docx = this.convertedXml, version = "0.6.47") {
|
|
20574
20574
|
const customLocation = "docProps/custom.xml";
|
|
20575
20575
|
if (!docx[customLocation]) {
|
|
20576
20576
|
docx[customLocation] = generateCustomXml();
|
|
@@ -20828,7 +20828,7 @@ function storeSuperdocVersion(docx) {
|
|
|
20828
20828
|
function generateCustomXml() {
|
|
20829
20829
|
return DEFAULT_CUSTOM_XML;
|
|
20830
20830
|
}
|
|
20831
|
-
function generateSuperdocVersion(version = "0.6.
|
|
20831
|
+
function generateSuperdocVersion(version = "0.6.47") {
|
|
20832
20832
|
return {
|
|
20833
20833
|
type: "element",
|
|
20834
20834
|
name: "property",
|
|
@@ -23274,12 +23274,13 @@ class DocxZipper {
|
|
|
23274
23274
|
async exportFromCollaborativeDocx(docx, updatedDocs, media, fonts) {
|
|
23275
23275
|
const zip = new JSZip();
|
|
23276
23276
|
for (const file of docx) {
|
|
23277
|
-
|
|
23278
|
-
if (file.name in updatedDocs) {
|
|
23279
|
-
content = updatedDocs[file.name];
|
|
23280
|
-
}
|
|
23277
|
+
const content = file.content;
|
|
23281
23278
|
zip.file(file.name, content);
|
|
23282
23279
|
}
|
|
23280
|
+
Object.keys(updatedDocs).forEach((key) => {
|
|
23281
|
+
const content = updatedDocs[key];
|
|
23282
|
+
zip.file(key, content);
|
|
23283
|
+
});
|
|
23283
23284
|
Object.keys(media).forEach((name) => {
|
|
23284
23285
|
const binaryData = Buffer2.from(media[name], "base64");
|
|
23285
23286
|
zip.file(`word/media/${name}`, binaryData);
|
|
@@ -34055,19 +34056,18 @@ const prepareCommentsForImport = (doc2, tr, schema) => {
|
|
|
34055
34056
|
doc2.descendants((node2, pos) => {
|
|
34056
34057
|
const { type: type2 } = node2;
|
|
34057
34058
|
if (type2.name === "commentRangeStart") {
|
|
34058
|
-
|
|
34059
|
+
toMark.push({
|
|
34059
34060
|
"w:id": node2.attrs["w:id"],
|
|
34060
34061
|
internal: node2.attrs.internal,
|
|
34061
34062
|
start: pos
|
|
34062
|
-
};
|
|
34063
|
-
|
|
34064
|
-
toDelete.push({ start: pos - 1, end: pos });
|
|
34063
|
+
});
|
|
34064
|
+
toDelete.push({ start: pos, end: pos + 1 });
|
|
34065
34065
|
} else if (type2.name === "commentRangeEnd") {
|
|
34066
34066
|
const itemToMark = toMark.find((p) => p["w:id"] === node2.attrs["w:id"]);
|
|
34067
34067
|
if (!itemToMark) return;
|
|
34068
34068
|
const { start: start2 } = itemToMark;
|
|
34069
34069
|
const markAttrs = {
|
|
34070
|
-
importedId:
|
|
34070
|
+
importedId: node2.attrs["w:id"],
|
|
34071
34071
|
internal: itemToMark.internal
|
|
34072
34072
|
};
|
|
34073
34073
|
tr.addMark(start2, pos + 1, schema.marks[CommentMarkName].create(markAttrs));
|
|
@@ -34076,10 +34076,8 @@ const prepareCommentsForImport = (doc2, tr, schema) => {
|
|
|
34076
34076
|
toDelete.push({ start: pos, end: pos + 1 });
|
|
34077
34077
|
}
|
|
34078
34078
|
});
|
|
34079
|
-
toDelete.sort((a, b) => b.
|
|
34080
|
-
|
|
34081
|
-
tr.delete(end2, end2 + 1);
|
|
34082
|
-
tr.delete(start2, start2 + 1);
|
|
34079
|
+
toDelete.sort((a, b) => b.start - a.start).forEach(({ start: start2, end: end2 }) => {
|
|
34080
|
+
tr.delete(start2, end2);
|
|
34083
34081
|
});
|
|
34084
34082
|
};
|
|
34085
34083
|
const CommentsPluginKey = new PluginKey("comments");
|
|
@@ -34854,7 +34852,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
34854
34852
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
34855
34853
|
*/
|
|
34856
34854
|
processCollaborationMigrations() {
|
|
34857
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.6.
|
|
34855
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.6.47");
|
|
34858
34856
|
if (!this.options.ydoc) return;
|
|
34859
34857
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
34860
34858
|
let docVersion = metaMap.get("version");
|
|
@@ -58297,4 +58295,4 @@ export {
|
|
|
58297
58295
|
helpers as k,
|
|
58298
58296
|
index as l
|
|
58299
58297
|
};
|
|
58300
|
-
//# sourceMappingURL=super-editor.es-
|
|
58298
|
+
//# sourceMappingURL=super-editor.es-BimqHKz4.js.map
|