@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,212 @@
1
+ import React from "react";
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";
16
+
17
+ interface CoachRemovedClientEmailProps {
18
+ clientName: string;
19
+ coachName: string;
20
+ websiteUrl: string;
21
+ }
22
+
23
+ const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
24
+
25
+ export const CoachRemovedClientEmail = ({
26
+ clientName,
27
+ coachName,
28
+ websiteUrl = "https://tracked.gg",
29
+ }: CoachRemovedClientEmailProps) => {
30
+ 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>
150
+ );
151
+ };
152
+
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
+ export default CoachRemovedClientEmail;
@@ -0,0 +1,249 @@
1
+ import React from "react";
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";
16
+
17
+ interface DirectMessageEmailProps {
18
+ recipientName: string;
19
+ senderName: string;
20
+ senderUsername?: string;
21
+ messagePreview: string;
22
+ messageUrl: string;
23
+ websiteUrl: string;
24
+ }
25
+
26
+ const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
27
+
28
+ export const DirectMessageEmail = ({
29
+ recipientName,
30
+ senderName,
31
+ senderUsername,
32
+ messagePreview,
33
+ messageUrl,
34
+ websiteUrl = "https://tracked.gg",
35
+ }: DirectMessageEmailProps) => {
36
+ const displayName = senderUsername
37
+ ? `${senderName} (@${senderUsername})`
38
+ : senderName;
39
+
40
+ 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>
178
+ );
179
+ };
180
+
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
+ export default DirectMessageEmail;