@harbour-enterprises/superdoc 0.6.46 → 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.
Files changed (23) hide show
  1. package/dist/chunks/{super-editor.es-DuHNfcMJ.js → super-editor.es-BimqHKz4.js} +10 -13
  2. package/dist/chunks/{super-editor.es-DuHNfcMJ.js.map → super-editor.es-BimqHKz4.js.map} +1 -1
  3. package/dist/super-editor/chunks/{converter-dVflwKUy.js → converter-RUbkHvVA.js} +3 -3
  4. package/dist/super-editor/chunks/{converter-dVflwKUy.js.map → converter-RUbkHvVA.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-Co5Kj5Y8.js → docx-zipper-BbeRnWFQ.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-Co5Kj5Y8.js.map → docx-zipper-BbeRnWFQ.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-CvcoDtGI.js → editor-n0njCfa5.js} +10 -13
  8. package/dist/super-editor/chunks/editor-n0njCfa5.js.map +1 -0
  9. package/dist/super-editor/chunks/{toolbar-CY_a4I-4.js → toolbar-CMCaGLDm.js} +3 -3
  10. package/dist/super-editor/chunks/{toolbar-CY_a4I-4.js.map → toolbar-CMCaGLDm.js.map} +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/docx-zipper.es.js +2 -2
  13. package/dist/super-editor/editor.es.js +3 -3
  14. package/dist/super-editor/extensions/comment/comments-helpers.d.ts.map +1 -1
  15. package/dist/super-editor/file-zipper.es.js +1 -1
  16. package/dist/super-editor/super-editor.es.js +6 -6
  17. package/dist/super-editor/toolbar.es.js +2 -2
  18. package/dist/super-editor.es.js +1 -1
  19. package/dist/superdoc.es.js +3 -3
  20. package/dist/superdoc.umd.js +10 -13
  21. package/dist/superdoc.umd.js.map +1 -1
  22. package/package.json +1 -1
  23. package/dist/super-editor/chunks/editor-CvcoDtGI.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, prepareDocumentForImport_fn, prepareDocumentForExport_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, H as SelectionRange, I as Transform } from "./converter-dVflwKUy.js";
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, H as SelectionRange, I as Transform } from "./converter-RUbkHvVA.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-Co5Kj5Y8.js";
17
+ import { D as DocxZipper } from "./docx-zipper-BbeRnWFQ.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -10750,19 +10750,18 @@ const prepareCommentsForImport = (doc2, tr, schema) => {
10750
10750
  doc2.descendants((node, pos) => {
10751
10751
  const { type } = node;
10752
10752
  if (type.name === "commentRangeStart") {
10753
- const startPos = {
10753
+ toMark.push({
10754
10754
  "w:id": node.attrs["w:id"],
10755
10755
  internal: node.attrs.internal,
10756
10756
  start: pos
10757
- };
10758
- toMark.push(startPos);
10759
- toDelete.push({ start: pos - 1, end: pos });
10757
+ });
10758
+ toDelete.push({ start: pos, end: pos + 1 });
10760
10759
  } else if (type.name === "commentRangeEnd") {
10761
10760
  const itemToMark = toMark.find((p) => p["w:id"] === node.attrs["w:id"]);
10762
10761
  if (!itemToMark) return;
10763
10762
  const { start: start2 } = itemToMark;
10764
10763
  const markAttrs = {
10765
- importedId: itemToMark["w:id"],
10764
+ importedId: node.attrs["w:id"],
10766
10765
  internal: itemToMark.internal
10767
10766
  };
10768
10767
  tr.addMark(start2, pos + 1, schema.marks[CommentMarkName].create(markAttrs));
@@ -10771,10 +10770,8 @@ const prepareCommentsForImport = (doc2, tr, schema) => {
10771
10770
  toDelete.push({ start: pos, end: pos + 1 });
10772
10771
  }
10773
10772
  });
10774
- toDelete.sort((a, b) => b.end - a.end).forEach((item) => {
10775
- const { start: start2, end: end2 } = item;
10776
- tr.delete(end2, end2 + 1);
10777
- tr.delete(start2, start2 + 1);
10773
+ toDelete.sort((a, b) => b.start - a.start).forEach(({ start: start2, end: end2 }) => {
10774
+ tr.delete(start2, end2);
10778
10775
  });
10779
10776
  };
10780
10777
  const CommentsPluginKey = new PluginKey("comments");
@@ -11549,7 +11546,7 @@ const _Editor = class _Editor extends EventEmitter {
11549
11546
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
11550
11547
  */
11551
11548
  processCollaborationMigrations() {
11552
- console.debug("[checkVersionMigrations] Current editor version", "0.6.46");
11549
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.47");
11553
11550
  if (!this.options.ydoc) return;
11554
11551
  const metaMap = this.options.ydoc.getMap("meta");
11555
11552
  let docVersion = metaMap.get("version");
@@ -22411,4 +22408,4 @@ export {
22411
22408
  redoDepth as r,
22412
22409
  undoDepth as u
22413
22410
  };
22414
- //# sourceMappingURL=editor-CvcoDtGI.js.map
22411
+ //# sourceMappingURL=editor-n0njCfa5.js.map