@emailens/cli 0.13.8 → 0.13.10

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.
@@ -65656,14 +65656,19 @@ var CLIENT_CONFIGS = {
65656
65656
  stripMode: "strip",
65657
65657
  stripStyleAnimations: true,
65658
65658
  dropSelectors: /:nth-child|:nth-last-child|:nth-of-type|:nth-last-of-type|:not\(|:has\(|\[data-|::?before|::?after|(?:[.#][\w-]+|\])(?:\[[^\]]*\])*:(?:first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|link|visited|checked|hover|focus|active|target)/,
65659
- dropAtRules: /^@supports\b|^@media\s+(?:only\s+)?[a-z]+\s*$|^@media\b.*[<>=]/i,
65659
+ // No web font either: a Google Fonts <link>, an @import and a remote
65660
+ // @font-face all fell back to the stack's next font on real Outlook for
65661
+ // Mac, where Apple Mail on the same Mac drew them (real-device runs
65662
+ // 6UOu1JWi1l9C, Z2Hn_aEsftuG, _YHEeChhj-3_; caniemail agrees). The
65663
+ // <link> goes with stripExternalStylesheets below.
65664
+ dropAtRules: /^@supports\b|^@media\s+(?:only\s+)?[a-z]+\s*$|^@media\b.*[<>=]|^@font-face\b|^@import\b/i,
65660
65665
  dropValues: /minmax\(|repeat\(|conic-gradient\(|linear-gradient\(|radial-gradient\(|var\(|calc\(|min\(|max\(|clamp\(|\b(?:hsla?|hwb|lab|lch|oklab|oklch|color)\(|^position:\s*(?:relative|absolute|fixed)/,
65661
65666
  dropProperties: /^(?:transform|transition(?:-[a-z-]+)?|animation(?:-[a-z-]+)?|text-shadow|filter|clip-path|gap|row-gap|(?:padding|margin|border|inset)-(?:inline|block)(?:-[a-z-]+)?|(?:min-|max-)?(?:inline|block)-size)$/,
65662
65667
  dropNesting: true,
65663
65668
  dropElements: "picture source",
65664
65669
  dropAttributes: /^srcset$/,
65665
65670
  inlineAndStripStyles: false,
65666
- stripExternalStylesheets: false,
65671
+ stripExternalStylesheets: true,
65667
65672
  stripForms: false,
65668
65673
  stripSvg: true
65669
65674
  },
@@ -65696,6 +65701,12 @@ var CLIENT_CONFIGS = {
65696
65701
  // An inline font-family naming a quoted font is dropped whole; <style>
65697
65702
  // keeps it (2026-10-28, analyze.ts step 7).
65698
65703
  valueStrips: [{ prop: "font-family", pattern: /['"]/ }],
65704
+ // A radial-gradient button drew as its flat background-color, inline and
65705
+ // from <style> alike (real-device capture of preview J9vFS4nm_LGl,
65706
+ // 2026-10-30; caniemail agrees). ponytail: radial only; linear is also "n"
65707
+ // in caniemail but every Yahoo capture we hold has a bgcolor fallback
65708
+ // under it, so it is unmeasured. Probe a fallback-less one before adding.
65709
+ dropValues: /radial-gradient\(/i,
65699
65710
  // Real Yahoo web drew foodpanda's `url(...) center / cover` logos at their
65700
65711
  // 236px and its `0% 0% / 100% 100%` coupon at the picture's own size,
65701
65712
  // cropped to the cell (emailens agreement run, 2026-10-28).
@@ -65781,7 +65792,10 @@ var CLIENT_CONFIGS = {
65781
65792
  inlineAndStripStyles: false,
65782
65793
  stripExternalStylesheets: true,
65783
65794
  stripForms: true,
65784
- stripSvg: false
65795
+ stripSvg: false,
65796
+ // Real Proton web drew 9 of 9 &nbsp;-only <p>/<div><span> spacers at no
65797
+ // height (real-device runs _YHEeChhj-3_, Z2Hn_aEsftuG; preview ckKDNoBCeSKz).
65798
+ emptyNbspBlocks: true
65785
65799
  },
65786
65800
  "aol": {
65787
65801
  id: "aol",
@@ -65863,8 +65877,9 @@ function applyStyleDrops($3, config) {
65863
65877
  }
65864
65878
  });
65865
65879
  }
65866
- const dropDeclarations = (ast, inline) => {
65867
- if (!dropValues && !dropProperties) return;
65880
+ const dropDeclarations = (ast) => {
65881
+ if (!dropValues && !dropProperties) return false;
65882
+ let changed = false;
65868
65883
  fy(ast, {
65869
65884
  visit: "Declaration",
65870
65885
  enter(node, item, list) {
@@ -65872,15 +65887,18 @@ function applyStyleDrops($3, config) {
65872
65887
  if (dropProperties == null ? void 0 : dropProperties.test(node.property)) {
65873
65888
  list.remove(item);
65874
65889
  dropped.add(node.property);
65890
+ changed = true;
65875
65891
  return;
65876
65892
  }
65877
65893
  const m2 = dropValues ? `${node.property}:${hy(node.value)}`.match(dropValues) : null;
65878
65894
  if (m2) {
65879
65895
  list.remove(item);
65880
65896
  dropped.add(m2[0].replace(/\($/, "()"));
65897
+ changed = true;
65881
65898
  }
65882
65899
  }
65883
65900
  });
65901
+ return changed;
65884
65902
  };
65885
65903
  $3("style").each((_3, el2) => {
65886
65904
  let ast;
@@ -65919,7 +65937,7 @@ function applyStyleDrops($3, config) {
65919
65937
  }
65920
65938
  });
65921
65939
  }
65922
- dropDeclarations(ast, false);
65940
+ dropDeclarations(ast);
65923
65941
  $3(el2).text(hy(ast));
65924
65942
  });
65925
65943
  if (dropValues || dropProperties) {
@@ -65931,8 +65949,7 @@ function applyStyleDrops($3, config) {
65931
65949
  } catch (e2) {
65932
65950
  return;
65933
65951
  }
65934
- dropDeclarations(ast, true);
65935
- $3(el2).attr("style", hy(ast));
65952
+ if (dropDeclarations(ast)) $3(el2).attr("style", hy(ast));
65936
65953
  });
65937
65954
  }
65938
65955
  return [...dropped];
@@ -66044,6 +66061,12 @@ function applyTransformDom($3, html3, config, framework) {
66044
66061
  $3(el2).replaceWith($3(el2).html() || "");
66045
66062
  });
66046
66063
  }
66064
+ if (config.emptyNbspBlocks) {
66065
+ $3("p, div, span").each((_3, el2) => {
66066
+ const $el = $3(el2);
66067
+ if ($el.children().length === 0 && /^[\s ]* [\s ]*$/.test($el.text())) $el.empty();
66068
+ });
66069
+ }
66047
66070
  if (config.dropFormActions && $3("form").length > 0) {
66048
66071
  warnings.push(makeWarning({
66049
66072
  severity: "error",
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  simulateDarkMode,
33
33
  toFramework,
34
34
  transformForAllClients
35
- } from "./chunk-6UIQ65GO.js";
35
+ } from "./chunk-56SQXQSC.js";
36
36
  import "./chunk-ABDTBRVK.js";
37
37
  import "./chunk-2AP7CT6R.js";
38
38
  import "./chunk-NXBRJX3V.js";
@@ -35704,14 +35704,19 @@ h1 {
35704
35704
  stripMode: "strip",
35705
35705
  stripStyleAnimations: true,
35706
35706
  dropSelectors: /:nth-child|:nth-last-child|:nth-of-type|:nth-last-of-type|:not\(|:has\(|\[data-|::?before|::?after|(?:[.#][\w-]+|\])(?:\[[^\]]*\])*:(?:first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|link|visited|checked|hover|focus|active|target)/,
35707
- dropAtRules: /^@supports\b|^@media\s+(?:only\s+)?[a-z]+\s*$|^@media\b.*[<>=]/i,
35707
+ // No web font either: a Google Fonts <link>, an @import and a remote
35708
+ // @font-face all fell back to the stack's next font on real Outlook for
35709
+ // Mac, where Apple Mail on the same Mac drew them (real-device runs
35710
+ // 6UOu1JWi1l9C, Z2Hn_aEsftuG, _YHEeChhj-3_; caniemail agrees). The
35711
+ // <link> goes with stripExternalStylesheets below.
35712
+ dropAtRules: /^@supports\b|^@media\s+(?:only\s+)?[a-z]+\s*$|^@media\b.*[<>=]|^@font-face\b|^@import\b/i,
35708
35713
  dropValues: /minmax\(|repeat\(|conic-gradient\(|linear-gradient\(|radial-gradient\(|var\(|calc\(|min\(|max\(|clamp\(|\b(?:hsla?|hwb|lab|lch|oklab|oklch|color)\(|^position:\s*(?:relative|absolute|fixed)/,
35709
35714
  dropProperties: /^(?:transform|transition(?:-[a-z-]+)?|animation(?:-[a-z-]+)?|text-shadow|filter|clip-path|gap|row-gap|(?:padding|margin|border|inset)-(?:inline|block)(?:-[a-z-]+)?|(?:min-|max-)?(?:inline|block)-size)$/,
35710
35715
  dropNesting: true,
35711
35716
  dropElements: "picture source",
35712
35717
  dropAttributes: /^srcset$/,
35713
35718
  inlineAndStripStyles: false,
35714
- stripExternalStylesheets: false,
35719
+ stripExternalStylesheets: true,
35715
35720
  stripForms: false,
35716
35721
  stripSvg: true
35717
35722
  },
@@ -35744,6 +35749,12 @@ h1 {
35744
35749
  // An inline font-family naming a quoted font is dropped whole; <style>
35745
35750
  // keeps it (2026-10-28, analyze.ts step 7).
35746
35751
  valueStrips: [{ prop: "font-family", pattern: /['"]/ }],
35752
+ // A radial-gradient button drew as its flat background-color, inline and
35753
+ // from <style> alike (real-device capture of preview J9vFS4nm_LGl,
35754
+ // 2026-10-30; caniemail agrees). ponytail: radial only; linear is also "n"
35755
+ // in caniemail but every Yahoo capture we hold has a bgcolor fallback
35756
+ // under it, so it is unmeasured. Probe a fallback-less one before adding.
35757
+ dropValues: /radial-gradient\(/i,
35747
35758
  // Real Yahoo web drew foodpanda's `url(...) center / cover` logos at their
35748
35759
  // 236px and its `0% 0% / 100% 100%` coupon at the picture's own size,
35749
35760
  // cropped to the cell (emailens agreement run, 2026-10-28).
@@ -35829,7 +35840,10 @@ h1 {
35829
35840
  inlineAndStripStyles: false,
35830
35841
  stripExternalStylesheets: true,
35831
35842
  stripForms: true,
35832
- stripSvg: false
35843
+ stripSvg: false,
35844
+ // Real Proton web drew 9 of 9 &nbsp;-only <p>/<div><span> spacers at no
35845
+ // height (real-device runs _YHEeChhj-3_, Z2Hn_aEsftuG; preview ckKDNoBCeSKz).
35846
+ emptyNbspBlocks: true
35833
35847
  },
35834
35848
  "aol": {
35835
35849
  id: "aol",
@@ -35911,8 +35925,9 @@ h1 {
35911
35925
  }
35912
35926
  });
35913
35927
  }
35914
- const dropDeclarations = (ast, inline) => {
35915
- if (!dropValues && !dropProperties) return;
35928
+ const dropDeclarations = (ast) => {
35929
+ if (!dropValues && !dropProperties) return false;
35930
+ let changed = false;
35916
35931
  csstree3.walk(ast, {
35917
35932
  visit: "Declaration",
35918
35933
  enter(node, item, list) {
@@ -35920,15 +35935,18 @@ h1 {
35920
35935
  if (dropProperties == null ? void 0 : dropProperties.test(node.property)) {
35921
35936
  list.remove(item);
35922
35937
  dropped.add(node.property);
35938
+ changed = true;
35923
35939
  return;
35924
35940
  }
35925
35941
  const m = dropValues ? `${node.property}:${csstree3.generate(node.value)}`.match(dropValues) : null;
35926
35942
  if (m) {
35927
35943
  list.remove(item);
35928
35944
  dropped.add(m[0].replace(/\($/, "()"));
35945
+ changed = true;
35929
35946
  }
35930
35947
  }
35931
35948
  });
35949
+ return changed;
35932
35950
  };
35933
35951
  $("style").each((_, el) => {
35934
35952
  let ast;
@@ -35967,7 +35985,7 @@ h1 {
35967
35985
  }
35968
35986
  });
35969
35987
  }
35970
- dropDeclarations(ast, false);
35988
+ dropDeclarations(ast);
35971
35989
  $(el).text(csstree3.generate(ast));
35972
35990
  });
35973
35991
  if (dropValues || dropProperties) {
@@ -35979,8 +35997,7 @@ h1 {
35979
35997
  } catch (e) {
35980
35998
  return;
35981
35999
  }
35982
- dropDeclarations(ast, true);
35983
- $(el).attr("style", csstree3.generate(ast));
36000
+ if (dropDeclarations(ast)) $(el).attr("style", csstree3.generate(ast));
35984
36001
  });
35985
36002
  }
35986
36003
  return [...dropped];
@@ -36095,6 +36112,12 @@ h1 {
36095
36112
  $(el).replaceWith($(el).html() || "");
36096
36113
  });
36097
36114
  }
36115
+ if (config.emptyNbspBlocks) {
36116
+ $("p, div, span").each((_, el) => {
36117
+ const $el = $(el);
36118
+ if ($el.children().length === 0 && /^[\s ]* [\s ]*$/.test($el.text())) $el.empty();
36119
+ });
36120
+ }
36098
36121
  if (config.dropFormActions && $("form").length > 0) {
36099
36122
  warnings.push(makeWarning({
36100
36123
  severity: "error",
@@ -42950,7 +42973,7 @@ Href: ${href}`
42950
42973
  // package.json
42951
42974
  var package_default = {
42952
42975
  name: "@emailens/cli",
42953
- version: "0.13.8",
42976
+ version: "0.13.10",
42954
42977
  description: "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
42955
42978
  type: "module",
42956
42979
  bin: {
@@ -42991,7 +43014,7 @@ var package_default = {
42991
43014
  },
42992
43015
  devDependencies: {
42993
43016
  "@anthropic-ai/sdk": "^0.52.0",
42994
- "@emailens/engine": "^0.18.10",
43017
+ "@emailens/engine": "^0.18.12",
42995
43018
  "@types/bun": "^1.4.0",
42996
43019
  "@types/mjml": "^4.7.4",
42997
43020
  "@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-6UIQ65GO.js";
8
+ } from "./chunk-56SQXQSC.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.8",
3
+ "version": "0.13.10",
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.10",
44
+ "@emailens/engine": "^0.18.12",
45
45
  "@types/bun": "^1.4.0",
46
46
  "@types/mjml": "^4.7.4",
47
47
  "@types/node": "^25.9.5",