@aginies/tokens 0.1.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/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @aginies/tokens
2
+
3
+ Design tokens for the Aginies design system: CSS custom properties, a JSON export and a
4
+ Tailwind CSS v3 preset. Dark-first, one signal colour, three fonts.
5
+
6
+ ```bash
7
+ npm install @aginies/tokens
8
+ ```
9
+
10
+ ## CSS
11
+
12
+ ```css
13
+ @import '@aginies/tokens/tokens.css';
14
+ ```
15
+
16
+ Dark is the default. Add `.light` / `[data-theme="light"]` to the root for the light theme;
17
+ without an explicit theme the `prefers-color-scheme` media query decides. A `.room` element
18
+ always carries the palette opposite to its surroundings.
19
+
20
+ Fonts are not bundled. Load Bricolage Grotesque, Instrument Sans and JetBrains Mono yourself
21
+ (for example the `@fontsource-variable/*` packages) or override `--font-display`,
22
+ `--font-body` and `--font-mono`.
23
+
24
+ ## Tailwind
25
+
26
+ ```js
27
+ // tailwind.config.js
28
+ module.exports = {
29
+ presets: [require('@aginies/tokens/tailwind-preset')],
30
+ }
31
+ ```
32
+
33
+ The preset provides the design-system names (`bg-panel`, `text-mute`, `border-line-2`,
34
+ `bg-signal`, `text-ok`, `text-bad-300`), remaps the standard palettes (`red`, `amber`,
35
+ `green`, `blue`, `gray`, …) onto the token ramps, and keeps the shadcn/ui semantic names
36
+ (`bg-background`, `text-muted-foreground`, …) working.
37
+
38
+ ## JavaScript
39
+
40
+ ```ts
41
+ import { palettes, fonts, buildRamp, contrast } from '@aginies/tokens'
42
+ ```
43
+
44
+ ## Development
45
+
46
+ `src/tokens.ts` is the source of truth. `bun run generate` writes `dist/tokens.css`,
47
+ `dist/legacy-bridge.css` and `dist/tokens.json`.
package/dist/index.cjs ADDED
@@ -0,0 +1,416 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ breakpoints: () => breakpoints,
24
+ buildRamp: () => buildRamp,
25
+ canvas: () => canvas,
26
+ contrast: () => contrast,
27
+ data: () => data,
28
+ focus: () => focus,
29
+ fonts: () => fonts,
30
+ hexToRgb: () => hexToRgb,
31
+ hslTriplet: () => hslTriplet,
32
+ layout: () => layout,
33
+ luminance: () => luminance,
34
+ motion: () => motion,
35
+ neutral: () => neutral,
36
+ oklchToHex: () => oklchToHex,
37
+ palettes: () => palettes,
38
+ radius: () => radius,
39
+ rampShape: () => rampShape,
40
+ rampSteps: () => rampSteps,
41
+ rampedColors: () => rampedColors,
42
+ rgbChannels: () => rgbChannels,
43
+ rgbToHex: () => rgbToHex,
44
+ rgbToOklch: () => rgbToOklch,
45
+ space: () => space,
46
+ type: () => type,
47
+ z: () => z
48
+ });
49
+ module.exports = __toCommonJS(src_exports);
50
+
51
+ // src/color.ts
52
+ function hexToRgb(hex) {
53
+ const h = hex.replace("#", "");
54
+ const n = h.length === 3 ? h.split("").map((ch) => ch + ch).join("") : h;
55
+ const v = Number.parseInt(n, 16);
56
+ return { r: v >> 16 & 255, g: v >> 8 & 255, b: v & 255 };
57
+ }
58
+ function rgbToHex({ r, g, b }) {
59
+ const to = (x) => Math.round(clamp(x, 0, 255)).toString(16).padStart(2, "0");
60
+ return `#${to(r)}${to(g)}${to(b)}`.toUpperCase();
61
+ }
62
+ function rgbChannels(hex) {
63
+ const { r, g, b } = hexToRgb(hex);
64
+ return `${r} ${g} ${b}`;
65
+ }
66
+ function hslTriplet(hex) {
67
+ const { r, g, b } = hexToRgb(hex);
68
+ const rn = r / 255;
69
+ const gn = g / 255;
70
+ const bn = b / 255;
71
+ const max = Math.max(rn, gn, bn);
72
+ const min = Math.min(rn, gn, bn);
73
+ const l = (max + min) / 2;
74
+ let h = 0;
75
+ let s = 0;
76
+ if (max !== min) {
77
+ const d = max - min;
78
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
79
+ if (max === rn) h = (gn - bn) / d + (gn < bn ? 6 : 0);
80
+ else if (max === gn) h = (bn - rn) / d + 2;
81
+ else h = (rn - gn) / d + 4;
82
+ h *= 60;
83
+ }
84
+ const f = (x) => Number(x.toFixed(1)).toString();
85
+ return `${f(h)} ${f(s * 100)}% ${f(l * 100)}%`;
86
+ }
87
+ function clamp(x, lo, hi) {
88
+ return Math.min(hi, Math.max(lo, x));
89
+ }
90
+ function srgbToLinear(c) {
91
+ const x = c / 255;
92
+ return x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;
93
+ }
94
+ function linearToSrgb(c) {
95
+ const x = c <= 31308e-7 ? c * 12.92 : 1.055 * c ** (1 / 2.4) - 0.055;
96
+ return x * 255;
97
+ }
98
+ function rgbToOklch(rgb) {
99
+ const r = srgbToLinear(rgb.r);
100
+ const g = srgbToLinear(rgb.g);
101
+ const b = srgbToLinear(rgb.b);
102
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
103
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
104
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
105
+ const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
106
+ const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
107
+ const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
108
+ const c = Math.hypot(A, B);
109
+ let h = Math.atan2(B, A) * 180 / Math.PI;
110
+ if (h < 0) h += 360;
111
+ return { l: L, c, h };
112
+ }
113
+ function oklchToLinearRgb({ l: L, c, h }) {
114
+ const A = c * Math.cos(h * Math.PI / 180);
115
+ const B = c * Math.sin(h * Math.PI / 180);
116
+ const l = (L + 0.3963377774 * A + 0.2158037573 * B) ** 3;
117
+ const m = (L - 0.1055613458 * A - 0.0638541728 * B) ** 3;
118
+ const s = (L - 0.0894841775 * A - 1.291485548 * B) ** 3;
119
+ return {
120
+ r: 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
121
+ g: -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
122
+ b: -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s
123
+ };
124
+ }
125
+ function inGamut({ r, g, b }) {
126
+ const eps = 1e-4;
127
+ return r >= -eps && r <= 1 + eps && g >= -eps && g <= 1 + eps && b >= -eps && b <= 1 + eps;
128
+ }
129
+ function oklchToHex(color) {
130
+ let c = color.c;
131
+ let lin = oklchToLinearRgb({ ...color, c });
132
+ while (!inGamut(lin) && c > 5e-4) {
133
+ c *= 0.97;
134
+ lin = oklchToLinearRgb({ ...color, c });
135
+ }
136
+ return rgbToHex({ r: linearToSrgb(lin.r), g: linearToSrgb(lin.g), b: linearToSrgb(lin.b) });
137
+ }
138
+ function luminance(hex) {
139
+ const { r, g, b } = hexToRgb(hex);
140
+ return 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b);
141
+ }
142
+ function contrast(a, b) {
143
+ const la = luminance(a);
144
+ const lb = luminance(b);
145
+ const [hi, lo] = la > lb ? [la, lb] : [lb, la];
146
+ return (hi + 0.05) / (lo + 0.05);
147
+ }
148
+
149
+ // src/tokens.ts
150
+ var palettes = {
151
+ dark: {
152
+ bg: "#070A14",
153
+ "bg-2": "#0B1020",
154
+ panel: "#0E1426",
155
+ "panel-2": "#121A30",
156
+ "panel-3": "#182240",
157
+ line: "#1B2238",
158
+ "line-2": "#2A3350",
159
+ "line-3": "#3C4560",
160
+ text: "#E7ECF7",
161
+ "text-2": "#A9B2CC",
162
+ mute: "#7F8AA8",
163
+ signal: "#5FC8FF",
164
+ "signal-2": "#01B1F7",
165
+ "signal-ink": "#06111F",
166
+ "signal-soft": "rgba(95, 200, 255, 0.12)",
167
+ ok: "#4FD1A0",
168
+ "ok-ink": "#06111F",
169
+ "ok-soft": "rgba(79, 209, 160, 0.14)",
170
+ warn: "#F2B35B",
171
+ "warn-ink": "#06111F",
172
+ "warn-soft": "rgba(242, 179, 91, 0.14)",
173
+ bad: "#FF7A7A",
174
+ "bad-ink": "#06111F",
175
+ "bad-soft": "rgba(255, 122, 122, 0.14)",
176
+ shadow: "0 20px 60px rgba(0, 0, 0, 0.45)",
177
+ "shadow-sm": "0 8px 24px rgba(0, 0, 0, 0.35)",
178
+ overlay: "rgba(7, 10, 20, 0.6)"
179
+ },
180
+ light: {
181
+ bg: "#F4F6FA",
182
+ "bg-2": "#FFFFFF",
183
+ panel: "#FFFFFF",
184
+ "panel-2": "#EEF1F7",
185
+ "panel-3": "#E4E9F2",
186
+ line: "#DCE1EC",
187
+ "line-2": "#C5CCDB",
188
+ "line-3": "#A9B2CC",
189
+ text: "#0B1220",
190
+ "text-2": "#3C4560",
191
+ mute: "#6B7590",
192
+ signal: "#0077C2",
193
+ "signal-2": "#005E9A",
194
+ "signal-ink": "#FFFFFF",
195
+ "signal-soft": "rgba(0, 119, 194, 0.10)",
196
+ // The site's light values (#0E8A5F, #A8661A) sit just under 4.5:1 as ink carriers; the
197
+ // app fills buttons and badges with these, so they are shaded a step darker here.
198
+ ok: "#0B7F57",
199
+ "ok-ink": "#FFFFFF",
200
+ "ok-soft": "rgba(11, 127, 87, 0.12)",
201
+ warn: "#9C5A12",
202
+ "warn-ink": "#FFFFFF",
203
+ "warn-soft": "rgba(156, 90, 18, 0.12)",
204
+ bad: "#B3261E",
205
+ "bad-ink": "#FFFFFF",
206
+ "bad-soft": "rgba(179, 38, 30, 0.10)",
207
+ shadow: "0 20px 50px rgba(11, 18, 32, 0.10)",
208
+ "shadow-sm": "0 8px 20px rgba(11, 18, 32, 0.08)",
209
+ overlay: "rgba(11, 18, 32, 0.45)"
210
+ }
211
+ };
212
+ var rampedColors = ["signal", "ok", "warn", "bad"];
213
+ var rampSteps = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
214
+ var rampShape = {
215
+ 50: { l: 0.97, c: 0.18 },
216
+ 100: { l: 0.935, c: 0.32 },
217
+ 200: { l: 0.875, c: 0.52 },
218
+ 300: { l: 0.795, c: 0.78 },
219
+ 400: { l: 0.715, c: 0.95 },
220
+ 500: { l: 0.635, c: 1 },
221
+ 600: { l: 0.555, c: 0.95 },
222
+ 700: { l: 0.475, c: 0.85 },
223
+ 800: { l: 0.395, c: 0.7 },
224
+ 900: { l: 0.315, c: 0.55 },
225
+ 950: { l: 0.245, c: 0.45 }
226
+ };
227
+ var neutral = {
228
+ 50: "#F4F6FA",
229
+ 100: "#EEF1F7",
230
+ 200: "#DCE1EC",
231
+ 300: "#C5CCDB",
232
+ 400: "#A9B2CC",
233
+ 500: "#7F8AA8",
234
+ 600: "#6B7590",
235
+ 700: "#3C4560",
236
+ 800: "#2A3350",
237
+ 900: "#1B2238",
238
+ 950: "#0B1020"
239
+ };
240
+ var data = ["signal", "ok", "warn", "bad", "text-2", "mute"];
241
+ var canvas = {
242
+ "canvas-bg": "bg",
243
+ "canvas-grid": "line",
244
+ "canvas-node": "panel",
245
+ "canvas-node-line": "line-2",
246
+ edge: "line-2",
247
+ "edge-hover": "text-2",
248
+ "edge-active": "signal",
249
+ execution: "ok"
250
+ };
251
+ var fonts = {
252
+ display: "'Bricolage Grotesque Variable', 'Instrument Sans Variable', ui-sans-serif, system-ui, sans-serif",
253
+ body: "'Instrument Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif",
254
+ mono: "'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
255
+ };
256
+ var radius = {
257
+ sm: "4px",
258
+ md: "6px",
259
+ lg: "10px",
260
+ xl: "14px",
261
+ "2xl": "20px",
262
+ full: "9999px"
263
+ };
264
+ var space = {
265
+ 1: "4px",
266
+ 2: "8px",
267
+ 3: "12px",
268
+ 4: "16px",
269
+ 5: "24px",
270
+ 6: "32px",
271
+ 7: "48px",
272
+ 8: "64px"
273
+ };
274
+ var type = {
275
+ display: {
276
+ size: "clamp(40px, 6.4vw, 88px)",
277
+ lineHeight: "0.96",
278
+ letterSpacing: "-0.04em",
279
+ family: "display",
280
+ weight: 600,
281
+ opsz: 96
282
+ },
283
+ h1: {
284
+ size: "clamp(36px, 5.2vw, 68px)",
285
+ lineHeight: "1",
286
+ letterSpacing: "-0.035em",
287
+ family: "display",
288
+ weight: 600,
289
+ opsz: 96
290
+ },
291
+ h2: {
292
+ size: "clamp(28px, 3.8vw, 50px)",
293
+ lineHeight: "1.04",
294
+ letterSpacing: "-0.03em",
295
+ family: "display",
296
+ weight: 600,
297
+ opsz: 72
298
+ },
299
+ h3: {
300
+ size: "clamp(20px, 2vw, 26px)",
301
+ lineHeight: "1.2",
302
+ letterSpacing: "-0.02em",
303
+ family: "display",
304
+ weight: 600
305
+ },
306
+ h4: { size: "17px", lineHeight: "1.3", letterSpacing: "-0.01em", family: "display", weight: 600 },
307
+ stat: {
308
+ size: "clamp(30px, 3.4vw, 44px)",
309
+ lineHeight: "1",
310
+ letterSpacing: "-0.03em",
311
+ family: "display",
312
+ weight: 600
313
+ },
314
+ lede: { size: "clamp(17px, 1.4vw, 20px)", lineHeight: "1.5" },
315
+ body: { size: "16px", lineHeight: "1.55" },
316
+ "body-2": { size: "15px", lineHeight: "1.5" },
317
+ small: { size: "13.5px", lineHeight: "1.45" },
318
+ eyebrow: {
319
+ size: "11.5px",
320
+ lineHeight: "1",
321
+ letterSpacing: "0.14em",
322
+ family: "mono",
323
+ weight: 500,
324
+ transform: "uppercase"
325
+ },
326
+ label: {
327
+ size: "11px",
328
+ lineHeight: "1",
329
+ letterSpacing: "0.1em",
330
+ family: "mono",
331
+ weight: 500,
332
+ transform: "uppercase"
333
+ },
334
+ tag: { size: "11.5px", lineHeight: "1", letterSpacing: "0.04em", family: "mono" },
335
+ ui: { size: "13px", lineHeight: "1.4" },
336
+ "ui-sm": { size: "12px", lineHeight: "1.35" },
337
+ "ui-xs": { size: "11px", lineHeight: "1.3" }
338
+ };
339
+ var motion = {
340
+ "duration-fast": "150ms",
341
+ "duration-base": "200ms",
342
+ "duration-slow": "300ms",
343
+ "duration-enter": "600ms",
344
+ "ease-enter": "cubic-bezier(0.2, 0.7, 0.2, 1)"
345
+ };
346
+ var layout = {
347
+ max: "1200px",
348
+ gutter: "clamp(20px, 4vw, 40px)",
349
+ "section-y": "clamp(64px, 9vw, 128px)",
350
+ "section-y-tight": "clamp(40px, 6vw, 80px)"
351
+ };
352
+ var breakpoints = {
353
+ sm: "640px",
354
+ md: "768px",
355
+ lg: "1024px",
356
+ xl: "1280px",
357
+ "2xl": "1536px",
358
+ /** Site nav collapses here. */
359
+ nav: "1180px",
360
+ wide: "1340px"
361
+ };
362
+ var z = {
363
+ base: 0,
364
+ raised: 10,
365
+ sticky: 50,
366
+ dropdown: 100,
367
+ modal: 200,
368
+ toast: 300
369
+ };
370
+ var focus = {
371
+ /** Keyboard focus ring on any element. */
372
+ ring: "2px solid var(--signal)",
373
+ "ring-offset": "3px",
374
+ /** Form controls: soft halo instead of an outline. */
375
+ "field-ring": "0 0 0 3px var(--signal-soft)"
376
+ };
377
+
378
+ // src/build-ramp.ts
379
+ function buildRamp(baseHex) {
380
+ const base = rgbToOklch(hexToRgb(baseHex));
381
+ const out = {};
382
+ for (const step of rampSteps) {
383
+ const { l, c } = rampShape[step];
384
+ out[step] = oklchToHex({ l, c: base.c * c, h: base.h });
385
+ }
386
+ return out;
387
+ }
388
+ // Annotate the CommonJS export names for ESM import in node:
389
+ 0 && (module.exports = {
390
+ breakpoints,
391
+ buildRamp,
392
+ canvas,
393
+ contrast,
394
+ data,
395
+ focus,
396
+ fonts,
397
+ hexToRgb,
398
+ hslTriplet,
399
+ layout,
400
+ luminance,
401
+ motion,
402
+ neutral,
403
+ oklchToHex,
404
+ palettes,
405
+ radius,
406
+ rampShape,
407
+ rampSteps,
408
+ rampedColors,
409
+ rgbChannels,
410
+ rgbToHex,
411
+ rgbToOklch,
412
+ space,
413
+ type,
414
+ z
415
+ });
416
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/color.ts","../src/tokens.ts","../src/build-ramp.ts"],"sourcesContent":["/**\n * `@aginies/tokens` — JavaScript entry.\n *\n * Exposes the token source (for tooling, docs and runtime theming) and the colour helpers\n * used to derive ramps, so a whitelabel layer can compute the same values the CSS ships.\n */\n\nexport { buildRamp } from './build-ramp.ts'\nexport {\n contrast,\n hexToRgb,\n hslTriplet,\n luminance,\n oklchToHex,\n rgbChannels,\n rgbToHex,\n rgbToOklch,\n} from './color.ts'\nexport * from './tokens.ts'\n","/**\n * Small colour utilities: sRGB ⇄ OKLCH, hex parsing, HSL triplets.\n * Dependency-free so the token build can run under plain Node.\n */\n\nexport interface Rgb {\n r: number\n g: number\n b: number\n}\n\nexport interface Oklch {\n l: number\n c: number\n h: number\n}\n\nexport function hexToRgb(hex: string): Rgb {\n const h = hex.replace('#', '')\n const n =\n h.length === 3\n ? h\n .split('')\n .map((ch) => ch + ch)\n .join('')\n : h\n const v = Number.parseInt(n, 16)\n return { r: (v >> 16) & 255, g: (v >> 8) & 255, b: v & 255 }\n}\n\nexport function rgbToHex({ r, g, b }: Rgb): string {\n const to = (x: number) =>\n Math.round(clamp(x, 0, 255))\n .toString(16)\n .padStart(2, '0')\n return `#${to(r)}${to(g)}${to(b)}`.toUpperCase()\n}\n\n/** \"95 200 255\" — the channel form Tailwind's `<alpha-value>` colours need. */\nexport function rgbChannels(hex: string): string {\n const { r, g, b } = hexToRgb(hex)\n return `${r} ${g} ${b}`\n}\n\n/** \"204 100% 68.6%\" — the HSL triplet form the shadcn-era variables used. */\nexport function hslTriplet(hex: string): string {\n const { r, g, b } = hexToRgb(hex)\n const rn = r / 255\n const gn = g / 255\n const bn = b / 255\n const max = Math.max(rn, gn, bn)\n const min = Math.min(rn, gn, bn)\n const l = (max + min) / 2\n let h = 0\n let s = 0\n if (max !== min) {\n const d = max - min\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min)\n if (max === rn) h = (gn - bn) / d + (gn < bn ? 6 : 0)\n else if (max === gn) h = (bn - rn) / d + 2\n else h = (rn - gn) / d + 4\n h *= 60\n }\n const f = (x: number) => Number(x.toFixed(1)).toString()\n return `${f(h)} ${f(s * 100)}% ${f(l * 100)}%`\n}\n\nfunction clamp(x: number, lo: number, hi: number): number {\n return Math.min(hi, Math.max(lo, x))\n}\n\nfunction srgbToLinear(c: number): number {\n const x = c / 255\n return x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4\n}\n\nfunction linearToSrgb(c: number): number {\n const x = c <= 0.0031308 ? c * 12.92 : 1.055 * c ** (1 / 2.4) - 0.055\n return x * 255\n}\n\nexport function rgbToOklch(rgb: Rgb): Oklch {\n const r = srgbToLinear(rgb.r)\n const g = srgbToLinear(rgb.g)\n const b = srgbToLinear(rgb.b)\n const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b)\n const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b)\n const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b)\n const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s\n const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s\n const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s\n const c = Math.hypot(A, B)\n let h = (Math.atan2(B, A) * 180) / Math.PI\n if (h < 0) h += 360\n return { l: L, c, h }\n}\n\nfunction oklchToLinearRgb({ l: L, c, h }: Oklch): Rgb {\n const A = c * Math.cos((h * Math.PI) / 180)\n const B = c * Math.sin((h * Math.PI) / 180)\n const l = (L + 0.3963377774 * A + 0.2158037573 * B) ** 3\n const m = (L - 0.1055613458 * A - 0.0638541728 * B) ** 3\n const s = (L - 0.0894841775 * A - 1.291485548 * B) ** 3\n return {\n r: 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n g: -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n b: -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,\n }\n}\n\nfunction inGamut({ r, g, b }: Rgb): boolean {\n const eps = 1e-4\n return r >= -eps && r <= 1 + eps && g >= -eps && g <= 1 + eps && b >= -eps && b <= 1 + eps\n}\n\n/**\n * OKLCH → sRGB hex. If the colour is out of gamut the chroma is reduced until it fits,\n * which keeps lightness and hue (what the eye keys on) intact.\n */\nexport function oklchToHex(color: Oklch): string {\n let c = color.c\n let lin = oklchToLinearRgb({ ...color, c })\n while (!inGamut(lin) && c > 0.0005) {\n c *= 0.97\n lin = oklchToLinearRgb({ ...color, c })\n }\n return rgbToHex({ r: linearToSrgb(lin.r), g: linearToSrgb(lin.g), b: linearToSrgb(lin.b) })\n}\n\n/** Relative luminance (WCAG). */\nexport function luminance(hex: string): number {\n const { r, g, b } = hexToRgb(hex)\n return 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b)\n}\n\n/** WCAG contrast ratio between two hex colours. */\nexport function contrast(a: string, b: string): number {\n const la = luminance(a)\n const lb = luminance(b)\n const [hi, lo] = la > lb ? [la, lb] : [lb, la]\n return (hi + 0.05) / (lo + 0.05)\n}\n","/**\n * Aginies design tokens — the single source of truth.\n *\n * Values mirror the aginies.com design system (\"Control Room\", dark-first, one signal\n * colour) and extend it with what an application UI needs on top of a marketing site:\n * a third panel level, a strong border, status inks and soft washes, canvas tokens,\n * a data palette for charts, a spacing scale and dense UI type sizes.\n *\n * Everything under `dist/` is generated from this file by `src/build.ts`.\n */\n\nexport type ThemeName = 'dark' | 'light'\n\n/** Theme-dependent colour values. Hex unless noted. */\nexport interface Palette {\n /** Page ground. */\n bg: string\n /** Secondary ground: inputs, inside screens. */\n 'bg-2': string\n /** Card / panel. */\n panel: string\n /** Raised panel: popovers, active rows. */\n 'panel-2': string\n /** Hover / pressed surface on a panel. */\n 'panel-3': string\n /** Divider. */\n line: string\n /** Border. */\n 'line-2': string\n /** Strong border: focused or selected outlines that are not the signal colour. */\n 'line-3': string\n /** Primary text. */\n text: string\n /** Secondary text. */\n 'text-2': string\n /** Labels, quiet text. */\n mute: string\n /** The single accent. */\n signal: string\n /** Signal hover / pressed. */\n 'signal-2': string\n /** Ink on a signal fill. */\n 'signal-ink': string\n /** Soft signal wash (rgba). */\n 'signal-soft': string\n ok: string\n 'ok-ink': string\n 'ok-soft': string\n warn: string\n 'warn-ink': string\n 'warn-soft': string\n bad: string\n 'bad-ink': string\n 'bad-soft': string\n /** The one large shadow: floating shells. */\n shadow: string\n /** Popovers and menus. */\n 'shadow-sm': string\n /** Modal scrim (rgba). */\n overlay: string\n}\n\nexport const palettes: Record<ThemeName, Palette> = {\n dark: {\n bg: '#070A14',\n 'bg-2': '#0B1020',\n panel: '#0E1426',\n 'panel-2': '#121A30',\n 'panel-3': '#182240',\n line: '#1B2238',\n 'line-2': '#2A3350',\n 'line-3': '#3C4560',\n text: '#E7ECF7',\n 'text-2': '#A9B2CC',\n mute: '#7F8AA8',\n signal: '#5FC8FF',\n 'signal-2': '#01B1F7',\n 'signal-ink': '#06111F',\n 'signal-soft': 'rgba(95, 200, 255, 0.12)',\n ok: '#4FD1A0',\n 'ok-ink': '#06111F',\n 'ok-soft': 'rgba(79, 209, 160, 0.14)',\n warn: '#F2B35B',\n 'warn-ink': '#06111F',\n 'warn-soft': 'rgba(242, 179, 91, 0.14)',\n bad: '#FF7A7A',\n 'bad-ink': '#06111F',\n 'bad-soft': 'rgba(255, 122, 122, 0.14)',\n shadow: '0 20px 60px rgba(0, 0, 0, 0.45)',\n 'shadow-sm': '0 8px 24px rgba(0, 0, 0, 0.35)',\n overlay: 'rgba(7, 10, 20, 0.6)',\n },\n light: {\n bg: '#F4F6FA',\n 'bg-2': '#FFFFFF',\n panel: '#FFFFFF',\n 'panel-2': '#EEF1F7',\n 'panel-3': '#E4E9F2',\n line: '#DCE1EC',\n 'line-2': '#C5CCDB',\n 'line-3': '#A9B2CC',\n text: '#0B1220',\n 'text-2': '#3C4560',\n mute: '#6B7590',\n signal: '#0077C2',\n 'signal-2': '#005E9A',\n 'signal-ink': '#FFFFFF',\n 'signal-soft': 'rgba(0, 119, 194, 0.10)',\n // The site's light values (#0E8A5F, #A8661A) sit just under 4.5:1 as ink carriers; the\n // app fills buttons and badges with these, so they are shaded a step darker here.\n ok: '#0B7F57',\n 'ok-ink': '#FFFFFF',\n 'ok-soft': 'rgba(11, 127, 87, 0.12)',\n warn: '#9C5A12',\n 'warn-ink': '#FFFFFF',\n 'warn-soft': 'rgba(156, 90, 18, 0.12)',\n bad: '#B3261E',\n 'bad-ink': '#FFFFFF',\n 'bad-soft': 'rgba(179, 38, 30, 0.10)',\n shadow: '0 20px 50px rgba(11, 18, 32, 0.10)',\n 'shadow-sm': '0 8px 20px rgba(11, 18, 32, 0.08)',\n overlay: 'rgba(11, 18, 32, 0.45)',\n },\n}\n\n/** Status colours that get a generated 50–950 ramp per theme. */\nexport const rampedColors = ['signal', 'ok', 'warn', 'bad'] as const\nexport type RampedColor = (typeof rampedColors)[number]\n\nexport const rampSteps = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const\nexport type RampStep = (typeof rampSteps)[number]\n\n/**\n * Lightness targets (OKLCH L) and chroma factors for each ramp step. The hue is taken\n * from the theme's base colour; chroma peaks around the middle and falls off at the ends\n * so tints and shades stay in gamut and read as the same colour.\n */\nexport const rampShape: Record<RampStep, { l: number; c: number }> = {\n 50: { l: 0.97, c: 0.18 },\n 100: { l: 0.935, c: 0.32 },\n 200: { l: 0.875, c: 0.52 },\n 300: { l: 0.795, c: 0.78 },\n 400: { l: 0.715, c: 0.95 },\n 500: { l: 0.635, c: 1 },\n 600: { l: 0.555, c: 0.95 },\n 700: { l: 0.475, c: 0.85 },\n 800: { l: 0.395, c: 0.7 },\n 900: { l: 0.315, c: 0.55 },\n 950: { l: 0.245, c: 0.45 },\n}\n\n/**\n * Fixed neutral ramp, identical in both themes. It is the site's own set of surfaces and\n * text colours laid out as a scale, so `neutral-*` utilities always land on a real token.\n */\nexport const neutral: Record<RampStep, string> = {\n 50: '#F4F6FA',\n 100: '#EEF1F7',\n 200: '#DCE1EC',\n 300: '#C5CCDB',\n 400: '#A9B2CC',\n 500: '#7F8AA8',\n 600: '#6B7590',\n 700: '#3C4560',\n 800: '#2A3350',\n 900: '#1B2238',\n 950: '#0B1020',\n}\n\n/** Chart / category palette. References semantic tokens so it follows the theme. */\nexport const data = ['signal', 'ok', 'warn', 'bad', 'text-2', 'mute'] as const\n\n/** Workflow canvas tokens, expressed as references to semantic tokens. */\nexport const canvas = {\n 'canvas-bg': 'bg',\n 'canvas-grid': 'line',\n 'canvas-node': 'panel',\n 'canvas-node-line': 'line-2',\n edge: 'line-2',\n 'edge-hover': 'text-2',\n 'edge-active': 'signal',\n execution: 'ok',\n} as const\n\nexport const fonts = {\n display:\n \"'Bricolage Grotesque Variable', 'Instrument Sans Variable', ui-sans-serif, system-ui, sans-serif\",\n body: \"'Instrument Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif\",\n mono: \"'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n} as const\n\nexport const radius = {\n sm: '4px',\n md: '6px',\n lg: '10px',\n xl: '14px',\n '2xl': '20px',\n full: '9999px',\n} as const\n\n/** 4-point spacing scale. */\nexport const space = {\n 1: '4px',\n 2: '8px',\n 3: '12px',\n 4: '16px',\n 5: '24px',\n 6: '32px',\n 7: '48px',\n 8: '64px',\n} as const\n\nexport interface TypeStyle {\n size: string\n lineHeight: string\n letterSpacing?: string\n family?: keyof typeof fonts\n weight?: number\n transform?: 'uppercase'\n /** Bricolage optical size axis. */\n opsz?: number\n}\n\n/** The type scale. Marketing sizes come from the site; `ui-*` are the dense app sizes. */\nexport const type: Record<string, TypeStyle> = {\n display: {\n size: 'clamp(40px, 6.4vw, 88px)',\n lineHeight: '0.96',\n letterSpacing: '-0.04em',\n family: 'display',\n weight: 600,\n opsz: 96,\n },\n h1: {\n size: 'clamp(36px, 5.2vw, 68px)',\n lineHeight: '1',\n letterSpacing: '-0.035em',\n family: 'display',\n weight: 600,\n opsz: 96,\n },\n h2: {\n size: 'clamp(28px, 3.8vw, 50px)',\n lineHeight: '1.04',\n letterSpacing: '-0.03em',\n family: 'display',\n weight: 600,\n opsz: 72,\n },\n h3: {\n size: 'clamp(20px, 2vw, 26px)',\n lineHeight: '1.2',\n letterSpacing: '-0.02em',\n family: 'display',\n weight: 600,\n },\n h4: { size: '17px', lineHeight: '1.3', letterSpacing: '-0.01em', family: 'display', weight: 600 },\n stat: {\n size: 'clamp(30px, 3.4vw, 44px)',\n lineHeight: '1',\n letterSpacing: '-0.03em',\n family: 'display',\n weight: 600,\n },\n lede: { size: 'clamp(17px, 1.4vw, 20px)', lineHeight: '1.5' },\n body: { size: '16px', lineHeight: '1.55' },\n 'body-2': { size: '15px', lineHeight: '1.5' },\n small: { size: '13.5px', lineHeight: '1.45' },\n eyebrow: {\n size: '11.5px',\n lineHeight: '1',\n letterSpacing: '0.14em',\n family: 'mono',\n weight: 500,\n transform: 'uppercase',\n },\n label: {\n size: '11px',\n lineHeight: '1',\n letterSpacing: '0.1em',\n family: 'mono',\n weight: 500,\n transform: 'uppercase',\n },\n tag: { size: '11.5px', lineHeight: '1', letterSpacing: '0.04em', family: 'mono' },\n ui: { size: '13px', lineHeight: '1.4' },\n 'ui-sm': { size: '12px', lineHeight: '1.35' },\n 'ui-xs': { size: '11px', lineHeight: '1.3' },\n}\n\nexport const motion = {\n 'duration-fast': '150ms',\n 'duration-base': '200ms',\n 'duration-slow': '300ms',\n 'duration-enter': '600ms',\n 'ease-enter': 'cubic-bezier(0.2, 0.7, 0.2, 1)',\n} as const\n\nexport const layout = {\n max: '1200px',\n gutter: 'clamp(20px, 4vw, 40px)',\n 'section-y': 'clamp(64px, 9vw, 128px)',\n 'section-y-tight': 'clamp(40px, 6vw, 80px)',\n} as const\n\nexport const breakpoints = {\n sm: '640px',\n md: '768px',\n lg: '1024px',\n xl: '1280px',\n '2xl': '1536px',\n /** Site nav collapses here. */\n nav: '1180px',\n wide: '1340px',\n} as const\n\nexport const z = {\n base: 0,\n raised: 10,\n sticky: 50,\n dropdown: 100,\n modal: 200,\n toast: 300,\n} as const\n\nexport const focus = {\n /** Keyboard focus ring on any element. */\n ring: '2px solid var(--signal)',\n 'ring-offset': '3px',\n /** Form controls: soft halo instead of an outline. */\n 'field-ring': '0 0 0 3px var(--signal-soft)',\n} as const\n","import { hexToRgb, oklchToHex, rgbToOklch } from './color.ts'\nimport { type RampStep, rampShape, rampSteps } from './tokens.ts'\n\nexport type Ramp = Record<RampStep, string>\n\n/** Derives the 50–950 ramp for a base colour: hue from the base, lightness from the shape. */\nexport function buildRamp(baseHex: string): Ramp {\n const base = rgbToOklch(hexToRgb(baseHex))\n const out = {} as Ramp\n for (const step of rampSteps) {\n const { l, c } = rampShape[step]\n out[step] = oklchToHex({ l, c: base.c * c, h: base.h })\n }\n return out\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiBO,SAAS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