@mdxeditor/editor 1.10.0 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/codeblock/index.d.ts +12 -2
- package/dist/plugins/codemirror/index.d.ts +16 -2
- package/dist/plugins/core/index.d.ts +10 -2
- package/dist/plugins/core/index.js +4 -1
- package/dist/plugins/diff-source/index.d.ts +14 -4
- package/dist/plugins/diff-source/index.js +2 -1
- package/dist/plugins/directives/index.d.ts +12 -2
- package/dist/plugins/frontmatter/index.d.ts +12 -2
- package/dist/plugins/headings/index.d.ts +12 -2
- package/dist/plugins/image/index.d.ts +12 -2
- package/dist/plugins/jsx/index.d.ts +12 -2
- package/dist/plugins/link/index.d.ts +1 -0
- package/dist/plugins/link-dialog/index.d.ts +10 -2
- package/dist/plugins/link-dialog/index.js +0 -6
- package/dist/plugins/lists/index.d.ts +12 -2
- package/dist/plugins/markdown-shortcut/index.d.ts +1 -0
- package/dist/plugins/quote/index.d.ts +9 -2
- package/dist/plugins/sandpack/index.d.ts +16 -2
- package/dist/plugins/table/index.d.ts +12 -2
- package/dist/plugins/thematic-break/index.d.ts +12 -2
- package/dist/plugins/toolbar/index.d.ts +10 -2
- package/package.json +11 -11
|
@@ -93,6 +93,7 @@ export declare const codeBlockSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
93
93
|
initialMarkdown: RealmNode<string>;
|
|
94
94
|
setMarkdown: RealmNode<string>;
|
|
95
95
|
markdown: RealmNode<string>;
|
|
96
|
+
markdownSignal: RealmNode<string>;
|
|
96
97
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
97
98
|
contentEditableClassName: RealmNode<string>;
|
|
98
99
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -149,6 +150,7 @@ export declare const codeBlockSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
149
150
|
initialMarkdown: RealmNode<string>;
|
|
150
151
|
setMarkdown: RealmNode<string>;
|
|
151
152
|
markdown: RealmNode<string>;
|
|
153
|
+
markdownSignal: RealmNode<string>;
|
|
152
154
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
153
155
|
contentEditableClassName: RealmNode<string>;
|
|
154
156
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -228,6 +230,7 @@ codeBlockPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
228
230
|
initialMarkdown: RealmNode<string>;
|
|
229
231
|
setMarkdown: RealmNode<string>;
|
|
230
232
|
markdown: RealmNode<string>;
|
|
233
|
+
markdownSignal: RealmNode<string>;
|
|
231
234
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
232
235
|
contentEditableClassName: RealmNode<string>;
|
|
233
236
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -284,6 +287,7 @@ codeBlockPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
284
287
|
initialMarkdown: RealmNode<string>;
|
|
285
288
|
setMarkdown: RealmNode<string>;
|
|
286
289
|
markdown: RealmNode<string>;
|
|
290
|
+
markdownSignal: RealmNode<string>;
|
|
287
291
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
288
292
|
contentEditableClassName: RealmNode<string>;
|
|
289
293
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -355,6 +359,7 @@ codeBlockPluginHooks: {
|
|
|
355
359
|
initialMarkdown: RealmNode<string>;
|
|
356
360
|
setMarkdown: RealmNode<string>;
|
|
357
361
|
markdown: RealmNode<string>;
|
|
362
|
+
markdownSignal: RealmNode<string>;
|
|
358
363
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
359
364
|
contentEditableClassName: RealmNode<string>;
|
|
360
365
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -385,7 +390,7 @@ codeBlockPluginHooks: {
|
|
|
385
390
|
onBlur: RealmNode<FocusEvent>;
|
|
386
391
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
387
392
|
}>;
|
|
388
|
-
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">(key: K, callback: (value: ValueForKey<{
|
|
393
|
+
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">(key: K, callback: (value: ValueForKey<{
|
|
389
394
|
codeBlockEditorDescriptors: RealmNode<CodeBlockEditorDescriptor[]>;
|
|
390
395
|
defaultCodeBlockLanguage: RealmNode<string>;
|
|
391
396
|
appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
|
|
@@ -417,6 +422,7 @@ codeBlockPluginHooks: {
|
|
|
417
422
|
initialMarkdown: RealmNode<string>;
|
|
418
423
|
setMarkdown: RealmNode<string>;
|
|
419
424
|
markdown: RealmNode<string>;
|
|
425
|
+
markdownSignal: RealmNode<string>;
|
|
420
426
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
421
427
|
contentEditableClassName: RealmNode<string>;
|
|
422
428
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -479,6 +485,7 @@ codeBlockPluginHooks: {
|
|
|
479
485
|
initialMarkdown: RealmNode<string>;
|
|
480
486
|
setMarkdown: RealmNode<string>;
|
|
481
487
|
markdown: RealmNode<string>;
|
|
488
|
+
markdownSignal: RealmNode<string>;
|
|
482
489
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
483
490
|
contentEditableClassName: RealmNode<string>;
|
|
484
491
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -540,6 +547,7 @@ codeBlockPluginHooks: {
|
|
|
540
547
|
initialMarkdown: RealmNode<string>;
|
|
541
548
|
setMarkdown: RealmNode<string>;
|
|
542
549
|
markdown: RealmNode<string>;
|
|
550
|
+
markdownSignal: RealmNode<string>;
|
|
543
551
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
544
552
|
contentEditableClassName: RealmNode<string>;
|
|
545
553
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -602,6 +610,7 @@ codeBlockPluginHooks: {
|
|
|
602
610
|
initialMarkdown: RealmNode<string>;
|
|
603
611
|
setMarkdown: RealmNode<string>;
|
|
604
612
|
markdown: RealmNode<string>;
|
|
613
|
+
markdownSignal: RealmNode<string>;
|
|
605
614
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
606
615
|
contentEditableClassName: RealmNode<string>;
|
|
607
616
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -632,7 +641,7 @@ codeBlockPluginHooks: {
|
|
|
632
641
|
onBlur: RealmNode<FocusEvent>;
|
|
633
642
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
634
643
|
}>) => void;
|
|
635
|
-
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">(key: K_2) => (value: ValueForKey<{
|
|
644
|
+
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">(key: K_2) => (value: ValueForKey<{
|
|
636
645
|
codeBlockEditorDescriptors: RealmNode<CodeBlockEditorDescriptor[]>;
|
|
637
646
|
defaultCodeBlockLanguage: RealmNode<string>;
|
|
638
647
|
appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
|
|
@@ -664,6 +673,7 @@ codeBlockPluginHooks: {
|
|
|
664
673
|
initialMarkdown: RealmNode<string>;
|
|
665
674
|
setMarkdown: RealmNode<string>;
|
|
666
675
|
markdown: RealmNode<string>;
|
|
676
|
+
markdownSignal: RealmNode<string>;
|
|
667
677
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
668
678
|
contentEditableClassName: RealmNode<string>;
|
|
669
679
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -41,6 +41,7 @@ export declare const codeMirrorSystem: 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>;
|
|
@@ -97,6 +98,7 @@ export declare const codeMirrorSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
97
98
|
initialMarkdown: RealmNode<string>;
|
|
98
99
|
setMarkdown: RealmNode<string>;
|
|
99
100
|
markdown: RealmNode<string>;
|
|
101
|
+
markdownSignal: RealmNode<string>;
|
|
100
102
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
101
103
|
contentEditableClassName: RealmNode<string>;
|
|
102
104
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -153,6 +155,7 @@ export declare const codeMirrorSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
153
155
|
initialMarkdown: RealmNode<string>;
|
|
154
156
|
setMarkdown: RealmNode<string>;
|
|
155
157
|
markdown: RealmNode<string>;
|
|
158
|
+
markdownSignal: RealmNode<string>;
|
|
156
159
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
157
160
|
contentEditableClassName: RealmNode<string>;
|
|
158
161
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -214,6 +217,7 @@ export declare const codeMirrorSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
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>;
|
|
@@ -284,6 +288,7 @@ codeMirrorPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
284
288
|
initialMarkdown: RealmNode<string>;
|
|
285
289
|
setMarkdown: RealmNode<string>;
|
|
286
290
|
markdown: RealmNode<string>;
|
|
291
|
+
markdownSignal: RealmNode<string>;
|
|
287
292
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
288
293
|
contentEditableClassName: RealmNode<string>;
|
|
289
294
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -340,6 +345,7 @@ codeMirrorPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
340
345
|
initialMarkdown: RealmNode<string>;
|
|
341
346
|
setMarkdown: RealmNode<string>;
|
|
342
347
|
markdown: RealmNode<string>;
|
|
348
|
+
markdownSignal: RealmNode<string>;
|
|
343
349
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
344
350
|
contentEditableClassName: RealmNode<string>;
|
|
345
351
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -396,6 +402,7 @@ codeMirrorPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
396
402
|
initialMarkdown: RealmNode<string>;
|
|
397
403
|
setMarkdown: RealmNode<string>;
|
|
398
404
|
markdown: RealmNode<string>;
|
|
405
|
+
markdownSignal: RealmNode<string>;
|
|
399
406
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
400
407
|
contentEditableClassName: RealmNode<string>;
|
|
401
408
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -457,6 +464,7 @@ codeMirrorPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
457
464
|
initialMarkdown: RealmNode<string>;
|
|
458
465
|
setMarkdown: RealmNode<string>;
|
|
459
466
|
markdown: RealmNode<string>;
|
|
467
|
+
markdownSignal: RealmNode<string>;
|
|
460
468
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
461
469
|
contentEditableClassName: RealmNode<string>;
|
|
462
470
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -535,6 +543,7 @@ codeMirrorHooks: {
|
|
|
535
543
|
initialMarkdown: RealmNode<string>;
|
|
536
544
|
setMarkdown: RealmNode<string>;
|
|
537
545
|
markdown: RealmNode<string>;
|
|
546
|
+
markdownSignal: RealmNode<string>;
|
|
538
547
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
539
548
|
contentEditableClassName: RealmNode<string>;
|
|
540
549
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -570,7 +579,7 @@ codeMirrorHooks: {
|
|
|
570
579
|
appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
|
|
571
580
|
insertCodeBlock: RealmNode<Partial<CreateCodeBlockNodeOptions>>;
|
|
572
581
|
}>;
|
|
573
|
-
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" | "codeBlockLanguages" | "insertCodeMirror">(key: K, callback: (value: ValueForKey<{
|
|
582
|
+
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" | "codeBlockLanguages" | "insertCodeMirror">(key: K, callback: (value: ValueForKey<{
|
|
574
583
|
codeBlockLanguages: RealmNode<Record<string, string>>;
|
|
575
584
|
insertCodeMirror: RealmNode<{
|
|
576
585
|
language: string;
|
|
@@ -603,6 +612,7 @@ codeMirrorHooks: {
|
|
|
603
612
|
initialMarkdown: RealmNode<string>;
|
|
604
613
|
setMarkdown: RealmNode<string>;
|
|
605
614
|
markdown: RealmNode<string>;
|
|
615
|
+
markdownSignal: RealmNode<string>;
|
|
606
616
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
607
617
|
contentEditableClassName: RealmNode<string>;
|
|
608
618
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -671,6 +681,7 @@ codeMirrorHooks: {
|
|
|
671
681
|
initialMarkdown: RealmNode<string>;
|
|
672
682
|
setMarkdown: RealmNode<string>;
|
|
673
683
|
markdown: RealmNode<string>;
|
|
684
|
+
markdownSignal: RealmNode<string>;
|
|
674
685
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
675
686
|
contentEditableClassName: RealmNode<string>;
|
|
676
687
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -738,6 +749,7 @@ codeMirrorHooks: {
|
|
|
738
749
|
initialMarkdown: RealmNode<string>;
|
|
739
750
|
setMarkdown: RealmNode<string>;
|
|
740
751
|
markdown: RealmNode<string>;
|
|
752
|
+
markdownSignal: RealmNode<string>;
|
|
741
753
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
742
754
|
contentEditableClassName: RealmNode<string>;
|
|
743
755
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -806,6 +818,7 @@ codeMirrorHooks: {
|
|
|
806
818
|
initialMarkdown: RealmNode<string>;
|
|
807
819
|
setMarkdown: RealmNode<string>;
|
|
808
820
|
markdown: RealmNode<string>;
|
|
821
|
+
markdownSignal: RealmNode<string>;
|
|
809
822
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
810
823
|
contentEditableClassName: RealmNode<string>;
|
|
811
824
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -841,7 +854,7 @@ codeMirrorHooks: {
|
|
|
841
854
|
appendCodeBlockEditorDescriptor: RealmNode<CodeBlockEditorDescriptor>;
|
|
842
855
|
insertCodeBlock: RealmNode<Partial<CreateCodeBlockNodeOptions>>;
|
|
843
856
|
}>) => void;
|
|
844
|
-
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" | "codeBlockLanguages" | "insertCodeMirror">(key: K_2) => (value: ValueForKey<{
|
|
857
|
+
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" | "codeBlockLanguages" | "insertCodeMirror">(key: K_2) => (value: ValueForKey<{
|
|
845
858
|
codeBlockLanguages: RealmNode<Record<string, string>>;
|
|
846
859
|
insertCodeMirror: RealmNode<{
|
|
847
860
|
language: string;
|
|
@@ -874,6 +887,7 @@ codeMirrorHooks: {
|
|
|
874
887
|
initialMarkdown: RealmNode<string>;
|
|
875
888
|
setMarkdown: RealmNode<string>;
|
|
876
889
|
markdown: RealmNode<string>;
|
|
890
|
+
markdownSignal: RealmNode<string>;
|
|
877
891
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
878
892
|
contentEditableClassName: RealmNode<string>;
|
|
879
893
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -56,6 +56,7 @@ export declare const coreSystem: SystemSpec<[], (r: Realm) => {
|
|
|
56
56
|
initialMarkdown: RealmNode<string>;
|
|
57
57
|
setMarkdown: RealmNode<string>;
|
|
58
58
|
markdown: RealmNode<string>;
|
|
59
|
+
markdownSignal: RealmNode<string>;
|
|
59
60
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
60
61
|
contentEditableClassName: RealmNode<string>;
|
|
61
62
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -129,6 +130,7 @@ corePlugin: PluginConstructor<SystemSpec<[], (r: Realm) => {
|
|
|
129
130
|
initialMarkdown: RealmNode<string>;
|
|
130
131
|
setMarkdown: RealmNode<string>;
|
|
131
132
|
markdown: RealmNode<string>;
|
|
133
|
+
markdownSignal: RealmNode<string>;
|
|
132
134
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
133
135
|
contentEditableClassName: RealmNode<string>;
|
|
134
136
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -188,6 +190,7 @@ corePluginHooks: {
|
|
|
188
190
|
initialMarkdown: RealmNode<string>;
|
|
189
191
|
setMarkdown: RealmNode<string>;
|
|
190
192
|
markdown: RealmNode<string>;
|
|
193
|
+
markdownSignal: RealmNode<string>;
|
|
191
194
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
192
195
|
contentEditableClassName: RealmNode<string>;
|
|
193
196
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -218,7 +221,7 @@ corePluginHooks: {
|
|
|
218
221
|
onBlur: RealmNode<FocusEvent>;
|
|
219
222
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
220
223
|
}>;
|
|
221
|
-
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<{
|
|
224
|
+
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<{
|
|
222
225
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
223
226
|
inFocus: RealmNode<boolean>;
|
|
224
227
|
historyState: RealmNode<HistoryState>;
|
|
@@ -245,6 +248,7 @@ corePluginHooks: {
|
|
|
245
248
|
initialMarkdown: RealmNode<string>;
|
|
246
249
|
setMarkdown: RealmNode<string>;
|
|
247
250
|
markdown: RealmNode<string>;
|
|
251
|
+
markdownSignal: RealmNode<string>;
|
|
248
252
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
249
253
|
contentEditableClassName: RealmNode<string>;
|
|
250
254
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -302,6 +306,7 @@ corePluginHooks: {
|
|
|
302
306
|
initialMarkdown: RealmNode<string>;
|
|
303
307
|
setMarkdown: RealmNode<string>;
|
|
304
308
|
markdown: RealmNode<string>;
|
|
309
|
+
markdownSignal: RealmNode<string>;
|
|
305
310
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
306
311
|
contentEditableClassName: RealmNode<string>;
|
|
307
312
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -358,6 +363,7 @@ corePluginHooks: {
|
|
|
358
363
|
initialMarkdown: RealmNode<string>;
|
|
359
364
|
setMarkdown: RealmNode<string>;
|
|
360
365
|
markdown: RealmNode<string>;
|
|
366
|
+
markdownSignal: RealmNode<string>;
|
|
361
367
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
362
368
|
contentEditableClassName: RealmNode<string>;
|
|
363
369
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -415,6 +421,7 @@ corePluginHooks: {
|
|
|
415
421
|
initialMarkdown: RealmNode<string>;
|
|
416
422
|
setMarkdown: RealmNode<string>;
|
|
417
423
|
markdown: RealmNode<string>;
|
|
424
|
+
markdownSignal: RealmNode<string>;
|
|
418
425
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
419
426
|
contentEditableClassName: RealmNode<string>;
|
|
420
427
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -445,7 +452,7 @@ corePluginHooks: {
|
|
|
445
452
|
onBlur: RealmNode<FocusEvent>;
|
|
446
453
|
iconComponentFor: RealmNode<(name: IconKey) => React.ReactNode>;
|
|
447
454
|
}>) => void;
|
|
448
|
-
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<{
|
|
455
|
+
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<{
|
|
449
456
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
450
457
|
inFocus: RealmNode<boolean>;
|
|
451
458
|
historyState: RealmNode<HistoryState>;
|
|
@@ -472,6 +479,7 @@ corePluginHooks: {
|
|
|
472
479
|
initialMarkdown: RealmNode<string>;
|
|
473
480
|
setMarkdown: RealmNode<string>;
|
|
474
481
|
markdown: RealmNode<string>;
|
|
482
|
+
markdownSignal: RealmNode<string>;
|
|
475
483
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
476
484
|
contentEditableClassName: RealmNode<string>;
|
|
477
485
|
placeholder: RealmNode<React.ReactNode>;
|
|
@@ -121,6 +121,8 @@ const coreSystem = system((r) => {
|
|
|
121
121
|
});
|
|
122
122
|
const initialMarkdown = r.node("");
|
|
123
123
|
const markdown = r.node("", true);
|
|
124
|
+
const markdownSignal = r.node();
|
|
125
|
+
r.link(markdown, markdownSignal);
|
|
124
126
|
r.link(initialMarkdown, markdown);
|
|
125
127
|
const importVisitors = r.node([]);
|
|
126
128
|
const syntaxExtensions = r.node([]);
|
|
@@ -347,6 +349,7 @@ const coreSystem = system((r) => {
|
|
|
347
349
|
initialMarkdown,
|
|
348
350
|
setMarkdown,
|
|
349
351
|
markdown,
|
|
352
|
+
markdownSignal,
|
|
350
353
|
// DOM
|
|
351
354
|
editorRootElementRef,
|
|
352
355
|
contentEditableClassName,
|
|
@@ -391,7 +394,7 @@ const [
|
|
|
391
394
|
placeholder: params.placeholder,
|
|
392
395
|
readOnly: params.readOnly
|
|
393
396
|
});
|
|
394
|
-
realm.singletonSubKey("
|
|
397
|
+
realm.singletonSubKey("markdownSignal", params.onChange);
|
|
395
398
|
realm.singletonSubKey("onBlur", params.onBlur);
|
|
396
399
|
},
|
|
397
400
|
init(realm, params) {
|
|
@@ -43,6 +43,7 @@ export declare const diffSourceSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
43
43
|
initialMarkdown: RealmNode<string>;
|
|
44
44
|
setMarkdown: RealmNode<string>;
|
|
45
45
|
markdown: RealmNode<string>;
|
|
46
|
+
markdownSignal: RealmNode<string>;
|
|
46
47
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
47
48
|
contentEditableClassName: RealmNode<string>;
|
|
48
49
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -72,7 +73,7 @@ export declare const diffSourceSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
72
73
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
73
74
|
onBlur: RealmNode<FocusEvent>;
|
|
74
75
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
75
|
-
}>], (r: Realm, [{ markdown, setMarkdown }]: [{
|
|
76
|
+
}>], (r: Realm, [{ markdown, setMarkdown, markdownSignal }]: [{
|
|
76
77
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
77
78
|
inFocus: RealmNode<boolean>;
|
|
78
79
|
historyState: RealmNode<HistoryState>;
|
|
@@ -99,6 +100,7 @@ export declare const diffSourceSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
99
100
|
initialMarkdown: RealmNode<string>;
|
|
100
101
|
setMarkdown: RealmNode<string>;
|
|
101
102
|
markdown: RealmNode<string>;
|
|
103
|
+
markdownSignal: RealmNode<string>;
|
|
102
104
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
103
105
|
contentEditableClassName: RealmNode<string>;
|
|
104
106
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -168,6 +170,7 @@ diffSourcePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
168
170
|
initialMarkdown: RealmNode<string>;
|
|
169
171
|
setMarkdown: RealmNode<string>;
|
|
170
172
|
markdown: RealmNode<string>;
|
|
173
|
+
markdownSignal: RealmNode<string>;
|
|
171
174
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
172
175
|
contentEditableClassName: RealmNode<string>;
|
|
173
176
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -197,7 +200,7 @@ diffSourcePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
197
200
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
198
201
|
onBlur: RealmNode<FocusEvent>;
|
|
199
202
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
200
|
-
}>], (r: Realm, [{ markdown, setMarkdown }]: [{
|
|
203
|
+
}>], (r: Realm, [{ markdown, setMarkdown, markdownSignal }]: [{
|
|
201
204
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
202
205
|
inFocus: RealmNode<boolean>;
|
|
203
206
|
historyState: RealmNode<HistoryState>;
|
|
@@ -224,6 +227,7 @@ diffSourcePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
224
227
|
initialMarkdown: RealmNode<string>;
|
|
225
228
|
setMarkdown: RealmNode<string>;
|
|
226
229
|
markdown: RealmNode<string>;
|
|
230
|
+
markdownSignal: RealmNode<string>;
|
|
227
231
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
228
232
|
contentEditableClassName: RealmNode<string>;
|
|
229
233
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -293,6 +297,7 @@ diffSourcePluginHooks: {
|
|
|
293
297
|
initialMarkdown: RealmNode<string>;
|
|
294
298
|
setMarkdown: RealmNode<string>;
|
|
295
299
|
markdown: RealmNode<string>;
|
|
300
|
+
markdownSignal: RealmNode<string>;
|
|
296
301
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
297
302
|
contentEditableClassName: RealmNode<string>;
|
|
298
303
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -323,7 +328,7 @@ diffSourcePluginHooks: {
|
|
|
323
328
|
onBlur: RealmNode<FocusEvent>;
|
|
324
329
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
325
330
|
}>;
|
|
326
|
-
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" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown" | "cmExtensions">(key: K, callback: (value: ValueForKey<{
|
|
331
|
+
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" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown" | "cmExtensions">(key: K, callback: (value: ValueForKey<{
|
|
327
332
|
viewMode: RealmNode<ViewMode>;
|
|
328
333
|
diffMarkdown: RealmNode<string>;
|
|
329
334
|
markdownSourceEditorValue: RealmNode<string>;
|
|
@@ -355,6 +360,7 @@ diffSourcePluginHooks: {
|
|
|
355
360
|
initialMarkdown: RealmNode<string>;
|
|
356
361
|
setMarkdown: RealmNode<string>;
|
|
357
362
|
markdown: RealmNode<string>;
|
|
363
|
+
markdownSignal: RealmNode<string>;
|
|
358
364
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
359
365
|
contentEditableClassName: RealmNode<string>;
|
|
360
366
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -417,6 +423,7 @@ diffSourcePluginHooks: {
|
|
|
417
423
|
initialMarkdown: RealmNode<string>;
|
|
418
424
|
setMarkdown: RealmNode<string>;
|
|
419
425
|
markdown: RealmNode<string>;
|
|
426
|
+
markdownSignal: RealmNode<string>;
|
|
420
427
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
421
428
|
contentEditableClassName: RealmNode<string>;
|
|
422
429
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -478,6 +485,7 @@ diffSourcePluginHooks: {
|
|
|
478
485
|
initialMarkdown: RealmNode<string>;
|
|
479
486
|
setMarkdown: RealmNode<string>;
|
|
480
487
|
markdown: RealmNode<string>;
|
|
488
|
+
markdownSignal: RealmNode<string>;
|
|
481
489
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
482
490
|
contentEditableClassName: RealmNode<string>;
|
|
483
491
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -540,6 +548,7 @@ diffSourcePluginHooks: {
|
|
|
540
548
|
initialMarkdown: RealmNode<string>;
|
|
541
549
|
setMarkdown: RealmNode<string>;
|
|
542
550
|
markdown: RealmNode<string>;
|
|
551
|
+
markdownSignal: RealmNode<string>;
|
|
543
552
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
544
553
|
contentEditableClassName: RealmNode<string>;
|
|
545
554
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -570,7 +579,7 @@ diffSourcePluginHooks: {
|
|
|
570
579
|
onBlur: RealmNode<FocusEvent>;
|
|
571
580
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
572
581
|
}>) => void;
|
|
573
|
-
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" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown" | "cmExtensions">(key: K_2) => (value: ValueForKey<{
|
|
582
|
+
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" | "markdownSourceEditorValue" | "viewMode" | "diffMarkdown" | "cmExtensions">(key: K_2) => (value: ValueForKey<{
|
|
574
583
|
viewMode: RealmNode<ViewMode>;
|
|
575
584
|
diffMarkdown: RealmNode<string>;
|
|
576
585
|
markdownSourceEditorValue: RealmNode<string>;
|
|
@@ -602,6 +611,7 @@ diffSourcePluginHooks: {
|
|
|
602
611
|
initialMarkdown: RealmNode<string>;
|
|
603
612
|
setMarkdown: RealmNode<string>;
|
|
604
613
|
markdown: RealmNode<string>;
|
|
614
|
+
markdownSignal: RealmNode<string>;
|
|
605
615
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
606
616
|
contentEditableClassName: RealmNode<string>;
|
|
607
617
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -3,11 +3,12 @@ import { DiffSourceWrapper } from "./DiffSourceWrapper.js";
|
|
|
3
3
|
import { system } from "../../gurx/realmFactory.js";
|
|
4
4
|
import { realmPlugin } from "../../gurx/react.js";
|
|
5
5
|
const diffSourceSystem = system(
|
|
6
|
-
(r, [{ markdown, setMarkdown }]) => {
|
|
6
|
+
(r, [{ markdown, setMarkdown, markdownSignal }]) => {
|
|
7
7
|
const diffMarkdown = r.node("");
|
|
8
8
|
const markdownSourceEditorValue = r.node("");
|
|
9
9
|
const cmExtensions = r.node([]);
|
|
10
10
|
r.link(markdown, markdownSourceEditorValue);
|
|
11
|
+
r.link(markdownSourceEditorValue, markdownSignal);
|
|
11
12
|
const viewMode = r.node("rich-text");
|
|
12
13
|
r.sub(
|
|
13
14
|
r.pipe(
|
|
@@ -99,6 +99,7 @@ export declare const directivesSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
99
99
|
initialMarkdown: RealmNode<string>;
|
|
100
100
|
setMarkdown: RealmNode<string>;
|
|
101
101
|
markdown: RealmNode<string>;
|
|
102
|
+
markdownSignal: RealmNode<string>;
|
|
102
103
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
103
104
|
contentEditableClassName: RealmNode<string>;
|
|
104
105
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -155,6 +156,7 @@ export declare const directivesSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
155
156
|
initialMarkdown: RealmNode<string>;
|
|
156
157
|
setMarkdown: RealmNode<string>;
|
|
157
158
|
markdown: RealmNode<string>;
|
|
159
|
+
markdownSignal: RealmNode<string>;
|
|
158
160
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
159
161
|
contentEditableClassName: RealmNode<string>;
|
|
160
162
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -229,6 +231,7 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
229
231
|
initialMarkdown: RealmNode<string>;
|
|
230
232
|
setMarkdown: RealmNode<string>;
|
|
231
233
|
markdown: RealmNode<string>;
|
|
234
|
+
markdownSignal: RealmNode<string>;
|
|
232
235
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
233
236
|
contentEditableClassName: RealmNode<string>;
|
|
234
237
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -285,6 +288,7 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
285
288
|
initialMarkdown: RealmNode<string>;
|
|
286
289
|
setMarkdown: RealmNode<string>;
|
|
287
290
|
markdown: RealmNode<string>;
|
|
291
|
+
markdownSignal: RealmNode<string>;
|
|
288
292
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
289
293
|
contentEditableClassName: RealmNode<string>;
|
|
290
294
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -350,6 +354,7 @@ directivesPluginHooks: {
|
|
|
350
354
|
initialMarkdown: RealmNode<string>;
|
|
351
355
|
setMarkdown: RealmNode<string>;
|
|
352
356
|
markdown: RealmNode<string>;
|
|
357
|
+
markdownSignal: RealmNode<string>;
|
|
353
358
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
354
359
|
contentEditableClassName: RealmNode<string>;
|
|
355
360
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -380,7 +385,7 @@ directivesPluginHooks: {
|
|
|
380
385
|
onBlur: RealmNode<FocusEvent>;
|
|
381
386
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
382
387
|
}>;
|
|
383
|
-
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" | "directiveDescriptors" | "insertDirective">(key: K, callback: (value: ValueForKey<{
|
|
388
|
+
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" | "directiveDescriptors" | "insertDirective">(key: K, callback: (value: ValueForKey<{
|
|
384
389
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
385
390
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
386
391
|
} & {
|
|
@@ -410,6 +415,7 @@ directivesPluginHooks: {
|
|
|
410
415
|
initialMarkdown: RealmNode<string>;
|
|
411
416
|
setMarkdown: RealmNode<string>;
|
|
412
417
|
markdown: RealmNode<string>;
|
|
418
|
+
markdownSignal: RealmNode<string>;
|
|
413
419
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
414
420
|
contentEditableClassName: RealmNode<string>;
|
|
415
421
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -470,6 +476,7 @@ directivesPluginHooks: {
|
|
|
470
476
|
initialMarkdown: RealmNode<string>;
|
|
471
477
|
setMarkdown: RealmNode<string>;
|
|
472
478
|
markdown: RealmNode<string>;
|
|
479
|
+
markdownSignal: RealmNode<string>;
|
|
473
480
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
474
481
|
contentEditableClassName: RealmNode<string>;
|
|
475
482
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -529,6 +536,7 @@ directivesPluginHooks: {
|
|
|
529
536
|
initialMarkdown: RealmNode<string>;
|
|
530
537
|
setMarkdown: RealmNode<string>;
|
|
531
538
|
markdown: RealmNode<string>;
|
|
539
|
+
markdownSignal: RealmNode<string>;
|
|
532
540
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
533
541
|
contentEditableClassName: RealmNode<string>;
|
|
534
542
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -589,6 +597,7 @@ directivesPluginHooks: {
|
|
|
589
597
|
initialMarkdown: RealmNode<string>;
|
|
590
598
|
setMarkdown: RealmNode<string>;
|
|
591
599
|
markdown: RealmNode<string>;
|
|
600
|
+
markdownSignal: RealmNode<string>;
|
|
592
601
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
593
602
|
contentEditableClassName: RealmNode<string>;
|
|
594
603
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -619,7 +628,7 @@ directivesPluginHooks: {
|
|
|
619
628
|
onBlur: RealmNode<FocusEvent>;
|
|
620
629
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
621
630
|
}>) => void;
|
|
622
|
-
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" | "directiveDescriptors" | "insertDirective">(key: K_2) => (value: ValueForKey<{
|
|
631
|
+
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" | "directiveDescriptors" | "insertDirective">(key: K_2) => (value: ValueForKey<{
|
|
623
632
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
624
633
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
625
634
|
} & {
|
|
@@ -649,6 +658,7 @@ directivesPluginHooks: {
|
|
|
649
658
|
initialMarkdown: RealmNode<string>;
|
|
650
659
|
setMarkdown: RealmNode<string>;
|
|
651
660
|
markdown: RealmNode<string>;
|
|
661
|
+
markdownSignal: RealmNode<string>;
|
|
652
662
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
653
663
|
contentEditableClassName: RealmNode<string>;
|
|
654
664
|
placeholder: RealmNode<ReactNode>;
|