@mdxeditor/editor 1.3.2 → 1.4.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/MDXEditor.js CHANGED
@@ -77,7 +77,7 @@ const EditorRootElement = ({ children, className }) => {
77
77
  editorRootElementRef.current = popupContainer;
78
78
  setEditorRootElementRef(editorRootElementRef);
79
79
  return () => {
80
- document.body.removeChild(popupContainer);
80
+ popupContainer.remove();
81
81
  };
82
82
  }, [className, editorRootElementRef, setEditorRootElementRef]);
83
83
  return /* @__PURE__ */ React__default.createElement("div", { className: classNames(styles.editorRoot, styles.editorWrapper, className, "mdxeditor") }, children);
@@ -24,7 +24,7 @@ export interface SandpackPreset {
24
24
  /**
25
25
  * The label of the preset, displayed in the sandpack button dropdown.
26
26
  */
27
- label: string;
27
+ label: string | JSX.Element;
28
28
  /**
29
29
  * The meta string that will be used to identify the preset from the fenced code block. e.g. "live react"
30
30
  */
@@ -39,7 +39,7 @@ export interface SelectProps<T extends string> {
39
39
  triggerTitle: string;
40
40
  placeholder: string;
41
41
  items: ({
42
- label: string;
42
+ label: string | JSX.Element;
43
43
  value: T;
44
44
  } | 'separator')[];
45
45
  }
@@ -91,7 +91,7 @@ export interface ButtonOrDropdownButtonProps<T extends string> {
91
91
  /**
92
92
  * The label to show in the dropdown.
93
93
  */
94
- label: string;
94
+ label: string | JSX.Element;
95
95
  }[];
96
96
  }
97
97
  /**
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "1.3.2",
12
+ "version": "1.4.0",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",