@emailens/cli 0.13.6 → 0.13.8

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.
@@ -63754,9 +63754,10 @@ function dropWordUnknownColors(html3) {
63754
63754
  function markHiddenCells(html3) {
63755
63755
  if (!/display\s*:\s*none/i.test(html3)) return html3;
63756
63756
  return html3.replace(
63757
- /(<(?:td|th|tr|span|div|table)\b[^>]*?\sstyle\s*=\s*)(?:"([^"]*)"|'([^']*)')/gi,
63757
+ /<v:textbox\b[\s\S]*?<\/v:textbox>|(<(?:td|th|tr|span|div|table)\b[^>]*?\sstyle\s*=\s*)(?:"([^"]*)"|'([^']*)')/gi,
63758
63758
  (whole, lead, dq, sq) => {
63759
63759
  var _a22;
63760
+ if (lead === void 0) return whole;
63760
63761
  const style = (_a22 = dq != null ? dq : sq) != null ? _a22 : "";
63761
63762
  if (!/display\s*:\s*none/i.test(style) || /mso-hide\s*:/i.test(style)) return whole;
63762
63763
  const quote = dq === void 0 ? "'" : '"';
@@ -67881,6 +67882,14 @@ function checkVml(html3, options) {
67881
67882
  detail: `Outlook needs the matching </v:${tag.name}>, usually in a later conditional-comment block. Without it the shape swallows the rest of the email.`
67882
67883
  }, locAt(source, tag.offset, tag.length)));
67883
67884
  }
67885
+ if (/<head[\s>]/i.test(html3) && !/<o:PixelsPerInch[\s>]/i.test(html3)) {
67886
+ add2(issues, seen, "ppi", withLoc({
67887
+ rule: "vml-pixels-per-inch",
67888
+ severity: "warning",
67889
+ message: `This email uses VML but does not declare <o:PixelsPerInch>96</o:PixelsPerInch>.`,
67890
+ detail: `Verified in Outlook Classic at 125% display scaling, common on Windows laptops: VML stays at its pixel size while the text grows. A 203px button lost the last word of its label, pictures came out too small and shapes stopped lining up. At 100% nothing looks wrong, so previews miss it. Add xmlns:o="urn:schemas-microsoft-com:office:office" to <html> and put this in <head>: <!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->`
67891
+ }, locAt(source, tags[0].offset, tags[0].length)));
67892
+ }
67884
67893
  return { hasVml: true, issues };
67885
67894
  }
67886
67895
  var WORD = "outlook-windows-legacy";
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  simulateDarkMode,
33
33
  toFramework,
34
34
  transformForAllClients
35
- } from "./chunk-SBRXUNV5.js";
35
+ } from "./chunk-6UIQ65GO.js";
36
36
  import "./chunk-ABDTBRVK.js";
37
37
  import "./chunk-2AP7CT6R.js";
38
38
  import "./chunk-NXBRJX3V.js";
@@ -33792,9 +33792,10 @@ h1 {
33792
33792
  function markHiddenCells(html) {
33793
33793
  if (!/display\s*:\s*none/i.test(html)) return html;
33794
33794
  return html.replace(
33795
- /(<(?:td|th|tr|span|div|table)\b[^>]*?\sstyle\s*=\s*)(?:"([^"]*)"|'([^']*)')/gi,
33795
+ /<v:textbox\b[\s\S]*?<\/v:textbox>|(<(?:td|th|tr|span|div|table)\b[^>]*?\sstyle\s*=\s*)(?:"([^"]*)"|'([^']*)')/gi,
33796
33796
  (whole, lead, dq, sq) => {
33797
33797
  var _a2;
33798
+ if (lead === void 0) return whole;
33798
33799
  const style = (_a2 = dq != null ? dq : sq) != null ? _a2 : "";
33799
33800
  if (!/display\s*:\s*none/i.test(style) || /mso-hide\s*:/i.test(style)) return whole;
33800
33801
  const quote = dq === void 0 ? "'" : '"';
@@ -37972,6 +37973,14 @@ h1 {
37972
37973
  detail: `Outlook needs the matching </v:${tag.name}>, usually in a later conditional-comment block. Without it the shape swallows the rest of the email.`
37973
37974
  }, locAt(source, tag.offset, tag.length)));
37974
37975
  }
37976
+ if (/<head[\s>]/i.test(html) && !/<o:PixelsPerInch[\s>]/i.test(html)) {
37977
+ add(issues, seen, "ppi", withLoc({
37978
+ rule: "vml-pixels-per-inch",
37979
+ severity: "warning",
37980
+ message: `This email uses VML but does not declare <o:PixelsPerInch>96</o:PixelsPerInch>.`,
37981
+ detail: `Verified in Outlook Classic at 125% display scaling, common on Windows laptops: VML stays at its pixel size while the text grows. A 203px button lost the last word of its label, pictures came out too small and shapes stopped lining up. At 100% nothing looks wrong, so previews miss it. Add xmlns:o="urn:schemas-microsoft-com:office:office" to <html> and put this in <head>: <!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->`
37982
+ }, locAt(source, tags[0].offset, tags[0].length)));
37983
+ }
37975
37984
  return { hasVml: true, issues };
37976
37985
  }
37977
37986
  var WORD = "outlook-windows-legacy";
@@ -42941,7 +42950,7 @@ Href: ${href}`
42941
42950
  // package.json
42942
42951
  var package_default = {
42943
42952
  name: "@emailens/cli",
42944
- version: "0.13.6",
42953
+ version: "0.13.8",
42945
42954
  description: "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
42946
42955
  type: "module",
42947
42956
  bin: {
@@ -42982,7 +42991,7 @@ var package_default = {
42982
42991
  },
42983
42992
  devDependencies: {
42984
42993
  "@anthropic-ai/sdk": "^0.52.0",
42985
- "@emailens/engine": "^0.18.8",
42994
+ "@emailens/engine": "^0.18.10",
42986
42995
  "@types/bun": "^1.4.0",
42987
42996
  "@types/mjml": "^4.7.4",
42988
42997
  "@types/node": "^25.9.5",
package/dist/test.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  auditEmail,
6
6
  flattenToLintIssues,
7
7
  loadProjectConfig
8
- } from "./chunk-SBRXUNV5.js";
8
+ } from "./chunk-6UIQ65GO.js";
9
9
  import "./chunk-ABDTBRVK.js";
10
10
  import "./chunk-2AP7CT6R.js";
11
11
  import "./chunk-NXBRJX3V.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailens/cli",
3
- "version": "0.13.6",
3
+ "version": "0.13.8",
4
4
  "description": "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@anthropic-ai/sdk": "^0.52.0",
44
- "@emailens/engine": "^0.18.8",
44
+ "@emailens/engine": "^0.18.10",
45
45
  "@types/bun": "^1.4.0",
46
46
  "@types/mjml": "^4.7.4",
47
47
  "@types/node": "^25.9.5",