brookmind-emails 0.1.7 → 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.
@@ -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: "#F8FAFC",
29
- fontFamily: "'Outfit', Arial, sans-serif",
41
+ backgroundColor: colors.background,
42
+ fontFamily: "'Inter', 'Segoe UI', Arial, sans-serif",
30
43
  },
31
44
  container: {
32
- maxWidth: "560px",
33
- margin: "32px auto",
34
- backgroundColor: "#ffffff",
35
- border: "1px solid #E2E8F0",
36
- borderRadius: "16px",
37
- boxShadow: "0 24px 48px rgba(15, 23, 42, 0.08)",
38
- overflow: "hidden",
39
- },
40
- content: {
41
- padding: "32px 40px 24px",
42
- },
43
- heading: {
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: "24px",
72
+ fontSize: "28px",
46
73
  fontWeight: 700,
47
- color: "#0F172A",
48
- textAlign: "center" as const,
74
+ color: colors.white,
75
+ lineHeight: "1.3",
49
76
  },
50
77
  paragraph: {
51
- margin: "0 0 24px",
78
+ margin: "0 0 28px",
52
79
  fontSize: "16px",
53
80
  lineHeight: "1.6",
54
- color: "rgba(15, 23, 42, 0.72)",
81
+ color: colors.textSecondary,
82
+ textAlign: "center" as const,
55
83
  },
56
84
  highlightBox: {
57
- backgroundColor: "rgba(99, 102, 241, 0.08)",
58
- border: "1px solid rgba(99, 102, 241, 0.24)",
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: "24px",
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: "14px",
70
- color: "rgba(15, 23, 42, 0.6)",
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: "#0F172A",
99
+ color: colors.white,
77
100
  margin: 0,
78
101
  },
79
102
  buttonContainer: {
80
103
  textAlign: "center" as const,
81
- marginBottom: "24px",
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: "rgba(15, 23, 42, 0.6)",
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: "#6366F1",
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="Outfit"
197
+ fontFamily="Inter"
111
198
  fallbackFontFamily="Arial"
112
199
  webFont={{
113
- url: "https://fonts.gstatic.com/s/outfit/v11/QGYyz_MVcBeNP4NjuGObqx1XmO1I4TC1C4G-EiAou6Y.woff2",
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
- <Header logoUrl={modelfyConfig.logoUrl} logoAlt="Modelfy" subtitle="Gift for you" />
126
- <Section style={styles.content}>
127
- <Text style={styles.heading}>You've Got a Gift!</Text>
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
- Hi <strong>{email}</strong>, great news! You've been granted a promotional{" "}
130
- <strong>{planName}</strong> subscription.
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
- <tr>
136
- <td style={{ paddingBottom: "12px" }}>
137
- <Text style={styles.highlightLabel}>Plan</Text>
138
- <Text style={styles.highlightValue}>{planName}</Text>
139
- </td>
140
- <td style={{ paddingBottom: "12px", textAlign: "right" }}>
141
- <Text style={styles.highlightLabel}>Duration</Text>
142
- <Text style={styles.highlightValue}>{durationDays} days</Text>
143
- </td>
144
- </tr>
145
- <tr>
146
- <td>
147
- <Text style={styles.highlightLabel}>Credits Included</Text>
148
- <Text style={styles.highlightValue}>{safeCredits.toLocaleString()}</Text>
149
- </td>
150
- <td style={{ textAlign: "right" }}>
151
- <Text style={styles.highlightLabel}>Expires</Text>
152
- <Text style={styles.highlightValue}>{expiresAt}</Text>
153
- </td>
154
- </tr>
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
- <Button href={modelfyConfig.appUrl}>Open Modelfy</Button>
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? Contact us at{" "}
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
- <Footer
179
- companyName={modelfyConfig.companyName}
180
- message="You received this email because you were granted a promotional subscription."
181
- supportEmail={modelfyConfig.supportEmail}
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>