@nine-lab/nine-ux 0.1.36 → 0.1.38

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.
@@ -433,7 +433,7 @@ ye(Rr, "confirm", async (e, t = "Confirm", r = {}) => {
433
433
  "false-text": "No",
434
434
  class: "",
435
435
  animation: "",
436
- ...((d = It.options) == null ? void 0 : d.confirm) || {},
436
+ ...((d = bt.options) == null ? void 0 : d.confirm) || {},
437
437
  ...r
438
438
  };
439
439
  document.querySelectorAll("nine-confirm-popup").forEach((u) => u.remove());
@@ -468,7 +468,7 @@ ye(Pr, "alert", async (e, t = "Alert", r = {}) => {
468
468
  const i = {
469
469
  class: "",
470
470
  animation: "",
471
- ...((c = It.options) == null ? void 0 : c.alert) || {},
471
+ ...((c = bt.options) == null ? void 0 : c.alert) || {},
472
472
  ...r
473
473
  };
474
474
  document.querySelectorAll("nine-alert-popup").forEach((d) => d.remove());
@@ -514,8 +514,8 @@ class wl {
514
514
  }
515
515
  }
516
516
  qt = new WeakMap();
517
- const It = new wl();
518
- var jt, Xe, Kt, ae, Ct, dr, ur, Jt, vn;
517
+ const bt = new wl();
518
+ var jt, Xe, Kt, ae, Tt, dr, ur, Jt, vn;
519
519
  class Cl extends HTMLElement {
520
520
  constructor() {
521
521
  super();
@@ -527,7 +527,7 @@ class Cl extends HTMLElement {
527
527
  W(this, Kt, !1);
528
528
  ye(this, "getData", () => {
529
529
  const t = {};
530
- return Q(this, ae, Ct).call(this).forEach((r) => {
530
+ return Q(this, ae, Tt).call(this).forEach((r) => {
531
531
  const i = r.name;
532
532
  if (!i) return;
533
533
  let s;
@@ -540,7 +540,7 @@ class Cl extends HTMLElement {
540
540
  });
541
541
  // 파라미터가 있으면 해당 값으로, 없으면 전체 공백 초기화
542
542
  ye(this, "clearData", (t = {}) => {
543
- Q(this, ae, ur).call(this), Q(this, ae, Ct).call(this).forEach((r) => {
543
+ Q(this, ae, ur).call(this), Q(this, ae, Tt).call(this).forEach((r) => {
544
544
  const i = r.name;
545
545
  if (!i) return;
546
546
  const s = t && t[i] !== void 0 ? t[i] : "";
@@ -551,7 +551,7 @@ class Cl extends HTMLElement {
551
551
  if (!t || typeof t != "object") return;
552
552
  Q(this, ae, ur).call(this);
553
553
  let r = !1;
554
- Q(this, ae, Ct).call(this).forEach((i) => {
554
+ Q(this, ae, Tt).call(this).forEach((i) => {
555
555
  const s = i.name;
556
556
  !s || !t.hasOwnProperty(s) || Q(this, ae, dr).call(this, i, t[s]) && (r = !0);
557
557
  }), r && (this.changed = !0);
@@ -589,7 +589,7 @@ class Cl extends HTMLElement {
589
589
  }
590
590
  }
591
591
  jt = new WeakMap(), Xe = new WeakMap(), Kt = new WeakMap(), ae = new WeakSet(), // 공통 쿼리 함수: 현재 root(Shadow 또는 Light DOM)에서 요소를 찾음
592
- Ct = function() {
592
+ Tt = function() {
593
593
  return ninegrid.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]", O(this, Xe));
594
594
  }, // [공통 로직 1] 특정 요소에 값을 쓰거나 초기화하는 핵심 함수
595
595
  dr = function(t, r) {
@@ -609,7 +609,7 @@ dr = function(t, r) {
609
609
  return o;
610
610
  }, // [공통 로직 2] 이벤트 리스너 일괄 등록
611
611
  ur = function() {
612
- Q(this, ae, Ct).call(this).forEach((t) => {
612
+ Q(this, ae, Tt).call(this).forEach((t) => {
613
613
  t.removeEventListener("input", O(this, Jt)), t.addEventListener("input", O(this, Jt));
614
614
  });
615
615
  }, Jt = new WeakMap(), vn = new WeakMap();
@@ -1284,7 +1284,7 @@ function Ze(n, e) {
1284
1284
  let t = e.length - 1;
1285
1285
  t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
1286
1286
  }
1287
- function vt(n, e, t, r) {
1287
+ function Nt(n, e, t, r) {
1288
1288
  let i = (e || n).node(t), s = 0, o = e ? e.index(t) : i.childCount;
1289
1289
  n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Ze(n.nodeAfter, r), s++));
1290
1290
  for (let l = s; l < o; l++)
@@ -1296,15 +1296,15 @@ function Qe(n, e) {
1296
1296
  }
1297
1297
  function vs(n, e, t, r, i) {
1298
1298
  let s = n.depth > i && hr(n, e, i + 1), o = r.depth > i && hr(t, r, i + 1), l = [];
1299
- return vt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Es(s, o), Ze(Qe(s, vs(n, e, t, r, i + 1)), l)) : (s && Ze(Qe(s, hn(n, e, i + 1)), l), vt(e, t, i, l), o && Ze(Qe(o, hn(t, r, i + 1)), l)), vt(r, null, i, l), new b(l);
1299
+ return Nt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Es(s, o), Ze(Qe(s, vs(n, e, t, r, i + 1)), l)) : (s && Ze(Qe(s, hn(n, e, i + 1)), l), Nt(e, t, i, l), o && Ze(Qe(o, hn(t, r, i + 1)), l)), Nt(r, null, i, l), new b(l);
1300
1300
  }
1301
1301
  function hn(n, e, t) {
1302
1302
  let r = [];
1303
- if (vt(null, n, t, r), n.depth > t) {
1303
+ if (Nt(null, n, t, r), n.depth > t) {
1304
1304
  let i = hr(n, e, t + 1);
1305
1305
  Ze(Qe(i, hn(n, e, t + 1)), r);
1306
1306
  }
1307
- return vt(e, null, t, r), new b(r);
1307
+ return Nt(e, null, t, r), new b(r);
1308
1308
  }
1309
1309
  function Ol(n, e) {
1310
1310
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
@@ -2902,13 +2902,13 @@ const Fs = {
2902
2902
  script: !0,
2903
2903
  style: !0,
2904
2904
  title: !0
2905
- }, $s = { ol: !0, ul: !0 }, Pt = 1, mr = 2, Nt = 4;
2905
+ }, $s = { ol: !0, ul: !0 }, Pt = 1, mr = 2, At = 4;
2906
2906
  function ui(n, e, t) {
2907
- return e != null ? (e ? Pt : 0) | (e === "full" ? mr : 0) : n && n.whitespace == "pre" ? Pt | mr : t & ~Nt;
2907
+ return e != null ? (e ? Pt : 0) | (e === "full" ? mr : 0) : n && n.whitespace == "pre" ? Pt | mr : t & ~At;
2908
2908
  }
2909
2909
  class Qt {
2910
2910
  constructor(e, t, r, i, s, o) {
2911
- this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o & Nt ? null : e.contentMatch);
2911
+ this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o & At ? null : e.contentMatch);
2912
2912
  }
2913
2913
  findWrapping(e) {
2914
2914
  if (!this.match) {
@@ -2942,7 +2942,7 @@ class Qt {
2942
2942
  class fi {
2943
2943
  constructor(e, t, r) {
2944
2944
  this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2945
- let i = t.topNode, s, o = ui(null, t.preserveWhitespace, 0) | (r ? Nt : 0);
2945
+ let i = t.topNode, s, o = ui(null, t.preserveWhitespace, 0) | (r ? At : 0);
2946
2946
  i ? s = new Qt(i.type, i.attrs, A.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new Qt(null, null, A.none, !0, null, o) : s = new Qt(e.schema.topNodeType, null, A.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
2947
2947
  }
2948
2948
  get top() {
@@ -3125,7 +3125,7 @@ class fi {
3125
3125
  let o = this.top;
3126
3126
  o.match = o.match && o.match.matchType(e);
3127
3127
  let l = ui(e, s, o.options);
3128
- o.options & Nt && o.content.length == 0 && (l |= Nt);
3128
+ o.options & At && o.content.length == 0 && (l |= At);
3129
3129
  let a = A.none;
3130
3130
  return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : pi(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new Qt(e, t, a, i, null, l)), this.open++, r;
3131
3131
  }
@@ -4114,7 +4114,7 @@ function Lr(n, e, t, r = t.contentMatch, i = !0) {
4114
4114
  function Zl(n, e, t) {
4115
4115
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
4116
4116
  }
4117
- function Mt(n) {
4117
+ function wt(n) {
4118
4118
  let t = n.parent.content.cutByIndex(n.startIndex, n.endIndex);
4119
4119
  for (let r = n.depth, i = 0, s = 0; ; --r) {
4120
4120
  let o = n.$from.node(r), l = n.$from.index(r) + i, a = n.$to.indexAfter(r) - s;
@@ -4417,9 +4417,9 @@ class da {
4417
4417
  let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Jn(e, t);
4418
4418
  if (i.childCount <= 1 && t > 0) {
4419
4419
  let s = e.size - t <= t + i.size;
4420
- this.unplaced = new k(Tt(e, t - 1, 1), t - 1, s ? t - 1 : r);
4420
+ this.unplaced = new k(Ot(e, t - 1, 1), t - 1, s ? t - 1 : r);
4421
4421
  } else
4422
- this.unplaced = new k(Tt(e, t, 1), t, r);
4422
+ this.unplaced = new k(Ot(e, t, 1), t, r);
4423
4423
  }
4424
4424
  // Move content from the unplaced slice at `sliceDepth` to the
4425
4425
  // frontier node at `frontierDepth`. Close that frontier node when
@@ -4444,12 +4444,12 @@ class da {
4444
4444
  c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(Ys(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4445
4445
  }
4446
4446
  let p = c == l.childCount;
4447
- p || (h = -1), this.placed = Ot(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4447
+ p || (h = -1), this.placed = Et(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4448
4448
  for (let m = 0, g = l; m < h; m++) {
4449
4449
  let y = g.lastChild;
4450
4450
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
4451
4451
  }
4452
- this.unplaced = p ? e == 0 ? k.empty : new k(Tt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Tt(o.content, e, c), o.openStart, o.openEnd);
4452
+ this.unplaced = p ? e == 0 ? k.empty : new k(Ot(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Ot(o.content, e, c), o.openStart, o.openEnd);
4453
4453
  }
4454
4454
  mustMoveInline() {
4455
4455
  if (!this.$to.parent.isTextblock)
@@ -4481,7 +4481,7 @@ class da {
4481
4481
  return null;
4482
4482
  for (; this.depth > t.depth; )
4483
4483
  this.closeFrontierNode();
4484
- t.fit.childCount && (this.placed = Ot(this.placed, t.depth, t.fit)), e = t.move;
4484
+ t.fit.childCount && (this.placed = Et(this.placed, t.depth, t.fit)), e = t.move;
4485
4485
  for (let r = t.depth + 1; r <= e.depth; r++) {
4486
4486
  let i = e.node(r), s = i.type.contentMatch.fillBefore(i.content, !0, e.index(r));
4487
4487
  this.openFrontierNode(i.type, i.attrs, s);
@@ -4490,18 +4490,18 @@ class da {
4490
4490
  }
4491
4491
  openFrontierNode(e, t = null, r) {
4492
4492
  let i = this.frontier[this.depth];
4493
- i.match = i.match.matchType(e), this.placed = Ot(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4493
+ i.match = i.match.matchType(e), this.placed = Et(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4494
4494
  }
4495
4495
  closeFrontierNode() {
4496
4496
  let t = this.frontier.pop().match.fillBefore(b.empty, !0);
4497
- t.childCount && (this.placed = Ot(this.placed, this.frontier.length, t));
4497
+ t.childCount && (this.placed = Et(this.placed, this.frontier.length, t));
4498
4498
  }
4499
4499
  }
4500
- function Tt(n, e, t) {
4501
- return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(Tt(n.firstChild.content, e - 1, t)));
4502
- }
4503
4500
  function Ot(n, e, t) {
4504
- return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(Ot(n.lastChild.content, e - 1, t)));
4501
+ return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(Ot(n.firstChild.content, e - 1, t)));
4502
+ }
4503
+ function Et(n, e, t) {
4504
+ return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(Et(n.lastChild.content, e - 1, t)));
4505
4505
  }
4506
4506
  function Jn(n, e) {
4507
4507
  for (let t = 0; t < e; t++)
@@ -4706,15 +4706,15 @@ class Lt extends Z {
4706
4706
  }
4707
4707
  }
4708
4708
  Z.jsonID("docAttr", Lt);
4709
- let bt = class extends Error {
4709
+ let kt = class extends Error {
4710
4710
  };
4711
- bt = function n(e) {
4711
+ kt = function n(e) {
4712
4712
  let t = Error.call(this, e);
4713
4713
  return t.__proto__ = n.prototype, t;
4714
4714
  };
4715
- bt.prototype = Object.create(Error.prototype);
4716
- bt.prototype.constructor = bt;
4717
- bt.prototype.name = "TransformError";
4715
+ kt.prototype = Object.create(Error.prototype);
4716
+ kt.prototype.constructor = kt;
4717
+ kt.prototype.name = "TransformError";
4718
4718
  class ga {
4719
4719
  /**
4720
4720
  Create a transform that starts with the given document.
@@ -4735,7 +4735,7 @@ class ga {
4735
4735
  step(e) {
4736
4736
  let t = this.maybeStep(e);
4737
4737
  if (t.failed)
4738
- throw new bt(t.failed);
4738
+ throw new kt(t.failed);
4739
4739
  return this;
4740
4740
  }
4741
4741
  /**
@@ -5506,13 +5506,13 @@ class ka extends ga {
5506
5506
  function Ci(n, e) {
5507
5507
  return !e || !n ? n : n.bind(e);
5508
5508
  }
5509
- class Et {
5509
+ class vt {
5510
5510
  constructor(e, t, r) {
5511
5511
  this.name = e, this.init = Ci(t.init, r), this.apply = Ci(t.apply, r);
5512
5512
  }
5513
5513
  }
5514
5514
  const xa = [
5515
- new Et("doc", {
5515
+ new vt("doc", {
5516
5516
  init(n) {
5517
5517
  return n.doc || n.schema.topNodeType.createAndFill();
5518
5518
  },
@@ -5520,7 +5520,7 @@ const xa = [
5520
5520
  return n.doc;
5521
5521
  }
5522
5522
  }),
5523
- new Et("selection", {
5523
+ new vt("selection", {
5524
5524
  init(n, e) {
5525
5525
  return n.selection || E.atStart(e.doc);
5526
5526
  },
@@ -5528,7 +5528,7 @@ const xa = [
5528
5528
  return n.selection;
5529
5529
  }
5530
5530
  }),
5531
- new Et("storedMarks", {
5531
+ new vt("storedMarks", {
5532
5532
  init(n) {
5533
5533
  return n.storedMarks || null;
5534
5534
  },
@@ -5536,7 +5536,7 @@ const xa = [
5536
5536
  return r.selection.$cursor ? n.storedMarks : null;
5537
5537
  }
5538
5538
  }),
5539
- new Et("scrollToSelection", {
5539
+ new vt("scrollToSelection", {
5540
5540
  init() {
5541
5541
  return 0;
5542
5542
  },
@@ -5550,7 +5550,7 @@ class Gn {
5550
5550
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = xa.slice(), t && t.forEach((r) => {
5551
5551
  if (this.pluginsByKey[r.key])
5552
5552
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
5553
- this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Et(r.key, r.spec.state, r));
5553
+ this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new vt(r.key, r.spec.state, r));
5554
5554
  });
5555
5555
  }
5556
5556
  }
@@ -5769,7 +5769,7 @@ const K = function(n) {
5769
5769
  for (var e = 0; ; e++)
5770
5770
  if (n = n.previousSibling, !n)
5771
5771
  return e;
5772
- }, kt = function(n) {
5772
+ }, xt = function(n) {
5773
5773
  let e = n.assignedSlot || n.parentNode;
5774
5774
  return e && e.nodeType == 11 ? e.host : e;
5775
5775
  };
@@ -5880,7 +5880,7 @@ function Ea(n, e, t) {
5880
5880
  }
5881
5881
  const xe = typeof navigator < "u" ? navigator : null, Oi = typeof document < "u" ? document : null, je = xe && xe.userAgent || "", kr = /Edge\/(\d+)/.exec(je), to = /MSIE \d/.exec(je), xr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(je), ie = !!(to || xr || kr), $e = to ? document.documentMode : xr ? +xr[1] : kr ? +kr[1] : 0, pe = !ie && /gecko\/(\d+)/i.test(je);
5882
5882
  pe && +(/Firefox\/(\d+)/.exec(je) || [0, 0])[1];
5883
- const Sr = !ie && /Chrome\/(\d+)/.exec(je), U = !!Sr, no = Sr ? +Sr[1] : 0, X = !ie && !!xe && /Apple Computer/.test(xe.vendor), xt = X && (/Mobile\/\w+/.test(je) || !!xe && xe.maxTouchPoints > 2), ue = xt || (xe ? /Mac/.test(xe.platform) : !1), ro = xe ? /Win/.test(xe.platform) : !1, Ee = /Android \d/.test(je), Yt = !!Oi && "webkitFontSmoothing" in Oi.documentElement.style, va = Yt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5883
+ const Sr = !ie && /Chrome\/(\d+)/.exec(je), U = !!Sr, no = Sr ? +Sr[1] : 0, X = !ie && !!xe && /Apple Computer/.test(xe.vendor), St = X && (/Mobile\/\w+/.test(je) || !!xe && xe.maxTouchPoints > 2), ue = St || (xe ? /Mac/.test(xe.platform) : !1), ro = xe ? /Win/.test(xe.platform) : !1, Ee = /Android \d/.test(je), Yt = !!Oi && "webkitFontSmoothing" in Oi.documentElement.style, va = Yt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5884
5884
  function Na(n) {
5885
5885
  let e = n.defaultView && n.defaultView.visualViewport;
5886
5886
  return e ? {
@@ -5911,7 +5911,7 @@ function Ei(n, e, t) {
5911
5911
  let r = n.someProp("scrollThreshold") || 0, i = n.someProp("scrollMargin") || 5, s = n.dom.ownerDocument;
5912
5912
  for (let o = t || n.dom; o; ) {
5913
5913
  if (o.nodeType != 1) {
5914
- o = kt(o);
5914
+ o = xt(o);
5915
5915
  continue;
5916
5916
  }
5917
5917
  let l = o, a = l == s.body, c = a ? Na(s) : Aa(l), d = 0, u = 0;
@@ -5927,7 +5927,7 @@ function Ei(n, e, t) {
5927
5927
  let f = a ? "fixed" : getComputedStyle(o).position;
5928
5928
  if (/^(fixed|sticky)$/.test(f))
5929
5929
  break;
5930
- o = f == "absolute" ? o.offsetParent : kt(o);
5930
+ o = f == "absolute" ? o.offsetParent : xt(o);
5931
5931
  }
5932
5932
  }
5933
5933
  function Da(n) {
@@ -5946,7 +5946,7 @@ function Da(n) {
5946
5946
  }
5947
5947
  function io(n) {
5948
5948
  let e = [], t = n.ownerDocument;
5949
- for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = kt(r))
5949
+ for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = xt(r))
5950
5950
  ;
5951
5951
  return e;
5952
5952
  }
@@ -6069,7 +6069,7 @@ function Fa(n, e) {
6069
6069
  return null;
6070
6070
  }
6071
6071
  if (X)
6072
- for (let c = o; r && c; c = kt(c))
6072
+ for (let c = o; r && c; c = xt(c))
6073
6073
  c.draggable && (r = void 0);
6074
6074
  if (o = Ba(o, e), r) {
6075
6075
  if (pe && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
@@ -6106,13 +6106,13 @@ function ao(n, e, t) {
6106
6106
  if (c.top == a.top) {
6107
6107
  let d = Ae(Te(r, i, i + 1), -1);
6108
6108
  if (d.top != a.top)
6109
- return wt(d, d.left < c.left);
6109
+ return Ct(d, d.left < c.left);
6110
6110
  }
6111
6111
  }
6112
6112
  return a;
6113
6113
  } else {
6114
6114
  let a = i, c = i, d = t < 0 ? 1 : -1;
6115
- return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, wt(Ae(Te(r, a, c), d), d < 0);
6115
+ return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Ct(Ae(Te(r, a, c), d), d < 0);
6116
6116
  }
6117
6117
  if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
6118
6118
  if (s == null && i && (t < 0 || i == fe(r))) {
@@ -6130,7 +6130,7 @@ function ao(n, e, t) {
6130
6130
  if (s == null && i && (t < 0 || i == fe(r))) {
6131
6131
  let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Te(a, fe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
6132
6132
  if (c)
6133
- return wt(Ae(c, 1), !1);
6133
+ return Ct(Ae(c, 1), !1);
6134
6134
  }
6135
6135
  if (s == null && i < fe(r)) {
6136
6136
  let a = r.childNodes[i];
@@ -6138,11 +6138,11 @@ function ao(n, e, t) {
6138
6138
  a = a.nextSibling;
6139
6139
  let c = a ? a.nodeType == 3 ? Te(a, 0, o ? 0 : 1) : a.nodeType == 1 ? a : null : null;
6140
6140
  if (c)
6141
- return wt(Ae(c, -1), !0);
6141
+ return Ct(Ae(c, -1), !0);
6142
6142
  }
6143
- return wt(Ae(r.nodeType == 3 ? Te(r) : r, -t), t >= 0);
6143
+ return Ct(Ae(r.nodeType == 3 ? Te(r) : r, -t), t >= 0);
6144
6144
  }
6145
- function wt(n, e) {
6145
+ function Ct(n, e) {
6146
6146
  if (n.width == 0)
6147
6147
  return n;
6148
6148
  let t = e ? n.left : n.right;
@@ -6728,7 +6728,7 @@ class Ve extends Xt {
6728
6728
  a.syncToMarks(c.marks, r, e, f);
6729
6729
  let h;
6730
6730
  a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
6731
- }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == _e) && (o && this.protectLocalComposition(e, o), ho(this.contentDOM, this.children, e), xt && Xa(this.dom));
6731
+ }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == _e) && (o && this.protectLocalComposition(e, o), ho(this.contentDOM, this.children, e), St && Xa(this.dom));
6732
6732
  }
6733
6733
  localCompositionInfo(e, t) {
6734
6734
  let { from: r, to: i } = e.state.selection;
@@ -6898,22 +6898,22 @@ function ho(n, e, t) {
6898
6898
  r = Pi(r), i = !0;
6899
6899
  i && t.trackWrites == n && (t.trackWrites = null);
6900
6900
  }
6901
- const At = function(n) {
6901
+ const Dt = function(n) {
6902
6902
  n && (this.nodeName = n);
6903
6903
  };
6904
- At.prototype = /* @__PURE__ */ Object.create(null);
6905
- const Ge = [new At()];
6904
+ Dt.prototype = /* @__PURE__ */ Object.create(null);
6905
+ const Ge = [new Dt()];
6906
6906
  function Mr(n, e, t) {
6907
6907
  if (n.length == 0)
6908
6908
  return Ge;
6909
- let r = t ? Ge[0] : new At(), i = [r];
6909
+ let r = t ? Ge[0] : new Dt(), i = [r];
6910
6910
  for (let s = 0; s < n.length; s++) {
6911
6911
  let o = n[s].type.attrs;
6912
6912
  if (o) {
6913
- o.nodeName && i.push(r = new At(o.nodeName));
6913
+ o.nodeName && i.push(r = new Dt(o.nodeName));
6914
6914
  for (let l in o) {
6915
6915
  let a = o[l];
6916
- a != null && (t && i.length == 1 && i.push(r = new At(e.isInline ? "span" : "div")), l == "class" ? r.class = (r.class ? r.class + " " : "") + a : l == "style" ? r.style = (r.style ? r.style + ";" : "") + a : l != "nodeName" && (r[l] = a));
6916
+ a != null && (t && i.length == 1 && i.push(r = new Dt(e.isInline ? "span" : "div")), l == "class" ? r.class = (r.class ? r.class + " " : "") + a : l == "style" ? r.style = (r.style ? r.style + ";" : "") + a : l != "nodeName" && (r[l] = a));
6917
6917
  }
6918
6918
  }
6919
6919
  }
@@ -7402,7 +7402,7 @@ function Vi(n, e, t) {
7402
7402
  function yn(n) {
7403
7403
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
7404
7404
  }
7405
- function Dt(n, e) {
7405
+ function It(n, e) {
7406
7406
  let t = n.pmViewDesc;
7407
7407
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
7408
7408
  }
@@ -7414,13 +7414,13 @@ function nc(n) {
7414
7414
  if (!t)
7415
7415
  return;
7416
7416
  let i, s, o = !1;
7417
- for (pe && t.nodeType == 1 && r < yn(t) && Dt(t.childNodes[r], -1) && (o = !0); ; )
7417
+ for (pe && t.nodeType == 1 && r < yn(t) && It(t.childNodes[r], -1) && (o = !0); ; )
7418
7418
  if (r > 0) {
7419
7419
  if (t.nodeType != 1)
7420
7420
  break;
7421
7421
  {
7422
7422
  let l = t.childNodes[r - 1];
7423
- if (Dt(l, -1))
7423
+ if (It(l, -1))
7424
7424
  i = t, s = --r;
7425
7425
  else if (l.nodeType == 3)
7426
7426
  t = l, r = t.nodeValue.length;
@@ -7432,7 +7432,7 @@ function nc(n) {
7432
7432
  break;
7433
7433
  {
7434
7434
  let l = t.previousSibling;
7435
- for (; l && Dt(l, -1); )
7435
+ for (; l && It(l, -1); )
7436
7436
  i = t.parentNode, s = K(l), l = l.previousSibling;
7437
7437
  if (l)
7438
7438
  t = l, r = yn(t);
@@ -7455,7 +7455,7 @@ function rc(n) {
7455
7455
  if (t.nodeType != 1)
7456
7456
  break;
7457
7457
  let l = t.childNodes[r];
7458
- if (Dt(l, 1))
7458
+ if (It(l, 1))
7459
7459
  s = t, o = ++r;
7460
7460
  else
7461
7461
  break;
@@ -7464,7 +7464,7 @@ function rc(n) {
7464
7464
  break;
7465
7465
  {
7466
7466
  let l = t.nextSibling;
7467
- for (; l && Dt(l, 1); )
7467
+ for (; l && It(l, 1); )
7468
7468
  s = l.parentNode, o = K(l) + 1, l = l.nextSibling;
7469
7469
  if (l)
7470
7470
  t = l, r = 0, i = yn(t);
@@ -7856,7 +7856,7 @@ function xc(n, e) {
7856
7856
  te.keydown = (n, e) => {
7857
7857
  let t = e;
7858
7858
  if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Eo(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ee && U && t.keyCode == 13)))
7859
- if (t.keyCode != 229 && n.domObserver.forceFlush(), xt && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7859
+ if (t.keyCode != 229 && n.domObserver.forceFlush(), St && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7860
7860
  let r = Date.now();
7861
7861
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
7862
7862
  n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Je(13, "Enter"))), n.input.lastIOSEnter = 0);
@@ -8102,7 +8102,7 @@ function Rc(n, e) {
8102
8102
  t.parentNode && t.parentNode.removeChild(t), n.focus();
8103
8103
  }, 50);
8104
8104
  }
8105
- const zt = ie && $e < 15 || xt && va < 604;
8105
+ const zt = ie && $e < 15 || St && va < 604;
8106
8106
  ee.copy = te.cut = (n, e) => {
8107
8107
  let t = e, r = n.state.selection, i = t.type == "cut";
8108
8108
  if (r.empty)
@@ -8839,9 +8839,9 @@ class qc {
8839
8839
  if (!e.focusNode)
8840
8840
  return !0;
8841
8841
  let t = /* @__PURE__ */ new Set(), r;
8842
- for (let s = e.focusNode; s; s = kt(s))
8842
+ for (let s = e.focusNode; s; s = xt(s))
8843
8843
  t.add(s);
8844
- for (let s = e.anchorNode; s; s = kt(s))
8844
+ for (let s = e.anchorNode; s; s = xt(s))
8845
8845
  if (t.has(s)) {
8846
8846
  r = s;
8847
8847
  break;
@@ -9046,7 +9046,7 @@ function Xc(n, e, t, r, i) {
9046
9046
  let a = n.state.selection, c = _c(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9047
9047
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
9048
9048
  let p = ed(u.content, c.doc.content, c.from, f, h);
9049
- if (p && n.input.domChangeCount++, (xt && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !Yc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Je(13, "Enter")))) {
9049
+ if (p && n.input.domChangeCount++, (St && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !Yc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Je(13, "Enter")))) {
9050
9050
  n.input.lastIOSEnter = 0;
9051
9051
  return;
9052
9052
  }
@@ -9065,7 +9065,7 @@ function Xc(n, e, t, r, i) {
9065
9065
  }
9066
9066
  n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof M && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), ie && $e <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
9067
9067
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), T = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
9068
- if ((xt && n.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (C) => C(n, Je(13, "Enter")))) {
9068
+ if ((St && n.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (C) => C(n, Je(13, "Enter")))) {
9069
9069
  n.input.lastIOSEnter = 0;
9070
9070
  return;
9071
9071
  }
@@ -9714,19 +9714,19 @@ const $o = (n, e, t) => {
9714
9714
  return !1;
9715
9715
  let i = Gr(r);
9716
9716
  if (!i) {
9717
- let o = r.blockRange(), l = o && Mt(o);
9717
+ let o = r.blockRange(), l = o && wt(o);
9718
9718
  return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
9719
9719
  }
9720
9720
  let s = i.nodeBefore;
9721
9721
  if (_o(n, i, e, -1))
9722
9722
  return !0;
9723
- if (r.parent.content.size == 0 && (St(s, "end") || S.isSelectable(s)))
9723
+ if (r.parent.content.size == 0 && (Mt(s, "end") || S.isSelectable(s)))
9724
9724
  for (let o = r.depth; ; o--) {
9725
9725
  let l = Dn(n.doc, r.before(o), r.after(o), k.empty);
9726
9726
  if (l && l.slice.size < l.to - l.from) {
9727
9727
  if (e) {
9728
9728
  let a = n.tr.step(l);
9729
- a.setSelection(St(s, "end") ? E.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9729
+ a.setSelection(Mt(s, "end") ? E.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9730
9730
  }
9731
9731
  return !0;
9732
9732
  }
@@ -9775,7 +9775,7 @@ function Vo(n, e, t) {
9775
9775
  }
9776
9776
  return !0;
9777
9777
  }
9778
- function St(n, e, t = !1) {
9778
+ function Mt(n, e, t = !1) {
9779
9779
  for (let r = n; r; r = e == "start" ? r.firstChild : r.lastChild) {
9780
9780
  if (r.isTextblock)
9781
9781
  return !0;
@@ -9820,12 +9820,12 @@ const qo = (n, e, t) => {
9820
9820
  let s = i.nodeAfter;
9821
9821
  if (_o(n, i, e, 1))
9822
9822
  return !0;
9823
- if (r.parent.content.size == 0 && (St(s, "start") || S.isSelectable(s))) {
9823
+ if (r.parent.content.size == 0 && (Mt(s, "start") || S.isSelectable(s))) {
9824
9824
  let o = Dn(n.doc, r.before(), r.after(), k.empty);
9825
9825
  if (o && o.slice.size < o.to - o.from) {
9826
9826
  if (e) {
9827
9827
  let l = n.tr.step(o);
9828
- l.setSelection(St(s, "start") ? E.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9828
+ l.setSelection(Mt(s, "start") ? E.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9829
9829
  }
9830
9830
  return !0;
9831
9831
  }
@@ -9877,7 +9877,7 @@ const hd = (n, e) => {
9877
9877
  return !1;
9878
9878
  return e && e(n.tr.join(r).scrollIntoView()), !0;
9879
9879
  }, md = (n, e) => {
9880
- let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && Mt(i);
9880
+ let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && wt(i);
9881
9881
  return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
9882
9882
  }, Ko = (n, e) => {
9883
9883
  let { $head: t, $anchor: r } = n.selection;
@@ -9925,7 +9925,7 @@ const gd = (n, e) => {
9925
9925
  if (ve(n.doc, s))
9926
9926
  return e && e(n.tr.split(s).scrollIntoView()), !0;
9927
9927
  }
9928
- let r = t.blockRange(), i = r && Mt(r);
9928
+ let r = t.blockRange(), i = r && wt(r);
9929
9929
  return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
9930
9930
  };
9931
9931
  function yd(n) {
@@ -9981,10 +9981,10 @@ function _o(n, e, t, r) {
9981
9981
  }
9982
9982
  return !0;
9983
9983
  }
9984
- let d = s.type.spec.isolating || r > 0 && a ? null : E.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && Mt(u);
9984
+ let d = s.type.spec.isolating || r > 0 && a ? null : E.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && wt(u);
9985
9985
  if (f != null && f >= e.depth)
9986
9986
  return t && t(n.tr.lift(u, f).scrollIntoView()), !0;
9987
- if (c && St(s, "start", !0) && St(i, "end")) {
9987
+ if (c && Mt(s, "start", !0) && Mt(i, "end")) {
9988
9988
  let h = i, p = [];
9989
9989
  for (; p.push(h), !h.isTextblock; )
9990
9990
  h = h.lastChild;
@@ -10106,7 +10106,7 @@ function Ed(n) {
10106
10106
  function vd(n, e, t, r) {
10107
10107
  let i = n.tr, s = r.end, o = r.$to.end(r.depth);
10108
10108
  s < o && (i.step(new F(s - 1, o, s, o, new k(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new pn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
10109
- const l = Mt(r);
10109
+ const l = wt(r);
10110
10110
  if (l == null)
10111
10111
  return !1;
10112
10112
  i.lift(r, l);
@@ -11096,7 +11096,7 @@ const Jd = _.create({
11096
11096
  const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
11097
11097
  if (!h)
11098
11098
  return;
11099
- const p = Mt(h);
11099
+ const p = wt(h);
11100
11100
  if (l.type.isTextblock) {
11101
11101
  const { defaultType: m } = u.parent.contentMatchAt(u.index());
11102
11102
  e.setNodeMarkup(h.start, m);
@@ -14536,10 +14536,10 @@ Ir = function() {
14536
14536
  r && (r.style.display = t ? "none" : "flex");
14537
14537
  }
14538
14538
  }, hl = function() {
14539
- const t = It.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
14539
+ const t = bt.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
14540
14540
  this.shadowRoot.innerHTML = `
14541
14541
  <style>
14542
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.36/dist/css/nineEditor.css";
14542
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.38/dist/css/nineEditor.css";
14543
14543
  ${r}
14544
14544
  </style>
14545
14545
 
@@ -14645,16 +14645,16 @@ const xs = {
14645
14645
  confirm: window.confirm
14646
14646
  }, Ss = () => {
14647
14647
  const { nativeOverride: n } = cr.config.ux || {}, e = Array.isArray(n) ? n : n === !0 ? ["alert", "confirm"] : [];
14648
- window.alert = e.includes("alert") ? (t) => It.alert(t) : xs.alert, window.confirm = e.includes("confirm") ? async (t) => await It.confirm(t) : xs.confirm, cr.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14648
+ console.log(e), window.alert = e.includes("alert") ? (t) => bt.alert(t) : xs.alert, window.confirm = e.includes("confirm") ? async (t) => await bt.confirm(t) : xs.confirm, cr.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14649
14649
  }, Rh = () => {
14650
14650
  Ss(), xl((n) => {
14651
14651
  (n === "ux" || n === "config") && Ss();
14652
14652
  });
14653
14653
  };
14654
14654
  Rh();
14655
- typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Ih));
14655
+ typeof window < "u" && (window.nineUx = bt, customElements.get("nine-editor") || customElements.define("nine-editor", Ih));
14656
14656
  export {
14657
14657
  Ih as nineEditor,
14658
- It as nineUx
14658
+ bt as nineUx
14659
14659
  };
14660
14660
  //# sourceMappingURL=nine-ux.es.js.map