Skip to content

Commit 46eaa07

Browse files
committed
Merge branch 'canary' into feat/improved-preview-urls
2 parents 9c6d46a + addea4d commit 46eaa07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+686
-435
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,23 @@ const Email = () => {
6262

6363
A set of standard components to help you build amazing emails without having to deal with the mess of creating table-based layouts and maintaining archaic markup.
6464

65-
- [Html](https://github.com/resend/react-email/tree/main/packages/html)
65+
- [Body](https://github.com/resend/react-email/tree/main/packages/body)
66+
- [Button](https://github.com/resend/react-email/tree/main/packages/button)
67+
- [CodeBlock](https://github.com/resend/react-email/tree/main/packages/code-block)
68+
- [CodeInline](https://github.com/resend/react-email/tree/main/packages/code-inline)
69+
- [Column](https://github.com/resend/react-email/tree/main/packages/column)
70+
- [Container](https://github.com/resend/react-email/tree/main/packages/container)
71+
- [Divider](https://github.com/resend/react-email/tree/main/packages/hr)
72+
- [Font](https://github.com/resend/react-email/tree/main/packages/font)
6673
- [Head](https://github.com/resend/react-email/tree/main/packages/head)
6774
- [Heading](https://github.com/resend/react-email/tree/main/packages/heading)
68-
- [Button](https://github.com/resend/react-email/tree/main/packages/button)
69-
- [Link](https://github.com/resend/react-email/tree/main/packages/link)
75+
- [Html](https://github.com/resend/react-email/tree/main/packages/html)
7076
- [Image](https://github.com/resend/react-email/tree/main/packages/img)
71-
- [Divider](https://github.com/resend/react-email/tree/main/packages/hr)
77+
- [Link](https://github.com/resend/react-email/tree/main/packages/link)
78+
- [Markdown](https://github.com/resend/react-email/tree/main/packages/markdown)
7279
- [Paragraph](https://github.com/resend/react-email/tree/main/packages/text)
73-
- [Container](https://github.com/resend/react-email/tree/main/packages/container)
7480
- [Preview](https://github.com/resend/react-email/tree/main/packages/preview)
75-
- [Body](https://github.com/resend/react-email/tree/main/packages/body)
76-
- [Column](https://github.com/resend/react-email/tree/main/packages/column)
7781
- [Section](https://github.com/resend/react-email/tree/main/packages/section)
78-
- [Font](https://github.com/resend/react-email/tree/main/packages/font)
7982

8083
## Integrations
8184

apps/web/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"@supabase/supabase-js": "2.39.3",
1616
"@vercel/analytics": "1.0.1",
1717
"classnames": "2.3.2",
18-
"next": "13.5.3",
18+
"next": "13.5.6",
1919
"prism-react-renderer": "2.1.0",
2020
"react": "18.2.0",
2121
"react-dom": "18.2.0",
2222
"resend": "2.0.0"
2323
},
2424
"devDependencies": {
25-
"@next/eslint-plugin-next": "13.5.3",
25+
"@next/eslint-plugin-next": "13.5.6",
2626
"autoprefixer": "10.4.14",
2727
"eslint-config-custom": "workspace:*",
28-
"postcss": "8.4.31",
28+
"postcss": "8.4.35",
2929
"tailwindcss": "3.3.3",
3030
"tsconfig": "workspace:*",
3131
"typescript": "5.1.6"

examples/nodemailer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@react-email/button": "*",
2525
"@react-email/html": "*",
2626
"@react-email/render": "*",
27-
"nodemailer": "6.8.0",
27+
"nodemailer": "6.9.9",
2828
"react": "18.2.0"
2929
},
3030
"devDependencies": {

packages/body/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
"react": "18.2.0"
3535
},
3636
"devDependencies": {
37-
"@babel/core": "7.23.7",
38-
"@babel/preset-react": "7.22.5",
37+
"@babel/core": "7.23.9",
38+
"@babel/preset-react": "7.23.3",
3939
"@react-email/render": "workspace:*",
4040
"eslint-config-custom": "workspace:*",
4141
"tsconfig": "workspace:*",

packages/button/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/button/src/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from "react";
22
import { parsePadding, pxToPt } from "./utils";
33

4-
type ButtonProps = React.ComponentPropsWithoutRef<"a">;
4+
export type ButtonProps = React.ComponentPropsWithoutRef<"a">;
55

66
export const Button: React.FC<Readonly<ButtonProps>> = ({
77
children,

packages/code-block/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-email/code-block",
3-
"version": "0.0.3-canary.0",
3+
"version": "0.0.3-canary.1",
44
"description": "Display code with a selected theme and regex highlighting using Prism.js",
55
"sideEffects": false,
66
"main": "./dist/index.js",
@@ -44,7 +44,7 @@
4444
"react": "18.2.0"
4545
},
4646
"devDependencies": {
47-
"@babel/preset-react": "7.22.5",
47+
"@babel/preset-react": "7.23.3",
4848
"@react-email/render": "workspace:*",
4949
"@types/prismjs": "1.26.3",
5050
"eslint-config-custom": "workspace:*",

packages/code-block/src/code-block.tsx

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,57 @@ export type CodeBlockProps = Readonly<{
1212
code: string;
1313
}>;
1414

15+
const stylesForToken = (token: Prism.Token, theme: Theme) => {
16+
let styles = { ...theme[token.type] };
17+
18+
const aliases = Array.isArray(token.alias) ? token.alias : [token.alias];
19+
20+
for (const alias of aliases) {
21+
styles = { ...styles, ...theme[alias] };
22+
}
23+
24+
return styles;
25+
};
26+
1527
const CodeBlockLine = ({
1628
token,
1729
theme,
30+
inheritedStyles,
1831
}: {
1932
token: string | Prism.Token;
2033
theme: Theme;
34+
inheritedStyles?: React.CSSProperties;
2135
}) => {
2236
if (token instanceof Prism.Token) {
37+
const styleForToken = {
38+
...inheritedStyles,
39+
...stylesForToken(token, theme),
40+
};
41+
2342
if (token.content instanceof Prism.Token) {
2443
return (
25-
<span style={theme[token.type]}>
44+
<span style={styleForToken}>
2645
<CodeBlockLine theme={theme} token={token.content} />
2746
</span>
2847
);
2948
} else if (typeof token.content === "string") {
30-
return <span style={theme[token.type]}>{token.content}</span>;
49+
return <span style={styleForToken}>{token.content}</span>;
3150
}
3251
return (
3352
<>
3453
{token.content.map((subToken, i) => (
35-
<CodeBlockLine key={i} theme={theme} token={subToken} />
54+
<CodeBlockLine
55+
inheritedStyles={styleForToken}
56+
key={i}
57+
theme={theme}
58+
token={subToken}
59+
/>
3660
))}
3761
</>
3862
);
3963
}
4064

41-
return <>{token}</>;
65+
return <span style={inheritedStyles}>{token}</span>;
4266
};
4367

4468
/**

packages/code-inline/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"react": "18.2.0"
3838
},
3939
"devDependencies": {
40-
"@babel/preset-react": "7.22.5",
40+
"@babel/preset-react": "7.23.3",
4141
"@react-email/render": "workspace:*",
4242
"eslint-config-custom": "workspace:*",
4343
"tsconfig": "workspace:*",

packages/column/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/components/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-email/components",
3-
"version": "0.0.15-canary.0",
3+
"version": "0.0.15-canary.1",
44
"description": "A collection of all components React Email.",
55
"sideEffects": false,
66
"main": "./dist/index.js",
@@ -43,7 +43,7 @@
4343
"dependencies": {
4444
"@react-email/body": "0.0.7",
4545
"@react-email/button": "0.0.13",
46-
"@react-email/code-block": "0.0.3-canary.0",
46+
"@react-email/code-block": "0.0.3-canary.1",
4747
"@react-email/code-inline": "0.0.1",
4848
"@react-email/column": "0.0.9",
4949
"@react-email/container": "0.0.11",
@@ -54,6 +54,7 @@
5454
"@react-email/html": "0.0.7",
5555
"@react-email/img": "0.0.7",
5656
"@react-email/link": "0.0.7",
57+
"@react-email/markdown": "0.0.8",
5758
"@react-email/preview": "0.0.8",
5859
"@react-email/render": "0.0.12",
5960
"@react-email/row": "0.0.7",
@@ -65,7 +66,7 @@
6566
"react": "18.2.0"
6667
},
6768
"devDependencies": {
68-
"@babel/preset-react": "7.22.5",
69+
"@babel/preset-react": "7.23.3",
6970
"eslint-config-custom": "workspace:*",
7071
"tsconfig": "workspace:*",
7172
"typescript": "5.1.6"

packages/components/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export * from "@react-email/hr";
1111
export * from "@react-email/html";
1212
export * from "@react-email/img";
1313
export * from "@react-email/link";
14+
export * from "@react-email/markdown";
1415
export * from "@react-email/preview";
1516
export * from "@react-email/render";
1617
export * from "@react-email/row";

packages/container/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/create-email/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-email",
3-
"version": "0.0.22",
3+
"version": "0.0.23-canary.1",
44
"description": "The easiest way to get started with React Email",
55
"main": "src/index.js",
66
"type": "module",
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"name": "emails",
3-
"version": "0.0.18",
3+
"version": "0.0.19-canary.1",
44
"private": true,
5-
"workspaces": [
6-
".react-email"
7-
],
85
"scripts": {
96
"build": "email build",
107
"dev": "email dev",
118
"export": "email export"
129
},
1310
"dependencies": {
14-
"@react-email/components": "0.0.14",
15-
"react-email": "2.0.0"
11+
"@react-email/components": "0.0.15-canary.1",
12+
"react-email": "2.1.0-canary.1",
13+
"react": "18.2.0"
14+
},
15+
"devDependencies": {
16+
"@types/react": "18.2.33",
17+
"@types/react-dom": "18.2.14"
1618
}
1719
}

packages/font/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"react": "18.2.0"
3535
},
3636
"devDependencies": {
37-
"@babel/preset-react": "7.22.5",
37+
"@babel/preset-react": "7.23.3",
3838
"@react-email/render": "workspace:*",
3939
"eslint-config-custom": "workspace:*",
4040
"tsconfig": "workspace:*",

packages/head/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/heading/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"react": "18.2.0"
5050
},
5151
"devDependencies": {
52-
"@babel/preset-react": "7.22.5",
52+
"@babel/preset-react": "7.23.3",
5353
"@react-email/render": "workspace:*",
5454
"eslint-config-custom": "workspace:*",
5555
"tsconfig": "workspace:*",

packages/hr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/html/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/img/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/link/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/markdown/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"react": "18.2.0"
5151
},
5252
"devDependencies": {
53-
"@babel/preset-react": "7.22.5",
53+
"@babel/preset-react": "7.23.3",
5454
"@react-email/render": "workspace:*",
5555
"eslint-config-custom": "workspace:*",
5656
"tsconfig": "workspace:*",

packages/preview/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"react": "18.2.0"
4747
},
4848
"devDependencies": {
49-
"@babel/preset-react": "7.22.5",
49+
"@babel/preset-react": "7.23.3",
5050
"@react-email/render": "workspace:*",
5151
"eslint-config-custom": "workspace:*",
5252
"tsconfig": "workspace:*",

packages/react-email/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "react-email",
3-
"version": "2.0.0",
3+
"version": "2.1.0-canary.1",
44
"description": "A live preview of your emails right in your browser.",
55
"bin": {
66
"email": "./cli/index.js"
77
},
88
"scripts": {
99
"build": "tsup",
1010
"dev": "tsup --watch",
11+
"test": "vitest run",
1112
"clean": "rm -rf dist",
1213
"lint": "eslint . && tsc"
1314
},
@@ -53,7 +54,7 @@
5354
"next": "14.1.0",
5455
"normalize-path": "3.0.0",
5556
"ora": "5.4.1",
56-
"postcss": "8.4.32",
57+
"postcss": "8.4.35",
5758
"prism-react-renderer": "2.1.0",
5859
"react": "^18.2.0",
5960
"react-dom": "^18.2.0",
@@ -71,7 +72,7 @@
7172
"devDependencies": {
7273
"@types/fs-extra": "11.0.1",
7374
"@types/mime-types": "2.1.4",
74-
"@types/node": "20.10.4",
75+
"@types/node": "18.0.0",
7576
"@types/normalize-path": "3.0.2",
7677
"@types/shelljs": "0.8.15",
7778
"@vercel/style-guide": "5.1.0",

0 commit comments

Comments
 (0)