@react-email/editor 0.0.0-experimental.3 → 0.0.0-experimental.31

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 (63) hide show
  1. package/dist/columns-BXN-NNd4.cjs +450 -0
  2. package/dist/columns-Cos2lqfu.mjs +329 -0
  3. package/dist/columns-Cos2lqfu.mjs.map +1 -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-DVox_fis.cjs +2159 -0
  9. package/dist/core-mUMTkab3.mjs +1914 -0
  10. package/dist/core-mUMTkab3.mjs.map +1 -0
  11. package/dist/extensions/index.cjs +48 -0
  12. package/dist/extensions/index.d.cts +395 -0
  13. package/dist/extensions/index.d.cts.map +1 -0
  14. package/dist/extensions/index.d.mts +395 -0
  15. package/dist/extensions/index.d.mts.map +1 -0
  16. package/dist/extensions/index.mjs +5 -0
  17. package/dist/global-content-BRvA4PRG.cjs +89 -0
  18. package/dist/global-content-kdUzYcsA.mjs +78 -0
  19. package/dist/global-content-kdUzYcsA.mjs.map +1 -0
  20. package/dist/index-BrSAA0dn.d.mts +131 -0
  21. package/dist/index-BrSAA0dn.d.mts.map +1 -0
  22. package/dist/index-CVRlPqX_.d.cts +131 -0
  23. package/dist/index-CVRlPqX_.d.cts.map +1 -0
  24. package/dist/plugins/index.cjs +747 -0
  25. package/dist/plugins/index.d.cts +79 -0
  26. package/dist/plugins/index.d.cts.map +1 -0
  27. package/dist/plugins/index.d.mts +79 -0
  28. package/dist/plugins/index.d.mts.map +1 -0
  29. package/dist/plugins/index.mjs +742 -0
  30. package/dist/plugins/index.mjs.map +1 -0
  31. package/dist/set-text-alignment-BO24ieeE.mjs +19 -0
  32. package/dist/set-text-alignment-BO24ieeE.mjs.map +1 -0
  33. package/dist/set-text-alignment-CbECklB4.cjs +24 -0
  34. package/dist/styles-C-cCyJCn.cjs +211 -0
  35. package/dist/styles-DLviD0JK.mjs +194 -0
  36. package/dist/styles-DLviD0JK.mjs.map +1 -0
  37. package/dist/ui/bubble-menu/bubble-menu.css +146 -0
  38. package/dist/ui/button-bubble-menu/button-bubble-menu.css +63 -0
  39. package/dist/ui/image-bubble-menu/image-bubble-menu.css +29 -0
  40. package/dist/ui/index.cjs +2559 -0
  41. package/dist/ui/index.d.cts +1028 -0
  42. package/dist/ui/index.d.cts.map +1 -0
  43. package/dist/ui/index.d.mts +1028 -0
  44. package/dist/ui/index.d.mts.map +1 -0
  45. package/dist/ui/index.mjs +2464 -0
  46. package/dist/ui/index.mjs.map +1 -0
  47. package/dist/ui/link-bubble-menu/link-bubble-menu.css +68 -0
  48. package/dist/ui/slash-command/slash-command.css +44 -0
  49. package/dist/ui/themes/default.css +857 -0
  50. package/dist/utils/index.cjs +3 -0
  51. package/dist/utils/index.d.cts +7 -0
  52. package/dist/utils/index.d.cts.map +1 -0
  53. package/dist/utils/index.d.mts +7 -0
  54. package/dist/utils/index.d.mts.map +1 -0
  55. package/dist/utils/index.mjs +3 -0
  56. package/package.json +95 -23
  57. package/dist/index.d.mts +0 -273
  58. package/dist/index.d.mts.map +0 -1
  59. package/dist/index.d.ts +0 -273
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/index.js +0 -1394
  62. package/dist/index.mjs +0 -1346
  63. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,1028 @@
1
+ import * as react_jsx_runtime46 from "react/jsx-runtime";
2
+ import { Editor, Range } from "@tiptap/core";
3
+ import * as React from "react";
4
+ import { ReactNode } from "react";
5
+
6
+ //#region src/ui/bubble-menu/create-mark-bubble-item.d.ts
7
+ interface PreWiredItemProps {
8
+ className?: string;
9
+ /** Override the default icon */
10
+ children?: React.ReactNode;
11
+ }
12
+ //#endregion
13
+ //#region src/ui/bubble-menu/align-center.d.ts
14
+ declare function BubbleMenuAlignCenter({
15
+ className,
16
+ children
17
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
18
+ //#endregion
19
+ //#region src/ui/bubble-menu/align-left.d.ts
20
+ declare function BubbleMenuAlignLeft({
21
+ className,
22
+ children
23
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
24
+ //#endregion
25
+ //#region src/ui/bubble-menu/align-right.d.ts
26
+ declare function BubbleMenuAlignRight({
27
+ className,
28
+ children
29
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
30
+ //#endregion
31
+ //#region src/ui/bubble-menu/default.d.ts
32
+ type ExcludableItem$2 = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'uppercase' | 'align-left' | 'align-center' | 'align-right' | 'node-selector' | 'link-selector';
33
+ interface BubbleMenuDefaultProps {
34
+ /** Items to exclude from the default layout */
35
+ excludeItems?: ExcludableItem$2[];
36
+ /** Node types that should NOT trigger the bubble menu (forwarded to Root) */
37
+ excludeNodes?: string[];
38
+ /** Mark types that should NOT trigger the bubble menu (forwarded to Root) */
39
+ excludeMarks?: string[];
40
+ /** Placement relative to selection (forwarded to Root, default: 'bottom') */
41
+ placement?: 'top' | 'bottom';
42
+ /** Offset from selection in px (forwarded to Root, default: 8) */
43
+ offset?: number;
44
+ /** Called when the bubble menu hides (forwarded to Root) */
45
+ onHide?: () => void;
46
+ /** className applied to the Root wrapper */
47
+ className?: string;
48
+ }
49
+ declare function BubbleMenuDefault({
50
+ excludeItems,
51
+ excludeNodes,
52
+ excludeMarks,
53
+ placement,
54
+ offset,
55
+ onHide,
56
+ className
57
+ }: BubbleMenuDefaultProps): react_jsx_runtime46.JSX.Element;
58
+ //#endregion
59
+ //#region src/ui/bubble-menu/group.d.ts
60
+ interface BubbleMenuItemGroupProps {
61
+ className?: string;
62
+ children: React.ReactNode;
63
+ }
64
+ declare function BubbleMenuItemGroup({
65
+ className,
66
+ children
67
+ }: BubbleMenuItemGroupProps): react_jsx_runtime46.JSX.Element;
68
+ //#endregion
69
+ //#region src/ui/bubble-menu/item.d.ts
70
+ interface BubbleMenuItemProps extends React.ComponentProps<'button'> {
71
+ /** Used for aria-label and data-item attribute */
72
+ name: string;
73
+ /** Whether this item is currently active */
74
+ isActive: boolean;
75
+ /** Called when clicked */
76
+ onCommand: () => void;
77
+ }
78
+ declare function BubbleMenuItem({
79
+ name,
80
+ isActive,
81
+ onCommand,
82
+ className,
83
+ children,
84
+ ...rest
85
+ }: BubbleMenuItemProps): react_jsx_runtime46.JSX.Element;
86
+ //#endregion
87
+ //#region src/ui/bubble-menu/link-selector.d.ts
88
+ interface BubbleMenuLinkSelectorProps {
89
+ className?: string;
90
+ /** Whether to show the link icon toggle button (default: true) */
91
+ showToggle?: boolean;
92
+ /** Custom URL validator. Return the valid URL string or null. */
93
+ validateUrl?: (value: string) => string | null;
94
+ /** Called after link is applied */
95
+ onLinkApply?: (href: string) => void;
96
+ /** Called after link is removed */
97
+ onLinkRemove?: () => void;
98
+ /** Plugin slot: extra actions rendered inside the link input form */
99
+ children?: React.ReactNode;
100
+ /** Controlled open state */
101
+ open?: boolean;
102
+ /** Called when open state changes */
103
+ onOpenChange?: (open: boolean) => void;
104
+ }
105
+ declare function BubbleMenuLinkSelector({
106
+ className,
107
+ showToggle,
108
+ validateUrl,
109
+ onLinkApply,
110
+ onLinkRemove,
111
+ children,
112
+ open: controlledOpen,
113
+ onOpenChange
114
+ }: BubbleMenuLinkSelectorProps): react_jsx_runtime46.JSX.Element | null;
115
+ //#endregion
116
+ //#region src/ui/bubble-menu/node-selector.d.ts
117
+ type NodeType = 'Text' | 'Title' | 'Subtitle' | 'Heading' | 'Bullet List' | 'Numbered List' | 'Quote' | 'Code';
118
+ interface NodeSelectorItem {
119
+ name: NodeType;
120
+ icon: React.ComponentType<React.SVGAttributes<SVGSVGElement>>;
121
+ command: () => void;
122
+ isActive: boolean;
123
+ }
124
+ interface NodeSelectorRootProps {
125
+ /** Block types to exclude */
126
+ omit?: string[];
127
+ /** Controlled open state */
128
+ open?: boolean;
129
+ /** Called when open state changes */
130
+ onOpenChange?: (open: boolean) => void;
131
+ className?: string;
132
+ children: React.ReactNode;
133
+ }
134
+ declare function NodeSelectorRoot({
135
+ omit,
136
+ open: controlledOpen,
137
+ onOpenChange,
138
+ className,
139
+ children
140
+ }: NodeSelectorRootProps): react_jsx_runtime46.JSX.Element | null;
141
+ interface NodeSelectorTriggerProps {
142
+ className?: string;
143
+ children?: React.ReactNode;
144
+ }
145
+ declare function NodeSelectorTrigger({
146
+ className,
147
+ children
148
+ }: NodeSelectorTriggerProps): react_jsx_runtime46.JSX.Element;
149
+ interface NodeSelectorContentProps {
150
+ className?: string;
151
+ /** Popover alignment (default: "start") */
152
+ align?: 'start' | 'center' | 'end';
153
+ /** Render-prop for full control over item rendering.
154
+ * Receives the filtered items and a `close` function to dismiss the popover. */
155
+ children?: (items: NodeSelectorItem[], close: () => void) => React.ReactNode;
156
+ }
157
+ declare function NodeSelectorContent({
158
+ className,
159
+ align,
160
+ children
161
+ }: NodeSelectorContentProps): react_jsx_runtime46.JSX.Element;
162
+ interface BubbleMenuNodeSelectorProps {
163
+ /** Block types to exclude */
164
+ omit?: string[];
165
+ className?: string;
166
+ /** Override the trigger content (default: active item name + chevron icon) */
167
+ triggerContent?: React.ReactNode;
168
+ /** Controlled open state */
169
+ open?: boolean;
170
+ /** Called when open state changes */
171
+ onOpenChange?: (open: boolean) => void;
172
+ }
173
+ declare function BubbleMenuNodeSelector({
174
+ omit,
175
+ className,
176
+ triggerContent,
177
+ open,
178
+ onOpenChange
179
+ }: BubbleMenuNodeSelectorProps): react_jsx_runtime46.JSX.Element;
180
+ //#endregion
181
+ //#region src/ui/bubble-menu/root.d.ts
182
+ interface BubbleMenuRootProps {
183
+ /** Node types that should NOT trigger the bubble menu */
184
+ excludeNodes?: string[];
185
+ /** Mark types that should NOT trigger the bubble menu */
186
+ excludeMarks?: string[];
187
+ /** Placement relative to selection */
188
+ placement?: 'top' | 'bottom';
189
+ /** Offset from selection in px */
190
+ offset?: number;
191
+ /** Called when the bubble menu is hidden (e.g., click outside, selection cleared) */
192
+ onHide?: () => void;
193
+ /** Additional className on the outer wrapper */
194
+ className?: string;
195
+ children: React.ReactNode;
196
+ }
197
+ declare function BubbleMenuRoot({
198
+ excludeNodes,
199
+ excludeMarks,
200
+ placement,
201
+ offset,
202
+ onHide,
203
+ className,
204
+ children
205
+ }: BubbleMenuRootProps): react_jsx_runtime46.JSX.Element | null;
206
+ //#endregion
207
+ //#region src/ui/bubble-menu/separator.d.ts
208
+ interface BubbleMenuSeparatorProps {
209
+ className?: string;
210
+ }
211
+ declare function BubbleMenuSeparator({
212
+ className
213
+ }: BubbleMenuSeparatorProps): react_jsx_runtime46.JSX.Element;
214
+ //#endregion
215
+ //#region src/ui/bubble-menu/bold.d.ts
216
+ declare const BubbleMenuBold: {
217
+ ({
218
+ className,
219
+ children
220
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
221
+ displayName: string;
222
+ };
223
+ //#endregion
224
+ //#region src/ui/bubble-menu/code.d.ts
225
+ declare const BubbleMenuCode: {
226
+ ({
227
+ className,
228
+ children
229
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
230
+ displayName: string;
231
+ };
232
+ //#endregion
233
+ //#region src/ui/bubble-menu/italic.d.ts
234
+ declare const BubbleMenuItalic: {
235
+ ({
236
+ className,
237
+ children
238
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
239
+ displayName: string;
240
+ };
241
+ //#endregion
242
+ //#region src/ui/bubble-menu/strike.d.ts
243
+ declare const BubbleMenuStrike: {
244
+ ({
245
+ className,
246
+ children
247
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
248
+ displayName: string;
249
+ };
250
+ //#endregion
251
+ //#region src/ui/bubble-menu/underline.d.ts
252
+ declare const BubbleMenuUnderline: {
253
+ ({
254
+ className,
255
+ children
256
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
257
+ displayName: string;
258
+ };
259
+ //#endregion
260
+ //#region src/ui/bubble-menu/uppercase.d.ts
261
+ declare const BubbleMenuUppercase: {
262
+ ({
263
+ className,
264
+ children
265
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
266
+ displayName: string;
267
+ };
268
+ //#endregion
269
+ //#region src/ui/bubble-menu/index.d.ts
270
+ declare const BubbleMenu: {
271
+ readonly Root: typeof BubbleMenuRoot;
272
+ readonly ItemGroup: typeof BubbleMenuItemGroup;
273
+ readonly Separator: typeof BubbleMenuSeparator;
274
+ readonly Item: typeof BubbleMenuItem;
275
+ readonly Bold: {
276
+ ({
277
+ className,
278
+ children
279
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
280
+ displayName: string;
281
+ };
282
+ readonly Italic: {
283
+ ({
284
+ className,
285
+ children
286
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
287
+ displayName: string;
288
+ };
289
+ readonly Underline: {
290
+ ({
291
+ className,
292
+ children
293
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
294
+ displayName: string;
295
+ };
296
+ readonly Strike: {
297
+ ({
298
+ className,
299
+ children
300
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
301
+ displayName: string;
302
+ };
303
+ readonly Code: {
304
+ ({
305
+ className,
306
+ children
307
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
308
+ displayName: string;
309
+ };
310
+ readonly Uppercase: {
311
+ ({
312
+ className,
313
+ children
314
+ }: PreWiredItemProps): react_jsx_runtime46.JSX.Element;
315
+ displayName: string;
316
+ };
317
+ readonly AlignLeft: typeof BubbleMenuAlignLeft;
318
+ readonly AlignCenter: typeof BubbleMenuAlignCenter;
319
+ readonly AlignRight: typeof BubbleMenuAlignRight;
320
+ readonly NodeSelector: typeof BubbleMenuNodeSelector & {
321
+ Root: typeof NodeSelectorRoot;
322
+ Trigger: typeof NodeSelectorTrigger;
323
+ Content: typeof NodeSelectorContent;
324
+ };
325
+ readonly LinkSelector: typeof BubbleMenuLinkSelector;
326
+ readonly Default: typeof BubbleMenuDefault;
327
+ };
328
+ //#endregion
329
+ //#region src/ui/button-bubble-menu/default.d.ts
330
+ interface ButtonBubbleMenuDefaultProps {
331
+ placement?: 'top' | 'bottom';
332
+ offset?: number;
333
+ onHide?: () => void;
334
+ className?: string;
335
+ validateUrl?: (value: string) => string | null;
336
+ onLinkApply?: (href: string) => void;
337
+ onLinkRemove?: () => void;
338
+ }
339
+ declare function ButtonBubbleMenuDefault({
340
+ placement,
341
+ offset,
342
+ onHide,
343
+ className,
344
+ validateUrl,
345
+ onLinkApply,
346
+ onLinkRemove
347
+ }: ButtonBubbleMenuDefaultProps): react_jsx_runtime46.JSX.Element;
348
+ //#endregion
349
+ //#region src/ui/button-bubble-menu/edit-link.d.ts
350
+ interface ButtonBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
351
+ declare function ButtonBubbleMenuEditLink({
352
+ className,
353
+ children,
354
+ onClick,
355
+ onMouseDown,
356
+ ...rest
357
+ }: ButtonBubbleMenuEditLinkProps): react_jsx_runtime46.JSX.Element;
358
+ //#endregion
359
+ //#region src/ui/button-bubble-menu/form.d.ts
360
+ interface ButtonBubbleMenuFormProps {
361
+ className?: string;
362
+ validateUrl?: (value: string) => string | null;
363
+ onLinkApply?: (href: string) => void;
364
+ onLinkRemove?: () => void;
365
+ }
366
+ declare function ButtonBubbleMenuForm({
367
+ className,
368
+ validateUrl,
369
+ onLinkApply,
370
+ onLinkRemove
371
+ }: ButtonBubbleMenuFormProps): react_jsx_runtime46.JSX.Element | null;
372
+ //#endregion
373
+ //#region src/ui/button-bubble-menu/root.d.ts
374
+ interface ButtonBubbleMenuRootProps {
375
+ /** Called when the bubble menu hides */
376
+ onHide?: () => void;
377
+ /** Placement relative to cursor (default: 'top') */
378
+ placement?: 'top' | 'bottom';
379
+ /** Offset from cursor in px (default: 8) */
380
+ offset?: number;
381
+ /** className on the outer wrapper */
382
+ className?: string;
383
+ children: React.ReactNode;
384
+ }
385
+ declare function ButtonBubbleMenuRoot({
386
+ onHide,
387
+ placement,
388
+ offset,
389
+ className,
390
+ children
391
+ }: ButtonBubbleMenuRootProps): react_jsx_runtime46.JSX.Element | null;
392
+ //#endregion
393
+ //#region src/ui/button-bubble-menu/toolbar.d.ts
394
+ interface ButtonBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
395
+ declare function ButtonBubbleMenuToolbar({
396
+ children,
397
+ ...rest
398
+ }: ButtonBubbleMenuToolbarProps): react_jsx_runtime46.JSX.Element | null;
399
+ //#endregion
400
+ //#region src/ui/button-bubble-menu/unlink.d.ts
401
+ interface ButtonBubbleMenuUnlinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {
402
+ onLinkRemove?: () => void;
403
+ }
404
+ declare function ButtonBubbleMenuUnlink({
405
+ className,
406
+ children,
407
+ onClick,
408
+ onMouseDown,
409
+ onLinkRemove,
410
+ ...rest
411
+ }: ButtonBubbleMenuUnlinkProps): react_jsx_runtime46.JSX.Element;
412
+ //#endregion
413
+ //#region src/ui/button-bubble-menu/context.d.ts
414
+ interface ButtonBubbleMenuContextValue {
415
+ editor: Editor;
416
+ buttonHref: string;
417
+ isEditing: boolean;
418
+ setIsEditing: (value: boolean) => void;
419
+ }
420
+ declare function useButtonBubbleMenuContext(): ButtonBubbleMenuContextValue;
421
+ //#endregion
422
+ //#region src/ui/button-bubble-menu/index.d.ts
423
+ declare const ButtonBubbleMenu: {
424
+ readonly Root: typeof ButtonBubbleMenuRoot;
425
+ readonly Toolbar: typeof ButtonBubbleMenuToolbar;
426
+ readonly EditLink: typeof ButtonBubbleMenuEditLink;
427
+ readonly Unlink: typeof ButtonBubbleMenuUnlink;
428
+ readonly Form: typeof ButtonBubbleMenuForm;
429
+ readonly Default: typeof ButtonBubbleMenuDefault;
430
+ };
431
+ //#endregion
432
+ //#region src/ui/icons/align-center.d.ts
433
+ interface IconProps$28 extends React.SVGAttributes<SVGSVGElement> {
434
+ size?: number | string;
435
+ }
436
+ declare function AlignCenterIcon({
437
+ size,
438
+ width,
439
+ height,
440
+ ...props
441
+ }: IconProps$28): react_jsx_runtime46.JSX.Element;
442
+ //#endregion
443
+ //#region src/ui/icons/align-left.d.ts
444
+ interface IconProps$27 extends React.SVGAttributes<SVGSVGElement> {
445
+ size?: number | string;
446
+ }
447
+ declare function AlignLeftIcon({
448
+ size,
449
+ width,
450
+ height,
451
+ ...props
452
+ }: IconProps$27): react_jsx_runtime46.JSX.Element;
453
+ //#endregion
454
+ //#region src/ui/icons/align-right.d.ts
455
+ interface IconProps$26 extends React.SVGAttributes<SVGSVGElement> {
456
+ size?: number | string;
457
+ }
458
+ declare function AlignRightIcon({
459
+ size,
460
+ width,
461
+ height,
462
+ ...props
463
+ }: IconProps$26): react_jsx_runtime46.JSX.Element;
464
+ //#endregion
465
+ //#region src/ui/icons/bold.d.ts
466
+ interface IconProps$25 extends React.SVGAttributes<SVGSVGElement> {
467
+ size?: number | string;
468
+ }
469
+ declare function BoldIcon({
470
+ size,
471
+ width,
472
+ height,
473
+ ...props
474
+ }: IconProps$25): react_jsx_runtime46.JSX.Element;
475
+ //#endregion
476
+ //#region src/ui/icons/case-upper.d.ts
477
+ interface IconProps$24 extends React.SVGAttributes<SVGSVGElement> {
478
+ size?: number | string;
479
+ }
480
+ declare function CaseUpperIcon({
481
+ size,
482
+ width,
483
+ height,
484
+ ...props
485
+ }: IconProps$24): react_jsx_runtime46.JSX.Element;
486
+ //#endregion
487
+ //#region src/ui/icons/check.d.ts
488
+ interface IconProps$23 extends React.SVGAttributes<SVGSVGElement> {
489
+ size?: number | string;
490
+ }
491
+ declare function Check({
492
+ size,
493
+ width,
494
+ height,
495
+ ...props
496
+ }: IconProps$23): react_jsx_runtime46.JSX.Element;
497
+ //#endregion
498
+ //#region src/ui/icons/chevron-down.d.ts
499
+ interface IconProps$22 extends React.SVGAttributes<SVGSVGElement> {
500
+ size?: number | string;
501
+ }
502
+ declare function ChevronDown({
503
+ size,
504
+ width,
505
+ height,
506
+ ...props
507
+ }: IconProps$22): react_jsx_runtime46.JSX.Element;
508
+ //#endregion
509
+ //#region src/ui/icons/code.d.ts
510
+ interface IconProps$21 extends React.SVGAttributes<SVGSVGElement> {
511
+ size?: number | string;
512
+ }
513
+ declare function CodeIcon({
514
+ size,
515
+ width,
516
+ height,
517
+ ...props
518
+ }: IconProps$21): react_jsx_runtime46.JSX.Element;
519
+ declare const Code: typeof CodeIcon;
520
+ //#endregion
521
+ //#region src/ui/icons/columns-2.d.ts
522
+ interface IconProps$20 extends React.SVGAttributes<SVGSVGElement> {
523
+ size?: number | string;
524
+ }
525
+ declare function Columns2({
526
+ size,
527
+ width,
528
+ height,
529
+ ...props
530
+ }: IconProps$20): react_jsx_runtime46.JSX.Element;
531
+ //#endregion
532
+ //#region src/ui/icons/columns-3.d.ts
533
+ interface IconProps$19 extends React.SVGAttributes<SVGSVGElement> {
534
+ size?: number | string;
535
+ }
536
+ declare function Columns3({
537
+ size,
538
+ width,
539
+ height,
540
+ ...props
541
+ }: IconProps$19): react_jsx_runtime46.JSX.Element;
542
+ //#endregion
543
+ //#region src/ui/icons/columns-4.d.ts
544
+ interface IconProps$18 extends React.SVGAttributes<SVGSVGElement> {
545
+ size?: number | string;
546
+ }
547
+ declare function Columns4({
548
+ size,
549
+ width,
550
+ height,
551
+ ...props
552
+ }: IconProps$18): react_jsx_runtime46.JSX.Element;
553
+ //#endregion
554
+ //#region src/ui/icons/external-link.d.ts
555
+ interface IconProps$17 extends React.SVGAttributes<SVGSVGElement> {
556
+ size?: number | string;
557
+ }
558
+ declare function ExternalLinkIcon({
559
+ size,
560
+ width,
561
+ height,
562
+ ...props
563
+ }: IconProps$17): react_jsx_runtime46.JSX.Element;
564
+ //#endregion
565
+ //#region src/ui/icons/heading-1.d.ts
566
+ interface IconProps$16 extends React.SVGAttributes<SVGSVGElement> {
567
+ size?: number | string;
568
+ }
569
+ declare function Heading1({
570
+ size,
571
+ width,
572
+ height,
573
+ ...props
574
+ }: IconProps$16): react_jsx_runtime46.JSX.Element;
575
+ //#endregion
576
+ //#region src/ui/icons/heading-2.d.ts
577
+ interface IconProps$15 extends React.SVGAttributes<SVGSVGElement> {
578
+ size?: number | string;
579
+ }
580
+ declare function Heading2({
581
+ size,
582
+ width,
583
+ height,
584
+ ...props
585
+ }: IconProps$15): react_jsx_runtime46.JSX.Element;
586
+ //#endregion
587
+ //#region src/ui/icons/heading-3.d.ts
588
+ interface IconProps$14 extends React.SVGAttributes<SVGSVGElement> {
589
+ size?: number | string;
590
+ }
591
+ declare function Heading3({
592
+ size,
593
+ width,
594
+ height,
595
+ ...props
596
+ }: IconProps$14): react_jsx_runtime46.JSX.Element;
597
+ //#endregion
598
+ //#region src/ui/icons/italic.d.ts
599
+ interface IconProps$13 extends React.SVGAttributes<SVGSVGElement> {
600
+ size?: number | string;
601
+ }
602
+ declare function ItalicIcon({
603
+ size,
604
+ width,
605
+ height,
606
+ ...props
607
+ }: IconProps$13): react_jsx_runtime46.JSX.Element;
608
+ //#endregion
609
+ //#region src/ui/icons/link.d.ts
610
+ interface IconProps$12 extends React.SVGAttributes<SVGSVGElement> {
611
+ size?: number | string;
612
+ }
613
+ declare function LinkIcon({
614
+ size,
615
+ width,
616
+ height,
617
+ ...props
618
+ }: IconProps$12): react_jsx_runtime46.JSX.Element;
619
+ //#endregion
620
+ //#region src/ui/icons/list.d.ts
621
+ interface IconProps$11 extends React.SVGAttributes<SVGSVGElement> {
622
+ size?: number | string;
623
+ }
624
+ declare function List({
625
+ size,
626
+ width,
627
+ height,
628
+ ...props
629
+ }: IconProps$11): react_jsx_runtime46.JSX.Element;
630
+ //#endregion
631
+ //#region src/ui/icons/list-ordered.d.ts
632
+ interface IconProps$10 extends React.SVGAttributes<SVGSVGElement> {
633
+ size?: number | string;
634
+ }
635
+ declare function ListOrdered({
636
+ size,
637
+ width,
638
+ height,
639
+ ...props
640
+ }: IconProps$10): react_jsx_runtime46.JSX.Element;
641
+ //#endregion
642
+ //#region src/ui/icons/mouse-pointer.d.ts
643
+ interface IconProps$9 extends React.SVGAttributes<SVGSVGElement> {
644
+ size?: number | string;
645
+ }
646
+ declare function MousePointer({
647
+ size,
648
+ width,
649
+ height,
650
+ ...props
651
+ }: IconProps$9): react_jsx_runtime46.JSX.Element;
652
+ //#endregion
653
+ //#region src/ui/icons/pencil.d.ts
654
+ interface IconProps$8 extends React.SVGAttributes<SVGSVGElement> {
655
+ size?: number | string;
656
+ }
657
+ declare function PencilIcon({
658
+ size,
659
+ width,
660
+ height,
661
+ ...props
662
+ }: IconProps$8): react_jsx_runtime46.JSX.Element;
663
+ //#endregion
664
+ //#region src/ui/icons/rows-2.d.ts
665
+ interface IconProps$7 extends React.SVGAttributes<SVGSVGElement> {
666
+ size?: number | string;
667
+ }
668
+ declare function Rows2({
669
+ size,
670
+ width,
671
+ height,
672
+ ...props
673
+ }: IconProps$7): react_jsx_runtime46.JSX.Element;
674
+ //#endregion
675
+ //#region src/ui/icons/split-square-vertical.d.ts
676
+ interface IconProps$6 extends React.SVGAttributes<SVGSVGElement> {
677
+ size?: number | string;
678
+ }
679
+ declare function SplitSquareVertical({
680
+ size,
681
+ width,
682
+ height,
683
+ ...props
684
+ }: IconProps$6): react_jsx_runtime46.JSX.Element;
685
+ //#endregion
686
+ //#region src/ui/icons/square-code.d.ts
687
+ interface IconProps$5 extends React.SVGAttributes<SVGSVGElement> {
688
+ size?: number | string;
689
+ }
690
+ declare function SquareCode({
691
+ size,
692
+ width,
693
+ height,
694
+ ...props
695
+ }: IconProps$5): react_jsx_runtime46.JSX.Element;
696
+ //#endregion
697
+ //#region src/ui/icons/strikethrough.d.ts
698
+ interface IconProps$4 extends React.SVGAttributes<SVGSVGElement> {
699
+ size?: number | string;
700
+ }
701
+ declare function StrikethroughIcon({
702
+ size,
703
+ width,
704
+ height,
705
+ ...props
706
+ }: IconProps$4): react_jsx_runtime46.JSX.Element;
707
+ //#endregion
708
+ //#region src/ui/icons/text.d.ts
709
+ interface IconProps$3 extends React.SVGAttributes<SVGSVGElement> {
710
+ size?: number | string;
711
+ }
712
+ declare function TextIcon({
713
+ size,
714
+ width,
715
+ height,
716
+ ...props
717
+ }: IconProps$3): react_jsx_runtime46.JSX.Element;
718
+ declare const Text: typeof TextIcon;
719
+ //#endregion
720
+ //#region src/ui/icons/text-quote.d.ts
721
+ interface IconProps$2 extends React.SVGAttributes<SVGSVGElement> {
722
+ size?: number | string;
723
+ }
724
+ declare function TextQuote({
725
+ size,
726
+ width,
727
+ height,
728
+ ...props
729
+ }: IconProps$2): react_jsx_runtime46.JSX.Element;
730
+ //#endregion
731
+ //#region src/ui/icons/underline.d.ts
732
+ interface IconProps$1 extends React.SVGAttributes<SVGSVGElement> {
733
+ size?: number | string;
734
+ }
735
+ declare function UnderlineIcon({
736
+ size,
737
+ width,
738
+ height,
739
+ ...props
740
+ }: IconProps$1): react_jsx_runtime46.JSX.Element;
741
+ //#endregion
742
+ //#region src/ui/icons/unlink.d.ts
743
+ interface IconProps extends React.SVGAttributes<SVGSVGElement> {
744
+ size?: number | string;
745
+ }
746
+ declare function UnlinkIcon({
747
+ size,
748
+ width,
749
+ height,
750
+ ...props
751
+ }: IconProps): react_jsx_runtime46.JSX.Element;
752
+ //#endregion
753
+ //#region src/ui/image-bubble-menu/default.d.ts
754
+ type ExcludableItem$1 = 'edit-link';
755
+ interface ImageBubbleMenuDefaultProps {
756
+ excludeItems?: ExcludableItem$1[];
757
+ placement?: 'top' | 'bottom';
758
+ offset?: number;
759
+ onHide?: () => void;
760
+ className?: string;
761
+ }
762
+ declare function ImageBubbleMenuDefault({
763
+ excludeItems,
764
+ placement,
765
+ offset,
766
+ onHide,
767
+ className
768
+ }: ImageBubbleMenuDefaultProps): react_jsx_runtime46.JSX.Element;
769
+ //#endregion
770
+ //#region src/ui/image-bubble-menu/edit-link.d.ts
771
+ interface ImageBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
772
+ declare function ImageBubbleMenuEditLink({
773
+ className,
774
+ children,
775
+ onClick,
776
+ onMouseDown,
777
+ ...rest
778
+ }: ImageBubbleMenuEditLinkProps): react_jsx_runtime46.JSX.Element;
779
+ //#endregion
780
+ //#region src/ui/image-bubble-menu/root.d.ts
781
+ interface ImageBubbleMenuRootProps {
782
+ /** Called when the bubble menu hides */
783
+ onHide?: () => void;
784
+ /** Placement relative to cursor (default: 'top') */
785
+ placement?: 'top' | 'bottom';
786
+ /** Offset from cursor in px (default: 8) */
787
+ offset?: number;
788
+ /** className on the outer wrapper */
789
+ className?: string;
790
+ children: React.ReactNode;
791
+ }
792
+ declare function ImageBubbleMenuRoot({
793
+ onHide,
794
+ placement,
795
+ offset,
796
+ className,
797
+ children
798
+ }: ImageBubbleMenuRootProps): react_jsx_runtime46.JSX.Element | null;
799
+ //#endregion
800
+ //#region src/ui/image-bubble-menu/toolbar.d.ts
801
+ interface ImageBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
802
+ declare function ImageBubbleMenuToolbar({
803
+ children,
804
+ ...rest
805
+ }: ImageBubbleMenuToolbarProps): react_jsx_runtime46.JSX.Element | null;
806
+ //#endregion
807
+ //#region src/ui/image-bubble-menu/context.d.ts
808
+ interface ImageBubbleMenuContextValue {
809
+ editor: Editor;
810
+ isEditing: boolean;
811
+ setIsEditing: (value: boolean) => void;
812
+ }
813
+ declare function useImageBubbleMenuContext(): ImageBubbleMenuContextValue;
814
+ //#endregion
815
+ //#region src/ui/image-bubble-menu/index.d.ts
816
+ declare const ImageBubbleMenu: {
817
+ readonly Root: typeof ImageBubbleMenuRoot;
818
+ readonly Toolbar: typeof ImageBubbleMenuToolbar;
819
+ readonly EditLink: typeof ImageBubbleMenuEditLink;
820
+ readonly Default: typeof ImageBubbleMenuDefault;
821
+ };
822
+ //#endregion
823
+ //#region src/ui/link-bubble-menu/default.d.ts
824
+ type ExcludableItem = 'edit-link' | 'open-link' | 'unlink';
825
+ interface LinkBubbleMenuDefaultProps {
826
+ excludeItems?: ExcludableItem[];
827
+ placement?: 'top' | 'bottom';
828
+ offset?: number;
829
+ onHide?: () => void;
830
+ className?: string;
831
+ validateUrl?: (value: string) => string | null;
832
+ onLinkApply?: (href: string) => void;
833
+ onLinkRemove?: () => void;
834
+ }
835
+ declare function LinkBubbleMenuDefault({
836
+ excludeItems,
837
+ placement,
838
+ offset,
839
+ onHide,
840
+ className,
841
+ validateUrl,
842
+ onLinkApply,
843
+ onLinkRemove
844
+ }: LinkBubbleMenuDefaultProps): react_jsx_runtime46.JSX.Element;
845
+ //#endregion
846
+ //#region src/ui/link-bubble-menu/edit-link.d.ts
847
+ interface LinkBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
848
+ declare function LinkBubbleMenuEditLink({
849
+ className,
850
+ children,
851
+ onClick,
852
+ onMouseDown,
853
+ ...rest
854
+ }: LinkBubbleMenuEditLinkProps): react_jsx_runtime46.JSX.Element;
855
+ //#endregion
856
+ //#region src/ui/link-bubble-menu/form.d.ts
857
+ interface LinkBubbleMenuFormProps {
858
+ className?: string;
859
+ /** Custom URL validator (default: getUrlFromString) */
860
+ validateUrl?: (value: string) => string | null;
861
+ /** Called after link is applied */
862
+ onLinkApply?: (href: string) => void;
863
+ /** Called after link is removed */
864
+ onLinkRemove?: () => void;
865
+ /** Extra content inside the form (e.g. a variables dropdown slot) */
866
+ children?: React.ReactNode;
867
+ }
868
+ declare function LinkBubbleMenuForm({
869
+ className,
870
+ validateUrl,
871
+ onLinkApply,
872
+ onLinkRemove,
873
+ children
874
+ }: LinkBubbleMenuFormProps): react_jsx_runtime46.JSX.Element | null;
875
+ //#endregion
876
+ //#region src/ui/link-bubble-menu/open-link.d.ts
877
+ interface LinkBubbleMenuOpenLinkProps extends Omit<React.ComponentProps<'a'>, 'href' | 'target' | 'rel'> {}
878
+ declare function LinkBubbleMenuOpenLink({
879
+ className,
880
+ children,
881
+ ...rest
882
+ }: LinkBubbleMenuOpenLinkProps): react_jsx_runtime46.JSX.Element;
883
+ //#endregion
884
+ //#region src/ui/link-bubble-menu/root.d.ts
885
+ interface LinkBubbleMenuRootProps {
886
+ /** Called when the bubble menu hides */
887
+ onHide?: () => void;
888
+ /** Placement relative to cursor (default: 'top') */
889
+ placement?: 'top' | 'bottom';
890
+ /** Offset from cursor in px (default: 8) */
891
+ offset?: number;
892
+ /** className on the outer wrapper */
893
+ className?: string;
894
+ children: React.ReactNode;
895
+ }
896
+ declare function LinkBubbleMenuRoot({
897
+ onHide,
898
+ placement,
899
+ offset,
900
+ className,
901
+ children
902
+ }: LinkBubbleMenuRootProps): react_jsx_runtime46.JSX.Element | null;
903
+ //#endregion
904
+ //#region src/ui/link-bubble-menu/toolbar.d.ts
905
+ interface LinkBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
906
+ declare function LinkBubbleMenuToolbar({
907
+ children,
908
+ ...rest
909
+ }: LinkBubbleMenuToolbarProps): react_jsx_runtime46.JSX.Element | null;
910
+ //#endregion
911
+ //#region src/ui/link-bubble-menu/unlink.d.ts
912
+ interface LinkBubbleMenuUnlinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
913
+ declare function LinkBubbleMenuUnlink({
914
+ className,
915
+ children,
916
+ onClick,
917
+ onMouseDown,
918
+ ...rest
919
+ }: LinkBubbleMenuUnlinkProps): react_jsx_runtime46.JSX.Element;
920
+ //#endregion
921
+ //#region src/ui/link-bubble-menu/context.d.ts
922
+ interface LinkBubbleMenuContextValue {
923
+ editor: Editor;
924
+ linkHref: string;
925
+ isEditing: boolean;
926
+ setIsEditing: (value: boolean) => void;
927
+ }
928
+ declare function useLinkBubbleMenuContext(): LinkBubbleMenuContextValue;
929
+ //#endregion
930
+ //#region src/ui/link-bubble-menu/index.d.ts
931
+ declare const LinkBubbleMenu: {
932
+ readonly Root: typeof LinkBubbleMenuRoot;
933
+ readonly Toolbar: typeof LinkBubbleMenuToolbar;
934
+ readonly Form: typeof LinkBubbleMenuForm;
935
+ readonly EditLink: typeof LinkBubbleMenuEditLink;
936
+ readonly Unlink: typeof LinkBubbleMenuUnlink;
937
+ readonly OpenLink: typeof LinkBubbleMenuOpenLink;
938
+ readonly Default: typeof LinkBubbleMenuDefault;
939
+ };
940
+ //#endregion
941
+ //#region src/ui/slash-command/types.d.ts
942
+ type SlashCommandCategory = string;
943
+ interface SearchableItem {
944
+ title: string;
945
+ description: string;
946
+ searchTerms?: string[];
947
+ }
948
+ interface SlashCommandItem extends SearchableItem {
949
+ icon: ReactNode;
950
+ category: SlashCommandCategory;
951
+ command: (props: SlashCommandProps) => void;
952
+ }
953
+ interface SlashCommandProps {
954
+ editor: Editor;
955
+ range: Range;
956
+ }
957
+ interface SlashCommandRenderProps {
958
+ items: SlashCommandItem[];
959
+ query: string;
960
+ selectedIndex: number;
961
+ onSelect: (index: number) => void;
962
+ }
963
+ interface SlashCommandRootProps {
964
+ items?: SlashCommandItem[];
965
+ filterItems?: (items: SlashCommandItem[], query: string, editor: Editor) => SlashCommandItem[];
966
+ char?: string;
967
+ allow?: (props: {
968
+ editor: Editor;
969
+ }) => boolean;
970
+ children?: (props: SlashCommandRenderProps) => ReactNode;
971
+ }
972
+ interface CommandListProps {
973
+ items: SlashCommandItem[];
974
+ query: string;
975
+ selectedIndex: number;
976
+ onSelect: (index: number) => void;
977
+ }
978
+ //#endregion
979
+ //#region src/ui/slash-command/command-list.d.ts
980
+ declare function CommandList({
981
+ items,
982
+ query,
983
+ selectedIndex,
984
+ onSelect
985
+ }: CommandListProps): react_jsx_runtime46.JSX.Element;
986
+ //#endregion
987
+ //#region src/ui/slash-command/root.d.ts
988
+ declare function SlashCommandRoot({
989
+ items: itemsProp,
990
+ filterItems: filterItemsProp,
991
+ char,
992
+ allow: allowProp,
993
+ children
994
+ }: SlashCommandRootProps): React.ReactPortal | null;
995
+ //#endregion
996
+ //#region src/ui/slash-command/commands.d.ts
997
+ declare const TEXT: SlashCommandItem;
998
+ declare const H1: SlashCommandItem;
999
+ declare const H2: SlashCommandItem;
1000
+ declare const H3: SlashCommandItem;
1001
+ declare const BULLET_LIST: SlashCommandItem;
1002
+ declare const NUMBERED_LIST: SlashCommandItem;
1003
+ declare const QUOTE: SlashCommandItem;
1004
+ declare const CODE: SlashCommandItem;
1005
+ declare const BUTTON: SlashCommandItem;
1006
+ declare const DIVIDER: SlashCommandItem;
1007
+ declare const SECTION: SlashCommandItem;
1008
+ declare const TWO_COLUMNS: SlashCommandItem;
1009
+ declare const THREE_COLUMNS: SlashCommandItem;
1010
+ declare const FOUR_COLUMNS: SlashCommandItem;
1011
+ declare const defaultSlashCommands: SlashCommandItem[];
1012
+ //#endregion
1013
+ //#region src/ui/slash-command/search.d.ts
1014
+ declare function scoreItem(item: SearchableItem, query: string): number;
1015
+ declare function filterAndRankItems<T extends SearchableItem>(items: T[], query: string): T[];
1016
+ //#endregion
1017
+ //#region src/ui/slash-command/utils.d.ts
1018
+ declare function isInsideNode(editor: Editor, type: string): boolean;
1019
+ declare function isAtMaxColumnsDepth(editor: Editor): boolean;
1020
+ //#endregion
1021
+ //#region src/ui/slash-command/index.d.ts
1022
+ declare const SlashCommand: {
1023
+ readonly Root: typeof SlashCommandRoot;
1024
+ readonly CommandList: typeof CommandList;
1025
+ };
1026
+ //#endregion
1027
+ export { AlignCenterIcon, AlignLeftIcon, AlignRightIcon, BULLET_LIST, BUTTON, BoldIcon, 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, ButtonBubbleMenu, ButtonBubbleMenuDefault, type ButtonBubbleMenuDefaultProps, ButtonBubbleMenuEditLink, type ButtonBubbleMenuEditLinkProps, ButtonBubbleMenuForm, type ButtonBubbleMenuFormProps, ButtonBubbleMenuRoot, type ButtonBubbleMenuRootProps, ButtonBubbleMenuToolbar, type ButtonBubbleMenuToolbarProps, ButtonBubbleMenuUnlink, type ButtonBubbleMenuUnlinkProps, CODE, CaseUpperIcon, Check, ChevronDown, Code, CodeIcon, Columns2, Columns3, Columns4, CommandList, type CommandListProps, DIVIDER, ExternalLinkIcon, FOUR_COLUMNS, H1, H2, H3, Heading1, Heading2, Heading3, ImageBubbleMenu, ImageBubbleMenuDefault, type ImageBubbleMenuDefaultProps, ImageBubbleMenuEditLink, type ImageBubbleMenuEditLinkProps, ImageBubbleMenuRoot, type ImageBubbleMenuRootProps, ImageBubbleMenuToolbar, type ImageBubbleMenuToolbarProps, ItalicIcon, LinkBubbleMenu, LinkBubbleMenuDefault, type LinkBubbleMenuDefaultProps, LinkBubbleMenuEditLink, type LinkBubbleMenuEditLinkProps, LinkBubbleMenuForm, type LinkBubbleMenuFormProps, LinkBubbleMenuOpenLink, type LinkBubbleMenuOpenLinkProps, LinkBubbleMenuRoot, type LinkBubbleMenuRootProps, LinkBubbleMenuToolbar, type LinkBubbleMenuToolbarProps, LinkBubbleMenuUnlink, type LinkBubbleMenuUnlinkProps, LinkIcon, List, ListOrdered, MousePointer, NUMBERED_LIST, NodeSelectorContent, type NodeSelectorContentProps, type NodeSelectorItem, NodeSelectorRoot, type NodeSelectorRootProps, NodeSelectorTrigger, type NodeSelectorTriggerProps, type NodeType, PencilIcon, type PreWiredItemProps, QUOTE, Rows2, SECTION, type SearchableItem, SlashCommand, type SlashCommandItem, type SlashCommandProps, type SlashCommandRenderProps, type SlashCommandRootProps, SplitSquareVertical, SquareCode, StrikethroughIcon, TEXT, THREE_COLUMNS, TWO_COLUMNS, Text, TextIcon, TextQuote, UnderlineIcon, UnlinkIcon, defaultSlashCommands, filterAndRankItems, isAtMaxColumnsDepth, isInsideNode, scoreItem, useButtonBubbleMenuContext, useImageBubbleMenuContext, useLinkBubbleMenuContext };
1028
+ //# sourceMappingURL=index.d.mts.map