@godxjp/ui 18.12.19 → 18.12.20
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/dist/email/geometry.d.ts +6 -5
- package/dist/email/tokens.generated.d.ts +1 -1
- package/dist/email/tokens.generated.js +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/fonts.css +9 -8
- package/dist/tokens/components/email.css +9 -7
- package/dist/tokens/foundation.css +2 -2
- package/package.json +2 -2
package/dist/email/geometry.d.ts
CHANGED
|
@@ -46,11 +46,12 @@ export declare const EMAIL_SHELL: EmailShellTokens;
|
|
|
46
46
|
/** Type ramp. Sizes are literal px — no email client resolves the rem scale reliably. */
|
|
47
47
|
export interface EmailTypographyTokens {
|
|
48
48
|
/**
|
|
49
|
-
* The canonical DXS stack,
|
|
50
|
-
* so this NAMES the face and degrades: a client with
|
|
51
|
-
* already loaded it) renders the canonical face;
|
|
52
|
-
* Yu Gothic (Windows) →
|
|
53
|
-
* names are SINGLE-quoted so the value drops
|
|
49
|
+
* The canonical DXS stack, Noto Sans JP first (product override, direct instruction). Web-font
|
|
50
|
+
* `@font-face` is unavailable in most clients, so this NAMES the face and degrades: a client with
|
|
51
|
+
* Noto Sans JP installed (or a webmail that already loaded it) renders the canonical face;
|
|
52
|
+
* everything else falls to Hiragino (macOS/iOS) → Yu Gothic (Windows) → M PLUS 2 → Meiryo → the
|
|
53
|
+
* system UI face → Arial → `sans-serif`. Family names are SINGLE-quoted so the value drops
|
|
54
|
+
* straight into a double-quoted `style="…"` attribute.
|
|
54
55
|
*/
|
|
55
56
|
readonly fontFamily: string;
|
|
56
57
|
/** Mono stack for invoice ids, masked card numbers, ISO dates and amounts. */
|
|
@@ -138,7 +138,7 @@ export declare const EMAIL_GEOMETRY_SOURCE: {
|
|
|
138
138
|
readonly "--email-mark-gap": "8px";
|
|
139
139
|
readonly "--email-wordmark-font-size": "13px";
|
|
140
140
|
readonly "--email-wordmark-font-weight": "700";
|
|
141
|
-
readonly "--email-font-family-sans": "'
|
|
141
|
+
readonly "--email-font-family-sans": "'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', YuGothic, 'M PLUS 2', Meiryo, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, Arial, sans-serif";
|
|
142
142
|
readonly "--email-font-family-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
143
143
|
readonly "--email-body-font-size": "14px";
|
|
144
144
|
readonly "--email-body-line-height": "1.9";
|
|
@@ -128,7 +128,7 @@ const EMAIL_GEOMETRY_SOURCE = {
|
|
|
128
128
|
"--email-mark-gap": "8px",
|
|
129
129
|
"--email-wordmark-font-size": "13px",
|
|
130
130
|
"--email-wordmark-font-weight": "700",
|
|
131
|
-
"--email-font-family-sans": "'
|
|
131
|
+
"--email-font-family-sans": "'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic Medium', YuGothic, 'M PLUS 2', Meiryo, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, Arial, sans-serif",
|
|
132
132
|
"--email-font-family-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
133
133
|
"--email-body-font-size": "14px",
|
|
134
134
|
"--email-body-line-height": "1.9",
|
package/dist/styles/base.css
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
* base sans. Consumers switch a locale's face by setting its slot, e.g.
|
|
62
62
|
* :root { --font-sans-ja: "Noto Sans JP", var(--font-sans-base); }
|
|
63
63
|
* without writing any [lang] selectors. The opt-in bundle styles/fonts fills
|
|
64
|
-
* these slots for its
|
|
64
|
+
* these slots for its Noto Sans JP + M PLUS 2 fallback. `--font-sans-base` is a
|
|
65
65
|
* separate token (not --font-family-sans) so the fallback can't self-reference. */
|
|
66
66
|
[lang="ja"] {
|
|
67
67
|
--font-family-sans: var(--font-sans-ja, var(--font-sans-base));
|
package/dist/styles/fonts.css
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Self-contained so consumers need no font config. The browser only downloads
|
|
5
5
|
* the subset files matching the rendered text:
|
|
6
|
-
* ·
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* · Noto Sans JP — the DXS DEFAULT face for Japanese and Latin, including the
|
|
7
|
+
* Vietnamese glyph coverage used by the product locales
|
|
8
|
+
* (product override, direct instruction).
|
|
9
|
+
* · M PLUS 2 — retained as the fallback after Noto Sans JP.
|
|
9
10
|
*
|
|
10
11
|
* IMPORT ORDER IS LOAD-BEARING — this file MUST be imported AFTER
|
|
11
12
|
* `@godxjp/ui/styles/base`:
|
|
@@ -32,15 +33,15 @@
|
|
|
32
33
|
|
|
33
34
|
/* Fill the font-token slots (see tokens/foundation.css + styles/base.css) with
|
|
34
35
|
* the bundled faces, so the all-in-one `@godxjp/ui/styles` entry stays
|
|
35
|
-
* zero-config:
|
|
36
|
-
*
|
|
36
|
+
* zero-config: Noto Sans JP is the DXS default face for every supported locale
|
|
37
|
+
* and M PLUS 2 remains its fallback. Consumers on the per-layer setup who
|
|
37
38
|
* supply their own faces simply DON'T import this file and set the slots. */
|
|
38
39
|
:root {
|
|
39
40
|
--font-sans-base:
|
|
40
|
-
"
|
|
41
|
-
"
|
|
41
|
+
"Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", YuGothic,
|
|
42
|
+
"M PLUS 2", Meiryo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui,
|
|
42
43
|
sans-serif;
|
|
43
44
|
--font-sans-vi:
|
|
44
|
-
"
|
|
45
|
+
"Noto Sans JP", "M PLUS 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui,
|
|
45
46
|
sans-serif;
|
|
46
47
|
}
|
|
@@ -38,17 +38,19 @@
|
|
|
38
38
|
--email-wordmark-font-weight: 700; /* mirrors --logo-wordmark-font-weight */
|
|
39
39
|
|
|
40
40
|
/* ── Typography — literal px so no client has to resolve the rem scale ──────────────────── */
|
|
41
|
-
/* The DXS canonical face is
|
|
42
|
-
* @font-face, so the stack ships the face NAME first and
|
|
43
|
-
* to a generic — a client with
|
|
44
|
-
*
|
|
45
|
-
*
|
|
41
|
+
/* The DXS canonical face is Noto Sans JP (see src/styles/fonts.css; product override, direct
|
|
42
|
+
* instruction). Email clients honour NO @font-face, so the stack ships the face NAME first and
|
|
43
|
+
* degrades through the platform JP faces to a generic — a client with Noto Sans JP installed (or
|
|
44
|
+
* a webmail that already loaded it, which is common — it is a widely preinstalled/CDN-cached
|
|
45
|
+
* Google face, more likely to actually render than the niche M PLUS 2 ever was) renders the
|
|
46
|
+
* canonical face, everything else lands on Hiragino (macOS/iOS) → Yu Gothic (Windows) →
|
|
47
|
+
* M PLUS 2 → Meiryo → the system UI face → Arial → sans-serif. Family names are SINGLE-quoted
|
|
46
48
|
* on export (the generator normalises) because an inline `style="…"` attribute is double-quoted;
|
|
47
49
|
* only ASCII aliases are listed, since a non-ASCII family name does not survive every transfer
|
|
48
50
|
* encoding. */
|
|
49
51
|
--email-font-family-sans:
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
+
"Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", YuGothic,
|
|
53
|
+
"M PLUS 2", Meiryo, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, Arial,
|
|
52
54
|
sans-serif;
|
|
53
55
|
/* Tabular/reference strings — invoice ids, masked card numbers, ISO dates, amounts — are set in
|
|
54
56
|
* the mono face in the canonical card. Mirrors --font-family-mono. */
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
* --font-sans-zh-hant (lang="zh-Hant" | "zh-TW")
|
|
201
201
|
* e.g. `--font-sans-ja: "Noto Sans JP", var(--font-sans-base);`
|
|
202
202
|
* The opt-in bundle `@godxjp/ui/styles/fonts` overwrites `--font-sans-base`
|
|
203
|
-
* (and `--font-sans-vi`) with the DXS bundle — "
|
|
204
|
-
* as
|
|
203
|
+
* (and `--font-sans-vi`) with the DXS bundle — "Noto Sans JP" primary, "M PLUS 2"
|
|
204
|
+
* as its fallback — so the all-in-one entry is zero-config. That fill also
|
|
205
205
|
* lands on `:root` at THIS specificity, so `styles/fonts` MUST be imported AFTER
|
|
206
206
|
* `styles/base`, or the system stack below silently wins (issue #210). */
|
|
207
207
|
--font-sans-base:
|