@bsuite/theme 0.11.2 → 0.12.1
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/package.json +8 -3
- package/src/css/fonts.css +136 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsuite/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/GaryOcean428/bsuite.git",
|
|
12
12
|
"directory": "packages/theme"
|
|
13
13
|
},
|
|
14
|
-
"description": "BSuite Universal theme
|
|
14
|
+
"description": "BSuite Universal theme \u2014 D2C Neon Electric + Braden Corporate baselines. Tailwind v4 preset, CSS vars (5-layer), role aliases, colourblind-safe tokens, eye-strain-safe text scale, BrandingProvider (runtime white-label). Used by BSU, CRM7, conduit, R80.3, throughput (D2C) and braden.com.au (Corporate).",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
17
|
"src/css",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"./css": "./src/css/index.css",
|
|
37
37
|
"./vars.css": "./src/css/vars.css",
|
|
38
38
|
"./utilities.css": "./src/css/utilities.css",
|
|
39
|
-
"./braden-css": "./src/css/braden.css"
|
|
39
|
+
"./braden-css": "./src/css/braden.css",
|
|
40
|
+
"./fonts.css": "./src/css/fonts.css"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"build": "tsc -p tsconfig.build.json",
|
|
@@ -72,5 +73,9 @@
|
|
|
72
73
|
"typescript": "~6.0.3",
|
|
73
74
|
"vite": "^8.0.16",
|
|
74
75
|
"vitest": "^4.1.8"
|
|
76
|
+
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@fontsource-variable/geist": "^5.3.0",
|
|
79
|
+
"@fontsource-variable/geist-mono": "^5.3.0"
|
|
75
80
|
}
|
|
76
81
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @bsuite/theme/fonts.css — the faces the theme's own tokens name.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS FILE EXISTS
|
|
5
|
+
* ────────────────────
|
|
6
|
+
* `vars.css` declares the typography contract:
|
|
7
|
+
*
|
|
8
|
+
* --font-body: 'Geist Variable', Geist, system-ui, sans-serif
|
|
9
|
+
* --font-mono: 'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace
|
|
10
|
+
*
|
|
11
|
+
* and until now this package shipped **zero `@font-face` rules**. A token NAMES a
|
|
12
|
+
* family; only an `@font-face` makes it EXIST. So six consumers each solved it
|
|
13
|
+
* independently and they diverged — measured across `origin/development`,
|
|
14
|
+
* 2026-08-17:
|
|
15
|
+
*
|
|
16
|
+
* business-suite-unified body ok mono ok hand-written @font-face
|
|
17
|
+
* crm7 body ok mono ok hand-written (mono added the same day)
|
|
18
|
+
* conduit body ok mono ok whole-package import, ALL FIVE SUBSETS
|
|
19
|
+
* throughput body ok mono ok whole-package import, ALL FIVE SUBSETS
|
|
20
|
+
* braden body ok mono MISSING third-party Google Fonts <link>
|
|
21
|
+
* R80.4 body MISSING mono MISSING NO WEBFONTS AT ALL
|
|
22
|
+
*
|
|
23
|
+
* R80.4 is the sharpest case: the wage calculator imports this theme, inherits
|
|
24
|
+
* `'Geist Variable'`, and has no Geist anywhere in its repo. It has always
|
|
25
|
+
* painted in `system-ui`. Its own `index.css` carries a long, careful note about
|
|
26
|
+
* theme VERSION drift — and the fonts that theme names were never there to drift.
|
|
27
|
+
*
|
|
28
|
+
* Six bespoke solutions is the defect, not the symptom. A token and its face
|
|
29
|
+
* belong together, in the package that owns the token.
|
|
30
|
+
*
|
|
31
|
+
* WHAT THIS SHIPS, AND WHAT IT DELIBERATELY DOES NOT
|
|
32
|
+
* ─────────────────────────────────────────────────
|
|
33
|
+
* Four faces: Geist Variable and Geist Mono Variable, latin and latin-ext, woff2
|
|
34
|
+
* only, upright only.
|
|
35
|
+
*
|
|
36
|
+
* - **woff2 only.** Every app targets es2022 / chrome100 / edge100 /
|
|
37
|
+
* firefox100 / safari15.4. woff2 has shipped in all of them since 2016, so a
|
|
38
|
+
* legacy `.woff` fallback is dead weight BY CONSTRUCTION, not by measurement.
|
|
39
|
+
* crm7 was carrying eight JetBrains Mono weights in both formats — sixteen
|
|
40
|
+
* files, ~400 KB — for a family nothing in crm7 ever requested.
|
|
41
|
+
*
|
|
42
|
+
* - **latin + latin-ext only.** `@fontsource-variable/geist` publishes no
|
|
43
|
+
* per-subset CSS, so `@import '@fontsource-variable/geist'` pulls cyrillic,
|
|
44
|
+
* cyrillic-ext and vietnamese too, upright AND italic — ten files per family.
|
|
45
|
+
* conduit and throughput are paying for Cyrillic today. An app that genuinely
|
|
46
|
+
* needs another subset should add that face itself and say why.
|
|
47
|
+
*
|
|
48
|
+
* - **upright only.** No italic face is declared, so italic text synthesises.
|
|
49
|
+
* Verified before deciding: no D2C surface in the estate sets an italic
|
|
50
|
+
* `font-family` against these tokens. If one ever does, add the italic file
|
|
51
|
+
* here rather than importing the whole package again.
|
|
52
|
+
*
|
|
53
|
+
* - **variable, not static weights.** One file per subset covers 100–900. The
|
|
54
|
+
* eight discrete weights it replaces were eight separate downloads.
|
|
55
|
+
*
|
|
56
|
+
* The `unicode-range` values are copied verbatim from crm7's own working faces
|
|
57
|
+
* rather than re-derived. Re-typing a subset range is how a subset silently loses
|
|
58
|
+
* a glyph, and those were already correct.
|
|
59
|
+
*
|
|
60
|
+
* HOW TO USE IT
|
|
61
|
+
* ─────────────
|
|
62
|
+
* @import '@bsuite/theme/fonts.css'; <- before the token import
|
|
63
|
+
* @import '@bsuite/theme/css';
|
|
64
|
+
*
|
|
65
|
+
* (Written without an inline comment on purpose: a nested comment terminator
|
|
66
|
+
* inside this block would CLOSE it early, and everything after would parse as
|
|
67
|
+
* CSS. That is not hypothetical — it shipped in 0.12.0 and broke every
|
|
68
|
+
* consumer's build with `Invalid declaration` pointing at the NEXT import,
|
|
69
|
+
* several lines away from the actual fault.)
|
|
70
|
+
*
|
|
71
|
+
* This is a SEPARATE entry point, not folded into `./css`, on purpose: `braden`
|
|
72
|
+
* is BRADEN-EXEMPT and runs its corporate Open Sans / Montserrat stack, so it
|
|
73
|
+
* must be able to take the tokens without taking Geist.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
/* ── Geist Variable — the family `--font-body` names ───────────────────────── */
|
|
77
|
+
|
|
78
|
+
@font-face {
|
|
79
|
+
font-family: 'Geist Variable';
|
|
80
|
+
font-style: normal;
|
|
81
|
+
font-display: swap;
|
|
82
|
+
font-weight: 100 900;
|
|
83
|
+
src: url('@fontsource-variable/geist/files/geist-latin-wght-normal.woff2')
|
|
84
|
+
format('woff2-variations');
|
|
85
|
+
unicode-range:
|
|
86
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
87
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@font-face {
|
|
91
|
+
font-family: 'Geist Variable';
|
|
92
|
+
font-style: normal;
|
|
93
|
+
font-display: swap;
|
|
94
|
+
font-weight: 100 900;
|
|
95
|
+
src: url('@fontsource-variable/geist/files/geist-latin-ext-wght-normal.woff2')
|
|
96
|
+
format('woff2-variations');
|
|
97
|
+
unicode-range:
|
|
98
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
99
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
100
|
+
U+A720-A7FF;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ── Geist Mono Variable — the family `--font-mono` names ──────────────────── */
|
|
104
|
+
/*
|
|
105
|
+
* This is the one that was missing almost everywhere. `--font-mono` resolves to
|
|
106
|
+
* 'Geist Mono Variable' in the D2C palette, and until 2026-08-17 crm7 declared no
|
|
107
|
+
* face for it at all — so every `font-mono` element fell through to
|
|
108
|
+
* `ui-monospace`: TFN and bank-account digits on the payroll card, AASS
|
|
109
|
+
* registration numbers, the charge-rate build-up tables, code blocks in the AI
|
|
110
|
+
* assistant's markdown. The theme's mono face had never once rendered as designed.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
@font-face {
|
|
114
|
+
font-family: 'Geist Mono Variable';
|
|
115
|
+
font-style: normal;
|
|
116
|
+
font-display: swap;
|
|
117
|
+
font-weight: 100 900;
|
|
118
|
+
src: url('@fontsource-variable/geist-mono/files/geist-mono-latin-wght-normal.woff2')
|
|
119
|
+
format('woff2-variations');
|
|
120
|
+
unicode-range:
|
|
121
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
122
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@font-face {
|
|
126
|
+
font-family: 'Geist Mono Variable';
|
|
127
|
+
font-style: normal;
|
|
128
|
+
font-display: swap;
|
|
129
|
+
font-weight: 100 900;
|
|
130
|
+
src: url('@fontsource-variable/geist-mono/files/geist-mono-latin-ext-wght-normal.woff2')
|
|
131
|
+
format('woff2-variations');
|
|
132
|
+
unicode-range:
|
|
133
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
134
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
135
|
+
U+A720-A7FF;
|
|
136
|
+
}
|