@mdxeditor/editor 1.10.1 → 1.11.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 (40) hide show
  1. package/dist/exportMarkdownFromLexical.d.ts +4 -0
  2. package/dist/exportMarkdownFromLexical.js +34 -0
  3. package/dist/gurx/realmFactory.d.ts +1 -1
  4. package/dist/importMarkdownToLexical.d.ts +4 -0
  5. package/dist/importMarkdownToLexical.js +1 -0
  6. package/dist/index.js +4 -0
  7. package/dist/plugins/codeblock/index.d.ts +12 -2
  8. package/dist/plugins/codemirror/index.d.ts +16 -2
  9. package/dist/plugins/core/GenericHTMLNode.d.ts +38 -0
  10. package/dist/plugins/core/GenericHTMLNode.js +117 -0
  11. package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.d.ts +4 -0
  12. package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.js +15 -0
  13. package/dist/plugins/core/LexicalTextVisitor.js +17 -1
  14. package/dist/plugins/core/MdastHTMLNode.d.ts +13 -0
  15. package/dist/plugins/core/MdastHTMLNode.js +122 -0
  16. package/dist/plugins/core/MdastHTMLVisitor.d.ts +3 -0
  17. package/dist/plugins/core/MdastHTMLVisitor.js +12 -0
  18. package/dist/plugins/core/index.d.ts +11 -3
  19. package/dist/plugins/core/index.js +19 -1
  20. package/dist/plugins/diff-source/SourceEditor.js +7 -1
  21. package/dist/plugins/diff-source/index.d.ts +14 -4
  22. package/dist/plugins/diff-source/index.js +2 -1
  23. package/dist/plugins/directives/index.d.ts +12 -2
  24. package/dist/plugins/frontmatter/index.d.ts +12 -2
  25. package/dist/plugins/headings/index.d.ts +12 -2
  26. package/dist/plugins/image/index.d.ts +12 -2
  27. package/dist/plugins/jsx/index.d.ts +12 -2
  28. package/dist/plugins/link/index.d.ts +1 -0
  29. package/dist/plugins/link-dialog/index.d.ts +10 -2
  30. package/dist/plugins/lists/index.d.ts +12 -2
  31. package/dist/plugins/markdown-shortcut/index.d.ts +1 -0
  32. package/dist/plugins/quote/index.d.ts +9 -2
  33. package/dist/plugins/sandpack/index.d.ts +16 -2
  34. package/dist/plugins/table/index.d.ts +12 -2
  35. package/dist/plugins/thematic-break/index.d.ts +12 -2
  36. package/dist/plugins/toolbar/index.d.ts +10 -2
  37. package/dist/style.css +3 -0
  38. package/dist/utils/mergeStyleAttributes.d.ts +1 -0
  39. package/dist/utils/mergeStyleAttributes.js +22 -0
  40. package/package.json +2 -1
@@ -39,6 +39,7 @@ export declare const markdownShortcutPlugin: PluginConstructor<SystemSpec<[Syste
39
39
  initialMarkdown: RealmNode<string>;
40
40
  setMarkdown: RealmNode<string>;
41
41
  markdown: RealmNode<string>;
42
+ markdownSignal: RealmNode<string>;
42
43
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
43
44
  contentEditableClassName: RealmNode<string>;
44
45
  placeholder: RealmNode<React.ReactNode>;
@@ -41,6 +41,7 @@ quotePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
41
41
  initialMarkdown: RealmNode<string>;
42
42
  setMarkdown: RealmNode<string>;
43
43
  markdown: RealmNode<string>;
44
+ markdownSignal: RealmNode<string>;
44
45
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
45
46
  contentEditableClassName: RealmNode<string>;
46
47
  placeholder: RealmNode<ReactNode>;
@@ -100,6 +101,7 @@ quotePluginHooks: {
100
101
  initialMarkdown: RealmNode<string>;
101
102
  setMarkdown: RealmNode<string>;
102
103
  markdown: RealmNode<string>;
104
+ markdownSignal: RealmNode<string>;
103
105
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
104
106
  contentEditableClassName: RealmNode<string>;
105
107
  placeholder: RealmNode<ReactNode>;
@@ -130,7 +132,7 @@ quotePluginHooks: {
130
132
  onBlur: RealmNode<FocusEvent>;
131
133
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
132
134
  }>;
133
- 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">(key: K, callback: (value: ValueForKey<{
135
+ 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" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor">(key: K, callback: (value: ValueForKey<{
134
136
  activeEditor: RealmNode<LexicalEditor | null>;
135
137
  inFocus: RealmNode<boolean>;
136
138
  historyState: RealmNode<HistoryState>;
@@ -157,6 +159,7 @@ quotePluginHooks: {
157
159
  initialMarkdown: RealmNode<string>;
158
160
  setMarkdown: RealmNode<string>;
159
161
  markdown: RealmNode<string>;
162
+ markdownSignal: RealmNode<string>;
160
163
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
161
164
  contentEditableClassName: RealmNode<string>;
162
165
  placeholder: RealmNode<ReactNode>;
@@ -214,6 +217,7 @@ quotePluginHooks: {
214
217
  initialMarkdown: RealmNode<string>;
215
218
  setMarkdown: RealmNode<string>;
216
219
  markdown: RealmNode<string>;
220
+ markdownSignal: RealmNode<string>;
217
221
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
218
222
  contentEditableClassName: RealmNode<string>;
219
223
  placeholder: RealmNode<ReactNode>;
@@ -270,6 +274,7 @@ quotePluginHooks: {
270
274
  initialMarkdown: RealmNode<string>;
271
275
  setMarkdown: RealmNode<string>;
272
276
  markdown: RealmNode<string>;
277
+ markdownSignal: RealmNode<string>;
273
278
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
274
279
  contentEditableClassName: RealmNode<string>;
275
280
  placeholder: RealmNode<ReactNode>;
@@ -327,6 +332,7 @@ quotePluginHooks: {
327
332
  initialMarkdown: RealmNode<string>;
328
333
  setMarkdown: RealmNode<string>;
329
334
  markdown: RealmNode<string>;
335
+ markdownSignal: RealmNode<string>;
330
336
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
331
337
  contentEditableClassName: RealmNode<string>;
332
338
  placeholder: RealmNode<ReactNode>;
@@ -357,7 +363,7 @@ quotePluginHooks: {
357
363
  onBlur: RealmNode<FocusEvent>;
358
364
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
359
365
  }>) => void;
360
- 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">(key: K_2) => (value: ValueForKey<{
366
+ 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" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor">(key: K_2) => (value: ValueForKey<{
361
367
  activeEditor: RealmNode<LexicalEditor | null>;
362
368
  inFocus: RealmNode<boolean>;
363
369
  historyState: RealmNode<HistoryState>;
@@ -384,6 +390,7 @@ quotePluginHooks: {
384
390
  initialMarkdown: RealmNode<string>;
385
391
  setMarkdown: RealmNode<string>;
386
392
  markdown: RealmNode<string>;
393
+ markdownSignal: RealmNode<string>;
387
394
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
388
395
  contentEditableClassName: RealmNode<string>;
389
396
  placeholder: RealmNode<ReactNode>;
@@ -103,6 +103,7 @@ export declare const sandpackSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
103
103
  initialMarkdown: RealmNode<string>;
104
104
  setMarkdown: RealmNode<string>;
105
105
  markdown: RealmNode<string>;
106
+ markdownSignal: RealmNode<string>;
106
107
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
107
108
  contentEditableClassName: RealmNode<string>;
108
109
  placeholder: RealmNode<React.ReactNode>;
@@ -159,6 +160,7 @@ export declare const sandpackSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
159
160
  initialMarkdown: RealmNode<string>;
160
161
  setMarkdown: RealmNode<string>;
161
162
  markdown: RealmNode<string>;
163
+ markdownSignal: RealmNode<string>;
162
164
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
163
165
  contentEditableClassName: RealmNode<string>;
164
166
  placeholder: RealmNode<React.ReactNode>;
@@ -215,6 +217,7 @@ export declare const sandpackSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
215
217
  initialMarkdown: RealmNode<string>;
216
218
  setMarkdown: RealmNode<string>;
217
219
  markdown: RealmNode<string>;
220
+ markdownSignal: RealmNode<string>;
218
221
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
219
222
  contentEditableClassName: RealmNode<string>;
220
223
  placeholder: RealmNode<React.ReactNode>;
@@ -276,6 +279,7 @@ export declare const sandpackSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
276
279
  initialMarkdown: RealmNode<string>;
277
280
  setMarkdown: RealmNode<string>;
278
281
  markdown: RealmNode<string>;
282
+ markdownSignal: RealmNode<string>;
279
283
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
280
284
  contentEditableClassName: RealmNode<string>;
281
285
  placeholder: RealmNode<React.ReactNode>;
@@ -343,6 +347,7 @@ sandpackPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
343
347
  initialMarkdown: RealmNode<string>;
344
348
  setMarkdown: RealmNode<string>;
345
349
  markdown: RealmNode<string>;
350
+ markdownSignal: RealmNode<string>;
346
351
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
347
352
  contentEditableClassName: RealmNode<string>;
348
353
  placeholder: RealmNode<React.ReactNode>;
@@ -399,6 +404,7 @@ sandpackPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
399
404
  initialMarkdown: RealmNode<string>;
400
405
  setMarkdown: RealmNode<string>;
401
406
  markdown: RealmNode<string>;
407
+ markdownSignal: RealmNode<string>;
402
408
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
403
409
  contentEditableClassName: RealmNode<string>;
404
410
  placeholder: RealmNode<React.ReactNode>;
@@ -455,6 +461,7 @@ sandpackPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
455
461
  initialMarkdown: RealmNode<string>;
456
462
  setMarkdown: RealmNode<string>;
457
463
  markdown: RealmNode<string>;
464
+ markdownSignal: RealmNode<string>;
458
465
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
459
466
  contentEditableClassName: RealmNode<string>;
460
467
  placeholder: RealmNode<React.ReactNode>;
@@ -516,6 +523,7 @@ sandpackPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
516
523
  initialMarkdown: RealmNode<string>;
517
524
  setMarkdown: RealmNode<string>;
518
525
  markdown: RealmNode<string>;
526
+ markdownSignal: RealmNode<string>;
519
527
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
520
528
  contentEditableClassName: RealmNode<string>;
521
529
  placeholder: RealmNode<React.ReactNode>;
@@ -588,6 +596,7 @@ sandpackPluginHooks: {
588
596
  initialMarkdown: RealmNode<string>;
589
597
  setMarkdown: RealmNode<string>;
590
598
  markdown: RealmNode<string>;
599
+ markdownSignal: RealmNode<string>;
591
600
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
592
601
  contentEditableClassName: RealmNode<string>;
593
602
  placeholder: RealmNode<React.ReactNode>;
@@ -623,7 +632,7 @@ sandpackPluginHooks: {
623
632
  appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
624
633
  insertCodeBlock: RealmNode<Partial<CreateCodeBlockNodeOptions>>;
625
634
  }>;
626
- 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" | "codeBlockEditorDescriptors" | "defaultCodeBlockLanguage" | "appendCodeBlockEditorDescriptor" | "insertCodeBlock" | "insertSandpack" | "sandpackConfig">(key: K, callback: (value: ValueForKey<{
635
+ 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" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "codeBlockEditorDescriptors" | "defaultCodeBlockLanguage" | "appendCodeBlockEditorDescriptor" | "insertCodeBlock" | "insertSandpack" | "sandpackConfig">(key: K, callback: (value: ValueForKey<{
627
636
  insertSandpack: RealmNode<string>;
628
637
  sandpackConfig: RealmNode<SandpackConfig>;
629
638
  } & {
@@ -653,6 +662,7 @@ sandpackPluginHooks: {
653
662
  initialMarkdown: RealmNode<string>;
654
663
  setMarkdown: RealmNode<string>;
655
664
  markdown: RealmNode<string>;
665
+ markdownSignal: RealmNode<string>;
656
666
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
657
667
  contentEditableClassName: RealmNode<string>;
658
668
  placeholder: RealmNode<React.ReactNode>;
@@ -718,6 +728,7 @@ sandpackPluginHooks: {
718
728
  initialMarkdown: RealmNode<string>;
719
729
  setMarkdown: RealmNode<string>;
720
730
  markdown: RealmNode<string>;
731
+ markdownSignal: RealmNode<string>;
721
732
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
722
733
  contentEditableClassName: RealmNode<string>;
723
734
  placeholder: RealmNode<React.ReactNode>;
@@ -782,6 +793,7 @@ sandpackPluginHooks: {
782
793
  initialMarkdown: RealmNode<string>;
783
794
  setMarkdown: RealmNode<string>;
784
795
  markdown: RealmNode<string>;
796
+ markdownSignal: RealmNode<string>;
785
797
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
786
798
  contentEditableClassName: RealmNode<string>;
787
799
  placeholder: RealmNode<React.ReactNode>;
@@ -847,6 +859,7 @@ sandpackPluginHooks: {
847
859
  initialMarkdown: RealmNode<string>;
848
860
  setMarkdown: RealmNode<string>;
849
861
  markdown: RealmNode<string>;
862
+ markdownSignal: RealmNode<string>;
850
863
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
851
864
  contentEditableClassName: RealmNode<string>;
852
865
  placeholder: RealmNode<React.ReactNode>;
@@ -882,7 +895,7 @@ sandpackPluginHooks: {
882
895
  appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
883
896
  insertCodeBlock: RealmNode<Partial<CreateCodeBlockNodeOptions>>;
884
897
  }>) => void;
885
- 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" | "codeBlockEditorDescriptors" | "defaultCodeBlockLanguage" | "appendCodeBlockEditorDescriptor" | "insertCodeBlock" | "insertSandpack" | "sandpackConfig">(key: K_2) => (value: ValueForKey<{
898
+ 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" | "markdownSignal" | "editorRootElementRef" | "contentEditableClassName" | "placeholder" | "autoFocus" | "readOnly" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "onBlur" | "iconComponentFor" | "codeBlockEditorDescriptors" | "defaultCodeBlockLanguage" | "appendCodeBlockEditorDescriptor" | "insertCodeBlock" | "insertSandpack" | "sandpackConfig">(key: K_2) => (value: ValueForKey<{
886
899
  insertSandpack: RealmNode<string>;
887
900
  sandpackConfig: RealmNode<SandpackConfig>;
888
901
  } & {
@@ -912,6 +925,7 @@ sandpackPluginHooks: {
912
925
  initialMarkdown: RealmNode<string>;
913
926
  setMarkdown: RealmNode<string>;
914
927
  markdown: RealmNode<string>;
928
+ markdownSignal: RealmNode<string>;
915
929
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
916
930
  contentEditableClassName: RealmNode<string>;
917
931
  placeholder: RealmNode<React.ReactNode>;
@@ -50,6 +50,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
50
50
  initialMarkdown: RealmNode<string>;
51
51
  setMarkdown: RealmNode<string>;
52
52
  markdown: RealmNode<string>;
53
+ markdownSignal: RealmNode<string>;
53
54
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
54
55
  contentEditableClassName: RealmNode<string>;
55
56
  placeholder: RealmNode<ReactNode>;
@@ -106,6 +107,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
106
107
  initialMarkdown: RealmNode<string>;
107
108
  setMarkdown: RealmNode<string>;
108
109
  markdown: RealmNode<string>;
110
+ markdownSignal: RealmNode<string>;
109
111
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
110
112
  contentEditableClassName: RealmNode<string>;
111
113
  placeholder: RealmNode<ReactNode>;
@@ -167,6 +169,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
167
169
  initialMarkdown: RealmNode<string>;
168
170
  setMarkdown: RealmNode<string>;
169
171
  markdown: RealmNode<string>;
172
+ markdownSignal: RealmNode<string>;
170
173
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
171
174
  contentEditableClassName: RealmNode<string>;
172
175
  placeholder: RealmNode<ReactNode>;
@@ -223,6 +226,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
223
226
  initialMarkdown: RealmNode<string>;
224
227
  setMarkdown: RealmNode<string>;
225
228
  markdown: RealmNode<string>;
229
+ markdownSignal: RealmNode<string>;
226
230
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
227
231
  contentEditableClassName: RealmNode<string>;
228
232
  placeholder: RealmNode<ReactNode>;
@@ -286,6 +290,7 @@ tablePluginHooks: {
286
290
  initialMarkdown: RealmNode<string>;
287
291
  setMarkdown: RealmNode<string>;
288
292
  markdown: RealmNode<string>;
293
+ markdownSignal: RealmNode<string>;
289
294
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
290
295
  contentEditableClassName: RealmNode<string>;
291
296
  placeholder: RealmNode<ReactNode>;
@@ -316,7 +321,7 @@ tablePluginHooks: {
316
321
  onBlur: RealmNode<FocusEvent>;
317
322
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
318
323
  }>;
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<{
324
+ 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" | "markdownSignal" | "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<{
320
325
  insertTable: RealmNode<InsertTablePayload>;
321
326
  } & {
322
327
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -345,6 +350,7 @@ tablePluginHooks: {
345
350
  initialMarkdown: RealmNode<string>;
346
351
  setMarkdown: RealmNode<string>;
347
352
  markdown: RealmNode<string>;
353
+ markdownSignal: RealmNode<string>;
348
354
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
349
355
  contentEditableClassName: RealmNode<string>;
350
356
  placeholder: RealmNode<ReactNode>;
@@ -404,6 +410,7 @@ tablePluginHooks: {
404
410
  initialMarkdown: RealmNode<string>;
405
411
  setMarkdown: RealmNode<string>;
406
412
  markdown: RealmNode<string>;
413
+ markdownSignal: RealmNode<string>;
407
414
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
408
415
  contentEditableClassName: RealmNode<string>;
409
416
  placeholder: RealmNode<ReactNode>;
@@ -462,6 +469,7 @@ tablePluginHooks: {
462
469
  initialMarkdown: RealmNode<string>;
463
470
  setMarkdown: RealmNode<string>;
464
471
  markdown: RealmNode<string>;
472
+ markdownSignal: RealmNode<string>;
465
473
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
466
474
  contentEditableClassName: RealmNode<string>;
467
475
  placeholder: RealmNode<ReactNode>;
@@ -521,6 +529,7 @@ tablePluginHooks: {
521
529
  initialMarkdown: RealmNode<string>;
522
530
  setMarkdown: RealmNode<string>;
523
531
  markdown: RealmNode<string>;
532
+ markdownSignal: RealmNode<string>;
524
533
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
525
534
  contentEditableClassName: RealmNode<string>;
526
535
  placeholder: RealmNode<ReactNode>;
@@ -551,7 +560,7 @@ tablePluginHooks: {
551
560
  onBlur: RealmNode<FocusEvent>;
552
561
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
553
562
  }>) => void;
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<{
563
+ 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" | "markdownSignal" | "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<{
555
564
  insertTable: RealmNode<InsertTablePayload>;
556
565
  } & {
557
566
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -580,6 +589,7 @@ tablePluginHooks: {
580
589
  initialMarkdown: RealmNode<string>;
581
590
  setMarkdown: RealmNode<string>;
582
591
  markdown: RealmNode<string>;
592
+ markdownSignal: RealmNode<string>;
583
593
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
584
594
  contentEditableClassName: RealmNode<string>;
585
595
  placeholder: RealmNode<ReactNode>;
@@ -40,6 +40,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
40
40
  initialMarkdown: RealmNode<string>;
41
41
  setMarkdown: RealmNode<string>;
42
42
  markdown: RealmNode<string>;
43
+ markdownSignal: RealmNode<string>;
43
44
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
44
45
  contentEditableClassName: RealmNode<string>;
45
46
  placeholder: RealmNode<ReactNode>;
@@ -96,6 +97,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
96
97
  initialMarkdown: RealmNode<string>;
97
98
  setMarkdown: RealmNode<string>;
98
99
  markdown: RealmNode<string>;
100
+ markdownSignal: RealmNode<string>;
99
101
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
100
102
  contentEditableClassName: RealmNode<string>;
101
103
  placeholder: RealmNode<ReactNode>;
@@ -157,6 +159,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
157
159
  initialMarkdown: RealmNode<string>;
158
160
  setMarkdown: RealmNode<string>;
159
161
  markdown: RealmNode<string>;
162
+ markdownSignal: RealmNode<string>;
160
163
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
161
164
  contentEditableClassName: RealmNode<string>;
162
165
  placeholder: RealmNode<ReactNode>;
@@ -213,6 +216,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
213
216
  initialMarkdown: RealmNode<string>;
214
217
  setMarkdown: RealmNode<string>;
215
218
  markdown: RealmNode<string>;
219
+ markdownSignal: RealmNode<string>;
216
220
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
217
221
  contentEditableClassName: RealmNode<string>;
218
222
  placeholder: RealmNode<ReactNode>;
@@ -276,6 +280,7 @@ thematicBreakPluginHooks: {
276
280
  initialMarkdown: RealmNode<string>;
277
281
  setMarkdown: RealmNode<string>;
278
282
  markdown: RealmNode<string>;
283
+ markdownSignal: RealmNode<string>;
279
284
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
280
285
  contentEditableClassName: RealmNode<string>;
281
286
  placeholder: RealmNode<ReactNode>;
@@ -306,7 +311,7 @@ thematicBreakPluginHooks: {
306
311
  onBlur: RealmNode<FocusEvent>;
307
312
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
308
313
  }>;
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<{
314
+ 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" | "markdownSignal" | "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<{
310
315
  insertThematicBreak: RealmNode<true>;
311
316
  } & {
312
317
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -335,6 +340,7 @@ thematicBreakPluginHooks: {
335
340
  initialMarkdown: RealmNode<string>;
336
341
  setMarkdown: RealmNode<string>;
337
342
  markdown: RealmNode<string>;
343
+ markdownSignal: RealmNode<string>;
338
344
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
339
345
  contentEditableClassName: RealmNode<string>;
340
346
  placeholder: RealmNode<ReactNode>;
@@ -394,6 +400,7 @@ thematicBreakPluginHooks: {
394
400
  initialMarkdown: RealmNode<string>;
395
401
  setMarkdown: RealmNode<string>;
396
402
  markdown: RealmNode<string>;
403
+ markdownSignal: RealmNode<string>;
397
404
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
398
405
  contentEditableClassName: RealmNode<string>;
399
406
  placeholder: RealmNode<ReactNode>;
@@ -452,6 +459,7 @@ thematicBreakPluginHooks: {
452
459
  initialMarkdown: RealmNode<string>;
453
460
  setMarkdown: RealmNode<string>;
454
461
  markdown: RealmNode<string>;
462
+ markdownSignal: RealmNode<string>;
455
463
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
456
464
  contentEditableClassName: RealmNode<string>;
457
465
  placeholder: RealmNode<ReactNode>;
@@ -511,6 +519,7 @@ thematicBreakPluginHooks: {
511
519
  initialMarkdown: RealmNode<string>;
512
520
  setMarkdown: RealmNode<string>;
513
521
  markdown: RealmNode<string>;
522
+ markdownSignal: RealmNode<string>;
514
523
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
515
524
  contentEditableClassName: RealmNode<string>;
516
525
  placeholder: RealmNode<ReactNode>;
@@ -541,7 +550,7 @@ thematicBreakPluginHooks: {
541
550
  onBlur: RealmNode<FocusEvent>;
542
551
  iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
543
552
  }>) => 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" | "iconComponentFor" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
553
+ 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" | "markdownSignal" | "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<{
545
554
  insertThematicBreak: RealmNode<true>;
546
555
  } & {
547
556
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -570,6 +579,7 @@ thematicBreakPluginHooks: {
570
579
  initialMarkdown: RealmNode<string>;
571
580
  setMarkdown: RealmNode<string>;
572
581
  markdown: RealmNode<string>;
582
+ markdownSignal: RealmNode<string>;
573
583
  editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
574
584
  contentEditableClassName: RealmNode<string>;
575
585
  placeholder: RealmNode<ReactNode>;
@@ -39,6 +39,7 @@ export declare const toolbarSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
39
39
  initialMarkdown: RealmNode<string>;
40
40
  setMarkdown: RealmNode<string>;
41
41
  markdown: RealmNode<string>;
42
+ markdownSignal: RealmNode<string>;
42
43
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
43
44
  contentEditableClassName: RealmNode<string>;
44
45
  placeholder: RealmNode<React.ReactNode>;
@@ -100,6 +101,7 @@ toolbarPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
100
101
  initialMarkdown: RealmNode<string>;
101
102
  setMarkdown: RealmNode<string>;
102
103
  markdown: RealmNode<string>;
104
+ markdownSignal: RealmNode<string>;
103
105
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
104
106
  contentEditableClassName: RealmNode<string>;
105
107
  placeholder: RealmNode<React.ReactNode>;
@@ -165,6 +167,7 @@ toolbarPluginHooks: {
165
167
  initialMarkdown: RealmNode<string>;
166
168
  setMarkdown: RealmNode<string>;
167
169
  markdown: RealmNode<string>;
170
+ markdownSignal: RealmNode<string>;
168
171
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
169
172
  contentEditableClassName: RealmNode<string>;
170
173
  placeholder: RealmNode<React.ReactNode>;
@@ -195,7 +198,7 @@ toolbarPluginHooks: {
195
198
  onBlur: RealmNode<FocusEvent>;
196
199
  iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
197
200
  }>;
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<{
201
+ 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" | "markdownSignal" | "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<{
199
202
  toolbarContents: RealmNode<() => React.ReactNode>;
200
203
  } & {
201
204
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -224,6 +227,7 @@ toolbarPluginHooks: {
224
227
  initialMarkdown: RealmNode<string>;
225
228
  setMarkdown: RealmNode<string>;
226
229
  markdown: RealmNode<string>;
230
+ markdownSignal: RealmNode<string>;
227
231
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
228
232
  contentEditableClassName: RealmNode<string>;
229
233
  placeholder: RealmNode<React.ReactNode>;
@@ -283,6 +287,7 @@ toolbarPluginHooks: {
283
287
  initialMarkdown: RealmNode<string>;
284
288
  setMarkdown: RealmNode<string>;
285
289
  markdown: RealmNode<string>;
290
+ markdownSignal: RealmNode<string>;
286
291
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
287
292
  contentEditableClassName: RealmNode<string>;
288
293
  placeholder: RealmNode<React.ReactNode>;
@@ -341,6 +346,7 @@ toolbarPluginHooks: {
341
346
  initialMarkdown: RealmNode<string>;
342
347
  setMarkdown: RealmNode<string>;
343
348
  markdown: RealmNode<string>;
349
+ markdownSignal: RealmNode<string>;
344
350
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
345
351
  contentEditableClassName: RealmNode<string>;
346
352
  placeholder: RealmNode<React.ReactNode>;
@@ -400,6 +406,7 @@ toolbarPluginHooks: {
400
406
  initialMarkdown: RealmNode<string>;
401
407
  setMarkdown: RealmNode<string>;
402
408
  markdown: RealmNode<string>;
409
+ markdownSignal: RealmNode<string>;
403
410
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
404
411
  contentEditableClassName: RealmNode<string>;
405
412
  placeholder: RealmNode<React.ReactNode>;
@@ -430,7 +437,7 @@ toolbarPluginHooks: {
430
437
  onBlur: RealmNode<FocusEvent>;
431
438
  iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
432
439
  }>) => void;
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<{
440
+ 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" | "markdownSignal" | "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<{
434
441
  toolbarContents: RealmNode<() => React.ReactNode>;
435
442
  } & {
436
443
  activeEditor: RealmNode<LexicalEditor | null>;
@@ -459,6 +466,7 @@ toolbarPluginHooks: {
459
466
  initialMarkdown: RealmNode<string>;
460
467
  setMarkdown: RealmNode<string>;
461
468
  markdown: RealmNode<string>;
469
+ markdownSignal: RealmNode<string>;
462
470
  editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
463
471
  contentEditableClassName: RealmNode<string>;
464
472
  placeholder: RealmNode<React.ReactNode>;
package/dist/style.css CHANGED
@@ -149,6 +149,9 @@
149
149
  background: transparent;
150
150
  font-size: var(--text-xxs);
151
151
  }
152
+ .mdxeditor .cm-activeLine {
153
+ background: transparent;
154
+ }
152
155
  ._editorRoot_1xgxv_37 {
153
156
  --accentBase: var(--blue1);
154
157
  --accentBgSubtle: var(--blue2);
@@ -0,0 +1 @@
1
+ export declare function mergeStyleAttributes(style1: string, style2: string): string;
@@ -0,0 +1,22 @@
1
+ function mergeStyleAttributes(style1, style2) {
2
+ const styleObject1 = styleToObject(style1);
3
+ const styleObject2 = styleToObject(style2);
4
+ const mergedStyleObject = { ...styleObject1, ...styleObject2 };
5
+ const mergedStyleString = objectToStyle(mergedStyleObject);
6
+ return mergedStyleString;
7
+ }
8
+ function styleToObject(style) {
9
+ const styleObject = {};
10
+ const stylePairs = style.split(";").filter((pair) => pair.trim() !== "");
11
+ stylePairs.forEach((pair) => {
12
+ const [key, value] = pair.split(":").map((part) => part.trim());
13
+ styleObject[key] = value;
14
+ });
15
+ return styleObject;
16
+ }
17
+ function objectToStyle(styleObject) {
18
+ return Object.entries(styleObject).map(([key, value]) => `${key}: ${value}`).join("; ");
19
+ }
20
+ export {
21
+ mergeStyleAttributes
22
+ };
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "1.10.1",
12
+ "version": "1.11.0",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",
@@ -79,6 +79,7 @@
79
79
  "micromark-extension-frontmatter": "1.1.0",
80
80
  "micromark-extension-gfm-table": "^1.0.6",
81
81
  "micromark-extension-gfm-task-list-item": "1.0.5",
82
+ "micromark-extension-mdx-jsx": "^1.0.5",
82
83
  "micromark-extension-mdxjs": "1.0.1",
83
84
  "react-hook-form": "^7.44.2",
84
85
  "unidiff": "^1.0.2"