monto-email-core 0.0.12 → 0.0.14
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/Reader/core.d.ts +21 -180
- package/dist/Reader/core.d.ts.map +1 -1
- package/dist/Reader/core.js +4 -8
- package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.d.ts +5 -5
- package/dist/blocks/ColumnsContainer/ColumnsContainerPropsSchema.js +1 -1
- package/dist/blocks/ColumnsContainer/ColumnsContainerReader.d.ts.map +1 -1
- package/dist/blocks/ColumnsContainer/ColumnsContainerReader.js +60 -55
- package/package.json +4 -5
package/dist/Reader/core.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
export declare function useReaderDocument(): TReaderDocument;
|
|
3
4
|
export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", any>, import("@usewaypoint/document-core").BlockConfiguration<{
|
|
4
5
|
ColumnsContainer: z.ZodObject<{
|
|
5
6
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -48,7 +49,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
48
49
|
}>, "many">;
|
|
49
50
|
fixedWidths: z.ZodNullable<z.ZodOptional<z.ZodTuple<[z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>], null>>>;
|
|
50
51
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
51
|
-
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
|
|
52
|
+
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom", "stretch"]>>>;
|
|
52
53
|
}, "strip", z.ZodTypeAny, {
|
|
53
54
|
columns: {
|
|
54
55
|
childrenIds: string[];
|
|
@@ -56,7 +57,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
56
57
|
columnsCount?: number | null | undefined;
|
|
57
58
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
58
59
|
columnsGap?: number | null | undefined;
|
|
59
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
60
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
60
61
|
}, {
|
|
61
62
|
columns: {
|
|
62
63
|
childrenIds: string[];
|
|
@@ -64,7 +65,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
64
65
|
columnsCount?: number | null | undefined;
|
|
65
66
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
66
67
|
columnsGap?: number | null | undefined;
|
|
67
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
68
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
68
69
|
}>>>;
|
|
69
70
|
}, "strip", z.ZodTypeAny, {
|
|
70
71
|
style?: {
|
|
@@ -83,7 +84,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
83
84
|
columnsCount?: number | null | undefined;
|
|
84
85
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
85
86
|
columnsGap?: number | null | undefined;
|
|
86
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
87
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
87
88
|
} | null | undefined;
|
|
88
89
|
}, {
|
|
89
90
|
style?: {
|
|
@@ -102,7 +103,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
102
103
|
columnsCount?: number | null | undefined;
|
|
103
104
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
104
105
|
columnsGap?: number | null | undefined;
|
|
105
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
106
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
106
107
|
} | null | undefined;
|
|
107
108
|
}>;
|
|
108
109
|
Container: z.ZodObject<{
|
|
@@ -213,91 +214,6 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
213
214
|
textColor?: string | null | undefined;
|
|
214
215
|
fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
215
216
|
}>;
|
|
216
|
-
Avatar: z.ZodObject<{
|
|
217
|
-
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
218
|
-
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>>;
|
|
219
|
-
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
220
|
-
top: z.ZodNumber;
|
|
221
|
-
bottom: z.ZodNumber;
|
|
222
|
-
right: z.ZodNumber;
|
|
223
|
-
left: z.ZodNumber;
|
|
224
|
-
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
top: number;
|
|
226
|
-
bottom: number;
|
|
227
|
-
right: number;
|
|
228
|
-
left: number;
|
|
229
|
-
}, {
|
|
230
|
-
top: number;
|
|
231
|
-
bottom: number;
|
|
232
|
-
right: number;
|
|
233
|
-
left: number;
|
|
234
|
-
}>>>;
|
|
235
|
-
}, "strip", z.ZodTypeAny, {
|
|
236
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
237
|
-
padding?: {
|
|
238
|
-
top: number;
|
|
239
|
-
bottom: number;
|
|
240
|
-
right: number;
|
|
241
|
-
left: number;
|
|
242
|
-
} | null | undefined;
|
|
243
|
-
}, {
|
|
244
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
245
|
-
padding?: {
|
|
246
|
-
top: number;
|
|
247
|
-
bottom: number;
|
|
248
|
-
right: number;
|
|
249
|
-
left: number;
|
|
250
|
-
} | null | undefined;
|
|
251
|
-
}>>>;
|
|
252
|
-
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
253
|
-
size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
254
|
-
shape: z.ZodNullable<z.ZodOptional<z.ZodEnum<["circle", "square", "rounded"]>>>;
|
|
255
|
-
imageUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
256
|
-
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
257
|
-
}, "strip", z.ZodTypeAny, {
|
|
258
|
-
size?: number | null | undefined;
|
|
259
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
260
|
-
imageUrl?: string | null | undefined;
|
|
261
|
-
alt?: string | null | undefined;
|
|
262
|
-
}, {
|
|
263
|
-
size?: number | null | undefined;
|
|
264
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
265
|
-
imageUrl?: string | null | undefined;
|
|
266
|
-
alt?: string | null | undefined;
|
|
267
|
-
}>>>;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
style?: {
|
|
270
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
271
|
-
padding?: {
|
|
272
|
-
top: number;
|
|
273
|
-
bottom: number;
|
|
274
|
-
right: number;
|
|
275
|
-
left: number;
|
|
276
|
-
} | null | undefined;
|
|
277
|
-
} | null | undefined;
|
|
278
|
-
props?: {
|
|
279
|
-
size?: number | null | undefined;
|
|
280
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
281
|
-
imageUrl?: string | null | undefined;
|
|
282
|
-
alt?: string | null | undefined;
|
|
283
|
-
} | null | undefined;
|
|
284
|
-
}, {
|
|
285
|
-
style?: {
|
|
286
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
287
|
-
padding?: {
|
|
288
|
-
top: number;
|
|
289
|
-
bottom: number;
|
|
290
|
-
right: number;
|
|
291
|
-
left: number;
|
|
292
|
-
} | null | undefined;
|
|
293
|
-
} | null | undefined;
|
|
294
|
-
props?: {
|
|
295
|
-
size?: number | null | undefined;
|
|
296
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
297
|
-
imageUrl?: string | null | undefined;
|
|
298
|
-
alt?: string | null | undefined;
|
|
299
|
-
} | null | undefined;
|
|
300
|
-
}>;
|
|
301
217
|
Button: z.ZodObject<{
|
|
302
218
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
303
219
|
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -638,10 +554,13 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
638
554
|
}>>>;
|
|
639
555
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
640
556
|
contents: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
557
|
+
isHtmlEditor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
641
558
|
}, "strip", z.ZodTypeAny, {
|
|
559
|
+
isHtmlEditor: boolean;
|
|
642
560
|
contents?: string | null | undefined;
|
|
643
561
|
}, {
|
|
644
562
|
contents?: string | null | undefined;
|
|
563
|
+
isHtmlEditor?: boolean | undefined;
|
|
645
564
|
}>>>;
|
|
646
565
|
}, "strip", z.ZodTypeAny, {
|
|
647
566
|
style?: {
|
|
@@ -658,6 +577,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
658
577
|
} | null | undefined;
|
|
659
578
|
} | null | undefined;
|
|
660
579
|
props?: {
|
|
580
|
+
isHtmlEditor: boolean;
|
|
661
581
|
contents?: string | null | undefined;
|
|
662
582
|
} | null | undefined;
|
|
663
583
|
}, {
|
|
@@ -676,6 +596,7 @@ export declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"ty
|
|
|
676
596
|
} | null | undefined;
|
|
677
597
|
props?: {
|
|
678
598
|
contents?: string | null | undefined;
|
|
599
|
+
isHtmlEditor?: boolean | undefined;
|
|
679
600
|
} | null | undefined;
|
|
680
601
|
}>;
|
|
681
602
|
Image: z.ZodObject<{
|
|
@@ -1190,7 +1111,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1190
1111
|
}>, "many">;
|
|
1191
1112
|
fixedWidths: z.ZodNullable<z.ZodOptional<z.ZodTuple<[z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>], null>>>;
|
|
1192
1113
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1193
|
-
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
|
|
1114
|
+
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom", "stretch"]>>>;
|
|
1194
1115
|
}, "strip", z.ZodTypeAny, {
|
|
1195
1116
|
columns: {
|
|
1196
1117
|
childrenIds: string[];
|
|
@@ -1198,7 +1119,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1198
1119
|
columnsCount?: number | null | undefined;
|
|
1199
1120
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
1200
1121
|
columnsGap?: number | null | undefined;
|
|
1201
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
1122
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
1202
1123
|
}, {
|
|
1203
1124
|
columns: {
|
|
1204
1125
|
childrenIds: string[];
|
|
@@ -1206,7 +1127,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1206
1127
|
columnsCount?: number | null | undefined;
|
|
1207
1128
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
1208
1129
|
columnsGap?: number | null | undefined;
|
|
1209
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
1130
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
1210
1131
|
}>>>;
|
|
1211
1132
|
}, "strip", z.ZodTypeAny, {
|
|
1212
1133
|
style?: {
|
|
@@ -1225,7 +1146,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1225
1146
|
columnsCount?: number | null | undefined;
|
|
1226
1147
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
1227
1148
|
columnsGap?: number | null | undefined;
|
|
1228
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
1149
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
1229
1150
|
} | null | undefined;
|
|
1230
1151
|
}, {
|
|
1231
1152
|
style?: {
|
|
@@ -1244,7 +1165,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1244
1165
|
columnsCount?: number | null | undefined;
|
|
1245
1166
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
1246
1167
|
columnsGap?: number | null | undefined;
|
|
1247
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
1168
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
1248
1169
|
} | null | undefined;
|
|
1249
1170
|
}>;
|
|
1250
1171
|
Container: z.ZodObject<{
|
|
@@ -1355,91 +1276,6 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1355
1276
|
textColor?: string | null | undefined;
|
|
1356
1277
|
fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
1357
1278
|
}>;
|
|
1358
|
-
Avatar: z.ZodObject<{
|
|
1359
|
-
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1360
|
-
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>>;
|
|
1361
|
-
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1362
|
-
top: z.ZodNumber;
|
|
1363
|
-
bottom: z.ZodNumber;
|
|
1364
|
-
right: z.ZodNumber;
|
|
1365
|
-
left: z.ZodNumber;
|
|
1366
|
-
}, "strip", z.ZodTypeAny, {
|
|
1367
|
-
top: number;
|
|
1368
|
-
bottom: number;
|
|
1369
|
-
right: number;
|
|
1370
|
-
left: number;
|
|
1371
|
-
}, {
|
|
1372
|
-
top: number;
|
|
1373
|
-
bottom: number;
|
|
1374
|
-
right: number;
|
|
1375
|
-
left: number;
|
|
1376
|
-
}>>>;
|
|
1377
|
-
}, "strip", z.ZodTypeAny, {
|
|
1378
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
1379
|
-
padding?: {
|
|
1380
|
-
top: number;
|
|
1381
|
-
bottom: number;
|
|
1382
|
-
right: number;
|
|
1383
|
-
left: number;
|
|
1384
|
-
} | null | undefined;
|
|
1385
|
-
}, {
|
|
1386
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
1387
|
-
padding?: {
|
|
1388
|
-
top: number;
|
|
1389
|
-
bottom: number;
|
|
1390
|
-
right: number;
|
|
1391
|
-
left: number;
|
|
1392
|
-
} | null | undefined;
|
|
1393
|
-
}>>>;
|
|
1394
|
-
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1395
|
-
size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1396
|
-
shape: z.ZodNullable<z.ZodOptional<z.ZodEnum<["circle", "square", "rounded"]>>>;
|
|
1397
|
-
imageUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1398
|
-
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1399
|
-
}, "strip", z.ZodTypeAny, {
|
|
1400
|
-
size?: number | null | undefined;
|
|
1401
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
1402
|
-
imageUrl?: string | null | undefined;
|
|
1403
|
-
alt?: string | null | undefined;
|
|
1404
|
-
}, {
|
|
1405
|
-
size?: number | null | undefined;
|
|
1406
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
1407
|
-
imageUrl?: string | null | undefined;
|
|
1408
|
-
alt?: string | null | undefined;
|
|
1409
|
-
}>>>;
|
|
1410
|
-
}, "strip", z.ZodTypeAny, {
|
|
1411
|
-
style?: {
|
|
1412
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
1413
|
-
padding?: {
|
|
1414
|
-
top: number;
|
|
1415
|
-
bottom: number;
|
|
1416
|
-
right: number;
|
|
1417
|
-
left: number;
|
|
1418
|
-
} | null | undefined;
|
|
1419
|
-
} | null | undefined;
|
|
1420
|
-
props?: {
|
|
1421
|
-
size?: number | null | undefined;
|
|
1422
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
1423
|
-
imageUrl?: string | null | undefined;
|
|
1424
|
-
alt?: string | null | undefined;
|
|
1425
|
-
} | null | undefined;
|
|
1426
|
-
}, {
|
|
1427
|
-
style?: {
|
|
1428
|
-
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
1429
|
-
padding?: {
|
|
1430
|
-
top: number;
|
|
1431
|
-
bottom: number;
|
|
1432
|
-
right: number;
|
|
1433
|
-
left: number;
|
|
1434
|
-
} | null | undefined;
|
|
1435
|
-
} | null | undefined;
|
|
1436
|
-
props?: {
|
|
1437
|
-
size?: number | null | undefined;
|
|
1438
|
-
shape?: "circle" | "square" | "rounded" | null | undefined;
|
|
1439
|
-
imageUrl?: string | null | undefined;
|
|
1440
|
-
alt?: string | null | undefined;
|
|
1441
|
-
} | null | undefined;
|
|
1442
|
-
}>;
|
|
1443
1279
|
Button: z.ZodObject<{
|
|
1444
1280
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1445
1281
|
backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1780,10 +1616,13 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1780
1616
|
}>>>;
|
|
1781
1617
|
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
1782
1618
|
contents: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1619
|
+
isHtmlEditor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1783
1620
|
}, "strip", z.ZodTypeAny, {
|
|
1621
|
+
isHtmlEditor: boolean;
|
|
1784
1622
|
contents?: string | null | undefined;
|
|
1785
1623
|
}, {
|
|
1786
1624
|
contents?: string | null | undefined;
|
|
1625
|
+
isHtmlEditor?: boolean | undefined;
|
|
1787
1626
|
}>>>;
|
|
1788
1627
|
}, "strip", z.ZodTypeAny, {
|
|
1789
1628
|
style?: {
|
|
@@ -1800,6 +1639,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1800
1639
|
} | null | undefined;
|
|
1801
1640
|
} | null | undefined;
|
|
1802
1641
|
props?: {
|
|
1642
|
+
isHtmlEditor: boolean;
|
|
1803
1643
|
contents?: string | null | undefined;
|
|
1804
1644
|
} | null | undefined;
|
|
1805
1645
|
}, {
|
|
@@ -1818,6 +1658,7 @@ export declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects
|
|
|
1818
1658
|
} | null | undefined;
|
|
1819
1659
|
props?: {
|
|
1820
1660
|
contents?: string | null | undefined;
|
|
1661
|
+
isHtmlEditor?: boolean | undefined;
|
|
1821
1662
|
} | null | undefined;
|
|
1822
1663
|
}>;
|
|
1823
1664
|
Image: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/Reader/core.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/Reader/core.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,wBAAgB,iBAAiB,oBAEhC;AAqDD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAnEiB,CAAC;oBACtB,CAAC;sBAA+C,CAAC;sBAIlB,CAAC;qBAEtD,CAAC;mBAGkC,CAAC;;;;;;;2BAO1B,CAAC;oBACuB,CAAC;sBAGrC,CAAA;sBAQI,CAAC;qBAEc,CAAC;mBAIP,CAAA;;;;;;;;;;;;;;;;iCAoCyB,CAAC;uBAEb,CAA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M,EAAE,YAAY,CAAC,CAAC;AAI3D,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,CAAC;AAC3E,wBAAgB,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,iBAAiB,4BAuB5E;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;IAC5D,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,YAAY,qBAOrE"}
|
package/dist/Reader/core.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { createContext, useContext } from 'react';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { Avatar, AvatarPropsSchema } from '@usewaypoint/block-avatar';
|
|
4
3
|
import { Button, ButtonPropsSchema } from '@usewaypoint/block-button';
|
|
5
4
|
import { Divider, DividerPropsSchema } from '@usewaypoint/block-divider';
|
|
6
5
|
import { Heading, HeadingPropsSchema } from '@usewaypoint/block-heading';
|
|
7
|
-
import { Html, HtmlPropsSchema } from '
|
|
6
|
+
import { Html, HtmlPropsSchema } from 'monto-email-block-html';
|
|
8
7
|
import { Image, ImagePropsSchema } from '@usewaypoint/block-image';
|
|
9
8
|
import { Spacer, SpacerPropsSchema } from '@usewaypoint/block-spacer';
|
|
10
9
|
import { Text, TextPropsSchema } from '@usewaypoint/block-text';
|
|
@@ -23,7 +22,7 @@ function VideoWrapper(props) {
|
|
|
23
22
|
return result !== null && result !== void 0 ? result : React.createElement("div", null);
|
|
24
23
|
}
|
|
25
24
|
const ReaderContext = createContext({});
|
|
26
|
-
function useReaderDocument() {
|
|
25
|
+
export function useReaderDocument() {
|
|
27
26
|
return useContext(ReaderContext);
|
|
28
27
|
}
|
|
29
28
|
const READER_DICTIONARY = buildBlockConfigurationDictionary({
|
|
@@ -39,11 +38,6 @@ const READER_DICTIONARY = buildBlockConfigurationDictionary({
|
|
|
39
38
|
schema: EmailLayoutPropsSchema,
|
|
40
39
|
Component: EmailLayoutReader,
|
|
41
40
|
},
|
|
42
|
-
//
|
|
43
|
-
Avatar: {
|
|
44
|
-
schema: AvatarPropsSchema,
|
|
45
|
-
Component: Avatar,
|
|
46
|
-
},
|
|
47
41
|
Button: {
|
|
48
42
|
schema: ButtonPropsSchema,
|
|
49
43
|
Component: Button,
|
|
@@ -103,7 +97,9 @@ export function ReaderBlock({ id, document: documentProp }) {
|
|
|
103
97
|
return React.createElement(BaseReaderBlock, Object.assign({}, block));
|
|
104
98
|
}));
|
|
105
99
|
}
|
|
100
|
+
const STRETCH_BLOCK_WRAPPER_STYLE = `[data-stretch-block-wrapper] > * { height: 100%; min-height: 0; box-sizing: border-box; }`;
|
|
106
101
|
export default function Reader({ document, rootBlockId }) {
|
|
107
102
|
return (React.createElement(ReaderContext.Provider, { value: document },
|
|
103
|
+
React.createElement("style", null, STRETCH_BLOCK_WRAPPER_STYLE),
|
|
108
104
|
React.createElement(ReaderBlock, { id: rootBlockId, document: document })));
|
|
109
105
|
}
|
|
@@ -46,7 +46,7 @@ declare const ColumnsContainerPropsSchema: z.ZodObject<{
|
|
|
46
46
|
}>, "many">;
|
|
47
47
|
fixedWidths: z.ZodNullable<z.ZodOptional<z.ZodTuple<[z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>, z.ZodOptional<z.ZodNullable<z.ZodNumber>>], null>>>;
|
|
48
48
|
columnsGap: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
49
|
-
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
|
|
49
|
+
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom", "stretch"]>>>;
|
|
50
50
|
}, "strip", z.ZodTypeAny, {
|
|
51
51
|
columns: {
|
|
52
52
|
childrenIds: string[];
|
|
@@ -54,7 +54,7 @@ declare const ColumnsContainerPropsSchema: z.ZodObject<{
|
|
|
54
54
|
columnsCount?: number | null | undefined;
|
|
55
55
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
56
56
|
columnsGap?: number | null | undefined;
|
|
57
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
57
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
58
58
|
}, {
|
|
59
59
|
columns: {
|
|
60
60
|
childrenIds: string[];
|
|
@@ -62,7 +62,7 @@ declare const ColumnsContainerPropsSchema: z.ZodObject<{
|
|
|
62
62
|
columnsCount?: number | null | undefined;
|
|
63
63
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
64
64
|
columnsGap?: number | null | undefined;
|
|
65
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
65
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
66
66
|
}>>>;
|
|
67
67
|
}, "strip", z.ZodTypeAny, {
|
|
68
68
|
style?: {
|
|
@@ -81,7 +81,7 @@ declare const ColumnsContainerPropsSchema: z.ZodObject<{
|
|
|
81
81
|
columnsCount?: number | null | undefined;
|
|
82
82
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
83
83
|
columnsGap?: number | null | undefined;
|
|
84
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
84
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
85
85
|
} | null | undefined;
|
|
86
86
|
}, {
|
|
87
87
|
style?: {
|
|
@@ -100,7 +100,7 @@ declare const ColumnsContainerPropsSchema: z.ZodObject<{
|
|
|
100
100
|
columnsCount?: number | null | undefined;
|
|
101
101
|
fixedWidths?: [number | null | undefined, number | null | undefined, number | null | undefined, number | null | undefined] | null | undefined;
|
|
102
102
|
columnsGap?: number | null | undefined;
|
|
103
|
-
contentAlignment?: "top" | "middle" | "bottom" | null | undefined;
|
|
103
|
+
contentAlignment?: "top" | "middle" | "bottom" | "stretch" | null | undefined;
|
|
104
104
|
} | null | undefined;
|
|
105
105
|
}>;
|
|
106
106
|
export default ColumnsContainerPropsSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ColumnsContainerPropsSchema as BaseColumnsContainerPropsSchema } from '
|
|
2
|
+
import { ColumnsContainerPropsSchema as BaseColumnsContainerPropsSchema } from 'monto-email-block-columns-container';
|
|
3
3
|
const BasePropsShape = BaseColumnsContainerPropsSchema.shape.props.unwrap().unwrap().shape;
|
|
4
4
|
const ColumnsContainerPropsSchema = z.object({
|
|
5
5
|
style: BaseColumnsContainerPropsSchema.shape.style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnsContainerReader.d.ts","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerReader.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ColumnsContainerReader.d.ts","sourceRoot":"","sources":["../../../src/blocks/ColumnsContainer/ColumnsContainerReader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAmCtE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,qBAAqB,qBAgFrF"}
|
|
@@ -10,64 +10,69 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import { ReaderBlock, useReaderDocument } from '../../Reader/core';
|
|
14
|
+
const STRETCH_BLOCK_TYPES = ['Heading', 'Text', 'Container'];
|
|
15
|
+
const CONTENT_ALIGNMENT_MAP = {
|
|
16
|
+
top: 'flex-start',
|
|
17
|
+
middle: 'center',
|
|
18
|
+
bottom: 'flex-end',
|
|
19
|
+
stretch: 'stretch',
|
|
20
|
+
};
|
|
21
|
+
const COLUMN_WORD_WRAP = {
|
|
22
|
+
wordWrap: 'break-word',
|
|
23
|
+
wordBreak: 'break-word',
|
|
24
|
+
overflowWrap: 'break-word',
|
|
25
|
+
};
|
|
26
|
+
/** 不等分比例时:小列 0 0 X%,大列 flex: 1 1 0 铺满剩余;数值 <=100 视为百分比 */
|
|
27
|
+
function getColumnFlex(fixedWidths, index, count) {
|
|
28
|
+
const fixedW = fixedWidths === null || fixedWidths === void 0 ? void 0 : fixedWidths[index];
|
|
29
|
+
if (fixedW == null)
|
|
30
|
+
return '1 1 0';
|
|
31
|
+
const inUse = (fixedWidths ? Array.from(fixedWidths) : []).slice(0, count).filter((v) => v != null);
|
|
32
|
+
const usePercentage = inUse.length > 0 && inUse.every((v) => v <= 100);
|
|
33
|
+
if (usePercentage) {
|
|
34
|
+
const maxVal = Math.max(...inUse);
|
|
35
|
+
if (fixedW === maxVal)
|
|
36
|
+
return '1 1 0';
|
|
37
|
+
return `0 0 ${fixedW}%`;
|
|
38
|
+
}
|
|
39
|
+
return `0 0 ${fixedW}px`;
|
|
40
|
+
}
|
|
15
41
|
export default function ColumnsContainerReader({ style, props }) {
|
|
16
|
-
var _a, _b, _c;
|
|
17
|
-
const
|
|
42
|
+
var _a, _b, _c, _d, _e;
|
|
43
|
+
const document = useReaderDocument();
|
|
44
|
+
const _f = props !== null && props !== void 0 ? props : {}, { columns, columnsCount } = _f, restProps = __rest(_f, ["columns", "columnsCount"]);
|
|
18
45
|
const count = columnsCount !== null && columnsCount !== void 0 ? columnsCount : ((_a = columns === null || columns === void 0 ? void 0 : columns.length) !== null && _a !== void 0 ? _a : 3);
|
|
19
|
-
|
|
46
|
+
const columnsGap = (restProps && 'columnsGap' in restProps) ? (_b = restProps.columnsGap) !== null && _b !== void 0 ? _b : 0 : 0;
|
|
47
|
+
const contentAlignment = (restProps && 'contentAlignment' in restProps) ? (_c = restProps.contentAlignment) !== null && _c !== void 0 ? _c : 'middle' : 'middle';
|
|
48
|
+
const fixedWidths = (restProps && 'fixedWidths' in restProps) ? restProps.fixedWidths : undefined;
|
|
49
|
+
const isStretch = contentAlignment === 'stretch';
|
|
50
|
+
let cols;
|
|
20
51
|
if (columns) {
|
|
21
|
-
cols = columns.map((col) => col.childrenIds.map((childId) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const fixedWidths = (restProps && 'fixedWidths' in restProps) ? restProps.fixedWidths : undefined;
|
|
28
|
-
// 计算列宽
|
|
29
|
-
const getColumnWidth = (index) => {
|
|
30
|
-
if (fixedWidths && fixedWidths[index] !== null && fixedWidths[index] !== undefined) {
|
|
31
|
-
return `${fixedWidths[index]}%`;
|
|
52
|
+
cols = columns.map((col) => col.childrenIds.map((childId) => {
|
|
53
|
+
var _a;
|
|
54
|
+
const blockType = (_a = document[childId]) === null || _a === void 0 ? void 0 : _a.type;
|
|
55
|
+
const content = React.createElement(ReaderBlock, { key: childId, id: childId });
|
|
56
|
+
if (isStretch && blockType && STRETCH_BLOCK_TYPES.includes(blockType)) {
|
|
57
|
+
return (React.createElement("div", { key: childId, "data-stretch-block-wrapper": "true", style: { height: '100%', minHeight: 0, display: 'flex', flexDirection: 'column' } }, content));
|
|
32
58
|
}
|
|
33
|
-
return
|
|
34
|
-
};
|
|
35
|
-
// 对于HTML邮件,使用table布局
|
|
36
|
-
const paddingStyle = (style === null || style === void 0 ? void 0 : style.padding)
|
|
37
|
-
? {
|
|
38
|
-
paddingTop: `${style.padding.top}px`,
|
|
39
|
-
paddingRight: `${style.padding.right}px`,
|
|
40
|
-
paddingBottom: `${style.padding.bottom}px`,
|
|
41
|
-
paddingLeft: `${style.padding.left}px`,
|
|
42
|
-
}
|
|
43
|
-
: {};
|
|
44
|
-
const backgroundColorStyle = (style === null || style === void 0 ? void 0 : style.backgroundColor)
|
|
45
|
-
? { backgroundColor: style.backgroundColor }
|
|
46
|
-
: {};
|
|
47
|
-
return (React.createElement("table", { role: "presentation", cellSpacing: "0", cellPadding: "0", border: 0, width: "100%", style: Object.assign(Object.assign({ width: '100%', tableLayout: 'fixed' }, paddingStyle), backgroundColorStyle) },
|
|
48
|
-
React.createElement("tbody", null,
|
|
49
|
-
React.createElement("tr", null, cols === null || cols === void 0 ? void 0 : cols.map((col, index) => (React.createElement("td", { key: index, width: getColumnWidth(index), style: {
|
|
50
|
-
width: getColumnWidth(index),
|
|
51
|
-
verticalAlign: contentAlignment === 'top' ? 'top' : contentAlignment === 'bottom' ? 'bottom' : 'middle',
|
|
52
|
-
paddingLeft: index > 0 ? `${columnsGap / 2}px` : '0',
|
|
53
|
-
paddingRight: index < (count - 1) ? `${columnsGap / 2}px` : '0',
|
|
54
|
-
} }, col)))))));
|
|
55
|
-
}
|
|
56
|
-
// 对于 2 或 3 列,使用 BaseColumnsContainer
|
|
57
|
-
// 需要过滤掉 fixedWidths 的第4个元素(如果存在)
|
|
58
|
-
let baseFixedWidths = undefined;
|
|
59
|
-
if (restProps && 'fixedWidths' in restProps && restProps.fixedWidths) {
|
|
60
|
-
baseFixedWidths = [restProps.fixedWidths[0], restProps.fixedWidths[1], restProps.fixedWidths[2]];
|
|
61
|
-
}
|
|
62
|
-
// 创建不包含 fixedWidths 的 baseProps
|
|
63
|
-
const baseProps = Object.assign(Object.assign({}, (restProps && typeof restProps === 'object' ? restProps : {})), { columnsCount: count });
|
|
64
|
-
// 如果有 fixedWidths,只取前3个元素
|
|
65
|
-
if (baseFixedWidths !== undefined) {
|
|
66
|
-
baseProps.fixedWidths = baseFixedWidths;
|
|
67
|
-
}
|
|
68
|
-
else if (restProps && 'fixedWidths' in restProps) {
|
|
69
|
-
// 如果原 fixedWidths 是 null 或 undefined,也传递 null
|
|
70
|
-
baseProps.fixedWidths = null;
|
|
59
|
+
return content;
|
|
60
|
+
}));
|
|
71
61
|
}
|
|
72
|
-
|
|
62
|
+
const wStyle = Object.assign({ backgroundColor: (_d = style === null || style === void 0 ? void 0 : style.backgroundColor) !== null && _d !== void 0 ? _d : undefined, padding: (style === null || style === void 0 ? void 0 : style.padding)
|
|
63
|
+
? `${style.padding.top}px ${style.padding.right}px ${style.padding.bottom}px ${style.padding.left}px`
|
|
64
|
+
: undefined }, (isStretch && { height: '100%', display: 'flex', flexDirection: 'column', minHeight: 0 }));
|
|
65
|
+
const alignItems = (_e = CONTENT_ALIGNMENT_MAP[contentAlignment]) !== null && _e !== void 0 ? _e : 'center';
|
|
66
|
+
const flexRowStyle = Object.assign({ display: 'flex', flexDirection: 'row', width: '100%', gap: columnsGap, alignItems }, (isStretch && { flex: 1, minHeight: 0, alignSelf: 'stretch' }));
|
|
67
|
+
return (React.createElement("div", { style: wStyle },
|
|
68
|
+
React.createElement("div", { style: flexRowStyle }, cols === null || cols === void 0 ? void 0 : cols.map((col, index) => {
|
|
69
|
+
var _a;
|
|
70
|
+
if (index >= count)
|
|
71
|
+
return null;
|
|
72
|
+
const flexVal = getColumnFlex(fixedWidths, index, count);
|
|
73
|
+
const flexStyle = Object.assign(Object.assign({ boxSizing: 'content-box', flex: flexVal, minWidth: 0, display: 'flex', flexDirection: 'column' }, (isStretch
|
|
74
|
+
? { minHeight: 0, alignSelf: 'stretch' }
|
|
75
|
+
: { justifyContent: ((_a = CONTENT_ALIGNMENT_MAP[contentAlignment]) !== null && _a !== void 0 ? _a : 'center') })), COLUMN_WORD_WRAP);
|
|
76
|
+
return (React.createElement("div", { key: index, style: flexStyle }, isStretch ? (React.createElement("div", { style: { flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column' } }, col)) : (col)));
|
|
77
|
+
}))));
|
|
73
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monto-email-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"description": "React component to render email messages",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -34,18 +34,17 @@
|
|
|
34
34
|
"zod": "^1 || ^2 || ^3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@usewaypoint/block-avatar": "0.0.3",
|
|
38
37
|
"@usewaypoint/block-button": "0.0.3",
|
|
39
|
-
"@usewaypoint/block-columns-container": "0.0.3",
|
|
40
38
|
"@usewaypoint/block-container": "0.0.2",
|
|
41
39
|
"@usewaypoint/block-divider": "0.0.4",
|
|
42
40
|
"@usewaypoint/block-heading": "0.0.3",
|
|
43
|
-
"@usewaypoint/block-html": "0.0.3",
|
|
44
41
|
"@usewaypoint/block-image": "0.0.5",
|
|
45
42
|
"@usewaypoint/block-spacer": "0.0.3",
|
|
46
43
|
"@usewaypoint/block-text": "0.0.6",
|
|
47
44
|
"@usewaypoint/document-core": "0.0.6",
|
|
45
|
+
"monto-email-block-html": "0.0.1",
|
|
48
46
|
"monto-email-block-video": "0.0.1",
|
|
49
|
-
"monto-email-block-socials": "0.0.
|
|
47
|
+
"monto-email-block-socials": "0.0.6",
|
|
48
|
+
"monto-email-block-columns-container": "0.0.1"
|
|
50
49
|
}
|
|
51
50
|
}
|