@mdxeditor/editor 0.0.0-development → 0.0.4-development
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/MDXEditor.d.ts +11 -0
- package/dist/MDXEditor.js +3 -1
- package/dist/exportMarkdownFromLexical.d.ts +6 -1
- package/dist/exportMarkdownFromLexical.js +43 -6
- package/dist/gurx/realmFactory.d.ts +1 -1
- package/dist/icons/add_column.svg.js +1 -1
- package/dist/icons/add_photo.svg.js +1 -1
- package/dist/icons/add_row.svg.js +1 -1
- package/dist/icons/admonition.svg.js +1 -1
- package/dist/icons/arrow_drop_down.svg.js +1 -1
- package/dist/icons/check.svg.js +1 -1
- package/dist/icons/close.svg.js +1 -1
- package/dist/icons/code.svg.js +1 -1
- package/dist/icons/content_copy.svg.js +1 -1
- package/dist/icons/delete_big.svg.js +1 -1
- package/dist/icons/delete_small.svg.js +1 -1
- package/dist/icons/difference.svg.js +1 -1
- package/dist/icons/edit.svg.js +1 -1
- package/dist/icons/format_align_center.svg.js +1 -1
- package/dist/icons/format_align_left.svg.js +1 -1
- package/dist/icons/format_align_right.svg.js +1 -1
- package/dist/icons/format_bold.svg.js +1 -1
- package/dist/icons/format_italic.svg.js +1 -1
- package/dist/icons/format_list_bulleted.svg.js +1 -3
- package/dist/icons/format_list_checked.svg.js +1 -1
- package/dist/icons/format_list_numbered.svg.js +1 -1
- package/dist/icons/format_underlined.svg.js +1 -1
- package/dist/icons/frame_source.svg.js +5 -0
- package/dist/icons/frontmatter.svg.js +1 -1
- package/dist/icons/horizontal_rule.svg.js +1 -1
- package/dist/icons/insert_col_left.svg.js +1 -1
- package/dist/icons/insert_col_right.svg.js +1 -1
- package/dist/icons/insert_row_above.svg.js +1 -1
- package/dist/icons/insert_row_below.svg.js +1 -1
- package/dist/icons/link.svg.js +1 -1
- package/dist/icons/link_off.svg.js +1 -1
- package/dist/icons/markdown.svg.js +1 -1
- package/dist/icons/more_horiz.svg.js +1 -1
- package/dist/icons/more_vert.svg.js +1 -1
- package/dist/icons/open_in_new.svg.js +1 -1
- package/dist/icons/redo.svg.js +1 -1
- package/dist/icons/rich_text.svg.js +1 -1
- package/dist/icons/sandpack.svg.js +1 -1
- package/dist/icons/settings.svg.js +1 -3
- package/dist/icons/table.svg.js +1 -1
- package/dist/icons/undo.svg.js +1 -1
- package/dist/importMarkdownToLexical.d.ts +10 -0
- package/dist/importMarkdownToLexical.js +31 -7
- package/dist/index.d.ts +8 -0
- package/dist/index.js +41 -3
- package/dist/plugins/codeblock/index.d.ts +92 -2
- package/dist/plugins/codemirror/index.d.ts +128 -2
- package/dist/plugins/core/GenericHTMLNode.d.ts +38 -0
- package/dist/plugins/core/GenericHTMLNode.js +117 -0
- package/dist/plugins/core/Icon.d.ts +1 -1
- package/dist/plugins/core/Icon.js +2 -4
- package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.d.ts +4 -0
- package/dist/plugins/core/LexicalGenericHTMLNodeVisitor.js +15 -0
- package/dist/plugins/core/LexicalTextVisitor.js +18 -1
- package/dist/plugins/core/MdastHTMLNode.d.ts +13 -0
- package/dist/plugins/core/MdastHTMLNode.js +122 -0
- package/dist/plugins/core/MdastHTMLVisitor.d.ts +3 -0
- package/dist/plugins/core/MdastHTMLVisitor.js +12 -0
- package/dist/plugins/core/NestedLexicalEditor.js +14 -9
- package/dist/plugins/core/index.d.ts +80 -3
- package/dist/plugins/core/index.js +90 -20
- package/dist/plugins/diff-source/DiffSourceWrapper.js +4 -1
- package/dist/plugins/diff-source/SourceEditor.js +7 -1
- package/dist/plugins/diff-source/index.d.ts +94 -4
- package/dist/plugins/diff-source/index.js +3 -4
- package/dist/plugins/directives/index.d.ts +92 -2
- package/dist/plugins/frontmatter/index.d.ts +92 -2
- package/dist/plugins/headings/index.d.ts +92 -2
- package/dist/plugins/image/index.d.ts +92 -2
- package/dist/plugins/jsx/LexicalJsxVisitor.js +12 -0
- package/dist/plugins/jsx/index.d.ts +114 -23
- package/dist/plugins/jsx/index.js +4 -0
- package/dist/plugins/link/index.d.ts +9 -0
- package/dist/plugins/link-dialog/index.d.ts +79 -5
- package/dist/plugins/link-dialog/index.js +2 -8
- package/dist/plugins/lists/index.d.ts +92 -2
- package/dist/plugins/lists/index.js +3 -0
- package/dist/plugins/markdown-shortcut/index.d.ts +9 -0
- package/dist/plugins/quote/index.d.ts +65 -2
- package/dist/plugins/sandpack/index.d.ts +128 -2
- package/dist/plugins/table/index.d.ts +92 -2
- package/dist/plugins/thematic-break/index.d.ts +92 -2
- package/dist/plugins/toolbar/components/ChangeAdmonitionType.js +1 -1
- package/dist/plugins/toolbar/components/InsertCodeBlock.js +1 -1
- package/dist/plugins/toolbar/index.d.ts +74 -2
- package/dist/style.css +210 -195
- package/dist/styles/ui.module.css.js +105 -102
- package/dist/utils/fp.js +31 -1
- package/dist/utils/lexicalHelpers.js +20 -2
- package/dist/utils/makeHslTransparent.d.ts +1 -0
- package/dist/utils/makeHslTransparent.js +6 -0
- package/dist/utils/mergeStyleAttributes.d.ts +1 -0
- package/dist/utils/mergeStyleAttributes.js +22 -0
- package/dist/utils/whitespaceConversion.d.ts +2 -0
- package/dist/utils/whitespaceConversion.js +9 -0
- package/package.json +17 -11
- package/dist/icons/check_small.svg.js +0 -5
- package/dist/icons/code_block.svg.js +0 -5
|
@@ -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>;
|
|
@@ -128,6 +129,14 @@ export declare const directivesSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
128
129
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
129
130
|
onBlur: RealmNode<FocusEvent>;
|
|
130
131
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
132
|
+
markdownProcessingError: RealmNode<{
|
|
133
|
+
error: string;
|
|
134
|
+
source: string;
|
|
135
|
+
} | null>;
|
|
136
|
+
markdownErrorSignal: RealmNode<{
|
|
137
|
+
error: string;
|
|
138
|
+
source: string;
|
|
139
|
+
}>;
|
|
131
140
|
}>], (r: Realm, [{ insertDecoratorNode }]: [{
|
|
132
141
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
133
142
|
inFocus: RealmNode<boolean>;
|
|
@@ -155,6 +164,7 @@ export declare const directivesSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
155
164
|
initialMarkdown: RealmNode<string>;
|
|
156
165
|
setMarkdown: RealmNode<string>;
|
|
157
166
|
markdown: RealmNode<string>;
|
|
167
|
+
markdownSignal: RealmNode<string>;
|
|
158
168
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
159
169
|
contentEditableClassName: RealmNode<string>;
|
|
160
170
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -184,6 +194,14 @@ export declare const directivesSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
184
194
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
185
195
|
onBlur: RealmNode<FocusEvent>;
|
|
186
196
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
197
|
+
markdownProcessingError: RealmNode<{
|
|
198
|
+
error: string;
|
|
199
|
+
source: string;
|
|
200
|
+
} | null>;
|
|
201
|
+
markdownErrorSignal: RealmNode<{
|
|
202
|
+
error: string;
|
|
203
|
+
source: string;
|
|
204
|
+
}>;
|
|
187
205
|
}]) => {
|
|
188
206
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
189
207
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
@@ -229,6 +247,7 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
229
247
|
initialMarkdown: RealmNode<string>;
|
|
230
248
|
setMarkdown: RealmNode<string>;
|
|
231
249
|
markdown: RealmNode<string>;
|
|
250
|
+
markdownSignal: RealmNode<string>;
|
|
232
251
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
233
252
|
contentEditableClassName: RealmNode<string>;
|
|
234
253
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -258,6 +277,14 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
258
277
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
259
278
|
onBlur: RealmNode<FocusEvent>;
|
|
260
279
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
280
|
+
markdownProcessingError: RealmNode<{
|
|
281
|
+
error: string;
|
|
282
|
+
source: string;
|
|
283
|
+
} | null>;
|
|
284
|
+
markdownErrorSignal: RealmNode<{
|
|
285
|
+
error: string;
|
|
286
|
+
source: string;
|
|
287
|
+
}>;
|
|
261
288
|
}>], (r: Realm, [{ insertDecoratorNode }]: [{
|
|
262
289
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
263
290
|
inFocus: RealmNode<boolean>;
|
|
@@ -285,6 +312,7 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
285
312
|
initialMarkdown: RealmNode<string>;
|
|
286
313
|
setMarkdown: RealmNode<string>;
|
|
287
314
|
markdown: RealmNode<string>;
|
|
315
|
+
markdownSignal: RealmNode<string>;
|
|
288
316
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
289
317
|
contentEditableClassName: RealmNode<string>;
|
|
290
318
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -314,6 +342,14 @@ directivesPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
314
342
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
315
343
|
onBlur: RealmNode<FocusEvent>;
|
|
316
344
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
345
|
+
markdownProcessingError: RealmNode<{
|
|
346
|
+
error: string;
|
|
347
|
+
source: string;
|
|
348
|
+
} | null>;
|
|
349
|
+
markdownErrorSignal: RealmNode<{
|
|
350
|
+
error: string;
|
|
351
|
+
source: string;
|
|
352
|
+
}>;
|
|
317
353
|
}]) => {
|
|
318
354
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
319
355
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
@@ -350,6 +386,7 @@ directivesPluginHooks: {
|
|
|
350
386
|
initialMarkdown: RealmNode<string>;
|
|
351
387
|
setMarkdown: RealmNode<string>;
|
|
352
388
|
markdown: RealmNode<string>;
|
|
389
|
+
markdownSignal: RealmNode<string>;
|
|
353
390
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
354
391
|
contentEditableClassName: RealmNode<string>;
|
|
355
392
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -379,8 +416,16 @@ directivesPluginHooks: {
|
|
|
379
416
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
380
417
|
onBlur: RealmNode<FocusEvent>;
|
|
381
418
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
419
|
+
markdownProcessingError: RealmNode<{
|
|
420
|
+
error: string;
|
|
421
|
+
source: string;
|
|
422
|
+
} | null>;
|
|
423
|
+
markdownErrorSignal: RealmNode<{
|
|
424
|
+
error: string;
|
|
425
|
+
source: string;
|
|
426
|
+
}>;
|
|
382
427
|
}>;
|
|
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<{
|
|
428
|
+
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" | "markdownProcessingError" | "markdownErrorSignal" | "directiveDescriptors" | "insertDirective">(key: K, callback: (value: ValueForKey<{
|
|
384
429
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
385
430
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
386
431
|
} & {
|
|
@@ -410,6 +455,7 @@ directivesPluginHooks: {
|
|
|
410
455
|
initialMarkdown: RealmNode<string>;
|
|
411
456
|
setMarkdown: RealmNode<string>;
|
|
412
457
|
markdown: RealmNode<string>;
|
|
458
|
+
markdownSignal: RealmNode<string>;
|
|
413
459
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
414
460
|
contentEditableClassName: RealmNode<string>;
|
|
415
461
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -439,6 +485,14 @@ directivesPluginHooks: {
|
|
|
439
485
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
440
486
|
onBlur: RealmNode<FocusEvent>;
|
|
441
487
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
488
|
+
markdownProcessingError: RealmNode<{
|
|
489
|
+
error: string;
|
|
490
|
+
source: string;
|
|
491
|
+
} | null>;
|
|
492
|
+
markdownErrorSignal: RealmNode<{
|
|
493
|
+
error: string;
|
|
494
|
+
source: string;
|
|
495
|
+
}>;
|
|
442
496
|
}, K>) => void) => void;
|
|
443
497
|
useEmitterValues: <K_1 extends SystemKeys<{
|
|
444
498
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
@@ -470,6 +524,7 @@ directivesPluginHooks: {
|
|
|
470
524
|
initialMarkdown: RealmNode<string>;
|
|
471
525
|
setMarkdown: RealmNode<string>;
|
|
472
526
|
markdown: RealmNode<string>;
|
|
527
|
+
markdownSignal: RealmNode<string>;
|
|
473
528
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
474
529
|
contentEditableClassName: RealmNode<string>;
|
|
475
530
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -499,6 +554,14 @@ directivesPluginHooks: {
|
|
|
499
554
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
500
555
|
onBlur: RealmNode<FocusEvent>;
|
|
501
556
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
557
|
+
markdownProcessingError: RealmNode<{
|
|
558
|
+
error: string;
|
|
559
|
+
source: string;
|
|
560
|
+
} | null>;
|
|
561
|
+
markdownErrorSignal: RealmNode<{
|
|
562
|
+
error: string;
|
|
563
|
+
source: string;
|
|
564
|
+
}>;
|
|
502
565
|
}>>(...keys: K_1) => ValuesForKeys<{
|
|
503
566
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
504
567
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
@@ -529,6 +592,7 @@ directivesPluginHooks: {
|
|
|
529
592
|
initialMarkdown: RealmNode<string>;
|
|
530
593
|
setMarkdown: RealmNode<string>;
|
|
531
594
|
markdown: RealmNode<string>;
|
|
595
|
+
markdownSignal: RealmNode<string>;
|
|
532
596
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
533
597
|
contentEditableClassName: RealmNode<string>;
|
|
534
598
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -558,6 +622,14 @@ directivesPluginHooks: {
|
|
|
558
622
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
559
623
|
onBlur: RealmNode<FocusEvent>;
|
|
560
624
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
625
|
+
markdownProcessingError: RealmNode<{
|
|
626
|
+
error: string;
|
|
627
|
+
source: string;
|
|
628
|
+
} | null>;
|
|
629
|
+
markdownErrorSignal: RealmNode<{
|
|
630
|
+
error: string;
|
|
631
|
+
source: string;
|
|
632
|
+
}>;
|
|
561
633
|
}, K_1>;
|
|
562
634
|
usePubKeys: () => (values: SystemDict<{
|
|
563
635
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
@@ -589,6 +661,7 @@ directivesPluginHooks: {
|
|
|
589
661
|
initialMarkdown: RealmNode<string>;
|
|
590
662
|
setMarkdown: RealmNode<string>;
|
|
591
663
|
markdown: RealmNode<string>;
|
|
664
|
+
markdownSignal: RealmNode<string>;
|
|
592
665
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
593
666
|
contentEditableClassName: RealmNode<string>;
|
|
594
667
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -618,8 +691,16 @@ directivesPluginHooks: {
|
|
|
618
691
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
619
692
|
onBlur: RealmNode<FocusEvent>;
|
|
620
693
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
694
|
+
markdownProcessingError: RealmNode<{
|
|
695
|
+
error: string;
|
|
696
|
+
source: string;
|
|
697
|
+
} | null>;
|
|
698
|
+
markdownErrorSignal: RealmNode<{
|
|
699
|
+
error: string;
|
|
700
|
+
source: string;
|
|
701
|
+
}>;
|
|
621
702
|
}>) => 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<{
|
|
703
|
+
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" | "markdownProcessingError" | "markdownErrorSignal" | "directiveDescriptors" | "insertDirective">(key: K_2) => (value: ValueForKey<{
|
|
623
704
|
directiveDescriptors: RealmNode<DirectiveDescriptor<any>[]>;
|
|
624
705
|
insertDirective: RealmNode<InsertDirectivePayload>;
|
|
625
706
|
} & {
|
|
@@ -649,6 +730,7 @@ directivesPluginHooks: {
|
|
|
649
730
|
initialMarkdown: RealmNode<string>;
|
|
650
731
|
setMarkdown: RealmNode<string>;
|
|
651
732
|
markdown: RealmNode<string>;
|
|
733
|
+
markdownSignal: RealmNode<string>;
|
|
652
734
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
653
735
|
contentEditableClassName: RealmNode<string>;
|
|
654
736
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -678,6 +760,14 @@ directivesPluginHooks: {
|
|
|
678
760
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
679
761
|
onBlur: RealmNode<FocusEvent>;
|
|
680
762
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
763
|
+
markdownProcessingError: RealmNode<{
|
|
764
|
+
error: string;
|
|
765
|
+
source: string;
|
|
766
|
+
} | null>;
|
|
767
|
+
markdownErrorSignal: RealmNode<{
|
|
768
|
+
error: string;
|
|
769
|
+
source: string;
|
|
770
|
+
}>;
|
|
681
771
|
}, K_2>) => void;
|
|
682
772
|
};
|
|
683
773
|
export {};
|
|
@@ -40,6 +40,7 @@ export declare const frontmatterSystem: 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>;
|
|
@@ -69,6 +70,14 @@ export declare const frontmatterSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
69
70
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
70
71
|
onBlur: RealmNode<FocusEvent>;
|
|
71
72
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
73
|
+
markdownProcessingError: RealmNode<{
|
|
74
|
+
error: string;
|
|
75
|
+
source: string;
|
|
76
|
+
} | null>;
|
|
77
|
+
markdownErrorSignal: RealmNode<{
|
|
78
|
+
error: string;
|
|
79
|
+
source: string;
|
|
80
|
+
}>;
|
|
72
81
|
}>], (r: Realm, [{ rootEditor, createRootEditorSubscription }]: [{
|
|
73
82
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
74
83
|
inFocus: RealmNode<boolean>;
|
|
@@ -96,6 +105,7 @@ export declare const frontmatterSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
96
105
|
initialMarkdown: RealmNode<string>;
|
|
97
106
|
setMarkdown: RealmNode<string>;
|
|
98
107
|
markdown: RealmNode<string>;
|
|
108
|
+
markdownSignal: RealmNode<string>;
|
|
99
109
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
100
110
|
contentEditableClassName: RealmNode<string>;
|
|
101
111
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -125,6 +135,14 @@ export declare const frontmatterSystem: SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
125
135
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
126
136
|
onBlur: RealmNode<FocusEvent>;
|
|
127
137
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
138
|
+
markdownProcessingError: RealmNode<{
|
|
139
|
+
error: string;
|
|
140
|
+
source: string;
|
|
141
|
+
} | null>;
|
|
142
|
+
markdownErrorSignal: RealmNode<{
|
|
143
|
+
error: string;
|
|
144
|
+
source: string;
|
|
145
|
+
}>;
|
|
128
146
|
}]) => {
|
|
129
147
|
insertFrontmatter: RealmNode<true>;
|
|
130
148
|
removeFrontmatter: RealmNode<true>;
|
|
@@ -160,6 +178,7 @@ frontmatterPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
160
178
|
initialMarkdown: RealmNode<string>;
|
|
161
179
|
setMarkdown: RealmNode<string>;
|
|
162
180
|
markdown: RealmNode<string>;
|
|
181
|
+
markdownSignal: RealmNode<string>;
|
|
163
182
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
164
183
|
contentEditableClassName: RealmNode<string>;
|
|
165
184
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -189,6 +208,14 @@ frontmatterPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
189
208
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
190
209
|
onBlur: RealmNode<FocusEvent>;
|
|
191
210
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
211
|
+
markdownProcessingError: RealmNode<{
|
|
212
|
+
error: string;
|
|
213
|
+
source: string;
|
|
214
|
+
} | null>;
|
|
215
|
+
markdownErrorSignal: RealmNode<{
|
|
216
|
+
error: string;
|
|
217
|
+
source: string;
|
|
218
|
+
}>;
|
|
192
219
|
}>], (r: Realm, [{ rootEditor, createRootEditorSubscription }]: [{
|
|
193
220
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
194
221
|
inFocus: RealmNode<boolean>;
|
|
@@ -216,6 +243,7 @@ frontmatterPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
216
243
|
initialMarkdown: RealmNode<string>;
|
|
217
244
|
setMarkdown: RealmNode<string>;
|
|
218
245
|
markdown: RealmNode<string>;
|
|
246
|
+
markdownSignal: RealmNode<string>;
|
|
219
247
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
220
248
|
contentEditableClassName: RealmNode<string>;
|
|
221
249
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -245,6 +273,14 @@ frontmatterPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
245
273
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
246
274
|
onBlur: RealmNode<FocusEvent>;
|
|
247
275
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
276
|
+
markdownProcessingError: RealmNode<{
|
|
277
|
+
error: string;
|
|
278
|
+
source: string;
|
|
279
|
+
} | null>;
|
|
280
|
+
markdownErrorSignal: RealmNode<{
|
|
281
|
+
error: string;
|
|
282
|
+
source: string;
|
|
283
|
+
}>;
|
|
248
284
|
}]) => {
|
|
249
285
|
insertFrontmatter: RealmNode<true>;
|
|
250
286
|
removeFrontmatter: RealmNode<true>;
|
|
@@ -285,6 +321,7 @@ frontmatterPluginHooks: {
|
|
|
285
321
|
initialMarkdown: RealmNode<string>;
|
|
286
322
|
setMarkdown: RealmNode<string>;
|
|
287
323
|
markdown: RealmNode<string>;
|
|
324
|
+
markdownSignal: RealmNode<string>;
|
|
288
325
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
289
326
|
contentEditableClassName: RealmNode<string>;
|
|
290
327
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -314,8 +351,16 @@ frontmatterPluginHooks: {
|
|
|
314
351
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
315
352
|
onBlur: RealmNode<FocusEvent>;
|
|
316
353
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
354
|
+
markdownProcessingError: RealmNode<{
|
|
355
|
+
error: string;
|
|
356
|
+
source: string;
|
|
357
|
+
} | null>;
|
|
358
|
+
markdownErrorSignal: RealmNode<{
|
|
359
|
+
error: string;
|
|
360
|
+
source: string;
|
|
361
|
+
}>;
|
|
317
362
|
}>;
|
|
318
|
-
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" | "insertFrontmatter" | "removeFrontmatter" | "hasFrontmatter" | "frontmatterDialogOpen">(key: K, callback: (value: ValueForKey<{
|
|
363
|
+
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" | "markdownProcessingError" | "markdownErrorSignal" | "insertFrontmatter" | "removeFrontmatter" | "hasFrontmatter" | "frontmatterDialogOpen">(key: K, callback: (value: ValueForKey<{
|
|
319
364
|
insertFrontmatter: RealmNode<true>;
|
|
320
365
|
removeFrontmatter: RealmNode<true>;
|
|
321
366
|
hasFrontmatter: RealmNode<boolean>;
|
|
@@ -347,6 +392,7 @@ frontmatterPluginHooks: {
|
|
|
347
392
|
initialMarkdown: RealmNode<string>;
|
|
348
393
|
setMarkdown: RealmNode<string>;
|
|
349
394
|
markdown: RealmNode<string>;
|
|
395
|
+
markdownSignal: RealmNode<string>;
|
|
350
396
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
351
397
|
contentEditableClassName: RealmNode<string>;
|
|
352
398
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -376,6 +422,14 @@ frontmatterPluginHooks: {
|
|
|
376
422
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
377
423
|
onBlur: RealmNode<FocusEvent>;
|
|
378
424
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
425
|
+
markdownProcessingError: RealmNode<{
|
|
426
|
+
error: string;
|
|
427
|
+
source: string;
|
|
428
|
+
} | null>;
|
|
429
|
+
markdownErrorSignal: RealmNode<{
|
|
430
|
+
error: string;
|
|
431
|
+
source: string;
|
|
432
|
+
}>;
|
|
379
433
|
}, K>) => void) => void;
|
|
380
434
|
useEmitterValues: <K_1 extends SystemKeys<{
|
|
381
435
|
insertFrontmatter: RealmNode<true>;
|
|
@@ -409,6 +463,7 @@ frontmatterPluginHooks: {
|
|
|
409
463
|
initialMarkdown: RealmNode<string>;
|
|
410
464
|
setMarkdown: RealmNode<string>;
|
|
411
465
|
markdown: RealmNode<string>;
|
|
466
|
+
markdownSignal: RealmNode<string>;
|
|
412
467
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
413
468
|
contentEditableClassName: RealmNode<string>;
|
|
414
469
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -438,6 +493,14 @@ frontmatterPluginHooks: {
|
|
|
438
493
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
439
494
|
onBlur: RealmNode<FocusEvent>;
|
|
440
495
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
496
|
+
markdownProcessingError: RealmNode<{
|
|
497
|
+
error: string;
|
|
498
|
+
source: string;
|
|
499
|
+
} | null>;
|
|
500
|
+
markdownErrorSignal: RealmNode<{
|
|
501
|
+
error: string;
|
|
502
|
+
source: string;
|
|
503
|
+
}>;
|
|
441
504
|
}>>(...keys: K_1) => ValuesForKeys<{
|
|
442
505
|
insertFrontmatter: RealmNode<true>;
|
|
443
506
|
removeFrontmatter: RealmNode<true>;
|
|
@@ -470,6 +533,7 @@ frontmatterPluginHooks: {
|
|
|
470
533
|
initialMarkdown: RealmNode<string>;
|
|
471
534
|
setMarkdown: RealmNode<string>;
|
|
472
535
|
markdown: RealmNode<string>;
|
|
536
|
+
markdownSignal: RealmNode<string>;
|
|
473
537
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
474
538
|
contentEditableClassName: RealmNode<string>;
|
|
475
539
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -499,6 +563,14 @@ frontmatterPluginHooks: {
|
|
|
499
563
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
500
564
|
onBlur: RealmNode<FocusEvent>;
|
|
501
565
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
566
|
+
markdownProcessingError: RealmNode<{
|
|
567
|
+
error: string;
|
|
568
|
+
source: string;
|
|
569
|
+
} | null>;
|
|
570
|
+
markdownErrorSignal: RealmNode<{
|
|
571
|
+
error: string;
|
|
572
|
+
source: string;
|
|
573
|
+
}>;
|
|
502
574
|
}, K_1>;
|
|
503
575
|
usePubKeys: () => (values: SystemDict<{
|
|
504
576
|
insertFrontmatter: RealmNode<true>;
|
|
@@ -532,6 +604,7 @@ frontmatterPluginHooks: {
|
|
|
532
604
|
initialMarkdown: RealmNode<string>;
|
|
533
605
|
setMarkdown: RealmNode<string>;
|
|
534
606
|
markdown: RealmNode<string>;
|
|
607
|
+
markdownSignal: RealmNode<string>;
|
|
535
608
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
536
609
|
contentEditableClassName: RealmNode<string>;
|
|
537
610
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -561,8 +634,16 @@ frontmatterPluginHooks: {
|
|
|
561
634
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
562
635
|
onBlur: RealmNode<FocusEvent>;
|
|
563
636
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
637
|
+
markdownProcessingError: RealmNode<{
|
|
638
|
+
error: string;
|
|
639
|
+
source: string;
|
|
640
|
+
} | null>;
|
|
641
|
+
markdownErrorSignal: RealmNode<{
|
|
642
|
+
error: string;
|
|
643
|
+
source: string;
|
|
644
|
+
}>;
|
|
564
645
|
}>) => void;
|
|
565
|
-
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" | "insertFrontmatter" | "removeFrontmatter" | "hasFrontmatter" | "frontmatterDialogOpen">(key: K_2) => (value: ValueForKey<{
|
|
646
|
+
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" | "markdownProcessingError" | "markdownErrorSignal" | "insertFrontmatter" | "removeFrontmatter" | "hasFrontmatter" | "frontmatterDialogOpen">(key: K_2) => (value: ValueForKey<{
|
|
566
647
|
insertFrontmatter: RealmNode<true>;
|
|
567
648
|
removeFrontmatter: RealmNode<true>;
|
|
568
649
|
hasFrontmatter: RealmNode<boolean>;
|
|
@@ -594,6 +675,7 @@ frontmatterPluginHooks: {
|
|
|
594
675
|
initialMarkdown: RealmNode<string>;
|
|
595
676
|
setMarkdown: RealmNode<string>;
|
|
596
677
|
markdown: RealmNode<string>;
|
|
678
|
+
markdownSignal: RealmNode<string>;
|
|
597
679
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
598
680
|
contentEditableClassName: RealmNode<string>;
|
|
599
681
|
placeholder: RealmNode<ReactNode>;
|
|
@@ -623,5 +705,13 @@ frontmatterPluginHooks: {
|
|
|
623
705
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
624
706
|
onBlur: RealmNode<FocusEvent>;
|
|
625
707
|
iconComponentFor: RealmNode<(name: IconKey) => ReactNode>;
|
|
708
|
+
markdownProcessingError: RealmNode<{
|
|
709
|
+
error: string;
|
|
710
|
+
source: string;
|
|
711
|
+
} | null>;
|
|
712
|
+
markdownErrorSignal: RealmNode<{
|
|
713
|
+
error: string;
|
|
714
|
+
source: string;
|
|
715
|
+
}>;
|
|
626
716
|
}, K_2>) => void;
|
|
627
717
|
};
|