@rudyzeinoun/email-builder 0.0.46 → 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 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
@@ -109,13 +109,13 @@ var ColumnsContainerPropsSchema_default = ColumnsContainerPropsSchema;
109
109
  // src/blocks/ColumnsContainer/ColumnsContainerReader.tsx
110
110
  var import_react = __toESM(require("react"));
111
111
  var import_block_columns_container2 = require("@rudyzeinoun/block-columns-container");
112
- function ColumnsContainerReader({ style, props, className, loopStart, loopEnd, responsiveDisplay, conditionStatement }) {
112
+ function ColumnsContainerReader({ style, props, className, loopStart, loopEnd, responsiveDisplay, conditionStatement, stacking }) {
113
113
  const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
114
114
  let cols = void 0;
115
115
  if (columns) {
116
116
  cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ import_react.default.createElement(ReaderBlock, { key: childId, id: childId })));
117
117
  }
118
- return /* @__PURE__ */ import_react.default.createElement(import_block_columns_container2.ColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd, responsiveDisplay, conditionStatement });
118
+ return /* @__PURE__ */ import_react.default.createElement(import_block_columns_container2.ColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd, responsiveDisplay, conditionStatement, stacking });
119
119
  }
120
120
 
121
121
  // src/blocks/Container/ContainerPropsSchema.tsx
@@ -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: (_d = props.canvasColor) != null ? _d : "#FFFFFF",
238
- borderRadius: (_e = props.borderRadius) != null ? _e : void 0,
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
@@ -76,13 +76,13 @@ var ColumnsContainerPropsSchema_default = ColumnsContainerPropsSchema;
76
76
  // src/blocks/ColumnsContainer/ColumnsContainerReader.tsx
77
77
  import React from "react";
78
78
  import { ColumnsContainer as BaseColumnsContainer } from "@rudyzeinoun/block-columns-container";
79
- function ColumnsContainerReader({ style, props, className, loopStart, loopEnd, responsiveDisplay, conditionStatement }) {
79
+ function ColumnsContainerReader({ style, props, className, loopStart, loopEnd, responsiveDisplay, conditionStatement, stacking }) {
80
80
  const _a = props != null ? props : {}, { columns } = _a, restProps = __objRest(_a, ["columns"]);
81
81
  let cols = void 0;
82
82
  if (columns) {
83
83
  cols = columns.map((col) => col.childrenIds.map((childId) => /* @__PURE__ */ React.createElement(ReaderBlock, { key: childId, id: childId })));
84
84
  }
85
- return /* @__PURE__ */ React.createElement(BaseColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd, responsiveDisplay, conditionStatement });
85
+ return /* @__PURE__ */ React.createElement(BaseColumnsContainer, { props: restProps, columns: cols, style, className, loopStart, loopEnd, responsiveDisplay, conditionStatement, stacking });
86
86
  }
87
87
 
88
88
  // src/blocks/Container/ContainerPropsSchema.tsx
@@ -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: (_d = props.canvasColor) != null ? _d : "#FFFFFF",
205
- borderRadius: (_e = props.borderRadius) != null ? _e : void 0,
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudyzeinoun/email-builder",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "React component to render email messages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",