@react-email/preview-server 4.3.2 → 5.0.0-canary.1
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 +3807 -226
- 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/571.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/server/webpack-runtime.js +1 -1
- package/.next/static/chunks/{615-d4fa6964c1b18ccd.js → 615-e223b553c72ae727.js} +1 -1
- package/.next/static/chunks/app/layout-596f02410fa6cec2.js +1 -0
- package/.next/static/chunks/app/preview/[...slug]/page-337a48d611839d3a.js +1 -0
- package/.next/trace +28 -29
- package/CHANGELOG.md +17 -0
- package/package.json +4 -3
- package/src/actions/email-validation/caniemail-data.ts +1053 -605
- package/src/actions/email-validation/check-compatibility.ts +12 -16
- package/src/utils/__snapshots__/get-email-component.spec.ts.snap +15 -16
- package/src/utils/caniemail/ast/get-used-style-properties.spec.ts +107 -11
- package/src/utils/caniemail/ast/get-used-style-properties.ts +78 -30
- package/src/utils/caniemail/tailwind/get-tailwind-metadata.ts +4 -5
- package/src/utils/snake-to-camel.ts +5 -0
- package/.next/server/chunks/798.js +0 -1
- package/.next/static/chunks/app/layout-69daa40cb6178a4e.js +0 -1
- package/.next/static/chunks/app/preview/[...slug]/page-16818ec04224d56a.js +0 -1
- package/src/utils/caniemail/ast/__snapshots__/get-used-style-properties.spec.ts.snap +0 -24
- package/src/utils/caniemail/tailwind/generate-tailwind-rules.ts +0 -30
- package/src/utils/caniemail/tailwind/setup-tailwind-context.ts +0 -15
- package/tailwind-internals.d.ts +0 -131
- /package/.next/static/{9thySAgTI839NCKpFjqMH → 04HKn1-CcCqsWXfS4b-9r}/_buildManifest.js +0 -0
- /package/.next/static/{9thySAgTI839NCKpFjqMH → 04HKn1-CcCqsWXfS4b-9r}/_ssgManifest.js +0 -0
|
@@ -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
|
-
`;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Root, Rule } from 'postcss';
|
|
2
|
-
import postcss from 'postcss';
|
|
3
|
-
import evaluateTailwindFunctions from 'tailwindcss/lib/lib/evaluateTailwindFunctions';
|
|
4
|
-
import { generateRules as rawGenerateRules } from 'tailwindcss/lib/lib/generateRules';
|
|
5
|
-
import type { JitContext } from 'tailwindcss/lib/lib/setupContextUtils';
|
|
6
|
-
|
|
7
|
-
export const generateTailwindCssRules = (
|
|
8
|
-
classNames: string[],
|
|
9
|
-
tailwindContext: JitContext,
|
|
10
|
-
): { root: Root; rules: Rule[] } => {
|
|
11
|
-
const bigIntRuleTuples: [bigint, Rule][] = rawGenerateRules(
|
|
12
|
-
new Set(classNames),
|
|
13
|
-
tailwindContext,
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
const root = postcss.root({
|
|
17
|
-
nodes: bigIntRuleTuples.map(([, rule]) => rule),
|
|
18
|
-
});
|
|
19
|
-
evaluateTailwindFunctions(tailwindContext)(root);
|
|
20
|
-
|
|
21
|
-
const actualRules: Rule[] = [];
|
|
22
|
-
root.walkRules((rule) => {
|
|
23
|
-
actualRules.push(rule);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
root,
|
|
28
|
-
rules: actualRules,
|
|
29
|
-
};
|
|
30
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'tailwindcss/lib/lib/setupContextUtils';
|
|
2
|
-
import resolveConfig from 'tailwindcss/resolveConfig';
|
|
3
|
-
import type { TailwindConfig } from './get-tailwind-config';
|
|
4
|
-
|
|
5
|
-
export const setupTailwindContext = (config: TailwindConfig) => {
|
|
6
|
-
return createContext(
|
|
7
|
-
resolveConfig({
|
|
8
|
-
...config,
|
|
9
|
-
content: [],
|
|
10
|
-
corePlugins: {
|
|
11
|
-
preflight: false,
|
|
12
|
-
},
|
|
13
|
-
}),
|
|
14
|
-
);
|
|
15
|
-
};
|
package/tailwind-internals.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
declare module "tailwindcss/lib/lib/evaluateTailwindFunctions" {
|
|
2
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
3
|
-
import type { Root } from "postcss";
|
|
4
|
-
|
|
5
|
-
export default function evaluateTailwindFunctions(
|
|
6
|
-
context: JITContext,
|
|
7
|
-
): (root: Root) => void;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare module "tailwindcss/lib/lib/resolveDefaultsAtRules" {
|
|
11
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
12
|
-
import type { Root } from "postcss";
|
|
13
|
-
|
|
14
|
-
export default function expandApplyAtRules(
|
|
15
|
-
context: JITContext,
|
|
16
|
-
): (root: Root) => void;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare module "tailwindcss/lib/lib/partitionApplyAtRules" {
|
|
20
|
-
import type { Root } from "postcss";
|
|
21
|
-
|
|
22
|
-
export default function partitionApplyAtRules(): (root: Root) => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
declare module "tailwindcss/lib/lib/substituteScreenAtRules" {
|
|
26
|
-
import type { Root } from "postcss";
|
|
27
|
-
|
|
28
|
-
export default function substituteScreenAtRules(
|
|
29
|
-
context: JITContext,
|
|
30
|
-
): (root: Root) => void;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare module "tailwindcss/lib/lib/resolveDefaultsAtRules" {
|
|
34
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
35
|
-
import type { Root } from "postcss";
|
|
36
|
-
|
|
37
|
-
export default function expandApplyAtRules(
|
|
38
|
-
context: JITContext,
|
|
39
|
-
): (root: Root) => void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
declare module "tailwindcss/lib/lib/expandApplyAtRules" {
|
|
43
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
44
|
-
import type { Root } from "postcss";
|
|
45
|
-
|
|
46
|
-
export default function expandApplyAtRules(
|
|
47
|
-
context: JITContext,
|
|
48
|
-
): (root: Root) => void;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
declare module "tailwindcss/lib/lib/expandTailwindAtRules" {
|
|
52
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
53
|
-
import type { Root } from "postcss";
|
|
54
|
-
|
|
55
|
-
export default async function expandTailwindAtRules(
|
|
56
|
-
context: JITContext,
|
|
57
|
-
): (root: Root) => Promise<void>;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare module "tailwindcss/lib/lib/collapseAdjacentRules" {
|
|
61
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
62
|
-
import type { Root } from "postcss";
|
|
63
|
-
|
|
64
|
-
export default async function collapseAdjacentRules(
|
|
65
|
-
context: JITContext,
|
|
66
|
-
): (root: Root) => void;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
declare module "tailwindcss/lib/lib/collapseDuplicateDeclarations" {
|
|
70
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
71
|
-
import type { Root } from "postcss";
|
|
72
|
-
|
|
73
|
-
export default async function collapseDuplicateDeclarations(
|
|
74
|
-
context: JITContext,
|
|
75
|
-
): (root: Root) => void;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
declare module "tailwindcss/lib/lib/generateRules" {
|
|
79
|
-
import type { JitContext } from "tailwindcss/lib/lib/setupContextUtils";
|
|
80
|
-
import type { Rule } from "postcss";
|
|
81
|
-
|
|
82
|
-
export function generateRules(
|
|
83
|
-
classNames: Set<string>,
|
|
84
|
-
context: JITContext,
|
|
85
|
-
): [bigint, Rule][];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// taken from https://github.com/vinicoder/tw-to-css/blob/main/types.d.ts
|
|
89
|
-
// thanks vinicoder!
|
|
90
|
-
declare module "tailwindcss/lib/lib/setupContextUtils" {
|
|
91
|
-
import type { Container, Node } from "postcss";
|
|
92
|
-
import type { Config } from "tailwindcss";
|
|
93
|
-
import type resolveConfig from "tailwindcss/resolveConfig";
|
|
94
|
-
|
|
95
|
-
interface ChangedContent {
|
|
96
|
-
content: string;
|
|
97
|
-
extension?: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
interface Api {
|
|
101
|
-
container: Container;
|
|
102
|
-
separator: string;
|
|
103
|
-
format: (def: string) => void;
|
|
104
|
-
wrap: (rule: Container) => void;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
type VariantPreview = string;
|
|
108
|
-
|
|
109
|
-
type VariantFn = [number, (api: Api) => VariantPreview | undefined];
|
|
110
|
-
|
|
111
|
-
type VariantName = string;
|
|
112
|
-
|
|
113
|
-
export interface JitContext {
|
|
114
|
-
changedContent: ChangedContent[];
|
|
115
|
-
ruleCache: Set<unknown>;
|
|
116
|
-
candidateRuleCache: Map<unknown, unknown>;
|
|
117
|
-
classCache: Map<unknown, unknown>;
|
|
118
|
-
applyClassCache: Map<unknown, unknown>;
|
|
119
|
-
notClassCache: Set<unknown>;
|
|
120
|
-
postCssNodeCache: Map<unknown, unknown>;
|
|
121
|
-
|
|
122
|
-
getClassList: () => string[];
|
|
123
|
-
tailwindConfig: TailwindConfig;
|
|
124
|
-
variantMap: Map<VariantName, VariantFn[]>;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export function createContext(
|
|
128
|
-
config: ReturnType<typeof resolveConfig>,
|
|
129
|
-
changedContent?: ChangedContent[],
|
|
130
|
-
): JitContext;
|
|
131
|
-
}
|
|
File without changes
|
|
File without changes
|