@blocknote/xl-email-exporter 0.39.1 → 0.41.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.
- package/dist/blocknote-xl-email-exporter.js +100 -90
- package/dist/blocknote-xl-email-exporter.js.map +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs +1 -1
- package/dist/blocknote-xl-email-exporter.umd.cjs.map +1 -1
- package/dist/webpack-stats.json +1 -1
- package/package.json +3 -3
- package/src/react-email/__snapshots__/reactEmailExporter.test.tsx.snap +3 -3
- package/src/react-email/defaultSchema/blocks.tsx +11 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { mapTableCell as
|
|
3
|
-
import { Text as f, Img as A, CodeBlock as D, dracula as F, Heading as W, Link as k, Section as
|
|
1
|
+
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { mapTableCell as V, Exporter as E, COLORS_DEFAULT as R } from "@blocknote/core";
|
|
3
|
+
import { Text as f, Img as A, CodeBlock as D, dracula as F, Heading as W, Link as k, Section as v, Html as Z, Head as z, Body as N, Preview as _, Tailwind as O } from "@react-email/components";
|
|
4
4
|
import { render as j } from "@react-email/render";
|
|
5
|
-
import
|
|
5
|
+
import I from "react";
|
|
6
6
|
const g = {
|
|
7
7
|
fontSize: 16,
|
|
8
8
|
lineHeight: 1.5,
|
|
@@ -75,16 +75,16 @@ const g = {
|
|
|
75
75
|
codeBlock: {
|
|
76
76
|
style: g
|
|
77
77
|
}
|
|
78
|
-
}, H = (
|
|
78
|
+
}, H = (l = m) => ({
|
|
79
79
|
paragraph: (e, t) => {
|
|
80
80
|
var n;
|
|
81
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ r(
|
|
82
82
|
f,
|
|
83
83
|
{
|
|
84
|
-
...
|
|
84
|
+
...l.paragraph,
|
|
85
85
|
style: {
|
|
86
86
|
...m.paragraph.style,
|
|
87
|
-
...(n =
|
|
87
|
+
...(n = l.paragraph) == null ? void 0 : n.style
|
|
88
88
|
},
|
|
89
89
|
children: t.transformInlineContent(e.content)
|
|
90
90
|
}
|
|
@@ -92,13 +92,13 @@ const g = {
|
|
|
92
92
|
},
|
|
93
93
|
bulletListItem: (e, t) => {
|
|
94
94
|
var n;
|
|
95
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ r(
|
|
96
96
|
f,
|
|
97
97
|
{
|
|
98
|
-
...
|
|
98
|
+
...l.bulletListItem,
|
|
99
99
|
style: {
|
|
100
100
|
...m.bulletListItem.style,
|
|
101
|
-
...(n =
|
|
101
|
+
...(n = l.bulletListItem) == null ? void 0 : n.style
|
|
102
102
|
},
|
|
103
103
|
children: t.transformInlineContent(e.content)
|
|
104
104
|
}
|
|
@@ -106,13 +106,13 @@ const g = {
|
|
|
106
106
|
},
|
|
107
107
|
toggleListItem: (e, t) => {
|
|
108
108
|
var n;
|
|
109
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ r(
|
|
110
110
|
f,
|
|
111
111
|
{
|
|
112
|
-
...
|
|
112
|
+
...l.toggleListItem,
|
|
113
113
|
style: {
|
|
114
114
|
...m.toggleListItem.style,
|
|
115
|
-
...(n =
|
|
115
|
+
...(n = l.toggleListItem) == null ? void 0 : n.style
|
|
116
116
|
},
|
|
117
117
|
children: t.transformInlineContent(e.content)
|
|
118
118
|
}
|
|
@@ -120,13 +120,13 @@ const g = {
|
|
|
120
120
|
},
|
|
121
121
|
numberedListItem: (e, t, n) => {
|
|
122
122
|
var o;
|
|
123
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ r(
|
|
124
124
|
f,
|
|
125
125
|
{
|
|
126
|
-
...
|
|
126
|
+
...l.numberedListItem,
|
|
127
127
|
style: {
|
|
128
128
|
...m.numberedListItem.style,
|
|
129
|
-
...(o =
|
|
129
|
+
...(o = l.numberedListItem) == null ? void 0 : o.style
|
|
130
130
|
},
|
|
131
131
|
children: t.transformInlineContent(e.content)
|
|
132
132
|
}
|
|
@@ -142,7 +142,7 @@ const g = {
|
|
|
142
142
|
viewBox: "0 0 18 18",
|
|
143
143
|
style: { display: "inline", verticalAlign: "middle", marginRight: 8 },
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ r(
|
|
146
146
|
"rect",
|
|
147
147
|
{
|
|
148
148
|
x: "2",
|
|
@@ -155,7 +155,7 @@ const g = {
|
|
|
155
155
|
strokeWidth: "2"
|
|
156
156
|
}
|
|
157
157
|
),
|
|
158
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ r(
|
|
159
159
|
"polyline",
|
|
160
160
|
{
|
|
161
161
|
points: "5,10 8,13 13,6",
|
|
@@ -166,14 +166,14 @@ const g = {
|
|
|
166
166
|
)
|
|
167
167
|
]
|
|
168
168
|
}
|
|
169
|
-
) : /* @__PURE__ */
|
|
169
|
+
) : /* @__PURE__ */ r(
|
|
170
170
|
"svg",
|
|
171
171
|
{
|
|
172
172
|
width: "18",
|
|
173
173
|
height: "18",
|
|
174
174
|
viewBox: "0 0 18 18",
|
|
175
175
|
style: { display: "inline", verticalAlign: "middle", marginRight: 8 },
|
|
176
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ r(
|
|
177
177
|
"rect",
|
|
178
178
|
{
|
|
179
179
|
x: "2",
|
|
@@ -191,28 +191,28 @@ const g = {
|
|
|
191
191
|
return /* @__PURE__ */ h(
|
|
192
192
|
f,
|
|
193
193
|
{
|
|
194
|
-
...
|
|
194
|
+
...l.checkListItem,
|
|
195
195
|
style: {
|
|
196
196
|
...m.checkListItem.style,
|
|
197
|
-
...(s =
|
|
197
|
+
...(s = l.checkListItem) == null ? void 0 : s.style
|
|
198
198
|
},
|
|
199
199
|
children: [
|
|
200
200
|
o,
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ r("span", { children: t.transformInlineContent(e.content) })
|
|
202
202
|
]
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
205
|
},
|
|
206
206
|
heading: (e, t) => {
|
|
207
207
|
var n;
|
|
208
|
-
return /* @__PURE__ */
|
|
208
|
+
return /* @__PURE__ */ r(
|
|
209
209
|
W,
|
|
210
210
|
{
|
|
211
211
|
as: `h${e.props.level}`,
|
|
212
|
-
...
|
|
212
|
+
...l[`heading${e.props.level}`],
|
|
213
213
|
style: {
|
|
214
214
|
...m[`heading${e.props.level}`].style,
|
|
215
|
-
...(n =
|
|
215
|
+
...(n = l[`heading${e.props.level}`]) == null ? void 0 : n.style
|
|
216
216
|
},
|
|
217
217
|
children: t.transformInlineContent(e.content)
|
|
218
218
|
}
|
|
@@ -221,23 +221,23 @@ const g = {
|
|
|
221
221
|
codeBlock: (e) => {
|
|
222
222
|
var n, o;
|
|
223
223
|
const t = ((n = e.content[0]) == null ? void 0 : n.text) || "";
|
|
224
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ r(
|
|
225
225
|
D,
|
|
226
226
|
{
|
|
227
227
|
code: t,
|
|
228
228
|
fontFamily: "'CommitMono', monospace",
|
|
229
229
|
language: e.props.language,
|
|
230
230
|
theme: F,
|
|
231
|
-
...
|
|
231
|
+
...l.codeBlock,
|
|
232
232
|
style: {
|
|
233
233
|
...m.codeBlock.style,
|
|
234
|
-
...(o =
|
|
234
|
+
...(o = l.codeBlock) == null ? void 0 : o.style
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
238
|
},
|
|
239
239
|
audio: (e) => {
|
|
240
|
-
const t = /* @__PURE__ */
|
|
240
|
+
const t = /* @__PURE__ */ r(
|
|
241
241
|
"svg",
|
|
242
242
|
{
|
|
243
243
|
height: "18",
|
|
@@ -245,11 +245,11 @@ const g = {
|
|
|
245
245
|
viewBox: "0 0 24 24",
|
|
246
246
|
fill: "#4F8A10",
|
|
247
247
|
style: { display: "inline", verticalAlign: "middle" },
|
|
248
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ r("path", { d: "M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z" })
|
|
249
249
|
}
|
|
250
250
|
), n = "previewWidth" in e.props ? e.props.previewWidth : void 0;
|
|
251
251
|
return /* @__PURE__ */ h("div", { style: { margin: "8px 0" }, children: [
|
|
252
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ r(
|
|
253
253
|
x,
|
|
254
254
|
{
|
|
255
255
|
url: e.props.url,
|
|
@@ -258,18 +258,18 @@ const g = {
|
|
|
258
258
|
icon: t
|
|
259
259
|
}
|
|
260
260
|
),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
|
|
261
|
+
/* @__PURE__ */ r(
|
|
262
|
+
b,
|
|
263
263
|
{
|
|
264
264
|
caption: e.props.caption,
|
|
265
265
|
width: n,
|
|
266
|
-
textStyles:
|
|
266
|
+
textStyles: l
|
|
267
267
|
}
|
|
268
268
|
)
|
|
269
269
|
] });
|
|
270
270
|
},
|
|
271
271
|
video: (e) => {
|
|
272
|
-
const t = /* @__PURE__ */
|
|
272
|
+
const t = /* @__PURE__ */ r(
|
|
273
273
|
"svg",
|
|
274
274
|
{
|
|
275
275
|
height: "18",
|
|
@@ -277,11 +277,11 @@ const g = {
|
|
|
277
277
|
viewBox: "0 0 24 24",
|
|
278
278
|
fill: "#1976D2",
|
|
279
279
|
style: { display: "inline", verticalAlign: "middle" },
|
|
280
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ r("path", { d: "M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z" })
|
|
281
281
|
}
|
|
282
282
|
), n = "previewWidth" in e.props ? e.props.previewWidth : void 0;
|
|
283
283
|
return /* @__PURE__ */ h("div", { style: { margin: "8px 0" }, children: [
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ r(
|
|
285
285
|
x,
|
|
286
286
|
{
|
|
287
287
|
url: e.props.url,
|
|
@@ -290,18 +290,18 @@ const g = {
|
|
|
290
290
|
icon: t
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
293
|
+
/* @__PURE__ */ r(
|
|
294
|
+
b,
|
|
295
295
|
{
|
|
296
296
|
caption: e.props.caption,
|
|
297
297
|
width: n,
|
|
298
|
-
textStyles:
|
|
298
|
+
textStyles: l
|
|
299
299
|
}
|
|
300
300
|
)
|
|
301
301
|
] });
|
|
302
302
|
},
|
|
303
303
|
file: (e) => {
|
|
304
|
-
const t = /* @__PURE__ */
|
|
304
|
+
const t = /* @__PURE__ */ r(
|
|
305
305
|
"svg",
|
|
306
306
|
{
|
|
307
307
|
height: "18",
|
|
@@ -309,11 +309,11 @@ const g = {
|
|
|
309
309
|
viewBox: "0 0 24 24",
|
|
310
310
|
fill: "#888",
|
|
311
311
|
style: { display: "inline", verticalAlign: "middle" },
|
|
312
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ r("path", { d: "M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z" })
|
|
313
313
|
}
|
|
314
314
|
), n = "previewWidth" in e.props ? e.props.previewWidth : void 0;
|
|
315
315
|
return /* @__PURE__ */ h("div", { style: { margin: "8px 0" }, children: [
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ r(
|
|
317
317
|
x,
|
|
318
318
|
{
|
|
319
319
|
url: e.props.url,
|
|
@@ -322,17 +322,17 @@ const g = {
|
|
|
322
322
|
icon: t
|
|
323
323
|
}
|
|
324
324
|
),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
|
|
325
|
+
/* @__PURE__ */ r(
|
|
326
|
+
b,
|
|
327
327
|
{
|
|
328
328
|
caption: e.props.caption,
|
|
329
329
|
width: n,
|
|
330
|
-
textStyles:
|
|
330
|
+
textStyles: l
|
|
331
331
|
}
|
|
332
332
|
)
|
|
333
333
|
] });
|
|
334
334
|
},
|
|
335
|
-
image: (e) => /* @__PURE__ */
|
|
335
|
+
image: (e) => /* @__PURE__ */ r(
|
|
336
336
|
A,
|
|
337
337
|
{
|
|
338
338
|
src: e.props.url,
|
|
@@ -343,9 +343,9 @@ const g = {
|
|
|
343
343
|
table: (e, t) => {
|
|
344
344
|
const n = e.content;
|
|
345
345
|
if (!n || typeof n != "object" || !Array.isArray(n.rows))
|
|
346
|
-
return /* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ r(f, { ...l.tableError, children: "Table data not available" });
|
|
347
347
|
const o = n.headerRows ?? 0, i = n.headerCols ?? 0;
|
|
348
|
-
return /* @__PURE__ */
|
|
348
|
+
return /* @__PURE__ */ r(
|
|
349
349
|
"table",
|
|
350
350
|
{
|
|
351
351
|
style: {
|
|
@@ -359,10 +359,10 @@ const g = {
|
|
|
359
359
|
border: 0,
|
|
360
360
|
cellPadding: 0,
|
|
361
361
|
cellSpacing: 0,
|
|
362
|
-
children: /* @__PURE__ */
|
|
363
|
-
var
|
|
364
|
-
const c =
|
|
365
|
-
return /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ r("tbody", { children: n.rows.map((s, p) => /* @__PURE__ */ r("tr", { children: s.cells.map((u, a) => {
|
|
363
|
+
var L;
|
|
364
|
+
const c = V(u), d = p < o, w = a < i, C = d || w;
|
|
365
|
+
return /* @__PURE__ */ r(
|
|
366
366
|
C ? "th" : "td",
|
|
367
367
|
{
|
|
368
368
|
style: {
|
|
@@ -373,7 +373,7 @@ const g = {
|
|
|
373
373
|
textAlign: c.props.textAlignment || "left",
|
|
374
374
|
color: c.props.textColor !== "default" ? t.options.colors[c.props.textColor].text : "inherit",
|
|
375
375
|
...m.tableCell.style,
|
|
376
|
-
...(
|
|
376
|
+
...(L = l.tableCell) == null ? void 0 : L.style
|
|
377
377
|
},
|
|
378
378
|
...(c.props.colspan || 1) > 1 && {
|
|
379
379
|
colSpan: c.props.colspan || 1
|
|
@@ -391,10 +391,10 @@ const g = {
|
|
|
391
391
|
},
|
|
392
392
|
quote: (e, t) => {
|
|
393
393
|
var n;
|
|
394
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ r(
|
|
395
395
|
f,
|
|
396
396
|
{
|
|
397
|
-
...
|
|
397
|
+
...l.quote,
|
|
398
398
|
style: {
|
|
399
399
|
borderLeft: "2px solid #bdbdbd",
|
|
400
400
|
padding: "0px 12px",
|
|
@@ -402,13 +402,13 @@ const g = {
|
|
|
402
402
|
color: t.options.colors.gray.text,
|
|
403
403
|
display: "block",
|
|
404
404
|
...m.quote.style,
|
|
405
|
-
...(n =
|
|
405
|
+
...(n = l.quote) == null ? void 0 : n.style
|
|
406
406
|
},
|
|
407
407
|
children: t.transformInlineContent(e.content)
|
|
408
408
|
}
|
|
409
409
|
);
|
|
410
410
|
},
|
|
411
|
-
pageBreak: () => /* @__PURE__ */
|
|
411
|
+
pageBreak: () => /* @__PURE__ */ r(
|
|
412
412
|
"hr",
|
|
413
413
|
{
|
|
414
414
|
style: {
|
|
@@ -417,10 +417,20 @@ const g = {
|
|
|
417
417
|
margin: "24px 0"
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
+
),
|
|
421
|
+
divider: () => /* @__PURE__ */ r(
|
|
422
|
+
"hr",
|
|
423
|
+
{
|
|
424
|
+
style: {
|
|
425
|
+
border: "none",
|
|
426
|
+
borderTop: "1px solid #ccc",
|
|
427
|
+
margin: "11.5px 0"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
420
430
|
)
|
|
421
431
|
}), P = H();
|
|
422
432
|
function x({
|
|
423
|
-
url:
|
|
433
|
+
url: l,
|
|
424
434
|
name: e,
|
|
425
435
|
defaultText: t,
|
|
426
436
|
icon: n
|
|
@@ -428,7 +438,7 @@ function x({
|
|
|
428
438
|
return /* @__PURE__ */ h(
|
|
429
439
|
k,
|
|
430
440
|
{
|
|
431
|
-
href:
|
|
441
|
+
href: l,
|
|
432
442
|
style: {
|
|
433
443
|
textDecoration: "none",
|
|
434
444
|
color: "#333",
|
|
@@ -439,18 +449,18 @@ function x({
|
|
|
439
449
|
},
|
|
440
450
|
children: [
|
|
441
451
|
n,
|
|
442
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ r("span", { style: { verticalAlign: "middle" }, children: e || t })
|
|
443
453
|
]
|
|
444
454
|
}
|
|
445
455
|
);
|
|
446
456
|
}
|
|
447
|
-
function
|
|
448
|
-
caption:
|
|
457
|
+
function b({
|
|
458
|
+
caption: l,
|
|
449
459
|
width: e,
|
|
450
460
|
textStyles: t
|
|
451
461
|
}) {
|
|
452
462
|
var n;
|
|
453
|
-
return
|
|
463
|
+
return l ? /* @__PURE__ */ r(
|
|
454
464
|
f,
|
|
455
465
|
{
|
|
456
466
|
...t.caption,
|
|
@@ -462,18 +472,18 @@ function L({
|
|
|
462
472
|
...m.caption.style,
|
|
463
473
|
...(n = t.caption) == null ? void 0 : n.style
|
|
464
474
|
},
|
|
465
|
-
children:
|
|
475
|
+
children: l
|
|
466
476
|
}
|
|
467
477
|
) : null;
|
|
468
478
|
}
|
|
469
479
|
const M = {
|
|
470
480
|
link: {}
|
|
471
|
-
}, S = (
|
|
472
|
-
link: (e, t) => /* @__PURE__ */ h(k, { href: e.href, ...
|
|
481
|
+
}, S = (l = M) => ({
|
|
482
|
+
link: (e, t) => /* @__PURE__ */ h(k, { href: e.href, ...l.link, children: [
|
|
473
483
|
...e.content.map((n) => t.transformStyledText(n))
|
|
474
484
|
] }),
|
|
475
485
|
text: (e, t) => t.transformStyledText(e)
|
|
476
|
-
}), q = S(), B = {},
|
|
486
|
+
}), q = S(), B = {}, T = (l = B) => ({
|
|
477
487
|
bold: (e) => e ? {
|
|
478
488
|
fontWeight: "bold"
|
|
479
489
|
} : {},
|
|
@@ -496,7 +506,7 @@ const M = {
|
|
|
496
506
|
code: (e) => e ? {
|
|
497
507
|
fontFamily: "GeistMono"
|
|
498
508
|
} : {}
|
|
499
|
-
}), $ =
|
|
509
|
+
}), $ = T(), G = {
|
|
500
510
|
textStyles: m,
|
|
501
511
|
linkStyles: M,
|
|
502
512
|
styleTransformStyles: B
|
|
@@ -504,15 +514,15 @@ const M = {
|
|
|
504
514
|
blockMapping: P,
|
|
505
515
|
inlineContentMapping: q,
|
|
506
516
|
styleMapping: $
|
|
507
|
-
}, ee = (
|
|
517
|
+
}, ee = (l = G) => ({
|
|
508
518
|
blockMapping: H(
|
|
509
|
-
|
|
519
|
+
l.textStyles
|
|
510
520
|
),
|
|
511
521
|
inlineContentMapping: S(
|
|
512
|
-
|
|
522
|
+
l.linkStyles
|
|
513
523
|
),
|
|
514
|
-
styleMapping:
|
|
515
|
-
|
|
524
|
+
styleMapping: T(
|
|
525
|
+
l.styleTransformStyles
|
|
516
526
|
)
|
|
517
527
|
});
|
|
518
528
|
class te extends E {
|
|
@@ -527,7 +537,7 @@ class te extends E {
|
|
|
527
537
|
}
|
|
528
538
|
transformStyledText(e) {
|
|
529
539
|
const t = this.mapStyles(e.styles), n = Object.assign({}, ...t);
|
|
530
|
-
return /* @__PURE__ */
|
|
540
|
+
return /* @__PURE__ */ r(
|
|
531
541
|
"span",
|
|
532
542
|
{
|
|
533
543
|
style: n,
|
|
@@ -559,7 +569,7 @@ class te extends E {
|
|
|
559
569
|
);
|
|
560
570
|
}
|
|
561
571
|
let p;
|
|
562
|
-
return o === "bulletListItem" || o === "toggleListItem" ? p = /* @__PURE__ */
|
|
572
|
+
return o === "bulletListItem" || o === "toggleListItem" ? p = /* @__PURE__ */ r("ul", { className: "mb-2 list-disc pl-6", children: i }, e[t].id + "-ul") : p = /* @__PURE__ */ r(
|
|
563
573
|
"ol",
|
|
564
574
|
{
|
|
565
575
|
className: "mb-2 list-decimal pl-6",
|
|
@@ -596,12 +606,12 @@ class te extends E {
|
|
|
596
606
|
)), u.push(
|
|
597
607
|
/* @__PURE__ */ h("li", { style: C, children: [
|
|
598
608
|
w,
|
|
599
|
-
y.length > 0 && /* @__PURE__ */
|
|
609
|
+
y.length > 0 && /* @__PURE__ */ r("div", { style: { marginTop: "8px" }, children: y })
|
|
600
610
|
] }, d.id)
|
|
601
611
|
);
|
|
602
612
|
}
|
|
603
613
|
p === "bulletListItem" ? o.push(
|
|
604
|
-
/* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ r(
|
|
605
615
|
"ul",
|
|
606
616
|
{
|
|
607
617
|
className: "mb-2 list-disc pl-6",
|
|
@@ -610,7 +620,7 @@ class te extends E {
|
|
|
610
620
|
n + "-ul-nested-" + i
|
|
611
621
|
)
|
|
612
622
|
) : o.push(
|
|
613
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ r(
|
|
614
624
|
"ol",
|
|
615
625
|
{
|
|
616
626
|
className: "mb-2 list-decimal pl-6",
|
|
@@ -623,7 +633,7 @@ class te extends E {
|
|
|
623
633
|
} else {
|
|
624
634
|
const p = await this.transformBlocks([s], t);
|
|
625
635
|
o.push(
|
|
626
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ r(v, { style: { marginLeft: "24px" }, children: p }, s.id)
|
|
627
637
|
), i++;
|
|
628
638
|
}
|
|
629
639
|
}
|
|
@@ -645,19 +655,19 @@ class te extends E {
|
|
|
645
655
|
}
|
|
646
656
|
const s = await this.transformBlocks(i.children, t + 1), p = await this.mapBlock(i, t, 0), u = this.blocknoteDefaultPropsToReactEmailStyle(i.props);
|
|
647
657
|
n.push(
|
|
648
|
-
/* @__PURE__ */ h(
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
s.length > 0 && /* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ h(I.Fragment, { children: [
|
|
659
|
+
/* @__PURE__ */ r(v, { style: u, children: p }),
|
|
660
|
+
s.length > 0 && /* @__PURE__ */ r("div", { style: { marginLeft: "24px" }, children: s })
|
|
651
661
|
] }, i.id)
|
|
652
662
|
), o++;
|
|
653
663
|
}
|
|
654
664
|
return n;
|
|
655
665
|
}
|
|
656
666
|
async toReactEmailDocument(e, t) {
|
|
657
|
-
const n = await this.transformBlocks(e), o = (t == null ? void 0 : t.container) || (({ children: i }) => /* @__PURE__ */
|
|
667
|
+
const n = await this.transformBlocks(e), o = (t == null ? void 0 : t.container) || (({ children: i }) => /* @__PURE__ */ r(I.Fragment, { children: i }));
|
|
658
668
|
return j(
|
|
659
669
|
/* @__PURE__ */ h(Z, { children: [
|
|
660
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ r(z, { children: t == null ? void 0 : t.head }),
|
|
661
671
|
/* @__PURE__ */ h(
|
|
662
672
|
N,
|
|
663
673
|
{
|
|
@@ -668,8 +678,8 @@ class te extends E {
|
|
|
668
678
|
color: "#333"
|
|
669
679
|
},
|
|
670
680
|
children: [
|
|
671
|
-
(t == null ? void 0 : t.preview) && /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
681
|
+
(t == null ? void 0 : t.preview) && /* @__PURE__ */ r(_, { children: t.preview }),
|
|
682
|
+
/* @__PURE__ */ r(O, { children: /* @__PURE__ */ h(o, { children: [
|
|
673
683
|
t == null ? void 0 : t.header,
|
|
674
684
|
n,
|
|
675
685
|
t == null ? void 0 : t.footer
|
|
@@ -693,7 +703,7 @@ export {
|
|
|
693
703
|
te as ReactEmailExporter,
|
|
694
704
|
H as createReactEmailBlockMappingForDefaultSchema,
|
|
695
705
|
S as createReactEmailInlineContentMappingForDefaultSchema,
|
|
696
|
-
|
|
706
|
+
T as createReactEmailStyleMappingForDefaultSchema,
|
|
697
707
|
G as defaultReactEmailDefaultSchemaStyles,
|
|
698
708
|
M as defaultReactEmailLinkStyles,
|
|
699
709
|
B as defaultReactEmailStyleTransformStyles,
|