@harbour-enterprises/superdoc 0.14.0-next.3 → 0.14.0-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.
Files changed (38) hide show
  1. package/dist/chunks/{eventemitter3-DfVviFzP.cjs → eventemitter3-CHxWXmuK.cjs} +1 -1
  2. package/dist/chunks/{eventemitter3-BrspJk8q.es.js → eventemitter3-KKY27oz-.es.js} +1 -1
  3. package/dist/chunks/{index-Bk160jQ2.cjs → index-BABtK_9p.cjs} +4 -4
  4. package/dist/chunks/{index-B0t3i_io.cjs → index-BOOtEcgZ.cjs} +2 -2
  5. package/dist/chunks/{index-KzH9VKHh.es.js → index-ClYNVXDv.es.js} +2 -2
  6. package/dist/chunks/{index-D_HUrFWV.es.js → index-DRG7AiQg.es.js} +4 -4
  7. package/dist/chunks/{jszip-BTAcmbVg.cjs → jszip-9bCX1h2W.cjs} +1 -1
  8. package/dist/chunks/{jszip-DckFs3A7.es.js → jszip-Cl3s9njw.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-2IN0CS9r.cjs → super-editor.es-1V_Ac-SF.cjs} +61 -34
  10. package/dist/chunks/{super-editor.es-DLO3aVwa.es.js → super-editor.es-CS08WNwP.es.js} +61 -34
  11. package/dist/chunks/{url-CWyTQ-Xy.cjs → url-BmSVZ-b1.cjs} +2 -2
  12. package/dist/chunks/{url-DsBQArCl.es.js → url-DtyZlUvQ.es.js} +2 -2
  13. package/dist/chunks/{vue-Bi1uWinj.es.js → vue-BBJVqxjL.es.js} +10 -3
  14. package/dist/chunks/{vue-HIY1g7dm.cjs → vue-BBjMeYfo.cjs} +10 -3
  15. package/dist/chunks/{xml-js-Bu1ZZzmb.cjs → xml-js-PTtx0UCg.cjs} +102 -81
  16. package/dist/chunks/{xml-js-CdiD26MJ.es.js → xml-js-uhSaCX_L.es.js} +102 -81
  17. package/dist/super-editor/ai-writer.es.js +2 -2
  18. package/dist/super-editor/chunks/{converter-CRqjtPZp.js → converter-3dVTYXnm.js} +2 -2
  19. package/dist/super-editor/chunks/{docx-zipper-CoBbjw66.js → docx-zipper-CAF6BgPQ.js} +1 -1
  20. package/dist/super-editor/chunks/{editor-DbBEHWan.js → editor-NHY1ApZn.js} +48 -20
  21. package/dist/super-editor/chunks/{toolbar-DOKm21sO.js → toolbar-Dr1wHywT.js} +2 -3
  22. package/dist/super-editor/converter.es.js +1 -1
  23. package/dist/super-editor/docx-zipper.es.js +2 -2
  24. package/dist/super-editor/editor.es.js +3 -3
  25. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.d.ts.map +1 -1
  26. package/dist/super-editor/extensions/noderesizer/noderesizer.d.ts.map +1 -1
  27. package/dist/super-editor/extensions/ordered-list/helpers/orderedListSyncPlugin.d.ts.map +1 -1
  28. package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
  29. package/dist/super-editor/file-zipper.es.js +1 -1
  30. package/dist/super-editor/super-editor.es.js +6 -6
  31. package/dist/super-editor/toolbar.es.js +2 -2
  32. package/dist/super-editor.cjs +2 -2
  33. package/dist/super-editor.es.js +2 -2
  34. package/dist/superdoc.cjs +8 -9
  35. package/dist/superdoc.es.js +9 -10
  36. package/dist/superdoc.umd.js +71 -38
  37. package/dist/superdoc.umd.js.map +1 -1
  38. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const jszip = require("./jszip-BTAcmbVg.cjs");
2
+ const jszip = require("./jszip-9bCX1h2W.cjs");
3
3
  var eventemitter3 = { exports: {} };
4
4
  (function(module2) {
5
5
  var has = Object.prototype.hasOwnProperty, prefix = "~";
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
1
+ import { g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
2
2
  var eventemitter3 = { exports: {} };
3
3
  (function(module) {
4
4
  var has = Object.prototype.hasOwnProperty, prefix = "~";
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- const jszip = require("./jszip-BTAcmbVg.cjs");
3
- const vue = require("./vue-HIY1g7dm.cjs");
4
- const xmlJs = require("./xml-js-Bu1ZZzmb.cjs");
5
- const url = require("./url-CWyTQ-Xy.cjs");
2
+ const jszip = require("./jszip-9bCX1h2W.cjs");
3
+ const vue = require("./vue-BBjMeYfo.cjs");
4
+ const xmlJs = require("./xml-js-PTtx0UCg.cjs");
5
+ const url = require("./url-BmSVZ-b1.cjs");
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- const jszip = require("./jszip-BTAcmbVg.cjs");
3
- const index$2 = require("./index-Bk160jQ2.cjs");
2
+ const jszip = require("./jszip-9bCX1h2W.cjs");
3
+ const index$2 = require("./index-BABtK_9p.cjs");
4
4
  function _mergeNamespaces(n, m) {
5
5
  for (var i = 0; i < m.length; i++) {
6
6
  const e = m[i];
@@ -1,5 +1,5 @@
1
- import { g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
2
- import { s as streamHttp, r as require$$1 } from "./index-D_HUrFWV.es.js";
1
+ import { g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
2
+ import { s as streamHttp, r as require$$1 } from "./index-DRG7AiQg.es.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  for (var i = 0; i < m.length; i++) {
5
5
  const e = m[i];
@@ -1,7 +1,7 @@
1
- import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-DckFs3A7.es.js";
2
- import { p as process$1 } from "./vue-Bi1uWinj.es.js";
3
- import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-CdiD26MJ.es.js";
4
- import { u as url } from "./url-DsBQArCl.es.js";
1
+ import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
2
+ import { p as process$1 } from "./vue-BBJVqxjL.es.js";
3
+ import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-uhSaCX_L.es.js";
4
+ import { u as url } from "./url-DtyZlUvQ.es.js";
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
7
7
  const e = m[i];
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- require("./vue-HIY1g7dm.cjs");
2
+ require("./vue-BBjMeYfo.cjs");
3
3
  var buffer = {};
4
4
  var base64Js = {};
5
5
  base64Js.byteLength = byteLength;
@@ -1,4 +1,4 @@
1
- import "./vue-Bi1uWinj.es.js";
1
+ import "./vue-BBJVqxjL.es.js";
2
2
  var buffer = {};
3
3
  var base64Js = {};
4
4
  base64Js.byteLength = byteLength;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const vue = require("./vue-HIY1g7dm.cjs");
2
+ const vue = require("./vue-BBjMeYfo.cjs");
3
3
  const Y = require("yjs");
4
4
  function _interopNamespaceDefault(e) {
5
5
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
@@ -13743,7 +13743,7 @@ class ReplaceStep extends Step {
13743
13743
  }
13744
13744
  }
13745
13745
  Step.jsonID("replace", ReplaceStep);
13746
- class ReplaceAroundStep extends Step {
13746
+ let ReplaceAroundStep$1 = class ReplaceAroundStep2 extends Step {
13747
13747
  /**
13748
13748
  Create a replace-around step with the given range and gap.
13749
13749
  `insert` should be the point in the slice into which the content
@@ -13783,7 +13783,7 @@ class ReplaceAroundStep extends Step {
13783
13783
  }
13784
13784
  invert(doc2) {
13785
13785
  let gap = this.gapTo - this.gapFrom;
13786
- return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc2.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
13786
+ return new ReplaceAroundStep2(this.from, this.from + this.slice.size + gap, this.from + this.insert, this.from + this.insert + gap, doc2.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
13787
13787
  }
13788
13788
  map(mapping) {
13789
13789
  let from2 = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);
@@ -13791,7 +13791,7 @@ class ReplaceAroundStep extends Step {
13791
13791
  let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);
13792
13792
  if (from2.deletedAcross && to.deletedAcross || gapFrom < from2.pos || gapTo > to.pos)
13793
13793
  return null;
13794
- return new ReplaceAroundStep(from2.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
13794
+ return new ReplaceAroundStep2(from2.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
13795
13795
  }
13796
13796
  toJSON() {
13797
13797
  let json = {
@@ -13814,10 +13814,10 @@ class ReplaceAroundStep extends Step {
13814
13814
  static fromJSON(schema, json) {
13815
13815
  if (typeof json.from != "number" || typeof json.to != "number" || typeof json.gapFrom != "number" || typeof json.gapTo != "number" || typeof json.insert != "number")
13816
13816
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
13817
- return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);
13817
+ return new ReplaceAroundStep2(json.from, json.to, json.gapFrom, json.gapTo, Slice.fromJSON(schema, json.slice), json.insert, !!json.structure);
13818
13818
  }
13819
- }
13820
- Step.jsonID("replaceAround", ReplaceAroundStep);
13819
+ };
13820
+ Step.jsonID("replaceAround", ReplaceAroundStep$1);
13821
13821
  function contentBetween(doc2, from2, to) {
13822
13822
  let $from = doc2.resolve(from2), dist2 = to - from2, depth = $from.depth;
13823
13823
  while (dist2 > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {
@@ -13970,7 +13970,7 @@ function lift(tr, range2, target) {
13970
13970
  } else {
13971
13971
  end2++;
13972
13972
  }
13973
- tr.step(new ReplaceAroundStep(start2, end2, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));
13973
+ tr.step(new ReplaceAroundStep$1(start2, end2, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));
13974
13974
  }
13975
13975
  function findWrapping(range2, nodeType, attrs = null, innerRange = range2) {
13976
13976
  let around = findWrappingOutside(range2, nodeType);
@@ -14015,7 +14015,7 @@ function wrap(tr, range2, wrappers) {
14015
14015
  content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));
14016
14016
  }
14017
14017
  let start2 = range2.start, end2 = range2.end;
14018
- tr.step(new ReplaceAroundStep(start2, end2, start2, end2, new Slice(content, 0, 0), wrappers.length, true));
14018
+ tr.step(new ReplaceAroundStep$1(start2, end2, start2, end2, new Slice(content, 0, 0), wrappers.length, true));
14019
14019
  }
14020
14020
  function setBlockType$1(tr, from2, to, type2, attrs) {
14021
14021
  if (!type2.isTextblock)
@@ -14037,7 +14037,7 @@ function setBlockType$1(tr, from2, to, type2, attrs) {
14037
14037
  clearIncompatible(tr, tr.mapping.slice(mapFrom).map(pos, 1), type2, void 0, convertNewlines === null);
14038
14038
  let mapping = tr.mapping.slice(mapFrom);
14039
14039
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node2.nodeSize, 1);
14040
- tr.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type2.create(attrsHere, null, node2.marks)), 0, 0), 1, true));
14040
+ tr.step(new ReplaceAroundStep$1(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type2.create(attrsHere, null, node2.marks)), 0, 0), 1, true));
14041
14041
  if (convertNewlines === true)
14042
14042
  replaceNewlines(tr, node2, pos, mapFrom);
14043
14043
  return false;
@@ -14078,7 +14078,7 @@ function setNodeMarkup(tr, pos, type2, attrs, marks) {
14078
14078
  return tr.replaceWith(pos, pos + node2.nodeSize, newNode);
14079
14079
  if (!type2.validContent(node2.content))
14080
14080
  throw new RangeError("Invalid content for node type " + type2.name);
14081
- tr.step(new ReplaceAroundStep(pos, pos + node2.nodeSize, pos + 1, pos + node2.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));
14081
+ tr.step(new ReplaceAroundStep$1(pos, pos + node2.nodeSize, pos + 1, pos + node2.nodeSize - 1, new Slice(Fragment.from(newNode), 0, 0), 1, true));
14082
14082
  }
14083
14083
  function canSplit(doc2, pos, depth = 1, typesAfter) {
14084
14084
  let $pos = doc2.resolve(pos), base2 = $pos.depth - depth;
@@ -14279,7 +14279,7 @@ class Fitter {
14279
14279
  }
14280
14280
  let slice2 = new Slice(content, openStart, openEnd);
14281
14281
  if (moveInline > -1)
14282
- return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice2, placedSize);
14282
+ return new ReplaceAroundStep$1($from.pos, moveInline, this.$to.pos, this.$to.end(), slice2, placedSize);
14283
14283
  if (slice2.size || $from.pos != this.$to.pos)
14284
14284
  return new ReplaceStep($from.pos, $to.pos, slice2);
14285
14285
  return null;
@@ -15362,7 +15362,7 @@ function selectionToInsertionEnd$1(tr, startLen, bias) {
15362
15362
  if (last < startLen)
15363
15363
  return;
15364
15364
  let step = tr.steps[last];
15365
- if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep))
15365
+ if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep$1))
15366
15366
  return;
15367
15367
  let map3 = tr.mapping.maps[last], end2;
15368
15368
  map3.forEach((_from, _to, _newFrom, newTo) => {
@@ -24252,7 +24252,7 @@ const _SuperConverter = class _SuperConverter2 {
24252
24252
  return;
24253
24253
  }
24254
24254
  }
24255
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.3") {
24255
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.5") {
24256
24256
  const customLocation = "docProps/custom.xml";
24257
24257
  if (!docx[customLocation]) {
24258
24258
  docx[customLocation] = generateCustomXml();
@@ -24720,7 +24720,7 @@ function storeSuperdocVersion(docx) {
24720
24720
  function generateCustomXml() {
24721
24721
  return DEFAULT_CUSTOM_XML;
24722
24722
  }
24723
- function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.3") {
24723
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.5") {
24724
24724
  return {
24725
24725
  type: "element",
24726
24726
  name: "property",
@@ -28803,7 +28803,7 @@ function deleteBarrier(state2, $cut, dispatch, dir) {
28803
28803
  for (let i = conn.length - 1; i >= 0; i--)
28804
28804
  wrap2 = Fragment.from(conn[i].create(null, wrap2));
28805
28805
  wrap2 = Fragment.from(before.copy(wrap2));
28806
- let tr = state2.tr.step(new ReplaceAroundStep($cut.pos - 1, end2, $cut.pos, end2, new Slice(wrap2, 1, 0), conn.length, true));
28806
+ let tr = state2.tr.step(new ReplaceAroundStep$1($cut.pos - 1, end2, $cut.pos, end2, new Slice(wrap2, 1, 0), conn.length, true));
28807
28807
  let $joinAt = tr.doc.resolve(end2 + 2 * conn.length);
28808
28808
  if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr.doc, $joinAt.pos))
28809
28809
  tr.join($joinAt.pos);
@@ -28834,7 +28834,7 @@ function deleteBarrier(state2, $cut, dispatch, dir) {
28834
28834
  let end2 = Fragment.empty;
28835
28835
  for (let i = wrap2.length - 1; i >= 0; i--)
28836
28836
  end2 = Fragment.from(wrap2[i].copy(end2));
28837
- let tr = state2.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end2, wrap2.length, 0), 0, true));
28837
+ let tr = state2.tr.step(new ReplaceAroundStep$1($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end2, wrap2.length, 0), 0, true));
28838
28838
  dispatch(tr.scrollIntoView());
28839
28839
  }
28840
28840
  return true;
@@ -29407,7 +29407,7 @@ function selectionToInsertionEnd(tr, startLen, bias) {
29407
29407
  return;
29408
29408
  }
29409
29409
  const step = tr.steps[last];
29410
- if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) {
29410
+ if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep$1)) {
29411
29411
  return;
29412
29412
  }
29413
29413
  const map22 = tr.mapping.maps[last];
@@ -29553,7 +29553,7 @@ function doWrapInList(tr, range2, wrappers, joinBefore, listType) {
29553
29553
  let content = Fragment.empty;
29554
29554
  for (let i = wrappers.length - 1; i >= 0; i--)
29555
29555
  content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));
29556
- tr.step(new ReplaceAroundStep(range2.start - (joinBefore ? 2 : 0), range2.end, range2.start, range2.end, new Slice(content, 0, 0), wrappers.length, true));
29556
+ tr.step(new ReplaceAroundStep$1(range2.start - (joinBefore ? 2 : 0), range2.end, range2.start, range2.end, new Slice(content, 0, 0), wrappers.length, true));
29557
29557
  let found2 = 0;
29558
29558
  for (let i = 0; i < wrappers.length; i++)
29559
29559
  if (wrappers[i].type == listType)
@@ -29586,7 +29586,7 @@ function liftListItem$1(itemType) {
29586
29586
  function liftToOuterList(state2, dispatch, itemType, range2) {
29587
29587
  let tr = state2.tr, end2 = range2.end, endOfList = range2.$to.end(range2.depth);
29588
29588
  if (end2 < endOfList) {
29589
- tr.step(new ReplaceAroundStep(end2 - 1, endOfList, end2, endOfList, new Slice(Fragment.from(itemType.create(null, range2.parent.copy())), 1, 0), 1, true));
29589
+ tr.step(new ReplaceAroundStep$1(end2 - 1, endOfList, end2, endOfList, new Slice(Fragment.from(itemType.create(null, range2.parent.copy())), 1, 0), 1, true));
29590
29590
  range2 = new NodeRange(tr.doc.resolve(range2.$from.pos), tr.doc.resolve(endOfList), range2.depth);
29591
29591
  }
29592
29592
  const target = liftTarget(range2);
@@ -29613,7 +29613,7 @@ function liftOutOfList(state2, dispatch, range2) {
29613
29613
  if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment.empty : Fragment.from(list))))
29614
29614
  return false;
29615
29615
  let start2 = $start.pos, end2 = start2 + item.nodeSize;
29616
- tr.step(new ReplaceAroundStep(start2 - (atStart ? 1 : 0), end2 + (atEnd ? 1 : 0), start2 + 1, end2 - 1, new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))).append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
29616
+ tr.step(new ReplaceAroundStep$1(start2 - (atStart ? 1 : 0), end2 + (atEnd ? 1 : 0), start2 + 1, end2 - 1, new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))).append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
29617
29617
  dispatch(tr.scrollIntoView());
29618
29618
  return true;
29619
29619
  }
@@ -29634,7 +29634,7 @@ function sinkListItem$1(itemType) {
29634
29634
  let inner = Fragment.from(nestedBefore ? itemType.create() : null);
29635
29635
  let slice2 = new Slice(Fragment.from(itemType.create(null, Fragment.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
29636
29636
  let before = range2.start, after = range2.end;
29637
- dispatch(state2.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
29637
+ dispatch(state2.tr.step(new ReplaceAroundStep$1(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
29638
29638
  }
29639
29639
  return true;
29640
29640
  };
@@ -37518,7 +37518,8 @@ const restoreRelativeSelection = (tr, relSel, binding) => {
37518
37518
  binding.mapping
37519
37519
  );
37520
37520
  if (anchor !== null && head !== null) {
37521
- tr.setSelection(TextSelection.between(tr.doc.resolve(anchor), tr.doc.resolve(head)));
37521
+ const sel = TextSelection.between(tr.doc.resolve(anchor), tr.doc.resolve(head));
37522
+ tr.setSelection(sel);
37522
37523
  }
37523
37524
  }
37524
37525
  }
@@ -38299,7 +38300,7 @@ const setMeta = (view, key, value) => {
38299
38300
  };
38300
38301
  const absolutePositionToRelativePosition = (pos, type2, mapping) => {
38301
38302
  if (pos === 0) {
38302
- return Y__namespace.createRelativePositionFromTypeIndex(type2, 0, -1);
38303
+ return Y__namespace.createRelativePositionFromTypeIndex(type2, 0, type2.length === 0 ? -1 : 0);
38303
38304
  }
38304
38305
  let n = type2._first === null ? null : (
38305
38306
  /** @type {Y.ContentType} */
@@ -38308,7 +38309,7 @@ const absolutePositionToRelativePosition = (pos, type2, mapping) => {
38308
38309
  while (n !== null && type2 !== n) {
38309
38310
  if (n instanceof Y__namespace.XmlText) {
38310
38311
  if (n._length >= pos) {
38311
- return Y__namespace.createRelativePositionFromTypeIndex(n, pos, -1);
38312
+ return Y__namespace.createRelativePositionFromTypeIndex(n, pos, type2.length === 0 ? -1 : 0);
38312
38313
  } else {
38313
38314
  pos -= n._length;
38314
38315
  }
@@ -38372,7 +38373,7 @@ const absolutePositionToRelativePosition = (pos, type2, mapping) => {
38372
38373
  return createRelativePosition(n._item.parent, n._item);
38373
38374
  }
38374
38375
  }
38375
- return Y__namespace.createRelativePositionFromTypeIndex(type2, type2._length, -1);
38376
+ return Y__namespace.createRelativePositionFromTypeIndex(type2, type2._length, type2.length === 0 ? -1 : 0);
38376
38377
  };
38377
38378
  const createRelativePosition = (type2, item) => {
38378
38379
  let typeid = null;
@@ -41916,7 +41917,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41916
41917
  * @returns {Object | void} Migration results
41917
41918
  */
41918
41919
  processCollaborationMigrations() {
41919
- console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.3");
41920
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.5");
41920
41921
  if (!this.options.ydoc) return;
41921
41922
  const metaMap = this.options.ydoc.getMap("meta");
41922
41923
  let docVersion = metaMap.get("version");
@@ -43862,7 +43863,7 @@ const generateDecorations = (state2, styles) => {
43862
43863
  const { name } = node2.type;
43863
43864
  if (node2?.attrs?.styleId) lastStyleId = node2.attrs.styleId;
43864
43865
  if (name === "paragraph" && !node2.attrs?.styleId) lastStyleId = null;
43865
- if (name !== "text" && name !== "paragraph") return;
43866
+ if (name !== "text") return;
43866
43867
  const linkedStyle = getLinkedStyle(lastStyleId, styles);
43867
43868
  if (!linkedStyle) return;
43868
43869
  const $pos = state2.doc.resolve(pos);
@@ -44176,6 +44177,13 @@ function orderedListSync(editor) {
44176
44177
  tr.setMeta("orderedListSync", true);
44177
44178
  const listMap = /* @__PURE__ */ new Map();
44178
44179
  const listInitialized = /* @__PURE__ */ new Map();
44180
+ const shouldProcess = transactions.some(
44181
+ (tr2) => tr2.steps.some((step) => {
44182
+ const stepJSON = step.toJSON();
44183
+ return stepJSON && stepJSON.slice && JSON.stringify(stepJSON).includes('"listItem"');
44184
+ })
44185
+ );
44186
+ if (!shouldProcess) return null;
44179
44187
  newState.doc.descendants((node2, pos) => {
44180
44188
  if (node2.type.name !== "listItem") return;
44181
44189
  const { level: attrLvl, numId: attrNumId, styleId, start: start2 } = node2.attrs;
@@ -44208,14 +44216,20 @@ function orderedListSync(editor) {
44208
44216
  customFormat,
44209
44217
  listNumberingType
44210
44218
  } = ListHelpers.getListDefinitionDetails({ numId, level, editor });
44211
- tr.setNodeMarkup(pos, void 0, {
44219
+ const updatedAttrs = {
44212
44220
  ...node2.attrs,
44213
44221
  listLevel: [...currentListLevels],
44214
44222
  level,
44215
44223
  lvlText,
44216
44224
  listNumberingType,
44217
44225
  customFormat
44218
- });
44226
+ };
44227
+ const keysChanged = Object.keys(updatedAttrs).some(
44228
+ (key) => node2.attrs[key] !== updatedAttrs[key]
44229
+ );
44230
+ if (keysChanged) {
44231
+ tr.setNodeMarkup(pos, void 0, updatedAttrs);
44232
+ }
44219
44233
  });
44220
44234
  return tr;
44221
44235
  }
@@ -44550,7 +44564,7 @@ const Paragraph = Node$1.create({
44550
44564
  },
44551
44565
  addPmPlugins() {
44552
44566
  const { view } = this.editor;
44553
- const dropcapPlugin = new Plugin({
44567
+ new Plugin({
44554
44568
  name: "dropcapPlugin",
44555
44569
  key: new PluginKey("dropcapPlugin"),
44556
44570
  state: {
@@ -44570,7 +44584,7 @@ const Paragraph = Node$1.create({
44570
44584
  }
44571
44585
  }
44572
44586
  });
44573
- return [dropcapPlugin];
44587
+ return [];
44574
44588
  }
44575
44589
  });
44576
44590
  const getDropcapDecorations = (state2, view) => {
@@ -48017,6 +48031,8 @@ function findRemovedFieldAnnotations(tr) {
48017
48031
  if (!tr.steps.length || tr.meta && !Object.keys(tr.meta).every((meta) => ["inputType", "uiEvent", "paste"].includes(meta)) || ["historyUndo", "historyRedo"].includes(tr.getMeta("inputType")) || ["drop"].includes(tr.getMeta("uiEvent")) || tr.getMeta("fieldAnnotationUpdate") === true) {
48018
48032
  return removedNodes;
48019
48033
  }
48034
+ const hasDeletion = transactionDeletedAnything(tr);
48035
+ if (!hasDeletion) return removedNodes;
48020
48036
  tr.steps.forEach((step, stepIndex) => {
48021
48037
  if (step instanceof ReplaceStep && step.from !== step.to) {
48022
48038
  let mapping = tr.mapping.maps[stepIndex];
@@ -48033,6 +48049,14 @@ function findRemovedFieldAnnotations(tr) {
48033
48049
  });
48034
48050
  return removedNodes;
48035
48051
  }
48052
+ function transactionDeletedAnything(tr) {
48053
+ return tr.steps.some((step) => {
48054
+ if (step instanceof ReplaceStep || step instanceof ReplaceAroundStep) {
48055
+ return step.from !== step.to;
48056
+ }
48057
+ return false;
48058
+ });
48059
+ }
48036
48060
  function trackFieldAnnotationsDeletion(editor, tr) {
48037
48061
  let removedAnnotations = [];
48038
48062
  try {
@@ -55970,8 +55994,12 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
55970
55994
  return oldState;
55971
55995
  }
55972
55996
  if (typeof document === "undefined" || editor.options.isHeadless) return oldState;
55973
- const decorations = [];
55974
55997
  const { selection } = newState;
55998
+ const node2 = selection.node;
55999
+ if (!node2 || !nodeNames.includes(node2.type.name)) {
56000
+ return DecorationSet.empty;
56001
+ }
56002
+ const decorations = [];
55975
56003
  if (nodeNames.includes(selection.node?.type.name)) {
55976
56004
  decorations.push(
55977
56005
  Decoration.node(selection.from, selection.to, {
@@ -64853,7 +64881,6 @@ const style$2 = cB("icon", `
64853
64881
  display: inline-block;
64854
64882
  position: relative;
64855
64883
  fill: currentColor;
64856
- transform: translateZ(0);
64857
64884
  `, [cM("color-transition", {
64858
64885
  transition: "color .3s var(--n-bezier)"
64859
64886
  }), cM("depth", {