react-email 5.3.0-canary.2 → 6.0.0-canary.0
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 +57 -2
- package/dev/CHANGELOG.md +2 -0
- package/dev/index.js +1 -5
- package/dev/package.json +1 -1
- package/dist/{index.js → cli/index.mjs} +425 -1188
- package/dist/index.cjs +39878 -0
- package/dist/index.d.cts +5114 -0
- package/dist/index.d.mts +5114 -0
- package/dist/index.mjs +39788 -0
- package/package.json +32 -14
- package/src/components/body/__snapshots__/body.spec.tsx.snap +23 -0
- package/src/components/body/body.spec.tsx +78 -0
- package/src/components/body/body.tsx +48 -0
- package/src/components/body/index.ts +1 -0
- package/src/components/body/margin-properties.ts +27 -0
- package/src/components/button/button.spec.tsx +53 -0
- package/src/components/button/button.tsx +112 -0
- package/src/components/button/index.ts +1 -0
- package/src/components/button/utils/parse-padding.ts +137 -0
- package/src/components/button/utils/px-to-pt.ts +4 -0
- package/src/components/button/utils/utils.spec.ts +153 -0
- package/src/components/code-block/code-block.tsx +134 -0
- package/src/components/code-block/index.ts +3 -0
- package/src/components/code-block/languages-available.ts +402 -0
- package/src/components/code-block/prism.ts +15618 -0
- package/src/components/code-block/themes.ts +4929 -0
- package/src/components/code-inline/code-inline.tsx +58 -0
- package/src/components/code-inline/index.ts +1 -0
- package/src/components/column/column.spec.tsx +28 -0
- package/src/components/column/column.tsx +15 -0
- package/src/components/column/index.ts +1 -0
- package/src/components/container/container.spec.tsx +33 -0
- package/src/components/container/container.tsx +29 -0
- package/src/components/container/index.ts +1 -0
- package/src/components/font/font.spec.tsx +63 -0
- package/src/components/font/font.tsx +76 -0
- package/src/components/font/index.ts +1 -0
- package/src/components/head/head.spec.tsx +34 -0
- package/src/components/head/head.tsx +15 -0
- package/src/components/head/index.ts +1 -0
- package/src/components/heading/heading.spec.tsx +32 -0
- package/src/components/heading/heading.tsx +29 -0
- package/src/components/heading/index.ts +1 -0
- package/src/components/heading/utils/as.ts +26 -0
- package/src/components/heading/utils/spaces.ts +64 -0
- package/src/components/heading/utils/utils.spec.ts +70 -0
- package/src/components/hr/hr.spec.tsx +22 -0
- package/src/components/hr/hr.tsx +20 -0
- package/src/components/hr/index.ts +1 -0
- package/src/components/html/html.spec.tsx +26 -0
- package/src/components/html/html.tsx +13 -0
- package/src/components/html/index.ts +1 -0
- package/src/components/img/img.spec.tsx +30 -0
- package/src/components/img/img.tsx +25 -0
- package/src/components/img/index.ts +1 -0
- package/src/components/index.ts +19 -0
- package/src/components/link/index.ts +1 -0
- package/src/components/link/link.spec.tsx +37 -0
- package/src/components/link/link.tsx +22 -0
- package/src/components/markdown/index.ts +1 -0
- package/src/components/markdown/markdown.spec.tsx +187 -0
- package/src/components/markdown/markdown.tsx +238 -0
- package/src/components/markdown/styles.ts +130 -0
- package/src/components/markdown/utils/parse-css-in-js-to-inline-css.ts +73 -0
- package/src/components/preview/index.ts +1 -0
- package/src/components/preview/preview.spec.tsx +49 -0
- package/src/components/preview/preview.tsx +47 -0
- package/src/components/row/index.ts +1 -0
- package/src/components/row/row.spec.tsx +28 -0
- package/src/components/row/row.tsx +31 -0
- package/src/components/section/index.ts +1 -0
- package/src/components/section/section.spec.tsx +58 -0
- package/src/components/section/section.tsx +29 -0
- package/src/components/tailwind/__snapshots__/tailwind.spec.tsx.snap +25 -0
- package/src/components/tailwind/e2e/integrations.spec.ts +44 -0
- package/src/components/tailwind/e2e/nextjs/README.md +9 -0
- package/src/components/tailwind/e2e/nextjs/emails/vercel-invite-user.tsx +151 -0
- package/src/components/tailwind/e2e/nextjs/next.config.mjs +7 -0
- package/src/components/tailwind/e2e/nextjs/package.json +25 -0
- package/src/components/tailwind/e2e/nextjs/src/app/favicon.ico +0 -0
- package/src/components/tailwind/e2e/nextjs/src/app/layout.tsx +23 -0
- package/src/components/tailwind/e2e/nextjs/src/app/page.tsx +7 -0
- package/src/components/tailwind/e2e/nextjs/tsconfig.json +27 -0
- package/src/components/tailwind/e2e/vite/README.md +9 -0
- package/src/components/tailwind/e2e/vite/emails/vercel-invite-user.tsx +151 -0
- package/src/components/tailwind/e2e/vite/index.html +13 -0
- package/src/components/tailwind/e2e/vite/package.json +26 -0
- package/src/components/tailwind/e2e/vite/public/vite.svg +1 -0
- package/src/components/tailwind/e2e/vite/src/App.tsx +10 -0
- package/src/components/tailwind/e2e/vite/src/main.tsx +9 -0
- package/src/components/tailwind/e2e/vite/src/vite-env.d.ts +1 -0
- package/src/components/tailwind/e2e/vite/tsconfig.json +25 -0
- package/src/components/tailwind/e2e/vite/tsconfig.node.json +11 -0
- package/src/components/tailwind/e2e/vite/vite.config.ts +7 -0
- package/src/components/tailwind/hooks/use-suspended-promise.ts +34 -0
- package/src/components/tailwind/hooks/use-suspensed-promise.spec.ts +263 -0
- package/src/components/tailwind/index.ts +4 -0
- package/src/components/tailwind/inline-styles.ts +21 -0
- package/src/components/tailwind/sanitize-stylesheet.ts +10 -0
- package/src/components/tailwind/tailwind.spec.tsx +941 -0
- package/src/components/tailwind/tailwind.tsx +174 -0
- package/src/components/tailwind/utils/__snapshots__/quick-safe-render-to-string.spec.tsx.snap +3 -0
- package/src/components/tailwind/utils/compatibility/escape-class-name.spec.ts +17 -0
- package/src/components/tailwind/utils/compatibility/escape-class-name.ts +18 -0
- package/src/components/tailwind/utils/compatibility/get-react-property.ts +15 -0
- package/src/components/tailwind/utils/compatibility/sanitize-class-name.spec.ts +7 -0
- package/src/components/tailwind/utils/compatibility/sanitize-class-name.ts +36 -0
- package/src/components/tailwind/utils/compatibility/unescape-class.ts +3 -0
- package/src/components/tailwind/utils/css/__snapshots__/extract-rules-matching-classes.spec.ts.snap +23 -0
- package/src/components/tailwind/utils/css/__snapshots__/remove-rule-duplicates-from-root.spec.ts.snap +3 -0
- package/src/components/tailwind/utils/css/__snapshots__/sanitize-non-inlinable-classes.spec.ts.snap +7 -0
- package/src/components/tailwind/utils/css/extract-rules-per-class.spec.ts +146 -0
- package/src/components/tailwind/utils/css/extract-rules-per-class.ts +44 -0
- package/src/components/tailwind/utils/css/get-custom-properties.ts +49 -0
- package/src/components/tailwind/utils/css/is-part-inlinable.ts +15 -0
- package/src/components/tailwind/utils/css/is-rule-inlinable.ts +15 -0
- package/src/components/tailwind/utils/css/make-inline-styles-for.spec.ts +51 -0
- package/src/components/tailwind/utils/css/make-inline-styles-for.ts +70 -0
- package/src/components/tailwind/utils/css/resolve-all-css-variables.spec.ts +280 -0
- package/src/components/tailwind/utils/css/resolve-all-css-variables.ts +199 -0
- package/src/components/tailwind/utils/css/resolve-calc-expressions.spec.ts +36 -0
- package/src/components/tailwind/utils/css/resolve-calc-expressions.ts +147 -0
- package/src/components/tailwind/utils/css/sanitize-declarations.spec.ts +397 -0
- package/src/components/tailwind/utils/css/sanitize-declarations.ts +429 -0
- package/src/components/tailwind/utils/css/sanitize-non-inlinable-rules.spec.ts +51 -0
- package/src/components/tailwind/utils/css/sanitize-non-inlinable-rules.ts +35 -0
- package/src/components/tailwind/utils/css/split-mixed-rule.ts +68 -0
- package/src/components/tailwind/utils/css/unwrap-value.ts +9 -0
- package/src/components/tailwind/utils/react/is-component.ts +36 -0
- package/src/components/tailwind/utils/react/map-react-tree.spec.tsx +58 -0
- package/src/components/tailwind/utils/react/map-react-tree.ts +58 -0
- package/src/components/tailwind/utils/tailwindcss/clone-element-with-inlined-styles.ts +61 -0
- package/src/components/tailwind/utils/tailwindcss/setup-tailwind.spec.ts +18 -0
- package/src/components/tailwind/utils/tailwindcss/setup-tailwind.ts +82 -0
- package/src/components/tailwind/utils/tailwindcss/tailwind-stylesheets/index.ts +900 -0
- package/src/components/tailwind/utils/tailwindcss/tailwind-stylesheets/preflight.ts +397 -0
- package/src/components/tailwind/utils/tailwindcss/tailwind-stylesheets/theme.ts +466 -0
- package/src/components/tailwind/utils/tailwindcss/tailwind-stylesheets/utilities.ts +5 -0
- package/src/components/tailwind/utils/text/from-dash-case-to-camel-case.ts +3 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text/text.spec.tsx +35 -0
- package/src/components/text/text.tsx +48 -0
- package/src/components/text/utils/compute-margins.spec.ts +67 -0
- package/src/components/text/utils/compute-margins.ts +102 -0
- package/src/index.ts +2 -71
- package/tsconfig.json +3 -3
- package/tsdown.config.ts +52 -6
- package/vitest.config.ts +1 -0
- package/src/actions/email-validation/__snapshots__/check-images.spec.tsx.snap +0 -84
- package/src/commands/build.ts +0 -254
- package/src/commands/dev.ts +0 -27
- package/src/commands/export.ts +0 -204
- package/src/commands/resend/reset.ts +0 -8
- package/src/commands/resend/setup.ts +0 -29
- package/src/commands/start.ts +0 -38
- package/src/utils/conf.ts +0 -9
- package/src/utils/esbuild/escape-string-for-regex.ts +0 -3
- package/src/utils/esbuild/renderring-utilities-exporter.ts +0 -63
- package/src/utils/get-emails-directory-metadata.spec.ts +0 -82
- package/src/utils/get-emails-directory-metadata.ts +0 -140
- package/src/utils/get-preview-server-location.spec.ts +0 -17
- package/src/utils/get-preview-server-location.ts +0 -128
- package/src/utils/index.ts +0 -2
- package/src/utils/packageJson.ts +0 -4
- package/src/utils/preview/get-env-variables-for-preview-app.ts +0 -16
- package/src/utils/preview/hot-reloading/create-dependency-graph.spec.ts +0 -226
- package/src/utils/preview/hot-reloading/create-dependency-graph.ts +0 -343
- package/src/utils/preview/hot-reloading/get-imported-modules.spec.ts +0 -151
- package/src/utils/preview/hot-reloading/get-imported-modules.ts +0 -49
- package/src/utils/preview/hot-reloading/resolve-path-aliases.spec.ts +0 -11
- package/src/utils/preview/hot-reloading/resolve-path-aliases.ts +0 -32
- package/src/utils/preview/hot-reloading/setup-hot-reloading.ts +0 -121
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/data-to-import.json +0 -1
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/file-a.ts +0 -5
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/file-b.ts +0 -5
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/general-importing-file.ts +0 -9
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/outer-dependency.ts +0 -3
- package/src/utils/preview/hot-reloading/test/dependency-graph/inner/path-aliases.ts +0 -1
- package/src/utils/preview/hot-reloading/test/dependency-graph/outer.ts +0 -5
- package/src/utils/preview/hot-reloading/test/some-file.ts +0 -0
- package/src/utils/preview/hot-reloading/test/tsconfig.json +0 -8
- package/src/utils/preview/index.ts +0 -2
- package/src/utils/preview/serve-static-file.ts +0 -51
- package/src/utils/preview/start-dev-server.ts +0 -236
- package/src/utils/register-spinner-autostopping.ts +0 -28
- package/src/utils/style-text.ts +0 -11
- package/src/utils/tree.spec.ts +0 -32
- package/src/utils/tree.ts +0 -76
- package/src/utils/types/hot-reload-change.ts +0 -6
- package/src/utils/types/hot-reload-event.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# react-email
|
|
2
2
|
|
|
3
|
+
## 6.0.0-canary.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- d0a7a52: Move all components and utilities into the `react-email` package
|
|
8
|
+
|
|
9
|
+
All components (previously in `@react-email/components` or individual packages like `@react-email/button`) and rendering utilities (previously in `@react-email/render`) are now exported directly from `react-email`. This unifies the install and import experience into a single package.
|
|
10
|
+
|
|
11
|
+
We're going to deprecate all packages except `@react-email/render` and `@react-email/preview-server`, and they will not be updated anymore.
|
|
12
|
+
|
|
13
|
+
### Breaking change
|
|
14
|
+
|
|
15
|
+
Imports from `@react-email/components`, `@react-email/render`, or individual component packages (e.g. `@react-email/button`) are no longer the recommended path and they will all be deprecated with the exception of `@react-email/render` and `@react-email/editor`, and `render` will remain exported from `react-email`. Consumers should import everything from `react-email`.
|
|
16
|
+
|
|
17
|
+
### Why
|
|
18
|
+
|
|
19
|
+
Having separate packages for components (`@react-email/components`), and the CLI (`react-email`) created unnecessary confusion, and a maintenance burden for us.
|
|
20
|
+
|
|
21
|
+
### How to migrate
|
|
22
|
+
1. **Update your dependencies** -- remove `@react-email/components`, keep `react-email`:
|
|
23
|
+
|
|
24
|
+
```diff
|
|
25
|
+
- npm install @react-email/components react-email @react-email/preview-server
|
|
26
|
+
+ npm install react-email @react-email/preview-server
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Update your imports**:
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
- import { Button, Html, Head, render } from "@react-email/components";
|
|
33
|
+
+ import { Button, Html, Head, render } from "react-email";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
3. The `@react-email/preview-server` and `@react-email/editor` packages are not included in `react-email`
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- a3a15ea: replace deprecated `url.parse()` with WHATWG URL API in the preview dev server.
|
|
41
|
+
|
|
42
|
+
## 5.2.10
|
|
43
|
+
|
|
44
|
+
## 5.2.9
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- 79bb7cc: manually determine esbuild binary path to avoid forcing a host version
|
|
49
|
+
|
|
50
|
+
## 5.2.8
|
|
51
|
+
|
|
52
|
+
## 5.2.7
|
|
53
|
+
|
|
54
|
+
## 5.2.6
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- 11f56c5: fix RESEND_API_KEY being overwritten in email preview
|
|
59
|
+
|
|
3
60
|
## 5.3.0-canary.2
|
|
4
61
|
|
|
5
62
|
### Patch Changes
|
|
@@ -555,7 +612,6 @@
|
|
|
555
612
|
## Why
|
|
556
613
|
|
|
557
614
|
Three reasons:
|
|
558
|
-
|
|
559
615
|
1. Better support of NextJS's latest versions
|
|
560
616
|
2. Being ready for future React API deprecations
|
|
561
617
|
3. Support for Suspense which allows for using async inside components
|
|
@@ -588,7 +644,6 @@
|
|
|
588
644
|
## Why
|
|
589
645
|
|
|
590
646
|
Three reasons:
|
|
591
|
-
|
|
592
647
|
1. Better support of NextJS's latest versions
|
|
593
648
|
2. Being ready for future React API deprecations
|
|
594
649
|
3. Support for Suspense which allows for using async inside components
|
package/dev/CHANGELOG.md
CHANGED
package/dev/index.js
CHANGED
|
@@ -6,17 +6,13 @@ import { join } from 'shlex';
|
|
|
6
6
|
const filename = url.fileURLToPath(import.meta.url);
|
|
7
7
|
const dirname = path.dirname(filename);
|
|
8
8
|
|
|
9
|
-
const root = path.resolve(dirname, '../src/index.ts');
|
|
9
|
+
const root = path.resolve(dirname, '../src/cli/index.ts');
|
|
10
10
|
|
|
11
11
|
const tsx = child_process.spawn(
|
|
12
12
|
`pnpm tsx ${root} ${join(process.argv.slice(2))}`,
|
|
13
13
|
{
|
|
14
14
|
cwd: process.cwd(),
|
|
15
15
|
shell: true,
|
|
16
|
-
env: {
|
|
17
|
-
...process.env,
|
|
18
|
-
NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --experimental-vm-modules --disable-warning=ExperimentalWarning`,
|
|
19
|
-
},
|
|
20
16
|
stdio: 'inherit',
|
|
21
17
|
},
|
|
22
18
|
);
|