@react-email/editor 0.0.0-experimental.22 → 0.0.0-experimental.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/columns-CUxUEHje.mjs +497 -0
  2. package/dist/columns-CUxUEHje.mjs.map +1 -0
  3. package/dist/columns-ZSaLdkg9.cjs +630 -0
  4. package/dist/core/index.cjs +8 -0
  5. package/dist/core/index.d.cts +2 -0
  6. package/dist/core/index.d.mts +2 -0
  7. package/dist/core/index.mjs +4 -0
  8. package/dist/core-C5_RDJBI.mjs +1982 -0
  9. package/dist/core-C5_RDJBI.mjs.map +1 -0
  10. package/dist/core-Rxnpk8B_.cjs +2239 -0
  11. package/dist/extensions/index.cjs +47 -0
  12. package/dist/extensions/index.d.cts +394 -0
  13. package/dist/extensions/index.d.cts.map +1 -0
  14. package/dist/extensions/index.d.mts +394 -0
  15. package/dist/extensions/index.d.mts.map +1 -0
  16. package/dist/extensions/index.mjs +4 -0
  17. package/dist/index-CfslA7KT.d.cts +130 -0
  18. package/dist/index-CfslA7KT.d.cts.map +1 -0
  19. package/dist/index-hbHRR7oB.d.mts +130 -0
  20. package/dist/index-hbHRR7oB.d.mts.map +1 -0
  21. package/dist/set-text-alignment-Bx3bPteH.cjs +24 -0
  22. package/dist/set-text-alignment-DZvgnbvz.mjs +19 -0
  23. package/dist/set-text-alignment-DZvgnbvz.mjs.map +1 -0
  24. package/dist/ui/index.cjs +1646 -0
  25. package/dist/ui/index.d.cts +668 -0
  26. package/dist/ui/index.d.cts.map +1 -0
  27. package/dist/ui/index.d.mts +668 -0
  28. package/dist/ui/index.d.mts.map +1 -0
  29. package/dist/ui/index.mjs +1584 -0
  30. package/dist/ui/index.mjs.map +1 -0
  31. package/dist/utils/index.cjs +3 -0
  32. package/dist/utils/index.d.cts +7 -0
  33. package/dist/utils/index.d.cts.map +1 -0
  34. package/dist/utils/index.d.mts +7 -0
  35. package/dist/utils/index.d.mts.map +1 -0
  36. package/dist/utils/index.mjs +3 -0
  37. package/package.json +39 -11
  38. package/dist/index.cjs +0 -4228
  39. package/dist/index.d.cts +0 -1175
  40. package/dist/index.d.cts.map +0 -1
  41. package/dist/index.d.mts +0 -1175
  42. package/dist/index.d.mts.map +0 -1
  43. package/dist/index.mjs +0 -4072
  44. package/dist/index.mjs.map +0 -1
package/dist/index.d.mts DELETED
@@ -1,1175 +0,0 @@
1
- import * as react_jsx_runtime22 from "react/jsx-runtime";
2
- import { Content, Editor, Extension, Extensions, JSONContent, Mark, MarkConfig, MarkType, Node, NodeConfig as NodeConfig$1, NodeType as NodeType$1, ParentConfig, Range } from "@tiptap/core";
3
- import { UseEditorOptions } from "@tiptap/react";
4
- import * as React$1 from "react";
5
- import { ReactNode } from "react";
6
- import { StarterKitOptions as StarterKitOptions$1 } from "@tiptap/starter-kit";
7
- import { BlockquoteOptions } from "@tiptap/extension-blockquote";
8
- import { BoldOptions as BoldOptions$1 } from "@tiptap/extension-bold";
9
- import { BulletListOptions } from "@tiptap/extension-bullet-list";
10
- import { CodeOptions } from "@tiptap/extension-code";
11
- import { CodeBlockOptions } from "@tiptap/extension-code-block";
12
- import { EditorView } from "@tiptap/pm/view";
13
- import { HorizontalRuleOptions } from "@tiptap/extension-horizontal-rule";
14
- import { HardBreakOptions } from "@tiptap/extension-hard-break";
15
- import { HeadingOptions as HeadingOptions$1 } from "@tiptap/extension-heading";
16
- import { ItalicOptions } from "@tiptap/extension-italic";
17
- import { LinkOptions as LinkOptions$1 } from "@tiptap/extension-link";
18
- import { ListItemOptions } from "@tiptap/extension-list-item";
19
- import { OrderedListOptions } from "@tiptap/extension-ordered-list";
20
- import { ParagraphOptions } from "@tiptap/extension-paragraph";
21
- import { PlaceholderOptions as PlaceholderOptions$1 } from "@tiptap/extension-placeholder";
22
- import { StrikeOptions } from "@tiptap/extension-strike";
23
- import { SuperscriptExtensionOptions } from "@tiptap/extension-superscript";
24
- import { UnderlineOptions as UnderlineOptions$1 } from "@tiptap/extension-underline";
25
- import { Node as Node$1 } from "@tiptap/pm/model";
26
-
27
- //#region src/core/event-bus.d.ts
28
- /**
29
- * Base event map interface for the editor event bus.
30
- *
31
- * Components extend this via TypeScript module augmentation:
32
- * ```ts
33
- * declare module '@react-email/editor' {
34
- * interface EditorEventMap {
35
- * 'my-component:custom-event': { data: string };
36
- * }
37
- * }
38
- * ```
39
- */
40
- interface EditorEventMap {
41
- 'bubble-menu:add-link': undefined;
42
- }
43
- type EditorEventName = keyof EditorEventMap;
44
- type EditorEventHandler<T extends EditorEventName> = (payload: EditorEventMap[T]) => void | Promise<void>;
45
- interface EditorEventSubscription {
46
- unsubscribe: () => void;
47
- }
48
- declare class EditorEventBus {
49
- private prefixEventName;
50
- dispatch<T extends EditorEventName>(eventName: T, payload: EditorEventMap[T], options?: {
51
- target?: EventTarget;
52
- }): void;
53
- on<T extends EditorEventName>(eventName: T, handler: EditorEventHandler<T>, options?: AddEventListenerOptions & {
54
- target?: EventTarget;
55
- }): EditorEventSubscription;
56
- }
57
- declare const editorEventBus: EditorEventBus;
58
- //#endregion
59
- //#region src/core/is-document-visually-empty.d.ts
60
- declare function isDocumentVisuallyEmpty(doc: Node$1): boolean;
61
- //#endregion
62
- //#region src/core/serializer/compose-react-email.d.ts
63
- interface ComposeReactEmailResult {
64
- html: string;
65
- text: string;
66
- }
67
- declare const composeReactEmail: ({
68
- editor,
69
- preview
70
- }: {
71
- editor: Editor;
72
- preview: string | null;
73
- }) => Promise<ComposeReactEmailResult>;
74
- //#endregion
75
- //#region src/core/serializer/email-node.d.ts
76
- type RendererComponent = (props: {
77
- node: JSONContent;
78
- style: React.CSSProperties;
79
- children?: React.ReactNode;
80
- }) => React.ReactNode;
81
- interface EmailNodeConfig<Options, Storage> extends NodeConfig$1<Options, Storage> {
82
- renderToReactEmail: RendererComponent;
83
- }
84
- type ConfigParameter$1<Options, Storage> = Partial<Omit<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>> & Pick<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'> & ThisType<{
85
- name: string;
86
- options: Options;
87
- storage: Storage;
88
- editor: Editor;
89
- type: NodeType$1;
90
- parent: (...args: any[]) => any;
91
- }>;
92
- declare class EmailNode<Options = Record<string, never>, Storage = Record<string, never>> extends Node<Options, Storage> {
93
- config: EmailNodeConfig<Options, Storage>;
94
- constructor(config: ConfigParameter$1<Options, Storage>);
95
- /**
96
- * Create a new Node instance
97
- * @param config - Node configuration object or a function that returns a configuration object
98
- */
99
- static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter$1<O, S> | (() => ConfigParameter$1<O, S>)): EmailNode<O, S>;
100
- static from<O, S>(node: Node<O, S>, renderToReactEmail: RendererComponent): EmailNode<O, S>;
101
- configure(options?: Partial<Options>): EmailNode<Options, Storage>;
102
- extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig$1<ExtendedOptions, ExtendedStorage> = EmailNodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
103
- name: string;
104
- options: ExtendedOptions;
105
- storage: ExtendedStorage;
106
- editor: Editor;
107
- type: NodeType$1;
108
- }>)): EmailNode<ExtendedOptions, ExtendedStorage>;
109
- }
110
- //#endregion
111
- //#region src/core/create-paste-handler.d.ts
112
- type PasteHandler = (payload: string | File, view: EditorView) => boolean;
113
- type UploadImageHandler = (file: File, view: EditorView, pos: number, preserveAttributes?: {
114
- width?: string;
115
- height?: string;
116
- alignment?: string;
117
- href?: string;
118
- }) => void | Promise<void>;
119
- //#endregion
120
- //#region src/core/use-editor.d.ts
121
- type Merge<A, B> = A & Omit<B, keyof A>;
122
- declare function useEditor({
123
- content,
124
- extensions,
125
- onUpdate,
126
- onPaste,
127
- onUploadImage,
128
- onReady,
129
- editable,
130
- ...rest
131
- }: Merge<{
132
- content: Content;
133
- extensions?: Extensions;
134
- onUpdate?: (editor: Editor, transaction: {
135
- getMeta: (key: string) => unknown;
136
- }) => void;
137
- onPaste?: PasteHandler;
138
- onUploadImage?: UploadImageHandler;
139
- onReady?: (editor: Editor | null) => void;
140
- editable?: boolean;
141
- }, UseEditorOptions>): {
142
- editor: Editor;
143
- isEditorEmpty: boolean;
144
- extensions: Extensions;
145
- contentError: Error | null;
146
- isCollaborative: boolean;
147
- };
148
- //#endregion
149
- //#region src/extensions/alignment-attribute.d.ts
150
- interface AlignmentOptions {
151
- types: string[];
152
- alignments: string[];
153
- }
154
- declare module '@tiptap/core' {
155
- interface Commands<ReturnType> {
156
- alignment: {
157
- /**
158
- * Set the text align attribute
159
- */
160
- setAlignment: (alignment: string) => ReturnType;
161
- };
162
- }
163
- }
164
- declare const AlignmentAttribute: Extension<AlignmentOptions, any>;
165
- //#endregion
166
- //#region src/extensions/body.d.ts
167
- interface BodyOptions {
168
- HTMLAttributes: Record<string, unknown>;
169
- }
170
- declare const Body: EmailNode<BodyOptions, Record<string, never>>;
171
- //#endregion
172
- //#region src/core/serializer/email-mark.d.ts
173
- type SerializedMark = NonNullable<JSONContent['marks']>[number];
174
- type RendererComponent$1 = (props: {
175
- mark: SerializedMark;
176
- node: JSONContent;
177
- style: React.CSSProperties;
178
- children?: React.ReactNode;
179
- }) => React.ReactNode;
180
- interface EmailMarkConfig<Options, Storage> extends MarkConfig<Options, Storage> {
181
- renderToReactEmail: RendererComponent$1;
182
- }
183
- type ConfigParameter<Options, Storage> = Partial<Omit<EmailMarkConfig<Options, Storage>, 'renderToReactEmail'>> & Pick<EmailMarkConfig<Options, Storage>, 'renderToReactEmail'> & ThisType<{
184
- name: string;
185
- options: Options;
186
- storage: Storage;
187
- editor: Editor;
188
- type: MarkType;
189
- parent: (...args: any[]) => any;
190
- }>;
191
- declare class EmailMark<Options = Record<string, never>, Storage = Record<string, never>> extends Mark<Options, Storage> {
192
- config: EmailMarkConfig<Options, Storage>;
193
- constructor(config: ConfigParameter<Options, Storage>);
194
- /**
195
- * Create a new Mark instance
196
- * @param config - Mark configuration object or a function that returns a configuration object
197
- */
198
- static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter<O, S> | (() => ConfigParameter<O, S>)): EmailMark<O, S>;
199
- static from<O, S>(mark: Mark<O, S>, renderToReactEmail: RendererComponent$1): EmailMark<O, S>;
200
- configure(options?: Partial<Options>): EmailMark<Options, Storage>;
201
- extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends MarkConfig<ExtendedOptions, ExtendedStorage> = EmailMarkConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
202
- name: string;
203
- options: ExtendedOptions;
204
- storage: ExtendedStorage;
205
- editor: Editor;
206
- type: MarkType;
207
- }>)): EmailMark<ExtendedOptions, ExtendedStorage>;
208
- }
209
- //#endregion
210
- //#region src/extensions/bold.d.ts
211
- type BoldOptions = BoldOptions$1;
212
- declare const Bold: EmailMark<BoldOptions$1, any>;
213
- //#endregion
214
- //#region src/extensions/button.d.ts
215
- interface EditorButtonOptions {
216
- HTMLAttributes: Record<string, unknown>;
217
- [key: string]: unknown;
218
- }
219
- declare module '@tiptap/core' {
220
- interface Commands<ReturnType> {
221
- button: {
222
- setButton: () => ReturnType;
223
- updateButton: (attributes: Record<string, unknown>) => ReturnType;
224
- };
225
- }
226
- }
227
- declare const Button: EmailNode<EditorButtonOptions, Record<string, never>>;
228
- //#endregion
229
- //#region src/extensions/class-attribute.d.ts
230
- interface ClassAttributeOptions {
231
- types: string[];
232
- class: string[];
233
- }
234
- declare module '@tiptap/core' {
235
- interface Commands<ReturnType> {
236
- class: {
237
- /**
238
- * Set the class attribute
239
- */
240
- setClass: (classList: string) => ReturnType;
241
- /**
242
- * Unset the class attribute
243
- */
244
- unsetClass: () => ReturnType;
245
- };
246
- }
247
- }
248
- declare const ClassAttribute: Extension<ClassAttributeOptions, any>;
249
- //#endregion
250
- //#region src/extensions/code-block.d.ts
251
- interface CodeBlockPrismOptions extends CodeBlockOptions {
252
- defaultLanguage: string;
253
- defaultTheme: string;
254
- }
255
- declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
256
- //#endregion
257
- //#region src/extensions/div.d.ts
258
- interface DivOptions {
259
- HTMLAttributes: Record<string, unknown>;
260
- }
261
- declare const Div: EmailNode<DivOptions, Record<string, never>>;
262
- //#endregion
263
- //#region src/extensions/divider.d.ts
264
- type DividerOptions = HorizontalRuleOptions;
265
- declare const Divider: EmailNode<HorizontalRuleOptions, any>;
266
- //#endregion
267
- //#region src/extensions/global-content.d.ts
268
- interface GlobalContentOptions {
269
- key: string;
270
- data: Record<string, unknown>;
271
- }
272
- declare module '@tiptap/core' {
273
- interface GlobalContent<ReturnType> {
274
- setGlobalContent: (key: string, value: unknown) => ReturnType;
275
- }
276
- interface Commands<ReturnType> {
277
- globalContent: GlobalContent<ReturnType>;
278
- }
279
- }
280
- declare function getGlobalContent(key: string, editor: Editor): unknown | null;
281
- declare const GlobalContent: Node<GlobalContentOptions, any>;
282
- //#endregion
283
- //#region src/extensions/heading.d.ts
284
- type HeadingOptions = HeadingOptions$1;
285
- declare const Heading: EmailNode<HeadingOptions$1, any>;
286
- //#endregion
287
- //#region src/extensions/link.d.ts
288
- type LinkOptions = LinkOptions$1;
289
- declare const Link: EmailMark<LinkOptions$1, any>;
290
- //#endregion
291
- //#region src/extensions/max-nesting.d.ts
292
- interface MaxNestingOptions {
293
- maxDepth: number;
294
- nodeTypes?: string[];
295
- }
296
- declare const MaxNesting: Extension<MaxNestingOptions, any>;
297
- //#endregion
298
- //#region src/extensions/placeholder.d.ts
299
- interface PlaceholderOptions {
300
- placeholder?: string | ((props: {
301
- node: Node$1;
302
- }) => string);
303
- includeChildren?: boolean;
304
- }
305
- declare const Placeholder: Extension<PlaceholderOptions$1, any>;
306
- //#endregion
307
- //#region src/extensions/preview-text.d.ts
308
- interface PreviewTextOptions {
309
- HTMLAttributes: Record<string, unknown>;
310
- }
311
- declare const PreviewText: Node<PreviewTextOptions, any>;
312
- //#endregion
313
- //#region src/extensions/section.d.ts
314
- interface SectionOptions {
315
- HTMLAttributes: Record<string, unknown>;
316
- [key: string]: unknown;
317
- }
318
- declare module '@tiptap/core' {
319
- interface Commands<ReturnType> {
320
- section: {
321
- insertSection: () => ReturnType;
322
- };
323
- }
324
- }
325
- declare const Section: EmailNode<SectionOptions, Record<string, never>>;
326
- //#endregion
327
- //#region src/extensions/style-attribute.d.ts
328
- interface StyleAttributeOptions {
329
- types: string[];
330
- style: string[];
331
- }
332
- declare module '@tiptap/core' {
333
- interface Commands<ReturnType> {
334
- textAlign: {
335
- /**
336
- * Set the style attribute
337
- */
338
- setStyle: (style: string) => ReturnType;
339
- /**
340
- * Unset the style attribute
341
- */
342
- unsetStyle: () => ReturnType;
343
- };
344
- }
345
- }
346
- declare const StyleAttribute: Extension<StyleAttributeOptions, any>;
347
- //#endregion
348
- //#region src/extensions/sup.d.ts
349
- type SupOptions = SuperscriptExtensionOptions;
350
- declare module '@tiptap/core' {
351
- interface Commands<ReturnType> {
352
- sup: {
353
- /**
354
- * Set a superscript mark
355
- */
356
- setSup: () => ReturnType;
357
- /**
358
- * Toggle a superscript mark
359
- */
360
- toggleSup: () => ReturnType;
361
- /**
362
- * Unset a superscript mark
363
- */
364
- unsetSup: () => ReturnType;
365
- };
366
- }
367
- }
368
- declare const Sup: EmailMark<SuperscriptExtensionOptions, any>;
369
- //#endregion
370
- //#region src/extensions/table.d.ts
371
- declare module '@tiptap/core' {
372
- interface NodeConfig<Options, Storage> {
373
- /**
374
- * A string or function to determine the role of the table.
375
- * @default 'table'
376
- * @example () => 'table'
377
- */
378
- tableRole?: string | ((this: {
379
- name: string;
380
- options: Options;
381
- storage: Storage;
382
- parent: ParentConfig<NodeConfig<Options>>['tableRole'];
383
- }) => string);
384
- }
385
- }
386
- interface TableOptions {
387
- HTMLAttributes: Record<string, unknown>;
388
- }
389
- declare const Table: EmailNode<TableOptions, Record<string, never>>;
390
- interface TableRowOptions extends Record<string, unknown> {
391
- HTMLAttributes?: Record<string, unknown>;
392
- }
393
- declare const TableRow: EmailNode<TableRowOptions, Record<string, never>>;
394
- interface TableCellOptions extends Record<string, unknown> {
395
- HTMLAttributes?: Record<string, unknown>;
396
- }
397
- declare const TableCell: EmailNode<TableCellOptions, Record<string, never>>;
398
- declare const TableHeader: Node<any, any>;
399
- //#endregion
400
- //#region src/extensions/underline.d.ts
401
- type UnderlineOptions = UnderlineOptions$1;
402
- declare const Underline: EmailMark<UnderlineOptions$1, any>;
403
- //#endregion
404
- //#region src/extensions/uppercase.d.ts
405
- interface UppercaseOptions {
406
- HTMLAttributes: Record<string, unknown>;
407
- }
408
- declare module '@tiptap/core' {
409
- interface Commands<ReturnType> {
410
- uppercase: {
411
- setUppercase: () => ReturnType;
412
- toggleUppercase: () => ReturnType;
413
- unsetUppercase: () => ReturnType;
414
- };
415
- }
416
- }
417
- declare const Uppercase: EmailMark<UppercaseOptions, Record<string, never>>;
418
- //#endregion
419
- //#region src/extensions/blockquote.d.ts
420
- declare const Blockquote: EmailNode<BlockquoteOptions, any>;
421
- //#endregion
422
- //#region src/extensions/bullet-list.d.ts
423
- declare const BulletList: EmailNode<BulletListOptions, any>;
424
- //#endregion
425
- //#region src/extensions/code.d.ts
426
- declare const Code: EmailMark<CodeOptions, any>;
427
- //#endregion
428
- //#region src/extensions/columns.d.ts
429
- declare module '@tiptap/core' {
430
- interface Commands<ReturnType> {
431
- columns: {
432
- insertColumns: (count: 2 | 3 | 4) => ReturnType;
433
- };
434
- }
435
- }
436
- declare const COLUMN_PARENT_TYPES: readonly ["twoColumns", "threeColumns", "fourColumns"];
437
- declare const MAX_COLUMNS_DEPTH = 3;
438
- declare function getColumnsDepth(doc: Node$1, from: number): number;
439
- declare const TwoColumns: EmailNode<Record<string, never>, Record<string, never>>;
440
- declare const ThreeColumns: EmailNode<Record<string, never>, Record<string, never>>;
441
- declare const FourColumns: EmailNode<Record<string, never>, Record<string, never>>;
442
- declare const ColumnsColumn: EmailNode<Record<string, never>, Record<string, never>>;
443
- //#endregion
444
- //#region src/extensions/hard-break.d.ts
445
- declare const HardBreak: EmailNode<HardBreakOptions, any>;
446
- //#endregion
447
- //#region src/extensions/italic.d.ts
448
- declare const Italic: EmailMark<ItalicOptions, any>;
449
- //#endregion
450
- //#region src/extensions/list-item.d.ts
451
- declare const ListItem: EmailNode<ListItemOptions, any>;
452
- //#endregion
453
- //#region src/extensions/ordered-list.d.ts
454
- declare const OrderedList: EmailNode<OrderedListOptions, any>;
455
- //#endregion
456
- //#region src/extensions/paragraph.d.ts
457
- declare const Paragraph: EmailNode<ParagraphOptions, any>;
458
- //#endregion
459
- //#region src/extensions/preserved-style.d.ts
460
- declare const PreservedStyle: EmailMark<Record<string, never>, Record<string, never>>;
461
- /**
462
- * Processes styles when unlinking:
463
- * - Has background (button-like): preserve all styles
464
- * - No background: strip link-indicator styles (color, text-decoration), keep the rest
465
- */
466
- declare function processStylesForUnlink(styleString: string | null | undefined): string | null;
467
- //#endregion
468
- //#region src/extensions/strike.d.ts
469
- declare const Strike: EmailMark<StrikeOptions, any>;
470
- //#endregion
471
- //#region src/extensions/index.d.ts
472
- type StarterKitOptions = {
473
- CodeBlockPrism: Partial<CodeBlockPrismOptions> | false;
474
- Code: Partial<CodeOptions> | false;
475
- Paragraph: Partial<ParagraphOptions> | false;
476
- BulletList: Partial<BulletListOptions> | false;
477
- OrderedList: Partial<OrderedListOptions> | false;
478
- Blockquote: Partial<BlockquoteOptions> | false;
479
- ListItem: Partial<ListItemOptions> | false;
480
- HardBreak: Partial<HardBreakOptions> | false;
481
- Italic: Partial<ItalicOptions> | false;
482
- Placeholder: Partial<PlaceholderOptions> | false;
483
- PreviewText: Partial<PreviewTextOptions> | false;
484
- Bold: Partial<BoldOptions> | false;
485
- Strike: Partial<StrikeOptions> | false;
486
- Heading: Partial<HeadingOptions> | false;
487
- Divider: Partial<DividerOptions> | false;
488
- Link: Partial<LinkOptions> | false;
489
- Sup: Partial<SupOptions> | false;
490
- Underline: Partial<UnderlineOptions> | false;
491
- Uppercase: Partial<UppercaseOptions> | false;
492
- PreservedStyle: Partial<Record<string, never>> | false;
493
- Table: Partial<TableOptions> | false;
494
- TableRow: Partial<TableRowOptions> | false;
495
- TableCell: Partial<TableCellOptions> | false;
496
- TableHeader: Partial<Record<string, any>> | false;
497
- Body: Partial<BodyOptions> | false;
498
- Div: Partial<DivOptions> | false;
499
- Button: Partial<EditorButtonOptions> | false;
500
- Section: Partial<SectionOptions> | false;
501
- GlobalContent: Partial<GlobalContentOptions> | false;
502
- AlignmentAttribute: Partial<AlignmentOptions> | false;
503
- StyleAttribute: Partial<StyleAttributeOptions> | false;
504
- ClassAttribute: Partial<ClassAttributeOptions> | false;
505
- MaxNesting: Partial<MaxNestingOptions> | false;
506
- TiptapStarterKit: Partial<StarterKitOptions$1> | false;
507
- };
508
- declare const StarterKit: Extension<StarterKitOptions, any>;
509
- //#endregion
510
- //#region src/ui/bubble-menu/create-mark-bubble-item.d.ts
511
- interface PreWiredItemProps {
512
- className?: string;
513
- /** Override the default icon */
514
- children?: React$1.ReactNode;
515
- }
516
- //#endregion
517
- //#region src/ui/bubble-menu/align-center.d.ts
518
- declare function BubbleMenuAlignCenter({
519
- className,
520
- children
521
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
522
- //#endregion
523
- //#region src/ui/bubble-menu/align-left.d.ts
524
- declare function BubbleMenuAlignLeft({
525
- className,
526
- children
527
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
528
- //#endregion
529
- //#region src/ui/bubble-menu/align-right.d.ts
530
- declare function BubbleMenuAlignRight({
531
- className,
532
- children
533
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
534
- //#endregion
535
- //#region src/ui/bubble-menu/default.d.ts
536
- type ExcludableItem$3 = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'uppercase' | 'align-left' | 'align-center' | 'align-right' | 'node-selector' | 'link-selector';
537
- interface BubbleMenuDefaultProps {
538
- /** Items to exclude from the default layout */
539
- excludeItems?: ExcludableItem$3[];
540
- /** Node types that should NOT trigger the bubble menu (forwarded to Root) */
541
- excludeNodes?: string[];
542
- /** Placement relative to selection (forwarded to Root, default: 'bottom') */
543
- placement?: 'top' | 'bottom';
544
- /** Offset from selection in px (forwarded to Root, default: 8) */
545
- offset?: number;
546
- /** Called when the bubble menu hides (forwarded to Root) */
547
- onHide?: () => void;
548
- /** className applied to the Root wrapper */
549
- className?: string;
550
- }
551
- declare function BubbleMenuDefault({
552
- excludeItems,
553
- excludeNodes,
554
- placement,
555
- offset,
556
- onHide,
557
- className
558
- }: BubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
559
- //#endregion
560
- //#region src/ui/bubble-menu/group.d.ts
561
- interface BubbleMenuItemGroupProps {
562
- className?: string;
563
- children: React$1.ReactNode;
564
- }
565
- declare function BubbleMenuItemGroup({
566
- className,
567
- children
568
- }: BubbleMenuItemGroupProps): react_jsx_runtime22.JSX.Element;
569
- //#endregion
570
- //#region src/ui/bubble-menu/item.d.ts
571
- interface BubbleMenuItemProps extends React$1.ComponentProps<'button'> {
572
- /** Used for aria-label and data-item attribute */
573
- name: string;
574
- /** Whether this item is currently active */
575
- isActive: boolean;
576
- /** Called when clicked */
577
- onCommand: () => void;
578
- }
579
- declare function BubbleMenuItem({
580
- name,
581
- isActive,
582
- onCommand,
583
- className,
584
- children,
585
- ...rest
586
- }: BubbleMenuItemProps): react_jsx_runtime22.JSX.Element;
587
- //#endregion
588
- //#region src/ui/bubble-menu/link-selector.d.ts
589
- interface BubbleMenuLinkSelectorProps {
590
- className?: string;
591
- /** Whether to show the link icon toggle button (default: true) */
592
- showToggle?: boolean;
593
- /** Custom URL validator. Return the valid URL string or null. */
594
- validateUrl?: (value: string) => string | null;
595
- /** Called after link is applied */
596
- onLinkApply?: (href: string) => void;
597
- /** Called after link is removed */
598
- onLinkRemove?: () => void;
599
- /** Plugin slot: extra actions rendered inside the link input form */
600
- children?: React$1.ReactNode;
601
- /** Controlled open state */
602
- open?: boolean;
603
- /** Called when open state changes */
604
- onOpenChange?: (open: boolean) => void;
605
- }
606
- declare function BubbleMenuLinkSelector({
607
- className,
608
- showToggle,
609
- validateUrl,
610
- onLinkApply,
611
- onLinkRemove,
612
- children,
613
- open: controlledOpen,
614
- onOpenChange
615
- }: BubbleMenuLinkSelectorProps): react_jsx_runtime22.JSX.Element | null;
616
- //#endregion
617
- //#region src/ui/bubble-menu/node-selector.d.ts
618
- type NodeType = 'Text' | 'Title' | 'Subtitle' | 'Heading' | 'Bullet List' | 'Numbered List' | 'Quote' | 'Code';
619
- interface NodeSelectorItem {
620
- name: NodeType;
621
- icon: React$1.ComponentType<React$1.SVGAttributes<SVGSVGElement>>;
622
- command: () => void;
623
- isActive: boolean;
624
- }
625
- interface NodeSelectorRootProps {
626
- /** Block types to exclude */
627
- omit?: string[];
628
- /** Controlled open state */
629
- open?: boolean;
630
- /** Called when open state changes */
631
- onOpenChange?: (open: boolean) => void;
632
- className?: string;
633
- children: React$1.ReactNode;
634
- }
635
- declare function NodeSelectorRoot({
636
- omit,
637
- open: controlledOpen,
638
- onOpenChange,
639
- className,
640
- children
641
- }: NodeSelectorRootProps): react_jsx_runtime22.JSX.Element | null;
642
- interface NodeSelectorTriggerProps {
643
- className?: string;
644
- children?: React$1.ReactNode;
645
- }
646
- declare function NodeSelectorTrigger({
647
- className,
648
- children
649
- }: NodeSelectorTriggerProps): react_jsx_runtime22.JSX.Element;
650
- interface NodeSelectorContentProps {
651
- className?: string;
652
- /** Popover alignment (default: "start") */
653
- align?: 'start' | 'center' | 'end';
654
- /** Render-prop for full control over item rendering.
655
- * Receives the filtered items and a `close` function to dismiss the popover. */
656
- children?: (items: NodeSelectorItem[], close: () => void) => React$1.ReactNode;
657
- }
658
- declare function NodeSelectorContent({
659
- className,
660
- align,
661
- children
662
- }: NodeSelectorContentProps): react_jsx_runtime22.JSX.Element;
663
- interface BubbleMenuNodeSelectorProps {
664
- /** Block types to exclude */
665
- omit?: string[];
666
- className?: string;
667
- /** Override the trigger content (default: active item name + chevron icon) */
668
- triggerContent?: React$1.ReactNode;
669
- /** Controlled open state */
670
- open?: boolean;
671
- /** Called when open state changes */
672
- onOpenChange?: (open: boolean) => void;
673
- }
674
- declare function BubbleMenuNodeSelector({
675
- omit,
676
- className,
677
- triggerContent,
678
- open,
679
- onOpenChange
680
- }: BubbleMenuNodeSelectorProps): react_jsx_runtime22.JSX.Element;
681
- //#endregion
682
- //#region src/ui/bubble-menu/root.d.ts
683
- interface BubbleMenuRootProps {
684
- /** Node types that should NOT trigger the bubble menu */
685
- excludeNodes?: string[];
686
- /** Placement relative to selection */
687
- placement?: 'top' | 'bottom';
688
- /** Offset from selection in px */
689
- offset?: number;
690
- /** Called when the bubble menu is hidden (e.g., click outside, selection cleared) */
691
- onHide?: () => void;
692
- /** Additional className on the outer wrapper */
693
- className?: string;
694
- children: React$1.ReactNode;
695
- }
696
- declare function BubbleMenuRoot({
697
- excludeNodes,
698
- placement,
699
- offset,
700
- onHide,
701
- className,
702
- children
703
- }: BubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
704
- //#endregion
705
- //#region src/ui/bubble-menu/separator.d.ts
706
- interface BubbleMenuSeparatorProps {
707
- className?: string;
708
- }
709
- declare function BubbleMenuSeparator({
710
- className
711
- }: BubbleMenuSeparatorProps): react_jsx_runtime22.JSX.Element;
712
- //#endregion
713
- //#region src/ui/bubble-menu/bold.d.ts
714
- declare const BubbleMenuBold: {
715
- ({
716
- className,
717
- children
718
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
719
- displayName: string;
720
- };
721
- //#endregion
722
- //#region src/ui/bubble-menu/code.d.ts
723
- declare const BubbleMenuCode: {
724
- ({
725
- className,
726
- children
727
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
728
- displayName: string;
729
- };
730
- //#endregion
731
- //#region src/ui/bubble-menu/italic.d.ts
732
- declare const BubbleMenuItalic: {
733
- ({
734
- className,
735
- children
736
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
737
- displayName: string;
738
- };
739
- //#endregion
740
- //#region src/ui/bubble-menu/strike.d.ts
741
- declare const BubbleMenuStrike: {
742
- ({
743
- className,
744
- children
745
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
746
- displayName: string;
747
- };
748
- //#endregion
749
- //#region src/ui/bubble-menu/underline.d.ts
750
- declare const BubbleMenuUnderline: {
751
- ({
752
- className,
753
- children
754
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
755
- displayName: string;
756
- };
757
- //#endregion
758
- //#region src/ui/bubble-menu/uppercase.d.ts
759
- declare const BubbleMenuUppercase: {
760
- ({
761
- className,
762
- children
763
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
764
- displayName: string;
765
- };
766
- //#endregion
767
- //#region src/ui/bubble-menu/index.d.ts
768
- declare const BubbleMenu: {
769
- readonly Root: typeof BubbleMenuRoot;
770
- readonly ItemGroup: typeof BubbleMenuItemGroup;
771
- readonly Separator: typeof BubbleMenuSeparator;
772
- readonly Item: typeof BubbleMenuItem;
773
- readonly Bold: {
774
- ({
775
- className,
776
- children
777
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
778
- displayName: string;
779
- };
780
- readonly Italic: {
781
- ({
782
- className,
783
- children
784
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
785
- displayName: string;
786
- };
787
- readonly Underline: {
788
- ({
789
- className,
790
- children
791
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
792
- displayName: string;
793
- };
794
- readonly Strike: {
795
- ({
796
- className,
797
- children
798
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
799
- displayName: string;
800
- };
801
- readonly Code: {
802
- ({
803
- className,
804
- children
805
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
806
- displayName: string;
807
- };
808
- readonly Uppercase: {
809
- ({
810
- className,
811
- children
812
- }: PreWiredItemProps): react_jsx_runtime22.JSX.Element;
813
- displayName: string;
814
- };
815
- readonly AlignLeft: typeof BubbleMenuAlignLeft;
816
- readonly AlignCenter: typeof BubbleMenuAlignCenter;
817
- readonly AlignRight: typeof BubbleMenuAlignRight;
818
- readonly NodeSelector: typeof BubbleMenuNodeSelector & {
819
- Root: typeof NodeSelectorRoot;
820
- Trigger: typeof NodeSelectorTrigger;
821
- Content: typeof NodeSelectorContent;
822
- };
823
- readonly LinkSelector: typeof BubbleMenuLinkSelector;
824
- readonly Default: typeof BubbleMenuDefault;
825
- };
826
- //#endregion
827
- //#region src/ui/button-bubble-menu/default.d.ts
828
- type ExcludableItem$2 = 'edit-link';
829
- interface ButtonBubbleMenuDefaultProps {
830
- excludeItems?: ExcludableItem$2[];
831
- placement?: 'top' | 'bottom';
832
- offset?: number;
833
- onHide?: () => void;
834
- className?: string;
835
- }
836
- declare function ButtonBubbleMenuDefault({
837
- excludeItems,
838
- placement,
839
- offset,
840
- onHide,
841
- className
842
- }: ButtonBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
843
- //#endregion
844
- //#region src/ui/button-bubble-menu/edit-link.d.ts
845
- interface ButtonBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
846
- declare function ButtonBubbleMenuEditLink({
847
- className,
848
- children,
849
- onClick,
850
- onMouseDown,
851
- ...rest
852
- }: ButtonBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
853
- //#endregion
854
- //#region src/ui/button-bubble-menu/root.d.ts
855
- interface ButtonBubbleMenuRootProps {
856
- /** Called when the bubble menu hides */
857
- onHide?: () => void;
858
- /** Placement relative to cursor (default: 'top') */
859
- placement?: 'top' | 'bottom';
860
- /** Offset from cursor in px (default: 8) */
861
- offset?: number;
862
- /** className on the outer wrapper */
863
- className?: string;
864
- children: React$1.ReactNode;
865
- }
866
- declare function ButtonBubbleMenuRoot({
867
- onHide,
868
- placement,
869
- offset,
870
- className,
871
- children
872
- }: ButtonBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
873
- //#endregion
874
- //#region src/ui/button-bubble-menu/toolbar.d.ts
875
- interface ButtonBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
876
- declare function ButtonBubbleMenuToolbar({
877
- children,
878
- ...rest
879
- }: ButtonBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
880
- //#endregion
881
- //#region src/ui/button-bubble-menu/context.d.ts
882
- interface ButtonBubbleMenuContextValue {
883
- editor: Editor;
884
- isEditing: boolean;
885
- setIsEditing: (value: boolean) => void;
886
- }
887
- declare function useButtonBubbleMenuContext(): ButtonBubbleMenuContextValue;
888
- //#endregion
889
- //#region src/ui/button-bubble-menu/index.d.ts
890
- declare const ButtonBubbleMenu: {
891
- readonly Root: typeof ButtonBubbleMenuRoot;
892
- readonly Toolbar: typeof ButtonBubbleMenuToolbar;
893
- readonly EditLink: typeof ButtonBubbleMenuEditLink;
894
- readonly Default: typeof ButtonBubbleMenuDefault;
895
- };
896
- //#endregion
897
- //#region src/ui/image-bubble-menu/default.d.ts
898
- type ExcludableItem$1 = 'edit-link';
899
- interface ImageBubbleMenuDefaultProps {
900
- excludeItems?: ExcludableItem$1[];
901
- placement?: 'top' | 'bottom';
902
- offset?: number;
903
- onHide?: () => void;
904
- className?: string;
905
- }
906
- declare function ImageBubbleMenuDefault({
907
- excludeItems,
908
- placement,
909
- offset,
910
- onHide,
911
- className
912
- }: ImageBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
913
- //#endregion
914
- //#region src/ui/image-bubble-menu/edit-link.d.ts
915
- interface ImageBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
916
- declare function ImageBubbleMenuEditLink({
917
- className,
918
- children,
919
- onClick,
920
- onMouseDown,
921
- ...rest
922
- }: ImageBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
923
- //#endregion
924
- //#region src/ui/image-bubble-menu/root.d.ts
925
- interface ImageBubbleMenuRootProps {
926
- /** Called when the bubble menu hides */
927
- onHide?: () => void;
928
- /** Placement relative to cursor (default: 'top') */
929
- placement?: 'top' | 'bottom';
930
- /** Offset from cursor in px (default: 8) */
931
- offset?: number;
932
- /** className on the outer wrapper */
933
- className?: string;
934
- children: React$1.ReactNode;
935
- }
936
- declare function ImageBubbleMenuRoot({
937
- onHide,
938
- placement,
939
- offset,
940
- className,
941
- children
942
- }: ImageBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
943
- //#endregion
944
- //#region src/ui/image-bubble-menu/toolbar.d.ts
945
- interface ImageBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
946
- declare function ImageBubbleMenuToolbar({
947
- children,
948
- ...rest
949
- }: ImageBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
950
- //#endregion
951
- //#region src/ui/image-bubble-menu/context.d.ts
952
- interface ImageBubbleMenuContextValue {
953
- editor: Editor;
954
- isEditing: boolean;
955
- setIsEditing: (value: boolean) => void;
956
- }
957
- declare function useImageBubbleMenuContext(): ImageBubbleMenuContextValue;
958
- //#endregion
959
- //#region src/ui/image-bubble-menu/index.d.ts
960
- declare const ImageBubbleMenu: {
961
- readonly Root: typeof ImageBubbleMenuRoot;
962
- readonly Toolbar: typeof ImageBubbleMenuToolbar;
963
- readonly EditLink: typeof ImageBubbleMenuEditLink;
964
- readonly Default: typeof ImageBubbleMenuDefault;
965
- };
966
- //#endregion
967
- //#region src/ui/link-bubble-menu/default.d.ts
968
- type ExcludableItem = 'edit-link' | 'open-link' | 'unlink';
969
- interface LinkBubbleMenuDefaultProps {
970
- excludeItems?: ExcludableItem[];
971
- placement?: 'top' | 'bottom';
972
- offset?: number;
973
- onHide?: () => void;
974
- className?: string;
975
- validateUrl?: (value: string) => string | null;
976
- onLinkApply?: (href: string) => void;
977
- onLinkRemove?: () => void;
978
- }
979
- declare function LinkBubbleMenuDefault({
980
- excludeItems,
981
- placement,
982
- offset,
983
- onHide,
984
- className,
985
- validateUrl,
986
- onLinkApply,
987
- onLinkRemove
988
- }: LinkBubbleMenuDefaultProps): react_jsx_runtime22.JSX.Element;
989
- //#endregion
990
- //#region src/ui/link-bubble-menu/edit-link.d.ts
991
- interface LinkBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
992
- declare function LinkBubbleMenuEditLink({
993
- className,
994
- children,
995
- onClick,
996
- onMouseDown,
997
- ...rest
998
- }: LinkBubbleMenuEditLinkProps): react_jsx_runtime22.JSX.Element;
999
- //#endregion
1000
- //#region src/ui/link-bubble-menu/form.d.ts
1001
- interface LinkBubbleMenuFormProps {
1002
- className?: string;
1003
- /** Custom URL validator (default: getUrlFromString) */
1004
- validateUrl?: (value: string) => string | null;
1005
- /** Called after link is applied */
1006
- onLinkApply?: (href: string) => void;
1007
- /** Called after link is removed */
1008
- onLinkRemove?: () => void;
1009
- /** Extra content inside the form (e.g. a variables dropdown slot) */
1010
- children?: React$1.ReactNode;
1011
- }
1012
- declare function LinkBubbleMenuForm({
1013
- className,
1014
- validateUrl,
1015
- onLinkApply,
1016
- onLinkRemove,
1017
- children
1018
- }: LinkBubbleMenuFormProps): react_jsx_runtime22.JSX.Element | null;
1019
- //#endregion
1020
- //#region src/ui/link-bubble-menu/open-link.d.ts
1021
- interface LinkBubbleMenuOpenLinkProps extends Omit<React$1.ComponentProps<'a'>, 'href' | 'target' | 'rel'> {}
1022
- declare function LinkBubbleMenuOpenLink({
1023
- className,
1024
- children,
1025
- ...rest
1026
- }: LinkBubbleMenuOpenLinkProps): react_jsx_runtime22.JSX.Element;
1027
- //#endregion
1028
- //#region src/ui/link-bubble-menu/root.d.ts
1029
- interface LinkBubbleMenuRootProps {
1030
- /** Called when the bubble menu hides */
1031
- onHide?: () => void;
1032
- /** Placement relative to cursor (default: 'top') */
1033
- placement?: 'top' | 'bottom';
1034
- /** Offset from cursor in px (default: 8) */
1035
- offset?: number;
1036
- /** className on the outer wrapper */
1037
- className?: string;
1038
- children: React$1.ReactNode;
1039
- }
1040
- declare function LinkBubbleMenuRoot({
1041
- onHide,
1042
- placement,
1043
- offset,
1044
- className,
1045
- children
1046
- }: LinkBubbleMenuRootProps): react_jsx_runtime22.JSX.Element | null;
1047
- //#endregion
1048
- //#region src/ui/link-bubble-menu/toolbar.d.ts
1049
- interface LinkBubbleMenuToolbarProps extends React$1.ComponentProps<'div'> {}
1050
- declare function LinkBubbleMenuToolbar({
1051
- children,
1052
- ...rest
1053
- }: LinkBubbleMenuToolbarProps): react_jsx_runtime22.JSX.Element | null;
1054
- //#endregion
1055
- //#region src/ui/link-bubble-menu/unlink.d.ts
1056
- interface LinkBubbleMenuUnlinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
1057
- declare function LinkBubbleMenuUnlink({
1058
- className,
1059
- children,
1060
- onClick,
1061
- onMouseDown,
1062
- ...rest
1063
- }: LinkBubbleMenuUnlinkProps): react_jsx_runtime22.JSX.Element;
1064
- //#endregion
1065
- //#region src/ui/link-bubble-menu/context.d.ts
1066
- interface LinkBubbleMenuContextValue {
1067
- editor: Editor;
1068
- linkHref: string;
1069
- isEditing: boolean;
1070
- setIsEditing: (value: boolean) => void;
1071
- }
1072
- declare function useLinkBubbleMenuContext(): LinkBubbleMenuContextValue;
1073
- //#endregion
1074
- //#region src/ui/link-bubble-menu/index.d.ts
1075
- declare const LinkBubbleMenu: {
1076
- readonly Root: typeof LinkBubbleMenuRoot;
1077
- readonly Toolbar: typeof LinkBubbleMenuToolbar;
1078
- readonly Form: typeof LinkBubbleMenuForm;
1079
- readonly EditLink: typeof LinkBubbleMenuEditLink;
1080
- readonly Unlink: typeof LinkBubbleMenuUnlink;
1081
- readonly OpenLink: typeof LinkBubbleMenuOpenLink;
1082
- readonly Default: typeof LinkBubbleMenuDefault;
1083
- };
1084
- //#endregion
1085
- //#region src/ui/slash-command/types.d.ts
1086
- type SlashCommandCategory = string;
1087
- interface SearchableItem {
1088
- title: string;
1089
- description: string;
1090
- searchTerms?: string[];
1091
- }
1092
- interface SlashCommandItem extends SearchableItem {
1093
- icon: ReactNode;
1094
- category: SlashCommandCategory;
1095
- command: (props: SlashCommandProps) => void;
1096
- }
1097
- interface SlashCommandProps {
1098
- editor: Editor;
1099
- range: Range;
1100
- }
1101
- interface SlashCommandRenderProps {
1102
- items: SlashCommandItem[];
1103
- query: string;
1104
- selectedIndex: number;
1105
- onSelect: (index: number) => void;
1106
- }
1107
- interface SlashCommandRootProps {
1108
- items?: SlashCommandItem[];
1109
- filterItems?: (items: SlashCommandItem[], query: string, editor: Editor) => SlashCommandItem[];
1110
- char?: string;
1111
- allow?: (props: {
1112
- editor: Editor;
1113
- }) => boolean;
1114
- children?: (props: SlashCommandRenderProps) => ReactNode;
1115
- }
1116
- interface CommandListProps {
1117
- items: SlashCommandItem[];
1118
- query: string;
1119
- selectedIndex: number;
1120
- onSelect: (index: number) => void;
1121
- }
1122
- //#endregion
1123
- //#region src/ui/slash-command/command-list.d.ts
1124
- declare function CommandList({
1125
- items,
1126
- query,
1127
- selectedIndex,
1128
- onSelect
1129
- }: CommandListProps): react_jsx_runtime22.JSX.Element;
1130
- //#endregion
1131
- //#region src/ui/slash-command/root.d.ts
1132
- declare function SlashCommandRoot({
1133
- items: itemsProp,
1134
- filterItems: filterItemsProp,
1135
- char,
1136
- allow: allowProp,
1137
- children
1138
- }: SlashCommandRootProps): React$1.ReactPortal | null;
1139
- //#endregion
1140
- //#region src/ui/slash-command/commands.d.ts
1141
- declare const TEXT: SlashCommandItem;
1142
- declare const H1: SlashCommandItem;
1143
- declare const H2: SlashCommandItem;
1144
- declare const H3: SlashCommandItem;
1145
- declare const BULLET_LIST: SlashCommandItem;
1146
- declare const NUMBERED_LIST: SlashCommandItem;
1147
- declare const QUOTE: SlashCommandItem;
1148
- declare const CODE: SlashCommandItem;
1149
- declare const BUTTON: SlashCommandItem;
1150
- declare const DIVIDER: SlashCommandItem;
1151
- declare const SECTION: SlashCommandItem;
1152
- declare const TWO_COLUMNS: SlashCommandItem;
1153
- declare const THREE_COLUMNS: SlashCommandItem;
1154
- declare const FOUR_COLUMNS: SlashCommandItem;
1155
- declare const defaultSlashCommands: SlashCommandItem[];
1156
- //#endregion
1157
- //#region src/ui/slash-command/search.d.ts
1158
- declare function scoreItem(item: SearchableItem, query: string): number;
1159
- declare function filterAndRankItems<T extends SearchableItem>(items: T[], query: string): T[];
1160
- //#endregion
1161
- //#region src/ui/slash-command/utils.d.ts
1162
- declare function isInsideNode(editor: Editor, type: string): boolean;
1163
- declare function isAtMaxColumnsDepth(editor: Editor): boolean;
1164
- //#endregion
1165
- //#region src/ui/slash-command/index.d.ts
1166
- declare const SlashCommand: {
1167
- readonly Root: typeof SlashCommandRoot;
1168
- readonly CommandList: typeof CommandList;
1169
- };
1170
- //#endregion
1171
- //#region src/utils/set-text-alignment.d.ts
1172
- declare function setTextAlignment(editor: Editor, alignment: string): void;
1173
- //#endregion
1174
- export { AlignmentAttribute, AlignmentOptions, BULLET_LIST, BUTTON, Blockquote, Body, BodyOptions, Bold, BoldOptions, BubbleMenu, BubbleMenuAlignCenter, BubbleMenuAlignLeft, BubbleMenuAlignRight, BubbleMenuBold, BubbleMenuCode, BubbleMenuDefault, type BubbleMenuDefaultProps, BubbleMenuItalic, BubbleMenuItem, BubbleMenuItemGroup, type BubbleMenuItemGroupProps, type BubbleMenuItemProps, BubbleMenuLinkSelector, type BubbleMenuLinkSelectorProps, BubbleMenuNodeSelector, type BubbleMenuNodeSelectorProps, BubbleMenuRoot, type BubbleMenuRootProps, BubbleMenuSeparator, type BubbleMenuSeparatorProps, BubbleMenuStrike, BubbleMenuUnderline, BubbleMenuUppercase, BulletList, Button, ButtonBubbleMenu, ButtonBubbleMenuDefault, type ButtonBubbleMenuDefaultProps, ButtonBubbleMenuEditLink, type ButtonBubbleMenuEditLinkProps, ButtonBubbleMenuRoot, type ButtonBubbleMenuRootProps, ButtonBubbleMenuToolbar, type ButtonBubbleMenuToolbarProps, CODE, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, Code, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, CommandList, type CommandListProps, DIVIDER, Div, DivOptions, Divider, DividerOptions, EditorButtonOptions, EditorEventHandler, EditorEventMap, EditorEventName, EditorEventSubscription, EmailNode, EmailNodeConfig, FOUR_COLUMNS, FourColumns, GlobalContent, GlobalContentOptions, H1, H2, H3, HardBreak, Heading, HeadingOptions, ImageBubbleMenu, ImageBubbleMenuDefault, type ImageBubbleMenuDefaultProps, ImageBubbleMenuEditLink, type ImageBubbleMenuEditLinkProps, ImageBubbleMenuRoot, type ImageBubbleMenuRootProps, ImageBubbleMenuToolbar, type ImageBubbleMenuToolbarProps, Italic, Link, LinkBubbleMenu, LinkBubbleMenuDefault, type LinkBubbleMenuDefaultProps, LinkBubbleMenuEditLink, type LinkBubbleMenuEditLinkProps, LinkBubbleMenuForm, type LinkBubbleMenuFormProps, LinkBubbleMenuOpenLink, type LinkBubbleMenuOpenLinkProps, LinkBubbleMenuRoot, type LinkBubbleMenuRootProps, LinkBubbleMenuToolbar, type LinkBubbleMenuToolbarProps, LinkBubbleMenuUnlink, type LinkBubbleMenuUnlinkProps, LinkOptions, ListItem, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, NUMBERED_LIST, NodeSelectorContent, type NodeSelectorContentProps, type NodeSelectorItem, NodeSelectorRoot, type NodeSelectorRootProps, NodeSelectorTrigger, type NodeSelectorTriggerProps, type NodeType, OrderedList, Paragraph, Placeholder, PlaceholderOptions, type PreWiredItemProps, PreservedStyle, PreviewText, PreviewTextOptions, QUOTE, RendererComponent, SECTION, type SearchableItem, Section, SectionOptions, SlashCommand, type SlashCommandItem, type SlashCommandProps, type SlashCommandRenderProps, type SlashCommandRootProps, StarterKit, StarterKitOptions, Strike, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, TEXT, THREE_COLUMNS, TWO_COLUMNS, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, ThreeColumns, TwoColumns, Underline, UnderlineOptions, Uppercase, UppercaseOptions, composeReactEmail, defaultSlashCommands, editorEventBus, filterAndRankItems, getColumnsDepth, getGlobalContent, isAtMaxColumnsDepth, isDocumentVisuallyEmpty, isInsideNode, processStylesForUnlink, scoreItem, setTextAlignment, useButtonBubbleMenuContext, useEditor, useImageBubbleMenuContext, useLinkBubbleMenuContext };
1175
- //# sourceMappingURL=index.d.mts.map