@mx-space/cli 0.14.1 → 0.14.2

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 (52) hide show
  1. package/dist/{Lexical.dev-DTxuYHmG.mjs → Lexical.dev-CtGmYDoh.mjs} +770 -271
  2. package/dist/{Lexical.node-BlCLnfA6.mjs → Lexical.node-8sRFmq2X.mjs} +15 -5
  3. package/dist/Lexical.prod-D-VfeKDz.mjs +7200 -0
  4. package/dist/{LexicalClipboard.dev-CdFkLR_D.mjs → LexicalClipboard.dev-CzQ15z6E.mjs} +6 -6
  5. package/dist/{LexicalClipboard.node-ktUajxsv.mjs → LexicalClipboard.node-D4gMGws6.mjs} +2 -2
  6. package/dist/{LexicalClipboard.prod-DliyLofW.mjs → LexicalClipboard.prod-CltkQpzS.mjs} +10 -8
  7. package/dist/{LexicalCodeCore.dev-CL9tHWJX.mjs → LexicalCodeCore.dev-DkYBZRGB.mjs} +11 -9
  8. package/dist/{LexicalCodeCore.prod-BoMSJc29.mjs → LexicalCodeCore.prod-COc3_QL8.mjs} +178 -167
  9. package/dist/{LexicalDragon.dev-CqW7Aq5H.mjs → LexicalDragon.dev-Dv5_WUae.mjs} +3 -3
  10. package/dist/{LexicalDragon.node-DLXctJyy.mjs → LexicalDragon.node-DgjrmWkd.mjs} +2 -2
  11. package/dist/{LexicalDragon.prod-DHI3T6n5.mjs → LexicalDragon.prod-DnpbDe-_.mjs} +5 -4
  12. package/dist/{LexicalExtension.dev-BP-18zns.mjs → LexicalExtension.dev-JMH_6-OZ.mjs} +73 -52
  13. package/dist/{LexicalExtension.node-BWH6xbzG.mjs → LexicalExtension.node-BUozzx4t.mjs} +4 -2
  14. package/dist/{LexicalExtension.prod-Cs6OgrDn.mjs → LexicalExtension.prod-UiyDgmou.mjs} +370 -347
  15. package/dist/{LexicalHeadless.dev-DJp__UcP.mjs → LexicalHeadless.dev-BfLGciiX.mjs} +2 -2
  16. package/dist/{LexicalHeadless.prod-o0v9cIu5.mjs → LexicalHeadless.prod-CWF7edmQ.mjs} +2 -2
  17. package/dist/{LexicalHtml.dev-DoymwFpG.mjs → LexicalHtml.dev-D5EF5PGW.mjs} +13 -11
  18. package/dist/{LexicalHtml.node-CVkbWtUA.mjs → LexicalHtml.node-BYbzHNVe.mjs} +4 -4
  19. package/dist/{LexicalHtml.prod-C2b3z99k.mjs → LexicalHtml.prod-D_FfkvVD.mjs} +330 -299
  20. package/dist/{LexicalLink.dev-7cgLOLIe.mjs → LexicalLink.dev-D3Pgh6ik.mjs} +53 -23
  21. package/dist/{LexicalLink.prod-DWFgoXHR.mjs → LexicalLink.prod-XZoAYVYD.mjs} +217 -198
  22. package/dist/{LexicalList.dev-Ci2iOxFx.mjs → LexicalList.dev-B5d3ObhB.mjs} +49 -44
  23. package/dist/LexicalList.prod-OQDpVAEb.mjs +967 -0
  24. package/dist/{LexicalMarkdown.dev-C0ZYCyuR.mjs → LexicalMarkdown.dev-BkM8G3DG.mjs} +61 -42
  25. package/dist/{LexicalMarkdown.prod-0M-Nc-rh.mjs → LexicalMarkdown.prod-DcVXCex6.mjs} +254 -202
  26. package/dist/{LexicalRichText.dev-Cnr1kDym.mjs → LexicalRichText.dev-DppD7IrA.mjs} +337 -52
  27. package/dist/{LexicalRichText.node-BUJZAiap.mjs → LexicalRichText.node-CPSn7dkg.mjs} +12 -8
  28. package/dist/LexicalRichText.prod-h7JPxFNp.mjs +718 -0
  29. package/dist/{LexicalSelection.dev-C4L7l8OB.mjs → LexicalSelection.dev-CD0SLbxP.mjs} +48 -17
  30. package/dist/{LexicalSelection.node-CLKroUMQ.mjs → LexicalSelection.node-CGlJgUlZ.mjs} +5 -4
  31. package/dist/{LexicalSelection.prod-DzFqpTlw.mjs → LexicalSelection.prod-DbVZN5AV.mjs} +101 -92
  32. package/dist/{LexicalTable.dev-Cc9-zqKa.mjs → LexicalTable.dev-D0HU14UV.mjs} +340 -138
  33. package/dist/LexicalTable.prod-BcPNSrxP.mjs +2468 -0
  34. package/dist/{LexicalUtils.dev-BRgK0L6G.mjs → LexicalUtils.dev-iKy_TrRT.mjs} +15 -19
  35. package/dist/{LexicalUtils.node-BVAwOkL4.mjs → LexicalUtils.node-CIgMS8cG.mjs} +6 -6
  36. package/dist/{LexicalUtils.prod-C1gtvVDP.mjs → LexicalUtils.prod-DIAsKJzu.mjs} +155 -159
  37. package/dist/bin/mxs.mjs +1 -1
  38. package/dist/esm-CH7CrOvh.mjs +2 -0
  39. package/dist/{esm-BNu4sUWV.mjs → esm-CwXl1N0a.mjs} +1801 -6013
  40. package/dist/index.d.mts +57 -62
  41. package/dist/index.mjs +1 -1
  42. package/dist/{mxs-CMX2yklg.mjs → mxs-iW9DgqSZ.mjs} +14930 -9234
  43. package/dist/rolldown-runtime-JspESFgx.mjs +35 -0
  44. package/dist/vendor/litexml/cli.mjs +6693 -5762
  45. package/dist/vendor/litexml/litexml-html-preview-client.js +11912 -8698
  46. package/package.json +31 -30
  47. package/LICENSE +0 -33
  48. package/dist/Lexical.prod-CeB9UQuo.mjs +0 -6816
  49. package/dist/LexicalList.prod-D0xX5d3G.mjs +0 -944
  50. package/dist/LexicalRichText.prod-BfbMQ9uM.mjs +0 -538
  51. package/dist/LexicalTable.prod-BgO4nCxy.mjs +0 -2336
  52. package/dist/esm-jbwcVZth.mjs +0 -2
@@ -1,6 +1,6 @@
1
- import { $ as $insertNodeToNearestRootAtCaret, A as $getChildCaret, An as IS_FIREFOX, Bt as CAN_USE_DOM, C as $getAdjacentChildCaret, Cn as IS_ANDROID, Ct as $normalizeCaret, D as $getCaretRange, Dt as $rewindSiblingCaret, E as $getCaretInDirection, En as IS_APPLE_WEBKIT, Er as getDOMSelectionPoints, Et as $removeTextFromCaretRange, F as $getDOMTextNode, Ft as $splitAtPointCaretNext, G as $getSiblingCaret, H as $getPreviousSelection, It as $splitNode, J as $getSlotHost, K as $getSlot, Kr as isHTMLAnchorElement, M as $getChildCaretOrSelf, Mn as IS_IOS, Mr as getParentElement, Mt as $setSelection, N as $getCollapsedCaretRange, Nt as $setSelectionFromCaretRange, O as $getCaretRangeInDirection, On as IS_CHROME, P as $getDOMSlot, Pn as IS_SAFARI, Pt as $setState, Rr as isBlockDomNode, T as $getAdjacentSiblingOrParentSiblingCaret, Tn as IS_APPLE, U as $getRoot, W as $getSelection, X as $getState, Y as $getSlotNames, Yr as isInlineDomNode, _t as $isSiblingCaret, a as $caretRangeFromSelection, at as $isElementNode, b as $findMatchingParent, bt as $isTextNode, c as $comparePointCaretNext, i as $caretFromPoint, ii as removeClassNamesFromElement, kr as getDOMTextNode, ni as mergeRegister, nt as $isChildCaret, o as $cloneWithProperties, p as $createParagraphNode, pr as addClassNamesToElement, pt as $isRangeSelection, q as $getSlotFrame, qr as isHTMLElement, ti as makeStepwiseIterator, vt as $isSlotHost, wn as IS_ANDROID_CHROME, x as $fullReconcile, xt as $isTextPointCaret, zt as CAN_USE_BEFORE_INPUT } from "./Lexical.node-BlCLnfA6.mjs";
2
- import { o as createRectsFromDOMRange, t as $isAtNodeEnd } from "./LexicalSelection.node-CLKroUMQ.mjs";
3
- //#region ../../node_modules/.pnpm/@lexical+utils@0.46.0_typescript@6.0.3/node_modules/@lexical/utils/dist/LexicalUtils.prod.mjs
1
+ import { $r as isHTMLElement, A as $getChildCaret, An as IS_APPLE_WEBKIT, At as $rewindSiblingCaret, Br as getRootOwnerDocument, Bt as $splitNode, Ct as $isTextPointCaret, D as $getCaretRange, Dn as IS_ANDROID, E as $getCaretInDirection, Et as $normalizeCaret, F as $getDOMTextNode, Fr as getDOMTextNode, Ft as $setSelection, G as $getSelection, In as IS_IOS, It as $setSelectionFromCaretRange, J as $getSlotFrame, K as $getSiblingCaret, Lt as $setState, M as $getChildCaretOrSelf, Mn as IS_CHROME, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, On as IS_ANDROID_CHROME, P as $getDOMSlot, Pn as IS_FIREFOX, Qr as isHTMLAnchorElement, Rn as IS_SAFARI, Rr as getParentElement, S as $fullReconcile, St as $isTextNode, T as $getAdjacentSiblingOrParentSiblingCaret, U as $getPreviousSelection, Ut as CAN_USE_BEFORE_INPUT, W as $getRoot, Wr as isBlockDomNode, Wt as CAN_USE_DOM, X as $getSlotNames, Y as $getSlotHost, Z as $getState, a as $caretRangeFromSelection, b as $findMatchingParent, bt as $isSlotHost, c as $comparePointCaretNext, ci as mergeRegister, et as $insertNodeToNearestRootAtCaret, fi as removeClassNamesFromElement, i as $caretFromPoint, kn as IS_APPLE, kt as $removeTextFromCaretRange, mt as $isRangeSelection, o as $cloneWithProperties, ot as $isElementNode, p as $createParagraphNode, q as $getSlot, rt as $isChildCaret, si as makeStepwiseIterator, ti as isInlineDomNode, ui as registerEventListener, vr as addClassNamesToElement, w as $getAdjacentChildCaret, yt as $isSiblingCaret, zt as $splitAtPointCaretNext } from "./Lexical.node-8sRFmq2X.mjs";
2
+ import { o as createRectsFromDOMRange, t as $isAtEdgeOfElement } from "./LexicalSelection.node-CGlJgUlZ.mjs";
3
+ //#region ../../node_modules/.pnpm/@lexical+utils@0.48.0_typescript@6.0.3/node_modules/@lexical/utils/dist/LexicalUtils.prod.mjs
4
4
  /**
5
5
  * Copyright (c) Meta Platforms, Inc. and affiliates.
6
6
  *
@@ -8,13 +8,13 @@ import { o as createRectsFromDOMRange, t as $isAtNodeEnd } from "./LexicalSelect
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  *
10
10
  */
11
- function J(t, ...e) {
11
+ function Z(t, ...e) {
12
12
  const n = new URL("https://lexical.dev/docs/error"), o = new URLSearchParams();
13
13
  o.append("code", t);
14
14
  for (const t of e) o.append("v", t);
15
15
  throw n.search = o.toString(), Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
16
16
  }
17
- function Q(t) {
17
+ function tt(t) {
18
18
  const e = (t, e) => e.left >= t.left - 1 && e.top >= t.top - 1 && e.right <= t.right + 1 && e.bottom <= t.bottom + 1, n = [];
19
19
  for (const o of Array.from(t)) if (!(o.width < .5 || o.height < .5 || n.some((t) => e(o, t)))) {
20
20
  for (let t = n.length - 1; t >= 0; t--) e(n[t], o) && n.splice(t, 1);
@@ -22,113 +22,113 @@ function Q(t) {
22
22
  }
23
23
  return n;
24
24
  }
25
- function Z(t) {
25
+ function et(t) {
26
26
  return `${t}px`;
27
27
  }
28
- const tt = {
28
+ const nt = {
29
29
  attributes: !0,
30
30
  characterData: !0,
31
31
  childList: !0,
32
32
  subtree: !0
33
33
  };
34
- function et(e, o, r) {
35
- let i = null, l = null, s = null, u = [];
36
- const c = document.createElement("div");
37
- function f() {
38
- null === i && J(182), null === l && J(183);
39
- const { left: n, top: s } = l.getBoundingClientRect(), f = Q(createRectsFromDOMRange(e, o));
40
- var d, a;
41
- c.isConnected || (a = c, (d = l).insertBefore(a, d.firstChild));
42
- let g = !1;
43
- for (let t = 0; t < f.length; t++) {
44
- const e = f[t], o = u[t] || document.createElement("div"), r = o.style;
45
- "absolute" !== r.position && (r.position = "absolute", g = !0);
46
- const i = Z(e.left - n);
47
- r.left !== i && (r.left = i, g = !0);
48
- const l = Z(e.top - s);
49
- r.top !== l && (o.style.top = l, g = !0);
50
- const d = Z(e.width);
51
- r.width !== d && (o.style.width = d, g = !0);
52
- const a = Z(e.height);
53
- r.height !== a && (o.style.height = a, g = !0), o.parentNode !== c && (c.append(o), g = !0), u[t] = o;
34
+ function ot(e, r, i) {
35
+ let l = null, s = null, u = null, c = [];
36
+ const f = getRootOwnerDocument(e.getRootElement()).createElement("div");
37
+ function d() {
38
+ null === l && Z(182), null === s && Z(183);
39
+ const { left: o, top: u } = s.getBoundingClientRect(), d = tt(createRectsFromDOMRange(e, r));
40
+ var a, g;
41
+ f.isConnected || (g = f, (a = s).insertBefore(g, a.firstChild));
42
+ let p = !1;
43
+ for (let t = 0; t < d.length; t++) {
44
+ const e = d[t], r = c[t] || getRootOwnerDocument(l).createElement("div"), i = r.style;
45
+ "absolute" !== i.position && (i.position = "absolute", p = !0);
46
+ const s = et(e.left - o);
47
+ i.left !== s && (i.left = s, p = !0);
48
+ const a = et(e.top - u);
49
+ i.top !== a && (r.style.top = a, p = !0);
50
+ const g = et(e.width);
51
+ i.width !== g && (r.style.width = g, p = !0);
52
+ const h = et(e.height);
53
+ i.height !== h && (r.style.height = h, p = !0), r.parentNode !== f && (f.append(r), p = !0), c[t] = r;
54
54
  }
55
- for (; u.length > f.length;) u.pop();
56
- g && r(u);
55
+ for (; c.length > d.length;) c.pop()?.remove();
56
+ p && i(c);
57
57
  }
58
- function d() {
59
- l = null, i = null, null !== s && s.disconnect(), s = null, c.remove();
60
- for (const t of u) t.remove();
61
- u = [];
58
+ function a() {
59
+ s = null, l = null, null !== u && u.disconnect(), u = null, f.remove();
60
+ for (const t of c) t.remove();
61
+ c = [];
62
62
  }
63
- c.style.position = "relative";
64
- const a = e.registerRootListener(function t() {
65
- const o = e.getRootElement();
66
- if (null === o) return d();
67
- const r = o.parentElement;
68
- if (!isHTMLElement(r)) return d();
69
- d(), i = o, l = r, s = new MutationObserver((n) => {
63
+ f.style.position = "relative";
64
+ const g = e.registerRootListener(function t() {
65
+ const n = e.getRootElement();
66
+ if (null === n) return a();
67
+ const r = n.parentElement;
68
+ if (!isHTMLElement(r)) return a();
69
+ a(), l = n, s = r, u = new MutationObserver((n) => {
70
70
  const o = e.getRootElement(), r = o && o.parentElement;
71
- if (o !== i || r !== l) return t();
72
- for (const t of n) if (!c.contains(t.target)) return f();
73
- }), s.observe(r, tt), f();
71
+ if (o !== l || r !== s) return t();
72
+ for (const t of n) if (!f.contains(t.target)) return d();
73
+ }), u.observe(r, nt), d();
74
74
  });
75
75
  return () => {
76
- a(), d();
76
+ g(), a();
77
77
  };
78
78
  }
79
- function nt(t, e, n, o) {
79
+ function rt(t, e, n, o) {
80
80
  if ("text" !== e.type && $isElementNode(n)) {
81
81
  const r = $getDOMSlot(n, o, t);
82
82
  return [r.element, r.getFirstChildOffset() + e.offset];
83
83
  }
84
84
  return [($isTextNode(n) ? $getDOMTextNode(n, o, t) : getDOMTextNode(o)) || o, e.offset];
85
85
  }
86
- function ot(t) {
86
+ function it(t) {
87
87
  for (const e of t) {
88
88
  const t = e.style;
89
- "Highlight" !== t.background && (t.background = "Highlight"), "HighlightText" !== t.color && (t.color = "HighlightText"), t.marginTop !== Z(-1.5) && (t.marginTop = Z(-1.5)), t.paddingTop !== Z(4) && (t.paddingTop = Z(4)), t.paddingBottom !== Z(0) && (t.paddingBottom = Z(0));
89
+ "Highlight" !== t.background && (t.background = "Highlight"), "HighlightText" !== t.color && (t.color = "HighlightText"), t.marginTop !== et(-1.5) && (t.marginTop = et(-1.5)), t.paddingTop !== et(4) && (t.paddingTop = et(4)), t.paddingBottom !== et(0) && (t.paddingBottom = et(0));
90
90
  }
91
91
  }
92
- function rt(t, e = ot) {
93
- let n = null, l = null, s = null, u = null, c = null, f = null, d = () => {};
94
- function a(o) {
95
- o.read(() => {
96
- const o = $getSelection();
97
- if (!$isRangeSelection(o)) return n = null, s = null, u = null, f = null, d(), void (d = () => {});
92
+ function lt(t, e = it) {
93
+ let n = null, o = null, s = null, u = null, c = null, f = null, d = () => {};
94
+ function a(r) {
95
+ r.read(() => {
96
+ const r = $getSelection();
97
+ if (!$isRangeSelection(r)) return n = null, s = null, u = null, f = null, d(), void (d = () => {});
98
98
  const [a, g] = function(t) {
99
99
  const e = t.getStartEndPoints();
100
100
  return t.isBackward() ? [e[1], e[0]] : e;
101
- }(o), p = a.getNode(), h = p.getKey(), m = a.offset, y = g.getNode(), v = y.getKey(), E = g.offset, w = t.getElementByKey(h), C = t.getElementByKey(v), S = null === n || w !== l || m !== s || h !== n.getKey(), x = null === u || C !== c || E !== f || v !== u.getKey();
102
- if ((S || x) && null !== w && null !== C) {
101
+ }(r), p = a.getNode(), h = p.getKey(), m = a.offset, y = g.getNode(), v = y.getKey(), E = g.offset, w = t.getElementByKey(h), C = t.getElementByKey(v), x = null === n || w !== o || m !== s || h !== n.getKey(), S = null === u || C !== c || E !== f || v !== u.getKey();
102
+ if ((x || S) && null !== w && null !== C) {
103
103
  const n = function(t, e, n, o, r, i, l) {
104
104
  const s = (t._window ? t._window.document : document).createRange();
105
- return s.setStart(...nt(t, e, n, o)), s.setEnd(...nt(t, r, i, l)), s;
105
+ return s.setStart(...rt(t, e, n, o)), s.setEnd(...rt(t, r, i, l)), s;
106
106
  }(t, a, p, w, g, y, C);
107
- d(), d = et(t, n, e);
107
+ d(), d = ot(t, n, e);
108
108
  }
109
- n = p, l = w, s = m, u = y, c = C, f = E;
109
+ n = p, o = w, s = m, u = y, c = C, f = E;
110
110
  }, { editor: t });
111
111
  }
112
112
  return a(t.getEditorState()), mergeRegister(t.registerUpdateListener(({ editorState: t }) => a(t)), () => {
113
113
  d();
114
114
  });
115
115
  }
116
- function it(t, e) {
116
+ function st(t, e) {
117
117
  let n = null;
118
118
  const o = () => {
119
119
  const o = t.getRootElement(), r = null !== o ? o.ownerDocument.defaultView : null, i = null !== r ? r.getSelection() : null, l = null !== i ? getDOMSelectionPoints(i, o).anchorNode : null;
120
- null !== l && null !== o && o.contains(l) ? null !== n && (n(), n = null) : null === n && (n = rt(t, e));
120
+ null !== l && null !== o && o.contains(l) ? null !== n && (n(), n = null) : null === n && (n = lt(t, e));
121
121
  };
122
122
  return t.registerRootListener((t) => {
123
123
  if (t) {
124
- const e = t.ownerDocument;
125
- return e.addEventListener("selectionchange", o), o(), () => {
126
- null !== n && n(), e.removeEventListener("selectionchange", o);
127
- };
124
+ const e = t.ownerDocument, i = mergeRegister(registerEventListener(e, "selectionchange", o), () => {
125
+ null !== n && n();
126
+ });
127
+ return o(), i;
128
128
  }
129
129
  });
130
130
  }
131
- function lt(t, e) {
131
+ function ut(t, e) {
132
132
  const n = t.ownerDocument, o = n.defaultView || window;
133
133
  let r = o.getComputedStyle(t);
134
134
  const i = "absolute" === r.position, l = e ? /(auto|scroll|hidden)/ : /(auto|scroll)/;
@@ -136,11 +136,11 @@ function lt(t, e) {
136
136
  for (let e = t; e = getParentElement(e);) if (r = o.getComputedStyle(e), (!i || "static" !== r.position) && l.test(r.overflow + r.overflowY + r.overflowX)) return e;
137
137
  return n.body;
138
138
  }
139
- function st(t, e) {
139
+ function ct(t, e) {
140
140
  for (const n of e) if (t.type.startsWith(n)) return !0;
141
141
  return !1;
142
142
  }
143
- function ut(t, e) {
143
+ function ft(t, e) {
144
144
  const n = t[Symbol.iterator]();
145
145
  return new Promise((t, o) => {
146
146
  const r = [], i = () => {
@@ -153,37 +153,37 @@ function ut(t, e) {
153
153
  file: s,
154
154
  result: t
155
155
  }), i();
156
- }), st(s, e) ? u.readAsDataURL(s) : i();
156
+ }), ct(s, e) ? u.readAsDataURL(s) : i();
157
157
  };
158
158
  i();
159
159
  });
160
160
  }
161
- function ct(t, e) {
162
- return Array.from(at(t, e));
161
+ function dt(t, e) {
162
+ return Array.from(pt(t, e));
163
163
  }
164
- function ft(t) {
164
+ function at(t) {
165
165
  return t ? t.getAdjacentCaret() : null;
166
166
  }
167
- function dt(t, e) {
168
- return Array.from(Ct(t, e));
167
+ function gt(t, e) {
168
+ return Array.from(St(t, e));
169
169
  }
170
- function at(t, e) {
171
- return yt("next", t, e);
170
+ function pt(t, e) {
171
+ return Et("next", t, e);
172
172
  }
173
- function gt(t, e) {
174
- return Array.from(pt(t, e));
173
+ function ht(t, e) {
174
+ return Array.from(mt(t, e));
175
175
  }
176
- function* pt(t, e) {
177
- for (const n of yt("next", t, e)) {
176
+ function* mt(t, e) {
177
+ for (const n of Et("next", t, e)) {
178
178
  yield n;
179
179
  const { node: t, depth: o } = n;
180
180
  if ($isSlotHost(t) && !t.is(e)) for (const e of $getSlotNames(t)) {
181
181
  const n = $getSlot(t, e);
182
- null !== n && (yield* ht(n, o + 1));
182
+ null !== n && (yield* yt(n, o + 1));
183
183
  }
184
184
  }
185
185
  }
186
- function* ht(t, e) {
186
+ function* yt(t, e) {
187
187
  yield {
188
188
  depth: e,
189
189
  node: t
@@ -191,17 +191,17 @@ function* ht(t, e) {
191
191
  const n = e + 1;
192
192
  if ($isSlotHost(t)) for (const e of $getSlotNames(t)) {
193
193
  const o = $getSlot(t, e);
194
- null !== o && (yield* ht(o, n));
194
+ null !== o && (yield* yt(o, n));
195
195
  }
196
- if ($isElementNode(t)) for (const e of t.getChildren()) yield* ht(e, n);
196
+ if ($isElementNode(t)) for (const e of t.getChildren()) yield* yt(e, n);
197
197
  }
198
- function mt(t, e) {
198
+ function vt(t, e) {
199
199
  const n = $getAdjacentSiblingOrParentSiblingCaret($getSiblingCaret(t, e));
200
200
  return n && n[0];
201
201
  }
202
- function yt(t, e, n) {
203
- const o = $getRoot(), r = e || o, i = $isElementNode(r) ? $getChildCaret(r, t) : $getSiblingCaret(r, t), s = Et(r), u = n ? $getAdjacentChildCaret($getChildCaretOrSelf($getSiblingCaret(n, t))) || mt(n, t) : mt(r, t);
204
- let c = s;
202
+ function Et(t, e, n) {
203
+ const o = $getRoot(), r = e || o, i = $isElementNode(r) ? $getChildCaret(r, t) : $getSiblingCaret(r, t), l = Ct(r), u = n ? $getAdjacentChildCaret($getChildCaretOrSelf($getSiblingCaret(n, t))) || vt(n, t) : vt(r, t);
204
+ let c = l;
205
205
  return makeStepwiseIterator({
206
206
  hasNext: (t) => null !== t,
207
207
  initial: i,
@@ -217,31 +217,31 @@ function yt(t, e, n) {
217
217
  }
218
218
  });
219
219
  }
220
- function vt(t) {
220
+ function wt(t) {
221
221
  const e = $getAdjacentSiblingOrParentSiblingCaret($getSiblingCaret(t, "next"));
222
222
  return e && [e[0].origin, e[1]];
223
223
  }
224
- function Et(t) {
224
+ function Ct(t) {
225
225
  let e = -1;
226
226
  for (let n = t; null !== n; n = n.getParent() ?? $getSlotHost(n)) e++;
227
227
  return e;
228
228
  }
229
- function wt(t) {
229
+ function xt(t) {
230
230
  const n = $getAdjacentSiblingOrParentSiblingCaret($getChildCaretOrSelf($getSiblingCaret(t, "previous")), "root");
231
231
  return n && n[0].origin;
232
232
  }
233
- function Ct(t, e) {
234
- return yt("previous", t, e);
235
- }
236
233
  function St(t, e) {
237
- return Array.from(xt(t, e));
234
+ return Et("previous", t, e);
238
235
  }
239
- function* xt(t, e) {
236
+ function Nt(t, e) {
237
+ return Array.from(At(t, e));
238
+ }
239
+ function* At(t, e) {
240
240
  const n = [];
241
- for (const o of yt("previous", t, e)) {
241
+ for (const o of Et("previous", t, e)) {
242
242
  for (; n.length > 0 && o.depth <= n[n.length - 1].depth;) {
243
243
  const t = n.pop();
244
- yield* Nt(t.node, t.depth + 1);
244
+ yield* bt(t.node, t.depth + 1);
245
245
  }
246
246
  yield o;
247
247
  const { node: t, depth: r } = o;
@@ -252,17 +252,17 @@ function* xt(t, e) {
252
252
  }
253
253
  for (; n.length > 0;) {
254
254
  const t = n.pop();
255
- yield* Nt(t.node, t.depth + 1);
255
+ yield* bt(t.node, t.depth + 1);
256
256
  }
257
257
  }
258
- function* Nt(t, e) {
258
+ function* bt(t, e) {
259
259
  const n = $getSlotNames(t);
260
260
  for (let o = n.length - 1; o >= 0; o--) {
261
261
  const r = $getSlot(t, n[o]);
262
- null !== r && (yield* At(r, e));
262
+ null !== r && (yield* Rt(r, e));
263
263
  }
264
264
  }
265
- function* At(t, e) {
265
+ function* Rt(t, e) {
266
266
  yield {
267
267
  depth: e,
268
268
  node: t
@@ -270,11 +270,11 @@ function* At(t, e) {
270
270
  const n = e + 1;
271
271
  if ($isElementNode(t)) {
272
272
  const e = t.getChildren();
273
- for (let t = e.length - 1; t >= 0; t--) yield* At(e[t], n);
273
+ for (let t = e.length - 1; t >= 0; t--) yield* Rt(e[t], n);
274
274
  }
275
- $isSlotHost(t) && (yield* Nt(t, n));
275
+ $isSlotHost(t) && (yield* bt(t, n));
276
276
  }
277
- function bt(t, e) {
277
+ function _t(t, e) {
278
278
  let n = t;
279
279
  for (; null != n;) {
280
280
  if (n instanceof e) return n;
@@ -282,17 +282,17 @@ function bt(t, e) {
282
282
  }
283
283
  return null;
284
284
  }
285
- function _t(t) {
285
+ function It(t) {
286
286
  const e = $findMatchingParent(t, (t) => $isElementNode(t) && !t.isInline());
287
- return $isElementNode(e) || J(4, t.__key), e;
287
+ return $isElementNode(e) || Z(4, t.__key), e;
288
288
  }
289
- function Rt(t, e) {
289
+ function Lt(t, e) {
290
290
  const n = $getCaretRangeInDirection($isRangeSelection(e) ? $caretRangeFromSelection(e) : e, "next"), o = $getSlotFrame(n.anchor.origin), r = $getSlotFrame(t.getLatest());
291
291
  if (null === o ? null !== r : !o.is(r)) return !1;
292
- const l = $normalizeCaret($getChildCaret(t, "next")), s = $getCaretInDirection($normalizeCaret($getChildCaret(t, "previous")), "next");
293
- return $comparePointCaretNext(n.anchor, l) <= 0 && $comparePointCaretNext(n.focus, s) >= 0;
292
+ const i = $normalizeCaret($getChildCaret(t, "next")), s = $getCaretInDirection($normalizeCaret($getChildCaret(t, "previous")), "next");
293
+ return $comparePointCaretNext(n.anchor, i) <= 0 && $comparePointCaretNext(n.focus, s) >= 0;
294
294
  }
295
- function Lt(t, e, n, o) {
295
+ function Pt(t, e, n, o) {
296
296
  const r = (t) => t instanceof e;
297
297
  return t.registerNodeTransform(e, (t) => {
298
298
  const e = ((t) => {
@@ -330,7 +330,7 @@ function Dt(t, e) {
330
330
  const r = e._selection;
331
331
  $setSelection(null === r ? null : r.clone());
332
332
  }
333
- function It(t) {
333
+ function Bt(t) {
334
334
  const e = $getSelection() || $getPreviousSelection();
335
335
  let n;
336
336
  if ($isRangeSelection(e)) n = $caretFromPoint(e.focus, "next");
@@ -341,10 +341,10 @@ function It(t) {
341
341
  }
342
342
  n = n || $getChildCaret($getRoot(), "previous").getFlipped().insert($createParagraphNode());
343
343
  }
344
- const o = $insertNodeToNearestRootAtCaret(t, n), l = $getAdjacentChildCaret(o);
345
- return $setSelectionFromCaretRange($getCollapsedCaretRange($isChildCaret(l) ? $normalizeCaret(l) : o)), t.getLatest();
344
+ const o = $insertNodeToNearestRootAtCaret(t, n), r = $getAdjacentChildCaret(o);
345
+ return $setSelectionFromCaretRange($getCollapsedCaretRange($isChildCaret(r) ? $normalizeCaret(r) : o)), t.getLatest();
346
346
  }
347
- function Pt(t) {
347
+ function Ot(t) {
348
348
  const e = $getSelection();
349
349
  if (!$isRangeSelection(e)) return void (e && e.insertNodes([t]));
350
350
  let o = $getCaretRangeInDirection($removeTextFromCaretRange($caretRangeFromSelection(e)), "next").anchor;
@@ -353,19 +353,19 @@ function Pt(t) {
353
353
  if (!t) return;
354
354
  o = t;
355
355
  }
356
- const l = o.getFlipped();
357
- l.insert(t), $setSelectionFromCaretRange($getCaretRange(l, l));
356
+ const r = o.getFlipped();
357
+ r.insert(t), $setSelectionFromCaretRange($getCaretRange(r, r));
358
358
  }
359
- function Bt(t, e) {
359
+ function Tt(t, e) {
360
360
  const n = e();
361
361
  return t.replace(n), n.append(t), n;
362
362
  }
363
- function Ot(t, e) {
363
+ function Mt(t, e) {
364
364
  return null !== t && Object.getPrototypeOf(t).constructor.name === e.name;
365
365
  }
366
- function Tt(t) {
366
+ function Ft(t) {
367
367
  let e = null;
368
- if (Ot(t, DragEvent) ? e = t.dataTransfer : Ot(t, ClipboardEvent) && (e = t.clipboardData), null === e) return [
368
+ if (Mt(t, DragEvent) ? e = t.dataTransfer : Mt(t, ClipboardEvent) && (e = t.clipboardData), null === e) return [
369
369
  !1,
370
370
  [],
371
371
  !1
@@ -377,7 +377,7 @@ function Tt(t) {
377
377
  r
378
378
  ];
379
379
  }
380
- function Ft(t, e) {
380
+ function Kt(t, e) {
381
381
  const n = [];
382
382
  for (let o = 0; o < t.length; o++) {
383
383
  const r = e(t[o]);
@@ -385,64 +385,64 @@ function Ft(t, e) {
385
385
  }
386
386
  return n;
387
387
  }
388
- function Mt(t) {
388
+ function $t(t) {
389
389
  const e = $getSelection();
390
390
  if (!$isRangeSelection(e)) return !1;
391
391
  const n = /* @__PURE__ */ new Set(), o = e.getNodes();
392
392
  for (let e = 0; e < o.length; e++) {
393
393
  const r = o[e], i = r.getKey();
394
394
  if (n.has(i)) continue;
395
- const s = $findMatchingParent(r, (t) => $isElementNode(t) && !t.isInline());
396
- if (null === s) continue;
397
- const u = s.getKey();
398
- s.canIndent() && !n.has(u) && (n.add(u), t(s));
395
+ const l = $findMatchingParent(r, (t) => $isElementNode(t) && !t.isInline());
396
+ if (null === l) continue;
397
+ const u = l.getKey();
398
+ l.canIndent() && !n.has(u) && (n.add(u), t(l));
399
399
  }
400
400
  return n.size > 0;
401
401
  }
402
- function Kt(t, e) {
402
+ function Ht(t, e) {
403
403
  $getChildCaret(t, "next").insert(e);
404
404
  }
405
- let $t = !(IS_FIREFOX || !CAN_USE_DOM) && void 0;
406
- function Ht(t, e = !1) {
405
+ let kt = !(IS_FIREFOX || !CAN_USE_DOM) && void 0;
406
+ function Ut(t, e = !1) {
407
407
  let n = 1;
408
408
  if (function() {
409
- if (void 0 === $t) {
409
+ if (void 0 === kt) {
410
410
  const t = document.createElement("div");
411
411
  t.style.position = "absolute", t.style.opacity = "0", t.style.width = "100px", t.style.left = "-1000px", document.body.appendChild(t);
412
412
  const e = t.getBoundingClientRect();
413
- t.style.setProperty("zoom", "2"), $t = t.getBoundingClientRect().width === e.width, document.body.removeChild(t);
413
+ t.style.setProperty("zoom", "2"), kt = t.getBoundingClientRect().width === e.width, document.body.removeChild(t);
414
414
  }
415
- return $t;
415
+ return kt;
416
416
  }() || e) {
417
417
  const e = t && t.ownerDocument.defaultView || window;
418
418
  for (; t;) n *= Number(e.getComputedStyle(t).getPropertyValue("zoom")), t = getParentElement(t);
419
419
  }
420
420
  return n;
421
421
  }
422
- function kt(t) {
422
+ function jt(t) {
423
423
  return null !== t._parentEditor;
424
424
  }
425
- function Ut(t, e) {
426
- return jt(t, e, null);
425
+ function zt(t, e) {
426
+ return Vt(t, e, null);
427
427
  }
428
- function jt(t, e, n) {
428
+ function Vt(t, e, n) {
429
429
  let o = !1;
430
- for (const r of Wt(t)) e(r) ? null !== n && n(r) : (o = !0, $isElementNode(r) && jt(r, e, n || ((t) => r.insertAfter(t))), r.remove());
430
+ for (const r of Gt(t)) e(r) ? null !== n && n(r) : (o = !0, $isElementNode(r) && Vt(r, e, n || ((t) => r.insertAfter(t))), r.remove());
431
431
  return o;
432
432
  }
433
- function zt(t, e) {
433
+ function Wt(t, e) {
434
434
  const n = [], o = Array.from(t).reverse();
435
435
  for (let t = o.pop(); void 0 !== t; t = o.pop()) if (e(t)) n.push(t);
436
- else if ($isElementNode(t)) for (const e of Wt(t)) o.push(e);
436
+ else if ($isElementNode(t)) for (const e of Gt(t)) o.push(e);
437
437
  return n;
438
438
  }
439
- function Vt(t) {
440
- return Xt($getChildCaret(t, "next"));
439
+ function Xt(t) {
440
+ return Yt($getChildCaret(t, "next"));
441
441
  }
442
- function Wt(t) {
443
- return Xt($getChildCaret(t, "previous"));
442
+ function Gt(t) {
443
+ return Yt($getChildCaret(t, "previous"));
444
444
  }
445
- function Xt(t) {
445
+ function Yt(t) {
446
446
  return makeStepwiseIterator({
447
447
  hasNext: $isSiblingCaret,
448
448
  initial: t.getAdjacentCaret(),
@@ -450,10 +450,10 @@ function Xt(t) {
450
450
  step: (t) => t.getAdjacentCaret()
451
451
  });
452
452
  }
453
- function Gt(t) {
453
+ function qt(t) {
454
454
  $rewindSiblingCaret($getSiblingCaret(t, "next")).splice(1, t.getChildren());
455
455
  }
456
- function Yt(t) {
456
+ function Jt(t) {
457
457
  const e = (e) => $getState(e, t), n = (e, n) => $setState(e, t, n);
458
458
  return {
459
459
  $get: e,
@@ -468,37 +468,33 @@ function Yt(t) {
468
468
  stateConfig: t
469
469
  };
470
470
  }
471
- function qt(t, e) {
471
+ function Qt(t, e) {
472
472
  const n = $getSelection();
473
473
  if ($isRangeSelection(n) && n.isCollapsed()) {
474
474
  const o = $findMatchingParent(n.anchor.getNode(), t);
475
475
  if (o) {
476
476
  const t = o.getParent();
477
- if (null !== t && t.getFirstChild() === o && Qt(n.anchor, o)) return o.insertBefore($createParagraphNode()).selectEnd(), e && e.preventDefault(), !0;
477
+ if (null !== t && t.getFirstChild() === o && te(n.anchor, o)) return o.insertBefore($createParagraphNode()).selectEnd(), e && e.preventDefault(), !0;
478
478
  }
479
479
  }
480
480
  return !1;
481
481
  }
482
- function Jt(t, e) {
482
+ function Zt(t, e) {
483
483
  const n = $getSelection();
484
484
  if ($isRangeSelection(n) && n.isCollapsed()) {
485
485
  const o = $findMatchingParent(n.anchor.getNode(), t);
486
486
  if (o) {
487
487
  const t = o.getParent();
488
- if (null !== t && t.getLastChild() === o && Zt(n.anchor, o)) return o.insertAfter($createParagraphNode()).selectEnd(), e && e.preventDefault(), !0;
488
+ if (null !== t && t.getLastChild() === o && ee(n.anchor, o)) return o.insertAfter($createParagraphNode()).selectEnd(), e && e.preventDefault(), !0;
489
489
  }
490
490
  }
491
491
  return !1;
492
492
  }
493
- function Qt(t, e) {
494
- if (0 !== t.offset) return !1;
495
- const n = e.getFirstDescendant() ?? e, o = t.getNode();
496
- return o === n || $isElementNode(o) && o.getFirstDescendant() === n;
493
+ function te(t, n) {
494
+ return $isAtEdgeOfElement(t, n, "previous");
497
495
  }
498
- function Zt(t, n) {
499
- if (!$isAtNodeEnd(t)) return !1;
500
- const o = n.getLastDescendant() ?? n, r = t.getNode();
501
- return r === o || $isElementNode(r) && r.getLastDescendant() === o;
496
+ function ee(t, n) {
497
+ return $isAtEdgeOfElement(t, n, "next");
502
498
  }
503
499
  //#endregion
504
- export { zt as $descendantsMatching, ct as $dfs, at as $dfsIterator, gt as $dfsWithSlots, pt as $dfsWithSlotsIterator, Ft as $filter, $findMatchingParent, Vt as $firstToLastIterator, ft as $getAdjacentCaret, $getAdjacentSiblingOrParentSiblingCaret, Et as $getDepth, _t as $getNearestBlockElementAncestorOrThrow, bt as $getNearestNodeOfType, wt as $getNextRightPreorderNode, vt as $getNextSiblingOrParentSibling, Mt as $handleIndentAndOutdent, Kt as $insertFirst, Pt as $insertNodeIntoLeaf, It as $insertNodeToNearestRoot, $insertNodeToNearestRootAtCaret, Zt as $isAtEndOfNode, Qt as $isAtStartOfNode, Rt as $isBlockFullySelected, kt as $isEditorIsNestedEditor, Wt as $lastToFirstIterator, Jt as $onEscapeDown, qt as $onEscapeUp, Dt as $restoreEditorState, dt as $reverseDfs, Ct as $reverseDfsIterator, St as $reverseDfsWithSlots, xt as $reverseDfsWithSlotsIterator, $splitNode, Ut as $unwrapAndFilterDescendants, Gt as $unwrapNode, Bt as $wrapNodeInElement, CAN_USE_BEFORE_INPUT, CAN_USE_DOM, IS_ANDROID, IS_ANDROID_CHROME, IS_APPLE, IS_APPLE_WEBKIT, IS_CHROME, IS_FIREFOX, IS_IOS, IS_SAFARI, addClassNamesToElement, Ht as calculateZoomLevel, Q as dedupeSelectionRects, Tt as eventFiles, lt as getScrollParent, isBlockDomNode, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, st as isMimeType, Yt as makeStateWrapper, rt as markSelection, ut as mediaFileReader, mergeRegister, Ot as objectKlassEquals, et as positionNodeOnRange, Lt as registerNestedElementResolver, removeClassNamesFromElement, it as selectionAlwaysOnDisplay };
500
+ export { Wt as $descendantsMatching, dt as $dfs, pt as $dfsIterator, ht as $dfsWithSlots, mt as $dfsWithSlotsIterator, Kt as $filter, $findMatchingParent, Xt as $firstToLastIterator, at as $getAdjacentCaret, $getAdjacentSiblingOrParentSiblingCaret, Ct as $getDepth, It as $getNearestBlockElementAncestorOrThrow, _t as $getNearestNodeOfType, xt as $getNextRightPreorderNode, wt as $getNextSiblingOrParentSibling, $t as $handleIndentAndOutdent, Ht as $insertFirst, Ot as $insertNodeIntoLeaf, Bt as $insertNodeToNearestRoot, $insertNodeToNearestRootAtCaret, ee as $isAtEndOfNode, te as $isAtStartOfNode, Lt as $isBlockFullySelected, jt as $isEditorIsNestedEditor, Gt as $lastToFirstIterator, Zt as $onEscapeDown, Qt as $onEscapeUp, Dt as $restoreEditorState, gt as $reverseDfs, St as $reverseDfsIterator, Nt as $reverseDfsWithSlots, At as $reverseDfsWithSlotsIterator, $splitNode, zt as $unwrapAndFilterDescendants, qt as $unwrapNode, Tt as $wrapNodeInElement, CAN_USE_BEFORE_INPUT, CAN_USE_DOM, IS_ANDROID, IS_ANDROID_CHROME, IS_APPLE, IS_APPLE_WEBKIT, IS_CHROME, IS_FIREFOX, IS_IOS, IS_SAFARI, addClassNamesToElement, Ut as calculateZoomLevel, tt as dedupeSelectionRects, Ft as eventFiles, ut as getScrollParent, isBlockDomNode, isHTMLAnchorElement, isHTMLElement, isInlineDomNode, ct as isMimeType, Jt as makeStateWrapper, lt as markSelection, ft as mediaFileReader, mergeRegister, Mt as objectKlassEquals, ot as positionNodeOnRange, Pt as registerNestedElementResolver, removeClassNamesFromElement, st as selectionAlwaysOnDisplay };
package/dist/bin/mxs.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-CMX2yklg.mjs";
2
+ import { t as run } from "../mxs-iW9DgqSZ.mjs";
3
3
  export { run };
@@ -0,0 +1,2 @@
1
+ import { l as Schema_exports } from "./esm-CwXl1N0a.mjs";
2
+ export { Schema_exports as Schema };