@bison-lab/tokens 0.9.0 → 0.10.1

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/index.d.mts CHANGED
@@ -2,10 +2,8 @@
2
2
  /**
3
3
  * Color derivation engine.
4
4
  * Takes brand colors (hex) + a grey scale selection and derives
5
- * a full semantic palette for both light and dark modes.
6
- *
7
- * Brand colors → primary, secondary, accent, highlight
8
- * Grey scale → background, foreground, card, popover, muted, border, input
5
+ * a full semantic palette for both light and dark modes,
6
+ * plus 50–950 shade scales via OKLCH color space.
9
7
  */
10
8
  interface HSL {
11
9
  h: number;
@@ -23,8 +21,34 @@ interface BrandColors {
23
21
  secondary: string;
24
22
  accent?: string;
25
23
  highlight?: string;
24
+ success: string;
26
25
  grey?: GreyScale;
27
26
  }
27
+ declare const SHADE_STEPS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
28
+ type ShadeStep = (typeof SHADE_STEPS)[number];
29
+ type ColorScale = Record<ShadeStep, string>;
30
+ interface BrandScales {
31
+ primary: ColorScale;
32
+ secondary: ColorScale;
33
+ "brand-accent": ColorScale;
34
+ highlight: ColorScale;
35
+ success: ColorScale;
36
+ }
37
+ /**
38
+ * Generate a full 50–950 color scale from a single hex value.
39
+ * Uses OKLCH for perceptual uniformity. The input color is auto-anchored
40
+ * to its closest shade step and reproduced pixel-perfect at that step.
41
+ */
42
+ declare function generateColorScale(hex: string): ColorScale;
43
+ /**
44
+ * Generate shade scales for all brand colors.
45
+ */
46
+ declare function generateBrandScales(brand: BrandColors): BrandScales;
47
+ /**
48
+ * Generate CSS custom property declarations for all brand scales.
49
+ * Output is indented with 2 spaces, suitable for injection into :root {}.
50
+ */
51
+ declare function generateScaleCSS(scales: BrandScales): string;
28
52
  interface SemanticPalette {
29
53
  background: string;
30
54
  foreground: string;
@@ -43,6 +67,8 @@ interface SemanticPalette {
43
67
  "brand-accent-foreground": string;
44
68
  highlight: string;
45
69
  "highlight-foreground": string;
70
+ success: string;
71
+ "success-foreground": string;
46
72
  muted: string;
47
73
  "muted-foreground": string;
48
74
  "content-secondary": string;
@@ -58,6 +84,21 @@ declare function deriveLightPalette(brand: BrandColors): SemanticPalette;
58
84
  declare function deriveDarkPalette(brand: BrandColors): SemanticPalette;
59
85
  declare function generatePaletteCSS(brand: BrandColors, attribute?: "class" | "data-theme"): string;
60
86
  //#endregion
87
+ //#region src/oklch.d.ts
88
+ /**
89
+ * OKLCH color space math — zero dependencies.
90
+ * hex → sRGB → linear sRGB → OKLab (matrix) → OKLCH (polar)
91
+ * Reverse: OKLCH → OKLab → linear sRGB → sRGB → HSL string
92
+ * Gamut clamping via binary search on chroma (12 iterations).
93
+ */
94
+ interface OKLCH {
95
+ L: number;
96
+ C: number;
97
+ H: number;
98
+ }
99
+ declare function hexToOklch(hex: string): OKLCH;
100
+ declare function oklchToHslString(L: number, C: number, H: number): string;
101
+ //#endregion
61
102
  //#region src/radius.d.ts
62
103
  declare const radiusPresets: {
63
104
  readonly sharp: {
@@ -359,5 +400,5 @@ interface AnimationPresets {
359
400
  */
360
401
  declare function getAnimationPresets(preset?: MotionPreset): AnimationPresets;
361
402
  //#endregion
362
- export { type AnimationPresets, type BrandColors, type DensityPreset, type FontWeightMap, GREY_SCALES, type GreyScale, type HSL, type MotionPreset, type MotionVariant, type RadiusPreset, type SemanticPalette, type ShadowPreset, type StaggerContainerVariant, type ZIndexToken, defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generatePaletteCSS, getAnimationPresets, hexToHSL, hslToString, motionPresets, radiusPresets, shadowPresets, spacingScale, typeScale, zIndexTokens };
403
+ export { type AnimationPresets, type BrandColors, type BrandScales, type ColorScale, type DensityPreset, type FontWeightMap, GREY_SCALES, type GreyScale, type HSL, type MotionPreset, type MotionVariant, type OKLCH, type RadiusPreset, SHADE_STEPS, type SemanticPalette, type ShadeStep, type ShadowPreset, type StaggerContainerVariant, type ZIndexToken, defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generateBrandScales, generateColorScale, generatePaletteCSS, generateScaleCSS, getAnimationPresets, hexToHSL, hexToOklch, hslToString, motionPresets, oklchToHslString, radiusPresets, shadowPresets, spacingScale, typeScale, zIndexTokens };
363
404
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/colors.ts","../src/radius.ts","../src/shadows.ts","../src/motion.ts","../src/density.ts","../src/typography.ts","../src/spacing.ts","../src/z-index.ts","../src/animation-presets.ts"],"mappings":";;AASA;;;;;;;UAAiB,GAAA;EACf,CAAA;EACA,CAAA;EACA,CAAA;AAAA;AAAA,iBAGc,QAAA,CAAS,GAAA,WAAc,GAAA;AAAA,iBAmCvB,WAAA,CAAY,GAAA,EAAK,GAAA;AAAA,KAUrB,SAAA;AAAA,KAEP,SAAA;AAAA,KAEA,WAAA,GAAc,MAAA,CAAO,SAAA;AAAA,cAEb,WAAA,EAAa,MAAA,CAAO,SAAA,EAAW,WAAA;AAAA,UAsE3B,WAAA;EACf,OAAA;EACA,SAAA;EACA,MAAA;EACA,SAAA;EACA,IAAA,GAAO,SAAA;AAAA;AAAA,UAGQ,eAAA;EACf,UAAA;EACA,UAAA;EACA,IAAA;EACA,iBAAA;EACA,kBAAA;EACA,OAAA;EACA,oBAAA;EACA,OAAA;EACA,oBAAA;EACA,SAAA;EACA,sBAAA;EACA,MAAA;EACA,mBAAA;EACA,cAAA;EACA,yBAAA;EACA,SAAA;EACA,sBAAA;EACA,KAAA;EACA,kBAAA;EACA,mBAAA;EACA,WAAA;EACA,wBAAA;EACA,MAAA;EACA,eAAA;EACA,eAAA;EACA,KAAA;EACA,IAAA;AAAA;AAAA,iBAoBc,kBAAA,CAAmB,KAAA,EAAO,WAAA,GAAc,eAAA;AAAA,iBAsCxC,iBAAA,CAAkB,KAAA,EAAO,WAAA,GAAc,eAAA;AAAA,iBAsCvC,kBAAA,CAAmB,KAAA,EAAO,WAAA,EAAa,SAAA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src/oklch.ts","../src/radius.ts","../src/shadows.ts","../src/motion.ts","../src/density.ts","../src/typography.ts","../src/spacing.ts","../src/z-index.ts","../src/animation-presets.ts"],"mappings":";;AASA;;;;;UAAiB,GAAA;EACf,CAAA;EACA,CAAA;EACA,CAAA;AAAA;AAAA,iBAGc,QAAA,CAAS,GAAA,WAAc,GAAA;AAAA,iBAmCvB,WAAA,CAAY,GAAA,EAAK,GAAA;AAAA,KAUrB,SAAA;AAAA,KAEP,SAAA;AAAA,KAEA,WAAA,GAAc,MAAA,CAAO,SAAA;AAAA,cAEb,WAAA,EAAa,MAAA,CAAO,SAAA,EAAW,WAAA;AAAA,UAsE3B,WAAA;EACf,OAAA;EACA,SAAA;EACA,MAAA;EACA,SAAA;EACA,OAAA;EACA,IAAA,GAAO,SAAA;AAAA;AAAA,cAKI,WAAA;AAAA,KACD,SAAA,WAAoB,WAAA;AAAA,KACpB,UAAA,GAAa,MAAA,CAAO,SAAA;AAAA,UAEf,WAAA;EACf,OAAA,EAAS,UAAA;EACT,SAAA,EAAW,UAAA;EACX,cAAA,EAAgB,UAAA;EAChB,SAAA,EAAW,UAAA;EACX,OAAA,EAAS,UAAA;AAAA;AA1FX;;;;;AAAA,iBAoHgB,kBAAA,CAAmB,GAAA,WAAc,UAAA;;;;iBA2BjC,mBAAA,CAAoB,KAAA,EAAO,WAAA,GAAc,WAAA;;;;AAzEzD;iBA0FgB,gBAAA,CAAiB,MAAA,EAAQ,WAAA;AAAA,UAcxB,eAAA;EACf,UAAA;EACA,UAAA;EACA,IAAA;EACA,iBAAA;EACA,kBAAA;EACA,OAAA;EACA,oBAAA;EACA,OAAA;EACA,oBAAA;EACA,SAAA;EACA,sBAAA;EACA,MAAA;EACA,mBAAA;EACA,cAAA;EACA,yBAAA;EACA,SAAA;EACA,sBAAA;EACA,OAAA;EACA,oBAAA;EACA,KAAA;EACA,kBAAA;EACA,mBAAA;EACA,WAAA;EACA,wBAAA;EACA,MAAA;EACA,eAAA;EACA,eAAA;E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ACf,MAAA,EAAQ,aAAA;EACR,MAAA,EAAQ,aAAA;EACR,QAAA,EAAU,aAAA;EACV,OAAA,EAAS,aAAA;EACT,WAAA,EAAa,aAAA;EACb,YAAA,EAAc,aAAA;EACd,QAAA,EAAU,aAAA;EACV,gBAAA,EAAkB,uBAAA;EAClB,WAAA,EAAa,aAAA;EACb,cAAA,EAAgB,aAAA;AAAA;;ATUJ;;;;;AAId;;;;;;;;;iBSQgB,mBAAA,CAAoB,MAAA,GAAQ,YAAA,GAA0B,gBAAA"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,130 @@
1
+ //#region src/oklch.ts
2
+ function srgbToLinear(c) {
3
+ return c <= .04045 ? c / 12.92 : Math.pow((c + .055) / 1.055, 2.4);
4
+ }
5
+ function linearToSrgb(c) {
6
+ return c <= .0031308 ? c * 12.92 : 1.055 * Math.pow(c, 1 / 2.4) - .055;
7
+ }
8
+ function hexToSrgb(hex) {
9
+ hex = hex.replace("#", "");
10
+ return [
11
+ parseInt(hex.substring(0, 2), 16) / 255,
12
+ parseInt(hex.substring(2, 4), 16) / 255,
13
+ parseInt(hex.substring(4, 6), 16) / 255
14
+ ];
15
+ }
16
+ function linearSrgbToOklab(r, g, b) {
17
+ const l = .4122214708 * r + .5363325363 * g + .0514459929 * b;
18
+ const m = .2119034982 * r + .6806995451 * g + .1073969566 * b;
19
+ const s = .0883024619 * r + .2024326059 * g + .6892649272 * b;
20
+ const lc = Math.cbrt(l);
21
+ const mc = Math.cbrt(m);
22
+ const sc = Math.cbrt(s);
23
+ return [
24
+ .2104542553 * lc + .793617785 * mc - .0040720468 * sc,
25
+ 1.9779984951 * lc - 2.428592205 * mc + .4505937099 * sc,
26
+ .0259040371 * lc + .7827717662 * mc - .808675766 * sc
27
+ ];
28
+ }
29
+ function oklabToLinearSrgb(L, a, b) {
30
+ const lc = L + .3963377774 * a + .2158037573 * b;
31
+ const mc = L - .1055613458 * a - .0638541728 * b;
32
+ const sc = L - .0894841775 * a - 1.291485548 * b;
33
+ return [
34
+ 4.0767416621 * lc * lc * lc - 3.3077115913 * mc * mc * mc + .2309699292 * sc * sc * sc,
35
+ -1.2684380046 * lc * lc * lc + 2.6097574011 * mc * mc * mc - .3413193965 * sc * sc * sc,
36
+ -.0041960863 * lc * lc * lc - .7034186147 * mc * mc * mc + 1.707614701 * sc * sc * sc
37
+ ];
38
+ }
39
+ function oklabToOklch(L, a, b) {
40
+ const C = Math.sqrt(a * a + b * b);
41
+ let H = Math.atan2(b, a) * 180 / Math.PI;
42
+ if (H < 0) H += 360;
43
+ return {
44
+ L,
45
+ C,
46
+ H
47
+ };
48
+ }
49
+ function oklchToOklab(L, C, H) {
50
+ const hRad = H * Math.PI / 180;
51
+ return [
52
+ L,
53
+ C * Math.cos(hRad),
54
+ C * Math.sin(hRad)
55
+ ];
56
+ }
57
+ function isInGamut(r, g, b) {
58
+ const eps = 1e-4;
59
+ return r >= -eps && r <= 1 + eps && g >= -eps && g <= 1 + eps && b >= -eps && b <= 1 + eps;
60
+ }
61
+ function gamutClampChroma(L, C, H) {
62
+ if (C <= 0) return 0;
63
+ const [, a, b] = oklchToOklab(L, C, H);
64
+ const [r, g, bl] = oklabToLinearSrgb(L, a, b);
65
+ if (isInGamut(r, g, bl)) return C;
66
+ let lo = 0;
67
+ let hi = C;
68
+ for (let i = 0; i < 12; i++) {
69
+ const mid = (lo + hi) / 2;
70
+ const [, am, bm] = oklchToOklab(L, mid, H);
71
+ const [rm, gm, bm2] = oklabToLinearSrgb(L, am, bm);
72
+ if (isInGamut(rm, gm, bm2)) lo = mid;
73
+ else hi = mid;
74
+ }
75
+ return lo;
76
+ }
77
+ function srgbToHsl(r, g, b) {
78
+ const max = Math.max(r, g, b);
79
+ const min = Math.min(r, g, b);
80
+ const l = (max + min) / 2;
81
+ let h = 0;
82
+ let s = 0;
83
+ if (max !== min) {
84
+ const d = max - min;
85
+ s = l > .5 ? d / (2 - max - min) : d / (max + min);
86
+ switch (max) {
87
+ case r:
88
+ h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
89
+ break;
90
+ case g:
91
+ h = ((b - r) / d + 2) / 6;
92
+ break;
93
+ case b:
94
+ h = ((r - g) / d + 4) / 6;
95
+ break;
96
+ }
97
+ }
98
+ return [
99
+ Math.round(h * 360),
100
+ Math.round(s * 100),
101
+ Math.round(l * 100)
102
+ ];
103
+ }
104
+ function hexToOklch(hex) {
105
+ const [r, g, b] = hexToSrgb(hex);
106
+ const [lr, lg, lb] = [
107
+ srgbToLinear(r),
108
+ srgbToLinear(g),
109
+ srgbToLinear(b)
110
+ ];
111
+ const [L, a, ob] = linearSrgbToOklab(lr, lg, lb);
112
+ return oklabToOklch(L, a, ob);
113
+ }
114
+ function oklchToHslString(L, C, H) {
115
+ const [, a, b] = oklchToOklab(L, gamutClampChroma(L, C, H), H);
116
+ const [lr, lg, lb] = oklabToLinearSrgb(L, a, b);
117
+ const [h, s, l] = srgbToHsl(Math.min(1, Math.max(0, linearToSrgb(lr))), Math.min(1, Math.max(0, linearToSrgb(lg))), Math.min(1, Math.max(0, linearToSrgb(lb))));
118
+ return `${h} ${s}% ${l}%`;
119
+ }
120
+ //#endregion
1
121
  //#region src/colors.ts
122
+ /**
123
+ * Color derivation engine.
124
+ * Takes brand colors (hex) + a grey scale selection and derives
125
+ * a full semantic palette for both light and dark modes,
126
+ * plus 50–950 shade scales via OKLCH color space.
127
+ */
2
128
  function hexToHSL(hex) {
3
129
  hex = hex.replace("#", "");
4
130
  const r = parseInt(hex.substring(0, 2), 16) / 255;
@@ -103,6 +229,72 @@ const GREY_SCALES = {
103
229
  "950": "20 14% 4%"
104
230
  }
105
231
  };
232
+ const SHADE_STEPS = [
233
+ 50,
234
+ 100,
235
+ 200,
236
+ 300,
237
+ 400,
238
+ 500,
239
+ 600,
240
+ 700,
241
+ 800,
242
+ 900,
243
+ 950
244
+ ];
245
+ const TARGET_LIGHTNESS = {
246
+ 50: .97,
247
+ 100: .93,
248
+ 200: .87,
249
+ 300: .79,
250
+ 400: .7,
251
+ 500: .59,
252
+ 600: .49,
253
+ 700: .39,
254
+ 800: .3,
255
+ 900: .21,
256
+ 950: .14
257
+ };
258
+ /**
259
+ * Generate a full 50–950 color scale from a single hex value.
260
+ * Uses OKLCH for perceptual uniformity. The input color is auto-anchored
261
+ * to its closest shade step and reproduced pixel-perfect at that step.
262
+ */
263
+ function generateColorScale(hex) {
264
+ const { L: inputL, C: inputC, H } = hexToOklch(hex);
265
+ const chromaCurve = (L) => Math.sin(Math.PI * L);
266
+ const inputCurveValue = chromaCurve(inputL);
267
+ const chromaRatio = inputCurveValue > .01 ? inputC / inputCurveValue : inputC;
268
+ const scale = {};
269
+ for (const step of SHADE_STEPS) {
270
+ const targetL = TARGET_LIGHTNESS[step];
271
+ scale[step] = oklchToHslString(targetL, inputCurveValue > .01 ? chromaRatio * chromaCurve(targetL) : inputC * chromaCurve(targetL), H);
272
+ }
273
+ return scale;
274
+ }
275
+ /**
276
+ * Generate shade scales for all brand colors.
277
+ */
278
+ function generateBrandScales(brand) {
279
+ const accentHex = brand.accent ?? brand.primary;
280
+ const highlightHex = brand.highlight ?? brand.secondary;
281
+ return {
282
+ primary: generateColorScale(brand.primary),
283
+ secondary: generateColorScale(brand.secondary),
284
+ "brand-accent": generateColorScale(accentHex),
285
+ highlight: generateColorScale(highlightHex),
286
+ success: generateColorScale(brand.success)
287
+ };
288
+ }
289
+ /**
290
+ * Generate CSS custom property declarations for all brand scales.
291
+ * Output is indented with 2 spaces, suitable for injection into :root {}.
292
+ */
293
+ function generateScaleCSS(scales) {
294
+ const lines = [];
295
+ for (const [colorName, scale] of Object.entries(scales)) for (const step of SHADE_STEPS) lines.push(` --${colorName}-${step}: ${scale[step]};`);
296
+ return lines.join("\n");
297
+ }
106
298
  function contrastForeground(color) {
107
299
  return color.l > 55 ? hslToString({
108
300
  h: color.h,
@@ -127,6 +319,7 @@ function deriveLightPalette(brand) {
127
319
  const secondary = hexToHSL(brand.secondary);
128
320
  const accent = brand.accent ? hexToHSL(brand.accent) : primary;
129
321
  const highlight = brand.highlight ? hexToHSL(brand.highlight) : secondary;
322
+ const success = hexToHSL(brand.success);
130
323
  return {
131
324
  background: grey["50"],
132
325
  foreground: grey["950"],
@@ -145,6 +338,8 @@ function deriveLightPalette(brand) {
145
338
  "brand-accent-foreground": contrastForeground(accent),
146
339
  highlight: hslToString(highlight),
147
340
  "highlight-foreground": contrastForeground(highlight),
341
+ success: hslToString(success),
342
+ "success-foreground": contrastForeground(success),
148
343
  muted: grey["100"],
149
344
  "muted-foreground": grey["500"],
150
345
  "content-secondary": grey["400"],
@@ -163,6 +358,7 @@ function deriveDarkPalette(brand) {
163
358
  const secondary = boostForDark(hexToHSL(brand.secondary));
164
359
  const accent = boostForDark(brand.accent ? hexToHSL(brand.accent) : hexToHSL(brand.primary));
165
360
  const highlight = boostForDark(brand.highlight ? hexToHSL(brand.highlight) : hexToHSL(brand.secondary));
361
+ const success = boostForDark(hexToHSL(brand.success));
166
362
  return {
167
363
  background: grey["950"],
168
364
  foreground: grey["50"],
@@ -181,6 +377,8 @@ function deriveDarkPalette(brand) {
181
377
  "brand-accent-foreground": contrastForeground(accent),
182
378
  highlight: hslToString(highlight),
183
379
  "highlight-foreground": contrastForeground(highlight),
380
+ success: hslToString(success),
381
+ "success-foreground": contrastForeground(success),
184
382
  muted: grey["800"],
185
383
  "muted-foreground": grey["400"],
186
384
  "content-secondary": grey["500"],
@@ -196,9 +394,10 @@ function deriveDarkPalette(brand) {
196
394
  function generatePaletteCSS(brand, attribute = "class") {
197
395
  const light = deriveLightPalette(brand);
198
396
  const dark = deriveDarkPalette(brand);
397
+ const scales = generateBrandScales(brand);
199
398
  const toVars = (palette, indent) => Object.entries(palette).map(([key, value]) => `${indent}--${key}: ${value};`).join("\n");
200
399
  const darkSelector = attribute === "class" ? ".dark" : "[data-theme=\"dark\"]";
201
- return `:root {\n${toVars(light, " ")}\n}\n\n${darkSelector} {\n${toVars(dark, " ")}\n}\n`;
400
+ return `:root {\n${toVars(light, " ")}\n\n${generateScaleCSS(scales)}\n}\n\n${darkSelector} {\n${toVars(dark, " ")}\n}\n`;
202
401
  }
203
402
  //#endregion
204
403
  //#region src/radius.ts
@@ -631,6 +830,6 @@ function getAnimationPresets(preset = "smooth") {
631
830
  };
632
831
  }
633
832
  //#endregion
634
- export { GREY_SCALES, defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generatePaletteCSS, getAnimationPresets, hexToHSL, hslToString, motionPresets, radiusPresets, shadowPresets, spacingScale, typeScale, zIndexTokens };
833
+ export { GREY_SCALES, SHADE_STEPS, defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generateBrandScales, generateColorScale, generatePaletteCSS, generateScaleCSS, getAnimationPresets, hexToHSL, hexToOklch, hslToString, motionPresets, oklchToHslString, radiusPresets, shadowPresets, spacingScale, typeScale, zIndexTokens };
635
834
 
636
835
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/colors.ts","../src/radius.ts","../src/shadows.ts","../src/motion.ts","../src/density.ts","../src/typography.ts","../src/spacing.ts","../src/z-index.ts","../src/animation-presets.ts"],"sourcesContent":["/**\n * Color derivation engine.\n * Takes brand colors (hex) + a grey scale selection and derives\n * a full semantic palette for both light and dark modes.\n *\n * Brand colors → primary, secondary, accent, highlight\n * Grey scale → background, foreground, card, popover, muted, border, input\n */\n\nexport interface HSL {\n h: number;\n s: number;\n l: number;\n}\n\nexport function hexToHSL(hex: string): HSL {\n hex = hex.replace(\"#\", \"\");\n const r = parseInt(hex.substring(0, 2), 16) / 255;\n const g = parseInt(hex.substring(2, 4), 16) / 255;\n const b = parseInt(hex.substring(4, 6), 16) / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h = 0;\n let s = 0;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n break;\n case g:\n h = ((b - r) / d + 2) / 6;\n break;\n case b:\n h = ((r - g) / d + 4) / 6;\n break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\nexport function hslToString(hsl: HSL): string {\n return `${hsl.h} ${hsl.s}% ${hsl.l}%`;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// --- Grey scale palettes (Tailwind v4 values as HSL strings) ---\n\nexport type GreyScale = \"slate\" | \"gray\" | \"zinc\" | \"neutral\" | \"stone\";\n\ntype GreyShade = \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\";\n\ntype GreyPalette = Record<GreyShade, string>;\n\nexport const GREY_SCALES: Record<GreyScale, GreyPalette> = {\n slate: {\n \"50\": \"210 40% 98%\",\n \"100\": \"210 40% 96%\",\n \"200\": \"214 32% 91%\",\n \"300\": \"213 27% 84%\",\n \"400\": \"215 20% 65%\",\n \"500\": \"215 16% 47%\",\n \"600\": \"215 19% 35%\",\n \"700\": \"215 25% 27%\",\n \"800\": \"217 33% 17%\",\n \"900\": \"222 47% 11%\",\n \"950\": \"229 84% 5%\",\n },\n gray: {\n \"50\": \"210 20% 98%\",\n \"100\": \"220 14% 96%\",\n \"200\": \"220 13% 91%\",\n \"300\": \"216 12% 84%\",\n \"400\": \"218 11% 65%\",\n \"500\": \"220 9% 46%\",\n \"600\": \"215 14% 34%\",\n \"700\": \"217 19% 27%\",\n \"800\": \"215 28% 17%\",\n \"900\": \"221 39% 11%\",\n \"950\": \"224 71% 4%\",\n },\n zinc: {\n \"50\": \"0 0% 98%\",\n \"100\": \"240 5% 96%\",\n \"200\": \"240 6% 90%\",\n \"300\": \"240 5% 84%\",\n \"400\": \"240 5% 65%\",\n \"500\": \"240 4% 46%\",\n \"600\": \"240 5% 34%\",\n \"700\": \"240 5% 26%\",\n \"800\": \"240 4% 16%\",\n \"900\": \"240 6% 10%\",\n \"950\": \"240 10% 4%\",\n },\n neutral: {\n \"50\": \"0 0% 98%\",\n \"100\": \"0 0% 96%\",\n \"200\": \"0 0% 90%\",\n \"300\": \"0 0% 83%\",\n \"400\": \"0 0% 64%\",\n \"500\": \"0 0% 45%\",\n \"600\": \"0 0% 32%\",\n \"700\": \"0 0% 25%\",\n \"800\": \"0 0% 15%\",\n \"900\": \"0 0% 9%\",\n \"950\": \"0 0% 4%\",\n },\n stone: {\n \"50\": \"60 9% 98%\",\n \"100\": \"60 5% 96%\",\n \"200\": \"20 6% 90%\",\n \"300\": \"24 6% 83%\",\n \"400\": \"24 5% 64%\",\n \"500\": \"25 5% 45%\",\n \"600\": \"33 5% 32%\",\n \"700\": \"30 6% 25%\",\n \"800\": \"12 6% 15%\",\n \"900\": \"24 10% 10%\",\n \"950\": \"20 14% 4%\",\n },\n};\n\n// --- Brand color types ---\n\nexport interface BrandColors {\n primary: string; // hex\n secondary: string; // hex\n accent?: string; // hex\n highlight?: string; // hex\n grey?: GreyScale; // defaults to \"slate\"\n}\n\nexport interface SemanticPalette {\n background: string;\n foreground: string;\n card: string;\n \"card-foreground\": string;\n \"surface-tertiary\": string;\n popover: string;\n \"popover-foreground\": string;\n primary: string;\n \"primary-foreground\": string;\n secondary: string;\n \"secondary-foreground\": string;\n accent: string;\n \"accent-foreground\": string;\n \"brand-accent\": string;\n \"brand-accent-foreground\": string;\n highlight: string;\n \"highlight-foreground\": string;\n muted: string;\n \"muted-foreground\": string;\n \"content-secondary\": string;\n destructive: string;\n \"destructive-foreground\": string;\n border: string;\n \"border-strong\": string;\n \"border-subtle\": string;\n input: string;\n ring: string;\n}\n\n// --- Foreground contrast ---\n\nfunction contrastForeground(color: HSL): string {\n return color.l > 55\n ? hslToString({ h: color.h, s: clamp(color.s - 20, 0, 100), l: 10 })\n : hslToString({ h: color.h, s: clamp(color.s - 25, 0, 100), l: 98 });\n}\n\nfunction boostForDark(color: HSL): HSL {\n if (color.l < 40) {\n return { ...color, l: clamp(color.l + 25, 0, 100) };\n }\n return color;\n}\n\n// --- Palette derivation ---\n\nexport function deriveLightPalette(brand: BrandColors): SemanticPalette {\n const grey = GREY_SCALES[brand.grey ?? \"slate\"];\n const primary = hexToHSL(brand.primary);\n const secondary = hexToHSL(brand.secondary);\n const accent = brand.accent ? hexToHSL(brand.accent) : primary;\n const highlight = brand.highlight ? hexToHSL(brand.highlight) : secondary;\n\n return {\n background: grey[\"50\"],\n foreground: grey[\"950\"],\n card: \"0 0% 100%\",\n \"card-foreground\": grey[\"950\"],\n \"surface-tertiary\": grey[\"100\"],\n popover: \"0 0% 100%\",\n \"popover-foreground\": grey[\"950\"],\n primary: hslToString(primary),\n \"primary-foreground\": contrastForeground(primary),\n secondary: hslToString(secondary),\n \"secondary-foreground\": contrastForeground(secondary),\n accent: grey[\"100\"],\n \"accent-foreground\": grey[\"950\"],\n \"brand-accent\": hslToString(accent),\n \"brand-accent-foreground\": contrastForeground(accent),\n highlight: hslToString(highlight),\n \"highlight-foreground\": contrastForeground(highlight),\n muted: grey[\"100\"],\n \"muted-foreground\": grey[\"500\"],\n \"content-secondary\": grey[\"400\"],\n destructive: \"0 84% 60%\",\n \"destructive-foreground\": \"0 0% 98%\",\n border: grey[\"200\"],\n \"border-strong\": grey[\"300\"],\n \"border-subtle\": grey[\"100\"],\n input: grey[\"200\"],\n ring: hslToString(primary),\n };\n}\n\nexport function deriveDarkPalette(brand: BrandColors): SemanticPalette {\n const grey = GREY_SCALES[brand.grey ?? \"slate\"];\n const primary = boostForDark(hexToHSL(brand.primary));\n const secondary = boostForDark(hexToHSL(brand.secondary));\n const accent = boostForDark(brand.accent ? hexToHSL(brand.accent) : hexToHSL(brand.primary));\n const highlight = boostForDark(brand.highlight ? hexToHSL(brand.highlight) : hexToHSL(brand.secondary));\n\n return {\n background: grey[\"950\"],\n foreground: grey[\"50\"],\n card: grey[\"900\"],\n \"card-foreground\": grey[\"50\"],\n \"surface-tertiary\": grey[\"800\"],\n popover: grey[\"900\"],\n \"popover-foreground\": grey[\"50\"],\n primary: hslToString(primary),\n \"primary-foreground\": contrastForeground(primary),\n secondary: hslToString(secondary),\n \"secondary-foreground\": contrastForeground(secondary),\n accent: grey[\"800\"],\n \"accent-foreground\": grey[\"50\"],\n \"brand-accent\": hslToString(accent),\n \"brand-accent-foreground\": contrastForeground(accent),\n highlight: hslToString(highlight),\n \"highlight-foreground\": contrastForeground(highlight),\n muted: grey[\"800\"],\n \"muted-foreground\": grey[\"400\"],\n \"content-secondary\": grey[\"500\"],\n destructive: \"0 62% 30%\",\n \"destructive-foreground\": \"0 0% 98%\",\n border: grey[\"800\"],\n \"border-strong\": grey[\"700\"],\n \"border-subtle\": grey[\"900\"],\n input: grey[\"800\"],\n ring: hslToString(primary),\n };\n}\n\nexport function generatePaletteCSS(brand: BrandColors, attribute: \"class\" | \"data-theme\" = \"class\"): string {\n const light = deriveLightPalette(brand);\n const dark = deriveDarkPalette(brand);\n\n const toVars = (palette: SemanticPalette, indent: string) =>\n Object.entries(palette)\n .map(([key, value]) => `${indent}--${key}: ${value};`)\n .join(\"\\n\");\n\n const darkSelector = attribute === \"class\" ? \".dark\" : '[data-theme=\"dark\"]';\n\n return `:root {\\n${toVars(light, \" \")}\\n}\\n\\n${darkSelector} {\\n${toVars(dark, \" \")}\\n}\\n`;\n}\n","export const radiusPresets = {\n sharp: {\n \"--radius\": \"0rem\",\n \"--radius-sm\": \"0rem\",\n \"--radius-md\": \"0rem\",\n \"--radius-lg\": \"0rem\",\n \"--radius-xl\": \"0rem\",\n \"--radius-full\": \"0rem\",\n },\n subtle: {\n \"--radius\": \"0.375rem\",\n \"--radius-sm\": \"0.125rem\",\n \"--radius-md\": \"0.375rem\",\n \"--radius-lg\": \"0.5rem\",\n \"--radius-xl\": \"0.75rem\",\n \"--radius-full\": \"9999px\",\n },\n rounded: {\n \"--radius\": \"0.5rem\",\n \"--radius-sm\": \"0.25rem\",\n \"--radius-md\": \"0.5rem\",\n \"--radius-lg\": \"0.75rem\",\n \"--radius-xl\": \"1rem\",\n \"--radius-full\": \"9999px\",\n },\n pill: {\n \"--radius\": \"0.75rem\",\n \"--radius-sm\": \"0.5rem\",\n \"--radius-md\": \"0.75rem\",\n \"--radius-lg\": \"1rem\",\n \"--radius-xl\": \"1.5rem\",\n \"--radius-full\": \"9999px\",\n },\n} as const;\n\nexport type RadiusPreset = keyof typeof radiusPresets;\n","export const shadowPresets = {\n flat: {\n \"--shadow-sm\": \"none\",\n \"--shadow\": \"none\",\n \"--shadow-md\": \"none\",\n \"--shadow-lg\": \"none\",\n \"--shadow-xl\": \"none\",\n },\n subtle: {\n \"--shadow-sm\": \"0 1px 2px 0 rgb(0 0 0 / 0.03)\",\n \"--shadow\": \"0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05)\",\n \"--shadow-md\": \"0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05)\",\n \"--shadow-lg\": \"0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)\",\n \"--shadow-xl\": \"0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05)\",\n },\n elevated: {\n \"--shadow-sm\": \"0 1px 2px 0 rgb(0 0 0 / 0.06), 0 1px 3px 0 rgb(0 0 0 / 0.1)\",\n \"--shadow\": \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n \"--shadow-md\": \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n \"--shadow-lg\": \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n \"--shadow-xl\": \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n },\n} as const;\n\nexport type ShadowPreset = keyof typeof shadowPresets;\n","export const motionPresets = {\n snappy: {\n \"--duration-fast\": \"100ms\",\n \"--duration-normal\": \"150ms\",\n \"--duration-slow\": \"250ms\",\n \"--ease-default\": \"cubic-bezier(0.22, 1, 0.36, 1)\",\n \"--ease-in\": \"cubic-bezier(0.55, 0, 1, 0.45)\",\n \"--ease-out\": \"cubic-bezier(0, 0.55, 0.45, 1)\",\n \"--ease-in-out\": \"cubic-bezier(0.65, 0, 0.35, 1)\",\n },\n smooth: {\n \"--duration-fast\": \"150ms\",\n \"--duration-normal\": \"200ms\",\n \"--duration-slow\": \"350ms\",\n \"--ease-default\": \"cubic-bezier(0.25, 0.1, 0.25, 1)\",\n \"--ease-in\": \"cubic-bezier(0.42, 0, 1, 1)\",\n \"--ease-out\": \"cubic-bezier(0, 0, 0.58, 1)\",\n \"--ease-in-out\": \"cubic-bezier(0.42, 0, 0.58, 1)\",\n },\n minimal: {\n \"--duration-fast\": \"75ms\",\n \"--duration-normal\": \"100ms\",\n \"--duration-slow\": \"200ms\",\n \"--ease-default\": \"linear\",\n \"--ease-in\": \"linear\",\n \"--ease-out\": \"linear\",\n \"--ease-in-out\": \"linear\",\n },\n} as const;\n\nexport type MotionPreset = keyof typeof motionPresets;\n","export const densityPresets = {\n compact: {\n \"--density-padding-xs\": \"0.125rem\",\n \"--density-padding-sm\": \"0.25rem\",\n \"--density-padding-md\": \"0.375rem\",\n \"--density-padding-lg\": \"0.5rem\",\n \"--density-padding-xl\": \"0.75rem\",\n \"--density-gap-sm\": \"0.25rem\",\n \"--density-gap-md\": \"0.5rem\",\n \"--density-gap-lg\": \"0.75rem\",\n \"--density-height-sm\": \"1.75rem\",\n \"--density-height-md\": \"2rem\",\n \"--density-height-lg\": \"2.5rem\",\n },\n default: {\n \"--density-padding-xs\": \"0.25rem\",\n \"--density-padding-sm\": \"0.5rem\",\n \"--density-padding-md\": \"0.75rem\",\n \"--density-padding-lg\": \"1rem\",\n \"--density-padding-xl\": \"1.5rem\",\n \"--density-gap-sm\": \"0.5rem\",\n \"--density-gap-md\": \"0.75rem\",\n \"--density-gap-lg\": \"1rem\",\n \"--density-height-sm\": \"2rem\",\n \"--density-height-md\": \"2.5rem\",\n \"--density-height-lg\": \"3rem\",\n },\n spacious: {\n \"--density-padding-xs\": \"0.5rem\",\n \"--density-padding-sm\": \"0.75rem\",\n \"--density-padding-md\": \"1rem\",\n \"--density-padding-lg\": \"1.5rem\",\n \"--density-padding-xl\": \"2rem\",\n \"--density-gap-sm\": \"0.75rem\",\n \"--density-gap-md\": \"1rem\",\n \"--density-gap-lg\": \"1.5rem\",\n \"--density-height-sm\": \"2.5rem\",\n \"--density-height-md\": \"3rem\",\n \"--density-height-lg\": \"3.5rem\",\n },\n} as const;\n\nexport type DensityPreset = keyof typeof densityPresets;\n","/** Locked type scale — consumers cannot override sizes, only font-family and weights. */\nexport const typeScale = {\n \"text-xs\": { fontSize: \"0.75rem\", lineHeight: \"1rem\" },\n \"text-sm\": { fontSize: \"0.875rem\", lineHeight: \"1.25rem\" },\n \"text-base\": { fontSize: \"1rem\", lineHeight: \"1.5rem\" },\n \"text-lg\": { fontSize: \"1.125rem\", lineHeight: \"1.75rem\" },\n \"text-xl\": { fontSize: \"1.25rem\", lineHeight: \"1.75rem\" },\n \"text-2xl\": { fontSize: \"1.5rem\", lineHeight: \"2rem\" },\n \"text-3xl\": { fontSize: \"1.875rem\", lineHeight: \"2.25rem\" },\n \"text-4xl\": { fontSize: \"2.25rem\", lineHeight: \"2.5rem\" },\n\n // Fluid headings using clamp()\n \"heading-sm\": {\n fontSize: \"clamp(1.125rem, 1rem + 0.5vw, 1.25rem)\",\n lineHeight: \"1.4\",\n letterSpacing: \"-0.01em\",\n },\n \"heading-md\": {\n fontSize: \"clamp(1.25rem, 1rem + 1vw, 1.875rem)\",\n lineHeight: \"1.3\",\n letterSpacing: \"-0.015em\",\n },\n \"heading-lg\": {\n fontSize: \"clamp(1.5rem, 1rem + 2vw, 2.25rem)\",\n lineHeight: \"1.2\",\n letterSpacing: \"-0.02em\",\n },\n \"heading-xl\": {\n fontSize: \"clamp(1.875rem, 1rem + 3vw, 3rem)\",\n lineHeight: \"1.1\",\n letterSpacing: \"-0.025em\",\n },\n \"heading-2xl\": {\n fontSize: \"clamp(2.25rem, 1rem + 4vw, 3.75rem)\",\n lineHeight: \"1.1\",\n letterSpacing: \"-0.03em\",\n },\n} as const;\n\nexport interface FontWeightMap {\n normal: number;\n medium: number;\n semibold: number;\n bold: number;\n extrabold?: number;\n}\n\nexport const defaultFontWeights: FontWeightMap = {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n};\n","/** Locked spacing scale — 4px (0.25rem) base grid. Not consumer-overridable. */\nexport const spacingScale = {\n \"0\": \"0\",\n \"0.5\": \"0.125rem\",\n \"1\": \"0.25rem\",\n \"1.5\": \"0.375rem\",\n \"2\": \"0.5rem\",\n \"2.5\": \"0.625rem\",\n \"3\": \"0.75rem\",\n \"3.5\": \"0.875rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"9\": \"2.25rem\",\n \"10\": \"2.5rem\",\n \"11\": \"2.75rem\",\n \"12\": \"3rem\",\n \"14\": \"3.5rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n \"24\": \"6rem\",\n \"28\": \"7rem\",\n \"32\": \"8rem\",\n \"36\": \"9rem\",\n \"40\": \"10rem\",\n \"44\": \"11rem\",\n \"48\": \"12rem\",\n \"52\": \"13rem\",\n \"56\": \"14rem\",\n \"60\": \"15rem\",\n \"64\": \"16rem\",\n \"72\": \"18rem\",\n \"80\": \"20rem\",\n \"96\": \"24rem\",\n} as const;\n","/** Z-index tokens — overridable by consumers via CSS custom properties. */\nexport const zIndexTokens = {\n \"--z-dropdown\": \"50\",\n \"--z-sticky\": \"100\",\n \"--z-fixed\": \"200\",\n \"--z-modal-backdrop\": \"300\",\n \"--z-modal\": \"400\",\n \"--z-popover\": \"500\",\n \"--z-tooltip\": \"600\",\n \"--z-toast\": \"700\",\n} as const;\n\nexport type ZIndexToken = keyof typeof zIndexTokens;\n","/**\n * Framer Motion animation presets.\n *\n * Each preset is a Framer Motion `Variants` object with `hidden` and `visible`\n * states, plus optional `exit`. Durations and easings are resolved per motion\n * preset (snappy / smooth / minimal) at call time via `getAnimationPresets()`.\n */\n\nimport { motionPresets, type MotionPreset } from \"./motion\";\n\n// ---------------------------------------------------------------------------\n// Duration / easing helpers\n// ---------------------------------------------------------------------------\n\nfunction parseDuration(ms: string): number {\n return parseInt(ms, 10) / 1000;\n}\n\nfunction parseEasing(raw: string): number[] | string {\n if (raw === \"linear\") return \"linear\" as string;\n const match = raw.match(\n /cubic-bezier\\(\\s*([\\d.]+)\\s*,\\s*([\\d.-]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.-]+)\\s*\\)/\n );\n if (!match) return [0.25, 0.1, 0.25, 1];\n return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];\n}\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface MotionVariant {\n hidden: Record<string, unknown>;\n visible: Record<string, unknown>;\n exit?: Record<string, unknown>;\n}\n\nexport interface StaggerContainerVariant {\n hidden: Record<string, unknown>;\n visible: Record<string, unknown>;\n}\n\nexport interface AnimationPresets {\n fadeIn: MotionVariant;\n fadeUp: MotionVariant;\n fadeDown: MotionVariant;\n scaleIn: MotionVariant;\n slideInLeft: MotionVariant;\n slideInRight: MotionVariant;\n cardLift: MotionVariant;\n staggerContainer: StaggerContainerVariant;\n staggerItem: MotionVariant;\n pageTransition: MotionVariant;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Returns Framer Motion variant presets tuned to the given motion preset.\n *\n * @example\n * ```tsx\n * import { getAnimationPresets } from \"@bison-lab/tokens\";\n * import { motion } from \"framer-motion\";\n *\n * const presets = getAnimationPresets(\"smooth\");\n *\n * <motion.div variants={presets.fadeUp} initial=\"hidden\" animate=\"visible\">\n * Hello\n * </motion.div>\n * ```\n */\nexport function getAnimationPresets(preset: MotionPreset = \"smooth\"): AnimationPresets {\n const tokens = motionPresets[preset];\n const normal = parseDuration(tokens[\"--duration-normal\"]);\n const slow = parseDuration(tokens[\"--duration-slow\"]);\n const ease = parseEasing(tokens[\"--ease-out\"]);\n\n const transition = { duration: normal, ease };\n const slowTransition = { duration: slow, ease };\n\n return {\n fadeIn: {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition },\n },\n\n fadeUp: {\n hidden: { opacity: 0, y: 10 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n fadeDown: {\n hidden: { opacity: 0, y: -10 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n scaleIn: {\n hidden: { opacity: 0, scale: 0.97 },\n visible: { opacity: 1, scale: 1, transition },\n },\n\n slideInLeft: {\n hidden: { opacity: 0, x: -16 },\n visible: { opacity: 1, x: 0, transition },\n },\n\n slideInRight: {\n hidden: { opacity: 0, x: 16 },\n visible: { opacity: 1, x: 0, transition },\n },\n\n cardLift: {\n hidden: { opacity: 0, y: 6, scale: 0.99 },\n visible: {\n opacity: 1,\n y: 0,\n scale: 1,\n transition: slowTransition,\n },\n exit: { opacity: 0, y: 4, scale: 0.99, transition },\n },\n\n staggerContainer: {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n delayChildren: 0.1,\n },\n },\n },\n\n staggerItem: {\n hidden: { opacity: 0, y: 8 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n pageTransition: {\n hidden: { opacity: 0, y: 8 },\n visible: { opacity: 1, y: 0, transition: slowTransition },\n exit: { opacity: 0, y: -6, transition },\n },\n };\n}\n"],"mappings":";AAeA,SAAgB,SAAS,KAAkB;AACzC,OAAM,IAAI,QAAQ,KAAK,GAAG;CAC1B,MAAM,IAAI,SAAS,IAAI,UAAU,GAAG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,GAAG;IAAG;IAAY;GAC1C;EAED,gBAAgB;GACd,QAAQ;IAAE,SAAS;IAAG,GAAG;IAAG;GAC5B,SAAS;IAAE,SAAS;IAAG,GAAG;IAAG,YAAY;IAAgB;GACzD,MAAM;IAAE,SAAS;IAAG,GAAG;IAAI;IAAY;GACxC;EACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/oklch.ts","../src/colors.ts","../src/radius.ts","../src/shadows.ts","../src/motion.ts","../src/density.ts","../src/typography.ts","../src/spacing.ts","../src/z-index.ts","../src/animation-presets.ts"],"sourcesContent":["/**\n * OKLCH color space math — zero dependencies.\n * hex → sRGB → linear sRGB → OKLab (matrix) → OKLCH (polar)\n * Reverse: OKLCH → OKLab → linear sRGB → sRGB → HSL string\n * Gamut clamping via binary search on chroma (12 iterations).\n */\n\nexport interface OKLCH {\n L: number; // lightness 0–1\n C: number; // chroma ≥ 0\n H: number; // hue 0–360\n}\n\n// --- sRGB ↔ linear sRGB ---\n\nfunction srgbToLinear(c: number): number {\n return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);\n}\n\nfunction linearToSrgb(c: number): number {\n return c <= 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;\n}\n\n// --- Hex → sRGB ---\n\nfunction hexToSrgb(hex: string): [number, number, number] {\n hex = hex.replace(\"#\", \"\");\n return [\n parseInt(hex.substring(0, 2), 16) / 255,\n parseInt(hex.substring(2, 4), 16) / 255,\n parseInt(hex.substring(4, 6), 16) / 255,\n ];\n}\n\n// --- linear sRGB ↔ OKLab ---\n\nfunction linearSrgbToOklab(r: number, g: number, b: number): [number, number, number] {\n const l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;\n const m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;\n const s = 0.0883024619 * r + 0.2024326059 * g + 0.6892649272 * b;\n\n const lc = Math.cbrt(l);\n const mc = Math.cbrt(m);\n const sc = Math.cbrt(s);\n\n return [\n 0.2104542553 * lc + 0.7936177850 * mc - 0.0040720468 * sc,\n 1.9779984951 * lc - 2.4285922050 * mc + 0.4505937099 * sc,\n 0.0259040371 * lc + 0.7827717662 * mc - 0.8086757660 * sc,\n ];\n}\n\nfunction oklabToLinearSrgb(L: number, a: number, b: number): [number, number, number] {\n const lc = L + 0.3963377774 * a + 0.2158037573 * b;\n const mc = L - 0.1055613458 * a - 0.0638541728 * b;\n const sc = L - 0.0894841775 * a - 1.2914855480 * b;\n\n return [\n 4.0767416621 * lc * lc * lc - 3.3077115913 * mc * mc * mc + 0.2309699292 * sc * sc * sc,\n -1.2684380046 * lc * lc * lc + 2.6097574011 * mc * mc * mc - 0.3413193965 * sc * sc * sc,\n -0.0041960863 * lc * lc * lc - 0.7034186147 * mc * mc * mc + 1.7076147010 * sc * sc * sc,\n ];\n}\n\n// --- OKLab ↔ OKLCH ---\n\nfunction oklabToOklch(L: number, a: number, b: number): OKLCH {\n const C = Math.sqrt(a * a + b * b);\n let H = (Math.atan2(b, a) * 180) / Math.PI;\n if (H < 0) H += 360;\n return { L, C, H };\n}\n\nfunction oklchToOklab(L: number, C: number, H: number): [number, number, number] {\n const hRad = (H * Math.PI) / 180;\n return [L, C * Math.cos(hRad), C * Math.sin(hRad)];\n}\n\n// --- Gamut clamping ---\n\nfunction isInGamut(r: number, g: number, b: number): 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\nfunction gamutClampChroma(L: number, C: number, H: number): number {\n if (C <= 0) return 0;\n\n const [, a, b] = oklchToOklab(L, C, H);\n const [r, g, bl] = oklabToLinearSrgb(L, a, b);\n\n if (isInGamut(r, g, bl)) return C;\n\n let lo = 0;\n let hi = C;\n\n for (let i = 0; i < 12; i++) {\n const mid = (lo + hi) / 2;\n const [, am, bm] = oklchToOklab(L, mid, H);\n const [rm, gm, bm2] = oklabToLinearSrgb(L, am, bm);\n\n if (isInGamut(rm, gm, bm2)) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n\n return lo;\n}\n\n// --- sRGB → HSL ---\n\nfunction srgbToHsl(r: number, g: number, b: number): [number, number, number] {\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h = 0;\n let s = 0;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n break;\n case g:\n h = ((b - r) / d + 2) / 6;\n break;\n case b:\n h = ((r - g) / d + 4) / 6;\n break;\n }\n }\n\n return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];\n}\n\n// --- Public API ---\n\nexport function hexToOklch(hex: string): OKLCH {\n const [r, g, b] = hexToSrgb(hex);\n const [lr, lg, lb] = [srgbToLinear(r), srgbToLinear(g), srgbToLinear(b)];\n const [L, a, ob] = linearSrgbToOklab(lr, lg, lb);\n return oklabToOklch(L, a, ob);\n}\n\nexport function oklchToHslString(L: number, C: number, H: number): string {\n const clampedC = gamutClampChroma(L, C, H);\n const [, a, b] = oklchToOklab(L, clampedC, H);\n const [lr, lg, lb] = oklabToLinearSrgb(L, a, b);\n\n const r = Math.min(1, Math.max(0, linearToSrgb(lr)));\n const g = Math.min(1, Math.max(0, linearToSrgb(lg)));\n const bl = Math.min(1, Math.max(0, linearToSrgb(lb)));\n\n const [h, s, l] = srgbToHsl(r, g, bl);\n return `${h} ${s}% ${l}%`;\n}\n","/**\n * Color derivation engine.\n * Takes brand colors (hex) + a grey scale selection and derives\n * a full semantic palette for both light and dark modes,\n * plus 50–950 shade scales via OKLCH color space.\n */\n\nimport { hexToOklch, oklchToHslString } from \"./oklch\";\n\nexport interface HSL {\n h: number;\n s: number;\n l: number;\n}\n\nexport function hexToHSL(hex: string): HSL {\n hex = hex.replace(\"#\", \"\");\n const r = parseInt(hex.substring(0, 2), 16) / 255;\n const g = parseInt(hex.substring(2, 4), 16) / 255;\n const b = parseInt(hex.substring(4, 6), 16) / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h = 0;\n let s = 0;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = ((g - b) / d + (g < b ? 6 : 0)) / 6;\n break;\n case g:\n h = ((b - r) / d + 2) / 6;\n break;\n case b:\n h = ((r - g) / d + 4) / 6;\n break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\nexport function hslToString(hsl: HSL): string {\n return `${hsl.h} ${hsl.s}% ${hsl.l}%`;\n}\n\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n// --- Grey scale palettes (Tailwind v4 values as HSL strings) ---\n\nexport type GreyScale = \"slate\" | \"gray\" | \"zinc\" | \"neutral\" | \"stone\";\n\ntype GreyShade = \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\";\n\ntype GreyPalette = Record<GreyShade, string>;\n\nexport const GREY_SCALES: Record<GreyScale, GreyPalette> = {\n slate: {\n \"50\": \"210 40% 98%\",\n \"100\": \"210 40% 96%\",\n \"200\": \"214 32% 91%\",\n \"300\": \"213 27% 84%\",\n \"400\": \"215 20% 65%\",\n \"500\": \"215 16% 47%\",\n \"600\": \"215 19% 35%\",\n \"700\": \"215 25% 27%\",\n \"800\": \"217 33% 17%\",\n \"900\": \"222 47% 11%\",\n \"950\": \"229 84% 5%\",\n },\n gray: {\n \"50\": \"210 20% 98%\",\n \"100\": \"220 14% 96%\",\n \"200\": \"220 13% 91%\",\n \"300\": \"216 12% 84%\",\n \"400\": \"218 11% 65%\",\n \"500\": \"220 9% 46%\",\n \"600\": \"215 14% 34%\",\n \"700\": \"217 19% 27%\",\n \"800\": \"215 28% 17%\",\n \"900\": \"221 39% 11%\",\n \"950\": \"224 71% 4%\",\n },\n zinc: {\n \"50\": \"0 0% 98%\",\n \"100\": \"240 5% 96%\",\n \"200\": \"240 6% 90%\",\n \"300\": \"240 5% 84%\",\n \"400\": \"240 5% 65%\",\n \"500\": \"240 4% 46%\",\n \"600\": \"240 5% 34%\",\n \"700\": \"240 5% 26%\",\n \"800\": \"240 4% 16%\",\n \"900\": \"240 6% 10%\",\n \"950\": \"240 10% 4%\",\n },\n neutral: {\n \"50\": \"0 0% 98%\",\n \"100\": \"0 0% 96%\",\n \"200\": \"0 0% 90%\",\n \"300\": \"0 0% 83%\",\n \"400\": \"0 0% 64%\",\n \"500\": \"0 0% 45%\",\n \"600\": \"0 0% 32%\",\n \"700\": \"0 0% 25%\",\n \"800\": \"0 0% 15%\",\n \"900\": \"0 0% 9%\",\n \"950\": \"0 0% 4%\",\n },\n stone: {\n \"50\": \"60 9% 98%\",\n \"100\": \"60 5% 96%\",\n \"200\": \"20 6% 90%\",\n \"300\": \"24 6% 83%\",\n \"400\": \"24 5% 64%\",\n \"500\": \"25 5% 45%\",\n \"600\": \"33 5% 32%\",\n \"700\": \"30 6% 25%\",\n \"800\": \"12 6% 15%\",\n \"900\": \"24 10% 10%\",\n \"950\": \"20 14% 4%\",\n },\n};\n\n// --- Brand color types ---\n\nexport interface BrandColors {\n primary: string; // hex\n secondary: string; // hex\n accent?: string; // hex\n highlight?: string; // hex\n success: string; // hex\n grey?: GreyScale; // defaults to \"slate\"\n}\n\n// --- Shade scale types ---\n\nexport const SHADE_STEPS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950] as const;\nexport type ShadeStep = (typeof SHADE_STEPS)[number];\nexport type ColorScale = Record<ShadeStep, string>;\n\nexport interface BrandScales {\n primary: ColorScale;\n secondary: ColorScale;\n \"brand-accent\": ColorScale;\n highlight: ColorScale;\n success: ColorScale;\n}\n\n// --- Target OKLCH lightness per step ---\n\nconst TARGET_LIGHTNESS: Record<ShadeStep, number> = {\n 50: 0.97,\n 100: 0.93,\n 200: 0.87,\n 300: 0.79,\n 400: 0.70,\n 500: 0.59,\n 600: 0.49,\n 700: 0.39,\n 800: 0.30,\n 900: 0.21,\n 950: 0.14,\n};\n\n// --- Scale generation ---\n\n/**\n * Generate a full 50–950 color scale from a single hex value.\n * Uses OKLCH for perceptual uniformity. The input color is auto-anchored\n * to its closest shade step and reproduced pixel-perfect at that step.\n */\nexport function generateColorScale(hex: string): ColorScale {\n const { L: inputL, C: inputC, H } = hexToOklch(hex);\n\n // Sine-based chroma curve: peaks at mid-lightness, falls toward extremes\n const chromaCurve = (L: number): number => Math.sin(Math.PI * L);\n const inputCurveValue = chromaCurve(inputL);\n\n // Anchor ratio so that input chroma is preserved at input lightness\n const chromaRatio = inputCurveValue > 0.01 ? inputC / inputCurveValue : inputC;\n\n const scale = {} as ColorScale;\n\n for (const step of SHADE_STEPS) {\n const targetL = TARGET_LIGHTNESS[step];\n const targetC = inputCurveValue > 0.01\n ? chromaRatio * chromaCurve(targetL)\n : inputC * chromaCurve(targetL);\n\n scale[step] = oklchToHslString(targetL, targetC, H);\n }\n\n return scale;\n}\n\n/**\n * Generate shade scales for all brand colors.\n */\nexport function generateBrandScales(brand: BrandColors): BrandScales {\n const accentHex = brand.accent ?? brand.primary;\n const highlightHex = brand.highlight ?? brand.secondary;\n\n return {\n primary: generateColorScale(brand.primary),\n secondary: generateColorScale(brand.secondary),\n \"brand-accent\": generateColorScale(accentHex),\n highlight: generateColorScale(highlightHex),\n success: generateColorScale(brand.success),\n };\n}\n\n/**\n * Generate CSS custom property declarations for all brand scales.\n * Output is indented with 2 spaces, suitable for injection into :root {}.\n */\nexport function generateScaleCSS(scales: BrandScales): string {\n const lines: string[] = [];\n\n for (const [colorName, scale] of Object.entries(scales)) {\n for (const step of SHADE_STEPS) {\n lines.push(` --${colorName}-${step}: ${(scale as ColorScale)[step]};`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// --- Semantic palette ---\n\nexport interface SemanticPalette {\n background: string;\n foreground: string;\n card: string;\n \"card-foreground\": string;\n \"surface-tertiary\": string;\n popover: string;\n \"popover-foreground\": string;\n primary: string;\n \"primary-foreground\": string;\n secondary: string;\n \"secondary-foreground\": string;\n accent: string;\n \"accent-foreground\": string;\n \"brand-accent\": string;\n \"brand-accent-foreground\": string;\n highlight: string;\n \"highlight-foreground\": string;\n success: string;\n \"success-foreground\": string;\n muted: string;\n \"muted-foreground\": string;\n \"content-secondary\": string;\n destructive: string;\n \"destructive-foreground\": string;\n border: string;\n \"border-strong\": string;\n \"border-subtle\": string;\n input: string;\n ring: string;\n}\n\n// --- Foreground contrast ---\n\nfunction contrastForeground(color: HSL): string {\n return color.l > 55\n ? hslToString({ h: color.h, s: clamp(color.s - 20, 0, 100), l: 10 })\n : hslToString({ h: color.h, s: clamp(color.s - 25, 0, 100), l: 98 });\n}\n\nfunction boostForDark(color: HSL): HSL {\n if (color.l < 40) {\n return { ...color, l: clamp(color.l + 25, 0, 100) };\n }\n return color;\n}\n\n// --- Palette derivation ---\n\nexport function deriveLightPalette(brand: BrandColors): SemanticPalette {\n const grey = GREY_SCALES[brand.grey ?? \"slate\"];\n const primary = hexToHSL(brand.primary);\n const secondary = hexToHSL(brand.secondary);\n const accent = brand.accent ? hexToHSL(brand.accent) : primary;\n const highlight = brand.highlight ? hexToHSL(brand.highlight) : secondary;\n const success = hexToHSL(brand.success);\n\n return {\n background: grey[\"50\"],\n foreground: grey[\"950\"],\n card: \"0 0% 100%\",\n \"card-foreground\": grey[\"950\"],\n \"surface-tertiary\": grey[\"100\"],\n popover: \"0 0% 100%\",\n \"popover-foreground\": grey[\"950\"],\n primary: hslToString(primary),\n \"primary-foreground\": contrastForeground(primary),\n secondary: hslToString(secondary),\n \"secondary-foreground\": contrastForeground(secondary),\n accent: grey[\"100\"],\n \"accent-foreground\": grey[\"950\"],\n \"brand-accent\": hslToString(accent),\n \"brand-accent-foreground\": contrastForeground(accent),\n highlight: hslToString(highlight),\n \"highlight-foreground\": contrastForeground(highlight),\n success: hslToString(success),\n \"success-foreground\": contrastForeground(success),\n muted: grey[\"100\"],\n \"muted-foreground\": grey[\"500\"],\n \"content-secondary\": grey[\"400\"],\n destructive: \"0 84% 60%\",\n \"destructive-foreground\": \"0 0% 98%\",\n border: grey[\"200\"],\n \"border-strong\": grey[\"300\"],\n \"border-subtle\": grey[\"100\"],\n input: grey[\"200\"],\n ring: hslToString(primary),\n };\n}\n\nexport function deriveDarkPalette(brand: BrandColors): SemanticPalette {\n const grey = GREY_SCALES[brand.grey ?? \"slate\"];\n const primary = boostForDark(hexToHSL(brand.primary));\n const secondary = boostForDark(hexToHSL(brand.secondary));\n const accent = boostForDark(brand.accent ? hexToHSL(brand.accent) : hexToHSL(brand.primary));\n const highlight = boostForDark(brand.highlight ? hexToHSL(brand.highlight) : hexToHSL(brand.secondary));\n const success = boostForDark(hexToHSL(brand.success));\n\n return {\n background: grey[\"950\"],\n foreground: grey[\"50\"],\n card: grey[\"900\"],\n \"card-foreground\": grey[\"50\"],\n \"surface-tertiary\": grey[\"800\"],\n popover: grey[\"900\"],\n \"popover-foreground\": grey[\"50\"],\n primary: hslToString(primary),\n \"primary-foreground\": contrastForeground(primary),\n secondary: hslToString(secondary),\n \"secondary-foreground\": contrastForeground(secondary),\n accent: grey[\"800\"],\n \"accent-foreground\": grey[\"50\"],\n \"brand-accent\": hslToString(accent),\n \"brand-accent-foreground\": contrastForeground(accent),\n highlight: hslToString(highlight),\n \"highlight-foreground\": contrastForeground(highlight),\n success: hslToString(success),\n \"success-foreground\": contrastForeground(success),\n muted: grey[\"800\"],\n \"muted-foreground\": grey[\"400\"],\n \"content-secondary\": grey[\"500\"],\n destructive: \"0 62% 30%\",\n \"destructive-foreground\": \"0 0% 98%\",\n border: grey[\"800\"],\n \"border-strong\": grey[\"700\"],\n \"border-subtle\": grey[\"900\"],\n input: grey[\"800\"],\n ring: hslToString(primary),\n };\n}\n\nexport function generatePaletteCSS(brand: BrandColors, attribute: \"class\" | \"data-theme\" = \"class\"): string {\n const light = deriveLightPalette(brand);\n const dark = deriveDarkPalette(brand);\n const scales = generateBrandScales(brand);\n\n const toVars = (palette: SemanticPalette, indent: string) =>\n Object.entries(palette)\n .map(([key, value]) => `${indent}--${key}: ${value};`)\n .join(\"\\n\");\n\n const darkSelector = attribute === \"class\" ? \".dark\" : '[data-theme=\"dark\"]';\n\n return `:root {\\n${toVars(light, \" \")}\\n\\n${generateScaleCSS(scales)}\\n}\\n\\n${darkSelector} {\\n${toVars(dark, \" \")}\\n}\\n`;\n}\n","export const radiusPresets = {\n sharp: {\n \"--radius\": \"0rem\",\n \"--radius-sm\": \"0rem\",\n \"--radius-md\": \"0rem\",\n \"--radius-lg\": \"0rem\",\n \"--radius-xl\": \"0rem\",\n \"--radius-full\": \"0rem\",\n },\n subtle: {\n \"--radius\": \"0.375rem\",\n \"--radius-sm\": \"0.125rem\",\n \"--radius-md\": \"0.375rem\",\n \"--radius-lg\": \"0.5rem\",\n \"--radius-xl\": \"0.75rem\",\n \"--radius-full\": \"9999px\",\n },\n rounded: {\n \"--radius\": \"0.5rem\",\n \"--radius-sm\": \"0.25rem\",\n \"--radius-md\": \"0.5rem\",\n \"--radius-lg\": \"0.75rem\",\n \"--radius-xl\": \"1rem\",\n \"--radius-full\": \"9999px\",\n },\n pill: {\n \"--radius\": \"0.75rem\",\n \"--radius-sm\": \"0.5rem\",\n \"--radius-md\": \"0.75rem\",\n \"--radius-lg\": \"1rem\",\n \"--radius-xl\": \"1.5rem\",\n \"--radius-full\": \"9999px\",\n },\n} as const;\n\nexport type RadiusPreset = keyof typeof radiusPresets;\n","export const shadowPresets = {\n flat: {\n \"--shadow-sm\": \"none\",\n \"--shadow\": \"none\",\n \"--shadow-md\": \"none\",\n \"--shadow-lg\": \"none\",\n \"--shadow-xl\": \"none\",\n },\n subtle: {\n \"--shadow-sm\": \"0 1px 2px 0 rgb(0 0 0 / 0.03)\",\n \"--shadow\": \"0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05)\",\n \"--shadow-md\": \"0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05)\",\n \"--shadow-lg\": \"0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)\",\n \"--shadow-xl\": \"0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05)\",\n },\n elevated: {\n \"--shadow-sm\": \"0 1px 2px 0 rgb(0 0 0 / 0.06), 0 1px 3px 0 rgb(0 0 0 / 0.1)\",\n \"--shadow\": \"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n \"--shadow-md\": \"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n \"--shadow-lg\": \"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n \"--shadow-xl\": \"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n },\n} as const;\n\nexport type ShadowPreset = keyof typeof shadowPresets;\n","export const motionPresets = {\n snappy: {\n \"--duration-fast\": \"100ms\",\n \"--duration-normal\": \"150ms\",\n \"--duration-slow\": \"250ms\",\n \"--ease-default\": \"cubic-bezier(0.22, 1, 0.36, 1)\",\n \"--ease-in\": \"cubic-bezier(0.55, 0, 1, 0.45)\",\n \"--ease-out\": \"cubic-bezier(0, 0.55, 0.45, 1)\",\n \"--ease-in-out\": \"cubic-bezier(0.65, 0, 0.35, 1)\",\n },\n smooth: {\n \"--duration-fast\": \"150ms\",\n \"--duration-normal\": \"200ms\",\n \"--duration-slow\": \"350ms\",\n \"--ease-default\": \"cubic-bezier(0.25, 0.1, 0.25, 1)\",\n \"--ease-in\": \"cubic-bezier(0.42, 0, 1, 1)\",\n \"--ease-out\": \"cubic-bezier(0, 0, 0.58, 1)\",\n \"--ease-in-out\": \"cubic-bezier(0.42, 0, 0.58, 1)\",\n },\n minimal: {\n \"--duration-fast\": \"75ms\",\n \"--duration-normal\": \"100ms\",\n \"--duration-slow\": \"200ms\",\n \"--ease-default\": \"linear\",\n \"--ease-in\": \"linear\",\n \"--ease-out\": \"linear\",\n \"--ease-in-out\": \"linear\",\n },\n} as const;\n\nexport type MotionPreset = keyof typeof motionPresets;\n","export const densityPresets = {\n compact: {\n \"--density-padding-xs\": \"0.125rem\",\n \"--density-padding-sm\": \"0.25rem\",\n \"--density-padding-md\": \"0.375rem\",\n \"--density-padding-lg\": \"0.5rem\",\n \"--density-padding-xl\": \"0.75rem\",\n \"--density-gap-sm\": \"0.25rem\",\n \"--density-gap-md\": \"0.5rem\",\n \"--density-gap-lg\": \"0.75rem\",\n \"--density-height-sm\": \"1.75rem\",\n \"--density-height-md\": \"2rem\",\n \"--density-height-lg\": \"2.5rem\",\n },\n default: {\n \"--density-padding-xs\": \"0.25rem\",\n \"--density-padding-sm\": \"0.5rem\",\n \"--density-padding-md\": \"0.75rem\",\n \"--density-padding-lg\": \"1rem\",\n \"--density-padding-xl\": \"1.5rem\",\n \"--density-gap-sm\": \"0.5rem\",\n \"--density-gap-md\": \"0.75rem\",\n \"--density-gap-lg\": \"1rem\",\n \"--density-height-sm\": \"2rem\",\n \"--density-height-md\": \"2.5rem\",\n \"--density-height-lg\": \"3rem\",\n },\n spacious: {\n \"--density-padding-xs\": \"0.5rem\",\n \"--density-padding-sm\": \"0.75rem\",\n \"--density-padding-md\": \"1rem\",\n \"--density-padding-lg\": \"1.5rem\",\n \"--density-padding-xl\": \"2rem\",\n \"--density-gap-sm\": \"0.75rem\",\n \"--density-gap-md\": \"1rem\",\n \"--density-gap-lg\": \"1.5rem\",\n \"--density-height-sm\": \"2.5rem\",\n \"--density-height-md\": \"3rem\",\n \"--density-height-lg\": \"3.5rem\",\n },\n} as const;\n\nexport type DensityPreset = keyof typeof densityPresets;\n","/** Locked type scale — consumers cannot override sizes, only font-family and weights. */\nexport const typeScale = {\n \"text-xs\": { fontSize: \"0.75rem\", lineHeight: \"1rem\" },\n \"text-sm\": { fontSize: \"0.875rem\", lineHeight: \"1.25rem\" },\n \"text-base\": { fontSize: \"1rem\", lineHeight: \"1.5rem\" },\n \"text-lg\": { fontSize: \"1.125rem\", lineHeight: \"1.75rem\" },\n \"text-xl\": { fontSize: \"1.25rem\", lineHeight: \"1.75rem\" },\n \"text-2xl\": { fontSize: \"1.5rem\", lineHeight: \"2rem\" },\n \"text-3xl\": { fontSize: \"1.875rem\", lineHeight: \"2.25rem\" },\n \"text-4xl\": { fontSize: \"2.25rem\", lineHeight: \"2.5rem\" },\n\n // Fluid headings using clamp()\n \"heading-sm\": {\n fontSize: \"clamp(1.125rem, 1rem + 0.5vw, 1.25rem)\",\n lineHeight: \"1.4\",\n letterSpacing: \"-0.01em\",\n },\n \"heading-md\": {\n fontSize: \"clamp(1.25rem, 1rem + 1vw, 1.875rem)\",\n lineHeight: \"1.3\",\n letterSpacing: \"-0.015em\",\n },\n \"heading-lg\": {\n fontSize: \"clamp(1.5rem, 1rem + 2vw, 2.25rem)\",\n lineHeight: \"1.2\",\n letterSpacing: \"-0.02em\",\n },\n \"heading-xl\": {\n fontSize: \"clamp(1.875rem, 1rem + 3vw, 3rem)\",\n lineHeight: \"1.1\",\n letterSpacing: \"-0.025em\",\n },\n \"heading-2xl\": {\n fontSize: \"clamp(2.25rem, 1rem + 4vw, 3.75rem)\",\n lineHeight: \"1.1\",\n letterSpacing: \"-0.03em\",\n },\n} as const;\n\nexport interface FontWeightMap {\n normal: number;\n medium: number;\n semibold: number;\n bold: number;\n extrabold?: number;\n}\n\nexport const defaultFontWeights: FontWeightMap = {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n extrabold: 800,\n};\n","/** Locked spacing scale — 4px (0.25rem) base grid. Not consumer-overridable. */\nexport const spacingScale = {\n \"0\": \"0\",\n \"0.5\": \"0.125rem\",\n \"1\": \"0.25rem\",\n \"1.5\": \"0.375rem\",\n \"2\": \"0.5rem\",\n \"2.5\": \"0.625rem\",\n \"3\": \"0.75rem\",\n \"3.5\": \"0.875rem\",\n \"4\": \"1rem\",\n \"5\": \"1.25rem\",\n \"6\": \"1.5rem\",\n \"7\": \"1.75rem\",\n \"8\": \"2rem\",\n \"9\": \"2.25rem\",\n \"10\": \"2.5rem\",\n \"11\": \"2.75rem\",\n \"12\": \"3rem\",\n \"14\": \"3.5rem\",\n \"16\": \"4rem\",\n \"20\": \"5rem\",\n \"24\": \"6rem\",\n \"28\": \"7rem\",\n \"32\": \"8rem\",\n \"36\": \"9rem\",\n \"40\": \"10rem\",\n \"44\": \"11rem\",\n \"48\": \"12rem\",\n \"52\": \"13rem\",\n \"56\": \"14rem\",\n \"60\": \"15rem\",\n \"64\": \"16rem\",\n \"72\": \"18rem\",\n \"80\": \"20rem\",\n \"96\": \"24rem\",\n} as const;\n","/** Z-index tokens — overridable by consumers via CSS custom properties. */\nexport const zIndexTokens = {\n \"--z-dropdown\": \"50\",\n \"--z-sticky\": \"100\",\n \"--z-fixed\": \"200\",\n \"--z-modal-backdrop\": \"300\",\n \"--z-modal\": \"400\",\n \"--z-popover\": \"500\",\n \"--z-tooltip\": \"600\",\n \"--z-toast\": \"700\",\n} as const;\n\nexport type ZIndexToken = keyof typeof zIndexTokens;\n","/**\n * Framer Motion animation presets.\n *\n * Each preset is a Framer Motion `Variants` object with `hidden` and `visible`\n * states, plus optional `exit`. Durations and easings are resolved per motion\n * preset (snappy / smooth / minimal) at call time via `getAnimationPresets()`.\n */\n\nimport { motionPresets, type MotionPreset } from \"./motion\";\n\n// ---------------------------------------------------------------------------\n// Duration / easing helpers\n// ---------------------------------------------------------------------------\n\nfunction parseDuration(ms: string): number {\n return parseInt(ms, 10) / 1000;\n}\n\nfunction parseEasing(raw: string): number[] | string {\n if (raw === \"linear\") return \"linear\" as string;\n const match = raw.match(\n /cubic-bezier\\(\\s*([\\d.]+)\\s*,\\s*([\\d.-]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.-]+)\\s*\\)/\n );\n if (!match) return [0.25, 0.1, 0.25, 1];\n return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];\n}\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface MotionVariant {\n hidden: Record<string, unknown>;\n visible: Record<string, unknown>;\n exit?: Record<string, unknown>;\n}\n\nexport interface StaggerContainerVariant {\n hidden: Record<string, unknown>;\n visible: Record<string, unknown>;\n}\n\nexport interface AnimationPresets {\n fadeIn: MotionVariant;\n fadeUp: MotionVariant;\n fadeDown: MotionVariant;\n scaleIn: MotionVariant;\n slideInLeft: MotionVariant;\n slideInRight: MotionVariant;\n cardLift: MotionVariant;\n staggerContainer: StaggerContainerVariant;\n staggerItem: MotionVariant;\n pageTransition: MotionVariant;\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Returns Framer Motion variant presets tuned to the given motion preset.\n *\n * @example\n * ```tsx\n * import { getAnimationPresets } from \"@bison-lab/tokens\";\n * import { motion } from \"framer-motion\";\n *\n * const presets = getAnimationPresets(\"smooth\");\n *\n * <motion.div variants={presets.fadeUp} initial=\"hidden\" animate=\"visible\">\n * Hello\n * </motion.div>\n * ```\n */\nexport function getAnimationPresets(preset: MotionPreset = \"smooth\"): AnimationPresets {\n const tokens = motionPresets[preset];\n const normal = parseDuration(tokens[\"--duration-normal\"]);\n const slow = parseDuration(tokens[\"--duration-slow\"]);\n const ease = parseEasing(tokens[\"--ease-out\"]);\n\n const transition = { duration: normal, ease };\n const slowTransition = { duration: slow, ease };\n\n return {\n fadeIn: {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition },\n },\n\n fadeUp: {\n hidden: { opacity: 0, y: 10 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n fadeDown: {\n hidden: { opacity: 0, y: -10 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n scaleIn: {\n hidden: { opacity: 0, scale: 0.97 },\n visible: { opacity: 1, scale: 1, transition },\n },\n\n slideInLeft: {\n hidden: { opacity: 0, x: -16 },\n visible: { opacity: 1, x: 0, transition },\n },\n\n slideInRight: {\n hidden: { opacity: 0, x: 16 },\n visible: { opacity: 1, x: 0, transition },\n },\n\n cardLift: {\n hidden: { opacity: 0, y: 6, scale: 0.99 },\n visible: {\n opacity: 1,\n y: 0,\n scale: 1,\n transition: slowTransition,\n },\n exit: { opacity: 0, y: 4, scale: 0.99, transition },\n },\n\n staggerContainer: {\n hidden: {},\n visible: {\n transition: {\n staggerChildren: 0.07,\n delayChildren: 0.1,\n },\n },\n },\n\n staggerItem: {\n hidden: { opacity: 0, y: 8 },\n visible: { opacity: 1, y: 0, transition },\n },\n\n pageTransition: {\n hidden: { opacity: 0, y: 8 },\n visible: { opacity: 1, y: 0, transition: slowTransition },\n exit: { opacity: 0, y: -6, transition },\n },\n };\n}\n"],"mappings":";AAeA,SAAS,aAAa,GAAmB;AACvC,QAAO,KAAK,SAAU,IAAI,QAAQ,KAAK,KAAK,IAAI,QAAS,OAAO,IAAI;;AAGtE,SAAS,aAAa,GAAmB;AACvC,QAAO,KAAK,WAAY,IAAI,QAAQ,QAAQ,KAAK,IAAI,GAAG,IAAI,IAAI,GAAG;;AAKrE,SAAS,UAAU,KAAuC;AACxD,OAAM,IAAI,QAAQ,KAAK,GAAG;AAC1B,QAAO;EACL,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG;EACpC,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG;EACpC,SAAS,IAAI,UAAU,GAAG,EAAE,EAAE,GAAG,GAAG;EACrC;;AAKH,SAAS,kBAAkB,GAAW,GAAW,GAAqC;CACpF,MAAM,IAAI,cAAe,IAAI,cAAe,IAAI,cAAe;CAC/D,MAAM,IAAI,cAAe,IAAI,cAAe,IAAI,cAAe;CAC/D,MAAM,IAAI,cAAe,IAAI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ED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bison-lab/tokens",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "Design tokens, CSS custom properties, and preset files for Bison Lab component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",