@mdxeditor/editor 0.11.1 → 0.13.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 +8 -0
- package/dist/MDXEditor.js +13 -10
- 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 +23 -3
- package/dist/plugins/codemirror/index.d.ts +31 -3
- package/dist/plugins/core/NestedLexicalEditor.d.ts +1 -1
- package/dist/plugins/core/NestedLexicalEditor.js +4 -4
- package/dist/plugins/core/SharedHistoryPlugin.js +1 -1
- package/dist/plugins/core/index.d.ts +31 -3
- package/dist/plugins/core/index.js +11 -1
- package/dist/plugins/diff-source/index.d.ts +23 -3
- package/dist/plugins/directives/index.d.ts +23 -3
- package/dist/plugins/frontmatter/FrontmatterEditor.js +1 -2
- package/dist/plugins/frontmatter/index.d.ts +23 -3
- package/dist/plugins/headings/index.d.ts +5 -1
- package/dist/plugins/image/ImageEditor.js +2 -2
- package/dist/plugins/image/index.d.ts +23 -3
- package/dist/plugins/jsx/index.d.ts +22 -2
- package/dist/plugins/link/AutoLinkPlugin.d.ts +9 -0
- package/dist/plugins/link/AutoLinkPlugin.js +18 -0
- package/dist/plugins/link/index.d.ts +22 -4
- package/dist/plugins/link/index.js +16 -5
- package/dist/plugins/link-dialog/index.d.ts +19 -3
- package/dist/plugins/link-dialog/index.js +1 -0
- package/dist/plugins/lists/index.d.ts +23 -3
- package/dist/plugins/lists/index.js +2 -2
- package/dist/plugins/markdown-shortcut/index.d.ts +2 -0
- package/dist/plugins/markdown-shortcut/index.js +1 -1
- package/dist/plugins/quote/index.d.ts +17 -3
- package/dist/plugins/sandpack/index.d.ts +30 -2
- package/dist/plugins/table/TableEditor.js +5 -5
- package/dist/plugins/table/index.d.ts +23 -3
- package/dist/plugins/thematic-break/LexicalThematicBreakVisitor.d.ts +1 -1
- package/dist/plugins/thematic-break/LexicalThematicBreakVisitor.js +1 -1
- package/dist/plugins/thematic-break/MdastThematicBreakVisitor.js +1 -1
- package/dist/plugins/thematic-break/index.d.ts +23 -3
- package/dist/plugins/thematic-break/index.js +2 -2
- package/dist/plugins/toolbar/index.d.ts +18 -2
- package/dist/plugins/toolbar/primitives/select.js +1 -1
- package/dist/style.css +186 -164
- package/dist/styles/ui.module.css.js +90 -84
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RefObject,
|
|
1
|
+
import type { RefObject, ReactNode, ComponentType } from 'react';
|
|
2
2
|
import type { Options } from 'mdast-util-to-markdown';
|
|
3
3
|
import type { Config } from 'mdast-util-from-markdown/lib';
|
|
4
4
|
import type { Extension } from 'micromark-util-types';
|
|
@@ -41,6 +41,8 @@ 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
|
+
placeholder: RealmNode<ReactNode>;
|
|
45
|
+
autoFocus: RealmNode<boolean>;
|
|
44
46
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
45
47
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
46
48
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -89,6 +91,8 @@ export declare const thematicBreakSystem: SystemSpec<[SystemSpec<[], (r: Realm)
|
|
|
89
91
|
markdown: RealmNode<string>;
|
|
90
92
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
91
93
|
contentEditableClassName: RealmNode<string>;
|
|
94
|
+
placeholder: RealmNode<ReactNode>;
|
|
95
|
+
autoFocus: RealmNode<boolean>;
|
|
92
96
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
93
97
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
94
98
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -142,6 +146,8 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
142
146
|
markdown: RealmNode<string>;
|
|
143
147
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
144
148
|
contentEditableClassName: RealmNode<string>;
|
|
149
|
+
placeholder: RealmNode<ReactNode>;
|
|
150
|
+
autoFocus: RealmNode<boolean>;
|
|
145
151
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
146
152
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
147
153
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -190,6 +196,8 @@ thematicBreakPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) =>
|
|
|
190
196
|
markdown: RealmNode<string>;
|
|
191
197
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
192
198
|
contentEditableClassName: RealmNode<string>;
|
|
199
|
+
placeholder: RealmNode<ReactNode>;
|
|
200
|
+
autoFocus: RealmNode<boolean>;
|
|
193
201
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
194
202
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
195
203
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -245,6 +253,8 @@ thematicBreakPluginHooks: {
|
|
|
245
253
|
markdown: RealmNode<string>;
|
|
246
254
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
247
255
|
contentEditableClassName: RealmNode<string>;
|
|
256
|
+
placeholder: RealmNode<ReactNode>;
|
|
257
|
+
autoFocus: RealmNode<boolean>;
|
|
248
258
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
249
259
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
250
260
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -265,7 +275,7 @@ thematicBreakPluginHooks: {
|
|
|
265
275
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
266
276
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
267
277
|
}>;
|
|
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<{
|
|
278
|
+
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K, callback: (value: ValueForKey<{
|
|
269
279
|
insertThematicBreak: RealmNode<true>;
|
|
270
280
|
} & {
|
|
271
281
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -296,6 +306,8 @@ thematicBreakPluginHooks: {
|
|
|
296
306
|
markdown: RealmNode<string>;
|
|
297
307
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
298
308
|
contentEditableClassName: RealmNode<string>;
|
|
309
|
+
placeholder: RealmNode<ReactNode>;
|
|
310
|
+
autoFocus: RealmNode<boolean>;
|
|
299
311
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
300
312
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
301
313
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -347,6 +359,8 @@ thematicBreakPluginHooks: {
|
|
|
347
359
|
markdown: RealmNode<string>;
|
|
348
360
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
349
361
|
contentEditableClassName: RealmNode<string>;
|
|
362
|
+
placeholder: RealmNode<ReactNode>;
|
|
363
|
+
autoFocus: RealmNode<boolean>;
|
|
350
364
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
351
365
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
352
366
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -397,6 +411,8 @@ thematicBreakPluginHooks: {
|
|
|
397
411
|
markdown: RealmNode<string>;
|
|
398
412
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
399
413
|
contentEditableClassName: RealmNode<string>;
|
|
414
|
+
placeholder: RealmNode<ReactNode>;
|
|
415
|
+
autoFocus: RealmNode<boolean>;
|
|
400
416
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
401
417
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
402
418
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -448,6 +464,8 @@ thematicBreakPluginHooks: {
|
|
|
448
464
|
markdown: RealmNode<string>;
|
|
449
465
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
450
466
|
contentEditableClassName: RealmNode<string>;
|
|
467
|
+
placeholder: RealmNode<ReactNode>;
|
|
468
|
+
autoFocus: RealmNode<boolean>;
|
|
451
469
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
452
470
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
453
471
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -468,7 +486,7 @@ thematicBreakPluginHooks: {
|
|
|
468
486
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
469
487
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
470
488
|
}>) => 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<{
|
|
489
|
+
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "insertThematicBreak">(key: K_2) => (value: ValueForKey<{
|
|
472
490
|
insertThematicBreak: RealmNode<true>;
|
|
473
491
|
} & {
|
|
474
492
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -499,6 +517,8 @@ thematicBreakPluginHooks: {
|
|
|
499
517
|
markdown: RealmNode<string>;
|
|
500
518
|
editorRootElementRef: RealmNode<RefObject<HTMLDivElement> | null>;
|
|
501
519
|
contentEditableClassName: RealmNode<string>;
|
|
520
|
+
placeholder: RealmNode<ReactNode>;
|
|
521
|
+
autoFocus: RealmNode<boolean>;
|
|
502
522
|
composerChildren: RealmNode<ComponentType<{}>[]>;
|
|
503
523
|
addComposerChild: RealmNode<ComponentType<{}>>;
|
|
504
524
|
topAreaChildren: RealmNode<ComponentType<{}>[]>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { coreSystem } from "../core/index.js";
|
|
2
2
|
import { MdastThematicBreakVisitor } from "./MdastThematicBreakVisitor.js";
|
|
3
3
|
import { LexicalThematicBreakVisitor } from "./LexicalThematicBreakVisitor.js";
|
|
4
|
-
import { INSERT_HORIZONTAL_RULE_COMMAND, HorizontalRuleNode } from "@lexical/react/LexicalHorizontalRuleNode";
|
|
5
|
-
import { HorizontalRulePlugin } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
4
|
+
import { INSERT_HORIZONTAL_RULE_COMMAND, HorizontalRuleNode } from "@lexical/react/LexicalHorizontalRuleNode.js";
|
|
5
|
+
import { HorizontalRulePlugin } from "@lexical/react/LexicalHorizontalRulePlugin.js";
|
|
6
6
|
import { system } from "../../gurx/realmFactory.js";
|
|
7
7
|
import { realmPlugin } from "../../gurx/react.js";
|
|
8
8
|
const thematicBreakSystem = system(
|
|
@@ -40,6 +40,8 @@ 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
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
44
|
+
autoFocus: RealmNode<boolean>;
|
|
43
45
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
44
46
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
45
47
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -93,6 +95,8 @@ toolbarPlugin: PluginConstructor<SystemSpec<[SystemSpec<[], (r: Realm) => {
|
|
|
93
95
|
markdown: RealmNode<string>;
|
|
94
96
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
95
97
|
contentEditableClassName: RealmNode<string>;
|
|
98
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
99
|
+
autoFocus: RealmNode<boolean>;
|
|
96
100
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
97
101
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
98
102
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -150,6 +154,8 @@ toolbarPluginHooks: {
|
|
|
150
154
|
markdown: RealmNode<string>;
|
|
151
155
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
152
156
|
contentEditableClassName: RealmNode<string>;
|
|
157
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
158
|
+
autoFocus: RealmNode<boolean>;
|
|
153
159
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
154
160
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
155
161
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -170,7 +176,7 @@ toolbarPluginHooks: {
|
|
|
170
176
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
171
177
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
172
178
|
}>;
|
|
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<{
|
|
179
|
+
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K, callback: (value: ValueForKey<{
|
|
174
180
|
toolbarContents: RealmNode<() => React.ReactNode>;
|
|
175
181
|
} & {
|
|
176
182
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -201,6 +207,8 @@ toolbarPluginHooks: {
|
|
|
201
207
|
markdown: RealmNode<string>;
|
|
202
208
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
203
209
|
contentEditableClassName: RealmNode<string>;
|
|
210
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
211
|
+
autoFocus: RealmNode<boolean>;
|
|
204
212
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
205
213
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
206
214
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -252,6 +260,8 @@ toolbarPluginHooks: {
|
|
|
252
260
|
markdown: RealmNode<string>;
|
|
253
261
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
254
262
|
contentEditableClassName: RealmNode<string>;
|
|
263
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
264
|
+
autoFocus: RealmNode<boolean>;
|
|
255
265
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
256
266
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
257
267
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -302,6 +312,8 @@ toolbarPluginHooks: {
|
|
|
302
312
|
markdown: RealmNode<string>;
|
|
303
313
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
304
314
|
contentEditableClassName: RealmNode<string>;
|
|
315
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
316
|
+
autoFocus: RealmNode<boolean>;
|
|
305
317
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
306
318
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
307
319
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -353,6 +365,8 @@ toolbarPluginHooks: {
|
|
|
353
365
|
markdown: RealmNode<string>;
|
|
354
366
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
355
367
|
contentEditableClassName: RealmNode<string>;
|
|
368
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
369
|
+
autoFocus: RealmNode<boolean>;
|
|
356
370
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
357
371
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
358
372
|
topAreaChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
@@ -373,7 +387,7 @@ toolbarPluginHooks: {
|
|
|
373
387
|
convertSelectionToNode: RealmNode<() => ElementNode>;
|
|
374
388
|
insertDecoratorNode: RealmNode<() => DecoratorNode<unknown>>;
|
|
375
389
|
}>) => 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<{
|
|
390
|
+
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" | "composerChildren" | "addComposerChild" | "topAreaChildren" | "addTopAreaChild" | "nestedEditorChildren" | "addNestedEditorChild" | "editorWrappers" | "addEditorWrapper" | "currentFormat" | "editorInFocus" | "applyFormat" | "currentBlockType" | "applyBlockType" | "convertSelectionToNode" | "insertDecoratorNode" | "toolbarContents">(key: K_2) => (value: ValueForKey<{
|
|
377
391
|
toolbarContents: RealmNode<() => React.ReactNode>;
|
|
378
392
|
} & {
|
|
379
393
|
activeEditor: RealmNode<LexicalEditor | null>;
|
|
@@ -404,6 +418,8 @@ toolbarPluginHooks: {
|
|
|
404
418
|
markdown: RealmNode<string>;
|
|
405
419
|
editorRootElementRef: RealmNode<React.RefObject<HTMLDivElement> | null>;
|
|
406
420
|
contentEditableClassName: RealmNode<string>;
|
|
421
|
+
placeholder: RealmNode<React.ReactNode>;
|
|
422
|
+
autoFocus: RealmNode<boolean>;
|
|
407
423
|
composerChildren: RealmNode<React.ComponentType<{}>[]>;
|
|
408
424
|
addComposerChild: RealmNode<React.ComponentType<{}>>;
|
|
409
425
|
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
|
}
|