@emailens/engine 0.8.1 → 0.8.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/dist/index.d.cts CHANGED
@@ -156,7 +156,7 @@ declare const AI_FIX_SYSTEM_PROMPT = "You are an expert email developer speciali
156
156
 
157
157
  /**
158
158
  * CSS/HTML feature support matrix — auto-generated from caniemail.com.
159
- * Last synced: 2026-03-02
159
+ * Last synced: 2026-03-04
160
160
  * caniemail last updated: 2026-02-16 15:39:06 +0000
161
161
  *
162
162
  * 251 features across 12 email clients.
package/dist/index.d.ts CHANGED
@@ -156,7 +156,7 @@ declare const AI_FIX_SYSTEM_PROMPT = "You are an expert email developer speciali
156
156
 
157
157
  /**
158
158
  * CSS/HTML feature support matrix — auto-generated from caniemail.com.
159
- * Last synced: 2026-03-02
159
+ * Last synced: 2026-03-04
160
160
  * caniemail last updated: 2026-02-16 15:39:06 +0000
161
161
  *
162
162
  * 251 features across 12 email clients.
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ var EMAIL_CLIENTS = [
46
46
  name: "Outlook Windows",
47
47
  category: "desktop",
48
48
  engine: "Microsoft Word",
49
- darkModeSupport: false,
49
+ darkModeSupport: true,
50
50
  icon: "monitor"
51
51
  },
52
52
  {
@@ -86,7 +86,7 @@ var EMAIL_CLIENTS = [
86
86
  name: "Thunderbird",
87
87
  category: "desktop",
88
88
  engine: "Gecko",
89
- darkModeSupport: false,
89
+ darkModeSupport: true,
90
90
  icon: "monitor"
91
91
  },
92
92
  {
@@ -3633,14 +3633,16 @@ var CSS_SUPPORT = {
3633
3633
  };
3634
3634
  var GMAIL_STRIPPED_PROPERTIES = /* @__PURE__ */ new Set([
3635
3635
  "position",
3636
- "overflow",
3637
3636
  "visibility",
3638
3637
  "box-shadow",
3639
3638
  "text-shadow",
3640
3639
  "transform",
3641
3640
  "animation",
3642
3641
  "transition",
3643
- "gap"
3642
+ "gap",
3643
+ "filter",
3644
+ "clip-path",
3645
+ "backdrop-filter"
3644
3646
  ]);
3645
3647
  var OUTLOOK_WORD_UNSUPPORTED = /* @__PURE__ */ new Set([
3646
3648
  "border-radius",
@@ -3666,7 +3668,11 @@ var OUTLOOK_WORD_UNSUPPORTED = /* @__PURE__ */ new Set([
3666
3668
  "word-break",
3667
3669
  "overflow-wrap",
3668
3670
  "text-overflow",
3669
- "border-spacing"
3671
+ "border-spacing",
3672
+ "filter",
3673
+ "clip-path",
3674
+ "backdrop-filter",
3675
+ "visibility"
3670
3676
  ]);
3671
3677
  var STRUCTURAL_FIX_PROPERTIES = /* @__PURE__ */ new Set([
3672
3678
  "display:flex",
@@ -5504,10 +5510,10 @@ var GMAIL_CLIP_WARNING_THRESHOLD = 90 * 1024;
5504
5510
  var CLIENT_DISPLAY_LIMITS = [
5505
5511
  { client: "Gmail (Web)", subjectLimit: 70, preheaderLimit: 90 },
5506
5512
  { client: "Gmail (Mobile)", subjectLimit: 40, preheaderLimit: 90 },
5507
- { client: "Outlook (Web)", subjectLimit: 60, preheaderLimit: 35 },
5513
+ { client: "Outlook (Web)", subjectLimit: 60, preheaderLimit: 90 },
5508
5514
  { client: "Outlook (Desktop)", subjectLimit: 55, preheaderLimit: 35 },
5509
5515
  { client: "Apple Mail (macOS)", subjectLimit: 78, preheaderLimit: 140 },
5510
- { client: "Apple Mail (iOS)", subjectLimit: 35, preheaderLimit: 90 },
5516
+ { client: "Apple Mail (iOS)", subjectLimit: 41, preheaderLimit: 90 },
5511
5517
  { client: "Yahoo Mail", subjectLimit: 46, preheaderLimit: 100 },
5512
5518
  { client: "Samsung Email", subjectLimit: 40, preheaderLimit: 70 }
5513
5519
  ];
@@ -6595,17 +6601,32 @@ function simulateDarkMode(html, clientId) {
6595
6601
  });
6596
6602
  switch (clientId) {
6597
6603
  case "gmail-web":
6598
- case "gmail-android":
6604
+ break;
6599
6605
  case "gmail-ios":
6600
- applyColorInversion($, clientId === "gmail-android" ? "full" : "partial");
6606
+ applyColorInversion($, "full");
6607
+ break;
6608
+ case "gmail-android":
6609
+ applyColorInversion($, "partial");
6601
6610
  break;
6602
6611
  case "outlook-web":
6603
6612
  applyColorInversion($, "partial");
6604
6613
  break;
6614
+ case "outlook-windows":
6615
+ applyColorInversion($, "full");
6616
+ if (!html.includes("prefers-color-scheme")) {
6617
+ warnings.push({
6618
+ severity: "info",
6619
+ client: clientId,
6620
+ property: "dark-mode",
6621
+ message: "Outlook Windows applies full color inversion in dark mode. Colors may shift unexpectedly.",
6622
+ suggestion: "Test with dark mode enabled. Use [data-ogsc] or [data-ogsb] overrides to control Outlook dark mode rendering."
6623
+ });
6624
+ }
6625
+ break;
6605
6626
  case "apple-mail-macos":
6606
6627
  case "apple-mail-ios":
6607
- applyColorInversion($, "partial");
6608
6628
  if (!html.includes("prefers-color-scheme")) {
6629
+ applyColorInversion($, "partial");
6609
6630
  warnings.push({
6610
6631
  severity: "info",
6611
6632
  client: clientId,
@@ -6616,10 +6637,30 @@ function simulateDarkMode(html, clientId) {
6616
6637
  }
6617
6638
  break;
6618
6639
  case "yahoo-mail":
6619
- applyColorInversion($, "partial");
6620
6640
  break;
6621
6641
  case "samsung-mail":
6622
- applyColorInversion($, "full");
6642
+ if (!html.includes("prefers-color-scheme")) {
6643
+ applyColorInversion($, "partial");
6644
+ warnings.push({
6645
+ severity: "info",
6646
+ client: clientId,
6647
+ property: "dark-mode",
6648
+ message: "Samsung Mail supports @media (prefers-color-scheme: dark). Consider adding dark mode styles.",
6649
+ suggestion: "Add a @media (prefers-color-scheme: dark) block with inverted colors for the best dark mode experience."
6650
+ });
6651
+ }
6652
+ break;
6653
+ case "thunderbird":
6654
+ if (!html.includes("prefers-color-scheme")) {
6655
+ applyColorInversion($, "full");
6656
+ warnings.push({
6657
+ severity: "info",
6658
+ client: clientId,
6659
+ property: "dark-mode",
6660
+ message: "Thunderbird supports @media (prefers-color-scheme: dark). Consider adding dark mode styles.",
6661
+ suggestion: "Add a @media (prefers-color-scheme: dark) block with inverted colors for the best dark mode experience."
6662
+ });
6663
+ }
6623
6664
  break;
6624
6665
  case "hey-mail":
6625
6666
  applyColorInversion($, "partial");
@@ -6645,9 +6686,6 @@ function simulateDarkMode(html, clientId) {
6645
6686
  });
6646
6687
  }
6647
6688
  break;
6648
- case "outlook-windows":
6649
- case "thunderbird":
6650
- break;
6651
6689
  }
6652
6690
  $("body").css("background-color", "#1a1a1a");
6653
6691
  $("body").css("color", "#e0e0e0");