@react-email/editor 0.0.0-experimental.0 → 0.0.0-experimental.10

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/index.d.mts CHANGED
@@ -1,21 +1,19 @@
1
- import { Editor, JSONContent, Node, NodeConfig, NodeType } from "@tiptap/core";
1
+ import * as _tiptap_core9 from "@tiptap/core";
2
+ import { Editor, Extension, JSONContent, Mark, Node, NodeConfig as NodeConfig$1, NodeType as NodeType$1, ParentConfig } from "@tiptap/core";
3
+ import * as _tiptap_starter_kit0 from "@tiptap/starter-kit";
4
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
5
  import { CodeBlockOptions } from "@tiptap/extension-code-block";
6
+ import * as _tiptap_extension_placeholder0 from "@tiptap/extension-placeholder";
3
7
  import * as React$1 from "react";
8
+ import { Node as Node$1 } from "@tiptap/pm/model";
4
9
 
5
- //#region src/utils/types.d.ts
6
-
7
- type KnownThemeComponents = 'reset' | 'body' | 'container' | 'h1' | 'h2' | 'h3' | 'paragraph' | 'nestedList' | 'list' | 'listItem' | 'listParagraph' | 'blockquote' | 'codeBlock' | 'inlineCode' | 'codeTag' | 'link' | 'footer' | 'hr' | 'image' | 'button' | 'section';
8
- type CssJs = { [K in KnownThemeComponents]: React$1.CSSProperties & {
9
- align?: 'center' | 'left' | 'right';
10
- } };
11
- //#endregion
12
10
  //#region src/core/email-node.d.ts
13
11
  type RendererComponent = (props: {
14
12
  node: JSONContent;
15
- styles: CssJs;
13
+ style: React.CSSProperties;
16
14
  children?: React.ReactNode;
17
15
  }) => React.ReactNode;
18
- interface EmailNodeConfig<Options, Storage> extends NodeConfig<Options, Storage> {
16
+ interface EmailNodeConfig<Options, Storage> extends NodeConfig$1<Options, Storage> {
19
17
  renderToReactEmail: RendererComponent;
20
18
  }
21
19
  type ConfigParameter<Options, Storage> = Partial<Omit<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>> & Pick<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>;
@@ -29,20 +27,122 @@ declare class EmailNode<Options = Record<string, never>, Storage = Record<string
29
27
  static create<O = Record<string, never>, S = Record<string, never>>(config: ConfigParameter<O, S> | (() => ConfigParameter<O, S>)): EmailNode<O, S>;
30
28
  static from<O, S>(node: Node<O, S>, renderToReactEmail: RendererComponent): EmailNode<O, S>;
31
29
  configure(options?: Partial<Options>): EmailNode<Options, Storage>;
32
- extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig<ExtendedOptions, ExtendedStorage> = EmailNodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
30
+ extend<ExtendedOptions = Options, ExtendedStorage = Storage, ExtendedConfig extends NodeConfig$1<ExtendedOptions, ExtendedStorage> = EmailNodeConfig<ExtendedOptions, ExtendedStorage>>(extendedConfig?: (() => Partial<ExtendedConfig>) | (Partial<ExtendedConfig> & ThisType<{
33
31
  name: string;
34
32
  options: ExtendedOptions;
35
33
  storage: ExtendedStorage;
36
34
  editor: Editor;
37
- type: NodeType;
35
+ type: NodeType$1;
38
36
  }>)): EmailNode<ExtendedOptions, ExtendedStorage>;
39
37
  }
40
38
  //#endregion
41
- //#region src/extensions/body.d.ts
42
- interface BodyOptions {
39
+ //#region src/core/event-bus.d.ts
40
+ /**
41
+ * Base event map interface for the editor event bus.
42
+ *
43
+ * Components extend this via TypeScript module augmentation:
44
+ * ```ts
45
+ * declare module '@react-email/editor' {
46
+ * interface EditorEventMap {
47
+ * 'my-component:custom-event': { data: string };
48
+ * }
49
+ * }
50
+ * ```
51
+ */
52
+ interface EditorEventMap {
53
+ 'bubble-menu:add-link': undefined;
54
+ }
55
+ type EditorEventName = keyof EditorEventMap;
56
+ type EditorEventHandler<T extends EditorEventName> = (payload: EditorEventMap[T]) => void | Promise<void>;
57
+ interface EditorEventSubscription {
58
+ unsubscribe: () => void;
59
+ }
60
+ declare class EditorEventBus {
61
+ private prefixEventName;
62
+ dispatch<T extends EditorEventName>(eventName: T, payload: EditorEventMap[T], options?: {
63
+ target?: EventTarget;
64
+ }): void;
65
+ on<T extends EditorEventName>(eventName: T, handler: EditorEventHandler<T>, options?: AddEventListenerOptions & {
66
+ target?: EventTarget;
67
+ }): EditorEventSubscription;
68
+ }
69
+ declare const editorEventBus: EditorEventBus;
70
+ //#endregion
71
+ //#region src/extensions/code-block.d.ts
72
+ interface CodeBlockPrismOptions extends CodeBlockOptions {
73
+ defaultLanguage: string;
74
+ defaultTheme: string;
75
+ }
76
+ declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
77
+ //#endregion
78
+ //#region src/extensions/preview-text.d.ts
79
+ interface PreviewTextOptions {
43
80
  HTMLAttributes: Record<string, unknown>;
44
81
  }
45
- declare const Body: EmailNode<BodyOptions, Record<string, never>>;
82
+ declare const PreviewText: Node<PreviewTextOptions, any>;
83
+ //#endregion
84
+ //#region src/extensions/bold.d.ts
85
+ interface BoldOptions {
86
+ /**
87
+ * HTML attributes to add to the bold element.
88
+ * @default {}
89
+ * @example { class: 'foo' }
90
+ */
91
+ HTMLAttributes: Record<string, unknown>;
92
+ }
93
+ declare module '@tiptap/core' {
94
+ interface Commands<ReturnType> {
95
+ bold: {
96
+ /**
97
+ * Set a bold mark
98
+ */
99
+ setBold: () => ReturnType;
100
+ /**
101
+ * Toggle a bold mark
102
+ */
103
+ toggleBold: () => ReturnType;
104
+ /**
105
+ * Unset a bold mark
106
+ */
107
+ unsetBold: () => ReturnType;
108
+ };
109
+ }
110
+ }
111
+ /**
112
+ * This extension allows you to mark text as bold.
113
+ * @see https://tiptap.dev/api/marks/bold
114
+ */
115
+ declare const Bold: Mark<BoldOptions, any>;
116
+ //#endregion
117
+ //#region src/extensions/table.d.ts
118
+ declare module '@tiptap/core' {
119
+ interface NodeConfig<Options, Storage> {
120
+ /**
121
+ * A string or function to determine the role of the table.
122
+ * @default 'table'
123
+ * @example () => 'table'
124
+ */
125
+ tableRole?: string | ((this: {
126
+ name: string;
127
+ options: Options;
128
+ storage: Storage;
129
+ parent: ParentConfig<NodeConfig<Options>>['tableRole'];
130
+ }) => string);
131
+ }
132
+ }
133
+ interface TableOptions {
134
+ HTMLAttributes: Record<string, unknown>;
135
+ }
136
+ declare const Table: EmailNode<TableOptions, Record<string, never>>;
137
+ interface TableRowOptions extends Record<string, unknown> {
138
+ HTMLAttributes?: Record<string, unknown>;
139
+ }
140
+ declare const TableRow: EmailNode<TableRowOptions, Record<string, never>>;
141
+ interface TableCellOptions extends Record<string, unknown> {
142
+ HTMLAttributes?: Record<string, unknown>;
143
+ }
144
+ declare const TableCell: EmailNode<TableCellOptions, Record<string, never>>;
145
+ declare const TableHeader: Node<any, any>;
46
146
  //#endregion
47
147
  //#region src/extensions/button.d.ts
48
148
  interface EditorButtonOptions {
@@ -59,12 +159,93 @@ declare module '@tiptap/core' {
59
159
  }
60
160
  declare const Button: EmailNode<EditorButtonOptions, Record<string, never>>;
61
161
  //#endregion
62
- //#region src/extensions/code-block.d.ts
63
- interface CodeBlockPrismOptions extends CodeBlockOptions {
64
- defaultLanguage: string;
65
- defaultTheme: string;
162
+ //#region src/extensions/alignment-attribute.d.ts
163
+ interface AlignmentOptions {
164
+ types: string[];
165
+ alignments: string[];
66
166
  }
67
- declare const CodeBlockPrism: EmailNode<CodeBlockPrismOptions, any>;
167
+ declare module '@tiptap/core' {
168
+ interface Commands<ReturnType> {
169
+ alignment: {
170
+ /**
171
+ * Set the text align attribute
172
+ */
173
+ setAlignment: (alignment: string) => ReturnType;
174
+ };
175
+ }
176
+ }
177
+ declare const AlignmentAttribute: Extension<AlignmentOptions, any>;
178
+ //#endregion
179
+ //#region src/extensions/style-attribute.d.ts
180
+ interface StyleAttributeOptions {
181
+ types: string[];
182
+ style: string[];
183
+ }
184
+ declare module '@tiptap/core' {
185
+ interface Commands<ReturnType> {
186
+ textAlign: {
187
+ /**
188
+ * Set the style attribute
189
+ */
190
+ setStyle: (style: string) => ReturnType;
191
+ /**
192
+ * Unset the style attribute
193
+ */
194
+ unsetStyle: () => ReturnType;
195
+ };
196
+ }
197
+ }
198
+ declare const StyleAttribute: Extension<StyleAttributeOptions, any>;
199
+ //#endregion
200
+ //#region src/extensions/class-attribute.d.ts
201
+ interface ClassAttributeOptions {
202
+ types: string[];
203
+ class: string[];
204
+ }
205
+ declare module '@tiptap/core' {
206
+ interface Commands<ReturnType> {
207
+ class: {
208
+ /**
209
+ * Set the class attribute
210
+ */
211
+ setClass: (classList: string) => ReturnType;
212
+ /**
213
+ * Unset the class attribute
214
+ */
215
+ unsetClass: () => ReturnType;
216
+ };
217
+ }
218
+ }
219
+ declare const ClassAttribute: Extension<ClassAttributeOptions, any>;
220
+ //#endregion
221
+ //#region src/extensions/max-nesting.d.ts
222
+ interface MaxNestingOptions {
223
+ maxDepth: number;
224
+ nodeTypes?: string[];
225
+ }
226
+ declare const MaxNesting: Extension<MaxNestingOptions, any>;
227
+ //#endregion
228
+ //#region src/extensions/body.d.ts
229
+ interface BodyOptions {
230
+ HTMLAttributes: Record<string, unknown>;
231
+ }
232
+ declare const Body: EmailNode<BodyOptions, Record<string, never>>;
233
+ //#endregion
234
+ //#region src/extensions/columns.d.ts
235
+ declare module '@tiptap/core' {
236
+ interface Commands<ReturnType> {
237
+ columns: {
238
+ insertColumns: (count: 2 | 3 | 4) => ReturnType;
239
+ };
240
+ }
241
+ }
242
+ declare const COLUMN_PARENT_TYPES: readonly ["twoColumns", "threeColumns", "fourColumns"];
243
+ declare const MAX_COLUMNS_DEPTH = 3;
244
+ declare function getColumnsDepth(doc: Node$1, from: number): number;
245
+ declare const TwoColumns: EmailNode<Record<string, never>, Record<string, never>>;
246
+ declare const ThreeColumns: EmailNode<Record<string, never>, Record<string, never>>;
247
+ declare const FourColumns: EmailNode<Record<string, never>, Record<string, never>>;
248
+ declare const ColumnsColumn: EmailNode<Record<string, never>, Record<string, never>>;
68
249
  //#endregion
69
250
  //#region src/extensions/div.d.ts
70
251
  interface DivOptions {
@@ -72,6 +253,24 @@ interface DivOptions {
72
253
  }
73
254
  declare const Div: EmailNode<DivOptions, Record<string, never>>;
74
255
  //#endregion
256
+ //#region src/extensions/placeholder.d.ts
257
+ interface PlaceholderOptions {
258
+ placeholder?: string | ((props: {
259
+ node: Node$1;
260
+ }) => string);
261
+ includeChildren?: boolean;
262
+ }
263
+ declare const Placeholder: _tiptap_core9.Extension<_tiptap_extension_placeholder0.PlaceholderOptions, any>;
264
+ //#endregion
265
+ //#region src/extensions/preserved-style.d.ts
266
+ declare const PreservedStyle: Mark<any, any>;
267
+ /**
268
+ * Processes styles when unlinking:
269
+ * - Has background (button-like): preserve all styles
270
+ * - No background: strip link-indicator styles (color, text-decoration), keep the rest
271
+ */
272
+ declare function processStylesForUnlink(styleString: string | null | undefined): string | null;
273
+ //#endregion
75
274
  //#region src/extensions/section.d.ts
76
275
  interface SectionOptions {
77
276
  HTMLAttributes: Record<string, unknown>;
@@ -86,5 +285,471 @@ declare module '@tiptap/core' {
86
285
  }
87
286
  declare const Section: EmailNode<SectionOptions, Record<string, never>>;
88
287
  //#endregion
89
- export { Body, BodyOptions, Button, CodeBlockPrism, CodeBlockPrismOptions, Div, DivOptions, EmailNode, EmailNodeConfig, RendererComponent, Section };
288
+ //#region src/extensions/sup.d.ts
289
+ interface SupOptions {
290
+ /**
291
+ * HTML attributes to add to the sup element.
292
+ * @default {}
293
+ * @example { class: 'foo' }
294
+ */
295
+ HTMLAttributes: Record<string, unknown>;
296
+ }
297
+ declare module '@tiptap/core' {
298
+ interface Commands<ReturnType> {
299
+ sup: {
300
+ /**
301
+ * Set a superscript mark
302
+ */
303
+ setSup: () => ReturnType;
304
+ /**
305
+ * Toggle a superscript mark
306
+ */
307
+ toggleSup: () => ReturnType;
308
+ /**
309
+ * Unset a superscript mark
310
+ */
311
+ unsetSup: () => ReturnType;
312
+ };
313
+ }
314
+ }
315
+ /**
316
+ * This extension allows you to mark text as superscript.
317
+ * @see https://tiptap.dev/api/marks/superscript
318
+ */
319
+ declare const Sup: Mark<SupOptions, any>;
320
+ //#endregion
321
+ //#region src/extensions/uppercase.d.ts
322
+ interface UppercaseOptions {
323
+ HTMLAttributes: Record<string, unknown>;
324
+ }
325
+ declare module '@tiptap/core' {
326
+ interface Commands<ReturnType> {
327
+ uppercase: {
328
+ setUppercase: () => ReturnType;
329
+ toggleUppercase: () => ReturnType;
330
+ unsetUppercase: () => ReturnType;
331
+ };
332
+ }
333
+ }
334
+ declare const Uppercase: Mark<UppercaseOptions, any>;
335
+ //#endregion
336
+ //#region src/extensions/index.d.ts
337
+ declare const coreExtensions: (_tiptap_core9.Extension<_tiptap_starter_kit0.StarterKitOptions, any> | _tiptap_core9.Node<any, any> | EmailNode<CodeBlockPrismOptions, any> | _tiptap_core9.Extension<_tiptap_extension_placeholder0.PlaceholderOptions, any> | _tiptap_core9.Node<PreviewTextOptions, any> | _tiptap_core9.Mark<BoldOptions, any> | _tiptap_core9.Mark<any, any> | EmailNode<TableOptions, Record<string, never>> | EmailNode<TableRowOptions, Record<string, never>> | EmailNode<EditorButtonOptions, Record<string, never>> | _tiptap_core9.Extension<AlignmentOptions, any> | _tiptap_core9.Extension<StyleAttributeOptions, any> | _tiptap_core9.Extension<ClassAttributeOptions, any> | _tiptap_core9.Extension<MaxNestingOptions, any>)[];
338
+ //#endregion
339
+ //#region src/ui/bubble-menu/create-mark-bubble-item.d.ts
340
+ interface PreWiredItemProps {
341
+ className?: string;
342
+ /** Override the default icon */
343
+ children?: React$1.ReactNode;
344
+ }
345
+ //#endregion
346
+ //#region src/ui/bubble-menu/align-center.d.ts
347
+ declare function BubbleMenuAlignCenter({
348
+ className,
349
+ children
350
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
351
+ //#endregion
352
+ //#region src/ui/bubble-menu/align-left.d.ts
353
+ declare function BubbleMenuAlignLeft({
354
+ className,
355
+ children
356
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
357
+ //#endregion
358
+ //#region src/ui/bubble-menu/align-right.d.ts
359
+ declare function BubbleMenuAlignRight({
360
+ className,
361
+ children
362
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
363
+ //#endregion
364
+ //#region src/ui/bubble-menu/default.d.ts
365
+ type ExcludableItem = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'uppercase' | 'align-left' | 'align-center' | 'align-right' | 'node-selector' | 'link-selector';
366
+ interface BubbleMenuDefaultProps {
367
+ /** Items to exclude from the default layout */
368
+ excludeItems?: ExcludableItem[];
369
+ /** Node types that should NOT trigger the bubble menu (forwarded to Root) */
370
+ excludeNodes?: string[];
371
+ /** Placement relative to selection (forwarded to Root, default: 'bottom') */
372
+ placement?: 'top' | 'bottom';
373
+ /** Offset from selection in px (forwarded to Root, default: 8) */
374
+ offset?: number;
375
+ /** Called when the bubble menu hides (forwarded to Root) */
376
+ onHide?: () => void;
377
+ /** className applied to the Root wrapper */
378
+ className?: string;
379
+ }
380
+ declare function BubbleMenuDefault({
381
+ excludeItems,
382
+ excludeNodes,
383
+ placement,
384
+ offset,
385
+ onHide,
386
+ className
387
+ }: BubbleMenuDefaultProps): react_jsx_runtime11.JSX.Element;
388
+ //#endregion
389
+ //#region src/ui/bubble-menu/group.d.ts
390
+ interface BubbleMenuItemGroupProps {
391
+ className?: string;
392
+ children: React$1.ReactNode;
393
+ }
394
+ declare function BubbleMenuItemGroup({
395
+ className,
396
+ children
397
+ }: BubbleMenuItemGroupProps): react_jsx_runtime11.JSX.Element;
398
+ //#endregion
399
+ //#region src/ui/bubble-menu/item.d.ts
400
+ interface BubbleMenuItemProps extends React$1.ComponentProps<'button'> {
401
+ /** Used for aria-label and data-item attribute */
402
+ name: string;
403
+ /** Whether this item is currently active */
404
+ isActive: boolean;
405
+ /** Called when clicked */
406
+ onCommand: () => void;
407
+ }
408
+ declare function BubbleMenuItem({
409
+ name,
410
+ isActive,
411
+ onCommand,
412
+ className,
413
+ children,
414
+ ...rest
415
+ }: BubbleMenuItemProps): react_jsx_runtime11.JSX.Element;
416
+ //#endregion
417
+ //#region src/ui/bubble-menu/link-selector.d.ts
418
+ interface BubbleMenuLinkSelectorProps {
419
+ className?: string;
420
+ /** Whether to show the link icon toggle button (default: true) */
421
+ showToggle?: boolean;
422
+ /** Custom URL validator. Return the valid URL string or null. */
423
+ validateUrl?: (value: string) => string | null;
424
+ /** Called after link is applied */
425
+ onLinkApply?: (href: string) => void;
426
+ /** Called after link is removed */
427
+ onLinkRemove?: () => void;
428
+ /** Plugin slot: extra actions rendered inside the link input form */
429
+ children?: React$1.ReactNode;
430
+ /** Controlled open state */
431
+ open?: boolean;
432
+ /** Called when open state changes */
433
+ onOpenChange?: (open: boolean) => void;
434
+ }
435
+ declare function BubbleMenuLinkSelector({
436
+ className,
437
+ showToggle,
438
+ validateUrl,
439
+ onLinkApply,
440
+ onLinkRemove,
441
+ children,
442
+ open: controlledOpen,
443
+ onOpenChange
444
+ }: BubbleMenuLinkSelectorProps): react_jsx_runtime11.JSX.Element | null;
445
+ //#endregion
446
+ //#region src/ui/bubble-menu/node-selector.d.ts
447
+ type NodeType = 'Text' | 'Title' | 'Subtitle' | 'Heading' | 'Bullet List' | 'Numbered List' | 'Quote' | 'Code';
448
+ interface NodeSelectorItem {
449
+ name: NodeType;
450
+ icon: React$1.ComponentType<React$1.SVGAttributes<SVGSVGElement>>;
451
+ command: () => void;
452
+ isActive: boolean;
453
+ }
454
+ interface NodeSelectorRootProps {
455
+ /** Block types to exclude */
456
+ omit?: string[];
457
+ /** Controlled open state */
458
+ open?: boolean;
459
+ /** Called when open state changes */
460
+ onOpenChange?: (open: boolean) => void;
461
+ className?: string;
462
+ children: React$1.ReactNode;
463
+ }
464
+ declare function NodeSelectorRoot({
465
+ omit,
466
+ open: controlledOpen,
467
+ onOpenChange,
468
+ className,
469
+ children
470
+ }: NodeSelectorRootProps): react_jsx_runtime11.JSX.Element | null;
471
+ interface NodeSelectorTriggerProps {
472
+ className?: string;
473
+ children?: React$1.ReactNode;
474
+ }
475
+ declare function NodeSelectorTrigger({
476
+ className,
477
+ children
478
+ }: NodeSelectorTriggerProps): react_jsx_runtime11.JSX.Element;
479
+ interface NodeSelectorContentProps {
480
+ className?: string;
481
+ /** Popover alignment (default: "start") */
482
+ align?: 'start' | 'center' | 'end';
483
+ /** Render-prop for full control over item rendering.
484
+ * Receives the filtered items and a `close` function to dismiss the popover. */
485
+ children?: (items: NodeSelectorItem[], close: () => void) => React$1.ReactNode;
486
+ }
487
+ declare function NodeSelectorContent({
488
+ className,
489
+ align,
490
+ children
491
+ }: NodeSelectorContentProps): react_jsx_runtime11.JSX.Element;
492
+ interface BubbleMenuNodeSelectorProps {
493
+ /** Block types to exclude */
494
+ omit?: string[];
495
+ className?: string;
496
+ /** Override the trigger content (default: active item name + chevron icon) */
497
+ triggerContent?: React$1.ReactNode;
498
+ /** Controlled open state */
499
+ open?: boolean;
500
+ /** Called when open state changes */
501
+ onOpenChange?: (open: boolean) => void;
502
+ }
503
+ declare function BubbleMenuNodeSelector({
504
+ omit,
505
+ className,
506
+ triggerContent,
507
+ open,
508
+ onOpenChange
509
+ }: BubbleMenuNodeSelectorProps): react_jsx_runtime11.JSX.Element;
510
+ //#endregion
511
+ //#region src/ui/bubble-menu/root.d.ts
512
+ interface BubbleMenuRootProps {
513
+ /** Node types that should NOT trigger the bubble menu */
514
+ excludeNodes?: string[];
515
+ /** Placement relative to selection */
516
+ placement?: 'top' | 'bottom';
517
+ /** Offset from selection in px */
518
+ offset?: number;
519
+ /** Called when the bubble menu is hidden (e.g., click outside, selection cleared) */
520
+ onHide?: () => void;
521
+ /** Additional className on the outer wrapper */
522
+ className?: string;
523
+ children: React$1.ReactNode;
524
+ }
525
+ declare function BubbleMenuRoot({
526
+ excludeNodes,
527
+ placement,
528
+ offset,
529
+ onHide,
530
+ className,
531
+ children
532
+ }: BubbleMenuRootProps): react_jsx_runtime11.JSX.Element | null;
533
+ //#endregion
534
+ //#region src/ui/bubble-menu/separator.d.ts
535
+ interface BubbleMenuSeparatorProps {
536
+ className?: string;
537
+ }
538
+ declare function BubbleMenuSeparator({
539
+ className
540
+ }: BubbleMenuSeparatorProps): react_jsx_runtime11.JSX.Element;
541
+ //#endregion
542
+ //#region src/ui/bubble-menu/bold.d.ts
543
+ declare const BubbleMenuBold: {
544
+ ({
545
+ className,
546
+ children
547
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
548
+ displayName: string;
549
+ };
550
+ //#endregion
551
+ //#region src/ui/bubble-menu/code.d.ts
552
+ declare const BubbleMenuCode: {
553
+ ({
554
+ className,
555
+ children
556
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
557
+ displayName: string;
558
+ };
559
+ //#endregion
560
+ //#region src/ui/bubble-menu/italic.d.ts
561
+ declare const BubbleMenuItalic: {
562
+ ({
563
+ className,
564
+ children
565
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
566
+ displayName: string;
567
+ };
568
+ //#endregion
569
+ //#region src/ui/bubble-menu/strike.d.ts
570
+ declare const BubbleMenuStrike: {
571
+ ({
572
+ className,
573
+ children
574
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
575
+ displayName: string;
576
+ };
577
+ //#endregion
578
+ //#region src/ui/bubble-menu/underline.d.ts
579
+ declare const BubbleMenuUnderline: {
580
+ ({
581
+ className,
582
+ children
583
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
584
+ displayName: string;
585
+ };
586
+ //#endregion
587
+ //#region src/ui/bubble-menu/uppercase.d.ts
588
+ declare const BubbleMenuUppercase: {
589
+ ({
590
+ className,
591
+ children
592
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
593
+ displayName: string;
594
+ };
595
+ //#endregion
596
+ //#region src/ui/bubble-menu/index.d.ts
597
+ declare const BubbleMenu: {
598
+ readonly Root: typeof BubbleMenuRoot;
599
+ readonly ItemGroup: typeof BubbleMenuItemGroup;
600
+ readonly Separator: typeof BubbleMenuSeparator;
601
+ readonly Item: typeof BubbleMenuItem;
602
+ readonly Bold: {
603
+ ({
604
+ className,
605
+ children
606
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
607
+ displayName: string;
608
+ };
609
+ readonly Italic: {
610
+ ({
611
+ className,
612
+ children
613
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
614
+ displayName: string;
615
+ };
616
+ readonly Underline: {
617
+ ({
618
+ className,
619
+ children
620
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
621
+ displayName: string;
622
+ };
623
+ readonly Strike: {
624
+ ({
625
+ className,
626
+ children
627
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
628
+ displayName: string;
629
+ };
630
+ readonly Code: {
631
+ ({
632
+ className,
633
+ children
634
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
635
+ displayName: string;
636
+ };
637
+ readonly Uppercase: {
638
+ ({
639
+ className,
640
+ children
641
+ }: PreWiredItemProps): react_jsx_runtime11.JSX.Element;
642
+ displayName: string;
643
+ };
644
+ readonly AlignLeft: typeof BubbleMenuAlignLeft;
645
+ readonly AlignCenter: typeof BubbleMenuAlignCenter;
646
+ readonly AlignRight: typeof BubbleMenuAlignRight;
647
+ readonly NodeSelector: typeof BubbleMenuNodeSelector & {
648
+ Root: typeof NodeSelectorRoot;
649
+ Trigger: typeof NodeSelectorTrigger;
650
+ Content: typeof NodeSelectorContent;
651
+ };
652
+ readonly LinkSelector: typeof BubbleMenuLinkSelector;
653
+ readonly Default: typeof BubbleMenuDefault;
654
+ };
655
+ //#endregion
656
+ //#region src/ui/link-bubble-menu/edit-link.d.ts
657
+ interface LinkBubbleMenuEditLinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
658
+ declare function LinkBubbleMenuEditLink({
659
+ className,
660
+ children,
661
+ onClick,
662
+ ...rest
663
+ }: LinkBubbleMenuEditLinkProps): react_jsx_runtime11.JSX.Element;
664
+ //#endregion
665
+ //#region src/ui/link-bubble-menu/form.d.ts
666
+ interface LinkBubbleMenuFormProps {
667
+ className?: string;
668
+ /** Custom URL validator (default: getUrlFromString) */
669
+ validateUrl?: (value: string) => string | null;
670
+ /** Called after link is applied */
671
+ onLinkApply?: (href: string) => void;
672
+ /** Called after link is removed */
673
+ onLinkRemove?: () => void;
674
+ /** Extra content inside the form (e.g. a variables dropdown slot) */
675
+ children?: React$1.ReactNode;
676
+ }
677
+ declare function LinkBubbleMenuForm({
678
+ className,
679
+ validateUrl,
680
+ onLinkApply,
681
+ onLinkRemove,
682
+ children
683
+ }: LinkBubbleMenuFormProps): react_jsx_runtime11.JSX.Element | null;
684
+ //#endregion
685
+ //#region src/ui/link-bubble-menu/open-link.d.ts
686
+ interface LinkBubbleMenuOpenLinkProps extends Omit<React$1.ComponentProps<'a'>, 'href' | 'target' | 'rel'> {}
687
+ declare function LinkBubbleMenuOpenLink({
688
+ className,
689
+ children,
690
+ ...rest
691
+ }: LinkBubbleMenuOpenLinkProps): react_jsx_runtime11.JSX.Element;
692
+ //#endregion
693
+ //#region src/ui/link-bubble-menu/root.d.ts
694
+ interface LinkBubbleMenuRootProps {
695
+ /** Called when the bubble menu hides */
696
+ onHide?: () => void;
697
+ /** Placement relative to cursor (default: 'bottom') */
698
+ placement?: 'top' | 'bottom';
699
+ /** Offset from cursor in px (default: 8) */
700
+ offset?: number;
701
+ /** className on the outer wrapper */
702
+ className?: string;
703
+ children: React$1.ReactNode;
704
+ }
705
+ declare function LinkBubbleMenuRoot({
706
+ onHide,
707
+ placement,
708
+ offset,
709
+ className,
710
+ children
711
+ }: LinkBubbleMenuRootProps): react_jsx_runtime11.JSX.Element | null;
712
+ //#endregion
713
+ //#region src/ui/link-bubble-menu/toolbar.d.ts
714
+ interface LinkBubbleMenuToolbarProps {
715
+ className?: string;
716
+ children: React$1.ReactNode;
717
+ }
718
+ declare function LinkBubbleMenuToolbar({
719
+ className,
720
+ children
721
+ }: LinkBubbleMenuToolbarProps): react_jsx_runtime11.JSX.Element | null;
722
+ //#endregion
723
+ //#region src/ui/link-bubble-menu/unlink.d.ts
724
+ interface LinkBubbleMenuUnlinkProps extends Omit<React$1.ComponentProps<'button'>, 'type'> {}
725
+ declare function LinkBubbleMenuUnlink({
726
+ className,
727
+ children,
728
+ onClick,
729
+ ...rest
730
+ }: LinkBubbleMenuUnlinkProps): react_jsx_runtime11.JSX.Element;
731
+ //#endregion
732
+ //#region src/ui/link-bubble-menu/context.d.ts
733
+ interface LinkBubbleMenuContextValue {
734
+ editor: Editor;
735
+ linkHref: string;
736
+ isEditing: boolean;
737
+ setIsEditing: (value: boolean) => void;
738
+ }
739
+ declare function useLinkBubbleMenuContext(): LinkBubbleMenuContextValue;
740
+ //#endregion
741
+ //#region src/ui/link-bubble-menu/index.d.ts
742
+ declare const LinkBubbleMenu: {
743
+ readonly Root: typeof LinkBubbleMenuRoot;
744
+ readonly Toolbar: typeof LinkBubbleMenuToolbar;
745
+ readonly Form: typeof LinkBubbleMenuForm;
746
+ readonly EditLink: typeof LinkBubbleMenuEditLink;
747
+ readonly Unlink: typeof LinkBubbleMenuUnlink;
748
+ readonly OpenLink: typeof LinkBubbleMenuOpenLink;
749
+ };
750
+ //#endregion
751
+ //#region src/utils/set-text-alignment.d.ts
752
+ declare function setTextAlignment(editor: Editor, alignment: string): void;
753
+ //#endregion
754
+ export { AlignmentAttribute, AlignmentOptions, 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, Button, COLUMN_PARENT_TYPES, ClassAttribute, ClassAttributeOptions, CodeBlockPrism, CodeBlockPrismOptions, ColumnsColumn, Div, DivOptions, EditorButtonOptions, EditorEventHandler, EditorEventMap, EditorEventName, EditorEventSubscription, EmailNode, EmailNodeConfig, FourColumns, LinkBubbleMenu, LinkBubbleMenuEditLink, type LinkBubbleMenuEditLinkProps, LinkBubbleMenuForm, type LinkBubbleMenuFormProps, LinkBubbleMenuOpenLink, type LinkBubbleMenuOpenLinkProps, LinkBubbleMenuRoot, type LinkBubbleMenuRootProps, LinkBubbleMenuToolbar, type LinkBubbleMenuToolbarProps, LinkBubbleMenuUnlink, type LinkBubbleMenuUnlinkProps, MAX_COLUMNS_DEPTH, MaxNesting, MaxNestingOptions, NodeSelectorContent, type NodeSelectorContentProps, type NodeSelectorItem, NodeSelectorRoot, type NodeSelectorRootProps, NodeSelectorTrigger, type NodeSelectorTriggerProps, type NodeType, Placeholder, PlaceholderOptions, type PreWiredItemProps, PreservedStyle, PreviewText, PreviewTextOptions, RendererComponent, Section, StyleAttribute, StyleAttributeOptions, Sup, SupOptions, Table, TableCell, TableCellOptions, TableHeader, TableOptions, TableRow, TableRowOptions, ThreeColumns, TwoColumns, Uppercase, UppercaseOptions, coreExtensions, editorEventBus, getColumnsDepth, processStylesForUnlink, setTextAlignment, useLinkBubbleMenuContext };
90
755
  //# sourceMappingURL=index.d.mts.map