mind-elixir 3.0.5-beta.2 → 3.1.0

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.
@@ -216,15 +216,16 @@ const $e = (e, t) => {
216
216
  function nt(e) {
217
217
  e.map.addEventListener("click", (t) => {
218
218
  var i;
219
- if (console.log("click", t), A.moved) {
219
+ if (A.moved) {
220
220
  A.clear();
221
221
  return;
222
222
  }
223
+ e.unselectNode(), e.unselectNodes(), e.unselectSummary();
223
224
  const n = t.target;
224
225
  if (n.tagName === "ME-EPD")
225
226
  e.expandNode(n.previousSibling);
226
227
  else if (e.editable)
227
- de(n) ? (e.selectNode(n, !1, t), e.unselectNodes(), e.unselectSummary()) : n.tagName === "text" ? (e.selectSummary(n.parentElement), e.unselectNode(), e.unselectNodes()) : n.tagName === "path" ? ((i = n == null ? void 0 : n.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(n.parentElement) : n.className === "circle" || (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), e.hideLinkController && e.hideLinkController());
228
+ de(n) ? e.selectNode(n, !1, t) : n.tagName === "text" ? e.selectSummary(n.parentElement) : n.tagName === "path" ? ((i = n == null ? void 0 : n.parentElement) == null ? void 0 : i.tagName) === "g" && e.selectLink(n.parentElement) : n.className === "circle" || e.hideLinkController && e.hideLinkController();
228
229
  else
229
230
  return;
230
231
  }), e.map.addEventListener("dblclick", (t) => {
@@ -423,7 +424,7 @@ const mt = function(e) {
423
424
  if (b && (b.style.top = (b.parentNode.offsetHeight - b.offsetHeight) / 2 + "px", l === "lhs" ? b.style.left = "-10px" : b.style.right = "-10px"), !(e && e !== s) && s.childElementCount) {
424
425
  const N = X("subLines"), v = s.lastChild;
425
426
  v.tagName === "svg" && v.remove(), s.appendChild(N);
426
- const y = s.firstChild, x = s.children[1].children, _ = Pe(x, y, l, !0);
427
+ const y = s.firstChild, E = s.children[1].children, _ = Pe(E, y, l, !0);
427
428
  N.appendChild(ft(_, a));
428
429
  }
429
430
  }
@@ -556,14 +557,14 @@ function yt(e, t) {
556
557
  const n = (v) => {
557
558
  const y = document.createElement("div");
558
559
  return y.innerText = v, y.style.cssText = "position:absolute;bottom:20px;left:50%;transform:translateX(-50%);", y;
559
- }, i = (v, y, x) => {
560
+ }, i = (v, y, E) => {
560
561
  const _ = document.createElement("li");
561
- return _.id = v, _.innerHTML = `<span>${Q(y)}</span><span>${Q(x)}</span>`, _;
562
+ return _.id = v, _.innerHTML = `<span>${Q(y)}</span><span>${Q(E)}</span>`, _;
562
563
  }, s = fe[e.locale] ? e.locale : "en", o = fe[s], r = i("cm-add_child", o.addChild, "tab"), l = i("cm-add_parent", o.addParent, ""), c = i("cm-add_sibling", o.addSibling, "enter"), u = i("cm-remove_child", o.removeNode, "delete"), d = i("cm-fucus", o.focus, ""), h = i("cm-unfucus", o.cancelFocus, ""), a = i("cm-up", o.moveUp, "PgUp"), p = i("cm-down", o.moveDown, "Pgdn"), g = i("cm-down", o.link, ""), m = i("cm-down", o.summary, ""), f = document.createElement("ul");
563
564
  if (f.className = "menu-list", f.appendChild(r), f.appendChild(l), f.appendChild(c), f.appendChild(u), (!t || t.focus) && (f.appendChild(d), f.appendChild(h)), f.appendChild(a), f.appendChild(p), f.appendChild(m), (!t || t.link) && f.appendChild(g), t && t.extend)
564
565
  for (let v = 0; v < t.extend.length; v++) {
565
- const y = t.extend[v], x = i(y.name, y.name, y.key || "");
566
- f.appendChild(x), x.onclick = (_) => {
566
+ const y = t.extend[v], E = i(y.name, y.name, y.key || "");
567
+ f.appendChild(E), E.onclick = (_) => {
567
568
  y.onclick(_);
568
569
  };
569
570
  }
@@ -575,9 +576,9 @@ function yt(e, t) {
575
576
  return;
576
577
  const y = v.target;
577
578
  if (y.tagName === "ME-TPC") {
578
- y.parentElement.tagName === "ME-ROOT" ? N = !0 : N = !1, N ? (d.className = "disabled", a.className = "disabled", p.className = "disabled", l.className = "disabled", c.className = "disabled", u.className = "disabled") : (d.className = "", a.className = "", p.className = "", l.className = "", c.className = "", u.className = ""), e.selectNode(y), b.hidden = !1;
579
- const x = f.offsetHeight, _ = f.offsetWidth;
580
- x + v.clientY > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = v.clientY + 15 + "px"), _ + v.clientX > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = v.clientX + 10 + "px");
579
+ y.parentElement.tagName === "ME-ROOT" ? N = !0 : N = !1, N ? (d.className = "disabled", a.className = "disabled", p.className = "disabled", l.className = "disabled", c.className = "disabled", u.className = "disabled") : (d.className = "", a.className = "", p.className = "", l.className = "", c.className = "", u.className = ""), e.currentNodes || e.selectNode(y), b.hidden = !1;
580
+ const E = f.offsetHeight, _ = f.offsetWidth;
581
+ E + v.clientY > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = v.clientY + 15 + "px"), _ + v.clientX > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = v.clientX + 10 + "px");
581
582
  }
582
583
  }, b.onclick = (v) => {
583
584
  v.target === b && (b.hidden = !0);
@@ -602,9 +603,9 @@ function yt(e, t) {
602
603
  const v = e.currentNode, y = n(o.clickTips);
603
604
  e.container.appendChild(y), e.map.addEventListener(
604
605
  "click",
605
- (x) => {
606
- x.preventDefault(), y.remove();
607
- const _ = x.target;
606
+ (E) => {
607
+ E.preventDefault(), y.remove();
608
+ const _ = E.target;
608
609
  _.parentElement.tagName === "ME-PARENT" || _.parentElement.tagName === "ME-ROOT" ? e.createLink(v, e.currentNode) : console.log("link cancel");
609
610
  },
610
611
  {
@@ -612,19 +613,19 @@ function yt(e, t) {
612
613
  }
613
614
  );
614
615
  }, m.onclick = () => {
615
- b.hidden = !0, e.currentNodes && e.currentNodes.length > 1 && (e.createSummary(), e.unselectNodes());
616
+ b.hidden = !0, e.createSummary(), e.unselectNodes();
616
617
  };
617
618
  }
618
619
  const Nt = (e) => {
619
620
  const t = e.map.querySelectorAll(".lhs>me-wrapper>me-parent>me-tpc");
620
621
  e.selectNode(t[Math.ceil(t.length / 2) - 1]);
621
- }, xt = (e) => {
622
+ }, Et = (e) => {
622
623
  const t = e.map.querySelectorAll(".rhs>me-wrapper>me-parent>me-tpc");
623
624
  e.selectNode(t[Math.ceil(t.length / 2) - 1]);
624
625
  }, pe = (e) => {
625
626
  e.selectNode(e.map.querySelector("me-root>me-tpc"));
626
627
  };
627
- function Et(e) {
628
+ function xt(e) {
628
629
  const t = {
629
630
  13: () => {
630
631
  e.insertSibling();
@@ -653,7 +654,7 @@ function Et(e) {
653
654
  if (!e.currentNode)
654
655
  return;
655
656
  const n = e.currentNode.nodeObj, i = e.currentNode.offsetParent.offsetParent.parentElement;
656
- n.root ? xt(e) : i.className === "lhs" ? (s = n.parent) != null && s.root ? pe(e) : e.selectParent() : i.className === "rhs" && e.selectFirstChild();
657
+ n.root ? Et(e) : i.className === "lhs" ? (s = n.parent) != null && s.root ? pe(e) : e.selectParent() : i.className === "rhs" && e.selectFirstChild();
657
658
  },
658
659
  33() {
659
660
  e.moveUpNode();
@@ -866,10 +867,10 @@ function Tt(e) {
866
867
  e.container.append(Mt(e)), e.container.append(Lt(e));
867
868
  }
868
869
  /*! @viselect/vanilla v3.3.1 MIT | https://github.com/Simonwep/selection/tree/master/packages/vanilla */
869
- var $t = Object.defineProperty, At = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => (At(e, typeof t != "symbol" ? t + "" : t, n), n);
870
+ var $t = Object.defineProperty, At = (e, t, n) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, x = (e, t, n) => (At(e, typeof t != "symbol" ? t + "" : t, n), n);
870
871
  class Ot {
871
872
  constructor() {
872
- E(this, "_listeners", /* @__PURE__ */ new Map()), E(this, "on", this.addEventListener), E(this, "off", this.removeEventListener), E(this, "emit", this.dispatchEvent);
873
+ x(this, "_listeners", /* @__PURE__ */ new Map()), x(this, "on", this.addEventListener), x(this, "off", this.removeEventListener), x(this, "emit", this.dispatchEvent);
873
874
  }
874
875
  addEventListener(t, n) {
875
876
  const i = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
@@ -948,7 +949,7 @@ const Pt = () => matchMedia("(hover: none), (pointer: coarse)").matches, jt = ()
948
949
  class He extends Ot {
949
950
  constructor(t) {
950
951
  var n, i, s, o, r;
951
- super(), E(this, "_options"), E(this, "_selection", {
952
+ super(), x(this, "_options"), x(this, "_selection", {
952
953
  stored: [],
953
954
  selected: [],
954
955
  touched: [],
@@ -958,7 +959,7 @@ class He extends Ot {
958
959
  removed: []
959
960
  // Removed elements since last selection
960
961
  }
961
- }), E(this, "_area"), E(this, "_clippingElement"), E(this, "_targetElement"), E(this, "_targetRect"), E(this, "_selectables", []), E(this, "_latestElement"), E(this, "_areaRect", new DOMRect()), E(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), E(this, "_singleClick", !0), E(this, "_frame"), E(this, "_scrollAvailable", !0), E(this, "_scrollingActive", !1), E(this, "_scrollSpeed", { x: 0, y: 0 }), E(this, "_scrollDelta", { x: 0, y: 0 }), E(this, "disable", this._bindStartEvents.bind(this, !1)), E(this, "enable", this._bindStartEvents), this._options = {
962
+ }), x(this, "_area"), x(this, "_clippingElement"), x(this, "_targetElement"), x(this, "_targetRect"), x(this, "_selectables", []), x(this, "_latestElement"), x(this, "_areaRect", new DOMRect()), x(this, "_areaLocation", { y1: 0, x2: 0, y2: 0, x1: 0 }), x(this, "_singleClick", !0), x(this, "_frame"), x(this, "_scrollAvailable", !0), x(this, "_scrollingActive", !1), x(this, "_scrollSpeed", { x: 0, y: 0 }), x(this, "_scrollDelta", { x: 0, y: 0 }), x(this, "disable", this._bindStartEvents.bind(this, !1)), x(this, "enable", this._bindStartEvents), this._options = {
962
963
  selectionAreaClass: "selection-area",
963
964
  selectionContainerClass: void 0,
964
965
  selectables: [],
@@ -1130,8 +1131,8 @@ class He extends Ot {
1130
1131
  let { x2: m, y2: f } = n;
1131
1132
  const { behaviour: { scrolling: { startScrollMargins: b } } } = o;
1132
1133
  m < a.left + b.x ? (t.x = u ? -B(a.left - m + b.x) : 0, m = m < a.left ? a.left : m) : m > a.right - b.x ? (t.x = d - u - h ? B(a.left + a.width - m - b.x) : 0, m = m > a.right ? a.right : m) : t.x = 0, f < a.top + b.y ? (t.y = r ? -B(a.top - f + b.y) : 0, f = f < a.top ? a.top : f) : f > a.bottom - b.y ? (t.y = l - r - c ? B(a.top + a.height - f - b.y) : 0, f = f > a.bottom ? a.bottom : f) : t.y = 0;
1133
- const N = ye(p, m), v = ye(g, f), y = ve(p, m), x = ve(g, f);
1134
- i.x = N, i.y = v, i.width = y - N, i.height = x - v;
1134
+ const N = ye(p, m), v = ye(g, f), y = ve(p, m), E = ve(g, f);
1135
+ i.x = N, i.y = v, i.width = y - N, i.height = E - v;
1135
1136
  }
1136
1137
  _redrawSelectionArea() {
1137
1138
  const { x: t, y: n, width: i, height: s } = this._areaRect, { style: o } = this._area;
@@ -1285,7 +1286,7 @@ class He extends Ot {
1285
1286
  ), this._latestElement = void 0, n || (this._emitEvent("move", null), this._emitEvent("stop", null)));
1286
1287
  }
1287
1288
  }
1288
- E(He, "version", "3.3.1");
1289
+ x(He, "version", "3.3.1");
1289
1290
  function Ht(e) {
1290
1291
  const t = new He({
1291
1292
  selectables: ["#map me-tpc"],
@@ -1307,7 +1308,7 @@ function Ht(e) {
1307
1308
  }
1308
1309
  }
1309
1310
  }).on("beforestart", ({ event: n }) => !(n.button !== 0 || n.target.tagName === "ME-TPC" || n.target.id === "input-box")).on("start", ({ event: n }) => {
1310
- !n.ctrlKey && !n.metaKey && (e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
1311
+ !n.ctrlKey && !n.metaKey && (e.unselectNode(), e.unselectNodes(), e.unselectSummary(), t.clearSelection(!0, !0));
1311
1312
  }).on(
1312
1313
  "move",
1313
1314
  ({
@@ -1678,7 +1679,7 @@ const Rt = function(e, t, n) {
1678
1679
  toObj: i,
1679
1680
  originParentId: s
1680
1681
  }), console.timeEnd("moveNode");
1681
- }, xn = function(e, t) {
1682
+ }, En = function(e, t) {
1682
1683
  var u;
1683
1684
  const n = e.nodeObj, i = t.nodeObj, s = (u = n.parent) == null ? void 0 : u.id;
1684
1685
  et(n, i), T(this.nodeData), ne(e);
@@ -1689,7 +1690,7 @@ const Rt = function(e, t, n) {
1689
1690
  toObj: i,
1690
1691
  originParentId: s
1691
1692
  });
1692
- }, En = function(e, t) {
1693
+ }, xn = function(e, t) {
1693
1694
  var u;
1694
1695
  const n = e.nodeObj, i = t.nodeObj, s = (u = n.parent) == null ? void 0 : u.id;
1695
1696
  tt(n, i), T(this.nodeData), ne(e);
@@ -1715,8 +1716,8 @@ const Rt = function(e, t, n) {
1715
1716
  insertSibling: un,
1716
1717
  moveDownNode: vn,
1717
1718
  moveNode: Nn,
1718
- moveNodeAfter: En,
1719
- moveNodeBefore: xn,
1719
+ moveNodeAfter: xn,
1720
+ moveNodeBefore: En,
1720
1721
  moveUpNode: bn,
1721
1722
  removeNode: yn,
1722
1723
  reshapeNode: hn,
@@ -1754,7 +1755,7 @@ const Rt = function(e, t, n) {
1754
1755
  this.mousedown = !1, this.lastX = 0, this.lastY = 0;
1755
1756
  }
1756
1757
  };
1757
- }, xe = {
1758
+ }, Ee = {
1758
1759
  create: wn
1759
1760
  }, kn = function(e, t, n, i) {
1760
1761
  const s = this.map.getBoundingClientRect();
@@ -1773,7 +1774,7 @@ const Rt = function(e, t, n) {
1773
1774
  cy: d,
1774
1775
  w: r.width,
1775
1776
  h: r.height
1776
- }, b = ie(m, h, a), N = b.x, v = b.y, y = se(f, p, g), x = y.x, _ = y.y, D = Le(p, g, x, _), w = {
1777
+ }, b = ie(m, h, a), N = b.x, v = b.y, y = se(f, p, g), E = y.x, _ = y.y, D = Le(p, g, E, _), w = {
1777
1778
  id: "",
1778
1779
  label: "",
1779
1780
  from: e.nodeObj.id,
@@ -1787,8 +1788,8 @@ const Rt = function(e, t, n) {
1787
1788
  y: g - d
1788
1789
  }
1789
1790
  }, H = pt(
1790
- `M ${N} ${v} C ${h} ${a} ${p} ${g} ${x} ${_}`,
1791
- `M ${D.x1} ${D.y1} L ${x} ${_} L ${D.x2} ${D.y2}`
1791
+ `M ${N} ${v} C ${h} ${a} ${p} ${g} ${E} ${_}`,
1792
+ `M ${D.x1} ${D.y1} L ${E} ${_} L ${D.x2} ${D.y2}`
1792
1793
  );
1793
1794
  n && i ? (w.id = i.id, this.linkData[i.id] = w) : (w.id = K(), this.linkData[w.id] = w, this.currentLink = H), H.linkObj = w, H.dataset.linkid = w.id, this.linkSvgGroup.appendChild(H), n || this.showLinkController(h, a, p, g, w, m, f);
1794
1795
  }, Sn = function(e) {
@@ -1823,7 +1824,7 @@ const Rt = function(e, t, n) {
1823
1824
  let c = l.x, u = l.y;
1824
1825
  const d = se(r, n, i);
1825
1826
  let h = d.x, a = d.y;
1826
- this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${n}px;`, this.line1.setAttribute("x1", c), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", a), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = xe.create(this.P2), this.helper2 = xe.create(this.P3), this.helper1.init(this.map, (p, g) => {
1827
+ this.P2.style.cssText = `top:${t}px;left:${e}px;`, this.P3.style.cssText = `top:${i}px;left:${n}px;`, this.line1.setAttribute("x1", c), this.line1.setAttribute("y1", u), this.line1.setAttribute("x2", e), this.line1.setAttribute("y2", t), this.line2.setAttribute("x1", n), this.line2.setAttribute("y1", i), this.line2.setAttribute("x2", h), this.line2.setAttribute("y2", a), this.helper1 && (this.helper1.destory(this.map), this.helper2.destory(this.map)), this.helper1 = Ee.create(this.P2), this.helper2 = Ee.create(this.P3), this.helper1.init(this.map, (p, g) => {
1827
1828
  var f;
1828
1829
  e = e - p / this.scaleVal, t = t - g / this.scaleVal;
1829
1830
  const m = ie(o, e, t);
@@ -1845,6 +1846,19 @@ const Rt = function(e, t, n) {
1845
1846
  showLinkController: Tn
1846
1847
  }, Symbol.toStringTag, { value: "Module" })), An = function(e) {
1847
1848
  var c, u;
1849
+ if (e.length === 0)
1850
+ throw new Error("No selected node.");
1851
+ if (e.length === 1) {
1852
+ const d = e[0].nodeObj, h = e[0].nodeObj.parent;
1853
+ if (!h)
1854
+ throw new Error("Can not select root node.");
1855
+ const a = h.children.findIndex((p) => d === p);
1856
+ return {
1857
+ parent: h.id,
1858
+ start: a,
1859
+ end: a
1860
+ };
1861
+ }
1848
1862
  let t = 0;
1849
1863
  const n = e.map((d) => {
1850
1864
  let h = d.nodeObj;
@@ -1859,15 +1873,14 @@ const Rt = function(e, t, n) {
1859
1873
  e:
1860
1874
  for (; i < t; i++) {
1861
1875
  const d = (c = n[0][i]) == null ? void 0 : c.node;
1862
- console.log(d);
1863
1876
  for (let h = 1; h < n.length; h++)
1864
1877
  if (((u = n[h][i]) == null ? void 0 : u.node) !== d)
1865
1878
  break e;
1866
1879
  }
1867
- const s = n.map((d) => d[i - 1].index).sort();
1868
- console.log(n, "parentChains");
1869
- const o = s[0] || 0, r = s[s.length - 1] || 0, l = n[0][i - 1].node;
1870
- return console.log(l), {
1880
+ const s = n.map((d) => d[i - 1].index).sort(), o = s[0] || 0, r = s[s.length - 1] || 0, l = n[0][i - 1].node;
1881
+ if (l.root)
1882
+ throw new Error("Please select nodes in the same main topic.");
1883
+ return {
1871
1884
  parent: l.id,
1872
1885
  start: o,
1873
1886
  end: r
@@ -1875,7 +1888,7 @@ const Rt = function(e, t, n) {
1875
1888
  }, On = function(e) {
1876
1889
  const t = document.createElementNS("http://www.w3.org/2000/svg", "g");
1877
1890
  return t.setAttribute("id", e), t;
1878
- }, Ee = function(e, t) {
1891
+ }, xe = function(e, t) {
1879
1892
  const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
1880
1893
  return le(n, {
1881
1894
  d: e,
@@ -1905,14 +1918,14 @@ const Rt = function(e, t, n) {
1905
1918
  }
1906
1919
  let m, f;
1907
1920
  const b = p + 10, N = g + 10, v = (b + N) / 2, y = e.theme.cssVar["--color"];
1908
- u === "lhs" ? (m = Ee(`M ${h + 10} ${b} c -5 0 -10 5 -10 10 L ${h} ${N - 10} c 0 5 5 10 10 10 M ${h} ${v} h -10`, y), f = Ce(i, h - 20, v + 6, "end", y)) : (m = Ee(`M ${a - 10} ${b} c 5 0 10 5 10 10 L ${a} ${N - 10} c 0 5 -5 10 -10 10 M ${a} ${v} h 10`, y), f = Ce(i, a + 20, v + 6, "start", y));
1909
- const x = On("s-" + n);
1910
- return x.appendChild(m), x.appendChild(f), x.summaryObj = t, e.summarySvg.appendChild(x), x;
1921
+ u === "lhs" ? (m = xe(`M ${h + 10} ${b} c -5 0 -10 5 -10 10 L ${h} ${N - 10} c 0 5 5 10 10 10 M ${h} ${v} h -10`, y), f = Ce(i, h - 20, v + 6, "end", y)) : (m = xe(`M ${a - 10} ${b} c 5 0 10 5 10 10 L ${a} ${N - 10} c 0 5 -5 10 -10 10 M ${a} ${v} h 10`, y), f = Ce(i, a + 20, v + 6, "start", y));
1922
+ const E = On("s-" + n);
1923
+ return E.appendChild(m), E.appendChild(f), E.summaryObj = t, e.summarySvg.appendChild(E), E;
1911
1924
  }, jn = function() {
1912
- if (!this.currentNodes)
1913
- return;
1914
- const { parent: e, start: t, end: n } = An(this.currentNodes), i = { id: K(), parent: e, start: t, end: n, text: "summary" }, s = qe(this, i);
1915
- this.summaries.push(i), this.editSummary(s);
1925
+ let e = [];
1926
+ this.currentNode ? e = [this.currentNode] : this.currentNodes && (e = this.currentNodes);
1927
+ const { parent: t, start: n, end: i } = An(e), s = { id: K(), parent: t, start: n, end: i, text: "summary" }, o = qe(this, s);
1928
+ this.summaries.push(s), this.editSummary(o);
1916
1929
  }, Dn = function(e) {
1917
1930
  var n;
1918
1931
  const t = this.summaries.findIndex((i) => i.id === e);
@@ -1960,7 +1973,7 @@ const Rt = function(e, t, n) {
1960
1973
  if (!n)
1961
1974
  return;
1962
1975
  const r = e.summaryObj, l = ((c = n.textContent) == null ? void 0 : c.trim()) || "";
1963
- console.log(l), l === "" ? r.text = i : r.text = l, n.remove(), l !== i && (t.innerHTML = r.text, this.linkDiv(), this.bus.fire("operation", {
1976
+ l === "" ? r.text = i : r.text = l, n.remove(), l !== i && (t.innerHTML = r.text, this.linkDiv(), this.bus.fire("operation", {
1964
1977
  name: "finishEditSummary",
1965
1978
  obj: r,
1966
1979
  origin: i
@@ -2005,7 +2018,7 @@ const Yn = {
2005
2018
  init(e) {
2006
2019
  if (!e || !e.nodeData)
2007
2020
  return new Error("MindElixir: `data` is required");
2008
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, T(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Tt(this), this.keypress && Et(this), Ye() && this.mobileMenu ? Ct(this) : this.contextMenu && yt(this, this.contextMenuOption), this.draggable && kt(this), this.allowUndo && St(this), Ht(this), this.toCenter(), this.layout(), this.linkDiv();
2021
+ e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, T(this.nodeData), this.linkData = e.linkData || {}, this.summaries = e.summaries || [], this.toolBar && Tt(this), this.keypress && xt(this), Ye() && this.mobileMenu ? Ct(this) : this.contextMenu && yt(this, this.contextMenuOption), this.draggable && kt(this), this.allowUndo && St(this), Ht(this), this.toCenter(), this.layout(), this.linkDiv();
2009
2022
  }
2010
2023
  }, W = document;
2011
2024
  function $({
@@ -2044,7 +2057,7 @@ $.RIGHT = R;
2044
2057
  $.SIDE = I;
2045
2058
  $.THEME = we;
2046
2059
  $.DARK_THEME = ke;
2047
- $.version = "3.0.5-beta.2";
2060
+ $.version = "3.1.0";
2048
2061
  $.E = C;
2049
2062
  $.new = (e) => ({
2050
2063
  nodeData: {