@wordpress/theme 0.3.0 → 0.3.1-next.6deb34194.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.
Files changed (42) hide show
  1. package/build/color-ramps/lib/default-ramps.js +65 -65
  2. package/build/color-ramps/lib/default-ramps.js.map +1 -1
  3. package/build/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  4. package/build/color-ramps/lib/index.js.map +2 -2
  5. package/build/color-ramps/lib/taper-chroma.js +18 -44
  6. package/build/color-ramps/lib/taper-chroma.js.map +2 -2
  7. package/build/prebuilt/js/design-tokens.js +15 -5
  8. package/build/prebuilt/js/design-tokens.js.map +2 -2
  9. package/build/prebuilt/json/figma.json +101 -29
  10. package/build-module/color-ramps/lib/default-ramps.js +65 -65
  11. package/build-module/color-ramps/lib/default-ramps.js.map +1 -1
  12. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  13. package/build-module/color-ramps/lib/index.js.map +2 -2
  14. package/build-module/color-ramps/lib/taper-chroma.js +19 -46
  15. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  16. package/build-module/prebuilt/js/design-tokens.js +15 -5
  17. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  18. package/build-module/prebuilt/json/figma.json +101 -29
  19. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +3 -4
  20. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  21. package/build-types/color-ramps/lib/taper-chroma.d.ts +4 -4
  22. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  23. package/docs/ds-tokens.md +17 -7
  24. package/package.json +4 -4
  25. package/src/color-ramps/lib/default-ramps.ts +65 -65
  26. package/src/color-ramps/lib/find-color-with-constraints.ts +11 -7
  27. package/src/color-ramps/lib/index.ts +4 -4
  28. package/src/color-ramps/lib/taper-chroma.ts +32 -63
  29. package/src/prebuilt/css/design-tokens.css +54 -26
  30. package/src/prebuilt/js/design-tokens.js +15 -5
  31. package/src/prebuilt/json/figma.json +101 -29
  32. package/tokens/border.json +43 -21
  33. package/tokens/color.json +65 -65
  34. package/tokens/dimension.json +62 -0
  35. package/tsconfig.bin.tsbuildinfo +1 -1
  36. package/tsconfig.src.json +1 -1
  37. package/tsconfig.src.tsbuildinfo +1 -1
  38. package/build/types/css-modules.d.js +0 -1
  39. package/build/types/css-modules.d.js.map +0 -7
  40. package/build-module/types/css-modules.d.js +0 -1
  41. package/build-module/types/css-modules.d.js.map +0 -7
  42. package/src/types/css-modules.d.ts +0 -4
@@ -1,15 +1,13 @@
1
1
  // packages/theme/src/color-ramps/lib/taper-chroma.ts
2
2
  import {
3
3
  get,
4
- inGamut,
4
+ toGamut,
5
5
  OKLCH,
6
- P3,
7
6
  sRGB
8
7
  } from "colorjs.io/fn";
9
8
  import "./register-color-spaces";
10
9
  function taperChroma(seed, lTarget, options = {}) {
11
- const gamut = options.gamut ?? "p3";
12
- const gamutSpace = gamut === "p3" ? P3 : sRGB;
10
+ const gamut = options.gamut ?? sRGB;
13
11
  const alpha = options.alpha ?? 0.65;
14
12
  const carry = options.carry ?? 0.5;
15
13
  const cUpperBound = options.cUpperBound ?? 0.45;
@@ -27,22 +25,18 @@ function taperChroma(seed, lTarget, options = {}) {
27
25
  hSeed = normalizeHue(options.hueFallback);
28
26
  } else {
29
27
  return {
30
- spaceId: "oklch",
31
- coords: [clamp01(lTarget), 0, 0]
28
+ space: OKLCH,
29
+ coords: [clamp01(lTarget), 0, 0],
30
+ alpha: 1
32
31
  };
33
32
  }
34
33
  }
35
34
  const lSeed = clamp01(get(seed, [OKLCH, "l"]));
36
- const cmaxSeed = getCachedMaxChromaAtLH(
37
- lSeed,
38
- hSeed,
39
- gamutSpace,
40
- cUpperBound
41
- );
35
+ const cmaxSeed = getCachedMaxChromaAtLH(lSeed, hSeed, gamut, cUpperBound);
42
36
  const cmaxTarget = getCachedMaxChromaAtLH(
43
37
  clamp01(lTarget),
44
38
  hSeed,
45
- gamutSpace,
39
+ gamut,
46
40
  cUpperBound
47
41
  );
48
42
  let seedRelative = 0;
@@ -56,17 +50,8 @@ function taperChroma(seed, lTarget, options = {}) {
56
50
  kLight,
57
51
  kDark
58
52
  });
59
- let cPlanned = cWithCarry * t;
53
+ const cPlanned = cWithCarry * t;
60
54
  const lOut = clamp01(lTarget);
61
- const candidate = {
62
- spaceId: "oklch",
63
- coords: [lOut, cPlanned, hSeed]
64
- };
65
- if (!inGamut(candidate, gamutSpace)) {
66
- const cap = Math.min(cPlanned, cUpperBound);
67
- cPlanned = getCachedMaxChromaAtLH(lOut, hSeed, gamutSpace, cap);
68
- }
69
- cPlanned = Math.min(cPlanned, cSeed);
70
55
  return { l: lOut, c: cPlanned };
71
56
  }
72
57
  function clamp01(x) {
@@ -102,9 +87,9 @@ function continuousTaper(seedL, targetL, opts) {
102
87
  }
103
88
  var maxChromaCache = /* @__PURE__ */ new Map();
104
89
  function keyMax(l, h, gamut, cap) {
105
- const lq = quantize(l, 1e-3);
106
- const hq = quantize(normalizeHue(h), 0.1);
107
- const cq = quantize(cap, 1e-3);
90
+ const lq = quantize(l, 0.05);
91
+ const hq = quantize(normalizeHue(h), 10);
92
+ const cq = quantize(cap, 0.05);
108
93
  return `${gamut}|L:${lq}|H:${hq}|cap:${cq}`;
109
94
  }
110
95
  function quantize(x, step) {
@@ -112,7 +97,7 @@ function quantize(x, step) {
112
97
  return k * step;
113
98
  }
114
99
  function getCachedMaxChromaAtLH(l, h, gamutSpace, cap) {
115
- const gamut = gamutSpace === P3 ? "p3" : "srgb";
100
+ const gamut = gamutSpace.id;
116
101
  const key = keyMax(l, h, gamut, cap);
117
102
  const hit = maxChromaCache.get(key);
118
103
  if (typeof hit === "number") {
@@ -123,25 +108,13 @@ function getCachedMaxChromaAtLH(l, h, gamutSpace, cap) {
123
108
  return computed;
124
109
  }
125
110
  function maxInGamutChromaAtLH(l, h, gamutSpace, cap) {
126
- let lo = 0;
127
- let hi = cap;
128
- let ok = 0;
129
- const lFixed = clamp01(l);
130
- const hFixed = normalizeHue(h);
131
- for (let i = 0; i < 18; i++) {
132
- const mid = (lo + hi) / 2;
133
- const probe = {
134
- spaceId: "oklch",
135
- coords: [lFixed, mid, hFixed]
136
- };
137
- if (inGamut(probe, gamutSpace)) {
138
- ok = mid;
139
- lo = mid;
140
- } else {
141
- hi = mid;
142
- }
143
- }
144
- return ok;
111
+ const probe = {
112
+ space: OKLCH,
113
+ coords: [l, cap, h],
114
+ alpha: 1
115
+ };
116
+ const clamped = toGamut(probe, { space: gamutSpace, method: "css" });
117
+ return get(clamped, [OKLCH, "c"]);
145
118
  }
146
119
  export {
147
120
  taperChroma
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/color-ramps/lib/taper-chroma.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tget,\n\tinGamut,\n\tOKLCH,\n\tP3,\n\tsRGB,\n\ttype ColorTypes,\n\ttype ColorObject,\n} from 'colorjs.io/fn';\n\n/**\n * Internal dependencies\n */\nimport './register-color-spaces';\n\nexport interface TaperChromaOptions {\n\tgamut?: 'p3' | 'srgb'; // target gamut (default \"p3\")\n\talpha?: number; // base fraction of Cmax at target (default 0.62)\n\tcarry?: number; // seed vividness carry exponent \u03B2 in [0..1] (default 0.5)\n\tcUpperBound?: number; // hard search cap for C (default 0.45)\n\t// Continuous taper around the seed (desaturate both sides slightly)\n\tradiusLight?: number; // distance in L where kLight is reached (default 0.20)\n\tradiusDark?: number; // distance in L where kDark is reached (default 0.20)\n\tkLight?: number; // floor multiplier near lighter side (default 0.85)\n\tkDark?: number; // floor multiplier near darker side (default 0.85)\n\t// Achromatic handling\n\thueFallback?: number; // degrees: if seed is achromatic and you still want color\n\tachromaEpsilon?: number; // \u2264 this chroma \u2192 treat as achromatic (default 0.005)\n}\n\n/**\n * Given the seed and the target lightness, tapers the chroma smoothly.\n * - C_intended = Cmax(Lt,H0) * alpha * (seedRelative^carry)\n * - Continuous taper vs |Lt - Ls| to softly reduce chroma for neighbors\n * - Downward-only clamp on C (preserve L & H)\n * @param seed\n * @param lTarget\n * @param options\n */\nexport function taperChroma(\n\tseed: ColorTypes, // already OKLCH\n\tlTarget: number, // [0..1]\n\toptions: TaperChromaOptions = {}\n): { l: number; c: number } | ColorObject {\n\tconst gamut = options.gamut ?? 'p3';\n\tconst gamutSpace = gamut === 'p3' ? P3 : sRGB;\n\tconst alpha = options.alpha ?? 0.65; // 0.7-0.8 works well for accent surface\n\tconst carry = options.carry ?? 0.5;\n\tconst cUpperBound = options.cUpperBound ?? 0.45;\n\tconst radiusLight = options.radiusLight ?? 0.2;\n\tconst radiusDark = options.radiusDark ?? 0.2;\n\tconst kLight = options.kLight ?? 0.85;\n\tconst kDark = options.kDark ?? 0.85;\n\tconst achromaEpsilon = options.achromaEpsilon ?? 0.005;\n\n\tconst cSeed = Math.max( 0, get( seed, [ OKLCH, 'c' ] ) );\n\tlet hSeed = Number( get( seed, [ OKLCH, 'h' ] ) );\n\n\tconst chromaIsTiny = cSeed < achromaEpsilon;\n\tconst hueIsInvalid = ! Number.isFinite( hSeed );\n\n\tif ( chromaIsTiny || hueIsInvalid ) {\n\t\tif ( typeof options.hueFallback === 'number' ) {\n\t\t\thSeed = normalizeHue( options.hueFallback );\n\t\t} else {\n\t\t\t// Respect achromatic intent: grayscale at target L\n\t\t\treturn {\n\t\t\t\tspaceId: 'oklch',\n\t\t\t\tcoords: [ clamp01( lTarget ), 0, 0 ],\n\t\t\t};\n\t\t}\n\t}\n\n\t// Capacity at seed and target\n\tconst lSeed = clamp01( get( seed, [ OKLCH, 'l' ] ) );\n\tconst cmaxSeed = getCachedMaxChromaAtLH(\n\t\tlSeed,\n\t\thSeed,\n\t\tgamutSpace,\n\t\tcUpperBound\n\t);\n\tconst cmaxTarget = getCachedMaxChromaAtLH(\n\t\tclamp01( lTarget ),\n\t\thSeed,\n\t\tgamutSpace,\n\t\tcUpperBound\n\t);\n\n\t// Seed vividness ratio (hue-fair normalization)\n\tlet seedRelative = 0;\n\tconst denom = cmaxSeed > 0 ? cmaxSeed : 1e-6;\n\tseedRelative = clamp01( cSeed / denom );\n\n\t// Intended chroma from local capacity, tempered by seed vividness\n\tconst cIntendedBase = alpha * cmaxTarget;\n\tconst cWithCarry =\n\t\tcIntendedBase * Math.pow( seedRelative, clamp01( carry ) );\n\n\t// Gentle, symmetric desaturation vs distance in L\n\tconst t = continuousTaper( lSeed, lTarget, {\n\t\tradiusLight,\n\t\tradiusDark,\n\t\tkLight,\n\t\tkDark,\n\t} );\n\tlet cPlanned = cWithCarry * t;\n\n\t// Downward-only clamp (preserve L & H)\n\tconst lOut = clamp01( lTarget );\n\tconst candidate: ColorTypes = {\n\t\tspaceId: 'oklch',\n\t\tcoords: [ lOut, cPlanned, hSeed ],\n\t};\n\tif ( ! inGamut( candidate, gamutSpace ) ) {\n\t\tconst cap = Math.min( cPlanned, cUpperBound );\n\t\tcPlanned = getCachedMaxChromaAtLH( lOut, hSeed, gamutSpace, cap );\n\t}\n\n\tcPlanned = Math.min( cPlanned, cSeed );\n\n\treturn { l: lOut, c: cPlanned };\n}\n\n/* ---------------- helpers & caches ---------------- */\n\nfunction clamp01( x: number ): number {\n\tif ( x < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( x > 1 ) {\n\t\treturn 1;\n\t}\n\treturn x;\n}\nfunction normalizeHue( h: number ): number {\n\tlet hue = h % 360;\n\tif ( hue < 0 ) {\n\t\thue += 360;\n\t}\n\treturn hue;\n}\nfunction raisedCosine( u: number ): number {\n\tconst x = clamp01( u );\n\treturn 0.5 - 0.5 * Math.cos( Math.PI * x );\n}\n\n/**\n * smooth, distance-from-seed chroma taper (raised-cosine per side)\n * @param seedL\n * @param targetL\n * @param opts\n * @param opts.radiusLight\n * @param opts.radiusDark\n * @param opts.kLight\n * @param opts.kDark\n */\nfunction continuousTaper(\n\tseedL: number,\n\ttargetL: number,\n\topts: {\n\t\tradiusLight: number;\n\t\tradiusDark: number;\n\t\tkLight: number;\n\t\tkDark: number;\n\t}\n): number {\n\tconst d = targetL - seedL;\n\tif ( d >= 0 ) {\n\t\tconst u = opts.radiusLight > 0 ? Math.abs( d ) / opts.radiusLight : 1;\n\t\tconst w = raisedCosine( u > 1 ? 1 : u );\n\t\treturn 1 - ( 1 - opts.kLight ) * w;\n\t}\n\tconst u = opts.radiusDark > 0 ? Math.abs( d ) / opts.radiusDark : 1;\n\tconst w = raisedCosine( u > 1 ? 1 : u );\n\treturn 1 - ( 1 - opts.kDark ) * w;\n}\n\n/* ---- chroma-capacity queries with small caches ---- */\n\nconst maxChromaCache = new Map< string, number >();\n\nfunction keyMax(\n\tl: number,\n\th: number,\n\tgamut: 'p3' | 'srgb',\n\tcap: number\n): string {\n\t// Quantize to keep cache compact\n\tconst lq = quantize( l, 1e-3 );\n\tconst hq = quantize( normalizeHue( h ), 1e-1 );\n\tconst cq = quantize( cap, 1e-3 );\n\treturn `${ gamut }|L:${ lq }|H:${ hq }|cap:${ cq }`;\n}\nfunction quantize( x: number, step: number ): number {\n\tconst k = Math.round( x / step );\n\treturn k * step;\n}\n\nfunction getCachedMaxChromaAtLH(\n\tl: number,\n\th: number,\n\tgamutSpace: typeof P3 | typeof sRGB,\n\tcap: number\n): number {\n\tconst gamut = gamutSpace === P3 ? 'p3' : 'srgb';\n\tconst key = keyMax( l, h, gamut, cap );\n\tconst hit = maxChromaCache.get( key );\n\tif ( typeof hit === 'number' ) {\n\t\treturn hit;\n\t}\n\n\tconst computed = maxInGamutChromaAtLH( l, h, gamutSpace, cap );\n\tmaxChromaCache.set( key, computed );\n\treturn computed;\n}\n\n/**\n * Binary-search the max in-gamut chroma at fixed (L,H) in the target gamut\n * @param l\n * @param h\n * @param gamutSpace\n * @param cap\n */\nfunction maxInGamutChromaAtLH(\n\tl: number,\n\th: number,\n\tgamutSpace: typeof P3 | typeof sRGB,\n\tcap: number\n): number {\n\tlet lo = 0;\n\tlet hi = cap;\n\tlet ok = 0;\n\n\tconst lFixed = clamp01( l );\n\tconst hFixed = normalizeHue( h );\n\n\tfor ( let i = 0; i < 18; i++ ) {\n\t\tconst mid = ( lo + hi ) / 2;\n\t\tconst probe: ColorTypes = {\n\t\t\tspaceId: 'oklch',\n\t\t\tcoords: [ lFixed, mid, hFixed ],\n\t\t};\n\t\tif ( inGamut( probe, gamutSpace ) ) {\n\t\t\tok = mid;\n\t\t\tlo = mid;\n\t\t} else {\n\t\t\thi = mid;\n\t\t}\n\t}\n\treturn ok;\n}\n"],
5
- "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGM;AAKP,OAAO;AA0BA,SAAS,YACf,MACA,SACA,UAA8B,CAAC,GACU;AACzC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,aAAa,UAAU,OAAO,KAAK;AACzC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,cAAc,QAAQ,eAAe;AAC3C,QAAM,cAAc,QAAQ,eAAe;AAC3C,QAAM,aAAa,QAAQ,cAAc;AACzC,QAAM,SAAS,QAAQ,UAAU;AACjC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,iBAAiB,QAAQ,kBAAkB;AAEjD,QAAM,QAAQ,KAAK,IAAK,GAAG,IAAK,MAAM,CAAE,OAAO,GAAI,CAAE,CAAE;AACvD,MAAI,QAAQ,OAAQ,IAAK,MAAM,CAAE,OAAO,GAAI,CAAE,CAAE;AAEhD,QAAM,eAAe,QAAQ;AAC7B,QAAM,eAAe,CAAE,OAAO,SAAU,KAAM;AAE9C,MAAK,gBAAgB,cAAe;AACnC,QAAK,OAAO,QAAQ,gBAAgB,UAAW;AAC9C,cAAQ,aAAc,QAAQ,WAAY;AAAA,IAC3C,OAAO;AAEN,aAAO;AAAA,QACN,SAAS;AAAA,QACT,QAAQ,CAAE,QAAS,OAAQ,GAAG,GAAG,CAAE;AAAA,MACpC;AAAA,IACD;AAAA,E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SAAS,aAAc,CAAE;AAE/B,WAAU,IAAI,GAAG,IAAI,IAAI,KAAM;AAC9B,UAAM,OAAQ,KAAK,MAAO;AAC1B,UAAM,QAAoB;AAAA,MACzB,SAAS;AAAA,MACT,QAAQ,CAAE,QAAQ,KAAK,MAAO;AAAA,IAC/B;AACA,QAAK,QAAS,OAAO,UAAW,GAAI;AACnC,WAAK;AACL,WAAK;AAAA,IACN,OAAO;AACN,WAAK;AAAA,IACN;AAAA,EACD;AACA,SAAO;AACR;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tget,\n\ttoGamut,\n\tOKLCH,\n\tsRGB,\n\ttype PlainColorObject,\n\ttype ColorSpace,\n} from 'colorjs.io/fn';\n\n/**\n * Internal dependencies\n */\nimport './register-color-spaces';\n\nexport interface TaperChromaOptions {\n\tgamut?: ColorSpace; // target gamut (default `sRGB`)\n\talpha?: number; // base fraction of Cmax at target (default 0.62)\n\tcarry?: number; // seed vividness carry exponent \u03B2 in [0..1] (default 0.5)\n\tcUpperBound?: number; // hard search cap for C (default 0.45)\n\t// Continuous taper around the seed (desaturate both sides slightly)\n\tradiusLight?: number; // distance in L where kLight is reached (default 0.20)\n\tradiusDark?: number; // distance in L where kDark is reached (default 0.20)\n\tkLight?: number; // floor multiplier near lighter side (default 0.85)\n\tkDark?: number; // floor multiplier near darker side (default 0.85)\n\t// Achromatic handling\n\thueFallback?: number; // degrees: if seed is achromatic and you still want color\n\tachromaEpsilon?: number; // \u2264 this chroma \u2192 treat as achromatic (default 0.005)\n}\n\n/**\n * Given the seed and the target lightness, tapers the chroma smoothly.\n * - C_intended = Cmax(Lt,H0) * alpha * (seedRelative^carry)\n * - Continuous taper vs |Lt - Ls| to softly reduce chroma for neighbors\n * - Downward-only clamp on C (preserve L & H)\n * @param seed\n * @param lTarget\n * @param options\n */\nexport function taperChroma(\n\tseed: PlainColorObject, // already OKLCH\n\tlTarget: number, // [0..1]\n\toptions: TaperChromaOptions = {}\n): { l: number; c: number } | PlainColorObject {\n\tconst gamut = options.gamut ?? sRGB;\n\tconst alpha = options.alpha ?? 0.65; // 0.7-0.8 works well for accent surface\n\tconst carry = options.carry ?? 0.5;\n\tconst cUpperBound = options.cUpperBound ?? 0.45;\n\tconst radiusLight = options.radiusLight ?? 0.2;\n\tconst radiusDark = options.radiusDark ?? 0.2;\n\tconst kLight = options.kLight ?? 0.85;\n\tconst kDark = options.kDark ?? 0.85;\n\tconst achromaEpsilon = options.achromaEpsilon ?? 0.005;\n\n\tconst cSeed = Math.max( 0, get( seed, [ OKLCH, 'c' ] ) );\n\tlet hSeed = Number( get( seed, [ OKLCH, 'h' ] ) );\n\n\tconst chromaIsTiny = cSeed < achromaEpsilon;\n\tconst hueIsInvalid = ! Number.isFinite( hSeed );\n\n\tif ( chromaIsTiny || hueIsInvalid ) {\n\t\tif ( typeof options.hueFallback === 'number' ) {\n\t\t\thSeed = normalizeHue( options.hueFallback );\n\t\t} else {\n\t\t\t// Respect achromatic intent: grayscale at target L\n\t\t\treturn {\n\t\t\t\tspace: OKLCH,\n\t\t\t\tcoords: [ clamp01( lTarget ), 0, 0 ],\n\t\t\t\talpha: 1,\n\t\t\t};\n\t\t}\n\t}\n\n\t// Capacity at seed and target\n\tconst lSeed = clamp01( get( seed, [ OKLCH, 'l' ] ) );\n\tconst cmaxSeed = getCachedMaxChromaAtLH( lSeed, hSeed, gamut, cUpperBound );\n\tconst cmaxTarget = getCachedMaxChromaAtLH(\n\t\tclamp01( lTarget ),\n\t\thSeed,\n\t\tgamut,\n\t\tcUpperBound\n\t);\n\n\t// Seed vividness ratio (hue-fair normalization)\n\tlet seedRelative = 0;\n\tconst denom = cmaxSeed > 0 ? cmaxSeed : 1e-6;\n\tseedRelative = clamp01( cSeed / denom );\n\n\t// Intended chroma from local capacity, tempered by seed vividness\n\tconst cIntendedBase = alpha * cmaxTarget;\n\tconst cWithCarry =\n\t\tcIntendedBase * Math.pow( seedRelative, clamp01( carry ) );\n\n\t// Gentle, symmetric desaturation vs distance in L\n\tconst t = continuousTaper( lSeed, lTarget, {\n\t\tradiusLight,\n\t\tradiusDark,\n\t\tkLight,\n\t\tkDark,\n\t} );\n\tconst cPlanned = cWithCarry * t;\n\n\t// Downward-only clamp (preserve L & H)\n\tconst lOut = clamp01( lTarget );\n\n\treturn { l: lOut, c: cPlanned };\n}\n\n/* ---------------- helpers & caches ---------------- */\n\nfunction clamp01( x: number ): number {\n\tif ( x < 0 ) {\n\t\treturn 0;\n\t}\n\tif ( x > 1 ) {\n\t\treturn 1;\n\t}\n\treturn x;\n}\nfunction normalizeHue( h: number ): number {\n\tlet hue = h % 360;\n\tif ( hue < 0 ) {\n\t\thue += 360;\n\t}\n\treturn hue;\n}\nfunction raisedCosine( u: number ): number {\n\tconst x = clamp01( u );\n\treturn 0.5 - 0.5 * Math.cos( Math.PI * x );\n}\n\n/**\n * smooth, distance-from-seed chroma taper (raised-cosine per side)\n * @param seedL\n * @param targetL\n * @param opts\n * @param opts.radiusLight\n * @param opts.radiusDark\n * @param opts.kLight\n * @param opts.kDark\n */\nfunction continuousTaper(\n\tseedL: number,\n\ttargetL: number,\n\topts: {\n\t\tradiusLight: number;\n\t\tradiusDark: number;\n\t\tkLight: number;\n\t\tkDark: number;\n\t}\n): number {\n\tconst d = targetL - seedL;\n\tif ( d >= 0 ) {\n\t\tconst u = opts.radiusLight > 0 ? Math.abs( d ) / opts.radiusLight : 1;\n\t\tconst w = raisedCosine( u > 1 ? 1 : u );\n\t\treturn 1 - ( 1 - opts.kLight ) * w;\n\t}\n\tconst u = opts.radiusDark > 0 ? Math.abs( d ) / opts.radiusDark : 1;\n\tconst w = raisedCosine( u > 1 ? 1 : u );\n\treturn 1 - ( 1 - opts.kDark ) * w;\n}\n\n/* ---- chroma-capacity queries with small caches ---- */\n\nconst maxChromaCache = new Map< string, number >();\nfunction keyMax( l: number, h: number, gamut: string, cap: number ): string {\n\t// Quantize to keep cache compact\n\tconst lq = quantize( l, 0.05 );\n\tconst hq = quantize( normalizeHue( h ), 10 );\n\tconst cq = quantize( cap, 0.05 );\n\treturn `${ gamut }|L:${ lq }|H:${ hq }|cap:${ cq }`;\n}\n\nfunction quantize( x: number, step: number ): number {\n\tconst k = Math.round( x / step );\n\treturn k * step;\n}\n\nfunction getCachedMaxChromaAtLH(\n\tl: number,\n\th: number,\n\tgamutSpace: ColorSpace,\n\tcap: number\n): number {\n\tconst gamut = gamutSpace.id;\n\tconst key = keyMax( l, h, gamut, cap );\n\tconst hit = maxChromaCache.get( key );\n\tif ( typeof hit === 'number' ) {\n\t\treturn hit;\n\t}\n\n\tconst computed = maxInGamutChromaAtLH( l, h, gamutSpace, cap );\n\tmaxChromaCache.set( key, computed );\n\treturn computed;\n}\n\n/**\n * Find the max in-gamut chroma at fixed (L,H) in the target gamut\n * @param l\n * @param h\n * @param gamutSpace\n * @param cap\n */\nfunction maxInGamutChromaAtLH(\n\tl: number,\n\th: number,\n\tgamutSpace: ColorSpace,\n\tcap: number\n): number {\n\t// Construct a color with maximum chroma.\n\tconst probe: PlainColorObject = {\n\t\tspace: OKLCH,\n\t\tcoords: [ l, cap, h ],\n\t\talpha: 1,\n\t};\n\n\t// Let `toGamut` reduce the chroma to the gamut maximum.\n\tconst clamped = toGamut( probe, { space: gamutSpace, method: 'css' } );\n\n\treturn get( clamped, [ OKLCH, 'c' ] );\n}\n"],
5
+ "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGM;AAKP,OAAO;AA0BA,SAAS,YACf,MACA,SACA,UAA8B,CAAC,GACe;AAC9C,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,QAAQ,QAAQ,SAAS;AAC/B,QAAM,cAAc,QAAQ,eAAe;AAC3C,QAAM,cAAc,QAAQ,eAAe;AAC3C,QAAM,aAAa,QAAQ,cAAc;AACzC,QAAM,SAAS,QAAQ,UAAU;AACjC,QAAM,QAAQ,QAAQ,SAAS;AAC/B,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BAAsB,GAAG,GAAG,YAAY,GAAI;AAC7D,iBAAe,IAAK,KAAK,QAAS;AAClC,SAAO;AACR;AASA,SAAS,qBACR,GACA,GACA,YACA,KACS;AAET,QAAM,QAA0B;AAAA,IAC/B,OAAO;AAAA,IACP,QAAQ,CAAE,GAAG,KAAK,CAAE;AAAA,IACpB,OAAO;AAAA,EACR;AAGA,QAAM,UAAU,QAAS,OAAO,EAAE,OAAO,YAAY,QAAQ,MAAM,CAAE;AAErE,SAAO,IAAK,SAAS,CAAE,OAAO,GAAI,CAAE;AACrC;",
6
6
  "names": ["u", "w"]
7
7
  }
@@ -1,10 +1,14 @@
1
1
  // packages/theme/src/prebuilt/js/design-tokens.js
2
2
  var design_tokens_default = [
3
- "--wpds-border-radius-x-small",
4
- "--wpds-border-radius-small",
5
- "--wpds-border-radius-medium",
6
- "--wpds-border-radius-large",
7
- "--wpds-border-width-focus",
3
+ "--wpds-border-radius-surface-xs",
4
+ "--wpds-border-radius-surface-sm",
5
+ "--wpds-border-radius-surface-md",
6
+ "--wpds-border-radius-surface-lg",
7
+ "--wpds-border-width-surface-xs",
8
+ "--wpds-border-width-surface-sm",
9
+ "--wpds-border-width-surface-md",
10
+ "--wpds-border-width-surface-lg",
11
+ "--wpds-border-width-interactive-focus",
8
12
  "--wpds-color-bg-surface-neutral",
9
13
  "--wpds-color-bg-surface-neutral-strong",
10
14
  "--wpds-color-bg-surface-neutral-weak",
@@ -98,6 +102,12 @@ var design_tokens_default = [
98
102
  "--wpds-dimension-padding-surface-sm",
99
103
  "--wpds-dimension-padding-surface-md",
100
104
  "--wpds-dimension-padding-surface-lg",
105
+ "--wpds-dimension-gap-2xs",
106
+ "--wpds-dimension-gap-xs",
107
+ "--wpds-dimension-gap-sm",
108
+ "--wpds-dimension-gap-md",
109
+ "--wpds-dimension-gap-lg",
110
+ "--wpds-dimension-gap-xl",
101
111
  "--wpds-elevation-x-small",
102
112
  "--wpds-elevation-small",
103
113
  "--wpds-elevation-medium",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/prebuilt/js/design-tokens.js"],
4
- "sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-x-small',\n\t'--wpds-border-radius-small',\n\t'--wpds-border-radius-medium',\n\t'--wpds-border-radius-large',\n\t'--wpds-border-width-focus',\n\t'--wpds-color-bg-surface-neutral',\n\t'--wpds-color-bg-surface-neutral-strong',\n\t'--wpds-color-bg-surface-neutral-weak',\n\t'--wpds-color-bg-surface-brand',\n\t'--wpds-color-bg-surface-success',\n\t'--wpds-color-bg-surface-success-weak',\n\t'--wpds-color-bg-surface-info',\n\t'--wpds-color-bg-surface-info-weak',\n\t'--wpds-color-bg-surface-warning',\n\t'--wpds-color-bg-surface-warning-weak',\n\t'--wpds-color-bg-surface-caution',\n\t'--wpds-color-bg-surface-caution-weak',\n\t'--wpds-color-bg-surface-error',\n\t'--wpds-color-bg-surface-error-weak',\n\t'--wpds-color-bg-interactive-neutral',\n\t'--wpds-color-bg-interactive-neutral-active',\n\t'--wpds-color-bg-interactive-neutral-disabled',\n\t'--wpds-color-bg-interactive-neutral-strong',\n\t'--wpds-color-bg-interactive-neutral-strong-active',\n\t'--wpds-color-bg-interactive-neutral-strong-disabled',\n\t'--wpds-color-bg-interactive-neutral-weak',\n\t'--wpds-color-bg-interactive-neutral-weak-active',\n\t'--wpds-color-bg-interactive-neutral-weak-disabled',\n\t'--wpds-color-bg-interactive-brand',\n\t'--wpds-color-bg-interactive-brand-active',\n\t'--wpds-color-bg-interactive-brand-disabled',\n\t'--wpds-color-bg-interactive-brand-strong',\n\t'--wpds-color-bg-interactive-brand-strong-active',\n\t'--wpds-color-bg-interactive-brand-strong-disabled',\n\t'--wpds-color-bg-interactive-brand-weak',\n\t'--wpds-color-bg-interactive-brand-weak-active',\n\t'--wpds-color-bg-interactive-brand-weak-disabled',\n\t'--wpds-color-bg-track-neutral-weak',\n\t'--wpds-color-bg-track-neutral',\n\t'--wpds-color-bg-thumb-neutral-weak',\n\t'--wpds-color-bg-thumb-neutral-weak-active',\n\t'--wpds-color-bg-thumb-brand',\n\t'--wpds-color-bg-thumb-brand-active',\n\t'--wpds-color-bg-thumb-brand-disabled',\n\t'--wpds-color-fg-content-neutral',\n\t'--wpds-color-fg-content-neutral-weak',\n\t'--wpds-color-fg-content-success',\n\t'--wpds-color-fg-content-success-weak',\n\t'--wpds-color-fg-content-info',\n\t'--wpds-color-fg-content-info-weak',\n\t'--wpds-color-fg-content-warning',\n\t'--wpds-color-fg-content-warning-weak',\n\t'--wpds-color-fg-content-caution',\n\t'--wpds-color-fg-content-caution-weak',\n\t'--wpds-color-fg-content-error',\n\t'--wpds-color-fg-content-error-weak',\n\t'--wpds-color-fg-interactive-neutral',\n\t'--wpds-color-fg-interactive-neutral-active',\n\t'--wpds-color-fg-interactive-neutral-disabled',\n\t'--wpds-color-fg-interactive-neutral-strong',\n\t'--wpds-color-fg-interactive-neutral-strong-active',\n\t'--wpds-color-fg-interactive-neutral-strong-disabled',\n\t'--wpds-color-fg-interactive-neutral-weak',\n\t'--wpds-color-fg-interactive-neutral-weak-disabled',\n\t'--wpds-color-fg-interactive-brand',\n\t'--wpds-color-fg-interactive-brand-active',\n\t'--wpds-color-fg-interactive-brand-disabled',\n\t'--wpds-color-fg-interactive-brand-strong',\n\t'--wpds-color-fg-interactive-brand-strong-active',\n\t'--wpds-color-fg-interactive-brand-strong-disabled',\n\t'--wpds-color-stroke-surface-neutral',\n\t'--wpds-color-stroke-surface-neutral-weak',\n\t'--wpds-color-stroke-surface-neutral-strong',\n\t'--wpds-color-stroke-surface-brand',\n\t'--wpds-color-stroke-surface-brand-strong',\n\t'--wpds-color-stroke-surface-success',\n\t'--wpds-color-stroke-surface-success-strong',\n\t'--wpds-color-stroke-surface-info',\n\t'--wpds-color-stroke-surface-info-strong',\n\t'--wpds-color-stroke-surface-warning',\n\t'--wpds-color-stroke-surface-warning-strong',\n\t'--wpds-color-stroke-surface-error',\n\t'--wpds-color-stroke-surface-error-strong',\n\t'--wpds-color-stroke-interactive-neutral',\n\t'--wpds-color-stroke-interactive-neutral-active',\n\t'--wpds-color-stroke-interactive-neutral-disabled',\n\t'--wpds-color-stroke-interactive-neutral-strong',\n\t'--wpds-color-stroke-interactive-brand',\n\t'--wpds-color-stroke-interactive-brand-active',\n\t'--wpds-color-stroke-interactive-brand-disabled',\n\t'--wpds-color-stroke-interactive-error-strong',\n\t'--wpds-color-stroke-focus-brand',\n\t'--wpds-dimension-base',\n\t'--wpds-dimension-padding-surface-2xs',\n\t'--wpds-dimension-padding-surface-xs',\n\t'--wpds-dimension-padding-surface-sm',\n\t'--wpds-dimension-padding-surface-md',\n\t'--wpds-dimension-padding-surface-lg',\n\t'--wpds-elevation-x-small',\n\t'--wpds-elevation-small',\n\t'--wpds-elevation-medium',\n\t'--wpds-elevation-large',\n\t'--wpds-font-family-heading',\n\t'--wpds-font-family-body',\n\t'--wpds-font-family-mono',\n\t'--wpds-font-size-x-small',\n\t'--wpds-font-size-small',\n\t'--wpds-font-size-medium',\n\t'--wpds-font-size-large',\n\t'--wpds-font-size-x-large',\n\t'--wpds-font-size-2x-large',\n\t'--wpds-font-line-height-x-small',\n\t'--wpds-font-line-height-small',\n\t'--wpds-font-line-height-medium',\n\t'--wpds-font-line-height-large',\n\t'--wpds-font-line-height-x-large',\n\t'--wpds-font-line-height-2x-large',\n];\n"],
5
- "mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-surface-xs',\n\t'--wpds-border-radius-surface-sm',\n\t'--wpds-border-radius-surface-md',\n\t'--wpds-border-radius-surface-lg',\n\t'--wpds-border-width-surface-xs',\n\t'--wpds-border-width-surface-sm',\n\t'--wpds-border-width-surface-md',\n\t'--wpds-border-width-surface-lg',\n\t'--wpds-border-width-interactive-focus',\n\t'--wpds-color-bg-surface-neutral',\n\t'--wpds-color-bg-surface-neutral-strong',\n\t'--wpds-color-bg-surface-neutral-weak',\n\t'--wpds-color-bg-surface-brand',\n\t'--wpds-color-bg-surface-success',\n\t'--wpds-color-bg-surface-success-weak',\n\t'--wpds-color-bg-surface-info',\n\t'--wpds-color-bg-surface-info-weak',\n\t'--wpds-color-bg-surface-warning',\n\t'--wpds-color-bg-surface-warning-weak',\n\t'--wpds-color-bg-surface-caution',\n\t'--wpds-color-bg-surface-caution-weak',\n\t'--wpds-color-bg-surface-error',\n\t'--wpds-color-bg-surface-error-weak',\n\t'--wpds-color-bg-interactive-neutral',\n\t'--wpds-color-bg-interactive-neutral-active',\n\t'--wpds-color-bg-interactive-neutral-disabled',\n\t'--wpds-color-bg-interactive-neutral-strong',\n\t'--wpds-color-bg-interactive-neutral-strong-active',\n\t'--wpds-color-bg-interactive-neutral-strong-disabled',\n\t'--wpds-color-bg-interactive-neutral-weak',\n\t'--wpds-color-bg-interactive-neutral-weak-active',\n\t'--wpds-color-bg-interactive-neutral-weak-disabled',\n\t'--wpds-color-bg-interactive-brand',\n\t'--wpds-color-bg-interactive-brand-active',\n\t'--wpds-color-bg-interactive-brand-disabled',\n\t'--wpds-color-bg-interactive-brand-strong',\n\t'--wpds-color-bg-interactive-brand-strong-active',\n\t'--wpds-color-bg-interactive-brand-strong-disabled',\n\t'--wpds-color-bg-interactive-brand-weak',\n\t'--wpds-color-bg-interactive-brand-weak-active',\n\t'--wpds-color-bg-interactive-brand-weak-disabled',\n\t'--wpds-color-bg-track-neutral-weak',\n\t'--wpds-color-bg-track-neutral',\n\t'--wpds-color-bg-thumb-neutral-weak',\n\t'--wpds-color-bg-thumb-neutral-weak-active',\n\t'--wpds-color-bg-thumb-brand',\n\t'--wpds-color-bg-thumb-brand-active',\n\t'--wpds-color-bg-thumb-brand-disabled',\n\t'--wpds-color-fg-content-neutral',\n\t'--wpds-color-fg-content-neutral-weak',\n\t'--wpds-color-fg-content-success',\n\t'--wpds-color-fg-content-success-weak',\n\t'--wpds-color-fg-content-info',\n\t'--wpds-color-fg-content-info-weak',\n\t'--wpds-color-fg-content-warning',\n\t'--wpds-color-fg-content-warning-weak',\n\t'--wpds-color-fg-content-caution',\n\t'--wpds-color-fg-content-caution-weak',\n\t'--wpds-color-fg-content-error',\n\t'--wpds-color-fg-content-error-weak',\n\t'--wpds-color-fg-interactive-neutral',\n\t'--wpds-color-fg-interactive-neutral-active',\n\t'--wpds-color-fg-interactive-neutral-disabled',\n\t'--wpds-color-fg-interactive-neutral-strong',\n\t'--wpds-color-fg-interactive-neutral-strong-active',\n\t'--wpds-color-fg-interactive-neutral-strong-disabled',\n\t'--wpds-color-fg-interactive-neutral-weak',\n\t'--wpds-color-fg-interactive-neutral-weak-disabled',\n\t'--wpds-color-fg-interactive-brand',\n\t'--wpds-color-fg-interactive-brand-active',\n\t'--wpds-color-fg-interactive-brand-disabled',\n\t'--wpds-color-fg-interactive-brand-strong',\n\t'--wpds-color-fg-interactive-brand-strong-active',\n\t'--wpds-color-fg-interactive-brand-strong-disabled',\n\t'--wpds-color-stroke-surface-neutral',\n\t'--wpds-color-stroke-surface-neutral-weak',\n\t'--wpds-color-stroke-surface-neutral-strong',\n\t'--wpds-color-stroke-surface-brand',\n\t'--wpds-color-stroke-surface-brand-strong',\n\t'--wpds-color-stroke-surface-success',\n\t'--wpds-color-stroke-surface-success-strong',\n\t'--wpds-color-stroke-surface-info',\n\t'--wpds-color-stroke-surface-info-strong',\n\t'--wpds-color-stroke-surface-warning',\n\t'--wpds-color-stroke-surface-warning-strong',\n\t'--wpds-color-stroke-surface-error',\n\t'--wpds-color-stroke-surface-error-strong',\n\t'--wpds-color-stroke-interactive-neutral',\n\t'--wpds-color-stroke-interactive-neutral-active',\n\t'--wpds-color-stroke-interactive-neutral-disabled',\n\t'--wpds-color-stroke-interactive-neutral-strong',\n\t'--wpds-color-stroke-interactive-brand',\n\t'--wpds-color-stroke-interactive-brand-active',\n\t'--wpds-color-stroke-interactive-brand-disabled',\n\t'--wpds-color-stroke-interactive-error-strong',\n\t'--wpds-color-stroke-focus-brand',\n\t'--wpds-dimension-base',\n\t'--wpds-dimension-padding-surface-2xs',\n\t'--wpds-dimension-padding-surface-xs',\n\t'--wpds-dimension-padding-surface-sm',\n\t'--wpds-dimension-padding-surface-md',\n\t'--wpds-dimension-padding-surface-lg',\n\t'--wpds-dimension-gap-2xs',\n\t'--wpds-dimension-gap-xs',\n\t'--wpds-dimension-gap-sm',\n\t'--wpds-dimension-gap-md',\n\t'--wpds-dimension-gap-lg',\n\t'--wpds-dimension-gap-xl',\n\t'--wpds-elevation-x-small',\n\t'--wpds-elevation-small',\n\t'--wpds-elevation-medium',\n\t'--wpds-elevation-large',\n\t'--wpds-font-family-heading',\n\t'--wpds-font-family-body',\n\t'--wpds-font-family-mono',\n\t'--wpds-font-size-x-small',\n\t'--wpds-font-size-small',\n\t'--wpds-font-size-medium',\n\t'--wpds-font-size-large',\n\t'--wpds-font-size-x-large',\n\t'--wpds-font-size-2x-large',\n\t'--wpds-font-line-height-x-small',\n\t'--wpds-font-line-height-small',\n\t'--wpds-font-line-height-medium',\n\t'--wpds-font-line-height-large',\n\t'--wpds-font-line-height-x-large',\n\t'--wpds-font-line-height-2x-large',\n];\n"],
5
+ "mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,29 +1,53 @@
1
1
  {
2
- "Border/radius-x-small": {
2
+ "Border/radius-surface-xs": {
3
3
  "value": {
4
4
  ".": "1px"
5
5
  },
6
- "description": "Extra small radius"
6
+ "description": "Extra small radius for surfaces"
7
7
  },
8
- "Border/radius-small": {
8
+ "Border/radius-surface-sm": {
9
9
  "value": {
10
10
  ".": "2px"
11
11
  },
12
- "description": "Small radius"
12
+ "description": "Small radius for surfaces"
13
13
  },
14
- "Border/radius-medium": {
14
+ "Border/radius-surface-md": {
15
15
  "value": {
16
16
  ".": "4px"
17
17
  },
18
- "description": "Medium radius"
18
+ "description": "Medium radius for surfaces"
19
19
  },
20
- "Border/radius-large": {
20
+ "Border/radius-surface-lg": {
21
21
  "value": {
22
22
  ".": "8px"
23
23
  },
24
- "description": "Large radius"
24
+ "description": "Large radius for surfaces"
25
25
  },
26
- "Border/width-focus": {
26
+ "Border/width-surface-xs": {
27
+ "value": {
28
+ ".": "1px"
29
+ },
30
+ "description": "Extra small width for surfaces"
31
+ },
32
+ "Border/width-surface-sm": {
33
+ "value": {
34
+ ".": "2px"
35
+ },
36
+ "description": "Small width for surfaces"
37
+ },
38
+ "Border/width-surface-md": {
39
+ "value": {
40
+ ".": "4px"
41
+ },
42
+ "description": "Medium width for surfaces"
43
+ },
44
+ "Border/width-surface-lg": {
45
+ "value": {
46
+ ".": "8px"
47
+ },
48
+ "description": "Large width for surfaces"
49
+ },
50
+ "Border/width-interactive-focus": {
27
51
  "value": {
28
52
  ".": "2px",
29
53
  "high-dpi": "1.5px"
@@ -56,61 +80,61 @@
56
80
  },
57
81
  "Color/Semantic/Background/Success/bgSur-success": {
58
82
  "value": {
59
- ".": "#cbf5d1"
83
+ ".": "#c5f7cc"
60
84
  },
61
85
  "description": "Background color for surfaces with success tone and normal emphasis."
62
86
  },
63
87
  "Color/Semantic/Background/Success/bgSur-success-weak": {
64
88
  "value": {
65
- ".": "#f0fcf2"
89
+ ".": "#eaffed"
66
90
  },
67
91
  "description": "Background color for surfaces with success tone and weak emphasis."
68
92
  },
69
93
  "Color/Semantic/Background/Info/bgSur-info": {
70
94
  "value": {
71
- ".": "#dfebf8"
95
+ ".": "#deebfa"
72
96
  },
73
97
  "description": "Background color for surfaces with info tone and normal emphasis."
74
98
  },
75
99
  "Color/Semantic/Background/Info/bgSur-info-weak": {
76
100
  "value": {
77
- ".": "#f5f9fd"
101
+ ".": "#f3f9ff"
78
102
  },
79
103
  "description": "Background color for surfaces with info tone and weak emphasis."
80
104
  },
81
105
  "Color/Semantic/Background/Warning/bgSur-warning": {
82
106
  "value": {
83
- ".": "#f8e8cc"
107
+ ".": "#fde6bd"
84
108
  },
85
109
  "description": "Background color for surfaces with warning tone and normal emphasis."
86
110
  },
87
111
  "Color/Semantic/Background/Warning/bgSur-warning-weak": {
88
112
  "value": {
89
- ".": "#fdf7ee"
113
+ ".": "#fff7e0"
90
114
  },
91
115
  "description": "Background color for surfaces with warning tone and weak emphasis."
92
116
  },
93
117
  "Color/Semantic/Background/Caution/bgSur-caution": {
94
118
  "value": {
95
- ".": "#f7eab3"
119
+ ".": "#fee994"
96
120
  },
97
121
  "description": "Background color for surfaces with caution tone and normal emphasis."
98
122
  },
99
123
  "Color/Semantic/Background/Caution/bgSur-caution-weak": {
100
124
  "value": {
101
- ".": "#fdf9e7"
125
+ ".": "#fff9c9"
102
126
  },
103
127
  "description": "Background color for surfaces with caution tone and weak emphasis."
104
128
  },
105
129
  "Color/Semantic/Background/Error/bgSur-error": {
106
130
  "value": {
107
- ".": "#fae4e1"
131
+ ".": "#f6e6e3"
108
132
  },
109
133
  "description": "Background color for surfaces with error tone and normal emphasis."
110
134
  },
111
135
  "Color/Semantic/Background/Error/bgSur-error-weak": {
112
136
  "value": {
113
- ".": "#fdf6f5"
137
+ ".": "#fff6f4"
114
138
  },
115
139
  "description": "Background color for surfaces with error tone and weak emphasis."
116
140
  },
@@ -176,7 +200,7 @@
176
200
  },
177
201
  "Color/Semantic/Background/Brand/bgInt-brand-active": {
178
202
  "value": {
179
- ".": "#f6f8fc"
203
+ ".": "#f6f8fd"
180
204
  },
181
205
  "description": "Background color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active."
182
206
  },
@@ -212,7 +236,7 @@
212
236
  },
213
237
  "Color/Semantic/Background/Brand/bgInt-brand-weak-active": {
214
238
  "value": {
215
- ".": "#e4eaf7"
239
+ ".": "#e6eaf4"
216
240
  },
217
241
  "description": "Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active."
218
242
  },
@@ -308,7 +332,7 @@
308
332
  },
309
333
  "Color/Semantic/Foreground/Warning/fgCon-warning-weak": {
310
334
  "value": {
311
- ".": "#936400"
335
+ ".": "#926300"
312
336
  },
313
337
  "description": "Foreground color for content like text with warning tone and weak emphasis."
314
338
  },
@@ -320,7 +344,7 @@
320
344
  },
321
345
  "Color/Semantic/Foreground/Caution/fgCon-caution-weak": {
322
346
  "value": {
323
- ".": "#836b00"
347
+ ".": "#826a00"
324
348
  },
325
349
  "description": "Foreground color for content like text with caution tone and weak emphasis."
326
350
  },
@@ -440,7 +464,7 @@
440
464
  },
441
465
  "Color/Semantic/Stroke/Brand/strokeSur-brand": {
442
466
  "value": {
443
- ".": "#a2b1d6"
467
+ ".": "#a3b1d4"
444
468
  },
445
469
  "description": "Decorative stroke color used to define brand-toned surface boundaries with normal emphasis."
446
470
  },
@@ -452,7 +476,7 @@
452
476
  },
453
477
  "Color/Semantic/Stroke/Success/strokeSur-success": {
454
478
  "value": {
455
- ".": "#82c98f"
479
+ ".": "#8ac894"
456
480
  },
457
481
  "description": "Decorative stroke color used to define success-toned surface boundaries with normal emphasis."
458
482
  },
@@ -464,7 +488,7 @@
464
488
  },
465
489
  "Color/Semantic/Stroke/Info/strokeSur-info": {
466
490
  "value": {
467
- ".": "#9fbcdd"
491
+ ".": "#9fbcdc"
468
492
  },
469
493
  "description": "Decorative stroke color used to define info-toned surface boundaries with normal emphasis."
470
494
  },
@@ -476,19 +500,19 @@
476
500
  },
477
501
  "Color/Semantic/Stroke/Warning/strokeSur-warning": {
478
502
  "value": {
479
- ".": "#d2b581"
503
+ ".": "#d0b381"
480
504
  },
481
505
  "description": "Decorative stroke color used to define warning-toned surface boundaries with normal emphasis."
482
506
  },
483
507
  "Color/Semantic/Stroke/Warning/strokeSur-warning-strong": {
484
508
  "value": {
485
- ".": "#936400"
509
+ ".": "#926300"
486
510
  },
487
511
  "description": "Decorative stroke color used to define warning-toned surface boundaries with strong emphasis."
488
512
  },
489
513
  "Color/Semantic/Stroke/Error/strokeSur-error": {
490
514
  "value": {
491
- ".": "#e1a198"
515
+ ".": "#daa39b"
492
516
  },
493
517
  "description": "Decorative stroke color used to define error-toned surface boundaries with normal emphasis."
494
518
  },
@@ -598,6 +622,54 @@
598
622
  },
599
623
  "description": "Large spacing for surfaces"
600
624
  },
625
+ "Dimension/Semantic/gap-2xs": {
626
+ "value": {
627
+ ".": "4px",
628
+ "compact": "4px",
629
+ "comfortable": "8px"
630
+ },
631
+ "description": "2x extra small gap"
632
+ },
633
+ "Dimension/Semantic/gap-xs": {
634
+ "value": {
635
+ ".": "8px",
636
+ "compact": "4px",
637
+ "comfortable": "12px"
638
+ },
639
+ "description": "Extra small gap"
640
+ },
641
+ "Dimension/Semantic/gap-sm": {
642
+ "value": {
643
+ ".": "12px",
644
+ "compact": "8px",
645
+ "comfortable": "16px"
646
+ },
647
+ "description": "Small gap"
648
+ },
649
+ "Dimension/Semantic/gap-md": {
650
+ "value": {
651
+ ".": "16px",
652
+ "compact": "12px",
653
+ "comfortable": "20px"
654
+ },
655
+ "description": "Medium gap"
656
+ },
657
+ "Dimension/Semantic/gap-lg": {
658
+ "value": {
659
+ ".": "24px",
660
+ "compact": "20px",
661
+ "comfortable": "32px"
662
+ },
663
+ "description": "Large gap"
664
+ },
665
+ "Dimension/Semantic/gap-xl": {
666
+ "value": {
667
+ ".": "40px",
668
+ "compact": "32px",
669
+ "comfortable": "48px"
670
+ },
671
+ "description": "Extra large gap"
672
+ },
601
673
  "Elevation/x-small": {
602
674
  "value": {
603
675
  ".": "0 1px 1px 0 color(srgb 0 0 0 / 0.03), 0 1px 2px 0 color(srgb 0 0 0 / 0.02), 0 3px 3px 0 color(srgb 0 0 0 / 0.02), 0 4px 4px 0 color(srgb 0 0 0 / 0.01)"
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { type ColorTypes } from 'colorjs.io/fn';
4
+ import { type PlainColorObject } from 'colorjs.io/fn';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
@@ -12,7 +12,6 @@ import { type TaperChromaOptions } from './taper-chroma';
12
12
  * - the L applied to the seed meets the contrast target against the reference
13
13
  * - the search is performed in one direction (ie lighter / darker)
14
14
  * - more constraints can be applied around lightness
15
- * - chroma could be tapered
16
15
  * @param reference
17
16
  * @param seed
18
17
  * @param target
@@ -23,14 +22,14 @@ import { type TaperChromaOptions } from './taper-chroma';
23
22
  * @param options.lightnessConstraint.value
24
23
  * @param options.taperChromaOptions
25
24
  */
26
- export declare function findColorMeetingRequirements(reference: ColorTypes, seed: ColorTypes, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
25
+ export declare function findColorMeetingRequirements(reference: PlainColorObject, seed: PlainColorObject, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
27
26
  lightnessConstraint?: {
28
27
  type: 'force' | 'onlyIfSucceeds';
29
28
  value: number;
30
29
  };
31
30
  taperChromaOptions?: TaperChromaOptions;
32
31
  }): {
33
- color: ColorTypes;
32
+ color: PlainColorObject;
34
33
  reached: boolean;
35
34
  achieved: number;
36
35
  deficit?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAoG7E"}
1
+ {"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IACF,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAoGA"}
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { type ColorTypes, type ColorObject } from 'colorjs.io/fn';
4
+ import { type PlainColorObject, type ColorSpace } from 'colorjs.io/fn';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
8
  import './register-color-spaces';
9
9
  export interface TaperChromaOptions {
10
- gamut?: 'p3' | 'srgb';
10
+ gamut?: ColorSpace;
11
11
  alpha?: number;
12
12
  carry?: number;
13
13
  cUpperBound?: number;
@@ -27,10 +27,10 @@ export interface TaperChromaOptions {
27
27
  * @param lTarget
28
28
  * @param options
29
29
  */
30
- export declare function taperChroma(seed: ColorTypes, // already OKLCH
30
+ export declare function taperChroma(seed: PlainColorObject, // already OKLCH
31
31
  lTarget: number, // [0..1]
32
32
  options?: TaperChromaOptions): {
33
33
  l: number;
34
34
  c: number;
35
- } | ColorObject;
35
+ } | PlainColorObject;
36
36
  //# sourceMappingURL=taper-chroma.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAMN,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,UAAU,EAAE,gBAAgB;AAClC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CA8ExC"}
1
+ {"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAKN,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,gBAAgB,EAAE,gBAAgB;AACxC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CA+D7C"}
package/docs/ds-tokens.md CHANGED
@@ -9,13 +9,17 @@ Do not edit directly.
9
9
 
10
10
  ### Border
11
11
 
12
- | Variable name | Description |
13
- | ------------------------------ | --------------------------- |
14
- | `--wpds-border-radius-x-small` | Extra small radius |
15
- | `--wpds-border-radius-small` | Small radius |
16
- | `--wpds-border-radius-medium` | Medium radius |
17
- | `--wpds-border-radius-large` | Large radius |
18
- | `--wpds-border-width-focus` | Border width for focus ring |
12
+ | Variable name | Description |
13
+ | --------------------------------------- | ------------------------------- |
14
+ | `--wpds-border-radius-surface-xs` | Extra small radius for surfaces |
15
+ | `--wpds-border-radius-surface-sm` | Small radius for surfaces |
16
+ | `--wpds-border-radius-surface-md` | Medium radius for surfaces |
17
+ | `--wpds-border-radius-surface-lg` | Large radius for surfaces |
18
+ | `--wpds-border-width-surface-xs` | Extra small width for surfaces |
19
+ | `--wpds-border-width-surface-sm` | Small width for surfaces |
20
+ | `--wpds-border-width-surface-md` | Medium width for surfaces |
21
+ | `--wpds-border-width-surface-lg` | Large width for surfaces |
22
+ | `--wpds-border-width-interactive-focus` | Border width for focus ring |
19
23
 
20
24
  ### Color
21
25
 
@@ -119,6 +123,12 @@ Do not edit directly.
119
123
  | `--wpds-dimension-padding-surface-sm` | Small spacing for surfaces |
120
124
  | `--wpds-dimension-padding-surface-md` | Medium spacing for surfaces |
121
125
  | `--wpds-dimension-padding-surface-lg` | Large spacing for surfaces |
126
+ | `--wpds-dimension-gap-2xs` | 2x extra small gap |
127
+ | `--wpds-dimension-gap-xs` | Extra small gap |
128
+ | `--wpds-dimension-gap-sm` | Small gap |
129
+ | `--wpds-dimension-gap-md` | Medium gap |
130
+ | `--wpds-dimension-gap-lg` | Large gap |
131
+ | `--wpds-dimension-gap-xl` | Extra large gap |
122
132
 
123
133
  ### Elevation
124
134