@mx-space/cli 0.13.0 → 0.13.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 (55) hide show
  1. package/README.md +23 -1
  2. package/dist/{Lexical.dev-By5dOKBN.mjs → Lexical.dev-BsbWMhb3.mjs} +2265 -429
  3. package/dist/{Lexical.node-fXM8Jp7p.mjs → Lexical.node-DnR_u_Ke.mjs} +47 -10
  4. package/dist/Lexical.prod-B7L8eVsO.mjs +6816 -0
  5. package/dist/{LexicalClipboard.dev--HxGoSkO.mjs → LexicalClipboard.dev-BGSFbuTA.mjs} +131 -39
  6. package/dist/{LexicalClipboard.node-C3mRbrmW.mjs → LexicalClipboard.node-CUD_tpWb.mjs} +2 -2
  7. package/dist/LexicalClipboard.prod-DQXfRt3h.mjs +429 -0
  8. package/dist/{LexicalCodeCore.dev-DjSrd4A4.mjs → LexicalCodeCore.dev-B9lK_GSN.mjs} +81 -67
  9. package/dist/LexicalCodeCore.prod-CNWMPXhg.mjs +651 -0
  10. package/dist/LexicalDragon.dev-DRm2bGZ1.mjs +186 -0
  11. package/dist/{LexicalDragon.node-BVhw4C7s.mjs → LexicalDragon.node-d8gPruly.mjs} +3 -2
  12. package/dist/LexicalDragon.prod-ey3uKDJF.mjs +121 -0
  13. package/dist/{LexicalExtension.dev-BPNyvGqe.mjs → LexicalExtension.dev-CXtOJb83.mjs} +349 -35
  14. package/dist/{LexicalExtension.node-BVlcrgOx.mjs → LexicalExtension.node-CMsupJZs.mjs} +9 -4
  15. package/dist/{LexicalExtension.prod-DFKbiNt-.mjs → LexicalExtension.prod-BCLGhzcg.mjs} +477 -328
  16. package/dist/{LexicalHeadless.dev-B-cj7Pr5.mjs → LexicalHeadless.dev-yVDOBd64.mjs} +2 -2
  17. package/dist/{LexicalHeadless.prod-Byp1vNzT.mjs → LexicalHeadless.prod-B8qauuEA.mjs} +2 -2
  18. package/dist/{LexicalHtml.dev-prBAwszN.mjs → LexicalHtml.dev-3rdckXIU.mjs} +323 -265
  19. package/dist/{LexicalHtml.node-BvNF96jZ.mjs → LexicalHtml.node-DagZUjQ_.mjs} +6 -4
  20. package/dist/{LexicalHtml.prod-Sz3CW1ht.mjs → LexicalHtml.prod-B5AQaJDb.mjs} +354 -352
  21. package/dist/{LexicalLink.dev-NySTYhVR.mjs → LexicalLink.dev-CspSwLNB.mjs} +69 -58
  22. package/dist/{LexicalLink.prod-BuCM8gts.mjs → LexicalLink.prod-Da-ZW6H5.mjs} +210 -211
  23. package/dist/{LexicalList.dev-DIMOvSFD.mjs → LexicalList.dev-CNXmV6v8.mjs} +246 -198
  24. package/dist/LexicalList.prod-DgQzj4v9.mjs +944 -0
  25. package/dist/{LexicalMarkdown.dev-C7aylvCG.mjs → LexicalMarkdown.dev-0XURdo96.mjs} +129 -37
  26. package/dist/LexicalMarkdown.prod-qUsIQfJx.mjs +932 -0
  27. package/dist/{LexicalRichText.dev-DfICq6lU.mjs → LexicalRichText.dev-BqsEA7I9.mjs} +151 -122
  28. package/dist/{LexicalRichText.node-Bg9jND3Q.mjs → LexicalRichText.node-D73RR0Ck.mjs} +8 -11
  29. package/dist/LexicalRichText.prod-4Atyd7OR.mjs +538 -0
  30. package/dist/{LexicalSelection.dev-DGjj12wW.mjs → LexicalSelection.dev-DK5xfxKP.mjs} +10 -9
  31. package/dist/{LexicalSelection.node-BU5L4193.mjs → LexicalSelection.node-pyZyrANz.mjs} +4 -4
  32. package/dist/{LexicalSelection.prod-D-PwRbyK.mjs → LexicalSelection.prod-C5GrCbDC.mjs} +144 -146
  33. package/dist/{LexicalTable.dev-ChP7cugd.mjs → LexicalTable.dev-DiR_4rdI.mjs} +184 -119
  34. package/dist/LexicalTable.prod-Cbc5EasT.mjs +2336 -0
  35. package/dist/{LexicalUtils.dev-BiFU3789.mjs → LexicalUtils.dev-jhPjn1vQ.mjs} +375 -35
  36. package/dist/{LexicalUtils.node-j3Llm7Y3.mjs → LexicalUtils.node-Ck74ludK.mjs} +24 -12
  37. package/dist/LexicalUtils.prod-nuTBxnk_.mjs +504 -0
  38. package/dist/bin/mxs.mjs +1 -1
  39. package/dist/esm-BumPuCXw.mjs +2 -0
  40. package/dist/{esm-lpolVSUJ.mjs → esm-DupC6TTP.mjs} +172 -172
  41. package/dist/index.d.mts +16 -16
  42. package/dist/index.mjs +1 -1
  43. package/dist/{mxs-PFV8OJ-M.mjs → mxs-BgAyMQdq.mjs} +1595 -314
  44. package/package.json +17 -17
  45. package/dist/Lexical.prod-BlCvXPGa.mjs +0 -6088
  46. package/dist/LexicalClipboard.prod-DNJzFMcT.mjs +0 -371
  47. package/dist/LexicalCodeCore.prod-DTDShkR3.mjs +0 -642
  48. package/dist/LexicalDragon.dev-DwprRH0z.mjs +0 -88
  49. package/dist/LexicalDragon.prod-nh4J-8vn.mjs +0 -59
  50. package/dist/LexicalList.prod-MVqfA6Vo.mjs +0 -925
  51. package/dist/LexicalMarkdown.prod-CfQSM406.mjs +0 -868
  52. package/dist/LexicalRichText.prod-GsFzCK-o.mjs +0 -550
  53. package/dist/LexicalTable.prod-Bpr9YRXp.mjs +0 -2311
  54. package/dist/LexicalUtils.prod-DCvrA78p.mjs +0 -373
  55. package/dist/esm-DGvoYR6n.mjs +0 -2
@@ -1,11 +1,11 @@
1
- import { f as namedSignals, l as effect, o as NormalizeInlineElementsExtension, p as signal, s as NormalizeTripleClickSelectionExtension } from "./LexicalExtension.node-BVlcrgOx.mjs";
2
- import { $ as $isElementNode, $t as ElementNode, An as KEY_ARROW_UP_COMMAND, Bn as OUTDENT_CONTENT_COMMAND, C as $getAdjacentNode, Dn as KEY_ARROW_DOWN_COMMAND, Fn as KEY_SPACE_COMMAND, Fr as shallowMergeConfig, H as $getRoot, Hn as PASTE_TAG, Ht as CONTROLLED_TEXT_INSERTION_COMMAND, In as KEY_TAB_COMMAND, J as $insertNodes, Jn as SELECT_ALL_COMMAND, Jt as DELETE_WORD_COMMAND, Kt as DELETE_CHARACTER_COMMAND, L as $getNearestNodeFromDOMNode, Mn as KEY_DELETE_COMMAND, Nn as KEY_ENTER_COMMAND, On as KEY_ARROW_LEFT_COMMAND, Pn as KEY_ESCAPE_COMMAND, Pr as setNodeIndentFromDOM, Pt as CLICK_COMMAND, Rn as MOVE_TO_END, Rt as COMMAND_PRIORITY_EDITOR, Sn as IS_SAFARI, Sr as isHTMLElement, St as $setFormatFromDOM, Tr as isSelectionCapturedInDecoratorInput, U as $getSelection, Ut as COPY_COMMAND, Vn as PASTE_COMMAND, Wn as REMOVE_TEXT_COMMAND, Wt as CUT_COMMAND, Xt as DRAGSTART_COMMAND, Yt as DRAGOVER_COMMAND, Z as $isDecoratorNode, Zt as DROP_COMMAND, at as $isNodeSelection, bn as IS_IOS, bt as $selectAll, cn as INSERT_PARAGRAPH_COMMAND, cr as defineExtension, ct as $isRootNode, f as $createParagraphNode, ft as $isTextNode, g as $createTabNode, gt as $normalizeSelection__EXPERIMENTAL, ir as createCommand, jn as KEY_BACKSPACE_COMMAND, jr as safeCast, jt as CAN_USE_BEFORE_INPUT, kn as KEY_ARROW_RIGHT_COMMAND, ln as INSERT_TAB_COMMAND, m as $createRangeSelection, mn as IS_APPLE_WEBKIT, n as $applyNodeReplacement, nn as FORMAT_TEXT_COMMAND, on as INDENT_CONTENT_COMMAND, qt as DELETE_LINE_COMMAND, rr as configExtension, sn as INSERT_LINE_BREAK_COMMAND, st as $isRangeSelection, tn as FORMAT_ELEMENT_COMMAND, vr as isDOMNode, wt as $setSelection, xt as $setDirectionFromDOM, zn as MOVE_TO_START } from "./Lexical.node-fXM8Jp7p.mjs";
3
- import { a as CoreImportExtension, g as sel, o as DOMImportExtension, p as defineImportRule } from "./LexicalHtml.node-BvNF96jZ.mjs";
4
- import { n as $moveCharacter, r as $shouldOverrideDefaultCharacterSelection, t as $isParentRTL } from "./LexicalSelection.node-BU5L4193.mjs";
5
- import { d as addClassNamesToElement, g as objectKlassEquals, h as mergeRegister, i as $getNearestBlockElementAncestorOrThrow, m as isHTMLElement$1, o as $handleIndentAndOutdent, r as $findMatchingParent } from "./LexicalUtils.node-j3Llm7Y3.mjs";
6
- import { a as caretFromPoint, i as $writeDragSourceToDataTransfer, n as $handleRichTextDrop, o as copyToClipboard, r as $insertDataTransferForRichText, s as setLexicalClipboardDataTransfer, t as $getClipboardDataFromSelection } from "./LexicalClipboard.node-C3mRbrmW.mjs";
7
- import { t as DragonExtension } from "./LexicalDragon.node-BVhw4C7s.mjs";
8
- //#region ../../node_modules/.pnpm/@lexical+rich-text@0.45.0/node_modules/@lexical/rich-text/dist/LexicalRichText.dev.mjs
1
+ import { f as namedSignals, l as effect, o as NormalizeInlineElementsExtension, p as signal, s as NormalizeTripleClickSelectionExtension } from "./LexicalExtension.node-CMsupJZs.mjs";
2
+ import { $n as PASTE_COMMAND, $t as CONTROLLED_TEXT_INSERTION_COMMAND, At as $setFormatFromDOM, Bn as KEY_ARROW_LEFT_COMMAND, En as IS_APPLE_WEBKIT, G as $getSiblingCaret, Gn as KEY_ENTER_COMMAND, Hn as KEY_ARROW_UP_COMMAND, Ht as CLICK_COMMAND, Jn as KEY_TAB_COMMAND, Kn as KEY_ESCAPE_COMMAND, Mn as IS_IOS, Mt as $setSelection, Ot as $selectAll, Pn as IS_SAFARI, Qn as OUTDENT_CONTENT_COMMAND, R as $getNearestNodeFromDOMNode, U as $getRoot, Un as KEY_BACKSPACE_COMMAND, Vn as KEY_ARROW_RIGHT_COMMAND, Vr as isDOMNode, W as $getSelection, Wn as KEY_DELETE_COMMAND, Xn as MOVE_TO_END, Zn as MOVE_TO_START, _ as $createTabNode, ai as safeCast, an as DELETE_LINE_COMMAND, at as $isElementNode, b as $findMatchingParent, bn as INSERT_PARAGRAPH_COMMAND, br as defineExtension, bt as $isTextNode, c as $comparePointCaretNext, ci as setNodeIndentFromDOM, cn as DRAGSTART_COMMAND, dn as ElementNode, dt as $isNodeSelection, en as COPY_COMMAND, er as PASTE_TAG, et as $insertNodes, gr as createCommand, gt as $isSelectionCapturedInDecoratorInput, h as $createRangeSelection, hr as configExtension, in as DELETE_CHARACTER_COMMAND, kt as $setDirectionFromDOM, li as shallowMergeConfig, ln as DROP_COMMAND, mn as FORMAT_TEXT_COMMAND, mt as $isRootNode, n as $applyNodeReplacement, ni as mergeRegister, nn as CUT_TAG, nr as REMOVE_TEXT_COMMAND, on as DELETE_WORD_COMMAND, or as SELECT_ALL_COMMAND, p as $createParagraphNode, pn as FORMAT_ELEMENT_COMMAND, pr as addClassNamesToElement, pt as $isRangeSelection, q as $getSlotFrame, qn as KEY_SPACE_COMMAND, qr as isHTMLElement, qt as COMMAND_PRIORITY_EDITOR, rt as $isDecoratorNode, sn as DRAGOVER_COMMAND, tn as CUT_COMMAND, vn as INDENT_CONTENT_COMMAND, w as $getAdjacentNode, wt as $normalizeSelection__EXPERIMENTAL, xn as INSERT_TAB_COMMAND, yn as INSERT_LINE_BREAK_COMMAND, zn as KEY_ARROW_DOWN_COMMAND, zt as CAN_USE_BEFORE_INPUT } from "./Lexical.node-DnR_u_Ke.mjs";
3
+ import { c as DOMImportExtension, h as defineImportRule, s as CoreImportExtension, v as sel } from "./LexicalHtml.node-DagZUjQ_.mjs";
4
+ import { i as $shouldOverrideDefaultCharacterSelection, n as $isParentRTL, r as $moveCharacter } from "./LexicalSelection.node-pyZyrANz.mjs";
5
+ import { a as $handleIndentAndOutdent, h as objectKlassEquals, m as eventFiles, r as $getNearestBlockElementAncestorOrThrow } from "./LexicalUtils.node-Ck74ludK.mjs";
6
+ import { a as caretFromPoint, i as $writeDragSourceToDataTransfer, n as $handleRichTextDrop, o as copyToClipboard, r as $insertDataTransferForRichText, s as setLexicalClipboardDataTransfer, t as $getClipboardDataFromSelection } from "./LexicalClipboard.node-CUD_tpWb.mjs";
7
+ import { t as DragonExtension } from "./LexicalDragon.node-d8gPruly.mjs";
8
+ //#region ../../node_modules/.pnpm/@lexical+rich-text@0.46.0_typescript@6.0.3/node_modules/@lexical/rich-text/dist/LexicalRichText.dev.mjs
9
9
  /**
10
10
  * Copyright (c) Meta Platforms, Inc. and affiliates.
11
11
  *
@@ -21,6 +21,74 @@ import { t as DragonExtension } from "./LexicalDragon.node-BVhw4C7s.mjs";
21
21
  *
22
22
  */
23
23
  /**
24
+ * Heuristic copied (in spirit) from the legacy `isGoogleDocsTitle`:
25
+ * Google Docs serializes the document title as a `<span style="font-size:
26
+ * 26pt">` (sometimes wrapped in a `<p>`). The presence of a 26pt span at
27
+ * the start of a `<p>` is treated as a heading-1 marker.
28
+ */
29
+ function isGoogleDocsTitleSpan(node) {
30
+ return isHTMLElement(node) && node.nodeName === "SPAN" && node.style.fontSize === "26pt";
31
+ }
32
+ /**
33
+ * Import rules for {@link HeadingNode} and {@link QuoteNode}, including
34
+ * the Google Docs title heuristic that the legacy `HeadingNode.importDOM`
35
+ * declared. The Google-Docs rules are registered last (highest priority)
36
+ * so they precede the generic `<p>` and `<span>` rules from
37
+ * {@link CoreImportRules}.
38
+ *
39
+ * Registered by {@link RichTextExtension} itself (together with
40
+ * `CoreImportExtension`), so any editor that uses the rich-text
41
+ * extension can import these tags through the `DOMImportExtension`
42
+ * pipeline without further configuration.
43
+ *
44
+ * @experimental
45
+ */
46
+ const RichTextImportRules = [
47
+ /* @__PURE__ */ defineImportRule({
48
+ $import: (ctx, el) => {
49
+ const node = $createHeadingNode(el.nodeName.toLowerCase());
50
+ setNodeIndentFromDOM(el, node);
51
+ $setFormatFromDOM(node, el);
52
+ $setDirectionFromDOM(node, el);
53
+ return [node.splice(0, 0, ctx.$importChildren(el))];
54
+ },
55
+ match: sel.tag("h1", "h2", "h3", "h4", "h5", "h6"),
56
+ name: "@lexical/rich-text/heading"
57
+ }),
58
+ /* @__PURE__ */ defineImportRule({
59
+ $import: (ctx, el) => {
60
+ const node = $createQuoteNode();
61
+ $setFormatFromDOM(node, el);
62
+ setNodeIndentFromDOM(el, node);
63
+ $setDirectionFromDOM(node, el);
64
+ return [node.splice(0, 0, ctx.$importChildren(el))];
65
+ },
66
+ match: sel.tag("blockquote"),
67
+ name: "@lexical/rich-text/blockquote"
68
+ }),
69
+ /* @__PURE__ */ defineImportRule({
70
+ $import: (ctx, el, $next) => {
71
+ const first = el.firstChild;
72
+ if (first && isGoogleDocsTitleSpan(first)) return ctx.$importChildren(el);
73
+ return $next();
74
+ },
75
+ match: sel.tag("p"),
76
+ name: "@lexical/rich-text/google-docs-title-p"
77
+ }),
78
+ /* @__PURE__ */ defineImportRule({
79
+ $import: (ctx, el, $next) => el.style.fontSize !== "26pt" ? $next() : [$createHeadingNode("h1").splice(0, 0, ctx.$importChildren(el))],
80
+ match: sel.tag("span"),
81
+ name: "@lexical/rich-text/google-docs-title-span"
82
+ })
83
+ ];
84
+ /**
85
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
86
+ *
87
+ * This source code is licensed under the MIT license found in the
88
+ * LICENSE file in the root directory of this source tree.
89
+ *
90
+ */
91
+ /**
24
92
  * Configuration for {@link RichTextExtension}.
25
93
  *
26
94
  * @property escapeFormatTriggers - Per-format trigger configuration that
@@ -76,14 +144,16 @@ function mergeRichTextConfig(config, overrides) {
76
144
  if (overrides.escapeFormatTriggers) merged.escapeFormatTriggers = mergeEscapeFormatTriggers(config.escapeFormatTriggers, overrides.escapeFormatTriggers);
77
145
  return merged;
78
146
  }
79
- const RichTextExtension = defineExtension({
147
+ const RichTextExtension = /* @__PURE__ */ defineExtension({
80
148
  build: (_editor, config) => namedSignals(config),
81
- config: safeCast(DEFAULT_RICH_TEXT_CONFIG),
149
+ config: /* @__PURE__ */ safeCast(DEFAULT_RICH_TEXT_CONFIG),
82
150
  conflictsWith: ["@lexical/plain-text"],
83
151
  dependencies: [
84
152
  DragonExtension,
85
153
  NormalizeInlineElementsExtension,
86
- NormalizeTripleClickSelectionExtension
154
+ NormalizeTripleClickSelectionExtension,
155
+ CoreImportExtension,
156
+ /* @__PURE__ */ configExtension(DOMImportExtension, { rules: RichTextImportRules })
87
157
  ],
88
158
  mergeConfig: mergeRichTextConfig,
89
159
  name: "@lexical/rich-text",
@@ -91,82 +161,16 @@ const RichTextExtension = defineExtension({
91
161
  register: (editor, _config, state) => effect(() => registerRichText(editor, state.getOutput().escapeFormatTriggers))
92
162
  });
93
163
  /**
94
- * Copyright (c) Meta Platforms, Inc. and affiliates.
95
- *
96
- * This source code is licensed under the MIT license found in the
97
- * LICENSE file in the root directory of this source tree.
98
- *
99
- */
100
- /**
101
- * Heuristic copied (in spirit) from the legacy `isGoogleDocsTitle`:
102
- * Google Docs serializes the document title as a `<span style="font-size:
103
- * 26pt">` (sometimes wrapped in a `<p>`). The presence of a 26pt span at
104
- * the start of a `<p>` is treated as a heading-1 marker.
105
- */
106
- function isGoogleDocsTitleSpan(node) {
107
- return isHTMLElement(node) && node.nodeName === "SPAN" && node.style.fontSize === "26pt";
108
- }
109
- /**
110
- * Import rules for {@link HeadingNode} and {@link QuoteNode}, including
111
- * the Google Docs title heuristic that the legacy `HeadingNode.importDOM`
112
- * declared. The Google-Docs rules are registered last (highest priority)
113
- * so they precede the generic `<p>` and `<span>` rules from
114
- * {@link CoreImportRules}.
164
+ * Bundles {@link RichTextImportRules} together with the runtime
165
+ * {@link RichTextExtension}.
115
166
  *
116
167
  * @experimental
168
+ * @deprecated {@link RichTextExtension} now registers
169
+ * {@link RichTextImportRules} (and `CoreImportExtension`) itself —
170
+ * depend on it directly instead.
117
171
  */
118
- const RichTextImportRules = [
119
- defineImportRule({
120
- $import: (ctx, el) => {
121
- const node = $createHeadingNode(el.nodeName.toLowerCase());
122
- setNodeIndentFromDOM(el, node);
123
- $setFormatFromDOM(node, el);
124
- $setDirectionFromDOM(node, el);
125
- return [node.splice(0, 0, ctx.$importChildren(el))];
126
- },
127
- match: sel.tag("h1", "h2", "h3", "h4", "h5", "h6"),
128
- name: "@lexical/rich-text/heading"
129
- }),
130
- defineImportRule({
131
- $import: (ctx, el) => {
132
- const node = $createQuoteNode();
133
- $setFormatFromDOM(node, el);
134
- setNodeIndentFromDOM(el, node);
135
- $setDirectionFromDOM(node, el);
136
- return [node.splice(0, 0, ctx.$importChildren(el))];
137
- },
138
- match: sel.tag("blockquote"),
139
- name: "@lexical/rich-text/blockquote"
140
- }),
141
- defineImportRule({
142
- $import: (ctx, el, $next) => {
143
- const first = el.firstChild;
144
- if (first && isGoogleDocsTitleSpan(first)) return ctx.$importChildren(el);
145
- return $next();
146
- },
147
- match: sel.tag("p"),
148
- name: "@lexical/rich-text/google-docs-title-p"
149
- }),
150
- defineImportRule({
151
- $import: (ctx, el, $next) => el.style.fontSize !== "26pt" ? $next() : [$createHeadingNode("h1").splice(0, 0, ctx.$importChildren(el))],
152
- match: sel.tag("span"),
153
- name: "@lexical/rich-text/google-docs-title-span"
154
- })
155
- ];
156
- /**
157
- * Bundles {@link RichTextImportRules} (plus {@link CoreImportExtension})
158
- * into a single dependency. Use this in editors that want the legacy
159
- * `@lexical/rich-text` DOM import behavior under the new
160
- * {@link DOMImportExtension} pipeline.
161
- *
162
- * @experimental
163
- */
164
- const RichTextImportExtension = defineExtension({
165
- dependencies: [
166
- CoreImportExtension,
167
- RichTextExtension,
168
- configExtension(DOMImportExtension, { rules: RichTextImportRules })
169
- ],
172
+ const RichTextImportExtension = /* @__PURE__ */ defineExtension({
173
+ dependencies: [RichTextExtension],
170
174
  name: "@lexical/rich-text/Import"
171
175
  });
172
176
  /**
@@ -176,7 +180,7 @@ const RichTextImportExtension = defineExtension({
176
180
  * LICENSE file in the root directory of this source tree.
177
181
  *
178
182
  */
179
- const DRAG_DROP_PASTE = createCommand("DRAG_DROP_PASTE_FILE");
183
+ const DRAG_DROP_PASTE = /* @__PURE__ */ createCommand("DRAG_DROP_PASTE_FILE");
180
184
  /** @noInheritDoc */
181
185
  var QuoteNode = class QuoteNode extends ElementNode {
182
186
  static getType() {
@@ -201,7 +205,7 @@ var QuoteNode = class QuoteNode extends ElementNode {
201
205
  }
202
206
  exportDOM(editor) {
203
207
  const { element } = super.exportDOM(editor);
204
- if (isHTMLElement$1(element)) {
208
+ if (isHTMLElement(element)) {
205
209
  if (this.isEmpty()) element.append(document.createElement("br"));
206
210
  const formatType = this.getFormatType();
207
211
  if (formatType) element.style.textAlign = formatType;
@@ -322,7 +326,7 @@ var HeadingNode = class HeadingNode extends ElementNode {
322
326
  }
323
327
  exportDOM(editor) {
324
328
  const { element } = super.exportDOM(editor);
325
- if (isHTMLElement$1(element)) {
329
+ if (isHTMLElement(element)) {
326
330
  if (this.isEmpty()) element.append(document.createElement("br"));
327
331
  const formatType = this.getFormatType();
328
332
  if (formatType) element.style.textAlign = formatType;
@@ -411,25 +415,7 @@ async function onCutForRichText(event, editor) {
411
415
  const selection = $getSelection();
412
416
  if ($isRangeSelection(selection)) selection.removeText();
413
417
  else if ($isNodeSelection(selection)) selection.getNodes().forEach((node) => node.remove());
414
- });
415
- }
416
- function eventFiles(event) {
417
- let dataTransfer = null;
418
- if (objectKlassEquals(event, DragEvent)) dataTransfer = event.dataTransfer;
419
- else if (objectKlassEquals(event, ClipboardEvent)) dataTransfer = event.clipboardData;
420
- if (dataTransfer === null) return [
421
- false,
422
- [],
423
- false
424
- ];
425
- const types = dataTransfer.types;
426
- const hasFiles = types.includes("Files");
427
- const hasContent = types.includes("text/html") || types.includes("text/plain");
428
- return [
429
- hasFiles,
430
- Array.from(dataTransfer.files),
431
- hasContent
432
- ];
418
+ }, { tag: CUT_TAG });
433
419
  }
434
420
  function $isTargetWithinDecorator(target) {
435
421
  return $isDecoratorNode($getNearestNodeFromDOMNode(target));
@@ -512,6 +498,51 @@ const DEFAULT_ESCAPE_FORMAT_TRIGGERS = {
512
498
  tab: true
513
499
  }
514
500
  };
501
+ /**
502
+ * Collapse a NodeSelection to a caret at the surrounding block's edge for
503
+ * MOVE_TO_START / MOVE_TO_END. Picks the document-order first node for
504
+ * MOVE_TO_START (`isBackward = true`) or last for MOVE_TO_END, walks up
505
+ * to the picked node's nearest non-inline ancestor, and lands the caret
506
+ * at that block's offset `0` or `childrenSize`.
507
+ *
508
+ * Document order is resolved via `$comparePointCaretNext` over each
509
+ * selected node's `'next'` sibling caret — `NodeSelection.getNodes()`
510
+ * iterates `_nodes: Set<NodeKey>` in click-insertion order, so a Set-
511
+ * index pick would land on the most-recently-clicked node, not the
512
+ * document-order first / last.
513
+ *
514
+ * A decorator nested inside an element-decorator host (e.g. inside a
515
+ * card title paragraph) promotes to the surrounding paragraph rather
516
+ * than the host's edge — the `n !== targetNode` guard excludes the
517
+ * node itself, so a whole-element NodeSelection (the host) snaps to
518
+ * its parent block, not its own interior. Falls back to the root when
519
+ * no non-inline ancestor below the root matches, which lands the
520
+ * caret at the document edge.
521
+ *
522
+ * Distinct from `KEY_ARROW_LEFT_COMMAND` / `KEY_ARROW_RIGHT_COMMAND`,
523
+ * which step to the immediate sibling via `selectPrevious` /
524
+ * `selectNext`. Cmd+Arrow is a line-end command rather than a one-step
525
+ * caret move, so the block edge is the intended target. `event.shiftKey`
526
+ * is not honored — NodeSelection has no natural "extend toward block
527
+ * edge" semantic.
528
+ *
529
+ * Always calls `preventDefault` and `stopPropagation` so Chrome's
530
+ * native Cmd+Arrow page-navigate cannot fall through.
531
+ *
532
+ * @internal
533
+ */
534
+ function $promoteNodeSelectionToBlockEdge(selection, isBackward, event) {
535
+ event.preventDefault();
536
+ event.stopPropagation();
537
+ const nodes = selection.getNodes();
538
+ if (nodes.length === 0) return true;
539
+ const sorted = nodes.map((node) => $getSiblingCaret(node, "next")).sort($comparePointCaretNext);
540
+ const targetNode = (isBackward ? sorted[0] : sorted[sorted.length - 1]).origin;
541
+ const block = $findMatchingParent(targetNode, (n) => n !== targetNode && $isElementNode(n) && !n.isInline()) ?? $getRoot();
542
+ const offset = isBackward ? 0 : block.getChildrenSize();
543
+ block.select(offset, offset);
544
+ return true;
545
+ }
515
546
  function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_FORMAT_TRIGGERS)) {
516
547
  return mergeRegister(editor.registerCommand(CLICK_COMMAND, () => {
517
548
  const selection = $getSelection();
@@ -685,20 +716,24 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
685
716
  }
686
717
  return false;
687
718
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(KEY_BACKSPACE_COMMAND, (event) => {
688
- if ($isTargetWithinDecorator(event.target)) return false;
689
719
  const selection = $getSelection();
720
+ if (!$isNodeSelection(selection)) {
721
+ if ($isTargetWithinDecorator(event.target)) return false;
722
+ }
690
723
  if ($isRangeSelection(selection)) {
691
724
  if ($isSelectionCollapsedAtFrontOfIndentedBlock(selection)) {
692
725
  event.preventDefault();
693
726
  return editor.dispatchCommand(OUTDENT_CONTENT_COMMAND, void 0);
694
727
  }
695
- if (IS_IOS && navigator.language === "ko-KR") return false;
728
+ if (IS_IOS && CAN_USE_BEFORE_INPUT) return false;
696
729
  } else if (!$isNodeSelection(selection)) return false;
697
730
  event.preventDefault();
698
731
  return editor.dispatchCommand(DELETE_CHARACTER_COMMAND, true);
699
732
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(KEY_DELETE_COMMAND, (event) => {
700
- if ($isTargetWithinDecorator(event.target)) return false;
701
733
  const selection = $getSelection();
734
+ if (!$isNodeSelection(selection)) {
735
+ if ($isTargetWithinDecorator(event.target)) return false;
736
+ }
702
737
  if (!($isRangeSelection(selection) || $isNodeSelection(selection))) return false;
703
738
  event.preventDefault();
704
739
  return editor.dispatchCommand(DELETE_CHARACTER_COMMAND, false);
@@ -725,7 +760,7 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
725
760
  if (files.length > 0) {
726
761
  const x = event.clientX;
727
762
  const y = event.clientY;
728
- const eventRange = caretFromPoint(x, y);
763
+ const eventRange = caretFromPoint(x, y, editor.getRootElement());
729
764
  if (eventRange !== null) {
730
765
  const { offset: domOffset, node: domNode } = eventRange;
731
766
  const node = $getNearestNodeFromDOMNode(domNode);
@@ -761,15 +796,11 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
761
796
  const [isFileTransfer] = eventFiles(event);
762
797
  const selection = $getSelection();
763
798
  if (isFileTransfer && !$isRangeSelection(selection)) return false;
764
- const x = event.clientX;
765
- const y = event.clientY;
766
- const eventRange = caretFromPoint(x, y);
767
- if (eventRange !== null) {
768
- if ($isDecoratorNode($getNearestNodeFromDOMNode(eventRange.node))) event.preventDefault();
769
- }
799
+ event.preventDefault();
770
800
  return true;
771
801
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(SELECT_ALL_COMMAND, () => {
772
- $selectAll();
802
+ const selection = $getSelection();
803
+ $selectAll($isRangeSelection(selection) && $getSlotFrame(selection.anchor.getNode()) !== null ? selection : null);
773
804
  return true;
774
805
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(COPY_COMMAND, (event) => {
775
806
  copyToClipboard(editor, objectKlassEquals(event, ClipboardEvent) ? event : null);
@@ -783,7 +814,7 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
783
814
  editor.dispatchCommand(DRAG_DROP_PASTE, files);
784
815
  return true;
785
816
  }
786
- if (isDOMNode(event.target) && isSelectionCapturedInDecoratorInput(event.target)) return false;
817
+ if (isDOMNode(event.target) && $isSelectionCapturedInDecoratorInput(event.target)) return false;
787
818
  if ($getSelection() !== null) {
788
819
  onPasteForRichText(event, editor);
789
820
  return true;
@@ -799,6 +830,7 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
799
830
  return false;
800
831
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(MOVE_TO_END, (event) => {
801
832
  const selection = $getSelection();
833
+ if ($isNodeSelection(selection)) return $promoteNodeSelectionToBlockEdge(selection, false, event);
802
834
  if (!$isRangeSelection(selection)) return false;
803
835
  const { anchor } = selection;
804
836
  if (anchor.type !== "element" || anchor.offset !== 0) return false;
@@ -806,8 +838,6 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
806
838
  if (!$isElementNode(element)) return false;
807
839
  const firstChild = element.getFirstChild();
808
840
  if (!$isDecoratorNode(firstChild) || !firstChild.isInline()) return false;
809
- const lastDescendant = element.getLastDescendant();
810
- if (lastDescendant == null || $isDecoratorNode(lastDescendant)) return false;
811
841
  const elementKey = element.getKey();
812
842
  const ending = element.selectEnd();
813
843
  if (event.shiftKey) ending.anchor.set(elementKey, 0, "element");
@@ -816,14 +846,13 @@ function registerRichText(editor, escapeFormatTriggers = signal(DEFAULT_ESCAPE_F
816
846
  return true;
817
847
  }, COMMAND_PRIORITY_EDITOR), editor.registerCommand(MOVE_TO_START, (event) => {
818
848
  const selection = $getSelection();
849
+ if ($isNodeSelection(selection)) return $promoteNodeSelectionToBlockEdge(selection, true, event);
819
850
  if (!$isRangeSelection(selection)) return false;
820
851
  const { anchor, focus } = selection;
821
852
  const focusBlock = $findMatchingParent(focus.getNode(), (node) => $isElementNode(node) && !node.isInline());
822
853
  if (focusBlock === null) return false;
823
854
  const firstChild = focusBlock.getFirstChild();
824
855
  if (!$isDecoratorNode(firstChild) || !firstChild.isInline()) return false;
825
- const lastDescendant = focusBlock.getLastDescendant();
826
- if (lastDescendant == null || $isDecoratorNode(lastDescendant)) return false;
827
856
  if ($findMatchingParent(anchor.getNode(), (node) => $isElementNode(node) && !node.isInline()) !== focusBlock) return false;
828
857
  const blockKey = focusBlock.getKey();
829
858
  if (focus.type === "element" && focus.key === blockKey && focus.offset === 0) return false;
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/@lexical+code-core@0.45.0/node_modules/@lexical/code-core/dist/LexicalCodeCore.node.mjs
1
+ //#region ../../node_modules/.pnpm/@lexical+code-core@0.46.0_typescript@6.0.3/node_modules/@lexical/code-core/dist/LexicalCodeCore.node.mjs
2
2
  /**
3
3
  * Copyright (c) Meta Platforms, Inc. and affiliates.
4
4
  *
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  *
8
8
  */
9
- const mod$3 = await (process.env.NODE_ENV !== "production" ? import("./LexicalCodeCore.dev-DjSrd4A4.mjs") : import("./LexicalCodeCore.prod-DTDShkR3.mjs"));
9
+ const mod$3 = await (process.env.NODE_ENV !== "production" ? import("./LexicalCodeCore.dev-B9lK_GSN.mjs") : import("./LexicalCodeCore.prod-CNWMPXhg.mjs"));
10
10
  mod$3.$createCodeHighlightNode;
11
11
  const $createCodeNode = mod$3.$createCodeNode;
12
12
  mod$3.$getCodeLineDirection;
@@ -28,7 +28,7 @@ mod$3.DEFAULT_CODE_LANGUAGE;
28
28
  mod$3.getDefaultCodeLanguage;
29
29
  mod$3.registerCodeIndentation;
30
30
  //#endregion
31
- //#region ../../node_modules/.pnpm/@lexical+link@0.45.0/node_modules/@lexical/link/dist/LexicalLink.node.mjs
31
+ //#region ../../node_modules/.pnpm/@lexical+link@0.46.0_typescript@6.0.3/node_modules/@lexical/link/dist/LexicalLink.node.mjs
32
32
  /**
33
33
  * Copyright (c) Meta Platforms, Inc. and affiliates.
34
34
  *
@@ -36,7 +36,7 @@ mod$3.registerCodeIndentation;
36
36
  * LICENSE file in the root directory of this source tree.
37
37
  *
38
38
  */
39
- const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalLink.dev-NySTYhVR.mjs") : import("./LexicalLink.prod-BuCM8gts.mjs"));
39
+ const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalLink.dev-CspSwLNB.mjs") : import("./LexicalLink.prod-Da-ZW6H5.mjs"));
40
40
  mod$2.$createAutoLinkNode;
41
41
  const $createLinkNode = mod$2.$createLinkNode;
42
42
  const $isAutoLinkNode = mod$2.$isAutoLinkNode;
@@ -55,9 +55,8 @@ mod$2.formatUrl;
55
55
  mod$2.registerAutoLink;
56
56
  mod$2.registerClickableLink;
57
57
  mod$2.registerLink;
58
- mod$2.toggleLink;
59
58
  //#endregion
60
- //#region ../../node_modules/.pnpm/@lexical+list@0.45.0/node_modules/@lexical/list/dist/LexicalList.node.mjs
59
+ //#region ../../node_modules/.pnpm/@lexical+list@0.46.0_typescript@6.0.3/node_modules/@lexical/list/dist/LexicalList.node.mjs
61
60
  /**
62
61
  * Copyright (c) Meta Platforms, Inc. and affiliates.
63
62
  *
@@ -65,7 +64,7 @@ mod$2.toggleLink;
65
64
  * LICENSE file in the root directory of this source tree.
66
65
  *
67
66
  */
68
- const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalList.dev-DIMOvSFD.mjs") : import("./LexicalList.prod-MVqfA6Vo.mjs"));
67
+ const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalList.dev-CNXmV6v8.mjs") : import("./LexicalList.prod-DgQzj4v9.mjs"));
69
68
  const $createListItemNode = mod$1.$createListItemNode;
70
69
  const $createListNode = mod$1.$createListNode;
71
70
  mod$1.$getListDepth;
@@ -86,13 +85,11 @@ const ListNode = mod$1.ListNode;
86
85
  mod$1.ListSchema;
87
86
  mod$1.REMOVE_LIST_COMMAND;
88
87
  mod$1.UPDATE_LIST_START_COMMAND;
89
- mod$1.insertList;
90
88
  mod$1.registerCheckList;
91
89
  mod$1.registerList;
92
90
  mod$1.registerListStrictIndentTransform;
93
- mod$1.removeList;
94
91
  //#endregion
95
- //#region ../../node_modules/.pnpm/@lexical+rich-text@0.45.0/node_modules/@lexical/rich-text/dist/LexicalRichText.node.mjs
92
+ //#region ../../node_modules/.pnpm/@lexical+rich-text@0.46.0_typescript@6.0.3/node_modules/@lexical/rich-text/dist/LexicalRichText.node.mjs
96
93
  /**
97
94
  * Copyright (c) Meta Platforms, Inc. and affiliates.
98
95
  *
@@ -100,7 +97,7 @@ mod$1.removeList;
100
97
  * LICENSE file in the root directory of this source tree.
101
98
  *
102
99
  */
103
- const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalRichText.dev-DfICq6lU.mjs") : import("./LexicalRichText.prod-GsFzCK-o.mjs"));
100
+ const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalRichText.dev-BqsEA7I9.mjs") : import("./LexicalRichText.prod-4Atyd7OR.mjs"));
104
101
  const $createHeadingNode = mod.$createHeadingNode;
105
102
  const $createQuoteNode = mod.$createQuoteNode;
106
103
  const $isHeadingNode = mod.$isHeadingNode;