@sharadox/email-web-library 0.3.0 → 0.4.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 +51 -0
- package/distribution/email-layout/index.d.ts +13 -0
- package/distribution/email-layout/index.d.ts.map +1 -0
- package/distribution/email-layout/index.js +102 -0
- package/distribution/email-layout/index.js.map +1 -0
- package/distribution/email-layout/type.d.ts +113 -0
- package/distribution/email-layout/type.d.ts.map +1 -0
- package/distribution/email-layout/type.js +2 -0
- package/distribution/email-layout/type.js.map +1 -0
- package/distribution/index.d.ts +2 -0
- package/distribution/index.d.ts.map +1 -1
- package/distribution/index.js +1 -0
- package/distribution/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -59,6 +59,57 @@ await sender.send({
|
|
|
59
59
|
});
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
### In the brand's design
|
|
63
|
+
|
|
64
|
+
`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.
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import { emailLayout, type EmailDesign } from "@sharadox/email-web-library";
|
|
68
|
+
|
|
69
|
+
const design: EmailDesign = {
|
|
70
|
+
name: "Sharadox",
|
|
71
|
+
logo: { width: 30, height: 30 }, // shown size of the inline image "logo"
|
|
72
|
+
wordmark: true, // the name beside the logo
|
|
73
|
+
align: "left",
|
|
74
|
+
colors: {
|
|
75
|
+
page: "#000",
|
|
76
|
+
card: "#000",
|
|
77
|
+
edge: "#262626",
|
|
78
|
+
text: "#fff",
|
|
79
|
+
muted: "#a3a3a3",
|
|
80
|
+
quiet: "#737373",
|
|
81
|
+
rule: "#2e2e2e",
|
|
82
|
+
accent: "#fff",
|
|
83
|
+
box: "#0a0a0a",
|
|
84
|
+
onAccent: "#000",
|
|
85
|
+
},
|
|
86
|
+
fonts: { heading: "Geist, sans-serif", body: "Geist, sans-serif", label: "'Geist Mono', monospace" },
|
|
87
|
+
heading: { size: 34, weight: 600, letterSpacing: "-0.04em", lineHeight: 1.1 },
|
|
88
|
+
label: { size: 11, letterSpacing: "0.06em" },
|
|
89
|
+
rule: "dashed", // between details
|
|
90
|
+
radius: 0,
|
|
91
|
+
crosses: true, // a grid's frame, with "+" where its lines cross
|
|
92
|
+
button: { radius: 999, uppercase: false, letterSpacing: "0" },
|
|
93
|
+
signature: [{ text: "sharadox.com", href: "https://sharadox.com" }],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const html = emailLayout(
|
|
97
|
+
{
|
|
98
|
+
language: "en",
|
|
99
|
+
preview: "Ana sent a message",
|
|
100
|
+
eyebrow: "Contact",
|
|
101
|
+
heading: "Ana Sousa",
|
|
102
|
+
rows: [{ label: "Email", value: "ana@example.com", href: "mailto:ana@example.com" }],
|
|
103
|
+
quote: { label: "Message", text: "Hello!" },
|
|
104
|
+
button: { label: "Reply to Ana", href: "mailto:ana@example.com" },
|
|
105
|
+
},
|
|
106
|
+
design,
|
|
107
|
+
true, // the email carries the inline image "logo"
|
|
108
|
+
);
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
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).
|
|
112
|
+
|
|
62
113
|
`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.
|
|
63
114
|
|
|
64
115
|
## Development
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EmailContent, EmailDesign } from "./type.ts";
|
|
2
|
+
/**
|
|
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".
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* emailLayout({ language: "en", preview: "Ana sent a message", eyebrow: "Contact", heading: "Ana",
|
|
10
|
+
* rows: [{ label: "Email", value: "ana@example.com" }] }, SHARADOX_EMAIL, true);
|
|
11
|
+
*/
|
|
12
|
+
export declare function emailLayout(content: EmailContent, design: EmailDesign, logo: boolean): string;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,WAAW,CAAC;AAiGrE;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CA0C7F"}
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
/** A table that's only there for layout, as email clients need. */
|
|
8
|
+
const table = (style, rows, width) => `<table role="presentation" cellpadding="0" cellspacing="0" border="0"${width ? ` width="${width}"` : ""} style="border-collapse:separate;${style}">${rows}</table>`;
|
|
9
|
+
/** The accent as a background: the gradient where the reader's device shows one, the plain color otherwise. */
|
|
10
|
+
const accentBackground = ({ colors }) => `background-color:${colors.accent};${colors.accentGradient ? `background-image:${colors.accentGradient};` : ""}`;
|
|
11
|
+
/** Text in the label style: small, spaced capitals. */
|
|
12
|
+
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}`;
|
|
13
|
+
/** A value, as a link when it has one. */
|
|
14
|
+
const value = ({ value: text, href }, color) => href
|
|
15
|
+
? `<a href="${escapeHtml(href)}" style="color:${color};text-decoration:underline;text-underline-offset:3px">${escapeHtml(text)}</a>`
|
|
16
|
+
: escapeHtml(text);
|
|
17
|
+
/** The logo, and the company's name beside it with `wordmark`. */
|
|
18
|
+
function header(design, logo) {
|
|
19
|
+
const { colors, fonts } = design;
|
|
20
|
+
const mark = logo && design.logo
|
|
21
|
+
? `<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>`
|
|
22
|
+
: "";
|
|
23
|
+
const name = design.wordmark || !mark
|
|
24
|
+
? `<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>`
|
|
25
|
+
: "";
|
|
26
|
+
return table(design.align === "center" ? "margin:0 auto" : "", `<tr>${mark}${name}</tr>`);
|
|
27
|
+
}
|
|
28
|
+
/** The details, one per line: the label above or beside its value, rules between them. */
|
|
29
|
+
function details(design, rows) {
|
|
30
|
+
const { colors, fonts } = design;
|
|
31
|
+
const line = `border-top:1px ${design.rule} ${colors.rule}`;
|
|
32
|
+
return table("width:100%;margin:28px 0 0", rows
|
|
33
|
+
.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>`)
|
|
34
|
+
.join("") + `<tr><td colspan="2" style="${line};font-size:0;line-height:0"> </td></tr>`);
|
|
35
|
+
}
|
|
36
|
+
/** A longer text in its own box, keeping its line breaks. */
|
|
37
|
+
function quoted(design, quote) {
|
|
38
|
+
const { colors, fonts } = design;
|
|
39
|
+
const bar = design.quoteBar ? `border-left:2px solid ${colors.accent};` : "";
|
|
40
|
+
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>`)}`;
|
|
41
|
+
}
|
|
42
|
+
/** The one thing to do next, as a button that works in every email client (a padded link). */
|
|
43
|
+
function action(design, button) {
|
|
44
|
+
const { colors, fonts } = design;
|
|
45
|
+
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>`);
|
|
46
|
+
}
|
|
47
|
+
/** A "+" where two of the frame's lines cross, centered on them (it spans two half cells each way). */
|
|
48
|
+
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>`;
|
|
49
|
+
/**
|
|
50
|
+
* The card inside a grid's frame, drawn from table cells so it holds in every email client: lines along its four
|
|
51
|
+
* sides, each through the middle of a pair of half cells, and a "+" where they cross at each corner.
|
|
52
|
+
*/
|
|
53
|
+
function framed(design, card) {
|
|
54
|
+
const line = `1px solid ${design.colors.edge}`;
|
|
55
|
+
const half = (style = "") => `<td width="6" style="width:6px;padding:0;font-size:0;line-height:0;${style}"> </td>`;
|
|
56
|
+
const across = (style) => `<td style="height:6px;padding:0;font-size:0;line-height:0;${style}"> </td>`;
|
|
57
|
+
return table("width:100%;max-width:612px", `<tr>${cross(design)}${across(`border-bottom:${line}`)}${cross(design)}</tr><tr>${across("")}</tr>
|
|
58
|
+
<tr>${half(`border-right:${line}`)}${half()}<td style="padding:0;background-color:${design.colors.card}">${card}</td>${half(`border-right:${line}`)}${half()}</tr>
|
|
59
|
+
<tr>${cross(design)}${across(`border-bottom:${line}`)}${cross(design)}</tr><tr>${across("")}</tr>`, 612);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 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
|
|
63
|
+
* heading, then paragraphs, details, a quoted text and one button, small print, and the company's signature. Built
|
|
64
|
+
* from tables with inline styles, as email clients need; everything given is escaped. `logo` says whether the email
|
|
65
|
+
* carries the inline image "logo".
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* emailLayout({ language: "en", preview: "Ana sent a message", eyebrow: "Contact", heading: "Ana",
|
|
69
|
+
* rows: [{ label: "Email", value: "ana@example.com" }] }, SHARADOX_EMAIL, true);
|
|
70
|
+
*/
|
|
71
|
+
export function emailLayout(content, design, logo) {
|
|
72
|
+
const { colors, fonts } = design;
|
|
73
|
+
const { language, preview, eyebrow, heading, paragraphs = [], rows = [], quote, button, footer = [] } = content;
|
|
74
|
+
const centered = design.align === "center";
|
|
75
|
+
const eyebrowLine = design.eyebrowLine
|
|
76
|
+
? `<span style="display:inline-block;width:28px;height:1px;${accentBackground(design)}vertical-align:middle;margin:0 12px 2px 0"></span>`
|
|
77
|
+
: "";
|
|
78
|
+
const small = footer.length
|
|
79
|
+
? `<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
|
|
80
|
+
.map((row) => `${escapeHtml(row.label)}: ${value(row, colors.muted)}`)
|
|
81
|
+
.join("<br>")}</td></tr>`
|
|
82
|
+
: "";
|
|
83
|
+
const signature = design.signature?.length
|
|
84
|
+
? `<tr><td align="center" style="padding:24px 12px 0;${labelStyle(design, colors.quiet)}">${design.signature
|
|
85
|
+
.map((line) => `<span style="white-space:nowrap">${value({ value: line.text, href: line.href }, colors.quiet)}</span>`)
|
|
86
|
+
.join(`<span style="padding:0 10px">·</span>`)}</td></tr>`
|
|
87
|
+
: "";
|
|
88
|
+
const card = `<tr><td class="side" style="padding:32px 36px 0;text-align:${design.align}">${header(design, logo)}</td></tr>
|
|
89
|
+
<tr><td class="side" style="padding:24px 36px 0"><div style="height:1px;line-height:1px;font-size:0;${colors.headerRule ? `background:${colors.headerRule};` : accentBackground(design)}"> </div></td></tr>
|
|
90
|
+
<tr><td class="side" style="padding:32px 36px 36px">
|
|
91
|
+
<p style="margin:0 0 14px;text-align:${design.align};${labelStyle(design, colors.accent)}">${eyebrowLine}${escapeHtml(eyebrow)}</p>
|
|
92
|
+
<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>
|
|
93
|
+
${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) : ""}
|
|
94
|
+
</td></tr>${small}`;
|
|
95
|
+
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>${PHONE}</style></head><body style="margin:0;padding:0;background-color:${colors.page}">
|
|
96
|
+
<div style="display:none;max-height:0;overflow:hidden;opacity:0">${escapeHtml(preview)}</div>
|
|
97
|
+
${table(`width:100%;background-color:${colors.page}`, `<tr><td align="center" style="padding:28px 8px 40px">${design.crosses
|
|
98
|
+
? framed(design, table("width:100%", card))
|
|
99
|
+
: 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>`)}
|
|
100
|
+
</body></html>`;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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;;;GAGG;AACH,MAAM,KAAK,GACT,mPAAmP,CAAC;AAEtP,mEAAmE;AACnE,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,IAAY,EAAE,KAAc,EAAE,EAAE,CAC5D,wEAAwE,KAAK,CAAC,CAAC,CAAC,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,oCAAoC,KAAK,KAAK,IAAI,UAAU,CAAC;AAEvK,+GAA+G;AAC/G,MAAM,gBAAgB,GAAG,CAAC,EAAE,MAAM,EAAe,EAAE,EAAE,CACnD,oBAAoB,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,oBAAoB,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAEnH,uDAAuD;AACvD,MAAM,UAAU,GAAG,CAAC,MAAmB,EAAE,KAAa,EAAE,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AC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,wCAAwC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,gBAAgB,KAAK,CAAC,IAAI,yCAAyC,MAAM,CAAC,KAAK,KAAK,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;YACxU,KAAK,EAAE,CAAC;IAClB,OAAO,8BAA8B,UAAU,CAAC,QAAQ,CAAC,oNAAoN,UAAU,CAAC,OAAO,CAAC,kBAAkB,KAAK,mEAAmE,MAAM,CAAC,IAAI;mEACpU,UAAU,CAAC,OAAO,CAAC;EACpF,KAAK,CACL,+BAA+B,MAAM,CAAC,IAAI,EAAE,EAC5C,wDACE,MAAM,CAAC,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC,KAAK,CACH,+CAA+C,MAAM,CAAC,IAAI,qBAAqB,MAAM,CAAC,IAAI,kBAAkB,MAAM,CAAC,MAAM,IAAI,EAC7H,IAAI,EACJ,GAAG,CAEX,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,CAC/E;eACc,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/** One line of a details table or of the small print: a label and its value (plain text, or a link with `href`). */
|
|
2
|
+
export interface EmailRow {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
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).
|
|
10
|
+
*/
|
|
11
|
+
export interface EmailDesign {
|
|
12
|
+
/** The company: the logo's description, and its name beside the logo with `wordmark`. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** The size the inline image "logo" is shown at, when the email carries one. */
|
|
15
|
+
logo?: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
/** 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, as a CSS background, when it isn't the accent (a hairline fading at its ends). */
|
|
43
|
+
headerRule?: string;
|
|
44
|
+
/** Behind a quoted text. */
|
|
45
|
+
box: string;
|
|
46
|
+
/** The button's words. */
|
|
47
|
+
onAccent: string;
|
|
48
|
+
};
|
|
49
|
+
fonts: {
|
|
50
|
+
heading: string;
|
|
51
|
+
body: string;
|
|
52
|
+
/** Eyebrows, labels and small print. */
|
|
53
|
+
label: string;
|
|
54
|
+
};
|
|
55
|
+
heading: {
|
|
56
|
+
size: number;
|
|
57
|
+
weight: number;
|
|
58
|
+
letterSpacing: string;
|
|
59
|
+
lineHeight: number;
|
|
60
|
+
};
|
|
61
|
+
/** Eyebrows and labels in capitals, spaced. */
|
|
62
|
+
label: {
|
|
63
|
+
size: number;
|
|
64
|
+
letterSpacing: string;
|
|
65
|
+
};
|
|
66
|
+
/** The rules between details: solid, or dashed like the brand's grid. */
|
|
67
|
+
rule: "solid" | "dashed";
|
|
68
|
+
/** The card's corners (0 for square). */
|
|
69
|
+
radius: number;
|
|
70
|
+
/** "+" marks at the card's corners, where a grid's lines would cross. */
|
|
71
|
+
crosses?: boolean;
|
|
72
|
+
/** A short line before the eyebrow. */
|
|
73
|
+
eyebrowLine?: boolean;
|
|
74
|
+
/** A bar in the accent at the left of a quoted text. */
|
|
75
|
+
quoteBar?: boolean;
|
|
76
|
+
button: {
|
|
77
|
+
radius: number;
|
|
78
|
+
uppercase: boolean;
|
|
79
|
+
letterSpacing: string;
|
|
80
|
+
};
|
|
81
|
+
/** The company's lines at the very bottom of every email (its slogan, its site). */
|
|
82
|
+
signature?: readonly {
|
|
83
|
+
text: string;
|
|
84
|
+
href?: string;
|
|
85
|
+
}[];
|
|
86
|
+
}
|
|
87
|
+
/** What one email says, in the brand's design. */
|
|
88
|
+
export interface EmailContent {
|
|
89
|
+
/** The language of the email, for the html's `lang`. */
|
|
90
|
+
language: string;
|
|
91
|
+
/** The line shown in the inbox's preview, before the email is opened. */
|
|
92
|
+
preview: string;
|
|
93
|
+
/** The small capitals above the heading, for example "Contact". */
|
|
94
|
+
eyebrow: string;
|
|
95
|
+
heading: string;
|
|
96
|
+
/** Paragraphs under the heading. */
|
|
97
|
+
paragraphs?: readonly string[];
|
|
98
|
+
/** The details table. */
|
|
99
|
+
rows?: readonly EmailRow[];
|
|
100
|
+
/** A longer text in its own box, keeping its line breaks (a visitor's message), with its label. */
|
|
101
|
+
quote?: {
|
|
102
|
+
label: string;
|
|
103
|
+
text: string;
|
|
104
|
+
};
|
|
105
|
+
/** The one thing to do next, as a button: reply, call, visit. */
|
|
106
|
+
button?: {
|
|
107
|
+
label: string;
|
|
108
|
+
href: string;
|
|
109
|
+
};
|
|
110
|
+
/** Small print: where it came from, when, and so on. */
|
|
111
|
+
footer?: readonly EmailRow[];
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +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,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,MAAM,EAAE;QACN,uBAAuB;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,uBAAuB;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,uBAAuB;QACvB,IAAI,EAAE,MAAM,CAAC;QACb,2BAA2B;QAC3B,IAAI,EAAE,MAAM,CAAC;QACb,kBAAkB;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,8BAA8B;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,6BAA6B;QAC7B,IAAI,EAAE,MAAM,CAAC;QACb,6EAA6E;QAC7E,MAAM,EAAE,MAAM,CAAC;QACf,uFAAuF;Q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E,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,yBAAyB;IACzB,IAAI,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,mGAAmG;IACnG,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/email-layout/type.ts"],"names":[],"mappings":""}
|
package/distribution/index.d.ts
CHANGED
|
@@ -20,4 +20,6 @@ export { createEmailSender } from "./email-sender/index.ts";
|
|
|
20
20
|
export type { EmailReceipt, EmailSender } from "./email-sender/type.ts";
|
|
21
21
|
export { readEmailServerConfiguration } from "./email-server-configuration/index.ts";
|
|
22
22
|
export type { EmailServerConfiguration, EmailServerSecurity } from "./email-server-configuration/type.ts";
|
|
23
|
+
export { emailLayout } from "./email-layout/index.ts";
|
|
24
|
+
export type { EmailContent, EmailDesign, EmailRow } from "./email-layout/type.ts";
|
|
23
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,0BAA0B,CAAC;AAC7D,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,YAA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
|
package/distribution/index.js
CHANGED
|
@@ -15,4 +15,5 @@ export { EmailError } from "./email-error/index.js";
|
|
|
15
15
|
export { checkEmailMessage, RECIPIENT_LIMIT, SUBJECT_LIMIT } from "./email-message/index.js";
|
|
16
16
|
export { createEmailSender } from "./email-sender/index.js";
|
|
17
17
|
export { readEmailServerConfiguration } from "./email-server-configuration/index.js";
|
|
18
|
+
export { emailLayout } from "./email-layout/index.js";
|
|
18
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,0BAA0B,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/email-web-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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>",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"*.{json,md,yml,yaml}": "prettier --write"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
+
"@sharadox/web-library": "^0.7.0",
|
|
49
50
|
"nodemailer": "^10.1.4"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|