@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
@@ -0,0 +1,133 @@
1
+ import * as React from "react";
2
+ import { Section, Text } from "@react-email/components";
3
+ import {
4
+ EmailLayout,
5
+ EmailHeader,
6
+ EmailFooter,
7
+ Heading,
8
+ Paragraph,
9
+ PrimaryButton,
10
+ DiscordButton,
11
+ colors,
12
+ spacing,
13
+ } from "../components";
14
+
15
+ interface AnniversaryEmailProps {
16
+ userName: string;
17
+ yearsOnPlatform: number;
18
+ totalWorkouts?: number;
19
+ totalVolume?: string;
20
+ appUrl: string;
21
+ websiteUrl?: string;
22
+ unsubscribeUrl?: string;
23
+ }
24
+
25
+ export const AnniversaryEmail = ({
26
+ userName = "Alex",
27
+ yearsOnPlatform = 1,
28
+ totalWorkouts = 156,
29
+ totalVolume = "1,250,000 lbs",
30
+ appUrl = "tracked://bodyweight",
31
+ websiteUrl = "https://tracked.gg",
32
+ unsubscribeUrl = "https://tracked.gg/unsubscribe",
33
+ }: AnniversaryEmailProps) => {
34
+ const yearText = yearsOnPlatform === 1 ? "1 Year" : `${yearsOnPlatform} Years`;
35
+
36
+ return (
37
+ <EmailLayout preview={`Happy ${yearText} Anniversary on Tracked!`}>
38
+ <EmailHeader />
39
+
40
+ <Heading>Happy {yearText} Anniversary!</Heading>
41
+ <Paragraph>
42
+ Congratulations {userName}! Today marks {yearsOnPlatform}{" "}
43
+ {yearsOnPlatform === 1 ? "year" : "years"} since you joined Tracked.
44
+ Thank you for being part of our community!
45
+ </Paragraph>
46
+
47
+ {(totalWorkouts || totalVolume) && (
48
+ <Section
49
+ style={{
50
+ backgroundColor: colors.surface,
51
+ padding: spacing.lg,
52
+ borderRadius: "8px",
53
+ margin: `${spacing.lg} 0`,
54
+ border: `1px solid ${colors.border}`,
55
+ textAlign: "center" as const,
56
+ }}
57
+ >
58
+ <Text
59
+ style={{
60
+ color: colors.accent,
61
+ fontSize: "14px",
62
+ fontWeight: "bold",
63
+ textTransform: "uppercase" as const,
64
+ letterSpacing: "0.5px",
65
+ margin: "0 0 16px 0",
66
+ }}
67
+ >
68
+ Your Journey So Far
69
+ </Text>
70
+ {totalWorkouts && (
71
+ <Text
72
+ style={{
73
+ color: colors.textPrimary,
74
+ fontSize: "32px",
75
+ fontWeight: "bold",
76
+ margin: "0 0 4px 0",
77
+ }}
78
+ >
79
+ {totalWorkouts.toLocaleString()}
80
+ </Text>
81
+ )}
82
+ {totalWorkouts && (
83
+ <Text
84
+ style={{
85
+ color: colors.textSecondary,
86
+ fontSize: "14px",
87
+ margin: "0 0 16px 0",
88
+ }}
89
+ >
90
+ workouts logged
91
+ </Text>
92
+ )}
93
+ {totalVolume && (
94
+ <>
95
+ <Text
96
+ style={{
97
+ color: colors.textPrimary,
98
+ fontSize: "32px",
99
+ fontWeight: "bold",
100
+ margin: "0 0 4px 0",
101
+ }}
102
+ >
103
+ {totalVolume}
104
+ </Text>
105
+ <Text
106
+ style={{
107
+ color: colors.textSecondary,
108
+ fontSize: "14px",
109
+ margin: "0",
110
+ }}
111
+ >
112
+ total volume lifted
113
+ </Text>
114
+ </>
115
+ )}
116
+ </Section>
117
+ )}
118
+
119
+ <Paragraph>
120
+ Here's to another year of crushing goals and getting stronger. Keep up
121
+ the amazing work!
122
+ </Paragraph>
123
+
124
+ <PrimaryButton href={appUrl}>View Your Progress</PrimaryButton>
125
+
126
+ <DiscordButton />
127
+
128
+ <EmailFooter websiteUrl={websiteUrl} marketing unsubscribeUrl={unsubscribeUrl} />
129
+ </EmailLayout>
130
+ );
131
+ };
132
+
133
+ export default AnniversaryEmail;
@@ -0,0 +1,100 @@
1
+ import * as React from "react";
2
+ import { Section, Text } from "@react-email/components";
3
+ import {
4
+ EmailLayout,
5
+ EmailHeader,
6
+ EmailFooter,
7
+ Heading,
8
+ Paragraph,
9
+ PrimaryButton,
10
+ SecondaryButton,
11
+ DiscordButton,
12
+ colors,
13
+ spacing,
14
+ borderRadius,
15
+ } from "../components";
16
+
17
+ interface AppReviewRequestEmailProps {
18
+ userName: string;
19
+ workoutsCompleted: number;
20
+ appStoreUrl?: string;
21
+ playStoreUrl?: string;
22
+ websiteUrl?: string;
23
+ unsubscribeUrl?: string;
24
+ }
25
+
26
+ export const AppReviewRequestEmail = ({
27
+ userName = "Alex",
28
+ workoutsCompleted = 50,
29
+ appStoreUrl = "https://apps.apple.com/app/tracked-training/id6450913418",
30
+ playStoreUrl = "https://play.google.com/store/apps/details?id=com.tracked.mobile",
31
+ websiteUrl = "https://tracked.gg",
32
+ unsubscribeUrl = "https://tracked.gg/unsubscribe",
33
+ }: AppReviewRequestEmailProps) => {
34
+ return (
35
+ <EmailLayout preview={`You've completed ${workoutsCompleted} workouts! Share your experience`}>
36
+ <EmailHeader />
37
+
38
+ <Heading>You're Crushing It!</Heading>
39
+ <Paragraph>
40
+ Hi {userName}, you've completed <strong>{workoutsCompleted} workouts</strong> on
41
+ Tracked. That's an amazing achievement!
42
+ </Paragraph>
43
+
44
+ <Section
45
+ style={{
46
+ backgroundColor: colors.surface,
47
+ padding: spacing.lg,
48
+ borderRadius: borderRadius.md,
49
+ margin: `${spacing.lg} 0`,
50
+ border: `1px solid ${colors.border}`,
51
+ textAlign: "center" as const,
52
+ }}
53
+ >
54
+ <Text
55
+ style={{
56
+ color: colors.textPrimary,
57
+ fontSize: "48px",
58
+ fontWeight: "bold",
59
+ margin: "0",
60
+ }}
61
+ >
62
+ {workoutsCompleted}
63
+ </Text>
64
+ <Text
65
+ style={{
66
+ color: colors.textSecondary,
67
+ fontSize: "14px",
68
+ margin: "8px 0 0 0",
69
+ }}
70
+ >
71
+ workouts and counting
72
+ </Text>
73
+ </Section>
74
+
75
+ <Paragraph>
76
+ We'd love to hear what you think! A quick review helps other athletes
77
+ discover Tracked and helps us continue improving the app.
78
+ </Paragraph>
79
+
80
+ <Paragraph style={{ fontWeight: "600" }}>
81
+ Would you take 30 seconds to leave a review?
82
+ </Paragraph>
83
+
84
+ <PrimaryButton href={appStoreUrl}>Review on App Store</PrimaryButton>
85
+
86
+ <SecondaryButton href={playStoreUrl}>Review on Google Play</SecondaryButton>
87
+
88
+ <Paragraph muted style={{ textAlign: "center" as const }}>
89
+ Thank you for being part of the Tracked community. Your support means
90
+ everything to us!
91
+ </Paragraph>
92
+
93
+ <DiscordButton />
94
+
95
+ <EmailFooter websiteUrl={websiteUrl} marketing unsubscribeUrl={unsubscribeUrl} />
96
+ </EmailLayout>
97
+ );
98
+ };
99
+
100
+ export default AppReviewRequestEmail;