@supertype.ai/foundations 0.1.29 → 0.1.30

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/src/theme.css CHANGED
@@ -91,18 +91,35 @@
91
91
  both, so its label stays light in both. */
92
92
  --tint-foreground: hsl(0, 0%, 100%);
93
93
 
94
+ /* Which way a control moves under the pointer: away from the page, so it
95
+ deepens on latte and lifts on espresso. How far is the state's own
96
+ business, and hover spends 18%.
94
97
 
95
- /* Status, on the same two-token rule as the categorical set below: the fill is
96
- a mark (3:1), the ink is the same hue as words (4.5:1). Nothing prints a
97
- label on a status fill orange cannot carry white text at any lightness. */
98
- --success: hsl(142 75% 31%);
98
+ The extreme rather than `--foreground`, because mixing toward an ink that
99
+ already sits near the fill gives a step the size of the gap between them:
100
+ `--primary` moved 4.9 ΔL* on latte against 6.2 on espresso from the same
101
+ declaration, and read as no hover at all. Against black and white every
102
+ tone clears 6 ΔL* in both themes. */
103
+ --hover-toward: hsl(0, 0%, 0%);
104
+
105
+
106
+ /* Status, on the same three-cut rule as every other tone: the fill is a mark
107
+ (3:1), the `-ink` is that hue used as words (4.5:1), and the `-foreground`
108
+ is the label printed on the fill (4.5:1 against it). A filled status
109
+ control is a real thing — `Button tone="warn" variant="solid"` — so the
110
+ pair is measured rather than assumed. checkSignals holds all three. */
111
+ --success: hsl(142 75% 29%);
99
112
  --success-ink: hsl(142 68% 28%);
113
+ /* White clears 4.94:1 here. At the old 31% it measured 4.42:1, which passed
114
+ nothing and shipped anyway, because no component was checked against it. */
115
+ --success-foreground: var(--tint-foreground);
100
116
  /* Was 52%, which measured 2.27:1 on latte — a dot you could not see. */
101
117
  --warn: hsl(30 100% 43%);
102
118
  --warn-ink: hsl(22 85% 36%);
103
- /* Deprecated: --warn-foreground was always this ink, under shadcn's name for
104
- the opposite thing. Use --warn-ink; the ESLint rules flag the old name. */
105
- --warn-foreground: var(--warn-ink);
119
+ /* The label on the warn fill, and one value for both themes: amber is a mark
120
+ in each, so the ink that reads on it is deep in each. 4.84:1 on latte,
121
+ 6.70:1 on espresso. White measured 3.37:1 and 2.44:1. */
122
+ --warn-foreground: hsl(30 25% 12%);
106
123
  --info: hsl(211 80% 43%);
107
124
  --info-ink: hsl(211 80% 40%);
108
125
  /* Danger ships as an ink only: a vivid brick red harmonised toward terracotta. */
@@ -153,6 +170,12 @@
153
170
  --popover-foreground: hsl(30 14% 12%);
154
171
  --primary: hsl(133 11% 33%); /* #4A5D4E */
155
172
  --primary-foreground: hsl(0 0% 100%);
173
+ /* The third cut, the one `--secondary` and every status hue already shipped.
174
+ A fill is a mark and words are read, so one value doing both jobs is tuned
175
+ for neither — and that is why the espresso CTA measured Lc 48.9 against
176
+ this theme's 89.3. On latte the two happen to coincide, so this is an
177
+ alias here and a value of its own under .dark. */
178
+ --primary-ink: var(--primary);
156
179
  /* Three tokens, because the accent pulls opposite ways: fill, the label on it,
157
180
  and the accent as text. Tuning any one for another sinks the third. */
158
181
  --secondary: hsl(14, 67%, 72%);
@@ -167,13 +190,23 @@
167
190
  --accent-foreground: hsl(133 11% 33%);
168
191
  --destructive: hsl(0 50% 36%);
169
192
  --destructive-foreground: hsl(0 0% 98%);
170
- /* Soft beige-grey, to keep a rule un-intrusive. */
171
- --border: hsl(40 15% 88%); /* #E3DFD8 */
193
+ /* Soft beige-grey, to keep a rule un-intrusive — but a rule still has to be
194
+ seen. L88 measured 1.20:1 on --background and 1.29:1 on --card, below the
195
+ 1.34:1 the dark twin at L22 was rejected for, so the light theme shipped the
196
+ fainter hairline of the two. L80 puts --card at 1.56:1, within a point of
197
+ the dark theme's 1.57:1, so the same border reads the same weight in both. */
198
+ --border: hsl(40 15% 80%); /* #CFC8BA */
172
199
  --input: var(--border);
173
200
  --ring: hsl(133 11% 33%); /* the brand green */
201
+ /* A series is a fill: docs/cli.md promises every one of them clears 3:1 on the
202
+ page and on a card, and until `checkSignals` measured them two did not. The
203
+ sand was the worst in the palette at 2.18:1 — a 43° hue on a 43° ground, the
204
+ same colour 36 points apart in lightness. Saturation rises as it darkens, or
205
+ it lands as mud rather than as sand. The six stay 17.1 ΔE76 apart at their
206
+ closest (chart-4 against chart-6), which is where the floor sat before. */
174
207
  --chart-1: hsl(133 18% 45%);
175
- --chart-2: hsl(14 47% 59%);
176
- --chart-3: hsl(43 33% 60%);
208
+ --chart-2: hsl(14 47% 56%); /* 2.98:1 at L59 */
209
+ --chart-3: hsl(43 45% 42%); /* 2.18:1 at 33% L60 */
177
210
  --chart-4: hsl(200 20% 50%);
178
211
  --chart-5: hsl(30 12% 40%);
179
212
  /* A muted teal: the one cool hue the warm set leaves open, and far enough from
@@ -191,21 +224,27 @@
191
224
  inset 0 1px 3px hsl(30 18% 12% / 0.07),
192
225
  inset 0 0 0 1px hsl(30 18% 12% / 0.03);
193
226
  --sidebar: hsl(40 25% 94%); /* #F5F2EC */
194
- --sidebar-foreground: hsl(0 0% 25%);
227
+ /* Warm-keyed like every other ink here. It shipped as hsl(0 0% 25%), the one
228
+ neutral grey in the light theme, on a surface hued at 40° — the same cold
229
+ read L146 rules out for --foreground. Same lightness step, 9.43:1. */
230
+ --sidebar-foreground: hsl(30 12% 24%);
195
231
  --sidebar-primary: hsl(133 11% 33%);
196
232
  --sidebar-primary-foreground: hsl(0 0% 100%);
197
233
  --sidebar-accent: hsl(133 15% 88%);
198
234
  --sidebar-accent-foreground: hsl(133 11% 25%);
199
- --sidebar-border: hsl(40 15% 88%);
235
+ /* A sidebar rule sits on --sidebar, not the page, and that surface is lighter
236
+ than --background — so it needs 2 points more than --border to read the same
237
+ (1.49:1, against the dark twin's 1.49:1). */
238
+ --sidebar-border: hsl(40 15% 77%);
200
239
  --sidebar-ring: hsl(133 11% 33%);
201
240
  }
202
241
 
203
242
  .dark {
243
+ --hover-toward: hsl(0, 0%, 100%);
204
244
  /* --success does not flip: the same green clears 3:1 on espresso as on latte. */
205
245
  --success-ink: hsl(142 55% 58%);
206
246
  --warn: hsl(30 90% 55%);
207
247
  --warn-ink: hsl(33 60% 72%);
208
- --warn-foreground: var(--warn-ink);
209
248
  --info: hsl(211 75% 60%);
210
249
  --info-ink: hsl(211 75% 64%);
211
250
  /* Soft terracotta-red. The light cut measured ~2.9:1 on espresso and read muddy. */
@@ -248,8 +287,14 @@
248
287
  --card-foreground: hsl(43 20% 92%);
249
288
  --popover: hsl(30 8% 14%);
250
289
  --popover-foreground: hsl(43 20% 92%);
251
- --primary: hsl(133 18% 58%); /* #7A9E7E */
252
- --primary-foreground: hsl(30 10% 13%);
290
+ /* Split in two, so each cut is tuned for its own job. The fill takes a white
291
+ label at Lc 83.0 against latte's 89.3, and still clears 3:1 as a mark on
292
+ espresso (3.36:1). The ink reads as words at Lc 73.8 against latte's 79.1.
293
+ Both sit inside the 15 Lc the themes are held to; the single token they
294
+ replace sat 30 Lc adrift on both counts. */
295
+ --primary: hsl(133 34% 34%);
296
+ --primary-foreground: var(--tint-foreground);
297
+ --primary-ink: hsl(133 26% 76%);
253
298
  /* Espresso twin: the fill darkens under a white label, the ink lifts as text. */
254
299
  --secondary: hsl(14, 64%, 37%);
255
300
  --secondary-foreground: hsl(0 0% 100%);
@@ -264,8 +309,12 @@
264
309
  --accent: hsl(133 12% 20%);
265
310
  --accent-foreground: hsl(133 18% 78%);
266
311
  /* Overwhelmingly an ink: sixty `text-destructive` sites, no fill carrying text.
267
- The light value measured 2.08:1 here — a colour, not words. */
268
- --destructive: hsl(0 65% 67%);
312
+ The light value measured 2.08:1 here — a colour, not words.
313
+ L67 read 4.48:1 on --muted, which is AA to two decimal places and under it
314
+ to three, on a surface with several hundred call sites. L68 is the smallest
315
+ step that clears with room to spare (4.64:1) rather than landing back on the
316
+ line; --background and --card, already clear, rise with it. */
317
+ --destructive: hsl(0 65% 68%);
269
318
  /* The ink is light here, so anything printed on it must be dark. Nothing does
270
319
  today; white would arm a 1.3:1 trap for whoever tries first. */
271
320
  --destructive-foreground: hsl(30 10% 10%);
@@ -278,7 +327,9 @@
278
327
  --chart-2: hsl(14 45% 55%);
279
328
  --chart-3: hsl(43 20% 70%);
280
329
  --chart-4: hsl(200 15% 55%);
281
- --chart-5: hsl(30 8% 35%);
330
+ /* The espresso twin of the light sand: 2.26:1 on --card, the same failure the
331
+ light theme carried, in the theme that usually gets tuned first. */
332
+ --chart-5: hsl(30 8% 46%);
282
333
  --chart-6: hsl(178 30% 52%);
283
334
  /* A warm tint reads as haze on espresso: deep black, more spread. */
284
335
  --elevation-raised:
@@ -295,7 +346,9 @@
295
346
  --sidebar-primary-foreground: hsl(133 20% 10%);
296
347
  --sidebar-accent: hsl(30 8% 19%);
297
348
  --sidebar-accent-foreground: hsl(43 20% 85%);
298
- --sidebar-border: hsl(30 8% 20%);
349
+ /* L20 measured 1.28:1 on --sidebar, the same too-faint rule the light theme
350
+ shipped. L24 is the twin of the light 1.49:1. */
351
+ --sidebar-border: hsl(30 8% 24%);
299
352
  --sidebar-ring: hsl(133 18% 58%);
300
353
  }
301
354
 
package/src/tokens.css CHANGED
@@ -15,6 +15,7 @@
15
15
  --color-popover-foreground: var(--popover-foreground);
16
16
  --color-primary: var(--primary);
17
17
  --color-primary-foreground: var(--primary-foreground);
18
+ --color-primary-ink: var(--primary-ink);
18
19
  --color-secondary: var(--secondary);
19
20
  --color-secondary-foreground: var(--secondary-foreground);
20
21
  --color-muted: var(--muted);
@@ -25,18 +26,18 @@
25
26
  --color-destructive-foreground: var(--destructive-foreground);
26
27
 
27
28
  /* Named for meaning, not hue: a `success` a project renders blue still reads
28
- right. Each status hue ships twice — the fill is a mark, the ink is words. */
29
+ right. The fill is a mark, the ink is words, the foreground is the label
30
+ printed on the fill. */
29
31
  --color-success: var(--success);
30
32
  --color-success-ink: var(--success-ink);
33
+ --color-success-foreground: var(--success-foreground);
31
34
  --color-warn: var(--warn);
32
35
  --color-warn-ink: var(--warn-ink);
36
+ --color-warn-foreground: var(--warn-foreground);
33
37
  --color-info: var(--info);
34
38
  --color-info-ink: var(--info-ink);
35
39
  --color-danger: var(--danger);
36
40
 
37
- /* Deprecated: this was always an ink. Use `warn-ink`. */
38
- --color-warn-foreground: var(--warn-foreground);
39
-
40
41
  --color-border: var(--border);
41
42
  --color-input: var(--input);
42
43
  --color-ring: var(--ring);
package/src/type.css CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  @layer base {
41
41
  :root {
42
- /* 680, not 600: Ubuntu Sans steps 500600 by 9.3% where Geist stepped 11.9%,
42
+ /* 680, not 600: Ubuntu Sans steps 500 to 600 by 9.3% where Geist stepped 11.9%,
43
43
  and panel titles stopped separating from the labels inside them. */
44
44
  --heading-weight: 680;
45
45
  }