brookmind-emails 0.1.8 → 0.1.9
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/modelfy/config.d.ts +4 -0
- package/dist/modelfy/config.d.ts.map +1 -1
- package/dist/modelfy/config.js +6 -0
- package/dist/modelfy/index.d.ts +4 -2
- package/dist/modelfy/index.d.ts.map +1 -1
- package/dist/modelfy/index.js +11 -1
- package/dist/modelfy/templates/GrantCreditsEmail.d.ts.map +1 -1
- package/dist/modelfy/templates/GrantCreditsEmail.js +137 -50
- package/dist/modelfy/templates/OtpEmail.d.ts.map +1 -1
- package/dist/modelfy/templates/OtpEmail.js +108 -30
- package/dist/modelfy/templates/PromoSubscriptionEmail.d.ts.map +1 -1
- package/dist/modelfy/templates/PromoSubscriptionEmail.js +128 -41
- package/dist/modelfy/templates/WelcomeEmail.d.ts +6 -0
- package/dist/modelfy/templates/WelcomeEmail.d.ts.map +1 -0
- package/dist/modelfy/templates/WelcomeEmail.js +377 -0
- package/dist/modelfy/templates/index.d.ts +1 -0
- package/dist/modelfy/templates/index.d.ts.map +1 -1
- package/dist/modelfy/templates/index.js +1 -0
- package/package.json +1 -1
- package/src/modelfy/config.ts +6 -0
- package/src/modelfy/index.ts +16 -2
- package/src/modelfy/templates/GrantCreditsEmail.tsx +229 -82
- package/src/modelfy/templates/OtpEmail.tsx +185 -40
- package/src/modelfy/templates/PromoSubscriptionEmail.tsx +234 -79
- package/src/modelfy/templates/WelcomeEmail.tsx +619 -0
- package/src/modelfy/templates/index.ts +1 -0
|
@@ -8,8 +8,9 @@ import {
|
|
|
8
8
|
Link,
|
|
9
9
|
Preview,
|
|
10
10
|
Font,
|
|
11
|
+
Img,
|
|
12
|
+
Button as ReactEmailButton,
|
|
11
13
|
} from "@react-email/components";
|
|
12
|
-
import { Header, Footer, Button } from "../../shared/components/index.js";
|
|
13
14
|
import { modelfyConfig } from "../config.js";
|
|
14
15
|
|
|
15
16
|
export interface PromoSubscriptionEmailProps {
|
|
@@ -21,84 +22,170 @@ export interface PromoSubscriptionEmailProps {
|
|
|
21
22
|
notes?: string;
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
// Design System Colors - Matching Modelfy Landing
|
|
26
|
+
const colors = {
|
|
27
|
+
background: "#0d0d0d",
|
|
28
|
+
cardBg: "#121212",
|
|
29
|
+
primary: "#0a8f5a",
|
|
30
|
+
accent: "#f59e0b",
|
|
31
|
+
white: "#f2f2f2",
|
|
32
|
+
textSecondary: "rgba(242, 242, 242, 0.7)",
|
|
33
|
+
textMuted: "#8c8c8c",
|
|
34
|
+
border: "#262626",
|
|
35
|
+
};
|
|
36
|
+
|
|
24
37
|
const styles = {
|
|
25
38
|
body: {
|
|
26
39
|
margin: 0,
|
|
27
40
|
padding: 0,
|
|
28
|
-
backgroundColor:
|
|
29
|
-
fontFamily: "'
|
|
41
|
+
backgroundColor: colors.background,
|
|
42
|
+
fontFamily: "'Inter', 'Segoe UI', Arial, sans-serif",
|
|
30
43
|
},
|
|
31
44
|
container: {
|
|
32
|
-
maxWidth: "
|
|
33
|
-
margin: "
|
|
34
|
-
backgroundColor:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
maxWidth: "600px",
|
|
46
|
+
margin: "0 auto",
|
|
47
|
+
backgroundColor: colors.background,
|
|
48
|
+
},
|
|
49
|
+
header: {
|
|
50
|
+
backgroundColor: colors.background,
|
|
51
|
+
padding: "40px 32px 24px",
|
|
52
|
+
textAlign: "center" as const,
|
|
53
|
+
},
|
|
54
|
+
logo: {
|
|
55
|
+
display: "block" as const,
|
|
56
|
+
margin: "0 auto",
|
|
57
|
+
},
|
|
58
|
+
heroSection: {
|
|
59
|
+
padding: "24px 32px 40px",
|
|
60
|
+
textAlign: "center" as const,
|
|
61
|
+
},
|
|
62
|
+
heroTagline: {
|
|
63
|
+
margin: "0 0 12px",
|
|
64
|
+
fontSize: "13px",
|
|
65
|
+
fontWeight: 600,
|
|
66
|
+
color: colors.accent,
|
|
67
|
+
letterSpacing: "2px",
|
|
68
|
+
textTransform: "uppercase" as const,
|
|
69
|
+
},
|
|
70
|
+
heroHeading: {
|
|
44
71
|
margin: "0 0 16px",
|
|
45
|
-
fontSize: "
|
|
72
|
+
fontSize: "28px",
|
|
46
73
|
fontWeight: 700,
|
|
47
|
-
color:
|
|
48
|
-
|
|
74
|
+
color: colors.white,
|
|
75
|
+
lineHeight: "1.3",
|
|
49
76
|
},
|
|
50
77
|
paragraph: {
|
|
51
|
-
margin: "0 0
|
|
78
|
+
margin: "0 0 28px",
|
|
52
79
|
fontSize: "16px",
|
|
53
80
|
lineHeight: "1.6",
|
|
54
|
-
color:
|
|
81
|
+
color: colors.textSecondary,
|
|
82
|
+
textAlign: "center" as const,
|
|
55
83
|
},
|
|
56
84
|
highlightBox: {
|
|
57
|
-
backgroundColor: "rgba(
|
|
58
|
-
border:
|
|
85
|
+
backgroundColor: "rgba(245, 158, 11, 0.1)",
|
|
86
|
+
border: `1px solid rgba(245, 158, 11, 0.3)`,
|
|
59
87
|
borderRadius: "12px",
|
|
60
88
|
padding: "24px",
|
|
61
|
-
marginBottom: "
|
|
62
|
-
},
|
|
63
|
-
highlightRow: {
|
|
64
|
-
display: "flex" as const,
|
|
65
|
-
justifyContent: "space-between" as const,
|
|
66
|
-
marginBottom: "12px",
|
|
89
|
+
marginBottom: "28px",
|
|
67
90
|
},
|
|
68
91
|
highlightLabel: {
|
|
69
|
-
fontSize: "
|
|
70
|
-
color:
|
|
71
|
-
margin: 0,
|
|
92
|
+
fontSize: "13px",
|
|
93
|
+
color: colors.textMuted,
|
|
94
|
+
margin: "0 0 4px",
|
|
72
95
|
},
|
|
73
96
|
highlightValue: {
|
|
74
97
|
fontSize: "16px",
|
|
75
98
|
fontWeight: 600,
|
|
76
|
-
color:
|
|
99
|
+
color: colors.white,
|
|
77
100
|
margin: 0,
|
|
78
101
|
},
|
|
79
102
|
buttonContainer: {
|
|
80
103
|
textAlign: "center" as const,
|
|
81
|
-
marginBottom: "
|
|
104
|
+
marginBottom: "28px",
|
|
105
|
+
},
|
|
106
|
+
ctaButton: {
|
|
107
|
+
display: "inline-block",
|
|
108
|
+
padding: "14px 36px",
|
|
109
|
+
fontSize: "15px",
|
|
110
|
+
fontWeight: 600,
|
|
111
|
+
textDecoration: "none",
|
|
112
|
+
borderRadius: "10px",
|
|
113
|
+
backgroundColor: colors.primary,
|
|
114
|
+
color: "#ffffff",
|
|
115
|
+
textAlign: "center" as const,
|
|
116
|
+
},
|
|
117
|
+
contentSection: {
|
|
118
|
+
backgroundColor: colors.cardBg,
|
|
119
|
+
padding: "32px",
|
|
120
|
+
borderTop: `1px solid ${colors.border}`,
|
|
82
121
|
},
|
|
83
122
|
smallText: {
|
|
84
123
|
margin: "0 0 12px",
|
|
85
124
|
fontSize: "14px",
|
|
86
125
|
lineHeight: "1.6",
|
|
87
|
-
color:
|
|
126
|
+
color: colors.textMuted,
|
|
127
|
+
textAlign: "center" as const,
|
|
128
|
+
},
|
|
129
|
+
notesText: {
|
|
130
|
+
margin: "0 0 24px",
|
|
131
|
+
fontSize: "15px",
|
|
132
|
+
lineHeight: "1.6",
|
|
133
|
+
color: colors.textSecondary,
|
|
134
|
+
textAlign: "center" as const,
|
|
135
|
+
fontStyle: "italic" as const,
|
|
88
136
|
},
|
|
89
137
|
link: {
|
|
90
|
-
color:
|
|
138
|
+
color: colors.primary,
|
|
91
139
|
textDecoration: "none",
|
|
92
140
|
fontWeight: 600,
|
|
93
141
|
},
|
|
142
|
+
footer: {
|
|
143
|
+
backgroundColor: colors.cardBg,
|
|
144
|
+
padding: "24px 32px",
|
|
145
|
+
textAlign: "center" as const,
|
|
146
|
+
borderTop: `1px solid ${colors.border}`,
|
|
147
|
+
},
|
|
148
|
+
footerLogo: {
|
|
149
|
+
display: "block" as const,
|
|
150
|
+
margin: "0 auto 12px",
|
|
151
|
+
opacity: 0.6,
|
|
152
|
+
},
|
|
153
|
+
footerText: {
|
|
154
|
+
margin: "0 0 4px",
|
|
155
|
+
fontSize: "11px",
|
|
156
|
+
color: colors.textMuted,
|
|
157
|
+
lineHeight: "1.6",
|
|
158
|
+
},
|
|
159
|
+
footerLink: {
|
|
160
|
+
color: colors.textMuted,
|
|
161
|
+
textDecoration: "underline",
|
|
162
|
+
},
|
|
163
|
+
downloadSection: {
|
|
164
|
+
backgroundColor: colors.cardBg,
|
|
165
|
+
padding: "24px 32px",
|
|
166
|
+
textAlign: "center" as const,
|
|
167
|
+
borderTop: `1px solid ${colors.border}`,
|
|
168
|
+
},
|
|
169
|
+
downloadText: {
|
|
170
|
+
margin: "0 0 16px",
|
|
171
|
+
fontSize: "14px",
|
|
172
|
+
color: colors.white,
|
|
173
|
+
},
|
|
174
|
+
badgeContainer: {
|
|
175
|
+
textAlign: "center" as const,
|
|
176
|
+
},
|
|
177
|
+
badge: {
|
|
178
|
+
display: "inline-block",
|
|
179
|
+
margin: "0 8px",
|
|
180
|
+
},
|
|
94
181
|
};
|
|
95
182
|
|
|
96
183
|
export function PromoSubscriptionEmail({
|
|
97
|
-
email,
|
|
98
|
-
planName,
|
|
99
|
-
durationDays,
|
|
100
|
-
credits,
|
|
101
|
-
expiresAt,
|
|
184
|
+
email = "user@example.com",
|
|
185
|
+
planName = "Pro",
|
|
186
|
+
durationDays = 30,
|
|
187
|
+
credits = 500,
|
|
188
|
+
expiresAt = "January 31, 2025",
|
|
102
189
|
notes,
|
|
103
190
|
}: PromoSubscriptionEmailProps) {
|
|
104
191
|
const safeCredits = Number.isFinite(credits) ? Number(credits) : 0;
|
|
@@ -107,79 +194,147 @@ export function PromoSubscriptionEmail({
|
|
|
107
194
|
<Html lang="en">
|
|
108
195
|
<Head>
|
|
109
196
|
<Font
|
|
110
|
-
fontFamily="
|
|
197
|
+
fontFamily="Inter"
|
|
111
198
|
fallbackFontFamily="Arial"
|
|
112
199
|
webFont={{
|
|
113
|
-
url: "https://fonts.gstatic.com/s/
|
|
200
|
+
url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0.woff2",
|
|
114
201
|
format: "woff2",
|
|
115
202
|
}}
|
|
116
203
|
fontWeight={400}
|
|
117
204
|
fontStyle="normal"
|
|
118
205
|
/>
|
|
206
|
+
<Font
|
|
207
|
+
fontFamily="Inter"
|
|
208
|
+
fallbackFontFamily="Arial"
|
|
209
|
+
webFont={{
|
|
210
|
+
url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hjp-Ek-_0.woff2",
|
|
211
|
+
format: "woff2",
|
|
212
|
+
}}
|
|
213
|
+
fontWeight={700}
|
|
214
|
+
fontStyle="normal"
|
|
215
|
+
/>
|
|
119
216
|
</Head>
|
|
120
217
|
<Preview>
|
|
121
218
|
{`You've received a ${durationDays}-day ${planName} subscription!`}
|
|
122
219
|
</Preview>
|
|
123
220
|
<Body style={styles.body}>
|
|
124
221
|
<Container style={styles.container}>
|
|
125
|
-
|
|
126
|
-
<Section style={styles.
|
|
127
|
-
<
|
|
222
|
+
{/* Header */}
|
|
223
|
+
<Section style={styles.header}>
|
|
224
|
+
<Img
|
|
225
|
+
src={modelfyConfig.logoUrl}
|
|
226
|
+
width="130"
|
|
227
|
+
height="auto"
|
|
228
|
+
alt="Modelfy"
|
|
229
|
+
style={styles.logo}
|
|
230
|
+
/>
|
|
231
|
+
</Section>
|
|
232
|
+
|
|
233
|
+
{/* Hero Section */}
|
|
234
|
+
<Section style={styles.heroSection}>
|
|
235
|
+
<Text style={styles.heroTagline}>Gift for You</Text>
|
|
236
|
+
<Text style={styles.heroHeading}>You've Got a Gift!</Text>
|
|
237
|
+
<Text style={{ ...styles.paragraph, margin: "0 0 4px" }}>
|
|
238
|
+
Hi <span style={{ color: colors.white, fontWeight: 600 }}>{email}</span>, great news!
|
|
239
|
+
</Text>
|
|
128
240
|
<Text style={styles.paragraph}>
|
|
129
|
-
|
|
130
|
-
<
|
|
241
|
+
You've been granted a promotional{" "}
|
|
242
|
+
<span style={{ color: colors.accent, fontWeight: 600 }}>{planName}</span> subscription.
|
|
131
243
|
</Text>
|
|
132
244
|
|
|
133
245
|
<div style={styles.highlightBox}>
|
|
134
246
|
<table width="100%" cellPadding={0} cellSpacing={0}>
|
|
135
|
-
<
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
247
|
+
<tbody>
|
|
248
|
+
<tr>
|
|
249
|
+
<td style={{ paddingBottom: "16px" }}>
|
|
250
|
+
<Text style={styles.highlightLabel}>Plan</Text>
|
|
251
|
+
<Text style={styles.highlightValue}>{planName}</Text>
|
|
252
|
+
</td>
|
|
253
|
+
<td style={{ paddingBottom: "16px", textAlign: "right" as const }}>
|
|
254
|
+
<Text style={styles.highlightLabel}>Duration</Text>
|
|
255
|
+
<Text style={styles.highlightValue}>{durationDays} days</Text>
|
|
256
|
+
</td>
|
|
257
|
+
</tr>
|
|
258
|
+
<tr>
|
|
259
|
+
<td>
|
|
260
|
+
<Text style={styles.highlightLabel}>Credits Included</Text>
|
|
261
|
+
<Text style={styles.highlightValue}>{safeCredits.toLocaleString()}</Text>
|
|
262
|
+
</td>
|
|
263
|
+
<td style={{ textAlign: "right" as const }}>
|
|
264
|
+
<Text style={styles.highlightLabel}>Expires</Text>
|
|
265
|
+
<Text style={styles.highlightValue}>{expiresAt}</Text>
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
</tbody>
|
|
155
269
|
</table>
|
|
156
270
|
</div>
|
|
157
271
|
|
|
158
|
-
{notes &&
|
|
159
|
-
<Text style={styles.paragraph}>
|
|
160
|
-
<em>"{notes}"</em>
|
|
161
|
-
</Text>
|
|
162
|
-
)}
|
|
272
|
+
{notes && <Text style={styles.notesText}>"{notes}"</Text>}
|
|
163
273
|
|
|
164
274
|
<div style={styles.buttonContainer}>
|
|
165
|
-
<
|
|
275
|
+
<ReactEmailButton href={modelfyConfig.appUrl} style={styles.ctaButton}>
|
|
276
|
+
Open Modelfy
|
|
277
|
+
</ReactEmailButton>
|
|
166
278
|
</div>
|
|
279
|
+
</Section>
|
|
167
280
|
|
|
281
|
+
{/* Content Section */}
|
|
282
|
+
<Section style={styles.contentSection}>
|
|
168
283
|
<Text style={styles.smallText}>
|
|
169
284
|
This promotional subscription will not auto-renew. Enjoy your free access!
|
|
170
285
|
</Text>
|
|
171
286
|
<Text style={styles.smallText}>
|
|
172
|
-
Questions?
|
|
287
|
+
Questions?{" "}
|
|
173
288
|
<Link href={`mailto:${modelfyConfig.supportEmail}`} style={styles.link}>
|
|
174
289
|
{modelfyConfig.supportEmail}
|
|
175
290
|
</Link>
|
|
176
291
|
</Text>
|
|
177
292
|
</Section>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
293
|
+
|
|
294
|
+
{/* Download App Section */}
|
|
295
|
+
<Section style={styles.downloadSection}>
|
|
296
|
+
<Text style={styles.downloadText}>Get the Modelfy app</Text>
|
|
297
|
+
<div style={styles.badgeContainer}>
|
|
298
|
+
<Link href={modelfyConfig.appStoreUrl} style={styles.badge}>
|
|
299
|
+
<Img
|
|
300
|
+
src={modelfyConfig.appStoreBadgeUrl}
|
|
301
|
+
width="120"
|
|
302
|
+
height="40"
|
|
303
|
+
alt="Download on the App Store"
|
|
304
|
+
/>
|
|
305
|
+
</Link>
|
|
306
|
+
<Link href={modelfyConfig.playStoreUrl} style={styles.badge}>
|
|
307
|
+
<Img
|
|
308
|
+
src={modelfyConfig.playStoreBadgeUrl}
|
|
309
|
+
width="135"
|
|
310
|
+
height="40"
|
|
311
|
+
alt="Get it on Google Play"
|
|
312
|
+
/>
|
|
313
|
+
</Link>
|
|
314
|
+
</div>
|
|
315
|
+
</Section>
|
|
316
|
+
|
|
317
|
+
{/* Footer */}
|
|
318
|
+
<Section style={styles.footer}>
|
|
319
|
+
<Img
|
|
320
|
+
src={modelfyConfig.logoUrl}
|
|
321
|
+
width="80"
|
|
322
|
+
height="auto"
|
|
323
|
+
alt="Modelfy"
|
|
324
|
+
style={styles.footerLogo}
|
|
325
|
+
/>
|
|
326
|
+
<Text style={styles.footerText}>
|
|
327
|
+
© {new Date().getFullYear()} {modelfyConfig.companyName}. All rights reserved.
|
|
328
|
+
</Text>
|
|
329
|
+
<Text style={styles.footerText}>
|
|
330
|
+
You received this email because you were granted a promotional subscription.
|
|
331
|
+
</Text>
|
|
332
|
+
<Text style={styles.footerText}>
|
|
333
|
+
<Link href={`${modelfyConfig.appUrl}/privacy`} style={styles.footerLink}>
|
|
334
|
+
Privacy Policy
|
|
335
|
+
</Link>
|
|
336
|
+
</Text>
|
|
337
|
+
</Section>
|
|
183
338
|
</Container>
|
|
184
339
|
</Body>
|
|
185
340
|
</Html>
|