@engineio/ui 0.5.0 → 0.6.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/AGENTS.md CHANGED
@@ -76,7 +76,8 @@ radii --radius-tag 6 --radius-field 10 --radius-card-inner 10
76
76
  --radius-control 999
77
77
  motion --ease-brand --ease-brand-out --ease-brand-accelerate
78
78
  140ms controls · 220ms surfaces · 360–640ms reveals
79
- type --font-brand (Proxima Nova) --font-mono (JetBrains Mono, see gaps)
79
+ type --font-brand --font-condensed --font-extra-condensed --font-mono
80
+ ROLES ONLY — no face ships here. Bind them in your repo (see below)
80
81
  depth --shadow-panel --shadow-modal (product chrome and modals only)
81
82
  utility `field` — the shared input skin, incl. the focus ring
82
83
  ```
@@ -131,8 +132,30 @@ State these rather than working around them silently.
131
132
  component where §6 specifies two, and Alert signals state with a coloured
132
133
  left-edge bar which §11 prohibits for *category or ownership* — state is a
133
134
  narrower reading, not an exemption.
134
- 3. **JetBrains Mono is not loaded.** `--font-mono` falls back to the platform
135
- monospace, so every mono surface is off-brand until the binary ships.
136
- 4. **Proxima Nova is commercially licensed** and ships inside this package.
135
+ 3. **No mono face.** JetBrains Mono is retired; `--font-mono` resolves to the
136
+ brand face. Set it yourself if a surface genuinely needs character-cell
137
+ alignment.
138
+ 4. **No typeface ships with this package.** It names the type roles and binds
139
+ none of them. Each consumer declares its own `@font-face` blocks, keeps the
140
+ binaries in its own repo, and overrides the tokens:
141
+
142
+ ```css
143
+ @import "./fonts.css"; /* your own @font-face blocks */
144
+ @import "@engineio/ui/styles";
145
+
146
+ @theme {
147
+ --font-brand: "ProximaNova", "Helvetica Neue", Arial, sans-serif;
148
+ --font-condensed: "ProximaNovaCondensed", Arial, sans-serif;
149
+ --font-extra-condensed: "ProximaNovaExtraCondensed", Arial, sans-serif;
150
+ }
151
+ ```
152
+
153
+ **This is a required setup step and it fails quietly** — exactly like a
154
+ missing `@source` line. Skip it and the tokens still resolve, nothing
155
+ errors, and the app renders in the system stack. Generic-looking type is
156
+ the symptom.
157
+
158
+ Proxima Nova used to ship here. It is commercially licensed and this package
159
+ is MIT and public, which is why it no longer does.
137
160
  5. **Engine Integration's accent is unsettled** — build Integration in magenta;
138
161
  `--color-partner-yellow` exists but is not in use.
package/README.md CHANGED
@@ -97,15 +97,45 @@ this. Every primitive also passes `class` through `cn`, so
97
97
  colours, three status colours, a twelve-step neutral ramp, radii by role, two
98
98
  shadows, three easings.
99
99
 
100
- **The brand face** — Proxima Nova, seven cuts, referenced by relative path so
101
- your bundler fingerprints them out of `node_modules`. You do not need a copy in
102
- `static/fonts`.
100
+ **Type roles, not faces** — `--font-brand`, `--font-condensed`,
101
+ `--font-extra-condensed`, `--font-mono`. No typeface ships here. Declare your
102
+ own `@font-face` blocks, keep the binaries in your repo, and bind the tokens in
103
+ your `@theme`. See "Wiring your faces" below — it is a required step and it
104
+ fails quietly.
103
105
 
104
106
  **Marks** — `EngineWordmark` and `EngineIcon`, vector, in the two sanctioned
105
107
  colourways (`variant="primary"` white, `variant="secondary"` Off Black). Size
106
108
  by height alone. The wordmark is artwork, not type — with the vector in the
107
109
  package there is no reason to typeset "engine" in Proxima Nova again.
108
110
 
111
+ ### Wiring your faces
112
+
113
+ The system names four type roles and binds none of them:
114
+
115
+ ```css
116
+ @import "./fonts.css"; /* your own @font-face blocks */
117
+ @import "tailwindcss";
118
+ @import "@engineio/ui/styles";
119
+ @source "../node_modules/@engineio/ui/dist";
120
+
121
+ @theme {
122
+ --font-brand: "ProximaNova", "Helvetica Neue", Arial, sans-serif;
123
+ --font-condensed: "ProximaNovaCondensed", Arial, sans-serif;
124
+ --font-extra-condensed: "ProximaNovaExtraCondensed", Arial, sans-serif;
125
+ /* --font-mono defaults to --font-brand; set it only if you have a mono face */
126
+ }
127
+ ```
128
+
129
+ Keep the binaries in your own `static/fonts/` and reference them with absolute
130
+ `/fonts/...` URLs. Weight coverage is a local concern too — if your family is
131
+ missing a cut the product asks for, declare the face over a `font-weight`
132
+ RANGE so the gap maps somewhere deliberate rather than wherever the browser's
133
+ matching algorithm lands.
134
+
135
+ **Like `@source`, this fails silently.** The tokens resolve either way, so a
136
+ repo that skips it renders in the system stack with no error. Generic-looking
137
+ type is the symptom.
138
+
109
139
  **Primitives** — Alert, Badge, Button, Card, Checkbox, Dialog, Input, Label,
110
140
  Popover, Progress, RadioGroup, Select, Separator, Skeleton, Switch, Table, Tabs,
111
141
  Textarea, Tooltip.
@@ -262,18 +292,20 @@ first is a decision made here that the brand documents have not caught up with.
262
292
  Either way, §6 and §11 need updating or these need reverting, and by this
263
293
  repo's own source-of-truth rule the document nominally wins.
264
294
 
265
- 4. **JetBrains Mono is not loaded.** The brand specifies it for all numerics,
266
- keys, IDs, code and eyebrow labels. Neither engine nor rgs has ever shipped
267
- the binary, so every monospace surface in both products renders in the
268
- platform default. `--font-mono` falls back safely, but the brand face is
269
- absent. It is OFL-licensed and free to redistribute: drop the `.woff2` files
270
- into `src/lib/fonts/` and add the `@font-face` blocks to `styles/fonts.css`.
271
-
272
- 5. **Proxima Nova is commercially licensed.** The seven cuts ship inside this
273
- package, which is private and org-scoped — the same internal distribution as
274
- the copies already sitting in engine's and rgs's `static/fonts`. Worth a
275
- glance from whoever owns the licence before this goes anywhere less private.
276
- Inter is the documented substitute where the licence does not reach.
295
+ 4. **No mono face.** JetBrains Mono is retired at the owner's direction and
296
+ `--font-mono` resolves to the brand face, so `font-mono` is not monospaced.
297
+ Set the token yourself if a surface genuinely needs character-cell
298
+ alignment. ENGINE-BRAND.md and ENGINE-DESIGN-SYSTEM.md still name JetBrains
299
+ Mono and need updating.
300
+
301
+ 5. **No typeface ships with this package, and that is the point.** Proxima Nova
302
+ used to. It is commercially licensed, and this package is MIT and published
303
+ publicly to npm from a public repo so the seven cuts were being handed to
304
+ every reader of the registry under a licence nobody here can grant. They are
305
+ gone from `dist/`, and each product now keeps its own copy in its own
306
+ private repo. Note that removing them does not unpublish them: they remain
307
+ inside every already-published 0.x tarball and in this repo's git history,
308
+ which is a separate call for whoever owns the licence.
277
309
 
278
310
  6. **Engine Integration's accent is unsettled.** Brand direction assigns it
279
311
  Partner Yellow; every shipped surface is magenta and was deliberately
@@ -18,11 +18,14 @@
18
18
 
19
19
  Import the parts individually if you need finer control:
20
20
 
21
- @import "@engineio/ui/styles/fonts";
22
21
  @import "@engineio/ui/styles/tokens";
23
22
  @import "@engineio/ui/styles/utilities";
23
+
24
+ NO FACES SHIP HERE. This package names the type ROLES (--font-brand,
25
+ --font-condensed, --font-extra-condensed, --font-mono) and binds none of
26
+ them to a binary. Each consumer declares its own @font-face blocks and sets
27
+ those tokens — see "Type" in tokens.css for the contract and the recipe.
24
28
  */
25
29
 
26
- @import "./fonts.css";
27
30
  @import "./tokens.css";
28
31
  @import "./utilities.css";
@@ -177,28 +177,53 @@
177
177
  --ease-brand-out: cubic-bezier(0.16, 1, 0.3, 1);
178
178
  --ease-brand-accelerate: cubic-bezier(0.6, 0, 0.3, 1);
179
179
 
180
- /* ── Type ─────────────────────────────────────────────────────────── */
181
- /* Proxima Nova is the brand face and ships with this package. Inter is the
182
- documented substitute where the licence does not reach. */
183
- --font-brand:
184
- "ProximaNova", "Inter", "Helvetica Neue", Arial, sans-serif;
185
- --font-sans: var(--font-brand);
186
- --font-condensed:
187
- "ProximaNovaCondensed", "ProximaNova", Arial, sans-serif;
188
- --font-extra-condensed:
189
- "ProximaNovaExtraCondensed", "ProximaNovaCondensed", Arial, sans-serif;
190
- /* NO MONO FACE. JetBrains Mono was specified for numerics, keys, IDs, code
191
- and eyebrow labels, and is now retired at the owner's direction: Proxima
192
- Nova is the root face everywhere, and there is no second typeface.
193
-
194
- The token stays, pointed at the brand face, because ~200 call sites and
195
- every `font-mono` utility read it — removing the name would silently drop
196
- each of them to the browser default rather than to the brand. Code blocks
197
- that genuinely need character-cell alignment should say so explicitly and
198
- are a product decision, not a token one.
180
+ /* ── Type ─────────────────────────────────────────────────────────────
181
+ THIS PACKAGE NAMES ROLES. IT SHIPS NO FACES.
182
+
183
+ Every value below is a fallback, not a choice. The consumer declares its
184
+ own @font-face blocks, keeps the binaries in its own repo, and overrides
185
+ these four names in its own `@theme`:
186
+
187
+ @import "./fonts.css"; <- your own @font-face blocks
188
+ @import "@engineio/ui/styles";
189
+
190
+ @theme {
191
+ --font-brand: "YourFace", "Helvetica Neue", Arial, sans-serif;
192
+ --font-condensed: "YourFaceCondensed", Arial, sans-serif;
193
+ --font-extra-condensed: "YourFaceExtraCondensed", Arial, sans-serif;
194
+ }
195
+
196
+ WHY, rather than shipping the brand face here as this package used to.
197
+
198
+ 1. LICENCE. Proxima Nova is commercially licensed. This package is MIT
199
+ and published publicly to npm from a public repo, so shipping the
200
+ binaries handed every reader of the registry a font nobody here has
201
+ the right to sublicense. That is the blocking reason.
202
+ 2. ONE SYSTEM, MANY BRANDS. Engine Studio and Engine Integration are
203
+ Proxima Nova; the casino product is a separate brand on its own faces.
204
+ A design system that hard-codes one typeface makes every other brand
205
+ fight it — which is exactly what the casino repo was doing.
206
+ 3. WEIGHTS ARE A LOCAL PROBLEM. Which cuts a repo has licensed, and how
207
+ the gaps get mapped, differs per repo. That belongs next to the
208
+ binaries, not in a shared token.
209
+
210
+ SETTING THESE IS A REQUIRED SETUP STEP, and skipping it fails the same
211
+ quiet way a missing `@source` line does: the tokens still resolve, so
212
+ nothing errors — the app just renders in the system stack. If the type
213
+ looks generic, this is the first thing to check.
214
+
215
+ --font-mono has NO mono face on purpose. JetBrains Mono was retired at the
216
+ owner's direction and the token points at the brand face, because every
217
+ `font-mono` utility reads it and removing the name would drop those call
218
+ sites to the browser default rather than to the brand. A consumer that
219
+ wants a real monospace sets it, like any other role.
199
220
 
200
221
  ENGINE-BRAND.md and ENGINE-DESIGN-SYSTEM.md still name JetBrains Mono and
201
- need updating to match. */
222
+ still describe the face as shipping with the system; both need updating. */
223
+ --font-brand: ui-sans-serif, system-ui, -apple-system, Arial, sans-serif;
224
+ --font-sans: var(--font-brand);
225
+ --font-condensed: var(--font-brand);
226
+ --font-extra-condensed: var(--font-condensed);
202
227
  --font-mono: var(--font-brand);
203
228
 
204
229
  --breakpoint-2xl: 1400px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineio/ui",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "The Engine design system — tokens, fonts and Svelte primitives.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -32,9 +32,7 @@
32
32
  },
33
33
  "./styles": "./dist/styles/index.css",
34
34
  "./styles/tokens": "./dist/styles/tokens.css",
35
- "./styles/fonts": "./dist/styles/fonts.css",
36
35
  "./styles/utilities": "./dist/styles/utilities.css",
37
- "./fonts/*": "./dist/fonts/*",
38
36
  "./utils": {
39
37
  "types": "./dist/utils.d.ts",
40
38
  "default": "./dist/utils.js"
Binary file
Binary file
Binary file
Binary file
@@ -1,152 +0,0 @@
1
- /*
2
- Engine design system — the brand face.
3
-
4
- Proxima Nova only. Regular (400) for body, Semibold (600) for subtitles and
5
- UI labels, Bold (700) for display and headings, Black (900) and the
6
- condensed cuts for poster-scale words and stat bands.
7
-
8
- Paths are RELATIVE to this file, so the consumer's bundler resolves and
9
- fingerprints the binaries out of `node_modules`. The engine and rgs repos
10
- currently use absolute `/fonts/...` URLs, which is why both of them keep
11
- their own copy of these seven files in `static/fonts/`. Importing this
12
- stylesheet replaces that: delete the local copies once you have migrated.
13
-
14
- THREE CORRECTIONS TO THE UPSTREAM STYLESHEET, all deliberate:
15
-
16
- 1. Semibold is mapped to 600, not 500. Upstream declares
17
- `ProximaNovaSemibold.otf` at `font-weight: 500`, so every `font-semibold`
18
- (600) label in the products — which the design system specifies for ALL
19
- UI labels and subtitles — matched no @font-face at all and was either
20
- synthesised by the browser or snapped to Bold.
21
-
22
- 2. `font-display: swap` on every face. Otherwise the whole UI holds at
23
- invisible text for up to 3s on a cold cache, and these are .otf files
24
- served uncompressed.
25
-
26
- 3. LeagueGothic is NOT here. Upstream loads three LeagueGothic faces; the
27
- brand is Proxima Nova and JetBrains Mono, and "no other typefaces" is an
28
- explicit rule. If a product still needs it, it is a product font — load
29
- it there.
30
- */
31
-
32
- /*
33
- ── WEIGHT RANGES, AND WHY ────────────────────────────────────────────────
34
-
35
- Four faces ship: Regular 400, Semibold 600, Bold 700, Black 900. There is no
36
- Medium (500) binary and no ExtraBold (800) one, and the products ask for both
37
- — 500 is the single most-used non-body weight across the three sites (490
38
- uses in studio, 61 in rgs, 7 in casino) and 800 has 23.
39
-
40
- Left to the CSS font-matching algorithm those two land badly. A request for
41
- 500 searches DOWN before it searches up, so it resolves to Regular and a
42
- `font-medium` label comes out identical to body text — the emphasis is
43
- silently gone. A request for 800 searches UP, so it resolves to Black, two
44
- steps heavier than asked for.
45
-
46
- This was masked until now: the products loaded Inter (400–800) and Archivo
47
- (400–600) from Google Fonts, both of which carry a real 500.
48
-
49
- So each face declares the RANGE it stands in for, rather than a single value.
50
- A static face named over a range is used for every weight in it, with no
51
- synthesis. 500 is deliberately folded UP into Semibold, not down into
52
- Regular: `font-medium` is used in these UIs to lift labels above body, and
53
- the brand specifies Semibold for exactly that job (ENGINE-BRAND.md §3, "UI
54
- labels and subtitles"). Folding it down would erase the distinction the call
55
- site was making.
56
-
57
- 650 and 700 keep resolving to Bold exactly as they do today. Only 500 and 800
58
- change, and both were broken.
59
-
60
- THE REAL FIX is the two missing binaries. If Medium and ExtraBold can be
61
- licensed, add them and narrow these ranges back to single values.
62
- */
63
-
64
- /* ── ProximaNova ──────────────────────────────────────────────────────── */
65
-
66
- @font-face {
67
- font-family: "ProximaNova";
68
- src: url("../fonts/ProximaNovaRegular.otf") format("opentype");
69
- /* Body only. 500 is NOT folded in here — see the note above. */
70
- font-weight: 400;
71
- font-style: normal;
72
- font-display: swap;
73
- }
74
-
75
- @font-face {
76
- font-family: "ProximaNova";
77
- src: url("../fonts/ProximaNovaSemibold.otf") format("opentype");
78
- /* Stands in for Medium: no 500 binary ships. */
79
- font-weight: 500 600;
80
- font-style: normal;
81
- font-display: swap;
82
- }
83
-
84
- @font-face {
85
- font-family: "ProximaNova";
86
- src: url("../fonts/ProximaNovaBold.otf") format("opentype");
87
- /* Stands in for ExtraBold: no 800 binary ships. 650 lands here too, which
88
- is where it already resolved. */
89
- font-weight: 650 800;
90
- font-style: normal;
91
- font-display: swap;
92
- }
93
-
94
- @font-face {
95
- font-family: "ProximaNova";
96
- src: url("../fonts/ProximaNovaBlack.otf") format("opentype");
97
- font-weight: 900;
98
- font-style: normal;
99
- font-display: swap;
100
- }
101
-
102
- /* ── Condensed cuts ───────────────────────────────────────────────────── */
103
- /*
104
- Declared as their own families rather than as `font-stretch` variants of
105
- ProximaNova. Upstream uses font-stretch, which means the condensed cuts can
106
- only be reached by a `font-stretch` declaration — there is no Tailwind
107
- utility for that, so in practice they were unreachable from component
108
- markup. Separate families make `font-condensed` work.
109
-
110
- Condensed Black and Extra Condensed Black are for big numbers and
111
- poster-scale words only — stat bands, lanyards, single-word statements.
112
- Never running text.
113
- */
114
-
115
- @font-face {
116
- font-family: "ProximaNovaCondensed";
117
- src: url("../fonts/ProximaNovaCondensedBlack.otf") format("opentype");
118
- font-weight: 900;
119
- font-style: normal;
120
- font-display: swap;
121
- }
122
-
123
- @font-face {
124
- font-family: "ProximaNovaExtraCondensed";
125
- src: url("../fonts/ProximaNovaExtraCondensedBlack.otf") format("opentype");
126
- font-weight: 900;
127
- font-style: normal;
128
- font-display: swap;
129
- }
130
-
131
- @font-face {
132
- font-family: "ProximaNovaExtraCondensed";
133
- src: url("../fonts/ProximaNova-ExtraCondensedThin.otf") format("opentype");
134
- font-weight: 100;
135
- font-style: normal;
136
- font-display: swap;
137
- }
138
-
139
- /*
140
- ── JetBrains Mono ────────────────────────────────────────────────────────
141
-
142
- NOT LOADED. The design system specifies JetBrains Mono for all numerics,
143
- keys, IDs, code samples and eyebrow labels, and neither the engine nor the
144
- rgs repo has ever shipped the binary — so every monospace surface in both
145
- products currently renders in the platform default. `--font-mono` falls back
146
- to `ui-monospace` so nothing breaks, but the brand face is absent.
147
-
148
- JetBrains Mono is OFL-licensed and free to redistribute, so this is a
149
- five-minute fix that was deliberately left to you rather than pulling font
150
- binaries off the internet unasked: drop the .woff2 files into
151
- `src/lib/fonts/` and add the @font-face blocks here. See README, Known gaps.
152
- */