@reqvire-org/ads 0.3.45 → 0.3.47

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 (160) hide show
  1. package/README.md +23 -11
  2. package/dist/a11y.mjs +102 -0
  3. package/dist/assets.mjs +37 -8
  4. package/dist/atomic-composition.mjs +3 -2
  5. package/dist/brand-assets.mjs +48 -11
  6. package/dist/brands.mjs +82 -0
  7. package/dist/browser-audit/worker.mjs +45 -0
  8. package/dist/browser-audit.mjs +117 -0
  9. package/dist/capture/worker.mjs +2 -1
  10. package/dist/capture-store.mjs +4 -1
  11. package/dist/capture.mjs +10 -4
  12. package/dist/check.mjs +40 -9
  13. package/dist/cli.mjs +55 -8
  14. package/dist/color-values.mjs +325 -0
  15. package/dist/config.mjs +19 -2
  16. package/dist/contracts/tokens.json +1 -1
  17. package/dist/control-padding.mjs +93 -0
  18. package/dist/design-values.mjs +11 -4
  19. package/dist/finding-rules.mjs +61 -0
  20. package/dist/foundation.mjs +17 -1
  21. package/dist/icons.mjs +107 -0
  22. package/dist/init.mjs +3 -0
  23. package/dist/mcp/apps.mjs +9 -6
  24. package/dist/mcp/drafts.mjs +3 -0
  25. package/dist/mcp/mutations.mjs +17 -1
  26. package/dist/mcp/preview-widget.bundle.js +45 -39
  27. package/dist/mcp/project-widget.bundle.js +26 -26
  28. package/dist/mcp/server.mjs +23 -9
  29. package/dist/mcp/widget.bundle.js +17 -17
  30. package/dist/palette-generated.mjs +180 -0
  31. package/dist/preview-resources.mjs +12 -3
  32. package/dist/render-color-probe.mjs +148 -0
  33. package/dist/runtime-contracts.mjs +14 -4
  34. package/dist/scenarios.mjs +1 -1
  35. package/dist/showcase/client.bundle.js +28 -28
  36. package/dist/showcase/icons.js +146 -0
  37. package/dist/showcase/index.html +2 -1
  38. package/dist/showcase/style.css +19 -2
  39. package/dist/skills/README.md +2 -1
  40. package/dist/skills/ads-break-ui/SKILL.md +6 -5
  41. package/dist/skills/ads-break-ui/references/atomic-styles.md +12 -12
  42. package/dist/skills/ads-break-ui/references/captures.md +3 -2
  43. package/dist/skills/ads-break-ui/references/contracts.md +13 -10
  44. package/dist/skills/ads-break-ui/references/design-data.md +199 -2
  45. package/dist/skills/ads-break-ui/references/validation.md +8 -4
  46. package/dist/skills/ads-designer/SKILL.md +32 -15
  47. package/dist/skills/ads-designer/references/accessibility.md +77 -0
  48. package/dist/skills/ads-designer/references/atomic-styles.md +12 -12
  49. package/dist/skills/ads-designer/references/branding.md +61 -6
  50. package/dist/skills/ads-designer/references/captures.md +3 -2
  51. package/dist/skills/ads-designer/references/cli.md +8 -2
  52. package/dist/skills/ads-designer/references/contracts.md +13 -10
  53. package/dist/skills/ads-designer/references/design-data.md +199 -2
  54. package/dist/skills/ads-designer/references/validation.md +8 -4
  55. package/dist/skills/ads-import/SKILL.md +9 -8
  56. package/dist/skills/ads-import/references/atomic-styles.md +12 -12
  57. package/dist/skills/ads-import/references/captures.md +3 -2
  58. package/dist/skills/ads-import/references/cli.md +8 -2
  59. package/dist/skills/ads-import/references/contracts.md +13 -10
  60. package/dist/skills/ads-import/references/design-data.md +199 -2
  61. package/dist/skills/ads-import/references/tokens.md +7 -3
  62. package/dist/skills/ads-import/references/validation.md +8 -4
  63. package/dist/skills/ads-motion/SKILL.md +6 -5
  64. package/dist/skills/ads-motion/references/atomic-styles.md +12 -12
  65. package/dist/skills/ads-motion/references/build.md +33 -0
  66. package/dist/skills/ads-motion/references/captures.md +3 -2
  67. package/dist/skills/ads-motion/references/contracts.md +13 -10
  68. package/dist/skills/ads-motion/references/design-data.md +199 -2
  69. package/dist/skills/ads-motion/references/motion-review.md +2 -2
  70. package/dist/skills/ads-motion/references/validation.md +8 -4
  71. package/dist/skills/ads-port/SKILL.md +6 -5
  72. package/dist/skills/ads-port/references/atomic-styles.md +12 -12
  73. package/dist/skills/ads-port/references/captures.md +3 -2
  74. package/dist/skills/ads-port/references/cli.md +8 -2
  75. package/dist/skills/ads-port/references/contracts.md +13 -10
  76. package/dist/skills/ads-port/references/design-data.md +199 -2
  77. package/dist/skills/ads-port/references/validation.md +8 -4
  78. package/dist/starters/preact/design-system/components/Layout/Grid/Grid.tsx +76 -0
  79. package/dist/starters/preact/design-system/review/token-preview/TokenPreview.tsx +19 -1
  80. package/dist/starters/preact/ds.config.json +13 -1
  81. package/dist/starters/react/ADS.md +43 -10
  82. package/dist/starters/react/README.md +61 -9
  83. package/dist/starters/react/design-system/assets/brand/README.md +8 -3
  84. package/dist/starters/react/design-system/assets/glyphs/README.md +15 -0
  85. package/dist/starters/react/design-system/assets/glyphs/aliases.json +1 -0
  86. package/dist/starters/react/design-system/assets/glyphs/check.svg +1 -0
  87. package/dist/starters/react/design-system/assets/glyphs/chevron-down.svg +1 -0
  88. package/dist/starters/react/design-system/assets/glyphs/chevron-right.svg +1 -0
  89. package/dist/starters/react/design-system/assets/glyphs/close.svg +1 -0
  90. package/dist/starters/react/design-system/assets/glyphs/external-link.svg +1 -0
  91. package/dist/starters/react/design-system/assets/glyphs/info.svg +1 -0
  92. package/dist/starters/react/design-system/assets/glyphs/menu.svg +1 -0
  93. package/dist/starters/react/design-system/assets/glyphs/plus.svg +1 -0
  94. package/dist/starters/react/design-system/assets/glyphs/search.svg +1 -0
  95. package/dist/starters/react/design-system/assets/glyphs/warning.svg +1 -0
  96. package/dist/starters/react/design-system/components/Actions/Button/Button.tsx +11 -4
  97. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.fixture.ts +9 -0
  98. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.ads.scenario.tsx +16 -0
  99. package/dist/starters/react/design-system/components/Actions/IconButton/IconButton.tsx +44 -0
  100. package/dist/starters/react/design-system/components/Actions/IconButton/README.md +14 -0
  101. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.fixture.ts +6 -0
  102. package/dist/starters/react/design-system/components/Content/Icon/Icon.ads.scenario.tsx +16 -0
  103. package/dist/starters/react/design-system/components/Content/Icon/Icon.tsx +42 -0
  104. package/dist/starters/react/design-system/components/Content/Icon/README.md +17 -0
  105. package/dist/starters/react/design-system/components/Content/Icon/glyphs.ts +17 -0
  106. package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +3 -9
  107. package/dist/starters/react/design-system/components/Content/Logo/README.md +4 -2
  108. package/dist/starters/react/design-system/components/Forms/TextField/TextField.tsx +9 -5
  109. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.fixture.ts +12 -0
  110. package/dist/starters/react/design-system/components/Layout/Grid/Grid.ads.scenario.tsx +17 -0
  111. package/dist/starters/react/design-system/components/Layout/Grid/Grid.tsx +75 -0
  112. package/dist/starters/react/design-system/components/Layout/Grid/README.md +21 -0
  113. package/dist/starters/react/design-system/controllers/Palette/Palette.ts +164 -0
  114. package/dist/starters/react/design-system/index.ts +6 -0
  115. package/dist/starters/react/design-system/review/brand-preview/BrandPreview.tsx +2 -5
  116. package/dist/starters/react/design-system/review/grid-cell/GridCell.tsx +18 -0
  117. package/dist/starters/react/design-system/review/index.ts +1 -0
  118. package/dist/starters/react/design-system/review/token-preview/TokenPreview.tsx +19 -1
  119. package/dist/starters/react/design-system/styles.css +1 -0
  120. package/dist/starters/react/design-system/tokens/Color.ads.fixture.ts +114 -8
  121. package/dist/starters/react/design-system/tokens/Layout.ads.fixture.ts +23 -0
  122. package/dist/starters/react/design-system/tokens/{SpaceTypeMotion.ads.scenario.tsx → Layout.ads.scenario.tsx} +1 -1
  123. package/dist/starters/react/design-system/tokens/Motion.ads.fixture.ts +18 -0
  124. package/dist/starters/react/design-system/tokens/Motion.ads.scenario.tsx +4 -0
  125. package/dist/starters/react/design-system/tokens/Shape.ads.fixture.ts +30 -0
  126. package/dist/starters/react/design-system/tokens/Shape.ads.scenario.tsx +4 -0
  127. package/dist/starters/react/design-system/tokens/Space.ads.fixture.ts +37 -0
  128. package/dist/starters/react/design-system/tokens/Space.ads.scenario.tsx +4 -0
  129. package/dist/starters/react/design-system/tokens/Type.ads.fixture.ts +29 -0
  130. package/dist/starters/react/design-system/tokens/Type.ads.scenario.tsx +4 -0
  131. package/dist/starters/react/design-system/tokens/base.css +9 -3
  132. package/dist/starters/react/design-system/tokens/colors.css +210 -24
  133. package/dist/starters/react/design-system/tokens/elevation.css +44 -6
  134. package/dist/starters/react/design-system/tokens/spacing.css +67 -3
  135. package/dist/starters/react/design-system/tokens/themes.generated.css +142 -0
  136. package/dist/starters/react/design-system/tokens/themes.generated.ts +402 -0
  137. package/dist/starters/react/design-system/tokens/typography.css +25 -7
  138. package/dist/starters/react/ds.config.json +13 -1
  139. package/dist/style-boundaries.mjs +2 -1
  140. package/dist/themes-generated.mjs +150 -0
  141. package/dist/themes-watch.mjs +42 -0
  142. package/dist/themes.mjs +257 -0
  143. package/dist/token-export.mjs +69 -0
  144. package/dist/token-policy.mjs +2 -1
  145. package/dist/token-quality.mjs +112 -0
  146. package/dist/tokens.mjs +32 -30
  147. package/dist/validation.mjs +18 -1
  148. package/dist/verification/browser.mjs +14 -3
  149. package/docs/ADS.md +56 -13
  150. package/docs/ARCHITECTURE.md +82 -10
  151. package/docs/CACHING.md +2 -3
  152. package/docs/CHANGELOG.md +149 -13
  153. package/docs/CONTRACTS.md +13 -10
  154. package/docs/GUIDE.md +104 -8
  155. package/docs/MCP.md +46 -27
  156. package/docs/benchmarks/bun-previews.md +5 -5
  157. package/docs/benchmarks/{gidi-preview-memory.md → preview-memory.md} +14 -12
  158. package/docs/benchmarks/turbo-poc.md +24 -6
  159. package/package.json +2 -1
  160. package/dist/starters/react/design-system/tokens/SpaceTypeMotion.ads.fixture.ts +0 -36
@@ -12,6 +12,7 @@ import { checkCandidate, checkCommand, projectChecks } from "./validation-checks
12
12
  import { acceptance } from "./evidence.mjs";
13
13
  import { inspectScenarios } from "./scenarios.mjs";
14
14
  import { inspectBuildStatus } from "./mcp/build-status.mjs";
15
+ import { routeFindings } from "./finding-rules.mjs";
15
16
 
16
17
  const hash = value => createHash("sha256").update(value).digest("hex");
17
18
  function toolInputs() {
@@ -86,7 +87,7 @@ export function createValidationController(directory, { previewWork } = {}) {
86
87
  const behaviors = inspectBehaviors(options);
87
88
  units = options.config[policy].behaviorChecks ? (scope === "all" ? behaviors.contracts.map(contract=>contract.unit) : affectedBehaviorUnits(options,changed)) : [];
88
89
  onProgress?.({stage:"selection",scope,requestedScope,units,elapsedMs:Date.now()-startedAt});
89
- const requirePreviews=policy === "validation" || units.length>0;
90
+ const requirePreviews=policy === "validation" || units.length>0 || options.config[policy].browserAudit;
90
91
  if (requirePreviews && options.config.mcp.previewManifest && options.config.mcp.previewWatch) {
91
92
  stage("preview-build");
92
93
  const { startAdsMcp } = await import("./mcp/server.mjs");
@@ -119,6 +120,22 @@ export function createValidationController(directory, { previewWork } = {}) {
119
120
  checks.push({name:"registered-behavior",passed:result.ok});
120
121
  if (!result.ok && !result.diagnostics.length) diagnostics.push({rule:"validation-behavior",message:"Registered behavior checks did not all pass. Inspect the recorded outcomes."});
121
122
  } else checks.push({name:"registered-behavior",skipped:true,reason:!options.config[policy].behaviorChecks ? `Not required by ${policy} policy.` : scope === "all" ? "No registered behavior contracts." : "No affected behavior contracts."});
123
+ if (options.config[policy].browserAudit) {
124
+ // Rendered axe-core audit per scenario, brand and theme. a11y-axe findings are errors:
125
+ // they fail this policy.
126
+ stage("browser-audit");
127
+ const { runBrowserAudit } = await import("./browser-audit.mjs");
128
+ try {
129
+ const audit = await runBrowserAudit(root, {previewHost,signal,onProgress:value=>{ progress={...value,completed:checks.length}; onProgress?.(progress); }});
130
+ const routed=routeFindings([],audit.findings);
131
+ diagnostics.push(...routed.diagnostics); advisories.push(...routed.advisories);
132
+ checks.push({name:"browser-accessibility-audit",passed:!routed.diagnostics.length,engine:audit.engine,scenarios:audit.scenarios,themes:audit.themes,...(audit.brands?{brands:audit.brands}:{}),renders:audit.runs,errors:routed.diagnostics.length,reviews:routed.advisories.length});
133
+ } catch (error) {
134
+ if (signal.aborted) throw error;
135
+ checks.push({name:"browser-accessibility-audit",passed:false});
136
+ diagnostics.push({rule:"browser-audit",message:error.message});
137
+ }
138
+ } else checks.push({name:"browser-accessibility-audit",skipped:true,reason:`Not enabled by ${policy}.browserAudit.`});
122
139
  } catch (error) { diagnostics.push(error.diagnostic ?? {rule:signal.aborted ? "validation-cancelled" : "validation-execution",message:error.message}); }
123
140
  finally { try { await previewHost?.close(); } finally { releasePreview?.();active=undefined;progress=undefined;finish(); } }
124
141
  return complete();
@@ -20,9 +20,20 @@ function auditPaintBindings({ container = document.getElementById("root"), bindi
20
20
  const resolved = view.getComputedStyle(node).getPropertyValue(name).trim();
21
21
  return !!resolved && view.CSS.supports("color", resolved);
22
22
  }
23
- const themed = /^light-dark\(\s*(var\(\s*--[\w-]+\s*\)|currentColor)\s*,\s*(var\(\s*--[\w-]+\s*\)|currentColor)\s*\)$/.exec(value);
24
- if (themed)
25
- return view.CSS.supports("color", value) && reference(themed[1], node, descriptor, seen) && reference(themed[2], node, descriptor, seen);
23
+ const themes = Array.isArray(descriptor.themes) ? descriptor.themes : [];
24
+ if (themes.length && value.startsWith("var(--ads-if-")) {
25
+ const branch = /^var\(\s*--ads-if-([a-z][a-z0-9-]*)\s*,\s*(var\(\s*--[\w-]+\s*\)|currentColor|none)\s*\)/;
26
+ let rest = value;
27
+ const branches = [];
28
+ while (rest) {
29
+ const match = branch.exec(rest);
30
+ if (!match)
31
+ return false;
32
+ branches.push(match);
33
+ rest = rest.slice(match[0].length).trimStart();
34
+ }
35
+ return branches.length === themes.length && branches.every((match, index) => match[1] === themes[index] && reference(match[2], node, descriptor, seen));
36
+ }
26
37
  const resource = /^url\(\s*(["']?)#([^\s"'()#\\\p{Cc}]+)\1\s*\)$/u.exec(value);
27
38
  if (resource && view.CSS.supports("fill", value)) {
28
39
  const candidates = [...document2.querySelectorAll("[id]")].filter((item) => item.id === resource[2]);
package/docs/ADS.md CHANGED
@@ -61,7 +61,7 @@ for checked formats and gaps.
61
61
  ## Showcase contract
62
62
 
63
63
  The showcase is a minimal shell plus an MCP client and Apps host, shipped with
64
- ADS tooling. It discovers token/component/pattern/composition
64
+ ADS tooling. It discovers brand/token/component/pattern/composition
65
65
  scenarios from MCP tool results, invokes preview tools and responds to resource
66
66
  notifications. The project does not author a second catalogue or browser app.
67
67
 
@@ -69,14 +69,20 @@ notifications. The project does not author a second catalogue or browser app.
69
69
  `ads_status`. Without an agent connection, `ads showcase` starts the same runtime
70
70
  for browser use. Both transports share one configured preview compiler.
71
71
 
72
- The shell owns section tabs, collapsible navigation, theme controls and the App
73
- slot. The browser host uses a separate-origin sandbox proxy; project runtimes,
72
+ The shell owns section tabs, collapsible navigation, theme and grid-overlay controls
73
+ and the App slot. The grid overlay draws the project's `--grid-*` columns over the
74
+ selected preview at the starter Grid's container widths; without grid tokens it draws
75
+ nothing. The browser host uses a separate-origin sandbox proxy; project runtimes,
74
76
  styles, fonts and UI execute/apply only in the App iframe. Components, patterns,
75
77
  token values, scenarios, fixtures and their Linaria styles remain project-owned.
76
78
  App presentation comes from the selected compiled scenario; reusable review layouts live in development-only `review/` through its separate public entry. Do not recreate
77
79
  production widgets inside the client or scenario.
78
80
 
79
- There are four sections: Tokens, Components, Patterns and Composition. There are
81
+ There are five sections: Brand (first, shown only when the project has scenarios in
82
+ `brand/`), Tokens, Components, Patterns and Composition, plus an Icons tab after Tokens
83
+ when the project has a glyph set (`assets.glyphs`), rendered natively from
84
+ `ads://project/icons`. Brand previews are grouped by folder like components and have no
85
+ token samples. There are
80
86
  no required `TokensPage`/`ComponentsPage`/`PatternsPage`/`CompositionPage` files.
81
87
  Legacy custom browsing pages remain checked when present, but new projects use
82
88
  the built-in client. Its tooling CSS is separate from the project style contract.
@@ -243,14 +249,48 @@ statically resolved helper/import interpolation. Typography/layering checks foll
243
249
  aliases to their actual CSS consumers. Measured geometry and typed instance paint
244
250
  bindings retain their narrow runtime contracts; they are not static design scales.
245
251
 
252
+ ### Themes
253
+
254
+ A theme is a named set of values for the same tokens. `themes` in `ds.config.json` lists
255
+ them with the color scheme each uses (`light` or `dark`); the first is the default. Optional
256
+ `brands` add a second axis; the first brand is the default. A token that differs per theme is
257
+ authored as one plain half per theme on `:root` (`--x-light`, `--x-dark`), halves refer only
258
+ to halves, and a brand re-sets halves on `[data-brand="<name>"]`. ADS generates
259
+ `themes.generated.css` (theme switches, display switches `--display-<theme>` and
260
+ `--display-brand-<brand>`, one resolver per themed token, and the `prefers-color-scheme`
261
+ block under `followSystemTheme`) and `themes.generated.ts` (every color token resolved per
262
+ theme and brand, `themed()`/`themedByScheme()` for runtime values). Both are generated by
263
+ `ads assets`, the showcase and the MCP server, committed, and checked for freshness
264
+ (`themes-generated`). `data-theme` and `data-brand` apply to the page on `<html>` or to a
265
+ section on any element; every element follows its nearest theme and brand. Token values
266
+ under `[data-theme]` or `prefers-color-scheme` (`theme-old-form`), theme or brand selectors
267
+ in components (`theme-selector`) and `light-dark()` (`theme-light-dark`) are errors, as are
268
+ the coverage, half-reference and brand rules. Contrast checks, captures, the browser audit,
269
+ the showcase theme and brand controls and `ads tokens --format dtcg --theme/--brand` work
270
+ per declared theme and brand. Letting the user choose a theme and remembering it belongs to
271
+ the application.
272
+
246
273
  Shared token previews and sample coverage live under the configured token directory.
247
274
  The project mount adapter imports its foundation for both runtime and independent
248
275
  token previews. No owner stylesheet dependencies are injected into preview entries.
249
276
  `ads_prepare_token_samples` reconciles real shared bindings from project-selected
250
277
  properties/probes; it does not invent missing semantics.
251
278
 
252
- `token-overlap-review` warns about identical normalized shared definitions across
253
- their declared theme scopes. It never merges semantic roles or blocks a build merely
279
+ `ads check` checks token values: `token-contrast` (WCAG AA for the roles that meet on
280
+ screen, in every theme and brand, through aliases) and `token-rhythm` (`--space-N` = N × 2
281
+ px) are errors; `token-overlap-review` (equal values within one token family) is a review
282
+ item. The accessibility guards (`a11y-*`) read tokens and runtime component source;
283
+ `ads audit` adds axe-core in the rendered scenarios (`a11y-axe`). `ads tokens
284
+ --format dtcg` exports the tokens as W3C Design Tokens JSON. See the
285
+ [token guide](../skills/ads-designer/references/design-data.md) and the
286
+ [accessibility guide](../skills/ads-designer/references/accessibility.md).
287
+
288
+ ADS findings are errors, which fail `ads check`, validation and acceptance, or review items,
289
+ which are listed and never block; `info` items note an analysis limit. No configuration
290
+ changes a finding's kind.
291
+
292
+ `token-overlap-review` is a review item for identical normalized shared definitions
293
+ across their declared theme scopes. It never merges semantic roles or blocks a build merely
254
294
  because values coincide. Shared Data boundary violations are errors. See the
255
295
  [portable Data guide](../skills/ads-designer/references/design-data.md).
256
296
 
@@ -324,8 +364,8 @@ Store original branding and its usage, credits, and licenses in
324
364
  `assets/brand/`, and fonts in `assets/fonts/`. Configure generated web icons,
325
365
  committed targets (`assets.targets`), glyph sets (`assets.glyphs`) and asset
326
366
  mounts as described in the [branding guide](GUIDE.md#branding); `ads check` fails
327
- on stale committed outputs and warns about undescribed, unlicensed, unpreviewed or
328
- unused artwork.
367
+ on stale committed outputs and on undescribed, unlicensed or unpreviewed artwork, and
368
+ lists unused artwork for review.
329
369
 
330
370
  Before importing, compare the selected source and its dependencies with the
331
371
  destination's framework, public APIs, shared tokens, styling ownership and
@@ -405,7 +445,10 @@ ads check → ads assets → existing prebuild → existing build
405
445
  `ads check` validates architecture and declared native usage policies directly
406
446
  before asset generation. Additional project linters run only through explicit scripts.
407
447
  `lint-config` is an optional adapter for projects that choose Oxlint. `ads assets`
408
- generates configured browser icons from the source SVG into ignored `.ds/assets/`.
448
+ generates configured browser icons from `assets.iconSource` into ignored `.ds/assets/`,
449
+ renders committed `assets.targets` (recorded in `assets/generated.json`), writes the
450
+ `assets.glyphs` module and writes `themes.generated.css` and `themes.generated.ts`; `ads
451
+ check` fails when a committed output, the glyph module or a generated theme file is stale.
409
452
  A failed check or generation stops the build. Keep the project's CSS lint,
410
453
  type checks, behavior tests, and framework compilation in its build/test flow.
411
454
  `ads init` preserves existing lint tools and build commands.
@@ -438,10 +481,10 @@ The checks enforce the architecture's ownership boundaries:
438
481
  | Assets | Source/public collisions and configured generated artifacts in source are rejected |
439
482
 
440
483
  Pointer capture without locally visible capture-loss cleanup produces a
441
- nonblocking advisory. Review delegated cleanup and browser behavior; neither a
442
- warning nor a handler's presence establishes lifecycle correctness.
484
+ nonblocking review item. Review delegated cleanup and browser behavior; neither a
485
+ review item nor a handler's presence establishes lifecycle correctness.
443
486
 
444
- Potential atomic CSS overlaps produce `atomic-composition-review` warnings with
487
+ Potential atomic CSS overlaps produce `atomic-composition-review` review items with
445
488
  related declarations and a guidance URI. They are nonblocking, including during
446
489
  guarded mutations: valid CSS can intentionally overlap. Read
447
490
  [atomic style composition](../skills/ads-designer/references/atomic-styles.md) for causes, matching-property fixes
@@ -449,7 +492,7 @@ and the source review's limits. Registered rendered checks can enforce a
449
492
  project's intended computed geometry; token validity alone cannot establish it.
450
493
  Bounded tracing follows local helpers and explicit `className` forwarding;
451
494
  diagnostics distinguish a reached DOM target from informational analysis limits.
452
- Neither a trace nor an absent warning establishes the intended rendered result.
495
+ Neither a trace nor an absent review item establishes the intended rendered result.
453
496
 
454
497
  Document a new ownership exception with its guard/configuration change and
455
498
  tests. Passing static checks establishes only the policies and source formats
@@ -39,6 +39,15 @@ The project declares React or native Preact in `ds.config.json` and uses the
39
39
  matching compiler and mount adapter. Both integrate with the required styling
40
40
  and validation pipeline; additional frameworks need explicit tooling support.
41
41
 
42
+ New projects start from the starter that ships inside the same ADS package:
43
+ `ads create <folder> --framework react|preact` copies `starters/react` (and, for
44
+ Preact, the `starters/preact` files that replace React's), names the package and
45
+ runs init, so a project always matches the tool version that checks it. Skills carry
46
+ no starter copy; they point agents to `ads create`. The starter is a working base: a
47
+ token foundation in six groups (color ramps with AA-checked roles, type,
48
+ space and sizing, shape and elevation, motion, layout with a column grid), brand artwork
49
+ with Brand previews, an icon set, and one example of each layer.
50
+
42
51
  ADS checks run during development and builds. The tool adds no production UI
43
52
  runtime. Its ownership boundaries preserve a project's optimization strategy:
44
53
  lazy loading, code splitting, memoized data, caching, worker execution, and
@@ -187,7 +196,7 @@ builds keep their own bundler's splitting and caching policy.
187
196
 
188
197
  Atomic merging matches property/selector/condition keys; it does not resolve
189
198
  every shorthand/logical-property overlap. ADS reports detectable composition
190
- risks as nonblocking warnings with guidance, while registered rendered checks
199
+ risks as nonblocking review items with guidance, while registered rendered checks
191
200
  can enforce actual geometry. See the skill-local
192
201
  [atomic style composition guide](../skills/ads-designer/references/atomic-styles.md).
193
202
  Bounded source tracing follows local class helpers and explicit component
@@ -308,8 +317,12 @@ completion requirements, build integration and recovery.
308
317
 
309
318
  Humans and coding agents inspect the same project through MCP. The showcase is
310
319
  **a minimal shell plus an MCP client and Apps host**, shipped as development
311
- tooling. Its header, section tabs, collapsible left menu, theme switch and preview
312
- area stay neutral. The client discovers entries, invokes tools, forwards App
320
+ tooling. Its header, section tabs (Brand, shown first when the project previews its
321
+ artwork, then Tokens, Icons when the project has a glyph set, Components, Patterns and
322
+ Composition), collapsible left menu,
323
+ grid overlay and theme switches and preview area stay neutral. The grid overlay draws
324
+ the project's `--grid-*` columns over every preview through the App's host context, so
325
+ alignment is checked on real previews without a second renderer. The client discovers entries, invokes tools, forwards App
313
326
  resource requests and subscribes to changes. It contains no project UI catalogue
314
327
  or implementation imports.
315
328
 
@@ -385,8 +398,9 @@ exists.
385
398
 
386
399
  ### The foundation has a narrow styling role
387
400
 
388
- Shared token sheets define values on the document root and its themes. The
389
- import-only entry loads them in canonical order. `fonts.css` declares font faces;
401
+ Shared token sheets define values on the document root, per-theme values as halves, and
402
+ brand values on `[data-brand]`; the generated `themes.generated.css` resolves them. The
403
+ import-only entry loads them in canonical order, the generated sheet last. `fonts.css` declares font faces;
390
404
  `base.css` establishes shared native defaults and normalization. Components and
391
405
  patterns own their layout, skin, states and animations in Linaria.
392
406
 
@@ -426,8 +440,8 @@ patterns as production: application adapters supply live data and effects;
426
440
  scenario adapters supply fixture data, local state and simulated services.
427
441
  Reassembling a second screen from shared primitives still allows design drift.
428
442
 
429
- The server discovers one path-derived scenario registry. The showcase's four
430
- sections—Tokens, Components, Patterns and Composition—browse that same registry
443
+ The server discovers one path-derived scenario registry. The showcase's scenario
444
+ sections (Brand, Tokens, Components, Patterns and Composition) browse that same registry
431
445
  through MCP results. They do not initialize the entry or define
432
446
  its UI. Every preview uses `?scenario=<id>`; discovered `kind` selects its section,
433
447
  including token scenarios colocated with component/pattern owners. Existing
@@ -463,8 +477,8 @@ whose non-hidden children are all real directories, supplies its exact folder
463
477
  name. An owner directory and layer root never become groups; a direct file or
464
478
  symlink disqualifies a container. Nested qualifying containers form a path label
465
479
  such as `Forms / Selection`. Flat owners stay ungrouped with no Default heading.
466
- This applies to components, patterns and compositions; token categories remain
467
- unchanged. Move owners to reorganize groups, updating imports and path-derived
480
+ This applies to components, patterns, compositions and brand previews (`brand/`);
481
+ token categories remain unchanged. Move owners to reorganize groups, updating imports and path-derived
468
482
  identities where needed. No scenario/owner metadata can override the folder rule.
469
483
 
470
484
  Discovery adds an optional derived `group` to scenario results. One registry feeds
@@ -713,6 +727,29 @@ is published as one atomic generated record under `.ds/captures/` and stays outs
713
727
  source ownership and product bundles. Detailed usage lives in each portable skill's
714
728
  [capture reference](../skills/ads-designer/references/captures.md).
715
729
 
730
+ ## Brand assets and icons
731
+
732
+ Brand artwork lives in `assets/brand/`: SVG masters, finished PNG/JPEG/WebP images and
733
+ delivered `.ico`/`.icns` files, each described with its use and license in the folder's
734
+ README. Brand previews are scenarios in `brand/`, the showcase's first section; they show
735
+ artwork in the current theme and the app icon at its sizes and have no token samples.
736
+
737
+ `ads assets` makes three kinds of output. Web icons from `assets.iconSource` are rebuilt
738
+ into ignored `.ds/assets/` on every build, for the application's bundler. Committed targets
739
+ (`assets.targets`) are native and upload outputs that must exist without running ADS (a
740
+ Tauri bundle, a tray icon compiled into a binary, a file uploaded by hand): each copies or
741
+ renders one master to a project path, and the committed `assets/generated.json` records
742
+ its master hash, settings and output hash. A glyph set (`assets.glyphs`) turns a folder of
743
+ icon SVGs into one typed module. Freshness is checked by comparing recorded hashes, never by
744
+ rendering, so the result is the same on every machine; a finished image is never enlarged.
745
+ The starter's `Icon` and `IconButton` read that module: icons take `currentColor`, pair
746
+ their size with text, and an icon-only button always has a label. The showcase renders the
747
+ glyph set itself in its Icons tab, from the folder and the same default attributes the
748
+ module uses, so a set is reviewed without a project scenario. Other products' logos
749
+ live in `assets/logos/`, outside both the brand artwork and the glyph set: they keep their
750
+ owners' colors, render as images (or a mask silhouette for a muted use), and ADS generates
751
+ and checks nothing there.
752
+
716
753
  ## Build checks keep the architecture in place
717
754
 
718
755
  The project build runs ADS checks before producing application or showcase
@@ -720,6 +757,41 @@ output. These checks enforce token use, source ownership, public imports,
720
757
  showcase coverage, component state boundaries, and separation of runtime code from development
721
758
  fixtures. Component-specific usage rules extend the shared checks when needed.
722
759
 
760
+ Themes and brands are declared in `ds.config.json` and are only value sets: every theme and
761
+ brand shares the same token names. A theme sets the color mode and a brand sets identity
762
+ values (an accent ramp, a font), so a white-label product needs one brand per customer
763
+ rather than one theme per customer and mode. The declaration is the one list the showcase,
764
+ captures, preview host context, contrast review, browser audit and token export read, so a
765
+ project can add a high-contrast theme or a brand without tool changes.
766
+
767
+ A token that differs per theme is authored as one plain half per theme (`--x-light`,
768
+ `--x-dark`) on `:root`, and a brand re-sets its halves on `[data-brand]`. ADS generates
769
+ `themes.generated.css` from them: each `[data-theme]` sets inherited switch properties,
770
+ and each themed token resolves from its halves through those switches on every theme and
771
+ brand anchor. Custom properties inherit and resolve where they are declared, so every
772
+ element takes the halves of its nearest brand and the switch of its nearest theme, at any
773
+ nesting depth and in any order, with plain CSS variables. The same switches give display
774
+ switches (`--display-<theme>`, `--display-brand-<brand>`) for content that belongs to one
775
+ theme or brand. Theme and brand selectors are not used, in tokens or components, because
776
+ CSS resolves them by specificity and order, not by nearest ancestor.
777
+
778
+ Because every themed value is a plain half, ADS also resolves every color token for every
779
+ theme and brand ahead of time into `themes.generated.ts`. Renderers that need colors as
780
+ values (Canvas, WebGL, SVG graphs) look them up there for the element's nearest context,
781
+ instead of asking the browser to normalize a color per drawn item.
782
+
783
+ ADS findings are errors, review items or info items. An error is a rule ADS can decide: it
784
+ fails `ads check`, validation and acceptance, and no setting turns it off. Token, theme, brand,
785
+ glyph and accessibility rules read from tokens and source are errors: contrast between the
786
+ roles that meet on screen in every theme and brand, the 2 px spacing rhythm, theme and brand
787
+ coverage, brand artwork that is undescribed, unlicensed or unpreviewed, glyphs off the
788
+ shared viewBox or with fixed colors, controls padded off their size, target size, focus,
789
+ text resize, reduced motion, text spacing, image alternatives and icon-only controls. A
790
+ review item names something source analysis cannot settle (overlapping atomic declarations,
791
+ equal token values with possibly different roles, keyboard reach, unused artwork, color reads
792
+ in a render path); it is shown with guidance and never blocks. An info item notes an analysis
793
+ limit. Stale or hand-edited generated outputs are errors, since they ship.
794
+
723
795
  Static checks establish the policies and source formats they cover. Behavior
724
796
  tests and browser review verify the resulting accessibility, layout, themes,
725
797
  states, and motion. Both forms of verification support agent-driven iteration.
@@ -929,7 +1001,7 @@ bindings keep their existing narrow contracts. Shared token previews consume the
929
1001
  same foundation through the project mount adapter.
930
1002
 
931
1003
  Shared tokens with identical normalized theme/condition definitions receive a
932
- nonblocking `token-overlap-review` advisory. Equal values do not establish equal
1004
+ nonblocking `token-overlap-review` review item. Equal values do not establish equal
933
1005
  meaning; ownership/value-source violations remain errors. See the
934
1006
  [shared Data contract](ADS.md#shared-data-and-component-mappings).
935
1007
 
package/docs/CACHING.md CHANGED
@@ -94,6 +94,5 @@ Turbo is a normal dependency of the ADS tool package, which a project installs a
94
94
  `@reqvire-org/ads` in `devDependencies`. Hermit should pin Bun >=1.4.1 for ADS;
95
95
  it should not install a second global Turbo executable or manage a project
96
96
  `turbo.json`. Keep the project's other Rust/native/Node tools as its build requires.
97
- This ADS repository and the local shadcn example have no Hermit environment.
98
- Reqvire pins Bun 1.4.2. Neezler's native-client Hermit environment also supplies
99
- Bun 1.4.2 for the root ADS/frontend commands invoked by its Makefile.
97
+ When a Makefile or script runs ADS commands, run them inside the Hermit environment so they
98
+ use the pinned Bun.
package/docs/CHANGELOG.md CHANGED
@@ -1,34 +1,170 @@
1
1
  # Changelog
2
2
 
3
- ## 0.3.45
3
+ ## 0.3.47
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
- Local verification: **635/635 passed** with `ADS_TEST_BUN=1 npm test`.
7
- Tested commit: `b398b326316893474e4196d87d360f8bf16d6711`; Node v24.13.0, Bun 1.4.1.
8
- Completed 2026-10-29T21:08:14.889Z (1016 seconds).
6
+ Local verification: **703/703 passed** with `ADS_TEST_BUN=1 npm test`.
7
+ Tested commit: `193a00129755b847a3b8cbdf54360828b2b5c9e3`; Node v24.13.0, Bun 1.4.1.
8
+ Completed 2026-10-30T22:07:04.485Z (1059 seconds).
9
9
 
10
10
  <!-- ads-local-test-proof
11
11
  {
12
12
  "schema": 1,
13
- "version": "0.3.45",
14
- "commit": "b398b326316893474e4196d87d360f8bf16d6711",
15
- "sourceSha256": "4e75c6664215068b6fdcb8713ed6b80692b37352a7da1725d609837324f08cf0",
13
+ "version": "0.3.47",
14
+ "commit": "193a00129755b847a3b8cbdf54360828b2b5c9e3",
15
+ "sourceSha256": "3d1e3ecff8be39ae212932e0d5e8060128b923b9b1c2c8ba6cbaf466d54e51f7",
16
16
  "command": "ADS_TEST_BUN=1 npm test",
17
17
  "result": "pass",
18
- "tests": 635,
19
- "pass": 635,
18
+ "tests": 703,
19
+ "pass": 703,
20
20
  "fail": 0,
21
21
  "cancelled": 0,
22
22
  "skipped": 0,
23
23
  "node": "v24.13.0",
24
24
  "bun": "1.4.1",
25
- "completedAt": "2026-10-29T21:08:14.889Z",
26
- "durationMs": 1015884,
27
- "logSha256": "eb24fad299567e04233509af761e839939d850d4fc2b2323491dd662f2754945"
25
+ "completedAt": "2026-10-30T22:07:04.485Z",
26
+ "durationMs": 1059305,
27
+ "logSha256": "27baeaadeec20d80ff0aabbe9fbe3153158ef3ddfd45fe3e5dfed73f05a575db"
28
28
  }
29
29
  -->
30
30
  <!-- ads-local-tests:end -->
31
31
 
32
+ - **Findings are errors, review items or info items.** Errors fail `ads check`,
33
+ validation and acceptance; review items (`atomic-composition-review`, `token-overlap-review`,
34
+ `pointer-capture-review`, `scenario-exercise-review`, `a11y-keyboard`, `brand-unused`,
35
+ `render-color-probe`) are listed with guidance and never block; info items
36
+ (`atomic-composition-limit`) note an analysis limit. `src/finding-rules.mjs` classifies
37
+ every finding id. Every rule that was a warning and that ADS can decide is now an error:
38
+ `token-contrast`, `token-rhythm`, `a11y-target-size`, `a11y-focus`, `a11y-text-resize`,
39
+ `a11y-reduced-motion`, `a11y-text-spacing`, `a11y-image-alt`, `a11y-icon-label`,
40
+ `glyph-viewbox`, `glyph-color`, `brand-readme`, `brand-license`, `brand-preview` and the
41
+ theme and brand rules. CLI output reads `[error:…]` and `[review:…]` with a count of
42
+ each; JSON review items carry `severity: "review"`. No setting changes a finding's kind:
43
+ `enforce` is removed, and a `ds.config.json` that sets it fails to load.
44
+ - **Themes are written as per-theme halves.** A token that differs per theme has one plain
45
+ value per declared theme on `:root` (`--color-accent-9-light`, `--color-accent-9-dark`).
46
+ ADS generates `tokens/themes.generated.css` (theme switches and one resolver per themed
47
+ token), the last foundation import. `ads assets` writes it, and the showcase and MCP
48
+ server rewrite it whenever tokens or `ds.config.json` change; `ads check` fails when it
49
+ is missing or stale (`themes-generated`). `data-theme` on any element themes that
50
+ section and follows the nearest ancestor at any depth, with plain CSS variables. Values
51
+ under `[data-theme]` or `prefers-color-scheme` are an error (`theme-old-form`); a themed
52
+ token needs a half for every theme (`theme-coverage`); new errors
53
+ `theme-half-reference`, `theme-half-conflict`; `theme-undeclared` is gone. Projects
54
+ rewrite their token sheets; there is no migration.
55
+ - **Display switches.** The generated file defines `--display-<theme>` and
56
+ `--display-brand-<brand>`, `none` outside the nearest theme or brand: show a dark logo
57
+ with `display: var(--display-dark, block)`. Styling a component by a `[data-theme]` or
58
+ `[data-brand]` ancestor selector is an error (`theme-selector`), since it ignores the
59
+ nearest section. The starter's Logo and BrandPreview use the switches.
60
+ - **Renderer palette** (issue #1). ADS generates `tokens/themes.generated.ts` with the CSS:
61
+ every color token resolved for every theme and brand as `{ css, rgba }` (aliases, halves,
62
+ `color-mix()` and all CSS color syntaxes; per-channel sRGB clipping as canvas does;
63
+ unresolvable tokens listed in `unresolved`), with `contexts`, `themeSchemes`,
64
+ `themed()` and `themedByScheme()`. The starter's `controllers/Palette` gives
65
+ `paletteFor(element)`, `paletteContext(element)`, `observePalette(element, callback)` and
66
+ `resolveColor(element, value)`. In a 300-node hover benchmark, per-node color probing
67
+ took ~300 ms per 1,000 lookups with 6,000 DOM insertions; the palette takes ~0.2 ms
68
+ with none. Palette colors
69
+ match Chrome within 1/255 per channel. `render-color-probe` (review) flags color reads
70
+ from the page in per-item render paths. Existing projects get the file on the next
71
+ `ads assets` or showcase/MCP start; until then `ads check` reports it missing.
72
+ - **Runtime per-theme values** use `themed({ light, dark, … })` or `themedByScheme({ light,
73
+ dark })` from `themes.generated.ts`, which follow the nearest theme like token halves and
74
+ work with any number of themes. `light-dark()` is an error in token sheets, component CSS
75
+ and component string literals (`theme-light-dark`), and binding producers no longer accept
76
+ `light-dark()` templates; they accept these helpers over declared fields.
77
+ - **`followSystemTheme: true`** makes a page without `data-theme` follow the OS
78
+ `prefers-color-scheme`, taking the first declared theme with that scheme; an explicit
79
+ `data-theme` wins.
80
+ - **Brands.** `brands` in `ds.config.json` (the first is the default) adds a brand axis
81
+ beside the themes: a brand sets its own values, with every half of a themed token it
82
+ changes, on `[data-brand="<name>"]`. Brand and theme are independent and each follows
83
+ the nearest ancestor. The showcase has a brand selector, captures and previews take a
84
+ brand, contrast is checked for every brand in every theme, and
85
+ `ads tokens --format dtcg --brand <name>` exports one. Errors `brand-undeclared`,
86
+ `brand-theme-value`, `brand-coverage`, `brand-new-token`, `brand-empty`.
87
+ - **`ads audit`** runs axe-core (WCAG A/AA rules) in every component, pattern and
88
+ composition scenario, in every brand and theme, and reports `a11y-axe` errors with the
89
+ rule, WCAG criterion, failing elements and help link; it exits 1 on findings.
90
+ `browserAudit: true` in a validation or acceptance policy runs it there.
91
+ - **`control-padding`** (error): a control sized with `--control-height-<size>` pads its
92
+ sides with `--control-padding-<size>`, or `--control-inset` inside a track, never with a
93
+ `--space-*` step.
94
+ - **Icons tab.** The showcase renders the glyph set natively: every glyph at the size used
95
+ beside text, each glyph on its grid at every `--icon-*` size with its aliases and glyph
96
+ errors, a search by name or alias, and the logos in `assets/logos/` in color and muted.
97
+ It refreshes when glyphs, aliases, logos or icon tokens change. The starter's Icon
98
+ scenario now shows the component in use instead of cataloguing the set.
99
+ - **Other products' logos** live in `assets/logos/`, apart from brand artwork and glyphs:
100
+ they keep their owners' colors and render as images (or a mask over `currentColor` when
101
+ muted). ADS generates and checks nothing there.
102
+ - `ads check` reports `glyph-aliases` errors (invalid `aliases.json`, an alias naming a
103
+ missing glyph) with their line; `ads assets` fails with the same message.
104
+ - Fixed: a cached or warm-retained preview graph reused its scenario metadata by id, so a
105
+ graph built before discovery found a scenario's paint bindings kept serving it without
106
+ them while the compiled bytes were unchanged. Cached and retained graphs now take
107
+ `paintBindings`, `paintAudit`, title, kind and samples from the current registry, and a
108
+ cached graph whose metadata differs is rebuilt.
109
+ - The starters' token preview draws a column-count token (`--grid-columns-*`) as that many
110
+ columns.
111
+ - The starter's `base.css` locks page scrolling while a modal `<dialog>` is open
112
+ (`html:has(:modal)`) and keeps the scrollbar's space (`scrollbar-gutter: stable`).
113
+
114
+ ## 0.3.46
115
+
116
+ - The starter has a token foundation in six groups meeting WCAG 2.2 AA:
117
+ Color (six 12-step ramps redefined for dark, semantic roles aliasing ramp steps,
118
+ success/warning/danger/info sets), Type (16 px body, modular ladder fluid from 3xl,
119
+ leading and tracking per size), Space & sizing (`--space-N` = N × 2 px to 160 px,
120
+ stack and flow gaps, 32/40/48 px controls, icons), Shape & elevation (radius, borders,
121
+ focus, layered shadows, z-layers), Motion (70/110/150/240/400/700 ms, standard/enter/exit
122
+ easing in everyday and strong variants, zero under reduced motion) and Layout (content and container widths, header,
123
+ side pane, rail). The starter's components use the control tokens.
124
+ - `token-contrast` warns when text, accent, status, focus or control-border pairs fall
125
+ below WCAG AA (4.5:1 text, 3:1 UI) in any theme, resolving aliases per theme.
126
+ - `token-rhythm` warns when a numbered spacing step leaves `--space-N` = N × 2 px.
127
+ - `token-overlap-review` compares values within a token family only, so scales meeting
128
+ by design (a radius equal to a spacing step) are no longer reported.
129
+ - `ads tokens --format dtcg` exports the tokens as W3C Design Tokens JSON with typed
130
+ values, alias references, and other themes and CSS-only values in `$extensions`.
131
+ - Accessibility guards (warnings, with WCAG references; guide `ads://guides/accessibility`):
132
+ `a11y-target-size` (controls under 24 px), `a11y-focus` (`--focus-w` under 2 px, no
133
+ `:focus-visible` in `base.css`), `a11y-text-resize` (px font sizes), `a11y-reduced-motion`
134
+ (durations without a reduced-motion value, infinite component animations without a
135
+ guard), `a11y-text-spacing` (body line height under 1.5, lines over 80ch),
136
+ `a11y-image-alt` (`<img>` without `alt`) and `a11y-keyboard` (clickable non-interactive
137
+ elements, except managed widget children and backdrops).
138
+ - Motion: six durations (`--dur-instant` 70 ms, `--dur-fast`, `--dur-moderate` 150 ms,
139
+ `--dur-normal`, `--dur-slow`, `--dur-slower` 700 ms), all 0 under reduced motion, and `--ease-strong`,
140
+ `--ease-enter-strong` and `--ease-exit-strong` for rare important moments. The ads-motion
141
+ build and review guides map each token to its use and give the easing rules.
142
+ - Themes: `themes` in `ds.config.json` declares named themes with their color scheme (the
143
+ starter: light and dark). A theme applies to the page or one section through
144
+ `[data-theme]`; the starter's roles re-resolve inside themed sections. The showcase theme
145
+ button steps through declared themes; captures take a theme name; previews receive it as
146
+ `adsTheme` in host context; contrast is reviewed per declared theme; `ads tokens --format
147
+ dtcg --theme <name>` exports one theme. New checks: `theme-undeclared` (error),
148
+ `theme-new-token`, `theme-coverage` and `theme-empty` (warnings).
149
+ - Branding guidance for pictograms and illustrations: brand artwork under
150
+ `assets/brand/pictograms/`, 48 px minimum, quarter-size clear space, circle or square
151
+ containers, light/dark pairs, never as UI icons or logos.
152
+ - Icons: the starter has a 24 px glyph set (`assets.glyphs`), `Icon` (sizes `--icon-sm/md/lg/xl`,
153
+ `currentColor`, decorative unless labelled) and `IconButton` (required label, square
154
+ control-height target). New warnings: `a11y-icon-label` (icon-only buttons and links
155
+ without a name), `glyph-viewbox` and `glyph-color`.
156
+ - Color roles for layers, fields and states: `--bg-raised`, `--bg-field`, `--bg-overlay`,
157
+ `--bg-skeleton` and neutral disabled roles; `token-contrast` also checks text on fields and
158
+ raised layers. The starter's Button and TextField use the field and disabled roles.
159
+ - The token contract allows `--container-*` widths and `--grid-*` tokens.
160
+ - Grid: the starter's Layout tokens include a column grid (4/8/16 columns,
161
+ wide/narrow/condensed gutters, margins), and its `components/Layout/Grid` (`Grid`,
162
+ `GridItem` with spans per size) follows its container's width through container queries.
163
+ The showcase header's grid button overlays the project's `--grid-*` columns on every
164
+ preview to check alignment.
165
+
166
+ ## 0.3.45
167
+
32
168
  - `ads create <folder> --framework react|preact` creates a new design-system project
33
169
  from the starter shipped in the same ADS version, so the project always matches
34
170
  the tool that checks it. It names the package (`--name`, default the folder name),
@@ -249,7 +385,7 @@ Completed 2026-10-29T21:08:14.889Z (1016 seconds).
249
385
  from build budgets, and keep configuration replacements parked until validation
250
386
  completes. Fail malformed full-build catalogs promptly and recover complete
251
387
  catalogs after repair. Keep read-only architecture reports outside the project.
252
- - In the frozen Gidi acceptance workload, peak process-tree PSS fell from
388
+ - In the frozen application acceptance workload, peak process-tree PSS fell from
253
389
  7.99 to 4.56 GiB and two complete draft/accept cycles fell from 355.7 to
254
390
  270.3 seconds, retaining all validation gates. See the
255
391
  [benchmark report](https://github.com/reqvire-org/ads/blob/v0.3.35/docs/benchmarks/gidi-preview-memory.md).
package/docs/CONTRACTS.md CHANGED
@@ -162,11 +162,14 @@ valueFrom: ["paint", "scheme.day", "scheme.night"],
162
162
  ```
163
163
 
164
164
  Register each matching `config.*.<path>` in `paintInputs`. The producer may write
165
- one declared field, or an exact `light-dark(${entry.scheme.day}, ${entry.scheme.night})`
166
- template over two declared fields. The normal key/map/root proof still applies.
167
- Raw constants, undeclared fields, extra writes and unknown transforms are rejected.
168
- The browser audit checks actual accessible color references in both branches;
169
- a local SVG URL or `none` is not a CSS color inside `light-dark()`.
165
+ one declared field, or a per-theme value built with the generated helpers from
166
+ `tokens/themes.generated.ts`: `themed({ light: entry.scheme.day, dark: entry.scheme.night })`
167
+ (keys exactly the declared themes) or `themedByScheme({ light: …, dark: … })` (each theme
168
+ takes the value for its color scheme). Every value is a declared field and the argument is
169
+ an object literal without spreads. The normal key/map/root proof still applies. Raw
170
+ constants, undeclared fields, `light-dark()`, extra writes and unknown transforms are
171
+ rejected. The browser audit checks an accessible color reference in every theme's branch;
172
+ a local SVG URL or `none` is not a color there.
170
173
 
171
174
  Families cannot overlap shared tokens, private runtime
172
175
  prefixes or other bindings. A broad family such as `--color-${key}` grants no
@@ -175,12 +178,12 @@ cannot be established. Registered paint consumers list their allowed binding IDs
175
178
  borrowing a peer's binding family or private runtime variable remains invalid. Bindings are scoped
176
179
  to their actual root; portals outside it need deliberate project integration.
177
180
 
178
- A registered binding producer may combine two accessible color references as
179
- `light-dark(var(--light-token), var(--dark-token))`. The App paint audit checks
180
- both branches and their observed effect in the active color scheme. Raw colors,
181
- undefined tokens and SVG URLs inside this color function remain invalid.
181
+ A registered binding producer gives a per-theme value with `themed()` or
182
+ `themedByScheme()`; its output is `var(--ads-if-<theme>, <reference>)` once per declared
183
+ theme, in declared order. The App paint audit checks every branch and its observed effect
184
+ in the active theme. Raw colors, undefined tokens and SVG URLs in a branch remain invalid.
182
185
  This derived binding form does not widen public paint-input types; use constrained
183
- references for each theme input and verify both color schemes in browser checks.
186
+ references for each theme input and verify every theme in browser checks.
184
187
 
185
188
  The App audit checks current mounted instances, accessible values, local SVG
186
189
  resources and computed paint-property responses. Visibility and complete rendered