@tracked/emails 0.1.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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -0
  3. package/dist/emails/bodyweight-goal-reached.d.ts +14 -0
  4. package/dist/emails/bodyweight-goal-reached.d.ts.map +1 -0
  5. package/dist/emails/bodyweight-goal-reached.js +177 -0
  6. package/dist/emails/bodyweight-goal-reached.js.map +1 -0
  7. package/dist/emails/client-accepted-invitation.d.ts +10 -0
  8. package/dist/emails/client-accepted-invitation.d.ts.map +1 -0
  9. package/dist/emails/client-accepted-invitation.js +99 -0
  10. package/dist/emails/client-accepted-invitation.js.map +1 -0
  11. package/dist/emails/coach-invite.d.ts +10 -0
  12. package/dist/emails/coach-invite.d.ts.map +1 -0
  13. package/dist/emails/coach-invite.js +126 -0
  14. package/dist/emails/coach-invite.js.map +1 -0
  15. package/dist/emails/coach-removed-client.d.ts +8 -0
  16. package/dist/emails/coach-removed-client.d.ts.map +1 -0
  17. package/dist/emails/coach-removed-client.js +80 -0
  18. package/dist/emails/coach-removed-client.js.map +1 -0
  19. package/dist/emails/direct-message.d.ts +11 -0
  20. package/dist/emails/direct-message.d.ts.map +1 -0
  21. package/dist/emails/direct-message.js +103 -0
  22. package/dist/emails/direct-message.js.map +1 -0
  23. package/dist/emails/feature-discovery.d.ts +11 -0
  24. package/dist/emails/feature-discovery.d.ts.map +1 -0
  25. package/dist/emails/feature-discovery.js +121 -0
  26. package/dist/emails/feature-discovery.js.map +1 -0
  27. package/dist/emails/first-workout-assigned.d.ts +10 -0
  28. package/dist/emails/first-workout-assigned.d.ts.map +1 -0
  29. package/dist/emails/first-workout-assigned.js +98 -0
  30. package/dist/emails/first-workout-assigned.js.map +1 -0
  31. package/dist/emails/first-workout-completed.d.ts +11 -0
  32. package/dist/emails/first-workout-completed.d.ts.map +1 -0
  33. package/dist/emails/first-workout-completed.js +129 -0
  34. package/dist/emails/first-workout-completed.js.map +1 -0
  35. package/dist/emails/index.d.ts +7 -0
  36. package/dist/emails/index.d.ts.map +1 -0
  37. package/dist/emails/index.js +7 -0
  38. package/dist/emails/index.js.map +1 -0
  39. package/dist/emails/new-follower.d.ts +11 -0
  40. package/dist/emails/new-follower.d.ts.map +1 -0
  41. package/dist/emails/new-follower.js +98 -0
  42. package/dist/emails/new-follower.js.map +1 -0
  43. package/dist/emails/subscription-canceled.d.ts +10 -0
  44. package/dist/emails/subscription-canceled.d.ts.map +1 -0
  45. package/dist/emails/subscription-canceled.js +131 -0
  46. package/dist/emails/subscription-canceled.js.map +1 -0
  47. package/dist/emails/support-email.d.ts +8 -0
  48. package/dist/emails/support-email.d.ts.map +1 -0
  49. package/dist/emails/support-email.js +40 -0
  50. package/dist/emails/support-email.js.map +1 -0
  51. package/dist/emails/team-invite.d.ts +11 -0
  52. package/dist/emails/team-invite.d.ts.map +1 -0
  53. package/dist/emails/team-invite.js +100 -0
  54. package/dist/emails/team-invite.js.map +1 -0
  55. package/dist/emails/team-member-removed-email.d.ts +8 -0
  56. package/dist/emails/team-member-removed-email.d.ts.map +1 -0
  57. package/dist/emails/team-member-removed-email.js +97 -0
  58. package/dist/emails/team-member-removed-email.js.map +1 -0
  59. package/dist/emails/tracked-magic-link-activate.d.ts +7 -0
  60. package/dist/emails/tracked-magic-link-activate.d.ts.map +1 -0
  61. package/dist/emails/tracked-magic-link-activate.js +93 -0
  62. package/dist/emails/tracked-magic-link-activate.js.map +1 -0
  63. package/dist/emails/tracked-magic-link.d.ts +7 -0
  64. package/dist/emails/tracked-magic-link.d.ts.map +1 -0
  65. package/dist/emails/tracked-magic-link.js +101 -0
  66. package/dist/emails/tracked-magic-link.js.map +1 -0
  67. package/dist/emails/week-one-checkin.d.ts +10 -0
  68. package/dist/emails/week-one-checkin.d.ts.map +1 -0
  69. package/dist/emails/week-one-checkin.js +141 -0
  70. package/dist/emails/week-one-checkin.js.map +1 -0
  71. package/dist/emails/welcome.d.ts +8 -0
  72. package/dist/emails/welcome.d.ts.map +1 -0
  73. package/dist/emails/welcome.js +146 -0
  74. package/dist/emails/welcome.js.map +1 -0
  75. package/dist/index.d.ts +22 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +24 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/utils/email-validation.d.ts +48 -0
  80. package/dist/utils/email-validation.d.ts.map +1 -0
  81. package/dist/utils/email-validation.js +72 -0
  82. package/dist/utils/email-validation.js.map +1 -0
  83. package/dist/utils/index.d.ts +8 -0
  84. package/dist/utils/index.d.ts.map +1 -0
  85. package/dist/utils/index.js +8 -0
  86. package/dist/utils/index.js.map +1 -0
  87. package/dist/utils/username-validation.d.ts +54 -0
  88. package/dist/utils/username-validation.d.ts.map +1 -0
  89. package/dist/utils/username-validation.js +76 -0
  90. package/dist/utils/username-validation.js.map +1 -0
  91. package/package.json +78 -0
  92. package/src/emails/bodyweight-goal-reached.tsx +396 -0
  93. package/src/emails/client-accepted-invitation.tsx +258 -0
  94. package/src/emails/coach-invite.tsx +270 -0
  95. package/src/emails/coach-removed-client.tsx +212 -0
  96. package/src/emails/direct-message.tsx +249 -0
  97. package/src/emails/feature-discovery.tsx +289 -0
  98. package/src/emails/first-workout-assigned.tsx +255 -0
  99. package/src/emails/first-workout-completed.tsx +312 -0
  100. package/src/emails/index.tsx +6 -0
  101. package/src/emails/new-follower.tsx +260 -0
  102. package/src/emails/subscription-canceled.tsx +311 -0
  103. package/src/emails/support-email.tsx +80 -0
  104. package/src/emails/team-invite.tsx +262 -0
  105. package/src/emails/team-member-removed-email.tsx +240 -0
  106. package/src/emails/tracked-magic-link-activate.tsx +252 -0
  107. package/src/emails/tracked-magic-link.tsx +264 -0
  108. package/src/emails/week-one-checkin.tsx +353 -0
  109. package/src/emails/welcome.tsx +341 -0
  110. package/src/index.ts +57 -0
  111. package/src/utils/email-validation.test.ts +78 -0
  112. package/src/utils/email-validation.ts +80 -0
  113. package/src/utils/index.ts +13 -0
  114. package/src/utils/username-validation.test.ts +118 -0
  115. package/src/utils/username-validation.ts +89 -0
  116. package/static/tracked-logo.png +0 -0
@@ -0,0 +1,258 @@
1
+ import React from "react";
2
+ import {
3
+ Body,
4
+ Button,
5
+ Column,
6
+ Container,
7
+ Head,
8
+ Hr,
9
+ Html,
10
+ Img,
11
+ Link,
12
+ Preview,
13
+ Row,
14
+ Section,
15
+ Text,
16
+ } from "@react-email/components";
17
+
18
+ interface ClientAcceptedInvitationEmailProps {
19
+ coachName: string;
20
+ clientName: string;
21
+ clientEmail: string;
22
+ clientProfileUrl: string;
23
+ websiteUrl: string;
24
+ }
25
+
26
+ const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
27
+
28
+ export const ClientAcceptedInvitationEmail = ({
29
+ coachName,
30
+ clientName,
31
+ clientEmail,
32
+ clientProfileUrl,
33
+ websiteUrl = "https://tracked.gg",
34
+ }: ClientAcceptedInvitationEmailProps) => {
35
+ const displayName = clientName || clientEmail;
36
+
37
+ return (
38
+ <Html>
39
+ <Head>
40
+ <meta name="color-scheme" content="light only" />
41
+ <meta name="supported-color-schemes" content="light only" />
42
+ </Head>
43
+ <Preview>
44
+ {displayName} accepted your coaching invitation on Tracked
45
+ </Preview>
46
+ <Body style={main}>
47
+ <Container style={container}>
48
+ <Section style={box}>
49
+ <Row style={{ marginBottom: "8px" }}>
50
+ <Column style={{ width: "auto", verticalAlign: "middle" }}>
51
+ <Img src={`${baseUrl}`} width="28" height="28" alt="Tracked" />
52
+ </Column>
53
+ <Column
54
+ style={{
55
+ width: "auto",
56
+ verticalAlign: "middle",
57
+ paddingLeft: "4px",
58
+ }}
59
+ >
60
+ <Text
61
+ style={{
62
+ fontSize: "28px",
63
+ fontWeight: "900",
64
+ fontFamily:
65
+ "Raleway, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
66
+ color: "#020617",
67
+ margin: "0",
68
+ lineHeight: "32px",
69
+ letterSpacing: "0.5px",
70
+ }}
71
+ >
72
+ TRACKED
73
+ </Text>
74
+ </Column>
75
+ </Row>
76
+ <Hr style={hr} />
77
+
78
+ <Text style={heading}>Great News!</Text>
79
+ <Text style={paragraph}>
80
+ Hi {coachName}, {displayName} has accepted your coaching
81
+ invitation and is now part of your coaching roster.
82
+ </Text>
83
+
84
+ <Section style={infoBox}>
85
+ <Text style={infoHeading}>Client Details:</Text>
86
+ <Text style={infoText}>
87
+ <strong>Name:</strong> {displayName}
88
+ </Text>
89
+ <Text style={infoText}>
90
+ <strong>Email:</strong> {clientEmail}
91
+ </Text>
92
+ </Section>
93
+
94
+ <Text style={paragraph}>
95
+ You can now start creating their personalized training program and
96
+ tracking their progress.
97
+ </Text>
98
+
99
+ <div
100
+ style={{
101
+ marginTop: "24px",
102
+ marginBottom: "24px",
103
+ textAlign: "left" as const,
104
+ }}
105
+ >
106
+ <a
107
+ href={clientProfileUrl}
108
+ style={{
109
+ backgroundColor: "#0f172a",
110
+ borderRadius: "8px",
111
+ fontSize: "16px",
112
+ fontWeight: "bold",
113
+ textDecoration: "none",
114
+ padding: "12px 32px",
115
+ display: "inline-block",
116
+ }}
117
+ >
118
+ <span style={{ color: "#ffffff", textDecoration: "none" }}>
119
+ View Client Profile
120
+ </span>
121
+ </a>
122
+ </div>
123
+
124
+ <Text style={{ ...paragraph }}>
125
+ Get started by creating their first workout program or checking in
126
+ with them through the app.
127
+ </Text>
128
+
129
+ <div
130
+ style={{
131
+ textAlign: "left" as const,
132
+ margin: "24px 0",
133
+ }}
134
+ >
135
+ <a
136
+ href="https://www.discord.gg/trackedgg"
137
+ style={{
138
+ backgroundColor: "#5865F2",
139
+ borderRadius: "8px",
140
+ fontSize: "16px",
141
+ fontWeight: "bold",
142
+ textDecoration: "none",
143
+ padding: "12px 32px",
144
+ display: "inline-block",
145
+ }}
146
+ >
147
+ <span style={{ color: "#ffffff", textDecoration: "none" }}>
148
+ Join our Discord Community
149
+ </span>
150
+ </a>
151
+ </div>
152
+
153
+ <Hr style={hr} />
154
+ <Text style={footer}>
155
+ Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
156
+ Street, Vancouver, BC
157
+ </Text>
158
+
159
+ <Container>
160
+ <Link
161
+ href={`${websiteUrl}/terms`}
162
+ style={{ ...footer, paddingRight: 10 }}
163
+ >
164
+ Terms
165
+ </Link>
166
+ <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
167
+ <Link
168
+ href={`${websiteUrl}/privacy`}
169
+ style={{ ...footer, paddingRight: 10 }}
170
+ >
171
+ Privacy
172
+ </Link>
173
+ <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
174
+ <Link
175
+ href={`${websiteUrl}/support`}
176
+ style={{ ...footer, paddingRight: 10 }}
177
+ >
178
+ Support
179
+ </Link>
180
+ </Container>
181
+
182
+ <Text style={footer}>
183
+ This is a service notification by the Tracked Training Platform.
184
+ </Text>
185
+ </Section>
186
+ </Container>
187
+ </Body>
188
+ </Html>
189
+ );
190
+ };
191
+
192
+ const main = {
193
+ backgroundColor: "#020617", // slate-950
194
+ fontFamily:
195
+ '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
196
+ };
197
+
198
+ const container = {
199
+ backgroundColor: "#020617", // slate-950
200
+ margin: "0 auto",
201
+ padding: "20px 0 48px",
202
+ marginBottom: "64px",
203
+ borderRadius: "8px",
204
+ };
205
+
206
+ const box = {
207
+ padding: "0 24px",
208
+ };
209
+
210
+ const hr = {
211
+ borderColor: "#4ade80", // green-400
212
+ margin: "24px 0",
213
+ borderWidth: "1px",
214
+ };
215
+
216
+ const paragraph = {
217
+ color: "#ffffff", // white
218
+ fontSize: "16px",
219
+ lineHeight: "24px",
220
+ textAlign: "left" as const,
221
+ };
222
+
223
+ const heading = {
224
+ color: "#ffffff", // white
225
+ fontSize: "24px",
226
+ lineHeight: "32px",
227
+ fontWeight: "bold",
228
+ marginBottom: "16px",
229
+ };
230
+
231
+ const infoBox = {
232
+ backgroundColor: "#1e293b",
233
+ padding: "16px 24px",
234
+ borderRadius: "8px",
235
+ margin: "24px 0",
236
+ };
237
+
238
+ const infoHeading = {
239
+ color: "#ffffff",
240
+ fontSize: "16px",
241
+ fontWeight: "bold",
242
+ marginBottom: "12px",
243
+ };
244
+
245
+ const infoText = {
246
+ color: "#e2e8f0",
247
+ fontSize: "14px",
248
+ lineHeight: "24px",
249
+ marginBottom: "4px",
250
+ };
251
+
252
+ const footer = {
253
+ color: "#94a3b8", // slate-400 for subtle footer text
254
+ fontSize: "12px",
255
+ lineHeight: "16px",
256
+ };
257
+
258
+ export default ClientAcceptedInvitationEmail;
@@ -0,0 +1,270 @@
1
+ import * as React from "react";
2
+ 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";
15
+
16
+ interface CoachInviteEmailProps {
17
+ coachName: string;
18
+ coachEmail: string;
19
+ websiteUrl: string;
20
+ invitationLink: string;
21
+ coachAvatarUrl?: string;
22
+ }
23
+
24
+ const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
25
+
26
+ export const CoachInviteEmail = ({
27
+ coachName,
28
+ coachEmail,
29
+ websiteUrl = "https://tracked.gg",
30
+ invitationLink,
31
+ coachAvatarUrl,
32
+ }: CoachInviteEmailProps) => {
33
+ const displayName = coachName || coachEmail;
34
+
35
+ 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>
141
+ );
142
+ };
143
+
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
+ export default CoachInviteEmail;