@doitrix/tokens 1.0.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/dist/css.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ export declare const PREFIX = "doitrix";
2
+ /** `X. */
3
+ export declare const cssVar: (name: string) => string;
4
+ /**
5
+ * Every selector is wrapped in :where() so the tokens carry zero specificity:
6
+ * a consumer's plain `:root { --doitrix-… }` override wins regardless of import order,
7
+ * even when several packages bundle their own copy of this file.
8
+ */
9
+ export declare const toCss: () => string;
10
+ /**
11
+ * Tailwind uses the shadcn vocabulary (bg-card, text-muted-foreground…) so
12
+ * any shadcn-vue component a consumer adds later is themed with no edits.
13
+ * Each name resolves to a techie semantic role.
14
+ */
15
+ export declare const TAILWIND_COLORS: {
16
+ readonly background: "surface";
17
+ readonly foreground: "fg";
18
+ readonly card: "surface-raised";
19
+ readonly 'card-foreground': "fg";
20
+ readonly popover: "surface-raised";
21
+ readonly 'popover-foreground': "fg";
22
+ readonly primary: "accent";
23
+ readonly 'primary-foreground': "fg-on-accent";
24
+ readonly 'primary-hover': "accent-hover";
25
+ readonly 'primary-active': "accent-active";
26
+ readonly 'primary-subtle': "accent-subtle";
27
+ readonly 'primary-ink': "accent-ink";
28
+ readonly secondary: "surface-tonal";
29
+ readonly 'secondary-foreground': "fg";
30
+ readonly muted: "surface-sunken";
31
+ readonly 'muted-foreground': "fg-muted";
32
+ readonly 'subtle-foreground': "fg-subtle";
33
+ readonly accent: "surface-sunken";
34
+ readonly 'accent-foreground': "fg";
35
+ readonly strong: "surface-strong";
36
+ readonly 'strong-foreground': "fg-on-strong";
37
+ readonly brand: "surface-brand";
38
+ readonly 'brand-foreground': "fg-on-brand";
39
+ readonly destructive: "danger";
40
+ readonly 'destructive-foreground': "fg-on-accent";
41
+ readonly 'destructive-subtle': "danger-subtle";
42
+ readonly 'destructive-ink': "danger-ink";
43
+ readonly success: "success-ink";
44
+ readonly 'success-subtle': "success-subtle";
45
+ readonly warning: "warning-ink";
46
+ readonly 'warning-subtle': "warning-subtle";
47
+ readonly border: "line";
48
+ readonly 'border-strong': "line-strong";
49
+ readonly input: "line-strong";
50
+ readonly ring: "focus-ring";
51
+ readonly scrim: "scrim";
52
+ readonly 'scrim-foreground': "fg-on-brand";
53
+ };
54
+ export declare const toTailwind: () => string;
@@ -0,0 +1,5 @@
1
+ export { palette, type PaletteKey } from './palette';
2
+ export { SEMANTIC_COLORS, THEMES, dark, derived, light, themes, type SemanticColor, type Theme, type ThemeName, } from './theme';
3
+ export { blur, container, duration, ease, font, interaction, radius, space, text, weight, zIndex, type DurationName, type EaseToken, type TextRole, type TypeRole, } from './scales';
4
+ export { PREFIX, TAILWIND_COLORS, cssVar, toCss, toTailwind } from './css';
5
+ export { contrastRatio, luminance } from './contrast';
package/dist/index.js ADDED
@@ -0,0 +1,559 @@
1
+ //#region src/palette.ts
2
+ var e = {
3
+ black: "oklch(0 0 0)",
4
+ "neutral-0": "oklch(1 0 0)",
5
+ "neutral-50": "oklch(0.985 0 0)",
6
+ "neutral-100": "oklch(0.97 0 0)",
7
+ "neutral-200": "oklch(0.922 0 0)",
8
+ "neutral-300": "oklch(0.87 0 0)",
9
+ "neutral-400": "oklch(0.708 0 0)",
10
+ "neutral-500": "oklch(0.556 0 0)",
11
+ "neutral-600": "oklch(0.439 0 0)",
12
+ "neutral-700": "oklch(0.371 0 0)",
13
+ "neutral-800": "oklch(0.269 0 0)",
14
+ "neutral-900": "oklch(0.205 0 0)",
15
+ "neutral-950": "oklch(0.145 0 0)",
16
+ "red-50": "oklch(0.969 0.015 17.4)",
17
+ "red-100": "oklch(0.928 0.037 17.8)",
18
+ "red-200": "oklch(0.869 0.07 18.6)",
19
+ "red-300": "oklch(0.779 0.129 20.4)",
20
+ "red-400": "oklch(0.679 0.209 24.7)",
21
+ "red-500": "oklch(0.628 0.258 29.2)",
22
+ "red-600": "oklch(0.5 0.204 29.1)",
23
+ "red-700": "oklch(0.44 0.18 29.2)",
24
+ "red-800": "oklch(0.383 0.157 29.2)",
25
+ "red-900": "oklch(0.298 0.122 29.2)",
26
+ "red-950": "oklch(0.202 0.083 29.2)",
27
+ "green-50": "oklch(0.982 0.018 155.8)",
28
+ "green-400": "oklch(0.792 0.209 151.7)",
29
+ "green-700": "oklch(0.527 0.154 150.1)",
30
+ "green-950": "oklch(0.266 0.065 152.9)",
31
+ "amber-50": "oklch(0.987 0.022 95.3)",
32
+ "amber-400": "oklch(0.828 0.189 84.4)",
33
+ "amber-700": "oklch(0.555 0.163 49)",
34
+ "amber-950": "oklch(0.279 0.077 45.6)"
35
+ }, t = /* @__PURE__ */ "surface.surface-raised.surface-sunken.surface-tonal.surface-strong.fg.fg-muted.fg-subtle.fg-on-accent.fg-on-strong.line.line-strong.accent.accent-hover.accent-active.accent-subtle.accent-ink.success-subtle.success-ink.warning-subtle.warning-ink.danger.danger-subtle.danger-ink.focus-ring.scrim.surface-brand.fg-on-brand".split("."), n = ["light", "dark"], r = {
36
+ surface: "neutral-0",
37
+ "surface-raised": "neutral-0",
38
+ "surface-sunken": "neutral-100",
39
+ "surface-tonal": "neutral-200",
40
+ "surface-strong": "black",
41
+ fg: "neutral-950",
42
+ "fg-muted": "neutral-600",
43
+ "fg-subtle": "neutral-500",
44
+ "fg-on-accent": "neutral-0",
45
+ "fg-on-strong": "neutral-0",
46
+ line: "neutral-200",
47
+ "line-strong": "neutral-300",
48
+ accent: "red-600",
49
+ "accent-hover": "red-700",
50
+ "accent-active": "red-800",
51
+ "accent-subtle": "red-50",
52
+ "accent-ink": "red-700",
53
+ "success-subtle": "green-50",
54
+ "success-ink": "green-700",
55
+ "warning-subtle": "amber-50",
56
+ "warning-ink": "amber-700",
57
+ danger: "red-700",
58
+ "danger-subtle": "red-50",
59
+ "danger-ink": "red-700",
60
+ "focus-ring": "red-500",
61
+ scrim: "black",
62
+ "surface-brand": "black",
63
+ "fg-on-brand": "neutral-50"
64
+ }, i = {
65
+ surface: "neutral-950",
66
+ "surface-raised": "neutral-900",
67
+ "surface-sunken": "black",
68
+ "surface-tonal": "neutral-800",
69
+ "surface-strong": "neutral-100",
70
+ fg: "neutral-50",
71
+ "fg-muted": "neutral-400",
72
+ "fg-subtle": "neutral-400",
73
+ "fg-on-accent": "neutral-0",
74
+ "fg-on-strong": "neutral-950",
75
+ line: "neutral-800",
76
+ "line-strong": "neutral-700",
77
+ accent: "red-600",
78
+ "accent-hover": "red-700",
79
+ "accent-active": "red-800",
80
+ "accent-subtle": "red-950",
81
+ "accent-ink": "red-400",
82
+ "success-subtle": "green-950",
83
+ "success-ink": "green-400",
84
+ "warning-subtle": "amber-950",
85
+ "warning-ink": "amber-400",
86
+ danger: "red-600",
87
+ "danger-subtle": "red-950",
88
+ "danger-ink": "red-400",
89
+ "focus-ring": "red-500",
90
+ scrim: "black",
91
+ "surface-brand": "black",
92
+ "fg-on-brand": "neutral-50"
93
+ }, a = {
94
+ light: r,
95
+ dark: i
96
+ }, o = {
97
+ "color-hover": "color-mix(in oklch, var(--doitrix-color-fg) 8%, transparent)",
98
+ "color-pressed": "color-mix(in oklch, var(--doitrix-color-fg) 12%, transparent)",
99
+ "color-disabled": "color-mix(in oklch, var(--doitrix-color-fg) 12%, transparent)",
100
+ "color-fg-disabled": "color-mix(in oklch, var(--doitrix-color-fg) 38%, transparent)",
101
+ "color-overlay": "color-mix(in oklch, var(--doitrix-color-scrim) 12%, transparent)",
102
+ "color-backdrop": "color-mix(in oklch, var(--doitrix-color-scrim) 48%, transparent)",
103
+ "color-shadow-key": "color-mix(in oklch, var(--doitrix-color-scrim) 30%, transparent)",
104
+ "color-shadow-ambient": "color-mix(in oklch, var(--doitrix-color-scrim) 15%, transparent)",
105
+ "shadow-sm": "0 1px 2px 0 var(--doitrix-color-shadow-key), 0 1px 3px 1px var(--doitrix-color-shadow-ambient)",
106
+ "shadow-md": "0 1px 2px 0 var(--doitrix-color-shadow-key), 0 2px 6px 2px var(--doitrix-color-shadow-ambient)",
107
+ "shadow-lg": "0 1px 3px 0 var(--doitrix-color-shadow-key), 0 4px 8px 3px var(--doitrix-color-shadow-ambient)",
108
+ "shadow-xl": "0 4px 4px 0 var(--doitrix-color-shadow-key), 0 8px 12px 6px var(--doitrix-color-shadow-ambient)",
109
+ "focus-ring": "var(--doitrix-focus-ring-width) solid var(--doitrix-color-focus-ring)"
110
+ }, s = {
111
+ 0: "0",
112
+ 1: "0.25rem",
113
+ 2: "0.5rem",
114
+ 3: "0.75rem",
115
+ 4: "1rem",
116
+ 5: "1.25rem",
117
+ 6: "1.5rem",
118
+ 8: "2rem",
119
+ 10: "2.5rem",
120
+ 12: "3rem",
121
+ 16: "4rem",
122
+ 20: "5rem",
123
+ 24: "6rem"
124
+ }, c = {
125
+ none: "0",
126
+ sm: "0.25rem",
127
+ md: "0.5rem",
128
+ lg: "0.75rem",
129
+ xl: "1rem",
130
+ full: "9999px"
131
+ }, l = {
132
+ sans: "'Google Sans Variable', 'Google Sans', ui-sans-serif, system-ui, sans-serif",
133
+ mono: "'Geist Mono Variable', 'Geist Mono', ui-monospace, monospace",
134
+ display: "'Montserrat Variable', 'Montserrat', 'Google Sans Variable', ui-sans-serif, system-ui, sans-serif"
135
+ }, u = {
136
+ medium: 500,
137
+ semibold: 600,
138
+ bold: 700,
139
+ extrabold: 800
140
+ }, d = {
141
+ "display-lg": {
142
+ size: "3.5625rem",
143
+ lineHeight: "4rem",
144
+ weight: "bold",
145
+ tracking: "-0.015625rem",
146
+ family: "display"
147
+ },
148
+ "display-md": {
149
+ size: "2.8125rem",
150
+ lineHeight: "3.25rem",
151
+ weight: "bold",
152
+ family: "display"
153
+ },
154
+ "display-sm": {
155
+ size: "2.25rem",
156
+ lineHeight: "2.75rem",
157
+ weight: "bold",
158
+ family: "display"
159
+ },
160
+ "headline-lg": {
161
+ size: "2rem",
162
+ lineHeight: "2.5rem",
163
+ weight: "bold",
164
+ family: "display"
165
+ },
166
+ "headline-md": {
167
+ size: "1.75rem",
168
+ lineHeight: "2.25rem",
169
+ weight: "bold",
170
+ family: "display"
171
+ },
172
+ "headline-sm": {
173
+ size: "1.5rem",
174
+ lineHeight: "2rem",
175
+ weight: "bold",
176
+ family: "display"
177
+ },
178
+ "title-lg": {
179
+ size: "1.375rem",
180
+ lineHeight: "1.75rem",
181
+ weight: "semibold"
182
+ },
183
+ "title-md": {
184
+ size: "1rem",
185
+ lineHeight: "1.5rem",
186
+ weight: "semibold",
187
+ tracking: "0.009375rem"
188
+ },
189
+ "title-sm": {
190
+ size: "0.875rem",
191
+ lineHeight: "1.25rem",
192
+ weight: "semibold",
193
+ tracking: "0.00625rem"
194
+ },
195
+ "body-lg": {
196
+ size: "1rem",
197
+ lineHeight: "1.5rem",
198
+ weight: "medium"
199
+ },
200
+ "body-md": {
201
+ size: "0.875rem",
202
+ lineHeight: "1.25rem",
203
+ weight: "medium"
204
+ },
205
+ "body-sm": {
206
+ size: "0.75rem",
207
+ lineHeight: "1rem",
208
+ weight: "medium"
209
+ },
210
+ "label-lg": {
211
+ size: "0.875rem",
212
+ lineHeight: "1.25rem",
213
+ weight: "medium",
214
+ tracking: "0.00625rem"
215
+ },
216
+ "label-md": {
217
+ size: "0.75rem",
218
+ lineHeight: "1rem",
219
+ weight: "medium",
220
+ tracking: "0.03125rem"
221
+ },
222
+ overline: {
223
+ size: "0.75rem",
224
+ lineHeight: "1rem",
225
+ weight: "semibold",
226
+ tracking: "0.16em"
227
+ }
228
+ }, f = {
229
+ press: .12,
230
+ fast: .16,
231
+ micro: .2,
232
+ state: .28,
233
+ morph: .36,
234
+ enter: .44,
235
+ overlay: .56,
236
+ travel: .72
237
+ }, p = {
238
+ standard: {
239
+ css: "cubic-bezier(0.2, 0, 0, 1)",
240
+ gsap: "power4.out"
241
+ },
242
+ out: {
243
+ css: "cubic-bezier(0.33, 1, 0.68, 1)",
244
+ gsap: "power3.out"
245
+ },
246
+ "in-out": {
247
+ css: "cubic-bezier(0.65, 0, 0.35, 1)",
248
+ gsap: "power3.inOut"
249
+ },
250
+ in: {
251
+ css: "cubic-bezier(0.11, 0, 0.5, 0)",
252
+ gsap: "power2.in"
253
+ },
254
+ emphasized: {
255
+ css: "cubic-bezier(0.16, 1, 0.3, 1)",
256
+ gsap: "expo.out"
257
+ }
258
+ }, m = {
259
+ base: 0,
260
+ dropdown: 1e3,
261
+ sticky: 1100,
262
+ overlay: 1200,
263
+ modal: 1300,
264
+ popover: 1400,
265
+ toast: 1500,
266
+ guide: 9999
267
+ }, h = {
268
+ sm: "4px",
269
+ md: "12px",
270
+ lg: "24px"
271
+ }, g = {
272
+ prose: "42rem",
273
+ page: "72rem"
274
+ }, _ = {
275
+ "target-min": "44px",
276
+ "focus-ring-width": "2px",
277
+ "focus-ring-offset": "2px",
278
+ "press-scale": "0.97",
279
+ "border-width": "1px",
280
+ "float-x": "0",
281
+ "float-y": "0",
282
+ "collapsible-height": "auto",
283
+ "collapsible-width": "auto"
284
+ }, v = "doitrix", y = (e) => `var(--${v}-${e})`, b = (e, t, n = "") => [
285
+ `${n}${e} {`,
286
+ ...t.map(([e, t]) => `${n} --${v}-${e}: ${t};`),
287
+ `${n}}`
288
+ ].join("\n"), x = (e) => Object.entries(e), S = () => x(d).flatMap(([e, t]) => [
289
+ [`text-${e}-size`, t.size],
290
+ [`text-${e}-line-height`, t.lineHeight],
291
+ [`text-${e}-weight`, y(`font-weight-${t.weight}`)],
292
+ [`text-${e}-tracking`, t.tracking ?? "0"],
293
+ [`text-${e}-family`, y(`font-${t.family ?? "sans"}`)]
294
+ ]), C = () => [
295
+ ...x(e).map(([e, t]) => [e, t]),
296
+ ...x(s).map(([e, t]) => [`space-${e}`, t]),
297
+ ...x(c).map(([e, t]) => [`radius-${e}`, t]),
298
+ ...x(l).map(([e, t]) => [`font-${e}`, t]),
299
+ ...x(u).map(([e, t]) => [`font-weight-${e}`, t]),
300
+ ...S(),
301
+ ...x(f).map(([e, t]) => [`duration-${e}`, `${Math.round(t * 1e3)}ms`]),
302
+ ...x(p).map(([e, t]) => [`ease-${e}`, t.css]),
303
+ ...x(m).map(([e, t]) => [`z-${e}`, t]),
304
+ ...x(h).map(([e, t]) => [`blur-${e}`, t]),
305
+ ...x(g).map(([e, t]) => [`container-${e}`, t]),
306
+ ...x(_).map(([e, t]) => [e, t])
307
+ ], w = (e) => t.map((t) => [`color-${t}`, y(e[t])]), T = "/* Generated by @doitrix/tokens — edit src/, then run `bun run generate`. */", E = () => [
308
+ T,
309
+ b(":where(:root)", C()),
310
+ b(":where(:root, [data-theme='light'])", w(a.light)),
311
+ b(":where([data-theme='dark'])", w(a.dark)),
312
+ `@media (prefers-color-scheme: dark) {\n${b(":where(:root:not([data-theme='light']))", w(a.dark), " ")}\n}`,
313
+ b(":where(:root, [data-theme])", x(o)),
314
+ ""
315
+ ].join("\n\n"), D = {
316
+ background: "surface",
317
+ foreground: "fg",
318
+ card: "surface-raised",
319
+ "card-foreground": "fg",
320
+ popover: "surface-raised",
321
+ "popover-foreground": "fg",
322
+ primary: "accent",
323
+ "primary-foreground": "fg-on-accent",
324
+ "primary-hover": "accent-hover",
325
+ "primary-active": "accent-active",
326
+ "primary-subtle": "accent-subtle",
327
+ "primary-ink": "accent-ink",
328
+ secondary: "surface-tonal",
329
+ "secondary-foreground": "fg",
330
+ muted: "surface-sunken",
331
+ "muted-foreground": "fg-muted",
332
+ "subtle-foreground": "fg-subtle",
333
+ accent: "surface-sunken",
334
+ "accent-foreground": "fg",
335
+ strong: "surface-strong",
336
+ "strong-foreground": "fg-on-strong",
337
+ brand: "surface-brand",
338
+ "brand-foreground": "fg-on-brand",
339
+ destructive: "danger",
340
+ "destructive-foreground": "fg-on-accent",
341
+ "destructive-subtle": "danger-subtle",
342
+ "destructive-ink": "danger-ink",
343
+ success: "success-ink",
344
+ "success-subtle": "success-subtle",
345
+ warning: "warning-ink",
346
+ "warning-subtle": "warning-subtle",
347
+ border: "line",
348
+ "border-strong": "line-strong",
349
+ input: "line-strong",
350
+ ring: "focus-ring",
351
+ scrim: "scrim",
352
+ "scrim-foreground": "fg-on-brand"
353
+ }, O = (e, t) => ` --${e}: ${t};`, k = {
354
+ "fade-in": [
355
+ "from { opacity: 0; }",
356
+ "fast",
357
+ "out"
358
+ ],
359
+ "fade-out": [
360
+ "to { opacity: 0; }",
361
+ "fast",
362
+ "in"
363
+ ],
364
+ "pop-in": [
365
+ "from { opacity: 0; scale: 0.96; }",
366
+ "fast",
367
+ "out"
368
+ ],
369
+ "pop-out": [
370
+ "to { opacity: 0; scale: 0.96; }",
371
+ "fast",
372
+ "in"
373
+ ],
374
+ "overlay-in": [
375
+ "from { opacity: 0; }",
376
+ "enter",
377
+ "out"
378
+ ],
379
+ "overlay-out": [
380
+ "to { opacity: 0; }",
381
+ "state",
382
+ "in"
383
+ ],
384
+ "dialog-in": [
385
+ "from { opacity: 0; transform: translateY(var(--doitrix-space-4)) scale(0.96); }",
386
+ "enter",
387
+ "emphasized"
388
+ ],
389
+ "dialog-out": [
390
+ "to { opacity: 0; transform: translateY(var(--doitrix-space-2)) scale(0.98); }",
391
+ "micro",
392
+ "in"
393
+ ],
394
+ "float-in": [
395
+ "from { opacity: 0; translate: var(--doitrix-float-x, 0) var(--doitrix-float-y, 0); scale: 0.97; }",
396
+ "morph",
397
+ "emphasized"
398
+ ],
399
+ "float-out": [
400
+ "to { opacity: 0; scale: 0.98; }",
401
+ "fast",
402
+ "in"
403
+ ],
404
+ "slide-in-top": [
405
+ "from { translate: 0 -100%; }",
406
+ "enter",
407
+ "emphasized"
408
+ ],
409
+ "slide-out-top": [
410
+ "to { translate: 0 -100%; }",
411
+ "state",
412
+ "in"
413
+ ],
414
+ "slide-in-bottom": [
415
+ "from { translate: 0 100%; }",
416
+ "enter",
417
+ "emphasized"
418
+ ],
419
+ "slide-out-bottom": [
420
+ "to { translate: 0 100%; }",
421
+ "state",
422
+ "in"
423
+ ],
424
+ "slide-in-left": [
425
+ "from { translate: -100% 0; }",
426
+ "enter",
427
+ "emphasized"
428
+ ],
429
+ "slide-out-left": [
430
+ "to { translate: -100% 0; }",
431
+ "state",
432
+ "in"
433
+ ],
434
+ "slide-in-right": [
435
+ "from { translate: 100% 0; }",
436
+ "enter",
437
+ "emphasized"
438
+ ],
439
+ "slide-out-right": [
440
+ "to { translate: 100% 0; }",
441
+ "state",
442
+ "in"
443
+ ],
444
+ "collapsible-down": [
445
+ "from { height: 0; opacity: 0; } to { height: var(--doitrix-collapsible-height); }",
446
+ "morph",
447
+ "emphasized"
448
+ ],
449
+ "collapsible-up": [
450
+ "from { height: var(--doitrix-collapsible-height); } to { height: 0; opacity: 0; }",
451
+ "state",
452
+ "in"
453
+ ],
454
+ indeterminate: [
455
+ "from { translate: -100% 0; } to { translate: 250% 0; }",
456
+ "overlay",
457
+ "in-out"
458
+ ],
459
+ draw: [
460
+ "from { stroke-dashoffset: 1; }",
461
+ "travel",
462
+ "emphasized"
463
+ ],
464
+ skeleton: [
465
+ "50% { opacity: 0.5; }",
466
+ "travel",
467
+ "in-out"
468
+ ],
469
+ spin: [
470
+ "to { rotate: 360deg; }",
471
+ "travel",
472
+ "standard"
473
+ ]
474
+ }, A = /* @__PURE__ */ new Set([
475
+ "skeleton",
476
+ "spin",
477
+ "indeterminate"
478
+ ]), j = () => [
479
+ T,
480
+ "@import './tokens.css';",
481
+ "@custom-variant dark {\n &:where([data-theme='dark'], [data-theme='dark'] *) {\n @slot;\n }\n @media (prefers-color-scheme: dark) {\n &:where(:root:not([data-theme]) *) {\n @slot;\n }\n }\n}",
482
+ [
483
+ "@theme inline {",
484
+ ...x(D).map(([e, t]) => O(`color-${e}`, y(`color-${t}`))),
485
+ ...x(l).map(([e]) => O(`font-${e}`, y(`font-${e}`))),
486
+ ...x(u).map(([e]) => O(`font-weight-${e}`, y(`font-weight-${e}`))),
487
+ ...x(d).flatMap(([e]) => [
488
+ O(`text-${e}`, y(`text-${e}-size`)),
489
+ O(`text-${e}--line-height`, y(`text-${e}-line-height`)),
490
+ O(`text-${e}--font-weight`, y(`text-${e}-weight`)),
491
+ O(`text-${e}--letter-spacing`, y(`text-${e}-tracking`))
492
+ ]),
493
+ ...x(c).map(([e]) => O(`radius-${e}`, y(`radius-${e}`))),
494
+ ...[
495
+ "sm",
496
+ "md",
497
+ "lg",
498
+ "xl"
499
+ ].map((e) => O(`shadow-${e}`, y(`shadow-${e}`))),
500
+ ...x(p).map(([e]) => O(`ease-${e}`, y(`ease-${e}`))),
501
+ ...x(h).map(([e]) => O(`blur-${e}`, y(`blur-${e}`))),
502
+ ...x(g).map(([e]) => O(`container-${e}`, y(`container-${e}`))),
503
+ ...x(k).map(([e, [, t, n]]) => O(`animate-${e}`, `${v}-${e} ${y(`duration-${t}`)} ${e === "spin" ? "linear" : y(`ease-${n}`)}${A.has(e) ? " infinite" : " both"}`)),
504
+ O("default-transition-duration", y("duration-fast")),
505
+ O("default-transition-timing-function", y("ease-standard")),
506
+ "}"
507
+ ].join("\n"),
508
+ x(k).map(([e, [t]]) => `@keyframes ${v}-${e} {\n ${t}\n}`).join("\n\n"),
509
+ [
510
+ "@layer base {",
511
+ " *, ::before, ::after {",
512
+ ` border-color: ${y("color-line")};`,
513
+ " }",
514
+ " html {",
515
+ ` background-color: ${y("color-surface")};`,
516
+ ` color: ${y("color-fg")};`,
517
+ ` font-family: ${y("font-sans")};`,
518
+ ` font-weight: ${y("font-weight-medium")};`,
519
+ " -webkit-font-smoothing: antialiased;",
520
+ " }",
521
+ " :focus-visible {",
522
+ ` outline: ${y("focus-ring")};`,
523
+ ` outline-offset: ${y("focus-ring-offset")};`,
524
+ " }",
525
+ ` :where(${Object.entries(d).filter(([, e]) => e.family === "display").map(([e]) => `.text-${e}`).join(", ")}) {`,
526
+ ` font-family: ${y("font-display")};`,
527
+ " }",
528
+ " @media (prefers-reduced-motion: reduce) {",
529
+ " *, ::before, ::after {",
530
+ " animation-duration: 0.01ms !important;",
531
+ " animation-iteration-count: 1 !important;",
532
+ " transition-duration: 0.01ms !important;",
533
+ " scroll-behavior: auto !important;",
534
+ " }",
535
+ " }",
536
+ " ::selection {",
537
+ ` background-color: ${y("color-accent-subtle")};`,
538
+ ` color: ${y("color-fg")};`,
539
+ " }",
540
+ "}"
541
+ ].join("\n"),
542
+ ""
543
+ ].join("\n\n"), M = /^oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s*\)$/, N = (e) => e < 0 ? 0 : e > 1 ? 1 : e, P = (e) => {
544
+ let t = M.exec(e.trim());
545
+ if (t === null) return null;
546
+ let [n, r, i] = [
547
+ Number(t[1]),
548
+ Number(t[2]),
549
+ Number(t[3]) * Math.PI / 180
550
+ ], a = r * Math.cos(i), o = r * Math.sin(i), s = (n + .3963377774 * a + .2158037573 * o) ** 3, c = (n - .1055613458 * a - .0638541728 * o) ** 3, l = (n - .0894841775 * a - 1.291485548 * o) ** 3, u = N(4.0767416621 * s - 3.3077115913 * c + .2309699292 * l), d = N(-1.2684380046 * s + 2.6097574011 * c - .3413193965 * l), f = N(-.0041960863 * s - .7034186147 * c + 1.707614701 * l);
551
+ return .2126 * u + .7152 * d + .0722 * f;
552
+ }, F = (e, t) => {
553
+ let n = P(e), r = P(t);
554
+ if (n === null || r === null) return null;
555
+ let [i, a] = n > r ? [n, r] : [r, n];
556
+ return (i + .05) / (a + .05);
557
+ };
558
+ //#endregion
559
+ export { v as PREFIX, t as SEMANTIC_COLORS, D as TAILWIND_COLORS, n as THEMES, h as blur, g as container, F as contrastRatio, y as cssVar, i as dark, o as derived, f as duration, p as ease, l as font, _ as interaction, r as light, P as luminance, e as palette, c as radius, s as space, d as text, a as themes, E as toCss, j as toTailwind, u as weight, m as zIndex };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Tier 1 — primitives. Raw values with no meaning; only the theme maps may
3
+ * reference them. Brand: black, red 500 #FF0000, red 600 #BC0202, red 800 #830000.
4
+ */
5
+ export declare const palette: {
6
+ readonly black: "oklch(0 0 0)";
7
+ readonly 'neutral-0': "oklch(1 0 0)";
8
+ readonly 'neutral-50': "oklch(0.985 0 0)";
9
+ readonly 'neutral-100': "oklch(0.97 0 0)";
10
+ readonly 'neutral-200': "oklch(0.922 0 0)";
11
+ readonly 'neutral-300': "oklch(0.87 0 0)";
12
+ readonly 'neutral-400': "oklch(0.708 0 0)";
13
+ readonly 'neutral-500': "oklch(0.556 0 0)";
14
+ readonly 'neutral-600': "oklch(0.439 0 0)";
15
+ readonly 'neutral-700': "oklch(0.371 0 0)";
16
+ readonly 'neutral-800': "oklch(0.269 0 0)";
17
+ readonly 'neutral-900': "oklch(0.205 0 0)";
18
+ readonly 'neutral-950': "oklch(0.145 0 0)";
19
+ readonly 'red-50': "oklch(0.969 0.015 17.4)";
20
+ readonly 'red-100': "oklch(0.928 0.037 17.8)";
21
+ readonly 'red-200': "oklch(0.869 0.07 18.6)";
22
+ readonly 'red-300': "oklch(0.779 0.129 20.4)";
23
+ readonly 'red-400': "oklch(0.679 0.209 24.7)";
24
+ readonly 'red-500': "oklch(0.628 0.258 29.2)";
25
+ readonly 'red-600': "oklch(0.5 0.204 29.1)";
26
+ readonly 'red-700': "oklch(0.44 0.18 29.2)";
27
+ readonly 'red-800': "oklch(0.383 0.157 29.2)";
28
+ readonly 'red-900': "oklch(0.298 0.122 29.2)";
29
+ readonly 'red-950': "oklch(0.202 0.083 29.2)";
30
+ readonly 'green-50': "oklch(0.982 0.018 155.8)";
31
+ readonly 'green-400': "oklch(0.792 0.209 151.7)";
32
+ readonly 'green-700': "oklch(0.527 0.154 150.1)";
33
+ readonly 'green-950': "oklch(0.266 0.065 152.9)";
34
+ readonly 'amber-50': "oklch(0.987 0.022 95.3)";
35
+ readonly 'amber-400': "oklch(0.828 0.189 84.4)";
36
+ readonly 'amber-700': "oklch(0.555 0.163 49)";
37
+ readonly 'amber-950': "oklch(0.279 0.077 45.6)";
38
+ };
39
+ export type PaletteKey = keyof typeof palette;