brookmind-emails 0.1.11 → 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 (32) 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/package.json +6 -1
  26. package/src/foodstudio/config.ts +12 -0
  27. package/src/foodstudio/index.ts +71 -0
  28. package/src/foodstudio/templates/GrantCreditsEmail.tsx +352 -0
  29. package/src/foodstudio/templates/OtpEmail.tsx +273 -0
  30. package/src/foodstudio/templates/PromoSubscriptionEmail.tsx +344 -0
  31. package/src/foodstudio/templates/WelcomeEmail.tsx +293 -0
  32. package/src/index.ts +3 -0
@@ -0,0 +1,170 @@
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
+ accent: "#ea580c",
10
+ white: "#f2f2f2",
11
+ textSecondary: "rgba(242, 242, 242, 0.7)",
12
+ textMuted: "#8c8c8c",
13
+ border: "#262626",
14
+ };
15
+ const styles = {
16
+ body: {
17
+ margin: 0,
18
+ padding: 0,
19
+ backgroundColor: colors.background,
20
+ fontFamily: "'Inter', 'Segoe UI', Arial, sans-serif",
21
+ },
22
+ container: {
23
+ maxWidth: "600px",
24
+ margin: "0 auto",
25
+ backgroundColor: colors.background,
26
+ },
27
+ header: {
28
+ backgroundColor: colors.background,
29
+ padding: "40px 32px 24px",
30
+ textAlign: "center",
31
+ },
32
+ logo: {
33
+ display: "block",
34
+ margin: "0 auto",
35
+ },
36
+ heroSection: {
37
+ padding: "24px 32px 40px",
38
+ textAlign: "center",
39
+ },
40
+ heroTagline: {
41
+ margin: "0 0 12px",
42
+ fontSize: "13px",
43
+ fontWeight: 600,
44
+ color: colors.accent,
45
+ letterSpacing: "2px",
46
+ textTransform: "uppercase",
47
+ },
48
+ heroHeading: {
49
+ margin: "0 0 16px",
50
+ fontSize: "28px",
51
+ fontWeight: 700,
52
+ color: colors.white,
53
+ lineHeight: "1.3",
54
+ },
55
+ paragraph: {
56
+ margin: "0 0 28px",
57
+ fontSize: "16px",
58
+ lineHeight: "1.6",
59
+ color: colors.textSecondary,
60
+ textAlign: "center",
61
+ },
62
+ highlightBox: {
63
+ backgroundColor: "rgba(234, 88, 12, 0.15)",
64
+ border: `1px solid rgba(234, 88, 12, 0.3)`,
65
+ borderRadius: "12px",
66
+ padding: "24px",
67
+ marginBottom: "28px",
68
+ },
69
+ highlightLabel: {
70
+ fontSize: "13px",
71
+ color: colors.textMuted,
72
+ margin: "0 0 4px",
73
+ },
74
+ highlightValue: {
75
+ fontSize: "16px",
76
+ fontWeight: 600,
77
+ color: colors.white,
78
+ margin: 0,
79
+ },
80
+ buttonContainer: {
81
+ textAlign: "center",
82
+ marginBottom: "28px",
83
+ },
84
+ ctaButton: {
85
+ display: "inline-block",
86
+ padding: "14px 36px",
87
+ fontSize: "15px",
88
+ fontWeight: 600,
89
+ textDecoration: "none",
90
+ borderRadius: "10px",
91
+ backgroundColor: colors.primary,
92
+ color: "#ffffff",
93
+ textAlign: "center",
94
+ },
95
+ contentSection: {
96
+ backgroundColor: colors.cardBg,
97
+ padding: "32px",
98
+ borderTop: `1px solid ${colors.border}`,
99
+ },
100
+ smallText: {
101
+ margin: "0 0 12px",
102
+ fontSize: "14px",
103
+ lineHeight: "1.6",
104
+ color: colors.textMuted,
105
+ textAlign: "center",
106
+ },
107
+ notesText: {
108
+ margin: "0 0 24px",
109
+ fontSize: "15px",
110
+ lineHeight: "1.6",
111
+ color: colors.textSecondary,
112
+ textAlign: "center",
113
+ fontStyle: "italic",
114
+ },
115
+ link: {
116
+ color: colors.primary,
117
+ textDecoration: "none",
118
+ fontWeight: 600,
119
+ },
120
+ footer: {
121
+ backgroundColor: colors.cardBg,
122
+ padding: "24px 32px",
123
+ textAlign: "center",
124
+ borderTop: `1px solid ${colors.border}`,
125
+ },
126
+ footerLogo: {
127
+ display: "block",
128
+ margin: "0 auto 12px",
129
+ opacity: 0.6,
130
+ },
131
+ footerText: {
132
+ margin: "0 0 4px",
133
+ fontSize: "11px",
134
+ color: colors.textMuted,
135
+ lineHeight: "1.6",
136
+ },
137
+ footerLink: {
138
+ color: colors.textMuted,
139
+ textDecoration: "underline",
140
+ },
141
+ downloadSection: {
142
+ backgroundColor: colors.cardBg,
143
+ padding: "24px 32px",
144
+ textAlign: "center",
145
+ borderTop: `1px solid ${colors.border}`,
146
+ },
147
+ downloadText: {
148
+ margin: "0 0 16px",
149
+ fontSize: "14px",
150
+ color: colors.white,
151
+ },
152
+ badgeContainer: {
153
+ textAlign: "center",
154
+ },
155
+ badge: {
156
+ display: "inline-block",
157
+ margin: "0 8px",
158
+ },
159
+ };
160
+ export function PromoSubscriptionEmail({ email = "user@example.com", planName = "Pro", durationDays = 30, credits = 500, expiresAt = "January 31, 2025", notes, }) {
161
+ const safeCredits = Number.isFinite(credits) ? Number(credits) : 0;
162
+ return (_jsxs(Html, { lang: "en", children: [_jsxs(Head, { children: [_jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
163
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0.woff2",
164
+ format: "woff2",
165
+ }, fontWeight: 400, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
166
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hjp-Ek-_0.woff2",
167
+ format: "woff2",
168
+ }, fontWeight: 700, fontStyle: "normal" })] }), _jsx(Preview, { children: `You've received a ${durationDays}-day ${planName} subscription!` }), _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: "Gift for You" }), _jsx(Text, { style: styles.heroHeading, children: "You've Got a Gift!" }), _jsxs(Text, { style: { ...styles.paragraph, margin: "0 0 4px" }, children: ["Hi ", _jsx("span", { style: { color: colors.white, fontWeight: 600 }, children: email }), ", great news!"] }), _jsxs(Text, { style: styles.paragraph, children: ["You've been granted a promotional", " ", _jsx("span", { style: { color: colors.accent, fontWeight: 600 }, children: planName }), " subscription."] }), _jsx("div", { style: styles.highlightBox, children: _jsx("table", { width: "100%", cellPadding: 0, cellSpacing: 0, children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsxs("td", { style: { paddingBottom: "16px" }, children: [_jsx(Text, { style: styles.highlightLabel, children: "Plan" }), _jsx(Text, { style: styles.highlightValue, children: planName })] }), _jsxs("td", { style: { paddingBottom: "16px", textAlign: "right" }, children: [_jsx(Text, { style: styles.highlightLabel, children: "Duration" }), _jsxs(Text, { style: styles.highlightValue, children: [durationDays, " days"] })] })] }), _jsxs("tr", { children: [_jsxs("td", { children: [_jsx(Text, { style: styles.highlightLabel, children: "Credits Included" }), _jsx(Text, { style: styles.highlightValue, children: safeCredits.toLocaleString() })] }), _jsxs("td", { style: { textAlign: "right" }, children: [_jsx(Text, { style: styles.highlightLabel, children: "Expires" }), _jsx(Text, { style: styles.highlightValue, children: expiresAt })] })] })] }) }) }), notes && _jsxs(Text, { style: styles.notesText, children: ["\"", notes, "\""] }), _jsx("div", { style: styles.buttonContainer, children: _jsx(ReactEmailButton, { href: foodstudioConfig.appUrl, style: styles.ctaButton, children: "Open FoodStudio" }) })] }), _jsxs(Section, { style: styles.contentSection, children: [_jsx(Text, { style: styles.smallText, children: "This promotional subscription will not auto-renew. Enjoy your free access!" }), _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 you were granted a promotional subscription." }), _jsx(Text, { style: styles.footerText, children: _jsx(Link, { href: `${foodstudioConfig.appUrl}/privacy`, style: styles.footerLink, children: "Privacy Policy" }) })] })] }) })] }));
169
+ }
170
+ export default PromoSubscriptionEmail;
@@ -0,0 +1,6 @@
1
+ export interface WelcomeEmailProps {
2
+ email: string;
3
+ }
4
+ export declare function WelcomeEmail({ email }: WelcomeEmailProps): React.ReactElement;
5
+ export default WelcomeEmail;
6
+ //# sourceMappingURL=WelcomeEmail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeEmail.d.ts","sourceRoot":"","sources":["../../../src/foodstudio/templates/WelcomeEmail.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AA+ID,wBAAgB,YAAY,CAAC,EAAE,KAA0B,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAkIlG;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,155 @@
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
+ heroSubheading: {
55
+ margin: "0 0 28px",
56
+ fontSize: "16px",
57
+ lineHeight: "1.6",
58
+ color: colors.textSecondary,
59
+ },
60
+ heroCta: {
61
+ display: "inline-block",
62
+ padding: "14px 36px",
63
+ fontSize: "15px",
64
+ fontWeight: 600,
65
+ textDecoration: "none",
66
+ borderRadius: "10px",
67
+ backgroundColor: colors.primary,
68
+ color: "#ffffff",
69
+ textAlign: "center",
70
+ },
71
+ welcomeSection: {
72
+ backgroundColor: colors.cardBg,
73
+ padding: "32px",
74
+ textAlign: "center",
75
+ borderTop: `1px solid ${colors.border}`,
76
+ borderBottom: `1px solid ${colors.border}`,
77
+ },
78
+ welcomeText: {
79
+ margin: "0 0 16px",
80
+ fontSize: "16px",
81
+ lineHeight: "1.6",
82
+ color: colors.textSecondary,
83
+ },
84
+ welcomeEmail: {
85
+ color: colors.white,
86
+ fontWeight: 600,
87
+ },
88
+ supportSection: {
89
+ backgroundColor: colors.background,
90
+ padding: "32px",
91
+ textAlign: "center",
92
+ },
93
+ supportText: {
94
+ margin: "0 0 4px",
95
+ fontSize: "13px",
96
+ color: colors.textMuted,
97
+ },
98
+ supportLink: {
99
+ color: colors.primary,
100
+ textDecoration: "none",
101
+ fontWeight: 600,
102
+ },
103
+ footer: {
104
+ backgroundColor: colors.cardBg,
105
+ padding: "24px 32px",
106
+ textAlign: "center",
107
+ borderTop: `1px solid ${colors.border}`,
108
+ },
109
+ footerLogo: {
110
+ display: "block",
111
+ margin: "0 auto 12px",
112
+ opacity: 0.6,
113
+ },
114
+ footerText: {
115
+ margin: "0 0 4px",
116
+ fontSize: "11px",
117
+ color: colors.textMuted,
118
+ lineHeight: "1.6",
119
+ },
120
+ footerLink: {
121
+ color: colors.textMuted,
122
+ textDecoration: "underline",
123
+ },
124
+ downloadSection: {
125
+ backgroundColor: colors.cardBg,
126
+ padding: "24px 32px",
127
+ textAlign: "center",
128
+ borderTop: `1px solid ${colors.border}`,
129
+ },
130
+ downloadText: {
131
+ margin: "0 0 16px",
132
+ fontSize: "14px",
133
+ color: colors.white,
134
+ },
135
+ badgeContainer: {
136
+ textAlign: "center",
137
+ },
138
+ badge: {
139
+ display: "inline-block",
140
+ margin: "0 8px",
141
+ },
142
+ };
143
+ export function WelcomeEmail({ email = "user@example.com" }) {
144
+ return (_jsxs(Html, { lang: "en", children: [_jsxs(Head, { children: [_jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
145
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0.woff2",
146
+ format: "woff2",
147
+ }, fontWeight: 400, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
148
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuI6fAZ9hjp-Ek-_0.woff2",
149
+ format: "woff2",
150
+ }, fontWeight: 600, fontStyle: "normal" }), _jsx(Font, { fontFamily: "Inter", fallbackFontFamily: "Arial", webFont: {
151
+ url: "https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYAZ9hjp-Ek-_0.woff2",
152
+ format: "woff2",
153
+ }, fontWeight: 700, fontStyle: "normal" })] }), _jsx(Preview, { children: "Welcome to 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: "Welcome to FoodStudio" }), _jsx(Text, { style: styles.heroHeading, children: "Your Account is Ready!" }), _jsx(Text, { style: styles.heroSubheading, children: "We're excited to have you on board. Start exploring FoodStudio and discover all the amazing features waiting for you." }), _jsx(ReactEmailButton, { href: foodstudioConfig.appUrl, style: styles.heroCta, children: "Get Started" })] }), _jsx(Section, { style: styles.welcomeSection, children: _jsxs(Text, { style: styles.welcomeText, children: ["Hi ", _jsx("span", { style: styles.welcomeEmail, children: email }), ", your account is ready.", _jsx("br", {}), "You now have access to the complete FoodStudio platform."] }) }), _jsxs(Section, { style: styles.supportSection, children: [_jsx(Text, { style: styles.supportText, children: "Need help getting started?" }), _jsx(Text, { style: styles.supportText, children: _jsx(Link, { href: `mailto:${foodstudioConfig.supportEmail}`, style: styles.supportLink, 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 you signed up for FoodStudio." }), _jsx(Text, { style: styles.footerText, children: _jsx(Link, { href: `${foodstudioConfig.appUrl}/privacy`, style: styles.footerLink, children: "Privacy Policy" }) })] })] }) })] }));
154
+ }
155
+ export default WelcomeEmail;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./shared/index.js";
2
2
  export * as modelfy from "./modelfy/index.js";
3
+ export * as foodstudio from "./foodstudio/index.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAGlC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAGlC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAG9C,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -2,3 +2,5 @@
2
2
  export * from "./shared/index.js";
3
3
  // Modelfy emails
4
4
  export * as modelfy from "./modelfy/index.js";
5
+ // FoodStudio emails
6
+ export * as foodstudio from "./foodstudio/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brookmind-emails",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Email templates for Brookmind projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,6 +15,11 @@
15
15
  "require": "./dist/modelfy/index.js",
16
16
  "import": "./dist/modelfy/index.js",
17
17
  "types": "./dist/modelfy/index.d.ts"
18
+ },
19
+ "./foodstudio": {
20
+ "require": "./dist/foodstudio/index.js",
21
+ "import": "./dist/foodstudio/index.js",
22
+ "types": "./dist/foodstudio/index.d.ts"
18
23
  }
19
24
  },
20
25
  "scripts": {
@@ -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,71 @@
1
+ import { render } from "@react-email/render";
2
+ import { OtpEmail, type OtpEmailProps } from "./templates/OtpEmail.js";
3
+ import {
4
+ PromoSubscriptionEmail,
5
+ type PromoSubscriptionEmailProps,
6
+ } from "./templates/PromoSubscriptionEmail.js";
7
+ import { GrantCreditsEmail, type GrantCreditsEmailProps } from "./templates/GrantCreditsEmail.js";
8
+ import { WelcomeEmail, type WelcomeEmailProps } from "./templates/WelcomeEmail.js";
9
+
10
+ // Re-export types
11
+ export type { OtpEmailProps, PromoSubscriptionEmailProps, GrantCreditsEmailProps, WelcomeEmailProps };
12
+
13
+ // Re-export components for preview
14
+ export { OtpEmail, PromoSubscriptionEmail, GrantCreditsEmail, WelcomeEmail };
15
+
16
+ // Render functions
17
+ export interface RenderResult {
18
+ subject: string;
19
+ html: string;
20
+ text: string;
21
+ }
22
+
23
+ export async function renderOtpEmail(props: OtpEmailProps): Promise<RenderResult> {
24
+ const html = await render(OtpEmail(props));
25
+ const text = await render(OtpEmail(props), { plainText: true });
26
+
27
+ return {
28
+ subject: "Your FoodStudio access code",
29
+ html,
30
+ text,
31
+ };
32
+ }
33
+
34
+ export async function renderPromoSubscriptionEmail(
35
+ props: PromoSubscriptionEmailProps
36
+ ): Promise<RenderResult> {
37
+ const html = await render(PromoSubscriptionEmail(props));
38
+ const text = await render(PromoSubscriptionEmail(props), { plainText: true });
39
+
40
+ return {
41
+ subject: `You've received a ${props.durationDays}-day ${props.planName} subscription!`,
42
+ html,
43
+ text,
44
+ };
45
+ }
46
+
47
+ export async function renderGrantCreditsEmail(
48
+ props: GrantCreditsEmailProps
49
+ ): Promise<RenderResult> {
50
+ const html = await render(GrantCreditsEmail(props));
51
+ const text = await render(GrantCreditsEmail(props), { plainText: true });
52
+
53
+ return {
54
+ subject: `You've received ${(props.credits ?? 0).toLocaleString()} credits on FoodStudio!`,
55
+ html,
56
+ text,
57
+ };
58
+ }
59
+
60
+ export async function renderWelcomeEmail(
61
+ props: WelcomeEmailProps
62
+ ): Promise<RenderResult> {
63
+ const html = await render(WelcomeEmail(props));
64
+ const text = await render(WelcomeEmail(props), { plainText: true });
65
+
66
+ return {
67
+ subject: "Welcome to FoodStudio!",
68
+ html,
69
+ text,
70
+ };
71
+ }