@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,311 +1,105 @@
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
+ SmallText,
11
+ PrimaryButton,
12
+ SecondaryButton,
13
+ DiscordButton,
14
+ colors,
15
+ } from "../components";
16
16
 
17
17
  interface SubscriptionCanceledEmailProps {
18
18
  userName: string;
19
19
  cancellationDate: string;
20
20
  feedbackUrl?: string;
21
21
  reactivateUrl: string;
22
- websiteUrl: string;
22
+ websiteUrl?: string;
23
23
  }
24
24
 
25
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
26
-
27
25
  export const SubscriptionCanceledEmail = ({
28
- userName,
29
- cancellationDate,
30
- feedbackUrl,
31
- reactivateUrl,
26
+ userName = "Alex",
27
+ cancellationDate = "January 15, 2025",
28
+ feedbackUrl = "https://tracked.gg/feedback",
29
+ reactivateUrl = "https://tracked.gg/reactivate",
32
30
  websiteUrl = "https://tracked.gg",
33
31
  }: SubscriptionCanceledEmailProps) => {
34
32
  return (
35
- <Html>
36
- <Head>
37
- <meta name="color-scheme" content="light only" />
38
- <meta name="supported-color-schemes" content="light only" />
39
- </Head>
40
- <Preview>Your Tracked subscription has been canceled</Preview>
41
- <Body style={main}>
42
- <Container style={container}>
43
- <Section style={box}>
44
- <Row style={{ marginBottom: "8px" }}>
45
- <Column style={{ width: "auto", verticalAlign: "middle" }}>
46
- <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
47
- </Column>
48
- <Column
49
- style={{
50
- width: "auto",
51
- verticalAlign: "middle",
52
- paddingLeft: "4px",
53
- }}
54
- >
55
- <Text
56
- style={{
57
- fontSize: "28px",
58
- fontWeight: "900",
59
- fontFamily:
60
- "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
61
- color: "#020617",
62
- margin: "0",
63
- lineHeight: "32px",
64
- letterSpacing: "0.5px",
65
- }}
66
- >
67
- TRACKED
68
- </Text>
69
- </Column>
70
- </Row>
71
- <Hr style={hr} />
72
-
73
- <Text style={heading}>Subscription Canceled</Text>
74
- <Text style={paragraph}>
75
- Hi {userName}, we've confirmed that your Tracked subscription has
76
- been canceled.
77
- </Text>
78
-
79
- <Section style={infoBox}>
80
- <Text style={infoHeading}>What happens next:</Text>
81
- <Text style={infoText}>
82
- Your subscription will remain active until {cancellationDate}
83
- </Text>
84
- <Text style={infoText}>
85
- • You'll continue to have full access until that date
86
- </Text>
87
- <Text style={infoText}>
88
- Your data will be safely stored and available if you return
89
- </Text>
90
- </Section>
91
-
92
- <Text style={paragraph}>
93
- We're sorry to see you go! Your feedback helps us improve Tracked
94
- for everyone.
95
- </Text>
96
-
97
- {feedbackUrl && (
98
- <div
99
- style={{
100
- marginTop: "16px",
101
- marginBottom: "16px",
102
- textAlign: "left" as const,
103
- }}
104
- >
105
- <a
106
- href={feedbackUrl}
107
- style={{
108
- backgroundColor: "transparent",
109
- border: "1px solid #4ade80",
110
- borderRadius: "8px",
111
- fontSize: "14px",
112
- fontWeight: "bold",
113
- textDecoration: "none",
114
- padding: "10px 24px",
115
- display: "inline-block",
116
- }}
117
- >
118
- <span
119
- style={{
120
- color: "#4ade80",
121
- textDecoration: "none",
122
- }}
123
- >
124
- Share Feedback
125
- </span>
126
- </a>
127
- </div>
128
- )}
129
-
130
- <Section style={winbackBox}>
131
- <Text style={winbackHeading}>Changed your mind?</Text>
132
- <Text style={winbackText}>
133
- You can reactivate your subscription at any time before{" "}
134
- {cancellationDate}.
135
- </Text>
136
- <div
137
- style={{
138
- marginTop: "16px",
139
- textAlign: "left" as const,
140
- }}
141
- >
142
- <a
143
- href={reactivateUrl}
144
- style={{
145
- backgroundColor: "#0f172a",
146
- borderRadius: "8px",
147
- fontSize: "16px",
148
- fontWeight: "bold",
149
- textDecoration: "none",
150
- padding: "12px 32px",
151
- display: "inline-block",
152
- }}
153
- >
154
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
155
- Reactivate Subscription
156
- </span>
157
- </a>
158
- </div>
159
- </Section>
160
-
161
- <div
162
- style={{
163
- textAlign: "left" as const,
164
- margin: "24px 0",
165
- }}
166
- >
167
- <a
168
- href="https://www.discord.gg/trackedgg"
169
- style={{
170
- backgroundColor: "#5865F2",
171
- borderRadius: "8px",
172
- fontSize: "16px",
173
- fontWeight: "bold",
174
- textDecoration: "none",
175
- padding: "12px 32px",
176
- display: "inline-block",
177
- }}
178
- >
179
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
180
- Join our Discord Community
181
- </span>
182
- </a>
183
- </div>
184
-
185
- <Hr style={hr} />
186
- <Text style={footer}>
187
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
188
- Street, Vancouver, BC
189
- </Text>
190
-
191
- <Container>
192
- <Link
193
- href={`${websiteUrl}/terms`}
194
- style={{ ...footer, paddingRight: 10 }}
195
- >
196
- Terms
197
- </Link>
198
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
199
- <Link
200
- href={`${websiteUrl}/privacy`}
201
- style={{ ...footer, paddingRight: 10 }}
202
- >
203
- Privacy
204
- </Link>
205
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
206
- <Link
207
- href={`${websiteUrl}/support`}
208
- style={{ ...footer, paddingRight: 10 }}
209
- >
210
- Support
211
- </Link>
212
- </Container>
213
-
214
- <Text style={footer}>
215
- This is a service notification by the Tracked Training Platform.
216
- </Text>
217
- </Section>
218
- </Container>
219
- </Body>
220
- </Html>
33
+ <EmailLayout preview="Your Tracked subscription has been canceled">
34
+ <EmailHeader />
35
+
36
+ <Heading>Subscription Canceled</Heading>
37
+ <Paragraph>
38
+ Hi {userName}, we've confirmed that your Tracked subscription has been
39
+ canceled.
40
+ </Paragraph>
41
+
42
+ <FeatureBox title="What happens next:">
43
+ <SmallText style={{ marginBottom: "4px" }}>
44
+ Your subscription will remain active until {cancellationDate}
45
+ </SmallText>
46
+ <SmallText style={{ marginBottom: "4px" }}>
47
+ • You'll continue to have full access until that date
48
+ </SmallText>
49
+ <SmallText>
50
+ Your data will be safely stored and available if you return
51
+ </SmallText>
52
+ </FeatureBox>
53
+
54
+ <Paragraph>
55
+ We're sorry to see you go! Your feedback helps us improve Tracked for
56
+ everyone.
57
+ </Paragraph>
58
+
59
+ {feedbackUrl && (
60
+ <SecondaryButton href={feedbackUrl}>Share Feedback</SecondaryButton>
61
+ )}
62
+
63
+ <Section
64
+ style={{
65
+ backgroundColor: colors.surface,
66
+ padding: "20px 24px",
67
+ borderRadius: "8px",
68
+ margin: "24px 0",
69
+ borderLeft: `4px solid ${colors.accent}`,
70
+ }}
71
+ >
72
+ <Text
73
+ style={{
74
+ color: colors.accent,
75
+ fontSize: "18px",
76
+ fontWeight: "bold" as const,
77
+ marginBottom: "8px",
78
+ }}
79
+ >
80
+ Changed your mind?
81
+ </Text>
82
+ <Text
83
+ style={{
84
+ color: colors.textSecondary,
85
+ fontSize: "14px",
86
+ lineHeight: "20px",
87
+ margin: "0",
88
+ }}
89
+ >
90
+ You can reactivate your subscription at any time before{" "}
91
+ {cancellationDate}.
92
+ </Text>
93
+ <PrimaryButton href={reactivateUrl}>
94
+ Reactivate Subscription
95
+ </PrimaryButton>
96
+ </Section>
97
+
98
+ <DiscordButton />
99
+
100
+ <EmailFooter websiteUrl={websiteUrl} />
101
+ </EmailLayout>
221
102
  );
222
103
  };
223
104
 
224
- const main = {
225
- backgroundColor: "#020617", // slate-950
226
- fontFamily:
227
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
228
- };
229
-
230
- const container = {
231
- backgroundColor: "#020617", // slate-950
232
- margin: "0 auto",
233
- padding: "20px 0 48px",
234
- marginBottom: "64px",
235
- borderRadius: "8px",
236
- };
237
-
238
- const box = {
239
- padding: "0 24px",
240
- };
241
-
242
- const hr = {
243
- borderColor: "#4ade80", // green-400
244
- margin: "24px 0",
245
- borderWidth: "1px",
246
- };
247
-
248
- const paragraph = {
249
- color: "#ffffff", // white
250
- fontSize: "16px",
251
- lineHeight: "24px",
252
- textAlign: "left" as const,
253
- };
254
-
255
- const heading = {
256
- color: "#ffffff", // white
257
- fontSize: "24px",
258
- lineHeight: "32px",
259
- fontWeight: "bold",
260
- marginBottom: "16px",
261
- };
262
-
263
- const infoBox = {
264
- backgroundColor: "#1e293b",
265
- padding: "16px 24px",
266
- borderRadius: "8px",
267
- margin: "24px 0",
268
- };
269
-
270
- const infoHeading = {
271
- color: "#ffffff",
272
- fontSize: "16px",
273
- fontWeight: "bold",
274
- marginBottom: "12px",
275
- };
276
-
277
- const infoText = {
278
- color: "#e2e8f0",
279
- fontSize: "14px",
280
- lineHeight: "24px",
281
- marginBottom: "4px",
282
- };
283
-
284
- const winbackBox = {
285
- backgroundColor: "#1e293b",
286
- padding: "20px 24px",
287
- borderRadius: "8px",
288
- margin: "24px 0",
289
- borderLeft: "4px solid #4ade80",
290
- };
291
-
292
- const winbackHeading = {
293
- color: "#4ade80",
294
- fontSize: "18px",
295
- fontWeight: "bold",
296
- marginBottom: "8px",
297
- };
298
-
299
- const winbackText = {
300
- color: "#e2e8f0",
301
- fontSize: "14px",
302
- lineHeight: "20px",
303
- };
304
-
305
- const footer = {
306
- color: "#94a3b8", // slate-400 for subtle footer text
307
- fontSize: "12px",
308
- lineHeight: "16px",
309
- };
310
-
311
105
  export default SubscriptionCanceledEmail;
@@ -1,5 +1,13 @@
1
- import React from "react";
2
- import { Container, Hr, Text } from "@react-email/components";
1
+ import * as React from "react";
2
+ import {
3
+ EmailLayout,
4
+ EmailHeader,
5
+ EmailFooter,
6
+ Heading,
7
+ FeatureBox,
8
+ SmallText,
9
+ DiscordButton,
10
+ } from "../components";
3
11
 
4
12
  interface SupportEmailProps {
5
13
  email: string;
@@ -8,73 +16,31 @@ interface SupportEmailProps {
8
16
  }
9
17
 
10
18
  export const SupportEmail = ({
11
- email,
12
- message,
13
- category,
19
+ email = "user@example.com",
20
+ message = "I'm having trouble syncing my workouts between devices. The app shows different workout history on my phone versus my tablet. Can you help me resolve this issue?",
21
+ category = "Technical Issue",
14
22
  }: SupportEmailProps) => (
15
- <Container style={styles.container}>
16
- <Hr style={styles.hr} />
17
- <Text style={styles.text}>
18
- <strong>Email:</strong> {email}
19
- </Text>
20
- <Text style={styles.text}>
21
- <strong>Message:</strong> {message}
22
- </Text>
23
- <Text style={styles.text}>
24
- <strong>Category:</strong> {category}
25
- </Text>
23
+ <EmailLayout preview={`Support request from ${email}`}>
24
+ <EmailHeader />
26
25
 
27
- <div
28
- style={{
29
- textAlign: "left" as const,
30
- margin: "24px 0",
31
- }}
32
- >
33
- <a
34
- href="https://www.discord.gg/trackedgg"
35
- style={{
36
- backgroundColor: "#5865F2",
37
- borderRadius: "8px",
38
- fontSize: "16px",
39
- fontWeight: "bold",
40
- textDecoration: "none",
41
- padding: "12px 32px",
42
- display: "inline-block",
43
- }}
44
- >
45
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
46
- Join our Discord Community
47
- </span>
48
- </a>
49
- </div>
26
+ <Heading>Support Request</Heading>
50
27
 
51
- <Hr style={styles.hr} />
52
- <Text style={styles.footer}>Tracked, 9101 Horne Street, Vancouver, BC</Text>
53
- </Container>
28
+ <FeatureBox>
29
+ <SmallText style={{ marginBottom: "8px" }}>
30
+ <strong>Email:</strong> {email}
31
+ </SmallText>
32
+ <SmallText style={{ marginBottom: "8px" }}>
33
+ <strong>Category:</strong> {category}
34
+ </SmallText>
35
+ <SmallText>
36
+ <strong>Message:</strong> {message}
37
+ </SmallText>
38
+ </FeatureBox>
39
+
40
+ <DiscordButton />
41
+
42
+ <EmailFooter />
43
+ </EmailLayout>
54
44
  );
55
45
 
56
- const styles = {
57
- container: {
58
- backgroundColor: "#1F2937",
59
- margin: "0 auto",
60
- padding: "16px",
61
- paddingBottom: "64px",
62
- borderRadius: "10px",
63
- fontFamily: "sans-serif",
64
- },
65
- img: {
66
- width: "40px",
67
- height: "40px",
68
- },
69
- hr: {
70
- borderColor: "#e6ebf1",
71
- margin: "16px 0",
72
- },
73
- text: {
74
- color: "#FFFFFF",
75
- },
76
- footer: {
77
- color: "#6B7280",
78
- fontSize: "12px",
79
- },
80
- };
46
+ export default SupportEmail;