@emailens/engine 0.10.1 → 0.10.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/README.md CHANGED
@@ -1,247 +1,258 @@
1
- <div align="center">
2
-
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="./docs/wordmark-dark.svg">
5
- <img src="./docs/wordmark-light.svg" alt="emailens / engine" width="515">
6
- </picture>
7
-
8
- **The rendering linter for email**
9
-
10
- [![npm](https://img.shields.io/npm/v/@emailens/engine)](https://www.npmjs.com/package/@emailens/engine)
11
- [![license](https://img.shields.io/npm/l/@emailens/engine)](./LICENSE)
12
- [![tests](https://img.shields.io/badge/tests-719%20passing-brightgreen)]()
13
- [![node](https://img.shields.io/node/v/@emailens/engine)](https://nodejs.org/)
14
- [![MCP](https://img.shields.io/badge/MCP-Server-blue)](https://github.com/emailens/mcp)
15
- [![GitHub stars](https://img.shields.io/github/stars/emailens/engine?style=flat)](https://github.com/emailens/engine/stargazers)
16
-
17
- [Quick Start](#quick-start) · [What It Catches](#what-it-catches) · [Why Emailens](#why-emailens) · [Supported Clients](#supported-email-clients) · [API Docs](./docs/API.md) · [The State of Email CSS](https://emailens.dev/email-css/report)
18
-
19
- </div>
20
-
21
- **Your email looks perfect in Apple Mail. Gmail strips half the CSS. Outlook renders it in Word.**
22
-
23
- `@emailens/engine` analyzes your HTML against 250+ CSS properties across 21 email clients, scores compatibility, and shows you exactly what to fix — before you hit send.
24
-
25
- Our data says you need this: across the 255 CSS and HTML features we track, **only 6 are fully supported in every major email client**. See [The State of Email CSS](https://emailens.dev/email-css/report).
26
-
27
- ![emailens lint output showing errors and warnings across email clients](./docs/lint-demo.png)
28
-
29
- > **[emailens.dev](https://emailens.dev)** — Try the hosted version. Paste HTML, get a full audit in seconds.
30
-
31
- ## Quick Start
32
-
33
- No install, no project setup, lint any email right now:
34
-
35
- ```bash
36
- npx @emailens/cli lint email.html
37
- ```
38
-
39
- Or use the engine as a library:
40
-
41
- ```bash
42
- npm install @emailens/engine
43
- ```
44
-
45
- ```typescript
46
- import { auditEmail } from "@emailens/engine";
47
-
48
- // Flexbox + gap + box-shadow — all Outlook killers
49
- const html = `<html lang="en">
50
- <head><title>Weekly Update</title>
51
- <style>
52
- .card { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
53
- </style>
54
- </head>
55
- <body>
56
- <div class="card" style="display: flex; gap: 16px;">
57
- <div>Column A</div>
58
- <div>Column B</div>
59
- </div>
60
- </body>
61
- </html>`;
62
-
63
- const report = auditEmail(html, { framework: "jsx" });
64
-
65
- console.log(report.compatibility.scores["outlook-windows"]);
66
- // { score: 30, errors: 3, warnings: 3, info: 1 }
67
- // ↑ Outlook uses Word — flexbox, gap, box-shadow, border-radius all break
68
-
69
- console.log(report.compatibility.scores["gmail-web"]);
70
- // { score: 75, errors: 0, warnings: 5, info: 0 }
71
-
72
- console.log(report.spam.score); // 100 (clean)
73
- console.log(report.accessibility.score); // 88
74
- console.log(report.size.clipped); // false (under Gmail's 102KB limit)
75
- ```
76
-
77
- ## Score too low? Fix it
78
-
79
- Score too low? Fix it automatically:
80
-
81
- ```typescript
82
- import { generateAiFix, AI_FIX_SYSTEM_PROMPT } from "@emailens/engine";
83
-
84
- const { code } = await generateAiFix({
85
- originalHtml: html,
86
- warnings: report.compatibility.warnings,
87
- scores: report.compatibility.scores,
88
- scope: "outlook-windows",
89
- format: "jsx",
90
- provider: async (prompt) => {
91
- // Any LLM — Claude, GPT, etc.
92
- const msg = await anthropic.messages.create({
93
- model: "claude-sonnet-4-6",
94
- max_tokens: 8192,
95
- system: AI_FIX_SYSTEM_PROMPT,
96
- messages: [{ role: "user", content: prompt }],
97
- });
98
- return msg.content[0].type === "text" ? msg.content[0].text : "";
99
- },
100
- });
101
- // code → JSX with <Table> layout, VML roundrects, inline fallbacks
102
- ```
103
-
104
- ## What It Catches
105
-
106
- 10 analysis engines, one `auditEmail()` call.
107
-
108
- - **CSS compatibility** — 250+ properties tested across 21 email clients, with fix snippets and AI-powered auto-fix
109
- - **Content overflow** — fixed widths wider than the email frame and unbreakable strings that force horizontal scrolling
110
- - **Visual bugs** — gradients/background images with no color fallback (invisible content in Outlook) and fonts with no web-safe fallback, each with a concrete fix
111
- - **Spam scoring** — 45+ signals modeled after SpamAssassin, CAN-SPAM, and GDPR
112
- - **Accessibility** — WCAG contrast ratios, alt text, semantic structure, heading hierarchy
113
- - **Link validation** — broken hrefs, insecure HTTP, `javascript:` protocols, deceptive URLs
114
- - **Image analysis** — missing dimensions, oversized data URIs, tracking pixels, WebP/SVG format
115
- - **Inbox preview** — subject/preheader truncation per client, Gmail clipping detection
116
- - **Domain authentication** — SPF, DKIM, DMARC, MX, and BIMI DNS record validation
117
- - **Template variables** — unresolved merge tags across 6 template systems (Handlebars, ERB, Mailchimp, etc.)
118
-
119
- ## Installation
120
-
121
- ```bash
122
- npm install @emailens/engine
123
- ```
124
-
125
- Three entry points:
126
-
127
- | Import | Description |
128
- |---|---|
129
- | `@emailens/engine` | Core analysis — CSS, spam, a11y, links, images, inbox preview, size, templates, AI fix |
130
- | `@emailens/engine/compile` | JSX / MJML / Maizzle → HTML compilers |
131
- | `@emailens/engine/server` | Node-only: DNS deliverability checks, SpamAssassin integration |
132
-
133
- ## Why Emailens?
134
-
135
- - **Offline-first** — runs entirely locally, no network calls required (except DNS deliverability checks)
136
- - **Unified audit** — one function call returns CSS compatibility, spam, accessibility, links, images, inbox preview, size, and template checks
137
- - **Framework-aware** — fix snippets tailored to React Email (JSX), MJML, and Maizzle
138
- - **AI-ready** structural issues get LLM-powered auto-fix with any provider (Claude, GPT, etc.)
139
- - **Programmable** — TypeScript API, not a GUI — integrate into CI, editors, or build pipelines
140
-
141
- | | @emailens/engine | Litmus | Email on Acid | caniemail.com |
142
- |---|---|---|---|---|
143
- | Local/offline | Yes | No | No | Data only |
144
- | Programmatic API | Yes | Limited | No | No |
145
- | CSS + Spam + A11y | Yes | Separate tools | Separate tools | CSS only |
146
- | AI auto-fix | Yes | No | No | No |
147
- | Open source | MIT | No | No | Yes (data) |
148
-
149
- ### vs other email libraries
150
-
151
- `@emailens/engine` sits in the **QA / lint / scoring** slot — it analyzes finished HTML. It's complementary to (not a replacement for) composition and inlining libraries.
152
-
153
- | | @emailens/engine | [juice](https://github.com/automattic/juice) | [email-comb](https://github.com/codsen/email-comb) | [mjml](https://mjml.io/) | [maizzle](https://maizzle.com/) |
154
- |---|---|---|---|---|---|
155
- | Purpose | QA / lint / score | CSS inliner | Unused CSS pruner | MJML → HTML | Tailwind → HTML |
156
- | Per-client compatibility scoring | Yes | No | No | No | No |
157
- | Spam / a11y / link / image analysis | Yes | No | No | No | No |
158
- | AI-powered fix generation | Yes | No | No | No | No |
159
- | Compose emails | Reads only | Reads only | Reads only | Yes | Yes |
160
- | CSS inlining | No (pair with juice) | Yes | No | Yes (built-in) | Yes (built-in) |
161
-
162
- A typical pipeline: write in **mjml** or **maizzle** inline with **juice** audit with **@emailens/engine** ship.
163
-
164
- ## Supported Email Clients
165
-
166
- | Client | ID | Category | Engine | Dark Mode |
167
- |---|---|---|---|---|
168
- | Gmail | `gmail-web` | Webmail | Gmail Web | Yes |
169
- | Gmail Android | `gmail-android` | Mobile | Gmail Mobile | Yes |
170
- | Gmail iOS | `gmail-ios` | Mobile | Gmail Mobile | Yes |
171
- | Outlook 365 | `outlook-web` | Webmail | Outlook Web | Yes |
172
- | Outlook (New) | `outlook-windows` | Desktop | Outlook Web | Yes |
173
- | Outlook Classic | `outlook-windows-legacy` | Desktop | Microsoft Word | Yes |
174
- | Outlook iOS | `outlook-ios` | Mobile | Outlook Mobile | Yes |
175
- | Outlook Android | `outlook-android` | Mobile | Outlook Mobile | Yes |
176
- | Outlook for Mac | `outlook-macos` | Desktop | WebKit | Yes |
177
- | Apple Mail | `apple-mail-macos` | Desktop | WebKit | Yes |
178
- | Apple Mail iOS | `apple-mail-ios` | Mobile | WebKit | Yes |
179
- | Yahoo Mail | `yahoo-mail` | Webmail | Yahoo | Yes |
180
- | Yahoo Mail Android | `yahoo-mail-android` | Mobile | Yahoo | Yes |
181
- | Yahoo Mail iOS | `yahoo-mail-ios` | Mobile | Yahoo | Yes |
182
- | Samsung Mail | `samsung-mail` | Mobile | Samsung | Yes |
183
- | Thunderbird | `thunderbird` | Desktop | Gecko | No |
184
- | HEY Mail | `hey-mail` | Webmail | WebKit | Yes |
185
- | Proton Mail | `protonmail` | Webmail | Proton | Yes |
186
- | AOL Mail | `aol` | Webmail | AOL | Yes |
187
- | Fastmail | `fastmail` | Webmail | Fastmail | Yes |
188
- | Superhuman | `superhuman` | Desktop | Blink | Yes |
189
-
190
- ## API Documentation
191
-
192
- Full API reference: **[docs/API.md](./docs/API.md)**
193
-
194
- Covers:
195
- - `auditEmail` and `createSession` core analysis
196
- - Standalone analyzers (CSS, spam, links, accessibility, images, inbox preview, size, templates)
197
- - DNS deliverability and SpamAssassin integration
198
- - Client transforms and dark mode simulation
199
- - Compile module (JSX, MJML, Maizzle)
200
- - AI-powered fixes and token estimation
201
- - Performance optimization guide
202
- - Security considerations
203
- - Full TypeScript type definitions
204
-
205
- ## Roadmap
206
-
207
- See [ROADMAP.md](./ROADMAP.md) for the full picture (shipped items + items under consideration with rationale).
208
-
209
- **Shipped:** automated caniemail.com data sync · GitHub Actions integration via `@emailens/cli` and the [Marketplace Action](https://github.com/marketplace/actions/emailens-email-preview-check) · AI-powered fix generation · compile module for JSX/MJML/Maizzle.
210
-
211
- **Considering:** Outlook VML auto-generation · plugin system for custom analyzers · MJML/Maizzle source-level linting · ESLint plugin · spam corpus tuning · dark-mode accuracy tests.
212
-
213
- Concrete bugs go in [Issues](https://github.com/emailens/engine/issues). Open-ended ideas live in the roadmap.
214
-
215
- ## Contributing
216
-
217
- Contributions are welcome! See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for architecture overview, setup instructions, and PR guidelines.
218
-
219
- ```bash
220
- bun install && bun test # 719 tests
221
- ```
222
-
223
- Optional real-render validation — renders engine output in a real browser engine (free, no Litmus/Email on Acid needed). Off by default; needs a browser-capable machine:
224
-
225
- ```bash
226
- bunx playwright install chromium
227
- bun run test:render
228
- ```
229
-
230
- ### Data Maintenance
231
-
232
- CSS support data is auto-synced from [caniemail.com](https://www.caniemail.com/). Other data (dark mode behavior, display limits, Superhuman overrides) is manually curated and tracked with verification dates.
233
-
234
- ```bash
235
- bun run sync:caniemail # Refresh CSS support matrix from caniemail.com
236
- bun run check:freshness # Flag stale data sources (exits 1 if any overdue)
237
- ```
238
-
239
- See [CONTRIBUTING.md](./CONTRIBUTING.md#data-sources-and-freshness) for full details on data sources and verification procedures.
240
-
241
- ## License
242
-
243
- MIT Copyright 2025 [Emailens](https://emailens.dev)
244
-
245
- ---
246
-
247
- If this saved you from an Outlook surprise, [a star](https://github.com/emailens/engine) helps other email developers find it.
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="./docs/wordmark-dark.svg">
5
+ <img src="./docs/wordmark-light.svg" alt="emailens / engine" width="515">
6
+ </picture>
7
+
8
+ **The rendering linter for email**
9
+
10
+ [![npm](https://img.shields.io/npm/v/@emailens/engine)](https://www.npmjs.com/package/@emailens/engine)
11
+ [![license](https://img.shields.io/npm/l/@emailens/engine)](./LICENSE)
12
+ [![tests](https://img.shields.io/badge/tests-719%20passing-brightgreen)]()
13
+ [![node](https://img.shields.io/node/v/@emailens/engine)](https://nodejs.org/)
14
+ [![MCP](https://img.shields.io/badge/MCP-Server-blue)](https://github.com/emailens/mcp)
15
+ [![GitHub stars](https://img.shields.io/github/stars/emailens/engine?style=flat)](https://github.com/emailens/engine/stargazers)
16
+
17
+ [Quick Start](#quick-start) · [What It Catches](#what-it-catches) · [Why Emailens](#why-emailens) · [Supported Clients](#supported-email-clients) · [API Docs](./docs/API.md) · [The State of Email CSS](https://emailens.dev/email-css/report)
18
+
19
+ </div>
20
+
21
+ **Your email looks perfect in Apple Mail. Gmail strips half the CSS. Outlook renders it in Word.**
22
+
23
+ `@emailens/engine` analyzes your HTML against 250+ CSS properties across 21 email clients, scores compatibility, and shows you exactly what to fix — before you hit send.
24
+
25
+ Our data says you need this: across the 255 CSS and HTML features we track, **only 6 are fully supported in every major email client**. See [The State of Email CSS](https://emailens.dev/email-css/report).
26
+
27
+ ![emailens lint output showing errors and warnings across email clients](./docs/lint-demo.png)
28
+
29
+ > **[emailens.dev](https://emailens.dev)** — Try the hosted version. Paste HTML, get a full audit in seconds.
30
+
31
+ ## Quick Start
32
+
33
+ No install, no project setup, lint any email right now:
34
+
35
+ ```bash
36
+ npx @emailens/cli lint email.html
37
+ ```
38
+
39
+ Or use the engine as a library:
40
+
41
+ ```bash
42
+ npm install @emailens/engine
43
+ ```
44
+
45
+ ```typescript
46
+ import { auditEmail } from "@emailens/engine";
47
+
48
+ // Flexbox + gap + box-shadow — all Outlook killers
49
+ const html = `<html lang="en">
50
+ <head><title>Weekly Update</title>
51
+ <style>
52
+ .card { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
53
+ </style>
54
+ </head>
55
+ <body>
56
+ <div class="card" style="display: flex; gap: 16px;">
57
+ <div>Column A</div>
58
+ <div>Column B</div>
59
+ </div>
60
+ </body>
61
+ </html>`;
62
+
63
+ const report = auditEmail(html, { framework: "jsx" });
64
+
65
+ console.log(report.compatibility.scores["outlook-windows"]);
66
+ // { score: 30, errors: 3, warnings: 3, info: 1 }
67
+ // ↑ Outlook uses Word — flexbox, gap, box-shadow, border-radius all break
68
+
69
+ console.log(report.compatibility.scores["gmail-web"]);
70
+ // { score: 75, errors: 0, warnings: 5, info: 0 }
71
+
72
+ console.log(report.spam.score); // 100 (clean)
73
+ console.log(report.accessibility.score); // 88
74
+ console.log(report.size.clipped); // false (under Gmail's 102KB limit)
75
+ ```
76
+
77
+ ## Score too low? Fix it
78
+
79
+ Score too low? Fix it automatically:
80
+
81
+ ```typescript
82
+ import { generateAiFix, AI_FIX_SYSTEM_PROMPT } from "@emailens/engine";
83
+
84
+ const { code } = await generateAiFix({
85
+ originalHtml: html,
86
+ warnings: report.compatibility.warnings,
87
+ scores: report.compatibility.scores,
88
+ scope: "outlook-windows",
89
+ format: "jsx",
90
+ provider: async (prompt) => {
91
+ // Any LLM — Claude, GPT, etc.
92
+ const msg = await anthropic.messages.create({
93
+ model: "claude-sonnet-4-6",
94
+ max_tokens: 8192,
95
+ system: AI_FIX_SYSTEM_PROMPT,
96
+ messages: [{ role: "user", content: prompt }],
97
+ });
98
+ return msg.content[0].type === "text" ? msg.content[0].text : "";
99
+ },
100
+ });
101
+ // code → JSX with <Table> layout, VML roundrects, inline fallbacks
102
+ ```
103
+
104
+ ## What It Catches
105
+
106
+ 10 analysis engines, one `auditEmail()` call.
107
+
108
+ - **CSS compatibility** — 250+ properties tested across 21 email clients, with fix snippets and AI-powered auto-fix
109
+ - **Content overflow** — fixed widths wider than the email frame and unbreakable strings that force horizontal scrolling
110
+ - **Visual bugs** — gradients/background images with no color fallback (invisible content in Outlook) and fonts with no web-safe fallback, each with a concrete fix
111
+ - **Spam scoring** — 45+ signals modeled after SpamAssassin, CAN-SPAM, and GDPR
112
+ - **Accessibility** — WCAG contrast ratios, alt text, semantic structure, heading hierarchy
113
+ - **Link validation** — broken hrefs, insecure HTTP, `javascript:` protocols, deceptive URLs
114
+ - **Image analysis** — missing dimensions, oversized data URIs, tracking pixels, WebP/SVG format
115
+ - **Inbox preview** — subject/preheader truncation per client, Gmail clipping detection
116
+ - **Domain authentication** — SPF, DKIM, DMARC, MX, and BIMI DNS record validation
117
+ - **Template variables** — unresolved merge tags across 6 template systems (Handlebars, ERB, Mailchimp, etc.)
118
+
119
+ Every finding can carry its **source position** — line, column and offset, plus
120
+ every place it occurs — so a result can be pointed at, annotated on a pull
121
+ request, or fixed in place:
122
+
123
+ ```typescript
124
+ const report = auditEmail(html, { positions: true });
125
+ const w = report.compatibility.warnings[0];
126
+ `${file}:${w.loc.line}:${w.loc.column}`; // emails/welcome.html:42:8
127
+ w.locs.length; // every element it breaks on
128
+ ```
129
+
130
+ ## Installation
131
+
132
+ ```bash
133
+ npm install @emailens/engine
134
+ ```
135
+
136
+ Three entry points:
137
+
138
+ | Import | Description |
139
+ |---|---|
140
+ | `@emailens/engine` | Core analysis — CSS, spam, a11y, links, images, inbox preview, size, templates, AI fix |
141
+ | `@emailens/engine/compile` | JSX / MJML / Maizzle HTML compilers |
142
+ | `@emailens/engine/server` | Node-only: DNS deliverability checks, SpamAssassin integration |
143
+
144
+ ## Why Emailens?
145
+
146
+ - **Offline-first** runs entirely locally, no network calls required (except DNS deliverability checks)
147
+ - **Unified audit** one function call returns CSS compatibility, spam, accessibility, links, images, inbox preview, size, and template checks
148
+ - **Framework-aware** — fix snippets tailored to React Email (JSX), MJML, and Maizzle
149
+ - **AI-ready** structural issues get LLM-powered auto-fix with any provider (Claude, GPT, etc.)
150
+ - **Programmable** — TypeScript API, not a GUI — integrate into CI, editors, or build pipelines
151
+
152
+ | | @emailens/engine | Litmus | Email on Acid | caniemail.com |
153
+ |---|---|---|---|---|
154
+ | Local/offline | Yes | No | No | Data only |
155
+ | Programmatic API | Yes | Limited | No | No |
156
+ | CSS + Spam + A11y | Yes | Separate tools | Separate tools | CSS only |
157
+ | AI auto-fix | Yes | No | No | No |
158
+ | Open source | MIT | No | No | Yes (data) |
159
+
160
+ ### vs other email libraries
161
+
162
+ `@emailens/engine` sits in the **QA / lint / scoring** slot it analyzes finished HTML. It's complementary to (not a replacement for) composition and inlining libraries.
163
+
164
+ | | @emailens/engine | [juice](https://github.com/automattic/juice) | [email-comb](https://github.com/codsen/email-comb) | [mjml](https://mjml.io/) | [maizzle](https://maizzle.com/) |
165
+ |---|---|---|---|---|---|
166
+ | Purpose | QA / lint / score | CSS inliner | Unused CSS pruner | MJML HTML | Tailwind → HTML |
167
+ | Per-client compatibility scoring | Yes | No | No | No | No |
168
+ | Spam / a11y / link / image analysis | Yes | No | No | No | No |
169
+ | AI-powered fix generation | Yes | No | No | No | No |
170
+ | Compose emails | Reads only | Reads only | Reads only | Yes | Yes |
171
+ | CSS inlining | No (pair with juice) | Yes | No | Yes (built-in) | Yes (built-in) |
172
+
173
+ A typical pipeline: write in **mjml** or **maizzle** inline with **juice** → audit with **@emailens/engine** → ship.
174
+
175
+ ## Supported Email Clients
176
+
177
+ | Client | ID | Category | Engine | Dark Mode |
178
+ |---|---|---|---|---|
179
+ | Gmail | `gmail-web` | Webmail | Gmail Web | Yes |
180
+ | Gmail Android | `gmail-android` | Mobile | Gmail Mobile | Yes |
181
+ | Gmail iOS | `gmail-ios` | Mobile | Gmail Mobile | Yes |
182
+ | Outlook 365 | `outlook-web` | Webmail | Outlook Web | Yes |
183
+ | Outlook (New) | `outlook-windows` | Desktop | Outlook Web | Yes |
184
+ | Outlook Classic | `outlook-windows-legacy` | Desktop | Microsoft Word | Yes |
185
+ | Outlook iOS | `outlook-ios` | Mobile | Outlook Mobile | Yes |
186
+ | Outlook Android | `outlook-android` | Mobile | Outlook Mobile | Yes |
187
+ | Outlook for Mac | `outlook-macos` | Desktop | WebKit | Yes |
188
+ | Apple Mail | `apple-mail-macos` | Desktop | WebKit | Yes |
189
+ | Apple Mail iOS | `apple-mail-ios` | Mobile | WebKit | Yes |
190
+ | Yahoo Mail | `yahoo-mail` | Webmail | Yahoo | Yes |
191
+ | Yahoo Mail Android | `yahoo-mail-android` | Mobile | Yahoo | Yes |
192
+ | Yahoo Mail iOS | `yahoo-mail-ios` | Mobile | Yahoo | Yes |
193
+ | Samsung Mail | `samsung-mail` | Mobile | Samsung | Yes |
194
+ | Thunderbird | `thunderbird` | Desktop | Gecko | No |
195
+ | HEY Mail | `hey-mail` | Webmail | WebKit | Yes |
196
+ | Proton Mail | `protonmail` | Webmail | Proton | Yes |
197
+ | AOL Mail | `aol` | Webmail | AOL | Yes |
198
+ | Fastmail | `fastmail` | Webmail | Fastmail | Yes |
199
+ | Superhuman | `superhuman` | Desktop | Blink | Yes |
200
+
201
+ ## API Documentation
202
+
203
+ Full API reference: **[docs/API.md](./docs/API.md)**
204
+
205
+ Covers:
206
+ - `auditEmail` and `createSession` — core analysis
207
+ - Standalone analyzers (CSS, spam, links, accessibility, images, inbox preview, size, templates)
208
+ - DNS deliverability and SpamAssassin integration
209
+ - Client transforms and dark mode simulation
210
+ - Compile module (JSX, MJML, Maizzle)
211
+ - AI-powered fixes and token estimation
212
+ - Performance optimization guide
213
+ - Security considerations
214
+ - Full TypeScript type definitions
215
+
216
+ ## Roadmap
217
+
218
+ See [ROADMAP.md](./ROADMAP.md) for the full picture (shipped items + items under consideration with rationale).
219
+
220
+ **Shipped:** automated caniemail.com data sync · GitHub Actions integration via `@emailens/cli` and the [Marketplace Action](https://github.com/marketplace/actions/emailens-email-preview-check) · AI-powered fix generation · compile module for JSX/MJML/Maizzle.
221
+
222
+ **Considering:** Outlook VML auto-generation · plugin system for custom analyzers · MJML/Maizzle source-level linting · ESLint plugin · spam corpus tuning · dark-mode accuracy tests.
223
+
224
+ Concrete bugs go in [Issues](https://github.com/emailens/engine/issues). Open-ended ideas live in the roadmap.
225
+
226
+ ## Contributing
227
+
228
+ Contributions are welcome! See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for architecture overview, setup instructions, and PR guidelines.
229
+
230
+ ```bash
231
+ bun install && bun test # 719 tests
232
+ ```
233
+
234
+ Optional real-render validation — renders engine output in a real browser engine (free, no Litmus/Email on Acid needed). Off by default; needs a browser-capable machine:
235
+
236
+ ```bash
237
+ bunx playwright install chromium
238
+ bun run test:render
239
+ ```
240
+
241
+ ### Data Maintenance
242
+
243
+ CSS support data is auto-synced from [caniemail.com](https://www.caniemail.com/). Other data (dark mode behavior, display limits, Superhuman overrides) is manually curated and tracked with verification dates.
244
+
245
+ ```bash
246
+ bun run sync:caniemail # Refresh CSS support matrix from caniemail.com
247
+ bun run check:freshness # Flag stale data sources (exits 1 if any overdue)
248
+ ```
249
+
250
+ See [CONTRIBUTING.md](./CONTRIBUTING.md#data-sources-and-freshness) for full details on data sources and verification procedures.
251
+
252
+ ## License
253
+
254
+ MIT — Copyright 2025 [Emailens](https://emailens.dev)
255
+
256
+ ---
257
+
258
+ If this saved you from an Outlook surprise, [a star](https://github.com/emailens/engine) helps other email developers find it.
@@ -1,5 +1,5 @@
1
- import { u as InputFormat } from '../types-DEAn3IiX.cjs';
2
- export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-B1Rd5itD.cjs';
1
+ import { u as InputFormat } from '../types-BLR3-Fzo.cjs';
2
+ export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-DTzVpGgB.cjs';
3
3
 
4
4
  /**
5
5
  * Compile an MJML source string into an HTML email string.
@@ -1,5 +1,5 @@
1
- import { u as InputFormat } from '../types-DEAn3IiX.js';
2
- export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-D4XyNztP.js';
1
+ import { u as InputFormat } from '../types-BLR3-Fzo.js';
2
+ export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-DwBWB2kr.js';
3
3
 
4
4
  /**
5
5
  * Compile an MJML source string into an HTML email string.