@mdxeditor/editor 3.4.2 → 3.6.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
@@ -283,6 +283,10 @@ export declare const BlockTypeSelect: () => default_2.JSX.Element | null;
283
283
  */
284
284
  export declare const BoldItalicUnderlineToggles: default_2.FC;
285
285
 
286
+ export declare interface BoldItalicUnderlineTogglesProps {
287
+ options?: ('Bold' | 'Italic' | 'Underline')[];
288
+ }
289
+
286
290
  /**
287
291
  * A toolbar button primitive.
288
292
  * @group Toolbar Primitives
@@ -1017,7 +1021,11 @@ export declare type EditorSubscription = (activeEditor: LexicalEditor) => () =>
1017
1021
 
1018
1022
  /* Excluded from this release type: ExportMarkdownFromLexicalOptions */
1019
1023
 
1020
- /* 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[]>;
1021
1029
 
1022
1030
  /**
1023
1031
  * @group JSX
@@ -1264,7 +1272,11 @@ export declare interface ImportPoint {
1264
1272
  getType(): string;
1265
1273
  }
1266
1274
 
1267
- /* 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>[]>;
1268
1280
 
1269
1281
  /**
1270
1282
  * The state of the image dialog when it is inactive.
@@ -2512,7 +2524,7 @@ export declare const switchFromPreviewToLinkEdit$: NodeRef<void>;
2512
2524
 
2513
2525
  /* Excluded from this release type: SyntaxExtension */
2514
2526
 
2515
- /* Excluded from this release type: syntaxExtensions$ */
2527
+ export declare const syntaxExtensions$: NodeRef< Extension[]>;
2516
2528
 
2517
2529
  /**
2518
2530
  * A Lexical node that represents a markdown table.
@@ -2657,7 +2669,11 @@ export declare const updateLink$: NodeRef<{
2657
2669
  */
2658
2670
  export declare function useCodeBlockEditorContext(): CodeBlockEditorContextValue;
2659
2671
 
2660
- /* 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>[]>;
2661
2677
 
2662
2678
  /**
2663
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({});
@@ -20,9 +20,9 @@ const FormatButton = ({ format, addTitle, removeTitle, icon, formatName }) => {
20
20
  iconComponentFor(icon)
21
21
  );
22
22
  };
23
- const BoldItalicUnderlineToggles = () => {
23
+ const BoldItalicUnderlineToggles = ({ options }) => {
24
24
  const t = useTranslation();
25
- return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, /* @__PURE__ */ React__default.createElement(
25
+ return /* @__PURE__ */ React__default.createElement("div", { className: styles.toolbarGroupOfGroups }, !options || options.includes("Bold") && /* @__PURE__ */ React__default.createElement(
26
26
  FormatButton,
27
27
  {
28
28
  format: IS_BOLD,
@@ -31,7 +31,7 @@ const BoldItalicUnderlineToggles = () => {
31
31
  icon: "format_bold",
32
32
  formatName: "bold"
33
33
  }
34
- ), /* @__PURE__ */ React__default.createElement(
34
+ ), !options || options.includes("Italic") && /* @__PURE__ */ React__default.createElement(
35
35
  FormatButton,
36
36
  {
37
37
  format: IS_ITALIC,
@@ -40,7 +40,7 @@ const BoldItalicUnderlineToggles = () => {
40
40
  icon: "format_italic",
41
41
  formatName: "italic"
42
42
  }
43
- ), /* @__PURE__ */ React__default.createElement(
43
+ ), !options || options.includes("Underline") && /* @__PURE__ */ React__default.createElement(
44
44
  FormatButton,
45
45
  {
46
46
  format: IS_UNDERLINE,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "*.css"
12
12
  ],
13
13
  "type": "module",
14
- "version": "3.4.2",
14
+ "version": "3.6.0",
15
15
  "description": "React component for rich text markdown editing",
16
16
  "scripts": {
17
17
  "build": "vite build",