@emailens/cli 0.13.15 → 0.13.17

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.
@@ -62815,8 +62815,12 @@ function backgroundShorthandColor(value) {
62815
62815
  if (!value) return null;
62816
62816
  const trimmed = value.trim();
62817
62817
  if (parseColor(trimmed)) return trimmed;
62818
- for (const token of trimmed.split(/\s+/)) {
62819
- if (token.includes("(")) continue;
62818
+ let outer = trimmed;
62819
+ for (let prev2 = ""; prev2 !== outer; ) {
62820
+ prev2 = outer;
62821
+ outer = outer.replace(/[\w-]*\([^()]*\)/g, " ");
62822
+ }
62823
+ for (const token of outer.split(/\s+/)) {
62820
62824
  if (parseColor(token)) return token;
62821
62825
  }
62822
62826
  return null;
@@ -65794,7 +65798,10 @@ var YAHOO_STRIPPED = /* @__PURE__ */ new Set(["position", "box-shadow", "transfo
65794
65798
  var YAHOO_WEB_STRIPPED = /* @__PURE__ */ new Set([
65795
65799
  ...[...YAHOO_STRIPPED].filter((p) => p !== "box-shadow"),
65796
65800
  "flex",
65797
- "flex-basis"
65801
+ "flex-basis",
65802
+ // A width:100% + padding + border-box CTA came out 566px in a 534px column
65803
+ // (J9vFS4nm_LGl, 2026-10-30): box-sizing is ignored, as caniemail lists.
65804
+ "box-sizing"
65798
65805
  ]);
65799
65806
  var GMAIL_WEB_STRIPPED = /* @__PURE__ */ new Set([...GMAIL_STRIPPED_PROPERTIES, "flex", "flex-basis"]);
65800
65807
  var CLIENT_CONFIGS = {
@@ -65875,6 +65882,13 @@ var CLIENT_CONFIGS = {
65875
65882
  { prop: "background", pattern: /linear-gradient|radial-gradient|url\(/ },
65876
65883
  { prop: "background-image", pattern: /linear-gradient|radial-gradient|url\(/ }
65877
65884
  ],
65885
+ // The same in <style> blocks: a `.mh-cta{background-image:radial-gradient}`
65886
+ // rule drew a magenta box in the sim where real Outlook Classic drew no
65887
+ // fill (real-device capture of preview J9vFS4nm_LGl, 2026-11-06).
65888
+ // ponytail: background-image only; a `background:` shorthand in <style>
65889
+ // still draws (it may carry the fallback colour Word keeps). Split it like
65890
+ // backgroundShorthandColor when a capture shows one.
65891
+ dropValues: /^background-image:.*(?:linear-gradient|radial-gradient|url)\(/,
65878
65892
  inlineAndStripStyles: false,
65879
65893
  stripExternalStylesheets: false,
65880
65894
  stripForms: false,
@@ -66557,19 +66571,21 @@ function transformForAllClients(html3, framework) {
66557
66571
  }
66558
66572
  return clientIds.map((clientId) => {
66559
66573
  const config = CLIENT_CONFIGS[clientId];
66560
- const dropSource = prepareDropSource(html3, config);
66561
- if (dropSource !== html3) {
66562
- const own = downlevelCSS(dropSource);
66563
- const result2 = applyTransformDom(load(own), own, config, framework);
66564
- result2.warnings.unshift(...dropWarnings(html3, config, clientId, framework));
66565
- return result2;
66566
- }
66567
66574
  const wordEngine = isWordEngineClient(clientId) && hasOutlookBranch;
66568
66575
  const ownSource = isWordEngineClient(clientId) && ownWordSource;
66569
- const source = ownSource ? outlookSource : downleveled;
66570
- const parsedDom = ownSource ? outlookDom : baseDom;
66571
- const clientDom = lastClientForSource.get(parsedDom) === clientId ? parsedDom : load(parsedDom.root().clone().toArray()[0]);
66572
- const result = applyTransformDom(clientDom, source, CLIENT_CONFIGS[clientId], framework);
66576
+ const raw = ownSource ? wordRaw : html3;
66577
+ const dropSource = prepareDropSource(raw, config);
66578
+ let result;
66579
+ if (dropSource !== raw) {
66580
+ const own = downlevelCSS(dropSource);
66581
+ result = applyTransformDom(load(own), own, config, framework);
66582
+ result.warnings.unshift(...dropWarnings(raw, config, clientId, framework));
66583
+ } else {
66584
+ const source = ownSource ? outlookSource : downleveled;
66585
+ const parsedDom = ownSource ? outlookDom : baseDom;
66586
+ const clientDom = lastClientForSource.get(parsedDom) === clientId ? parsedDom : load(parsedDom.root().clone().toArray()[0]);
66587
+ result = applyTransformDom(clientDom, source, config, framework);
66588
+ }
66573
66589
  if (wordEngine) result.html = vmlToCss(result.html);
66574
66590
  if (isWordEngineClient(clientId)) result.html = applyMsoHide(result.html);
66575
66591
  return result;
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  simulateDarkMode,
33
33
  toFramework,
34
34
  transformForAllClients
35
- } from "./chunk-W77SJYOR.js";
35
+ } from "./chunk-ICIM22UE.js";
36
36
  import "./chunk-ABDTBRVK.js";
37
37
  import "./chunk-2AP7CT6R.js";
38
38
  import "./chunk-NXBRJX3V.js";
@@ -32846,8 +32846,12 @@ h1 {
32846
32846
  if (!value) return null;
32847
32847
  const trimmed = value.trim();
32848
32848
  if (parseColor(trimmed)) return trimmed;
32849
- for (const token of trimmed.split(/\s+/)) {
32850
- if (token.includes("(")) continue;
32849
+ let outer = trimmed;
32850
+ for (let prev = ""; prev !== outer; ) {
32851
+ prev = outer;
32852
+ outer = outer.replace(/[\w-]*\([^()]*\)/g, " ");
32853
+ }
32854
+ for (const token of outer.split(/\s+/)) {
32851
32855
  if (parseColor(token)) return token;
32852
32856
  }
32853
32857
  return null;
@@ -35842,7 +35846,10 @@ h1 {
35842
35846
  var YAHOO_WEB_STRIPPED = /* @__PURE__ */ new Set([
35843
35847
  ...[...YAHOO_STRIPPED].filter((p) => p !== "box-shadow"),
35844
35848
  "flex",
35845
- "flex-basis"
35849
+ "flex-basis",
35850
+ // A width:100% + padding + border-box CTA came out 566px in a 534px column
35851
+ // (J9vFS4nm_LGl, 2026-10-30): box-sizing is ignored, as caniemail lists.
35852
+ "box-sizing"
35846
35853
  ]);
35847
35854
  var GMAIL_WEB_STRIPPED = /* @__PURE__ */ new Set([...GMAIL_STRIPPED_PROPERTIES, "flex", "flex-basis"]);
35848
35855
  var CLIENT_CONFIGS = {
@@ -35923,6 +35930,13 @@ h1 {
35923
35930
  { prop: "background", pattern: /linear-gradient|radial-gradient|url\(/ },
35924
35931
  { prop: "background-image", pattern: /linear-gradient|radial-gradient|url\(/ }
35925
35932
  ],
35933
+ // The same in <style> blocks: a `.mh-cta{background-image:radial-gradient}`
35934
+ // rule drew a magenta box in the sim where real Outlook Classic drew no
35935
+ // fill (real-device capture of preview J9vFS4nm_LGl, 2026-11-06).
35936
+ // ponytail: background-image only; a `background:` shorthand in <style>
35937
+ // still draws (it may carry the fallback colour Word keeps). Split it like
35938
+ // backgroundShorthandColor when a capture shows one.
35939
+ dropValues: /^background-image:.*(?:linear-gradient|radial-gradient|url)\(/,
35926
35940
  inlineAndStripStyles: false,
35927
35941
  stripExternalStylesheets: false,
35928
35942
  stripForms: false,
@@ -36641,19 +36655,21 @@ h1 {
36641
36655
  }
36642
36656
  return clientIds.map((clientId) => {
36643
36657
  const config = CLIENT_CONFIGS[clientId];
36644
- const dropSource = prepareDropSource(html, config);
36645
- if (dropSource !== html) {
36646
- const own = downlevelCSS(dropSource);
36647
- const result2 = applyTransformDom(cheerio3.load(own), own, config, framework);
36648
- result2.warnings.unshift(...dropWarnings(html, config, clientId, framework));
36649
- return result2;
36650
- }
36651
36658
  const wordEngine = isWordEngineClient(clientId) && hasOutlookBranch;
36652
36659
  const ownSource = isWordEngineClient(clientId) && ownWordSource;
36653
- const source = ownSource ? outlookSource : downleveled;
36654
- const parsedDom = ownSource ? outlookDom : baseDom;
36655
- const clientDom = lastClientForSource.get(parsedDom) === clientId ? parsedDom : cheerio3.load(parsedDom.root().clone().toArray()[0]);
36656
- const result = applyTransformDom(clientDom, source, CLIENT_CONFIGS[clientId], framework);
36660
+ const raw = ownSource ? wordRaw : html;
36661
+ const dropSource = prepareDropSource(raw, config);
36662
+ let result;
36663
+ if (dropSource !== raw) {
36664
+ const own = downlevelCSS(dropSource);
36665
+ result = applyTransformDom(cheerio3.load(own), own, config, framework);
36666
+ result.warnings.unshift(...dropWarnings(raw, config, clientId, framework));
36667
+ } else {
36668
+ const source = ownSource ? outlookSource : downleveled;
36669
+ const parsedDom = ownSource ? outlookDom : baseDom;
36670
+ const clientDom = lastClientForSource.get(parsedDom) === clientId ? parsedDom : cheerio3.load(parsedDom.root().clone().toArray()[0]);
36671
+ result = applyTransformDom(clientDom, source, config, framework);
36672
+ }
36657
36673
  if (wordEngine) result.html = vmlToCss(result.html);
36658
36674
  if (isWordEngineClient(clientId)) result.html = applyMsoHide(result.html);
36659
36675
  return result;
@@ -43425,7 +43441,7 @@ Href: ${href}`
43425
43441
  // package.json
43426
43442
  var package_default = {
43427
43443
  name: "@emailens/cli",
43428
- version: "0.13.15",
43444
+ version: "0.13.17",
43429
43445
  description: "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
43430
43446
  type: "module",
43431
43447
  bin: {
@@ -43466,7 +43482,7 @@ var package_default = {
43466
43482
  },
43467
43483
  devDependencies: {
43468
43484
  "@anthropic-ai/sdk": "^0.52.0",
43469
- "@emailens/engine": "^0.18.17",
43485
+ "@emailens/engine": "^0.18.19",
43470
43486
  "@types/bun": "^1.4.0",
43471
43487
  "@types/mjml": "^4.7.4",
43472
43488
  "@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-W77SJYOR.js";
8
+ } from "./chunk-ICIM22UE.js";
9
9
  import "./chunk-ABDTBRVK.js";
10
10
  import "./chunk-2AP7CT6R.js";
11
11
  import "./chunk-NXBRJX3V.js";
package/package.json CHANGED
@@ -1,84 +1,84 @@
1
- {
2
- "name": "@emailens/cli",
3
- "version": "0.13.15",
4
- "description": "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
5
- "type": "module",
6
- "bin": {
7
- "emailens": "./dist/index.js"
8
- },
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js"
13
- },
14
- "./test": {
15
- "types": "./dist/test.d.ts",
16
- "import": "./dist/test.js"
17
- }
18
- },
19
- "main": "./dist/index.js",
20
- "types": "./dist/index.d.ts",
21
- "files": [
22
- "dist",
23
- "LICENSE"
24
- ],
25
- "scripts": {
26
- "build": "tsup",
27
- "dev": "tsup --watch",
28
- "start": "bun run dist/index.js",
29
- "typecheck": "tsc --noEmit",
30
- "test": "bun test",
31
- "prepublishOnly": "bun run build"
32
- },
33
- "dependencies": {},
34
- "peerDependencies": {
35
- "playwright-core": "^1.62.1"
36
- },
37
- "peerDependenciesMeta": {
38
- "playwright-core": {
39
- "optional": true
40
- }
41
- },
42
- "devDependencies": {
43
- "@anthropic-ai/sdk": "^0.52.0",
44
- "@emailens/engine": "^0.18.17",
45
- "@types/bun": "^1.4.0",
46
- "@types/mjml": "^4.7.4",
47
- "@types/node": "^25.9.5",
48
- "bun-types": "^1.4.0",
49
- "citty": "^0.1.6",
50
- "cli-table3": "^0.6.5",
51
- "ora": "^8.2.0",
52
- "picocolors": "^1.1.1",
53
- "playwright-core": "^1.62.1",
54
- "tsup": "^8.5.1",
55
- "typescript": "^5.9.3"
56
- },
57
- "keywords": [
58
- "email",
59
- "html-email",
60
- "css",
61
- "compatibility",
62
- "cli",
63
- "gmail",
64
- "outlook",
65
- "apple-mail",
66
- "email-testing",
67
- "dark-mode",
68
- "mjml",
69
- "maizzle",
70
- "react-email"
71
- ],
72
- "license": "MIT",
73
- "repository": {
74
- "type": "git",
75
- "url": "git+https://github.com/emailens/cli.git"
76
- },
77
- "engines": {
78
- "node": ">=18"
79
- },
80
- "homepage": "https://github.com/emailens/cli#readme",
81
- "bugs": {
82
- "url": "https://github.com/emailens/cli/issues"
83
- }
84
- }
1
+ {
2
+ "name": "@emailens/cli",
3
+ "version": "0.13.17",
4
+ "description": "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
5
+ "type": "module",
6
+ "bin": {
7
+ "emailens": "./dist/index.js"
8
+ },
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./test": {
15
+ "types": "./dist/test.d.ts",
16
+ "import": "./dist/test.js"
17
+ }
18
+ },
19
+ "main": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "files": [
22
+ "dist",
23
+ "LICENSE"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsup",
27
+ "dev": "tsup --watch",
28
+ "start": "bun run dist/index.js",
29
+ "typecheck": "tsc --noEmit",
30
+ "test": "bun test",
31
+ "prepublishOnly": "bun run build"
32
+ },
33
+ "dependencies": {},
34
+ "peerDependencies": {
35
+ "playwright-core": "^1.62.1"
36
+ },
37
+ "peerDependenciesMeta": {
38
+ "playwright-core": {
39
+ "optional": true
40
+ }
41
+ },
42
+ "devDependencies": {
43
+ "@anthropic-ai/sdk": "^0.52.0",
44
+ "@emailens/engine": "^0.18.19",
45
+ "@types/bun": "^1.4.0",
46
+ "@types/mjml": "^4.7.4",
47
+ "@types/node": "^25.9.5",
48
+ "bun-types": "^1.4.0",
49
+ "citty": "^0.1.6",
50
+ "cli-table3": "^0.6.5",
51
+ "ora": "^8.2.0",
52
+ "picocolors": "^1.1.1",
53
+ "playwright-core": "^1.62.1",
54
+ "tsup": "^8.5.1",
55
+ "typescript": "^5.9.3"
56
+ },
57
+ "keywords": [
58
+ "email",
59
+ "html-email",
60
+ "css",
61
+ "compatibility",
62
+ "cli",
63
+ "gmail",
64
+ "outlook",
65
+ "apple-mail",
66
+ "email-testing",
67
+ "dark-mode",
68
+ "mjml",
69
+ "maizzle",
70
+ "react-email"
71
+ ],
72
+ "license": "MIT",
73
+ "repository": {
74
+ "type": "git",
75
+ "url": "git+https://github.com/emailens/cli.git"
76
+ },
77
+ "engines": {
78
+ "node": ">=18"
79
+ },
80
+ "homepage": "https://github.com/emailens/cli#readme",
81
+ "bugs": {
82
+ "url": "https://github.com/emailens/cli/issues"
83
+ }
84
+ }