react-email 2.1.7-canary.0 → 2.1.7-canary.2
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# react-email
|
|
2
2
|
|
|
3
|
+
## 2.1.7-canary.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 349e5d5: Fixes decorators causing dependency tree babel parsing to fail
|
|
8
|
+
- 983626d: Fixes root directories being hidden when they are alone at their depth
|
|
9
|
+
|
|
10
|
+
## 2.1.7-canary.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 6f5204e: Fixes tooltip color being black for specific theming configurations
|
|
15
|
+
|
|
3
16
|
## 2.1.7-canary.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/cli/index.js
CHANGED
|
@@ -340,7 +340,7 @@ var import_commander = require("commander");
|
|
|
340
340
|
// package.json
|
|
341
341
|
var package_default = {
|
|
342
342
|
name: "react-email",
|
|
343
|
-
version: "2.1.7-canary.
|
|
343
|
+
version: "2.1.7-canary.2",
|
|
344
344
|
description: "A live preview of your emails right in your browser.",
|
|
345
345
|
bin: {
|
|
346
346
|
email: "./cli/index.js"
|
|
@@ -395,7 +395,7 @@ var package_default = {
|
|
|
395
395
|
next: "14.2.3",
|
|
396
396
|
"normalize-path": "3.0.0",
|
|
397
397
|
ora: "5.4.1",
|
|
398
|
-
postcss: "8.4.
|
|
398
|
+
postcss: "8.4.39",
|
|
399
399
|
"prism-react-renderer": "2.1.0",
|
|
400
400
|
react: "18.3.1",
|
|
401
401
|
"react-dom": "18.3.1",
|
|
@@ -587,7 +587,8 @@ var getImportedModules = function(contents) {
|
|
|
587
587
|
errorRecovery: true,
|
|
588
588
|
plugins: [
|
|
589
589
|
"jsx",
|
|
590
|
-
"typescript"
|
|
590
|
+
"typescript",
|
|
591
|
+
"decorators"
|
|
591
592
|
]
|
|
592
593
|
});
|
|
593
594
|
(0, import_core.traverse)(parsedContents, {
|
|
@@ -1907,12 +1908,12 @@ var mergeDirectoriesWithSubDirectories = function(emailsDirectoryMetadata) {
|
|
|
1907
1908
|
};
|
|
1908
1909
|
var getEmailsDirectoryMetadata = function() {
|
|
1909
1910
|
var _ref = _async_to_generator(function(absolutePathToEmailsDirectory) {
|
|
1910
|
-
var keepFileExtensions, dirents, emailFilenames, subDirectories;
|
|
1911
|
+
var keepFileExtensions, isSubDirectory, dirents, emailFilenames, subDirectories, emailsMetadata;
|
|
1911
1912
|
var _arguments = arguments;
|
|
1912
1913
|
return _ts_generator(this, function(_state) {
|
|
1913
1914
|
switch(_state.label){
|
|
1914
1915
|
case 0:
|
|
1915
|
-
keepFileExtensions = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : false;
|
|
1916
|
+
keepFileExtensions = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : false, isSubDirectory = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : false;
|
|
1916
1917
|
if (!import_node_fs5.default.existsSync(absolutePathToEmailsDirectory)) return [
|
|
1917
1918
|
2
|
|
1918
1919
|
];
|
|
@@ -1934,19 +1935,20 @@ var getEmailsDirectoryMetadata = function() {
|
|
|
1934
1935
|
Promise.all(dirents.filter(function(dirent) {
|
|
1935
1936
|
return dirent.isDirectory() && !dirent.name.startsWith("_") && dirent.name !== "static";
|
|
1936
1937
|
}).map(function(dirent) {
|
|
1937
|
-
return getEmailsDirectoryMetadata(import_node_path6.default.join(absolutePathToEmailsDirectory, dirent.name));
|
|
1938
|
+
return getEmailsDirectoryMetadata(import_node_path6.default.join(absolutePathToEmailsDirectory, dirent.name), keepFileExtensions, true);
|
|
1938
1939
|
}))
|
|
1939
1940
|
];
|
|
1940
1941
|
case 2:
|
|
1941
1942
|
subDirectories = _state.sent();
|
|
1943
|
+
emailsMetadata = {
|
|
1944
|
+
absolutePath: absolutePathToEmailsDirectory,
|
|
1945
|
+
directoryName: absolutePathToEmailsDirectory.split(import_node_path6.default.sep).pop(),
|
|
1946
|
+
emailFilenames: emailFilenames,
|
|
1947
|
+
subDirectories: subDirectories
|
|
1948
|
+
};
|
|
1942
1949
|
return [
|
|
1943
1950
|
2,
|
|
1944
|
-
mergeDirectoriesWithSubDirectories(
|
|
1945
|
-
absolutePath: absolutePathToEmailsDirectory,
|
|
1946
|
-
directoryName: absolutePathToEmailsDirectory.split(import_node_path6.default.sep).pop(),
|
|
1947
|
-
emailFilenames: emailFilenames,
|
|
1948
|
-
subDirectories: subDirectories
|
|
1949
|
-
})
|
|
1951
|
+
isSubDirectory ? mergeDirectoriesWithSubDirectories(emailsMetadata) : emailsMetadata
|
|
1950
1952
|
];
|
|
1951
1953
|
}
|
|
1952
1954
|
});
|
package/cli/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { program } from "commander";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "react-email",
|
|
16
|
-
version: "2.1.7-canary.
|
|
16
|
+
version: "2.1.7-canary.2",
|
|
17
17
|
description: "A live preview of your emails right in your browser.",
|
|
18
18
|
bin: {
|
|
19
19
|
email: "./cli/index.js"
|
|
@@ -68,7 +68,7 @@ var package_default = {
|
|
|
68
68
|
next: "14.2.3",
|
|
69
69
|
"normalize-path": "3.0.0",
|
|
70
70
|
ora: "5.4.1",
|
|
71
|
-
postcss: "8.4.
|
|
71
|
+
postcss: "8.4.39",
|
|
72
72
|
"prism-react-renderer": "2.1.0",
|
|
73
73
|
react: "18.3.1",
|
|
74
74
|
"react-dom": "18.3.1",
|
|
@@ -175,7 +175,7 @@ var getImportedModules = (contents) => {
|
|
|
175
175
|
sourceType: "unambiguous",
|
|
176
176
|
strictMode: false,
|
|
177
177
|
errorRecovery: true,
|
|
178
|
-
plugins: ["jsx", "typescript"]
|
|
178
|
+
plugins: ["jsx", "typescript", "decorators"]
|
|
179
179
|
});
|
|
180
180
|
traverse(parsedContents, {
|
|
181
181
|
ImportDeclaration({ node }) {
|
|
@@ -747,7 +747,7 @@ var mergeDirectoriesWithSubDirectories = (emailsDirectoryMetadata) => {
|
|
|
747
747
|
}
|
|
748
748
|
return currentResultingMergedDirectory;
|
|
749
749
|
};
|
|
750
|
-
var getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFileExtensions = false) => {
|
|
750
|
+
var getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFileExtensions = false, isSubDirectory = false) => {
|
|
751
751
|
if (!fs5.existsSync(absolutePathToEmailsDirectory))
|
|
752
752
|
return;
|
|
753
753
|
const dirents = await fs5.promises.readdir(absolutePathToEmailsDirectory, {
|
|
@@ -763,16 +763,19 @@ var getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFileE
|
|
|
763
763
|
(dirent) => dirent.isDirectory() && !dirent.name.startsWith("_") && dirent.name !== "static"
|
|
764
764
|
).map(
|
|
765
765
|
(dirent) => getEmailsDirectoryMetadata(
|
|
766
|
-
path7.join(absolutePathToEmailsDirectory, dirent.name)
|
|
766
|
+
path7.join(absolutePathToEmailsDirectory, dirent.name),
|
|
767
|
+
keepFileExtensions,
|
|
768
|
+
true
|
|
767
769
|
)
|
|
768
770
|
)
|
|
769
771
|
);
|
|
770
|
-
|
|
772
|
+
const emailsMetadata = {
|
|
771
773
|
absolutePath: absolutePathToEmailsDirectory,
|
|
772
774
|
directoryName: absolutePathToEmailsDirectory.split(path7.sep).pop(),
|
|
773
775
|
emailFilenames,
|
|
774
776
|
subDirectories
|
|
775
|
-
}
|
|
777
|
+
};
|
|
778
|
+
return isSubDirectory ? mergeDirectoriesWithSubDirectories(emailsMetadata) : emailsMetadata;
|
|
776
779
|
};
|
|
777
780
|
|
|
778
781
|
// src/utils/esbuild/renderring-utilities-exporter.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-email",
|
|
3
|
-
"version": "2.1.7-canary.
|
|
3
|
+
"version": "2.1.7-canary.2",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"email": "./cli/index.js"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"next": "14.2.3",
|
|
48
48
|
"normalize-path": "3.0.0",
|
|
49
49
|
"ora": "5.4.1",
|
|
50
|
-
"postcss": "8.4.
|
|
50
|
+
"postcss": "8.4.39",
|
|
51
51
|
"prism-react-renderer": "2.1.0",
|
|
52
52
|
"react": "18.3.1",
|
|
53
53
|
"react-dom": "18.3.1",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"tsup": "7.2.0",
|
|
72
72
|
"tsx": "4.9.0",
|
|
73
73
|
"vitest": "1.1.3",
|
|
74
|
-
"@react-email/
|
|
75
|
-
"@react-email/
|
|
74
|
+
"@react-email/render": "0.0.18-canary.0",
|
|
75
|
+
"@react-email/components": "0.0.23-canary.2"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "tsup",
|
|
@@ -61,6 +61,7 @@ const mergeDirectoriesWithSubDirectories = (
|
|
|
61
61
|
export const getEmailsDirectoryMetadata = async (
|
|
62
62
|
absolutePathToEmailsDirectory: string,
|
|
63
63
|
keepFileExtensions = false,
|
|
64
|
+
isSubDirectory = false,
|
|
64
65
|
): Promise<EmailsDirectory | undefined> => {
|
|
65
66
|
if (!fs.existsSync(absolutePathToEmailsDirectory)) return;
|
|
66
67
|
|
|
@@ -90,14 +91,20 @@ export const getEmailsDirectoryMetadata = async (
|
|
|
90
91
|
(dirent) =>
|
|
91
92
|
getEmailsDirectoryMetadata(
|
|
92
93
|
path.join(absolutePathToEmailsDirectory, dirent.name),
|
|
94
|
+
keepFileExtensions,
|
|
95
|
+
true,
|
|
93
96
|
) as Promise<EmailsDirectory>,
|
|
94
97
|
),
|
|
95
98
|
);
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
const emailsMetadata = {
|
|
98
101
|
absolutePath: absolutePathToEmailsDirectory,
|
|
99
102
|
directoryName: absolutePathToEmailsDirectory.split(path.sep).pop()!,
|
|
100
103
|
emailFilenames,
|
|
101
104
|
subDirectories,
|
|
102
|
-
}
|
|
105
|
+
} satisfies EmailsDirectory;
|
|
106
|
+
|
|
107
|
+
return isSubDirectory
|
|
108
|
+
? mergeDirectoriesWithSubDirectories(emailsMetadata)
|
|
109
|
+
: emailsMetadata;
|
|
103
110
|
};
|
|
@@ -18,7 +18,7 @@ export const TooltipContent = React.forwardRef<
|
|
|
18
18
|
<TooltipPrimitive.Content
|
|
19
19
|
{...props}
|
|
20
20
|
className={cn(
|
|
21
|
-
'bg-black border border-slate-6 z-20 px-3 py-2 rounded-md text-xs',
|
|
21
|
+
'bg-black text-white border border-slate-6 z-20 px-3 py-2 rounded-md text-xs',
|
|
22
22
|
`${inter.variable} font-sans`,
|
|
23
23
|
)}
|
|
24
24
|
ref={forwardedRef}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`getEmailComponent() with a demo email template 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="/static/vercel-logo.png"/><link rel="preload" as="image" href="/static/vercel-user.png"/><link rel="preload" as="image" href="/static/vercel-arrow.png"/><link rel="preload" as="image" href="/static/vercel-team.png"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Join Alan on Vercel<div> </div></div><body style="background-color:rgb(255,255,255);margin-top:auto;margin-bottom:auto;margin-left:auto;margin-right:auto;font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";padding-left:0.5rem;padding-right:0.5rem"><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="
|
|
3
|
+
exports[`getEmailComponent() with a demo email template 1`] = `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><link rel="preload" as="image" href="/static/vercel-logo.png"/><link rel="preload" as="image" href="/static/vercel-user.png"/><link rel="preload" as="image" href="/static/vercel-arrow.png"/><link rel="preload" as="image" href="/static/vercel-team.png"/><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/></head><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0">Join Alan on Vercel<div> </div></div><body style="background-color:rgb(255,255,255);margin-top:auto;margin-bottom:auto;margin-left:auto;margin-right:auto;font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";padding-left:0.5rem;padding-right:0.5rem"><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="border-width:1px;border-style:solid;border-color:rgb(234,234,234);border-radius:0.25rem;margin-top:40px;margin-bottom:40px;margin-left:auto;margin-right:auto;padding:20px;max-width:465px"><tbody><tr style="width:100%"><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin-top:32px"><tbody><tr><td><img alt="Vercel" height="37" src="/static/vercel-logo.png" style="margin-top:0px;margin-bottom:0px;margin-left:auto;margin-right:auto;display:block;outline:none;border:none;text-decoration:none" width="40"/></td></tr></tbody></table><h1 style="color:rgb(0,0,0);font-size:24px;font-weight:400;text-align:center;padding:0px;margin-top:30px;margin-bottom:30px;margin-left:0px;margin-right:0px">Join <strong>Enigma</strong> on <strong>Vercel</strong></h1><p style="color:rgb(0,0,0);font-size:14px;line-height:24px;margin:16px 0">Hello <!-- -->alanturing<!-- -->,</p><p style="color:rgb(0,0,0);font-size:14px;line-height:24px;margin:16px 0"><strong>Alan</strong> (<a href="mailto:alan.turing@example.com" style="color:rgb(37,99,235);text-decoration-line:none;text-decoration:none" target="_blank">alan.turing@example.com</a>) has invited you to the <strong>Enigma</strong> team on<!-- --> <strong>Vercel</strong>.</p><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td align="right" data-id="__react-email-column"><img height="64" src="/static/vercel-user.png" style="border-radius:9999px;display:block;outline:none;border:none;text-decoration:none" width="64"/></td><td align="center" data-id="__react-email-column"><img alt="invited you to" height="9" src="/static/vercel-arrow.png" style="display:block;outline:none;border:none;text-decoration:none" width="12"/></td><td align="left" data-id="__react-email-column"><img height="64" src="/static/vercel-team.png" style="border-radius:9999px;display:block;outline:none;border:none;text-decoration:none" width="64"/></td></tr></tbody></table></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="text-align:center;margin-top:32px;margin-bottom:32px"><tbody><tr><td><a href="https://vercel.com/teams/invite/foo" style="background-color:rgb(0,0,0);border-radius:0.25rem;color:rgb(255,255,255);font-size:12px;font-weight:600;text-decoration-line:none;text-align:center;padding-left:1.25rem;padding-right:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem;line-height:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;padding:12px 20px 12px 20px" target="_blank"><span><!--[if mso]><i style="mso-font-width:500%;mso-text-raise:18" hidden>  </i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px">Join the team</span><span><!--[if mso]><i style="mso-font-width:500%" hidden>  ​</i><![endif]--></span></a></td></tr></tbody></table><p style="color:rgb(0,0,0);font-size:14px;line-height:24px;margin:16px 0">or copy and paste this URL into your browser:<!-- --> <a href="https://vercel.com/teams/invite/foo" style="color:rgb(37,99,235);text-decoration-line:none;text-decoration:none" target="_blank">https://vercel.com/teams/invite/foo</a></p><hr style="border-width:1px;border-style:solid;border-color:rgb(234,234,234);margin-top:26px;margin-bottom:26px;margin-left:0px;margin-right:0px;width:100%;border:none;border-top:1px solid #eaeaea"/><p style="color:rgb(102,102,102);font-size:12px;line-height:24px;margin:16px 0">This invitation was intended for<!-- --> <span style="color:rgb(0,0,0)">alanturing</span>. This invite was sent from <span style="color:rgb(0,0,0)">204.13.186.218</span> <!-- -->located in<!-- --> <span style="color:rgb(0,0,0)">São Paulo, Brazil</span>. If you were not expecting this invitation, you can ignore this email. If you are concerned about your account's safety, please reply to this email to get in touch with us.</p></td></tr></tbody></table></body></html>"`;
|