@react-email/editor 0.0.0-experimental.26 → 0.0.0-experimental.28
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/{columns-ZSaLdkg9.cjs → columns-BXN-NNd4.cjs} +3 -183
- package/dist/{columns-CUxUEHje.mjs → columns-Cos2lqfu.mjs} +3 -171
- package/dist/columns-Cos2lqfu.mjs.map +1 -0
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +2 -2
- package/dist/{core-DpfUR_iP.cjs → core-BHyps3LA.cjs} +40 -124
- package/dist/{core-C0EkaM-K.mjs → core-BjxjzlNZ.mjs} +20 -92
- package/dist/core-BjxjzlNZ.mjs.map +1 -0
- package/dist/extensions/index.cjs +5 -4
- package/dist/extensions/index.d.cts +1 -1
- package/dist/extensions/index.d.mts +1 -1
- package/dist/extensions/index.mjs +3 -2
- package/dist/global-content-BRvA4PRG.cjs +89 -0
- package/dist/global-content-kdUzYcsA.mjs +78 -0
- package/dist/global-content-kdUzYcsA.mjs.map +1 -0
- package/dist/{index-BPjgJSQh.d.cts → index-jGyVEd5q.d.cts} +1 -1
- package/dist/{index-BPjgJSQh.d.cts.map → index-jGyVEd5q.d.cts.map} +1 -1
- package/dist/{index-4EvOA-Ll.d.mts → index-ozCcANmD.d.mts} +1 -1
- package/dist/{index-4EvOA-Ll.d.mts.map → index-ozCcANmD.d.mts.map} +1 -1
- package/dist/plugins/index.cjs +747 -0
- package/dist/plugins/index.d.cts +79 -0
- package/dist/plugins/index.d.cts.map +1 -0
- package/dist/plugins/index.d.mts +79 -0
- package/dist/plugins/index.d.mts.map +1 -0
- package/dist/plugins/index.mjs +742 -0
- package/dist/plugins/index.mjs.map +1 -0
- package/dist/{set-text-alignment-DZvgnbvz.mjs → set-text-alignment-BO24ieeE.mjs} +1 -1
- package/dist/{set-text-alignment-DZvgnbvz.mjs.map → set-text-alignment-BO24ieeE.mjs.map} +1 -1
- package/dist/styles-C-cCyJCn.cjs +211 -0
- package/dist/styles-DLviD0JK.mjs +194 -0
- package/dist/styles-DLviD0JK.mjs.map +1 -0
- package/dist/ui/index.cjs +2 -2
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.mts +42 -42
- package/dist/ui/index.mjs +2 -2
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +13 -3
- package/dist/columns-CUxUEHje.mjs.map +0 -1
- package/dist/core-C0EkaM-K.mjs.map +0 -1
- /package/dist/{set-text-alignment-Bx3bPteH.cjs → set-text-alignment-CbECklB4.cjs} +0 -0
package/dist/ui/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
2
|
import { Editor, Range } from "@tiptap/core";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ReactNode } from "react";
|
|
@@ -14,19 +14,19 @@ interface PreWiredItemProps {
|
|
|
14
14
|
declare function BubbleMenuAlignCenter({
|
|
15
15
|
className,
|
|
16
16
|
children
|
|
17
|
-
}: PreWiredItemProps):
|
|
17
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/ui/bubble-menu/align-left.d.ts
|
|
20
20
|
declare function BubbleMenuAlignLeft({
|
|
21
21
|
className,
|
|
22
22
|
children
|
|
23
|
-
}: PreWiredItemProps):
|
|
23
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/ui/bubble-menu/align-right.d.ts
|
|
26
26
|
declare function BubbleMenuAlignRight({
|
|
27
27
|
className,
|
|
28
28
|
children
|
|
29
|
-
}: PreWiredItemProps):
|
|
29
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/ui/bubble-menu/default.d.ts
|
|
32
32
|
type ExcludableItem$3 = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'uppercase' | 'align-left' | 'align-center' | 'align-right' | 'node-selector' | 'link-selector';
|
|
@@ -51,7 +51,7 @@ declare function BubbleMenuDefault({
|
|
|
51
51
|
offset,
|
|
52
52
|
onHide,
|
|
53
53
|
className
|
|
54
|
-
}: BubbleMenuDefaultProps):
|
|
54
|
+
}: BubbleMenuDefaultProps): react_jsx_runtime20.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/ui/bubble-menu/group.d.ts
|
|
57
57
|
interface BubbleMenuItemGroupProps {
|
|
@@ -61,7 +61,7 @@ interface BubbleMenuItemGroupProps {
|
|
|
61
61
|
declare function BubbleMenuItemGroup({
|
|
62
62
|
className,
|
|
63
63
|
children
|
|
64
|
-
}: BubbleMenuItemGroupProps):
|
|
64
|
+
}: BubbleMenuItemGroupProps): react_jsx_runtime20.JSX.Element;
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region src/ui/bubble-menu/item.d.ts
|
|
67
67
|
interface BubbleMenuItemProps extends React.ComponentProps<'button'> {
|
|
@@ -79,7 +79,7 @@ declare function BubbleMenuItem({
|
|
|
79
79
|
className,
|
|
80
80
|
children,
|
|
81
81
|
...rest
|
|
82
|
-
}: BubbleMenuItemProps):
|
|
82
|
+
}: BubbleMenuItemProps): react_jsx_runtime20.JSX.Element;
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/ui/bubble-menu/link-selector.d.ts
|
|
85
85
|
interface BubbleMenuLinkSelectorProps {
|
|
@@ -108,7 +108,7 @@ declare function BubbleMenuLinkSelector({
|
|
|
108
108
|
children,
|
|
109
109
|
open: controlledOpen,
|
|
110
110
|
onOpenChange
|
|
111
|
-
}: BubbleMenuLinkSelectorProps):
|
|
111
|
+
}: BubbleMenuLinkSelectorProps): react_jsx_runtime20.JSX.Element | null;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/ui/bubble-menu/node-selector.d.ts
|
|
114
114
|
type NodeType = 'Text' | 'Title' | 'Subtitle' | 'Heading' | 'Bullet List' | 'Numbered List' | 'Quote' | 'Code';
|
|
@@ -134,7 +134,7 @@ declare function NodeSelectorRoot({
|
|
|
134
134
|
onOpenChange,
|
|
135
135
|
className,
|
|
136
136
|
children
|
|
137
|
-
}: NodeSelectorRootProps):
|
|
137
|
+
}: NodeSelectorRootProps): react_jsx_runtime20.JSX.Element | null;
|
|
138
138
|
interface NodeSelectorTriggerProps {
|
|
139
139
|
className?: string;
|
|
140
140
|
children?: React.ReactNode;
|
|
@@ -142,7 +142,7 @@ interface NodeSelectorTriggerProps {
|
|
|
142
142
|
declare function NodeSelectorTrigger({
|
|
143
143
|
className,
|
|
144
144
|
children
|
|
145
|
-
}: NodeSelectorTriggerProps):
|
|
145
|
+
}: NodeSelectorTriggerProps): react_jsx_runtime20.JSX.Element;
|
|
146
146
|
interface NodeSelectorContentProps {
|
|
147
147
|
className?: string;
|
|
148
148
|
/** Popover alignment (default: "start") */
|
|
@@ -155,7 +155,7 @@ declare function NodeSelectorContent({
|
|
|
155
155
|
className,
|
|
156
156
|
align,
|
|
157
157
|
children
|
|
158
|
-
}: NodeSelectorContentProps):
|
|
158
|
+
}: NodeSelectorContentProps): react_jsx_runtime20.JSX.Element;
|
|
159
159
|
interface BubbleMenuNodeSelectorProps {
|
|
160
160
|
/** Block types to exclude */
|
|
161
161
|
omit?: string[];
|
|
@@ -173,7 +173,7 @@ declare function BubbleMenuNodeSelector({
|
|
|
173
173
|
triggerContent,
|
|
174
174
|
open,
|
|
175
175
|
onOpenChange
|
|
176
|
-
}: BubbleMenuNodeSelectorProps):
|
|
176
|
+
}: BubbleMenuNodeSelectorProps): react_jsx_runtime20.JSX.Element;
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/ui/bubble-menu/root.d.ts
|
|
179
179
|
interface BubbleMenuRootProps {
|
|
@@ -196,7 +196,7 @@ declare function BubbleMenuRoot({
|
|
|
196
196
|
onHide,
|
|
197
197
|
className,
|
|
198
198
|
children
|
|
199
|
-
}: BubbleMenuRootProps):
|
|
199
|
+
}: BubbleMenuRootProps): react_jsx_runtime20.JSX.Element | null;
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/ui/bubble-menu/separator.d.ts
|
|
202
202
|
interface BubbleMenuSeparatorProps {
|
|
@@ -204,14 +204,14 @@ interface BubbleMenuSeparatorProps {
|
|
|
204
204
|
}
|
|
205
205
|
declare function BubbleMenuSeparator({
|
|
206
206
|
className
|
|
207
|
-
}: BubbleMenuSeparatorProps):
|
|
207
|
+
}: BubbleMenuSeparatorProps): react_jsx_runtime20.JSX.Element;
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region src/ui/bubble-menu/bold.d.ts
|
|
210
210
|
declare const BubbleMenuBold: {
|
|
211
211
|
({
|
|
212
212
|
className,
|
|
213
213
|
children
|
|
214
|
-
}: PreWiredItemProps):
|
|
214
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
215
215
|
displayName: string;
|
|
216
216
|
};
|
|
217
217
|
//#endregion
|
|
@@ -220,7 +220,7 @@ declare const BubbleMenuCode: {
|
|
|
220
220
|
({
|
|
221
221
|
className,
|
|
222
222
|
children
|
|
223
|
-
}: PreWiredItemProps):
|
|
223
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
224
224
|
displayName: string;
|
|
225
225
|
};
|
|
226
226
|
//#endregion
|
|
@@ -229,7 +229,7 @@ declare const BubbleMenuItalic: {
|
|
|
229
229
|
({
|
|
230
230
|
className,
|
|
231
231
|
children
|
|
232
|
-
}: PreWiredItemProps):
|
|
232
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
233
233
|
displayName: string;
|
|
234
234
|
};
|
|
235
235
|
//#endregion
|
|
@@ -238,7 +238,7 @@ declare const BubbleMenuStrike: {
|
|
|
238
238
|
({
|
|
239
239
|
className,
|
|
240
240
|
children
|
|
241
|
-
}: PreWiredItemProps):
|
|
241
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
242
242
|
displayName: string;
|
|
243
243
|
};
|
|
244
244
|
//#endregion
|
|
@@ -247,7 +247,7 @@ declare const BubbleMenuUnderline: {
|
|
|
247
247
|
({
|
|
248
248
|
className,
|
|
249
249
|
children
|
|
250
|
-
}: PreWiredItemProps):
|
|
250
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
251
251
|
displayName: string;
|
|
252
252
|
};
|
|
253
253
|
//#endregion
|
|
@@ -256,7 +256,7 @@ declare const BubbleMenuUppercase: {
|
|
|
256
256
|
({
|
|
257
257
|
className,
|
|
258
258
|
children
|
|
259
|
-
}: PreWiredItemProps):
|
|
259
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
260
260
|
displayName: string;
|
|
261
261
|
};
|
|
262
262
|
//#endregion
|
|
@@ -270,42 +270,42 @@ declare const BubbleMenu: {
|
|
|
270
270
|
({
|
|
271
271
|
className,
|
|
272
272
|
children
|
|
273
|
-
}: PreWiredItemProps):
|
|
273
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
274
274
|
displayName: string;
|
|
275
275
|
};
|
|
276
276
|
readonly Italic: {
|
|
277
277
|
({
|
|
278
278
|
className,
|
|
279
279
|
children
|
|
280
|
-
}: PreWiredItemProps):
|
|
280
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
281
281
|
displayName: string;
|
|
282
282
|
};
|
|
283
283
|
readonly Underline: {
|
|
284
284
|
({
|
|
285
285
|
className,
|
|
286
286
|
children
|
|
287
|
-
}: PreWiredItemProps):
|
|
287
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
288
288
|
displayName: string;
|
|
289
289
|
};
|
|
290
290
|
readonly Strike: {
|
|
291
291
|
({
|
|
292
292
|
className,
|
|
293
293
|
children
|
|
294
|
-
}: PreWiredItemProps):
|
|
294
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
295
295
|
displayName: string;
|
|
296
296
|
};
|
|
297
297
|
readonly Code: {
|
|
298
298
|
({
|
|
299
299
|
className,
|
|
300
300
|
children
|
|
301
|
-
}: PreWiredItemProps):
|
|
301
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
302
302
|
displayName: string;
|
|
303
303
|
};
|
|
304
304
|
readonly Uppercase: {
|
|
305
305
|
({
|
|
306
306
|
className,
|
|
307
307
|
children
|
|
308
|
-
}: PreWiredItemProps):
|
|
308
|
+
}: PreWiredItemProps): react_jsx_runtime20.JSX.Element;
|
|
309
309
|
displayName: string;
|
|
310
310
|
};
|
|
311
311
|
readonly AlignLeft: typeof BubbleMenuAlignLeft;
|
|
@@ -335,7 +335,7 @@ declare function ButtonBubbleMenuDefault({
|
|
|
335
335
|
offset,
|
|
336
336
|
onHide,
|
|
337
337
|
className
|
|
338
|
-
}: ButtonBubbleMenuDefaultProps):
|
|
338
|
+
}: ButtonBubbleMenuDefaultProps): react_jsx_runtime20.JSX.Element;
|
|
339
339
|
//#endregion
|
|
340
340
|
//#region src/ui/button-bubble-menu/edit-link.d.ts
|
|
341
341
|
interface ButtonBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
|
|
@@ -345,7 +345,7 @@ declare function ButtonBubbleMenuEditLink({
|
|
|
345
345
|
onClick,
|
|
346
346
|
onMouseDown,
|
|
347
347
|
...rest
|
|
348
|
-
}: ButtonBubbleMenuEditLinkProps):
|
|
348
|
+
}: ButtonBubbleMenuEditLinkProps): react_jsx_runtime20.JSX.Element;
|
|
349
349
|
//#endregion
|
|
350
350
|
//#region src/ui/button-bubble-menu/root.d.ts
|
|
351
351
|
interface ButtonBubbleMenuRootProps {
|
|
@@ -365,14 +365,14 @@ declare function ButtonBubbleMenuRoot({
|
|
|
365
365
|
offset,
|
|
366
366
|
className,
|
|
367
367
|
children
|
|
368
|
-
}: ButtonBubbleMenuRootProps):
|
|
368
|
+
}: ButtonBubbleMenuRootProps): react_jsx_runtime20.JSX.Element | null;
|
|
369
369
|
//#endregion
|
|
370
370
|
//#region src/ui/button-bubble-menu/toolbar.d.ts
|
|
371
371
|
interface ButtonBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
|
|
372
372
|
declare function ButtonBubbleMenuToolbar({
|
|
373
373
|
children,
|
|
374
374
|
...rest
|
|
375
|
-
}: ButtonBubbleMenuToolbarProps):
|
|
375
|
+
}: ButtonBubbleMenuToolbarProps): react_jsx_runtime20.JSX.Element | null;
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/ui/button-bubble-menu/context.d.ts
|
|
378
378
|
interface ButtonBubbleMenuContextValue {
|
|
@@ -405,7 +405,7 @@ declare function ImageBubbleMenuDefault({
|
|
|
405
405
|
offset,
|
|
406
406
|
onHide,
|
|
407
407
|
className
|
|
408
|
-
}: ImageBubbleMenuDefaultProps):
|
|
408
|
+
}: ImageBubbleMenuDefaultProps): react_jsx_runtime20.JSX.Element;
|
|
409
409
|
//#endregion
|
|
410
410
|
//#region src/ui/image-bubble-menu/edit-link.d.ts
|
|
411
411
|
interface ImageBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
|
|
@@ -415,7 +415,7 @@ declare function ImageBubbleMenuEditLink({
|
|
|
415
415
|
onClick,
|
|
416
416
|
onMouseDown,
|
|
417
417
|
...rest
|
|
418
|
-
}: ImageBubbleMenuEditLinkProps):
|
|
418
|
+
}: ImageBubbleMenuEditLinkProps): react_jsx_runtime20.JSX.Element;
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region src/ui/image-bubble-menu/root.d.ts
|
|
421
421
|
interface ImageBubbleMenuRootProps {
|
|
@@ -435,14 +435,14 @@ declare function ImageBubbleMenuRoot({
|
|
|
435
435
|
offset,
|
|
436
436
|
className,
|
|
437
437
|
children
|
|
438
|
-
}: ImageBubbleMenuRootProps):
|
|
438
|
+
}: ImageBubbleMenuRootProps): react_jsx_runtime20.JSX.Element | null;
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/ui/image-bubble-menu/toolbar.d.ts
|
|
441
441
|
interface ImageBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
|
|
442
442
|
declare function ImageBubbleMenuToolbar({
|
|
443
443
|
children,
|
|
444
444
|
...rest
|
|
445
|
-
}: ImageBubbleMenuToolbarProps):
|
|
445
|
+
}: ImageBubbleMenuToolbarProps): react_jsx_runtime20.JSX.Element | null;
|
|
446
446
|
//#endregion
|
|
447
447
|
//#region src/ui/image-bubble-menu/context.d.ts
|
|
448
448
|
interface ImageBubbleMenuContextValue {
|
|
@@ -481,7 +481,7 @@ declare function LinkBubbleMenuDefault({
|
|
|
481
481
|
validateUrl,
|
|
482
482
|
onLinkApply,
|
|
483
483
|
onLinkRemove
|
|
484
|
-
}: LinkBubbleMenuDefaultProps):
|
|
484
|
+
}: LinkBubbleMenuDefaultProps): react_jsx_runtime20.JSX.Element;
|
|
485
485
|
//#endregion
|
|
486
486
|
//#region src/ui/link-bubble-menu/edit-link.d.ts
|
|
487
487
|
interface LinkBubbleMenuEditLinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
|
|
@@ -491,7 +491,7 @@ declare function LinkBubbleMenuEditLink({
|
|
|
491
491
|
onClick,
|
|
492
492
|
onMouseDown,
|
|
493
493
|
...rest
|
|
494
|
-
}: LinkBubbleMenuEditLinkProps):
|
|
494
|
+
}: LinkBubbleMenuEditLinkProps): react_jsx_runtime20.JSX.Element;
|
|
495
495
|
//#endregion
|
|
496
496
|
//#region src/ui/link-bubble-menu/form.d.ts
|
|
497
497
|
interface LinkBubbleMenuFormProps {
|
|
@@ -511,7 +511,7 @@ declare function LinkBubbleMenuForm({
|
|
|
511
511
|
onLinkApply,
|
|
512
512
|
onLinkRemove,
|
|
513
513
|
children
|
|
514
|
-
}: LinkBubbleMenuFormProps):
|
|
514
|
+
}: LinkBubbleMenuFormProps): react_jsx_runtime20.JSX.Element | null;
|
|
515
515
|
//#endregion
|
|
516
516
|
//#region src/ui/link-bubble-menu/open-link.d.ts
|
|
517
517
|
interface LinkBubbleMenuOpenLinkProps extends Omit<React.ComponentProps<'a'>, 'href' | 'target' | 'rel'> {}
|
|
@@ -519,7 +519,7 @@ declare function LinkBubbleMenuOpenLink({
|
|
|
519
519
|
className,
|
|
520
520
|
children,
|
|
521
521
|
...rest
|
|
522
|
-
}: LinkBubbleMenuOpenLinkProps):
|
|
522
|
+
}: LinkBubbleMenuOpenLinkProps): react_jsx_runtime20.JSX.Element;
|
|
523
523
|
//#endregion
|
|
524
524
|
//#region src/ui/link-bubble-menu/root.d.ts
|
|
525
525
|
interface LinkBubbleMenuRootProps {
|
|
@@ -539,14 +539,14 @@ declare function LinkBubbleMenuRoot({
|
|
|
539
539
|
offset,
|
|
540
540
|
className,
|
|
541
541
|
children
|
|
542
|
-
}: LinkBubbleMenuRootProps):
|
|
542
|
+
}: LinkBubbleMenuRootProps): react_jsx_runtime20.JSX.Element | null;
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/ui/link-bubble-menu/toolbar.d.ts
|
|
545
545
|
interface LinkBubbleMenuToolbarProps extends React.ComponentProps<'div'> {}
|
|
546
546
|
declare function LinkBubbleMenuToolbar({
|
|
547
547
|
children,
|
|
548
548
|
...rest
|
|
549
|
-
}: LinkBubbleMenuToolbarProps):
|
|
549
|
+
}: LinkBubbleMenuToolbarProps): react_jsx_runtime20.JSX.Element | null;
|
|
550
550
|
//#endregion
|
|
551
551
|
//#region src/ui/link-bubble-menu/unlink.d.ts
|
|
552
552
|
interface LinkBubbleMenuUnlinkProps extends Omit<React.ComponentProps<'button'>, 'type'> {}
|
|
@@ -556,7 +556,7 @@ declare function LinkBubbleMenuUnlink({
|
|
|
556
556
|
onClick,
|
|
557
557
|
onMouseDown,
|
|
558
558
|
...rest
|
|
559
|
-
}: LinkBubbleMenuUnlinkProps):
|
|
559
|
+
}: LinkBubbleMenuUnlinkProps): react_jsx_runtime20.JSX.Element;
|
|
560
560
|
//#endregion
|
|
561
561
|
//#region src/ui/link-bubble-menu/context.d.ts
|
|
562
562
|
interface LinkBubbleMenuContextValue {
|
|
@@ -622,7 +622,7 @@ declare function CommandList({
|
|
|
622
622
|
query,
|
|
623
623
|
selectedIndex,
|
|
624
624
|
onSelect
|
|
625
|
-
}: CommandListProps):
|
|
625
|
+
}: CommandListProps): react_jsx_runtime20.JSX.Element;
|
|
626
626
|
//#endregion
|
|
627
627
|
//#region src/ui/slash-command/root.d.ts
|
|
628
628
|
declare function SlashCommandRoot({
|
package/dist/ui/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as setTextAlignment } from "../set-text-alignment-
|
|
1
|
+
import { h as editorEventBus, i as MAX_COLUMNS_DEPTH, s as getColumnsDepth } from "../columns-Cos2lqfu.mjs";
|
|
2
|
+
import { t as setTextAlignment } from "../set-text-alignment-BO24ieeE.mjs";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { useCurrentEditor, useEditorState } from "@tiptap/react";
|
|
5
5
|
import * as React from "react";
|
package/dist/utils/index.cjs
CHANGED
package/dist/utils/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-email/editor",
|
|
3
|
-
"version": "0.0.0-experimental.
|
|
3
|
+
"version": "0.0.0-experimental.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
"default": "./dist/ui/index.cjs"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
+
"./plugins": {
|
|
43
|
+
"import": {
|
|
44
|
+
"types": "./dist/plugins/index.d.mts",
|
|
45
|
+
"default": "./dist/plugins/index.mjs"
|
|
46
|
+
},
|
|
47
|
+
"require": {
|
|
48
|
+
"types": "./dist/plugins/index.d.cts",
|
|
49
|
+
"default": "./dist/plugins/index.cjs"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
42
52
|
"./utils": {
|
|
43
53
|
"import": {
|
|
44
54
|
"types": "./dist/utils/index.d.mts",
|
|
@@ -74,7 +84,7 @@
|
|
|
74
84
|
"lucide-react": ">=0.300.0",
|
|
75
85
|
"react": "^18.0 || ^19.0 || ^19.0.0-rc",
|
|
76
86
|
"react-dom": "^18.0 || ^19.0 || ^19.0.0-rc",
|
|
77
|
-
"@react-email/components": "1.0.
|
|
87
|
+
"@react-email/components": "1.0.10"
|
|
78
88
|
},
|
|
79
89
|
"dependencies": {
|
|
80
90
|
"@floating-ui/react-dom": "^2.1.8",
|
|
@@ -108,7 +118,7 @@
|
|
|
108
118
|
"prismjs": "^1.30.0"
|
|
109
119
|
},
|
|
110
120
|
"devDependencies": {
|
|
111
|
-
"@testing-library/react": "
|
|
121
|
+
"@testing-library/react": "16.0.0",
|
|
112
122
|
"@types/node": "22.19.7",
|
|
113
123
|
"@types/prismjs": "1.26.5",
|
|
114
124
|
"postcss": "8.5.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columns-CUxUEHje.mjs","names":[],"sources":["../src/core/event-bus.ts","../src/utils/styles.ts","../src/core/serializer/email-node.ts","../src/utils/attribute-helpers.ts","../src/extensions/columns.tsx"],"sourcesContent":["const EVENT_PREFIX = '@react-email/editor:';\n\n/**\n * Base event map interface for the editor event bus.\n *\n * Components extend this via TypeScript module augmentation:\n * ```ts\n * declare module '@react-email/editor' {\n * interface EditorEventMap {\n * 'my-component:custom-event': { data: string };\n * }\n * }\n * ```\n */\nexport interface EditorEventMap {\n 'bubble-menu:add-link': undefined;\n}\n\nexport type EditorEventName = keyof EditorEventMap;\n\nexport type EditorEventHandler<T extends EditorEventName> = (\n payload: EditorEventMap[T],\n) => void | Promise<void>;\n\nexport interface EditorEventSubscription {\n unsubscribe: () => void;\n}\n\nclass EditorEventBus {\n private prefixEventName(eventName: EditorEventName): string {\n return `${EVENT_PREFIX}${String(eventName)}`;\n }\n\n dispatch<T extends EditorEventName>(\n eventName: T,\n payload: EditorEventMap[T],\n options?: { target?: EventTarget },\n ): void {\n const target = options?.target ?? window;\n const prefixedEventName = this.prefixEventName(eventName);\n const event = new CustomEvent(prefixedEventName, {\n detail: payload,\n bubbles: false,\n cancelable: false,\n });\n target.dispatchEvent(event);\n }\n\n on<T extends EditorEventName>(\n eventName: T,\n handler: EditorEventHandler<T>,\n options?: AddEventListenerOptions & { target?: EventTarget },\n ): EditorEventSubscription {\n const target = options?.target ?? window;\n const prefixedEventName = this.prefixEventName(eventName);\n const abortController = new AbortController();\n\n const wrappedHandler = (event: Event) => {\n const customEvent = event as CustomEvent<EditorEventMap[T]>;\n const result = handler(customEvent.detail);\n\n if (result instanceof Promise) {\n result.catch((error) => {\n console.error(\n `Error in async event handler for ${prefixedEventName}:`,\n { event: customEvent.detail, error },\n );\n });\n }\n };\n\n target.addEventListener(prefixedEventName, wrappedHandler, {\n ...options,\n signal: abortController.signal,\n });\n\n return {\n unsubscribe: () => {\n abortController.abort();\n },\n };\n }\n}\n\nexport const editorEventBus = new EditorEventBus();\n","import type { CssJs } from './types';\n\nconst WHITE_SPACE_REGEX = /\\s+/;\n\nexport const jsToInlineCss = (styleObject: { [key: string]: any }) => {\n const parts: string[] = [];\n\n for (const key in styleObject) {\n const value = styleObject[key];\n if (value !== 0 && value !== undefined && value !== null && value !== '') {\n const KEBAB_CASE_REGEX = /[A-Z]/g;\n const formattedKey = key.replace(\n KEBAB_CASE_REGEX,\n (match) => `-${match.toLowerCase()}`,\n );\n parts.push(`${formattedKey}:${value}`);\n }\n }\n\n return parts.join(';') + (parts.length ? ';' : '');\n};\n\nexport const inlineCssToJs = (\n inlineStyle: string,\n options: { removeUnit?: boolean } = {},\n) => {\n const styleObject: { [key: string]: string } = {};\n\n if (!inlineStyle || inlineStyle === '' || typeof inlineStyle === 'object') {\n return styleObject;\n }\n\n inlineStyle.split(';').forEach((style: string) => {\n if (style.trim()) {\n const [key, value] = style.split(':');\n const valueTrimmed = value?.trim();\n\n if (!valueTrimmed) {\n return;\n }\n\n const formattedKey = key\n .trim()\n .replace(/-\\w/g, (match) => match[1].toUpperCase());\n\n const UNIT_REGEX = /px|%/g;\n const sanitizedValue = options?.removeUnit\n ? valueTrimmed.replace(UNIT_REGEX, '')\n : valueTrimmed;\n\n styleObject[formattedKey] = sanitizedValue;\n }\n });\n\n return styleObject;\n};\n\n/**\n * Expands CSS shorthand properties (margin, padding) into their longhand equivalents.\n * This prevents shorthand properties from overriding specific longhand properties in email clients.\n *\n * @param styles - Style object that may contain shorthand properties\n * @returns New style object with shorthand properties expanded to longhand\n *\n * @example\n * expandShorthandProperties({ margin: '0', paddingTop: '10px' })\n * // Returns: { marginTop: '0', marginRight: '0', marginBottom: '0', marginLeft: '0', paddingTop: '10px' }\n */\nexport function expandShorthandProperties(\n styles: Record<string, string>,\n): Record<string, string> {\n if (!styles || typeof styles !== 'object') {\n return {};\n }\n\n const expanded: Record<string, any> = {};\n\n for (const key in styles) {\n const value = styles[key];\n if (value === undefined || value === null || value === '') {\n continue;\n }\n\n switch (key) {\n case 'margin': {\n const values = parseShorthandValue(value);\n expanded.marginTop = values.top;\n expanded.marginRight = values.right;\n expanded.marginBottom = values.bottom;\n expanded.marginLeft = values.left;\n break;\n }\n case 'padding': {\n const values = parseShorthandValue(value);\n expanded.paddingTop = values.top;\n expanded.paddingRight = values.right;\n expanded.paddingBottom = values.bottom;\n expanded.paddingLeft = values.left;\n break;\n }\n case 'border': {\n const values = convertBorderValue(value);\n expanded.borderStyle = values.style;\n expanded.borderWidth = values.width;\n expanded.borderColor = values.color;\n break;\n }\n case 'borderTopLeftRadius':\n case 'borderTopRightRadius':\n case 'borderBottomLeftRadius':\n case 'borderBottomRightRadius': {\n // Always preserve the longhand property\n expanded[key] = value;\n\n // When all four corners are present and identical, also add the shorthand\n if (\n styles.borderTopLeftRadius &&\n styles.borderTopRightRadius &&\n styles.borderBottomLeftRadius &&\n styles.borderBottomRightRadius\n ) {\n const values = [\n styles.borderTopLeftRadius,\n styles.borderTopRightRadius,\n styles.borderBottomLeftRadius,\n styles.borderBottomRightRadius,\n ];\n\n if (new Set(values).size === 1) {\n expanded.borderRadius = values[0];\n }\n }\n\n break;\n }\n\n default: {\n // Keep all other properties as-is\n expanded[key] = value;\n }\n }\n }\n\n return expanded;\n}\n\n/**\n * Parses CSS shorthand value (1-4 values) into individual side values.\n * Follows CSS specification for shorthand property value parsing.\n *\n * @param value - Shorthand value string (e.g., '0', '10px 20px', '5px 10px 15px 20px')\n * @returns Object with top, right, bottom, left values\n */\nfunction parseShorthandValue(value: string | number): {\n top: string;\n right: string;\n bottom: string;\n left: string;\n} {\n const stringValue = String(value).trim();\n const parts = stringValue.split(WHITE_SPACE_REGEX);\n const len = parts.length;\n\n if (len === 1) {\n return { top: parts[0], right: parts[0], bottom: parts[0], left: parts[0] };\n }\n if (len === 2) {\n return { top: parts[0], right: parts[1], bottom: parts[0], left: parts[1] };\n }\n if (len === 3) {\n return { top: parts[0], right: parts[1], bottom: parts[2], left: parts[1] };\n }\n if (len === 4) {\n return { top: parts[0], right: parts[1], bottom: parts[2], left: parts[3] };\n }\n\n return {\n top: stringValue,\n right: stringValue,\n bottom: stringValue,\n left: stringValue,\n };\n}\n\nfunction convertBorderValue(value: string | number): {\n style: string;\n width: string;\n color: string;\n} {\n const stringValue = String(value).trim();\n const parts = stringValue.split(WHITE_SPACE_REGEX);\n\n switch (parts.length) {\n case 1:\n // border: 1px → all sides\n return {\n style: 'solid',\n width: parts[0],\n color: 'black',\n };\n case 2:\n // border: 1px solid → top/bottom, left/right\n return {\n style: parts[1],\n width: parts[0],\n color: 'black',\n };\n case 3:\n // border: 1px solid #000 → top, left/right, bottom\n return {\n style: parts[1],\n width: parts[0],\n color: parts[2],\n };\n case 4:\n // border: 1px solid #000 #fff → top, right, bottom, left\n return {\n style: parts[1],\n width: parts[0],\n color: parts[2],\n };\n default:\n // Invalid format, return the original value for all sides\n return {\n style: 'solid',\n width: stringValue,\n color: 'black',\n };\n }\n}\n\n/**\n * Resolves conflicts between reset styles and inline styles by expanding\n * shorthand properties (margin, padding) to longhand before merging.\n * This prevents shorthand properties from overriding specific longhand properties.\n *\n * @param resetStyles - Base reset styles that may contain shorthand properties\n * @param inlineStyles - Inline styles that should override reset styles\n * @returns Merged styles with inline styles taking precedence\n */\nexport function resolveConflictingStyles(\n resetStyles: CssJs['reset'],\n inlineStyles: Record<string, string>,\n) {\n const expandedResetStyles = expandShorthandProperties(\n resetStyles as Record<string, string>,\n );\n const expandedInlineStyles = expandShorthandProperties(inlineStyles);\n\n return {\n ...expandedResetStyles,\n ...expandedInlineStyles,\n };\n}\n","import {\n type Editor,\n type JSONContent,\n Node,\n type NodeConfig,\n type NodeType,\n} from '@tiptap/core';\n\nexport type NodeRendererComponent = (props: {\n node: JSONContent;\n style: React.CSSProperties;\n children?: React.ReactNode;\n\n extension: EmailNode<any, any>;\n}) => React.ReactNode;\n\nexport interface EmailNodeConfig<Options, Storage>\n extends NodeConfig<Options, Storage> {\n renderToReactEmail: NodeRendererComponent;\n}\n\ntype ConfigParameter<Options, Storage> = Partial<\n Omit<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'>\n> &\n Pick<EmailNodeConfig<Options, Storage>, 'renderToReactEmail'> &\n ThisType<{\n name: string;\n options: Options;\n storage: Storage;\n editor: Editor;\n type: NodeType;\n parent: (...args: any[]) => any;\n }>;\n\nexport class EmailNode<\n Options = Record<string, never>,\n Storage = Record<string, never>,\n> extends Node<Options, Storage> {\n declare config: EmailNodeConfig<Options, Storage>;\n\n // biome-ignore lint/complexity/noUselessConstructor: This is only meant to change the types for config, hence why we keep it\n constructor(config: ConfigParameter<Options, Storage>) {\n super(config);\n }\n\n /**\n * Create a new Node instance\n * @param config - Node configuration object or a function that returns a configuration object\n */\n static create<O = Record<string, never>, S = Record<string, never>>(\n config: ConfigParameter<O, S> | (() => ConfigParameter<O, S>),\n ) {\n // If the config is a function, execute it to get the configuration object\n const resolvedConfig = typeof config === 'function' ? config() : config;\n return new EmailNode<O, S>(resolvedConfig);\n }\n\n static from<O, S>(\n node: Node<O, S>,\n renderToReactEmail: NodeRendererComponent,\n ): EmailNode<O, S> {\n const customNode = EmailNode.create({} as ConfigParameter<O, S>);\n // This only makes a shallow copy, so if there's nested objects here mutating things will be dangerous\n Object.assign(customNode, { ...node });\n customNode.config = { ...node.config, renderToReactEmail };\n return customNode;\n }\n\n // Subclass return types for configure/extend; safe at runtime. TipTap's Node typings cause TS2416 when returning EmailNode.\n // @ts-expect-error - EmailNode is a valid Node subclass; base typings don't support subclass return types\n configure(options?: Partial<Options>) {\n return super.configure(options) as EmailNode<Options, Storage>;\n }\n\n // @ts-expect-error - same as configure: extend returns EmailNode for chaining; base typings are incompatible\n extend<\n ExtendedOptions = Options,\n ExtendedStorage = Storage,\n ExtendedConfig extends NodeConfig<\n ExtendedOptions,\n ExtendedStorage\n > = EmailNodeConfig<ExtendedOptions, ExtendedStorage>,\n >(\n extendedConfig?:\n | (() => Partial<ExtendedConfig>)\n | (Partial<ExtendedConfig> &\n ThisType<{\n name: string;\n options: ExtendedOptions;\n storage: ExtendedStorage;\n editor: Editor;\n type: NodeType;\n }>),\n ): EmailNode<ExtendedOptions, ExtendedStorage> {\n // If the extended config is a function, execute it to get the configuration object\n const resolvedConfig =\n typeof extendedConfig === 'function' ? extendedConfig() : extendedConfig;\n return super.extend(resolvedConfig) as EmailNode<\n ExtendedOptions,\n ExtendedStorage\n >;\n }\n}\n","/**\n * Creates TipTap attribute definitions for a list of HTML attributes.\n * Each attribute will have the same pattern:\n * - default: null\n * - parseHTML: extracts the attribute from the element\n * - renderHTML: conditionally renders the attribute if it has a value\n *\n * @param attributeNames - Array of HTML attribute names to create definitions for\n * @returns Object with TipTap attribute definitions\n *\n * @example\n * const attrs = createStandardAttributes(['class', 'id', 'title']);\n * // Returns:\n * // {\n * // class: {\n * // default: null,\n * // parseHTML: (element) => element.getAttribute('class'),\n * // renderHTML: (attributes) => attributes.class ? { class: attributes.class } : {}\n * // },\n * // ...\n * // }\n */\nexport function createStandardAttributes(attributeNames: readonly string[]) {\n return Object.fromEntries(\n attributeNames.map((attr) => [\n attr,\n {\n default: null,\n parseHTML: (element: HTMLElement) => element.getAttribute(attr),\n renderHTML: (attributes: Record<string, unknown>) => {\n if (!attributes[attr]) {\n return {};\n }\n\n return {\n [attr]: attributes[attr],\n };\n },\n },\n ]),\n );\n}\n\n/**\n * Common HTML attributes used across multiple extensions.\n * These preserve attributes during HTML import and editing for better\n * fidelity when importing existing email templates.\n */\nexport const COMMON_HTML_ATTRIBUTES = [\n 'id',\n 'class',\n 'title',\n 'lang',\n 'dir',\n 'data-id',\n] as const;\n\n/**\n * Layout-specific HTML attributes used for positioning and sizing.\n */\nexport const LAYOUT_ATTRIBUTES = ['align', 'width', 'height'] as const;\n\n/**\n * Table-specific HTML attributes used for table layout and styling.\n */\nexport const TABLE_ATTRIBUTES = [\n 'border',\n 'cellpadding',\n 'cellspacing',\n] as const;\n\n/**\n * Table cell-specific HTML attributes.\n */\nexport const TABLE_CELL_ATTRIBUTES = [\n 'valign',\n 'bgcolor',\n 'colspan',\n 'rowspan',\n] as const;\n\n/**\n * Table header cell-specific HTML attributes.\n * These are additional attributes that only apply to <th> elements.\n */\nexport const TABLE_HEADER_ATTRIBUTES = [\n ...TABLE_CELL_ATTRIBUTES,\n 'scope',\n] as const;\n","import { Column, Row } from '@react-email/components';\nimport { type CommandProps, mergeAttributes } from '@tiptap/core';\nimport type { Node as ProseMirrorNode } from '@tiptap/pm/model';\nimport { TextSelection } from '@tiptap/pm/state';\nimport { EmailNode } from '../core/serializer/email-node';\nimport {\n COMMON_HTML_ATTRIBUTES,\n createStandardAttributes,\n LAYOUT_ATTRIBUTES,\n} from '../utils/attribute-helpers';\nimport { inlineCssToJs } from '../utils/styles';\n\ndeclare module '@tiptap/core' {\n interface Commands<ReturnType> {\n columns: {\n insertColumns: (count: 2 | 3 | 4) => ReturnType;\n };\n }\n}\n\nexport const COLUMN_PARENT_TYPES = [\n 'twoColumns',\n 'threeColumns',\n 'fourColumns',\n] as const;\n\nconst COLUMN_PARENT_SET = new Set<string>(COLUMN_PARENT_TYPES);\n\nexport const MAX_COLUMNS_DEPTH = 3;\n\nexport function getColumnsDepth(doc: ProseMirrorNode, from: number): number {\n const $from = doc.resolve(from);\n let depth = 0;\n for (let d = $from.depth; d > 0; d--) {\n if (COLUMN_PARENT_SET.has($from.node(d).type.name)) {\n depth++;\n }\n }\n return depth;\n}\n\ninterface ColumnsVariantConfig {\n name: (typeof COLUMN_PARENT_TYPES)[number];\n columnCount: number;\n content: string;\n dataType: string;\n}\n\nconst VARIANTS: ColumnsVariantConfig[] = [\n {\n name: 'twoColumns',\n columnCount: 2,\n content: 'columnsColumn columnsColumn',\n dataType: 'two-columns',\n },\n {\n name: 'threeColumns',\n columnCount: 3,\n content: 'columnsColumn columnsColumn columnsColumn',\n dataType: 'three-columns',\n },\n {\n name: 'fourColumns',\n columnCount: 4,\n content: 'columnsColumn{4}',\n dataType: 'four-columns',\n },\n];\n\nconst NODE_TYPE_MAP: Record<number, (typeof COLUMN_PARENT_TYPES)[number]> = {\n 2: 'twoColumns',\n 3: 'threeColumns',\n 4: 'fourColumns',\n};\n\nfunction createColumnsNode(\n config: ColumnsVariantConfig,\n includeCommands: boolean,\n) {\n return EmailNode.create({\n name: config.name,\n group: 'block',\n content: config.content,\n isolating: true,\n defining: true,\n\n addAttributes() {\n return createStandardAttributes([\n ...LAYOUT_ATTRIBUTES,\n ...COMMON_HTML_ATTRIBUTES,\n ]);\n },\n\n parseHTML() {\n return [{ tag: `div[data-type=\"${config.dataType}\"]` }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'div',\n mergeAttributes(\n { 'data-type': config.dataType, class: 'node-columns' },\n HTMLAttributes,\n ),\n 0,\n ];\n },\n\n ...(includeCommands && {\n addCommands() {\n return {\n insertColumns:\n (count: 2 | 3 | 4) =>\n ({\n commands,\n state,\n }: CommandProps & {\n state: { doc: ProseMirrorNode; selection: { from: number } };\n }) => {\n if (\n getColumnsDepth(state.doc, state.selection.from) >=\n MAX_COLUMNS_DEPTH\n ) {\n return false;\n }\n const nodeType = NODE_TYPE_MAP[count];\n const children = Array.from({ length: count }, () => ({\n type: 'columnsColumn',\n content: [{ type: 'paragraph', content: [] }],\n }));\n return commands.insertContent({\n type: nodeType,\n content: children,\n });\n },\n };\n },\n }),\n\n renderToReactEmail({ children, node, style }) {\n const inlineStyles = inlineCssToJs(node.attrs?.style);\n return (\n <Row\n className={node.attrs?.class || undefined}\n style={{ ...style, ...inlineStyles }}\n >\n {children}\n </Row>\n );\n },\n });\n}\n\nexport const TwoColumns = createColumnsNode(VARIANTS[0], true);\nexport const ThreeColumns = createColumnsNode(VARIANTS[1], false);\nexport const FourColumns = createColumnsNode(VARIANTS[2], false);\n\nexport const ColumnsColumn = EmailNode.create({\n name: 'columnsColumn',\n group: 'columnsColumn',\n content: 'block+',\n isolating: true,\n\n addAttributes() {\n return {\n ...createStandardAttributes([\n ...LAYOUT_ATTRIBUTES,\n ...COMMON_HTML_ATTRIBUTES,\n ]),\n };\n },\n\n parseHTML() {\n return [{ tag: 'div[data-type=\"column\"]' }];\n },\n\n renderHTML({ HTMLAttributes }) {\n return [\n 'div',\n mergeAttributes(\n { 'data-type': 'column', class: 'node-column' },\n HTMLAttributes,\n ),\n 0,\n ];\n },\n\n addKeyboardShortcuts() {\n return {\n Backspace: ({ editor }) => {\n const { state } = editor;\n const { selection } = state;\n const { empty, $from } = selection;\n\n if (!empty) return false;\n\n for (let depth = $from.depth; depth >= 1; depth--) {\n if ($from.pos !== $from.start(depth)) break;\n\n const indexInParent = $from.index(depth - 1);\n\n if (indexInParent === 0) continue;\n\n const parent = $from.node(depth - 1);\n const prevNode = parent.child(indexInParent - 1);\n\n if (COLUMN_PARENT_SET.has(prevNode.type.name)) {\n const deleteFrom = $from.before(depth) - prevNode.nodeSize;\n const deleteTo = $from.before(depth);\n editor.view.dispatch(state.tr.delete(deleteFrom, deleteTo));\n return true;\n }\n\n break;\n }\n\n return false;\n },\n 'Mod-a': ({ editor }) => {\n const { state } = editor;\n const { $from } = state.selection;\n\n for (let d = $from.depth; d > 0; d--) {\n if ($from.node(d).type.name !== 'columnsColumn') {\n continue;\n }\n\n const columnStart = $from.start(d);\n const columnEnd = $from.end(d);\n const { from, to } = state.selection;\n\n if (from === columnStart && to === columnEnd) {\n return false;\n }\n\n editor.view.dispatch(\n state.tr.setSelection(\n TextSelection.create(state.doc, columnStart, columnEnd),\n ),\n );\n return true;\n }\n\n return false;\n },\n };\n },\n\n renderToReactEmail({ children, node, style }) {\n const inlineStyles = inlineCssToJs(node.attrs?.style);\n const width = node.attrs?.width;\n return (\n <Column\n className={node.attrs?.class || undefined}\n style={{\n ...style,\n ...inlineStyles,\n ...(width ? { width } : {}),\n }}\n >\n {children}\n </Column>\n );\n },\n});\n"],"mappings":";;;;;;AAAA,MAAM,eAAe;AA4BrB,IAAM,iBAAN,MAAqB;CACnB,AAAQ,gBAAgB,WAAoC;AAC1D,SAAO,GAAG,eAAe,OAAO,UAAU;;CAG5C,SACE,WACA,SACA,SACM;EACN,MAAM,SAAS,SAAS,UAAU;EAClC,MAAM,oBAAoB,KAAK,gBAAgB,UAAU;EACzD,MAAM,QAAQ,IAAI,YAAY,mBAAmB;GAC/C,QAAQ;GACR,SAAS;GACT,YAAY;GACb,CAAC;AACF,SAAO,cAAc,MAAM;;CAG7B,GACE,WACA,SACA,SACyB;EACzB,MAAM,SAAS,SAAS,UAAU;EAClC,MAAM,oBAAoB,KAAK,gBAAgB,UAAU;EACzD,MAAM,kBAAkB,IAAI,iBAAiB;EAE7C,MAAM,kBAAkB,UAAiB;GACvC,MAAM,cAAc;GACpB,MAAM,SAAS,QAAQ,YAAY,OAAO;AAE1C,OAAI,kBAAkB,QACpB,QAAO,OAAO,UAAU;AACtB,YAAQ,MACN,oCAAoC,kBAAkB,IACtD;KAA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