@usegraft/tokens 1.0.0-beta.1 → 1.0.0-beta.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tokens.css +32 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usegraft/tokens",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "Graft design tokens as plain CSS custom properties.",
5
5
  "keywords": [
6
6
  "agent",
package/tokens.css CHANGED
@@ -55,6 +55,7 @@
55
55
  --n-7: oklch(0.79 0.003 95); /* #bcbcb9 — dark-scheme faint — Lc -65 on black */
56
56
  --n-8: oklch(0.86 0.003 95); /* #d1d1cf — dark-scheme muted — Lc -79 on black */
57
57
  --n-9: oklch(0.96 0.003 95); /* #f2f2ef — dark-scheme text/bright — Lc -99 */
58
+ --n-10: #ffffff; /* the top of the ramp — dark-scheme hover on a bright fill */
58
59
 
59
60
  /* light scheme neutrals — warm ivory paper, warm near-black ink */
60
61
  --paper-0: #f7f5f0; /* the page */
@@ -65,7 +66,14 @@
65
66
  --ink-1: oklch(0.44 0.006 95); /* #5c5a52 — muted */
66
67
  --ink-2: oklch(0.56 0.005 95); /* #7a7871 — faint */
67
68
 
68
- /* danger — hue 25. The ONLY hue in the system; errors only, never brand.
69
+ /* Callout hues — docs callouts only (note and warning), never brand or UI
70
+ state. 500 is for the light scheme, 300 for the dark one. */
71
+ --note-500: oklch(0.5 0.14 245);
72
+ --note-300: oklch(0.75 0.14 245);
73
+ --warning-500: oklch(0.55 0.15 75);
74
+ --warning-300: oklch(0.8 0.15 75);
75
+
76
+ /* danger — hue 25. The only hue for UI state; errors only, never brand.
69
77
  A red bright enough for APCA 75 on black would be pale pink, so error
70
78
  text targets the non-body floor (Lc 60). */
71
79
  --danger-300: oklch(0.77 0.123 25); /* on black #f9948c — Lc -60 */
@@ -106,7 +114,7 @@
106
114
  --primary: light-dark(var(--ink-0), var(--n-9));
107
115
  --primary-hover: light-dark(
108
116
  var(--ink-0-hover),
109
- #ffffff
117
+ var(--n-10)
110
118
  ); /* fill hover: one step, same direction */
111
119
  --primary-foreground: light-dark(var(--paper-0), var(--n-0));
112
120
  /* Alpha variants derive from --primary, so they follow it.
@@ -153,18 +161,25 @@
153
161
  --mark-strong: var(--primary-hover);
154
162
  --mark-tint: var(--primary-tint);
155
163
 
164
+ --callout-note: light-dark(var(--note-500), var(--note-300));
165
+ --callout-warning: light-dark(var(--warning-500), var(--warning-300));
166
+ --callout-danger: var(--danger);
167
+
156
168
  /* ---- type ---- */
157
- --font-display: "Instrument Serif", "Iowan Old Style", georgia, serif;
158
- --font-sans: "Instrument Sans Variable", "Instrument Sans", system-ui, sans-serif;
169
+ --font-display:
170
+ "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
171
+ --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
159
172
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
160
173
 
161
- /* Scale tuned by hand, not a formula. Display sizes are for Instrument
162
- Serif at weight 400 with tight tracking — big and light. */
174
+ /* Scale tuned by hand, not a formula. Display sizes are for IBM Plex Sans
175
+ at tight tracking — big and crisp. */
163
176
  --text-xs: 0.75rem; /* 12 — mono labels, uppercase, tracked wide */
164
177
  --text-sm: 0.875rem; /* 14 — UI chrome, sidebar */
165
178
  --text-base: 1rem; /* 16 — body */
166
179
  --text-md: 1.125rem; /* 18 — docs body / lede */
180
+ --text-h3: 1.25rem; /* 20 — doc h3 subhead */
167
181
  --text-lg: 1.5rem; /* 24 — section intros */
182
+ --text-h2: 1.75rem; /* 28 — doc h2 section head */
168
183
  --text-xl: 2.25rem; /* 36 — doc h1 */
169
184
  --text-2xl: 3.5rem; /* 56 — page display */
170
185
  --text-3xl: clamp(3.5rem, 9vw, 6.5rem); /* hero display */
@@ -174,12 +189,14 @@
174
189
  --leading-body: 1.65;
175
190
  --tracking-display: -0.03em; /* serif display, sizes ≥ --text-2xl */
176
191
  --tracking-label: 0.08em; /* uppercase mono labels */
192
+ --measure: 68ch; /* reading measure for prose — .prose consumes this, never a literal */
177
193
 
178
194
  /* ---- space (4px base) ---- */
179
195
  --space-1: 0.25rem;
180
196
  --space-2: 0.5rem;
181
197
  --space-3: 0.75rem;
182
198
  --space-4: 1rem;
199
+ --space-5: 1.25rem;
183
200
  --space-6: 1.5rem;
184
201
  --space-8: 2rem;
185
202
  --space-12: 3rem;
@@ -211,10 +228,16 @@
211
228
  --press-scale: 0.97;
212
229
  }
213
230
 
214
- /* A theme toggle stamps data-theme on <html>; it must beat the OS setting. */
215
- :root[data-theme="light"] {
231
+ /* A theme toggle stamps data-theme or class dark/light on <html>; it must beat the OS setting. */
232
+ :root[data-theme="light"],
233
+ :root.light,
234
+ html.light,
235
+ .light {
216
236
  color-scheme: light;
217
237
  }
218
- :root[data-theme="dark"] {
238
+ :root[data-theme="dark"],
239
+ :root.dark,
240
+ html.dark,
241
+ .dark {
219
242
  color-scheme: dark;
220
243
  }