@mx-space/cli 0.13.1 → 0.13.3

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 (63) hide show
  1. package/README.md +60 -1
  2. package/ROADMAP.md +11 -8
  3. package/dist/{Lexical.dev-By5dOKBN.mjs → Lexical.dev-DTxuYHmG.mjs} +2267 -431
  4. package/dist/{Lexical.node-fXM8Jp7p.mjs → Lexical.node-BlCLnfA6.mjs} +47 -10
  5. package/dist/Lexical.prod-CeB9UQuo.mjs +6816 -0
  6. package/dist/{LexicalClipboard.dev--HxGoSkO.mjs → LexicalClipboard.dev-CdFkLR_D.mjs} +131 -39
  7. package/dist/{LexicalClipboard.node-C3mRbrmW.mjs → LexicalClipboard.node-ktUajxsv.mjs} +2 -2
  8. package/dist/LexicalClipboard.prod-DliyLofW.mjs +429 -0
  9. package/dist/{LexicalCodeCore.dev-DjSrd4A4.mjs → LexicalCodeCore.dev-CL9tHWJX.mjs} +81 -67
  10. package/dist/LexicalCodeCore.prod-BoMSJc29.mjs +651 -0
  11. package/dist/LexicalDragon.dev-CqW7Aq5H.mjs +186 -0
  12. package/dist/{LexicalDragon.node-BVhw4C7s.mjs → LexicalDragon.node-DLXctJyy.mjs} +3 -2
  13. package/dist/LexicalDragon.prod-DHI3T6n5.mjs +121 -0
  14. package/dist/{LexicalExtension.dev-BPNyvGqe.mjs → LexicalExtension.dev-BP-18zns.mjs} +352 -38
  15. package/dist/{LexicalExtension.node-BVlcrgOx.mjs → LexicalExtension.node-BWH6xbzG.mjs} +9 -4
  16. package/dist/{LexicalExtension.prod-DFKbiNt-.mjs → LexicalExtension.prod-Cs6OgrDn.mjs} +479 -330
  17. package/dist/{LexicalHeadless.dev-B-cj7Pr5.mjs → LexicalHeadless.dev-DJp__UcP.mjs} +2 -2
  18. package/dist/{LexicalHeadless.prod-Byp1vNzT.mjs → LexicalHeadless.prod-o0v9cIu5.mjs} +2 -2
  19. package/dist/{LexicalHtml.dev-prBAwszN.mjs → LexicalHtml.dev-DoymwFpG.mjs} +327 -269
  20. package/dist/{LexicalHtml.node-BvNF96jZ.mjs → LexicalHtml.node-CVkbWtUA.mjs} +6 -4
  21. package/dist/{LexicalHtml.prod-Sz3CW1ht.mjs → LexicalHtml.prod-C2b3z99k.mjs} +355 -353
  22. package/dist/{LexicalLink.dev-NySTYhVR.mjs → LexicalLink.dev-7cgLOLIe.mjs} +70 -59
  23. package/dist/{LexicalLink.prod-BuCM8gts.mjs → LexicalLink.prod-DWFgoXHR.mjs} +211 -212
  24. package/dist/{LexicalList.dev-DIMOvSFD.mjs → LexicalList.dev-Ci2iOxFx.mjs} +246 -198
  25. package/dist/LexicalList.prod-D0xX5d3G.mjs +944 -0
  26. package/dist/{LexicalMarkdown.dev-C7aylvCG.mjs → LexicalMarkdown.dev-C0ZYCyuR.mjs} +130 -38
  27. package/dist/LexicalMarkdown.prod-0M-Nc-rh.mjs +932 -0
  28. package/dist/{LexicalRichText.dev-DfICq6lU.mjs → LexicalRichText.dev-Cnr1kDym.mjs} +151 -122
  29. package/dist/{LexicalRichText.node-Bg9jND3Q.mjs → LexicalRichText.node-BUJZAiap.mjs} +8 -11
  30. package/dist/LexicalRichText.prod-BfbMQ9uM.mjs +538 -0
  31. package/dist/{LexicalSelection.dev-DGjj12wW.mjs → LexicalSelection.dev-C4L7l8OB.mjs} +10 -9
  32. package/dist/{LexicalSelection.node-BU5L4193.mjs → LexicalSelection.node-CLKroUMQ.mjs} +4 -4
  33. package/dist/{LexicalSelection.prod-D-PwRbyK.mjs → LexicalSelection.prod-DzFqpTlw.mjs} +144 -146
  34. package/dist/{LexicalTable.dev-ChP7cugd.mjs → LexicalTable.dev-Cc9-zqKa.mjs} +186 -121
  35. package/dist/LexicalTable.prod-BgO4nCxy.mjs +2336 -0
  36. package/dist/{LexicalUtils.dev-BiFU3789.mjs → LexicalUtils.dev-BRgK0L6G.mjs} +375 -35
  37. package/dist/{LexicalUtils.node-j3Llm7Y3.mjs → LexicalUtils.node-BVAwOkL4.mjs} +24 -12
  38. package/dist/LexicalUtils.prod-C1gtvVDP.mjs +504 -0
  39. package/dist/bin/mxs.mjs +1 -1
  40. package/dist/{esm-DFrz5rIo.mjs → esm-BNu4sUWV.mjs} +220 -185
  41. package/dist/esm-jbwcVZth.mjs +2 -0
  42. package/dist/index.d.mts +46 -17
  43. package/dist/index.mjs +1 -1
  44. package/dist/{mxs-DXpzbUf4.mjs → mxs-zPvjkoNC.mjs} +8235 -6041
  45. package/dist/vendor/litexml/cli.mjs +24150 -0
  46. package/dist/vendor/litexml/litexml-html-preview-client.css +8862 -0
  47. package/dist/vendor/litexml/litexml-html-preview-client.js +163816 -0
  48. package/dist/vendor/litexml/style.css +96 -0
  49. package/package.json +21 -22
  50. package/skills/commands-ai.md +115 -0
  51. package/skills/commands-preview.md +3 -3
  52. package/skills/overview.md +1 -0
  53. package/dist/Lexical.prod-BlCvXPGa.mjs +0 -6088
  54. package/dist/LexicalClipboard.prod-DNJzFMcT.mjs +0 -371
  55. package/dist/LexicalCodeCore.prod-DTDShkR3.mjs +0 -642
  56. package/dist/LexicalDragon.dev-DwprRH0z.mjs +0 -88
  57. package/dist/LexicalDragon.prod-nh4J-8vn.mjs +0 -59
  58. package/dist/LexicalList.prod-MVqfA6Vo.mjs +0 -925
  59. package/dist/LexicalMarkdown.prod-CfQSM406.mjs +0 -868
  60. package/dist/LexicalRichText.prod-GsFzCK-o.mjs +0 -550
  61. package/dist/LexicalTable.prod-Bpr9YRXp.mjs +0 -2311
  62. package/dist/LexicalUtils.prod-DCvrA78p.mjs +0 -373
  63. package/dist/esm-DXO9Afik.mjs +0 -2
@@ -0,0 +1,186 @@
1
+ import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-BWH6xbzG.mjs";
2
+ import { Ar as getEditorPropertyFromDOMNode, Cr as getActiveElementDeep, W as $getSelection, Zr as isLexicalEditor, ai as safeCast, br as defineExtension, bt as $isTextNode, pt as $isRangeSelection } from "./Lexical.node-BlCLnfA6.mjs";
3
+ //#region ../../node_modules/.pnpm/@lexical+dragon@0.46.0_typescript@6.0.3/node_modules/@lexical/dragon/dist/LexicalDragon.dev.mjs
4
+ /**
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ *
10
+ */
11
+ /**
12
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ *
17
+ */
18
+ const TEXT_FORMAT_BY_EXEC_COMMAND = {
19
+ bold: "bold",
20
+ italic: "italic",
21
+ strikeThrough: "strikethrough",
22
+ subscript: "subscript",
23
+ superscript: "superscript",
24
+ underline: "underline"
25
+ };
26
+ const WINDOW_STATE_KEY = Symbol.for("@lexical/dragon/WindowState");
27
+ function getOrCreateWindowState(targetWindow) {
28
+ let state = targetWindow[WINDOW_STATE_KEY];
29
+ if (state === void 0) {
30
+ state = {
31
+ dispose: () => {},
32
+ editors: /* @__PURE__ */ new Map(),
33
+ installs: /* @__PURE__ */ new Set()
34
+ };
35
+ targetWindow[WINDOW_STATE_KEY] = state;
36
+ }
37
+ return state;
38
+ }
39
+ function defaultWindow() {
40
+ return typeof window !== "undefined" ? window : void 0;
41
+ }
42
+ /**
43
+ * Install the shared window listener that handles Dragon NaturallySpeaking's
44
+ * web extension messages for every registered editor in the given window.
45
+ *
46
+ * Browsers invoke a window's message listeners in registration order, and
47
+ * the extension's content script registers its own listener at document_end
48
+ * of the initial page load. {@link registerDragonSupport} installs this
49
+ * listener lazily, when an editor's root element is mounted, which loses
50
+ * that race whenever editors mount after the initial load (a navigation in
51
+ * a single page app, a dialog, any lazily rendered field). The extension
52
+ * then edits the DOM directly before Lexical can stopImmediatePropagation,
53
+ * and the edit is applied twice.
54
+ *
55
+ * Call this synchronously from every entrypoint that may render an editor
56
+ * lazily, before document_end, so the listener is ahead of the extension's
57
+ * and editors win the race no matter when they mount.
58
+ *
59
+ * Pass `targetWindow` to install the listener on a window other than the
60
+ * global one (for example, an editor mounted inside an iframe). When
61
+ * omitted, defaults to the current `window` when available. Returns a
62
+ * teardown function; the listener for a window is removed once every
63
+ * teardown for it (including the ones returned by
64
+ * {@link registerDragonSupport}) has been called.
65
+ */
66
+ function installDragonSupport(targetWindow = defaultWindow()) {
67
+ return targetWindow ? addInstall(targetWindow, Symbol("@lexical/dragon/globalInstall"), void 0) : () => {};
68
+ }
69
+ function addInstall(targetWindow, installKey, editor) {
70
+ const state = getOrCreateWindowState(targetWindow);
71
+ if (state.installs.size === 0) {
72
+ const boundHandleMessage = handleMessage.bind(targetWindow);
73
+ targetWindow.addEventListener("message", boundHandleMessage, true);
74
+ state.dispose = () => {
75
+ targetWindow.removeEventListener("message", boundHandleMessage, true);
76
+ };
77
+ }
78
+ state.installs.add(installKey);
79
+ if (editor) {
80
+ const installSet = state.editors.get(editor) || /* @__PURE__ */ new Set();
81
+ installSet.add(installKey);
82
+ state.editors.set(editor, installSet);
83
+ }
84
+ return removeInstall.bind(null, targetWindow, state, installKey, editor);
85
+ }
86
+ function removeInstall(targetWindow, state, installKey, editor) {
87
+ if (editor) {
88
+ const installSet = state.editors.get(editor);
89
+ if (installSet && installSet.delete(installKey) && installSet.size === 0) state.editors.delete(editor);
90
+ }
91
+ if (state.installs.delete(installKey) && state.installs.size === 0) {
92
+ state.dispose();
93
+ delete targetWindow[WINDOW_STATE_KEY];
94
+ }
95
+ }
96
+ function getDefaultView(el) {
97
+ return el && el.ownerDocument.defaultView;
98
+ }
99
+ function registerDragonSupport(editor) {
100
+ const windowSignal = watchedSignal(() => getDefaultView(editor.getRootElement()), (self) => editor.registerRootListener((rootElement) => {
101
+ self.value = getDefaultView(rootElement);
102
+ }));
103
+ return effect(() => {
104
+ const targetWindow = windowSignal.value;
105
+ if (targetWindow) return addInstall(targetWindow, Symbol("@lexical/dragon/editorInstall"), editor);
106
+ });
107
+ }
108
+ function getFocusedEditor(targetWindow) {
109
+ const state = targetWindow[WINDOW_STATE_KEY];
110
+ if (state === void 0) return null;
111
+ const activeEditor = getEditorPropertyFromDOMNode(getActiveElementDeep(targetWindow.document));
112
+ return isLexicalEditor(activeEditor) && state.editors.has(activeEditor) ? activeEditor : null;
113
+ }
114
+ function handleMessage(event) {
115
+ const targetWindow = this;
116
+ if (event.origin !== targetWindow.location.origin) return;
117
+ const editor = getFocusedEditor(targetWindow);
118
+ if (editor === null) return;
119
+ const data = event.data;
120
+ if (typeof data === "string") {
121
+ let parsedData;
122
+ try {
123
+ parsedData = JSON.parse(data);
124
+ } catch (_e) {
125
+ return;
126
+ }
127
+ if (parsedData && parsedData.protocol === "nuanria_messaging" && parsedData.type === "request") {
128
+ const payload = parsedData.payload;
129
+ if (payload && payload.functionId === "makeChanges") {
130
+ const args = payload.args;
131
+ if (Array.isArray(args)) {
132
+ const [elementStart, elementLength, text, selStart, selLength, formatCommand] = args;
133
+ if (![
134
+ elementStart,
135
+ elementLength,
136
+ selStart,
137
+ selLength
138
+ ].every(Number.isFinite) || typeof text !== "string" && text !== -1) return;
139
+ editor.update(() => {
140
+ const selection = $getSelection();
141
+ if ($isRangeSelection(selection)) {
142
+ const anchor = selection.anchor;
143
+ let anchorNode = anchor.getNode();
144
+ let setSelStart = 0;
145
+ let setSelEnd = 0;
146
+ if ($isTextNode(anchorNode)) {
147
+ if (elementStart >= 0 && elementLength >= 0) {
148
+ setSelStart = elementStart;
149
+ setSelEnd = elementStart + elementLength;
150
+ selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);
151
+ }
152
+ }
153
+ if (typeof text === "string" && (setSelStart !== setSelEnd || text !== "")) {
154
+ selection.insertRawText(text);
155
+ anchorNode = anchor.getNode();
156
+ }
157
+ if ($isTextNode(anchorNode)) {
158
+ const anchorNodeTextLength = anchorNode.getTextContentSize();
159
+ setSelStart = Math.min(Math.max(selStart, 0), anchorNodeTextLength);
160
+ setSelEnd = selStart < 0 || selLength < 0 ? setSelStart : Math.min(selStart + selLength, anchorNodeTextLength);
161
+ selection.setTextNodeRange(anchorNode, setSelStart, anchorNode, setSelEnd);
162
+ }
163
+ if (typeof formatCommand === "string" && selLength > 0 && !selection.isCollapsed()) {
164
+ const format = TEXT_FORMAT_BY_EXEC_COMMAND[formatCommand];
165
+ if (format !== void 0) selection.formatText(format);
166
+ }
167
+ event.stopImmediatePropagation();
168
+ }
169
+ });
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ /**
176
+ * Add Dragon speech to text input support to the editor, via the
177
+ * \@lexical/dragon module.
178
+ */
179
+ const DragonExtension = /* @__PURE__ */ defineExtension({
180
+ build: (editor, config, state) => namedSignals(config),
181
+ config: /* @__PURE__ */ safeCast({ disabled: typeof window === "undefined" }),
182
+ name: "@lexical/dragon",
183
+ register: (editor, config, state) => effect(() => state.getOutput().disabled.value ? void 0 : registerDragonSupport(editor))
184
+ });
185
+ //#endregion
186
+ export { DragonExtension, installDragonSupport, registerDragonSupport };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/@lexical+dragon@0.45.0/node_modules/@lexical/dragon/dist/LexicalDragon.node.mjs
1
+ //#region ../../node_modules/.pnpm/@lexical+dragon@0.46.0_typescript@6.0.3/node_modules/@lexical/dragon/dist/LexicalDragon.node.mjs
2
2
  /**
3
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
4
  *
@@ -6,8 +6,9 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  */
9
- const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalDragon.dev-DwprRH0z.mjs") : import("./LexicalDragon.prod-nh4J-8vn.mjs"));
9
+ const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalDragon.dev-CqW7Aq5H.mjs") : import("./LexicalDragon.prod-DHI3T6n5.mjs"));
10
10
  const DragonExtension = mod.DragonExtension;
11
+ mod.installDragonSupport;
11
12
  mod.registerDragonSupport;
12
13
  //#endregion
13
14
  export { DragonExtension as t };
@@ -0,0 +1,121 @@
1
+ import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-BWH6xbzG.mjs";
2
+ import { Ar as getEditorPropertyFromDOMNode, Cr as getActiveElementDeep, W as $getSelection, Zr as isLexicalEditor, ai as safeCast, br as defineExtension, bt as $isTextNode, pt as $isRangeSelection } from "./Lexical.node-BlCLnfA6.mjs";
3
+ //#region ../../node_modules/.pnpm/@lexical+dragon@0.46.0_typescript@6.0.3/node_modules/@lexical/dragon/dist/LexicalDragon.prod.mjs
4
+ /**
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ *
10
+ */
11
+ const c = {
12
+ bold: "bold",
13
+ italic: "italic",
14
+ strikeThrough: "strikethrough",
15
+ subscript: "subscript",
16
+ superscript: "superscript",
17
+ underline: "underline"
18
+ }, f = Symbol.for("@lexical/dragon/WindowState");
19
+ function g(e = function() {
20
+ return "undefined" != typeof window ? window : void 0;
21
+ }()) {
22
+ return e ? p(e, Symbol("@lexical/dragon/globalInstall"), void 0) : () => {};
23
+ }
24
+ function p(e, t, n) {
25
+ const i = function(e) {
26
+ let t = e[f];
27
+ return void 0 === t && (t = {
28
+ dispose: () => {},
29
+ editors: /* @__PURE__ */ new Map(),
30
+ installs: /* @__PURE__ */ new Set()
31
+ }, e[f] = t), t;
32
+ }(e);
33
+ if (0 === i.installs.size) {
34
+ const t = x.bind(e);
35
+ e.addEventListener("message", t, !0), i.dispose = () => {
36
+ e.removeEventListener("message", t, !0);
37
+ };
38
+ }
39
+ if (i.installs.add(t), n) {
40
+ const e = i.editors.get(n) || /* @__PURE__ */ new Set();
41
+ e.add(t), i.editors.set(n, e);
42
+ }
43
+ return m.bind(null, e, i, t, n);
44
+ }
45
+ function m(e, t, n, i) {
46
+ if (i) {
47
+ const e = t.editors.get(i);
48
+ e && e.delete(n) && 0 === e.size && t.editors.delete(i);
49
+ }
50
+ t.installs.delete(n) && 0 === t.installs.size && (t.dispose(), delete e[f]);
51
+ }
52
+ function y(e) {
53
+ return e && e.ownerDocument.defaultView;
54
+ }
55
+ function b(n) {
56
+ const i = watchedSignal(() => y(n.getRootElement()), (e) => n.registerRootListener((t) => {
57
+ e.value = y(t);
58
+ }));
59
+ return effect(() => {
60
+ const e = i.value;
61
+ if (e) return p(e, Symbol("@lexical/dragon/editorInstall"), n);
62
+ });
63
+ }
64
+ function x(e) {
65
+ if (e.origin !== this.location.origin) return;
66
+ const t = function(e) {
67
+ const t = e[f];
68
+ if (void 0 === t) return null;
69
+ const n = getEditorPropertyFromDOMNode(getActiveElementDeep(e.document));
70
+ return isLexicalEditor(n) && t.editors.has(n) ? n : null;
71
+ }(this);
72
+ if (null === t) return;
73
+ const n = e.data;
74
+ if ("string" == typeof n) {
75
+ let r;
76
+ try {
77
+ r = JSON.parse(n);
78
+ } catch (e) {
79
+ return;
80
+ }
81
+ if (r && "nuanria_messaging" === r.protocol && "request" === r.type) {
82
+ const n = r.payload;
83
+ if (n && "makeChanges" === n.functionId) {
84
+ const r = n.args;
85
+ if (Array.isArray(r)) {
86
+ const [n, l, a, d, u, f] = r;
87
+ if (![
88
+ n,
89
+ l,
90
+ d,
91
+ u
92
+ ].every(Number.isFinite) || "string" != typeof a && -1 !== a) return;
93
+ t.update(() => {
94
+ const t = $getSelection();
95
+ if ($isRangeSelection(t)) {
96
+ const i = t.anchor;
97
+ let o = i.getNode(), r = 0, g = 0;
98
+ if ($isTextNode(o) && n >= 0 && l >= 0 && (r = n, g = n + l, t.setTextNodeRange(o, r, o, g)), "string" != typeof a || r === g && "" === a || (t.insertRawText(a), o = i.getNode()), $isTextNode(o)) {
99
+ const e = o.getTextContentSize();
100
+ r = Math.min(Math.max(d, 0), e), g = d < 0 || u < 0 ? r : Math.min(d + u, e), t.setTextNodeRange(o, r, o, g);
101
+ }
102
+ if ("string" == typeof f && u > 0 && !t.isCollapsed()) {
103
+ const e = c[f];
104
+ void 0 !== e && t.formatText(e);
105
+ }
106
+ e.stopImmediatePropagation();
107
+ }
108
+ });
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ const h = /* @__PURE__ */ defineExtension({
115
+ build: (e, t, i) => namedSignals(t),
116
+ config: /* @__PURE__ */ safeCast({ disabled: "undefined" == typeof window }),
117
+ name: "@lexical/dragon",
118
+ register: (e, n, i) => effect(() => i.getOutput().disabled.value ? void 0 : b(e))
119
+ });
120
+ //#endregion
121
+ export { h as DragonExtension, g as installDragonSupport, b as registerDragonSupport };