@mx-space/cli 0.15.0 → 0.15.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.
- package/README.md +1 -1
- package/dist/{Lexical.dev-Cck4n26y.mjs → Lexical.dev-Df5TNMgP.mjs} +129 -96
- package/dist/{Lexical.node-D6wf2D5M.mjs → Lexical.node-B064E4Hy.mjs} +1 -1
- package/dist/{Lexical.prod-DCwS1oTq.mjs → Lexical.prod-DRFSwoE7.mjs} +6 -4
- package/dist/{LexicalClipboard.dev-CMkPHV7O.mjs → LexicalClipboard.dev-ClOWeg5v.mjs} +18 -14
- package/dist/{LexicalClipboard.node-m4nZ7IYw.mjs → LexicalClipboard.node-BJBLWpEi.mjs} +1 -1
- package/dist/{LexicalClipboard.prod-B_rN1vE1.mjs → LexicalClipboard.prod-Ytt65eQo.mjs} +10 -10
- package/dist/{LexicalCodeCore.dev-DyJw3i8V.mjs → LexicalCodeCore.dev-CzEPINOT.mjs} +43 -25
- package/dist/{LexicalCodeCore.prod-DPXLHQLF.mjs → LexicalCodeCore.prod-DOVk7lL_.mjs} +6 -6
- package/dist/{LexicalDragon.dev-ZkNfMwrE.mjs → LexicalDragon.dev-DxePN9fP.mjs} +2 -2
- package/dist/{LexicalDragon.node-Ds9oLUFh.mjs → LexicalDragon.node-DBwaqStp.mjs} +1 -1
- package/dist/{LexicalDragon.prod-B58ic2av.mjs → LexicalDragon.prod-Bji84-Hq.mjs} +2 -2
- package/dist/{LexicalExtension.dev-DvwHs1Xv.mjs → LexicalExtension.dev-DtSRyjbf.mjs} +25 -13
- package/dist/{LexicalExtension.node-5OymZQfy.mjs → LexicalExtension.node-3nsS5NjU.mjs} +1 -1
- package/dist/{LexicalExtension.prod-Ce0T5smQ.mjs → LexicalExtension.prod-Ddk0ja_6.mjs} +16 -13
- package/dist/{LexicalHeadless.dev-DA0WldSR.mjs → LexicalHeadless.dev-DdWJsPoH.mjs} +1 -1
- package/dist/{LexicalHeadless.prod-1kQgKB6c.mjs → LexicalHeadless.prod-CH74ZDMt.mjs} +1 -1
- package/dist/{LexicalHtml.dev-BDB7CUrx.mjs → LexicalHtml.dev-DN7QIb_7.mjs} +20 -14
- package/dist/{LexicalHtml.node-DpVNt7It.mjs → LexicalHtml.node-DAwuaPeI.mjs} +1 -1
- package/dist/{LexicalHtml.prod-HkxM5scw.mjs → LexicalHtml.prod-X4eTHEfI.mjs} +4 -4
- package/dist/{LexicalLink.dev-C5zNJlrm.mjs → LexicalLink.dev-owitIl6I.mjs} +28 -21
- package/dist/{LexicalLink.prod-Bkt9hQAt.mjs → LexicalLink.prod-BZ7ZZkVD.mjs} +6 -5
- package/dist/{LexicalList.dev-B7VgME-m.mjs → LexicalList.dev-CUbi09Yo.mjs} +4 -4
- package/dist/{LexicalList.prod-B8c7TDjH.mjs → LexicalList.prod-pUsUZa0r.mjs} +4 -4
- package/dist/{LexicalMarkdown.dev-B5z9kLbV.mjs → LexicalMarkdown.dev-S2yWckH9.mjs} +40 -29
- package/dist/{LexicalMarkdown.prod-wKzw7FFH.mjs → LexicalMarkdown.prod-TRkMWfmC.mjs} +10 -7
- package/dist/{LexicalRichText.dev-CUd6Li5F.mjs → LexicalRichText.dev-Y3ybFF2S.mjs} +15 -11
- package/dist/{LexicalRichText.node-BKfaQ-CH.mjs → LexicalRichText.node-wNAi2Z4i.mjs} +4 -4
- package/dist/{LexicalRichText.prod-SBewjJHx.mjs → LexicalRichText.prod-HLxqZ6hQ.mjs} +17 -11
- package/dist/{LexicalSelection.dev-D27JOCqj.mjs → LexicalSelection.dev-CyhKOKbs.mjs} +28 -24
- package/dist/{LexicalSelection.node-DBEwPjBu.mjs → LexicalSelection.node-BCuHMbzl.mjs} +1 -1
- package/dist/{LexicalSelection.prod-OaYhXHOL.mjs → LexicalSelection.prod-RebDJliC.mjs} +2 -2
- package/dist/{LexicalTable.dev-6IFFOAE0.mjs → LexicalTable.dev-DN3ezVey.mjs} +33 -28
- package/dist/{LexicalTable.prod-2CaLZ7fH.mjs → LexicalTable.prod-B0MioVyq.mjs} +10 -9
- package/dist/{LexicalUtils.dev-DJA7J_7v.mjs → LexicalUtils.dev-Bw6LFRlt.mjs} +8 -5
- package/dist/{LexicalUtils.node-Df9oPTlA.mjs → LexicalUtils.node-BPKMFN80.mjs} +1 -1
- package/dist/{LexicalUtils.prod-Bb7V4Ewg.mjs → LexicalUtils.prod-CJYQVQJO.mjs} +7 -6
- package/dist/bin/mxs.mjs +1 -1
- package/dist/{esm-DLzrv7gD.mjs → esm-7vSMGlFz.mjs} +428 -505
- package/dist/esm-ZrfYH2y2.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{mxs-BIRW5Axj.mjs → mxs-DKv-4ZTg.mjs} +1091 -806
- package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
- package/dist/vendor/litexml/cli.mjs +113 -42
- package/dist/vendor/litexml/litexml-html-preview-client.css +575 -997
- package/dist/vendor/litexml/litexml-html-preview-client.js +8177 -7143
- package/dist/vendor/litexml/style.css +9 -5
- package/package.json +28 -25
- package/skills/safety.md +1 -1
- package/LICENSE +0 -33
- package/dist/esm-CDcJmHkG.mjs +0 -2
package/README.md
CHANGED
|
@@ -694,7 +694,7 @@ The variant (`article` / `note`) is auto-detected from the envelope root. Overri
|
|
|
694
694
|
|
|
695
695
|
## Skill bundle
|
|
696
696
|
|
|
697
|
-
`mxs skill` exposes the bundled AI-agent documentation directly from the CLI binary. Chapters are shipped inside the published `@mx-space/cli` package; liteXML chapters are pulled live from `@haklex/rich-litexml` at runtime (requires `@haklex/rich-litexml@>=0.
|
|
697
|
+
`mxs skill` exposes the bundled AI-agent documentation directly from the CLI binary. Chapters are shipped inside the published `@mx-space/cli` package; liteXML chapters are pulled live from `@haklex/rich-litexml` at runtime (requires `@haklex/rich-litexml@>=0.36.1`).
|
|
698
698
|
|
|
699
699
|
| Command | Behaviour |
|
|
700
700
|
| -------------------------------- | ---------------------------------------------------------- |
|
|
@@ -75,8 +75,10 @@ const NON_BREAKING_SPACE = "\xA0";
|
|
|
75
75
|
const COMPOSITION_SUFFIX = IS_SAFARI || IS_IOS || IS_APPLE_WEBKIT ? NON_BREAKING_SPACE : "";
|
|
76
76
|
const DOUBLE_LINE_BREAK = "\n\n";
|
|
77
77
|
const COMPOSITION_START_CHAR = IS_FIREFOX ? NON_BREAKING_SPACE : COMPOSITION_SUFFIX;
|
|
78
|
-
const
|
|
79
|
-
const
|
|
78
|
+
const RTL = "֑-߿יִ-﷽ﹰ-ﻼ";
|
|
79
|
+
const LTR = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--";
|
|
80
|
+
const RTL_REGEX = new RegExp("^[^" + LTR + "]*[" + RTL + "]");
|
|
81
|
+
const LTR_REGEX = new RegExp("^[^" + RTL + "]*[" + LTR + "]");
|
|
80
82
|
const TEXT_TYPE_TO_FORMAT = {
|
|
81
83
|
bold: 1,
|
|
82
84
|
capitalize: IS_CAPITALIZE,
|
|
@@ -3289,9 +3291,7 @@ function $handleBeforeInput(event) {
|
|
|
3289
3291
|
case "historyUndo":
|
|
3290
3292
|
dispatchCommand(editor, UNDO_COMMAND);
|
|
3291
3293
|
break;
|
|
3292
|
-
case "historyRedo":
|
|
3293
|
-
dispatchCommand(editor, REDO_COMMAND);
|
|
3294
|
-
break;
|
|
3294
|
+
case "historyRedo": dispatchCommand(editor, REDO_COMMAND);
|
|
3295
3295
|
}
|
|
3296
3296
|
return true;
|
|
3297
3297
|
}
|
|
@@ -3495,19 +3495,21 @@ function $handleKeyDown(event) {
|
|
|
3495
3495
|
} else if (isParagraph(event)) {
|
|
3496
3496
|
inputState.isInsertLineBreak = false;
|
|
3497
3497
|
dispatchCommand(editor, KEY_ENTER_COMMAND, event);
|
|
3498
|
-
} else if (isDeleteBackward(event))
|
|
3499
|
-
if (
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
else if (
|
|
3506
|
-
else {
|
|
3507
|
-
event
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3498
|
+
} else if (isDeleteBackward(event)) {
|
|
3499
|
+
if (isBackspace(event)) {
|
|
3500
|
+
if (dispatchCommand(editor, KEY_BACKSPACE_COMMAND, event)) markHandledSelectionCommandInsertText(inputState);
|
|
3501
|
+
} else {
|
|
3502
|
+
event.preventDefault();
|
|
3503
|
+
dispatchCommand(editor, DELETE_CHARACTER_COMMAND, true);
|
|
3504
|
+
}
|
|
3505
|
+
} else if (isEscape(event)) dispatchCommand(editor, KEY_ESCAPE_COMMAND, event);
|
|
3506
|
+
else if (isDeleteForward(event)) {
|
|
3507
|
+
if (isDelete(event)) dispatchCommand(editor, KEY_DELETE_COMMAND, event);
|
|
3508
|
+
else {
|
|
3509
|
+
event.preventDefault();
|
|
3510
|
+
dispatchCommand(editor, DELETE_CHARACTER_COMMAND, false);
|
|
3511
|
+
}
|
|
3512
|
+
} else if (isDeleteWordBackward(event)) {
|
|
3511
3513
|
event.preventDefault();
|
|
3512
3514
|
dispatchCommand(editor, DELETE_WORD_COMMAND, true);
|
|
3513
3515
|
} else if (isDeleteWordForward(event)) {
|
|
@@ -4693,10 +4695,14 @@ var LexicalNode = class {
|
|
|
4693
4695
|
$setSelection(selection);
|
|
4694
4696
|
const anchor = selection.anchor;
|
|
4695
4697
|
const focus = selection.focus;
|
|
4696
|
-
if (anchor.key === toReplaceKey)
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4698
|
+
if (anchor.key === toReplaceKey) {
|
|
4699
|
+
if (includeChildren && anchor.type === "element") anchor.set(writableReplaceWith.__key, prevSizeBeforeChildrenTransfer + anchor.offset, "element");
|
|
4700
|
+
else $moveSelectionPointToEnd(anchor, writableReplaceWith);
|
|
4701
|
+
}
|
|
4702
|
+
if (focus.key === toReplaceKey) {
|
|
4703
|
+
if (includeChildren && focus.type === "element") focus.set(writableReplaceWith.__key, prevSizeBeforeChildrenTransfer + focus.offset, "element");
|
|
4704
|
+
else $moveSelectionPointToEnd(focus, writableReplaceWith);
|
|
4705
|
+
}
|
|
4700
4706
|
}
|
|
4701
4707
|
if ($getCompositionKey() === toReplaceKey) $setCompositionKey(key);
|
|
4702
4708
|
return writableReplaceWith;
|
|
@@ -5064,8 +5070,10 @@ function getStyleObjectFromCSS(css) {
|
|
|
5064
5070
|
}
|
|
5065
5071
|
if (chunkStart === -1) chunkStart = i;
|
|
5066
5072
|
}
|
|
5067
|
-
if (chunkStart !== -1)
|
|
5068
|
-
|
|
5073
|
+
if (chunkStart !== -1) {
|
|
5074
|
+
if (isParsingValue) currentValue += css.slice(chunkStart, length);
|
|
5075
|
+
else currentProperty += css.slice(chunkStart, length);
|
|
5076
|
+
}
|
|
5069
5077
|
const property = currentProperty.trim();
|
|
5070
5078
|
const value = currentValue.trim();
|
|
5071
5079
|
if (property !== "" && value !== "") styles[property] = value;
|
|
@@ -6097,11 +6105,13 @@ function $insertTextAtPoint(selection, text, format, style) {
|
|
|
6097
6105
|
textNode.setFormat(format);
|
|
6098
6106
|
textNode.setStyle(style);
|
|
6099
6107
|
const parent = anchorNode.getParentOrThrow();
|
|
6100
|
-
if (offset === 0)
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
else anchorNode.
|
|
6104
|
-
|
|
6108
|
+
if (offset === 0) {
|
|
6109
|
+
if (parent.isInline() && !anchorNode.__prev) parent.insertBefore(textNode);
|
|
6110
|
+
else anchorNode.insertBefore(textNode, false);
|
|
6111
|
+
} else if (offset === anchorNode.getTextContentSize()) {
|
|
6112
|
+
if (parent.isInline() && !anchorNode.__next) parent.insertAfter(textNode);
|
|
6113
|
+
else anchorNode.insertAfter(textNode, false);
|
|
6114
|
+
} else {
|
|
6105
6115
|
const [before] = anchorNode.splitText(offset);
|
|
6106
6116
|
before.insertAfter(textNode, false);
|
|
6107
6117
|
}
|
|
@@ -6334,10 +6344,11 @@ var RangeSelection = class RangeSelection {
|
|
|
6334
6344
|
prevWasElement = false;
|
|
6335
6345
|
if ($isTextNode(node)) {
|
|
6336
6346
|
let text = node.getTextContent();
|
|
6337
|
-
if (node === firstNode)
|
|
6338
|
-
if (
|
|
6339
|
-
|
|
6340
|
-
|
|
6347
|
+
if (node === firstNode) {
|
|
6348
|
+
if (node === lastNode) {
|
|
6349
|
+
if (anchor.type !== "element" || focus.type !== "element" || focus.offset === anchor.offset) text = anchorOffset < focusOffset ? text.slice(anchorOffset, focusOffset) : text.slice(focusOffset, anchorOffset);
|
|
6350
|
+
} else text = isBefore ? text.slice(anchorOffset) : text.slice(focusOffset);
|
|
6351
|
+
} else if (node === lastNode) text = isBefore ? text.slice(0, focusOffset) : text.slice(0, anchorOffset);
|
|
6341
6352
|
textContent += text;
|
|
6342
6353
|
} else if (($isDecoratorNode(node) || $isLineBreakNode(node)) && (node !== lastNode || !this.isCollapsed())) textContent += node.getTextContent();
|
|
6343
6354
|
}
|
|
@@ -6500,12 +6511,14 @@ var RangeSelection = class RangeSelection {
|
|
|
6500
6511
|
const atStartOfInline = anchorParent.isInline() && offset === 0 && !anchorNode.__prev;
|
|
6501
6512
|
const atEndOfInline = anchorParent.isInline() && offset === anchorSize && !anchorNode.__next;
|
|
6502
6513
|
const formatDiffers = anchorNode.getFormat() !== format || anchorNode.getStyle() !== style;
|
|
6503
|
-
if (atStartOfInline || atEndOfInline || formatDiffers)
|
|
6504
|
-
anchorNode.
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
6514
|
+
if (atStartOfInline || atEndOfInline || formatDiffers) {
|
|
6515
|
+
if (anchorNode.getTextContent() === "" && !atStartOfInline && !atEndOfInline) {
|
|
6516
|
+
anchorNode.setFormat(format);
|
|
6517
|
+
anchorNode.setStyle(style);
|
|
6518
|
+
} else {
|
|
6519
|
+
$insertTextAtPoint(this, text, format, style);
|
|
6520
|
+
return;
|
|
6521
|
+
}
|
|
6509
6522
|
}
|
|
6510
6523
|
anchorNode.spliceText(offset, 0, text, true);
|
|
6511
6524
|
if (anchorNode.isComposing() && this.anchor.type === "text") this.anchor.set(this.anchor.key, this.anchor.offset - text.length, this.anchor.type);
|
|
@@ -6759,19 +6772,21 @@ var RangeSelection = class RangeSelection {
|
|
|
6759
6772
|
if (granularity === "character" && $isTextNode(focusNode) && focusNode.isUnmergeable()) {
|
|
6760
6773
|
if (isBackward ? this.focus.offset === 0 : this.focus.offset === focusNode.getTextContentSize()) {
|
|
6761
6774
|
const sibling = $getSiblingCaret(focusNode, isBackward ? "previous" : "next").getNodeAtCaret();
|
|
6762
|
-
if ($isTextNode(sibling))
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6775
|
+
if ($isTextNode(sibling)) {
|
|
6776
|
+
if (collapse) {
|
|
6777
|
+
const sibKeyedDOM = editor.getElementByKey(sibling.getKey());
|
|
6778
|
+
const sibDOM = sibKeyedDOM ? $getDOMTextNode(sibling, sibKeyedDOM, editor) : null;
|
|
6779
|
+
if (sibDOM) {
|
|
6780
|
+
const sibOffset = isBackward ? sibDOM.length : 0;
|
|
6781
|
+
setDOMSelectionBaseAndExtent(domSelection, sibDOM, sibOffset, sibDOM, sibOffset);
|
|
6782
|
+
}
|
|
6783
|
+
} else {
|
|
6784
|
+
const sibLen = sibling.getTextContentSize();
|
|
6785
|
+
if (isBackward) this.focus.set(sibling.__key, sibLen - 1, "text");
|
|
6786
|
+
else this.focus.set(sibling.__key, 1, "text");
|
|
6787
|
+
this.dirty = true;
|
|
6788
|
+
return;
|
|
6768
6789
|
}
|
|
6769
|
-
} else {
|
|
6770
|
-
const sibLen = sibling.getTextContentSize();
|
|
6771
|
-
if (isBackward) this.focus.set(sibling.__key, sibLen - 1, "text");
|
|
6772
|
-
else this.focus.set(sibling.__key, 1, "text");
|
|
6773
|
-
this.dirty = true;
|
|
6774
|
-
return;
|
|
6775
6790
|
}
|
|
6776
6791
|
}
|
|
6777
6792
|
}
|
|
@@ -7313,8 +7328,10 @@ function $updateCaretSelectionForUnicodeCharacter(selection, isBackward) {
|
|
|
7313
7328
|
const endOffset = isBefore ? focusOffset : anchorOffset;
|
|
7314
7329
|
const characterOffset = endOffset - 1;
|
|
7315
7330
|
if (startOffset !== characterOffset) {
|
|
7316
|
-
if (shouldDeleteExactlyOneCodeUnit(anchorNode.getTextContent().slice(startOffset, endOffset)))
|
|
7317
|
-
|
|
7331
|
+
if (shouldDeleteExactlyOneCodeUnit(anchorNode.getTextContent().slice(startOffset, endOffset))) {
|
|
7332
|
+
if (isBackward) focus.set(focus.key, characterOffset, focus.type);
|
|
7333
|
+
else anchor.set(anchor.key, characterOffset, anchor.type);
|
|
7334
|
+
}
|
|
7318
7335
|
}
|
|
7319
7336
|
}
|
|
7320
7337
|
}
|
|
@@ -8008,10 +8025,12 @@ function $getNodesFromCaretRangeCompat(range) {
|
|
|
8008
8025
|
}
|
|
8009
8026
|
while (nodes.length > 1) {
|
|
8010
8027
|
const lastIncludedNode = nodes[nodes.length - 1];
|
|
8011
|
-
if ($isElementNode(lastIncludedNode))
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8028
|
+
if ($isElementNode(lastIncludedNode)) {
|
|
8029
|
+
if (seenElements.has(lastIncludedNode) || lastIncludedNode.isEmpty() || seenAncestors.has(lastIncludedNode));
|
|
8030
|
+
else {
|
|
8031
|
+
nodes.pop();
|
|
8032
|
+
continue;
|
|
8033
|
+
}
|
|
8015
8034
|
}
|
|
8016
8035
|
break;
|
|
8017
8036
|
}
|
|
@@ -8605,9 +8624,11 @@ function $beginUpdate(editor, updateFn, options) {
|
|
|
8605
8624
|
const headless = editor._headless || editor.getRootElement() === null;
|
|
8606
8625
|
setPendingNodeToClone(null);
|
|
8607
8626
|
try {
|
|
8608
|
-
if (editorStateWasCloned)
|
|
8609
|
-
if (
|
|
8610
|
-
|
|
8627
|
+
if (editorStateWasCloned) {
|
|
8628
|
+
if (headless) {
|
|
8629
|
+
if (currentEditorState._selection !== null) pendingEditorState._selection = currentEditorState._selection.clone();
|
|
8630
|
+
} else pendingEditorState._selection = $internalCreateSelection(editor, options && options.event || null);
|
|
8631
|
+
}
|
|
8611
8632
|
const startingCompositionKey = editor._compositionKey;
|
|
8612
8633
|
updateFn();
|
|
8613
8634
|
skipTransforms = $processNestedUpdates(editor, skipTransforms);
|
|
@@ -8667,11 +8688,12 @@ function $beginUpdate(editor, updateFn, options) {
|
|
|
8667
8688
|
* within an update
|
|
8668
8689
|
*/
|
|
8669
8690
|
function updateEditorSync(editor, updateFn, options) {
|
|
8670
|
-
if (activeEditor === editor && options === void 0)
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8691
|
+
if (activeEditor === editor && options === void 0) {
|
|
8692
|
+
if (isCurrentlyReadOnlyMode()) {
|
|
8693
|
+
console.warn("updateEditorSync: an editor update (e.g. a command listener that mutates the editor) ran while a read-only context was on the stack. This most commonly happens when a command is dispatched from inside editor.read(). The update has been deferred to a fresh writable update so it still applies, but dispatching mutations from a read-only context is an anti-pattern — dispatch after editor.read() returns, or via queueMicrotask.");
|
|
8694
|
+
$beginUpdate(editor, updateFn, options);
|
|
8695
|
+
} else updateFn();
|
|
8696
|
+
} else $beginUpdate(editor, updateFn, options);
|
|
8675
8697
|
}
|
|
8676
8698
|
function updateEditor(editor, updateFn, options) {
|
|
8677
8699
|
if (editor._updating) editor._updates.push([updateFn, options]);
|
|
@@ -9114,10 +9136,12 @@ var ElementNode = class extends LexicalNode {
|
|
|
9114
9136
|
const nodeAfterRange = this.getChildAtIndex(start + deleteCount);
|
|
9115
9137
|
let nodeBeforeRange = null;
|
|
9116
9138
|
let newSize = oldSize - deleteCount + nodesToInsert.length;
|
|
9117
|
-
if (start !== 0)
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9139
|
+
if (start !== 0) {
|
|
9140
|
+
if (start === oldSize) nodeBeforeRange = this.getLastChild();
|
|
9141
|
+
else {
|
|
9142
|
+
const node = this.getChildAtIndex(start);
|
|
9143
|
+
if (node !== null) nodeBeforeRange = node.getPreviousSibling();
|
|
9144
|
+
}
|
|
9121
9145
|
}
|
|
9122
9146
|
if (deleteCount > 0) {
|
|
9123
9147
|
let nodeToDelete = nodeBeforeRange === null ? this.getFirstChild() : nodeBeforeRange.getNextSibling();
|
|
@@ -10561,8 +10585,10 @@ var LexicalEditor = class {
|
|
|
10561
10585
|
const root = $getRoot();
|
|
10562
10586
|
if (selection !== null) {
|
|
10563
10587
|
if (!selection.dirty) $setSelection(selection.clone());
|
|
10564
|
-
} else if (root.getChildrenSize() !== 0)
|
|
10565
|
-
|
|
10588
|
+
} else if (root.getChildrenSize() !== 0) {
|
|
10589
|
+
if (options.defaultSelection === "rootStart") root.selectStart();
|
|
10590
|
+
else root.selectEnd();
|
|
10591
|
+
}
|
|
10566
10592
|
$addUpdateTag(FOCUS_TAG);
|
|
10567
10593
|
$onUpdate(() => {
|
|
10568
10594
|
rootElement.removeAttribute("autocapitalize");
|
|
@@ -10778,8 +10804,10 @@ function errorOnNodeKeyConstructorMismatch(node, existingKey, pendingNode) {
|
|
|
10778
10804
|
if (pendingNode) {
|
|
10779
10805
|
if (!(existingKey === pendingNode.__key)) formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} (type ${node.getType()}) has an incorrect clone implementation, got ${String(existingKey)} for nodeKey when expecting ${pendingNode.__key}`);
|
|
10780
10806
|
}
|
|
10781
|
-
if (existingNode && existingNode.constructor !== node.constructor)
|
|
10782
|
-
|
|
10807
|
+
if (existingNode && existingNode.constructor !== node.constructor) {
|
|
10808
|
+
if (node.constructor.name !== existingNode.constructor.name) formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} attempted to re-use key from node in active editor state with constructor ${existingNode.constructor.name}. Keys must not be re-used when the type is changed.`);
|
|
10809
|
+
else formatDevErrorMessage(`Lexical node with constructor ${node.constructor.name} attempted to re-use key from node in active editor state with different constructor with the same name (possibly due to invalid Hot Module Replacement). Keys must not be re-used when the type is changed.`);
|
|
10810
|
+
}
|
|
10783
10811
|
}
|
|
10784
10812
|
function internalMarkParentElementsAsDirty(parentKey, nodeMap, dirtyElements) {
|
|
10785
10813
|
let nextParentKey = parentKey;
|
|
@@ -11428,13 +11456,15 @@ function scrollIntoViewIfNeeded(editor, selectionRect, rootElement) {
|
|
|
11428
11456
|
let diff = 0;
|
|
11429
11457
|
if (currentTop < targetTop) diff = -(targetTop - currentTop);
|
|
11430
11458
|
else if (currentBottom > targetBottom) diff = currentBottom - targetBottom;
|
|
11431
|
-
if (diff !== 0)
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11459
|
+
if (diff !== 0) {
|
|
11460
|
+
if (isBodyElement) defaultView.scrollBy(0, diff);
|
|
11461
|
+
else {
|
|
11462
|
+
const scrollTop = element.scrollTop;
|
|
11463
|
+
element.scrollTop += diff;
|
|
11464
|
+
const yOffset = element.scrollTop - scrollTop;
|
|
11465
|
+
currentTop -= yOffset;
|
|
11466
|
+
currentBottom -= yOffset;
|
|
11467
|
+
}
|
|
11438
11468
|
}
|
|
11439
11469
|
if (isBodyElement) break;
|
|
11440
11470
|
element = getParentElement(element);
|
|
@@ -12441,17 +12471,19 @@ function getStaticNodeConfig(klass) {
|
|
|
12441
12471
|
const nodeType = ownGetType && !(SYNTHESIZED_GET_TYPE in ownGetType) ? ownGetType.call(klass) : void 0;
|
|
12442
12472
|
let ownNodeConfig;
|
|
12443
12473
|
let ownNodeType = nodeType;
|
|
12444
|
-
if (nodeConfigRecord)
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
|
|
12448
|
-
|
|
12449
|
-
|
|
12450
|
-
|
|
12451
|
-
const
|
|
12452
|
-
|
|
12453
|
-
|
|
12454
|
-
|
|
12474
|
+
if (nodeConfigRecord) {
|
|
12475
|
+
if (nodeType) ownNodeConfig = nodeConfigRecord[nodeType];
|
|
12476
|
+
else {
|
|
12477
|
+
for (const [k, v] of Object.entries(nodeConfigRecord)) {
|
|
12478
|
+
ownNodeType = k;
|
|
12479
|
+
ownNodeConfig = v;
|
|
12480
|
+
}
|
|
12481
|
+
if (!ownNodeConfig) for (const symbolKey of Object.getOwnPropertySymbols(nodeConfigRecord)) {
|
|
12482
|
+
const symbolConfig = nodeConfigRecord[symbolKey];
|
|
12483
|
+
if (symbolConfig) {
|
|
12484
|
+
ownNodeConfig = symbolConfig;
|
|
12485
|
+
break;
|
|
12486
|
+
}
|
|
12455
12487
|
}
|
|
12456
12488
|
}
|
|
12457
12489
|
}
|
|
@@ -13696,9 +13728,10 @@ function $setPointFromCaret(point, caret) {
|
|
|
13696
13728
|
const { origin, direction } = caret;
|
|
13697
13729
|
const isNext = direction === "next";
|
|
13698
13730
|
if ($isTextPointCaret(caret)) point.set(origin.getKey(), caret.offset, "text");
|
|
13699
|
-
else if ($isSiblingCaret(caret))
|
|
13700
|
-
|
|
13701
|
-
|
|
13731
|
+
else if ($isSiblingCaret(caret)) {
|
|
13732
|
+
if ($isTextNode(origin)) point.set(origin.getKey(), $getTextNodeOffset(origin, direction), "text");
|
|
13733
|
+
else point.set(origin.getParentOrThrow().getKey(), origin.getIndexWithinParent() + (isNext ? 1 : 0), "element");
|
|
13734
|
+
} else {
|
|
13702
13735
|
if (!($isChildCaret(caret) && $isElementNode(origin))) formatDevErrorMessage(`$setPointFromCaret: exhaustiveness check`);
|
|
13703
13736
|
point.set(origin.getKey(), isNext ? 0 : origin.getChildrenSize(), "element");
|
|
13704
13737
|
}
|
|
@@ -13889,8 +13922,8 @@ function $getBlockMergeTargets(anchor, focus, seenStart) {
|
|
|
13889
13922
|
const focusElements = focusParent.getParents().reverse();
|
|
13890
13923
|
focusElements.push(focusParent);
|
|
13891
13924
|
const maxLen = Math.min(anchorElements.length, focusElements.length);
|
|
13892
|
-
let commonAncestorCount;
|
|
13893
|
-
for (
|
|
13925
|
+
let commonAncestorCount = 0;
|
|
13926
|
+
for (; commonAncestorCount < maxLen && anchorElements[commonAncestorCount] === focusElements[commonAncestorCount]; commonAncestorCount++);
|
|
13894
13927
|
const $getBlock = (arr, predicate) => {
|
|
13895
13928
|
let block;
|
|
13896
13929
|
for (let i = commonAncestorCount; i < arr.length; i++) {
|
|
@@ -6,7 +6,7 @@
|
|
|
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("./Lexical.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./Lexical.dev-Df5TNMgP.mjs") : import("./Lexical.prod-DRFSwoE7.mjs"));
|
|
10
10
|
const $addUpdateTag = mod.$addUpdateTag;
|
|
11
11
|
const $applyNodeReplacement = mod.$applyNodeReplacement;
|
|
12
12
|
const $assumeActiveEditor = mod.$assumeActiveEditor;
|
|
@@ -50,8 +50,10 @@ const M = 6;
|
|
|
50
50
|
const A = a || l || d ? "\xA0" : "";
|
|
51
51
|
const D = "\n\n";
|
|
52
52
|
const F = i ? "\xA0" : A;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
53
|
+
const P = "֑-߿יִ-﷽ﹰ-ﻼ";
|
|
54
|
+
const I = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--";
|
|
55
|
+
const L = new RegExp("^[^" + I + "]*[" + P + "]");
|
|
56
|
+
const K = new RegExp("^[^" + P + "]*[" + I + "]");
|
|
55
57
|
const z = {
|
|
56
58
|
bold: 1,
|
|
57
59
|
capitalize: 1024,
|
|
@@ -6996,8 +6998,8 @@ function cu(e, n = "removeEmptySlices") {
|
|
|
6996
6998
|
const s = r.getParents().reverse();
|
|
6997
6999
|
s.push(r);
|
|
6998
7000
|
const l = Math.min(i.length, s.length);
|
|
6999
|
-
let c;
|
|
7000
|
-
for (
|
|
7001
|
+
let c = 0;
|
|
7002
|
+
for (; c < l && i[c] === s[c]; c++);
|
|
7001
7003
|
const a = (t, e) => {
|
|
7002
7004
|
let n;
|
|
7003
7005
|
for (let o = c; o < t.length; o++) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-
|
|
2
|
-
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-
|
|
3
|
-
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-
|
|
4
|
-
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-
|
|
5
|
-
import { m as objectKlassEquals } from "./LexicalUtils.node-
|
|
1
|
+
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-3nsS5NjU.mjs";
|
|
2
|
+
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-B064E4Hy.mjs";
|
|
3
|
+
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-DAwuaPeI.mjs";
|
|
4
|
+
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-BCuHMbzl.mjs";
|
|
5
|
+
import { m as objectKlassEquals } from "./LexicalUtils.node-BPKMFN80.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@lexical+clipboard@0.49.0_typescript@6.0.3/node_modules/@lexical/clipboard/dist/LexicalClipboard.dev.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -240,7 +240,8 @@ const $defaultLexicalEditorImporter = (data, selection, $next) => {
|
|
|
240
240
|
const $defaultHtmlImporter = (data, selection, $next) => {
|
|
241
241
|
try {
|
|
242
242
|
const editor = $getEditor();
|
|
243
|
-
|
|
243
|
+
const dom = new DOMParser().parseFromString(trustHTML(data), "text/html");
|
|
244
|
+
$insertGeneratedNodes(editor, $generateNodesFromDOM(editor, dom), selection);
|
|
244
245
|
return true;
|
|
245
246
|
} catch (error) {
|
|
246
247
|
console.error(error);
|
|
@@ -459,7 +460,8 @@ const ClipboardImportExtension = /* @__PURE__ */ defineExtension({
|
|
|
459
460
|
*/
|
|
460
461
|
const ClipboardDOMImportExtension = /* @__PURE__ */ defineExtension({
|
|
461
462
|
dependencies: [CoreImportExtension, /* @__PURE__ */ configExtension(ClipboardImportExtension, { $importMimeType: { "text/html": [(html, selection, _$next, dataTransfer) => {
|
|
462
|
-
const
|
|
463
|
+
const dom = new DOMParser().parseFromString(trustHTML(html), "text/html");
|
|
464
|
+
const nodes = $generateNodesFromDOMViaExtension(dom, { context: [contextValue(ImportSource, "paste"), contextValue(ImportSourceDataTransfer, dataTransfer)] });
|
|
463
465
|
$insertGeneratedNodes($getEditor(), nodes, selection);
|
|
464
466
|
return true;
|
|
465
467
|
}] } })],
|
|
@@ -657,13 +659,15 @@ function $updateSelectionOnInsert(selection) {
|
|
|
657
659
|
const anchor = selection.anchor;
|
|
658
660
|
let nodeToInspect = null;
|
|
659
661
|
const anchorCaret = $caretFromPoint(anchor, "previous");
|
|
660
|
-
if (anchorCaret)
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
662
|
+
if (anchorCaret) {
|
|
663
|
+
if ($isTextPointCaret(anchorCaret)) nodeToInspect = anchorCaret.origin;
|
|
664
|
+
else {
|
|
665
|
+
const range = $getCaretRange(anchorCaret, $getChildCaret($getRoot(), "next").getFlipped());
|
|
666
|
+
for (const caret of range) if ($isTextNode(caret.origin)) {
|
|
667
|
+
nodeToInspect = caret.origin;
|
|
668
|
+
break;
|
|
669
|
+
} else if ($isElementNode(caret.origin) && !caret.origin.isInline()) break;
|
|
670
|
+
}
|
|
667
671
|
}
|
|
668
672
|
if (nodeToInspect && $isTextNode(nodeToInspect)) {
|
|
669
673
|
const newFormat = nodeToInspect.getFormat();
|
|
@@ -6,7 +6,7 @@
|
|
|
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("./LexicalClipboard.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalClipboard.dev-ClOWeg5v.mjs") : import("./LexicalClipboard.prod-Ytt65eQo.mjs"));
|
|
10
10
|
mod.$exportMimeTypeFromSelection;
|
|
11
11
|
mod.$generateJSONFromSelectedNodes;
|
|
12
12
|
mod.$generateNodesFromSerializedNodes;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-
|
|
2
|
-
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-
|
|
3
|
-
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-
|
|
4
|
-
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-
|
|
5
|
-
import { m as objectKlassEquals } from "./LexicalUtils.node-
|
|
1
|
+
import { c as configExtension, d as getPeerDependencyFromEditor, r as $getPeerDependency } from "./LexicalExtension.node-3nsS5NjU.mjs";
|
|
2
|
+
import { $r as isHTMLElement, A as $getChildCaret, Br as getRootOwnerDocument, Ct as $isTextPointCaret, D as $getCaretRange, Er as findAllLexicalElementsDeep, G as $getSelection, Ir as getEditorPropertyFromDOMNode, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jr as isDOMShadowRoot, L as $getEditor, Mr as getDOMSelectionPoints, N as $getCollapsedCaretRange, O as $getCaretRangeInDirection, Ot as $parseSerializedNode, Pr as getDOMShadowRoots, Q as $getTextPointCaret, Rr as getParentElement, St as $isTextNode, Tr as defineExtension, W as $getRoot, X as $getSlotNames, Xt as COMMAND_PRIORITY_CRITICAL, _ as $createTabNode, _i as shallowMergeConfig, a as $caretRangeFromSelection, ai as isSelectionWithinEditor, bi as tokenizeRawText, c as $comparePointCaretNext, ft as $isNodeSelection, i as $caretFromPoint, in as COPY_COMMAND, j as $getChildCaretAtIndex, jr as getDOMSelection, lr as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND, mt as $isRangeSelection, ot as $isElementNode, pi as safeCast, q as $getSlot, ri as isLexicalEditor, z as $getNearestNodeFromDOMNode, zt as $splitAtPointCaretNext } from "./Lexical.node-B064E4Hy.mjs";
|
|
3
|
+
import { c as CoreImportExtension, d as ImportSource, f as ImportSourceDataTransfer, h as contextValue, i as $generateNodesFromDOMViaExtension, n as $generateHtmlFromNodes, r as $generateNodesFromDOM } from "./LexicalHtml.node-DAwuaPeI.mjs";
|
|
4
|
+
import { a as $sliceSelectedTextNodeContent } from "./LexicalSelection.node-BCuHMbzl.mjs";
|
|
5
|
+
import { m as objectKlassEquals } from "./LexicalUtils.node-BPKMFN80.mjs";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@lexical+clipboard@0.49.0_typescript@6.0.3/node_modules/@lexical/clipboard/dist/LexicalClipboard.prod.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -33,7 +33,7 @@ function et(r, i, l = null) {
|
|
|
33
33
|
if (null !== e && l.contains(e)) {
|
|
34
34
|
const t = function(t, e, n, o) {
|
|
35
35
|
const r = o.createRange(), i = (t) => e < t.top ? t.top - e : e > t.bottom ? e - t.bottom : 0, l = (e) => t < e.left ? e.left - t : t > e.right ? t - e.right : 0, c = o.createTreeWalker(n, NodeFilter.SHOW_TEXT);
|
|
36
|
-
let s = null, u =
|
|
36
|
+
let s = null, u = 1 / 0, a = 1 / 0;
|
|
37
37
|
for (let t = c.nextNode(); t; t = c.nextNode()) {
|
|
38
38
|
r.selectNodeContents(t);
|
|
39
39
|
for (const e of r.getClientRects()) {
|
|
@@ -42,7 +42,7 @@ function et(r, i, l = null) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
if (null === s) return null;
|
|
45
|
-
let f = 0, p =
|
|
45
|
+
let f = 0, p = 1 / 0, d = 1 / 0;
|
|
46
46
|
for (let e = 0; e <= s.length; e++) {
|
|
47
47
|
r.setStart(s, e), r.collapse(!0);
|
|
48
48
|
const n = r.getBoundingClientRect(), o = i(n), l = Math.abs(t - n.left);
|
|
@@ -113,8 +113,8 @@ const lt = {
|
|
|
113
113
|
}],
|
|
114
114
|
"text/html": [(t, e, n) => {
|
|
115
115
|
try {
|
|
116
|
-
const n = $getEditor();
|
|
117
|
-
return Mt(n, $generateNodesFromDOM(n,
|
|
116
|
+
const n = $getEditor(), o = new DOMParser().parseFromString(rt(t), "text/html");
|
|
117
|
+
return Mt(n, $generateNodesFromDOM(n, o), e), !0;
|
|
118
118
|
} catch (t) {
|
|
119
119
|
return console.error(t), n();
|
|
120
120
|
}
|
|
@@ -177,7 +177,7 @@ const at = /* @__PURE__ */ defineExtension({
|
|
|
177
177
|
});
|
|
178
178
|
const ft = /* @__PURE__ */ defineExtension({
|
|
179
179
|
dependencies: [CoreImportExtension, /* @__PURE__ */ configExtension(at, { $importMimeType: { "text/html": [(t, e, n, o) => {
|
|
180
|
-
const
|
|
180
|
+
const r = new DOMParser().parseFromString(rt(t), "text/html"), l = $generateNodesFromDOMViaExtension(r, { context: [contextValue(ImportSource, "paste"), contextValue(ImportSourceDataTransfer, o)] });
|
|
181
181
|
return Mt($getEditor(), l, e), !0;
|
|
182
182
|
}] } })],
|
|
183
183
|
name: "@lexical/clipboard/DOMImport"
|