editate 0.6.25 → 0.6.26

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/lib/index.cjs CHANGED
@@ -580,14 +580,20 @@ var it = [], lt = () => {}, at = t => {
580
580
  return r = n.nextNode();
581
581
  }, i = () => {
582
582
  const t = r.parentNode;
583
- return a(() => {
583
+ return f(() => {
584
584
  for (o = 0; s(); ) {
585
585
  if (c()) return !0;
586
586
  if (!t.contains(r)) break;
587
587
  }
588
588
  return !1;
589
589
  });
590
- }, l = {
590
+ }, l = () => {
591
+ const t = c();
592
+ return 0 === t || 6 === t;
593
+ }, a = (t, e) => {
594
+ for (;(o = null) || (r = t ? n.previousSibling() : n.nextSibling()); ) if (e ? 4 === c() : !l()) return !0;
595
+ return !1;
596
+ }, u = {
591
597
  t: () => {
592
598
  for (;s(); ) {
593
599
  const t = c();
@@ -601,26 +607,27 @@ var it = [], lt = () => {}, at = t => {
601
607
  return 1 === t ? r.data.length : 2 === t ? 1 : 0;
602
608
  },
603
609
  u: t => {
604
- o = null, n.currentNode = r = t;
610
+ o = null, n.currentNode = r = t, l() && !a(!0) && (o = null, n.currentNode = r = t,
611
+ a(!1) || (o = null, n.currentNode = r = t));
605
612
  },
606
613
  h: () => {
607
- for (;(o = null) || (r = n.previousSibling()); ) if (4 === c()) return;
614
+ a(!0, !0);
608
615
  },
609
616
  o: () => {
610
- for (;(o = null) || (r = n.nextSibling()); ) if (4 === c()) return;
617
+ a(!1, !0);
611
618
  },
612
619
  p: () => {
613
620
  for (;(o = null) || (r = n.parentNode()); ) if (4 === c()) return;
614
621
  }
615
- }, a = (e, c) => {
616
- const s = n, i = r, a = o;
622
+ }, f = (e, c) => {
623
+ const s = n, i = r, l = o;
617
624
  try {
618
- return n || (n = t.createTreeWalker(r = c, 5)), e(l);
625
+ return n || (n = t.createTreeWalker(r = c, 5)), e(u);
619
626
  } finally {
620
- n = s, r = i, o = a, n && i && (n.currentNode = i);
627
+ n = s, r = i, o = l, n && i && (n.currentNode = i);
621
628
  }
622
629
  };
623
- return a;
630
+ return f;
624
631
  })(E, r), M = () => {
625
632
  n.contentEditable = e ? "false" : "true", n.ariaReadOnly = e ? "true" : null;
626
633
  };