@engineio/ui 0.4.3 → 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,21 +177,54 @@
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;
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.
220
+
221
+ ENGINE-BRAND.md and ENGINE-DESIGN-SYSTEM.md still name JetBrains Mono and
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;
185
224
  --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
- /* JetBrains Mono is specified for numerics, keys, IDs, code and eyebrow
191
- labels. No binary ships with this package yet — see README, Known gaps —
192
- so this currently resolves to the platform monospace. */
193
- --font-mono:
194
- "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
225
+ --font-condensed: var(--font-brand);
226
+ --font-extra-condensed: var(--font-condensed);
227
+ --font-mono: var(--font-brand);
195
228
 
196
229
  --breakpoint-2xl: 1400px;
197
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engineio/ui",
3
- "version": "0.4.3",
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,116 +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
- /* ── ProximaNova ──────────────────────────────────────────────────────── */
33
-
34
- @font-face {
35
- font-family: "ProximaNova";
36
- src: url("../fonts/ProximaNovaRegular.otf") format("opentype");
37
- font-weight: 400;
38
- font-style: normal;
39
- font-display: swap;
40
- }
41
-
42
- @font-face {
43
- font-family: "ProximaNova";
44
- src: url("../fonts/ProximaNovaSemibold.otf") format("opentype");
45
- font-weight: 600;
46
- font-style: normal;
47
- font-display: swap;
48
- }
49
-
50
- @font-face {
51
- font-family: "ProximaNova";
52
- src: url("../fonts/ProximaNovaBold.otf") format("opentype");
53
- font-weight: 700;
54
- font-style: normal;
55
- font-display: swap;
56
- }
57
-
58
- @font-face {
59
- font-family: "ProximaNova";
60
- src: url("../fonts/ProximaNovaBlack.otf") format("opentype");
61
- font-weight: 900;
62
- font-style: normal;
63
- font-display: swap;
64
- }
65
-
66
- /* ── Condensed cuts ───────────────────────────────────────────────────── */
67
- /*
68
- Declared as their own families rather than as `font-stretch` variants of
69
- ProximaNova. Upstream uses font-stretch, which means the condensed cuts can
70
- only be reached by a `font-stretch` declaration — there is no Tailwind
71
- utility for that, so in practice they were unreachable from component
72
- markup. Separate families make `font-condensed` work.
73
-
74
- Condensed Black and Extra Condensed Black are for big numbers and
75
- poster-scale words only — stat bands, lanyards, single-word statements.
76
- Never running text.
77
- */
78
-
79
- @font-face {
80
- font-family: "ProximaNovaCondensed";
81
- src: url("../fonts/ProximaNovaCondensedBlack.otf") format("opentype");
82
- font-weight: 900;
83
- font-style: normal;
84
- font-display: swap;
85
- }
86
-
87
- @font-face {
88
- font-family: "ProximaNovaExtraCondensed";
89
- src: url("../fonts/ProximaNovaExtraCondensedBlack.otf") format("opentype");
90
- font-weight: 900;
91
- font-style: normal;
92
- font-display: swap;
93
- }
94
-
95
- @font-face {
96
- font-family: "ProximaNovaExtraCondensed";
97
- src: url("../fonts/ProximaNova-ExtraCondensedThin.otf") format("opentype");
98
- font-weight: 100;
99
- font-style: normal;
100
- font-display: swap;
101
- }
102
-
103
- /*
104
- ── JetBrains Mono ────────────────────────────────────────────────────────
105
-
106
- NOT LOADED. The design system specifies JetBrains Mono for all numerics,
107
- keys, IDs, code samples and eyebrow labels, and neither the engine nor the
108
- rgs repo has ever shipped the binary — so every monospace surface in both
109
- products currently renders in the platform default. `--font-mono` falls back
110
- to `ui-monospace` so nothing breaks, but the brand face is absent.
111
-
112
- JetBrains Mono is OFL-licensed and free to redistribute, so this is a
113
- five-minute fix that was deliberately left to you rather than pulling font
114
- binaries off the internet unasked: drop the .woff2 files into
115
- `src/lib/fonts/` and add the @font-face blocks here. See README, Known gaps.
116
- */