@harbour-enterprises/superdoc 0.9.23 → 0.9.24

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.
@@ -16094,7 +16094,7 @@ const us = class l1 {
16094
16094
  return;
16095
16095
  }
16096
16096
  }
16097
- static updateDocumentVersion(e = this.convertedXml, n = "0.9.23") {
16097
+ static updateDocumentVersion(e = this.convertedXml, n = "0.9.24") {
16098
16098
  const r = "docProps/custom.xml";
16099
16099
  e[r] || (e[r] = c1());
16100
16100
  const o = e["docProps/custom.xml"];
@@ -16319,7 +16319,7 @@ function UT(t) {
16319
16319
  function c1() {
16320
16320
  return OE;
16321
16321
  }
16322
- function u1(t = 2, e = "0.9.23") {
16322
+ function u1(t = 2, e = "0.9.24") {
16323
16323
  return {
16324
16324
  type: "element",
16325
16325
  name: "property",
@@ -28760,7 +28760,7 @@ const T_ = class sx extends A5 {
28760
28760
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
28761
28761
  */
28762
28762
  processCollaborationMigrations() {
28763
- if (console.debug("[checkVersionMigrations] Current editor version", "0.9.23"), !this.options.ydoc) return;
28763
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.9.24"), !this.options.ydoc) return;
28764
28764
  let e = this.options.ydoc.getMap("meta").get("version");
28765
28765
  e || (e = "initial"), console.debug("[checkVersionMigrations] Document version", e);
28766
28766
  const n = Wy(e) || [], r = this.state.plugins.find((i) => i.key.startsWith("y-sync"));
@@ -30387,12 +30387,20 @@ const Sx = rt.create({
30387
30387
  getCurrentListNode: () => ({ state: t }) => un((e) => e.type.name === this.name)(t.selection),
30388
30388
  increaseListIndent: () => ({ commands: t }) => t.sinkListItem(this.name) ? (t.updateNodeStyle(), t.updateOrderedListStyleType(), !0) : !1,
30389
30389
  decreaseListIndent: () => ({ commands: t }) => {
30390
- const e = t.getCurrentList(), n = t.getCurrentListNode(), r = e?.node?.children.findIndex((s) => s === n.node), o = n?.pos + n?.node.nodeSize, i = e?.node?.children.slice(r + 1) || [];
30391
- return t.liftListItem(this.name) ? (t.updateNodeStyle(), t.updateOrderedListStyleType(), t.restartListNodes(i, o), !0) : !1;
30390
+ const e = t.getCurrentList();
30391
+ if (e?.depth === 1) return !1;
30392
+ if (!t.liftListItem(this.name))
30393
+ return !0;
30394
+ if (!t.updateNodeStyle())
30395
+ return !1;
30396
+ const n = t.getCurrentListNode(), r = e?.node?.children.findIndex((s) => s === n.node), o = n?.pos + n?.node.nodeSize, i = e?.node?.children.slice(r + 1) || [];
30397
+ return t.updateOrderedListStyleType(), t.restartListNodes(i, o), !0;
30392
30398
  },
30393
30399
  updateNodeStyle: () => ({ tr: t, state: e }) => {
30394
30400
  let n = un((s) => s.type.name === "orderedList")(t.selection);
30395
- const r = un((s) => s.type.name === this.name)(e.selection), o = n?.node.children[0]?.attrs, i = t.mapping.map(r.pos);
30401
+ const r = un((s) => s.type.name === this.name)(e.selection);
30402
+ if (!n) return !1;
30403
+ const o = n?.node.children[0]?.attrs, i = t.mapping.map(r.pos);
30396
30404
  return t.setNodeMarkup(i, void 0, {
30397
30405
  ...o
30398
30406
  }), !0;