@mdxeditor/editor 1.9.2 → 1.10.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.
Files changed (93) hide show
  1. package/dist/MDXEditor.d.ts +5 -0
  2. package/dist/MDXEditor.js +6 -1
  3. package/dist/icons/add_column.svg.js +1 -2
  4. package/dist/icons/add_photo.svg.js +1 -2
  5. package/dist/icons/add_row.svg.js +1 -2
  6. package/dist/icons/{emergency_home.svg.js → admonition.svg.js} +2 -3
  7. package/dist/icons/arrow_drop_down.svg.js +3 -4
  8. package/dist/icons/check.svg.js +1 -2
  9. package/dist/icons/check_small.svg.js +7 -0
  10. package/dist/icons/close.svg.js +1 -2
  11. package/dist/icons/code.svg.js +1 -2
  12. package/dist/icons/content_copy.svg.js +1 -2
  13. package/dist/icons/delete_big.svg.js +7 -0
  14. package/dist/icons/delete_small.svg.js +1 -2
  15. package/dist/icons/difference.svg.js +1 -2
  16. package/dist/icons/edit.svg.js +1 -2
  17. package/dist/icons/extension.svg.js +7 -0
  18. package/dist/icons/format_align_center.svg.js +1 -2
  19. package/dist/icons/format_align_left.svg.js +1 -2
  20. package/dist/icons/format_align_right.svg.js +1 -2
  21. package/dist/icons/format_bold.svg.js +1 -2
  22. package/dist/icons/format_italic.svg.js +1 -2
  23. package/dist/icons/format_list_bulleted.svg.js +1 -2
  24. package/dist/icons/format_list_checked.svg.js +1 -2
  25. package/dist/icons/format_list_numbered.svg.js +1 -2
  26. package/dist/icons/format_underlined.svg.js +1 -2
  27. package/dist/icons/frame_source.svg.js +1 -2
  28. package/dist/icons/frontmatter.svg.js +1 -2
  29. package/dist/icons/horizontal_rule.svg.js +1 -2
  30. package/dist/icons/insert_col_left.svg.js +1 -2
  31. package/dist/icons/insert_col_right.svg.js +1 -2
  32. package/dist/icons/insert_row_above.svg.js +1 -2
  33. package/dist/icons/insert_row_below.svg.js +1 -2
  34. package/dist/icons/link.svg.js +1 -2
  35. package/dist/icons/link_off.svg.js +1 -2
  36. package/dist/icons/markdown.svg.js +1 -2
  37. package/dist/icons/more_horiz.svg.js +1 -2
  38. package/dist/icons/more_vert.svg.js +7 -0
  39. package/dist/icons/open_in_new.svg.js +1 -2
  40. package/dist/icons/redo.svg.js +1 -2
  41. package/dist/icons/rich_text.svg.js +1 -2
  42. package/dist/icons/{deployed_code.svg.js → sandpack.svg.js} +2 -3
  43. package/dist/icons/settings.svg.js +1 -2
  44. package/dist/icons/table.svg.js +1 -2
  45. package/dist/icons/undo.svg.js +1 -2
  46. package/dist/plugins/codeblock/index.d.ts +13 -2
  47. package/dist/plugins/codemirror/index.d.ts +17 -2
  48. package/dist/plugins/core/Icon.d.ts +6 -0
  49. package/dist/plugins/core/Icon.js +96 -0
  50. package/dist/plugins/core/PropertyPopover.js +3 -2
  51. package/dist/plugins/core/index.d.ts +12 -2
  52. package/dist/plugins/core/index.js +7 -2
  53. package/dist/plugins/core/ui/DownshiftAutoComplete.js +3 -2
  54. package/dist/plugins/diff-source/index.d.ts +13 -2
  55. package/dist/plugins/directives/index.d.ts +13 -2
  56. package/dist/plugins/frontmatter/FrontmatterEditor.js +7 -5
  57. package/dist/plugins/frontmatter/index.d.ts +13 -2
  58. package/dist/plugins/headings/index.d.ts +13 -2
  59. package/dist/plugins/image/ImageEditor.js +3 -2
  60. package/dist/plugins/image/index.d.ts +13 -2
  61. package/dist/plugins/jsx/index.d.ts +13 -2
  62. package/dist/plugins/link/index.d.ts +2 -0
  63. package/dist/plugins/link-dialog/LinkDialog.js +11 -14
  64. package/dist/plugins/link-dialog/index.d.ts +11 -2
  65. package/dist/plugins/lists/index.d.ts +13 -2
  66. package/dist/plugins/markdown-shortcut/index.d.ts +2 -0
  67. package/dist/plugins/quote/index.d.ts +10 -2
  68. package/dist/plugins/sandpack/index.d.ts +17 -2
  69. package/dist/plugins/table/TableEditor.js +22 -28
  70. package/dist/plugins/table/index.d.ts +13 -2
  71. package/dist/plugins/thematic-break/index.d.ts +13 -2
  72. package/dist/plugins/toolbar/components/BoldItalicUnderlineToggles.js +4 -6
  73. package/dist/plugins/toolbar/components/CodeToggle.js +2 -3
  74. package/dist/plugins/toolbar/components/CreateLink.js +2 -2
  75. package/dist/plugins/toolbar/components/DiffSourceToggleWrapper.js +4 -6
  76. package/dist/plugins/toolbar/components/InsertAdmonition.js +2 -2
  77. package/dist/plugins/toolbar/components/InsertCodeBlock.js +2 -2
  78. package/dist/plugins/toolbar/components/InsertFrontmatter.js +2 -2
  79. package/dist/plugins/toolbar/components/InsertImage.js +2 -3
  80. package/dist/plugins/toolbar/components/InsertSandpack.js +2 -2
  81. package/dist/plugins/toolbar/components/InsertTable.js +2 -2
  82. package/dist/plugins/toolbar/components/InsertThematicBreak.js +2 -2
  83. package/dist/plugins/toolbar/components/ListsToggle.js +4 -6
  84. package/dist/plugins/toolbar/components/ShowSandpackInfo.js +3 -4
  85. package/dist/plugins/toolbar/components/UndoRedo.js +3 -4
  86. package/dist/plugins/toolbar/index.d.ts +11 -2
  87. package/dist/plugins/toolbar/primitives/DialogButton.js +4 -6
  88. package/dist/plugins/toolbar/primitives/TooltipWrap.js +1 -1
  89. package/dist/plugins/toolbar/primitives/select.js +4 -5
  90. package/dist/style.css +252 -236
  91. package/dist/styles/ui.module.css.js +105 -102
  92. package/package.json +2 -1
  93. package/dist/icons/delete.svg.js +0 -8
@@ -1,3 +1,4 @@
1
+ import type { IconKey } from '../core/Icon';
1
2
  import type { RefObject, ReactNode, ComponentType } from 'react';
2
3
  import type { Options } from 'mdast-util-to-markdown';
3
4
  import type { Config } from 'mdast-util-from-markdown/lib';
@@ -77,6 +78,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
77
78
  convertSelectionToNode: RealmNode<() => ElementNode>;
78
79
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
79
80
  onBlur: RealmNode<FocusEvent>;
81
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
80
82
  }>], (r: Realm, [{ insertDecoratorNode }]: [{
81
83
  activeEditor: RealmNode<LexicalEditor | null>;
82
84
  inFocus: RealmNode<boolean>;
@@ -132,6 +134,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
132
134
  convertSelectionToNode: RealmNode<() => ElementNode>;
133
135
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
134
136
  onBlur: RealmNode<FocusEvent>;
137
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
135
138
  }]) => {
136
139
  insertTable: RealmNode<InsertTablePayload>;
137
140
  }>;
@@ -192,6 +195,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
192
195
  convertSelectionToNode: RealmNode<() => ElementNode>;
193
196
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
194
197
  onBlur: RealmNode<FocusEvent>;
198
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
195
199
  }>], (r: Realm, [{ insertDecoratorNode }]: [{
196
200
  activeEditor: RealmNode<LexicalEditor | null>;
197
201
  inFocus: RealmNode<boolean>;
@@ -247,6 +251,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
247
251
  convertSelectionToNode: RealmNode<() => ElementNode>;
248
252
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
249
253
  onBlur: RealmNode<FocusEvent>;
254
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
250
255
  }]) => {
251
256
  insertTable: RealmNode<InsertTablePayload>;
252
257
  }>, object>,
@@ -309,8 +314,9 @@ tablePluginHooks: {
309
314
  convertSelectionToNode: RealmNode<() => ElementNode>;
310
315
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
311
316
  onBlur: RealmNode<FocusEvent>;
317
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
312
318
  }>;
313
- useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "insertTable">(key: K, callback: (value: ValueForKey<{
319
+ useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "insertTable">(key: K, callback: (value: ValueForKey<{
314
320
  insertTable: RealmNode<InsertTablePayload>;
315
321
  } & {
316
322
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -367,6 +373,7 @@ tablePluginHooks: {
367
373
  convertSelectionToNode: RealmNode<() => ElementNode>;
368
374
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
369
375
  onBlur: RealmNode<FocusEvent>;
376
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
370
377
  }, K>) => void) => void;
371
378
  useEmitterValues: <K_1 extends SystemKeys<{
372
379
  insertTable: RealmNode<InsertTablePayload>;
@@ -425,6 +432,7 @@ tablePluginHooks: {
425
432
  convertSelectionToNode: RealmNode<() => ElementNode>;
426
433
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
427
434
  onBlur: RealmNode<FocusEvent>;
435
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
428
436
  }>>(...keys: K_1) => ValuesForKeys<{
429
437
  insertTable: RealmNode<InsertTablePayload>;
430
438
  } & {
@@ -482,6 +490,7 @@ tablePluginHooks: {
482
490
  convertSelectionToNode: RealmNode<() => ElementNode>;
483
491
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
484
492
  onBlur: RealmNode<FocusEvent>;
493
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
485
494
  }, K_1>;
486
495
  usePubKeys: () => (values: SystemDict<{
487
496
  insertTable: RealmNode<InsertTablePayload>;
@@ -540,8 +549,9 @@ tablePluginHooks: {
540
549
  convertSelectionToNode: RealmNode<() => ElementNode>;
541
550
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
542
551
  onBlur: RealmNode<FocusEvent>;
552
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
543
553
  }>) => void;
544
- usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "insertTable">(key: K_2) => (value: ValueForKey<{
554
+ usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "insertTable">(key: K_2) => (value: ValueForKey<{
545
555
  insertTable: RealmNode<InsertTablePayload>;
546
556
  } & {
547
557
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -598,6 +608,7 @@ tablePluginHooks: {
598
608
  convertSelectionToNode: RealmNode<() => ElementNode>;
599
609
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
600
610
  onBlur: RealmNode<FocusEvent>;
611
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
601
612
  }, K_2>) => void;
602
613
  };
603
614
  export {};
@@ -1,3 +1,4 @@
1
+ import type { IconKey } from '../core/Icon';
1
2
  import type { RefObject, ReactNode, ComponentType } from 'react';
2
3
  import type { Options } from 'mdast-util-to-markdown';
3
4
  import type { Config } from 'mdast-util-from-markdown/lib';
@@ -67,6 +68,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
67
68
  convertSelectionToNode: RealmNode<() => ElementNode>;
68
69
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
69
70
  onBlur: RealmNode<FocusEvent>;
71
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
70
72
  }>], (r: Realm, [{ activeEditor }]: [{
71
73
  activeEditor: RealmNode<LexicalEditor | null>;
72
74
  inFocus: RealmNode<boolean>;
@@ -122,6 +124,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
122
124
  convertSelectionToNode: RealmNode<() => ElementNode>;
123
125
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
124
126
  onBlur: RealmNode<FocusEvent>;
127
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
125
128
  }]) => {
126
129
  insertThematicBreak: RealmNode<true>;
127
130
  }>;
@@ -182,6 +185,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
182
185
  convertSelectionToNode: RealmNode<() => ElementNode>;
183
186
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
184
187
  onBlur: RealmNode<FocusEvent>;
188
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
185
189
  }>], (r: Realm, [{ activeEditor }]: [{
186
190
  activeEditor: RealmNode<LexicalEditor | null>;
187
191
  inFocus: RealmNode<boolean>;
@@ -237,6 +241,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
237
241
  convertSelectionToNode: RealmNode<() => ElementNode>;
238
242
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
239
243
  onBlur: RealmNode<FocusEvent>;
244
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
240
245
  }]) => {
241
246
  insertThematicBreak: RealmNode<true>;
242
247
  }>, object>,
@@ -299,8 +304,9 @@ thematicBreakPluginHooks: {
299
304
  convertSelectionToNode: RealmNode<() => ElementNode>;
300
305
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
301
306
  onBlur: RealmNode<FocusEvent>;
307
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
302
308
  }>;
303
- useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "insertThematicBreak">(key: K, callback: (value: ValueForKey<{
309
+ useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "insertThematicBreak">(key: K, callback: (value: ValueForKey<{
304
310
  insertThematicBreak: RealmNode<true>;
305
311
  } & {
306
312
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -357,6 +363,7 @@ thematicBreakPluginHooks: {
357
363
  convertSelectionToNode: RealmNode<() => ElementNode>;
358
364
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
359
365
  onBlur: RealmNode<FocusEvent>;
366
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
360
367
  }, K>) => void) => void;
361
368
  useEmitterValues: <K_1 extends SystemKeys<{
362
369
  insertThematicBreak: RealmNode<true>;
@@ -415,6 +422,7 @@ thematicBreakPluginHooks: {
415
422
  convertSelectionToNode: RealmNode<() => ElementNode>;
416
423
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
417
424
  onBlur: RealmNode<FocusEvent>;
425
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
418
426
  }>>(...keys: K_1) => ValuesForKeys<{
419
427
  insertThematicBreak: RealmNode<true>;
420
428
  } & {
@@ -472,6 +480,7 @@ thematicBreakPluginHooks: {
472
480
  convertSelectionToNode: RealmNode<() => ElementNode>;
473
481
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
474
482
  onBlur: RealmNode<FocusEvent>;
483
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
475
484
  }, K_1>;
476
485
  usePubKeys: () => (values: SystemDict<{
477
486
  insertThematicBreak: RealmNode<true>;
@@ -530,8 +539,9 @@ thematicBreakPluginHooks: {
530
539
  convertSelectionToNode: RealmNode<() => ElementNode>;
531
540
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
532
541
  onBlur: RealmNode<FocusEvent>;
542
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
533
543
  }>) => void;
534
- usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
544
+ usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
535
545
  insertThematicBreak: RealmNode<true>;
536
546
  } & {
537
547
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -588,5 +598,6 @@ thematicBreakPluginHooks: {
588
598
  convertSelectionToNode: RealmNode<() => ElementNode>;
589
599
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
590
600
  onBlur: RealmNode<FocusEvent>;
601
+ iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
591
602
  }, K_2>) => void;
592
603
  };
@@ -2,9 +2,6 @@ import React__default from "react";
2
2
  import { corePluginHooks } from "../../core/index.js";
3
3
  import { IS_BOLD, IS_ITALIC, IS_UNDERLINE } from "../../../FormatConstants.js";
4
4
  import { MultipleChoiceToggleGroup } from "../primitives/toolbar.js";
5
- import BoldIcon from "../../../icons/format_bold.svg.js";
6
- import ItalicIcon from "../../../icons/format_italic.svg.js";
7
- import UnderlinedIcon from "../../../icons/format_underlined.svg.js";
8
5
  const BoldItalicUnderlineToggles = () => {
9
6
  const [currentFormat] = corePluginHooks.useEmitterValues("currentFormat");
10
7
  const applyFormat = corePluginHooks.usePublisher("applyFormat");
@@ -14,15 +11,16 @@ const BoldItalicUnderlineToggles = () => {
14
11
  const boldTitle = boldIsOn ? "Remove bold" : "Bold";
15
12
  const italicTitle = italicIsOn ? "Remove italic" : "Italic";
16
13
  const underlineTitle = underlineIsOn ? "Remove underline" : "Underline";
14
+ const [iconComponentFor] = corePluginHooks.useEmitterValues("iconComponentFor");
17
15
  return /* @__PURE__ */ React__default.createElement(
18
16
  MultipleChoiceToggleGroup,
19
17
  {
20
18
  items: [
21
- { title: boldTitle, contents: /* @__PURE__ */ React__default.createElement(BoldIcon, null), active: boldIsOn, onChange: applyFormat.bind(null, "bold") },
22
- { title: italicTitle, contents: /* @__PURE__ */ React__default.createElement(ItalicIcon, null), active: italicIsOn, onChange: applyFormat.bind(null, "italic") },
19
+ { title: boldTitle, contents: iconComponentFor("format_bold"), active: boldIsOn, onChange: applyFormat.bind(null, "bold") },
20
+ { title: italicTitle, contents: iconComponentFor("format_italic"), active: italicIsOn, onChange: applyFormat.bind(null, "italic") },
23
21
  {
24
22
  title: underlineTitle,
25
- contents: /* @__PURE__ */ React__default.createElement(UnderlinedIcon, { style: { transform: "translateY(2px)" } }),
23
+ contents: /* @__PURE__ */ React__default.createElement("div", { style: { transform: "translateY(2px)" } }, iconComponentFor("format_underlined")),
26
24
  active: underlineIsOn,
27
25
  onChange: applyFormat.bind(null, "underline")
28
26
  }
@@ -1,17 +1,16 @@
1
1
  import React__default from "react";
2
2
  import { IS_CODE } from "../../../FormatConstants.js";
3
- import CodeIcon from "../../../icons/code.svg.js";
4
3
  import { corePluginHooks } from "../../core/index.js";
5
4
  import { MultipleChoiceToggleGroup } from "../primitives/toolbar.js";
6
5
  const CodeToggle = () => {
7
- const [currentFormat] = corePluginHooks.useEmitterValues("currentFormat");
6
+ const [currentFormat, iconComponentFor] = corePluginHooks.useEmitterValues("currentFormat", "iconComponentFor");
8
7
  const applyFormat = corePluginHooks.usePublisher("applyFormat");
9
8
  const codeIsOn = (currentFormat & IS_CODE) !== 0;
10
9
  const title = codeIsOn ? "Remove code format" : "Inline code format";
11
10
  return /* @__PURE__ */ React__default.createElement(
12
11
  MultipleChoiceToggleGroup,
13
12
  {
14
- items: [{ title, contents: /* @__PURE__ */ React__default.createElement(CodeIcon, null), active: codeIsOn, onChange: applyFormat.bind(null, "code") }]
13
+ items: [{ title, contents: iconComponentFor("code"), active: codeIsOn, onChange: applyFormat.bind(null, "code") }]
15
14
  }
16
15
  );
17
16
  };
@@ -1,9 +1,9 @@
1
1
  import React__default from "react";
2
2
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
3
- import LinkIcon from "../../../icons/link.svg.js";
4
3
  import { linkDialogPluginHooks } from "../../link-dialog/index.js";
5
4
  const CreateLink = () => {
6
5
  const openLinkDialog = linkDialogPluginHooks.usePublisher("openLinkEditDialog");
6
+ const [iconComponentFor] = linkDialogPluginHooks.useEmitterValues("iconComponentFor");
7
7
  return /* @__PURE__ */ React__default.createElement(
8
8
  ButtonWithTooltip,
9
9
  {
@@ -12,7 +12,7 @@ const CreateLink = () => {
12
12
  openLinkDialog(true);
13
13
  }
14
14
  },
15
- /* @__PURE__ */ React__default.createElement(LinkIcon, null)
15
+ iconComponentFor("link")
16
16
  );
17
17
  };
18
18
  export {
@@ -1,22 +1,20 @@
1
1
  import React__default from "react";
2
2
  import { diffSourcePluginHooks } from "../../diff-source/index.js";
3
3
  import { SingleChoiceToggleGroup } from "../primitives/toolbar.js";
4
- import RichTextIcon from "../../../icons/rich_text.svg.js";
5
- import DiffIcon from "../../../icons/difference.svg.js";
6
- import SourceIcon from "../../../icons/markdown.svg.js";
7
4
  import styles from "../../../styles/ui.module.css.js";
8
5
  const DiffSourceToggleWrapper = ({ children }) => {
9
6
  const [viewMode] = diffSourcePluginHooks.useEmitterValues("viewMode");
10
7
  const changeViewMode = diffSourcePluginHooks.usePublisher("viewMode");
8
+ const [iconComponentFor] = diffSourcePluginHooks.useEmitterValues("iconComponentFor");
11
9
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, viewMode === "rich-text" ? children : viewMode === "diff" ? /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, "Diff mode") : /* @__PURE__ */ React__default.createElement("span", { className: styles.toolbarTitleMode }, "Source mode"), /* @__PURE__ */ React__default.createElement("div", { style: { marginLeft: "auto", pointerEvents: "auto", opacity: 1 } }, /* @__PURE__ */ React__default.createElement(
12
10
  SingleChoiceToggleGroup,
13
11
  {
14
12
  className: styles.diffSourceToggle,
15
13
  value: viewMode,
16
14
  items: [
17
- { title: "Rich text", contents: /* @__PURE__ */ React__default.createElement(RichTextIcon, null), value: "rich-text" },
18
- { title: "Diff mode", contents: /* @__PURE__ */ React__default.createElement(DiffIcon, null), value: "diff" },
19
- { title: "Source", contents: /* @__PURE__ */ React__default.createElement(SourceIcon, null), value: "source" }
15
+ { title: "Rich text", contents: iconComponentFor("rich_text"), value: "rich-text" },
16
+ { title: "Diff mode", contents: iconComponentFor("difference"), value: "diff" },
17
+ { title: "Source", contents: iconComponentFor("markdown"), value: "source" }
20
18
  ],
21
19
  onChange: (value) => changeViewMode(value || "rich-text")
22
20
  }
@@ -1,10 +1,10 @@
1
1
  import React__default from "react";
2
2
  import { ButtonOrDropdownButton } from "../primitives/toolbar.js";
3
- import AdmonitionIcon from "../../../icons/emergency_home.svg.js";
4
3
  import { directivesPluginHooks } from "../../directives/index.js";
5
4
  import { ADMONITION_TYPES } from "../../../directive-editors/AdmonitionDirectiveDescriptor.js";
6
5
  const InsertAdmonition = () => {
7
6
  const insertDirective = directivesPluginHooks.usePublisher("insertDirective");
7
+ const [iconComponentFor] = directivesPluginHooks.useEmitterValues("iconComponentFor");
8
8
  const items = React__default.useMemo(
9
9
  () => ADMONITION_TYPES.map((type) => ({ value: type, label: type.replace(/^./, (l) => l.toUpperCase()) })),
10
10
  []
@@ -21,7 +21,7 @@ const InsertAdmonition = () => {
21
21
  },
22
22
  items
23
23
  },
24
- /* @__PURE__ */ React__default.createElement(AdmonitionIcon, null)
24
+ iconComponentFor("admonition")
25
25
  );
26
26
  };
27
27
  export {
@@ -1,9 +1,9 @@
1
1
  import React__default from "react";
2
2
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
3
- import FrameSourceIcon from "../../../icons/frame_source.svg.js";
4
3
  import { codeBlockPluginHooks } from "../../codeblock/index.js";
5
4
  const InsertCodeBlock = () => {
6
5
  const insertCodeBlock = codeBlockPluginHooks.usePublisher("insertCodeBlock");
6
+ const [iconComponentFor] = codeBlockPluginHooks.useEmitterValues("iconComponentFor");
7
7
  return /* @__PURE__ */ React__default.createElement(
8
8
  ButtonWithTooltip,
9
9
  {
@@ -12,7 +12,7 @@ const InsertCodeBlock = () => {
12
12
  insertCodeBlock({});
13
13
  }
14
14
  },
15
- /* @__PURE__ */ React__default.createElement(FrameSourceIcon, null)
15
+ iconComponentFor("frame_source")
16
16
  );
17
17
  };
18
18
  export {
@@ -1,12 +1,12 @@
1
1
  import React__default from "react";
2
2
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
3
- import FrontmatterIcon from "../../../icons/frontmatter.svg.js";
4
3
  import { frontmatterPluginHooks } from "../../frontmatter/index.js";
5
4
  import styles from "../../../styles/ui.module.css.js";
6
5
  import classNames from "classnames";
7
6
  const InsertFrontmatter = () => {
8
7
  const insertFrontmatter = frontmatterPluginHooks.usePublisher("insertFrontmatter");
9
8
  const [hasFrontmatter] = frontmatterPluginHooks.useEmitterValues("hasFrontmatter");
9
+ const [iconComponentFor] = frontmatterPluginHooks.useEmitterValues("iconComponentFor");
10
10
  return /* @__PURE__ */ React__default.createElement(
11
11
  ButtonWithTooltip,
12
12
  {
@@ -16,7 +16,7 @@ const InsertFrontmatter = () => {
16
16
  }),
17
17
  onClick: insertFrontmatter.bind(null, true)
18
18
  },
19
- /* @__PURE__ */ React__default.createElement(FrontmatterIcon, null)
19
+ iconComponentFor("frontmatter")
20
20
  );
21
21
  };
22
22
  export {
@@ -1,14 +1,13 @@
1
1
  import React__default from "react";
2
2
  import { imagePluginHooks } from "../../image/index.js";
3
3
  import * as RadixToolbar from "@radix-ui/react-toolbar";
4
- import AddPhotoIcon from "../../../icons/add_photo.svg.js";
5
4
  import styles from "../../../styles/ui.module.css.js";
6
5
  import { corePluginHooks } from "../../core/index.js";
7
6
  import { TooltipWrap } from "../primitives/TooltipWrap.js";
8
7
  const InsertImage = React__default.forwardRef((_, forwardedRef) => {
9
8
  const openNewImageDialog = imagePluginHooks.usePublisher("openNewImageDialog");
10
- const [readOnly] = corePluginHooks.useEmitterValues("readOnly");
11
- return /* @__PURE__ */ React__default.createElement(RadixToolbar.Button, { className: styles.toolbarButton, ref: forwardedRef, disabled: readOnly, onClick: () => openNewImageDialog(true) }, /* @__PURE__ */ React__default.createElement(TooltipWrap, { title: "Insert image" }, /* @__PURE__ */ React__default.createElement(AddPhotoIcon, null)));
9
+ const [readOnly, iconComponentFor] = corePluginHooks.useEmitterValues("readOnly", "iconComponentFor");
10
+ return /* @__PURE__ */ React__default.createElement(RadixToolbar.Button, { className: styles.toolbarButton, ref: forwardedRef, disabled: readOnly, onClick: () => openNewImageDialog(true) }, /* @__PURE__ */ React__default.createElement(TooltipWrap, { title: "Insert image" }, iconComponentFor("add_photo")));
12
11
  });
13
12
  export {
14
13
  InsertImage
@@ -1,12 +1,12 @@
1
1
  import React__default from "react";
2
2
  import { ButtonOrDropdownButton } from "../primitives/toolbar.js";
3
- import LiveCodeIcon from "../../../icons/deployed_code.svg.js";
4
3
  import { sandpackPluginHooks } from "../../sandpack/index.js";
5
4
  const InsertSandpack = () => {
6
5
  const [sandpackConfig] = sandpackPluginHooks.useEmitterValues("sandpackConfig");
7
6
  const insertSandpack = sandpackPluginHooks.usePublisher("insertSandpack");
8
7
  const items = React__default.useMemo(() => sandpackConfig.presets.map((preset) => ({ value: preset.name, label: preset.label })), [sandpackConfig]);
9
- return /* @__PURE__ */ React__default.createElement(ButtonOrDropdownButton, { title: "Insert Sandpack", onChoose: insertSandpack, items }, /* @__PURE__ */ React__default.createElement(LiveCodeIcon, null));
8
+ const [iconComponentFor] = sandpackPluginHooks.useEmitterValues("iconComponentFor");
9
+ return /* @__PURE__ */ React__default.createElement(ButtonOrDropdownButton, { title: "Insert Sandpack", onChoose: insertSandpack, items }, iconComponentFor("sandpack"));
10
10
  };
11
11
  export {
12
12
  InsertSandpack
@@ -1,8 +1,8 @@
1
1
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
2
2
  import React__default from "react";
3
3
  import { tablePluginHooks } from "../../table/index.js";
4
- import TableIcon from "../../../icons/table.svg.js";
5
4
  const InsertTable = () => {
5
+ const [iconComponentFor] = tablePluginHooks.useEmitterValues("iconComponentFor");
6
6
  const insertTable = tablePluginHooks.usePublisher("insertTable");
7
7
  return /* @__PURE__ */ React__default.createElement(
8
8
  ButtonWithTooltip,
@@ -12,7 +12,7 @@ const InsertTable = () => {
12
12
  insertTable({ rows: 3, columns: 3 });
13
13
  }
14
14
  },
15
- /* @__PURE__ */ React__default.createElement(TableIcon, null)
15
+ iconComponentFor("table")
16
16
  );
17
17
  };
18
18
  export {
@@ -1,10 +1,10 @@
1
1
  import React__default from "react";
2
2
  import { thematicBreakPluginHooks } from "../../thematic-break/index.js";
3
3
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
4
- import HorizontalRuleIcon from "../../../icons/horizontal_rule.svg.js";
5
4
  const InsertThematicBreak = () => {
6
5
  const insertThematicBreak = thematicBreakPluginHooks.usePublisher("insertThematicBreak");
7
- return /* @__PURE__ */ React__default.createElement(ButtonWithTooltip, { title: "Insert thematic break", onClick: insertThematicBreak.bind(null, true) }, /* @__PURE__ */ React__default.createElement(HorizontalRuleIcon, null));
6
+ const [iconComponentFor] = thematicBreakPluginHooks.useEmitterValues("iconComponentFor");
7
+ return /* @__PURE__ */ React__default.createElement(ButtonWithTooltip, { title: "Insert thematic break", onClick: insertThematicBreak.bind(null, true) }, iconComponentFor("horizontal_rule"));
8
8
  };
9
9
  export {
10
10
  InsertThematicBreak
@@ -1,20 +1,18 @@
1
1
  import React__default from "react";
2
- import BulletedListIcon from "../../../icons/format_list_bulleted.svg.js";
3
- import NumberedListIcon from "../../../icons/format_list_numbered.svg.js";
4
- import CheckedListIcon from "../../../icons/format_list_checked.svg.js";
5
2
  import { listsPluginHooks } from "../../lists/index.js";
6
3
  import { SingleChoiceToggleGroup } from "../primitives/toolbar.js";
7
4
  const ListsToggle = () => {
8
5
  const [currentListType] = listsPluginHooks.useEmitterValues("currentListType");
9
6
  const applyListType = listsPluginHooks.usePublisher("applyListType");
7
+ const [iconComponentFor] = listsPluginHooks.useEmitterValues("iconComponentFor");
10
8
  return /* @__PURE__ */ React__default.createElement(
11
9
  SingleChoiceToggleGroup,
12
10
  {
13
11
  value: currentListType || "",
14
12
  items: [
15
- { title: "Bulleted list", contents: /* @__PURE__ */ React__default.createElement(BulletedListIcon, null), value: "bullet" },
16
- { title: "Numbered list", contents: /* @__PURE__ */ React__default.createElement(NumberedListIcon, null), value: "number" },
17
- { title: "Check list", contents: /* @__PURE__ */ React__default.createElement(CheckedListIcon, null), value: "check" }
13
+ { title: "Bulleted list", contents: iconComponentFor("format_list_bulleted"), value: "bullet" },
14
+ { title: "Numbered list", contents: iconComponentFor("format_list_numbered"), value: "number" },
15
+ { title: "Check list", contents: iconComponentFor("format_list_checked"), value: "check" }
18
16
  ],
19
17
  onChange: applyListType
20
18
  }
@@ -1,11 +1,10 @@
1
1
  import React__default from "react";
2
- import { corePluginHooks } from "../../core/index.js";
3
2
  import styles from "../../../styles/ui.module.css.js";
3
+ import { corePluginHooks } from "../../core/index.js";
4
4
  import { sandpackPluginHooks } from "../../sandpack/index.js";
5
5
  import { ButtonWithTooltip } from "../primitives/toolbar.js";
6
- import DeleteIcon from "../../../icons/delete.svg.js";
7
6
  const ShowSandpackInfo = () => {
8
- const [editorInFocus, theEditor] = corePluginHooks.useEmitterValues("editorInFocus", "activeEditor");
7
+ const [editorInFocus, theEditor, iconComponentFor] = corePluginHooks.useEmitterValues("editorInFocus", "activeEditor", "iconComponentFor");
9
8
  const sandpackNode = editorInFocus.rootNode;
10
9
  const [sandpackConfig] = sandpackPluginHooks.useEmitterValues("sandpackConfig");
11
10
  const preset = sandpackConfig.presets.find((preset2) => preset2.meta === sandpackNode.getMeta());
@@ -24,7 +23,7 @@ const ShowSandpackInfo = () => {
24
23
  });
25
24
  }
26
25
  },
27
- /* @__PURE__ */ React__default.createElement(DeleteIcon, null)
26
+ iconComponentFor("delete_big")
28
27
  ), /* @__PURE__ */ React__default.createElement("label", null, "Sandpack preset: ", preset.name));
29
28
  };
30
29
  export {
@@ -1,12 +1,11 @@
1
1
  import { mergeRegister } from "@lexical/utils";
2
2
  import { CAN_UNDO_COMMAND, COMMAND_PRIORITY_CRITICAL, CAN_REDO_COMMAND, UNDO_COMMAND, REDO_COMMAND } from "lexical";
3
3
  import React__default from "react";
4
- import RedoIcon from "../../../icons/redo.svg.js";
5
- import UndoIcon from "../../../icons/undo.svg.js";
6
4
  import { IS_APPLE } from "../../../utils/detectMac.js";
7
5
  import { corePluginHooks } from "../../core/index.js";
8
6
  import { MultipleChoiceToggleGroup } from "../primitives/toolbar.js";
9
7
  const UndoRedo = () => {
8
+ const [iconComponentFor] = corePluginHooks.useEmitterValues("iconComponentFor");
10
9
  const [activeEditor] = corePluginHooks.useEmitterValues("activeEditor");
11
10
  const [canUndo, setCanUndo] = React__default.useState(false);
12
11
  const [canRedo, setCanRedo] = React__default.useState(false);
@@ -39,14 +38,14 @@ const UndoRedo = () => {
39
38
  {
40
39
  title: IS_APPLE ? "Undo (⌘Z)" : "Undo (Ctrl+Z)",
41
40
  disabled: !canUndo,
42
- contents: /* @__PURE__ */ React__default.createElement(UndoIcon, null),
41
+ contents: iconComponentFor("undo"),
43
42
  active: false,
44
43
  onChange: () => activeEditor == null ? void 0 : activeEditor.dispatchCommand(UNDO_COMMAND, void 0)
45
44
  },
46
45
  {
47
46
  title: IS_APPLE ? "Redo (⌘Y)" : "Redo (Ctrl+Y)",
48
47
  disabled: !canRedo,
49
- contents: /* @__PURE__ */ React__default.createElement(RedoIcon, null),
48
+ contents: iconComponentFor("redo"),
50
49
  active: false,
51
50
  onChange: () => activeEditor == null ? void 0 : activeEditor.dispatchCommand(REDO_COMMAND, void 0)
52
51
  }
@@ -1,3 +1,4 @@
1
+ import type { IconKey } from '../core/Icon';
1
2
  import type { Options } from 'mdast-util-to-markdown';
2
3
  import type { Config } from 'mdast-util-from-markdown/lib';
3
4
  import type { Extension } from 'micromark-util-types';
@@ -66,6 +67,7 @@ export declare const toolbarSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
66
67
  convertSelectionToNode: RealmNode<() => ElementNode>;
67
68
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
68
69
  onBlur: RealmNode<FocusEvent>;
70
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
69
71
  }>], (r: Realm) => {
70
72
  toolbarContents: RealmNode<() => React.ReactNode>;
71
73
  }>;
@@ -126,6 +128,7 @@ toolbarPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
126
128
  convertSelectionToNode: RealmNode<() => ElementNode>;
127
129
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
128
130
  onBlur: RealmNode<FocusEvent>;
131
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
129
132
  }>], (r: Realm) => {
130
133
  toolbarContents: RealmNode<() => React.ReactNode>;
131
134
  }>, {
@@ -190,8 +193,9 @@ toolbarPluginHooks: {
190
193
  convertSelectionToNode: RealmNode<() => ElementNode>;
191
194
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
192
195
  onBlur: RealmNode<FocusEvent>;
196
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
193
197
  }>;
194
- useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "toolbarContents">(key: K, callback: (value: ValueForKey<{
198
+ useEmitter: <K extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "toolbarContents">(key: K, callback: (value: ValueForKey<{
195
199
  toolbarContents: RealmNode<() => React.ReactNode>;
196
200
  } & {
197
201
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -248,6 +252,7 @@ toolbarPluginHooks: {
248
252
  convertSelectionToNode: RealmNode<() => ElementNode>;
249
253
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
250
254
  onBlur: RealmNode<FocusEvent>;
255
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
251
256
  }, K>) => void) => void;
252
257
  useEmitterValues: <K_1 extends SystemKeys<{
253
258
  toolbarContents: RealmNode<() => React.ReactNode>;
@@ -306,6 +311,7 @@ toolbarPluginHooks: {
306
311
  convertSelectionToNode: RealmNode<() => ElementNode>;
307
312
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
308
313
  onBlur: RealmNode<FocusEvent>;
314
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
309
315
  }>>(...keys: K_1) => ValuesForKeys<{
310
316
  toolbarContents: RealmNode<() => React.ReactNode>;
311
317
  } & {
@@ -363,6 +369,7 @@ toolbarPluginHooks: {
363
369
  convertSelectionToNode: RealmNode<() => ElementNode>;
364
370
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
365
371
  onBlur: RealmNode<FocusEvent>;
372
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
366
373
  }, K_1>;
367
374
  usePubKeys: () => (values: SystemDict<{
368
375
  toolbarContents: RealmNode<() => React.ReactNode>;
@@ -421,8 +428,9 @@ toolbarPluginHooks: {
421
428
  convertSelectionToNode: RealmNode<() => ElementNode>;
422
429
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
423
430
  onBlur: RealmNode<FocusEvent>;
431
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
424
432
  }>) => void;
425
- usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "toolbarContents">(key: K_2) => (value: ValueForKey<{
433
+ usePublisher: <K_2 extends "jsxComponentDescriptors" | "jsxIsAvailable" | "toMarkdownOptions" | "toMarkdownExtensions" | "mdastExtensions" | "syntaxExtensions" | "markdown" | "activeEditor" | "inFocus" | "historyState" | "currentSelection" | "initialRootEditorState" | "rootEditor" | "createRootEditorSubscription" | "createActiveEditorSubscription" | "importVisitors" | "usedLexicalNodes" | "addImportVisitor" | "addLexicalNode" | "addSyntaxExtension" | "addMdastExtension" | "addToMarkdownExtension" | "addExportVisitor" | "exportVisitors" | "initialMarkdown" | "setMarkdown" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "toolbarContents">(key: K_2) => (value: ValueForKey<{
426
434
  toolbarContents: RealmNode<() => React.ReactNode>;
427
435
  } & {
428
436
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -479,5 +487,6 @@ toolbarPluginHooks: {
479
487
  convertSelectionToNode: RealmNode<() => ElementNode>;
480
488
  insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
481
489
  onBlur: RealmNode<FocusEvent>;
490
+ iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
482
491
  }, K_2>) => void;
483
492
  };