@rudyzeinoun/email-builder 0.0.33 → 0.0.34
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/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +4 -1
- package/dist/index.mjs +4 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -254,6 +254,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
254
254
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["HELVETICA", "GEORGIA", "MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
|
|
255
255
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
256
256
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
257
|
+
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
257
258
|
}, "strip", z.ZodTypeAny, {
|
|
258
259
|
backdropColor?: string | null | undefined;
|
|
259
260
|
borderColor?: string | null | undefined;
|
|
@@ -263,6 +264,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
263
264
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
264
265
|
childrenIds?: string[] | null | undefined;
|
|
265
266
|
previewText?: string | null | undefined;
|
|
267
|
+
underline?: boolean | null | undefined;
|
|
266
268
|
}, {
|
|
267
269
|
backdropColor?: string | null | undefined;
|
|
268
270
|
borderColor?: string | null | undefined;
|
|
@@ -272,6 +274,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
272
274
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
273
275
|
childrenIds?: string[] | null | undefined;
|
|
274
276
|
previewText?: string | null | undefined;
|
|
277
|
+
underline?: boolean | null | undefined;
|
|
275
278
|
}>;
|
|
276
279
|
Avatar: z.ZodObject<{
|
|
277
280
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -1209,6 +1212,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1209
1212
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["HELVETICA", "GEORGIA", "MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
|
|
1210
1213
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1211
1214
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1215
|
+
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1212
1216
|
}, "strip", z.ZodTypeAny, {
|
|
1213
1217
|
backdropColor?: string | null | undefined;
|
|
1214
1218
|
borderColor?: string | null | undefined;
|
|
@@ -1218,6 +1222,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1218
1222
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
1219
1223
|
childrenIds?: string[] | null | undefined;
|
|
1220
1224
|
previewText?: string | null | undefined;
|
|
1225
|
+
underline?: boolean | null | undefined;
|
|
1221
1226
|
}, {
|
|
1222
1227
|
backdropColor?: string | null | undefined;
|
|
1223
1228
|
borderColor?: string | null | undefined;
|
|
@@ -1227,6 +1232,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1227
1232
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
1228
1233
|
childrenIds?: string[] | null | undefined;
|
|
1229
1234
|
previewText?: string | null | undefined;
|
|
1235
|
+
underline?: boolean | null | undefined;
|
|
1230
1236
|
}>;
|
|
1231
1237
|
Avatar: z.ZodObject<{
|
|
1232
1238
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -254,6 +254,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
254
254
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["HELVETICA", "GEORGIA", "MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
|
|
255
255
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
256
256
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
257
|
+
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
257
258
|
}, "strip", z.ZodTypeAny, {
|
|
258
259
|
backdropColor?: string | null | undefined;
|
|
259
260
|
borderColor?: string | null | undefined;
|
|
@@ -263,6 +264,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
263
264
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
264
265
|
childrenIds?: string[] | null | undefined;
|
|
265
266
|
previewText?: string | null | undefined;
|
|
267
|
+
underline?: boolean | null | undefined;
|
|
266
268
|
}, {
|
|
267
269
|
backdropColor?: string | null | undefined;
|
|
268
270
|
borderColor?: string | null | undefined;
|
|
@@ -272,6 +274,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
272
274
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
273
275
|
childrenIds?: string[] | null | undefined;
|
|
274
276
|
previewText?: string | null | undefined;
|
|
277
|
+
underline?: boolean | null | undefined;
|
|
275
278
|
}>;
|
|
276
279
|
Avatar: z.ZodObject<{
|
|
277
280
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -1209,6 +1212,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1209
1212
|
fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["HELVETICA", "GEORGIA", "MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
|
|
1210
1213
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1211
1214
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1215
|
+
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1212
1216
|
}, "strip", z.ZodTypeAny, {
|
|
1213
1217
|
backdropColor?: string | null | undefined;
|
|
1214
1218
|
borderColor?: string | null | undefined;
|
|
@@ -1218,6 +1222,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1218
1222
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
1219
1223
|
childrenIds?: string[] | null | undefined;
|
|
1220
1224
|
previewText?: string | null | undefined;
|
|
1225
|
+
underline?: boolean | null | undefined;
|
|
1221
1226
|
}, {
|
|
1222
1227
|
backdropColor?: string | null | undefined;
|
|
1223
1228
|
borderColor?: string | null | undefined;
|
|
@@ -1227,6 +1232,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1227
1232
|
fontFamily?: "HELVETICA" | "GEORGIA" | "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
|
|
1228
1233
|
childrenIds?: string[] | null | undefined;
|
|
1229
1234
|
previewText?: string | null | undefined;
|
|
1235
|
+
underline?: boolean | null | undefined;
|
|
1230
1236
|
}>;
|
|
1231
1237
|
Avatar: z.ZodObject<{
|
|
1232
1238
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -165,7 +165,8 @@ var EmailLayoutPropsSchema = import_zod3.z.object({
|
|
|
165
165
|
textColor: COLOR_SCHEMA,
|
|
166
166
|
fontFamily: FONT_FAMILY_SCHEMA,
|
|
167
167
|
childrenIds: import_zod3.z.array(import_zod3.z.string()).optional().nullable(),
|
|
168
|
-
previewText: import_zod3.z.string().optional().nullable()
|
|
168
|
+
previewText: import_zod3.z.string().optional().nullable(),
|
|
169
|
+
underline: import_zod3.z.boolean().optional().nullable()
|
|
169
170
|
});
|
|
170
171
|
|
|
171
172
|
// src/blocks/EmailLayout/EmailLayoutReader.tsx
|
|
@@ -317,6 +318,7 @@ function Reader({ document, rootBlockId }) {
|
|
|
317
318
|
|
|
318
319
|
// src/renderers/renderToStaticMarkup.tsx
|
|
319
320
|
function renderToStaticMarkup(document, { rootBlockId }) {
|
|
321
|
+
var _a;
|
|
320
322
|
return "<!DOCTYPE html>" + (0, import_server.renderToStaticMarkup)(
|
|
321
323
|
/* @__PURE__ */ import_react5.default.createElement("html", null, /* @__PURE__ */ import_react5.default.createElement("head", null, /* @__PURE__ */ import_react5.default.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), /* @__PURE__ */ import_react5.default.createElement("style", { type: "text/css" }, `
|
|
322
324
|
.responsive-mobile { display: none !important; }
|
|
@@ -325,6 +327,7 @@ function renderToStaticMarkup(document, { rootBlockId }) {
|
|
|
325
327
|
.responsive-mobile { display: block !important; }
|
|
326
328
|
.responsive-desktop { display: none !important; }
|
|
327
329
|
}
|
|
330
|
+
${((_a = document[rootBlockId].props) == null ? void 0 : _a.underline) !== true ? "a { text-decoration: none; }" : ""}
|
|
328
331
|
`)), /* @__PURE__ */ import_react5.default.createElement("body", null, /* @__PURE__ */ import_react5.default.createElement(Reader, { document, rootBlockId })))
|
|
329
332
|
);
|
|
330
333
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -132,7 +132,8 @@ var EmailLayoutPropsSchema = z3.object({
|
|
|
132
132
|
textColor: COLOR_SCHEMA,
|
|
133
133
|
fontFamily: FONT_FAMILY_SCHEMA,
|
|
134
134
|
childrenIds: z3.array(z3.string()).optional().nullable(),
|
|
135
|
-
previewText: z3.string().optional().nullable()
|
|
135
|
+
previewText: z3.string().optional().nullable(),
|
|
136
|
+
underline: z3.boolean().optional().nullable()
|
|
136
137
|
});
|
|
137
138
|
|
|
138
139
|
// src/blocks/EmailLayout/EmailLayoutReader.tsx
|
|
@@ -284,6 +285,7 @@ function Reader({ document, rootBlockId }) {
|
|
|
284
285
|
|
|
285
286
|
// src/renderers/renderToStaticMarkup.tsx
|
|
286
287
|
function renderToStaticMarkup(document, { rootBlockId }) {
|
|
288
|
+
var _a;
|
|
287
289
|
return "<!DOCTYPE html>" + baseRenderToStaticMarkup(
|
|
288
290
|
/* @__PURE__ */ React5.createElement("html", null, /* @__PURE__ */ React5.createElement("head", null, /* @__PURE__ */ React5.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), /* @__PURE__ */ React5.createElement("style", { type: "text/css" }, `
|
|
289
291
|
.responsive-mobile { display: none !important; }
|
|
@@ -292,6 +294,7 @@ function renderToStaticMarkup(document, { rootBlockId }) {
|
|
|
292
294
|
.responsive-mobile { display: block !important; }
|
|
293
295
|
.responsive-desktop { display: none !important; }
|
|
294
296
|
}
|
|
297
|
+
${((_a = document[rootBlockId].props) == null ? void 0 : _a.underline) !== true ? "a { text-decoration: none; }" : ""}
|
|
295
298
|
`)), /* @__PURE__ */ React5.createElement("body", null, /* @__PURE__ */ React5.createElement(Reader, { document, rootBlockId })))
|
|
296
299
|
);
|
|
297
300
|
}
|