@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.
- package/dist/emails/client-onboarded.d.ts +35 -0
- package/dist/emails/client-onboarded.d.ts.map +1 -0
- package/dist/emails/client-onboarded.js +152 -0
- package/dist/emails/client-onboarded.js.map +1 -0
- package/dist/emails/index.d.ts +1 -0
- package/dist/emails/index.d.ts.map +1 -1
- package/dist/emails/index.js +1 -0
- package/dist/emails/index.js.map +1 -1
- package/dist/emails/monthly-report.d.ts.map +1 -1
- package/dist/emails/monthly-report.js +31 -47
- package/dist/emails/monthly-report.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +20 -20
- package/src/components/content.tsx +351 -0
- package/src/components/index.ts +44 -0
- package/src/components/interactive.tsx +260 -0
- package/src/components/layout.tsx +217 -0
- package/src/components/tokens.ts +74 -0
- package/src/components/typography.tsx +148 -0
- package/src/emails/anniversary.tsx +133 -0
- package/src/emails/app-review-request.tsx +100 -0
- package/src/emails/bodyweight-goal-reached.tsx +202 -350
- package/src/emails/client-inactive-alert.tsx +130 -0
- package/src/emails/client-onboarded.tsx +272 -0
- package/src/emails/coach-invite.tsx +67 -250
- package/src/emails/coach-removed-client.tsx +36 -197
- package/src/emails/direct-message.tsx +69 -227
- package/src/emails/feature-discovery.tsx +82 -266
- package/src/emails/first-workout-assigned.tsx +52 -238
- package/src/emails/first-workout-completed.tsx +88 -294
- package/src/emails/inactive-reengagement.tsx +81 -0
- package/src/emails/index.tsx +1 -0
- package/src/emails/monthly-report.tsx +195 -525
- package/src/emails/new-follower.tsx +60 -238
- package/src/emails/nps-survey.tsx +149 -0
- package/src/emails/subscription-canceled.tsx +88 -294
- package/src/emails/support-email.tsx +33 -67
- package/src/emails/team-invite.tsx +47 -240
- package/src/emails/team-member-removed-email.tsx +23 -218
- package/src/emails/tracked-magic-link-activate.tsx +29 -237
- package/src/emails/tracked-magic-link.tsx +31 -251
- package/src/emails/week-one-checkin.tsx +108 -329
- package/src/emails/weekly-progress-digest.tsx +248 -0
- package/src/emails/welcome.tsx +58 -326
- package/src/index.ts +19 -2
- package/dist/emails/client-accepted-invitation.d.ts +0 -10
- package/dist/emails/client-accepted-invitation.d.ts.map +0 -1
- package/dist/emails/client-accepted-invitation.js +0 -99
- package/dist/emails/client-accepted-invitation.js.map +0 -1
- package/src/emails/client-accepted-invitation.tsx +0 -258
|
@@ -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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "@react-email/components";
|
|
4
|
+
EmailLayout,
|
|
5
|
+
EmailHeader,
|
|
6
|
+
EmailFooter,
|
|
7
|
+
Heading,
|
|
8
|
+
Paragraph,
|
|
9
|
+
FeatureBox,
|
|
10
|
+
TipBox,
|
|
11
|
+
SmallText,
|
|
12
|
+
PrimaryButton,
|
|
13
|
+
DiscordButton,
|
|
14
|
+
colors,
|
|
15
|
+
} from "../components";
|
|
16
16
|
|
|
17
17
|
interface FirstWorkoutCompletedEmailProps {
|
|
18
18
|
userName: string;
|
|
@@ -20,293 +20,87 @@ interface FirstWorkoutCompletedEmailProps {
|
|
|
20
20
|
totalSets?: number;
|
|
21
21
|
totalReps?: number;
|
|
22
22
|
workoutHistoryUrl: string;
|
|
23
|
-
websiteUrl
|
|
23
|
+
websiteUrl?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
|
|
27
|
-
|
|
28
26
|
export const FirstWorkoutCompletedEmail = ({
|
|
29
|
-
userName,
|
|
30
|
-
workoutName,
|
|
31
|
-
totalSets,
|
|
32
|
-
totalReps,
|
|
33
|
-
workoutHistoryUrl,
|
|
27
|
+
userName = "Alex",
|
|
28
|
+
workoutName = "Push Day A",
|
|
29
|
+
totalSets = 18,
|
|
30
|
+
totalReps = 156,
|
|
31
|
+
workoutHistoryUrl = "tracked://history",
|
|
34
32
|
websiteUrl = "https://tracked.gg",
|
|
35
33
|
}: FirstWorkoutCompletedEmailProps) => {
|
|
36
34
|
return (
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</Text>
|
|
106
|
-
</Section>
|
|
107
|
-
|
|
108
|
-
<Text style={paragraph}>
|
|
109
|
-
You've taken the first step towards your fitness goals. Keep showing
|
|
110
|
-
up, stay consistent, and watch yourself grow stronger every day.
|
|
111
|
-
</Text>
|
|
112
|
-
|
|
113
|
-
<div
|
|
114
|
-
style={{
|
|
115
|
-
marginTop: "24px",
|
|
116
|
-
marginBottom: "24px",
|
|
117
|
-
textAlign: "left" as const,
|
|
118
|
-
}}
|
|
119
|
-
>
|
|
120
|
-
<a
|
|
121
|
-
href={workoutHistoryUrl}
|
|
122
|
-
style={{
|
|
123
|
-
backgroundColor: "#0f172a",
|
|
124
|
-
borderRadius: "8px",
|
|
125
|
-
fontSize: "16px",
|
|
126
|
-
fontWeight: "bold",
|
|
127
|
-
textDecoration: "none",
|
|
128
|
-
padding: "12px 32px",
|
|
129
|
-
display: "inline-block",
|
|
130
|
-
}}
|
|
131
|
-
>
|
|
132
|
-
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
133
|
-
View Your Progress
|
|
134
|
-
</span>
|
|
135
|
-
</a>
|
|
136
|
-
</div>
|
|
137
|
-
|
|
138
|
-
<Section style={tipBox}>
|
|
139
|
-
<Text style={tipHeading}>Pro Tip:</Text>
|
|
140
|
-
<Text style={tipText}>
|
|
141
|
-
Track every workout to see your progress over time. The data you
|
|
142
|
-
collect now will help you understand how far you've come in the
|
|
143
|
-
weeks and months ahead.
|
|
144
|
-
</Text>
|
|
145
|
-
</Section>
|
|
146
|
-
|
|
147
|
-
<div
|
|
148
|
-
style={{
|
|
149
|
-
textAlign: "left" as const,
|
|
150
|
-
margin: "24px 0",
|
|
151
|
-
}}
|
|
152
|
-
>
|
|
153
|
-
<a
|
|
154
|
-
href="https://www.discord.gg/trackedgg"
|
|
155
|
-
style={{
|
|
156
|
-
backgroundColor: "#5865F2",
|
|
157
|
-
borderRadius: "8px",
|
|
158
|
-
fontSize: "16px",
|
|
159
|
-
fontWeight: "bold",
|
|
160
|
-
textDecoration: "none",
|
|
161
|
-
padding: "12px 32px",
|
|
162
|
-
display: "inline-block",
|
|
163
|
-
}}
|
|
164
|
-
>
|
|
165
|
-
<span style={{ color: "#ffffff", textDecoration: "none" }}>
|
|
166
|
-
Join our Discord Community
|
|
167
|
-
</span>
|
|
168
|
-
</a>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
<Hr style={hr} />
|
|
172
|
-
<Text style={footer}>
|
|
173
|
-
Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
|
|
174
|
-
Street, Vancouver, BC
|
|
175
|
-
</Text>
|
|
176
|
-
|
|
177
|
-
<Container>
|
|
178
|
-
<Link
|
|
179
|
-
href={`${websiteUrl}/terms`}
|
|
180
|
-
style={{ ...footer, paddingRight: 10 }}
|
|
181
|
-
>
|
|
182
|
-
Terms
|
|
183
|
-
</Link>
|
|
184
|
-
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
185
|
-
<Link
|
|
186
|
-
href={`${websiteUrl}/privacy`}
|
|
187
|
-
style={{ ...footer, paddingRight: 10 }}
|
|
188
|
-
>
|
|
189
|
-
Privacy
|
|
190
|
-
</Link>
|
|
191
|
-
<Link style={{ ...footer, paddingRight: 10 }}> | </Link>
|
|
192
|
-
<Link
|
|
193
|
-
href={`${websiteUrl}/support`}
|
|
194
|
-
style={{ ...footer, paddingRight: 10 }}
|
|
195
|
-
>
|
|
196
|
-
Support
|
|
197
|
-
</Link>
|
|
198
|
-
</Container>
|
|
199
|
-
|
|
200
|
-
<Text style={footer}>
|
|
201
|
-
This is a service notification by the Tracked Training Platform.
|
|
202
|
-
</Text>
|
|
203
|
-
</Section>
|
|
204
|
-
</Container>
|
|
205
|
-
</Body>
|
|
206
|
-
</Html>
|
|
35
|
+
<EmailLayout preview="Congratulations on completing your first workout on Tracked!">
|
|
36
|
+
<EmailHeader />
|
|
37
|
+
|
|
38
|
+
<Section style={{ textAlign: "center" as const, margin: "24px 0" }}>
|
|
39
|
+
<Text style={{ fontSize: "48px", margin: "0" }}>🎉</Text>
|
|
40
|
+
</Section>
|
|
41
|
+
|
|
42
|
+
<Heading style={{ textAlign: "center" as const }}>
|
|
43
|
+
First Workout Complete!
|
|
44
|
+
</Heading>
|
|
45
|
+
<Paragraph>
|
|
46
|
+
Congratulations, {userName}! You've just completed your first workout on
|
|
47
|
+
Tracked. This is the beginning of an amazing journey.
|
|
48
|
+
</Paragraph>
|
|
49
|
+
|
|
50
|
+
<FeatureBox title="Your First Workout:">
|
|
51
|
+
<SmallText>
|
|
52
|
+
<strong>Workout:</strong> {workoutName}
|
|
53
|
+
</SmallText>
|
|
54
|
+
{totalSets !== undefined && (
|
|
55
|
+
<SmallText style={{ marginTop: "4px" }}>
|
|
56
|
+
<strong>Sets Completed:</strong> {totalSets}
|
|
57
|
+
</SmallText>
|
|
58
|
+
)}
|
|
59
|
+
{totalReps !== undefined && (
|
|
60
|
+
<SmallText style={{ marginTop: "4px" }}>
|
|
61
|
+
<strong>Total Reps:</strong> {totalReps}
|
|
62
|
+
</SmallText>
|
|
63
|
+
)}
|
|
64
|
+
</FeatureBox>
|
|
65
|
+
|
|
66
|
+
<Section
|
|
67
|
+
style={{
|
|
68
|
+
padding: "16px 0 16px 20px",
|
|
69
|
+
margin: "24px 0",
|
|
70
|
+
borderLeft: `4px solid ${colors.accent}`,
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<Text
|
|
74
|
+
style={{
|
|
75
|
+
color: colors.textMuted,
|
|
76
|
+
fontSize: "15px",
|
|
77
|
+
lineHeight: "22px",
|
|
78
|
+
fontStyle: "italic" as const,
|
|
79
|
+
margin: "0",
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
"The secret of getting ahead is getting started." - Mark Twain
|
|
83
|
+
</Text>
|
|
84
|
+
</Section>
|
|
85
|
+
|
|
86
|
+
<Paragraph>
|
|
87
|
+
You've taken the first step towards your fitness goals. Keep showing up,
|
|
88
|
+
stay consistent, and watch yourself grow stronger every day.
|
|
89
|
+
</Paragraph>
|
|
90
|
+
|
|
91
|
+
<PrimaryButton href={workoutHistoryUrl}>View Your Progress</PrimaryButton>
|
|
92
|
+
|
|
93
|
+
<TipBox title="Pro Tip">
|
|
94
|
+
Track every workout to see your progress over time. The data you collect
|
|
95
|
+
now will help you understand how far you've come in the weeks and months
|
|
96
|
+
ahead.
|
|
97
|
+
</TipBox>
|
|
98
|
+
|
|
99
|
+
<DiscordButton />
|
|
100
|
+
|
|
101
|
+
<EmailFooter websiteUrl={websiteUrl} />
|
|
102
|
+
</EmailLayout>
|
|
207
103
|
);
|
|
208
104
|
};
|
|
209
105
|
|
|
210
|
-
const main = {
|
|
211
|
-
backgroundColor: "#020617", // slate-950
|
|
212
|
-
fontFamily:
|
|
213
|
-
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
const container = {
|
|
217
|
-
backgroundColor: "#020617", // slate-950
|
|
218
|
-
margin: "0 auto",
|
|
219
|
-
padding: "20px 0 48px",
|
|
220
|
-
marginBottom: "64px",
|
|
221
|
-
borderRadius: "8px",
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
const box = {
|
|
225
|
-
padding: "0 24px",
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
const hr = {
|
|
229
|
-
borderColor: "#4ade80", // green-400
|
|
230
|
-
margin: "24px 0",
|
|
231
|
-
borderWidth: "1px",
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
const paragraph = {
|
|
235
|
-
color: "#ffffff", // white
|
|
236
|
-
fontSize: "16px",
|
|
237
|
-
lineHeight: "24px",
|
|
238
|
-
textAlign: "left" as const,
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
const heading = {
|
|
242
|
-
color: "#ffffff", // white
|
|
243
|
-
fontSize: "24px",
|
|
244
|
-
lineHeight: "32px",
|
|
245
|
-
fontWeight: "bold",
|
|
246
|
-
marginBottom: "16px",
|
|
247
|
-
textAlign: "center" as const,
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
const statsBox = {
|
|
251
|
-
backgroundColor: "#1e293b",
|
|
252
|
-
padding: "16px 24px",
|
|
253
|
-
borderRadius: "8px",
|
|
254
|
-
margin: "24px 0",
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
const statsHeading = {
|
|
258
|
-
color: "#4ade80",
|
|
259
|
-
fontSize: "16px",
|
|
260
|
-
fontWeight: "bold",
|
|
261
|
-
marginBottom: "12px",
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
const statsText = {
|
|
265
|
-
color: "#e2e8f0",
|
|
266
|
-
fontSize: "14px",
|
|
267
|
-
lineHeight: "24px",
|
|
268
|
-
marginBottom: "4px",
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
const motivationBox = {
|
|
272
|
-
backgroundColor: "transparent",
|
|
273
|
-
padding: "16px 0",
|
|
274
|
-
margin: "24px 0",
|
|
275
|
-
borderLeft: "4px solid #4ade80",
|
|
276
|
-
paddingLeft: "20px",
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
const motivationText = {
|
|
280
|
-
color: "#94a3b8",
|
|
281
|
-
fontSize: "15px",
|
|
282
|
-
lineHeight: "22px",
|
|
283
|
-
fontStyle: "italic" as const,
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
const tipBox = {
|
|
287
|
-
backgroundColor: "#1e293b",
|
|
288
|
-
padding: "16px 24px",
|
|
289
|
-
borderRadius: "8px",
|
|
290
|
-
margin: "24px 0",
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
const tipHeading = {
|
|
294
|
-
color: "#4ade80",
|
|
295
|
-
fontSize: "14px",
|
|
296
|
-
fontWeight: "bold",
|
|
297
|
-
marginBottom: "8px",
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
const tipText = {
|
|
301
|
-
color: "#e2e8f0",
|
|
302
|
-
fontSize: "14px",
|
|
303
|
-
lineHeight: "20px",
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
const footer = {
|
|
307
|
-
color: "#94a3b8", // slate-400 for subtle footer text
|
|
308
|
-
fontSize: "12px",
|
|
309
|
-
lineHeight: "16px",
|
|
310
|
-
};
|
|
311
|
-
|
|
312
106
|
export default FirstWorkoutCompletedEmail;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
EmailLayout,
|
|
4
|
+
EmailHeader,
|
|
5
|
+
EmailFooter,
|
|
6
|
+
Heading,
|
|
7
|
+
Paragraph,
|
|
8
|
+
FeatureBox,
|
|
9
|
+
FeatureList,
|
|
10
|
+
PrimaryButton,
|
|
11
|
+
DiscordButton,
|
|
12
|
+
} from "../components";
|
|
13
|
+
|
|
14
|
+
interface InactiveReengagementEmailProps {
|
|
15
|
+
userName: string;
|
|
16
|
+
daysInactive: number;
|
|
17
|
+
appUrl: string;
|
|
18
|
+
websiteUrl?: string;
|
|
19
|
+
unsubscribeUrl?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const InactiveReengagementEmail = ({
|
|
23
|
+
userName = "Alex",
|
|
24
|
+
daysInactive = 21,
|
|
25
|
+
appUrl = "tracked://app",
|
|
26
|
+
websiteUrl = "https://tracked.gg",
|
|
27
|
+
unsubscribeUrl = "https://tracked.gg/unsubscribe",
|
|
28
|
+
}: InactiveReengagementEmailProps) => {
|
|
29
|
+
const getMessage = () => {
|
|
30
|
+
if (daysInactive >= 30) {
|
|
31
|
+
return "It's been a while! Your fitness journey is waiting for you.";
|
|
32
|
+
} else if (daysInactive >= 14) {
|
|
33
|
+
return "We noticed you've been away. Ready to get back on track?";
|
|
34
|
+
} else {
|
|
35
|
+
return "Hey, we miss you! Your workout streak is waiting to be continued.";
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<EmailLayout preview={`We miss you, ${userName}! Come back to Tracked`}>
|
|
41
|
+
<EmailHeader />
|
|
42
|
+
|
|
43
|
+
<Heading>We Miss You!</Heading>
|
|
44
|
+
<Paragraph>
|
|
45
|
+
Hi {userName}, it's been {daysInactive} days since your last workout.{" "}
|
|
46
|
+
{getMessage()}
|
|
47
|
+
</Paragraph>
|
|
48
|
+
|
|
49
|
+
<FeatureBox title="Pick up where you left off:">
|
|
50
|
+
<FeatureList
|
|
51
|
+
items={[
|
|
52
|
+
{
|
|
53
|
+
title: "Your data is safe",
|
|
54
|
+
description: "All your workout history and progress is still here",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: "Start fresh",
|
|
58
|
+
description: "Every day is a new opportunity to build consistency",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: "Stay accountable",
|
|
62
|
+
description: "Track even quick workouts to maintain momentum",
|
|
63
|
+
},
|
|
64
|
+
]}
|
|
65
|
+
/>
|
|
66
|
+
</FeatureBox>
|
|
67
|
+
|
|
68
|
+
<PrimaryButton href={appUrl}>Log a Workout</PrimaryButton>
|
|
69
|
+
|
|
70
|
+
<Paragraph muted>
|
|
71
|
+
Remember: consistency beats perfection. Even a 10-minute session counts!
|
|
72
|
+
</Paragraph>
|
|
73
|
+
|
|
74
|
+
<DiscordButton />
|
|
75
|
+
|
|
76
|
+
<EmailFooter websiteUrl={websiteUrl} marketing unsubscribeUrl={unsubscribeUrl} />
|
|
77
|
+
</EmailLayout>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default InactiveReengagementEmail;
|
package/src/emails/index.tsx
CHANGED