@mdxeditor/editor 3.9.3 → 3.10.0
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/index.d.ts
CHANGED
|
@@ -747,6 +747,53 @@ export declare const DEFAULT_FORMAT: 0;
|
|
|
747
747
|
*/
|
|
748
748
|
export declare const defaultCodeBlockLanguage$: NodeRef<string>;
|
|
749
749
|
|
|
750
|
+
export declare const defaultSvgIcons: {
|
|
751
|
+
undo: default_2.JSX.Element;
|
|
752
|
+
redo: default_2.JSX.Element;
|
|
753
|
+
format_bold: default_2.JSX.Element;
|
|
754
|
+
format_italic: default_2.JSX.Element;
|
|
755
|
+
format_underlined: default_2.JSX.Element;
|
|
756
|
+
code: default_2.JSX.Element;
|
|
757
|
+
strikeThrough: default_2.JSX.Element;
|
|
758
|
+
superscript: default_2.JSX.Element;
|
|
759
|
+
subscript: default_2.JSX.Element;
|
|
760
|
+
format_list_bulleted: default_2.JSX.Element;
|
|
761
|
+
format_list_numbered: default_2.JSX.Element;
|
|
762
|
+
format_list_checked: default_2.JSX.Element;
|
|
763
|
+
link: default_2.JSX.Element;
|
|
764
|
+
add_photo: default_2.JSX.Element;
|
|
765
|
+
table: default_2.JSX.Element;
|
|
766
|
+
horizontal_rule: default_2.JSX.Element;
|
|
767
|
+
frontmatter: default_2.JSX.Element;
|
|
768
|
+
frame_source: default_2.JSX.Element;
|
|
769
|
+
arrow_drop_down: default_2.JSX.Element;
|
|
770
|
+
admonition: default_2.JSX.Element;
|
|
771
|
+
sandpack: default_2.JSX.Element;
|
|
772
|
+
rich_text: default_2.JSX.Element;
|
|
773
|
+
difference: default_2.JSX.Element;
|
|
774
|
+
markdown: default_2.JSX.Element;
|
|
775
|
+
open_in_new: default_2.JSX.Element;
|
|
776
|
+
link_off: default_2.JSX.Element;
|
|
777
|
+
edit: default_2.JSX.Element;
|
|
778
|
+
content_copy: default_2.JSX.Element;
|
|
779
|
+
more_horiz: default_2.JSX.Element;
|
|
780
|
+
more_vert: default_2.JSX.Element;
|
|
781
|
+
close: default_2.JSX.Element;
|
|
782
|
+
settings: default_2.JSX.Element;
|
|
783
|
+
delete_big: default_2.JSX.Element;
|
|
784
|
+
delete_small: default_2.JSX.Element;
|
|
785
|
+
format_align_center: default_2.JSX.Element;
|
|
786
|
+
format_align_left: default_2.JSX.Element;
|
|
787
|
+
format_align_right: default_2.JSX.Element;
|
|
788
|
+
add_row: default_2.JSX.Element;
|
|
789
|
+
add_column: default_2.JSX.Element;
|
|
790
|
+
insert_col_left: default_2.JSX.Element;
|
|
791
|
+
insert_row_above: default_2.JSX.Element;
|
|
792
|
+
insert_row_below: default_2.JSX.Element;
|
|
793
|
+
insert_col_right: default_2.JSX.Element;
|
|
794
|
+
check: default_2.JSX.Element;
|
|
795
|
+
};
|
|
796
|
+
|
|
750
797
|
/**
|
|
751
798
|
* The registered descriptors for composite nodes (jsx, directives, code blocks).
|
|
752
799
|
*/
|
|
@@ -1175,7 +1222,7 @@ export declare const htmlTags: readonly ["a", "abbr", "address", "area", "articl
|
|
|
1175
1222
|
*/
|
|
1176
1223
|
export declare const iconComponentFor$: NodeRef<(name: IconKey) => default_2.ReactNode>;
|
|
1177
1224
|
|
|
1178
|
-
declare type IconKey = 'undo' | 'redo' | 'format_bold' | 'format_italic' | 'format_underlined' | 'code' | 'strikeThrough' | 'superscript' | 'subscript' | 'format_list_bulleted' | 'format_list_numbered' | 'format_list_checked' | 'link' | 'add_photo' | 'table' | 'horizontal_rule' | 'frontmatter' | 'frame_source' | 'arrow_drop_down' | 'admonition' | 'sandpack' | 'rich_text' | 'difference' | 'markdown' | 'open_in_new' | 'link_off' | 'edit' | 'content_copy' | 'more_horiz' | 'more_vert' | 'close' | 'settings' | 'delete_big' | 'delete_small' | 'format_align_center' | 'format_align_left' | 'format_align_right' | 'add_row' | 'add_column' | 'insert_col_left' | 'insert_row_above' | 'insert_row_below' | 'insert_col_right' | 'check';
|
|
1225
|
+
export declare type IconKey = 'undo' | 'redo' | 'format_bold' | 'format_italic' | 'format_underlined' | 'code' | 'strikeThrough' | 'superscript' | 'subscript' | 'format_list_bulleted' | 'format_list_numbered' | 'format_list_checked' | 'link' | 'add_photo' | 'table' | 'horizontal_rule' | 'frontmatter' | 'frame_source' | 'arrow_drop_down' | 'admonition' | 'sandpack' | 'rich_text' | 'difference' | 'markdown' | 'open_in_new' | 'link_off' | 'edit' | 'content_copy' | 'more_horiz' | 'more_vert' | 'close' | 'settings' | 'delete_big' | 'delete_small' | 'format_align_center' | 'format_align_left' | 'format_align_right' | 'add_row' | 'add_column' | 'insert_col_left' | 'insert_row_above' | 'insert_row_below' | 'insert_col_right' | 'check';
|
|
1179
1226
|
|
|
1180
1227
|
/**
|
|
1181
1228
|
* Holds the autocomplete suggestions for image sources.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "./styles/globals.css.js";
|
|
2
2
|
export * from "@mdxeditor/gurx";
|
|
3
3
|
import { MDXEditor } from "./MDXEditor.js";
|
|
4
|
+
import { defaultSvgIcons } from "./defaultSvgIcons.js";
|
|
4
5
|
import { MarkdownParseError, UnrecognizedMarkdownConstructError, importMarkdownToLexical, importMdastTreeToLexical } from "./importMarkdownToLexical.js";
|
|
5
6
|
import { exportLexicalTreeToMdast, exportMarkdownFromLexical } from "./exportMarkdownFromLexical.js";
|
|
6
7
|
import { Appender, NESTED_EDITOR_UPDATED_COMMAND, activeEditor$, activeEditorSubscriptions$, activePlugins$, addActivePlugin$, addComposerChild$, addEditorWrapper$, addExportVisitor$, addImportVisitor$, addLexicalNode$, addMdastExtension$, addNestedEditorChild$, addSyntaxExtension$, addToMarkdownExtension$, addTopAreaChild$, applyBlockType$, applyFormat$, autoFocus$, codeBlockEditorDescriptors$, composerChildren$, contentEditableClassName$, convertSelectionToNode$, corePlugin, createActiveEditorSubscription$, createRootEditorSubscription$, currentBlockType$, currentFormat$, currentSelection$, directiveDescriptors$, editorInFocus$, editorRootElementRef$, editorWrappers$, exportVisitors$, historyState$, iconComponentFor$, importVisitors$, inFocus$, initialMarkdown$, insertDecoratorNode$, insertMarkdown$, jsxComponentDescriptors$, jsxIsAvailable$, markdown$, markdownErrorSignal$, markdownProcessingError$, markdownSourceEditorValue$, mdastExtensions$, muteChange$, nestedEditorChildren$, onBlur$, placeholder$, readOnly$, rootEditor$, rootEditorSubscriptions$, setMarkdown$, syntaxExtensions$, toMarkdownExtensions$, toMarkdownOptions$, topAreaChildren$, translation$, useTranslation, usedLexicalNodes$, viewMode$ } from "./plugins/core/index.js";
|
|
@@ -195,6 +196,7 @@ export {
|
|
|
195
196
|
curry1to0,
|
|
196
197
|
curry2to1,
|
|
197
198
|
defaultCodeBlockLanguage$,
|
|
199
|
+
defaultSvgIcons,
|
|
198
200
|
diffMarkdown$,
|
|
199
201
|
diffSourcePlugin,
|
|
200
202
|
directiveDescriptors$,
|
|
@@ -1,4 +1,4 @@
|
|
|
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";
|
|
1
|
+
import { $addUpdateTag, $getNodeByKey, createEditor, $getRoot, FOCUS_COMMAND, COMMAND_PRIORITY_LOW, 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
3
|
import { NESTED_EDITOR_UPDATED_COMMAND, rootEditor$, importVisitors$, exportVisitors$, usedLexicalNodes$, jsxComponentDescriptors$, directiveDescriptors$, codeBlockEditorDescriptors$, jsxIsAvailable$, nestedEditorChildren$, editorInFocus$ } from "./index.js";
|
|
4
4
|
import { ContentEditable } from "@lexical/react/LexicalContentEditable.js";
|
|
@@ -127,6 +127,14 @@ const NestedLexicalEditor = function(props) {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
return mergeRegister(
|
|
130
|
+
editor.registerCommand(
|
|
131
|
+
FOCUS_COMMAND,
|
|
132
|
+
() => {
|
|
133
|
+
setEditorInFocus({ editorType: "lexical", rootNode: lexicalNode });
|
|
134
|
+
return false;
|
|
135
|
+
},
|
|
136
|
+
COMMAND_PRIORITY_LOW
|
|
137
|
+
),
|
|
130
138
|
editor.registerCommand(
|
|
131
139
|
BLUR_COMMAND,
|
|
132
140
|
(payload) => {
|
|
@@ -3,7 +3,7 @@ import LexicalErrorBoundary from "@lexical/react/LexicalErrorBoundary.js";
|
|
|
3
3
|
import { LexicalNestedComposer } from "@lexical/react/LexicalNestedComposer.js";
|
|
4
4
|
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin.js";
|
|
5
5
|
import * as RadixPopover from "@radix-ui/react-popover";
|
|
6
|
-
import { $createParagraphNode, createEditor, $getRoot, KEY_TAB_COMMAND, COMMAND_PRIORITY_CRITICAL, FOCUS_COMMAND, COMMAND_PRIORITY_LOW, KEY_ENTER_COMMAND, BLUR_COMMAND } from "lexical";
|
|
6
|
+
import { $createParagraphNode, createEditor, $getRoot, KEY_TAB_COMMAND, COMMAND_PRIORITY_CRITICAL, FOCUS_COMMAND, COMMAND_PRIORITY_LOW, KEY_ENTER_COMMAND, BLUR_COMMAND, COMMAND_PRIORITY_EDITOR } from "lexical";
|
|
7
7
|
import React__default from "react";
|
|
8
8
|
import { exportLexicalTreeToMdast } from "../../exportMarkdownFromLexical.js";
|
|
9
9
|
import { importMdastTreeToLexical } from "../../importMarkdownToLexical.js";
|
|
@@ -307,7 +307,7 @@ const CellEditor = ({ focus, setActiveCell, parentEditor, lexicalTable, contents
|
|
|
307
307
|
saveAndFocus(null);
|
|
308
308
|
return true;
|
|
309
309
|
},
|
|
310
|
-
|
|
310
|
+
COMMAND_PRIORITY_EDITOR
|
|
311
311
|
),
|
|
312
312
|
editor.registerCommand(
|
|
313
313
|
NESTED_EDITOR_UPDATED_COMMAND,
|