basalt-ui 2.20.0 → 2.21.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 (132) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/MIGRATING.md +129 -12
  3. package/agent/agents/basalt-design-reviewer.md +22 -5
  4. package/agent/rules/basalt-tokens.md +2 -2
  5. package/agent/skills/basalt-design/SKILL.md +10 -23
  6. package/agent/skills/basalt-design/references/anti-defaults.md +24 -0
  7. package/agent/skills/basalt-design/references/catalogue.md +48 -0
  8. package/agent/skills/basalt-design/references/concept.md +36 -0
  9. package/agent/skills/basalt-design/references/encoding-rules.md +45 -0
  10. package/agent/skills/basalt-design/references/stat-tile.md +24 -0
  11. package/agent/templates/AGENTS-block.md.tpl +3 -3
  12. package/configs/oxlint-plugin.js +1 -0
  13. package/dist/charts/ChartCard.d.ts +6 -2
  14. package/dist/charts/ChartCard.d.ts.map +1 -1
  15. package/dist/charts/ChartCard.js +4 -0
  16. package/dist/charts/state.d.ts +5 -0
  17. package/dist/charts/state.d.ts.map +1 -1
  18. package/dist/charts/state.js +2 -0
  19. package/dist/cli/check-theme.d.ts.map +1 -1
  20. package/dist/cli/check-theme.js +3 -0
  21. package/dist/cli/help.d.ts.map +1 -1
  22. package/dist/cli/help.js +3 -2
  23. package/dist/cli/index.d.ts +4 -2
  24. package/dist/cli/index.d.ts.map +1 -1
  25. package/dist/cli/index.js +27 -15
  26. package/dist/cli/init.d.ts.map +1 -1
  27. package/dist/cli/init.js +3 -2
  28. package/dist/cli/shot/capture.d.ts.map +1 -1
  29. package/dist/cli/shot/capture.js +6 -1
  30. package/dist/cli/shot/detect.d.ts +51 -0
  31. package/dist/cli/shot/detect.d.ts.map +1 -0
  32. package/dist/cli/shot/detect.js +396 -0
  33. package/dist/cli/shot/index.d.ts.map +1 -1
  34. package/dist/cli/shot/index.js +7 -4
  35. package/dist/cli/shot/measure.d.ts +2 -0
  36. package/dist/cli/shot/measure.d.ts.map +1 -1
  37. package/dist/cli/shot/measure.js +2 -0
  38. package/dist/cli/shot/types.d.ts +4 -1
  39. package/dist/cli/shot/types.d.ts.map +1 -1
  40. package/dist/cli/shot/types.js +2 -0
  41. package/dist/cli/sync.d.ts +2 -0
  42. package/dist/cli/sync.d.ts.map +1 -1
  43. package/dist/cli/sync.js +2 -2
  44. package/dist/common/retry-button.d.ts +12 -0
  45. package/dist/common/retry-button.d.ts.map +1 -0
  46. package/dist/common/retry-button.js +22 -0
  47. package/dist/common/retry-button.module.css +58 -0
  48. package/dist/common/retry-button.module.css.d.ts +8 -0
  49. package/dist/dashboard/bar-list.d.ts +5 -2
  50. package/dist/dashboard/bar-list.d.ts.map +1 -1
  51. package/dist/dashboard/bar-list.js +2 -2
  52. package/dist/dashboard/meter-model.d.ts +34 -6
  53. package/dist/dashboard/meter-model.d.ts.map +1 -1
  54. package/dist/dashboard/meter-model.js +44 -13
  55. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  56. package/dist/dashboard/meter-parts.js +167 -135
  57. package/dist/dashboard/meter.d.ts +11 -7
  58. package/dist/dashboard/meter.d.ts.map +1 -1
  59. package/dist/dashboard/meter.js +5 -1
  60. package/dist/dashboard/meter.module.css +18 -65
  61. package/dist/dashboard/meter.module.css.d.ts +2 -7
  62. package/dist/dashboard/query-state.d.ts +1 -1
  63. package/dist/dashboard/query-state.d.ts.map +1 -1
  64. package/dist/dashboard/query-state.js +3 -2
  65. package/dist/dashboard/stat-card.d.ts.map +1 -1
  66. package/dist/dashboard/stat-card.js +2 -1
  67. package/dist/dashboard/stat-strip.d.ts +17 -0
  68. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  69. package/dist/dashboard/stat-strip.js +35 -5
  70. package/dist/dashboard/stat-strip.module.css +97 -14
  71. package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
  72. package/dist/dashboard/visual-slot.d.ts +2 -0
  73. package/dist/dashboard/visual-slot.d.ts.map +1 -0
  74. package/dist/dashboard/visual-slot.js +5 -0
  75. package/dist/guard/index.d.ts +15 -2
  76. package/dist/guard/index.d.ts.map +1 -1
  77. package/dist/guard/index.js +14 -0
  78. package/dist/guard/palette.d.ts +51 -0
  79. package/dist/guard/palette.d.ts.map +1 -0
  80. package/dist/guard/palette.js +190 -0
  81. package/dist/guard/series-file.d.ts +15 -0
  82. package/dist/guard/series-file.d.ts.map +1 -0
  83. package/dist/guard/series-file.js +29 -0
  84. package/dist/guard/types.d.ts +3 -3
  85. package/dist/guard/types.d.ts.map +1 -1
  86. package/dist/surfaces.d.ts +1 -1
  87. package/dist/surfaces.d.ts.map +1 -1
  88. package/dist/surfaces.js +2 -0
  89. package/dist/theme/controls.module.css +10 -0
  90. package/dist/theme/index.d.ts.map +1 -1
  91. package/dist/theme/index.js +18 -0
  92. package/dist/tokens/oklab.d.ts +28 -0
  93. package/dist/tokens/oklab.d.ts.map +1 -0
  94. package/dist/tokens/oklab.js +73 -0
  95. package/llms.txt +7 -5
  96. package/package.json +1 -1
  97. package/src/charts/ChartCard.tsx +9 -1
  98. package/src/charts/state.tsx +9 -0
  99. package/src/cli/check-theme.ts +3 -0
  100. package/src/cli/help.ts +18 -1
  101. package/src/cli/index.ts +48 -17
  102. package/src/cli/init.ts +2 -1
  103. package/src/cli/shot/capture.ts +15 -2
  104. package/src/cli/shot/detect.ts +533 -0
  105. package/src/cli/shot/index.ts +8 -4
  106. package/src/cli/shot/measure.ts +4 -0
  107. package/src/cli/shot/types.ts +5 -1
  108. package/src/cli/sync.ts +4 -2
  109. package/src/common/retry-button.module.css +58 -0
  110. package/src/common/retry-button.module.css.d.ts +8 -0
  111. package/src/common/retry-button.tsx +29 -0
  112. package/src/dashboard/bar-list.tsx +11 -8
  113. package/src/dashboard/meter-model.ts +91 -20
  114. package/src/dashboard/meter-parts.tsx +155 -115
  115. package/src/dashboard/meter.module.css +18 -65
  116. package/src/dashboard/meter.module.css.d.ts +2 -7
  117. package/src/dashboard/meter.tsx +18 -8
  118. package/src/dashboard/query-state.tsx +4 -7
  119. package/src/dashboard/stat-card.tsx +4 -1
  120. package/src/dashboard/stat-strip.module.css +97 -14
  121. package/src/dashboard/stat-strip.module.css.d.ts +4 -0
  122. package/src/dashboard/stat-strip.tsx +85 -5
  123. package/src/dashboard/visual-slot.ts +8 -0
  124. package/src/guard/index.ts +16 -4
  125. package/src/guard/palette.ts +261 -0
  126. package/src/guard/series-file.ts +51 -0
  127. package/src/guard/types.ts +3 -2
  128. package/src/surfaces.ts +2 -0
  129. package/src/theme/__snapshots__/plain-theme.test.ts.snap +82 -48
  130. package/src/theme/controls.module.css +10 -0
  131. package/src/theme/index.ts +26 -0
  132. package/src/tokens/oklab.ts +97 -0
@@ -266,6 +266,11 @@ const GRACE_PERIOD_KINDS = {
266
266
  since: "2.16.0",
267
267
  promote: "2.24.0",
268
268
  why: "The scale moved to 8/12/16/20/24 and the CSS micro ceiling dropped 10 \u2192 7 in 2.16.0: a literal 8px/10px in CSS is newly a finding."
269
+ },
270
+ "series-palette": {
271
+ since: "2.21.0",
272
+ promote: "2.23.0",
273
+ why: "New in 2.21.0: the series file is judged by computed lightness, chroma, colour-blind separation and contrast; a palette that was tuned by eye is newly a finding."
269
274
  }
270
275
  };
271
276
  function severityOf(kind, cfg) {
@@ -950,6 +955,13 @@ const GUARD_RULES = {
950
955
  pattern: VX_VAR_REF,
951
956
  // handled inline (basalt-owned families); entry keeps the registry complete
952
957
  message: `var() names a --vx-* token basalt does not emit, so it resolves to its fallback (or to nothing) with no error anywhere. Judged: every name inside a basalt-owned family (${[...BASALT_VX_FAMILY_SET].join(", ")}), plus any name basalt used to emit in any family \u2014 pick the token from the stylesheet basalt-ui tokens:css emits; your own series belong in a family of their own (groupTokens throws on one inside basalt's, in dev builds). A removed name is reported with its replacement on the finding line (MIGRATING.md has the table). Any other name outside a basalt family is never judged, because groupTokens may declare it in a file this scan cannot see.`
958
+ },
959
+ "series-palette": {
960
+ kind: "series-palette",
961
+ pattern: /(?!)/,
962
+ // never matches: judged over the whole series FILE by `series-file.ts`, not per line
963
+ appliesTo: () => false,
964
+ message: "The series file's palette fails a computed check (OKLCH lightness band, chroma floor, colour-blind separation of neighbours, worst-pair separation, 3:1 contrast against the surface, \u2264 8 series without a repeat) \u2014 retune the hex in the series file; it is judged per scheme, light against the light panel and dark against the dark one. A deliberately neutral series is keyed `other`."
953
965
  }
954
966
  };
955
967
  function guardKindRemedy(kind) {
@@ -1307,6 +1319,8 @@ export {
1307
1319
  findAllowAnnotations,
1308
1320
  guardKindRemedy,
1309
1321
  guardWaiverHint,
1322
+ isRuleExempt,
1310
1323
  neutralizeAllowAnnotation,
1324
+ severityOf,
1311
1325
  unmatchedExemptPatterns
1312
1326
  };
@@ -0,0 +1,51 @@
1
+ export type SeriesScheme = 'light' | 'dark';
2
+ /** The surface each scheme's series are judged against. */
3
+ export type SeriesSurfaces = Record<SeriesScheme, string>;
4
+ export type SeriesCheck = 'format' | 'lightness' | 'chroma' | 'cvd' | 'separation' | 'contrast' | 'order';
5
+ export type SeriesEntry = {
6
+ readonly key: string;
7
+ readonly light: string;
8
+ readonly dark: string;
9
+ /** 1-based line of the entry in the scanned source. */
10
+ readonly line: number;
11
+ };
12
+ export type SeriesGroup = {
13
+ readonly line: number;
14
+ readonly entries: readonly SeriesEntry[];
15
+ };
16
+ export type SeriesIssue = {
17
+ readonly check: SeriesCheck;
18
+ readonly scheme: SeriesScheme;
19
+ readonly keys: readonly string[];
20
+ readonly measured: number;
21
+ readonly threshold: number;
22
+ /** Line of the first named key. */
23
+ readonly line: number;
24
+ readonly message: string;
25
+ };
26
+ /**
27
+ * OKLCH lightness bands, per scheme.
28
+ * - light [0.43, 0.77] — the brief's band: below 0.43 a series reads as ink, above 0.77 it washes
29
+ * out on the panel (3:1 bites earlier, near L 0.67, on the default light panel).
30
+ * - dark [0.58, 0.88] — lower bound is where a hue clears 3:1 against the default dark panel
31
+ * (#2b2b2e, L 0.29 → L ≈ 0.56, rounded up for margin); the upper bound keeps a clear step below
32
+ * white so a bright series does not glow against the dark page.
33
+ */
34
+ export declare const LIGHTNESS_BAND: Record<SeriesScheme, readonly [number, number]>;
35
+ /** Minimum OKLCH chroma of a categorical hue. */
36
+ export declare const CHROMA_FLOOR = 0.1;
37
+ /** Minimum OKLab ΔE×100 between ADJACENT series under protanopia and deuteranopia. */
38
+ export declare const CVD_ADJACENT_MIN = 8;
39
+ /** Minimum OKLab ΔE×100 of the worst pair in a group, normal vision. */
40
+ export declare const SEPARATION_MIN = 15;
41
+ /** Minimum WCAG contrast of a series against its scheme's surface. */
42
+ export declare const CONTRAST_MIN = 3;
43
+ /** More categorical series than this and the next one folds into Other. */
44
+ export declare const MAX_SERIES = 8;
45
+ /** The one escape: a series keyed `other` is deliberately neutral — exempt from the chroma floor only. */
46
+ export declare const NEUTRAL_KEY = "other";
47
+ /** Every `defineSeries(...)` call in `source`, as an ordered group of its literal `{ light, dark }` hex pairs. */
48
+ export declare function parseSeriesGroups(source: string): SeriesGroup[];
49
+ /** Judge every group against the six checks. */
50
+ export declare function auditSeriesGroups(groups: readonly SeriesGroup[], surfaces: SeriesSurfaces): SeriesIssue[];
51
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/guard/palette.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAA;AAC3C,2DAA2D;AAC3D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AAEzD,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,KAAK,GACL,YAAY,GACZ,UAAU,GACV,OAAO,CAAA;AAEX,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,uDA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0 +1,190 @@
1
+ import { contrastRatio } from "../tokens/hct.js";
2
+ import { deltaEOk, deltaEOkCvd, hexToOklch } from "../tokens/oklab.js";
3
+ const LIGHTNESS_BAND = {
4
+ light: [0.43, 0.77],
5
+ dark: [0.58, 0.88]
6
+ };
7
+ const CHROMA_FLOOR = 0.1;
8
+ const CVD_ADJACENT_MIN = 8;
9
+ const SEPARATION_MIN = 15;
10
+ const CONTRAST_MIN = 3;
11
+ const MAX_SERIES = 8;
12
+ const NEUTRAL_KEY = "other";
13
+ const HEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
14
+ const ENTRY = /([A-Za-z_$][\w$]*|'[^']+'|"[^"]+")\s*:\s*\{\s*(?:light\s*:\s*(['"])(.*?)\2\s*,\s*dark\s*:\s*(['"])(.*?)\4|dark\s*:\s*(['"])(.*?)\6\s*,\s*light\s*:\s*(['"])(.*?)\8)/g;
15
+ const lineOf = (text, at) => text.slice(0, at).split("\n").length;
16
+ function parseSeriesGroups(source) {
17
+ const groups = [];
18
+ for (const call of source.matchAll(/\bdefineSeries\s*\(/g)) {
19
+ const open = (call.index ?? 0) + call[0].length;
20
+ const lineStart = source.lastIndexOf("\n", call.index ?? 0) + 1;
21
+ if (/^\s*(?:\/\/|\*|\/\*)/.test(source.slice(lineStart, call.index))) continue;
22
+ let depth = 1;
23
+ let end = open;
24
+ while (end < source.length && depth > 0) {
25
+ const ch = source[end];
26
+ if (ch === "(") depth += 1;
27
+ else if (ch === ")") depth -= 1;
28
+ end += 1;
29
+ }
30
+ const body = source.slice(open, end);
31
+ const entries = [...body.matchAll(ENTRY)].map((m) => {
32
+ const light = m[3] ?? m[9] ?? "";
33
+ const dark = m[5] ?? m[7] ?? "";
34
+ return {
35
+ key: (m[1] ?? "").replace(/^['"]|['"]$/g, ""),
36
+ light: light.trim(),
37
+ dark: dark.trim(),
38
+ line: lineOf(source, open + (m.index ?? 0))
39
+ };
40
+ });
41
+ groups.push({ line: lineOf(source, call.index ?? 0), entries });
42
+ }
43
+ return groups;
44
+ }
45
+ const fix = (n, digits = 2) => n.toFixed(digits);
46
+ function auditSeriesGroups(groups, surfaces) {
47
+ const issues = [];
48
+ for (const group of groups) {
49
+ const { entries: allEntries } = group;
50
+ const lineOfKey = (key) => allEntries.find((e) => e.key === key)?.line ?? group.line;
51
+ const categorical = allEntries.filter((e) => e.key !== NEUTRAL_KEY);
52
+ if (categorical.length > MAX_SERIES) {
53
+ const extra = categorical.slice(MAX_SERIES).map((e) => e.key);
54
+ issues.push({
55
+ check: "order",
56
+ scheme: "light",
57
+ keys: extra,
58
+ measured: categorical.length,
59
+ threshold: MAX_SERIES,
60
+ line: lineOfKey(extra[0] ?? ""),
61
+ message: `${categorical.length} series in one group (max ${MAX_SERIES}) \u2014 ${extra.join(", ")} should fold into \`${NEUTRAL_KEY}\``
62
+ });
63
+ }
64
+ for (const scheme of ["light", "dark"]) {
65
+ const [lo, hi] = LIGHTNESS_BAND[scheme];
66
+ const value = (e) => e[scheme];
67
+ const entries = allEntries.filter((e) => {
68
+ if (HEX.test(value(e))) return true;
69
+ issues.push({
70
+ check: "format",
71
+ scheme,
72
+ keys: [e.key],
73
+ measured: 0,
74
+ threshold: 0,
75
+ line: e.line,
76
+ message: `${e.key} (${scheme}) "${value(e)}" is not a #rgb or #rrggbb hex \u2014 it cannot be checked`
77
+ });
78
+ return false;
79
+ });
80
+ for (const e of entries) {
81
+ const { L, C } = hexToOklch(value(e));
82
+ if (L < lo || L > hi) {
83
+ issues.push({
84
+ check: "lightness",
85
+ scheme,
86
+ keys: [e.key],
87
+ measured: L,
88
+ threshold: L < lo ? lo : hi,
89
+ line: e.line,
90
+ message: `${e.key} (${scheme}) OKLCH lightness ${fix(L)} is outside ${lo}\u2013${hi}`
91
+ });
92
+ }
93
+ if (e.key !== NEUTRAL_KEY && C < CHROMA_FLOOR) {
94
+ issues.push({
95
+ check: "chroma",
96
+ scheme,
97
+ keys: [e.key],
98
+ measured: C,
99
+ threshold: CHROMA_FLOOR,
100
+ line: e.line,
101
+ message: `${e.key} (${scheme}) OKLCH chroma ${fix(C, 3)} is below ${CHROMA_FLOOR} \u2014 a categorical hue must read as a hue (key a deliberately neutral series \`${NEUTRAL_KEY}\`)`
102
+ });
103
+ }
104
+ const ratio = contrastRatio(value(e), surfaces[scheme]);
105
+ if (ratio < CONTRAST_MIN) {
106
+ issues.push({
107
+ check: "contrast",
108
+ scheme,
109
+ keys: [e.key],
110
+ measured: ratio,
111
+ threshold: CONTRAST_MIN,
112
+ line: e.line,
113
+ message: `${e.key} (${scheme}) contrast ${fix(ratio)}:1 against the surface is below ${CONTRAST_MIN}:1`
114
+ });
115
+ }
116
+ }
117
+ const seen = /* @__PURE__ */ new Map();
118
+ const duplicated = /* @__PURE__ */ new Set();
119
+ for (const e of entries) {
120
+ const first = seen.get(value(e).toLowerCase());
121
+ if (first === void 0) seen.set(value(e).toLowerCase(), e.key);
122
+ else {
123
+ duplicated.add(`${first}|${e.key}`);
124
+ issues.push({
125
+ check: "order",
126
+ scheme,
127
+ keys: [first, e.key],
128
+ measured: 0,
129
+ threshold: SEPARATION_MIN,
130
+ line: e.line,
131
+ message: `${first} and ${e.key} (${scheme}) are the same colour ${value(e)} \u2014 a group does not cycle`
132
+ });
133
+ }
134
+ }
135
+ for (let i = 1; i < entries.length; i += 1) {
136
+ const a = entries[i - 1];
137
+ const b = entries[i];
138
+ if (duplicated.has(`${a.key}|${b.key}`)) continue;
139
+ const sims = ["protan", "deutan"].map(
140
+ (kind2) => [kind2, deltaEOkCvd(value(a), value(b), kind2)]
141
+ );
142
+ const [kind, worst] = sims.reduce((m, s) => s[1] < m[1] ? s : m);
143
+ if (worst < CVD_ADJACENT_MIN) {
144
+ issues.push({
145
+ check: "cvd",
146
+ scheme,
147
+ keys: [a.key, b.key],
148
+ measured: worst,
149
+ threshold: CVD_ADJACENT_MIN,
150
+ line: b.line,
151
+ message: `${a.key} \u2192 ${b.key} (${scheme}) are \u0394E ${fix(worst, 1)} apart under ${kind === "protan" ? "protanopia" : "deuteranopia"}, below ${CVD_ADJACENT_MIN}`
152
+ });
153
+ }
154
+ }
155
+ let worstPair = null;
156
+ for (let i = 0; i < entries.length; i += 1) {
157
+ for (let j = i + 1; j < entries.length; j += 1) {
158
+ const a = entries[i];
159
+ const b = entries[j];
160
+ if (duplicated.has(`${a.key}|${b.key}`)) continue;
161
+ const de = deltaEOk(value(a), value(b));
162
+ if (worstPair === null || de < worstPair.de) worstPair = { a, b, de };
163
+ }
164
+ }
165
+ if (worstPair !== null && worstPair.de < SEPARATION_MIN) {
166
+ issues.push({
167
+ check: "separation",
168
+ scheme,
169
+ keys: [worstPair.a.key, worstPair.b.key],
170
+ measured: worstPair.de,
171
+ threshold: SEPARATION_MIN,
172
+ line: worstPair.b.line,
173
+ message: `${worstPair.a.key} and ${worstPair.b.key} (${scheme}) are only \u0394E ${fix(worstPair.de, 1)} apart, below ${SEPARATION_MIN}`
174
+ });
175
+ }
176
+ }
177
+ }
178
+ return issues;
179
+ }
180
+ export {
181
+ CHROMA_FLOOR,
182
+ CONTRAST_MIN,
183
+ CVD_ADJACENT_MIN,
184
+ LIGHTNESS_BAND,
185
+ MAX_SERIES,
186
+ NEUTRAL_KEY,
187
+ SEPARATION_MIN,
188
+ auditSeriesGroups,
189
+ parseSeriesGroups
190
+ };
@@ -0,0 +1,15 @@
1
+ import type { SeriesSurfaces } from './palette.js';
2
+ import type { Finding, GuardConfig } from './types.js';
3
+ /**
4
+ * Judge ONE series file's palette: one finding per failed check, naming the key(s), scheme,
5
+ * measured number and threshold. The series module is exempt from every line-scan kind, so it is
6
+ * judged here instead. Honors `severity` and `exemptRules` like any other kind.
7
+ */
8
+ export declare function checkSeriesPalette(source: string, relPath: string, cfg: GuardConfig, surfaces: SeriesSurfaces): Finding[];
9
+ /**
10
+ * Findings for the series module at `<cwd>/<rel>`; none if it does not exist. Surfaces are the
11
+ * derive engine's default `surface.panel` (a chart sits on a panel) — a consumer's `derive`
12
+ * overrides are not read.
13
+ */
14
+ export declare function checkSeriesModule(cwd: string, rel: string, cfg: GuardConfig): Finding[];
15
+ //# sourceMappingURL=series-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series-file.d.ts","sourceRoot":"","sources":["../../src/guard/series-file.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEnD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,WAAW,EAChB,QAAQ,EAAE,cAAc,GACvB,OAAO,EAAE,CAUX;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,EAAE,CAQvF"}
@@ -0,0 +1,29 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { resolve } from "node:path";
3
+ import { DEFAULT_DERIVE_CONFIG, deriveTokens } from "../tokens/derive.js";
4
+ import { isRuleExempt, severityOf } from "./index.js";
5
+ import { auditSeriesGroups, parseSeriesGroups } from "./palette.js";
6
+ function checkSeriesPalette(source, relPath, cfg, surfaces) {
7
+ if (isRuleExempt("series-palette", relPath, cfg.exemptRules)) return [];
8
+ return auditSeriesGroups(parseSeriesGroups(source), surfaces).map((issue) => ({
9
+ relPath,
10
+ line: issue.line,
11
+ token: issue.keys.join(", "),
12
+ text: issue.message,
13
+ kind: "series-palette",
14
+ severity: severityOf("series-palette", cfg)
15
+ }));
16
+ }
17
+ function checkSeriesModule(cwd, rel, cfg) {
18
+ const file = resolve(cwd, rel);
19
+ if (!existsSync(file)) return [];
20
+ const { panel } = deriveTokens(DEFAULT_DERIVE_CONFIG).surface;
21
+ return checkSeriesPalette(readFileSync(file, "utf8"), rel, cfg, {
22
+ light: panel.light,
23
+ dark: panel.dark
24
+ });
25
+ }
26
+ export {
27
+ checkSeriesModule,
28
+ checkSeriesPalette
29
+ };
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Guard types — Mantine-free, dependency-free (zero imports beyond TS types).
3
3
  *
4
- * GuardKind is the closed set of 26 violation kinds the theme guard can emit. Retired kinds
4
+ * GuardKind is the closed set of 27 violation kinds the theme guard can emit. Retired kinds
5
5
  * (`unframed-chart`, `raw-visx-axis`, `chart-missing-aria-label`) stay recognized ids in
6
6
  * `PLUGIN_RULE_IDS`/`KNOWN_RULE_IDS` so an existing `theme-allow <id>` reads as a dead waiver, not
7
7
  * a typo.
8
8
  * Finding is the structured result per violation, replacing the old `Violation` shape.
9
9
  * GuardConfig is the per-run configuration that drives checkSource.
10
10
  */
11
- /** The 26 theme-guard violation kinds. */
12
- export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'mantine-shade-index' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-motion-value' | 'raw-form-control' | 'sub-16-input-font' | 'raw-font-family' | 'theme-allow-unscoped' | 'surface-shadow-override' | 'css-raw-surface' | 'inline-font-size' | 'hidden-inline-style' | 'in-body-page-title' | 'raw-selection-control' | 'raw-media-query' | 'unknown-vx-token';
11
+ /** The 27 theme-guard violation kinds. */
12
+ export type GuardKind = 'raw-hex' | 'raw-color-fn' | 'localstorage-theme' | 'off-identity-accent' | 'mantine-shade-index' | 'raw-spacing' | 'raw-radius' | 'raw-surface' | 'card-with-border' | 'off-system-surface-var' | 'raw-html-layout' | 'inline-spacing' | 'inline-display' | 'raw-motion-value' | 'raw-form-control' | 'sub-16-input-font' | 'raw-font-family' | 'theme-allow-unscoped' | 'surface-shadow-override' | 'css-raw-surface' | 'inline-font-size' | 'hidden-inline-style' | 'in-body-page-title' | 'raw-selection-control' | 'raw-media-query' | 'unknown-vx-token' | 'series-palette';
13
13
  /**
14
14
  * How hard a finding lands. `error` fails the build; `warn` reports and passes.
15
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/guard/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,0CAA0C;AAC1C,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,oBAAoB,GACpB,qBAAqB,GACrB,qBAAqB,GACrB,aAAa,GACb,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,wBAAwB,GACxB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,sBAAsB,GACtB,yBAAyB,GACzB,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,GACvB,iBAAiB,GACjB,kBAAkB,CAAA;AAEtB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAA;AAE5C;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAA;CACjC,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,wGAAwG;IACxG,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,gBAAgB,EAA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,CAAC,mBAAmB,EAAE,OAAO,CAAA;IACrC,sGAAsG;IACtG,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,4FAA4F;IAC5F,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,kGAAkG;IAClG,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAA;IAChC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;IAC5C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;IAC1D;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAA;CAC7D,CAAA"}
@@ -204,7 +204,7 @@ export declare const SURFACES: {
204
204
  readonly layer: "headless";
205
205
  readonly rule: "tokens";
206
206
  readonly skill: readonly ["basalt-design", "basalt-charts"];
207
- readonly guardKinds: readonly ["raw-hex", "raw-color-fn", "off-identity-accent", "off-system-surface-var", "raw-font-family", "raw-radius", "raw-surface", "inline-font-size", "css-raw-surface", "surface-shadow-override", "unknown-vx-token", "theme-allow-unscoped"];
207
+ readonly guardKinds: readonly ["raw-hex", "raw-color-fn", "off-identity-accent", "off-system-surface-var", "raw-font-family", "raw-radius", "raw-surface", "inline-font-size", "css-raw-surface", "surface-shadow-override", "unknown-vx-token", "series-palette", "theme-allow-unscoped"];
208
208
  readonly pluginRules: readonly ["no-raw-font-size", "raw-size-literal", "token-layer-boundary"];
209
209
  readonly description: "VX token refs, buildPaletteCss, defineSeries, seriesTokens, groupTokens, alpha (Mantine-free)";
210
210
  readonly globs: {
@@ -1 +1 @@
1
- {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../src/surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAI9C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB,mkBA2BtB,CAAA;AAEV,+FAA+F;AAC/F,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,eAAe,GAAG,eAAe,CAAA;AAExE;;;;GAIG;AACH,MAAM,MAAM,KAAK,GAAG,iBAAiB,GAAG,UAAU,GAAG,YAAY,GAAG,cAAc,GAAG,eAAe,CAAA;AAEpG;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;IAChC,oFAAoF;IACpF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAI,CAAA;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI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M,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+X2B,CAAA;AAIhD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,qBAMiB,CAAA;AAIxC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,sBAMiB,CAAA;AAIzC,wFAAwF;AACxF,eAAO,MAAM,WAAW,qCAAsC,CAAA;AAI9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,6BAA6B,EAAE,WAAW,CAAC,MAAM,CAAqC,CAAA;AAEnG;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,OAAO,CAET"}
package/dist/surfaces.js CHANGED
@@ -152,6 +152,8 @@ const SURFACES = {
152
152
  "surface-shadow-override",
153
153
  // A `var(--vx-*)` naming a token basalt no longer (or never) emits.
154
154
  "unknown-vx-token",
155
+ // The series file's computed palette checks (lightness, chroma, CVD separation, contrast).
156
+ "series-palette",
155
157
  // Not a token kind — the kind that judges the ANNOTATION rather than the code. It lands here
156
158
  // because `agent/rules/basalt-tokens.md` is where the `theme-allow` grammar is documented
157
159
  // (said once, on purpose), so this is the header that must name its enforcement.
@@ -135,6 +135,16 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
135
135
  transition: box-shadow 120ms ease;
136
136
  }
137
137
 
138
+ /* Section-side inset on the stack scale (`buttonSectionX`, theme/index.ts) — beats Mantine's
139
+ * zero-specificity `:where([data-with-*-section])` `padding-x / 1.5`. */
140
+ .buttonRoot[data-with-left-section] {
141
+ padding-inline-start: var(--button-section-padding-x, calc(var(--button-padding-x) / 1.5));
142
+ }
143
+
144
+ .buttonRoot[data-with-right-section] {
145
+ padding-inline-end: var(--button-section-padding-x, calc(var(--button-padding-x) / 1.5));
146
+ }
147
+
138
148
  .buttonRoot[data-variant='default'],
139
149
  .buttonRoot[data-variant='filled'],
140
150
  .buttonRoot[data-variant='light'] {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EA0CV,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAe,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAKpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD;;;;;GAKG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAMvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAA;AAenE,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,iBAAiB;QACzB,YAAY,CAAC,EAAE,YAAY,CAAA;QAC3B,WAAW,CAAC,EAAE,iBAAiB,CAAA;QAC/B,YAAY,CAAC,EAAE,YAAY,CAAA;QAC3B,aAAa,CAAC,EAAE,WAAW,CAAA;KAC5B;CACF;AA6/BD;+EAC+E;AAC/E,eAAO,MAAM,SAAS,EAAE,oBAAuD,CAAA;AAiR/E,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG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AC,oBAAoB,EAAE,aAAa,CAAC,EACrD,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAiCtB"}
@@ -427,6 +427,7 @@ function buildTheme(data, options = {}) {
427
427
  root: {
428
428
  "--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
429
429
  "--button-padding-x": buttonPaddingX(props.size),
430
+ "--button-section-padding-x": buttonSectionX(props.size),
430
431
  "--button-color": ink.color,
431
432
  "--button-hover": ink.hover,
432
433
  "--button-bg": ink.bg,
@@ -917,6 +918,23 @@ function buttonPaddingX(size) {
917
918
  const steps = BUTTON_PADDING_X[typeof size === "string" ? size : "sm"];
918
919
  return steps === void 0 ? void 0 : `calc((${steps}) * var(--mantine-scale))`;
919
920
  }
921
+ const BUTTON_SECTION_X = {
922
+ xs: "var(--vx-space-stack-sm)",
923
+ sm: "var(--vx-space-stack-md)",
924
+ md: "var(--vx-space-stack-md)",
925
+ lg: "var(--vx-space-stack-lg)",
926
+ xl: "var(--vx-space-stack-xl)",
927
+ ctl: "var(--vx-space-stack-sm)",
928
+ "compact-xs": "var(--vx-space-stack-xs)",
929
+ "compact-sm": "var(--vx-space-stack-xs)",
930
+ "compact-md": "var(--vx-space-stack-sm)",
931
+ "compact-lg": "var(--vx-space-stack-sm)",
932
+ "compact-xl": "var(--vx-space-stack-md)"
933
+ };
934
+ function buttonSectionX(size) {
935
+ const step = BUTTON_SECTION_X[typeof size === "string" ? size : "sm"];
936
+ return step === void 0 ? void 0 : `calc(${step} * var(--mantine-scale))`;
937
+ }
920
938
  const CTL_PADDING_X = 10;
921
939
  const CTL_INPUT_PADDING_Y = 4;
922
940
  const CTL_SEGMENT_PADDING_Y = 2.5;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * OKLab / OKLCH and colour-vision-deficiency simulation — Mantine-free, dependency-free.
3
+ *
4
+ * OKLab is Ottosson's definition (https://bottosson.github.io/posts/oklab/); the CVD matrices are
5
+ * Machado, Oliveira & Fernandes (2009), "A Physiologically-based Model for Simulation of Color
6
+ * Vision Deficiency", severity 1.0, applied to LINEAR sRGB. `deltaEOk` is the Euclidean OKLab
7
+ * distance ×100, the unit the series-palette guard's thresholds are written in.
8
+ */
9
+ export type Oklab = {
10
+ L: number;
11
+ a: number;
12
+ b: number;
13
+ };
14
+ export type Oklch = {
15
+ L: number;
16
+ C: number;
17
+ h: number;
18
+ };
19
+ export type CvdKind = 'protan' | 'deutan';
20
+ export declare function hexToOklab(hex: string): Oklab;
21
+ export declare function hexToOklch(hex: string): Oklch;
22
+ /** Euclidean OKLab distance ×100 between two hex colours. */
23
+ export declare function deltaEOk(hexA: string, hexB: string): number;
24
+ /** The hex a dichromat sees for `hex` — for display and tests; the checks stay in linear RGB. */
25
+ export declare function simulateCvd(hex: string, kind: CvdKind): string;
26
+ /** OKLab ΔE×100 between two colours as a dichromat sees them — no 8-bit round trip. */
27
+ export declare function deltaEOkCvd(hexA: string, hexB: string, kind: CvdKind): number;
28
+ //# sourceMappingURL=oklab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oklab.d.ts","sourceRoot":"","sources":["../../src/tokens/oklab.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACvD,MAAM,MAAM,KAAK,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACvD,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAkDzC,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAE7C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAI7C;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI3D;AAUD,iGAAiG;AACjG,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAE9D;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAI7E"}
@@ -0,0 +1,73 @@
1
+ const MACHADO = {
2
+ protan: [
3
+ [0.152286, 1.052583, -0.204868],
4
+ [0.114503, 0.786281, 0.099216],
5
+ [-3882e-6, -0.048116, 1.051998]
6
+ ],
7
+ deutan: [
8
+ [0.367322, 0.860646, -0.227968],
9
+ [0.280085, 0.672501, 0.047413],
10
+ [-0.01182, 0.04294, 0.968881]
11
+ ]
12
+ };
13
+ function hexToLinear(hex) {
14
+ const raw = hex.replace("#", "");
15
+ const full = raw.length === 3 ? [...raw].map((c) => c + c).join("") : raw.slice(0, 6);
16
+ const channel = (i) => {
17
+ const c = Number.parseInt(full.slice(i, i + 2), 16) / 255;
18
+ return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;
19
+ };
20
+ return [channel(0), channel(2), channel(4)];
21
+ }
22
+ function linearToHex([r, g, b]) {
23
+ const encode = (c) => {
24
+ const v = Math.min(1, Math.max(0, c));
25
+ const s = v <= 31308e-7 ? v * 12.92 : 1.055 * v ** (1 / 2.4) - 0.055;
26
+ return Math.round(s * 255).toString(16).padStart(2, "0");
27
+ };
28
+ return `#${encode(r)}${encode(g)}${encode(b)}`;
29
+ }
30
+ function linearToOklab([r, g, b]) {
31
+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
32
+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
33
+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
34
+ return {
35
+ L: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s,
36
+ a: 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s,
37
+ b: 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s
38
+ };
39
+ }
40
+ function hexToOklab(hex) {
41
+ return linearToOklab(hexToLinear(hex));
42
+ }
43
+ function hexToOklch(hex) {
44
+ const { L, a, b } = hexToOklab(hex);
45
+ const h = Math.atan2(b, a) * 180 / Math.PI;
46
+ return { L, C: Math.hypot(a, b), h: h < 0 ? h + 360 : h };
47
+ }
48
+ function deltaEOk(hexA, hexB) {
49
+ const x = hexToOklab(hexA);
50
+ const y = hexToOklab(hexB);
51
+ return 100 * Math.hypot(x.L - y.L, x.a - y.a, x.b - y.b);
52
+ }
53
+ function simulateCvdLinear(hex, kind) {
54
+ const [r, g, b] = hexToLinear(hex);
55
+ const [row0, row1, row2] = MACHADO[kind];
56
+ const mix = (row) => Math.min(1, Math.max(0, row[0] * r + row[1] * g + row[2] * b));
57
+ return [mix(row0), mix(row1), mix(row2)];
58
+ }
59
+ function simulateCvd(hex, kind) {
60
+ return linearToHex(simulateCvdLinear(hex, kind));
61
+ }
62
+ function deltaEOkCvd(hexA, hexB, kind) {
63
+ const x = linearToOklab(simulateCvdLinear(hexA, kind));
64
+ const y = linearToOklab(simulateCvdLinear(hexB, kind));
65
+ return 100 * Math.hypot(x.L - y.L, x.a - y.a, x.b - y.b);
66
+ }
67
+ export {
68
+ deltaEOk,
69
+ deltaEOkCvd,
70
+ hexToOklab,
71
+ hexToOklch,
72
+ simulateCvd
73
+ };
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # basalt-ui v2.20.0
1
+ # basalt-ui v2.21.0
2
2
  # Opinionated framework for Mantine-based React apps — theme, app shell, TanStack Charts, toolchain presets
3
3
  #
4
4
  # Entry points: use the exact import specifier below; do not guess.
@@ -13,7 +13,7 @@
13
13
  # A subpath's `Install:` line is its required peers; `OptionalPeers:` are import()-only, install on use.
14
14
 
15
15
  Package: basalt-ui
16
- Version: 2.20.0
16
+ Version: 2.21.0
17
17
 
18
18
  ## basalt-ui
19
19
  Import: import { ... } from 'basalt-ui'
@@ -27,7 +27,7 @@ Signature: BarList(props: BarListProps): JSX.Element
27
27
  items: readonly BarListItem[]
28
28
  format?: (value: number, part: "value" | "max") => string
29
29
  max?: number
30
- variant?: "default" | "thin"
30
+ variant?: "thin" | "inline"
31
31
  accentLeader?: boolean
32
32
  loading?: boolean
33
33
  loadingRows?: number
@@ -105,7 +105,7 @@ Signature: Meter(props: MeterProps): JSX.Element
105
105
  shape?: "bar" | "ring"
106
106
  target?: number [with segments | zones]
107
107
  ticks?: readonly MeterTick[] [with segments | zones]
108
- tone?: "muted" [with segments | zones]
108
+ tone?: "muted" | "ink" [with segments | zones]
109
109
  size?: "row" [with segments | zones]
110
110
  startCaption?: ReactNode [with segments | zones]
111
111
  endCaption?: ReactNode [with segments | zones]
@@ -370,6 +370,8 @@ Signature: ChartCard(props: ChartCardProps): ReactElement<unknown, string | JSXE
370
370
  actions?: ReactNode
371
371
  state?: ChartState
372
372
  placeholderHeight?: number | ResponsiveChartHeight
373
+ onRetry?: (() => void)
374
+ retrying?: boolean
373
375
  stateAction?: ReactNode
374
376
  children?: ReactNode
375
377
  facts: ChartFact | readonly ChartFact[]
@@ -709,7 +711,7 @@ Signature: ThreadFeed(props: ThreadFeedProps): JSX.Element
709
711
  threads: AgentThread[]
710
712
  activeId: string | null
711
713
  onSelect: (id: string) => void
712
- variant?: "outcome" | "inline"
714
+ variant?: "inline" | "outcome"
713
715
  onSend?: ((thread: AgentThread, payload: ComposerSubmit) => void)
714
716
  renderRow?: ((thread: AgentThread) => ReactNode)
715
717
  anchor?: "start" | "end"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basalt-ui",
3
- "version": "2.20.0",
3
+ "version": "2.21.0",
4
4
  "description": "Opinionated framework for Mantine-based React apps — theme, app shell, TanStack Charts, toolchain presets",
5
5
  "keywords": [
6
6
  "charts",