@mdxeditor/editor 0.0.0-development → 0.0.4-development
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/MDXEditor.d.ts +11 -0
- package/dist/MDXEditor.js +3 -1
- package/dist/exportMarkdownFromLexical.d.ts +6 -1
- package/dist/exportMarkdownFromLexical.js +43 -6
- package/dist/gurx/realmFactory.d.ts +1 -1
- package/dist/icons/add_column.svg.js +1 -1
- package/dist/icons/add_photo.svg.js +1 -1
- package/dist/icons/add_row.svg.js +1 -1
- package/dist/icons/admonition.svg.js +1 -1
- package/dist/icons/arrow_drop_down.svg.js +1 -1
- package/dist/icons/check.svg.js +1 -1
- package/dist/icons/close.svg.js +1 -1
- package/dist/icons/code.svg.js +1 -1
- package/dist/icons/content_copy.svg.js +1 -1
- package/dist/icons/delete_big.svg.js +1 -1
- package/dist/icons/delete_small.svg.js +1 -1
- package/dist/icons/difference.svg.js +1 -1
- package/dist/icons/edit.svg.js +1 -1
- package/dist/icons/format_align_center.svg.js +1 -1
- package/dist/icons/format_align_left.svg.js +1 -1
- package/dist/icons/format_align_right.svg.js +1 -1
- package/dist/icons/format_bold.svg.js +1 -1
- package/dist/icons/format_italic.svg.js +1 -1
- package/dist/icons/format_list_bulleted.svg.js +1 -3
- package/dist/icons/format_list_checked.svg.js +1 -1
- package/dist/icons/format_list_numbered.svg.js +1 -1
- package/dist/icons/format_underlined.svg.js +1 -1
- package/dist/icons/frame_source.svg.js +5 -0
- package/dist/icons/frontmatter.svg.js +1 -1
- package/dist/icons/horizontal_rule.svg.js +1 -1
- package/dist/icons/insert_col_left.svg.js +1 -1
- package/dist/icons/insert_col_right.svg.js +1 -1
- package/dist/icons/insert_row_above.svg.js +1 -1
- package/dist/icons/insert_row_below.svg.js +1 -1
- package/dist/icons/link.svg.js +1 -1
- package/dist/icons/link_off.svg.js +1 -1
- package/dist/icons/markdown.svg.js +1 -1
- package/dist/icons/more_horiz.svg.js +1 -1
- package/dist/icons/more_vert.svg.js +1 -1
- package/dist/icons/open_in_new.svg.js +1 -1
- package/dist/icons/redo.svg.js +1 -1
- package/dist/icons/rich_text.svg.js +1 -1
- package/dist/icons/sandpack.svg.js +1 -1
- package/dist/icons/settings.svg.js +1 -3
- package/dist/icons/table.svg.js +1 -1
- package/dist/icons/undo.svg.js +1 -1
- package/dist/importMarkdownToLexical.d.ts +10 -0
- package/dist/importMarkdownToLexical.js +31 -7
- package/dist/index.d.ts +8 -0
- package/dist/index.js +41 -3
- package/dist/plugins/codeblock/index.d.ts +92 -2
- package/dist/plugins/codemirror/index.d.ts +128 -2
- package/dist/plugins/core/GenericHTMLNode.d.ts +38 -0
- package/dist/plugins/core/GenericHTMLNode.js +117 -0
- package/dist/plugins/core/Icon.d.ts +1 -1
- package/dist/plugins/core/Icon.js +2 -4
- package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.d.ts +4 -0
- package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.js +15 -0
- package/dist/plugins/core/LexicalTextVisitor.js +18 -1
- package/dist/plugins/core/MdastHTMLNode.d.ts +13 -0
- package/dist/plugins/core/MdastHTMLNode.js +122 -0
- package/dist/plugins/core/MdastHTMLVisitor.d.ts +3 -0
- package/dist/plugins/core/MdastHTMLVisitor.js +12 -0
- package/dist/plugins/core/NestedLexicalEditor.js +14 -9
- package/dist/plugins/core/index.d.ts +80 -3
- package/dist/plugins/core/index.js +90 -20
- package/dist/plugins/diff-source/DiffSourceWrapper.js +4 -1
- package/dist/plugins/diff-source/SourceEditor.js +7 -1
- package/dist/plugins/diff-source/index.d.ts +94 -4
- package/dist/plugins/diff-source/index.js +3 -4
- package/dist/plugins/directives/index.d.ts +92 -2
- package/dist/plugins/frontmatter/index.d.ts +92 -2
- package/dist/plugins/headings/index.d.ts +92 -2
- package/dist/plugins/image/index.d.ts +92 -2
- package/dist/plugins/jsx/LexicalJsxVisitor.js +12 -0
- package/dist/plugins/jsx/index.d.ts +114 -23
- package/dist/plugins/jsx/index.js +4 -0
- package/dist/plugins/link/index.d.ts +9 -0
- package/dist/plugins/link-dialog/index.d.ts +79 -5
- package/dist/plugins/link-dialog/index.js +2 -8
- package/dist/plugins/lists/index.d.ts +92 -2
- package/dist/plugins/lists/index.js +3 -0
- package/dist/plugins/markdown-shortcut/index.d.ts +9 -0
- package/dist/plugins/quote/index.d.ts +65 -2
- package/dist/plugins/sandpack/index.d.ts +128 -2
- package/dist/plugins/table/index.d.ts +92 -2
- package/dist/plugins/thematic-break/index.d.ts +92 -2
- package/dist/plugins/toolbar/components/ChangeAdmonitionType.js +1 -1
- package/dist/plugins/toolbar/components/InsertCodeBlock.js +1 -1
- package/dist/plugins/toolbar/index.d.ts +74 -2
- package/dist/style.css +210 -195
- package/dist/styles/ui.module.css.js +105 -102
- package/dist/utils/fp.js +31 -1
- package/dist/utils/lexicalHelpers.js +20 -2
- package/dist/utils/makeHslTransparent.d.ts +1 -0
- package/dist/utils/makeHslTransparent.js +6 -0
- package/dist/utils/mergeStyleAttributes.d.ts +1 -0
- package/dist/utils/mergeStyleAttributes.js +22 -0
- package/dist/utils/whitespaceConversion.d.ts +2 -0
- package/dist/utils/whitespaceConversion.js +9 -0
- package/package.json +17 -11
- package/dist/icons/check_small.svg.js +0 -5
- package/dist/icons/code_block.svg.js +0 -5
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { ElementNode, $applyNodeReplacement } from "lexical";
|
|
8
|
+
const TYPE_NAME = "generic-html";
|
|
9
|
+
class GenericHTMLNode extends ElementNode {
|
|
10
|
+
constructor(tag, type, attributes, key) {
|
|
11
|
+
super(key);
|
|
12
|
+
/** @internal */
|
|
13
|
+
__publicField(this, "__tag");
|
|
14
|
+
__publicField(this, "__nodeType");
|
|
15
|
+
__publicField(this, "__attributes");
|
|
16
|
+
this.__tag = tag;
|
|
17
|
+
this.__nodeType = type;
|
|
18
|
+
this.__attributes = attributes;
|
|
19
|
+
}
|
|
20
|
+
static getType() {
|
|
21
|
+
return TYPE_NAME;
|
|
22
|
+
}
|
|
23
|
+
static clone(node) {
|
|
24
|
+
return new GenericHTMLNode(node.__tag, node.__nodeType, node.__attributes, node.__key);
|
|
25
|
+
}
|
|
26
|
+
getTag() {
|
|
27
|
+
return this.__tag;
|
|
28
|
+
}
|
|
29
|
+
getNodeType() {
|
|
30
|
+
return this.__nodeType;
|
|
31
|
+
}
|
|
32
|
+
getAttributes() {
|
|
33
|
+
return this.__attributes;
|
|
34
|
+
}
|
|
35
|
+
updateAttributes(attributes) {
|
|
36
|
+
const self = this.getWritable();
|
|
37
|
+
self.__attributes = attributes;
|
|
38
|
+
}
|
|
39
|
+
getStyle() {
|
|
40
|
+
var _a;
|
|
41
|
+
return (_a = this.__attributes.find((attribute) => attribute.name === "style")) == null ? void 0 : _a.value;
|
|
42
|
+
}
|
|
43
|
+
// View
|
|
44
|
+
createDOM() {
|
|
45
|
+
const tag = this.__tag;
|
|
46
|
+
const element = document.createElement(tag);
|
|
47
|
+
this.__attributes.forEach((attribute) => {
|
|
48
|
+
element.setAttribute(attribute.name, attribute.value);
|
|
49
|
+
});
|
|
50
|
+
return element;
|
|
51
|
+
}
|
|
52
|
+
updateDOM() {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
static importDOM() {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
exportDOM(editor) {
|
|
59
|
+
const { element } = super.exportDOM(editor);
|
|
60
|
+
return {
|
|
61
|
+
element
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static importJSON(serializedNode) {
|
|
65
|
+
const node = $createGenericHTMLNode(serializedNode.tag, serializedNode.mdxType, serializedNode.attributes);
|
|
66
|
+
node.setFormat(serializedNode.format);
|
|
67
|
+
node.setIndent(serializedNode.indent);
|
|
68
|
+
node.setDirection(serializedNode.direction);
|
|
69
|
+
return node;
|
|
70
|
+
}
|
|
71
|
+
exportJSON() {
|
|
72
|
+
return {
|
|
73
|
+
...super.exportJSON(),
|
|
74
|
+
tag: this.getTag(),
|
|
75
|
+
attributes: this.__attributes,
|
|
76
|
+
mdxType: this.__nodeType,
|
|
77
|
+
type: TYPE_NAME,
|
|
78
|
+
version: 1
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/*
|
|
82
|
+
// Mutation
|
|
83
|
+
insertNewAfter(selection?: RangeSelection, restoreSelection = true): ParagraphNode | GenericHTMLNode {
|
|
84
|
+
const anchorOffet = selection ? selection.anchor.offset : 0
|
|
85
|
+
const newElement =
|
|
86
|
+
anchorOffet > 0 && anchorOffet < this.getTextContentSize() ? $createHeadingNode(this.getTag()) : $createParagraphNode()
|
|
87
|
+
const direction = this.getDirection()
|
|
88
|
+
newElement.setDirection(direction)
|
|
89
|
+
this.insertAfter(newElement, restoreSelection)
|
|
90
|
+
return newElement
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
collapseAtStart(): true {
|
|
94
|
+
const newElement = !this.isEmpty() ? $createHeadingNode(this.getTag()) : $createParagraphNode()
|
|
95
|
+
const children = this.getChildren()
|
|
96
|
+
children.forEach((child) => newElement.append(child))
|
|
97
|
+
this.replace(newElement)
|
|
98
|
+
return true
|
|
99
|
+
}*/
|
|
100
|
+
extractWithChild() {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
isInline() {
|
|
104
|
+
return this.__nodeType === "mdxJsxTextElement";
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function $createGenericHTMLNode(tag, type, attributes) {
|
|
108
|
+
return $applyNodeReplacement(new GenericHTMLNode(tag, type, attributes));
|
|
109
|
+
}
|
|
110
|
+
function $isGenericHTMLNode(node) {
|
|
111
|
+
return node instanceof GenericHTMLNode;
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
$createGenericHTMLNode,
|
|
115
|
+
$isGenericHTMLNode,
|
|
116
|
+
GenericHTMLNode
|
|
117
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export type IconKey = 'add_column' | 'add_photo' | 'add_row' | 'arrow_drop_down' | 'check' | '
|
|
2
|
+
export type IconKey = 'add_column' | 'add_photo' | 'add_row' | 'arrow_drop_down' | 'check' | 'close' | 'code' | 'content_copy' | 'delete_big' | 'delete_small' | 'sandpack' | 'difference' | 'edit' | 'admonition' | 'format_align_center' | 'format_align_left' | 'format_align_right' | 'format_bold' | 'format_italic' | 'format_list_bulleted' | 'format_list_checked' | 'format_list_numbered' | 'format_underlined' | 'frame_source' | 'frontmatter' | 'horizontal_rule' | 'insert_col_left' | 'insert_col_right' | 'insert_row_above' | 'insert_row_below' | 'link' | 'link_off' | 'markdown' | 'more_horiz' | 'more_vert' | 'open_in_new' | 'redo' | 'rich_text' | 'settings' | 'table' | 'undo';
|
|
3
3
|
declare const Icon: React.FC<{
|
|
4
4
|
name: IconKey;
|
|
5
5
|
}>;
|
|
@@ -4,7 +4,6 @@ import SvgAddPhoto from "../../icons/add_photo.svg.js";
|
|
|
4
4
|
import SvgAddRow from "../../icons/add_row.svg.js";
|
|
5
5
|
import SvgArrowDropDown from "../../icons/arrow_drop_down.svg.js";
|
|
6
6
|
import SvgCheck from "../../icons/check.svg.js";
|
|
7
|
-
import SvgCheckSmall from "../../icons/check_small.svg.js";
|
|
8
7
|
import SvgClose from "../../icons/close.svg.js";
|
|
9
8
|
import SvgCode from "../../icons/code.svg.js";
|
|
10
9
|
import SvgContentCopy from "../../icons/content_copy.svg.js";
|
|
@@ -23,7 +22,7 @@ import SvgFormatListBulleted from "../../icons/format_list_bulleted.svg.js";
|
|
|
23
22
|
import SvgFormatListChecked from "../../icons/format_list_checked.svg.js";
|
|
24
23
|
import SvgFormatListNumbered from "../../icons/format_list_numbered.svg.js";
|
|
25
24
|
import SvgFormatUnderlined from "../../icons/format_underlined.svg.js";
|
|
26
|
-
import
|
|
25
|
+
import SvgFrameSource from "../../icons/frame_source.svg.js";
|
|
27
26
|
import SvgFrontmatter from "../../icons/frontmatter.svg.js";
|
|
28
27
|
import SvgHorizontalRule from "../../icons/horizontal_rule.svg.js";
|
|
29
28
|
import SvgInsertColLeft from "../../icons/insert_col_left.svg.js";
|
|
@@ -47,7 +46,6 @@ const IconMap = {
|
|
|
47
46
|
add_row: SvgAddRow,
|
|
48
47
|
arrow_drop_down: SvgArrowDropDown,
|
|
49
48
|
check: SvgCheck,
|
|
50
|
-
check_small: SvgCheckSmall,
|
|
51
49
|
close: SvgClose,
|
|
52
50
|
code: SvgCode,
|
|
53
51
|
content_copy: SvgContentCopy,
|
|
@@ -66,7 +64,7 @@ const IconMap = {
|
|
|
66
64
|
format_list_checked: SvgFormatListChecked,
|
|
67
65
|
format_list_numbered: SvgFormatListNumbered,
|
|
68
66
|
format_underlined: SvgFormatUnderlined,
|
|
69
|
-
|
|
67
|
+
frame_source: SvgFrameSource,
|
|
70
68
|
frontmatter: SvgFrontmatter,
|
|
71
69
|
horizontal_rule: SvgHorizontalRule,
|
|
72
70
|
insert_col_left: SvgInsertColLeft,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
|
|
2
|
+
import { GenericHTMLNode } from './GenericHTMLNode';
|
|
3
|
+
import { LexicalExportVisitor } from '../../exportMarkdownFromLexical';
|
|
4
|
+
export declare const LexicalGenericHTMLVisitor: LexicalExportVisitor<GenericHTMLNode, MdxJsxFlowElement | MdxJsxTextElement>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { $isGenericHTMLNode } from "./GenericHTMLNode.js";
|
|
2
|
+
const LexicalGenericHTMLVisitor = {
|
|
3
|
+
testLexicalNode: $isGenericHTMLNode,
|
|
4
|
+
visitLexicalNode({ actions, lexicalNode }) {
|
|
5
|
+
actions.addAndStepInto("mdxJsxTextElement", {
|
|
6
|
+
name: lexicalNode.getTag(),
|
|
7
|
+
type: lexicalNode.getNodeType(),
|
|
8
|
+
attributes: lexicalNode.getAttributes()
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
priority: -100
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
LexicalGenericHTMLVisitor
|
|
15
|
+
};
|
|
@@ -3,9 +3,17 @@ import { IS_CODE, IS_ITALIC, IS_BOLD, IS_UNDERLINE } from "../../FormatConstants
|
|
|
3
3
|
function isMdastText(mdastNode) {
|
|
4
4
|
return mdastNode.type === "text";
|
|
5
5
|
}
|
|
6
|
+
const JOINABLE_TAGS = ["u", "span"];
|
|
6
7
|
const LexicalTextVisitor = {
|
|
7
8
|
shouldJoin: (prevNode, currentNode) => {
|
|
8
|
-
|
|
9
|
+
if (["text", "emphasis", "strong"].includes(prevNode.type)) {
|
|
10
|
+
return prevNode.type === currentNode.type;
|
|
11
|
+
}
|
|
12
|
+
if (prevNode.type === "mdxJsxTextElement" && currentNode.type === "mdxJsxTextElement" && JOINABLE_TAGS.includes(currentNode.name)) {
|
|
13
|
+
const currentMdxNode = currentNode;
|
|
14
|
+
return prevNode.name === currentMdxNode.name && JSON.stringify(prevNode.attributes) === JSON.stringify(currentMdxNode.attributes);
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
9
17
|
},
|
|
10
18
|
join(prevNode, currentNode) {
|
|
11
19
|
if (isMdastText(prevNode) && isMdastText(currentNode)) {
|
|
@@ -26,6 +34,7 @@ const LexicalTextVisitor = {
|
|
|
26
34
|
const prevFormat = $isTextNode(previousSibling) ? previousSibling.getFormat() : 0;
|
|
27
35
|
const textContent = lexicalNode.getTextContent();
|
|
28
36
|
const format = lexicalNode.getFormat() ?? 0;
|
|
37
|
+
const style = lexicalNode.getStyle();
|
|
29
38
|
if (format & IS_CODE) {
|
|
30
39
|
actions.addAndStepInto("inlineCode", {
|
|
31
40
|
value: textContent
|
|
@@ -33,6 +42,14 @@ const LexicalTextVisitor = {
|
|
|
33
42
|
return;
|
|
34
43
|
}
|
|
35
44
|
let localParentNode = mdastParent;
|
|
45
|
+
if (style) {
|
|
46
|
+
localParentNode = actions.appendToParent(localParentNode, {
|
|
47
|
+
type: "mdxJsxTextElement",
|
|
48
|
+
name: "span",
|
|
49
|
+
children: [],
|
|
50
|
+
attributes: [{ type: "mdxJsxAttribute", name: "style", value: style }]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
36
53
|
if (prevFormat & format & IS_ITALIC) {
|
|
37
54
|
localParentNode = actions.appendToParent(localParentNode, {
|
|
38
55
|
type: "emphasis",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Mdast from 'mdast';
|
|
2
|
+
import { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
|
|
3
|
+
interface MdastBlockHTMLNode extends MdxJsxFlowElement {
|
|
4
|
+
name: (typeof htmlTags)[number];
|
|
5
|
+
}
|
|
6
|
+
interface MdastInlineHTMLNode extends MdxJsxTextElement {
|
|
7
|
+
name: (typeof htmlTags)[number];
|
|
8
|
+
}
|
|
9
|
+
export type MdastHTMLNode = MdastBlockHTMLNode | MdastInlineHTMLNode;
|
|
10
|
+
export declare const MDX_NODE_TYPES: readonly ["mdxJsxTextElement", "mdxJsxFlowElement"];
|
|
11
|
+
export declare function isMdastHTMLNode(node: Mdast.Parent | Mdast.Content | Mdast.Root): node is MdastHTMLNode;
|
|
12
|
+
export declare const htmlTags: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr"];
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const MDX_NODE_TYPES = ["mdxJsxTextElement", "mdxJsxFlowElement"];
|
|
2
|
+
function isMdastHTMLNode(node) {
|
|
3
|
+
var _a;
|
|
4
|
+
return MDX_NODE_TYPES.includes(node.type) && htmlTags.includes(((_a = node.name) == null ? void 0 : _a.toLowerCase()) ?? "");
|
|
5
|
+
}
|
|
6
|
+
const htmlTags = [
|
|
7
|
+
"a",
|
|
8
|
+
"abbr",
|
|
9
|
+
"address",
|
|
10
|
+
"area",
|
|
11
|
+
"article",
|
|
12
|
+
"aside",
|
|
13
|
+
"audio",
|
|
14
|
+
"b",
|
|
15
|
+
"base",
|
|
16
|
+
"bdi",
|
|
17
|
+
"bdo",
|
|
18
|
+
"blockquote",
|
|
19
|
+
"body",
|
|
20
|
+
"br",
|
|
21
|
+
"button",
|
|
22
|
+
"canvas",
|
|
23
|
+
"caption",
|
|
24
|
+
"cite",
|
|
25
|
+
"code",
|
|
26
|
+
"col",
|
|
27
|
+
"colgroup",
|
|
28
|
+
"data",
|
|
29
|
+
"datalist",
|
|
30
|
+
"dd",
|
|
31
|
+
"del",
|
|
32
|
+
"details",
|
|
33
|
+
"dfn",
|
|
34
|
+
"dialog",
|
|
35
|
+
"div",
|
|
36
|
+
"dl",
|
|
37
|
+
"dt",
|
|
38
|
+
"em",
|
|
39
|
+
"embed",
|
|
40
|
+
"fieldset",
|
|
41
|
+
"figcaption",
|
|
42
|
+
"figure",
|
|
43
|
+
"footer",
|
|
44
|
+
"form",
|
|
45
|
+
"h1",
|
|
46
|
+
"h2",
|
|
47
|
+
"h3",
|
|
48
|
+
"h4",
|
|
49
|
+
"h5",
|
|
50
|
+
"h6",
|
|
51
|
+
"head",
|
|
52
|
+
"header",
|
|
53
|
+
"hgroup",
|
|
54
|
+
"hr",
|
|
55
|
+
"html",
|
|
56
|
+
"i",
|
|
57
|
+
"iframe",
|
|
58
|
+
// 'img',
|
|
59
|
+
"input",
|
|
60
|
+
"ins",
|
|
61
|
+
"kbd",
|
|
62
|
+
"label",
|
|
63
|
+
"legend",
|
|
64
|
+
"li",
|
|
65
|
+
"link",
|
|
66
|
+
"main",
|
|
67
|
+
"map",
|
|
68
|
+
"mark",
|
|
69
|
+
"meta",
|
|
70
|
+
"meter",
|
|
71
|
+
"nav",
|
|
72
|
+
"noscript",
|
|
73
|
+
"object",
|
|
74
|
+
"ol",
|
|
75
|
+
"optgroup",
|
|
76
|
+
"option",
|
|
77
|
+
"output",
|
|
78
|
+
"p",
|
|
79
|
+
"param",
|
|
80
|
+
"picture",
|
|
81
|
+
"pre",
|
|
82
|
+
"progress",
|
|
83
|
+
"q",
|
|
84
|
+
"rp",
|
|
85
|
+
"rt",
|
|
86
|
+
"ruby",
|
|
87
|
+
"s",
|
|
88
|
+
"samp",
|
|
89
|
+
"script",
|
|
90
|
+
"section",
|
|
91
|
+
"select",
|
|
92
|
+
"small",
|
|
93
|
+
"source",
|
|
94
|
+
"span",
|
|
95
|
+
"strong",
|
|
96
|
+
"style",
|
|
97
|
+
"sub",
|
|
98
|
+
"summary",
|
|
99
|
+
"sup",
|
|
100
|
+
"table",
|
|
101
|
+
"tbody",
|
|
102
|
+
"td",
|
|
103
|
+
"template",
|
|
104
|
+
"textarea",
|
|
105
|
+
"tfoot",
|
|
106
|
+
"th",
|
|
107
|
+
"thead",
|
|
108
|
+
"time",
|
|
109
|
+
"title",
|
|
110
|
+
"tr",
|
|
111
|
+
"track",
|
|
112
|
+
"u",
|
|
113
|
+
"ul",
|
|
114
|
+
"var",
|
|
115
|
+
"video",
|
|
116
|
+
"wbr"
|
|
117
|
+
];
|
|
118
|
+
export {
|
|
119
|
+
MDX_NODE_TYPES,
|
|
120
|
+
htmlTags,
|
|
121
|
+
isMdastHTMLNode
|
|
122
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { $createGenericHTMLNode } from "./GenericHTMLNode.js";
|
|
2
|
+
import { isMdastHTMLNode } from "./MdastHTMLNode.js";
|
|
3
|
+
const MdastHTMLVisitor = {
|
|
4
|
+
testNode: isMdastHTMLNode,
|
|
5
|
+
visitNode: function({ mdastNode, actions }) {
|
|
6
|
+
actions.addAndStepInto($createGenericHTMLNode(mdastNode.name, mdastNode.type, mdastNode.attributes));
|
|
7
|
+
},
|
|
8
|
+
priority: -100
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
MdastHTMLVisitor
|
|
12
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $addUpdateTag, $getNodeByKey, createEditor, $getRoot, BLUR_COMMAND, COMMAND_PRIORITY_EDITOR, SELECTION_CHANGE_COMMAND, COMMAND_PRIORITY_HIGH, KEY_BACKSPACE_COMMAND, COMMAND_PRIORITY_CRITICAL } from "lexical";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { NESTED_EDITOR_UPDATED_COMMAND, corePluginHooks } from "./index.js";
|
|
4
4
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable.js";
|
|
5
5
|
import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary.js";
|
|
6
6
|
import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer.js";
|
|
@@ -23,13 +23,17 @@ function useNestedEditorContext() {
|
|
|
23
23
|
function useMdastNodeUpdater() {
|
|
24
24
|
const { parentEditor, mdastNode, lexicalNode } = useNestedEditorContext();
|
|
25
25
|
return function updateMdastNode(node) {
|
|
26
|
-
parentEditor.update(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
currentNode
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
parentEditor.update(
|
|
27
|
+
() => {
|
|
28
|
+
$addUpdateTag("history-push");
|
|
29
|
+
const currentNode = $getNodeByKey(lexicalNode.getKey());
|
|
30
|
+
if (currentNode) {
|
|
31
|
+
currentNode.setMdastNode({ ...mdastNode, ...node });
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{ discrete: true }
|
|
35
|
+
);
|
|
36
|
+
parentEditor.dispatchCommand(NESTED_EDITOR_UPDATED_COMMAND, void 0);
|
|
33
37
|
};
|
|
34
38
|
}
|
|
35
39
|
function useLexicalNodeRemove() {
|
|
@@ -98,7 +102,8 @@ const NestedLexicalEditor = function(props) {
|
|
|
98
102
|
root: $getRoot(),
|
|
99
103
|
visitors: exportVisitors,
|
|
100
104
|
jsxComponentDescriptors,
|
|
101
|
-
jsxIsAvailable
|
|
105
|
+
jsxIsAvailable,
|
|
106
|
+
addImportStatements: false
|
|
102
107
|
});
|
|
103
108
|
const content2 = block ? mdast.children : mdast.children[0].children;
|
|
104
109
|
updateMdastNode(getUpdatedMdastNode(structuredClone(mdastNode), content2));
|
|
@@ -12,6 +12,7 @@ import type { SystemSpec, Realm, PluginConstructor, TypedRealm, ValueForKey, Sys
|
|
|
12
12
|
import { MdastImportVisitor } from '../../importMarkdownToLexical';
|
|
13
13
|
import type { JsxComponentDescriptor } from '../jsx';
|
|
14
14
|
import { type IconKey } from './Icon';
|
|
15
|
+
export * from './GenericHTMLNode';
|
|
15
16
|
/** @internal */
|
|
16
17
|
export type EditorSubscription = (activeEditor: LexicalEditor) => () => void;
|
|
17
18
|
/** @internal */
|
|
@@ -56,6 +57,7 @@ export declare const coreSystem: SystemSpec<[], (r: Realm) => {
|
|
|
56
57
|
initialMarkdown: RealmNode<string>;
|
|
57
58
|
setMarkdown: RealmNode<string>;
|
|
58
59
|
markdown: RealmNode<string>;
|
|
60
|
+
markdownSignal: RealmNode<string>;
|
|
59
61
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
60
62
|
contentEditableClassName: RealmNode<string>;
|
|
61
63
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -85,6 +87,14 @@ export declare const coreSystem: SystemSpec<[], (r: Realm) => {
|
|
|
85
87
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
86
88
|
onBlur: RealmNode<FocusEvent>;
|
|
87
89
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
90
|
+
markdownProcessingError: RealmNode<{
|
|
91
|
+
error: string;
|
|
92
|
+
source: string;
|
|
93
|
+
} | null>;
|
|
94
|
+
markdownErrorSignal: RealmNode<{
|
|
95
|
+
error: string;
|
|
96
|
+
source: string;
|
|
97
|
+
}>;
|
|
88
98
|
}>;
|
|
89
99
|
interface CorePluginParams {
|
|
90
100
|
initialMarkdown: string;
|
|
@@ -96,9 +106,14 @@ interface CorePluginParams {
|
|
|
96
106
|
};
|
|
97
107
|
onChange: (markdown: string) => void;
|
|
98
108
|
onBlur?: (e: FocusEvent) => void;
|
|
109
|
+
onError?: (payload: {
|
|
110
|
+
error: string;
|
|
111
|
+
source: string;
|
|
112
|
+
}) => void;
|
|
99
113
|
toMarkdownOptions: NonNullable<LexicalConvertOptions['toMarkdownOptions']>;
|
|
100
114
|
readOnly: boolean;
|
|
101
115
|
iconComponentFor: (name: IconKey) => React.ReactElement;
|
|
116
|
+
suppressHtmlProcessing?: boolean;
|
|
102
117
|
}
|
|
103
118
|
export declare const
|
|
104
119
|
/** @internal */
|
|
@@ -129,6 +144,7 @@ corePlugin: PluginConstructor<SystemSpec<[], (r: Realm) => {
|
|
|
129
144
|
initialMarkdown: RealmNode<string>;
|
|
130
145
|
setMarkdown: RealmNode<string>;
|
|
131
146
|
markdown: RealmNode<string>;
|
|
147
|
+
markdownSignal: RealmNode<string>;
|
|
132
148
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
133
149
|
contentEditableClassName: RealmNode<string>;
|
|
134
150
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -158,6 +174,14 @@ corePlugin: PluginConstructor<SystemSpec<[], (r: Realm) => {
|
|
|
158
174
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
159
175
|
onBlur: RealmNode<FocusEvent>;
|
|
160
176
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
177
|
+
markdownProcessingError: RealmNode<{
|
|
178
|
+
error: string;
|
|
179
|
+
source: string;
|
|
180
|
+
} | null>;
|
|
181
|
+
markdownErrorSignal: RealmNode<{
|
|
182
|
+
error: string;
|
|
183
|
+
source: string;
|
|
184
|
+
}>;
|
|
161
185
|
}>, CorePluginParams>,
|
|
162
186
|
/** @internal */
|
|
163
187
|
corePluginHooks: {
|
|
@@ -188,6 +212,7 @@ corePluginHooks: {
|
|
|
188
212
|
initialMarkdown: RealmNode<string>;
|
|
189
213
|
setMarkdown: RealmNode<string>;
|
|
190
214
|
markdown: RealmNode<string>;
|
|
215
|
+
markdownSignal: RealmNode<string>;
|
|
191
216
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
192
217
|
contentEditableClassName: RealmNode<string>;
|
|
193
218
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -217,8 +242,16 @@ corePluginHooks: {
|
|
|
217
242
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
218
243
|
onBlur: RealmNode<FocusEvent>;
|
|
219
244
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
245
|
+
markdownProcessingError: RealmNode<{
|
|
246
|
+
error: string;
|
|
247
|
+
source: string;
|
|
248
|
+
} | null>;
|
|
249
|
+
markdownErrorSignal: RealmNode<{
|
|
250
|
+
error: string;
|
|
251
|
+
source: string;
|
|
252
|
+
}>;
|
|
220
253
|
}>;
|
|
221
|
-
useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor">(key: K, callback: (value: ValueForKey<{
|
|
254
|
+
useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "markdownProcessingError" | "markdownErrorSignal">(key: K, callback: (value: ValueForKey<{
|
|
222
255
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
223
256
|
inFocus: RealmNode<boolean>;
|
|
224
257
|
historyState: RealmNode<HistoryState>;
|
|
@@ -245,6 +278,7 @@ corePluginHooks: {
|
|
|
245
278
|
initialMarkdown: RealmNode<string>;
|
|
246
279
|
setMarkdown: RealmNode<string>;
|
|
247
280
|
markdown: RealmNode<string>;
|
|
281
|
+
markdownSignal: RealmNode<string>;
|
|
248
282
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
249
283
|
contentEditableClassName: RealmNode<string>;
|
|
250
284
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -274,6 +308,14 @@ corePluginHooks: {
|
|
|
274
308
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
275
309
|
onBlur: RealmNode<FocusEvent>;
|
|
276
310
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
311
|
+
markdownProcessingError: RealmNode<{
|
|
312
|
+
error: string;
|
|
313
|
+
source: string;
|
|
314
|
+
} | null>;
|
|
315
|
+
markdownErrorSignal: RealmNode<{
|
|
316
|
+
error: string;
|
|
317
|
+
source: string;
|
|
318
|
+
}>;
|
|
277
319
|
}, K>) => void) => void;
|
|
278
320
|
useEmitterValues: <K_1 extends SystemKeys<{
|
|
279
321
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -302,6 +344,7 @@ corePluginHooks: {
|
|
|
302
344
|
initialMarkdown: RealmNode<string>;
|
|
303
345
|
setMarkdown: RealmNode<string>;
|
|
304
346
|
markdown: RealmNode<string>;
|
|
347
|
+
markdownSignal: RealmNode<string>;
|
|
305
348
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
306
349
|
contentEditableClassName: RealmNode<string>;
|
|
307
350
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -331,6 +374,14 @@ corePluginHooks: {
|
|
|
331
374
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
332
375
|
onBlur: RealmNode<FocusEvent>;
|
|
333
376
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
377
|
+
markdownProcessingError: RealmNode<{
|
|
378
|
+
error: string;
|
|
379
|
+
source: string;
|
|
380
|
+
} | null>;
|
|
381
|
+
markdownErrorSignal: RealmNode<{
|
|
382
|
+
error: string;
|
|
383
|
+
source: string;
|
|
384
|
+
}>;
|
|
334
385
|
}>>(...keys: K_1) => ValuesForKeys<{
|
|
335
386
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
336
387
|
inFocus: RealmNode<boolean>;
|
|
@@ -358,6 +409,7 @@ corePluginHooks: {
|
|
|
358
409
|
initialMarkdown: RealmNode<string>;
|
|
359
410
|
setMarkdown: RealmNode<string>;
|
|
360
411
|
markdown: RealmNode<string>;
|
|
412
|
+
markdownSignal: RealmNode<string>;
|
|
361
413
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
362
414
|
contentEditableClassName: RealmNode<string>;
|
|
363
415
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -387,6 +439,14 @@ corePluginHooks: {
|
|
|
387
439
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
388
440
|
onBlur: RealmNode<FocusEvent>;
|
|
389
441
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
442
|
+
markdownProcessingError: RealmNode<{
|
|
443
|
+
error: string;
|
|
444
|
+
source: string;
|
|
445
|
+
} | null>;
|
|
446
|
+
markdownErrorSignal: RealmNode<{
|
|
447
|
+
error: string;
|
|
448
|
+
source: string;
|
|
449
|
+
}>;
|
|
390
450
|
}, K_1>;
|
|
391
451
|
usePubKeys: () => (values: SystemDict<{
|
|
392
452
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -415,6 +475,7 @@ corePluginHooks: {
|
|
|
415
475
|
initialMarkdown: RealmNode<string>;
|
|
416
476
|
setMarkdown: RealmNode<string>;
|
|
417
477
|
markdown: RealmNode<string>;
|
|
478
|
+
markdownSignal: RealmNode<string>;
|
|
418
479
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
419
480
|
contentEditableClassName: RealmNode<string>;
|
|
420
481
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -444,8 +505,16 @@ corePluginHooks: {
|
|
|
444
505
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
445
506
|
onBlur: RealmNode<FocusEvent>;
|
|
446
507
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
508
|
+
markdownProcessingError: RealmNode<{
|
|
509
|
+
error: string;
|
|
510
|
+
source: string;
|
|
511
|
+
} | null>;
|
|
512
|
+
markdownErrorSignal: RealmNode<{
|
|
513
|
+
error: string;
|
|
514
|
+
source: string;
|
|
515
|
+
}>;
|
|
447
516
|
}>) => void;
|
|
448
|
-
usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor">(key: K_2) => (value: ValueForKey<{
|
|
517
|
+
usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "markdownProcessingError" | "markdownErrorSignal">(key: K_2) => (value: ValueForKey<{
|
|
449
518
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
450
519
|
inFocus: RealmNode<boolean>;
|
|
451
520
|
historyState: RealmNode<HistoryState>;
|
|
@@ -472,6 +541,7 @@ corePluginHooks: {
|
|
|
472
541
|
initialMarkdown: RealmNode<string>;
|
|
473
542
|
setMarkdown: RealmNode<string>;
|
|
474
543
|
markdown: RealmNode<string>;
|
|
544
|
+
markdownSignal: RealmNode<string>;
|
|
475
545
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
476
546
|
contentEditableClassName: RealmNode<string>;
|
|
477
547
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -501,6 +571,13 @@ corePluginHooks: {
|
|
|
501
571
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
502
572
|
onBlur: RealmNode<FocusEvent>;
|
|
503
573
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
574
|
+
markdownProcessingError: RealmNode<{
|
|
575
|
+
error: string;
|
|
576
|
+
source: string;
|
|
577
|
+
} | null>;
|
|
578
|
+
markdownErrorSignal: RealmNode<{
|
|
579
|
+
error: string;
|
|
580
|
+
source: string;
|
|
581
|
+
}>;
|
|
504
582
|
}, K_2>) => void;
|
|
505
583
|
};
|
|
506
|
-
export {};
|