@mdxeditor/editor 2.8.3 → 2.9.1
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.js +6 -9
- package/dist/index.d.ts +1 -1
- package/dist/plugins/jsx/LexicalMdxTextExpressionNode.js +125 -0
- package/dist/plugins/jsx/LexicalMdxTextExpressionVisitor.js +14 -0
- package/dist/plugins/jsx/MdastMdxTextExpressionVisitor.js +11 -0
- package/dist/plugins/jsx/index.js +6 -3
- package/dist/style.css +282 -240
- package/dist/styles/lexical-theme.module.css.js +27 -24
- package/dist/styles/lexicalTheme.js +18 -18
- package/dist/styles/ui.module.css.js +107 -104
- package/package.json +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
const light = "
|
|
2
|
-
const lightTheme = "_light-
|
|
3
|
-
const dark = "
|
|
4
|
-
const darkTheme = "_dark-
|
|
5
|
-
const bold = "
|
|
6
|
-
const italic = "
|
|
7
|
-
const underline = "
|
|
8
|
-
const strikethrough = "
|
|
9
|
-
const underlineStrikethrough = "
|
|
10
|
-
const subscript = "
|
|
11
|
-
const superscript = "
|
|
12
|
-
const code = "
|
|
13
|
-
const nestedListItem = "
|
|
14
|
-
const listitem = "
|
|
15
|
-
const listItemChecked = "
|
|
16
|
-
const listItemUnchecked = "
|
|
17
|
-
const admonitionDanger = "
|
|
18
|
-
const admonitionInfo = "
|
|
19
|
-
const admonitionNote = "
|
|
20
|
-
const admonitionTip = "
|
|
21
|
-
const admonitionCaution = "
|
|
22
|
-
const
|
|
1
|
+
const light = "_light_1boox_1";
|
|
2
|
+
const lightTheme = "_light-theme_1boox_1";
|
|
3
|
+
const dark = "_dark_1boox_1";
|
|
4
|
+
const darkTheme = "_dark-theme_1boox_1";
|
|
5
|
+
const bold = "_bold_1boox_10";
|
|
6
|
+
const italic = "_italic_1boox_14";
|
|
7
|
+
const underline = "_underline_1boox_18";
|
|
8
|
+
const strikethrough = "_strikethrough_1boox_34";
|
|
9
|
+
const underlineStrikethrough = "_underlineStrikethrough_1boox_38";
|
|
10
|
+
const subscript = "_subscript_1boox_42";
|
|
11
|
+
const superscript = "_superscript_1boox_47";
|
|
12
|
+
const code = "_code_1boox_52";
|
|
13
|
+
const nestedListItem = "_nestedListItem_1boox_59";
|
|
14
|
+
const listitem = "_listitem_1boox_69";
|
|
15
|
+
const listItemChecked = "_listItemChecked_1boox_73";
|
|
16
|
+
const listItemUnchecked = "_listItemUnchecked_1boox_74";
|
|
17
|
+
const admonitionDanger = "_admonitionDanger_1boox_151";
|
|
18
|
+
const admonitionInfo = "_admonitionInfo_1boox_152";
|
|
19
|
+
const admonitionNote = "_admonitionNote_1boox_153";
|
|
20
|
+
const admonitionTip = "_admonitionTip_1boox_154";
|
|
21
|
+
const admonitionCaution = "_admonitionCaution_1boox_155";
|
|
22
|
+
const mdxTextExpression = "_mdxTextExpression_1boox_188";
|
|
23
|
+
const lexicalThemeStyles = {
|
|
23
24
|
light,
|
|
24
25
|
lightTheme,
|
|
25
26
|
dark,
|
|
@@ -40,7 +41,8 @@ const styles = {
|
|
|
40
41
|
admonitionInfo,
|
|
41
42
|
admonitionNote,
|
|
42
43
|
admonitionTip,
|
|
43
|
-
admonitionCaution
|
|
44
|
+
admonitionCaution,
|
|
45
|
+
mdxTextExpression
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
48
|
admonitionCaution,
|
|
@@ -52,13 +54,14 @@ export {
|
|
|
52
54
|
code,
|
|
53
55
|
dark,
|
|
54
56
|
darkTheme,
|
|
55
|
-
|
|
57
|
+
lexicalThemeStyles as default,
|
|
56
58
|
italic,
|
|
57
59
|
light,
|
|
58
60
|
lightTheme,
|
|
59
61
|
listItemChecked,
|
|
60
62
|
listItemUnchecked,
|
|
61
63
|
listitem,
|
|
64
|
+
mdxTextExpression,
|
|
62
65
|
nestedListItem,
|
|
63
66
|
strikethrough,
|
|
64
67
|
subscript,
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import lexicalThemeStyles from "./lexical-theme.module.css.js";
|
|
2
2
|
const lexicalTheme = {
|
|
3
3
|
text: {
|
|
4
|
-
bold:
|
|
5
|
-
italic:
|
|
6
|
-
underline:
|
|
7
|
-
code:
|
|
8
|
-
strikethrough:
|
|
9
|
-
subscript:
|
|
10
|
-
superscript:
|
|
11
|
-
underlineStrikethrough:
|
|
4
|
+
bold: lexicalThemeStyles.bold,
|
|
5
|
+
italic: lexicalThemeStyles.italic,
|
|
6
|
+
underline: lexicalThemeStyles.underline,
|
|
7
|
+
code: lexicalThemeStyles.code,
|
|
8
|
+
strikethrough: lexicalThemeStyles.strikethrough,
|
|
9
|
+
subscript: lexicalThemeStyles.subscript,
|
|
10
|
+
superscript: lexicalThemeStyles.superscript,
|
|
11
|
+
underlineStrikethrough: lexicalThemeStyles.underlineStrikethrough
|
|
12
12
|
},
|
|
13
13
|
list: {
|
|
14
|
-
listitem:
|
|
15
|
-
listitemChecked:
|
|
16
|
-
listitemUnchecked:
|
|
14
|
+
listitem: lexicalThemeStyles.listitem,
|
|
15
|
+
listitemChecked: lexicalThemeStyles.listItemChecked,
|
|
16
|
+
listitemUnchecked: lexicalThemeStyles.listItemUnchecked,
|
|
17
17
|
nested: {
|
|
18
|
-
listitem:
|
|
18
|
+
listitem: lexicalThemeStyles.nestedListItem
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
admonition: {
|
|
22
|
-
danger:
|
|
23
|
-
info:
|
|
24
|
-
note:
|
|
25
|
-
tip:
|
|
26
|
-
caution:
|
|
22
|
+
danger: lexicalThemeStyles.admonitionDanger,
|
|
23
|
+
info: lexicalThemeStyles.admonitionInfo,
|
|
24
|
+
note: lexicalThemeStyles.admonitionNote,
|
|
25
|
+
tip: lexicalThemeStyles.admonitionTip,
|
|
26
|
+
caution: lexicalThemeStyles.admonitionCaution
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
@@ -1,106 +1,107 @@
|
|
|
1
|
-
const editorRoot = "
|
|
2
|
-
const editorWrapper = "
|
|
3
|
-
const nestedListItem = "
|
|
4
|
-
const toolbarRoot = "
|
|
5
|
-
const readOnlyToolbarRoot = "
|
|
6
|
-
const toolbarModeSwitch = "
|
|
7
|
-
const toolbarToggleItem = "
|
|
8
|
-
const toolbarGroupOfGroups = "
|
|
9
|
-
const toolbarToggleSingleGroup = "
|
|
10
|
-
const toolbarButton = "
|
|
11
|
-
const activeToolbarButton = "
|
|
12
|
-
const toolbarNodeKindSelectContainer = "
|
|
13
|
-
const toolbarButtonDropdownContainer = "
|
|
14
|
-
const toolbarCodeBlockLanguageSelectContent = "
|
|
15
|
-
const selectContainer = "
|
|
16
|
-
const selectItem = "
|
|
17
|
-
const toolbarNodeKindSelectTrigger = "
|
|
18
|
-
const toolbarButtonSelectTrigger = "
|
|
19
|
-
const selectTrigger = "
|
|
20
|
-
const toolbarCodeBlockLanguageSelectTrigger = "
|
|
21
|
-
const toolbarNodeKindSelectItem = "
|
|
22
|
-
const toolbarNodeKindSelectDropdownArrow = "
|
|
23
|
-
const selectDropdownArrow = "
|
|
24
|
-
const contentEditable = "
|
|
25
|
-
const sandpackWrapper = "
|
|
26
|
-
const frontmatterWrapper = "
|
|
27
|
-
const frontmatterToggleButton = "
|
|
28
|
-
const propertyPanelTitle = "
|
|
29
|
-
const propertyEditorTable = "
|
|
30
|
-
const iconButton = "
|
|
31
|
-
const readOnlyColumnCell = "
|
|
32
|
-
const propertyEditorLabelCell = "
|
|
33
|
-
const buttonsFooter = "
|
|
34
|
-
const propertyEditorInput = "
|
|
35
|
-
const primaryButton = "
|
|
36
|
-
const secondaryButton = "
|
|
37
|
-
const smallButton = "
|
|
38
|
-
const dialogForm = "
|
|
39
|
-
const linkDialogEditForm = "
|
|
40
|
-
const linkDialogInputContainer = "
|
|
41
|
-
const linkDialogInputWrapper = "
|
|
42
|
-
const linkDialogInput = "
|
|
43
|
-
const dialogInput = "
|
|
44
|
-
const linkDialogAnchor = "
|
|
45
|
-
const linkDialogPopoverContent = "
|
|
46
|
-
const tableColumnEditorPopoverContent = "
|
|
47
|
-
const dialogContent = "
|
|
48
|
-
const largeDialogContent = "
|
|
49
|
-
const dialogTitle = "
|
|
50
|
-
const dialogCloseButton = "
|
|
51
|
-
const popoverContent = "
|
|
52
|
-
const popoverArrow = "
|
|
53
|
-
const linkDialogPreviewAnchor = "
|
|
54
|
-
const tooltipTrigger = "
|
|
55
|
-
const tooltipContent = "
|
|
56
|
-
const actionButton = "
|
|
57
|
-
const primaryActionButton = "
|
|
58
|
-
const tableEditor = "
|
|
59
|
-
const toolCell = "
|
|
60
|
-
const tableColumnEditorTrigger = "
|
|
61
|
-
const tableRowEditorTrigger = "
|
|
62
|
-
const addRowButton = "
|
|
63
|
-
const addColumnButton = "
|
|
64
|
-
const tableColumnEditorToolbar = "
|
|
65
|
-
const toggleGroupRoot = "
|
|
66
|
-
const tableToolsColumn = "
|
|
67
|
-
const leftAlignedCell = "
|
|
68
|
-
const rightAlignedCell = "
|
|
69
|
-
const centeredCell = "
|
|
70
|
-
const dialogOverlay = "
|
|
71
|
-
const overlayShow = "
|
|
72
|
-
const contentShow = "
|
|
73
|
-
const focusedImage = "
|
|
74
|
-
const imageWrapper = "
|
|
75
|
-
const editImageButton = "
|
|
76
|
-
const inlineEditor = "
|
|
77
|
-
const blockEditor = "
|
|
78
|
-
const nestedEditor = "
|
|
79
|
-
const genericComponentName = "
|
|
80
|
-
const diffSourceToggle = "
|
|
81
|
-
const selectWithLabel = "
|
|
82
|
-
const toolbarTitleMode = "
|
|
83
|
-
const imageControlWrapperResizing = "
|
|
84
|
-
const imageResizer = "
|
|
85
|
-
const imageResizerN = "
|
|
86
|
-
const imageResizerNe = "
|
|
87
|
-
const imageResizerE = "
|
|
88
|
-
const imageResizerSe = "
|
|
89
|
-
const imageResizerS = "
|
|
90
|
-
const imageResizerSw = "
|
|
91
|
-
const imageResizerW = "
|
|
92
|
-
const imageResizerNw = "
|
|
93
|
-
const placeholder = "
|
|
94
|
-
const rootContentEditableWrapper = "
|
|
95
|
-
const downshiftContainer = "
|
|
96
|
-
const downshiftInputWrapper = "
|
|
97
|
-
const downshiftInput = "
|
|
98
|
-
const downshiftAutocompleteContainer = "
|
|
99
|
-
const textInput = "
|
|
100
|
-
const multiFieldForm = "
|
|
101
|
-
const formField = "
|
|
102
|
-
const markdownParseError = "
|
|
103
|
-
const popupContainer = "
|
|
1
|
+
const editorRoot = "_editorRoot_19o4e_38";
|
|
2
|
+
const editorWrapper = "_editorWrapper_19o4e_139";
|
|
3
|
+
const nestedListItem = "_nestedListItem_19o4e_141";
|
|
4
|
+
const toolbarRoot = "_toolbarRoot_19o4e_145";
|
|
5
|
+
const readOnlyToolbarRoot = "_readOnlyToolbarRoot_19o4e_168";
|
|
6
|
+
const toolbarModeSwitch = "_toolbarModeSwitch_19o4e_177";
|
|
7
|
+
const toolbarToggleItem = "_toolbarToggleItem_19o4e_187";
|
|
8
|
+
const toolbarGroupOfGroups = "_toolbarGroupOfGroups_19o4e_198";
|
|
9
|
+
const toolbarToggleSingleGroup = "_toolbarToggleSingleGroup_19o4e_203";
|
|
10
|
+
const toolbarButton = "_toolbarButton_19o4e_218";
|
|
11
|
+
const activeToolbarButton = "_activeToolbarButton_19o4e_250";
|
|
12
|
+
const toolbarNodeKindSelectContainer = "_toolbarNodeKindSelectContainer_19o4e_258";
|
|
13
|
+
const toolbarButtonDropdownContainer = "_toolbarButtonDropdownContainer_19o4e_259";
|
|
14
|
+
const toolbarCodeBlockLanguageSelectContent = "_toolbarCodeBlockLanguageSelectContent_19o4e_260";
|
|
15
|
+
const selectContainer = "_selectContainer_19o4e_261";
|
|
16
|
+
const selectItem = "_selectItem_19o4e_274";
|
|
17
|
+
const toolbarNodeKindSelectTrigger = "_toolbarNodeKindSelectTrigger_19o4e_279";
|
|
18
|
+
const toolbarButtonSelectTrigger = "_toolbarButtonSelectTrigger_19o4e_280";
|
|
19
|
+
const selectTrigger = "_selectTrigger_19o4e_281";
|
|
20
|
+
const toolbarCodeBlockLanguageSelectTrigger = "_toolbarCodeBlockLanguageSelectTrigger_19o4e_315";
|
|
21
|
+
const toolbarNodeKindSelectItem = "_toolbarNodeKindSelectItem_19o4e_320";
|
|
22
|
+
const toolbarNodeKindSelectDropdownArrow = "_toolbarNodeKindSelectDropdownArrow_19o4e_345";
|
|
23
|
+
const selectDropdownArrow = "_selectDropdownArrow_19o4e_346";
|
|
24
|
+
const contentEditable = "_contentEditable_19o4e_352";
|
|
25
|
+
const sandpackWrapper = "_sandpackWrapper_19o4e_364";
|
|
26
|
+
const frontmatterWrapper = "_frontmatterWrapper_19o4e_368";
|
|
27
|
+
const frontmatterToggleButton = "_frontmatterToggleButton_19o4e_378";
|
|
28
|
+
const propertyPanelTitle = "_propertyPanelTitle_19o4e_386";
|
|
29
|
+
const propertyEditorTable = "_propertyEditorTable_19o4e_394";
|
|
30
|
+
const iconButton = "_iconButton_19o4e_412";
|
|
31
|
+
const readOnlyColumnCell = "_readOnlyColumnCell_19o4e_417";
|
|
32
|
+
const propertyEditorLabelCell = "_propertyEditorLabelCell_19o4e_422";
|
|
33
|
+
const buttonsFooter = "_buttonsFooter_19o4e_430";
|
|
34
|
+
const propertyEditorInput = "_propertyEditorInput_19o4e_436";
|
|
35
|
+
const primaryButton = "_primaryButton_19o4e_460";
|
|
36
|
+
const secondaryButton = "_secondaryButton_19o4e_461";
|
|
37
|
+
const smallButton = "_smallButton_19o4e_476";
|
|
38
|
+
const dialogForm = "_dialogForm_19o4e_488";
|
|
39
|
+
const linkDialogEditForm = "_linkDialogEditForm_19o4e_494";
|
|
40
|
+
const linkDialogInputContainer = "_linkDialogInputContainer_19o4e_502";
|
|
41
|
+
const linkDialogInputWrapper = "_linkDialogInputWrapper_19o4e_508";
|
|
42
|
+
const linkDialogInput = "_linkDialogInput_19o4e_502";
|
|
43
|
+
const dialogInput = "_dialogInput_19o4e_529";
|
|
44
|
+
const linkDialogAnchor = "_linkDialogAnchor_19o4e_540";
|
|
45
|
+
const linkDialogPopoverContent = "_linkDialogPopoverContent_19o4e_554";
|
|
46
|
+
const tableColumnEditorPopoverContent = "_tableColumnEditorPopoverContent_19o4e_555";
|
|
47
|
+
const dialogContent = "_dialogContent_19o4e_556";
|
|
48
|
+
const largeDialogContent = "_largeDialogContent_19o4e_568";
|
|
49
|
+
const dialogTitle = "_dialogTitle_19o4e_578";
|
|
50
|
+
const dialogCloseButton = "_dialogCloseButton_19o4e_584";
|
|
51
|
+
const popoverContent = "_popoverContent_19o4e_591";
|
|
52
|
+
const popoverArrow = "_popoverArrow_19o4e_603";
|
|
53
|
+
const linkDialogPreviewAnchor = "_linkDialogPreviewAnchor_19o4e_607";
|
|
54
|
+
const tooltipTrigger = "_tooltipTrigger_19o4e_630";
|
|
55
|
+
const tooltipContent = "_tooltipContent_19o4e_634";
|
|
56
|
+
const actionButton = "_actionButton_19o4e_648";
|
|
57
|
+
const primaryActionButton = "_primaryActionButton_19o4e_654";
|
|
58
|
+
const tableEditor = "_tableEditor_19o4e_664";
|
|
59
|
+
const toolCell = "_toolCell_19o4e_675";
|
|
60
|
+
const tableColumnEditorTrigger = "_tableColumnEditorTrigger_19o4e_693";
|
|
61
|
+
const tableRowEditorTrigger = "_tableRowEditorTrigger_19o4e_694";
|
|
62
|
+
const addRowButton = "_addRowButton_19o4e_695";
|
|
63
|
+
const addColumnButton = "_addColumnButton_19o4e_696";
|
|
64
|
+
const tableColumnEditorToolbar = "_tableColumnEditorToolbar_19o4e_737";
|
|
65
|
+
const toggleGroupRoot = "_toggleGroupRoot_19o4e_751";
|
|
66
|
+
const tableToolsColumn = "_tableToolsColumn_19o4e_769";
|
|
67
|
+
const leftAlignedCell = "_leftAlignedCell_19o4e_778";
|
|
68
|
+
const rightAlignedCell = "_rightAlignedCell_19o4e_782";
|
|
69
|
+
const centeredCell = "_centeredCell_19o4e_786";
|
|
70
|
+
const dialogOverlay = "_dialogOverlay_19o4e_819";
|
|
71
|
+
const overlayShow = "_overlayShow_19o4e_1";
|
|
72
|
+
const contentShow = "_contentShow_19o4e_1";
|
|
73
|
+
const focusedImage = "_focusedImage_19o4e_866";
|
|
74
|
+
const imageWrapper = "_imageWrapper_19o4e_870";
|
|
75
|
+
const editImageButton = "_editImageButton_19o4e_883";
|
|
76
|
+
const inlineEditor = "_inlineEditor_19o4e_895";
|
|
77
|
+
const blockEditor = "_blockEditor_19o4e_904";
|
|
78
|
+
const nestedEditor = "_nestedEditor_19o4e_913";
|
|
79
|
+
const genericComponentName = "_genericComponentName_19o4e_932";
|
|
80
|
+
const diffSourceToggle = "_diffSourceToggle_19o4e_938";
|
|
81
|
+
const selectWithLabel = "_selectWithLabel_19o4e_952";
|
|
82
|
+
const toolbarTitleMode = "_toolbarTitleMode_19o4e_967";
|
|
83
|
+
const imageControlWrapperResizing = "_imageControlWrapperResizing_19o4e_973";
|
|
84
|
+
const imageResizer = "_imageResizer_19o4e_977";
|
|
85
|
+
const imageResizerN = "_imageResizerN_19o4e_986";
|
|
86
|
+
const imageResizerNe = "_imageResizerNe_19o4e_992";
|
|
87
|
+
const imageResizerE = "_imageResizerE_19o4e_998";
|
|
88
|
+
const imageResizerSe = "_imageResizerSe_19o4e_1004";
|
|
89
|
+
const imageResizerS = "_imageResizerS_19o4e_1004";
|
|
90
|
+
const imageResizerSw = "_imageResizerSw_19o4e_1016";
|
|
91
|
+
const imageResizerW = "_imageResizerW_19o4e_1022";
|
|
92
|
+
const imageResizerNw = "_imageResizerNw_19o4e_1028";
|
|
93
|
+
const placeholder = "_placeholder_19o4e_1034";
|
|
94
|
+
const rootContentEditableWrapper = "_rootContentEditableWrapper_19o4e_1047";
|
|
95
|
+
const downshiftContainer = "_downshiftContainer_19o4e_1053";
|
|
96
|
+
const downshiftInputWrapper = "_downshiftInputWrapper_19o4e_1059";
|
|
97
|
+
const downshiftInput = "_downshiftInput_19o4e_1059";
|
|
98
|
+
const downshiftAutocompleteContainer = "_downshiftAutocompleteContainer_19o4e_1090";
|
|
99
|
+
const textInput = "_textInput_19o4e_1136";
|
|
100
|
+
const multiFieldForm = "_multiFieldForm_19o4e_1144";
|
|
101
|
+
const formField = "_formField_19o4e_1150";
|
|
102
|
+
const markdownParseError = "_markdownParseError_19o4e_1161";
|
|
103
|
+
const popupContainer = "_popupContainer_19o4e_1170";
|
|
104
|
+
const inputSizer = "_inputSizer_19o4e_1175";
|
|
104
105
|
const styles = {
|
|
105
106
|
editorRoot,
|
|
106
107
|
editorWrapper,
|
|
@@ -204,7 +205,8 @@ const styles = {
|
|
|
204
205
|
multiFieldForm,
|
|
205
206
|
formField,
|
|
206
207
|
markdownParseError,
|
|
207
|
-
popupContainer
|
|
208
|
+
popupContainer,
|
|
209
|
+
inputSizer
|
|
208
210
|
};
|
|
209
211
|
export {
|
|
210
212
|
actionButton,
|
|
@@ -249,6 +251,7 @@ export {
|
|
|
249
251
|
imageResizerW,
|
|
250
252
|
imageWrapper,
|
|
251
253
|
inlineEditor,
|
|
254
|
+
inputSizer,
|
|
252
255
|
largeDialogContent,
|
|
253
256
|
leftAlignedCell,
|
|
254
257
|
linkDialogAnchor,
|