@rudyzeinoun/email-builder 0.0.22 → 0.0.23

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.js CHANGED
@@ -160,7 +160,8 @@ var EmailLayoutPropsSchema = import_zod3.z.object({
160
160
  canvasColor: COLOR_SCHEMA,
161
161
  textColor: COLOR_SCHEMA,
162
162
  fontFamily: FONT_FAMILY_SCHEMA,
163
- childrenIds: import_zod3.z.array(import_zod3.z.string()).optional().nullable()
163
+ childrenIds: import_zod3.z.array(import_zod3.z.string()).optional().nullable(),
164
+ previewText: import_zod3.z.string().optional().nullable()
164
165
  });
165
166
 
166
167
  // src/blocks/EmailLayout/EmailLayoutReader.tsx
@@ -201,7 +202,14 @@ function getBorder({ borderColor }) {
201
202
  function EmailLayoutReader(props) {
202
203
  var _a, _b, _c, _d, _e;
203
204
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
204
- return /* @__PURE__ */ import_react3.default.createElement(
205
+ return /* @__PURE__ */ import_react3.default.createElement(import_react3.Fragment, null, props.previewText && /* @__PURE__ */ import_react3.default.createElement(
206
+ "div",
207
+ {
208
+ style: { display: "none", maxHeight: "0px", overflow: "hidden" }
209
+ },
210
+ props.previewText,
211
+ "\xA0\u200C\xA0\u200C\xA0\u200C\xA0"
212
+ ), /* @__PURE__ */ import_react3.default.createElement(
205
213
  "div",
206
214
  {
207
215
  style: {
@@ -237,7 +245,7 @@ function EmailLayoutReader(props) {
237
245
  },
238
246
  /* @__PURE__ */ import_react3.default.createElement("tbody", null, /* @__PURE__ */ import_react3.default.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ import_react3.default.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ import_react3.default.createElement(ReaderBlock, { key: childId, id: childId })))))
239
247
  )
240
- );
248
+ ));
241
249
  }
242
250
 
243
251
  // src/Reader/core.tsx
package/dist/index.mjs CHANGED
@@ -127,11 +127,12 @@ var EmailLayoutPropsSchema = z3.object({
127
127
  canvasColor: COLOR_SCHEMA,
128
128
  textColor: COLOR_SCHEMA,
129
129
  fontFamily: FONT_FAMILY_SCHEMA,
130
- childrenIds: z3.array(z3.string()).optional().nullable()
130
+ childrenIds: z3.array(z3.string()).optional().nullable(),
131
+ previewText: z3.string().optional().nullable()
131
132
  });
132
133
 
133
134
  // src/blocks/EmailLayout/EmailLayoutReader.tsx
134
- import React3 from "react";
135
+ import React3, { Fragment } from "react";
135
136
  function getFontFamily(fontFamily) {
136
137
  const f = fontFamily != null ? fontFamily : "MODERN_SANS";
137
138
  switch (f) {
@@ -168,7 +169,14 @@ function getBorder({ borderColor }) {
168
169
  function EmailLayoutReader(props) {
169
170
  var _a, _b, _c, _d, _e;
170
171
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
171
- return /* @__PURE__ */ React3.createElement(
172
+ return /* @__PURE__ */ React3.createElement(Fragment, null, props.previewText && /* @__PURE__ */ React3.createElement(
173
+ "div",
174
+ {
175
+ style: { display: "none", maxHeight: "0px", overflow: "hidden" }
176
+ },
177
+ props.previewText,
178
+ "\xA0\u200C\xA0\u200C\xA0\u200C\xA0"
179
+ ), /* @__PURE__ */ React3.createElement(
172
180
  "div",
173
181
  {
174
182
  style: {
@@ -204,7 +212,7 @@ function EmailLayoutReader(props) {
204
212
  },
205
213
  /* @__PURE__ */ React3.createElement("tbody", null, /* @__PURE__ */ React3.createElement("tr", { style: { width: "100%" } }, /* @__PURE__ */ React3.createElement("td", null, childrenIds.map((childId) => /* @__PURE__ */ React3.createElement(ReaderBlock, { key: childId, id: childId })))))
206
214
  )
207
- );
215
+ ));
208
216
  }
209
217
 
210
218
  // src/Reader/core.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudyzeinoun/email-builder",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "React component to render email messages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",