roast-my-design-system 6.0.0 → 6.0.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <img src="https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/roaster_logo_300px.png?v=6.0.0" width="72" alt="roast-my-design-system">
1
+ <img src="https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/roaster_logo_300px.png?v=6.0.1" width="72" alt="roast-my-design-system">
2
2
 
3
3
  # roast-my-design-system
4
4
 
@@ -71,11 +71,11 @@ Not to be confused with each other: **"Why this matters"** is generic, ships wit
71
71
 
72
72
  The full report for vercel/ai-chatbot, top to bottom, including "What the numbers mean", Claude's read of the scan, embedded right under the verdict:
73
73
 
74
- ![The full diagnosis report for vercel/ai-chatbot in dark mode: health score, the What the numbers mean analysis written by Claude, priced Where to start moves each with its copy-the-fix-prompt button, the wrapped present with the agent rules, an agent trap callout, 3-yardstick tiles, the adoption map treemap, palette forensics, spacing receipts, typography specimens, offenders, duplicates, and the component usage ledger](https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/report-full-dark.png?v=6.0.0)
74
+ ![The full diagnosis report for vercel/ai-chatbot in dark mode: health score, the What the numbers mean analysis written by Claude, priced Where to start moves each with its copy-the-fix-prompt button, the wrapped present with the agent rules, an agent trap callout, 3-yardstick tiles, the adoption map treemap, palette forensics, spacing receipts, typography specimens, offenders, duplicates, and the component usage ledger](https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/report-full-dark.png?v=6.0.1)
75
75
 
76
76
  The same report in light mode (one file, built-in toggle):
77
77
 
78
- ![The diagnosis report in light mode](https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/report-light-hero.png?v=6.0.0)
78
+ ![The diagnosis report in light mode](https://raw.githubusercontent.com/gregkozakiewicz/roast-my-design-system/main/assets/report-light-hero.png?v=6.0.1)
79
79
 
80
80
  ## What makes the numbers trustworthy
81
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "roast-my-design-system",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "mcpName": "io.github.gregkozakiewicz/roast-my-design-system",
5
5
  "description": "Your AI can write the UI. This makes sure it writes your UI. A deterministic scanner scores your design system 0-100 against 34 public repos, reads React and web components (Stencil, Lit), hands you a copy-paste fix prompt for each top finding, writes rules for Claude, Cursor, Copilot and Windsurf with --apply, and runs as a local MCP server with --mcp.",
6
6
  "keywords": [
@@ -12,6 +12,7 @@ import {
12
12
  } from '../lib/exempt.mjs';
13
13
  import { join } from 'node:path';
14
14
  import { canonical } from '../lib/color.mjs';
15
+ import { TOKEN_REF_SRC } from '../lib/declarations.mjs';
15
16
  import { tokenCollisions, workspaceMatcher } from './collisions.mjs';
16
17
 
17
18
  // ---------- counters ----------
@@ -102,8 +103,9 @@ const FONTSIZE_PROPS = /(?:^|[^-\w])font-size\s*:\s*([^;{}]+)[;}]/g;
102
103
  * sizes of which 48 were var(). Same fault that once made one Roboto look like
103
104
  * 59 typefaces (found 2026-09-11 while checking the density axis).
104
105
  */
106
+ const TOKEN_REF_RE = new RegExp(`^(${TOKEN_REF_SRC})$`, 'i');
105
107
  const isTokenRef = (v) =>
106
- /^(var\(\s*--[\w-]+[^)]*\)|inherit|initial|unset|revert)$/i.test(v)
108
+ TOKEN_REF_RE.test(v)
107
109
  || v.startsWith('$') || /\bmap[.-]get\b/.test(v);
108
110
  const FONTFAMILY_PROPS = /font-family\s*:\s*([^;{}]+)[;}]/g;
109
111
  const SHADOW_PROPS = /box-shadow\s*:\s*([^;{}]+)[;}]/g;
@@ -20,9 +20,19 @@ export const EXTRA_KINDS = [
20
20
 
21
21
  export const FONT_LINE_RE = /font-family\s*:\s*([^;{}]+)/i;
22
22
 
23
+ // One definition of "this value is a reference into the system", shared with
24
+ // the harvest's isTokenRef so the counter and the checker can never disagree
25
+ // about what a token reference looks like again (the 5.11 contradiction, and
26
+ // docs/variant-counting-findings.md §10). Fallbacks are allowed: var(--x, 4px)
27
+ // is still the system deciding.
28
+ export const TOKEN_REF_SRC = String.raw`var\(\s*--[\w-]+[^)]*\)|inherit|initial|unset|revert`;
29
+
23
30
  // Disciplined values that are never sins: token use, resets, inheritance.
24
- export const BENIGN_VALUE_RE = /^(var\(--[\w-]+\)|inherit|initial|unset|none|normal|0)$/i;
25
- const FONT_BENIGN_RE = /^(var\(--[\w-]+\)|inherit)$/i;
31
+ // Deliberately wider than a token reference: none, normal and 0 are resets a
32
+ // checker must not flag, but they reference nothing, so the counter ignores
33
+ // them. The difference is design, not drift.
34
+ export const BENIGN_VALUE_RE = new RegExp(`^(${TOKEN_REF_SRC}|none|normal|0)$`, 'i');
35
+ const FONT_BENIGN_RE = new RegExp(String.raw`^(var\(\s*--[\w-]+[^)]*\)|inherit)$`, 'i');
26
36
 
27
37
  /** The first declaration of one kind on one line, or null. The guard's door. */
28
38
  export function extraValue(re, text) {
@@ -1,4 +1,4 @@
1
1
  // Single version constant for the engine — imported by diagnose (report
2
2
  // footer) and rules (generated-by line). This is the bump spot that used to
3
3
  // live as a const inside diagnose/index.mjs.
4
- export const VERSION = '6.0.0';
4
+ export const VERSION = '6.0.1';