@mx-space/cli 0.14.1 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.dev-DTxuYHmG.mjs → Lexical.dev-CtGmYDoh.mjs} +770 -271
- package/dist/{Lexical.node-BlCLnfA6.mjs → Lexical.node-8sRFmq2X.mjs} +15 -5
- package/dist/Lexical.prod-D-VfeKDz.mjs +7200 -0
- package/dist/{LexicalClipboard.dev-CdFkLR_D.mjs → LexicalClipboard.dev-CzQ15z6E.mjs} +6 -6
- package/dist/{LexicalClipboard.node-ktUajxsv.mjs → LexicalClipboard.node-D4gMGws6.mjs} +2 -2
- package/dist/{LexicalClipboard.prod-DliyLofW.mjs → LexicalClipboard.prod-CltkQpzS.mjs} +10 -8
- package/dist/{LexicalCodeCore.dev-CL9tHWJX.mjs → LexicalCodeCore.dev-DkYBZRGB.mjs} +11 -9
- package/dist/{LexicalCodeCore.prod-BoMSJc29.mjs → LexicalCodeCore.prod-COc3_QL8.mjs} +178 -167
- package/dist/{LexicalDragon.dev-CqW7Aq5H.mjs → LexicalDragon.dev-Dv5_WUae.mjs} +3 -3
- package/dist/{LexicalDragon.node-DLXctJyy.mjs → LexicalDragon.node-DgjrmWkd.mjs} +2 -2
- package/dist/{LexicalDragon.prod-DHI3T6n5.mjs → LexicalDragon.prod-DnpbDe-_.mjs} +5 -4
- package/dist/{LexicalExtension.dev-BP-18zns.mjs → LexicalExtension.dev-JMH_6-OZ.mjs} +73 -52
- package/dist/{LexicalExtension.node-BWH6xbzG.mjs → LexicalExtension.node-BUozzx4t.mjs} +4 -2
- package/dist/{LexicalExtension.prod-Cs6OgrDn.mjs → LexicalExtension.prod-UiyDgmou.mjs} +370 -347
- package/dist/{LexicalHeadless.dev-DJp__UcP.mjs → LexicalHeadless.dev-BfLGciiX.mjs} +2 -2
- package/dist/{LexicalHeadless.prod-o0v9cIu5.mjs → LexicalHeadless.prod-CWF7edmQ.mjs} +2 -2
- package/dist/{LexicalHtml.dev-DoymwFpG.mjs → LexicalHtml.dev-D5EF5PGW.mjs} +13 -11
- package/dist/{LexicalHtml.node-CVkbWtUA.mjs → LexicalHtml.node-BYbzHNVe.mjs} +4 -4
- package/dist/{LexicalHtml.prod-C2b3z99k.mjs → LexicalHtml.prod-D_FfkvVD.mjs} +330 -299
- package/dist/{LexicalLink.dev-7cgLOLIe.mjs → LexicalLink.dev-D3Pgh6ik.mjs} +53 -23
- package/dist/{LexicalLink.prod-DWFgoXHR.mjs → LexicalLink.prod-XZoAYVYD.mjs} +217 -198
- package/dist/{LexicalList.dev-Ci2iOxFx.mjs → LexicalList.dev-B5d3ObhB.mjs} +49 -44
- package/dist/LexicalList.prod-OQDpVAEb.mjs +967 -0
- package/dist/{LexicalMarkdown.dev-C0ZYCyuR.mjs → LexicalMarkdown.dev-BkM8G3DG.mjs} +61 -42
- package/dist/{LexicalMarkdown.prod-0M-Nc-rh.mjs → LexicalMarkdown.prod-DcVXCex6.mjs} +254 -202
- package/dist/{LexicalRichText.dev-Cnr1kDym.mjs → LexicalRichText.dev-DppD7IrA.mjs} +337 -52
- package/dist/{LexicalRichText.node-BUJZAiap.mjs → LexicalRichText.node-CPSn7dkg.mjs} +12 -8
- package/dist/LexicalRichText.prod-h7JPxFNp.mjs +718 -0
- package/dist/{LexicalSelection.dev-C4L7l8OB.mjs → LexicalSelection.dev-CD0SLbxP.mjs} +48 -17
- package/dist/{LexicalSelection.node-CLKroUMQ.mjs → LexicalSelection.node-CGlJgUlZ.mjs} +5 -4
- package/dist/{LexicalSelection.prod-DzFqpTlw.mjs → LexicalSelection.prod-DbVZN5AV.mjs} +101 -92
- package/dist/{LexicalTable.dev-Cc9-zqKa.mjs → LexicalTable.dev-D0HU14UV.mjs} +340 -138
- package/dist/LexicalTable.prod-BcPNSrxP.mjs +2468 -0
- package/dist/{LexicalUtils.dev-BRgK0L6G.mjs → LexicalUtils.dev-iKy_TrRT.mjs} +15 -19
- package/dist/{LexicalUtils.node-BVAwOkL4.mjs → LexicalUtils.node-CIgMS8cG.mjs} +6 -6
- package/dist/{LexicalUtils.prod-C1gtvVDP.mjs → LexicalUtils.prod-DIAsKJzu.mjs} +155 -159
- package/dist/bin/mxs.mjs +1 -1
- package/dist/esm-CH7CrOvh.mjs +2 -0
- package/dist/{esm-BNu4sUWV.mjs → esm-CwXl1N0a.mjs} +1801 -6013
- package/dist/index.d.mts +57 -62
- package/dist/index.mjs +1 -1
- package/dist/{mxs-CMX2yklg.mjs → mxs-iW9DgqSZ.mjs} +14930 -9234
- package/dist/rolldown-runtime-JspESFgx.mjs +35 -0
- package/dist/vendor/litexml/cli.mjs +6693 -5762
- package/dist/vendor/litexml/litexml-html-preview-client.js +11912 -8698
- package/package.json +31 -30
- package/LICENSE +0 -33
- package/dist/Lexical.prod-CeB9UQuo.mjs +0 -6816
- package/dist/LexicalList.prod-D0xX5d3G.mjs +0 -944
- package/dist/LexicalRichText.prod-BfbMQ9uM.mjs +0 -538
- package/dist/LexicalTable.prod-BgO4nCxy.mjs +0 -2336
- package/dist/esm-jbwcVZth.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-
|
|
2
|
-
import {
|
|
3
|
-
//#region ../../node_modules/.pnpm/@lexical+dragon@0.
|
|
1
|
+
import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-BUozzx4t.mjs";
|
|
2
|
+
import { G as $getSelection, Ir as getEditorPropertyFromDOMNode, St as $isTextNode, Tr as defineExtension, kr as getActiveElementDeep, mt as $isRangeSelection, pi as safeCast, ri as isLexicalEditor } from "./Lexical.node-8sRFmq2X.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@lexical+dragon@0.48.0_typescript@6.0.3/node_modules/@lexical/dragon/dist/LexicalDragon.dev.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
6
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@lexical+dragon@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@lexical+dragon@0.48.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,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("./LexicalDragon.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalDragon.dev-Dv5_WUae.mjs") : import("./LexicalDragon.prod-DnpbDe-_.mjs"));
|
|
10
10
|
const DragonExtension = mod.DragonExtension;
|
|
11
11
|
mod.installDragonSupport;
|
|
12
12
|
mod.registerDragonSupport;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-
|
|
2
|
-
import {
|
|
3
|
-
//#region ../../node_modules/.pnpm/@lexical+dragon@0.
|
|
1
|
+
import { f as namedSignals, l as effect, m as watchedSignal } from "./LexicalExtension.node-BUozzx4t.mjs";
|
|
2
|
+
import { G as $getSelection, Ir as getEditorPropertyFromDOMNode, St as $isTextNode, Tr as defineExtension, kr as getActiveElementDeep, mt as $isRangeSelection, pi as safeCast, ri as isLexicalEditor } from "./Lexical.node-8sRFmq2X.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@lexical+dragon@0.48.0_typescript@6.0.3/node_modules/@lexical/dragon/dist/LexicalDragon.prod.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
6
|
*
|
|
@@ -15,7 +15,8 @@ const c = {
|
|
|
15
15
|
subscript: "subscript",
|
|
16
16
|
superscript: "superscript",
|
|
17
17
|
underline: "underline"
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
|
+
const f = Symbol.for("@lexical/dragon/WindowState");
|
|
19
20
|
function g(e = function() {
|
|
20
21
|
return "undefined" != typeof window ? window : void 0;
|
|
21
22
|
}()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as $getChildCaret, Ct as $
|
|
2
|
-
import { a as $handleIndentAndOutdent, c as $isBlockFullySelected,
|
|
3
|
-
//#region ../../node_modules/.pnpm/@lexical+extension@0.
|
|
1
|
+
import { $n as LineBreakNode, $r as isHTMLElement, $t as COMMAND_PRIORITY_LOW, A as $getChildCaret, At as $rewindSiblingCaret, B as $getNodeByKey, Cr as createState, Ct as $isTextPointCaret, D as $getCaretRange, Dt as $normalizeSelection__EXPERIMENTAL, Et as $normalizeCaret, Ft as $setSelection, G as $getSelection, Gt as CLEAR_EDITOR_COMMAND, H as $getNodeFromDOMNode, I as $getDocument, It as $setSelectionFromCaretRange, J as $getSlotFrame, Jt as COMMAND_PRIORITY_BEFORE_CRITICAL, K as $getSiblingCaret, Kt as CLICK_COMMAND, L as $getEditor, Lt as $setState, O as $getCaretRangeInDirection, Or as getActiveElement, Qn as KEY_TAB_COMMAND, Sn as INDENT_CONTENT_COMMAND, Sr as createEditor, St as $isTextNode, Tn as INSERT_TAB_COMMAND, Tr as defineExtension, U as $getPreviousSelection, Vr as getStaticNodeConfig, Vt as $updateDOMSelection, W as $getRoot, Xt as COMMAND_PRIORITY_CRITICAL, Y as $getSlotHost, Yt as COMMAND_PRIORITY_BEFORE_EDITOR, Z as $getState, Zr as isExactShortcutMatch, Zt as COMMAND_PRIORITY_EDITOR, _i as shallowMergeConfig, _r as TextNode, a as $caretRangeFromSelection, ar as ParagraphNode, at as $isEditorState, bn as HISTORY_MERGE_TAG, br as configExtension, ci as mergeRegister, cr as SELECTION_CHANGE_COMMAND, di as registerEventListeners, dt as $isLineBreakNode, f as $createNodeSelection, fi as removeClassNamesFromElement, ft as $isNodeSelection, gr as TabNode, h as $createRangeSelection, hn as ElementNode, hr as TEXT_TYPE_TO_FORMAT, ht as $isRootNode, it as $isDecoratorNode, jr as getDOMSelection, jt as $selectAll, kn as IS_APPLE, mn as DecoratorNode, mr as SKIP_SELECTION_FOCUS_TAG, mt as $isRangeSelection, nn as COMPOSITION_START_TAG, nr as OUTDENT_CONTENT_COMMAND, nt as $isBlockElementNode, ot as $isElementNode, p as $createParagraphNode, pi as safeCast, pr as SKIP_SCROLL_INTO_VIEW_TAG, qr as isDOMNode, rt as $isChildCaret, sr as RootNode, tn as COMPOSITION_START_COMMAND, u as $create, ui as registerEventListener, ur as SELECT_ALL_COMMAND, vi as stopLexicalPropagation, vr as addClassNamesToElement, wr as declarePeerDependency, xr as createCommand, yi as toggleTextFormatType, yt as $isSiblingCaret, zr as getRegisteredSubtypeMap } from "./Lexical.node-8sRFmq2X.mjs";
|
|
2
|
+
import { a as $handleIndentAndOutdent, c as $isBlockFullySelected, h as selectionAlwaysOnDisplay, r as $getNearestBlockElementAncestorOrThrow, s as $insertNodeToNearestRoot } from "./LexicalUtils.node-CIgMS8cG.mjs";
|
|
3
|
+
//#region ../../node_modules/.pnpm/@lexical+extension@0.48.0_typescript@6.0.3/node_modules/@lexical/extension/dist/LexicalExtension.dev.mjs
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
6
|
*
|
|
@@ -56,7 +56,8 @@ function n(i) {
|
|
|
56
56
|
t();
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
let o
|
|
59
|
+
let o;
|
|
60
|
+
let s;
|
|
60
61
|
function h(i) {
|
|
61
62
|
const t = o;
|
|
62
63
|
o = void 0;
|
|
@@ -66,7 +67,12 @@ function h(i) {
|
|
|
66
67
|
o = t;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
let r
|
|
70
|
+
let r;
|
|
71
|
+
let e = 0;
|
|
72
|
+
let u = 0;
|
|
73
|
+
let c = 0;
|
|
74
|
+
let d = 0;
|
|
75
|
+
let v = 0;
|
|
70
76
|
function l(i) {
|
|
71
77
|
if (void 0 === o) return;
|
|
72
78
|
let t = i.n;
|
|
@@ -482,8 +488,8 @@ function $defaultOnClear() {
|
|
|
482
488
|
if ($isRangeSelection(selection)) selection.format = 0;
|
|
483
489
|
}
|
|
484
490
|
function registerClearEditor(editor, $onClear = $defaultOnClear) {
|
|
485
|
-
return editor.registerCommand(CLEAR_EDITOR_COMMAND, (
|
|
486
|
-
|
|
491
|
+
return editor.registerCommand(CLEAR_EDITOR_COMMAND, () => {
|
|
492
|
+
$onClear();
|
|
487
493
|
return true;
|
|
488
494
|
}, COMMAND_PRIORITY_EDITOR);
|
|
489
495
|
}
|
|
@@ -596,12 +602,10 @@ const ClickAfterLastBlockExtension = /* @__PURE__ */ defineExtension({
|
|
|
596
602
|
paragraph.select();
|
|
597
603
|
});
|
|
598
604
|
};
|
|
599
|
-
rootElement
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
rootElement.removeEventListener("click", onClick, true);
|
|
604
|
-
};
|
|
605
|
+
return registerEventListeners(rootElement, {
|
|
606
|
+
click: onClick,
|
|
607
|
+
mousedown: onMouseDown
|
|
608
|
+
}, true);
|
|
605
609
|
});
|
|
606
610
|
})
|
|
607
611
|
});
|
|
@@ -646,6 +650,10 @@ function getNodeConfig(config) {
|
|
|
646
650
|
*/
|
|
647
651
|
const formatState = /* @__PURE__ */ createState("format", { parse: (value) => typeof value === "number" ? value : 0 });
|
|
648
652
|
var DecoratorTextNode = class extends DecoratorNode {
|
|
653
|
+
/** @internal */
|
|
654
|
+
get __isInlineFormattable() {
|
|
655
|
+
return true;
|
|
656
|
+
}
|
|
649
657
|
$config() {
|
|
650
658
|
return this.config("decorator-text", {
|
|
651
659
|
extends: DecoratorNode,
|
|
@@ -655,8 +663,8 @@ var DecoratorTextNode = class extends DecoratorNode {
|
|
|
655
663
|
}]
|
|
656
664
|
});
|
|
657
665
|
}
|
|
658
|
-
getFormat() {
|
|
659
|
-
return $getState(this, formatState);
|
|
666
|
+
getFormat(version) {
|
|
667
|
+
return $getState(this, formatState, version);
|
|
660
668
|
}
|
|
661
669
|
getFormatFlags(type, alignWithFormat) {
|
|
662
670
|
return toggleTextFormatType(this.getFormat(), type, alignWithFormat);
|
|
@@ -675,11 +683,8 @@ var DecoratorTextNode = class extends DecoratorNode {
|
|
|
675
683
|
isInline() {
|
|
676
684
|
return true;
|
|
677
685
|
}
|
|
678
|
-
createDOM() {
|
|
679
|
-
return
|
|
680
|
-
}
|
|
681
|
-
updateDOM() {
|
|
682
|
-
return false;
|
|
686
|
+
createDOM(config, editor) {
|
|
687
|
+
return $getDocument().createElement("span");
|
|
683
688
|
}
|
|
684
689
|
};
|
|
685
690
|
function $isDecoratorTextNode(node) {
|
|
@@ -722,11 +727,19 @@ function applyFormatFromStyle(lexicalNode, style, shouldApply) {
|
|
|
722
727
|
* @returns domNode
|
|
723
728
|
*/
|
|
724
729
|
function applyFormatToDom(lexicalNode, domNode, tagNameToFormat = DEFAULT_TAG_NAME_TO_FORMAT) {
|
|
725
|
-
|
|
726
|
-
|
|
730
|
+
let rval = domNode;
|
|
731
|
+
for (const [tag, format] of Object.entries(tagNameToFormat)) if (lexicalNode.hasFormat(format)) rval = wrapElementWith(rval, tag);
|
|
732
|
+
return rval;
|
|
727
733
|
}
|
|
734
|
+
/**
|
|
735
|
+
* @deprecated Use {@link applyFormatToDom} instead. The `$` prefix was a
|
|
736
|
+
* mistake in the 0.47 release: the implementation does not read any editor
|
|
737
|
+
* state, so the dollar convention does not apply. This alias is kept for
|
|
738
|
+
* compatibility with 0.47.
|
|
739
|
+
*/
|
|
740
|
+
const $applyFormatToDom = applyFormatToDom;
|
|
728
741
|
function wrapElementWith(element, tag) {
|
|
729
|
-
const el =
|
|
742
|
+
const el = element.ownerDocument.createElement(tag);
|
|
730
743
|
el.appendChild(element);
|
|
731
744
|
return el;
|
|
732
745
|
}
|
|
@@ -743,21 +756,11 @@ const DEFAULT_TAG_NAME_TO_FORMAT = {
|
|
|
743
756
|
u: "underline"
|
|
744
757
|
};
|
|
745
758
|
/**
|
|
746
|
-
* An extension
|
|
747
|
-
* The base class is always set, and the focus class is set when the node is selected.
|
|
759
|
+
* An extension that registers DecoratorTextNode with the editor.
|
|
748
760
|
*/
|
|
749
761
|
const DecoratorTextExtension = /* @__PURE__ */ defineExtension({
|
|
750
762
|
name: "@lexical/extension/DecoratorText",
|
|
751
|
-
nodes: () => [DecoratorTextNode]
|
|
752
|
-
register(editor, config, state) {
|
|
753
|
-
return editor.registerCommand(FORMAT_TEXT_COMMAND, (formatType) => {
|
|
754
|
-
const selection = $getSelection();
|
|
755
|
-
if ($isNodeSelection(selection) || $isRangeSelection(selection)) {
|
|
756
|
-
for (const node of selection.getNodes()) if ($isDecoratorTextNode(node)) node.toggleFormat(formatType);
|
|
757
|
-
}
|
|
758
|
-
return false;
|
|
759
|
-
}, COMMAND_PRIORITY_LOW);
|
|
760
|
-
}
|
|
763
|
+
nodes: () => [DecoratorTextNode]
|
|
761
764
|
});
|
|
762
765
|
/**
|
|
763
766
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -826,7 +829,7 @@ function formatDevErrorMessage(message) {
|
|
|
826
829
|
*/
|
|
827
830
|
let envLexicalVersion;
|
|
828
831
|
try {
|
|
829
|
-
envLexicalVersion = "0.
|
|
832
|
+
envLexicalVersion = "0.48.0+dev.esm";
|
|
830
833
|
} catch (_unused) {}
|
|
831
834
|
const LEXICAL_VERSION = envLexicalVersion ?? "\"<unknown>+source\"";
|
|
832
835
|
/**
|
|
@@ -1670,10 +1673,10 @@ var HorizontalRuleNode = class HorizontalRuleNode extends DecoratorNode {
|
|
|
1670
1673
|
}) };
|
|
1671
1674
|
}
|
|
1672
1675
|
exportDOM() {
|
|
1673
|
-
return { element:
|
|
1676
|
+
return { element: $getDocument().createElement("hr") };
|
|
1674
1677
|
}
|
|
1675
1678
|
createDOM(config) {
|
|
1676
|
-
const element =
|
|
1679
|
+
const element = $getDocument().createElement("hr");
|
|
1677
1680
|
addClassNamesToElement(element, config.theme.hr);
|
|
1678
1681
|
return element;
|
|
1679
1682
|
}
|
|
@@ -1842,10 +1845,7 @@ const IMEExtension = /* @__PURE__ */ defineExtension({
|
|
|
1842
1845
|
const onCompositionEnd = () => {
|
|
1843
1846
|
compositionKey.value = null;
|
|
1844
1847
|
};
|
|
1845
|
-
rootElem
|
|
1846
|
-
return () => {
|
|
1847
|
-
rootElem.removeEventListener("compositionend", onCompositionEnd);
|
|
1848
|
-
};
|
|
1848
|
+
return registerEventListener(rootElem, "compositionend", onCompositionEnd);
|
|
1849
1849
|
}));
|
|
1850
1850
|
}
|
|
1851
1851
|
});
|
|
@@ -2062,11 +2062,10 @@ const NormalizeTripleClickSelectionExtension = /* @__PURE__ */ defineExtension({
|
|
|
2062
2062
|
stores.$fixFocusOverselection.peek()();
|
|
2063
2063
|
}
|
|
2064
2064
|
return false;
|
|
2065
|
-
}, COMMAND_PRIORITY_BEFORE_CRITICAL), (
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
})());
|
|
2065
|
+
}, COMMAND_PRIORITY_BEFORE_CRITICAL), registerEventListeners(rootElement, {
|
|
2066
|
+
mousedown: refreshTripleClick,
|
|
2067
|
+
mouseup: refreshTripleClick
|
|
2068
|
+
}, true));
|
|
2070
2069
|
});
|
|
2071
2070
|
})
|
|
2072
2071
|
});
|
|
@@ -2100,10 +2099,7 @@ const PreventSelectAllExtension = /* @__PURE__ */ defineExtension({
|
|
|
2100
2099
|
const stores = state.getOutput();
|
|
2101
2100
|
return j(() => {
|
|
2102
2101
|
if (!stores.disabled.value) return editor.registerRootListener((rootElement) => {
|
|
2103
|
-
if (rootElement)
|
|
2104
|
-
rootElement.addEventListener("keydown", captureKeydown, true);
|
|
2105
|
-
return () => rootElement.removeEventListener("keydown", captureKeydown, true);
|
|
2106
|
-
}
|
|
2102
|
+
if (rootElement) return registerEventListener(rootElement, "keydown", captureKeydown, true);
|
|
2107
2103
|
});
|
|
2108
2104
|
});
|
|
2109
2105
|
}
|
|
@@ -2115,6 +2111,31 @@ const PreventSelectAllExtension = /* @__PURE__ */ defineExtension({
|
|
|
2115
2111
|
* LICENSE file in the root directory of this source tree.
|
|
2116
2112
|
*
|
|
2117
2113
|
*/
|
|
2114
|
+
/**
|
|
2115
|
+
* Exposes the editor's current root element as a reactive
|
|
2116
|
+
* `Signal<HTMLElement | null>` that mirrors `editor.getRootElement()` via a
|
|
2117
|
+
* root listener.
|
|
2118
|
+
*
|
|
2119
|
+
* Depend on this extension and read its output `Signal` from a signals
|
|
2120
|
+
* `effect`/`computed` to react to the root mounting, unmounting, or remounting
|
|
2121
|
+
* (e.g. into a different document such as an iframe) without subscribing
|
|
2122
|
+
* through React (or any other framework).
|
|
2123
|
+
*/
|
|
2124
|
+
const RootElementExtension = /* @__PURE__ */ defineExtension({
|
|
2125
|
+
build(editor) {
|
|
2126
|
+
return watchedSignal(() => editor.getRootElement(), (rootElementSignal) => editor.registerRootListener((rootElement) => {
|
|
2127
|
+
rootElementSignal.value = rootElement;
|
|
2128
|
+
}));
|
|
2129
|
+
},
|
|
2130
|
+
name: "@lexical/extension/RootElement"
|
|
2131
|
+
});
|
|
2132
|
+
/**
|
|
2133
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2134
|
+
*
|
|
2135
|
+
* This source code is licensed under the MIT license found in the
|
|
2136
|
+
* LICENSE file in the root directory of this source tree.
|
|
2137
|
+
*
|
|
2138
|
+
*/
|
|
2118
2139
|
function $hasCommonTopParent(nodes, commonTopParent) {
|
|
2119
2140
|
return nodes.every((node) => commonTopParent.is(node.getTopLevelElement()));
|
|
2120
2141
|
}
|
|
@@ -2303,4 +2324,4 @@ const WatchEditableExtension = /* @__PURE__ */ defineExtension({
|
|
|
2303
2324
|
name: "@lexical/extension/WatchEditable"
|
|
2304
2325
|
});
|
|
2305
2326
|
//#endregion
|
|
2306
|
-
export { $createHorizontalRuleNode, $defaultShouldInsertAfter, $getExtensionDependency, $getExtensionOutput, $getPeerDependency, $isDecoratorTextNode, $isHorizontalRuleNode, AutoFocusExtension, ClearEditorExtension, ClickAfterLastBlockExtension, DecoratorTextExtension, DecoratorTextNode, EditorStateExtension, HorizontalRuleExtension, HorizontalRuleNode, IMEExtension, INSERT_HORIZONTAL_RULE_COMMAND, InitialStateExtension, LexicalBuilder, NestedEditorExtension, NodeSelectionDataSelectedExtension, NodeSelectionExtension, NormalizeInlineElementsExtension, NormalizeTripleClickSelectionExtension, PreventSelectAllExtension, SelectBlockExtension, SelectionAlwaysOnDisplayExtension, TabIndentationExtension, WatchEditableExtension, applyFormatFromStyle, applyFormatToDom, n as batch, buildEditorFromExtensions, g as computed, configExtension, declarePeerDependency, defineExtension, j as effect, getExtensionDependencyFromEditor, getKnownTypesAndNodes, getPeerDependencyFromEditor, getPeerDependencyFromEditorOrThrow, namedSignals, registerClearEditor, registerTabIndentation, safeCast, shallowMergeConfig, a as signal, h as untracked, watchedSignal };
|
|
2327
|
+
export { $applyFormatToDom, $createHorizontalRuleNode, $defaultShouldInsertAfter, $getExtensionDependency, $getExtensionOutput, $getPeerDependency, $isDecoratorTextNode, $isHorizontalRuleNode, AutoFocusExtension, ClearEditorExtension, ClickAfterLastBlockExtension, DecoratorTextExtension, DecoratorTextNode, EditorStateExtension, HorizontalRuleExtension, HorizontalRuleNode, IMEExtension, INSERT_HORIZONTAL_RULE_COMMAND, InitialStateExtension, LexicalBuilder, NestedEditorExtension, NodeSelectionDataSelectedExtension, NodeSelectionExtension, NormalizeInlineElementsExtension, NormalizeTripleClickSelectionExtension, PreventSelectAllExtension, RootElementExtension, SelectBlockExtension, SelectionAlwaysOnDisplayExtension, TabIndentationExtension, WatchEditableExtension, applyFormatFromStyle, applyFormatToDom, n as batch, buildEditorFromExtensions, g as computed, configExtension, declarePeerDependency, defineExtension, j as effect, getExtensionDependencyFromEditor, getKnownTypesAndNodes, getPeerDependencyFromEditor, getPeerDependencyFromEditorOrThrow, namedSignals, registerClearEditor, registerTabIndentation, safeCast, shallowMergeConfig, a as signal, h as untracked, watchedSignal };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@lexical+extension@0.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@lexical+extension@0.48.0_typescript@6.0.3/node_modules/@lexical/extension/dist/LexicalExtension.node.mjs
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
4
|
*
|
|
@@ -6,7 +6,8 @@
|
|
|
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("./LexicalExtension.dev-
|
|
9
|
+
const mod = await (process.env.NODE_ENV !== "production" ? import("./LexicalExtension.dev-JMH_6-OZ.mjs") : import("./LexicalExtension.prod-UiyDgmou.mjs"));
|
|
10
|
+
mod.$applyFormatToDom;
|
|
10
11
|
const $createHorizontalRuleNode = mod.$createHorizontalRuleNode;
|
|
11
12
|
mod.$defaultShouldInsertAfter;
|
|
12
13
|
mod.$getExtensionDependency;
|
|
@@ -32,6 +33,7 @@ mod.NodeSelectionExtension;
|
|
|
32
33
|
const NormalizeInlineElementsExtension = mod.NormalizeInlineElementsExtension;
|
|
33
34
|
const NormalizeTripleClickSelectionExtension = mod.NormalizeTripleClickSelectionExtension;
|
|
34
35
|
mod.PreventSelectAllExtension;
|
|
36
|
+
mod.RootElementExtension;
|
|
35
37
|
mod.SelectBlockExtension;
|
|
36
38
|
mod.SelectionAlwaysOnDisplayExtension;
|
|
37
39
|
mod.TabIndentationExtension;
|