@mdxeditor/editor 3.5.0 → 3.6.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
@@ -1021,7 +1021,11 @@ export declare type EditorSubscription = (activeEditor: LexicalEditor) => () =>
1021
1021
 
1022
1022
  /* Excluded from this release type: ExportMarkdownFromLexicalOptions */
1023
1023
 
1024
- /* Excluded from this release type: exportVisitors$ */
1024
+ /**
1025
+ * Contains the currently registered export vistors.
1026
+ * @group Core
1027
+ */
1028
+ export declare const exportVisitors$: NodeRef< LexicalVisitor[]>;
1025
1029
 
1026
1030
  /**
1027
1031
  * @group JSX
@@ -1268,7 +1272,11 @@ export declare interface ImportPoint {
1268
1272
  getType(): string;
1269
1273
  }
1270
1274
 
1271
- /* Excluded from this release type: importVisitors$ */
1275
+ /**
1276
+ * Contains the currently registered import vistors.
1277
+ * @group Core
1278
+ */
1279
+ export declare const importVisitors$: NodeRef<MdastImportVisitor<Mdast.Nodes>[]>;
1272
1280
 
1273
1281
  /**
1274
1282
  * The state of the image dialog when it is inactive.
@@ -2516,7 +2524,7 @@ export declare const switchFromPreviewToLinkEdit$: NodeRef<void>;
2516
2524
 
2517
2525
  /* Excluded from this release type: SyntaxExtension */
2518
2526
 
2519
- /* Excluded from this release type: syntaxExtensions$ */
2527
+ export declare const syntaxExtensions$: NodeRef< Extension[]>;
2520
2528
 
2521
2529
  /**
2522
2530
  * A Lexical node that represents a markdown table.
@@ -2661,7 +2669,11 @@ export declare const updateLink$: NodeRef<{
2661
2669
  */
2662
2670
  export declare function useCodeBlockEditorContext(): CodeBlockEditorContextValue;
2663
2671
 
2664
- /* Excluded from this release type: usedLexicalNodes$ */
2672
+ /**
2673
+ * Contains the currently registered lexical nodes.
2674
+ * @group Core
2675
+ */
2676
+ export declare const usedLexicalNodes$: NodeRef< KlassConstructor<typeof LexicalNode>[]>;
2665
2677
 
2666
2678
  /**
2667
2679
  * A hook that returns a function that removes the lexical node from the editor.
@@ -97,9 +97,9 @@ const mutableMarkdownSignal$ = Signal((r) => {
97
97
  );
98
98
  });
99
99
  const importVisitors$ = Cell([]);
100
+ const usedLexicalNodes$ = Cell([]);
100
101
  const syntaxExtensions$ = Cell([]);
101
102
  const mdastExtensions$ = Cell([]);
102
- const usedLexicalNodes$ = Cell([]);
103
103
  const exportVisitors$ = Cell([]);
104
104
  const toMarkdownExtensions$ = Cell([]);
105
105
  const toMarkdownOptions$ = Cell({});
@@ -22,7 +22,8 @@ const FormatButton = ({ format, addTitle, removeTitle, icon, formatName }) => {
22
22
  };
23
23
  const BoldItalicUnderlineToggles = ({ options }) => {
24
24
  const t = useTranslation();
25
- return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, !options || options.includes("Bold") && /* @__PURE__ */ React__default.createElement(
25
+ const showAllButtons = typeof options === "undefined";
26
+ return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, showAllButtons || options.includes("Bold") ? /* @__PURE__ */ React__default.createElement(
26
27
  FormatButton,
27
28
  {
28
29
  format: IS_BOLD,
@@ -31,7 +32,7 @@ const BoldItalicUnderlineToggles = ({ options }) => {
31
32
  icon: "format_bold",
32
33
  formatName: "bold"
33
34
  }
34
- ), !options || options.includes("Italic") && /* @__PURE__ */ React__default.createElement(
35
+ ) : null, showAllButtons || options.includes("Italic") ? /* @__PURE__ */ React__default.createElement(
35
36
  FormatButton,
36
37
  {
37
38
  format: IS_ITALIC,
@@ -40,7 +41,7 @@ const BoldItalicUnderlineToggles = ({ options }) => {
40
41
  icon: "format_italic",
41
42
  formatName: "italic"
42
43
  }
43
- ), !options || options.includes("Underline") && /* @__PURE__ */ React__default.createElement(
44
+ ) : null, showAllButtons || options.includes("Underline") ? /* @__PURE__ */ React__default.createElement(
44
45
  FormatButton,
45
46
  {
46
47
  format: IS_UNDERLINE,
@@ -49,7 +50,7 @@ const BoldItalicUnderlineToggles = ({ options }) => {
49
50
  icon: "format_underlined",
50
51
  formatName: "underline"
51
52
  }
52
- ));
53
+ ) : null);
53
54
  };
54
55
  const StrikeThroughSupSubToggles = () => {
55
56
  const t = useTranslation();
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "*.css"
12
12
  ],
13
13
  "type": "module",
14
- "version": "3.5.0",
14
+ "version": "3.6.1",
15
15
  "description": "React component for rich text markdown editing",
16
16
  "scripts": {
17
17
  "build": "vite build",