@emailens/engine 0.8.2 → 0.8.3

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
@@ -155,7 +155,7 @@ Covers:
155
155
 
156
156
  - [ ] Outlook VML auto-generation
157
157
  - [ ] GitHub Actions integration (score thresholds in CI)
158
- - [ ] Automated caniemail.com data sync
158
+ - [x] Automated caniemail.com data sync
159
159
  - [ ] Real-time rendering previews
160
160
  - [ ] MJML/Maizzle source-level linting
161
161
  - [ ] Plugin system for custom analyzers
@@ -165,9 +165,20 @@ Covers:
165
165
  Contributions are welcome! See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for architecture overview, setup instructions, and PR guidelines.
166
166
 
167
167
  ```bash
168
- bun install && bun test # 574 tests
168
+ bun install && bun test # 580 tests
169
169
  ```
170
170
 
171
+ ### Data Maintenance
172
+
173
+ 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.
174
+
175
+ ```bash
176
+ bun run sync:caniemail # Refresh CSS support matrix from caniemail.com
177
+ bun run check:freshness # Flag stale data sources (exits 1 if any overdue)
178
+ ```
179
+
180
+ See [CONTRIBUTING.md](./CONTRIBUTING.md#data-sources-and-freshness) for full details on data sources and verification procedures.
181
+
171
182
  ## License
172
183
 
173
184
  MIT — Copyright 2025 [Emailens](https://emailens.dev)
package/dist/index.cjs CHANGED
@@ -5606,7 +5606,7 @@ var GMAIL_CLIP_THRESHOLD = 102 * 1024;
5606
5606
  var GMAIL_CLIP_WARNING_THRESHOLD = 90 * 1024;
5607
5607
  var CLIENT_DISPLAY_LIMITS = [
5608
5608
  { client: "Gmail (Web)", subjectLimit: 70, preheaderLimit: 90 },
5609
- { client: "Gmail (Mobile)", subjectLimit: 40, preheaderLimit: 90 },
5609
+ { client: "Gmail (Mobile)", subjectLimit: 40, preheaderLimit: 45 },
5610
5610
  { client: "Outlook (Web)", subjectLimit: 60, preheaderLimit: 90 },
5611
5611
  { client: "Outlook (Desktop)", subjectLimit: 55, preheaderLimit: 35 },
5612
5612
  { client: "Apple Mail (macOS)", subjectLimit: 78, preheaderLimit: 140 },
@@ -6707,6 +6707,15 @@ function simulateDarkMode(html, clientId) {
6707
6707
  break;
6708
6708
  case "outlook-web":
6709
6709
  applyColorInversion($, "partial");
6710
+ if (!html.includes("prefers-color-scheme")) {
6711
+ warnings.push({
6712
+ severity: "info",
6713
+ client: clientId,
6714
+ property: "dark-mode",
6715
+ message: "Outlook.com applies partial color inversion in dark mode.",
6716
+ suggestion: "Use [data-ogsc] or [data-ogsb] CSS attribute selectors to override Outlook.com's dark mode color changes."
6717
+ });
6718
+ }
6710
6719
  break;
6711
6720
  case "outlook-windows":
6712
6721
  applyColorInversion($, "full");
@@ -6716,19 +6725,18 @@ function simulateDarkMode(html, clientId) {
6716
6725
  client: clientId,
6717
6726
  property: "dark-mode",
6718
6727
  message: "Outlook Windows applies full color inversion in dark mode. Colors may shift unexpectedly.",
6719
- suggestion: "Test with dark mode enabled. Use [data-ogsc] or [data-ogsb] overrides to control Outlook dark mode rendering."
6728
+ suggestion: "Test with dark mode enabled. The Word rendering engine offers limited control over dark mode color shifts."
6720
6729
  });
6721
6730
  }
6722
6731
  break;
6723
6732
  case "apple-mail-macos":
6724
6733
  case "apple-mail-ios":
6725
6734
  if (!html.includes("prefers-color-scheme")) {
6726
- applyColorInversion($, "partial");
6727
6735
  warnings.push({
6728
6736
  severity: "info",
6729
6737
  client: clientId,
6730
6738
  property: "dark-mode",
6731
- message: "Apple Mail supports @media (prefers-color-scheme: dark). Consider adding dark mode styles.",
6739
+ message: "Apple Mail supports @media (prefers-color-scheme: dark). Without it, email content renders unchanged in dark mode.",
6732
6740
  suggestion: "Add a @media (prefers-color-scheme: dark) block with inverted colors for the best dark mode experience."
6733
6741
  });
6734
6742
  }