@usewaypoint/email-builder 0.0.5 → 0.0.6

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
@@ -217,18 +217,24 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
217
217
  }>;
218
218
  EmailLayout: z.ZodObject<{
219
219
  backdropColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
220
222
  canvasColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
223
  textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
224
  fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
223
225
  childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
224
226
  }, "strip", z.ZodTypeAny, {
225
227
  backdropColor?: string | null | undefined;
228
+ borderColor?: string | null | undefined;
229
+ borderRadius?: number | null | undefined;
226
230
  canvasColor?: string | null | undefined;
227
231
  textColor?: string | null | undefined;
228
232
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
229
233
  childrenIds?: string[] | null | undefined;
230
234
  }, {
231
235
  backdropColor?: string | null | undefined;
236
+ borderColor?: string | null | undefined;
237
+ borderRadius?: number | null | undefined;
232
238
  canvasColor?: string | null | undefined;
233
239
  textColor?: string | null | undefined;
234
240
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
@@ -868,10 +874,13 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
868
874
  } | null | undefined;
869
875
  }>>>;
870
876
  props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
877
+ markdown: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
871
878
  text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
872
879
  }, "strip", z.ZodTypeAny, {
880
+ markdown?: boolean | null | undefined;
873
881
  text?: string | null | undefined;
874
882
  }, {
883
+ markdown?: boolean | null | undefined;
875
884
  text?: string | null | undefined;
876
885
  }>>>;
877
886
  }, "strip", z.ZodTypeAny, {
@@ -890,6 +899,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
890
899
  } | null | undefined;
891
900
  } | null | undefined;
892
901
  props?: {
902
+ markdown?: boolean | null | undefined;
893
903
  text?: string | null | undefined;
894
904
  } | null | undefined;
895
905
  }, {
@@ -908,6 +918,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
908
918
  } | null | undefined;
909
919
  } | null | undefined;
910
920
  props?: {
921
+ markdown?: boolean | null | undefined;
911
922
  text?: string | null | undefined;
912
923
  } | null | undefined;
913
924
  }>;
@@ -1128,18 +1139,24 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1128
1139
  }>;
1129
1140
  EmailLayout: z.ZodObject<{
1130
1141
  backdropColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1142
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1143
+ borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1131
1144
  canvasColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1132
1145
  textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
1146
  fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
1134
1147
  childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1135
1148
  }, "strip", z.ZodTypeAny, {
1136
1149
  backdropColor?: string | null | undefined;
1150
+ borderColor?: string | null | undefined;
1151
+ borderRadius?: number | null | undefined;
1137
1152
  canvasColor?: string | null | undefined;
1138
1153
  textColor?: string | null | undefined;
1139
1154
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
1140
1155
  childrenIds?: string[] | null | undefined;
1141
1156
  }, {
1142
1157
  backdropColor?: string | null | undefined;
1158
+ borderColor?: string | null | undefined;
1159
+ borderRadius?: number | null | undefined;
1143
1160
  canvasColor?: string | null | undefined;
1144
1161
  textColor?: string | null | undefined;
1145
1162
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
@@ -1779,10 +1796,13 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1779
1796
  } | null | undefined;
1780
1797
  }>>>;
1781
1798
  props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1799
+ markdown: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1782
1800
  text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1783
1801
  }, "strip", z.ZodTypeAny, {
1802
+ markdown?: boolean | null | undefined;
1784
1803
  text?: string | null | undefined;
1785
1804
  }, {
1805
+ markdown?: boolean | null | undefined;
1786
1806
  text?: string | null | undefined;
1787
1807
  }>>>;
1788
1808
  }, "strip", z.ZodTypeAny, {
@@ -1801,6 +1821,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1801
1821
  } | null | undefined;
1802
1822
  } | null | undefined;
1803
1823
  props?: {
1824
+ markdown?: boolean | null | undefined;
1804
1825
  text?: string | null | undefined;
1805
1826
  } | null | undefined;
1806
1827
  }, {
@@ -1819,6 +1840,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1819
1840
  } | null | undefined;
1820
1841
  } | null | undefined;
1821
1842
  props?: {
1843
+ markdown?: boolean | null | undefined;
1822
1844
  text?: string | null | undefined;
1823
1845
  } | null | undefined;
1824
1846
  }>;
package/dist/index.d.ts CHANGED
@@ -217,18 +217,24 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
217
217
  }>;
218
218
  EmailLayout: z.ZodObject<{
219
219
  backdropColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
220
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
220
222
  canvasColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
223
  textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
224
  fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
223
225
  childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
224
226
  }, "strip", z.ZodTypeAny, {
225
227
  backdropColor?: string | null | undefined;
228
+ borderColor?: string | null | undefined;
229
+ borderRadius?: number | null | undefined;
226
230
  canvasColor?: string | null | undefined;
227
231
  textColor?: string | null | undefined;
228
232
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
229
233
  childrenIds?: string[] | null | undefined;
230
234
  }, {
231
235
  backdropColor?: string | null | undefined;
236
+ borderColor?: string | null | undefined;
237
+ borderRadius?: number | null | undefined;
232
238
  canvasColor?: string | null | undefined;
233
239
  textColor?: string | null | undefined;
234
240
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
@@ -868,10 +874,13 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
868
874
  } | null | undefined;
869
875
  }>>>;
870
876
  props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
877
+ markdown: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
871
878
  text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
872
879
  }, "strip", z.ZodTypeAny, {
880
+ markdown?: boolean | null | undefined;
873
881
  text?: string | null | undefined;
874
882
  }, {
883
+ markdown?: boolean | null | undefined;
875
884
  text?: string | null | undefined;
876
885
  }>>>;
877
886
  }, "strip", z.ZodTypeAny, {
@@ -890,6 +899,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
890
899
  } | null | undefined;
891
900
  } | null | undefined;
892
901
  props?: {
902
+ markdown?: boolean | null | undefined;
893
903
  text?: string | null | undefined;
894
904
  } | null | undefined;
895
905
  }, {
@@ -908,6 +918,7 @@ declare const ReaderBlockSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"type", an
908
918
  } | null | undefined;
909
919
  } | null | undefined;
910
920
  props?: {
921
+ markdown?: boolean | null | undefined;
911
922
  text?: string | null | undefined;
912
923
  } | null | undefined;
913
924
  }>;
@@ -1128,18 +1139,24 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1128
1139
  }>;
1129
1140
  EmailLayout: z.ZodObject<{
1130
1141
  backdropColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1142
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1143
+ borderRadius: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1131
1144
  canvasColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1132
1145
  textColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1133
1146
  fontFamily: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MODERN_SANS", "BOOK_SANS", "ORGANIC_SANS", "GEOMETRIC_SANS", "HEAVY_SANS", "ROUNDED_SANS", "MODERN_SERIF", "BOOK_SERIF", "MONOSPACE"]>>>;
1134
1147
  childrenIds: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1135
1148
  }, "strip", z.ZodTypeAny, {
1136
1149
  backdropColor?: string | null | undefined;
1150
+ borderColor?: string | null | undefined;
1151
+ borderRadius?: number | null | undefined;
1137
1152
  canvasColor?: string | null | undefined;
1138
1153
  textColor?: string | null | undefined;
1139
1154
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
1140
1155
  childrenIds?: string[] | null | undefined;
1141
1156
  }, {
1142
1157
  backdropColor?: string | null | undefined;
1158
+ borderColor?: string | null | undefined;
1159
+ borderRadius?: number | null | undefined;
1143
1160
  canvasColor?: string | null | undefined;
1144
1161
  textColor?: string | null | undefined;
1145
1162
  fontFamily?: "MODERN_SANS" | "BOOK_SANS" | "ORGANIC_SANS" | "GEOMETRIC_SANS" | "HEAVY_SANS" | "ROUNDED_SANS" | "MODERN_SERIF" | "BOOK_SERIF" | "MONOSPACE" | null | undefined;
@@ -1779,10 +1796,13 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1779
1796
  } | null | undefined;
1780
1797
  }>>>;
1781
1798
  props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
1799
+ markdown: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
1782
1800
  text: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1783
1801
  }, "strip", z.ZodTypeAny, {
1802
+ markdown?: boolean | null | undefined;
1784
1803
  text?: string | null | undefined;
1785
1804
  }, {
1805
+ markdown?: boolean | null | undefined;
1786
1806
  text?: string | null | undefined;
1787
1807
  }>>>;
1788
1808
  }, "strip", z.ZodTypeAny, {
@@ -1801,6 +1821,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1801
1821
  } | null | undefined;
1802
1822
  } | null | undefined;
1803
1823
  props?: {
1824
+ markdown?: boolean | null | undefined;
1804
1825
  text?: string | null | undefined;
1805
1826
  } | null | undefined;
1806
1827
  }, {
@@ -1819,6 +1840,7 @@ declare const ReaderDocumentSchema: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodD
1819
1840
  } | null | undefined;
1820
1841
  } | null | undefined;
1821
1842
  props?: {
1843
+ markdown?: boolean | null | undefined;
1822
1844
  text?: string | null | undefined;
1823
1845
  } | null | undefined;
1824
1846
  }>;
package/dist/index.js CHANGED
@@ -147,6 +147,8 @@ var FONT_FAMILY_SCHEMA = import_zod3.z.enum([
147
147
  ]).nullable().optional();
148
148
  var EmailLayoutPropsSchema = import_zod3.z.object({
149
149
  backdropColor: COLOR_SCHEMA,
150
+ borderColor: COLOR_SCHEMA,
151
+ borderRadius: import_zod3.z.number().optional().nullable(),
150
152
  canvasColor: COLOR_SCHEMA,
151
153
  textColor: COLOR_SCHEMA,
152
154
  fontFamily: FONT_FAMILY_SCHEMA,
@@ -178,8 +180,14 @@ function getFontFamily(fontFamily) {
178
180
  return '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace';
179
181
  }
180
182
  }
183
+ function getBorder({ borderColor }) {
184
+ if (!borderColor) {
185
+ return void 0;
186
+ }
187
+ return `1px solid ${borderColor}`;
188
+ }
181
189
  function EmailLayoutReader(props) {
182
- var _a, _b, _c, _d;
190
+ var _a, _b, _c, _d, _e;
183
191
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
184
192
  return /* @__PURE__ */ import_react3.default.createElement(
185
193
  "div",
@@ -206,7 +214,9 @@ function EmailLayoutReader(props) {
206
214
  style: {
207
215
  margin: "0 auto",
208
216
  maxWidth: "600px",
209
- backgroundColor: (_d = props.canvasColor) != null ? _d : "#FFFFFF"
217
+ backgroundColor: (_d = props.canvasColor) != null ? _d : "#FFFFFF",
218
+ borderRadius: (_e = props.borderRadius) != null ? _e : void 0,
219
+ border: getBorder(props)
210
220
  },
211
221
  role: "presentation",
212
222
  cellSpacing: "0",
package/dist/index.mjs CHANGED
@@ -114,6 +114,8 @@ var FONT_FAMILY_SCHEMA = z3.enum([
114
114
  ]).nullable().optional();
115
115
  var EmailLayoutPropsSchema = z3.object({
116
116
  backdropColor: COLOR_SCHEMA,
117
+ borderColor: COLOR_SCHEMA,
118
+ borderRadius: z3.number().optional().nullable(),
117
119
  canvasColor: COLOR_SCHEMA,
118
120
  textColor: COLOR_SCHEMA,
119
121
  fontFamily: FONT_FAMILY_SCHEMA,
@@ -145,8 +147,14 @@ function getFontFamily(fontFamily) {
145
147
  return '"Nimbus Mono PS", "Courier New", "Cutive Mono", monospace';
146
148
  }
147
149
  }
150
+ function getBorder({ borderColor }) {
151
+ if (!borderColor) {
152
+ return void 0;
153
+ }
154
+ return `1px solid ${borderColor}`;
155
+ }
148
156
  function EmailLayoutReader(props) {
149
- var _a, _b, _c, _d;
157
+ var _a, _b, _c, _d, _e;
150
158
  const childrenIds = (_a = props.childrenIds) != null ? _a : [];
151
159
  return /* @__PURE__ */ React3.createElement(
152
160
  "div",
@@ -173,7 +181,9 @@ function EmailLayoutReader(props) {
173
181
  style: {
174
182
  margin: "0 auto",
175
183
  maxWidth: "600px",
176
- backgroundColor: (_d = props.canvasColor) != null ? _d : "#FFFFFF"
184
+ backgroundColor: (_d = props.canvasColor) != null ? _d : "#FFFFFF",
185
+ borderRadius: (_e = props.borderRadius) != null ? _e : void 0,
186
+ border: getBorder(props)
177
187
  },
178
188
  role: "presentation",
179
189
  cellSpacing: "0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usewaypoint/email-builder",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "React component to render email messages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -35,7 +35,7 @@
35
35
  "@usewaypoint/block-html": "^0.0.3",
36
36
  "@usewaypoint/block-image": "^0.0.5",
37
37
  "@usewaypoint/block-spacer": "^0.0.3",
38
- "@usewaypoint/block-text": "^0.0.3",
38
+ "@usewaypoint/block-text": "^0.0.4",
39
39
  "@usewaypoint/document-core": "^0.0.6"
40
40
  }
41
41
  }