npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hyper-elements/email-client-models

v1.12.4

Published

Models of how classic Outlook, Outlook.com, Gmail (on the web, Android and an iPhone), Apple Mail (on a Mac and an iPhone), Yahoo Mail and AOL Mail draw an email, for @hyper-elements/email-clients.

Readme

@hyper-elements/email-client-models

Models of how classic Outlook, Outlook.com, Outlook for Mac, Gmail (on the web, Android and an iPhone), Apple Mail (on a Mac and an iPhone), Yahoo Mail and AOL Mail draw an email, compiled to WebAssembly. They're built from captures of each client and run locally, with no server.

This package is what @hyper-elements/email-clients runs for its client checks and previews. Install that package, not this one:

npm i @hyper-elements/email-clients
import { validate } from "@hyper-elements/react";
import { emailClients } from "@hyper-elements/email-clients";

validate(<Welcome />, { plugins: [await emailClients()] });

Requirements

  • Node 20 or later, or a browser with WebAssembly.
  • A page that runs the models under a Content Security Policy needs 'wasm-unsafe-eval' in script-src.

Changes

  • 1.12.4: Yahoo Mail (yahoo) and AOL Mail (aol) keep height: auto. They draw a height as a min-height, which the model did with auto too, so an image's height attribute stretched it: held-out g-1047's 200 by 200 picture at width: 100%; max-width: 200px; height: auto is 171px square in both clients, and was 200px tall here, moving everything below it 29px. On the second held-out set, scored once afterwards: Yahoo 98.9% of lines within 3px, from 96.3% (97.3% dark, from 94.7%), AOL 96.1%, from 94.7%. On the first, now used for tuning, Yahoo 99.0% from 97.8% (98.4% dark, from 97.1%), AOL 97.3% from 96.3%; the benchmark holds (Yahoo 99.6% from 99.3%).

    And the Gmail app on an iPhone's dark mode (gmail-app-ios, dark: true) draws saturated backgrounds closer to the app, refitted to round 75's colour sheet: greens were up to 14/255 too light (#0f9d58 drawn #1e8a53, the app's #0f7d48) and reds a little too dark. A background is now also darker by 0.04 of its green (-a*), and darker by 0.09 of its chroma, not 0.07, its b* cut to 0.8: the sheet's swatches within 5.4/255 on average, from 6.5. Gmail-green buttons stood out from the page where the app's don't. On the second held-out set, scored once afterwards, 94.4% of lines within 3px, from 93.4%; on the first, 95.8%, from 95.0%; the benchmark holds at 94.0%.

    And the Gmail app on Android (gmail-app) draws Courier New and Courier in Cutive Mono, Android's serif-monospace (its fonts.xml aliases both to it), not Droid Sans Mono, its monospace: 0.6055em a letter, not 0.6, regular only and made bold. On the first held-out set its 19 emails with Courier New lost 3.7% of their lines, the other 41 0.5%.

    • For the host: fontFiles("gmail-app") adds CutiveMono-Regular.woff2 (in renderer/fonts/cutive-mono, SIL OFL 1.1). A host that reads every listed file needs it before it takes 1.12.4.
    • On the second held-out set, scored once afterwards, 98.8% of lines within 3px, from 98.5%; on the first, 99.5%, from 98.3%; the benchmark's lines are as before (97.2%).
  • 1.12.3: AOL Mail (aol) draws text in a stand-in with its own web font's widths, where it used Roboto's.

    • Widths: each character's advance at 400, 600 and 700, measured from AOL's screenshots (round 82: 124 characters at 40px), on Roboto's outlines. AOL's letters run up to 10% from Roboto's either way (e 4.5% wider, s 12% narrower), so a line's width depended on its letters: 0.5 to 1% either way.
    • Kerning: AOL's face kerns far more than Roboto. Three phrases at 10px to 40px (round 83) ran 0.05 to 0.13em narrower than their letters added up, at every size; that's taken from each advance on the average (0.005em from a letter or space at 400, 0.01em from a figure or stop), with Roboto's own kerning kept.
    • For the host: fontFiles("aol") adds AOLWidths-Regular.woff2, AOLWidths-SemiBold.woff2 and AOLWidths-Bold.woff2 (in renderer/fonts/aol-widths, SIL OFL 1.1 as Roboto). Without them, Roboto as before.

    On the second held-out set, scored once afterwards, 94.7% of lines within 3px, from 92.5% (93.2% placed both ways, from 89.5%; dark the same); on the first, now used for tuning, 96.3%, from 92.3%. The benchmark goes to 98.5%, from 99.0%: two lines a pixel or two lower than AOL's (el-grid-columns, el-menu-navigation-bar) and pith-weekly's.

  • 1.12.2: classic Outlook's font sizes and monospaced text, from rounds 79 to 81 and the first held-out set.

    • Font sizes: Word draws text at its size in half points, 13 and 13.5px both at 13.33, 15 and 15.5 at 15.33, not rounded up to a whole pixel at 192 DPI (round 81: the same line at 12 to 18px in half-pixel steps, in Arial, Georgia, Verdana and Tahoma, as wide as at the half-point size to 0.1px). In-between sizes were drawn too large and wrapped early: held-out g-1031's 13.5px Arial line stayed whole in Word, 7.5px over its 160px column.
    • Courier New's width: its letters at Word's 0.6em of the size, where the font's own are 0.0001em wider (round 71). A 270px line of 25 letters at 18px fits its 270px cell in Word and wrapped here (held-out g-1041).
    • Squeezing a monospaced line: Word keeps a slightly long line of Courier New or Consolas whole a little further than one in a proportional font: 0.27 of its spaces' width, against 0.24 (round 79: 176 cases at 12 to 20px, 1px under to 20px over, all as Word drew them; held-out g-1008's line, 11.2px over its cell).

    Word fits a centered line without squeezing it, and a right-aligned one as a left-aligned one, as the model had it (round 80: 120 cases). On the second held-out set, scored once afterwards, 94.8% of lines within 3px, from 93.1%; on the first, now used for tuning, 95.7%, from 92.2%; the benchmark holds at 95.5%.

  • 1.12.1: classic Outlook (outlook), measured for the first time on emails it wasn't tuned on (the 60 Elements 0.3.0 held-out emails) and fixed on the benchmark and new probes: 90.0% of held-out lines within 3px, from 88.6%; 95.5% on the benchmark, from 94.7%.

    • Line heights on inline runs: a line height set on a link or a span isn't drawn; Word takes the paragraph's.
    • Buttons: React Email's button link has no margin (a run in Word).
    • Large Trebuchet MS and Courier New: from 18px up, their lines are their font files' own height (round 64 of the probes: ten fonts at 11 to 24px, which also confirmed Word ignores a unitless line-height).
    • Courier New's width: Word sets it at its size in half points, 0.6em a character (round 71: 22 sizes measured to 0.05px).
    • Full-width tables: a 100% table with a pixel max-width stays within its cell. With these, the first held-out set, now used for tuning, went from 90.0% to 92.2%. On a second held-out set, scored once afterwards, 93.1% of lines within 3px, from 1.12.0's 92.8%.

    And the Gmail app on an iPhone (gmail-app-ios): its text is a device pixel (a third of a CSS pixel) larger than its font size, not 1.25% larger, which held small text too narrow. Its dark mode is measured from a colour sheet (round 75), not borrowed from Android's: a grey goes along a straight line in sRGB from #1f2124 (white) to #ffffff (black), and another colour takes the lightness of that grey, a background darker by its chroma (#0f9d58 is #0f7d48, as text #2d9c60); behind an email with no background the app is #131315. On the first held-out set, 97.1% of lines within 3px, from 94.8% (95.0% dark, from 91.6%); the benchmark holds at 96.8% (94.0% dark, from 93.8%). On the second held-out set, scored once afterwards: 95.9%, from 1.12.0's 91.3% (93.4% dark, from 90.7%).

  • 1.12.0: a new client, outlook-mac: Outlook for Mac (Microsoft 365, the new Outlook), its message area 983px wide. Outlook draws the email in a WebKit view on a Mac with Office, so it keeps Apple Mail's WebKit traits and its Mac's fonts; fitted to round 44 of the probes, it adds:

    • The message: 8px in from the pane, the body's own margin dropped and the body drawn as a box there (its background stops at its content).
    • Default text: Aptos 16px, #212121, links #0078d7, drawn with the Aptos widths stand-in.
    • Fonts: a stack resolves as on a Mac with Office, with Aptos; a stack left with none is Aptos.
    • Dropped: gradients, negative margins and position; selectors with an attribute, a pseudo-class or pseudo-element, or ~; <link> style sheets.
    • Kept: height, box-sizing, rem, calc(), flex, @font-face, every media query, and body {} and * {}.
    • For the host: fontFiles("outlook-mac") lists Selawik and Carlito (Segoe UI and Calibri) and AptosWidths-Regular.woff2 and AptosWidths-Bold.woff2.
    • Dark mode: light backgrounds darken and dark text lightens, each keeping its hue; borders stay as they are. The email's color-scheme doesn't change it.
    • Accuracy: on the benchmark it was fitted on (50 emails), 98.8% of lines within 3px, 97.8% in dark mode. On the 60 Elements 0.3.0 held-out emails, 93.0% (93.1% dark). Five of those set their text in Inter, which Mailgun Inspect's Mac has and a reader's Mac usually doesn't (64.5% on them; the model draws Arial, as Apple Mail's does); the other 55 come to 97.4%.
  • 1.11.0: two new clients, yahoo and aol: Yahoo Mail and AOL Mail on the web, read in Chrome on Windows (computer: "windows"), Yahoo's message 758px wide and AOL's 869px. AOL Mail runs on Yahoo's mail platform, so both come from one model, with a profile each, fitted to round 36 of the probes:

    • The body: its own style and background aren't drawn.
    • Prefixes: each class and id gets Yahoo's yiv… prefix.
    • height: becomes min-height (since 1.12.4, auto stays).
    • Dropped: box-sizing, rem, calc() and gradients.
    • Kept: rgb() written with spaces, visibility and a nested @media.
    • Fonts: an inline font-family with a family in single quotes is dropped.
    • Comma-separated media queries: a <style> with a comma-separated @media list is dropped.
    • Media queries: they see a 1440×900 window.
    • Default text: 13px. Yahoo's is Arial at a line height of 1.5. AOL's is its own web font, drawn with Roboto (upright) and Open Sans (italic) at its widths.
    • For the host: fontFiles("aol") lists Roboto-Variable.woff2 and OpenSans-Italic-Variable.woff2 (1.12.3 adds the AOLWidths faces).
    • Dark mode: Yahoo's darkens light backgrounds and lightens dark text, keeping each colour's hue and saturation. AOL's leaves the email as it is.
    • Accuracy: 99.3% of the benchmark's lines within 3px for Yahoo (50 emails), 98.4% in dark mode; 99.0% for AOL.
  • 1.10.0: a new client, gmail-app-ios (it loads no font files: fontFiles("gmail-app-ios") is empty): the Gmail app on an iPhone 16 (iOS 26), drawn in its 345px card. Gmail's version of the email as in the app on Android, in iOS's fonts, unstyled text 16px, its text about 1.25% larger than the email's font sizes (fitted on the benchmark, not yet probed), line heights in whole pixels, the Android app's fit without its text size or zoom, and a dark mode that inverts every colour's lightness. 97.1% of the benchmark's lines within 3px (50 emails), 93.8% in dark mode. Not modelled: wide content shrunk on top of a zoom of the whole email.

  • 1.9.0: from Mailgun Inspect screenshots of probe emails, one behaviour per row (oracle/probes, the rounds of November 12 and 13 2026), each held by test/probes.mjs. A new client, apple-mail-ios. For the host: fontFiles("outlook") now lists AptosWidths-Regular.woff2 and AptosWidths-Bold.woff2 (in renderer/fonts), and fontFiles("apple-mail") the Selawik and Carlito files Apple Mail now draws Segoe UI and Calibri with; fontCss leaves out a face whose file the host doesn't give. On the accuracy benchmark (63 emails, Mailgun Inspect's screenshots), the lines at the right height: Gmail 99.1%, Outlook.com 98.6%, Mail on an iPhone 98.0% (50 emails), Apple Mail 97.7%, the Gmail app 97.2%, classic Outlook 94.7%.

    • Classic Outlook: [if true] and [if vml] read as true (they stopped the preview with an error), and Microsoft Dynamics' <![endif]----> closes a block. An image's width and height are read only as bare numbers or a percentage, and its border, hspace and vspace aren't drawn. A percentage cell beside a width: auto one takes its share of the table. Colours in hsl(), var() and alpha hex are dropped like rgba(), and a 3-digit bgcolor paints nothing. *, attribute selectors, > and chained classes are ignored. A nested cell doesn't take its outer cell's alignment. mso-line-height-alt is the line height (em from 16px); a px line height without exactly has its extra space above the text. A table in a hidden div or cell is drawn; a hidden cell is a 3px strip keeping its padding; what's hidden in a VML text box is drawn. margin: auto doesn't centre a table, a centred div does; a table's vertical margin is padding on its rows; a row's cells take its largest top padding; fit-content, a width attribute with a unit and negative margins aren't read; dir="rtl" tables sit right; align leaves 4px beside the table; border: 0px solid is a hairline. mso-border-alt: none and mso-shading: transparent drop the border and background. A multi-value text-decoration, word-spacing and outline aren't drawn; borders are 8px at most; a bordered div keeps its padding; same-border paragraphs merge; lists are indented 48px, their own margins unread; a div in a link has a blank line either side. Bare addresses become #0000ff links, and an unstyled link is #0000ff. An @font-face family draws in its mso-font-alt; Office's cloud fonts (Lato, Montserrat, Open Sans, Poppins, Nunito Sans) draw by name, with their faces (Google Fonts' builds, SIL OFL, in renderer/fonts). VML: no arcsize is 20%, width: auto is 48pt, <v:fill color> and picture fills are drawn, a shape inside another isn't, loose label text isn't; v:rects with a colour or gradient fill and v:images are drawn. Dark mode (process(..., { dark: true })): Word's grey ramp with hue kept, VML fills kept. From other builders' emails in the accuracy benchmark: words beside a block in a cell break as a paragraph of their own, an <hr> spans its table, a centred table's vertical margins are dropped, and React Email's buttons are drawn as the padded box Word makes of their hidden mso-font-width spacers and mso-text-raise. An <hr> is Word's 9px rule inside the margins Word reads (none where they're in rem); a bordered div with padding has neither its bottom padding nor its bottom border; a font stack is drawn in the cell or table that sets it, but not in a table inside it, nor from a div or the body around a table: that table's text is Aptos unless it sets its own. Cells whose widths add up to more than their row keep their narrowest content and share the rest in proportion (Unlayer's padded rows). Aptos keeps its half-point size, not rounded to whole screen pixels, and is drawn with a stand-in that has its widths character by character (AptosWidths-Regular.woff2 and -Bold.woff2, Inter under the SIL OFL with Aptos's advances, in renderer/fonts/aptos-widths; fontFiles("outlook") lists them), Helvetica Neue at 93.5% where the host gives none. Faces whose file the host doesn't give are left out of fontCss. A table whose first row spans its columns keeps its columns' widths while the line breaks are measured. A table's own top and bottom borders take their width again inside it; a line of images and no text is as tall as its images. A cell whose style centres its text centres a table in it, as a div's does. A list's marker sits 24px left of its text. A table's margin-left indents it, its percentage width of what's left, margin-right unread; centred, it sits half its left margin right of the middle, 100% the container less both margins and 6px.
    • Outlook.com: only the first class or id of a compound selector is prefixed (.a.b stops matching), nothing inside an attribute selector; <picture> and <source> are removed, the <img> kept.
    • Gmail: a <u></u> before the body's div (u + .body rules match); on the web flex-basis and flex-shrink are dropped, and in the app too; <style> blocks are kept in order until 16 KB in all, that one and the rest dropped; bare addresses become links, and an unstyled link is #1155cc on the web, #4285f4 with no underline in the app. The app's dark mode on Android (process("gmail-app", ..., { dark: true })): CIELAB lightness flipped for dark text and light backgrounds, near-whites #121212, whatever color-scheme says. The app fits a wide email: a fixed width wider than its card (attribute or CSS) is dropped, an image is shrunk to the card, and an email that still doesn't fit (a min-width) is laid out at its own width and zoomed out to the card's. A table cell's min-width larger than its max-width (Unlayer's columns) is dropped, so it doesn't; one within its max-width is that wide and no wider. Noto Serif is drawn regular up to weight 500 and bold from 600, Droid Sans Mono regular up to 600 and bold from 700, as Android has them.
    • Mail on an iPhone (process("apple-mail-ios", ...), new; an iPhone 16 on iOS 18, drawn 393px wide): Apple Mail's model at the phone's width, its media queries matching there, unstyled text 16px, iOS's fonts (none of Office's), and an element still wider than the screen once boxes are held to it (a table, an image, a min-width, a line that doesn't wrap) shrunk to fit on its own; an email with no viewport meta tag is laid out 16px in from each side. The links it adds to phone numbers, dates and addresses aren't drawn.
    • Apple Mail: each font stack is drawn as a standard Mac with Microsoft Office has it: macOS's fonts and Office's (Segoe UI and Calibri with their stand-ins, so any computer draws them at their widths), the email's own web fonts, and no other family (a Google Fonts family the email doesn't load falls through to the next); it drew with the viewing computer's fonts before. An unstyled link is #0068da, bare addresses become links, and a multi-value text-decoration is dropped. In dark mode, an email that says nothing about colour schemes keeps its colours where it shows an image (an <img> larger than a pixel), and is darkened otherwise.
  • 1.8.1: check() reads an Html block's markup, and a whole email's HTML, in time in proportion to its length: classic Outlook's conditional comments are taken out with one scan, not a regex that searched to the end from each <!--[if nothing closed, and each pattern runs only where a word it needs is in the markup. What it finds doesn't change. 1.6 MB with nothing to find is read in under 100 ms, where 1.8.0 took up to a quarter of a second.

  • 1.8.0: check() takes a whole email's HTML as well as a tree: check({ html }) runs the checks only captures found on it, for @hyper-elements/email-clients' renderInEmailClients(html): at most one finding each, at its first line, with comments (Outlook's conditional ones, whatever their condition) and scripts blanked, as no client but classic Outlook reads them, so every line is the given HTML's. Synchronous, after ready(). check({ root }) and the previews don't change.

  • 1.7.0: the Gmail app's previews draw with Android's fonts, as the app on Android does: Roboto, Noto Serif, and Droid Sans Mono's widths, each stack resolved as Android's WebView resolves it, and its text 7% larger, as the app draws it (with email-clients' preview at the app's 380px). The Gmail app drops a grid's gap and box-shadow, as Gmail on the web does. Classic Outlook places the text of a line with an exact height where Word does, its baseline at 0.8 of the line; draws as Word does on a high-DPI screen, squeezing a slightly long line's spaces to keep its last word on it; sizes a table column styled width: auto by its longest word, before Word scales the columns to the table (1.6.0 gave it the widest column's width); gives a cell's height inside its padding and borders; in a block with no line height of its own, makes each line as tall as the text on it; spaces a paragraph, heading, list or quote at its default margins as Word does (14pt between them, none at a table cell's top or bottom); draws a heading with no font of its own in its cell's font where the cell sets one; and no longer has Inter (Windows doesn't: a stack naming it draws in the next font); takes a generic family (sans-serif as Arial) only where a stack names no font Windows has, and draws one whose named font is an emoji font (Tailwind's) in Aptos, Word's default; squeezes a line over by any amount (Word keeps a line over by up to a quarter of its spaces' width and a little per letter) and keeps its breaks; draws font sizes at a whole number of screen pixels at 192 DPI (Segoe UI at its half-point size); sizes a width: auto column in the font and size Word draws (from its <col> where its cells have no width, and around spanning cells); gives a heading with no size of its own Word's heading size; spaces a table Word collapses (Hyper Elements' tables, by their <style>) as Word does, a bottom border between rows taking no room; draws Segoe UI Semibold's stand-in 2% larger, to Segoe UI's widths; and leaves out declarations in rem and text-decoration-line, which Word doesn't read. Outlook.com drops the style of a link to #.

  • 1.6.0: from real screenshots of four emails built to break both Outlooks. Outlook.com and Gmail drop a whole style attribute with a url() in double quotes. Classic Outlook: Arial Black, Impact, Comic Sans MS and Microsoft Sans Serif where a stack names them; a div's height unused (an empty one draws nothing); a div holding only tables without its background and borders; rules with selectors Word doesn't match (nth-child and the like) left out; a <button> drawn as its text and an <hr> as Word's default rule; words over a picture (VML) laid from its top, against its left edge; a 's padding unused; text with no colour of its own white on a dark background (Word's automatic colour); an image's margin and its own vertical-align unused (it takes its paragraph's); a table cell styled width: auto sized as the widest column. Outlook.com drops gap and row-gap (it keeps column-gap) and the space before a <button>; Gmail on the web drops gap, row-gap and the flex shorthand.

  • 1.5.0: Outlook.com and Gmail on the web previewed as read on Windows: font stacks resolve against Windows' fonts, as Chrome there does, with stand-ins of the same widths where the machine lacks one.

  • 1.4.0: Outlook.com and Gmail on the web apply an email's media queries at the browser window's width, as the real clients do: a preview drawn in a narrow reading pane keeps the email's desktop styles.

  • 1.3.1: no change in what previews draw or find; the previews' calibration is in the WebAssembly module.

  • 1.3.0: classic Outlook's previews, checked against real screenshots: Consolas where a stack names it, lowercase text shown in its capitals, a background with an image dropped with its colour, and Word's broken-image box for a WebP image.

  • 1.2.0: classic Outlook's previews lay out as Word does where it doesn't support the CSS: no positioning, floats, transforms, height and width limits or clipping; rgba() and hsla() colours dropped (a fallback before them kept); CSS background images left out unless the email has VML for them; WebP images not shown; <img> shows its src; mso-hide: all hides. Where words fall in Elements' own emails is unchanged.

  • 1.1.0: classic Outlook's previews leave out what Word doesn't draw: rounded corners, shadows, opacity and gradients, and list them as removed. Where words fall is unchanged.

  • 1.0.0: the first release.

Licence

Free to use, commercial use included, under the Hyper Elements Email Client Models License. It isn't open source: you may redistribute it unmodified, but not reverse engineer it or extract its models or data. @hyper-elements/email-clients and Hyper Elements itself are MIT.