@mdxeditor/editor 3.24.0 → 3.25.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/index.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ export declare const addToMarkdownExtension$: NodeRef< Options_2 | Options_2[]>;
|
|
|
203
203
|
*/
|
|
204
204
|
export declare const addTopAreaChild$: NodeRef<default_2.ComponentType<{}> | default_2.ComponentType<{}>[]>;
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
export declare const ADMONITION_TYPES: readonly ["note", "tip", "danger", "info", "caution"];
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* Pass this descriptor to the `directivesPlugin` `directiveDescriptors` parameter to enable {@link https://docusaurus.io/docs/markdown-features/admonitions | markdown admonitions}.
|
|
@@ -906,6 +906,7 @@ export declare const diffSourcePlugin: (params?: {
|
|
|
906
906
|
export declare const DiffSourceToggleWrapper: default_2.FC<{
|
|
907
907
|
children: default_2.ReactNode;
|
|
908
908
|
options?: ViewMode[];
|
|
909
|
+
SourceToolbar?: default_2.ReactNode;
|
|
909
910
|
}>;
|
|
910
911
|
|
|
911
912
|
/**
|
|
@@ -2131,8 +2132,7 @@ export declare interface MDXEditorProps {
|
|
|
2131
2132
|
*/
|
|
2132
2133
|
plugins?: RealmPlugin[];
|
|
2133
2134
|
/**
|
|
2134
|
-
* The class name to apply to the root component element
|
|
2135
|
-
* For a content-specific styling, Use `contentEditableClassName` property.
|
|
2135
|
+
* The class name to apply to the root component element, including the toolbar and the popups. For styling the content editable area, Use `contentEditableClassName` property.
|
|
2136
2136
|
*/
|
|
2137
2137
|
className?: string;
|
|
2138
2138
|
/**
|
|
@@ -5,6 +5,7 @@ import styles from "../../../styles/ui.module.css.js";
|
|
|
5
5
|
import { SingleChoiceToggleGroup } from "../primitives/toolbar.js";
|
|
6
6
|
const DiffSourceToggleWrapper = ({
|
|
7
7
|
children,
|
|
8
|
+
SourceToolbar,
|
|
8
9
|
options = ["rich-text", "diff", "source"]
|
|
9
10
|
}) => {
|
|
10
11
|
const [viewMode, iconComponentFor] = useCellValues(viewMode$, iconComponentFor$);
|
|
@@ -20,7 +21,7 @@ const DiffSourceToggleWrapper = ({
|
|
|
20
21
|
if (options.includes("source")) {
|
|
21
22
|
toggleGroupItems.push({ title: t("toolbar.source", "Source mode"), contents: iconComponentFor("markdown"), value: "source" });
|
|
22
23
|
}
|
|
23
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, viewMode === "rich-text" ? children : viewMode === "diff" ? /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, t("toolbar.diffMode", "Diff mode")) : /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, t("toolbar.source", "Source mode")), /* @__PURE__ */ React__default.createElement("div", { style: { marginLeft: "auto", pointerEvents: "auto", opacity: 1 } }, /* @__PURE__ */ React__default.createElement(
|
|
24
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, viewMode === "rich-text" ? children : viewMode === "diff" ? /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, t("toolbar.diffMode", "Diff mode")) : SourceToolbar ?? /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, t("toolbar.source", "Source mode")), /* @__PURE__ */ React__default.createElement("div", { style: { marginLeft: "auto", pointerEvents: "auto", opacity: 1 } }, /* @__PURE__ */ React__default.createElement(
|
|
24
25
|
SingleChoiceToggleGroup,
|
|
25
26
|
{
|
|
26
27
|
className: styles.diffSourceToggle,
|