@sharadox/email-web-library 0.7.1 → 0.8.0-account-experience.59
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 +4 -0
- package/README.md +1 -0
- package/distribution/email-layout/index.d.ts +1 -1
- package/distribution/email-layout/index.d.ts.map +1 -1
- package/distribution/email-layout/index.js +15 -2
- package/distribution/email-layout/index.js.map +1 -1
- package/distribution/email-layout/type.d.ts +9 -0
- package/distribution/email-layout/type.d.ts.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of `@sharadox/email-web-library`, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.8.0
|
|
6
|
+
|
|
7
|
+
One-time codes in emails: `code` shows them one box per character, outlined in the line color.
|
|
8
|
+
|
|
5
9
|
## 0.7.1
|
|
6
10
|
|
|
7
11
|
Workflows from git-hub-action-library v0.2.2: npm Trusted Publishing only
|
package/README.md
CHANGED
|
@@ -105,6 +105,7 @@ const html = emailLayout(
|
|
|
105
105
|
eyebrow: "Contact",
|
|
106
106
|
heading: "Thank you, Ana.",
|
|
107
107
|
paragraphs: ["Your message has reached us…"],
|
|
108
|
+
code: { label: "Code", value: "123456" }, // a one-time code: one box per character, outlined in the line color
|
|
108
109
|
rows: [
|
|
109
110
|
{ label: "Email", value: "ana@example.com", href: "mailto:ana@example.com" },
|
|
110
111
|
{ label: "Needs", value: ["Website", "Hosting"] }, // a list: one item per line after a dot
|
|
@@ -27,7 +27,7 @@ export declare const EMAIL_SPACES: {
|
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
29
|
* An email that looks the same in every inbox, in a centered column 600 pixels wide: the logo, an eyebrow and a
|
|
30
|
-
* heading, paragraphs, the details (each label over its value, lines between them), a sign-off with the company's
|
|
30
|
+
* heading, paragraphs, a one-time code in boxes, the details (each label over its value, lines between them), a sign-off with the company's
|
|
31
31
|
* name, and its site. No background: the mail app's own shows; the text is black and gray, white and light gray in
|
|
32
32
|
* dark themes where the mail app honors them (the only styles not inline). Spaces are 4, 8, 16 or 32 pixels. Geist
|
|
33
33
|
* where the reader has it, the device's own sans otherwise. Everything given is escaped. `logos` says which logo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,UAAU,EAGX,MAAM,+CAA+C,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAGf,CAAC;AAEX,sEAAsE;AACtE,eAAO,MAAM,UAAU,+FAA+F,CAAC;AAEvH,kFAAkF;AAClF,eAAO,MAAM,YAAY;;;;;CAAwD,CAAC;AA6FlF;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CA0C3G"}
|
|
@@ -65,9 +65,21 @@ function details(rows) {
|
|
|
65
65
|
.map((row, index) => `<tr><td class="line" style="padding:${normal}px 0;${index ? `border-top:1px solid ${light.line};` : ""}word-break:break-word"><div ${CAPITALS}>${escapeHtml(row.label)}</div><div ${colored("strong", `padding-top:${tiny}px;font-size:16px;line-height:24px${row.keepLines ? ";white-space:pre-wrap" : ""}`)}>${value(row)}</div></td></tr>`)
|
|
66
66
|
.join(""));
|
|
67
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A one-time code, one box per character outlined in the line color, so it reads at a glance and matches the boxes
|
|
70
|
+
* it's typed into. A screen reader hears the whole code once (the label, then each character).
|
|
71
|
+
*/
|
|
72
|
+
function codeBoxes(code) {
|
|
73
|
+
const characters = [...code.value];
|
|
74
|
+
const cells = characters
|
|
75
|
+
.map((character, index) => `${index ? `<td style="width:${small}px;padding:0"></td>` : ""}<td class="code-box line strong" align="center" style="width:40px;height:48px;padding:0;border:1px solid ${light.line};border-radius:${small}px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:24px;font-weight:700;line-height:48px;text-align:center;color:${light.strong}">${escapeHtml(character)}</td>`)
|
|
76
|
+
.join("");
|
|
77
|
+
const spoken = escapeHtml(`${code.label}: ${characters.join(" ")}`);
|
|
78
|
+
return `<div ${CAPITALS}>${escapeHtml(code.label)}</div><div role="img" aria-label="${spoken}" style="padding-top:${small}px">${table("", `<tr>${cells}</tr>`)}</div>`;
|
|
79
|
+
}
|
|
68
80
|
/**
|
|
69
81
|
* An email that looks the same in every inbox, in a centered column 600 pixels wide: the logo, an eyebrow and a
|
|
70
|
-
* heading, paragraphs, the details (each label over its value, lines between them), a sign-off with the company's
|
|
82
|
+
* heading, paragraphs, a one-time code in boxes, the details (each label over its value, lines between them), a sign-off with the company's
|
|
71
83
|
* name, and its site. No background: the mail app's own shows; the text is black and gray, white and light gray in
|
|
72
84
|
* dark themes where the mail app honors them (the only styles not inline). Spaces are 4, 8, 16 or 32 pixels. Geist
|
|
73
85
|
* where the reader has it, the device's own sans otherwise. Everything given is escaped. `logos` says which logo
|
|
@@ -79,13 +91,14 @@ function details(rows) {
|
|
|
79
91
|
*/
|
|
80
92
|
export function emailLayout(content, design, logos) {
|
|
81
93
|
const carried = typeof logos === "boolean" ? { light: logos, dark: false } : logos;
|
|
82
|
-
const { language, preview, eyebrow, heading, paragraphs = [], rows = [], closing } = content;
|
|
94
|
+
const { language, preview, eyebrow, heading, paragraphs = [], rows = [], code, closing } = content;
|
|
83
95
|
const block = (top, inside) => `<tr><td style="padding:${top}px 0 0">${inside}</td></tr>`;
|
|
84
96
|
const parts = [
|
|
85
97
|
`<tr><td style="padding:0">${header(design, carried)}</td></tr>`,
|
|
86
98
|
block(large, `<div ${CAPITALS}>${escapeHtml(eyebrow)}</div>`),
|
|
87
99
|
block(small, `<h1 ${colored("strong", "margin:0;font-size:28px;font-weight:700;line-height:32px;letter-spacing:-0.01em")}>${escapeHtml(heading)}</h1>`),
|
|
88
100
|
...paragraphs.map((paragraph, index) => block(index ? small : normal, `<p ${colored("soft", "margin:0;font-size:16px;line-height:24px")}>${escapeHtml(paragraph)}</p>`)),
|
|
101
|
+
code ? block(large, codeBoxes(code)) : "",
|
|
89
102
|
rows.length ? block(large - normal, details(rows)) : "",
|
|
90
103
|
closing
|
|
91
104
|
? block(rows.length ? large - normal : large, `<p ${colored("soft", "margin:0;font-size:16px;line-height:24px")}>${escapeHtml(closing)}<br><b class="strong" style="color:${light.strong}">${escapeHtml(design.name)}</b>.</p>`)
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/email-layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAS/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9D,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACrD,CAAC;AAEX,sEAAsE;AACtE,MAAM,CAAC,MAAM,UAAU,GAAG,4FAA4F,CAAC;AAEvH,kFAAkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,K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C"}
|
|
@@ -39,6 +39,13 @@ export interface EmailLogos {
|
|
|
39
39
|
light: boolean;
|
|
40
40
|
dark: boolean;
|
|
41
41
|
}
|
|
42
|
+
/** A one-time code, shown one box per character. */
|
|
43
|
+
export interface EmailCode {
|
|
44
|
+
/** Its label, for example "Code". */
|
|
45
|
+
label: string;
|
|
46
|
+
/** The code itself, for example "123456". */
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
42
49
|
/** What one email says. */
|
|
43
50
|
export interface EmailContent {
|
|
44
51
|
/** The language of the email, for the html's `lang`. */
|
|
@@ -50,6 +57,8 @@ export interface EmailContent {
|
|
|
50
57
|
heading: string;
|
|
51
58
|
/** Paragraphs under the heading. */
|
|
52
59
|
paragraphs?: readonly string[];
|
|
60
|
+
/** A one-time code under the paragraphs, one box per character. */
|
|
61
|
+
code?: EmailCode;
|
|
53
62
|
/** The details, each label over its value, lines between them. */
|
|
54
63
|
rows?: readonly EmailRow[];
|
|
55
64
|
/** The sign-off before the company's name: "Best regards,". */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/email-layout/type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,8GAA8G;IAC9G,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qEAAqE;IACrE,SAAS,CAAC,EAAE,S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M,CAAA;KAAE,EAAE,CAAC;CACxD;AAED,mFAAmF;AACnF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,2BAA2B;AAC3B,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,mEAAmE;IACnE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kEAAkE;IAClE,IAAI,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/llms.txt
CHANGED
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
- /inline-image: inlineImage(id, { filename, contentType, content (base64) }) → InlineImage with the bytes decoded (a library's logo kept as base64 text)
|
|
10
10
|
- /email-address: checkEmailAddress(value, field) → the address, or EmailError("invalid-message"); EmailAddress = string | { name, address }
|
|
11
11
|
- /email-error: EmailError(code: "configuration" | "invalid-message" | "delivery", message, options?)
|
|
12
|
-
- /email-layout: emailLayout(content, design, logos: { light, dark } | boolean) → HTML the same in every mail app: centered 600px column, 16px around, no background; strong #000000 (logo, heading, values, company name, site) and soft #5E5E5E (labels, other text), dark theme #FFFFFF/#A1A1A1 via @media prefers-color-scheme and [data-ogsc] (the only <style>), white logo "logo-dark" shown there; spaces 4/8/16/32 (EMAIL_SPACES); Geist else system sans (EMAIL_FONT); EmailDesign { name, logo? {width,height}, wordmark?, signature? }; EmailContent { language, preview, eyebrow, heading, paragraphs?, rows? [{ label, value: string | string[] (dotted list), href?, keepLines? }], closing? ("Best regards," then the company name in bold) }
|
|
12
|
+
- /email-layout: emailLayout(content, design, logos: { light, dark } | boolean) → HTML the same in every mail app: centered 600px column, 16px around, no background; strong #000000 (logo, heading, values, company name, site) and soft #5E5E5E (labels, other text), dark theme #FFFFFF/#A1A1A1 via @media prefers-color-scheme and [data-ogsc] (the only <style>), white logo "logo-dark" shown there; spaces 4/8/16/32 (EMAIL_SPACES); Geist else system sans (EMAIL_FONT); EmailDesign { name, logo? {width,height}, wordmark?, signature? }; EmailContent { language, preview, eyebrow, heading, paragraphs?, code? { label, value } (one box per character, outlined #E5E5E5/#1A1A1A, monospace 24px, read aloud as one aria-label), rows? [{ label, value: string | string[] (dotted list), href?, keepLines? }], closing? ("Best regards," then the company name in bold) }
|
|
13
13
|
- Root import (all of the above) kept in 0.5 for compatibility, removed in 0.6.
|
|
14
14
|
- License: Sharadox Open Source License 0.1.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/email-web-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-account-experience.59",
|
|
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>",
|