react-email 6.6.3 → 6.6.5
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,13 @@
|
|
|
1
1
|
# react-email
|
|
2
2
|
|
|
3
|
+
## 6.6.5
|
|
4
|
+
|
|
5
|
+
## 6.6.4
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- f8279be: Fix Tailwind pill utilities like `rounded-t-full` and `rounded-e-full` leaving an unrenderable `calc(infinity * 1px)` in the inlined email CSS (previously only `rounded-full` was converted to `9999px`).
|
|
10
|
+
|
|
3
11
|
## 6.6.3
|
|
4
12
|
|
|
5
13
|
## 6.6.2
|
package/dist/cli/index.mjs
CHANGED
|
@@ -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.
|
|
6526
|
+
version: "6.6.5",
|
|
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",
|
package/dist/index.cjs
CHANGED
|
@@ -38189,7 +38189,7 @@ function sanitizeDeclarations(nodeContainingDeclarations) {
|
|
|
38189
38189
|
visit: "Declaration",
|
|
38190
38190
|
enter(declaration, item, list) {
|
|
38191
38191
|
if (declaration.value.type === "Raw") declaration.value = parse(declaration.value.value, { context: "value" });
|
|
38192
|
-
if (/border-radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(generate(declaration))) declaration.value = parse("9999px", { context: "value" });
|
|
38192
|
+
if (/border-(?:[a-z]+-){0,2}radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(generate(declaration))) declaration.value = parse("9999px", { context: "value" });
|
|
38193
38193
|
walk(declaration, {
|
|
38194
38194
|
visit: "Function",
|
|
38195
38195
|
enter(func, funcParentListItem) {
|
package/dist/index.mjs
CHANGED
|
@@ -38168,7 +38168,7 @@ function sanitizeDeclarations(nodeContainingDeclarations) {
|
|
|
38168
38168
|
visit: "Declaration",
|
|
38169
38169
|
enter(declaration, item, list) {
|
|
38170
38170
|
if (declaration.value.type === "Raw") declaration.value = parse(declaration.value.value, { context: "value" });
|
|
38171
|
-
if (/border-radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(generate(declaration))) declaration.value = parse("9999px", { context: "value" });
|
|
38171
|
+
if (/border-(?:[a-z]+-){0,2}radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(generate(declaration))) declaration.value = parse("9999px", { context: "value" });
|
|
38172
38172
|
walk(declaration, {
|
|
38173
38173
|
visit: "Function",
|
|
38174
38174
|
enter(func, funcParentListItem) {
|
package/package.json
CHANGED
|
@@ -32,6 +32,27 @@ describe('sanitizeDeclarations', () => {
|
|
|
32
32
|
expect(generate(root)).toBe('.rounded-full{border-radius:9999px}');
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
it('converts calc(infinity * 1px) for corner and logical border-radius longhands', () => {
|
|
36
|
+
let root = parse(`.rounded-tl-full {
|
|
37
|
+
border-top-left-radius: calc(infinity * 1px);
|
|
38
|
+
}
|
|
39
|
+
`);
|
|
40
|
+
sanitizeDeclarations(root);
|
|
41
|
+
expect(generate(root)).toBe(
|
|
42
|
+
'.rounded-tl-full{border-top-left-radius:9999px}',
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
root = parse(`.rounded-e-full {
|
|
46
|
+
border-start-end-radius: calc(infinity * 1px);
|
|
47
|
+
border-end-end-radius: calc(infinity * 1px);
|
|
48
|
+
}
|
|
49
|
+
`);
|
|
50
|
+
sanitizeDeclarations(root);
|
|
51
|
+
expect(generate(root)).toBe(
|
|
52
|
+
'.rounded-e-full{border-start-end-radius:9999px;border-end-end-radius:9999px}',
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
|
|
35
56
|
it('separates padding-block and padding-inline', () => {
|
|
36
57
|
let root = parse(`.box {
|
|
37
58
|
padding-inline: 4px 14;
|
|
@@ -183,7 +183,7 @@ export function sanitizeDeclarations(nodeContainingDeclarations: CssNode) {
|
|
|
183
183
|
}) as Value | Raw;
|
|
184
184
|
}
|
|
185
185
|
if (
|
|
186
|
-
/border-radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(
|
|
186
|
+
/border-(?:[a-z]+-){0,2}radius\s*:\s*calc\s*\(\s*infinity\s*\*\s*1px\s*\)/i.test(
|
|
187
187
|
generate(declaration),
|
|
188
188
|
)
|
|
189
189
|
) {
|