@emailens/engine 0.9.6 → 0.10.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/README.md +247 -232
- package/dist/compile/index.d.cts +2 -2
- package/dist/compile/index.d.ts +2 -2
- package/dist/index.cjs +3706 -591
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -10
- package/dist/index.d.ts +29 -10
- package/dist/index.js +3704 -591
- package/dist/index.js.map +1 -1
- package/dist/{react-email-M23kFFxl.d.cts → react-email-B1Rd5itD.d.cts} +1 -1
- package/dist/{react-email-TJF6usIm.d.ts → react-email-D4XyNztP.d.ts} +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-WvVf2OXX.d.cts → types-DEAn3IiX.d.cts} +21 -1
- package/dist/{types-WvVf2OXX.d.ts → types-DEAn3IiX.d.ts} +21 -1
- package/package.json +123 -121
package/dist/server.d.cts
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ interface ExportPromptOptions {
|
|
|
13
13
|
format?: "html" | "jsx" | "mjml" | "maizzle";
|
|
14
14
|
/** Optional user goal for the fix (e.g. "keep the gradient header"). */
|
|
15
15
|
intent?: string;
|
|
16
|
+
/** Content-overflow findings (from checkOverflow) — folded into the fix prompt. */
|
|
17
|
+
overflow?: OverflowIssue[];
|
|
18
|
+
/** Visual-bug findings with fixes (from checkVisual) — folded into the fix prompt. */
|
|
19
|
+
visual?: VisualIssue[];
|
|
16
20
|
}
|
|
17
21
|
declare function generateFixPrompt(options: ExportPromptOptions): string;
|
|
18
22
|
|
|
@@ -258,6 +262,22 @@ interface SizeReport {
|
|
|
258
262
|
clipped: boolean;
|
|
259
263
|
issues: SizeIssue[];
|
|
260
264
|
}
|
|
265
|
+
interface OverflowIssue extends BaseIssue {
|
|
266
|
+
detail?: string;
|
|
267
|
+
}
|
|
268
|
+
interface OverflowReport {
|
|
269
|
+
/** True when any content is likely to overflow the email frame / viewport. */
|
|
270
|
+
hasOverflow: boolean;
|
|
271
|
+
issues: OverflowIssue[];
|
|
272
|
+
}
|
|
273
|
+
interface VisualIssue extends BaseIssue {
|
|
274
|
+
detail?: string;
|
|
275
|
+
/** Concrete correction to apply (e.g. a background-color / font-family line). */
|
|
276
|
+
fix?: string;
|
|
277
|
+
}
|
|
278
|
+
interface VisualReport {
|
|
279
|
+
issues: VisualIssue[];
|
|
280
|
+
}
|
|
261
281
|
interface TemplateIssue extends BaseIssue {
|
|
262
282
|
variable: string;
|
|
263
283
|
location: "text" | "attribute";
|
|
@@ -283,4 +303,4 @@ interface DeliverabilityIssue extends BaseIssue {
|
|
|
283
303
|
detail?: string;
|
|
284
304
|
}
|
|
285
305
|
|
|
286
|
-
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type
|
|
306
|
+
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type TemplateIssue as G, type TokenEstimate as H, type ImageReport as I, type TokenEstimateWithWarnings as J, type VisualIssue as K, type LinkReport as L, estimateAiFixTokens as M, generateFixPrompt as N, type OverflowReport as O, type PreviewResult as P, heuristicTokenCount as Q, type SupportLevel as S, type TransformResult as T, type VisualReport as V, type CodeFix as a, type ExportPromptOptions as b, type AiFixResult as c, type SpamAnalysisOptions as d, type SpamReport as e, type AccessibilityReport as f, type InboxPreview as g, type SizeReport as h, type TemplateReport as i, type DeliverabilityReport as j, type AccessibilityIssue as k, type ClientTruncation as l, type DeliverabilityCheck as m, type DeliverabilityIssue as n, type EstimateOptions as o, type ExportScope as p, type FixType as q, type ImageInfo as r, type ImageIssue as s, type InboxPreviewIssue as t, type InputFormat as u, type LinkIssue as v, type OverflowIssue as w, type Severity as x, type SizeIssue as y, type SpamIssue as z };
|
|
@@ -13,6 +13,10 @@ interface ExportPromptOptions {
|
|
|
13
13
|
format?: "html" | "jsx" | "mjml" | "maizzle";
|
|
14
14
|
/** Optional user goal for the fix (e.g. "keep the gradient header"). */
|
|
15
15
|
intent?: string;
|
|
16
|
+
/** Content-overflow findings (from checkOverflow) — folded into the fix prompt. */
|
|
17
|
+
overflow?: OverflowIssue[];
|
|
18
|
+
/** Visual-bug findings with fixes (from checkVisual) — folded into the fix prompt. */
|
|
19
|
+
visual?: VisualIssue[];
|
|
16
20
|
}
|
|
17
21
|
declare function generateFixPrompt(options: ExportPromptOptions): string;
|
|
18
22
|
|
|
@@ -258,6 +262,22 @@ interface SizeReport {
|
|
|
258
262
|
clipped: boolean;
|
|
259
263
|
issues: SizeIssue[];
|
|
260
264
|
}
|
|
265
|
+
interface OverflowIssue extends BaseIssue {
|
|
266
|
+
detail?: string;
|
|
267
|
+
}
|
|
268
|
+
interface OverflowReport {
|
|
269
|
+
/** True when any content is likely to overflow the email frame / viewport. */
|
|
270
|
+
hasOverflow: boolean;
|
|
271
|
+
issues: OverflowIssue[];
|
|
272
|
+
}
|
|
273
|
+
interface VisualIssue extends BaseIssue {
|
|
274
|
+
detail?: string;
|
|
275
|
+
/** Concrete correction to apply (e.g. a background-color / font-family line). */
|
|
276
|
+
fix?: string;
|
|
277
|
+
}
|
|
278
|
+
interface VisualReport {
|
|
279
|
+
issues: VisualIssue[];
|
|
280
|
+
}
|
|
261
281
|
interface TemplateIssue extends BaseIssue {
|
|
262
282
|
variable: string;
|
|
263
283
|
location: "text" | "attribute";
|
|
@@ -283,4 +303,4 @@ interface DeliverabilityIssue extends BaseIssue {
|
|
|
283
303
|
detail?: string;
|
|
284
304
|
}
|
|
285
305
|
|
|
286
|
-
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type
|
|
306
|
+
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type TemplateIssue as G, type TokenEstimate as H, type ImageReport as I, type TokenEstimateWithWarnings as J, type VisualIssue as K, type LinkReport as L, estimateAiFixTokens as M, generateFixPrompt as N, type OverflowReport as O, type PreviewResult as P, heuristicTokenCount as Q, type SupportLevel as S, type TransformResult as T, type VisualReport as V, type CodeFix as a, type ExportPromptOptions as b, type AiFixResult as c, type SpamAnalysisOptions as d, type SpamReport as e, type AccessibilityReport as f, type InboxPreview as g, type SizeReport as h, type TemplateReport as i, type DeliverabilityReport as j, type AccessibilityIssue as k, type ClientTruncation as l, type DeliverabilityCheck as m, type DeliverabilityIssue as n, type EstimateOptions as o, type ExportScope as p, type FixType as q, type ImageInfo as r, type ImageIssue as s, type InboxPreviewIssue as t, type InputFormat as u, type LinkIssue as v, type OverflowIssue as w, type Severity as x, type SizeIssue as y, type SpamIssue as z };
|
package/package.json
CHANGED
|
@@ -1,121 +1,123 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@emailens/engine",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Email compatibility engine — transforms CSS per email client, scores compatibility, simulates dark mode, suggests fixes, and runs spam, accessibility, link, and image quality analysis.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"import": "./dist/index.js",
|
|
10
|
-
"require": "./dist/index.cjs"
|
|
11
|
-
},
|
|
12
|
-
"./compile": {
|
|
13
|
-
"types": "./dist/compile/index.d.ts",
|
|
14
|
-
"import": "./dist/compile/index.js",
|
|
15
|
-
"require": "./dist/compile/index.cjs"
|
|
16
|
-
},
|
|
17
|
-
"./server": {
|
|
18
|
-
"types": "./dist/server.d.ts",
|
|
19
|
-
"import": "./dist/server.js",
|
|
20
|
-
"require": "./dist/server.cjs"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"types": "./dist/index.d.ts",
|
|
24
|
-
"sideEffects": false,
|
|
25
|
-
"engines": {
|
|
26
|
-
"node": ">=18"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"dist",
|
|
30
|
-
"LICENSE"
|
|
31
|
-
],
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "tsup",
|
|
34
|
-
"dev": "tsup --watch",
|
|
35
|
-
"typecheck": "tsc --noEmit",
|
|
36
|
-
"sync:caniemail": "bun run scripts/sync-caniemail.ts",
|
|
37
|
-
"check:freshness": "bun run scripts/check-data-freshness.ts",
|
|
38
|
-
"test": "bun test",
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"@
|
|
48
|
-
"@react-email/
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"@
|
|
84
|
-
"@react-email/
|
|
85
|
-
"@
|
|
86
|
-
"@types/
|
|
87
|
-
"@types/
|
|
88
|
-
"@types/
|
|
89
|
-
"@types/
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@emailens/engine",
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "Email compatibility engine — transforms CSS per email client, scores compatibility, simulates dark mode, suggests fixes, and runs spam, accessibility, link, and image quality analysis.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.cjs"
|
|
11
|
+
},
|
|
12
|
+
"./compile": {
|
|
13
|
+
"types": "./dist/compile/index.d.ts",
|
|
14
|
+
"import": "./dist/compile/index.js",
|
|
15
|
+
"require": "./dist/compile/index.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./server": {
|
|
18
|
+
"types": "./dist/server.d.ts",
|
|
19
|
+
"import": "./dist/server.js",
|
|
20
|
+
"require": "./dist/server.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=18"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsup",
|
|
34
|
+
"dev": "tsup --watch",
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"sync:caniemail": "bun run scripts/sync-caniemail.ts",
|
|
37
|
+
"check:freshness": "bun run scripts/check-data-freshness.ts",
|
|
38
|
+
"test": "bun test",
|
|
39
|
+
"test:render": "RENDER_TESTS=1 bun test src/__tests__/render.e2e.test.ts",
|
|
40
|
+
"prepublishOnly": "bun run build"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"cheerio": "^1.2.0",
|
|
44
|
+
"css-tree": "^3.1.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@maizzle/framework": ">=5.0.0",
|
|
48
|
+
"@react-email/components": ">=0.0.36",
|
|
49
|
+
"@react-email/render": ">=1.0.0",
|
|
50
|
+
"isolated-vm": ">=5.0.0",
|
|
51
|
+
"mjml": ">=4.0.0",
|
|
52
|
+
"quickjs-emscripten": ">=0.29.0",
|
|
53
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
54
|
+
"sucrase": "^3.35.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"sucrase": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"react": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@react-email/components": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"@react-email/render": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"mjml": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"@maizzle/framework": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"isolated-vm": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"quickjs-emscripten": {
|
|
79
|
+
"optional": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@maizzle/framework": "^5.0.0",
|
|
84
|
+
"@react-email/components": "^0.0.36",
|
|
85
|
+
"@react-email/render": "^1.0.6",
|
|
86
|
+
"@types/bun": "^1.3.9",
|
|
87
|
+
"@types/css-tree": "^2.3.11",
|
|
88
|
+
"@types/mjml": "^4.7.4",
|
|
89
|
+
"@types/node": "^25.3.0",
|
|
90
|
+
"@types/react": "^19.2.14",
|
|
91
|
+
"bun-types": "^1.3.9",
|
|
92
|
+
"mjml": "^4.15.0",
|
|
93
|
+
"playwright": "^1.62.0",
|
|
94
|
+
"react": "^19.0.0",
|
|
95
|
+
"sucrase": "^3.35.0",
|
|
96
|
+
"tsup": "^8.4.0",
|
|
97
|
+
"typescript": "^5.9.3"
|
|
98
|
+
},
|
|
99
|
+
"keywords": [
|
|
100
|
+
"email",
|
|
101
|
+
"html-email",
|
|
102
|
+
"css",
|
|
103
|
+
"compatibility",
|
|
104
|
+
"gmail",
|
|
105
|
+
"outlook",
|
|
106
|
+
"apple-mail",
|
|
107
|
+
"dark-mode",
|
|
108
|
+
"email-testing",
|
|
109
|
+
"spam-scoring",
|
|
110
|
+
"accessibility",
|
|
111
|
+
"link-validation",
|
|
112
|
+
"image-analysis"
|
|
113
|
+
],
|
|
114
|
+
"license": "MIT",
|
|
115
|
+
"repository": {
|
|
116
|
+
"type": "git",
|
|
117
|
+
"url": "git+https://github.com/emailens/engine.git"
|
|
118
|
+
},
|
|
119
|
+
"homepage": "https://github.com/emailens/engine#readme",
|
|
120
|
+
"bugs": {
|
|
121
|
+
"url": "https://github.com/emailens/engine/issues"
|
|
122
|
+
}
|
|
123
|
+
}
|