@mdxeditor/editor 3.6.1 → 3.7.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
|
@@ -281,7 +281,7 @@ export declare const BlockTypeSelect: () => default_2.JSX.Element | null;
|
|
|
281
281
|
* A toolbar component that lets the user toggle bold, italic and underline formatting.
|
|
282
282
|
* @group Toolbar Components
|
|
283
283
|
*/
|
|
284
|
-
export declare const BoldItalicUnderlineToggles: default_2.FC
|
|
284
|
+
export declare const BoldItalicUnderlineToggles: default_2.FC<BoldItalicUnderlineTogglesProps>;
|
|
285
285
|
|
|
286
286
|
export declare interface BoldItalicUnderlineTogglesProps {
|
|
287
287
|
options?: ('Bold' | 'Italic' | 'Underline')[];
|
|
@@ -2514,7 +2514,11 @@ export declare interface SrcImageParameters extends BaseImageParameters {
|
|
|
2514
2514
|
* A toolbar component that lets the user toggle strikeThrough, superscript and subscript formatting.
|
|
2515
2515
|
* @group Toolbar Components
|
|
2516
2516
|
*/
|
|
2517
|
-
export declare const StrikeThroughSupSubToggles: default_2.FC
|
|
2517
|
+
export declare const StrikeThroughSupSubToggles: default_2.FC<StrikeThroughSupSubTogglesProps>;
|
|
2518
|
+
|
|
2519
|
+
export declare interface StrikeThroughSupSubTogglesProps {
|
|
2520
|
+
options?: ('Strikethrough' | 'Sub' | 'Sup')[];
|
|
2521
|
+
}
|
|
2518
2522
|
|
|
2519
2523
|
/**
|
|
2520
2524
|
* An action that switches the link dialog from preview mode to edit mode.
|
|
@@ -52,9 +52,10 @@ const BoldItalicUnderlineToggles = ({ options }) => {
|
|
|
52
52
|
}
|
|
53
53
|
) : null);
|
|
54
54
|
};
|
|
55
|
-
const StrikeThroughSupSubToggles = () => {
|
|
55
|
+
const StrikeThroughSupSubToggles = ({ options }) => {
|
|
56
56
|
const t = useTranslation();
|
|
57
|
-
|
|
57
|
+
const showAllButtons = typeof options === "undefined";
|
|
58
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, showAllButtons || options.includes("Strikethrough") ? /* @__PURE__ */ React__default.createElement(
|
|
58
59
|
FormatButton,
|
|
59
60
|
{
|
|
60
61
|
format: IS_STRIKETHROUGH,
|
|
@@ -63,7 +64,7 @@ const StrikeThroughSupSubToggles = () => {
|
|
|
63
64
|
icon: "strikeThrough",
|
|
64
65
|
formatName: "strikethrough"
|
|
65
66
|
}
|
|
66
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
67
|
+
) : null, showAllButtons || options.includes("Sup") ? /* @__PURE__ */ React__default.createElement(
|
|
67
68
|
FormatButton,
|
|
68
69
|
{
|
|
69
70
|
format: IS_SUPERSCRIPT,
|
|
@@ -72,7 +73,7 @@ const StrikeThroughSupSubToggles = () => {
|
|
|
72
73
|
icon: "superscript",
|
|
73
74
|
formatName: "superscript"
|
|
74
75
|
}
|
|
75
|
-
), /* @__PURE__ */ React__default.createElement(
|
|
76
|
+
) : null, showAllButtons || options.includes("Sub") ? /* @__PURE__ */ React__default.createElement(
|
|
76
77
|
FormatButton,
|
|
77
78
|
{
|
|
78
79
|
format: IS_SUBSCRIPT,
|
|
@@ -81,7 +82,7 @@ const StrikeThroughSupSubToggles = () => {
|
|
|
81
82
|
icon: "subscript",
|
|
82
83
|
formatName: "subscript"
|
|
83
84
|
}
|
|
84
|
-
));
|
|
85
|
+
) : null);
|
|
85
86
|
};
|
|
86
87
|
export {
|
|
87
88
|
BoldItalicUnderlineToggles,
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"*.css"
|
|
12
12
|
],
|
|
13
13
|
"type": "module",
|
|
14
|
-
"version": "3.
|
|
14
|
+
"version": "3.7.0",
|
|
15
15
|
"description": "React component for rich text markdown editing",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "vite build",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"@codemirror/state": "^6.4.0",
|
|
44
44
|
"@codemirror/view": "^6.23.0",
|
|
45
45
|
"@codesandbox/sandpack-react": "^2.10.0",
|
|
46
|
-
"@lexical/clipboard": "^0.
|
|
47
|
-
"@lexical/link": "^0.
|
|
48
|
-
"@lexical/list": "^0.
|
|
49
|
-
"@lexical/markdown": "^0.
|
|
50
|
-
"@lexical/plain-text": "^0.
|
|
51
|
-
"@lexical/react": "^0.
|
|
52
|
-
"@lexical/rich-text": "^0.
|
|
53
|
-
"@lexical/selection": "^0.
|
|
54
|
-
"@lexical/utils": "^0.
|
|
46
|
+
"@lexical/clipboard": "^0.16.1",
|
|
47
|
+
"@lexical/link": "^0.16.1",
|
|
48
|
+
"@lexical/list": "^0.16.1",
|
|
49
|
+
"@lexical/markdown": "^0.16.1",
|
|
50
|
+
"@lexical/plain-text": "^0.16.1",
|
|
51
|
+
"@lexical/react": "^0.16.1",
|
|
52
|
+
"@lexical/rich-text": "^0.16.1",
|
|
53
|
+
"@lexical/selection": "^0.16.1",
|
|
54
|
+
"@lexical/utils": "^0.16.1",
|
|
55
55
|
"@mdxeditor/gurx": "^1.1.1",
|
|
56
56
|
"@radix-ui/colors": "^3.0.0",
|
|
57
57
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"codemirror": "^6.0.1",
|
|
67
67
|
"downshift": "^7.6.0",
|
|
68
68
|
"js-yaml": "4.1.0",
|
|
69
|
-
"lexical": "^0.
|
|
69
|
+
"lexical": "^0.16.1",
|
|
70
70
|
"mdast-util-directive": "^3.0.0",
|
|
71
71
|
"mdast-util-from-markdown": "^2.0.0",
|
|
72
72
|
"mdast-util-frontmatter": "^2.0.1",
|