@blocknote/xl-email-exporter 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,632 @@
1
- import { DefaultBlockSchema, pageBreakSchema } from "@blocknote/core";
2
- import { BlockMapping } from "@blocknote/core/src/exporter/mapping.js";
3
- import { Link } from "@react-email/components";
4
- export declare const reactEmailBlockMappingForDefaultSchema: BlockMapping<DefaultBlockSchema & typeof pageBreakSchema.blockSchema, any, any, React.ReactElement<any>, React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>>;
1
+ import { BlockMapping, DefaultBlockSchema, pageBreakSchema } from "@blocknote/core";
2
+ import { CodeBlock, Link, Text } from "@react-email/components";
3
+ type TextProps = React.ComponentPropsWithoutRef<typeof Text>;
4
+ export interface ReactEmailTextStyles {
5
+ paragraph?: Partial<TextProps>;
6
+ bulletListItem?: Partial<TextProps>;
7
+ toggleListItem?: Partial<TextProps>;
8
+ numberedListItem?: Partial<TextProps>;
9
+ checkListItem?: Partial<TextProps>;
10
+ quote?: Partial<TextProps>;
11
+ tableError?: Partial<TextProps>;
12
+ tableCell?: Partial<TextProps>;
13
+ caption?: Partial<TextProps>;
14
+ heading1?: Partial<TextProps>;
15
+ heading2?: Partial<TextProps>;
16
+ heading3?: Partial<TextProps>;
17
+ heading4?: Partial<TextProps>;
18
+ heading5?: Partial<TextProps>;
19
+ heading6?: Partial<TextProps>;
20
+ codeBlock?: Partial<React.ComponentProps<typeof CodeBlock>>;
21
+ }
22
+ export declare const defaultReactEmailTextStyles: {
23
+ paragraph: {
24
+ style: import("react").CSSProperties;
25
+ };
26
+ bulletListItem: {
27
+ style: import("react").CSSProperties;
28
+ };
29
+ toggleListItem: {
30
+ style: import("react").CSSProperties;
31
+ };
32
+ numberedListItem: {
33
+ style: import("react").CSSProperties;
34
+ };
35
+ checkListItem: {
36
+ style: import("react").CSSProperties;
37
+ };
38
+ quote: {
39
+ style: import("react").CSSProperties;
40
+ };
41
+ tableError: {
42
+ style: import("react").CSSProperties;
43
+ };
44
+ tableCell: {
45
+ style: import("react").CSSProperties;
46
+ };
47
+ caption: {
48
+ style: import("react").CSSProperties;
49
+ };
50
+ heading1: {
51
+ style: {
52
+ fontSize: number;
53
+ margin: number;
54
+ };
55
+ };
56
+ heading2: {
57
+ style: {
58
+ fontSize: number;
59
+ margin: number;
60
+ };
61
+ };
62
+ heading3: {
63
+ style: {
64
+ fontSize: number;
65
+ margin: number;
66
+ };
67
+ };
68
+ heading4: {
69
+ style: {
70
+ fontSize: number;
71
+ margin: number;
72
+ };
73
+ };
74
+ heading5: {
75
+ style: {
76
+ fontSize: number;
77
+ margin: number;
78
+ };
79
+ };
80
+ heading6: {
81
+ style: {
82
+ fontSize: number;
83
+ margin: number;
84
+ };
85
+ };
86
+ codeBlock: {
87
+ style: import("react").CSSProperties;
88
+ };
89
+ };
90
+ export declare const createReactEmailBlockMappingForDefaultSchema: (textStyles?: ReactEmailTextStyles) => BlockMapping<DefaultBlockSchema & typeof pageBreakSchema.blockSchema, any, any, React.ReactElement<any>, React.ReactElement<typeof Link> | React.ReactElement<HTMLSpanElement>>;
91
+ export declare const reactEmailBlockMappingForDefaultSchema: BlockMapping<import("@blocknote/core").BlockSchemaFromSpecs<{
92
+ paragraph: {
93
+ config: {
94
+ type: "paragraph";
95
+ content: "inline";
96
+ propSchema: {
97
+ backgroundColor: {
98
+ default: "default";
99
+ };
100
+ textColor: {
101
+ default: "default";
102
+ };
103
+ textAlignment: {
104
+ default: "left";
105
+ values: readonly ["left", "center", "right", "justify"];
106
+ };
107
+ };
108
+ };
109
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
110
+ type: "paragraph";
111
+ content: "inline";
112
+ propSchema: {
113
+ backgroundColor: {
114
+ default: "default";
115
+ };
116
+ textColor: {
117
+ default: "default";
118
+ };
119
+ textAlignment: {
120
+ default: "left";
121
+ values: readonly ["left", "center", "right", "justify"];
122
+ };
123
+ };
124
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
125
+ };
126
+ heading: {
127
+ config: {
128
+ type: "heading";
129
+ content: "inline";
130
+ propSchema: {
131
+ level: {
132
+ default: number;
133
+ values: readonly [1, 2, 3, 4, 5, 6];
134
+ };
135
+ isToggleable: {
136
+ default: false;
137
+ };
138
+ backgroundColor: {
139
+ default: "default";
140
+ };
141
+ textColor: {
142
+ default: "default";
143
+ };
144
+ textAlignment: {
145
+ default: "left";
146
+ values: readonly ["left", "center", "right", "justify"];
147
+ };
148
+ };
149
+ };
150
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
151
+ type: "heading";
152
+ content: "inline";
153
+ propSchema: {
154
+ level: {
155
+ default: number;
156
+ values: readonly [1, 2, 3, 4, 5, 6];
157
+ };
158
+ isToggleable: {
159
+ default: false;
160
+ };
161
+ backgroundColor: {
162
+ default: "default";
163
+ };
164
+ textColor: {
165
+ default: "default";
166
+ };
167
+ textAlignment: {
168
+ default: "left";
169
+ values: readonly ["left", "center", "right", "justify"];
170
+ };
171
+ };
172
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
173
+ };
174
+ quote: {
175
+ config: {
176
+ type: "quote";
177
+ content: "inline";
178
+ propSchema: {
179
+ backgroundColor: {
180
+ default: "default";
181
+ };
182
+ textColor: {
183
+ default: "default";
184
+ };
185
+ textAlignment: {
186
+ default: "left";
187
+ values: readonly ["left", "center", "right", "justify"];
188
+ };
189
+ };
190
+ };
191
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
192
+ type: "quote";
193
+ content: "inline";
194
+ propSchema: {
195
+ backgroundColor: {
196
+ default: "default";
197
+ };
198
+ textColor: {
199
+ default: "default";
200
+ };
201
+ textAlignment: {
202
+ default: "left";
203
+ values: readonly ["left", "center", "right", "justify"];
204
+ };
205
+ };
206
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
207
+ };
208
+ codeBlock: {
209
+ config: {
210
+ type: "codeBlock";
211
+ content: "inline";
212
+ propSchema: {
213
+ language: {
214
+ default: string;
215
+ };
216
+ };
217
+ };
218
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
219
+ type: "codeBlock";
220
+ content: "inline";
221
+ propSchema: {
222
+ language: {
223
+ default: string;
224
+ };
225
+ };
226
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
227
+ };
228
+ toggleListItem: {
229
+ config: {
230
+ type: "toggleListItem";
231
+ content: "inline";
232
+ propSchema: {
233
+ backgroundColor: {
234
+ default: "default";
235
+ };
236
+ textColor: {
237
+ default: "default";
238
+ };
239
+ textAlignment: {
240
+ default: "left";
241
+ values: readonly ["left", "center", "right", "justify"];
242
+ };
243
+ };
244
+ };
245
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
246
+ type: "toggleListItem";
247
+ content: "inline";
248
+ propSchema: {
249
+ backgroundColor: {
250
+ default: "default";
251
+ };
252
+ textColor: {
253
+ default: "default";
254
+ };
255
+ textAlignment: {
256
+ default: "left";
257
+ values: readonly ["left", "center", "right", "justify"];
258
+ };
259
+ };
260
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
261
+ };
262
+ bulletListItem: {
263
+ config: {
264
+ type: "bulletListItem";
265
+ content: "inline";
266
+ propSchema: {
267
+ backgroundColor: {
268
+ default: "default";
269
+ };
270
+ textColor: {
271
+ default: "default";
272
+ };
273
+ textAlignment: {
274
+ default: "left";
275
+ values: readonly ["left", "center", "right", "justify"];
276
+ };
277
+ };
278
+ };
279
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
280
+ type: "bulletListItem";
281
+ content: "inline";
282
+ propSchema: {
283
+ backgroundColor: {
284
+ default: "default";
285
+ };
286
+ textColor: {
287
+ default: "default";
288
+ };
289
+ textAlignment: {
290
+ default: "left";
291
+ values: readonly ["left", "center", "right", "justify"];
292
+ };
293
+ };
294
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
295
+ };
296
+ numberedListItem: {
297
+ config: {
298
+ type: "numberedListItem";
299
+ content: "inline";
300
+ propSchema: {
301
+ start: {
302
+ default: undefined;
303
+ type: "number";
304
+ };
305
+ backgroundColor: {
306
+ default: "default";
307
+ };
308
+ textColor: {
309
+ default: "default";
310
+ };
311
+ textAlignment: {
312
+ default: "left";
313
+ values: readonly ["left", "center", "right", "justify"];
314
+ };
315
+ };
316
+ };
317
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
318
+ type: "numberedListItem";
319
+ content: "inline";
320
+ propSchema: {
321
+ start: {
322
+ default: undefined;
323
+ type: "number";
324
+ };
325
+ backgroundColor: {
326
+ default: "default";
327
+ };
328
+ textColor: {
329
+ default: "default";
330
+ };
331
+ textAlignment: {
332
+ default: "left";
333
+ values: readonly ["left", "center", "right", "justify"];
334
+ };
335
+ };
336
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
337
+ };
338
+ checkListItem: {
339
+ config: {
340
+ type: "checkListItem";
341
+ content: "inline";
342
+ propSchema: {
343
+ checked: {
344
+ default: false;
345
+ };
346
+ backgroundColor: {
347
+ default: "default";
348
+ };
349
+ textColor: {
350
+ default: "default";
351
+ };
352
+ textAlignment: {
353
+ default: "left";
354
+ values: readonly ["left", "center", "right", "justify"];
355
+ };
356
+ };
357
+ };
358
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
359
+ type: "checkListItem";
360
+ content: "inline";
361
+ propSchema: {
362
+ checked: {
363
+ default: false;
364
+ };
365
+ backgroundColor: {
366
+ default: "default";
367
+ };
368
+ textColor: {
369
+ default: "default";
370
+ };
371
+ textAlignment: {
372
+ default: "left";
373
+ values: readonly ["left", "center", "right", "justify"];
374
+ };
375
+ };
376
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
377
+ };
378
+ table: {
379
+ config: {
380
+ type: "table";
381
+ content: "table";
382
+ propSchema: {
383
+ textColor: {
384
+ default: "default";
385
+ };
386
+ };
387
+ };
388
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
389
+ type: "table";
390
+ content: "table";
391
+ propSchema: {
392
+ textColor: {
393
+ default: "default";
394
+ };
395
+ };
396
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
397
+ };
398
+ file: {
399
+ config: {
400
+ type: "file";
401
+ propSchema: {
402
+ backgroundColor: {
403
+ default: "default";
404
+ };
405
+ name: {
406
+ default: "";
407
+ };
408
+ url: {
409
+ default: "";
410
+ };
411
+ caption: {
412
+ default: "";
413
+ };
414
+ };
415
+ content: "none";
416
+ isFileBlock: true;
417
+ };
418
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
419
+ type: "file";
420
+ propSchema: {
421
+ backgroundColor: {
422
+ default: "default";
423
+ };
424
+ name: {
425
+ default: "";
426
+ };
427
+ url: {
428
+ default: "";
429
+ };
430
+ caption: {
431
+ default: "";
432
+ };
433
+ };
434
+ content: "none";
435
+ isFileBlock: true;
436
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
437
+ };
438
+ image: {
439
+ config: {
440
+ type: "image";
441
+ propSchema: {
442
+ textAlignment: {
443
+ default: "left";
444
+ values: readonly ["left", "center", "right", "justify"];
445
+ };
446
+ backgroundColor: {
447
+ default: "default";
448
+ };
449
+ name: {
450
+ default: "";
451
+ };
452
+ url: {
453
+ default: "";
454
+ };
455
+ caption: {
456
+ default: "";
457
+ };
458
+ showPreview: {
459
+ default: true;
460
+ };
461
+ previewWidth: {
462
+ default: undefined;
463
+ type: "number";
464
+ };
465
+ };
466
+ content: "none";
467
+ isFileBlock: true;
468
+ fileBlockAccept: string[];
469
+ };
470
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
471
+ type: "image";
472
+ propSchema: {
473
+ textAlignment: {
474
+ default: "left";
475
+ values: readonly ["left", "center", "right", "justify"];
476
+ };
477
+ backgroundColor: {
478
+ default: "default";
479
+ };
480
+ name: {
481
+ default: "";
482
+ };
483
+ url: {
484
+ default: "";
485
+ };
486
+ caption: {
487
+ default: "";
488
+ };
489
+ showPreview: {
490
+ default: true;
491
+ };
492
+ previewWidth: {
493
+ default: undefined;
494
+ type: "number";
495
+ };
496
+ };
497
+ content: "none";
498
+ isFileBlock: true;
499
+ fileBlockAccept: string[];
500
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
501
+ };
502
+ video: {
503
+ config: {
504
+ type: "video";
505
+ propSchema: {
506
+ textAlignment: {
507
+ default: "left";
508
+ values: readonly ["left", "center", "right", "justify"];
509
+ };
510
+ backgroundColor: {
511
+ default: "default";
512
+ };
513
+ name: {
514
+ default: "";
515
+ };
516
+ url: {
517
+ default: "";
518
+ };
519
+ caption: {
520
+ default: "";
521
+ };
522
+ showPreview: {
523
+ default: true;
524
+ };
525
+ previewWidth: {
526
+ default: undefined;
527
+ type: "number";
528
+ };
529
+ };
530
+ content: "none";
531
+ isFileBlock: true;
532
+ fileBlockAccept: string[];
533
+ };
534
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
535
+ type: "video";
536
+ propSchema: {
537
+ textAlignment: {
538
+ default: "left";
539
+ values: readonly ["left", "center", "right", "justify"];
540
+ };
541
+ backgroundColor: {
542
+ default: "default";
543
+ };
544
+ name: {
545
+ default: "";
546
+ };
547
+ url: {
548
+ default: "";
549
+ };
550
+ caption: {
551
+ default: "";
552
+ };
553
+ showPreview: {
554
+ default: true;
555
+ };
556
+ previewWidth: {
557
+ default: undefined;
558
+ type: "number";
559
+ };
560
+ };
561
+ content: "none";
562
+ isFileBlock: true;
563
+ fileBlockAccept: string[];
564
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
565
+ };
566
+ audio: {
567
+ config: {
568
+ type: "audio";
569
+ propSchema: {
570
+ backgroundColor: {
571
+ default: "default";
572
+ };
573
+ name: {
574
+ default: "";
575
+ };
576
+ url: {
577
+ default: "";
578
+ };
579
+ caption: {
580
+ default: "";
581
+ };
582
+ showPreview: {
583
+ default: true;
584
+ };
585
+ };
586
+ content: "none";
587
+ isFileBlock: true;
588
+ fileBlockAccept: string[];
589
+ };
590
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
591
+ type: "audio";
592
+ propSchema: {
593
+ backgroundColor: {
594
+ default: "default";
595
+ };
596
+ name: {
597
+ default: "";
598
+ };
599
+ url: {
600
+ default: "";
601
+ };
602
+ caption: {
603
+ default: "";
604
+ };
605
+ showPreview: {
606
+ default: true;
607
+ };
608
+ };
609
+ content: "none";
610
+ isFileBlock: true;
611
+ fileBlockAccept: string[];
612
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
613
+ };
614
+ }> & import("@blocknote/core").BlockSchemaFromSpecs<{
615
+ pageBreak: {
616
+ config: {
617
+ type: "pageBreak";
618
+ propSchema: {};
619
+ content: "none";
620
+ isFileBlock: false;
621
+ isSelectable: false;
622
+ };
623
+ implementation: import("@blocknote/core").TiptapBlockImplementation<{
624
+ type: "pageBreak";
625
+ propSchema: {};
626
+ content: "none";
627
+ isFileBlock: false;
628
+ isSelectable: false;
629
+ }, any, import("@blocknote/core").InlineContentSchema, import("@blocknote/core").StyleSchema>;
630
+ };
631
+ }>, any, any, import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, import("react").ReactElement<import("react").ForwardRefExoticComponent<Readonly<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref">> & import("react").RefAttributes<HTMLAnchorElement>>, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<HTMLSpanElement, string | import("react").JSXElementConstructor<any>>>;
632
+ export {};
@@ -1,3 +1,18 @@
1
+ import { type ReactEmailTextStyles } from "./blocks.js";
2
+ import { type ReactEmailLinkStyles } from "./inlinecontent.js";
3
+ import { type ReactEmailStyleTransformStyles } from "./styles.js";
4
+ export { reactEmailBlockMappingForDefaultSchema } from "./blocks.js";
5
+ export { reactEmailInlineContentMappingForDefaultSchema } from "./inlinecontent.js";
6
+ export { reactEmailStyleMappingForDefaultSchema } from "./styles.js";
7
+ export { createReactEmailBlockMappingForDefaultSchema, type ReactEmailTextStyles, defaultReactEmailTextStyles, } from "./blocks.js";
8
+ export { createReactEmailInlineContentMappingForDefaultSchema, type ReactEmailLinkStyles, defaultReactEmailLinkStyles, } from "./inlinecontent.js";
9
+ export { createReactEmailStyleMappingForDefaultSchema, type ReactEmailStyleTransformStyles, defaultReactEmailStyleTransformStyles, } from "./styles.js";
10
+ export interface ReactEmailDefaultSchemaStyles {
11
+ textStyles?: ReactEmailTextStyles;
12
+ linkStyles?: ReactEmailLinkStyles;
13
+ styleTransformStyles?: ReactEmailStyleTransformStyles;
14
+ }
15
+ export declare const defaultReactEmailDefaultSchemaStyles: ReactEmailDefaultSchemaStyles;
1
16
  export declare const reactEmailDefaultSchemaMappings: {
2
17
  blockMapping: import("@blocknote/core").BlockMapping<import("@blocknote/core").BlockSchemaFromSpecs<{
3
18
  paragraph: {
@@ -652,3 +667,4 @@ export declare const reactEmailDefaultSchemaMappings: {
652
667
  };
653
668
  }>, import("react").CSSProperties>;
654
669
  };
670
+ export declare const reactEmailDefaultSchemaMappingsWithStyles: (styles?: ReactEmailDefaultSchemaStyles) => typeof reactEmailDefaultSchemaMappings;