@emailens/engine 0.11.8 → 0.12.0
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 +264 -264
- package/dist/compile/index.d.cts +2 -2
- package/dist/compile/index.d.ts +2 -2
- package/dist/index.cjs +2606 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -59
- package/dist/index.d.ts +7 -59
- package/dist/index.js +2596 -142
- package/dist/index.js.map +1 -1
- package/dist/{react-email-B82A1R_K.d.ts → react-email-BzyXjPrH.d.ts} +1 -1
- package/dist/{react-email-DRkmpgX-.d.cts → react-email-DHkCZ7TG.d.cts} +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-DiseE-UH.d.cts → types-edFeUest.d.cts} +88 -2
- package/dist/{types-DiseE-UH.d.ts → types-edFeUest.d.ts} +88 -2
- package/package.json +1 -1
package/dist/server.d.cts
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -98,11 +98,97 @@ declare function estimateAiFixTokens(options: EstimateOptions): Promise<TokenEst
|
|
|
98
98
|
*/
|
|
99
99
|
declare function heuristicTokenCount(text: string): number;
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* CSS/HTML feature support matrix, auto-generated from caniemail.com.
|
|
103
|
+
* Last synced: 2026-09-02
|
|
104
|
+
* caniemail last updated: 2026-08-10 15:16:24 +0000
|
|
105
|
+
*
|
|
106
|
+
* 298 features and 14 image formats across 21 email clients.
|
|
107
|
+
*
|
|
108
|
+
* Support levels:
|
|
109
|
+
* - "supported": fully supported
|
|
110
|
+
* - "partial": partially supported (with caveats)
|
|
111
|
+
* - "unsupported": not supported at all
|
|
112
|
+
* - "unknown": no data available
|
|
113
|
+
*
|
|
114
|
+
* Data sources:
|
|
115
|
+
* - Most clients: caniemail.com API (verified data)
|
|
116
|
+
* - hey-mail: caniemail.com (WebKit-based)
|
|
117
|
+
* - superhuman: Manual overrides (Chromium/Blink-based, best-effort estimates)
|
|
118
|
+
*
|
|
119
|
+
* A client we ship as one entry although caniemail tests it on several
|
|
120
|
+
* platforms (Proton Mail, AOL, Thunderbird) is graded on its worst
|
|
121
|
+
* platform. Gmail, Outlook, Yahoo and Apple Mail ship as separate clients
|
|
122
|
+
* per platform instead.
|
|
123
|
+
*
|
|
124
|
+
* DO NOT EDIT; regenerate with: bun run sync:caniemail
|
|
125
|
+
*/
|
|
126
|
+
/** The clients every row answers for, in report order. */
|
|
127
|
+
declare const SUPPORT_CLIENTS: readonly ["gmail-web", "gmail-android", "gmail-ios", "outlook-web", "outlook-windows", "outlook-windows-legacy", "outlook-ios", "outlook-android", "outlook-macos", "apple-mail-macos", "apple-mail-ios", "yahoo-mail", "yahoo-mail-android", "yahoo-mail-ios", "samsung-mail", "thunderbird", "hey-mail", "protonmail", "aol", "fastmail", "superhuman"];
|
|
128
|
+
declare const CSS_SUPPORT: Record<string, Record<ClientId, SupportLevel>>;
|
|
129
|
+
/**
|
|
130
|
+
* Caveat notes per (feature, client) from caniemail: the "why" behind a
|
|
131
|
+
* partial/buggy/unsupported rating. Sparse: only cells with a note appear.
|
|
132
|
+
*/
|
|
133
|
+
declare const CSS_SUPPORT_NOTES: Record<string, Record<string, string[]>>;
|
|
134
|
+
/**
|
|
135
|
+
* Image format support, keyed by format. Kept out of CSS_SUPPORT because an
|
|
136
|
+
* image format is a property of the `src`, not of a stylesheet: the image
|
|
137
|
+
* analyzer looks these up, the CSS analyzer never should.
|
|
138
|
+
*/
|
|
139
|
+
/** The image formats caniemail grades. */
|
|
140
|
+
declare const IMAGE_FORMATS: readonly ["apng", "avif", "base64", "bmp", "gif", "hdr", "heif", "ico", "jpg", "mp4", "png", "svg", "tiff", "webp"];
|
|
141
|
+
declare const IMAGE_SUPPORT: Record<string, Record<ClientId, SupportLevel>>;
|
|
142
|
+
/** Caveat notes per (image format, client), same shape as CSS_SUPPORT_NOTES. */
|
|
143
|
+
declare const IMAGE_SUPPORT_NOTES: Record<string, Record<string, string[]>>;
|
|
144
|
+
/**
|
|
145
|
+
* Features a client merely ignores when it "does not support" them: the
|
|
146
|
+
* email renders the same either way, so these report as info, not warnings.
|
|
147
|
+
*/
|
|
148
|
+
declare const GRACEFUL_FEATURES: ReadonlySet<string>;
|
|
149
|
+
/**
|
|
150
|
+
* Properties that require HTML structural changes (not just CSS swaps)
|
|
151
|
+
* to fix. These cannot be solved by replacing one CSS value with another.
|
|
152
|
+
*/
|
|
153
|
+
declare const STRUCTURAL_FIX_PROPERTIES: Set<string>;
|
|
154
|
+
/** HTML element features in the support matrix (for data-driven detection). */
|
|
155
|
+
declare const HTML_ELEMENT_FEATURES: readonly ["<abbr>", "<acronym>", "<address>", "<audio>", "<base>", "<bdi>", "<blockquote>", "<body>", "<button type=\"reset\">", "<button type=\"submit\">", "<code>", "<del>", "<dfn>", "<dialog>", "<div>", "<form>", "<h1>", "<hr>", "<img>", "<input type=\"checkbox\">", "<input type=\"hidden\">", "<input type=\"radio\">", "<input type=\"reset\">", "<input type=\"submit\">", "<input type=\"text\">", "<link>", "<marquee>", "<meter>", "<object>", "<p>", "<picture>", "<pre>", "<progress>", "<rp>", "<rt>", "<ruby>", "<select>", "<small>", "<span>", "<strike>", "<strong>", "<style>", "<svg>", "<table>", "<textarea>", "<ul>", "<video>", "<wbr>"];
|
|
156
|
+
/** HTML attribute features. Each key is also the cheerio selector that finds it. */
|
|
157
|
+
declare const HTML_ATTRIBUTE_FEATURES: readonly ["[align]", "[aria-describedby]", "[aria-hidden]", "[aria-label]", "[aria-labelledby]", "[aria-live]", "[background]", "[cellpadding]", "[cellspacing]", "[command]", "[dir]", "[height]", "[hidden]", "[lang]", "[loading]", "[popover]", "[required]", "[role]", "[srcset]", "[target]", "[valign]", "[width]"];
|
|
158
|
+
/** Document-level and link-shaped HTML features; each has a bespoke detector. */
|
|
159
|
+
declare const HTML_MISC_FEATURES: readonly ["amp4email", "anchor-links", "doctype", "html-comments", "html5-semantics", "image-maps", "mailto-links", "meta-color-scheme"];
|
|
160
|
+
/** CSS at-rule features, including the media features that qualify `@media`. */
|
|
161
|
+
declare const AT_RULE_FEATURES: readonly ["@font-face", "@import", "@keyframes", "@media", "@media device-pixel-ratio", "@media hover", "@media orientation", "@media prefers-color-scheme", "@media prefers-reduced-motion", "@supports"];
|
|
162
|
+
/** One property paired with one value, e.g. "display:flex". */
|
|
163
|
+
declare const COMPOUND_VALUE_FEATURES: readonly ["display:flex", "display:grid", "display:none"];
|
|
164
|
+
/** Pseudo-classes, pseudo-elements and combinators, e.g. ":hover", "::after". */
|
|
165
|
+
declare const SELECTOR_FEATURES: readonly ["::after", "::before", "::first-letter", "::first-line", "::marker", "::placeholder", ":adjacent-sibling", ":attribute-selector", ":chaining", ":checked", ":child-combinator", ":class-selector", ":descendant-combinator", ":first-child", ":first-of-type", ":focus", ":focus-visible", ":focus-within", ":general-sibling", ":grouping", ":has", ":hover", ":id-selector", ":lang", ":last-child", ":last-of-type", ":link", ":not", ":nth-child", ":nth-last-child", ":nth-of-type", ":only-child", ":only-of-type", ":target", ":type-selector", ":universal-selector", ":visited"];
|
|
166
|
+
/** CSS function features (e.g., "linear-gradient"). */
|
|
167
|
+
declare const CSS_FUNCTION_FEATURES: readonly ["calc", "clamp", "conic-gradient", "fit-content", "linear-gradient", "max", "min", "radial-gradient"];
|
|
168
|
+
/** Plain CSS property names: what an inline style or declaration can match. */
|
|
169
|
+
declare const CSS_PROPERTY_FEATURES: readonly ["!important", "accent-color", "align-items", "animation", "aspect-ratio", "backdrop-filter", "background", "background-blend-mode", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "bimi", "block-size", "border", "border-collapse", "border-image", "border-inline", "border-inline-individual", "border-inline-longhand", "border-radius", "border-radius-logical", "border-spacing", "bottom", "box-shadow", "box-sizing", "caption-side", "clear", "clip-path", "color", "color-scheme", "column-count", "columns", "css-comments", "cursor", "custom-properties", "direction", "display", "empty-cells", "filter", "flex-direction", "flex-wrap", "float", "font", "font-family", "font-kerning", "font-size", "font-size-adjust", "font-stretch", "font-weight", "gap", "grid-template-columns", "height", "hyphenate-character", "hyphenate-limit-chars", "hyphens", "inert", "inline-size", "inset", "justify-content", "left", "letter-spacing", "light-dark", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-block-start-end", "margin-inline-block", "margin-inline-start-end", "mask-image", "max-block-size", "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "mix-blend-mode", "modern-color", "nesting", "object-fit", "object-position", "opacity", "orphans", "outline", "outline-offset", "overflow", "overflow-wrap", "padding", "padding-block-start-end", "padding-inline-block", "padding-inline-start-end", "position", "pseudo-class-active", "pseudo-class-default", "pseudo-class-nth-last-of-type", "resize", "rgb", "rgba", "right", "scroll-snap", "shape-margin", "shape-outside", "system-ui", "tab-size", "table-layout", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip-ink", "text-decoration-style", "text-decoration-thickness", "text-emphasis", "text-emphasis-position", "text-indent", "text-justify", "text-orientation", "text-overflow", "text-shadow", "text-transform", "text-underline-offset", "text-underline-position", "text-wrap", "top", "transform", "transition", "unit-ch", "unit-cm", "unit-em", "unit-ex", "unit-in", "unit-initial", "unit-mm", "unit-pc", "unit-percent", "unit-pt", "unit-px", "unit-rem", "unit-vh", "unit-vmax", "unit-vmin", "unit-vw", "user-select", "vertical-align", "visibility", "white-space", "white-space-collapse", "widows", "width", "word-break", "word-spacing", "writing-mode", "z-index"];
|
|
170
|
+
/** Every feature key in CSS_SUPPORT, as a type. */
|
|
171
|
+
type FeatureKey = (typeof HTML_ELEMENT_FEATURES)[number] | (typeof HTML_ATTRIBUTE_FEATURES)[number] | (typeof HTML_MISC_FEATURES)[number] | (typeof AT_RULE_FEATURES)[number] | (typeof COMPOUND_VALUE_FEATURES)[number] | (typeof SELECTOR_FEATURES)[number] | (typeof CSS_FUNCTION_FEATURES)[number] | (typeof CSS_PROPERTY_FEATURES)[number];
|
|
172
|
+
/** An image format caniemail grades. */
|
|
173
|
+
type ImageFormat = (typeof IMAGE_FORMATS)[number];
|
|
174
|
+
/** A client the matrix answers for. */
|
|
175
|
+
type ClientId = (typeof SUPPORT_CLIENTS)[number];
|
|
176
|
+
/**
|
|
177
|
+
* When caniemail last re-tested each feature. A feature's row is only as
|
|
178
|
+
* current as its test date, whatever the file's sync date says.
|
|
179
|
+
*/
|
|
180
|
+
declare const FEATURE_LAST_TESTED: Record<string, string>;
|
|
181
|
+
|
|
101
182
|
type SupportLevel = "supported" | "partial" | "unsupported" | "unknown";
|
|
102
183
|
type Framework = "jsx" | "mjml" | "maizzle";
|
|
103
184
|
type InputFormat = "html" | Framework;
|
|
104
185
|
interface EmailClient {
|
|
105
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Not a free string: the matrix answers for exactly these clients, so a
|
|
188
|
+
* client we ship without a column (or a column with no client) is a compile
|
|
189
|
+
* error rather than a silently empty section of every report.
|
|
190
|
+
*/
|
|
191
|
+
id: ClientId;
|
|
106
192
|
name: string;
|
|
107
193
|
category: "webmail" | "desktop" | "mobile";
|
|
108
194
|
engine: string;
|
|
@@ -409,4 +495,4 @@ interface DesignReport {
|
|
|
409
495
|
};
|
|
410
496
|
}
|
|
411
497
|
|
|
412
|
-
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type
|
|
498
|
+
export { type LinkIssue as $, type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type FeatureKey as G, type FixType as H, type ImageReport as I, GRACEFUL_FEATURES as J, HTML_ATTRIBUTE_FEATURES as K, type LinkReport as L, HTML_ELEMENT_FEATURES as M, HTML_MISC_FEATURES as N, type OverflowReport as O, IMAGE_FORMATS as P, IMAGE_SUPPORT as Q, IMAGE_SUPPORT_NOTES as R, type SpamAnalysisOptions as S, type TransformResult as T, type ImageFormat as U, type VmlReport as V, type ImageInfo as W, type ImageIssue as X, type InboxPreviewIssue as Y, type InputFormat as Z, type LinkInfo as _, type CodeFix as a, type OverflowIssue as a0, type PreviewResult as a1, SELECTOR_FEATURES as a2, STRUCTURAL_FIX_PROPERTIES as a3, SUPPORT_CLIENTS as a4, type Severity as a5, type SizeIssue as a6, type SourceLocation as a7, type SpamIssue as a8, type SupportLevel as a9, type TemplateIssue as aa, type TokenEstimate as ab, type TokenEstimateWithWarnings as ac, type VisualIssue as ad, type VmlIssue as ae, estimateAiFixTokens as af, generateFixPrompt as ag, heuristicTokenCount as ah, type ExportPromptOptions as b, type AiFixResult as c, type SpamReport as d, type AccessibilityReport as e, type AccessibilityIssue as f, type InboxPreview as g, type SizeReport as h, type TemplateReport as i, type VisualReport as j, type DesignReport as k, type DeliverabilityReport as l, AT_RULE_FEATURES as m, COMPOUND_VALUE_FEATURES as n, CSS_FUNCTION_FEATURES as o, CSS_PROPERTY_FEATURES as p, CSS_SUPPORT as q, CSS_SUPPORT_NOTES as r, type ClientId as s, type ClientTruncation as t, type DeliverabilityCheck as u, type DeliverabilityIssue as v, type DesignIssue as w, type EstimateOptions as x, type ExportScope as y, FEATURE_LAST_TESTED as z };
|
|
@@ -98,11 +98,97 @@ declare function estimateAiFixTokens(options: EstimateOptions): Promise<TokenEst
|
|
|
98
98
|
*/
|
|
99
99
|
declare function heuristicTokenCount(text: string): number;
|
|
100
100
|
|
|
101
|
+
/**
|
|
102
|
+
* CSS/HTML feature support matrix, auto-generated from caniemail.com.
|
|
103
|
+
* Last synced: 2026-09-02
|
|
104
|
+
* caniemail last updated: 2026-08-10 15:16:24 +0000
|
|
105
|
+
*
|
|
106
|
+
* 298 features and 14 image formats across 21 email clients.
|
|
107
|
+
*
|
|
108
|
+
* Support levels:
|
|
109
|
+
* - "supported": fully supported
|
|
110
|
+
* - "partial": partially supported (with caveats)
|
|
111
|
+
* - "unsupported": not supported at all
|
|
112
|
+
* - "unknown": no data available
|
|
113
|
+
*
|
|
114
|
+
* Data sources:
|
|
115
|
+
* - Most clients: caniemail.com API (verified data)
|
|
116
|
+
* - hey-mail: caniemail.com (WebKit-based)
|
|
117
|
+
* - superhuman: Manual overrides (Chromium/Blink-based, best-effort estimates)
|
|
118
|
+
*
|
|
119
|
+
* A client we ship as one entry although caniemail tests it on several
|
|
120
|
+
* platforms (Proton Mail, AOL, Thunderbird) is graded on its worst
|
|
121
|
+
* platform. Gmail, Outlook, Yahoo and Apple Mail ship as separate clients
|
|
122
|
+
* per platform instead.
|
|
123
|
+
*
|
|
124
|
+
* DO NOT EDIT; regenerate with: bun run sync:caniemail
|
|
125
|
+
*/
|
|
126
|
+
/** The clients every row answers for, in report order. */
|
|
127
|
+
declare const SUPPORT_CLIENTS: readonly ["gmail-web", "gmail-android", "gmail-ios", "outlook-web", "outlook-windows", "outlook-windows-legacy", "outlook-ios", "outlook-android", "outlook-macos", "apple-mail-macos", "apple-mail-ios", "yahoo-mail", "yahoo-mail-android", "yahoo-mail-ios", "samsung-mail", "thunderbird", "hey-mail", "protonmail", "aol", "fastmail", "superhuman"];
|
|
128
|
+
declare const CSS_SUPPORT: Record<string, Record<ClientId, SupportLevel>>;
|
|
129
|
+
/**
|
|
130
|
+
* Caveat notes per (feature, client) from caniemail: the "why" behind a
|
|
131
|
+
* partial/buggy/unsupported rating. Sparse: only cells with a note appear.
|
|
132
|
+
*/
|
|
133
|
+
declare const CSS_SUPPORT_NOTES: Record<string, Record<string, string[]>>;
|
|
134
|
+
/**
|
|
135
|
+
* Image format support, keyed by format. Kept out of CSS_SUPPORT because an
|
|
136
|
+
* image format is a property of the `src`, not of a stylesheet: the image
|
|
137
|
+
* analyzer looks these up, the CSS analyzer never should.
|
|
138
|
+
*/
|
|
139
|
+
/** The image formats caniemail grades. */
|
|
140
|
+
declare const IMAGE_FORMATS: readonly ["apng", "avif", "base64", "bmp", "gif", "hdr", "heif", "ico", "jpg", "mp4", "png", "svg", "tiff", "webp"];
|
|
141
|
+
declare const IMAGE_SUPPORT: Record<string, Record<ClientId, SupportLevel>>;
|
|
142
|
+
/** Caveat notes per (image format, client), same shape as CSS_SUPPORT_NOTES. */
|
|
143
|
+
declare const IMAGE_SUPPORT_NOTES: Record<string, Record<string, string[]>>;
|
|
144
|
+
/**
|
|
145
|
+
* Features a client merely ignores when it "does not support" them: the
|
|
146
|
+
* email renders the same either way, so these report as info, not warnings.
|
|
147
|
+
*/
|
|
148
|
+
declare const GRACEFUL_FEATURES: ReadonlySet<string>;
|
|
149
|
+
/**
|
|
150
|
+
* Properties that require HTML structural changes (not just CSS swaps)
|
|
151
|
+
* to fix. These cannot be solved by replacing one CSS value with another.
|
|
152
|
+
*/
|
|
153
|
+
declare const STRUCTURAL_FIX_PROPERTIES: Set<string>;
|
|
154
|
+
/** HTML element features in the support matrix (for data-driven detection). */
|
|
155
|
+
declare const HTML_ELEMENT_FEATURES: readonly ["<abbr>", "<acronym>", "<address>", "<audio>", "<base>", "<bdi>", "<blockquote>", "<body>", "<button type=\"reset\">", "<button type=\"submit\">", "<code>", "<del>", "<dfn>", "<dialog>", "<div>", "<form>", "<h1>", "<hr>", "<img>", "<input type=\"checkbox\">", "<input type=\"hidden\">", "<input type=\"radio\">", "<input type=\"reset\">", "<input type=\"submit\">", "<input type=\"text\">", "<link>", "<marquee>", "<meter>", "<object>", "<p>", "<picture>", "<pre>", "<progress>", "<rp>", "<rt>", "<ruby>", "<select>", "<small>", "<span>", "<strike>", "<strong>", "<style>", "<svg>", "<table>", "<textarea>", "<ul>", "<video>", "<wbr>"];
|
|
156
|
+
/** HTML attribute features. Each key is also the cheerio selector that finds it. */
|
|
157
|
+
declare const HTML_ATTRIBUTE_FEATURES: readonly ["[align]", "[aria-describedby]", "[aria-hidden]", "[aria-label]", "[aria-labelledby]", "[aria-live]", "[background]", "[cellpadding]", "[cellspacing]", "[command]", "[dir]", "[height]", "[hidden]", "[lang]", "[loading]", "[popover]", "[required]", "[role]", "[srcset]", "[target]", "[valign]", "[width]"];
|
|
158
|
+
/** Document-level and link-shaped HTML features; each has a bespoke detector. */
|
|
159
|
+
declare const HTML_MISC_FEATURES: readonly ["amp4email", "anchor-links", "doctype", "html-comments", "html5-semantics", "image-maps", "mailto-links", "meta-color-scheme"];
|
|
160
|
+
/** CSS at-rule features, including the media features that qualify `@media`. */
|
|
161
|
+
declare const AT_RULE_FEATURES: readonly ["@font-face", "@import", "@keyframes", "@media", "@media device-pixel-ratio", "@media hover", "@media orientation", "@media prefers-color-scheme", "@media prefers-reduced-motion", "@supports"];
|
|
162
|
+
/** One property paired with one value, e.g. "display:flex". */
|
|
163
|
+
declare const COMPOUND_VALUE_FEATURES: readonly ["display:flex", "display:grid", "display:none"];
|
|
164
|
+
/** Pseudo-classes, pseudo-elements and combinators, e.g. ":hover", "::after". */
|
|
165
|
+
declare const SELECTOR_FEATURES: readonly ["::after", "::before", "::first-letter", "::first-line", "::marker", "::placeholder", ":adjacent-sibling", ":attribute-selector", ":chaining", ":checked", ":child-combinator", ":class-selector", ":descendant-combinator", ":first-child", ":first-of-type", ":focus", ":focus-visible", ":focus-within", ":general-sibling", ":grouping", ":has", ":hover", ":id-selector", ":lang", ":last-child", ":last-of-type", ":link", ":not", ":nth-child", ":nth-last-child", ":nth-of-type", ":only-child", ":only-of-type", ":target", ":type-selector", ":universal-selector", ":visited"];
|
|
166
|
+
/** CSS function features (e.g., "linear-gradient"). */
|
|
167
|
+
declare const CSS_FUNCTION_FEATURES: readonly ["calc", "clamp", "conic-gradient", "fit-content", "linear-gradient", "max", "min", "radial-gradient"];
|
|
168
|
+
/** Plain CSS property names: what an inline style or declaration can match. */
|
|
169
|
+
declare const CSS_PROPERTY_FEATURES: readonly ["!important", "accent-color", "align-items", "animation", "aspect-ratio", "backdrop-filter", "background", "background-blend-mode", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "bimi", "block-size", "border", "border-collapse", "border-image", "border-inline", "border-inline-individual", "border-inline-longhand", "border-radius", "border-radius-logical", "border-spacing", "bottom", "box-shadow", "box-sizing", "caption-side", "clear", "clip-path", "color", "color-scheme", "column-count", "columns", "css-comments", "cursor", "custom-properties", "direction", "display", "empty-cells", "filter", "flex-direction", "flex-wrap", "float", "font", "font-family", "font-kerning", "font-size", "font-size-adjust", "font-stretch", "font-weight", "gap", "grid-template-columns", "height", "hyphenate-character", "hyphenate-limit-chars", "hyphens", "inert", "inline-size", "inset", "justify-content", "left", "letter-spacing", "light-dark", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-block-start-end", "margin-inline-block", "margin-inline-start-end", "mask-image", "max-block-size", "max-height", "max-inline-size", "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", "mix-blend-mode", "modern-color", "nesting", "object-fit", "object-position", "opacity", "orphans", "outline", "outline-offset", "overflow", "overflow-wrap", "padding", "padding-block-start-end", "padding-inline-block", "padding-inline-start-end", "position", "pseudo-class-active", "pseudo-class-default", "pseudo-class-nth-last-of-type", "resize", "rgb", "rgba", "right", "scroll-snap", "shape-margin", "shape-outside", "system-ui", "tab-size", "table-layout", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip-ink", "text-decoration-style", "text-decoration-thickness", "text-emphasis", "text-emphasis-position", "text-indent", "text-justify", "text-orientation", "text-overflow", "text-shadow", "text-transform", "text-underline-offset", "text-underline-position", "text-wrap", "top", "transform", "transition", "unit-ch", "unit-cm", "unit-em", "unit-ex", "unit-in", "unit-initial", "unit-mm", "unit-pc", "unit-percent", "unit-pt", "unit-px", "unit-rem", "unit-vh", "unit-vmax", "unit-vmin", "unit-vw", "user-select", "vertical-align", "visibility", "white-space", "white-space-collapse", "widows", "width", "word-break", "word-spacing", "writing-mode", "z-index"];
|
|
170
|
+
/** Every feature key in CSS_SUPPORT, as a type. */
|
|
171
|
+
type FeatureKey = (typeof HTML_ELEMENT_FEATURES)[number] | (typeof HTML_ATTRIBUTE_FEATURES)[number] | (typeof HTML_MISC_FEATURES)[number] | (typeof AT_RULE_FEATURES)[number] | (typeof COMPOUND_VALUE_FEATURES)[number] | (typeof SELECTOR_FEATURES)[number] | (typeof CSS_FUNCTION_FEATURES)[number] | (typeof CSS_PROPERTY_FEATURES)[number];
|
|
172
|
+
/** An image format caniemail grades. */
|
|
173
|
+
type ImageFormat = (typeof IMAGE_FORMATS)[number];
|
|
174
|
+
/** A client the matrix answers for. */
|
|
175
|
+
type ClientId = (typeof SUPPORT_CLIENTS)[number];
|
|
176
|
+
/**
|
|
177
|
+
* When caniemail last re-tested each feature. A feature's row is only as
|
|
178
|
+
* current as its test date, whatever the file's sync date says.
|
|
179
|
+
*/
|
|
180
|
+
declare const FEATURE_LAST_TESTED: Record<string, string>;
|
|
181
|
+
|
|
101
182
|
type SupportLevel = "supported" | "partial" | "unsupported" | "unknown";
|
|
102
183
|
type Framework = "jsx" | "mjml" | "maizzle";
|
|
103
184
|
type InputFormat = "html" | Framework;
|
|
104
185
|
interface EmailClient {
|
|
105
|
-
|
|
186
|
+
/**
|
|
187
|
+
* Not a free string: the matrix answers for exactly these clients, so a
|
|
188
|
+
* client we ship without a column (or a column with no client) is a compile
|
|
189
|
+
* error rather than a silently empty section of every report.
|
|
190
|
+
*/
|
|
191
|
+
id: ClientId;
|
|
106
192
|
name: string;
|
|
107
193
|
category: "webmail" | "desktop" | "mobile";
|
|
108
194
|
engine: string;
|
|
@@ -409,4 +495,4 @@ interface DesignReport {
|
|
|
409
495
|
};
|
|
410
496
|
}
|
|
411
497
|
|
|
412
|
-
export { type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type
|
|
498
|
+
export { type LinkIssue as $, type AiProvider as A, type BaseIssue as B, type CSSWarning as C, type DiffResult as D, type EmailClient as E, type Framework as F, type FeatureKey as G, type FixType as H, type ImageReport as I, GRACEFUL_FEATURES as J, HTML_ATTRIBUTE_FEATURES as K, type LinkReport as L, HTML_ELEMENT_FEATURES as M, HTML_MISC_FEATURES as N, type OverflowReport as O, IMAGE_FORMATS as P, IMAGE_SUPPORT as Q, IMAGE_SUPPORT_NOTES as R, type SpamAnalysisOptions as S, type TransformResult as T, type ImageFormat as U, type VmlReport as V, type ImageInfo as W, type ImageIssue as X, type InboxPreviewIssue as Y, type InputFormat as Z, type LinkInfo as _, type CodeFix as a, type OverflowIssue as a0, type PreviewResult as a1, SELECTOR_FEATURES as a2, STRUCTURAL_FIX_PROPERTIES as a3, SUPPORT_CLIENTS as a4, type Severity as a5, type SizeIssue as a6, type SourceLocation as a7, type SpamIssue as a8, type SupportLevel as a9, type TemplateIssue as aa, type TokenEstimate as ab, type TokenEstimateWithWarnings as ac, type VisualIssue as ad, type VmlIssue as ae, estimateAiFixTokens as af, generateFixPrompt as ag, heuristicTokenCount as ah, type ExportPromptOptions as b, type AiFixResult as c, type SpamReport as d, type AccessibilityReport as e, type AccessibilityIssue as f, type InboxPreview as g, type SizeReport as h, type TemplateReport as i, type VisualReport as j, type DesignReport as k, type DeliverabilityReport as l, AT_RULE_FEATURES as m, COMPOUND_VALUE_FEATURES as n, CSS_FUNCTION_FEATURES as o, CSS_PROPERTY_FEATURES as p, CSS_SUPPORT as q, CSS_SUPPORT_NOTES as r, type ClientId as s, type ClientTruncation as t, type DeliverabilityCheck as u, type DeliverabilityIssue as v, type DesignIssue as w, type EstimateOptions as x, type ExportScope as y, FEATURE_LAST_TESTED as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emailens/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Email compatibility engine for HTML, MJML, Maizzle and React Email: transforms CSS per email client, scores compatibility, simulates dark mode, suggests fixes, and runs spam, accessibility, link and image quality analysis.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|