@harbour-enterprises/superdoc 0.5.36 → 0.5.37
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/{index-CtEWl-ZH.js → index-B_N4inTK.js} +2 -2
- package/dist/chunks/{index-CtEWl-ZH.js.map → index-B_N4inTK.js.map} +1 -1
- package/dist/chunks/{index-9S4X_ywo.js → index-DQD_ZI0o.js} +3 -3
- package/dist/chunks/{index-9S4X_ywo.js.map → index-DQD_ZI0o.js.map} +1 -1
- package/dist/chunks/{super-editor.es-qZ3KZirs.js → super-editor.es-CudGhkZK.js} +59 -69
- package/dist/chunks/super-editor.es-CudGhkZK.js.map +1 -0
- package/dist/chunks/{url-mmnBIIf_.js → url-RFOJMKKF.js} +2 -2
- package/dist/chunks/{url-mmnBIIf_.js.map → url-RFOJMKKF.js.map} +1 -1
- package/dist/chunks/{xml-js-Bp3TZtDC.js → xml-js-ETODspvn.js} +3 -6
- package/dist/chunks/xml-js-ETODspvn.js.map +1 -0
- package/dist/super-editor/chunks/{converter-Ddgo09YG.js → converter-DDbOtZBT.js} +51 -53
- package/dist/super-editor/chunks/converter-DDbOtZBT.js.map +1 -0
- package/dist/super-editor/chunks/{docx-zipper-DOKk393z.js → docx-zipper-D-LpzKMF.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-DOKk393z.js.map → docx-zipper-D-LpzKMF.js.map} +1 -1
- package/dist/super-editor/chunks/{editor-DMbaJ3Hc.js → editor-D1UhT8dv.js} +11 -19
- package/dist/super-editor/chunks/editor-D1UhT8dv.js.map +1 -0
- package/dist/super-editor/chunks/{toolbar-HMCBUVgd.js → toolbar-B6UAuAVN.js} +3 -3
- package/dist/super-editor/chunks/{toolbar-HMCBUVgd.js.map → toolbar-B6UAuAVN.js.map} +1 -1
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- 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/commands/clearNodes.d.ts.map +1 -1
- package/dist/super-editor/core/commands/command.d.ts.map +1 -1
- package/dist/super-editor/core/commands/createParagraphNear.d.ts.map +1 -1
- package/dist/super-editor/core/commands/deleteSelection.d.ts.map +1 -1
- package/dist/super-editor/core/commands/exitCode.d.ts.map +1 -1
- package/dist/super-editor/core/commands/first.d.ts.map +1 -1
- package/dist/super-editor/core/commands/insertContent.d.ts.map +1 -1
- package/dist/super-editor/core/commands/insertContentAt.d.ts.map +1 -1
- package/dist/super-editor/core/commands/insertTabChar.d.ts.map +1 -1
- package/dist/super-editor/core/commands/insertTabNode.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinBackward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinDown.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinForward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinUp.d.ts.map +1 -1
- package/dist/super-editor/core/commands/liftEmptyBlock.d.ts.map +1 -1
- package/dist/super-editor/core/commands/liftListItem.d.ts.map +1 -1
- package/dist/super-editor/core/commands/newlineInCode.d.ts.map +1 -1
- package/dist/super-editor/core/commands/resetAttributes.d.ts.map +1 -1
- package/dist/super-editor/core/commands/selectAll.d.ts.map +1 -1
- package/dist/super-editor/core/commands/selectNodeBackward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/selectNodeForward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/selectTextblockEnd.d.ts.map +1 -1
- package/dist/super-editor/core/commands/selectTextblockStart.d.ts.map +1 -1
- package/dist/super-editor/core/commands/setMark.d.ts.map +1 -1
- package/dist/super-editor/core/commands/setMeta.d.ts.map +1 -1
- package/dist/super-editor/core/commands/setNode.d.ts.map +1 -1
- package/dist/super-editor/core/commands/sinkListItem.d.ts.map +1 -1
- package/dist/super-editor/core/commands/splitBlock.d.ts.map +1 -1
- package/dist/super-editor/core/commands/splitListItem.d.ts.map +1 -1
- package/dist/super-editor/core/commands/toggleList.d.ts.map +1 -1
- package/dist/super-editor/core/commands/toggleMark.d.ts.map +1 -1
- package/dist/super-editor/core/commands/toggleNode.d.ts.map +1 -1
- package/dist/super-editor/core/commands/unsetAllMarks.d.ts.map +1 -1
- package/dist/super-editor/core/commands/unsetMark.d.ts.map +1 -1
- package/dist/super-editor/core/commands/updateAttributes.d.ts.map +1 -1
- package/dist/super-editor/core/commands/wrapInList.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/findParentNode.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts +1 -1
- package/dist/super-editor/core/super-converter/exporter.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.es.js +1 -1
- package/dist/superdoc.es.js +7 -7
- package/package.json +1 -1
- package/dist/chunks/super-editor.es-qZ3KZirs.js.map +0 -1
- package/dist/chunks/xml-js-Bp3TZtDC.js.map +0 -1
- package/dist/super-editor/chunks/converter-Ddgo09YG.js.map +0 -1
- package/dist/super-editor/chunks/editor-DMbaJ3Hc.js.map +0 -1
|
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _events, _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
|
|
13
13
|
import * as Y from "yjs";
|
|
14
14
|
import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement } from "yjs";
|
|
15
|
-
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-
|
|
15
|
+
import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, f as Schema$1, g as canSplit, l as liftTarget, h as canJoin, j as joinPoint, r as replaceStep$1, R as ReplaceAroundStep, o as objectIncludes, i as ReplaceStep, k as NodeRange, m as findWrapping, n as TrackDeleteMarkName, q as TrackInsertMarkName, v as v4, s as generateDocxRandomId, t as TrackFormatMarkName, u as AddMarkStep, w as RemoveMarkStep, x as comments_module_events, y as twipsToLines, z as pixelsToTwips, B as SuperConverter, E as EditorState, C as toKebabCase, G as kebabCase } from "./converter-DDbOtZBT.js";
|
|
16
16
|
import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, toDisplayString, createApp } from "vue";
|
|
17
|
-
import { D as DocxZipper } from "./docx-zipper-
|
|
17
|
+
import { D as DocxZipper } from "./docx-zipper-D-LpzKMF.js";
|
|
18
18
|
function getMarksFromSelection(state) {
|
|
19
19
|
const { from: from2, to, empty: empty2 } = state.selection;
|
|
20
20
|
const marks = [];
|
|
@@ -914,13 +914,11 @@ function clientRect(node) {
|
|
|
914
914
|
function scrollRectIntoView(view, rect, startDOM) {
|
|
915
915
|
let scrollThreshold = view.someProp("scrollThreshold") || 0, scrollMargin = view.someProp("scrollMargin") || 5;
|
|
916
916
|
let doc2 = view.dom.ownerDocument;
|
|
917
|
-
for (let parent = startDOM || view.dom; ; ) {
|
|
917
|
+
for (let parent = startDOM || view.dom; ; parent = parentNode(parent)) {
|
|
918
918
|
if (!parent)
|
|
919
919
|
break;
|
|
920
|
-
if (parent.nodeType != 1)
|
|
921
|
-
parent = parentNode(parent);
|
|
920
|
+
if (parent.nodeType != 1)
|
|
922
921
|
continue;
|
|
923
|
-
}
|
|
924
922
|
let elt = parent;
|
|
925
923
|
let atTop = elt == doc2.body;
|
|
926
924
|
let bounding = atTop ? windowRect(doc2) : clientRect(elt);
|
|
@@ -946,10 +944,8 @@ function scrollRectIntoView(view, rect, startDOM) {
|
|
|
946
944
|
rect = { left: rect.left - dX, top: rect.top - dY, right: rect.right - dX, bottom: rect.bottom - dY };
|
|
947
945
|
}
|
|
948
946
|
}
|
|
949
|
-
|
|
950
|
-
if (/^(fixed|sticky)$/.test(pos))
|
|
947
|
+
if (atTop || /^(fixed|sticky)$/.test(getComputedStyle(parent).position))
|
|
951
948
|
break;
|
|
952
|
-
parent = pos == "absolute" ? parent.offsetParent : parentNode(parent);
|
|
953
949
|
}
|
|
954
950
|
}
|
|
955
951
|
function storeScrollPos(view) {
|
|
@@ -4944,7 +4940,6 @@ class DOMObserver {
|
|
|
4944
4940
|
view.input.lastFocus = 0;
|
|
4945
4941
|
selectionToDOM(view);
|
|
4946
4942
|
this.currentSelection.set(sel);
|
|
4947
|
-
view.scrollToSelection();
|
|
4948
4943
|
} else if (from2 > -1 || newSel) {
|
|
4949
4944
|
if (from2 > -1) {
|
|
4950
4945
|
view.docView.markDirty(from2, to);
|
|
@@ -9417,9 +9412,9 @@ function liftToOuterList(state, dispatch, itemType, range) {
|
|
|
9417
9412
|
if (target == null)
|
|
9418
9413
|
return false;
|
|
9419
9414
|
tr.lift(range, target);
|
|
9420
|
-
let
|
|
9421
|
-
if (canJoin(tr.doc,
|
|
9422
|
-
tr.join(
|
|
9415
|
+
let after = tr.mapping.map(end2, -1) - 1;
|
|
9416
|
+
if (canJoin(tr.doc, after))
|
|
9417
|
+
tr.join(after);
|
|
9423
9418
|
dispatch(tr.scrollIntoView());
|
|
9424
9419
|
return true;
|
|
9425
9420
|
}
|
|
@@ -11338,11 +11333,9 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11338
11333
|
);
|
|
11339
11334
|
const relsData = this.converter.convertedXml["word/_rels/document.xml.rels"];
|
|
11340
11335
|
const rels = this.converter.schemaToXml(relsData.elements[0]);
|
|
11341
|
-
const customXml = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0]);
|
|
11336
|
+
const customXml = this.converter.schemaToXml(this.converter.convertedXml["docProps/custom.xml"].elements[0], true);
|
|
11342
11337
|
const customSettings = this.converter.schemaToXml(this.converter.convertedXml["word/settings.xml"].elements[0]);
|
|
11343
11338
|
const contentTypes = this.converter.schemaToXml(this.converter.convertedXml["[Content_Types].xml"].elements[0]);
|
|
11344
|
-
const originalCommentsXml = this.converter.convertedXml["word/comments.xml"];
|
|
11345
|
-
const updatedCommentsXml = originalCommentsXml ? this.converter.schemaToXml(originalCommentsXml.elements[0]) : null;
|
|
11346
11339
|
const media = this.converter.addedMedia;
|
|
11347
11340
|
const updatedDocs = {
|
|
11348
11341
|
"word/document.xml": String(documentXml),
|
|
@@ -11351,7 +11344,6 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11351
11344
|
"word/settings.xml": String(customSettings),
|
|
11352
11345
|
"[Content_Types].xml": String(contentTypes)
|
|
11353
11346
|
};
|
|
11354
|
-
if (updatedCommentsXml) updatedDocs["word/comments.xml"] = String(updatedCommentsXml);
|
|
11355
11347
|
const zipper = new DocxZipper();
|
|
11356
11348
|
const result = await zipper.updateZip({
|
|
11357
11349
|
docx: this.options.content,
|
|
@@ -11388,7 +11380,7 @@ const _Editor = class _Editor extends EventEmitter {
|
|
|
11388
11380
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
11389
11381
|
*/
|
|
11390
11382
|
processCollaborationMigrations() {
|
|
11391
|
-
console.debug("[checkVersionMigrations] Current editor version", "0.5.
|
|
11383
|
+
console.debug("[checkVersionMigrations] Current editor version", "0.5.37");
|
|
11392
11384
|
if (!this.options.ydoc) return;
|
|
11393
11385
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
11394
11386
|
let docVersion = metaMap.get("version");
|
|
@@ -19429,4 +19421,4 @@ export {
|
|
|
19429
19421
|
redoDepth as r,
|
|
19430
19422
|
undoDepth as u
|
|
19431
19423
|
};
|
|
19432
|
-
//# sourceMappingURL=editor-
|
|
19424
|
+
//# sourceMappingURL=editor-D1UhT8dv.js.map
|