@mdxeditor/editor 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MDXEditor.d.ts +4 -0
- package/dist/MDXEditor.js +4 -2
- package/dist/exportMarkdownFromLexical.d.ts +19 -0
- package/dist/gurx/react.d.ts +34 -6
- package/dist/gurx/realm.d.ts +18 -2
- package/dist/gurx/realmFactory.d.ts +23 -2
- package/dist/icons/rich_text.svg.js +2 -2
- package/dist/importMarkdownToLexical.d.ts +7 -0
- 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 +21 -2
- package/dist/plugins/core/index.js +7 -0
- package/dist/plugins/diff-source/index.d.ts +12 -2
- package/dist/plugins/directives/index.d.ts +12 -2
- package/dist/plugins/frontmatter/FrontmatterEditor.js +1 -2
- package/dist/plugins/frontmatter/index.d.ts +12 -2
- package/dist/plugins/headings/index.d.ts +2 -0
- 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/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/dist/plugins/toolbar/primitives/select.js +1 -1
- package/dist/style.css +167 -164
- package/dist/styles/ui.module.css.js +83 -83
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
41
41
|
markdown: RealmNode<string>;
|
|
42
42
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
43
43
|
contentEditableClassName: RealmNode<string>;
|
|
44
|
+
autoFocus: RealmNode<boolean>;
|
|
44
45
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
45
46
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
46
47
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -89,6 +90,7 @@ export declare const tableSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
89
90
|
markdown: RealmNode<string>;
|
|
90
91
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
91
92
|
contentEditableClassName: RealmNode<string>;
|
|
93
|
+
autoFocus: RealmNode<boolean>;
|
|
92
94
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
93
95
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
94
96
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -142,6 +144,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
142
144
|
markdown: RealmNode<string>;
|
|
143
145
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
144
146
|
contentEditableClassName: RealmNode<string>;
|
|
147
|
+
autoFocus: RealmNode<boolean>;
|
|
145
148
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
146
149
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
147
150
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -190,6 +193,7 @@ tablePlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
190
193
|
markdown: RealmNode<string>;
|
|
191
194
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
192
195
|
contentEditableClassName: RealmNode<string>;
|
|
196
|
+
autoFocus: RealmNode<boolean>;
|
|
193
197
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
194
198
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
195
199
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -245,6 +249,7 @@ tablePluginHooks: {
|
|
|
245
249
|
markdown: RealmNode<string>;
|
|
246
250
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
247
251
|
contentEditableClassName: RealmNode<string>;
|
|
252
|
+
autoFocus: RealmNode<boolean>;
|
|
248
253
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
249
254
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
250
255
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -265,7 +270,7 @@ tablePluginHooks: {
|
|
|
265
270
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
266
271
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
267
272
|
}>;
|
|
268
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertTable">(key: K, callback: (value: ValueForKey<{
|
|
273
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertTable">(key: K, callback: (value: ValueForKey<{
|
|
269
274
|
insertTable: RealmNode<true>;
|
|
270
275
|
} & {
|
|
271
276
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -296,6 +301,7 @@ tablePluginHooks: {
|
|
|
296
301
|
markdown: RealmNode<string>;
|
|
297
302
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
298
303
|
contentEditableClassName: RealmNode<string>;
|
|
304
|
+
autoFocus: RealmNode<boolean>;
|
|
299
305
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
300
306
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
301
307
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -347,6 +353,7 @@ tablePluginHooks: {
|
|
|
347
353
|
markdown: RealmNode<string>;
|
|
348
354
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
349
355
|
contentEditableClassName: RealmNode<string>;
|
|
356
|
+
autoFocus: RealmNode<boolean>;
|
|
350
357
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
351
358
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
352
359
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -397,6 +404,7 @@ tablePluginHooks: {
|
|
|
397
404
|
markdown: RealmNode<string>;
|
|
398
405
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
399
406
|
contentEditableClassName: RealmNode<string>;
|
|
407
|
+
autoFocus: RealmNode<boolean>;
|
|
400
408
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
401
409
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
402
410
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -448,6 +456,7 @@ tablePluginHooks: {
|
|
|
448
456
|
markdown: RealmNode<string>;
|
|
449
457
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
450
458
|
contentEditableClassName: RealmNode<string>;
|
|
459
|
+
autoFocus: RealmNode<boolean>;
|
|
451
460
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
452
461
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
453
462
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -468,7 +477,7 @@ tablePluginHooks: {
|
|
|
468
477
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
469
478
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
470
479
|
}>) => void;
|
|
471
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertTable">(key: K_2) => (value: ValueForKey<{
|
|
480
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertTable">(key: K_2) => (value: ValueForKey<{
|
|
472
481
|
insertTable: RealmNode<true>;
|
|
473
482
|
} & {
|
|
474
483
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -499,6 +508,7 @@ tablePluginHooks: {
|
|
|
499
508
|
markdown: RealmNode<string>;
|
|
500
509
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
501
510
|
contentEditableClassName: RealmNode<string>;
|
|
511
|
+
autoFocus: RealmNode<boolean>;
|
|
502
512
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
503
513
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
504
514
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -41,6 +41,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
|
|
|
41
41
|
markdown: RealmNode<string>;
|
|
42
42
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
43
43
|
contentEditableClassName: RealmNode<string>;
|
|
44
|
+
autoFocus: RealmNode<boolean>;
|
|
44
45
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
45
46
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
46
47
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -89,6 +90,7 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
|
|
|
89
90
|
markdown: RealmNode<string>;
|
|
90
91
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
91
92
|
contentEditableClassName: RealmNode<string>;
|
|
93
|
+
autoFocus: RealmNode<boolean>;
|
|
92
94
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
93
95
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
94
96
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -142,6 +144,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
142
144
|
markdown: RealmNode<string>;
|
|
143
145
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
144
146
|
contentEditableClassName: RealmNode<string>;
|
|
147
|
+
autoFocus: RealmNode<boolean>;
|
|
145
148
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
146
149
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
147
150
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -190,6 +193,7 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
190
193
|
markdown: RealmNode<string>;
|
|
191
194
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
192
195
|
contentEditableClassName: RealmNode<string>;
|
|
196
|
+
autoFocus: RealmNode<boolean>;
|
|
193
197
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
194
198
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
195
199
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -245,6 +249,7 @@ thematicBreakPluginHooks: {
|
|
|
245
249
|
markdown: RealmNode<string>;
|
|
246
250
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
247
251
|
contentEditableClassName: RealmNode<string>;
|
|
252
|
+
autoFocus: RealmNode<boolean>;
|
|
248
253
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
249
254
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
250
255
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -265,7 +270,7 @@ thematicBreakPluginHooks: {
|
|
|
265
270
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
266
271
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
267
272
|
}>;
|
|
268
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K, callback: (value: ValueForKey<{
|
|
273
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K, callback: (value: ValueForKey<{
|
|
269
274
|
insertThematicBreak: RealmNode<true>;
|
|
270
275
|
} & {
|
|
271
276
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -296,6 +301,7 @@ thematicBreakPluginHooks: {
|
|
|
296
301
|
markdown: RealmNode<string>;
|
|
297
302
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
298
303
|
contentEditableClassName: RealmNode<string>;
|
|
304
|
+
autoFocus: RealmNode<boolean>;
|
|
299
305
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
300
306
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
301
307
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -347,6 +353,7 @@ thematicBreakPluginHooks: {
|
|
|
347
353
|
markdown: RealmNode<string>;
|
|
348
354
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
349
355
|
contentEditableClassName: RealmNode<string>;
|
|
356
|
+
autoFocus: RealmNode<boolean>;
|
|
350
357
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
351
358
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
352
359
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -397,6 +404,7 @@ thematicBreakPluginHooks: {
|
|
|
397
404
|
markdown: RealmNode<string>;
|
|
398
405
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
399
406
|
contentEditableClassName: RealmNode<string>;
|
|
407
|
+
autoFocus: RealmNode<boolean>;
|
|
400
408
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
401
409
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
402
410
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -448,6 +456,7 @@ thematicBreakPluginHooks: {
|
|
|
448
456
|
markdown: RealmNode<string>;
|
|
449
457
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
450
458
|
contentEditableClassName: RealmNode<string>;
|
|
459
|
+
autoFocus: RealmNode<boolean>;
|
|
451
460
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
452
461
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
453
462
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -468,7 +477,7 @@ thematicBreakPluginHooks: {
|
|
|
468
477
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
469
478
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
470
479
|
}>) => void;
|
|
471
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
|
|
480
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
|
|
472
481
|
insertThematicBreak: RealmNode<true>;
|
|
473
482
|
} & {
|
|
474
483
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -499,6 +508,7 @@ thematicBreakPluginHooks: {
|
|
|
499
508
|
markdown: RealmNode<string>;
|
|
500
509
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
501
510
|
contentEditableClassName: RealmNode<string>;
|
|
511
|
+
autoFocus: RealmNode<boolean>;
|
|
502
512
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
503
513
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
504
514
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -40,6 +40,7 @@ export declare const toolbarSystem: SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
40
40
|
markdown: RealmNode<string>;
|
|
41
41
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
42
42
|
contentEditableClassName: RealmNode<string>;
|
|
43
|
+
autoFocus: RealmNode<boolean>;
|
|
43
44
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
44
45
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
45
46
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -93,6 +94,7 @@ toolbarPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
93
94
|
markdown: RealmNode<string>;
|
|
94
95
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
95
96
|
contentEditableClassName: RealmNode<string>;
|
|
97
|
+
autoFocus: RealmNode<boolean>;
|
|
96
98
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
97
99
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
98
100
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -150,6 +152,7 @@ toolbarPluginHooks: {
|
|
|
150
152
|
markdown: RealmNode<string>;
|
|
151
153
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
152
154
|
contentEditableClassName: RealmNode<string>;
|
|
155
|
+
autoFocus: RealmNode<boolean>;
|
|
153
156
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
154
157
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
155
158
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -170,7 +173,7 @@ toolbarPluginHooks: {
|
|
|
170
173
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
171
174
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
172
175
|
}>;
|
|
173
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K, callback: (value: ValueForKey<{
|
|
176
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K, callback: (value: ValueForKey<{
|
|
174
177
|
toolbarContents: RealmNode<() => React.ReactNode>;
|
|
175
178
|
} & {
|
|
176
179
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -201,6 +204,7 @@ toolbarPluginHooks: {
|
|
|
201
204
|
markdown: RealmNode<string>;
|
|
202
205
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
203
206
|
contentEditableClassName: RealmNode<string>;
|
|
207
|
+
autoFocus: RealmNode<boolean>;
|
|
204
208
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
205
209
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
206
210
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -252,6 +256,7 @@ toolbarPluginHooks: {
|
|
|
252
256
|
markdown: RealmNode<string>;
|
|
253
257
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
254
258
|
contentEditableClassName: RealmNode<string>;
|
|
259
|
+
autoFocus: RealmNode<boolean>;
|
|
255
260
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
256
261
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
257
262
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -302,6 +307,7 @@ toolbarPluginHooks: {
|
|
|
302
307
|
markdown: RealmNode<string>;
|
|
303
308
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
304
309
|
contentEditableClassName: RealmNode<string>;
|
|
310
|
+
autoFocus: RealmNode<boolean>;
|
|
305
311
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
306
312
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
307
313
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -353,6 +359,7 @@ toolbarPluginHooks: {
|
|
|
353
359
|
markdown: RealmNode<string>;
|
|
354
360
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
355
361
|
contentEditableClassName: RealmNode<string>;
|
|
362
|
+
autoFocus: RealmNode<boolean>;
|
|
356
363
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
357
364
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
358
365
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -373,7 +380,7 @@ toolbarPluginHooks: {
|
|
|
373
380
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
374
381
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
375
382
|
}>) => void;
|
|
376
|
-
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K_2) => (value: ValueForKey<{
|
|
383
|
+
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" | "autoFocus" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K_2) => (value: ValueForKey<{
|
|
377
384
|
toolbarContents: RealmNode<() => React.ReactNode>;
|
|
378
385
|
} & {
|
|
379
386
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -404,6 +411,7 @@ toolbarPluginHooks: {
|
|
|
404
411
|
markdown: RealmNode<string>;
|
|
405
412
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
406
413
|
contentEditableClassName: RealmNode<string>;
|
|
414
|
+
autoFocus: RealmNode<boolean>;
|
|
407
415
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
408
416
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
409
417
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -28,7 +28,7 @@ const SelectButtonTrigger = ({
|
|
|
28
28
|
return /* @__PURE__ */ React__default.createElement(TooltipWrap, { title }, /* @__PURE__ */ React__default.createElement(RadixSelect.Trigger, { className: classNames(styles.toolbarButtonSelectTrigger, className) }, children, /* @__PURE__ */ React__default.createElement(RadixSelect.Icon, { className: styles.selectDropdownArrow }, /* @__PURE__ */ React__default.createElement(DropDownIcon, null))));
|
|
29
29
|
};
|
|
30
30
|
const Select = (props) => {
|
|
31
|
-
return /* @__PURE__ */ React__default.createElement(RadixSelect.Root, { value: props.value, onValueChange: props.onChange }, /* @__PURE__ */ React__default.createElement(SelectTrigger, { title: props.triggerTitle, placeholder: props.placeholder }), /* @__PURE__ */ React__default.createElement(SelectContent, null, props.items.map((item, index) => {
|
|
31
|
+
return /* @__PURE__ */ React__default.createElement(RadixSelect.Root, { value: props.value || void 0, onValueChange: props.onChange }, /* @__PURE__ */ React__default.createElement(SelectTrigger, { title: props.triggerTitle, placeholder: props.placeholder }), /* @__PURE__ */ React__default.createElement(SelectContent, null, props.items.map((item, index) => {
|
|
32
32
|
if (item === "separator") {
|
|
33
33
|
return /* @__PURE__ */ React__default.createElement(RadixSelect.Separator, { key: index });
|
|
34
34
|
}
|