@rudyzeinoun/email-builder 0.0.47 → 0.0.48
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 +7 -5
- package/dist/index.mjs +7 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -258,6 +258,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
258
258
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
259
259
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
260
260
|
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
261
|
+
textDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>>;
|
|
261
262
|
}, "strip", z.ZodTypeAny, {
|
|
262
263
|
backdropColor?: string | null | undefined;
|
|
263
264
|
borderColor?: string | null | undefined;
|
|
@@ -268,6 +269,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
268
269
|
childrenIds?: string[] | null | undefined;
|
|
269
270
|
previewText?: string | null | undefined;
|
|
270
271
|
underline?: boolean | null | undefined;
|
|
272
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
271
273
|
}, {
|
|
272
274
|
backdropColor?: string | null | undefined;
|
|
273
275
|
borderColor?: string | null | undefined;
|
|
@@ -278,6 +280,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
278
280
|
childrenIds?: string[] | null | undefined;
|
|
279
281
|
previewText?: string | null | undefined;
|
|
280
282
|
underline?: boolean | null | undefined;
|
|
283
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
281
284
|
}>;
|
|
282
285
|
Avatar: z.ZodObject<{
|
|
283
286
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -1239,6 +1242,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1239
1242
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1240
1243
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1241
1244
|
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1245
|
+
textDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>>;
|
|
1242
1246
|
}, "strip", z.ZodTypeAny, {
|
|
1243
1247
|
backdropColor?: string | null | undefined;
|
|
1244
1248
|
borderColor?: string | null | undefined;
|
|
@@ -1249,6 +1253,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1249
1253
|
childrenIds?: string[] | null | undefined;
|
|
1250
1254
|
previewText?: string | null | undefined;
|
|
1251
1255
|
underline?: boolean | null | undefined;
|
|
1256
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
1252
1257
|
}, {
|
|
1253
1258
|
backdropColor?: string | null | undefined;
|
|
1254
1259
|
borderColor?: string | null | undefined;
|
|
@@ -1259,6 +1264,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1259
1264
|
childrenIds?: string[] | null | undefined;
|
|
1260
1265
|
previewText?: string | null | undefined;
|
|
1261
1266
|
underline?: boolean | null | undefined;
|
|
1267
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
1262
1268
|
}>;
|
|
1263
1269
|
Avatar: z.ZodObject<{
|
|
1264
1270
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -258,6 +258,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
258
258
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
259
259
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
260
260
|
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
261
|
+
textDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>>;
|
|
261
262
|
}, "strip", z.ZodTypeAny, {
|
|
262
263
|
backdropColor?: string | null | undefined;
|
|
263
264
|
borderColor?: string | null | undefined;
|
|
@@ -268,6 +269,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
268
269
|
childrenIds?: string[] | null | undefined;
|
|
269
270
|
previewText?: string | null | undefined;
|
|
270
271
|
underline?: boolean | null | undefined;
|
|
272
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
271
273
|
}, {
|
|
272
274
|
backdropColor?: string | null | undefined;
|
|
273
275
|
borderColor?: string | null | undefined;
|
|
@@ -278,6 +280,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
|
|
|
278
280
|
childrenIds?: string[] | null | undefined;
|
|
279
281
|
previewText?: string | null | undefined;
|
|
280
282
|
underline?: boolean | null | undefined;
|
|
283
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
281
284
|
}>;
|
|
282
285
|
Avatar: z.ZodObject<{
|
|
283
286
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
@@ -1239,6 +1242,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1239
1242
|
childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
1240
1243
|
previewText: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1241
1244
|
underline: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
1245
|
+
textDirection: z.ZodNullable<z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>>;
|
|
1242
1246
|
}, "strip", z.ZodTypeAny, {
|
|
1243
1247
|
backdropColor?: string | null | undefined;
|
|
1244
1248
|
borderColor?: string | null | undefined;
|
|
@@ -1249,6 +1253,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1249
1253
|
childrenIds?: string[] | null | undefined;
|
|
1250
1254
|
previewText?: string | null | undefined;
|
|
1251
1255
|
underline?: boolean | null | undefined;
|
|
1256
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
1252
1257
|
}, {
|
|
1253
1258
|
backdropColor?: string | null | undefined;
|
|
1254
1259
|
borderColor?: string | null | undefined;
|
|
@@ -1259,6 +1264,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
|
|
|
1259
1264
|
childrenIds?: string[] | null | undefined;
|
|
1260
1265
|
previewText?: string | null | undefined;
|
|
1261
1266
|
underline?: boolean | null | undefined;
|
|
1267
|
+
textDirection?: "ltr" | "rtl" | null | undefined;
|
|
1262
1268
|
}>;
|
|
1263
1269
|
Avatar: z.ZodObject<{
|
|
1264
1270
|
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -167,7 +167,8 @@ var EmailLayoutPropsSchema = import_zod3.z.object({
|
|
|
167
167
|
fontFamily: FONT_FAMILY_SCHEMA,
|
|
168
168
|
childrenIds: import_zod3.z.array(import_zod3.z.string()).optional().nullable(),
|
|
169
169
|
previewText: import_zod3.z.string().optional().nullable(),
|
|
170
|
-
underline: import_zod3.z.boolean().optional().nullable()
|
|
170
|
+
underline: import_zod3.z.boolean().optional().nullable(),
|
|
171
|
+
textDirection: import_zod3.z.enum(["ltr", "rtl"]).optional().nullable()
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
// src/blocks/EmailLayout/EmailLayoutReader.tsx
|
|
@@ -206,7 +207,7 @@ function getBorder({ borderColor }) {
|
|
|
206
207
|
return `1px solid ${borderColor}`;
|
|
207
208
|
}
|
|
208
209
|
function EmailLayoutReader(props) {
|
|
209
|
-
var _a, _b, _c, _d, _e;
|
|
210
|
+
var _a, _b, _c, _d, _e, _f;
|
|
210
211
|
const childrenIds = (_a = props.childrenIds) != null ? _a : [];
|
|
211
212
|
return /* @__PURE__ */ import_react3.default.createElement(import_react3.Fragment, null, props.previewText && /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "none", maxHeight: "0px", overflow: "hidden" } }, props.previewText, "\xA0\u200C\xA0\u200C\xA0\u200C\xA0"), /* @__PURE__ */ import_react3.default.createElement(
|
|
212
213
|
"div",
|
|
@@ -223,7 +224,8 @@ function EmailLayoutReader(props) {
|
|
|
223
224
|
margin: "0",
|
|
224
225
|
padding: "32px 0",
|
|
225
226
|
minHeight: "100%",
|
|
226
|
-
width: "100%"
|
|
227
|
+
width: "100%",
|
|
228
|
+
direction: (_d = props.textDirection) != null ? _d : "ltr"
|
|
227
229
|
}
|
|
228
230
|
},
|
|
229
231
|
/* @__PURE__ */ import_react3.default.createElement(
|
|
@@ -234,8 +236,8 @@ function EmailLayoutReader(props) {
|
|
|
234
236
|
style: {
|
|
235
237
|
margin: "0 auto",
|
|
236
238
|
maxWidth: "600px",
|
|
237
|
-
backgroundColor: (
|
|
238
|
-
borderRadius: (
|
|
239
|
+
backgroundColor: (_e = props.canvasColor) != null ? _e : "#FFFFFF",
|
|
240
|
+
borderRadius: (_f = props.borderRadius) != null ? _f : void 0,
|
|
239
241
|
border: getBorder(props)
|
|
240
242
|
},
|
|
241
243
|
role: "presentation",
|
package/dist/index.mjs
CHANGED
|
@@ -134,7 +134,8 @@ var EmailLayoutPropsSchema = z3.object({
|
|
|
134
134
|
fontFamily: FONT_FAMILY_SCHEMA,
|
|
135
135
|
childrenIds: z3.array(z3.string()).optional().nullable(),
|
|
136
136
|
previewText: z3.string().optional().nullable(),
|
|
137
|
-
underline: z3.boolean().optional().nullable()
|
|
137
|
+
underline: z3.boolean().optional().nullable(),
|
|
138
|
+
textDirection: z3.enum(["ltr", "rtl"]).optional().nullable()
|
|
138
139
|
});
|
|
139
140
|
|
|
140
141
|
// src/blocks/EmailLayout/EmailLayoutReader.tsx
|
|
@@ -173,7 +174,7 @@ function getBorder({ borderColor }) {
|
|
|
173
174
|
return `1px solid ${borderColor}`;
|
|
174
175
|
}
|
|
175
176
|
function EmailLayoutReader(props) {
|
|
176
|
-
var _a, _b, _c, _d, _e;
|
|
177
|
+
var _a, _b, _c, _d, _e, _f;
|
|
177
178
|
const childrenIds = (_a = props.childrenIds) != null ? _a : [];
|
|
178
179
|
return /* @__PURE__ */ React3.createElement(Fragment, null, props.previewText && /* @__PURE__ */ React3.createElement("div", { style: { display: "none", maxHeight: "0px", overflow: "hidden" } }, props.previewText, "\xA0\u200C\xA0\u200C\xA0\u200C\xA0"), /* @__PURE__ */ React3.createElement(
|
|
179
180
|
"div",
|
|
@@ -190,7 +191,8 @@ function EmailLayoutReader(props) {
|
|
|
190
191
|
margin: "0",
|
|
191
192
|
padding: "32px 0",
|
|
192
193
|
minHeight: "100%",
|
|
193
|
-
width: "100%"
|
|
194
|
+
width: "100%",
|
|
195
|
+
direction: (_d = props.textDirection) != null ? _d : "ltr"
|
|
194
196
|
}
|
|
195
197
|
},
|
|
196
198
|
/* @__PURE__ */ React3.createElement(
|
|
@@ -201,8 +203,8 @@ function EmailLayoutReader(props) {
|
|
|
201
203
|
style: {
|
|
202
204
|
margin: "0 auto",
|
|
203
205
|
maxWidth: "600px",
|
|
204
|
-
backgroundColor: (
|
|
205
|
-
borderRadius: (
|
|
206
|
+
backgroundColor: (_e = props.canvasColor) != null ? _e : "#FFFFFF",
|
|
207
|
+
borderRadius: (_f = props.borderRadius) != null ? _f : void 0,
|
|
206
208
|
border: getBorder(props)
|
|
207
209
|
},
|
|
208
210
|
role: "presentation",
|