react-email 6.6.5 → 6.6.6

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,14 @@
1
1
  # react-email
2
2
 
3
+ ## 6.6.6
4
+
5
+ ### Patch Changes
6
+
7
+ - b4ac0d5: Fix `Button` emitting `mso-text-raise` without a unit on its Outlook padding spacer (e.g. `mso-text-raise:18`), which Outlook treats as invalid. The value now carries `px`, matching the unit React already adds on the button label.
8
+ - cb3c468: Fix `email build` so the generated preview app deploys on Vercel by tracing files from the user's project root instead of the `.react-email` subfolder.
9
+ - Updated dependencies [c300cfb]
10
+ - @react-email/render@2.0.10
11
+
3
12
  ## 6.6.5
4
13
 
5
14
  ## 6.6.4
@@ -6523,7 +6523,7 @@ const getEmailsDirectoryMetadata = async (absolutePathToEmailsDirectory, keepFil
6523
6523
  //#region package.json
6524
6524
  var package_default = {
6525
6525
  name: "react-email",
6526
- version: "6.6.5",
6526
+ version: "6.6.6",
6527
6527
  description: "A live preview of your emails right in your browser.",
6528
6528
  bin: { "email": "./dist/cli/index.mjs" },
6529
6529
  type: "module",
@@ -6562,7 +6562,7 @@ var package_default = {
6562
6562
  dependencies: {
6563
6563
  "@babel/parser": "catalog:",
6564
6564
  "@babel/traverse": "catalog:",
6565
- "@react-email/render": "workspace:>=2.0.9",
6565
+ "@react-email/render": "workspace:>=2.0.10",
6566
6566
  "chokidar": "^4.0.3",
6567
6567
  "commander": "catalog:",
6568
6568
  "conf": "^15.0.2",
@@ -6729,7 +6729,7 @@ const stopSpinnerAndPersist = (spinner, display) => {
6729
6729
  //#region src/cli/commands/build.ts
6730
6730
  const isInReactEmailMonorepo = !path.dirname(fileURLToPath(import.meta.url)).includes("node_modules");
6731
6731
  const setNextEnvironmentVariablesForBuild = async (emailsDirRelativePath, builtPreviewAppPath, usersProjectLocation) => {
6732
- let rootDir = "previewServerLocation";
6732
+ let rootDir = "userProjectLocation";
6733
6733
  if (isInReactEmailMonorepo) rootDir = `'${await getPackages(usersProjectLocation).then((p) => p.rootDir.replaceAll("\\", "/"))}'`;
6734
6734
  const nextConfigContents = `
6735
6735
  import path from 'path';
package/dist/index.cjs CHANGED
@@ -228,7 +228,7 @@ const Button = react.forwardRef(({ children, style, target = "_blank", ...props
228
228
  },
229
229
  target,
230
230
  children: [
231
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}" hidden>${"&#8202;".repeat(plSpaceCount)}</i><![endif]-->` } }),
231
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}px" hidden>${"&#8202;".repeat(plSpaceCount)}</i><![endif]-->` } }),
232
232
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
233
233
  style: {
234
234
  maxWidth: "100%",
package/dist/index.mjs CHANGED
@@ -207,7 +207,7 @@ const Button = React$1.forwardRef(({ children, style, target = "_blank", ...prop
207
207
  },
208
208
  target,
209
209
  children: [
210
- /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}" hidden>${"&#8202;".repeat(plSpaceCount)}</i><![endif]-->` } }),
210
+ /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}px" hidden>${"&#8202;".repeat(plSpaceCount)}</i><![endif]-->` } }),
211
211
  /* @__PURE__ */ jsx("span", {
212
212
  style: {
213
213
  maxWidth: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-email",
3
- "version": "6.6.5",
3
+ "version": "6.6.6",
4
4
  "description": "A live preview of your emails right in your browser.",
5
5
  "bin": {
6
6
  "email": "./dist/cli/index.mjs"
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@babel/parser": "7.27.0",
39
39
  "@babel/traverse": "7.27.0",
40
- "@react-email/render": ">=2.0.9",
40
+ "@react-email/render": ">=2.0.10",
41
41
  "chokidar": "^4.0.3",
42
42
  "commander": "^13.0.0",
43
43
  "conf": "^15.0.2",
@@ -74,7 +74,7 @@
74
74
  "tsx": "4.21.0",
75
75
  "typescript": "5.9.3",
76
76
  "yalc": "1.0.0-pre.53",
77
- "@react-email/render": "2.0.9"
77
+ "@react-email/render": "2.0.10"
78
78
  },
79
79
  "scripts": {
80
80
  "build": "tsdown",
@@ -24,14 +24,14 @@ describe('<Button> component', () => {
24
24
  <Button href="https://example.com" style={{ padding: '12px 20px' }} />,
25
25
  );
26
26
  expect(actualOutput).toMatchInlineSnapshot(
27
- `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a href="https://example.com" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;padding:12px 20px;padding-top:12px;padding-right:20px;padding-bottom:12px;padding-left:20px" target="_blank"><span><!--[if mso]><i style="mso-font-width:500%;mso-text-raise:18" hidden>&#8202;&#8202;</i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px"></span><span><!--[if mso]><i style="mso-font-width:500%" hidden>&#8202;&#8202;&#8203;</i><![endif]--></span></a><!--/$-->"`,
27
+ `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a href="https://example.com" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;padding:12px 20px;padding-top:12px;padding-right:20px;padding-bottom:12px;padding-left:20px" target="_blank"><span><!--[if mso]><i style="mso-font-width:500%;mso-text-raise:18px" hidden>&#8202;&#8202;</i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px"></span><span><!--[if mso]><i style="mso-font-width:500%" hidden>&#8202;&#8202;&#8203;</i><![endif]--></span></a><!--/$-->"`,
28
28
  );
29
29
  });
30
30
 
31
31
  it('renders the <Button> component with no padding value', async () => {
32
32
  const actualOutput = await render(<Button href="https://example.com" />);
33
33
  expect(actualOutput).toMatchInlineSnapshot(
34
- `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a href="https://example.com" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px" target="_blank"><span><!--[if mso]><i style="mso-font-width:0%;mso-text-raise:0" hidden></i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px"></span><span><!--[if mso]><i style="mso-font-width:0%" hidden>&#8203;</i><![endif]--></span></a><!--/$-->"`,
34
+ `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a href="https://example.com" style="line-height:100%;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px" target="_blank"><span><!--[if mso]><i style="mso-font-width:0%;mso-text-raise:0px" hidden></i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px"></span><span><!--[if mso]><i style="mso-font-width:0%" hidden>&#8203;</i><![endif]--></span></a><!--/$-->"`,
35
35
  );
36
36
  });
37
37
 
@@ -47,7 +47,7 @@ describe('<Button> component', () => {
47
47
  />,
48
48
  );
49
49
  expect(actualOutput).toMatchInlineSnapshot(
50
- `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a style="line-height:150%;text-decoration:underline red;display:block;max-width:50%;mso-padding-alt:0px" target="_blank"><span><!--[if mso]><i style="mso-font-width:0%;mso-text-raise:0" hidden></i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px"></span><span><!--[if mso]><i style="mso-font-width:0%" hidden>&#8203;</i><![endif]--></span></a><!--/$-->"`,
50
+ `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a style="line-height:150%;text-decoration:underline red;display:block;max-width:50%;mso-padding-alt:0px" target="_blank"><span><!--[if mso]><i style="mso-font-width:0%;mso-text-raise:0px" hidden></i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px"></span><span><!--[if mso]><i style="mso-font-width:0%" hidden>&#8203;</i><![endif]--></span></a><!--/$-->"`,
51
51
  );
52
52
  });
53
53
  });
@@ -79,7 +79,7 @@ export const Button = React.forwardRef<HTMLAnchorElement, ButtonProps>(
79
79
  // See https://github.com/resend/react-email/issues/1512 for why we do not use letter-spacing instead.
80
80
  __html: `<!--[if mso]><i style="mso-font-width:${
81
81
  plFontWidth * 100
82
- }%;mso-text-raise:${textRaise}" hidden>${'&#8202;'.repeat(
82
+ }%;mso-text-raise:${textRaise}px" hidden>${'&#8202;'.repeat(
83
83
  plSpaceCount,
84
84
  )}</i><![endif]-->`,
85
85
  }}
@@ -24,7 +24,7 @@ describe('<Img> component', () => {
24
24
  <Img alt="Cat" height="300" src="cat.jpg" width="300" />,
25
25
  );
26
26
  expect(actualOutput).toMatchInlineSnapshot(
27
- `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><link rel="preload" as="image" href="cat.jpg"/><!--$--><img alt="Cat" height="300" src="cat.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="300"/><!--/$-->"`,
27
+ `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><img alt="Cat" height="300" src="cat.jpg" style="display:block;outline:none;border:none;text-decoration:none" width="300"/><!--/$-->"`,
28
28
  );
29
29
  });
30
30
  });
@@ -170,7 +170,7 @@ describe('Tailwind component', () => {
170
170
  );
171
171
 
172
172
  expect(actualOutput).toMatchInlineSnapshot(
173
- `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a style="line-height:1.4285714285714286;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;margin-top:2rem;border-radius:0.375rem;background-color:rgb(21,93,252);padding-right:12px;padding-left:12px;padding-bottom:8px;padding-top:8px;color:rgb(229,231,235);font-size:0.875rem" target="_blank"><span><!--[if mso]><i style="mso-font-width:300%;mso-text-raise:12" hidden>&#8202;&#8202;</i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:6px">Testing button</span><span><!--[if mso]><i style="mso-font-width:300%" hidden>&#8202;&#8202;&#8203;</i><![endif]--></span></a>Testing<!--/$-->"`,
173
+ `"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--$--><a style="line-height:1.4285714285714286;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;margin-top:2rem;border-radius:0.375rem;background-color:rgb(21,93,252);padding-right:12px;padding-left:12px;padding-bottom:8px;padding-top:8px;color:rgb(229,231,235);font-size:0.875rem" target="_blank"><span><!--[if mso]><i style="mso-font-width:300%;mso-text-raise:12px" hidden>&#8202;&#8202;</i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:6px">Testing button</span><span><!--[if mso]><i style="mso-font-width:300%" hidden>&#8202;&#8202;&#8203;</i><![endif]--></span></a>Testing<!--/$-->"`,
174
174
  );
175
175
  });
176
176