@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,270 +1,87 @@
1
1
  import * as React from "react";
2
+ import { Section, Img } from "@react-email/components";
2
3
  import {
3
- Body,
4
- Button,
5
- Container,
6
- Head,
7
- Hr,
8
- Html,
9
- Img,
10
- Link,
11
- Preview,
12
- Section,
13
- Text,
14
- } from "@react-email/components";
4
+ EmailLayout,
5
+ EmailHeader,
6
+ EmailFooter,
7
+ Heading,
8
+ Paragraph,
9
+ FeatureBox,
10
+ FeatureList,
11
+ PrimaryButton,
12
+ TextLink,
13
+ colors,
14
+ } from "../components";
15
15
 
16
16
  interface CoachInviteEmailProps {
17
17
  coachName: string;
18
18
  coachEmail: string;
19
- websiteUrl: string;
19
+ websiteUrl?: string;
20
20
  invitationLink: string;
21
21
  coachAvatarUrl?: string;
22
22
  }
23
23
 
24
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
25
-
26
24
  export const CoachInviteEmail = ({
27
- coachName,
28
- coachEmail,
25
+ coachName = "Sarah Johnson",
26
+ coachEmail = "sarah@example.com",
29
27
  websiteUrl = "https://tracked.gg",
30
- invitationLink,
31
- coachAvatarUrl,
28
+ invitationLink = "https://tracked.gg/invite/abc123",
29
+ coachAvatarUrl = "https://cdn.trckd.ca/avatars/default.png",
32
30
  }: CoachInviteEmailProps) => {
33
31
  const displayName = coachName || coachEmail;
34
32
 
35
33
  return (
36
- <Html>
37
- <Head />
38
- <Preview>Join {displayName}'s coaching program on Tracked</Preview>
39
- <Body style={main}>
40
- <Container style={container}>
41
- <Section style={box}>
42
- {/* Logo */}
43
- <Img src={baseUrl} width="40" height="40" alt="Tracked" />
44
- <Hr style={hr} />
45
-
46
- {/* Coach Info Section */}
47
- <Section style={coachSection}>
48
- {coachAvatarUrl && (
49
- <Img
50
- src={coachAvatarUrl}
51
- width="64"
52
- height="64"
53
- alt={displayName}
54
- style={avatarStyle}
55
- />
56
- )}
57
- <Text style={heading}>Join {displayName}'s Coaching Program</Text>
58
- </Section>
59
-
60
- {/* Main Content */}
61
- <Text style={paragraph}>
62
- Hi there! {displayName} wants to coach you on Tracked - a platform
63
- for personalized fitness coaching and progress tracking.
64
- </Text>
65
-
66
- {/* Features List */}
67
- <Section style={featureSection}>
68
- <Text style={featureHeading}>What you'll get:</Text>
69
- <ul style={featureList}>
70
- <li style={featureItem}>✓ Personalized workout programs</li>
71
- <li style={featureItem}>
72
- ✓ Direct communication with your coach
73
- </li>
74
- <li style={featureItem}>✓ Progress tracking & analytics</li>
75
- <li style={featureItem}>✓ Nutrition guidance</li>
76
- </ul>
77
- </Section>
78
-
79
- {/* CTA Button */}
80
- <Button style={button} href={invitationLink}>
81
- Accept Coaching Invitation
82
- </Button>
83
-
84
- {/* Footer */}
85
- <Text style={disclaimer}>
86
- If this email was not expected, please ignore it. Learn more about
87
- Tracked at{" "}
88
- <Link style={link} href={websiteUrl}>
89
- tracked.gg
90
- </Link>
91
- </Text>
92
-
93
- <div
94
- style={{
95
- textAlign: "left" as const,
96
- margin: "24px 0",
97
- }}
98
- >
99
- <a
100
- href="https://www.discord.gg/trackedgg"
101
- style={{
102
- backgroundColor: "#5865F2",
103
- borderRadius: "8px",
104
- fontSize: "16px",
105
- fontWeight: "bold",
106
- textDecoration: "none",
107
- padding: "12px 32px",
108
- display: "inline-block",
109
- }}
110
- >
111
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
112
- Join our Discord Community
113
- </span>
114
- </a>
115
- </div>
116
-
117
- <Hr style={hr} />
118
-
119
- {/* Legal Footer */}
120
- <Text style={footer}>
121
- © Tracked Training Platform Inc. <br />
122
- 9101 Horne Street, Vancouver, BC
123
- </Text>
124
- <Section style={footerLinksContainer}>
125
- <Link href={`${websiteUrl}/terms`} style={footerLink}>
126
- Terms
127
- </Link>
128
- <span style={footerDivider}>|</span>
129
- <Link href={`${websiteUrl}/privacy`} style={footerLink}>
130
- Privacy
131
- </Link>
132
- <span style={footerDivider}>|</span>
133
- <Link href={`${websiteUrl}/support`} style={footerLink}>
134
- Support
135
- </Link>
136
- </Section>
137
- </Section>
138
- </Container>
139
- </Body>
140
- </Html>
34
+ <EmailLayout preview={`Join ${displayName}'s coaching program on Tracked`}>
35
+ <EmailHeader />
36
+
37
+ {/* Coach Info Section */}
38
+ <Section style={{ textAlign: "center" as const, marginBottom: "24px" }}>
39
+ {coachAvatarUrl && (
40
+ <Img
41
+ src={coachAvatarUrl}
42
+ width="64"
43
+ height="64"
44
+ alt={displayName}
45
+ style={{
46
+ borderRadius: "50%",
47
+ margin: "0 auto 16px",
48
+ border: `2px solid ${colors.accent}`,
49
+ }}
50
+ />
51
+ )}
52
+ <Heading style={{ textAlign: "center" as const }}>
53
+ Join {displayName}'s Coaching Program
54
+ </Heading>
55
+ </Section>
56
+
57
+ <Paragraph>
58
+ Hi there! {displayName} wants to coach you on Tracked - a platform for
59
+ personalized fitness coaching and progress tracking.
60
+ </Paragraph>
61
+
62
+ <FeatureBox title="What you'll get:">
63
+ <FeatureList
64
+ items={[
65
+ { title: "Personalized workout programs" },
66
+ { title: "Direct communication with your coach" },
67
+ { title: "Progress tracking & analytics" },
68
+ { title: "Nutrition guidance" },
69
+ ]}
70
+ />
71
+ </FeatureBox>
72
+
73
+ <PrimaryButton href={invitationLink} fullWidth>
74
+ Accept Coaching Invitation
75
+ </PrimaryButton>
76
+
77
+ <Paragraph muted style={{ textAlign: "center" as const }}>
78
+ If this email was not expected, please ignore it. Learn more about
79
+ Tracked at <TextLink href={websiteUrl}>tracked.gg</TextLink>
80
+ </Paragraph>
81
+
82
+ <EmailFooter websiteUrl={websiteUrl} />
83
+ </EmailLayout>
141
84
  );
142
85
  };
143
86
 
144
- const main = {
145
- backgroundColor: "#1e293b",
146
- fontFamily:
147
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
148
- };
149
-
150
- const container = {
151
- backgroundColor: "#0f172a",
152
- margin: "0 auto",
153
- padding: "20px 0 48px",
154
- marginBottom: "64px",
155
- maxWidth: "600px",
156
- };
157
-
158
- const box = {
159
- padding: "0 48px",
160
- };
161
-
162
- const coachSection = {
163
- textAlign: "center" as const,
164
- marginBottom: "24px",
165
- };
166
-
167
- const avatarStyle = {
168
- borderRadius: "50%",
169
- margin: "0 auto 16px",
170
- };
171
-
172
- const hr = {
173
- borderColor: "#475569",
174
- margin: "20px 0",
175
- };
176
-
177
- const paragraph = {
178
- color: "#e2e8f0",
179
- fontSize: "16px",
180
- lineHeight: "24px",
181
- textAlign: "left" as const,
182
- };
183
-
184
- const heading = {
185
- color: "#e2e8f0",
186
- fontSize: "24px",
187
- lineHeight: "32px",
188
- fontWeight: "bold",
189
- textAlign: "center" as const,
190
- margin: "24px 0",
191
- };
192
-
193
- const featureSection = {
194
- backgroundColor: "#1e293b",
195
- padding: "16px 24px",
196
- borderRadius: "8px",
197
- margin: "24px 0",
198
- };
199
-
200
- const featureHeading = {
201
- color: "#e2e8f0",
202
- fontSize: "16px",
203
- fontWeight: "bold",
204
- marginBottom: "12px",
205
- };
206
-
207
- const featureList = {
208
- listStyle: "none",
209
- padding: 0,
210
- margin: 0,
211
- };
212
-
213
- const featureItem = {
214
- color: "#e2e8f0",
215
- fontSize: "14px",
216
- lineHeight: "24px",
217
- marginBottom: "8px",
218
- };
219
-
220
- const link = {
221
- color: "#4ade80",
222
- textDecoration: "underline",
223
- };
224
-
225
- const button = {
226
- backgroundColor: "#4ade80",
227
- borderRadius: "5px",
228
- color: "#0f172a",
229
- fontSize: "16px",
230
- fontWeight: "bold",
231
- textDecoration: "none",
232
- textAlign: "center" as const,
233
- display: "block",
234
- width: "100%",
235
- padding: "16px 0",
236
- margin: "24px 0",
237
- };
238
-
239
- const disclaimer = {
240
- color: "#94a3b8",
241
- fontSize: "14px",
242
- textAlign: "center" as const,
243
- margin: "16px 0",
244
- };
245
-
246
- const footer = {
247
- color: "#8898aa",
248
- fontSize: "12px",
249
- lineHeight: "16px",
250
- textAlign: "center" as const,
251
- };
252
-
253
- const footerLinksContainer = {
254
- textAlign: "center" as const,
255
- margin: "12px 0",
256
- };
257
-
258
- const footerLink = {
259
- color: "#8898aa",
260
- fontSize: "12px",
261
- textDecoration: "none",
262
- padding: "0 8px",
263
- };
264
-
265
- const footerDivider = {
266
- color: "#8898aa",
267
- fontSize: "12px",
268
- };
269
-
270
87
  export default CoachInviteEmail;
@@ -1,212 +1,51 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  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";
3
+ EmailLayout,
4
+ EmailHeader,
5
+ EmailFooter,
6
+ Heading,
7
+ Paragraph,
8
+ FeatureBox,
9
+ SmallText,
10
+ } from "../components";
16
11
 
17
12
  interface CoachRemovedClientEmailProps {
18
13
  clientName: string;
19
14
  coachName: string;
20
- websiteUrl: string;
15
+ websiteUrl?: string;
21
16
  }
22
17
 
23
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
24
-
25
18
  export const CoachRemovedClientEmail = ({
26
- clientName,
27
- coachName,
19
+ clientName = "Alex",
20
+ coachName = "Sarah Johnson",
28
21
  websiteUrl = "https://tracked.gg",
29
22
  }: CoachRemovedClientEmailProps) => {
30
23
  return (
31
- <Html>
32
- <Head>
33
- <meta name="color-scheme" content="light only" />
34
- <meta name="supported-color-schemes" content="light only" />
35
- </Head>
36
- <Preview>
37
- Update to your coaching relationship with {coachName}
38
- </Preview>
39
- <Body style={main}>
40
- <Container style={container}>
41
- <Section style={box}>
42
- <Row style={{ marginBottom: "8px" }}>
43
- <Column style={{ width: "auto", verticalAlign: "middle" }}>
44
- <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
45
- </Column>
46
- <Column
47
- style={{
48
- width: "auto",
49
- verticalAlign: "middle",
50
- paddingLeft: "4px",
51
- }}
52
- >
53
- <Text
54
- style={{
55
- fontSize: "28px",
56
- fontWeight: "900",
57
- fontFamily:
58
- "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
59
- color: "#020617",
60
- margin: "0",
61
- lineHeight: "32px",
62
- letterSpacing: "0.5px",
63
- }}
64
- >
65
- TRACKED
66
- </Text>
67
- </Column>
68
- </Row>
69
- <Hr style={hr} />
70
-
71
- <Text style={heading}>Coaching Relationship Update</Text>
72
- <Text style={paragraph}>
73
- Hi {clientName}, {coachName} has ended your coaching relationship
74
- on Tracked.
75
- </Text>
76
-
77
- <Section style={infoBox}>
78
- <Text style={infoText}>
79
- Your workout history and progress data remain available in your
80
- account. You can continue using Tracked independently or connect
81
- with a new coach.
82
- </Text>
83
- </Section>
84
-
85
- <Text style={paragraph}>
86
- Thank you for using Tracked. If you have any questions or concerns,
87
- please don't hesitate to reach out to our support team.
88
- </Text>
89
-
90
- <div
91
- style={{
92
- textAlign: "left" as const,
93
- margin: "24px 0",
94
- }}
95
- >
96
- <a
97
- href="https://www.discord.gg/trackedgg"
98
- style={{
99
- backgroundColor: "#5865F2",
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
- Join our Discord Community
110
- </span>
111
- </a>
112
- </div>
113
-
114
- <Hr style={hr} />
115
- <Text style={footer}>
116
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
117
- Street, Vancouver, BC
118
- </Text>
119
-
120
- <Container>
121
- <Link
122
- href={`${websiteUrl}/terms`}
123
- style={{ ...footer, paddingRight: 10 }}
124
- >
125
- Terms
126
- </Link>
127
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
128
- <Link
129
- href={`${websiteUrl}/privacy`}
130
- style={{ ...footer, paddingRight: 10 }}
131
- >
132
- Privacy
133
- </Link>
134
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
135
- <Link
136
- href={`${websiteUrl}/support`}
137
- style={{ ...footer, paddingRight: 10 }}
138
- >
139
- Support
140
- </Link>
141
- </Container>
142
-
143
- <Text style={footer}>
144
- This is a service notification by the Tracked Training Platform.
145
- </Text>
146
- </Section>
147
- </Container>
148
- </Body>
149
- </Html>
24
+ <EmailLayout preview={`Update to your coaching relationship with ${coachName}`}>
25
+ <EmailHeader />
26
+
27
+ <Heading>Coaching Relationship Update</Heading>
28
+ <Paragraph>
29
+ Hi {clientName}, {coachName} has ended your coaching relationship on
30
+ Tracked.
31
+ </Paragraph>
32
+
33
+ <FeatureBox>
34
+ <SmallText>
35
+ Your workout history and progress data remain available in your
36
+ account. You can continue using Tracked independently or connect with
37
+ a new coach.
38
+ </SmallText>
39
+ </FeatureBox>
40
+
41
+ <Paragraph>
42
+ Thank you for using Tracked. If you have any questions or concerns,
43
+ please don't hesitate to reach out to our support team.
44
+ </Paragraph>
45
+
46
+ <EmailFooter websiteUrl={websiteUrl} />
47
+ </EmailLayout>
150
48
  );
151
49
  };
152
50
 
153
- const main = {
154
- backgroundColor: "#020617", // slate-950
155
- fontFamily:
156
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
157
- };
158
-
159
- const container = {
160
- backgroundColor: "#020617", // slate-950
161
- margin: "0 auto",
162
- padding: "20px 0 48px",
163
- marginBottom: "64px",
164
- borderRadius: "8px",
165
- };
166
-
167
- const box = {
168
- padding: "0 24px",
169
- };
170
-
171
- const hr = {
172
- borderColor: "#4ade80", // green-400
173
- margin: "24px 0",
174
- borderWidth: "1px",
175
- };
176
-
177
- const paragraph = {
178
- color: "#ffffff", // white
179
- fontSize: "16px",
180
- lineHeight: "24px",
181
- textAlign: "left" as const,
182
- };
183
-
184
- const heading = {
185
- color: "#ffffff", // white
186
- fontSize: "24px",
187
- lineHeight: "32px",
188
- fontWeight: "bold",
189
- marginBottom: "16px",
190
- };
191
-
192
- const infoBox = {
193
- backgroundColor: "#1e293b",
194
- padding: "16px 24px",
195
- borderRadius: "8px",
196
- margin: "24px 0",
197
- };
198
-
199
- const infoText = {
200
- color: "#e2e8f0",
201
- fontSize: "14px",
202
- lineHeight: "24px",
203
- marginBottom: "4px",
204
- };
205
-
206
- const footer = {
207
- color: "#94a3b8", // slate-400 for subtle footer text
208
- fontSize: "12px",
209
- lineHeight: "16px",
210
- };
211
-
212
51
  export default CoachRemovedClientEmail;