@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,21 +1,15 @@
1
1
  import * as React from "react";
2
+ import { Img } from "@react-email/components";
2
3
  import {
3
- Body,
4
- Button,
5
- Column,
6
- Container,
7
- Head,
4
+ EmailLayout,
5
+ EmailHeader,
6
+ EmailFooter,
8
7
  Heading,
9
- Hr,
10
- Html,
11
- Img,
12
- Link,
13
- Preview,
14
- Row,
15
- Section,
16
- Tailwind,
17
- Text,
18
- } from "@react-email/components";
8
+ Paragraph,
9
+ PrimaryButton,
10
+ DiscordButton,
11
+ TextLink,
12
+ } from "../components";
19
13
 
20
14
  interface TeamInviteEmailProps {
21
15
  teamName?: string;
@@ -26,237 +20,50 @@ interface TeamInviteEmailProps {
26
20
  invitationLink?: string;
27
21
  }
28
22
 
29
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
30
-
31
23
  export const TeamInviteEmail = ({
32
24
  teamName = "Team Tracked Training",
33
25
  teamRole = "Athlete",
34
- websiteUrl = "https://www.tracked.training",
35
- teamImage,
36
- invitationLink,
26
+ websiteUrl = "https://tracked.gg",
27
+ teamImage = "https://cdn.trckd.ca/teams/default.png",
28
+ invitationLink = "https://tracked.gg/team/invite/abc123",
37
29
  }: TeamInviteEmailProps) => {
38
30
  return (
39
- <Html>
40
- <Head />
41
- <Preview>Team Invite for {teamName}</Preview>
42
- <Body style={main}>
43
- <Container style={container}>
44
- <Section style={box}>
45
- <Row>
46
- <Img src={`${baseUrl}`} width="40" height="40" alt="Tracked" />
47
- </Row>
48
- <Hr style={hr} />
49
- {teamImage && (
50
- <Img
51
- src={teamImage || baseUrl}
52
- height="70"
53
- alt="Tracked"
54
- style={{
55
- margin: "0 auto",
56
- padding: "20px",
57
- }}
58
- />
59
- )}
60
-
61
- <Text style={heading}>Invitation to join {teamName}</Text>
62
- <Text style={paragraph}>
63
- Join the team as a <strong>{teamRole}</strong> by pressing the
64
- button below.
65
- </Text>
66
- <Button style={button} href={invitationLink}>
67
- Join Team
68
- </Button>
69
-
70
- <Text style={{ ...paragraph }}>
71
- If this email was not expected, please ignore it. You can learn
72
- more about the Tracked Training Platform by visiting our{" "}
73
- <Link style={anchor} href={websiteUrl}>
74
- website
75
- </Link>
76
- .
77
- </Text>
78
-
79
- <Row style={row}>
80
- <Column style={column}>
81
- <Button
82
- style={appButton}
83
- href="https://apps.apple.com/app/tracked-training/id6450913418"
84
- >
85
- <Img
86
- src="https://cdn.trckd.ca/assets/app-store-black.png"
87
- alt="Download on the App Store"
88
- style={img}
89
- />
90
- </Button>
91
- </Column>
92
- <Column style={column}>
93
- <Button
94
- style={appButton}
95
- href="https://play.google.com/store/apps/details?id=com.tracked.mobile"
96
- >
97
- <Img
98
- src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
99
- alt="Google Play"
100
- style={img}
101
- />
102
- </Button>
103
- </Column>
104
- </Row>
105
-
106
- <div
107
- style={{
108
- textAlign: "left" as const,
109
- margin: "24px 0",
110
- }}
111
- >
112
- <a
113
- href="https://www.discord.gg/trackedgg"
114
- style={{
115
- backgroundColor: "#5865F2",
116
- borderRadius: "8px",
117
- fontSize: "16px",
118
- fontWeight: "bold",
119
- textDecoration: "none",
120
- padding: "12px 32px",
121
- display: "inline-block",
122
- }}
123
- >
124
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
125
- Join our Discord Community
126
- </span>
127
- </a>
128
- </div>
129
-
130
- <Hr style={hr} />
131
- <Text style={footer}>
132
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
133
- Street, Vancouver, BC
134
- </Text>
135
-
136
- <Container>
137
- <Link
138
- href="https://tracked.gg/terms"
139
- style={{ ...footer, paddingRight: 10 }}
140
- >
141
- Terms
142
- </Link>
143
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
144
- <Link
145
- href="https://tracked.gg/privacy"
146
- style={{ ...footer, paddingRight: 10 }}
147
- >
148
- Privacy
149
- </Link>
150
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
151
- <Link
152
- href="https://tracked.gg/support"
153
- style={{ ...footer, paddingRight: 10 }}
154
- >
155
- Support
156
- </Link>
157
- </Container>
158
-
159
- <Text style={footer}>
160
- This is a service notification by the Tracked Training Platform.
161
- </Text>
162
- </Section>
163
- </Container>
164
- </Body>
165
- </Html>
31
+ <EmailLayout preview={`Team Invite for ${teamName}`}>
32
+ <EmailHeader />
33
+
34
+ {teamImage && (
35
+ <Img
36
+ src={teamImage}
37
+ height="70"
38
+ alt={teamName}
39
+ style={{
40
+ margin: "0 auto 24px",
41
+ display: "block",
42
+ }}
43
+ />
44
+ )}
45
+
46
+ <Heading>Invitation to join {teamName}</Heading>
47
+ <Paragraph>
48
+ Join the team as a <strong>{teamRole}</strong> by pressing the button
49
+ below.
50
+ </Paragraph>
51
+
52
+ <PrimaryButton href={invitationLink || "#"} fullWidth>
53
+ Join Team
54
+ </PrimaryButton>
55
+
56
+ <Paragraph>
57
+ If this email was not expected, please ignore it. You can learn more
58
+ about the Tracked Training Platform by visiting our{" "}
59
+ <TextLink href={websiteUrl}>website</TextLink>.
60
+ </Paragraph>
61
+
62
+ <DiscordButton />
63
+
64
+ <EmailFooter websiteUrl={websiteUrl} />
65
+ </EmailLayout>
166
66
  );
167
67
  };
168
68
 
169
69
  export default TeamInviteEmail;
170
-
171
- const main = {
172
- backgroundColor: "#1e293b",
173
- fontFamily:
174
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
175
- };
176
-
177
- const container = {
178
- backgroundColor: "#0f172a",
179
- margin: "0 auto",
180
- padding: "20px 0 48px",
181
- marginBottom: "64px",
182
- borderRadius: "5px",
183
- };
184
-
185
- const box = {
186
- padding: "0 48px",
187
- };
188
-
189
- const row = {
190
- display: "flex",
191
- flexDirection: "row" as const,
192
- };
193
-
194
- const column = {
195
- flex: "0 0 48%",
196
- "@media (maxWidth: 600px)": {
197
- flex: "0 0 100%",
198
- marginBottom: "10px",
199
- },
200
- };
201
-
202
- const img = {
203
- maxWidth: "100%",
204
- height: "auto",
205
- };
206
-
207
- const appButton = {
208
- backgroundColor: "transparent",
209
- borderRadius: "5px",
210
- color: "#ffffff",
211
- fontSize: "16px",
212
- fontWeight: "bold",
213
- textDecoration: "none",
214
- textAlign: "center" as const,
215
- display: "block",
216
- width: "100%",
217
- maxWidth: "150px",
218
- };
219
-
220
- const hr = {
221
- borderColor: "#475569",
222
- margin: "20px 0",
223
- };
224
-
225
- const paragraph = {
226
- color: "#e2e8f0",
227
-
228
- fontSize: "16px",
229
- lineHeight: "24px",
230
- textAlign: "left" as const,
231
- };
232
-
233
- const heading = {
234
- color: "#e2e8f0",
235
- fontSize: "24px",
236
- lineHeight: "32px",
237
- fontWeight: "bold",
238
- textAlign: "left" as const,
239
- };
240
-
241
- const anchor = {
242
- color: "#4ade80",
243
- };
244
-
245
- const button = {
246
- backgroundColor: "#4ade80",
247
- borderRadius: "5px",
248
- color: "#0f172a",
249
- fontSize: "16px",
250
- fontWeight: "bold",
251
- textDecoration: "none",
252
- textAlign: "center" as const,
253
- display: "block",
254
- width: "100%",
255
- padding: "16px 0",
256
- };
257
-
258
- const footer = {
259
- color: "#8898aa",
260
- fontSize: "12px",
261
- lineHeight: "16px",
262
- };
@@ -1,21 +1,13 @@
1
1
  import * as React from "react";
2
2
  import {
3
- Body,
4
- Button,
5
- Column,
6
- Container,
7
- Head,
3
+ EmailLayout,
4
+ EmailHeader,
5
+ EmailFooter,
8
6
  Heading,
9
- Hr,
10
- Html,
11
- Img,
12
- Link,
13
- Preview,
14
- Row,
15
- Section,
16
- Tailwind,
17
- Text,
18
- } from "@react-email/components";
7
+ Paragraph,
8
+ DiscordButton,
9
+ TextLink,
10
+ } from "../components";
19
11
 
20
12
  interface TeamMemberRemovedEmailProps {
21
13
  teamName?: string;
@@ -23,218 +15,31 @@ interface TeamMemberRemovedEmailProps {
23
15
  teamImage?: string;
24
16
  }
25
17
 
26
- const baseUrl = "https://tracked.gg/android-chrome-192x192.png";
27
-
28
18
  export const TeamMemberRemovedEmail = ({
29
19
  teamName = "Team Tracked Training",
30
- websiteUrl = "https://www.tracked.training",
31
- teamImage,
20
+ websiteUrl = "https://tracked.gg",
32
21
  }: TeamMemberRemovedEmailProps) => {
33
22
  return (
34
- <Html>
35
- <Head />
36
- <Preview>Removed from the team</Preview>
37
- <Body style={main}>
38
- <Container style={container}>
39
- <Section style={box}>
40
- <Img src={`${baseUrl}`} width="40" height="40" alt="Tracked" />
41
- <Hr style={hr} />
42
- <Text style={heading}>Team membership revoked</Text>
43
- <Text style={paragraph}>
44
- The team owner has removed you from the team. If you believe this
45
- was a mistake, please contact the team owner.
46
- </Text>
47
-
48
- <Text style={{ ...paragraph }}>
49
- If this email was not expected, please ignore it. You can learn
50
- more about the Tracked Training Platform by visiting our{" "}
51
- <Link style={anchor} href={websiteUrl}>
52
- website
53
- </Link>
54
- .
55
- </Text>
23
+ <EmailLayout preview="Removed from the team">
24
+ <EmailHeader />
56
25
 
57
- <Row style={row}>
58
- <Column style={column}>
59
- <Button
60
- style={appButton}
61
- href="https://apps.apple.com/app/tracked-training/id6450913418"
62
- >
63
- <Img
64
- src="https://cdn.trckd.ca/assets/app-store-black.png"
65
- alt="Download on the App Store"
66
- style={img}
67
- />
68
- </Button>
69
- </Column>
70
- <Column style={column}>
71
- <Button
72
- style={appButton}
73
- href="https://play.google.com/store/apps/details?id=com.tracked.mobile"
74
- >
75
- <Img
76
- src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png"
77
- alt="Google Play"
78
- style={img}
79
- />
80
- </Button>
81
- </Column>
82
- </Row>
26
+ <Heading>Team membership revoked</Heading>
27
+ <Paragraph>
28
+ The team owner has removed you from the team. If you believe this was a
29
+ mistake, please contact the team owner.
30
+ </Paragraph>
83
31
 
84
- <div
85
- style={{
86
- textAlign: "left" as const,
87
- margin: "24px 0",
88
- }}
89
- >
90
- <a
91
- href="https://www.discord.gg/trackedgg"
92
- style={{
93
- backgroundColor: "#5865F2",
94
- borderRadius: "8px",
95
- fontSize: "16px",
96
- fontWeight: "bold",
97
- textDecoration: "none",
98
- padding: "12px 32px",
99
- display: "inline-block",
100
- }}
101
- >
102
- <span style={{ color: "#ffffff", textDecoration: "none" }}>
103
- Join our Discord Community
104
- </span>
105
- </a>
106
- </div>
32
+ <Paragraph>
33
+ If this email was not expected, please ignore it. You can learn more
34
+ about the Tracked Training Platform by visiting our{" "}
35
+ <TextLink href={websiteUrl}>website</TextLink>.
36
+ </Paragraph>
107
37
 
108
- <Hr style={hr} />
109
- <Text style={footer}>
110
- Copyright © Tracked Training Platform Inc. <br /> 9101 Horne
111
- Street, Vancouver, BC
112
- </Text>
38
+ <DiscordButton />
113
39
 
114
- <Container>
115
- <Link
116
- href="https://tracked.gg/terms"
117
- style={{ ...footer, paddingRight: 10 }}
118
- >
119
- Terms
120
- </Link>
121
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
122
- <Link
123
- href="https://tracked.gg/privacy"
124
- style={{ ...footer, paddingRight: 10 }}
125
- >
126
- Privacy
127
- </Link>
128
- <Link style={{ ...footer, paddingRight: 10 }}> | </Link>
129
- <Link
130
- href="https://tracked.gg/support"
131
- style={{ ...footer, paddingRight: 10 }}
132
- >
133
- Support
134
- </Link>
135
- </Container>
136
-
137
- <Text style={footer}>
138
- This is a service notification by the Tracked Training Platform.
139
- </Text>
140
- </Section>
141
- </Container>
142
- </Body>
143
- </Html>
40
+ <EmailFooter websiteUrl={websiteUrl} />
41
+ </EmailLayout>
144
42
  );
145
43
  };
146
44
 
147
45
  export default TeamMemberRemovedEmail;
148
-
149
- const main = {
150
- backgroundColor: "#1e293b",
151
- fontFamily:
152
- '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
153
- };
154
-
155
- const container = {
156
- backgroundColor: "#0f172a",
157
- margin: "0 auto",
158
- padding: "20px 0 48px",
159
- marginBottom: "64px",
160
- borderRadius: "5px",
161
- };
162
-
163
- const box = {
164
- padding: "0 48px",
165
- };
166
-
167
- const row = {
168
- display: "flex",
169
- flexDirection: "row" as const,
170
- };
171
-
172
- const column = {
173
- flex: "0 0 48%",
174
- "@media (maxWidth: 600px)": {
175
- flex: "0 0 100%",
176
- marginBottom: "10px",
177
- },
178
- };
179
-
180
- const img = {
181
- maxWidth: "100%",
182
- height: "auto",
183
- };
184
-
185
- const appButton = {
186
- backgroundColor: "transparent",
187
- borderRadius: "5px",
188
- color: "#ffffff",
189
- fontSize: "16px",
190
- fontWeight: "bold",
191
- textDecoration: "none",
192
- textAlign: "center" as const,
193
- display: "block",
194
- width: "100%",
195
- maxWidth: "150px",
196
- };
197
-
198
- const hr = {
199
- borderColor: "#475569",
200
- margin: "20px 0",
201
- };
202
-
203
- const paragraph = {
204
- color: "#e2e8f0",
205
-
206
- fontSize: "16px",
207
- lineHeight: "24px",
208
- textAlign: "left" as const,
209
- };
210
-
211
- const heading = {
212
- color: "#e2e8f0",
213
- fontSize: "24px",
214
- lineHeight: "32px",
215
- fontWeight: "bold",
216
- textAlign: "left" as const,
217
- };
218
-
219
- const anchor = {
220
- color: "#4ade80",
221
- };
222
-
223
- const button = {
224
- backgroundColor: "#4ade80",
225
- borderRadius: "5px",
226
- color: "#0f172a",
227
- fontSize: "16px",
228
- fontWeight: "bold",
229
- textDecoration: "none",
230
- textAlign: "center" as const,
231
- display: "block",
232
- width: "100%",
233
- padding: "16px 0",
234
- };
235
-
236
- const footer = {
237
- color: "#8898aa",
238
- fontSize: "12px",
239
- lineHeight: "16px",
240
- };