brookmind-emails 0.1.10 → 0.1.12

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 (35) hide show
  1. package/.context/attachments/Review request.md +61 -0
  2. package/.context/notes.md +0 -0
  3. package/.context/todos.md +0 -0
  4. package/dist/foodstudio/config.d.ts +11 -0
  5. package/dist/foodstudio/config.d.ts.map +1 -0
  6. package/dist/foodstudio/config.js +12 -0
  7. package/dist/foodstudio/index.d.ts +16 -0
  8. package/dist/foodstudio/index.d.ts.map +1 -0
  9. package/dist/foodstudio/index.js +43 -0
  10. package/dist/foodstudio/templates/GrantCreditsEmail.d.ts +10 -0
  11. package/dist/foodstudio/templates/GrantCreditsEmail.d.ts.map +1 -0
  12. package/dist/foodstudio/templates/GrantCreditsEmail.js +188 -0
  13. package/dist/foodstudio/templates/OtpEmail.d.ts +8 -0
  14. package/dist/foodstudio/templates/OtpEmail.d.ts.map +1 -0
  15. package/dist/foodstudio/templates/OtpEmail.js +144 -0
  16. package/dist/foodstudio/templates/PromoSubscriptionEmail.d.ts +11 -0
  17. package/dist/foodstudio/templates/PromoSubscriptionEmail.d.ts.map +1 -0
  18. package/dist/foodstudio/templates/PromoSubscriptionEmail.js +170 -0
  19. package/dist/foodstudio/templates/WelcomeEmail.d.ts +6 -0
  20. package/dist/foodstudio/templates/WelcomeEmail.d.ts.map +1 -0
  21. package/dist/foodstudio/templates/WelcomeEmail.js +155 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +2 -0
  25. package/dist/modelfy/templates/WelcomeEmail.d.ts.map +1 -1
  26. package/dist/modelfy/templates/WelcomeEmail.js +2 -1
  27. package/package.json +6 -1
  28. package/src/foodstudio/config.ts +12 -0
  29. package/src/foodstudio/index.ts +71 -0
  30. package/src/foodstudio/templates/GrantCreditsEmail.tsx +352 -0
  31. package/src/foodstudio/templates/OtpEmail.tsx +273 -0
  32. package/src/foodstudio/templates/PromoSubscriptionEmail.tsx +344 -0
  33. package/src/foodstudio/templates/WelcomeEmail.tsx +293 -0
  34. package/src/index.ts +3 -0
  35. package/src/modelfy/templates/WelcomeEmail.tsx +5 -1
@@ -0,0 +1,61 @@
1
+ You are performing a code review on the changes in the current branch.
2
+
3
+ The current branch is **davidcastillog/foodstudio-templates**, and the target branch is **origin/master**.
4
+
5
+ ## Code Review Instructions
6
+
7
+ The entire git diff for this branch has been provided below, as well as a list of all commits made to this branch.
8
+
9
+ **CRITICAL: EVERYTHING YOU NEED IS ALREADY PROVIDED BELOW.** The complete git diff and full commit history are included in this message.
10
+
11
+ **DO NOT run git diff, git log, git status, or ANY other git commands.** All the information you need to perform this review is already here.
12
+
13
+ When reviewing the diff:
14
+ 1. **Focus on logic and correctness** - Check for bugs, edge cases, and potential issues.
15
+ 2. **Consider readability** - Is the code clear and maintainable? Does it follow best practices in this repository?
16
+ 3. **Evaluate performance** - Are there obvious performance concerns or optimizations that could be made?
17
+ 4. **Assess test coverage** - Does the repository have testing patterns? If so, are there adequate tests for these changes?
18
+ 5. **Ask clarifying questions** - Ask the user for clarification if you are unsure about the changes or need more context.
19
+ 6. **Don't be overly pedantic** - Nitpicks are fine, but only if they are relevant issues within reason.
20
+
21
+ In your output:
22
+ - Provide a summary overview of the general code quality.
23
+ - Present the identified issues in a table with the columns: index (1, 2, etc.), line number(s), code, issue, and potential solution(s).
24
+ - If no issues are found, briefly state that the code meets best practices.
25
+
26
+ ## Full Diff
27
+
28
+ **REMINDER: DO NOT use any tools to fetch git information.** Simply read the diff and commit history that follow.
29
+
30
+ ```
31
+ > cd "/Users/davidcastillo/conductor/workspaces/brookmind-emails/hartford" && git diff 0f26955a0c71bc110156d37bac8834a5125a155d
32
+ diff --git a/package-lock.json b/package-lock.json
33
+ index 7d8e5ff..e0ba651 100644
34
+ --- a/package-lock.json
35
+ +++ b/package-lock.json
36
+ @@ -1,12 +1,12 @@
37
+ {
38
+ - "name": "@brookmind/emails",
39
+ - "version": "0.1.6",
40
+ + "name": "brookmind-emails",
41
+ + "version": "0.1.11",
42
+ "lockfileVersion": 3,
43
+ "requires": true,
44
+ "packages": {
45
+ "": {
46
+ - "name": "@brookmind/emails",
47
+ - "version": "0.1.3",
48
+ + "name": "brookmind-emails",
49
+ + "version": "0.1.11",
50
+ "dependencies": {
51
+ "@react-email/components": "^0.0.31",
52
+ "@react-email/render": "^1.0.3",
53
+
54
+ ```
55
+
56
+ ## Commit History
57
+
58
+ ```
59
+ > cd "/Users/davidcastillo/conductor/workspaces/brookmind-emails/hartford" && git log origin/master..HEAD
60
+ No commits found
61
+ ```
File without changes
File without changes
@@ -0,0 +1,11 @@
1
+ export declare const foodstudioConfig: {
2
+ logoUrl: string;
3
+ companyName: string;
4
+ supportEmail: string;
5
+ appUrl: string;
6
+ appStoreUrl: string;
7
+ playStoreUrl: string;
8
+ appStoreBadgeUrl: string;
9
+ playStoreBadgeUrl: string;
10
+ };
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/foodstudio/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;CAW5B,CAAC"}
@@ -0,0 +1,12 @@
1
+ export const foodstudioConfig = {
2
+ logoUrl: "https://foodstudio.ai/FoodStudioLogo.png",
3
+ companyName: "FoodStudio",
4
+ supportEmail: "support@foodstudio.ai",
5
+ appUrl: "https://foodstudio.ai",
6
+ // App Store links
7
+ appStoreUrl: "https://apps.apple.com/app/id6757201826",
8
+ playStoreUrl: "https://play.google.com/store/apps/details?id=com.brookmind.foodstudio",
9
+ // Badge images
10
+ appStoreBadgeUrl: "https://foodstudio.ai/images/appstore.svg",
11
+ playStoreBadgeUrl: "https://foodstudio.ai/images/googleplay.svg",
12
+ };
@@ -0,0 +1,16 @@
1
+ import { OtpEmail, type OtpEmailProps } from "./templates/OtpEmail.js";
2
+ import { PromoSubscriptionEmail, type PromoSubscriptionEmailProps } from "./templates/PromoSubscriptionEmail.js";
3
+ import { GrantCreditsEmail, type GrantCreditsEmailProps } from "./templates/GrantCreditsEmail.js";
4
+ import { WelcomeEmail, type WelcomeEmailProps } from "./templates/WelcomeEmail.js";
5
+ export type { OtpEmailProps, PromoSubscriptionEmailProps, GrantCreditsEmailProps, WelcomeEmailProps };
6
+ export { OtpEmail, PromoSubscriptionEmail, GrantCreditsEmail, WelcomeEmail };
7
+ export interface RenderResult {
8
+ subject: string;
9
+ html: string;
10
+ text: string;
11
+ }
12
+ export declare function renderOtpEmail(props: OtpEmailProps): Promise<RenderResult>;
13
+ export declare function renderPromoSubscriptionEmail(props: PromoSubscriptionEmailProps): Promise<RenderResult>;
14
+ export declare function renderGrantCreditsEmail(props: GrantCreditsEmailProps): Promise<RenderResult>;
15
+ export declare function renderWelcomeEmail(props: WelcomeEmailProps): Promise<RenderResult>;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foodstudio/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,EACjC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAClG,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGnF,YAAY,EAAE,aAAa,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;AAGtG,OAAO,EAAE,QAAQ,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAG7E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAShF;AAED,wBAAsB,4BAA4B,CAChD,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,YAAY,CAAC,CASvB;AAED,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,YAAY,CAAC,CASvB;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,YAAY,CAAC,CASvB"}
@@ -0,0 +1,43 @@
1
+ import { render } from "@react-email/render";
2
+ import { OtpEmail } from "./templates/OtpEmail.js";
3
+ import { PromoSubscriptionEmail, } from "./templates/PromoSubscriptionEmail.js";
4
+ import { GrantCreditsEmail } from "./templates/GrantCreditsEmail.js";
5
+ import { WelcomeEmail } from "./templates/WelcomeEmail.js";
6
+ // Re-export components for preview
7
+ export { OtpEmail, PromoSubscriptionEmail, GrantCreditsEmail, WelcomeEmail };
8
+ export async function renderOtpEmail(props) {
9
+ const html = await render(OtpEmail(props));
10
+ const text = await render(OtpEmail(props), { plainText: true });
11
+ return {
12
+ subject: "Your FoodStudio access code",
13
+ html,
14
+ text,
15
+ };
16
+ }
17
+ export async function renderPromoSubscriptionEmail(props) {
18
+ const html = await render(PromoSubscriptionEmail(props));
19
+ const text = await render(PromoSubscriptionEmail(props), { plainText: true });
20
+ return {
21
+ subject: `You've received a ${props.durationDays}-day ${props.planName} subscription!`,
22
+ html,
23
+ text,
24
+ };
25
+ }
26
+ export async function renderGrantCreditsEmail(props) {
27
+ const html = await render(GrantCreditsEmail(props));
28
+ const text = await render(GrantCreditsEmail(props), { plainText: true });
29
+ return {
30
+ subject: `You've received ${(props.credits ?? 0).toLocaleString()} credits on FoodStudio!`,
31
+ html,
32
+ text,
33
+ };
34
+ }
35
+ export async function renderWelcomeEmail(props) {
36
+ const html = await render(WelcomeEmail(props));
37
+ const text = await render(WelcomeEmail(props), { plainText: true });
38
+ return {
39
+ subject: "Welcome to FoodStudio!",
40
+ html,
41
+ text,
42
+ };
43
+ }
@@ -0,0 +1,10 @@
1
+ export interface GrantCreditsEmailProps {
2
+ email: string;
3
+ credits?: number;
4
+ durationDays: number;
5
+ expiresAt: string;
6
+ description?: string;
7
+ }
8
+ export declare function GrantCreditsEmail({ email, credits, durationDays, expiresAt, description, }: GrantCreditsEmailProps): React.ReactElement;
9
+ export default GrantCreditsEmail;
10
+ //# sourceMappingURL=GrantCreditsEmail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GrantCreditsEmail.d.ts","sourceRoot":"","sources":["../../../src/foodstudio/templates/GrantCreditsEmail.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAkLD,wBAAgB,iBAAiB,CAAC,EAChC,KAA0B,EAC1B,OAAO,EACP,YAAiB,EACjB,SAA8B,EAC9B,WAAW,GACZ,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAgJ7C;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,188 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Html, Head, Body, Container, Section, Text, Link, Preview, Font, Img, Button as ReactEmailButton, } from "@react-email/components";
3
+ import { foodstudioConfig } from "../config.js";
4
+ // Design System Colors - Matching FoodStudio Landing
5
+ const colors = {
6
+ background: "#0d0d0d",
7
+ cardBg: "#121212",
8
+ primary: "#ea580c",
9
+ white: "#f2f2f2",
10
+ textSecondary: "rgba(242, 242, 242, 0.7)",
11
+ textMuted: "#8c8c8c",
12
+ border: "#262626",
13
+ };
14
+ const styles = {
15
+ body: {
16
+ margin: 0,
17
+ padding: 0,
18
+ backgroundColor: colors.background,
19
+ fontFamily: "'Inter', 'Segoe UI', Arial, sans-serif",
20
+ },
21
+ container: {
22
+ maxWidth: "600px",
23
+ margin: "0 auto",
24
+ backgroundColor: colors.background,
25
+ },
26
+ header: {
27
+ backgroundColor: colors.background,
28
+ padding: "40px 32px 24px",
29
+ textAlign: "center",
30
+ },
31
+ logo: {
32
+ display: "block",
33
+ margin: "0 auto",
34
+ },
35
+ heroSection: {
36
+ padding: "24px 32px 40px",
37
+ textAlign: "center",
38
+ },
39
+ heroTagline: {
40
+ margin: "0 0 12px",
41
+ fontSize: "13px",
42
+ fontWeight: 600,
43
+ color: colors.primary,
44
+ letterSpacing: "2px",
45
+ textTransform: "uppercase",
46
+ },
47
+ heroHeading: {
48
+ margin: "0 0 16px",
49
+ fontSize: "28px",
50
+ fontWeight: 700,
51
+ color: colors.white,
52
+ lineHeight: "1.3",
53
+ },
54
+ paragraph: {
55
+ margin: "0 0 28px",
56
+ fontSize: "16px",
57
+ lineHeight: "1.6",
58
+ color: colors.textSecondary,
59
+ textAlign: "center",
60
+ },
61
+ creditBox: {
62
+ backgroundColor: "rgba(234, 88, 12, 0.15)",
63
+ border: `1px solid rgba(234, 88, 12, 0.3)`,
64
+ borderRadius: "12px",
65
+ padding: "24px",
66
+ marginBottom: "28px",
67
+ textAlign: "center",
68
+ },
69
+ creditAmount: {
70
+ fontSize: "48px",
71
+ fontWeight: 700,
72
+ color: colors.white,
73
+ margin: "0 0 4px",
74
+ },
75
+ creditLabel: {
76
+ fontSize: "14px",
77
+ color: colors.textMuted,
78
+ margin: 0,
79
+ },
80
+ detailsBox: {
81
+ backgroundColor: colors.cardBg,
82
+ border: `1px solid ${colors.border}`,
83
+ borderRadius: "12px",
84
+ padding: "20px 24px",
85
+ marginBottom: "28px",
86
+ },
87
+ detailLabel: {
88
+ fontSize: "13px",
89
+ color: colors.textMuted,
90
+ margin: "0 0 4px",
91
+ },
92
+ detailValue: {
93
+ fontSize: "16px",
94
+ fontWeight: 600,
95
+ color: colors.white,
96
+ margin: 0,
97
+ },
98
+ buttonContainer: {
99
+ textAlign: "center",
100
+ marginBottom: "28px",
101
+ },
102
+ ctaButton: {
103
+ display: "inline-block",
104
+ padding: "14px 36px",
105
+ fontSize: "15px",
106
+ fontWeight: 600,
107
+ textDecoration: "none",
108
+ borderRadius: "10px",
109
+ backgroundColor: colors.primary,
110
+ color: "#ffffff",
111
+ textAlign: "center",
112
+ },
113
+ contentSection: {
114
+ backgroundColor: colors.cardBg,
115
+ padding: "32px",
116
+ borderTop: `1px solid ${colors.border}`,
117
+ },
118
+ smallText: {
119
+ margin: "0 0 12px",
120
+ fontSize: "14px",
121
+ lineHeight: "1.6",
122
+ color: colors.textMuted,
123
+ textAlign: "center",
124
+ },
125
+ descriptionText: {
126
+ margin: "0 0 24px",
127
+ fontSize: "15px",
128
+ lineHeight: "1.6",
129
+ color: colors.textSecondary,
130
+ textAlign: "center",
131
+ fontStyle: "italic",
132
+ },
133
+ link: {
134
+ color: colors.primary,
135
+ textDecoration: "none",
136
+ fontWeight: 600,
137
+ },
138
+ footer: {
139
+ backgroundColor: colors.cardBg,
140
+ padding: "24px 32px",
141
+ textAlign: "center",
142
+ borderTop: `1px solid ${colors.border}`,
143
+ },
144
+ footerLogo: {
145
+ display: "block",
146
+ margin: "0 auto 12px",
147
+ opacity: 0.6,
148
+ },
149
+ footerText: {
150
+ margin: "0 0 4px",
151
+ fontSize: "11px",
152
+ color: colors.textMuted,
153
+ lineHeight: "1.6",
154
+ },
155
+ footerLink: {
156
+ color: colors.textMuted,
157
+ textDecoration: "underline",
158
+ },
159
+ downloadSection: {
160
+ backgroundColor: colors.cardBg,
161
+ padding: "24px 32px",
162
+ textAlign: "center",
163
+ borderTop: `1px solid ${colors.border}`,
164
+ },
165
+ downloadText: {
166
+ margin: "0 0 16px",
167
+ fontSize: "14px",
168
+ color: colors.white,
169
+ },
170
+ badgeContainer: {
171
+ textAlign: "center",
172
+ },
173
+ badge: {
174
+ display: "inline-block",
175
+ margin: "0 8px",
176
+ },
177
+ };
178
+ export function GrantCreditsEmail({ email = "user@example.com", credits, durationDays = 30, expiresAt = "January 31, 2025", description, }) {
179
+ const safeCredits = Number.isFinite(credits) ? Number(credits) : 0;
180
+ return (_jsxs(Html, { lang: "en", children: [_jsxs(Head, { children: [_jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
181
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0.woff2",
182
+ format: "woff2",
183
+ }, fontWeight: 400, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
184
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hjp-Ek-_0.woff2",
185
+ format: "woff2",
186
+ }, fontWeight: 700, fontStyle: "normal" })] }), _jsxs(Preview, { children: ["You've received ", safeCredits.toLocaleString(), " credits on FoodStudio!"] }), _jsx(Body, { style: styles.body, children: _jsxs(Container, { style: styles.container, children: [_jsx(Section, { style: styles.header, children: _jsx(Img, { src: foodstudioConfig.logoUrl, width: "130", height: "auto", alt: "FoodStudio", style: styles.logo }) }), _jsxs(Section, { style: styles.heroSection, children: [_jsx(Text, { style: styles.heroTagline, children: "Bonus Credits" }), _jsx(Text, { style: styles.heroHeading, children: "Credits Added to Your Account!" }), _jsxs(Text, { style: styles.paragraph, children: ["Hi ", _jsx("span", { style: { color: colors.white, fontWeight: 600 }, children: email }), ", you've received bonus credits to use on FoodStudio."] }), _jsxs("div", { style: styles.creditBox, children: [_jsx(Text, { style: styles.creditAmount, children: safeCredits.toLocaleString() }), _jsx(Text, { style: styles.creditLabel, children: "credits" })] }), _jsx("div", { style: styles.detailsBox, children: _jsx("table", { width: "100%", cellPadding: 0, cellSpacing: 0, children: _jsx("tbody", { children: _jsxs("tr", { children: [_jsxs("td", { style: { paddingBottom: "16px" }, children: [_jsx(Text, { style: styles.detailLabel, children: "Valid for" }), _jsxs(Text, { style: styles.detailValue, children: [durationDays, " days"] })] }), _jsxs("td", { style: { paddingBottom: "16px", textAlign: "right" }, children: [_jsx(Text, { style: styles.detailLabel, children: "Expires" }), _jsx(Text, { style: styles.detailValue, children: expiresAt })] })] }) }) }) }), description && _jsxs(Text, { style: styles.descriptionText, children: ["\"", description, "\""] }), _jsx("div", { style: styles.buttonContainer, children: _jsx(ReactEmailButton, { href: foodstudioConfig.appUrl, style: styles.ctaButton, children: "Start Creating" }) })] }), _jsxs(Section, { style: styles.contentSection, children: [_jsxs(Text, { style: styles.smallText, children: ["These credits will be used before your regular credits and expire on ", expiresAt, "."] }), _jsxs(Text, { style: styles.smallText, children: ["Questions?", " ", _jsx(Link, { href: `mailto:${foodstudioConfig.supportEmail}`, style: styles.link, children: foodstudioConfig.supportEmail })] })] }), _jsxs(Section, { style: styles.downloadSection, children: [_jsx(Text, { style: styles.downloadText, children: "Get the FoodStudio app" }), _jsxs("div", { style: styles.badgeContainer, children: [_jsx(Link, { href: foodstudioConfig.appStoreUrl, style: styles.badge, children: _jsx(Img, { src: foodstudioConfig.appStoreBadgeUrl, width: "120", height: "40", alt: "Download on the App Store" }) }), _jsx(Link, { href: foodstudioConfig.playStoreUrl, style: styles.badge, children: _jsx(Img, { src: foodstudioConfig.playStoreBadgeUrl, width: "135", height: "40", alt: "Get it on Google Play" }) })] })] }), _jsxs(Section, { style: styles.footer, children: [_jsx(Img, { src: foodstudioConfig.logoUrl, width: "80", height: "auto", alt: "FoodStudio", style: styles.footerLogo }), _jsxs(Text, { style: styles.footerText, children: ["\u00A9 ", new Date().getFullYear(), " ", foodstudioConfig.companyName, ". All rights reserved."] }), _jsx(Text, { style: styles.footerText, children: "You received this email because credits were added to your FoodStudio account." }), _jsx(Text, { style: styles.footerText, children: _jsx(Link, { href: `${foodstudioConfig.appUrl}/privacy`, style: styles.footerLink, children: "Privacy Policy" }) })] })] }) })] }));
187
+ }
188
+ export default GrantCreditsEmail;
@@ -0,0 +1,8 @@
1
+ export interface OtpEmailProps {
2
+ otp: string;
3
+ email: string;
4
+ expirationMinutes?: number;
5
+ }
6
+ export declare function OtpEmail({ otp, email, expirationMinutes }: OtpEmailProps): React.ReactElement;
7
+ export default OtpEmail;
8
+ //# sourceMappingURL=OtpEmail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpEmail.d.ts","sourceRoot":"","sources":["../../../src/foodstudio/templates/OtpEmail.tsx"],"names":[],"mappings":"AAcA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAoID,wBAAgB,QAAQ,CAAC,EAAE,GAAc,EAAE,KAA0B,EAAE,iBAAsB,EAAE,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CAwHlI;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,144 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Html, Head, Body, Container, Section, Text, Link, Preview, Font, Img, } from "@react-email/components";
3
+ import { foodstudioConfig } from "../config.js";
4
+ // Design System Colors - Matching FoodStudio Landing
5
+ const colors = {
6
+ background: "#0d0d0d",
7
+ cardBg: "#121212",
8
+ primary: "#ea580c",
9
+ white: "#f2f2f2",
10
+ textSecondary: "rgba(242, 242, 242, 0.7)",
11
+ textMuted: "#8c8c8c",
12
+ border: "#262626",
13
+ };
14
+ const styles = {
15
+ body: {
16
+ margin: 0,
17
+ padding: 0,
18
+ backgroundColor: colors.background,
19
+ fontFamily: "'Inter', 'Segoe UI', Arial, sans-serif",
20
+ },
21
+ container: {
22
+ maxWidth: "600px",
23
+ margin: "0 auto",
24
+ backgroundColor: colors.background,
25
+ },
26
+ header: {
27
+ backgroundColor: colors.background,
28
+ padding: "40px 32px 24px",
29
+ textAlign: "center",
30
+ },
31
+ logo: {
32
+ display: "block",
33
+ margin: "0 auto",
34
+ },
35
+ heroSection: {
36
+ padding: "24px 32px 40px",
37
+ textAlign: "center",
38
+ },
39
+ heroTagline: {
40
+ margin: "0 0 12px",
41
+ fontSize: "13px",
42
+ fontWeight: 600,
43
+ color: colors.primary,
44
+ letterSpacing: "2px",
45
+ textTransform: "uppercase",
46
+ },
47
+ heroHeading: {
48
+ margin: "0 0 16px",
49
+ fontSize: "28px",
50
+ fontWeight: 700,
51
+ color: colors.white,
52
+ lineHeight: "1.3",
53
+ },
54
+ paragraph: {
55
+ margin: "0 0 28px",
56
+ fontSize: "16px",
57
+ lineHeight: "1.6",
58
+ color: colors.textSecondary,
59
+ },
60
+ otpContainer: {
61
+ display: "inline-block",
62
+ backgroundColor: "rgba(234, 88, 12, 0.15)",
63
+ border: `1px solid rgba(234, 88, 12, 0.3)`,
64
+ borderRadius: "12px",
65
+ padding: "24px 40px",
66
+ marginBottom: "28px",
67
+ },
68
+ otp: {
69
+ fontSize: "36px",
70
+ letterSpacing: "10px",
71
+ fontWeight: 700,
72
+ color: colors.white,
73
+ margin: 0,
74
+ },
75
+ contentSection: {
76
+ backgroundColor: colors.cardBg,
77
+ padding: "32px",
78
+ borderTop: `1px solid ${colors.border}`,
79
+ },
80
+ smallText: {
81
+ margin: "0 0 12px",
82
+ fontSize: "14px",
83
+ lineHeight: "1.6",
84
+ color: colors.textMuted,
85
+ textAlign: "center",
86
+ },
87
+ link: {
88
+ color: colors.primary,
89
+ textDecoration: "none",
90
+ fontWeight: 600,
91
+ },
92
+ footer: {
93
+ backgroundColor: colors.cardBg,
94
+ padding: "24px 32px",
95
+ textAlign: "center",
96
+ borderTop: `1px solid ${colors.border}`,
97
+ },
98
+ footerLogo: {
99
+ display: "block",
100
+ margin: "0 auto 12px",
101
+ opacity: 0.6,
102
+ },
103
+ footerText: {
104
+ margin: "0 0 4px",
105
+ fontSize: "11px",
106
+ color: colors.textMuted,
107
+ lineHeight: "1.6",
108
+ },
109
+ footerLink: {
110
+ color: colors.textMuted,
111
+ textDecoration: "underline",
112
+ },
113
+ downloadSection: {
114
+ backgroundColor: colors.cardBg,
115
+ padding: "24px 32px",
116
+ textAlign: "center",
117
+ borderTop: `1px solid ${colors.border}`,
118
+ },
119
+ downloadText: {
120
+ margin: "0 0 16px",
121
+ fontSize: "14px",
122
+ color: colors.white,
123
+ },
124
+ badgeContainer: {
125
+ textAlign: "center",
126
+ },
127
+ badge: {
128
+ display: "inline-block",
129
+ margin: "0 8px",
130
+ },
131
+ };
132
+ export function OtpEmail({ otp = "123456", email = "user@example.com", expirationMinutes = 10 }) {
133
+ const sanitizedOtp = (typeof otp === "string" ? otp : String(otp ?? ""))
134
+ .replace(/\s+/g, "")
135
+ .trim();
136
+ return (_jsxs(Html, { lang: "en", children: [_jsxs(Head, { children: [_jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
137
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0.woff2",
138
+ format: "woff2",
139
+ }, fontWeight: 400, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
140
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hjp-Ek-_0.woff2",
141
+ format: "woff2",
142
+ }, fontWeight: 700, fontStyle: "normal" })] }), _jsxs(Preview, { children: ["Your FoodStudio access code: ", sanitizedOtp] }), _jsx(Body, { style: styles.body, children: _jsxs(Container, { style: styles.container, children: [_jsx(Section, { style: styles.header, children: _jsx(Img, { src: foodstudioConfig.logoUrl, width: "130", height: "auto", alt: "FoodStudio", style: styles.logo }) }), _jsxs(Section, { style: styles.heroSection, children: [_jsx(Text, { style: styles.heroTagline, children: "Access Code" }), _jsx(Text, { style: styles.heroHeading, children: "Sign In to FoodStudio" }), _jsxs(Text, { style: { ...styles.paragraph, margin: "0 0 4px" }, children: ["Hi ", _jsx("span", { style: { color: colors.white, fontWeight: 600 }, children: email }), ", use the code below to sign in."] }), _jsxs(Text, { style: styles.paragraph, children: ["It will stay valid for the next ", _jsxs("span", { style: { color: colors.white, fontWeight: 600 }, children: [expirationMinutes, " minutes"] }), "."] }), _jsx("div", { style: styles.otpContainer, children: _jsx(Text, { style: styles.otp, children: sanitizedOtp }) })] }), _jsxs(Section, { style: styles.contentSection, children: [_jsx(Text, { style: styles.smallText, children: "If you didn't request this code, you can safely ignore this email. No one else can access your account without it." }), _jsxs(Text, { style: styles.smallText, children: ["Need help?", " ", _jsx(Link, { href: `mailto:${foodstudioConfig.supportEmail}`, style: styles.link, children: foodstudioConfig.supportEmail })] })] }), _jsxs(Section, { style: styles.downloadSection, children: [_jsx(Text, { style: styles.downloadText, children: "Get the FoodStudio app" }), _jsxs("div", { style: styles.badgeContainer, children: [_jsx(Link, { href: foodstudioConfig.appStoreUrl, style: styles.badge, children: _jsx(Img, { src: foodstudioConfig.appStoreBadgeUrl, width: "120", height: "40", alt: "Download on the App Store" }) }), _jsx(Link, { href: foodstudioConfig.playStoreUrl, style: styles.badge, children: _jsx(Img, { src: foodstudioConfig.playStoreBadgeUrl, width: "135", height: "40", alt: "Get it on Google Play" }) })] })] }), _jsxs(Section, { style: styles.footer, children: [_jsx(Img, { src: foodstudioConfig.logoUrl, width: "80", height: "auto", alt: "FoodStudio", style: styles.footerLogo }), _jsxs(Text, { style: styles.footerText, children: ["\u00A9 ", new Date().getFullYear(), " ", foodstudioConfig.companyName, ". All rights reserved."] }), _jsx(Text, { style: styles.footerText, children: "You received this email because someone attempted to sign in to FoodStudio with this address." }), _jsx(Text, { style: styles.footerText, children: _jsx(Link, { href: `${foodstudioConfig.appUrl}/privacy`, style: styles.footerLink, children: "Privacy Policy" }) })] })] }) })] }));
143
+ }
144
+ export default OtpEmail;
@@ -0,0 +1,11 @@
1
+ export interface PromoSubscriptionEmailProps {
2
+ email: string;
3
+ planName: string;
4
+ durationDays: number;
5
+ credits?: number;
6
+ expiresAt: string;
7
+ notes?: string;
8
+ }
9
+ export declare function PromoSubscriptionEmail({ email, planName, durationDays, credits, expiresAt, notes, }: PromoSubscriptionEmailProps): React.ReactElement;
10
+ export default PromoSubscriptionEmail;
11
+ //# sourceMappingURL=PromoSubscriptionEmail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromoSubscriptionEmail.d.ts","sourceRoot":"","sources":["../../../src/foodstudio/templates/PromoSubscriptionEmail.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAgKD,wBAAgB,sBAAsB,CAAC,EACrC,KAA0B,EAC1B,QAAgB,EAChB,YAAiB,EACjB,OAAa,EACb,SAA8B,EAC9B,KAAK,GACN,EAAE,2BAA2B,GAAG,KAAK,CAAC,YAAY,CAwJlD;AAED,eAAe,sBAAsB,CAAC"}