@react-email/preview-server 5.0.0-canary.0 → 5.0.0-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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +4 -4
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +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.js +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.js +112 -53
- 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/235.js +1 -1
- package/.next/server/chunks/790.js +1 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{615-071236a070fce314.js → 615-5d1c40ffc3b18ab1.js} +1 -1
- package/.next/static/chunks/app/layout-ea6f4b02162df87e.js +1 -0
- package/.next/static/chunks/app/preview/[...slug]/{page-d1b77693b46ad06d.js → page-81c8c459505f042d.js} +1 -1
- package/.next/trace +28 -28
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/actions/email-validation/caniemail-data.ts +1053 -605
- package/src/actions/email-validation/check-compatibility.ts +12 -16
- package/src/actions/render-email-by-path.tsx +1 -1
- package/src/utils/caniemail/ast/get-used-style-properties.spec.ts +107 -11
- package/src/utils/caniemail/ast/get-used-style-properties.ts +57 -20
- package/src/utils/snake-to-camel.ts +5 -0
- package/src/utils/style-text.ts +11 -0
- package/.next/server/chunks/142.js +0 -1
- package/.next/static/chunks/app/layout-8aa1adb06911a092.js +0 -1
- package/src/utils/caniemail/ast/__snapshots__/get-used-style-properties.spec.ts.snap +0 -24
- /package/.next/static/{bt2ALz5luAFuNOLQJH7lT → H4DkyxG2nQQlRZrNfmsTn}/_buildManifest.js +0 -0
- /package/.next/static/{bt2ALz5luAFuNOLQJH7lT → H4DkyxG2nQQlRZrNfmsTn}/_ssgManifest.js +0 -0
|
@@ -23,6 +23,7 @@ import { getCssPropertyWithValue } from '../../utils/caniemail/get-css-property-
|
|
|
23
23
|
import { getCssUnit } from '../../utils/caniemail/get-css-unit';
|
|
24
24
|
import { getElementAttributes } from '../../utils/caniemail/get-element-attributes';
|
|
25
25
|
import { getElementNames } from '../../utils/caniemail/get-element-names';
|
|
26
|
+
import { snakeToCamel } from '../../utils/snake-to-camel';
|
|
26
27
|
import { supportEntries } from './caniemail-data';
|
|
27
28
|
|
|
28
29
|
export interface CompatibilityCheckingResult {
|
|
@@ -279,8 +280,7 @@ export const checkCompatibility = async (
|
|
|
279
280
|
|
|
280
281
|
if (cssEntryType === 'full property') {
|
|
281
282
|
if (
|
|
282
|
-
|
|
283
|
-
snakeToCamel(entryFullProperty!.name) &&
|
|
283
|
+
property.name === snakeToCamel(entryFullProperty!.name) &&
|
|
284
284
|
property.value === entryFullProperty!.value
|
|
285
285
|
) {
|
|
286
286
|
addToInsights(property);
|
|
@@ -306,14 +306,16 @@ export const checkCompatibility = async (
|
|
|
306
306
|
break;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
} else if (
|
|
310
|
-
|
|
311
|
-
(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
309
|
+
} else if (cssEntryType === 'property name') {
|
|
310
|
+
if (
|
|
311
|
+
entryProperties.some(
|
|
312
|
+
(propertyName) =>
|
|
313
|
+
snakeToCamel(propertyName) === property.name,
|
|
314
|
+
)
|
|
315
|
+
) {
|
|
316
|
+
addToInsights(property);
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
317
319
|
}
|
|
318
320
|
}
|
|
319
321
|
}
|
|
@@ -325,10 +327,4 @@ export const checkCompatibility = async (
|
|
|
325
327
|
return readableStream;
|
|
326
328
|
};
|
|
327
329
|
|
|
328
|
-
const snakeToCamel = (snakeStr: string) => {
|
|
329
|
-
return snakeStr
|
|
330
|
-
.toLowerCase()
|
|
331
|
-
.replace(/-+([a-z])/g, (_match, letter) => letter.toUpperCase());
|
|
332
|
-
};
|
|
333
|
-
|
|
334
330
|
export type AST = ReturnType<typeof parse>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from 'node:fs';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
-
import { styleText } from 'node:util';
|
|
6
5
|
import logSymbols from 'log-symbols';
|
|
7
6
|
import ora, { type Ora } from 'ora';
|
|
8
7
|
import {
|
|
@@ -15,6 +14,7 @@ import { convertStackWithSourceMap } from '../utils/convert-stack-with-sourcemap
|
|
|
15
14
|
import { createJsxRuntime } from '../utils/create-jsx-runtime';
|
|
16
15
|
import { getEmailComponent } from '../utils/get-email-component';
|
|
17
16
|
import { registerSpinnerAutostopping } from '../utils/register-spinner-autostopping';
|
|
17
|
+
import { styleText } from '../utils/style-text';
|
|
18
18
|
import type { ErrorObject } from '../utils/types/error-object';
|
|
19
19
|
|
|
20
20
|
export interface RenderedEmailMetadata {
|
|
@@ -2,22 +2,118 @@ import { parse } from '@babel/parser';
|
|
|
2
2
|
import { getObjectVariables } from './get-object-variables';
|
|
3
3
|
import { getUsedStyleProperties } from './get-used-style-properties';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
describe('getUsedStyleProperties()', async () => {
|
|
6
|
+
it('handles styles defined as an object in another variable', async () => {
|
|
7
|
+
const reactCode = `
|
|
7
8
|
<Button style={buttonStyle}>Click me</Button>
|
|
8
9
|
|
|
9
10
|
const buttonStyle = {
|
|
10
11
|
borderRadius: '5px',
|
|
11
12
|
};
|
|
12
13
|
`;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const ast = parse(reactCode, {
|
|
15
|
+
strictMode: false,
|
|
16
|
+
errorRecovery: true,
|
|
17
|
+
sourceType: 'unambiguous',
|
|
18
|
+
plugins: ['jsx', 'typescript', 'decorators'],
|
|
19
|
+
});
|
|
20
|
+
const objectVariables = getObjectVariables(ast);
|
|
21
|
+
expect(
|
|
22
|
+
await getUsedStyleProperties(ast, reactCode, '', objectVariables),
|
|
23
|
+
).toMatchInlineSnapshot(`
|
|
24
|
+
[
|
|
25
|
+
{
|
|
26
|
+
"location": SourceLocation {
|
|
27
|
+
"end": Position {
|
|
28
|
+
"column": 21,
|
|
29
|
+
"index": 91,
|
|
30
|
+
"line": 5,
|
|
31
|
+
},
|
|
32
|
+
"filename": undefined,
|
|
33
|
+
"identifierName": undefined,
|
|
34
|
+
"start": Position {
|
|
35
|
+
"column": 2,
|
|
36
|
+
"index": 72,
|
|
37
|
+
"line": 5,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
"name": "borderRadius",
|
|
41
|
+
"value": "5px",
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
`);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('handles styles defined inline in the attribute', async () => {
|
|
48
|
+
const reactCode = `
|
|
49
|
+
<Button style={{ borderRadius: '5px', "color": "#fff", padding: 10 }}>Click me</Button>
|
|
50
|
+
`;
|
|
51
|
+
const ast = parse(reactCode, {
|
|
52
|
+
strictMode: false,
|
|
53
|
+
errorRecovery: true,
|
|
54
|
+
sourceType: 'unambiguous',
|
|
55
|
+
plugins: ['jsx', 'typescript', 'decorators'],
|
|
56
|
+
});
|
|
57
|
+
const objectVariables = getObjectVariables(ast);
|
|
58
|
+
expect(
|
|
59
|
+
await getUsedStyleProperties(ast, reactCode, '', objectVariables),
|
|
60
|
+
).toMatchInlineSnapshot(`
|
|
61
|
+
[
|
|
62
|
+
{
|
|
63
|
+
"location": SourceLocation {
|
|
64
|
+
"end": Position {
|
|
65
|
+
"column": 36,
|
|
66
|
+
"index": 37,
|
|
67
|
+
"line": 2,
|
|
68
|
+
},
|
|
69
|
+
"filename": undefined,
|
|
70
|
+
"identifierName": undefined,
|
|
71
|
+
"start": Position {
|
|
72
|
+
"column": 17,
|
|
73
|
+
"index": 18,
|
|
74
|
+
"line": 2,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
"name": "borderRadius",
|
|
78
|
+
"value": "5px",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"location": SourceLocation {
|
|
82
|
+
"end": Position {
|
|
83
|
+
"column": 53,
|
|
84
|
+
"index": 54,
|
|
85
|
+
"line": 2,
|
|
86
|
+
},
|
|
87
|
+
"filename": undefined,
|
|
88
|
+
"identifierName": undefined,
|
|
89
|
+
"start": Position {
|
|
90
|
+
"column": 38,
|
|
91
|
+
"index": 39,
|
|
92
|
+
"line": 2,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
"name": "color",
|
|
96
|
+
"value": "#fff",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"location": SourceLocation {
|
|
100
|
+
"end": Position {
|
|
101
|
+
"column": 66,
|
|
102
|
+
"index": 67,
|
|
103
|
+
"line": 2,
|
|
104
|
+
},
|
|
105
|
+
"filename": undefined,
|
|
106
|
+
"identifierName": undefined,
|
|
107
|
+
"start": Position {
|
|
108
|
+
"column": 55,
|
|
109
|
+
"index": 56,
|
|
110
|
+
"line": 2,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
"name": "padding",
|
|
114
|
+
"value": "10",
|
|
115
|
+
},
|
|
116
|
+
]
|
|
117
|
+
`);
|
|
18
118
|
});
|
|
19
|
-
const objectVariables = getObjectVariables(ast);
|
|
20
|
-
expect(
|
|
21
|
-
await getUsedStyleProperties(ast, reactCode, '', objectVariables),
|
|
22
|
-
).toMatchSnapshot();
|
|
23
119
|
});
|
|
@@ -55,13 +55,9 @@ export const getUsedStyleProperties = async (
|
|
|
55
55
|
for (const [className, nodePath] of pathClassNameMap.entries()) {
|
|
56
56
|
const styles = inlineStyles(styleSheet, className.split(/\s+/));
|
|
57
57
|
for (const [name, value] of Object.entries(styles)) {
|
|
58
|
-
const snakeCasedName = name.replaceAll(
|
|
59
|
-
/[A-Z]/g,
|
|
60
|
-
(capitalLetter) => `-${capitalLetter}`,
|
|
61
|
-
);
|
|
62
58
|
styleProperties.push({
|
|
63
59
|
location: nodePath.node.loc,
|
|
64
|
-
name
|
|
60
|
+
name,
|
|
65
61
|
value,
|
|
66
62
|
});
|
|
67
63
|
}
|
|
@@ -72,24 +68,65 @@ export const getUsedStyleProperties = async (
|
|
|
72
68
|
JSXAttribute(path) {
|
|
73
69
|
if (
|
|
74
70
|
path.node.value?.type === 'JSXExpressionContainer' &&
|
|
75
|
-
path.node.value.expression.type === 'Identifier' &&
|
|
76
71
|
path.node.name.name === 'style'
|
|
77
72
|
) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
if (path.node.value.expression.type === 'Identifier') {
|
|
74
|
+
const styleVariable =
|
|
75
|
+
objectVariables[path.node.value.expression.name];
|
|
76
|
+
if (styleVariable) {
|
|
77
|
+
for (const property of styleVariable) {
|
|
78
|
+
if (
|
|
79
|
+
(property.key.type === 'StringLiteral' ||
|
|
80
|
+
property.key.type === 'Identifier') &&
|
|
81
|
+
property.value.type === 'StringLiteral'
|
|
82
|
+
) {
|
|
83
|
+
const propertyName =
|
|
84
|
+
property.key.type === 'StringLiteral'
|
|
85
|
+
? property.key.value
|
|
86
|
+
: property.key.name;
|
|
87
|
+
styleProperties.push({
|
|
88
|
+
name: propertyName,
|
|
89
|
+
value: property.value.value,
|
|
90
|
+
location: property.loc,
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
} else if (path.node.value.expression.type === 'ObjectExpression') {
|
|
96
|
+
for (const property of path.node.value.expression.properties) {
|
|
97
|
+
if (property.type === 'ObjectProperty') {
|
|
98
|
+
if (property.computed) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const name = (() => {
|
|
103
|
+
if (property.key.type === 'StringLiteral') {
|
|
104
|
+
return property.key.value;
|
|
105
|
+
}
|
|
106
|
+
if (property.key.type === 'Identifier') {
|
|
107
|
+
return property.key.name;
|
|
108
|
+
}
|
|
109
|
+
})();
|
|
110
|
+
|
|
111
|
+
if (name === undefined) {
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const value = (() => {
|
|
116
|
+
if (property.value.type === 'StringLiteral') {
|
|
117
|
+
return property.value.value;
|
|
118
|
+
}
|
|
119
|
+
if (property.value.type === 'NumericLiteral') {
|
|
120
|
+
return property.value.value.toString();
|
|
121
|
+
}
|
|
122
|
+
})();
|
|
123
|
+
if (value === undefined) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
|
|
90
127
|
styleProperties.push({
|
|
91
|
-
name
|
|
92
|
-
value
|
|
128
|
+
name,
|
|
129
|
+
value,
|
|
93
130
|
location: property.loc,
|
|
94
131
|
});
|
|
95
132
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized fallback for Node versions (<20.12.0) without util.styleText.
|
|
3
|
+
* Returns the original text when styleText is unavailable.
|
|
4
|
+
*/
|
|
5
|
+
import * as nodeUtil from 'node:util';
|
|
6
|
+
|
|
7
|
+
type StyleTextFunction = (style: string, text: string) => string;
|
|
8
|
+
|
|
9
|
+
export const styleText: StyleTextFunction = (nodeUtil as any).styleText
|
|
10
|
+
? (nodeUtil as any).styleText
|
|
11
|
+
: (_: string, text: string) => text;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.id=142,exports.ids=[142],exports.modules={8332:(a,b,c)=>{"use strict";c.r(b),c.d(b,{getEmailsDirectoryMetadata:()=>i});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f);let h=async a=>{let b;try{b=await e().promises.open(a,"r")}catch(a){return console.warn(a),!1}if((await b.stat()).isDirectory())return await b.close(),!1;let{ext:c}=g().parse(a);if(![".js",".tsx",".jsx"].includes(c))return await b.close(),!1;let d=await b.readFile("utf8");await b.close();let f=/\bexport\s+default\b/gm.test(d),h=/\bmodule\.exports\s*=/gm.test(d),i=/\bexport\s+\{[^}]*\bdefault\b[^}]*\}/gm.test(d);return f||h||i},i=async(a,b=!1,c=!1,d=a)=>{if(!e().existsSync(a))return;let f=await e().promises.readdir(a,{withFileTypes:!0}),j=await Promise.all(f.map(b=>h(g().join(a,b.name)))),k=f.filter((a,b)=>j[b]).map(a=>b?a.name:a.name.replace(g().extname(a.name),"")),l=await Promise.all(f.filter(a=>a.isDirectory()&&!a.name.startsWith("_")&&"static"!==a.name).map(c=>i(g().join(a,c.name),b,!0,d))),m={absolutePath:a,relativePath:g().relative(d,a),directoryName:a.split(g().sep).pop(),emailFilenames:k,subDirectories:l};return c?(a=>{let b=a;for(;0===b.emailFilenames.length&&1===b.subDirectories.length;){let a=b.subDirectories[0];b={...a,directoryName:g().join(b.directoryName,a.directoryName)}}return b})(m):m}},25880:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,36100,23)),Promise.resolve().then(c.t.bind(c,99455,23)),Promise.resolve().then(c.t.bind(c,26835,23)),Promise.resolve().then(c.t.bind(c,36726,23)),Promise.resolve().then(c.t.bind(c,33666,23)),Promise.resolve().then(c.t.bind(c,23670,23)),Promise.resolve().then(c.t.bind(c,30006,23)),Promise.resolve().then(c.t.bind(c,41971,23)),Promise.resolve().then(c.t.bind(c,40614,23))},27378:(a,b,c)=>{Promise.resolve().then(c.bind(c,90948))},31810:(a,b,c)=>{"use strict";c.d(b,{EmailsProvider:()=>l,J:()=>k});var d=c(6362),e=c(2179),f=c(14298);let g=(0,f.createServerReference)("7f315bd3dd8795417fdf925fe79dda65942de93ca0",f.callServer,void 0,f.findSourceMapURL,"getEmailsDirectoryMetadataAction");var h=c(70985),i=c(39520);let j=(0,e.createContext)(void 0),k=()=>{let a=(0,e.useContext)(j);if(void 0===a)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return a},l=a=>{let[b,c]=(0,e.useState)(a.initialEmailsDirectoryMetadata);return h.Hf||h.m4||(0,i.a)(async()=>{let b=await g(a.initialEmailsDirectoryMetadata.absolutePath);if(b)c(b);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,d.jsx)(j.Provider,{value:{emailsDirectoryMetadata:b},children:a.children})}},35191:()=>{},35608:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,5058,23)),Promise.resolve().then(c.t.bind(c,35621,23)),Promise.resolve().then(c.t.bind(c,44325,23)),Promise.resolve().then(c.t.bind(c,20908,23)),Promise.resolve().then(c.t.bind(c,83572,23)),Promise.resolve().then(c.t.bind(c,25928,23)),Promise.resolve().then(c.t.bind(c,57920,23)),Promise.resolve().then(c.t.bind(c,2761,23)),Promise.resolve().then(c.bind(c,98400))},39520:(a,b,c)=>{"use strict";c.d(b,{a:()=>f});var d=c(2179),e=c(80095);let f=a=>{let b=(0,d.useRef)(null);(0,d.useEffect)(()=>{b.current||(b.current=(0,e.io)());let c=b.current;return c.on("reload",b=>{console.debug("Reloading..."),a(b)}),()=>{c.off()}},[a])}},50938:(a,b,c)=>{Promise.resolve().then(c.bind(c,31810))},54208:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>n,dynamic:()=>m,metadata:()=>l});var d=c(51064);c(35191);var e=c(90948),f=c(8332),g=c(88155),h=c(84858),i=c.n(h),j=c(54629),k=c.n(j);let l={title:"React Email"},m="force-dynamic";async function n({children:a}){let b=await (0,f.getEmailsDirectoryMetadata)(g.Z8);if(void 0===b)throw Error(`Could not find the emails directory specified under ${g.Z8}!`);return(0,d.jsx)("html",{className:`${i().variable} ${k().variable} font-sans`,lang:"en",children:(0,d.jsx)("body",{className:"relative h-screen bg-black text-slate-11 leading-loose selection:bg-cyan-5 selection:text-cyan-12",children:(0,d.jsx)("div",{className:"bg-gradient-to-t from-slate-3 flex flex-col",children:(0,d.jsx)(e.EmailsProvider,{initialEmailsDirectoryMetadata:b,children:a})})})})}},70985:(a,b,c)=>{"use strict";c.d(b,{Hf:()=>d,m4:()=>e}),process.env.USER_PROJECT_LOCATION,process.env.PREVIEW_SERVER_LOCATION,process.env.EMAILS_DIR_ABSOLUTE_PATH;let d="true"===process.env.NEXT_PUBLIC_IS_BUILDING,e="true"===process.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT},71941:(a,b,c)=>{"use strict";c.r(b),c.d(b,{"7f315bd3dd8795417fdf925fe79dda65942de93ca0":()=>l});var d=c(90466);c(69300);var e=c(73024),f=c.n(e),g=c(76760),h=c.n(g);let i=async a=>{let b;try{b=await f().promises.open(a,"r")}catch(a){return console.warn(a),!1}if((await b.stat()).isDirectory())return await b.close(),!1;let{ext:c}=h().parse(a);if(![".js",".tsx",".jsx"].includes(c))return await b.close(),!1;let d=await b.readFile("utf8");await b.close();let e=/\bexport\s+default\b/gm.test(d),g=/\bmodule\.exports\s*=/gm.test(d),i=/\bexport\s+\{[^}]*\bdefault\b[^}]*\}/gm.test(d);return e||g||i},j=async(a,b=!1,c=!1,d=a)=>{if(!f().existsSync(a))return;let e=await f().promises.readdir(a,{withFileTypes:!0}),g=await Promise.all(e.map(b=>i(h().join(a,b.name)))),k=e.filter((a,b)=>g[b]).map(a=>b?a.name:a.name.replace(h().extname(a.name),"")),l=await Promise.all(e.filter(a=>a.isDirectory()&&!a.name.startsWith("_")&&"static"!==a.name).map(c=>j(h().join(a,c.name),b,!0,d))),m={absolutePath:a,relativePath:h().relative(d,a),directoryName:a.split(h().sep).pop(),emailFilenames:k,subDirectories:l};return c?(a=>{let b=a;for(;0===b.emailFilenames.length&&1===b.subDirectories.length;){let a=b.subDirectories[0];b={...a,directoryName:h().join(b.directoryName,a.directoryName)}}return b})(m):m};var k=c(18012);let l=async(a,b=!1,c=!1,d=a)=>j(a,b,c,d);(0,k.D)([l]),(0,d.A)(l,"7f315bd3dd8795417fdf925fe79dda65942de93ca0",null)},72112:()=>{},86944:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(89993);let e=async a=>[{type:"image/x-icon",sizes:"16x16",url:(0,d.fillMetadataSegment)(".",await a.params,"favicon.ico")+""}]},88155:(a,b,c)=>{"use strict";c.d(b,{Hf:()=>g,Z8:()=>f,m4:()=>h,n_:()=>e,w5:()=>d});let d=process.env.USER_PROJECT_LOCATION,e=process.env.PREVIEW_SERVER_LOCATION,f=process.env.EMAILS_DIR_ABSOLUTE_PATH,g="true"===process.env.NEXT_PUBLIC_IS_BUILDING,h="true"===process.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT},90948:(a,b,c)=>{"use strict";c.d(b,{EmailsProvider:()=>e});var d=c(9756);(0,d.registerClientReference)(function(){throw Error("Attempted to call useEmails() from the server but useEmails is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/actions-runner/_work/react-email/react-email/packages/preview-server/src/contexts/emails.tsx","useEmails");let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call EmailsProvider() from the server but EmailsProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/actions-runner/_work/react-email/react-email/packages/preview-server/src/contexts/emails.tsx","EmailsProvider")},92665:()=>{}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{6:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},1154:e=>{e.exports={style:{fontFamily:"'sfMono', 'sfMono Fallback'"},className:"__className_a0e4c0",variable:"__variable_a0e4c0"}},3526:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,7979,23)),Promise.resolve().then(a.t.bind(a,6,23)),Promise.resolve().then(a.t.bind(a,1154,23)),Promise.resolve().then(a.bind(a,6779))},5224:(e,t,a)=>{"use strict";a.d(t,{a:()=>i});var r=a(3611),l=a(4512);let i=e=>{let t=(0,r.useRef)(null);(0,r.useEffect)(()=>{t.current||(t.current=(0,l.io)());let a=t.current;return a.on("reload",t=>{console.debug("Reloading..."),e(t)}),()=>{a.off()}},[e])}},6779:(e,t,a)=>{"use strict";a.d(t,{EmailsProvider:()=>_,J:()=>c});var r=a(1275),l=a(3611),i=a(4366);let o=(0,i.createServerReference)("7f315bd3dd8795417fdf925fe79dda65942de93ca0",i.callServer,void 0,i.findSourceMapURL,"getEmailsDirectoryMetadataAction");var s=a(9195),n=a(5224);let d=(0,l.createContext)(void 0),c=()=>{let e=(0,l.useContext)(d);if(void 0===e)throw Error("Cannot call `useEmails` outside of an `EmailsContext` provider.");return e},_=e=>{let[t,a]=(0,l.useState)(e.initialEmailsDirectoryMetadata);return s.Hf||s.m4||(0,n.a)(async()=>{let t=await o(e.initialEmailsDirectoryMetadata.absolutePath);if(t)a(t);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,r.jsx)(d.Provider,{value:{emailsDirectoryMetadata:t},children:e.children})}},7979:()=>{},9195:(e,t,a)=>{"use strict";a.d(t,{Hf:()=>l,m4:()=>i});var r=a(2248);r.env.USER_PROJECT_LOCATION,r.env.PREVIEW_SERVER_LOCATION,r.env.EMAILS_DIR_ABSOLUTE_PATH;let l="true"===r.env.NEXT_PUBLIC_IS_BUILDING,i="true"===r.env.NEXT_PUBLIC_IS_PREVIEW_DEVELOPMENT}},e=>{e.O(0,[807,983,105,713,358],()=>e(e.s=3526)),_N_E=e.O()}]);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`getUsedStyleProperties() 1`] = `
|
|
4
|
-
[
|
|
5
|
-
{
|
|
6
|
-
"location": SourceLocation {
|
|
7
|
-
"end": Position {
|
|
8
|
-
"column": 21,
|
|
9
|
-
"index": 91,
|
|
10
|
-
"line": 5,
|
|
11
|
-
},
|
|
12
|
-
"filename": undefined,
|
|
13
|
-
"identifierName": undefined,
|
|
14
|
-
"start": Position {
|
|
15
|
-
"column": 2,
|
|
16
|
-
"index": 72,
|
|
17
|
-
"line": 5,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
"name": "borderRadius",
|
|
21
|
-
"value": "5px",
|
|
22
|
-
},
|
|
23
|
-
]
|
|
24
|
-
`;
|
|
File without changes
|
|
File without changes
|