@react-email/preview-server 5.0.0-canary.8 → 5.0.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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/fallback-build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/preview/[...slug]/page/server-reference-manifest.json +7 -7
- package/.next/server/app/preview/[...slug]/page.js +1 -1
- package/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__18129482._.js +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__d720c507._.js → [root-of-the-server]__c94da270._.js} +3 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__d720c507._.js.map → [root-of-the-server]__c94da270._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0f2789e9._.js → [root-of-the-server]__d473ad55._.js} +2 -2
- package/.next/server/chunks/ssr/_1e7382c4._.js +1 -1
- package/.next/server/chunks/ssr/_1e7382c4._.js.map +1 -1
- package/.next/server/chunks/ssr/_1f94369d._.js +65 -0
- package/.next/server/chunks/ssr/_1f94369d._.js.map +1 -0
- package/.next/server/chunks/ssr/_38d04011._.js +1 -1
- package/.next/server/chunks/ssr/_38d04011._.js.map +1 -1
- package/.next/server/chunks/ssr/_4918e306._.js +1 -1
- package/.next/server/chunks/ssr/_4918e306._.js.map +1 -1
- package/.next/server/chunks/ssr/_79065a4e._.js +1 -1
- package/.next/server/chunks/ssr/_79065a4e._.js.map +1 -1
- package/.next/server/chunks/ssr/_d3e887f6._.js +1 -1
- package/.next/server/chunks/ssr/_d3e887f6._.js.map +1 -1
- package/.next/server/chunks/ssr/packages_preview-server_src_f0998b31._.js +1 -1
- package/.next/server/chunks/ssr/packages_preview-server_src_f0998b31._.js.map +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +8 -8
- package/.next/static/chunks/0b113982472e3e1b.js +1 -0
- package/.next/static/chunks/{8ce29851cb58a52a.js → 45b1225b2717626c.js} +1 -1
- package/.next/static/chunks/{f5ff5c112f33b111.js → 6e2fa401bc616db8.js} +1 -1
- package/.next/static/chunks/daa3196100e7d340.css +3 -0
- package/.next/static/chunks/{1d92333769998bd1.js → fca0e5e80bb0405b.js} +1 -1
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/CHANGELOG.md +51 -0
- package/package.json +3 -3
- package/src/app/preview/[...slug]/preview.tsx +5 -4
- package/src/components/button.tsx +1 -1
- package/src/components/icons/icon-moon.tsx +5 -2
- package/src/components/icons/icon-sun.tsx +63 -2
- package/src/components/toolbar.tsx +2 -2
- package/src/components/topbar/active-view-toggle-group.tsx +3 -3
- package/src/components/topbar/emulated-dark-mode-toggle.tsx +24 -2
- package/src/components/topbar/view-size-controls.tsx +1 -3
- package/.next/server/chunks/ssr/node_modules__pnpm_2fa1fe8f._.js +0 -65
- package/.next/server/chunks/ssr/node_modules__pnpm_2fa1fe8f._.js.map +0 -1
- package/.next/static/chunks/2e3bb8dc1fdb6193.css +0 -3
- package/.next/static/chunks/53569ee8c1ffd28c.js +0 -1
- /package/.next/server/chunks/ssr/{[root-of-the-server]__0f2789e9._.js.map → [root-of-the-server]__d473ad55._.js.map} +0 -0
- /package/.next/static/{r7_8ybl_LZyJsI81XC8pI → wK2_Oz3JEpImYMZG6pJ_C}/_buildManifest.js +0 -0
- /package/.next/static/{r7_8ybl_LZyJsI81XC8pI → wK2_Oz3JEpImYMZG6pJ_C}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{r7_8ybl_LZyJsI81XC8pI → wK2_Oz3JEpImYMZG6pJ_C}/_ssgManifest.js +0 -0
package/.next/trace
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":124,"timestamp":62539648,"id":4,"parentId":1,"tags":{},"startTime":1762516954526,"traceId":"3d5c6166a4113d0b"},{"name":"load-custom-routes","duration":157,"timestamp":62539824,"id":5,"parentId":1,"tags":{},"startTime":1762516954526,"traceId":"3d5c6166a4113d0b"},{"name":"create-dist-dir","duration":220,"timestamp":62540019,"id":6,"parentId":1,"tags":{},"startTime":1762516954527,"traceId":"3d5c6166a4113d0b"},{"name":"clean","duration":116,"timestamp":62540838,"id":7,"parentId":1,"tags":{},"startTime":1762516954527,"traceId":"3d5c6166a4113d0b"},{"name":"create-pages-mapping","duration":106,"timestamp":62567222,"id":8,"parentId":1,"tags":{},"startTime":1762516954554,"traceId":"3d5c6166a4113d0b"},{"name":"collect-app-files","duration":1412,"timestamp":62567349,"id":9,"parentId":1,"tags":{},"startTime":1762516954554,"traceId":"3d5c6166a4113d0b"},{"name":"create-app-mapping","duration":796,"timestamp":62568775,"id":10,"parentId":1,"tags":{},"startTime":1762516954555,"traceId":"3d5c6166a4113d0b"},{"name":"create-app-layouts","duration":66,"timestamp":62569586,"id":11,"parentId":1,"tags":{},"startTime":1762516954556,"traceId":"3d5c6166a4113d0b"},{"name":"collect-default-files","duration":272,"timestamp":62570146,"id":13,"parentId":1,"tags":{},"startTime":1762516954557,"traceId":"3d5c6166a4113d0b"},{"name":"generate-route-types","duration":6839,"timestamp":62569870,"id":12,"parentId":1,"tags":{},"startTime":1762516954556,"traceId":"3d5c6166a4113d0b"},{"name":"public-dir-conflict-check","duration":45,"timestamp":62576751,"id":14,"parentId":1,"tags":{},"startTime":1762516954563,"traceId":"3d5c6166a4113d0b"},{"name":"generate-routes-manifest","duration":991,"timestamp":62576830,"id":15,"parentId":1,"tags":{},"startTime":1762516954563,"traceId":"3d5c6166a4113d0b"},{"name":"run-turbopack","duration":5520702,"timestamp":62579585,"id":17,"parentId":1,"tags":{},"startTime":1762516954566,"traceId":"3d5c6166a4113d0b"},{"name":"run-typescript","duration":4406823,"timestamp":68121246,"id":19,"parentId":1,"tags":{},"startTime":1762516960108,"traceId":"3d5c6166a4113d0b"},{"name":"check-static-error-page","duration":1268,"timestamp":72579882,"id":22,"parentId":21,"tags":{},"startTime":1762516964566,"traceId":"3d5c6166a4113d0b"},{"name":"is-page-static","duration":114250,"timestamp":72585086,"id":30,"parentId":24,"tags":{},"startTime":1762516964572,"traceId":"3d5c6166a4113d0b"},{"name":"check-page","duration":118518,"timestamp":72580894,"id":24,"parentId":21,"tags":{"page":"/_global-error"},"startTime":1762516964567,"traceId":"3d5c6166a4113d0b"},{"name":"is-page-static","duration":141428,"timestamp":72585027,"id":29,"parentId":27,"tags":{},"startTime":1762516964572,"traceId":"3d5c6166a4113d0b"},{"name":"check-page","duration":145383,"timestamp":72581114,"id":27,"parentId":21,"tags":{"page":"/favicon.ico"},"startTime":1762516964568,"traceId":"3d5c6166a4113d0b"},{"name":"is-page-static","duration":149635,"timestamp":72587479,"id":31,"parentId":25,"tags":{},"startTime":1762516964574,"traceId":"3d5c6166a4113d0b"},{"name":"check-page","duration":156112,"timestamp":72581038,"id":25,"parentId":21,"tags":{"page":"/"},"startTime":1762516964568,"traceId":"3d5c6166a4113d0b"},{"name":"is-page-static","duration":165003,"timestamp":72584531,"id":28,"parentId":23,"tags":{},"startTime":1762516964571,"traceId":"3d5c6166a4113d0b"},{"name":"check-page","duration":169127,"timestamp":72580440,"id":23,"parentId":21,"tags":{"page":"/_not-found"},"startTime":1762516964567,"traceId":"3d5c6166a4113d0b"},{"name":"is-page-static","duration":497396,"timestamp":72587691,"id":32,"parentId":26,"tags":{},"startTime":1762516964574,"traceId":"3d5c6166a4113d0b"},{"name":"check-page","duration":504061,"timestamp":72581073,"id":26,"parentId":21,"tags":{"page":"/preview/[...slug]"},"startTime":1762516964568,"traceId":"3d5c6166a4113d0b"},{"name":"static-check","duration":505608,"timestamp":72579541,"id":21,"parentId":1,"tags":{},"startTime":1762516964566,"traceId":"3d5c6166a4113d0b"},{"name":"generate-required-server-files","duration":261,"timestamp":73085276,"id":34,"parentId":1,"tags":{},"startTime":1762516965072,"traceId":"3d5c6166a4113d0b"},{"name":"write-routes-manifest","duration":167,"timestamp":73085893,"id":35,"parentId":1,"tags":{},"startTime":1762516965072,"traceId":"3d5c6166a4113d0b"},{"name":"load-dotenv","duration":14,"timestamp":73090821,"id":38,"parentId":37,"tags":{},"startTime":1762516965077,"traceId":"3d5c6166a4113d0b"},{"name":"run-export-path-map","duration":191,"timestamp":73091910,"id":39,"parentId":37,"tags":{},"startTime":1762516965078,"traceId":"3d5c6166a4113d0b"},{"name":"next-export","duration":236175,"timestamp":73090320,"id":37,"parentId":1,"tags":{},"startTime":1762516965077,"traceId":"3d5c6166a4113d0b"},{"name":"move-exported-app-global-error-","duration":379,"timestamp":73327163,"id":40,"parentId":36,"tags":{},"startTime":1762516965314,"traceId":"3d5c6166a4113d0b"},{"name":"static-generation","duration":240225,"timestamp":73088212,"id":36,"parentId":1,"tags":{},"startTime":1762516965075,"traceId":"3d5c6166a4113d0b"},{"name":"write-routes-manifest","duration":152,"timestamp":73328504,"id":41,"parentId":1,"tags":{},"startTime":1762516965315,"traceId":"3d5c6166a4113d0b"},{"name":"print-tree-view","duration":906,"timestamp":73330892,"id":42,"parentId":1,"tags":{},"startTime":1762516965317,"traceId":"3d5c6166a4113d0b"},{"name":"telemetry-flush","duration":175230,"timestamp":73331804,"id":43,"parentId":1,"tags":{},"startTime":1762516965318,"traceId":"3d5c6166a4113d0b"},{"name":"next-build","duration":11080462,"timestamp":62426591,"id":1,"tags":{"buildMode":"default","version":"16.0.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1762516954413,"traceId":"3d5c6166a4113d0b"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":5520702,"timestamp":62579585,"id":17,"parentId":1,"tags":{},"startTime":1762516954566,"traceId":"3d5c6166a4113d0b"},{"name":"run-typescript","duration":4406823,"timestamp":68121246,"id":19,"parentId":1,"tags":{},"startTime":1762516960108,"traceId":"3d5c6166a4113d0b"},{"name":"static-check","duration":505608,"timestamp":72579541,"id":21,"parentId":1,"tags":{},"startTime":1762516964566,"traceId":"3d5c6166a4113d0b"},{"name":"static-generation","duration":240225,"timestamp":73088212,"id":36,"parentId":1,"tags":{},"startTime":1762516965075,"traceId":"3d5c6166a4113d0b"},{"name":"telemetry-flush","duration":175230,"timestamp":73331804,"id":43,"parentId":1,"tags":{},"startTime":1762516965318,"traceId":"3d5c6166a4113d0b"},{"name":"next-build","duration":11080462,"timestamp":62426591,"id":1,"tags":{"buildMode":"default","version":"16.0.1","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1762516954413,"traceId":"3d5c6166a4113d0b"}]
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @react-email/preview-server
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 442f5b6: only check compatibility with tailwindcss@4
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 161083a: Integrate with Templates API so users can easily turn React Email templates into actual Resend templates
|
|
12
|
+
- 95c7417: Dark mode switcher emulating email client color inversion
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- c6fa03e: improve color inversion code, don't remount iframe
|
|
17
|
+
- b6b027c: advise `npx` to run email setup command
|
|
18
|
+
- 18bc11a: fix compatibility checking not woring with inline object styles, and not working on properties such as `justifyContent`/`justify-content`
|
|
19
|
+
- e1ef323: improve reading flow for resend integration setup instructions
|
|
20
|
+
- 1b3176e: fallback to not text coloring for Node.js < 20
|
|
21
|
+
- f43f1ce: show separate timings for bundling/rendering an email template
|
|
22
|
+
- 397e98c: darken the canvas background when dark mode is enabled
|
|
23
|
+
- ef8702b: ui improvements
|
|
24
|
+
- 75d651b: reduce margins bellow buttons
|
|
25
|
+
- Updated dependencies [1e76981]
|
|
26
|
+
- Updated dependencies [442f5b6]
|
|
27
|
+
- Updated dependencies [2452b7d]
|
|
28
|
+
- @react-email/tailwind@2.0.0
|
|
29
|
+
|
|
30
|
+
## 5.0.0-canary.12
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- ef8702b: ui improvements
|
|
35
|
+
|
|
36
|
+
## 5.0.0-canary.11
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- 75d651b: reduce margins bellow buttons
|
|
41
|
+
|
|
42
|
+
## 5.0.0-canary.10
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- 397e98c: darken the canvas background when dark mode is enabled
|
|
47
|
+
|
|
48
|
+
## 5.0.0-canary.9
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- e1ef323: improve reading flow for resend integration setup instructions
|
|
53
|
+
|
|
3
54
|
## 5.0.0-canary.8
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-email/preview-server",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A live preview of your emails right in your browser.",
|
|
5
5
|
"main": "./index.mjs",
|
|
6
6
|
"dependencies": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@radix-ui/react-toggle": "1.1.10",
|
|
18
18
|
"@radix-ui/react-toggle-group": "1.1.11",
|
|
19
19
|
"@radix-ui/react-tooltip": "1.2.8",
|
|
20
|
-
"@react-email/tailwind": "2.0.0
|
|
20
|
+
"@react-email/tailwind": "2.0.0",
|
|
21
21
|
"@types/node": "22.14.1",
|
|
22
22
|
"@types/normalize-path": "3.0.2",
|
|
23
23
|
"@types/react": "19.0.10",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"autoprefixer": "10.4.21",
|
|
66
66
|
"tailwindcss": "3.4.0",
|
|
67
67
|
"typescript": "5.8.3",
|
|
68
|
-
"@react-email/components": "1.0.0
|
|
68
|
+
"@react-email/components": "1.0.0"
|
|
69
69
|
},
|
|
70
70
|
"license": "MIT",
|
|
71
71
|
"repository": {
|
|
@@ -98,6 +98,10 @@ const Preview = ({ emailTitle, className, ...props }: PreviewProps) => {
|
|
|
98
98
|
<Topbar emailTitle={emailTitle}>
|
|
99
99
|
{activeView === 'preview' ? (
|
|
100
100
|
<>
|
|
101
|
+
<EmulatedDarkModeToggle
|
|
102
|
+
enabled={isDarkModeEnabled}
|
|
103
|
+
onChange={(enabled) => handleDarkModeChange(enabled)}
|
|
104
|
+
/>
|
|
101
105
|
<ViewSizeControls
|
|
102
106
|
setViewHeight={(height) => {
|
|
103
107
|
setHeight(height);
|
|
@@ -116,10 +120,6 @@ const Preview = ({ emailTitle, className, ...props }: PreviewProps) => {
|
|
|
116
120
|
minWidth={minWidth}
|
|
117
121
|
minHeight={minHeight}
|
|
118
122
|
/>
|
|
119
|
-
<EmulatedDarkModeToggle
|
|
120
|
-
enabled={isDarkModeEnabled}
|
|
121
|
-
onChange={(enabled) => handleDarkModeChange(enabled)}
|
|
122
|
-
/>
|
|
123
123
|
</>
|
|
124
124
|
) : null}
|
|
125
125
|
<ActiveViewToggleGroup
|
|
@@ -138,6 +138,7 @@ const Preview = ({ emailTitle, className, ...props }: PreviewProps) => {
|
|
|
138
138
|
className={cn(
|
|
139
139
|
'h-[calc(100%-3.5rem-2.375rem)] will-change-[height] flex p-4 transition-[height] duration-300 relative',
|
|
140
140
|
activeView === 'preview' && 'bg-gray-200',
|
|
141
|
+
activeView === 'preview' && isDarkModeEnabled && 'bg-gray-400',
|
|
141
142
|
toolbarToggled && 'h-[calc(100%-3.5rem-13rem)]',
|
|
142
143
|
className,
|
|
143
144
|
)}
|
|
@@ -71,7 +71,7 @@ const getAppearance = (appearance: Appearance | undefined) => {
|
|
|
71
71
|
'border-white bg-white text-black transition-colors duration-200 ease-in-out',
|
|
72
72
|
'hover:bg-white/90',
|
|
73
73
|
'focus:bg-white/90 focus:outline-none focus:ring-2 focus:ring-white/20',
|
|
74
|
-
'mt-2 mb-
|
|
74
|
+
'mt-2 mb-2 aria-disabled:border-transparent aria-disabled:bg-slate-11',
|
|
75
75
|
];
|
|
76
76
|
case 'gradient':
|
|
77
77
|
return [
|
|
@@ -4,8 +4,11 @@ import { IconBase } from './icon-base';
|
|
|
4
4
|
export const IconMoon = ({ ...props }: IconProps) => (
|
|
5
5
|
<IconBase {...props}>
|
|
6
6
|
<path
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
stroke="currentColor"
|
|
8
|
+
strokeWidth="2"
|
|
9
|
+
strokeLinecap="round"
|
|
10
|
+
strokeLinejoin="round"
|
|
11
|
+
d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"
|
|
9
12
|
/>
|
|
10
13
|
</IconBase>
|
|
11
14
|
);
|
|
@@ -3,9 +3,70 @@ import { IconBase } from './icon-base';
|
|
|
3
3
|
|
|
4
4
|
export const IconSun = ({ ...props }: IconProps) => (
|
|
5
5
|
<IconBase {...props}>
|
|
6
|
+
<circle
|
|
7
|
+
cx="12"
|
|
8
|
+
cy="12"
|
|
9
|
+
r="4"
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeWidth="2"
|
|
12
|
+
strokeLinecap="round"
|
|
13
|
+
strokeLinejoin="round"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
stroke="currentColor"
|
|
17
|
+
strokeWidth="2"
|
|
18
|
+
strokeLinecap="round"
|
|
19
|
+
strokeLinejoin="round"
|
|
20
|
+
d="M12 2v2"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
stroke="currentColor"
|
|
24
|
+
strokeWidth="2"
|
|
25
|
+
strokeLinecap="round"
|
|
26
|
+
strokeLinejoin="round"
|
|
27
|
+
d="M12 20v2"
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
stroke="currentColor"
|
|
31
|
+
strokeWidth="2"
|
|
32
|
+
strokeLinecap="round"
|
|
33
|
+
strokeLinejoin="round"
|
|
34
|
+
d="m4.93 4.93 1.41 1.41"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
stroke="currentColor"
|
|
38
|
+
strokeWidth="2"
|
|
39
|
+
strokeLinecap="round"
|
|
40
|
+
strokeLinejoin="round"
|
|
41
|
+
d="m17.66 17.66 1.41 1.41"
|
|
42
|
+
/>
|
|
43
|
+
<path
|
|
44
|
+
stroke="currentColor"
|
|
45
|
+
strokeWidth="2"
|
|
46
|
+
strokeLinecap="round"
|
|
47
|
+
strokeLinejoin="round"
|
|
48
|
+
d="M2 12h2"
|
|
49
|
+
/>
|
|
50
|
+
<path
|
|
51
|
+
stroke="currentColor"
|
|
52
|
+
strokeWidth="2"
|
|
53
|
+
strokeLinecap="round"
|
|
54
|
+
strokeLinejoin="round"
|
|
55
|
+
d="M20 12h2"
|
|
56
|
+
/>
|
|
57
|
+
<path
|
|
58
|
+
stroke="currentColor"
|
|
59
|
+
strokeWidth="2"
|
|
60
|
+
strokeLinecap="round"
|
|
61
|
+
strokeLinejoin="round"
|
|
62
|
+
d="m6.34 17.66-1.41 1.41"
|
|
63
|
+
/>
|
|
6
64
|
<path
|
|
7
|
-
|
|
8
|
-
|
|
65
|
+
stroke="currentColor"
|
|
66
|
+
strokeWidth="2"
|
|
67
|
+
strokeLinecap="round"
|
|
68
|
+
strokeLinejoin="round"
|
|
69
|
+
d="m19.07 4.93-1.41 1.41"
|
|
9
70
|
/>
|
|
10
71
|
</IconBase>
|
|
11
72
|
);
|
|
@@ -293,8 +293,8 @@ const ToolbarInner = ({
|
|
|
293
293
|
Run{' '}
|
|
294
294
|
<CodeSnippet>
|
|
295
295
|
npx react-email@latest resend setup
|
|
296
|
-
</CodeSnippet>
|
|
297
|
-
on your terminal to connect your Resend account.
|
|
296
|
+
</CodeSnippet>
|
|
297
|
+
<br /> on your terminal to connect your Resend account.
|
|
298
298
|
</SuccessDescription>
|
|
299
299
|
</SuccessWrapper>
|
|
300
300
|
)}
|
|
@@ -18,7 +18,7 @@ export const ActiveViewToggleGroup = ({
|
|
|
18
18
|
return (
|
|
19
19
|
<ToggleGroup.Root
|
|
20
20
|
aria-label="View mode"
|
|
21
|
-
className="inline-block items-center bg-slate-2 border border-slate-6 rounded-md overflow-hidden h-[36px]"
|
|
21
|
+
className="lg:absolute lg:left-1/2 lg:-translate-x-1/2 inline-block items-center bg-slate-2 border border-slate-6 rounded-md overflow-hidden h-[36px]"
|
|
22
22
|
onValueChange={(value) => {
|
|
23
23
|
if (value) setActiveView(value);
|
|
24
24
|
}}
|
|
@@ -32,8 +32,8 @@ export const ActiveViewToggleGroup = ({
|
|
|
32
32
|
className={cn(
|
|
33
33
|
'w-9 flex items-center py-2 transition ease-in-out duration-200 relative hover:text-slate-12',
|
|
34
34
|
{
|
|
35
|
-
'text-slate-11': activeView !== '
|
|
36
|
-
'text-slate-12': activeView === '
|
|
35
|
+
'text-slate-11': activeView !== 'preview',
|
|
36
|
+
'text-slate-12': activeView === 'preview',
|
|
37
37
|
},
|
|
38
38
|
)}
|
|
39
39
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Toggle from '@radix-ui/react-toggle';
|
|
2
2
|
import { cn } from '../../utils';
|
|
3
3
|
import { IconMoon } from '../icons/icon-moon';
|
|
4
|
+
import { IconSun } from '../icons/icon-sun';
|
|
4
5
|
import { Tooltip } from '../tooltip';
|
|
5
6
|
|
|
6
7
|
interface EmulatedDarkModeToggleProps {
|
|
@@ -19,12 +20,33 @@ export const EmulatedDarkModeToggle = ({
|
|
|
19
20
|
value="dark"
|
|
20
21
|
className={cn(
|
|
21
22
|
'relative w-9 h-9 flex items-center justify-center border border-slate-6 text-sm rounded-lg transition duration-200 ease-in-out',
|
|
22
|
-
'text-slate-11 hover:text-slate-12 aria-pressed:
|
|
23
|
+
'text-slate-11 hover:text-slate-12 aria-pressed:bg-slate-4',
|
|
23
24
|
)}
|
|
24
25
|
pressed={enabled}
|
|
25
26
|
onPressedChange={() => onChange(!enabled)}
|
|
26
27
|
>
|
|
27
|
-
<
|
|
28
|
+
<div className="relative w-5 h-5">
|
|
29
|
+
<div
|
|
30
|
+
className={cn(
|
|
31
|
+
'absolute inset-0 flex items-center justify-center transition-all duration-300 ease-in-out',
|
|
32
|
+
enabled
|
|
33
|
+
? 'opacity-0 scale-50 rotate-90'
|
|
34
|
+
: 'opacity-100 scale-100 rotate-0',
|
|
35
|
+
)}
|
|
36
|
+
>
|
|
37
|
+
<IconMoon />
|
|
38
|
+
</div>
|
|
39
|
+
<div
|
|
40
|
+
className={cn(
|
|
41
|
+
'absolute inset-0 flex items-center justify-center transition-all duration-300 ease-in-out',
|
|
42
|
+
enabled
|
|
43
|
+
? 'opacity-100 scale-100 rotate-0'
|
|
44
|
+
: 'opacity-0 scale-50 -rotate-90',
|
|
45
|
+
)}
|
|
46
|
+
>
|
|
47
|
+
<IconSun />
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
28
50
|
</Toggle.Root>
|
|
29
51
|
</Tooltip.Trigger>
|
|
30
52
|
<Tooltip.Content>
|
|
@@ -88,9 +88,7 @@ export const ViewSizeControls = ({
|
|
|
88
88
|
className={cn(
|
|
89
89
|
'relative flex items-center justify-center w-9 transition-colors hover:text-slate-12',
|
|
90
90
|
{
|
|
91
|
-
'bg-slate-4':
|
|
92
|
-
viewWidth === preset.dimensions.width &&
|
|
93
|
-
viewHeight === preset.dimensions.height,
|
|
91
|
+
'bg-slate-4': viewWidth === preset.dimensions.width,
|
|
94
92
|
},
|
|
95
93
|
)}
|
|
96
94
|
type="button"
|