@tracked/emails 0.1.4 → 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 (53) 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/emails/monthly-report.d.ts.map +1 -1
  10. package/dist/emails/monthly-report.js +31 -47
  11. package/dist/emails/monthly-report.js.map +1 -1
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -2
  15. package/dist/index.js.map +1 -1
  16. package/package.json +20 -20
  17. package/src/components/content.tsx +351 -0
  18. package/src/components/index.ts +44 -0
  19. package/src/components/interactive.tsx +260 -0
  20. package/src/components/layout.tsx +217 -0
  21. package/src/components/tokens.ts +74 -0
  22. package/src/components/typography.tsx +148 -0
  23. package/src/emails/anniversary.tsx +133 -0
  24. package/src/emails/app-review-request.tsx +100 -0
  25. package/src/emails/bodyweight-goal-reached.tsx +202 -350
  26. package/src/emails/client-inactive-alert.tsx +130 -0
  27. package/src/emails/client-onboarded.tsx +272 -0
  28. package/src/emails/coach-invite.tsx +67 -250
  29. package/src/emails/coach-removed-client.tsx +36 -197
  30. package/src/emails/direct-message.tsx +69 -227
  31. package/src/emails/feature-discovery.tsx +82 -266
  32. package/src/emails/first-workout-assigned.tsx +52 -238
  33. package/src/emails/first-workout-completed.tsx +88 -294
  34. package/src/emails/inactive-reengagement.tsx +81 -0
  35. package/src/emails/index.tsx +1 -0
  36. package/src/emails/monthly-report.tsx +195 -525
  37. package/src/emails/new-follower.tsx +60 -238
  38. package/src/emails/nps-survey.tsx +149 -0
  39. package/src/emails/subscription-canceled.tsx +88 -294
  40. package/src/emails/support-email.tsx +33 -67
  41. package/src/emails/team-invite.tsx +47 -240
  42. package/src/emails/team-member-removed-email.tsx +23 -218
  43. package/src/emails/tracked-magic-link-activate.tsx +29 -237
  44. package/src/emails/tracked-magic-link.tsx +31 -251
  45. package/src/emails/week-one-checkin.tsx +108 -329
  46. package/src/emails/weekly-progress-digest.tsx +248 -0
  47. package/src/emails/welcome.tsx +58 -326
  48. package/src/index.ts +19 -2
  49. package/dist/emails/client-accepted-invitation.d.ts +0 -10
  50. package/dist/emails/client-accepted-invitation.d.ts.map +0 -1
  51. package/dist/emails/client-accepted-invitation.js +0 -99
  52. package/dist/emails/client-accepted-invitation.js.map +0 -1
  53. package/src/emails/client-accepted-invitation.tsx +0 -258
@@ -1,18 +1,16 @@
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
+ SmallText,
10
+ PrimaryButton,
11
+ DiscordButton,
12
+ colors,
13
+ } from "../components";
16
14
 
17
15
  interface DirectMessageEmailProps {
18
16
  recipientName: string;
@@ -20,17 +18,15 @@ interface DirectMessageEmailProps {
20
18
  senderUsername?: string;
21
19
  messagePreview: string;
22
20
  messageUrl: string;
23
- websiteUrl: string;
21
+ websiteUrl?: string;
24
22
  }
25
23
 
26
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
27
-
28
24
  export const DirectMessageEmail = ({
29
- recipientName,
30
- senderName,
31
- senderUsername,
32
- messagePreview,
33
- messageUrl,
25
+ recipientName = "Alex",
26
+ senderName = "Jordan Smith",
27
+ senderUsername = "jordanfitness",
28
+ messagePreview = "Hey! Great workout today. I noticed you hit a new PR on bench press - that's awesome! Want to share your training program?",
29
+ messageUrl = "tracked://app",
34
30
  websiteUrl = "https://tracked.gg",
35
31
  }: DirectMessageEmailProps) => {
36
32
  const displayName = senderUsername
@@ -38,212 +34,58 @@ export const DirectMessageEmail = ({
38
34
  : senderName;
39
35
 
40
36
  return (
41
- <Html>
42
- <Head>
43
- <meta name="color-scheme" content="light only" />
44
- <meta name="supported-color-schemes" content="light only" />
45
- </Head>
46
- <Preview>New message from {senderName} on Tracked</Preview>
47
- <Body style={main}>
48
- <Container style={container}>
49
- <Section style={box}>
50
- <Row style={{ marginBottom: "8px" }}>
51
- <Column style={{ width: "auto", verticalAlign: "middle" }}>
52
- <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
53
- </Column>
54
- <Column
55
- style={{
56
- width: "auto",
57
- verticalAlign: "middle",
58
- paddingLeft: "4px",
59
- }}
60
- >
61
- <Text
62
- style={{
63
- fontSize: "28px",
64
- fontWeight: "900",
65
- fontFamily:
66
- "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
67
- color: "#020617",
68
- margin: "0",
69
- lineHeight: "32px",
70
- letterSpacing: "0.5px",
71
- }}
72
- >
73
- TRACKED
74
- </Text>
75
- </Column>
76
- </Row>
77
- <Hr style={hr} />
78
-
79
- <Text style={heading}>You Have a New Message</Text>
80
- <Text style={paragraph}>
81
- Hi {recipientName}, {displayName} sent you a message on Tracked.
82
- </Text>
83
-
84
- <Section style={messageBox}>
85
- <Text style={messageLabel}>Message Preview:</Text>
86
- <Text style={messageText}>{messagePreview}</Text>
87
- </Section>
88
-
89
- <div
90
- style={{
91
- marginTop: "24px",
92
- marginBottom: "24px",
93
- textAlign: "left" as const,
94
- }}
95
- >
96
- <a
97
- href={messageUrl}
98
- style={{
99
- backgroundColor: "#0f172a",
100
- borderRadius: "8px",
101
- fontSize: "16px",
102
- fontWeight: "bold",
103
- textDecoration: "none",
104
- padding: "12px 32px",
105
- display: "inline-block",
106
- }}
107
- >
108
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
109
- View Message
110
- </span>
111
- </a>
112
- </div>
113
-
114
- <Text style={{ ...paragraph, fontSize: "14px", color: "#94a3b8" }}>
115
- Open the Tracked app to read the full message and reply.
116
- </Text>
117
-
118
- <div
119
- style={{
120
- textAlign: "left" as const,
121
- margin: "24px 0",
122
- }}
123
- >
124
- <a
125
- href="https://www.discord.gg/trackedgg"
126
- style={{
127
- backgroundColor: "#5865F2",
128
- borderRadius: "8px",
129
- fontSize: "16px",
130
- fontWeight: "bold",
131
- textDecoration: "none",
132
- padding: "12px 32px",
133
- display: "inline-block",
134
- }}
135
- >
136
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
137
- Join our Discord Community
138
- </span>
139
- </a>
140
- </div>
141
-
142
- <Hr style={hr} />
143
- <Text style={footer}>
144
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
145
- Street, Vancouver, BC
146
- </Text>
147
-
148
- <Container>
149
- <Link
150
- href={`${websiteUrl}/terms`}
151
- style={{ ...footer, paddingRight: 10 }}
152
- >
153
- Terms
154
- </Link>
155
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
156
- <Link
157
- href={`${websiteUrl}/privacy`}
158
- style={{ ...footer, paddingRight: 10 }}
159
- >
160
- Privacy
161
- </Link>
162
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
163
- <Link
164
- href={`${websiteUrl}/support`}
165
- style={{ ...footer, paddingRight: 10 }}
166
- >
167
- Support
168
- </Link>
169
- </Container>
170
-
171
- <Text style={footer}>
172
- This is a service notification by the Tracked Training Platform.
173
- </Text>
174
- </Section>
175
- </Container>
176
- </Body>
177
- </Html>
37
+ <EmailLayout preview={`New message from ${senderName} on Tracked`}>
38
+ <EmailHeader />
39
+
40
+ <Heading>You Have a New Message</Heading>
41
+ <Paragraph>
42
+ Hi {recipientName}, {displayName} sent you a message on Tracked.
43
+ </Paragraph>
44
+
45
+ <Section
46
+ style={{
47
+ backgroundColor: colors.surface,
48
+ padding: "16px 24px",
49
+ borderRadius: "8px",
50
+ margin: "24px 0",
51
+ borderLeft: `4px solid ${colors.accent}`,
52
+ }}
53
+ >
54
+ <Text
55
+ style={{
56
+ color: colors.textMuted,
57
+ fontSize: "12px",
58
+ fontWeight: "bold" as const,
59
+ textTransform: "uppercase" as const,
60
+ marginBottom: "8px",
61
+ }}
62
+ >
63
+ Message Preview:
64
+ </Text>
65
+ <Text
66
+ style={{
67
+ color: colors.textPrimary,
68
+ fontSize: "15px",
69
+ lineHeight: "22px",
70
+ fontStyle: "italic" as const,
71
+ margin: "0",
72
+ }}
73
+ >
74
+ {messagePreview}
75
+ </Text>
76
+ </Section>
77
+
78
+ <PrimaryButton href={messageUrl}>View Message</PrimaryButton>
79
+
80
+ <SmallText muted>
81
+ Open the Tracked app to read the full message and reply.
82
+ </SmallText>
83
+
84
+ <DiscordButton />
85
+
86
+ <EmailFooter websiteUrl={websiteUrl} />
87
+ </EmailLayout>
178
88
  );
179
89
  };
180
90
 
181
- const main = {
182
- backgroundColor: "#020617", // slate-950
183
- fontFamily:
184
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
185
- };
186
-
187
- const container = {
188
- backgroundColor: "#020617", // slate-950
189
- margin: "0 auto",
190
- padding: "20px 0 48px",
191
- marginBottom: "64px",
192
- borderRadius: "8px",
193
- };
194
-
195
- const box = {
196
- padding: "0 24px",
197
- };
198
-
199
- const hr = {
200
- borderColor: "#4ade80", // green-400
201
- margin: "24px 0",
202
- borderWidth: "1px",
203
- };
204
-
205
- const paragraph = {
206
- color: "#ffffff", // white
207
- fontSize: "16px",
208
- lineHeight: "24px",
209
- textAlign: "left" as const,
210
- };
211
-
212
- const heading = {
213
- color: "#ffffff", // white
214
- fontSize: "24px",
215
- lineHeight: "32px",
216
- fontWeight: "bold",
217
- marginBottom: "16px",
218
- };
219
-
220
- const messageBox = {
221
- backgroundColor: "#1e293b",
222
- padding: "16px 24px",
223
- borderRadius: "8px",
224
- margin: "24px 0",
225
- borderLeft: "4px solid #4ade80",
226
- };
227
-
228
- const messageLabel = {
229
- color: "#94a3b8",
230
- fontSize: "12px",
231
- fontWeight: "bold",
232
- textTransform: "uppercase" as const,
233
- marginBottom: "8px",
234
- };
235
-
236
- const messageText = {
237
- color: "#ffffff",
238
- fontSize: "15px",
239
- lineHeight: "22px",
240
- fontStyle: "italic" as const,
241
- };
242
-
243
- const footer = {
244
- color: "#94a3b8", // slate-400 for subtle footer text
245
- fontSize: "12px",
246
- lineHeight: "16px",
247
- };
248
-
249
91
  export default DirectMessageEmail;
@@ -1,18 +1,18 @@
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
+ SmallText,
12
+ PrimaryButton,
13
+ DiscordButton,
14
+ colors,
15
+ } from "../components";
16
16
 
17
17
  interface FeatureDiscoveryEmailProps {
18
18
  userName?: string;
@@ -21,10 +21,9 @@ interface FeatureDiscoveryEmailProps {
21
21
  featureBenefits?: string[];
22
22
  featureUrl?: string;
23
23
  websiteUrl?: string;
24
+ unsubscribeUrl?: string;
24
25
  }
25
26
 
26
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
27
-
28
27
  export const FeatureDiscoveryEmail = ({
29
28
  userName = "Alex",
30
29
  featureName = "Progress Photos",
@@ -35,260 +34,77 @@ export const FeatureDiscoveryEmail = ({
35
34
  "Set reminders to take consistent progress photos",
36
35
  "Track multiple angles and body positions",
37
36
  ],
38
- featureUrl = "https://tracked.gg/progress-photos",
37
+ featureUrl = "tracked://physique-photos",
39
38
  websiteUrl = "https://tracked.gg",
39
+ unsubscribeUrl,
40
40
  }: FeatureDiscoveryEmailProps) => {
41
41
  return (
42
- <Html>
43
- <Head>
44
- <meta name="color-scheme" content="light only" />
45
- <meta name="supported-color-schemes" content="light only" />
46
- </Head>
47
- <Preview>Discover {featureName} on Tracked</Preview>
48
- <Body style={main}>
49
- <Container style={container}>
50
- <Section style={box}>
51
- <Row style={{ marginBottom: "8px" }}>
52
- <Column style={{ width: "auto", verticalAlign: "middle" }}>
53
- <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
54
- </Column>
55
- <Column
56
- style={{
57
- width: "auto",
58
- verticalAlign: "middle",
59
- paddingLeft: "4px",
60
- }}
61
- >
62
- <Text
63
- style={{
64
- fontSize: "28px",
65
- fontWeight: "900",
66
- fontFamily:
67
- "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
68
- color: "#020617",
69
- margin: "0",
70
- lineHeight: "32px",
71
- letterSpacing: "0.5px",
72
- }}
73
- >
74
- TRACKED
75
- </Text>
76
- </Column>
77
- </Row>
78
- <Hr style={hr} />
79
-
80
- <Section style={{ textAlign: "center" as const, margin: "16px 0" }}>
81
- <Text style={{ fontSize: "36px", margin: "0" }}>💡</Text>
82
- </Section>
83
-
84
- <Text style={heading}>Unlock More with Tracked</Text>
85
- <Text style={paragraph}>
86
- Hi {userName}, we noticed you haven't tried {featureName} yet - a
87
- powerful feature that could take your training to the next level.
88
- </Text>
89
-
90
- <Section style={featureBox}>
91
- <Text style={featureHeading}>{featureName}</Text>
92
- <Text style={featureDescriptionStyle}>{featureDescription}</Text>
93
- </Section>
94
-
95
- {featureBenefits.length > 0 && (
96
- <Section style={benefitsBox}>
97
- <Text style={benefitsHeading}>Why you'll love it:</Text>
98
- <ul style={benefitsList}>
99
- {featureBenefits.map((benefit, index) => (
100
- <li key={index} style={benefitItem}>
101
- {benefit}
102
- </li>
103
- ))}
104
- </ul>
105
- </Section>
106
- )}
107
-
108
- <div
109
- style={{
110
- marginTop: "24px",
111
- marginBottom: "24px",
112
- textAlign: "left" as const,
113
- }}
114
- >
115
- <a
116
- href={featureUrl}
117
- style={{
118
- backgroundColor: "#0f172a",
119
- borderRadius: "8px",
120
- fontSize: "16px",
121
- fontWeight: "bold",
122
- textDecoration: "none",
123
- padding: "12px 32px",
124
- display: "inline-block",
125
- }}
126
- >
127
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
128
- Try {featureName}
129
- </span>
130
- </a>
131
- </div>
132
-
133
- <Text style={{ ...paragraph, fontSize: "14px", color: "#94a3b8" }}>
134
- We're constantly adding new features to help you reach your fitness
135
- goals. Stay tuned for more updates!
136
- </Text>
137
-
138
- <div
139
- style={{
140
- textAlign: "left" as const,
141
- margin: "24px 0",
142
- }}
143
- >
144
- <a
145
- href="https://www.discord.gg/trackedgg"
146
- style={{
147
- backgroundColor: "#5865F2",
148
- borderRadius: "8px",
149
- fontSize: "16px",
150
- fontWeight: "bold",
151
- textDecoration: "none",
152
- padding: "12px 32px",
153
- display: "inline-block",
154
- }}
155
- >
156
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
157
- Join our Discord Community
158
- </span>
159
- </a>
160
- </div>
161
-
162
- <Hr style={hr} />
163
- <Text style={footer}>
164
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
165
- Street, Vancouver, BC
166
- </Text>
167
-
168
- <Container>
169
- <Link
170
- href={`${websiteUrl}/terms`}
171
- style={{ ...footer, paddingRight: 10 }}
172
- >
173
- Terms
174
- </Link>
175
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
176
- <Link
177
- href={`${websiteUrl}/privacy`}
178
- style={{ ...footer, paddingRight: 10 }}
179
- >
180
- Privacy
181
- </Link>
182
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
183
- <Link
184
- href={`${websiteUrl}/support`}
185
- style={{ ...footer, paddingRight: 10 }}
186
- >
187
- Support
188
- </Link>
189
- </Container>
190
-
191
- <Text style={footer}>
192
- This is a service notification by the Tracked Training Platform.
193
- </Text>
194
- </Section>
195
- </Container>
196
- </Body>
197
- </Html>
42
+ <EmailLayout preview={`Discover ${featureName} on Tracked`}>
43
+ <EmailHeader />
44
+
45
+ <Section style={{ textAlign: "center" as const, margin: "16px 0" }}>
46
+ <Text style={{ fontSize: "36px", margin: "0" }}>💡</Text>
47
+ </Section>
48
+
49
+ <Heading style={{ textAlign: "center" as const }}>
50
+ Unlock More with Tracked
51
+ </Heading>
52
+ <Paragraph>
53
+ Hi {userName}, we noticed you haven't tried {featureName} yet - a
54
+ powerful feature that could take your training to the next level.
55
+ </Paragraph>
56
+
57
+ <Section
58
+ style={{
59
+ backgroundColor: colors.surface,
60
+ padding: "20px 24px",
61
+ borderRadius: "8px",
62
+ margin: "24px 0",
63
+ borderLeft: `4px solid ${colors.accent}`,
64
+ }}
65
+ >
66
+ <Text
67
+ style={{
68
+ color: colors.accent,
69
+ fontSize: "18px",
70
+ fontWeight: "bold" as const,
71
+ marginBottom: "8px",
72
+ }}
73
+ >
74
+ {featureName}
75
+ </Text>
76
+ <Text
77
+ style={{
78
+ color: colors.textSecondary,
79
+ fontSize: "15px",
80
+ lineHeight: "22px",
81
+ margin: "0",
82
+ }}
83
+ >
84
+ {featureDescription}
85
+ </Text>
86
+ </Section>
87
+
88
+ {featureBenefits.length > 0 && (
89
+ <FeatureBox title="Why you'll love it:">
90
+ <FeatureList
91
+ items={featureBenefits.map((benefit) => ({ title: benefit }))}
92
+ />
93
+ </FeatureBox>
94
+ )}
95
+
96
+ <PrimaryButton href={featureUrl}>Try {featureName}</PrimaryButton>
97
+
98
+ <SmallText muted>
99
+ We're constantly adding new features to help you reach your fitness
100
+ goals. Stay tuned for more updates!
101
+ </SmallText>
102
+
103
+ <DiscordButton />
104
+
105
+ <EmailFooter websiteUrl={websiteUrl} marketing unsubscribeUrl={unsubscribeUrl} />
106
+ </EmailLayout>
198
107
  );
199
108
  };
200
109
 
201
- const main = {
202
- backgroundColor: "#020617", // slate-950
203
- fontFamily:
204
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
205
- };
206
-
207
- const container = {
208
- backgroundColor: "#020617", // slate-950
209
- margin: "0 auto",
210
- padding: "20px 0 48px",
211
- marginBottom: "64px",
212
- borderRadius: "8px",
213
- };
214
-
215
- const box = {
216
- padding: "0 24px",
217
- };
218
-
219
- const hr = {
220
- borderColor: "#4ade80", // green-400
221
- margin: "24px 0",
222
- borderWidth: "1px",
223
- };
224
-
225
- const paragraph = {
226
- color: "#ffffff", // white
227
- fontSize: "16px",
228
- lineHeight: "24px",
229
- textAlign: "left" as const,
230
- };
231
-
232
- const heading = {
233
- color: "#ffffff", // white
234
- fontSize: "24px",
235
- lineHeight: "32px",
236
- fontWeight: "bold",
237
- marginBottom: "16px",
238
- textAlign: "center" as const,
239
- };
240
-
241
- const featureBox = {
242
- backgroundColor: "#1e293b",
243
- padding: "20px 24px",
244
- borderRadius: "8px",
245
- margin: "24px 0",
246
- borderLeft: "4px solid #4ade80",
247
- };
248
-
249
- const featureHeading = {
250
- color: "#4ade80",
251
- fontSize: "18px",
252
- fontWeight: "bold",
253
- marginBottom: "8px",
254
- };
255
-
256
- const featureDescriptionStyle = {
257
- color: "#e2e8f0",
258
- fontSize: "15px",
259
- lineHeight: "22px",
260
- };
261
-
262
- const benefitsBox = {
263
- backgroundColor: "#1e293b",
264
- padding: "16px 24px",
265
- borderRadius: "8px",
266
- margin: "24px 0",
267
- };
268
-
269
- const benefitsHeading = {
270
- color: "#ffffff",
271
- fontSize: "16px",
272
- fontWeight: "bold",
273
- marginBottom: "12px",
274
- };
275
-
276
- const benefitsList = {
277
- margin: "0",
278
- paddingLeft: "20px",
279
- };
280
-
281
- const benefitItem = {
282
- color: "#e2e8f0",
283
- fontSize: "14px",
284
- lineHeight: "24px",
285
- marginBottom: "8px",
286
- };
287
-
288
- const footer = {
289
- color: "#94a3b8", // slate-400 for subtle footer text
290
- fontSize: "12px",
291
- lineHeight: "16px",
292
- };
293
-
294
110
  export default FeatureDiscoveryEmail;