@sharadox/email-web-library 0.6.0-polish.21 → 0.6.0-polish.23

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/CHANGELOG.md CHANGED
@@ -4,5 +4,4 @@ What changed in each version of `@sharadox/email-web-library`, newest first.
4
4
 
5
5
  ## 0.6.0
6
6
 
7
- - Emails say their colors are their own in light and dark in every form a client looks for (meta tags, `color-scheme`, a dark `prefers-color-scheme` rule keeping the same page color), and repeat their styles inside the body for clients that drop the head, so a mail app in dark mode (Proton Mail on Android) shows them as designed.
8
- - A gradient header rule sits over a plain color (`headerRuleColor`, the accent by default), so clients that drop gradients still draw the line.
7
+ - **Breaking:** one simple layout for every brand, the same in every mail app. Black on white with every style inline: no `<style>`, no dark-mode rules, no backgrounds but the button's and no gradients, so a mail app in dark mode darkens it as it darkens any email instead of recoloring parts of it (dark designs lost their backgrounds, lines and buttons in Proton Mail on Android). The logo sits at the top left; details stack each label over its value on every screen. `EmailDesign` is now `{ name, logo?, wordmark?, color, onColor?, fonts?, signature? }`: the brand brings its logo, its color (eyebrow, headings, quote bar, button) and its fonts. New exports: `EMAIL_COLORS`, `SYSTEM_FONT`.
package/README.md CHANGED
@@ -65,35 +65,18 @@ await sender.send({
65
65
 
66
66
  ### In the brand's design
67
67
 
68
- `emailLayout(content, design, logo)` writes the html of an email in a brand's own look, so every email a company sends looks like its website. The design holds its colors, type, rules, header, button and signature. Fonts are stacks the reader's device already has: web fonts would tell a font service the email was opened. Everything given is escaped, and the layout is tables with inline styles, as email clients need; on phones, details stack under their labels.
68
+ `emailLayout(content, design, logo)` writes the html of an email that looks the same in every mail app: one simple layout, black on white, with every style inline and nothing for a mail app to drop or recolor its own way (no dark-mode rules, no backgrounds but the button's, no gradients). In dark mode the mail app darkens it as it darkens any email. A brand brings only what makes it its own: the logo at the top left (the real logo, without a background), its color on the eyebrow, the headings, the bar beside a quoted text and the button, and its fonts. Fonts are stacks the reader's device already has: web fonts would tell a font service the email was opened. Everything given is escaped; details stack each label over its value, the same on a phone and a computer.
69
69
 
70
70
  ```ts
71
- import { emailLayout, type EmailDesign } from "@sharadox/email-web-library";
71
+ import { emailLayout } from "@sharadox/email-web-library/email-layout";
72
+ import type { EmailDesign } from "@sharadox/email-web-library/email-layout/type";
72
73
 
73
74
  const design: EmailDesign = {
74
75
  name: "Sharadox",
75
76
  logo: { width: 30, height: 30 }, // shown size of the inline image "logo"
76
77
  wordmark: true, // the name beside the logo
77
- align: "left",
78
- colors: {
79
- page: "#000",
80
- card: "#000",
81
- edge: "#262626",
82
- text: "#fff",
83
- muted: "#a3a3a3",
84
- quiet: "#737373",
85
- rule: "#2e2e2e",
86
- accent: "#fff",
87
- box: "#0a0a0a",
88
- onAccent: "#000",
89
- },
90
- fonts: { heading: "Geist, sans-serif", body: "Geist, sans-serif", label: "'Geist Mono', monospace" },
91
- heading: { size: 34, weight: 600, letterSpacing: "-0.04em", lineHeight: 1.1 },
92
- label: { size: 11, letterSpacing: "0.06em" },
93
- rule: "dashed", // between details
94
- radius: 0,
95
- crosses: true, // a grid's frame, with "+" where its lines cross
96
- button: { radius: 999, uppercase: false, letterSpacing: "0" },
78
+ color: "#000000", // the brand's color, dark enough to read on white (black for a white brand)
79
+ fonts: { heading: "Geist, Helvetica, Arial, sans-serif" }, // the body's font and the device's own sans otherwise
97
80
  signature: [{ text: "sharadox.com", href: "https://sharadox.com" }],
98
81
  };
99
82
 
@@ -102,17 +85,18 @@ const html = emailLayout(
102
85
  language: "en",
103
86
  preview: "Ana sent a message",
104
87
  eyebrow: "Contact",
105
- heading: "Ana Sousa",
88
+ heading: "Ana (Villa Mar)",
106
89
  rows: [{ label: "Email", value: "ana@example.com", href: "mailto:ana@example.com" }],
107
90
  quote: { label: "Message", text: "Hello!" },
108
91
  button: { label: "Reply to Ana", href: "mailto:ana@example.com" },
92
+ footer: [{ label: "Sent", value: "2026-11-21 14:29 UTC" }],
109
93
  },
110
94
  design,
111
95
  true, // the email carries the inline image "logo"
112
96
  );
113
97
  ```
114
98
 
115
- Optional touches: `colors.accentGradient` (a shiny accent where the device shows gradients), `colors.headerRule` (the line under the header), `eyebrowLine` (a short line before the eyebrow) and `quoteBar` (an accent bar beside a quoted text).
99
+ `EMAIL_COLORS` is the shared palette (background, text, muted, quiet, line) and `SYSTEM_FONT` the default font stack.
116
100
 
117
101
  `sender.verify()` logs in without sending, handy for a health check. `checkEmailMessage` and `checkEmailAddress` are exported for validating input before you get as far as sending.
118
102
 
@@ -1,13 +1,27 @@
1
1
  import type { EmailContent, EmailDesign } from "@sharadox/email-web-library/email-layout/type";
2
+ /** The one palette every email is drawn in: black on white, which every mail app darkens well on its own. */
3
+ export declare const EMAIL_COLORS: {
4
+ readonly background: "#ffffff";
5
+ readonly text: "#000000";
6
+ /** Paragraphs. */
7
+ readonly muted: "#3f3f46";
8
+ /** Labels and small print. */
9
+ readonly quiet: "#71717a";
10
+ /** Lines between details. */
11
+ readonly line: "#e4e4e7";
12
+ };
13
+ /** The device's own sans: what every font stack falls back to. */
14
+ export declare const SYSTEM_FONT = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
2
15
  /**
3
- * An email in a brand's design, the same in every inbox: its logo (and name), a rule in its color, an eyebrow and a
4
- * heading, then paragraphs, details, a quoted text and one button, small print, and the company's signature. Built
5
- * from tables with inline styles, as email clients need; everything given is escaped. `logo` says whether the email
6
- * carries the inline image "logo".
16
+ * An email in a brand's design, the same in every inbox: the logo at the top left, an eyebrow and a heading in the
17
+ * brand's color, then paragraphs, details (each label over its value), a quoted text and one button, small print,
18
+ * and the company's signature. Black on white with every style inline, no dark-mode rules and no backgrounds but the
19
+ * button's: what mail apps change, they change the same way everywhere. `logo` says whether the email carries the
20
+ * inline image "logo"; everything given is escaped.
7
21
  *
8
22
  * @example
9
23
  * emailLayout({ language: "en", preview: "Ana sent a message", eyebrow: "Contact", heading: "Ana",
10
- * rows: [{ label: "Email", value: "ana@example.com" }] }, SHARADOX_EMAIL, true);
24
+ * rows: [{ label: "Email", value: "ana@example.com" }] }, { name: "Acme", color: "#000000" }, false);
11
25
  */
12
26
  export declare function emailLayout(content: EmailContent, design: EmailDesign, logo: boolean): string;
13
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAY,MAAM,+CAA+C,CAAC;AAqHzG;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CA2C7F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE/F,6GAA6G;AAC7G,eAAO,MAAM,YAAY;;;IAGvB,kBAAkB;;IAElB,8BAA8B;;IAE9B,6BAA6B;;CAErB,CAAC;AAEX,kEAAkE;AAClE,eAAO,MAAM,WAAW,wFAAwF,CAAC;AA6BjH;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAyE7F"}
@@ -1,121 +1,80 @@
1
1
  import { escapeHtml } from "@sharadox/web-library/html/escape";
2
- /**
3
- * On phones, where the email app reads it (Apple Mail, the Gmail apps): narrower sides, and each detail's label over
4
- * its value, so values keep the whole width.
5
- */
6
- const PHONE = "@media (max-width:520px){.side{padding-left:22px!important;padding-right:22px!important}.label,.value{display:block!important;width:auto!important}.label{padding:14px 0 2px!important}.value{border-top:0!important;padding:0 0 12px!important}}";
7
- /**
8
- * The email's colors are already its own in both light and dark: said in every form a client may look for (the
9
- * meta tags, the color-scheme property, a dark color-scheme rule keeping the same page color), so a client in dark
10
- * mode shows it as designed instead of recoloring it (Proton Mail, Apple Mail, Outlook).
11
- */
12
- const OWN_COLORS = (page) => `:root{color-scheme:light dark;supported-color-schemes:light dark}@media (prefers-color-scheme:dark){body,.page{background-color:${page}!important}}`;
2
+ /** The one palette every email is drawn in: black on white, which every mail app darkens well on its own. */
3
+ export const EMAIL_COLORS = {
4
+ background: "#ffffff",
5
+ text: "#000000",
6
+ /** Paragraphs. */
7
+ muted: "#3f3f46",
8
+ /** Labels and small print. */
9
+ quiet: "#71717a",
10
+ /** Lines between details. */
11
+ line: "#e4e4e7",
12
+ };
13
+ /** The device's own sans: what every font stack falls back to. */
14
+ export const SYSTEM_FONT = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
13
15
  /** A table that's only there for layout, as email clients need. */
14
- const table = (style, rows, width) => `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${width ? ` width="${width}"` : ""} style="border-collapse:separate;${style}">${rows}</table>`;
15
- /** The accent as a background: the gradient where the reader's device shows one, the plain color otherwise. */
16
- const accentBackground = ({ colors }) => `background-color:${colors.accent};${colors.accentGradient ? `background-image:${colors.accentGradient};` : ""}`;
17
- /**
18
- * The line under the header: its own color or gradient (over a plain color, for clients that drop gradients), or the
19
- * accent.
20
- */
21
- function headerRule(design) {
22
- const { headerRule: rule, headerRuleColor, accent } = design.colors;
23
- if (!rule)
24
- return accentBackground(design);
25
- return rule.includes("gradient(")
26
- ? `background-color:${headerRuleColor ?? accent};background-image:${rule};`
27
- : `background-color:${rule};`;
28
- }
29
- /** Text in the label style: small, spaced capitals. */
30
- const labelStyle = (design, color) => `font-family:${design.fonts.label};font-size:${design.label.size}px;line-height:1.5;letter-spacing:${design.label.letterSpacing};text-transform:uppercase;color:${color}`;
16
+ const table = (style, rows, width) => `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${width ? ` width="${width}"` : ""} style="border-collapse:collapse;${style}">${rows}</table>`;
17
+ /** Small spaced capitals: eyebrows and labels. */
18
+ const capitals = (font, color) => `font-family:${font};font-size:12px;font-weight:600;line-height:1.5;letter-spacing:0.08em;text-transform:uppercase;color:${color}`;
31
19
  /** A value, as a link when it has one. */
32
20
  const value = ({ value: text, href }, color) => href
33
- ? `<a href="${escapeHtml(href)}" style="color:${color};text-decoration:underline;text-underline-offset:3px">${escapeHtml(text)}</a>`
21
+ ? `<a href="${escapeHtml(href)}" style="color:${color};text-decoration:underline">${escapeHtml(text)}</a>`
34
22
  : escapeHtml(text);
35
- /** The logo, and the company's name beside it with `wordmark`. */
36
- function header(design, logo) {
37
- const { colors, fonts } = design;
23
+ /** The logo at the top left, and the company's name beside it with `wordmark` (or alone, without a logo). */
24
+ function header(design, logo, font) {
38
25
  const mark = logo && design.logo
39
- ? `<td style="vertical-align:middle;padding:0${design.wordmark ? " 12px 0 0" : ""}"><img src="cid:logo" width="${design.logo.width}" height="${design.logo.height}" alt="${escapeHtml(design.name)}" style="display:block;width:${design.logo.width}px;height:${design.logo.height}px;border:0"></td>`
26
+ ? `<td style="vertical-align:middle;padding:0${design.wordmark ? " 10px 0 0" : ""}"><img src="cid:logo" width="${design.logo.width}" height="${design.logo.height}" alt="${escapeHtml(design.name)}" style="display:block;width:${design.logo.width}px;height:${design.logo.height}px;border:0"></td>`
40
27
  : "";
41
28
  const name = design.wordmark || !mark
42
- ? `<td style="vertical-align:middle;font-family:${fonts.body};font-size:19px;font-weight:600;letter-spacing:-0.02em;color:${colors.text}">${escapeHtml(design.name)}</td>`
29
+ ? `<td style="vertical-align:middle;font-family:${font};font-size:19px;font-weight:700;letter-spacing:-0.01em;color:${design.color}">${escapeHtml(design.name)}</td>`
43
30
  : "";
44
- return table(design.align === "center" ? "margin:0 auto" : "", `<tr>${mark}${name}</tr>`);
45
- }
46
- /** The details, one per line: the label above or beside its value, rules between them. */
47
- function details(design, rows) {
48
- const { colors, fonts } = design;
49
- const line = `border-top:1px ${design.rule} ${colors.rule}`;
50
- return table("width:100%;margin:28px 0 0", rows
51
- .map((row) => `<tr><td class="label" style="${line};padding:14px 16px 14px 0;width:136px;vertical-align:top;${labelStyle(design, colors.quiet)}">${escapeHtml(row.label)}</td><td class="value" style="${line};padding:12px 0;vertical-align:top;font-family:${fonts.body};font-size:15px;line-height:1.55;color:${colors.text};word-break:break-word">${value(row, colors.text)}</td></tr>`)
52
- .join("") + `<tr><td colspan="2" style="${line};font-size:0;line-height:0">&nbsp;</td></tr>`);
53
- }
54
- /** A longer text in its own box, keeping its line breaks. */
55
- function quoted(design, quote) {
56
- const { colors, fonts } = design;
57
- const bar = design.quoteBar ? `border-left:2px solid ${colors.accent};` : "";
58
- return `<p style="margin:32px 0 10px;${labelStyle(design, colors.quiet)}">${escapeHtml(quote.label)}</p>${table("width:100%", `<tr><td style="${bar}padding:20px 22px;background-color:${colors.box};border:1px solid ${colors.edge};border-radius:${Math.min(design.radius, 14)}px;font-family:${fonts.body};font-size:15px;line-height:1.7;color:${colors.text};white-space:pre-wrap;word-break:break-word">${escapeHtml(quote.text)}</td></tr>`)}`;
59
- }
60
- /** The one thing to do next, as a button that works in every email client (a padded link). */
61
- function action(design, button) {
62
- const { colors, fonts } = design;
63
- return table(`margin:32px ${design.align === "center" ? "auto" : "0"} 0`, `<tr><td style="${accentBackground(design)}border-radius:${design.button.radius}px"><a href="${escapeHtml(button.href)}" style="display:inline-block;padding:14px 28px;font-family:${fonts.body};font-size:14px;font-weight:600;letter-spacing:${design.button.letterSpacing};${design.button.uppercase ? "text-transform:uppercase;" : ""}color:${colors.onAccent};text-decoration:none;border-radius:${design.button.radius}px">${escapeHtml(button.label)}</a></td></tr>`);
64
- }
65
- /** A "+" where two of the frame's lines cross, centered on them (it spans two half cells each way). */
66
- const cross = ({ fonts, colors }) => `<td colspan="2" rowspan="2" width="12" height="12" align="center" valign="middle" style="width:12px;height:12px;padding:0;font-family:${fonts.label};font-size:19px;line-height:12px;color:${colors.quiet}">+</td>`;
67
- /**
68
- * The card inside a grid's frame, drawn from table cells so it holds in every email client: lines along its four
69
- * sides, each through the middle of a pair of half cells, and a "+" where they cross at each corner.
70
- */
71
- function framed(design, card) {
72
- const line = `1px solid ${design.colors.edge}`;
73
- const half = (style = "") => `<td width="6" style="width:6px;padding:0;font-size:0;line-height:0;${style}">&nbsp;</td>`;
74
- const across = (style) => `<td style="height:6px;padding:0;font-size:0;line-height:0;${style}">&nbsp;</td>`;
75
- return table("width:100%;max-width:612px", `<tr>${cross(design)}${across(`border-bottom:${line}`)}${cross(design)}</tr><tr>${across("")}</tr>
76
- <tr>${half(`border-right:${line}`)}${half()}<td style="padding:0;background-color:${design.colors.card}">${card}</td>${half(`border-right:${line}`)}${half()}</tr>
77
- <tr>${cross(design)}${across(`border-bottom:${line}`)}${cross(design)}</tr><tr>${across("")}</tr>`, 612);
31
+ return table("", `<tr>${mark}${name}</tr>`);
78
32
  }
79
33
  /**
80
- * An email in a brand's design, the same in every inbox: its logo (and name), a rule in its color, an eyebrow and a
81
- * heading, then paragraphs, details, a quoted text and one button, small print, and the company's signature. Built
82
- * from tables with inline styles, as email clients need; everything given is escaped. `logo` says whether the email
83
- * carries the inline image "logo".
34
+ * An email in a brand's design, the same in every inbox: the logo at the top left, an eyebrow and a heading in the
35
+ * brand's color, then paragraphs, details (each label over its value), a quoted text and one button, small print,
36
+ * and the company's signature. Black on white with every style inline, no dark-mode rules and no backgrounds but the
37
+ * button's: what mail apps change, they change the same way everywhere. `logo` says whether the email carries the
38
+ * inline image "logo"; everything given is escaped.
84
39
  *
85
40
  * @example
86
41
  * emailLayout({ language: "en", preview: "Ana sent a message", eyebrow: "Contact", heading: "Ana",
87
- * rows: [{ label: "Email", value: "ana@example.com" }] }, SHARADOX_EMAIL, true);
42
+ * rows: [{ label: "Email", value: "ana@example.com" }] }, { name: "Acme", color: "#000000" }, false);
88
43
  */
89
44
  export function emailLayout(content, design, logo) {
90
- const { colors, fonts } = design;
91
45
  const { language, preview, eyebrow, heading, paragraphs = [], rows = [], quote, button, footer = [] } = content;
92
- const centered = design.align === "center";
93
- const eyebrowLine = design.eyebrowLine
94
- ? `<span style="display:inline-block;width:28px;height:1px;${accentBackground(design)}vertical-align:middle;margin:0 12px 2px 0"></span>`
95
- : "";
96
- const small = footer.length
97
- ? `<tr><td class="side" style="padding:22px 36px;border-top:1px ${design.rule} ${colors.rule};${labelStyle(design, colors.quiet)};text-transform:none;letter-spacing:0">${footer
98
- .map((row) => `${escapeHtml(row.label)}: ${value(row, colors.muted)}`)
99
- .join("<br>")}</td></tr>`
100
- : "";
101
- const signature = design.signature?.length
102
- ? `<tr><td align="center" style="padding:24px 12px 0;${labelStyle(design, colors.quiet)}">${design.signature
103
- .map((line) => `<span style="white-space:nowrap">${value({ value: line.text, href: line.href }, colors.quiet)}</span>`)
104
- .join(`<span style="padding:0 10px">&middot;</span>`)}</td></tr>`
105
- : "";
106
- const card = `<tr><td class="side" style="padding:32px 36px 0;text-align:${design.align}">${header(design, logo)}</td></tr>
107
- <tr><td class="side" style="padding:24px 36px 0"><div style="height:1px;line-height:1px;font-size:0;${headerRule(design)}">&nbsp;</div></td></tr>
108
- <tr><td class="side" style="padding:32px 36px 36px">
109
- <p style="margin:0 0 14px;text-align:${design.align};${labelStyle(design, colors.accent)}">${eyebrowLine}${escapeHtml(eyebrow)}</p>
110
- <h1 style="margin:0;text-align:${design.align};font-family:${fonts.heading};font-size:${design.heading.size}px;font-weight:${design.heading.weight};line-height:${design.heading.lineHeight};letter-spacing:${design.heading.letterSpacing};color:${colors.text}">${escapeHtml(heading)}</h1>
111
- ${paragraphs.map((paragraph) => `<p style="margin:18px 0 0;text-align:${centered ? "center" : "left"};font-family:${fonts.body};font-size:15px;line-height:1.7;color:${colors.muted}">${escapeHtml(paragraph)}</p>`).join("")}${rows.length ? details(design, rows) : ""}${quote ? quoted(design, quote) : ""}${button ? action(design, button) : ""}
112
- </td></tr>${small}`;
113
- return `<!doctype html><html lang="${escapeHtml(language)}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="color-scheme" content="light dark"><meta name="supported-color-schemes" content="light dark"><title>${escapeHtml(heading)}</title><style>${OWN_COLORS(colors.page)}${PHONE}</style></head><body class="page" style="margin:0;padding:0;color-scheme:light dark;background-color:${colors.page}">
114
- <style>${OWN_COLORS(colors.page)}${PHONE}</style>
46
+ const { background, text, muted, quiet, line } = EMAIL_COLORS;
47
+ const body = design.fonts?.body ?? SYSTEM_FONT;
48
+ const headings = design.fonts?.heading ?? body;
49
+ const block = (style, inside) => `<tr><td style="${style}">${inside}</td></tr>`;
50
+ const parts = [
51
+ block("padding:0 0 36px", header(design, logo, headings)),
52
+ block("padding:0 0 10px", `<div style="${capitals(body, design.color)}">${escapeHtml(eyebrow)}</div>`),
53
+ block("padding:0", `<h1 style="margin:0;font-family:${headings};font-size:30px;font-weight:700;line-height:1.2;letter-spacing:-0.01em;color:${design.color}">${escapeHtml(heading)}</h1>`),
54
+ ...paragraphs.map((paragraph) => block("padding:16px 0 0", `<p style="margin:0;font-family:${body};font-size:16px;line-height:1.6;color:${muted}">${escapeHtml(paragraph)}</p>`)),
55
+ rows.length
56
+ ? block("padding:28px 0 0", table("width:100%", rows
57
+ .map((row) => `<tr><td style="padding:14px 0;border-top:1px solid ${line};font-family:${body};word-break:break-word"><div style="${capitals(body, quiet)}">${escapeHtml(row.label)}</div><div style="padding-top:4px;font-size:16px;line-height:1.5;color:${text}">${value(row, text)}</div></td></tr>`)
58
+ .join("") + `<tr><td style="border-top:1px solid ${line};font-size:0;line-height:0">&nbsp;</td></tr>`))
59
+ : "",
60
+ quote
61
+ ? block("padding:28px 0 0", `<div style="${capitals(body, quiet)}">${escapeHtml(quote.label)}</div>${table("width:100%;margin-top:10px", `<tr><td style="padding:2px 0 2px 16px;border-left:3px solid ${design.color};font-family:${body};font-size:16px;line-height:1.6;color:${text};white-space:pre-wrap;word-break:break-word">${escapeHtml(quote.text)}</td></tr>`)}`)
62
+ : "",
63
+ button
64
+ ? block("padding:32px 0 0", table("", `<tr><td style="background-color:${design.color};border-radius:8px"><a href="${escapeHtml(button.href)}" style="display:inline-block;padding:14px 26px;font-family:${body};font-size:15px;font-weight:600;color:${design.onColor ?? "#ffffff"};text-decoration:none;border-radius:8px">${escapeHtml(button.label)}</a></td></tr>`))
65
+ : "",
66
+ footer.length
67
+ ? block("padding:36px 0 0", `<div style="padding-top:20px;border-top:1px solid ${line};font-family:${body};font-size:13px;line-height:1.6;color:${quiet}">${footer
68
+ .map((row) => `${escapeHtml(row.label)}: ${value(row, quiet)}`)
69
+ .join("<br>")}</div>`)
70
+ : "",
71
+ design.signature?.length
72
+ ? block(`padding:${footer.length ? 16 : 36}px 0 0;font-family:${body};font-size:13px;line-height:1.6;color:${quiet}`, design.signature.map((signed) => value({ value: signed.text, href: signed.href }, quiet)).join(" &middot; "))
73
+ : "",
74
+ ];
75
+ return `<!doctype html><html lang="${escapeHtml(language)}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(heading)}</title></head><body style="margin:0;padding:0;background-color:${background}">
115
76
  <div style="display:none;max-height:0;overflow:hidden;opacity:0">${escapeHtml(preview)}</div>
116
- ${table(`width:100%;color-scheme:light dark;background-color:${colors.page}`, `<tr><td align="center" style="padding:28px 8px 40px">${design.crosses
117
- ? framed(design, table("width:100%", card))
118
- : table(`width:100%;max-width:600px;background-color:${colors.card};border:1px solid ${colors.edge};border-radius:${design.radius}px`, card, 600)}${signature ? table("width:100%;max-width:600px", signature) : ""}</td></tr>`)}
77
+ ${table(`width:100%;background-color:${background}`, `<tr><td style="padding:32px 24px 40px">${table("width:100%;max-width:560px", parts.join("\n"), 560)}</td></tr>`)}
119
78
  </body></html>`;
120
79
  }
121
80
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D;;;G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,IAAI,gBAAgB,IAAI,yCAAyC,KAAK,KAAK,MAAM;iBACnI,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC;iBAC9D,IAAI,CAAC,MAAM,CAAC,QAAQ,CACxB;YACH,CAAC,CAAC,EAAE;QACN,MAAM,CAAC,SAAS,EAAE,MAAM;YACtB,CAAC,CAAC,KAAK,CACH,WAAW,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,sBAAsB,IAAI,yCAAyC,KAAK,EAAE,EAC5G,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAC7G;YACH,CAAC,CAAC,EAAE;KACP,CAAC;IACF,OAAO,8BAA8B,UAAU,CAAC,QAAQ,CAAC,2GAA2G,UAAU,CAAC,OAAO,CAAC,mEAAmE,UAAU;mEACnM,UAAU,CAAC,OAAO,CAAC;EACpF,KAAK,CACL,+BAA+B,UAAU,EAAE,EAC3C,0CAA0C,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,YAAY,CACjH;eACc,CAAC;AAChB,CAAC"}
@@ -5,85 +5,33 @@ export interface EmailRow {
5
5
  href?: string;
6
6
  }
7
7
  /**
8
- * A brand's look for its emails: colors, type and details, so every email it sends looks like its website. Fonts are
9
- * font stacks the reader's device already has (no web fonts, which would tell a font service the email was opened).
8
+ * What makes an email a brand's. Every email shares one simple layout, black on white, that every mail app shows the
9
+ * same way and darkens on its own in dark mode; a brand only brings its logo, its color and its type. Fonts are font
10
+ * stacks the reader's device already has (no web fonts, which would tell a font service the email was opened).
10
11
  */
11
12
  export interface EmailDesign {
12
13
  /** The company: the logo's description, and its name beside the logo with `wordmark`. */
13
14
  name: string;
14
- /** The size the inline image "logo" is shown at, when the email carries one. */
15
+ /** The size the inline image "logo" is shown at, when the email carries one: the real logo, without a background. */
15
16
  logo?: {
16
17
  width: number;
17
18
  height: number;
18
19
  };
19
20
  /** Whether the company's name is written beside the logo. */
20
- wordmark: boolean;
21
- /** Where the header and the heading sit. */
22
- align: "left" | "center";
23
- colors: {
24
- /** Around the card. */
25
- page: string;
26
- /** The card itself. */
27
- card: string;
28
- /** The card's edge. */
29
- edge: string;
30
- /** Headings and values. */
31
- text: string;
32
- /** Paragraphs. */
33
- muted: string;
34
- /** Labels and small print. */
35
- quiet: string;
36
- /** Rules between details. */
37
- rule: string;
38
- /** The brand's color: the eyebrow, the rule under the header, the button. */
39
- accent: string;
40
- /** A CSS gradient over the accent where the reader's device shows one (shiny gold). */
41
- accentGradient?: string;
42
- /** The line under the header, a color or a CSS gradient, when it isn't the accent (a hairline fading at its ends). */
43
- headerRule?: string;
44
- /**
45
- * The header line's plain color, under its gradient: what clients that drop gradients (some privacy-minded ones)
46
- * show instead; the accent by default.
47
- */
48
- headerRuleColor?: string;
49
- /** Behind a quoted text. */
50
- box: string;
51
- /** The button's words. */
52
- onAccent: string;
53
- };
54
- fonts: {
55
- heading: string;
56
- body: string;
57
- /** Eyebrows, labels and small print. */
58
- label: string;
59
- };
60
- heading: {
61
- size: number;
62
- weight: number;
63
- letterSpacing: string;
64
- lineHeight: number;
65
- };
66
- /** Eyebrows and labels in capitals, spaced. */
67
- label: {
68
- size: number;
69
- letterSpacing: string;
70
- };
71
- /** The rules between details: solid, or dashed like the brand's grid. */
72
- rule: "solid" | "dashed";
73
- /** The card's corners (0 for square). */
74
- radius: number;
75
- /** "+" marks at the card's corners, where a grid's lines would cross. */
76
- crosses?: boolean;
77
- /** A short line before the eyebrow. */
78
- eyebrowLine?: boolean;
79
- /** A bar in the accent at the left of a quoted text. */
80
- quoteBar?: boolean;
81
- button: {
82
- radius: number;
83
- uppercase: boolean;
84
- letterSpacing: string;
21
+ wordmark?: boolean;
22
+ /**
23
+ * The brand's color, dark enough to read on white: the eyebrow, the headings, the bar beside a quoted text and the
24
+ * button. Black when the brand's own color is white.
25
+ */
26
+ color: string;
27
+ /** The button's words, on the brand's color: white by default. */
28
+ onColor?: string;
29
+ /** The headings' font stack, and the rest's; the device's own sans by default. */
30
+ fonts?: {
31
+ heading?: string;
32
+ body?: string;
85
33
  };
86
- /** The company's lines at the very bottom of every email (its slogan, its site). */
34
+ /** The company's lines at the very bottom of every email (its site). */
87
35
  signature?: readonly {
88
36
  text: string;
89
37
  href?: string;
@@ -100,9 +48,9 @@ export interface EmailContent {
100
48
  heading: string;
101
49
  /** Paragraphs under the heading. */
102
50
  paragraphs?: readonly string[];
103
- /** The details table. */
51
+ /** The details, each label over its value. */
104
52
  rows?: readonly EmailRow[];
105
- /** A longer text in its own box, keeping its line breaks (a visitor's message), with its label. */
53
+ /** A longer text keeping its line breaks (a visitor's message), with its label. */
106
54
  quote?: {
107
55
  label: string;
108
56
  text: string;
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/email-layout/type.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,6DAA6D;IAC7D,QAAQ,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,KAAK,EA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AC;IACb,qHAAqH;IACrH,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,wEAAwE;IACxE,SAAS,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACxD;AAED,kDAAkD;AAClD,MAAM,WAAW,YAAY;IAC3B,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,mFAAmF;IACnF,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,iEAAiE;IACjE,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,wDAAwD;IACxD,MAAM,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC9B"}
@@ -20,6 +20,6 @@ export { createEmailSender } from "@sharadox/email-web-library/email-sender";
20
20
  export type { EmailReceipt, EmailSender } from "@sharadox/email-web-library/email-sender/type";
21
21
  export { readEmailServerConfiguration } from "@sharadox/email-web-library/email-server-configuration";
22
22
  export type { EmailServerConfiguration, EmailServerSecurity, } from "@sharadox/email-web-library/email-server-configuration/type";
23
- export { emailLayout } from "@sharadox/email-web-library/email-layout";
23
+ export { EMAIL_COLORS, emailLayout, SYSTEM_FONT } from "@sharadox/email-web-library/email-layout";
24
24
  export type { EmailContent, EmailDesign, EmailRow } from "@sharadox/email-web-library/email-layout/type";
25
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC9G,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AACtG,YAAY,EACV,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC9G,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AACtG,YAAY,EACV,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAClG,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC"}
@@ -15,5 +15,5 @@ export { EmailError } from "@sharadox/email-web-library/email-error";
15
15
  export { checkEmailMessage, RECIPIENT_LIMIT, SUBJECT_LIMIT } from "@sharadox/email-web-library/email-message";
16
16
  export { createEmailSender } from "@sharadox/email-web-library/email-sender";
17
17
  export { readEmailServerConfiguration } from "@sharadox/email-web-library/email-server-configuration";
18
- export { emailLayout } from "@sharadox/email-web-library/email-layout";
18
+ export { EMAIL_COLORS, emailLayout, SYSTEM_FONT } from "@sharadox/email-web-library/email-layout";
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AAKtG,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,wDAAwD,CAAC;AAKtG,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC"}
package/llms.txt CHANGED
@@ -8,7 +8,6 @@
8
8
  - /inline-image: inlineImage(id, { filename, contentType, content (base64) }) → InlineImage with the bytes decoded (a library's logo kept as base64 text)
9
9
  - /email-address: checkEmailAddress(value, field) → the address, or EmailError("invalid-message"); EmailAddress = string | { name, address }
10
10
  - /email-error: EmailError(code: "configuration" | "invalid-message" | "delivery", message, options?)
11
- - /email-layout: emailLayout(content, design, logo) → HTML that works in email clients, light and dark; EmailDesign (name, logo?, wordmark, align, colors, fonts, heading, label, rule, radius, button, signature…), EmailContent (language, preview, eyebrow, heading, paragraphs, rows, quote, button, footer)
11
+ - /email-layout: emailLayout(content, design, logo) → HTML the same in every mail app: black on white (EMAIL_COLORS), styles inline, no <style>/dark-mode rules/gradients, the app darkens it itself; logo top left; EmailDesign { name, logo? {width,height}, wordmark?, color (brand color on eyebrow, headings, quote bar, button; black for a white brand), onColor? (#ffffff), fonts? { heading?, body? } (SYSTEM_FONT), signature? }, EmailContent (language, preview, eyebrow, heading, paragraphs, rows (label over value), quote, button, footer)
12
12
  - Root import (all of the above) kept in 0.5 for compatibility, removed in 0.6.
13
13
  - License: Sharadox Open Source License 0.1.0
14
- - Dark mode: every email declares its colors as its own (meta color-scheme + supported-color-schemes, :root color-scheme, a prefers-color-scheme:dark rule with the same page color), its <style> repeated inside <body>; colors.headerRuleColor is the plain color under a gradient headerRule
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharadox/email-web-library",
3
- "version": "0.6.0-polish.21",
3
+ "version": "0.6.0-polish.23",
4
4
  "description": "Send email from web applications through any SMTP server, with message checks and clear errors.",
5
5
  "license": "SEE LICENSE IN LICENCA.md",
6
6
  "author": "Sharadox <contact@sharadox.com>",