@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
@@ -1,8 +1,8 @@
1
- import { f as namedSignals, l as effect } from "./LexicalExtension.node-BVlcrgOx.mjs";
2
- import { $ as $isElementNode, $t as ElementNode, Bt as COMMAND_PRIORITY_LOW, Ct as $setPointFromCaret, Fr as shallowMergeConfig, L as $getNearestNodeFromDOMNode, Rt as COMMAND_PRIORITY_EDITOR, U as $getSelection, Vn as PASTE_COMMAND, _ as $createTextNode, at as $isNodeSelection, c as $copyNode, cr as defineExtension, dr as getNearestEditorFromDOMNode, er as TextNode, ft as $isTextNode, gt as $normalizeSelection__EXPERIMENTAL, ht as $normalizeCaret, ir as createCommand, it as $isLineBreakNode, jr as safeCast, k as $getChildCaret, n as $applyNodeReplacement, r as $caretFromPoint, rr as configExtension, st as $isRangeSelection, ut as $isSiblingCaret, vr as isDOMNode, wt as $setSelection, yt as $rewindSiblingCaret } from "./Lexical.node-fXM8Jp7p.mjs";
3
- import { a as CoreImportExtension, g as sel, o as DOMImportExtension, p as defineImportRule, t as $distributeInlineWrapper } from "./LexicalHtml.node-BvNF96jZ.mjs";
4
- import { d as addClassNamesToElement, g as objectKlassEquals, h as mergeRegister, l as $insertNodeToNearestRootAtCaret, p as isHTMLAnchorElement, r as $findMatchingParent } from "./LexicalUtils.node-j3Llm7Y3.mjs";
5
- //#region ../../node_modules/.pnpm/@lexical+link@0.45.0/node_modules/@lexical/link/dist/LexicalLink.dev.mjs
1
+ import { f as namedSignals, l as effect } from "./LexicalExtension.node-BWH6xbzG.mjs";
2
+ import { $ as $insertNodeToNearestRootAtCaret, $n as PASTE_COMMAND, A as $getChildCaret, Ct as $normalizeCaret, Dt as $rewindSiblingCaret, Kr as isHTMLAnchorElement, Mt as $setSelection, R as $getNearestNodeFromDOMNode, Vr as isDOMNode, W as $getSelection, Yt as COMMAND_PRIORITY_LOW, _t as $isSiblingCaret, ai as safeCast, at as $isElementNode, b as $findMatchingParent, br as defineExtension, bt as $isTextNode, dn as ElementNode, dt as $isNodeSelection, fr as TextNode, gr as createCommand, hr as configExtension, i as $caretFromPoint, jr as getNearestEditorFromDOMNode, jt as $setPointFromCaret, l as $copyNode, li as shallowMergeConfig, n as $applyNodeReplacement, ni as mergeRegister, pr as addClassNamesToElement, pt as $isRangeSelection, qt as COMMAND_PRIORITY_EDITOR, ut as $isLineBreakNode, v as $createTextNode, wt as $normalizeSelection__EXPERIMENTAL } from "./Lexical.node-BlCLnfA6.mjs";
3
+ import { c as DOMImportExtension, h as defineImportRule, s as CoreImportExtension, t as $distributeInlineWrapper, v as sel } from "./LexicalHtml.node-CVkbWtUA.mjs";
4
+ import { h as objectKlassEquals } from "./LexicalUtils.node-BVAwOkL4.mjs";
5
+ //#region ../../node_modules/.pnpm/@lexical+link@0.46.0_typescript@6.0.3/node_modules/@lexical/link/dist/LexicalLink.dev.mjs
6
6
  /**
7
7
  * Copyright (c) Meta Platforms, Inc. and affiliates.
8
8
  *
@@ -20,7 +20,7 @@ import { d as addClassNamesToElement, g as objectKlassEquals, h as mergeRegister
20
20
  function formatDevErrorMessage(message) {
21
21
  throw new Error(message);
22
22
  }
23
- const SUPPORTED_URL_PROTOCOLS = new Set([
23
+ const SUPPORTED_URL_PROTOCOLS = /* @__PURE__ */ new Set([
24
24
  "http:",
25
25
  "https:",
26
26
  "mailto:",
@@ -171,7 +171,7 @@ var LinkNode = class LinkNode extends ElementNode {
171
171
  if (!$isRangeSelection(selection)) return false;
172
172
  const anchorNode = selection.anchor.getNode();
173
173
  const focusNode = selection.focus.getNode();
174
- return this.isParentOf(anchorNode) && this.isParentOf(focusNode) && selection.getTextContent().length > 0;
174
+ return (this.is(anchorNode) || this.isParentOf(anchorNode)) && (this.is(focusNode) || this.isParentOf(focusNode)) && selection.getTextContent().length > 0;
175
175
  }
176
176
  isEmailURI() {
177
177
  return this.__url.startsWith("mailto:");
@@ -375,7 +375,7 @@ function $createAutoLinkNode(url = "", attributes) {
375
375
  function $isAutoLinkNode(node) {
376
376
  return node instanceof AutoLinkNode;
377
377
  }
378
- const TOGGLE_LINK_COMMAND = createCommand("TOGGLE_LINK_COMMAND");
378
+ const TOGGLE_LINK_COMMAND = /* @__PURE__ */ createCommand("TOGGLE_LINK_COMMAND");
379
379
  function $getPointNode(point, offset) {
380
380
  if (point.type === "element") {
381
381
  const node = point.getNode();
@@ -584,6 +584,30 @@ function formatUrl(url) {
584
584
  return `https://${url}`;
585
585
  }
586
586
  /**
587
+ * Import rules for {@link LinkNode}.
588
+ *
589
+ * Registered by {@link LinkExtension} itself (together with
590
+ * `CoreImportExtension`), so any editor that uses the link extension can
591
+ * import `<a>` through the `DOMImportExtension` pipeline without further
592
+ * configuration.
593
+ *
594
+ * @experimental
595
+ */
596
+ const LinkImportRules = [/* @__PURE__ */ defineImportRule({
597
+ $import: (ctx, el) => {
598
+ if (!el.textContent && el.children.length === 0) return [];
599
+ const href = el.getAttribute("href") || "";
600
+ const attrs = {
601
+ rel: el.getAttribute("rel"),
602
+ target: el.getAttribute("target"),
603
+ title: el.getAttribute("title")
604
+ };
605
+ return $distributeInlineWrapper(ctx.$importChildren(el), () => $createLinkNode(href, attrs));
606
+ },
607
+ match: sel.tag("a"),
608
+ name: "@lexical/link/a"
609
+ })];
610
+ /**
587
611
  * Copyright (c) Meta Platforms, Inc. and affiliates.
588
612
  *
589
613
  * This source code is licensed under the MIT license found in the
@@ -628,7 +652,7 @@ function registerLink(editor, stores) {
628
652
  if (event.clipboardData === null) return false;
629
653
  const clipboardText = event.clipboardData.getData("text");
630
654
  if (!validateUrl(clipboardText)) return false;
631
- if (!selection.getNodes().some((node) => $isElementNode(node))) {
655
+ if (!selection.getNodes().some((node) => $isElementNode(node) || $isTextNode(node) && !node.isSimpleText())) {
632
656
  editor.dispatchCommand(TOGGLE_LINK_COMMAND, {
633
657
  ...attributes,
634
658
  url: clipboardText
@@ -646,11 +670,12 @@ function registerLink(editor, stores) {
646
670
  * listener to wrap selected nodes in a link when a
647
671
  * URL is pasted and `validateUrl` is defined.
648
672
  */
649
- const LinkExtension = defineExtension({
673
+ const LinkExtension = /* @__PURE__ */ defineExtension({
650
674
  build(editor, config, state) {
651
675
  return namedSignals(config);
652
676
  },
653
677
  config: defaultProps,
678
+ dependencies: [CoreImportExtension, /* @__PURE__ */ configExtension(DOMImportExtension, { rules: LinkImportRules })],
654
679
  mergeConfig(config, overrides) {
655
680
  const merged = shallowMergeConfig(config, overrides);
656
681
  if (config.attributes) merged.attributes = shallowMergeConfig(config.attributes, merged.attributes);
@@ -663,6 +688,19 @@ const LinkExtension = defineExtension({
663
688
  }
664
689
  });
665
690
  /**
691
+ * Bundles {@link LinkImportRules} together with the runtime
692
+ * {@link LinkExtension}.
693
+ *
694
+ * @experimental
695
+ * @deprecated {@link LinkExtension} now registers
696
+ * {@link LinkImportRules} (and `CoreImportExtension`) itself — depend on
697
+ * it directly instead.
698
+ */
699
+ const LinkImportExtension = /* @__PURE__ */ defineExtension({
700
+ dependencies: [LinkExtension],
701
+ name: "@lexical/link/Import"
702
+ });
703
+ /**
666
704
  * Copyright (c) Meta Platforms, Inc. and affiliates.
667
705
  *
668
706
  * This source code is licensed under the MIT license found in the
@@ -702,7 +740,7 @@ function registerClickableLink(editor, stores, eventOptions = {}) {
702
740
  }
703
741
  });
704
742
  if (url === null || url === "") return;
705
- const selection = editor.getEditorState().read($getSelection, { editor });
743
+ const selection = editor.read("latest", $getSelection);
706
744
  if ($isRangeSelection(selection) && !selection.isCollapsed()) {
707
745
  event.preventDefault();
708
746
  return;
@@ -730,11 +768,11 @@ function registerClickableLink(editor, stores, eventOptions = {}) {
730
768
  * selection to change instead of opening a link. This extension can be used to
731
769
  * restore the default behavior, e.g. when the editor is not editable.
732
770
  */
733
- const ClickableLinkExtension = defineExtension({
771
+ const ClickableLinkExtension = /* @__PURE__ */ defineExtension({
734
772
  build(editor, config, state) {
735
773
  return namedSignals(config);
736
774
  },
737
- config: safeCast({
775
+ config: /* @__PURE__ */ safeCast({
738
776
  disabled: false,
739
777
  newTab: false
740
778
  }),
@@ -751,6 +789,23 @@ const ClickableLinkExtension = defineExtension({
751
789
  * LICENSE file in the root directory of this source tree.
752
790
  *
753
791
  */
792
+ /**
793
+ * A callback invoked when the auto-link plugin creates, updates, or removes an
794
+ * automatic link. It receives the new `url` and the `prevUrl`; either may be
795
+ * `null` when a link is added or removed.
796
+ */
797
+ /**
798
+ * A function that inspects a piece of `text` and returns a
799
+ * {@link LinkMatcherResult} for the first URL it recognizes, or `null` if none
800
+ * is found. Used by the auto-link plugin to detect links as the user types.
801
+ */
802
+ /**
803
+ * Builds a {@link LinkMatcher} from a regular expression. The matched text is
804
+ * used as the link URL, optionally rewritten by `urlTransformer` (for example
805
+ * to prepend a protocol). Pass the result to the auto-link plugin's `matchers`.
806
+ *
807
+ * @returns A matcher that reports the first match of `regExp` in the text.
808
+ */
754
809
  function createLinkMatcherWithRegExp(regExp, urlTransformer = (text) => text) {
755
810
  return (text) => {
756
811
  const match = regExp.exec(text);
@@ -1049,7 +1104,7 @@ function registerAutoLink(editor, config = defaultConfig) {
1049
1104
  * The given `matchers` and `changeHandlers` will be merged by
1050
1105
  * concatenating the configured arrays.
1051
1106
  */
1052
- const AutoLinkExtension = defineExtension({
1107
+ const AutoLinkExtension = /* @__PURE__ */ defineExtension({
1053
1108
  config: defaultConfig,
1054
1109
  dependencies: [LinkExtension],
1055
1110
  mergeConfig(config, overrides) {
@@ -1068,49 +1123,5 @@ const AutoLinkExtension = defineExtension({
1068
1123
  nodes: [AutoLinkNode],
1069
1124
  register: registerAutoLink
1070
1125
  });
1071
- /**
1072
- * Import rules for {@link LinkNode}.
1073
- *
1074
- * @experimental
1075
- */
1076
- const LinkImportRules = [defineImportRule({
1077
- $import: (ctx, el) => {
1078
- if (!el.textContent && el.children.length === 0) return [];
1079
- const href = el.getAttribute("href") || "";
1080
- const attrs = {
1081
- rel: el.getAttribute("rel"),
1082
- target: el.getAttribute("target"),
1083
- title: el.getAttribute("title")
1084
- };
1085
- return $distributeInlineWrapper(ctx.$importChildren(el), () => $createLinkNode(href, attrs));
1086
- },
1087
- match: sel.tag("a"),
1088
- name: "@lexical/link/a"
1089
- })];
1090
- /**
1091
- * Bundles {@link LinkImportRules} (plus {@link CoreImportExtension}) into
1092
- * a single dependency. Equivalent to the legacy
1093
- * `LinkNode.importDOM` registration on the new
1094
- * {@link DOMImportExtension} pipeline.
1095
- *
1096
- * @experimental
1097
- */
1098
- const LinkImportExtension = defineExtension({
1099
- dependencies: [
1100
- CoreImportExtension,
1101
- LinkExtension,
1102
- configExtension(DOMImportExtension, { rules: LinkImportRules })
1103
- ],
1104
- name: "@lexical/link/Import"
1105
- });
1106
- /**
1107
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1108
- *
1109
- * This source code is licensed under the MIT license found in the
1110
- * LICENSE file in the root directory of this source tree.
1111
- *
1112
- */
1113
- /** @deprecated renamed to {@link $toggleLink} by @lexical/eslint-plugin rules-of-lexical */
1114
- const toggleLink = $toggleLink;
1115
1126
  //#endregion
1116
- export { $createAutoLinkNode, $createLinkNode, $isAutoLinkNode, $isLinkNode, $toggleLink, AutoLinkExtension, AutoLinkNode, ClickableLinkExtension, LinkExtension, LinkImportExtension, LinkImportRules, LinkNode, TOGGLE_LINK_COMMAND, createLinkMatcherWithRegExp, formatUrl, registerAutoLink, registerClickableLink, registerLink, toggleLink };
1127
+ export { $createAutoLinkNode, $createLinkNode, $isAutoLinkNode, $isLinkNode, $toggleLink, AutoLinkExtension, AutoLinkNode, ClickableLinkExtension, LinkExtension, LinkImportExtension, LinkImportRules, LinkNode, TOGGLE_LINK_COMMAND, createLinkMatcherWithRegExp, formatUrl, registerAutoLink, registerClickableLink, registerLink };