@tracked/emails 0.1.5 → 0.2.0

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.
Files changed (50) hide show
  1. package/dist/emails/client-onboarded.d.ts +35 -0
  2. package/dist/emails/client-onboarded.d.ts.map +1 -0
  3. package/dist/emails/client-onboarded.js +152 -0
  4. package/dist/emails/client-onboarded.js.map +1 -0
  5. package/dist/emails/index.d.ts +1 -0
  6. package/dist/emails/index.d.ts.map +1 -1
  7. package/dist/emails/index.js +1 -0
  8. package/dist/emails/index.js.map +1 -1
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +2 -2
  12. package/dist/index.js.map +1 -1
  13. package/package.json +20 -20
  14. package/src/components/content.tsx +351 -0
  15. package/src/components/index.ts +44 -0
  16. package/src/components/interactive.tsx +260 -0
  17. package/src/components/layout.tsx +217 -0
  18. package/src/components/tokens.ts +74 -0
  19. package/src/components/typography.tsx +148 -0
  20. package/src/emails/anniversary.tsx +133 -0
  21. package/src/emails/app-review-request.tsx +100 -0
  22. package/src/emails/bodyweight-goal-reached.tsx +202 -350
  23. package/src/emails/client-inactive-alert.tsx +130 -0
  24. package/src/emails/client-onboarded.tsx +272 -0
  25. package/src/emails/coach-invite.tsx +67 -250
  26. package/src/emails/coach-removed-client.tsx +36 -197
  27. package/src/emails/direct-message.tsx +69 -227
  28. package/src/emails/feature-discovery.tsx +82 -266
  29. package/src/emails/first-workout-assigned.tsx +52 -238
  30. package/src/emails/first-workout-completed.tsx +88 -294
  31. package/src/emails/inactive-reengagement.tsx +81 -0
  32. package/src/emails/index.tsx +1 -0
  33. package/src/emails/monthly-report.tsx +198 -520
  34. package/src/emails/new-follower.tsx +60 -238
  35. package/src/emails/nps-survey.tsx +149 -0
  36. package/src/emails/subscription-canceled.tsx +88 -294
  37. package/src/emails/support-email.tsx +33 -67
  38. package/src/emails/team-invite.tsx +47 -240
  39. package/src/emails/team-member-removed-email.tsx +23 -218
  40. package/src/emails/tracked-magic-link-activate.tsx +29 -237
  41. package/src/emails/tracked-magic-link.tsx +31 -251
  42. package/src/emails/week-one-checkin.tsx +108 -329
  43. package/src/emails/weekly-progress-digest.tsx +248 -0
  44. package/src/emails/welcome.tsx +58 -326
  45. package/src/index.ts +19 -2
  46. package/dist/emails/client-accepted-invitation.d.ts +0 -10
  47. package/dist/emails/client-accepted-invitation.d.ts.map +0 -1
  48. package/dist/emails/client-accepted-invitation.js +0 -99
  49. package/dist/emails/client-accepted-invitation.js.map +0 -1
  50. package/src/emails/client-accepted-invitation.tsx +0 -258
@@ -1,353 +1,132 @@
1
- import React from "react";
1
+ import * as React from "react";
2
+ import { Section, Text } from "@react-email/components";
2
3
  import {
3
- Body,
4
- Column,
5
- Container,
6
- Head,
7
- Hr,
8
- Html,
9
- Img,
10
- Link,
11
- Preview,
12
- Row,
13
- Section,
14
- Text,
15
- } from "@react-email/components";
4
+ EmailLayout,
5
+ EmailHeader,
6
+ EmailFooter,
7
+ Heading,
8
+ Paragraph,
9
+ FeatureBox,
10
+ FeatureList,
11
+ TipBox,
12
+ SmallText,
13
+ PrimaryButton,
14
+ DiscordButton,
15
+ TextLink,
16
+ colors,
17
+ } from "../components";
16
18
 
17
19
  interface WeekOneCheckinEmailProps {
18
20
  userName: string;
19
21
  workoutsCompleted: number;
20
22
  appUrl: string;
21
23
  supportUrl?: string;
22
- websiteUrl: string;
24
+ websiteUrl?: string;
25
+ unsubscribeUrl?: string;
23
26
  }
24
27
 
25
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
26
-
27
28
  export const WeekOneCheckinEmail = ({
28
- userName,
29
- workoutsCompleted,
30
- appUrl,
31
- supportUrl,
29
+ userName = "Alex",
30
+ workoutsCompleted = 4,
31
+ appUrl = "tracked://app",
32
+ supportUrl = "https://tracked.gg/support",
32
33
  websiteUrl = "https://tracked.gg",
34
+ unsubscribeUrl = "https://tracked.gg/unsubscribe",
33
35
  }: WeekOneCheckinEmailProps) => {
34
36
  const isActive = workoutsCompleted > 0;
35
37
 
36
38
  return (
37
- <Html>
38
- <Head>
39
- <meta name="color-scheme" content="light only" />
40
- <meta name="supported-color-schemes" content="light only" />
41
- </Head>
42
- <Preview>How's your first week on Tracked going?</Preview>
43
- <Body style={main}>
44
- <Container style={container}>
45
- <Section style={box}>
46
- <Row style={{ marginBottom: "8px" }}>
47
- <Column style={{ width: "auto", verticalAlign: "middle" }}>
48
- <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
49
- </Column>
50
- <Column
51
- style={{
52
- width: "auto",
53
- verticalAlign: "middle",
54
- paddingLeft: "4px",
55
- }}
56
- >
57
- <Text
58
- style={{
59
- fontSize: "28px",
60
- fontWeight: "900",
61
- fontFamily:
62
- "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
63
- color: "#020617",
64
- margin: "0",
65
- lineHeight: "32px",
66
- letterSpacing: "0.5px",
67
- }}
68
- >
69
- TRACKED
70
- </Text>
71
- </Column>
72
- </Row>
73
- <Hr style={hr} />
74
-
75
- <Text style={heading}>Week One Check-In</Text>
76
-
77
- {isActive ? (
78
- <>
79
- <Text style={paragraph}>
80
- Hi {userName}, you've been on Tracked for a week now and we
81
- wanted to check in!
82
- </Text>
83
-
84
- <Section style={statsBox}>
85
- <Text style={statsHeading}>Your First Week:</Text>
86
- <Text style={statsText}>
87
- <strong>Workouts Logged:</strong> {workoutsCompleted}
88
- </Text>
89
- <Text style={{ ...statsText, marginTop: "8px" }}>
90
- {workoutsCompleted >= 3
91
- ? "🔥 Great start! You're building strong habits."
92
- : "💪 Good progress! Try to aim for 3-4 workouts per week."}
93
- </Text>
94
- </Section>
95
-
96
- <Text style={paragraph}>
97
- Consistency is the key to reaching your fitness goals. Keep up
98
- the momentum and remember - every workout counts!
99
- </Text>
100
- </>
101
- ) : (
102
- <>
103
- <Text style={paragraph}>
104
- Hi {userName}, you joined Tracked a week ago, and we noticed you
105
- haven't logged your first workout yet.
106
- </Text>
107
-
108
- <Section style={encouragementBox}>
109
- <Text style={encouragementHeading}>Getting Started is Easy:</Text>
110
- <ul style={featureList}>
111
- <li style={featureItem}>
112
- Open the app and tap the "+" button
113
- </li>
114
- <li style={featureItem}>
115
- Select your exercises or create a custom workout
116
- </li>
117
- <li style={featureItem}>
118
- Track your sets, reps, and weight as you go
119
- </li>
120
- <li style={featureItem}>
121
- Complete your workout and see your progress!
122
- </li>
123
- </ul>
124
- </Section>
125
-
126
- <Text style={paragraph}>
127
- The hardest part is getting started. Once you log that first
128
- workout, you'll be on your way to building lasting fitness habits.
129
- </Text>
130
- </>
131
- )}
132
-
133
- <div
134
- style={{
135
- marginTop: "24px",
136
- marginBottom: "24px",
137
- textAlign: "left" as const,
138
- }}
139
- >
140
- <a
141
- href={appUrl}
142
- style={{
143
- backgroundColor: "#0f172a",
144
- borderRadius: "8px",
145
- fontSize: "16px",
146
- fontWeight: "bold",
147
- textDecoration: "none",
148
- padding: "12px 32px",
149
- display: "inline-block",
150
- }}
151
- >
152
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
153
- {isActive ? "Continue Your Journey" : "Log Your First Workout"}
154
- </span>
155
- </a>
156
- </div>
157
-
158
- <Section style={tipBox}>
159
- <Text style={tipHeading}>Need Help?</Text>
160
- <Text style={tipText}>
161
- Our support team is here to help you get the most out of Tracked.
162
- {supportUrl && (
163
- <>
164
- {" "}
165
- <Link
166
- href={supportUrl}
167
- style={{ color: "#4ade80", textDecoration: "underline" }}
168
- >
169
- Contact us
170
- </Link>{" "}
171
- anytime with questions.
172
- </>
173
- )}
174
- </Text>
175
- </Section>
176
-
177
- <div
39
+ <EmailLayout preview="How's your first week on Tracked going?">
40
+ <EmailHeader />
41
+
42
+ <Heading>Week One Check-In</Heading>
43
+
44
+ {isActive ? (
45
+ <>
46
+ <Paragraph>
47
+ Hi {userName}, you've been on Tracked for a week now and we wanted
48
+ to check in!
49
+ </Paragraph>
50
+
51
+ <Section
52
+ style={{
53
+ backgroundColor: colors.surface,
54
+ padding: "16px 24px",
55
+ borderRadius: "8px",
56
+ margin: "24px 0",
57
+ borderLeft: `4px solid ${colors.accent}`,
58
+ }}
59
+ >
60
+ <Text
178
61
  style={{
179
- textAlign: "left" as const,
180
- margin: "24px 0",
62
+ color: colors.accent,
63
+ fontSize: "16px",
64
+ fontWeight: "bold" as const,
65
+ marginBottom: "12px",
181
66
  }}
182
67
  >
183
- <a
184
- href="https://www.discord.gg/trackedgg"
185
- style={{
186
- backgroundColor: "#5865F2",
187
- borderRadius: "8px",
188
- fontSize: "16px",
189
- fontWeight: "bold",
190
- textDecoration: "none",
191
- padding: "12px 32px",
192
- display: "inline-block",
193
- }}
194
- >
195
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
196
- Join our Discord Community
197
- </span>
198
- </a>
199
- </div>
200
-
201
- <Hr style={hr} />
202
- <Text style={footer}>
203
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
204
- Street, Vancouver, BC
205
- </Text>
206
-
207
- <Container>
208
- <Link
209
- href={`${websiteUrl}/terms`}
210
- style={{ ...footer, paddingRight: 10 }}
211
- >
212
- Terms
213
- </Link>
214
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
215
- <Link
216
- href={`${websiteUrl}/privacy`}
217
- style={{ ...footer, paddingRight: 10 }}
218
- >
219
- Privacy
220
- </Link>
221
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
222
- <Link
223
- href={`${websiteUrl}/support`}
224
- style={{ ...footer, paddingRight: 10 }}
225
- >
226
- Support
227
- </Link>
228
- </Container>
229
-
230
- <Text style={footer}>
231
- This is a service notification by the Tracked Training Platform.
68
+ Your First Week:
232
69
  </Text>
70
+ <SmallText>
71
+ <strong>Workouts Logged:</strong> {workoutsCompleted}
72
+ </SmallText>
73
+ <SmallText style={{ marginTop: "8px" }}>
74
+ {workoutsCompleted >= 3
75
+ ? "Great start! You're building strong habits."
76
+ : "Good progress! Try to aim for 3-4 workouts per week."}
77
+ </SmallText>
233
78
  </Section>
234
- </Container>
235
- </Body>
236
- </Html>
237
- );
238
- };
239
-
240
- const main = {
241
- backgroundColor: "#020617", // slate-950
242
- fontFamily:
243
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
244
- };
245
-
246
- const container = {
247
- backgroundColor: "#020617", // slate-950
248
- margin: "0 auto",
249
- padding: "20px 0 48px",
250
- marginBottom: "64px",
251
- borderRadius: "8px",
252
- };
253
-
254
- const box = {
255
- padding: "0 24px",
256
- };
257
-
258
- const hr = {
259
- borderColor: "#4ade80", // green-400
260
- margin: "24px 0",
261
- borderWidth: "1px",
262
- };
263
-
264
- const paragraph = {
265
- color: "#ffffff", // white
266
- fontSize: "16px",
267
- lineHeight: "24px",
268
- textAlign: "left" as const,
269
- };
270
-
271
- const heading = {
272
- color: "#ffffff", // white
273
- fontSize: "24px",
274
- lineHeight: "32px",
275
- fontWeight: "bold",
276
- marginBottom: "16px",
277
- };
278
-
279
- const statsBox = {
280
- backgroundColor: "#1e293b",
281
- padding: "16px 24px",
282
- borderRadius: "8px",
283
- margin: "24px 0",
284
- borderLeft: "4px solid #4ade80",
285
- };
286
-
287
- const statsHeading = {
288
- color: "#4ade80",
289
- fontSize: "16px",
290
- fontWeight: "bold",
291
- marginBottom: "12px",
292
- };
293
-
294
- const statsText = {
295
- color: "#e2e8f0",
296
- fontSize: "14px",
297
- lineHeight: "24px",
298
- marginBottom: "4px",
299
- };
300
-
301
- const encouragementBox = {
302
- backgroundColor: "#1e293b",
303
- padding: "16px 24px",
304
- borderRadius: "8px",
305
- margin: "24px 0",
306
- };
307
79
 
308
- const encouragementHeading = {
309
- color: "#ffffff",
310
- fontSize: "16px",
311
- fontWeight: "bold",
312
- marginBottom: "12px",
313
- };
314
-
315
- const featureList = {
316
- margin: "0",
317
- paddingLeft: "20px",
318
- };
319
-
320
- const featureItem = {
321
- color: "#e2e8f0",
322
- fontSize: "14px",
323
- lineHeight: "24px",
324
- marginBottom: "8px",
325
- };
326
-
327
- const tipBox = {
328
- backgroundColor: "#1e293b",
329
- padding: "16px 24px",
330
- borderRadius: "8px",
331
- margin: "24px 0",
332
- };
333
-
334
- const tipHeading = {
335
- color: "#4ade80",
336
- fontSize: "14px",
337
- fontWeight: "bold",
338
- marginBottom: "8px",
339
- };
340
-
341
- const tipText = {
342
- color: "#e2e8f0",
343
- fontSize: "14px",
344
- lineHeight: "20px",
345
- };
346
-
347
- const footer = {
348
- color: "#94a3b8", // slate-400 for subtle footer text
349
- fontSize: "12px",
350
- lineHeight: "16px",
80
+ <Paragraph>
81
+ Consistency is the key to reaching your fitness goals. Keep up the
82
+ momentum and remember - every workout counts!
83
+ </Paragraph>
84
+ </>
85
+ ) : (
86
+ <>
87
+ <Paragraph>
88
+ Hi {userName}, you joined Tracked a week ago, and we noticed you
89
+ haven't logged your first workout yet.
90
+ </Paragraph>
91
+
92
+ <FeatureBox title="Getting Started is Easy:">
93
+ <FeatureList
94
+ items={[
95
+ { title: 'Open the app and tap the "+" button' },
96
+ { title: "Select your exercises or create a custom workout" },
97
+ { title: "Track your sets, reps, and weight as you go" },
98
+ { title: "Complete your workout and see your progress!" },
99
+ ]}
100
+ />
101
+ </FeatureBox>
102
+
103
+ <Paragraph>
104
+ The hardest part is getting started. Once you log that first
105
+ workout, you'll be on your way to building lasting fitness habits.
106
+ </Paragraph>
107
+ </>
108
+ )}
109
+
110
+ <PrimaryButton href={appUrl}>
111
+ {isActive ? "Continue Your Journey" : "Log Your First Workout"}
112
+ </PrimaryButton>
113
+
114
+ <TipBox title="Need Help?">
115
+ Our support team is here to help you get the most out of Tracked.
116
+ {supportUrl && (
117
+ <>
118
+ {" "}
119
+ <TextLink href={supportUrl}>Contact us</TextLink> anytime with
120
+ questions.
121
+ </>
122
+ )}
123
+ </TipBox>
124
+
125
+ <DiscordButton />
126
+
127
+ <EmailFooter websiteUrl={websiteUrl} marketing unsubscribeUrl={unsubscribeUrl} />
128
+ </EmailLayout>
129
+ );
351
130
  };
352
131
 
353
132
  export default WeekOneCheckinEmail;