@reqvire-org/ads 0.4.2 → 0.4.4
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 +11 -2
- package/dist/a11y.mjs +71 -65
- package/dist/analysis/helpers.mjs +5 -3
- package/dist/analysis/inputs.mjs +13 -6
- package/dist/analysis/module-resolvers.mjs +46 -0
- package/dist/analysis/service.mjs +7 -0
- package/dist/analysis/syntax.mjs +20 -5
- package/dist/assets.mjs +1 -1
- package/dist/boundaries.mjs +6 -4
- package/dist/bun-compiler.mjs +6 -5
- package/dist/check-service.mjs +8 -5
- package/dist/check.mjs +11 -46
- package/dist/component-contrast.mjs +126 -8
- package/dist/contrast-composition.mjs +80 -0
- package/dist/contrast-styles.mjs +88 -0
- package/dist/finding-rules.mjs +2 -0
- package/dist/font-rules.mjs +20 -15
- package/dist/fonts-generated.mjs +21 -14
- package/dist/foundation-views.mjs +6 -2
- package/dist/image-attributes.mjs +96 -92
- package/dist/mcp/build-status.mjs +8 -3
- package/dist/mcp/drafts.mjs +12 -5
- package/dist/mcp/mutations.mjs +11 -8
- package/dist/mcp/preview-widget.bundle.js +45 -45
- package/dist/mcp/resource-loader.js +1 -201
- package/dist/mcp/server.mjs +19 -5
- package/dist/pictogram-model.mjs +59 -0
- package/dist/pictograms.mjs +52 -0
- package/dist/preview-bun.mjs +76 -60
- package/dist/preview-incremental.mjs +358 -0
- package/dist/preview-manifest-update.mjs +70 -0
- package/dist/preview-resources.mjs +33 -1
- package/dist/render-audit/image-shape.mjs +13 -3
- package/dist/render-audit/pictograms.mjs +88 -0
- package/dist/render-audit/worker.mjs +12 -0
- package/dist/render-audit.mjs +11 -1
- package/dist/render-composition.mjs +186 -0
- package/dist/scenario-registry.mjs +2 -2
- package/dist/scenarios-compiler.mjs +1 -1
- package/dist/showcase/client.bundle.js +23 -23
- package/dist/showcase/draft-navigation.js +5 -5
- package/dist/showcase/foundation-view.css +3 -0
- package/dist/showcase/foundation-view.mjs +3 -0
- package/dist/showcase/pictogram-view.mjs +53 -0
- package/dist/showcase/ui/ui.js +2 -0
- package/dist/skills/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +18 -2
- package/dist/skills/ads-designer/references/accessibility.md +70 -2
- package/dist/skills/ads-designer/references/branding.md +5 -16
- package/dist/skills/ads-designer/references/performance.md +3 -2
- package/dist/skills/ads-designer/references/pictograms.md +131 -0
- package/dist/skills/ads-designer/references/runtimes.md +15 -0
- package/dist/skills/ads-import/references/runtimes.md +15 -0
- package/dist/skills/ads-migrate/SKILL.md +2 -1
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +2 -3
- package/dist/skills/ads-migrate/references/0.4.3-to-0.4.4.md +80 -0
- package/dist/skills/ads-port/SKILL.md +4 -1
- package/dist/skills/ads-port/references/runtimes.md +15 -0
- package/dist/source-values.mjs +4 -1
- package/dist/starters/react/design-system/assets/pictograms/catalog.ads.json +13 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.dark.svg +7 -0
- package/dist/starters/react/design-system/assets/pictograms/journey.svg +7 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.exports.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.fixture.ts +1 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.ads.scenario.tsx +7 -0
- package/dist/starters/react/design-system/components/Content/Pictogram/Pictogram.tsx +26 -0
- package/dist/style-token-rules.mjs +51 -0
- package/dist/task-cache.mjs +2 -2
- package/dist/units.mjs +4 -4
- package/dist/validation-inputs.mjs +7 -3
- package/docs/ADS.md +6 -1
- package/docs/ARCHITECTURE.md +144 -16
- package/docs/CACHING.md +65 -1
- package/docs/CHANGELOG.md +86 -50
- package/docs/GUIDE.md +52 -7
- package/docs/MCP.md +47 -16
- package/docs/benchmarks/README.md +1 -1
- package/package.json +7 -4
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,90 +2,126 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
together after one shared build. Each group retains its worker settings; the
|
|
7
|
-
overlap-mode setting is removed.
|
|
8
|
-
- Spatial checks protect generated geometry through composed selector branches,
|
|
9
|
-
attributes, escaped/cased properties and keyframes. Unknown attribute values
|
|
10
|
-
cannot certify cell ownership or hide a possible override. Draft rejection and
|
|
11
|
-
repaired publication use the same checks; focused benchmarks cover these paths.
|
|
12
|
-
|
|
13
|
-
- ADS's showcase has one popover surface, the new `Popover` component: chrome background, square
|
|
14
|
-
corners, a chrome border and a light shadow. The layout-guides menu and the preview-status
|
|
15
|
-
popover both render inside it.
|
|
16
|
-
- The preview-status popover is readable: a title with the problem count, one entry per
|
|
17
|
-
diagnostic (location, rule, first sentence, the rest under "Why and how to fix"), and a footer
|
|
18
|
-
with background progress and an outlined Retry preview (`ToolbarButton variant="outlined"`).
|
|
19
|
-
Only the problem list scrolls. The host renders the same structure (`PreviewMessageContent`).
|
|
20
|
-
|
|
21
|
-
- Tokens → Grid system adds Units and scale (fine and mini unit, each scale step at its real
|
|
22
|
-
width in mini units), Grid roles (each role the spatial definition names, its `var()` chain to
|
|
23
|
-
the primitive and its measured value) and hybrid, docked-panel and floating-panel examples
|
|
24
|
-
compiled from `@ads-layout`. Everything follows the project's own spatial definition and token
|
|
25
|
-
names.
|
|
26
|
-
- In Tokens → Grid system, each token in a role's chain (and in the breakpoint table's margins)
|
|
27
|
-
is a link: it opens the token page that shows it and highlights the token.
|
|
28
|
-
|
|
29
|
-
- MCP serves the tokens as W3C Design Tokens JSON at `ads://project/tokens/dtcg` (template
|
|
30
|
-
`ads://project/tokens/dtcg{?theme,brand}`): the same export as `ads tokens --format dtcg`,
|
|
31
|
-
updated with the token sheets. `ads_tokens` returns its address as `dtcgUri`.
|
|
32
|
-
|
|
33
|
-
## 0.4.2
|
|
5
|
+
## 0.4.4
|
|
34
6
|
|
|
35
7
|
<!-- ads-local-tests:start -->
|
|
36
|
-
Local verification: **
|
|
37
|
-
Tested commit: `
|
|
38
|
-
Completed 2026-11-
|
|
8
|
+
Local verification: **860/860 passed** with `bun run test`.
|
|
9
|
+
Tested commit: `d8d9b2d093ce26d140c037f90e5c9087b8fed46d`; Bun 1.4.4.
|
|
10
|
+
Completed 2026-11-10T14:37:34.287Z (1344 seconds).
|
|
39
11
|
|
|
40
12
|
<!-- ads-local-test-proof
|
|
41
13
|
{
|
|
42
14
|
"schema": 3,
|
|
43
|
-
"version": "0.4.
|
|
44
|
-
"commit": "
|
|
45
|
-
"sourceSha256": "
|
|
15
|
+
"version": "0.4.4",
|
|
16
|
+
"commit": "d8d9b2d093ce26d140c037f90e5c9087b8fed46d",
|
|
17
|
+
"sourceSha256": "2ff7cc61caabd96b928581e79ddbc1c6df459145c0039023c2f3400947d46131",
|
|
46
18
|
"command": "bun run test",
|
|
47
19
|
"result": "pass",
|
|
48
|
-
"tests":
|
|
49
|
-
"pass":
|
|
20
|
+
"tests": 860,
|
|
21
|
+
"pass": 860,
|
|
50
22
|
"fail": 0,
|
|
51
23
|
"skipped": 0,
|
|
52
24
|
"groups": [
|
|
53
25
|
{
|
|
54
26
|
"name": "unit",
|
|
55
|
-
"tests":
|
|
56
|
-
"pass":
|
|
27
|
+
"tests": 91,
|
|
28
|
+
"pass": 91,
|
|
57
29
|
"fail": 0,
|
|
58
30
|
"skipped": 0,
|
|
59
|
-
"reportSha256": "
|
|
31
|
+
"reportSha256": "896a8879bc0071d3bc822a9a5ee6b32ba78f47c69ac81045534c39bb2e9533c5"
|
|
60
32
|
},
|
|
61
33
|
{
|
|
62
34
|
"name": "integration",
|
|
63
|
-
"tests":
|
|
64
|
-
"pass":
|
|
35
|
+
"tests": 617,
|
|
36
|
+
"pass": 617,
|
|
65
37
|
"fail": 0,
|
|
66
38
|
"skipped": 0,
|
|
67
|
-
"reportSha256": "
|
|
39
|
+
"reportSha256": "6ad851727bd92ee38143505e045d8cc7ee3624c0861510efde7beb8f7480d528"
|
|
68
40
|
},
|
|
69
41
|
{
|
|
70
42
|
"name": "browser",
|
|
71
|
-
"tests":
|
|
72
|
-
"pass":
|
|
43
|
+
"tests": 152,
|
|
44
|
+
"pass": 152,
|
|
73
45
|
"fail": 0,
|
|
74
46
|
"skipped": 0,
|
|
75
|
-
"reportSha256": "
|
|
47
|
+
"reportSha256": "af3bcf2d9aeb6d80d073763ff346ec142c476c327c9e12b4827e3964c28b841d"
|
|
76
48
|
}
|
|
77
49
|
],
|
|
78
50
|
"testOverrides": {
|
|
79
|
-
"
|
|
51
|
+
"ADS_INTEGRATION_WORKERS": "1",
|
|
52
|
+
"ADS_BROWSER_WORKERS": "1"
|
|
80
53
|
},
|
|
81
54
|
"bun": "1.4.4",
|
|
82
|
-
"completedAt": "2026-11-
|
|
83
|
-
"durationMs":
|
|
84
|
-
"logSha256": "
|
|
55
|
+
"completedAt": "2026-11-10T14:37:34.287Z",
|
|
56
|
+
"durationMs": 1343621,
|
|
57
|
+
"logSha256": "dba1d323e6a2d4da20f000f86d75d8955c490d61c55f18765656f5d5bee8ae82"
|
|
85
58
|
}
|
|
86
59
|
-->
|
|
87
60
|
<!-- ads-local-tests:end -->
|
|
88
61
|
|
|
62
|
+
- Load the configured project stylesheet in generated Token and Brand previews. Track inlined CSS import dependencies by contents so same-size/same-time token edits refresh correctly; include Preact refresh helpers in the private compiler graph.
|
|
63
|
+
- Stop draft watcher reconciliation when its controller closes, and skip previews retired while another draft refreshes.
|
|
64
|
+
- Update watched previews through a private incremental module graph inside the existing isolated iframe. Preserve state and focus for compatible React/Preact edits, refresh styles and lazy branches, and reopen safely for incompatible updates or rejected revisions. Keep full Bun builds and native acceptance gates.
|
|
65
|
+
- Reuse known preview manifests across polling and live-to-verified handoff. Internal MCP resource updates transfer changed records, with bounded per-scope caching and a full-manifest fallback for expired history; agent-facing tool results remain graph references.
|
|
66
|
+
- Add the 0.4.3-to-0.4.4 migration guide and update agent runtime guidance for incremental previews, conditional state retention and verified evidence. Experimental HTTP delivery and source-emission/V3 work are excluded.
|
|
67
|
+
|
|
68
|
+
- Keep ancestor-background contrast checks active for card text supplied through string/number props, inert class hooks and optional layout-only classes. Preserve unresolved diagnostics for paint overrides and unknown children.
|
|
69
|
+
|
|
70
|
+
## 0.4.3
|
|
71
|
+
|
|
72
|
+
- Audit contrast on the project's canvas without decorative showcase staging, preserving subject framing. Measure image shape against its content or CSS sizing box so borders, padding and rotated bounding rectangles do not cause false failures.
|
|
73
|
+
|
|
74
|
+
- Detect text contrast across source-resolvable component composition, including inherited ancestor backgrounds and forwarded children; report uncertain cascades for rendered auditing without requiring custom token-pair declarations.
|
|
75
|
+
|
|
76
|
+
- Reuse native resolver leases and compiler options within input capture; share captured bytes across warm-check keys/analysis and draft inspection/preparation, preserving post-check and publication freshness checks.
|
|
77
|
+
|
|
78
|
+
- Share native import-resolution queries between sibling source files during input capture, avoiding repeated resolver work while preserving freshness checks.
|
|
79
|
+
- Avoid duplicate acceptance inventories for identical input scopes, skip preview-workspace comparisons when there is no reviewed preview, and skip browser-behavior planning for an empty behavior selection.
|
|
80
|
+
|
|
81
|
+
- Reuse captured native ASTs for image/accessibility checks and share font/CSS facts across requests on an immutable revision, preserving dependency-sensitive checks.
|
|
82
|
+
|
|
83
|
+
- Add a separate pictogram catalogue/gallery, explicit theme variants, SVG source guards and rendered artwork checks, with an original shared-starter example.
|
|
84
|
+
|
|
85
|
+
- `component-contrast` applies WCAG's large-text minimum: a pair needs 3:1 instead of
|
|
86
|
+
4.5:1 where its block or an enclosing block declares `font-size` of at least 24px, or
|
|
87
|
+
18.66px at `font-weight` 700 or more, in `px`, `pt` or `rem`, literally or through a
|
|
88
|
+
token resolved per theme and brand. Other sizes keep 4.5:1. Each failing context reports
|
|
89
|
+
its `minimum`.
|
|
90
|
+
|
|
91
|
+
- Keep showcase subject framing stable during preview reloads. Full-frame
|
|
92
|
+
subjects no longer briefly acquire specimen padding while resources or fonts
|
|
93
|
+
load; replacement roots and delayed framework mounts resolve padding before paint.
|
|
94
|
+
|
|
95
|
+
## 0.4.2
|
|
96
|
+
|
|
97
|
+
- Test and release verification always start unit, integration and browser groups
|
|
98
|
+
together after one shared build. Each group retains its worker settings; the
|
|
99
|
+
overlap-mode setting is removed.
|
|
100
|
+
- Spatial checks protect generated geometry through composed selector branches,
|
|
101
|
+
attributes, escaped/cased properties and keyframes. Unknown attribute values
|
|
102
|
+
cannot certify cell ownership or hide a possible override. Draft rejection and
|
|
103
|
+
repaired publication use the same checks; focused benchmarks cover these paths.
|
|
104
|
+
|
|
105
|
+
- ADS's showcase has one popover surface, the new `Popover` component: chrome background, square
|
|
106
|
+
corners, a chrome border and a light shadow. The layout-guides menu and the preview-status
|
|
107
|
+
popover both render inside it.
|
|
108
|
+
- The preview-status popover is readable: a title with the problem count, one entry per
|
|
109
|
+
diagnostic (location, rule, first sentence, the rest under "Why and how to fix"), and a footer
|
|
110
|
+
with background progress and an outlined Retry preview (`ToolbarButton variant="outlined"`).
|
|
111
|
+
Only the problem list scrolls. The host renders the same structure (`PreviewMessageContent`).
|
|
112
|
+
|
|
113
|
+
- Tokens → Grid system adds Units and scale (fine and mini unit, each scale step at its real
|
|
114
|
+
width in mini units), Grid roles (each role the spatial definition names, its `var()` chain to
|
|
115
|
+
the primitive and its measured value) and hybrid, docked-panel and floating-panel examples
|
|
116
|
+
compiled from `@ads-layout`. Everything follows the project's own spatial definition and token
|
|
117
|
+
names.
|
|
118
|
+
- In Tokens → Grid system, each token in a role's chain (and in the breakpoint table's margins)
|
|
119
|
+
is a link: it opens the token page that shows it and highlights the token.
|
|
120
|
+
|
|
121
|
+
- MCP serves the tokens as W3C Design Tokens JSON at `ads://project/tokens/dtcg` (template
|
|
122
|
+
`ads://project/tokens/dtcg{?theme,brand}`): the same export as `ads tokens --format dtcg`,
|
|
123
|
+
updated with the token sheets. `ads_tokens` returns its address as `dtcgUri`.
|
|
124
|
+
|
|
89
125
|
- ADS runs on Bun with one asynchronous native TypeScript analysis engine. Checks,
|
|
90
126
|
contract discovery, change selection and draft acceptance share captured inputs,
|
|
91
127
|
ASTs and cached facts; draft branches retain isolation and exact-byte publication.
|
package/docs/GUIDE.md
CHANGED
|
@@ -14,6 +14,11 @@ foundation scaffolding. Default initialization creates an empty design system;
|
|
|
14
14
|
`--include-starter` adds the shared example design and application source. ADS
|
|
15
15
|
adds no runtime dependency to the application's shipped UI.
|
|
16
16
|
|
|
17
|
+
For an existing installation, use the [ads-migrate skill](../skills/ads-migrate/SKILL.md).
|
|
18
|
+
The [0.4.3 → 0.4.4 guide](../skills/ads-migrate/references/0.4.3-to-0.4.4.md)
|
|
19
|
+
covers dependency updates, restarting the managed runtime and checking incremental
|
|
20
|
+
previews without rewriting project components or deleting active drafts.
|
|
21
|
+
|
|
17
22
|
## Use ADS through MCP
|
|
18
23
|
|
|
19
24
|
Connect your coding agent using the [MCP client setup](MCP.md#connect-codex-or-claude).
|
|
@@ -89,6 +94,13 @@ notifications. The portable [capture guide](../skills/ads-designer/references/ca
|
|
|
89
94
|
explains screenshot setup, named targets, limits and comparison usage; MCP serves
|
|
90
95
|
the same guide at `ads://guides/captures`.
|
|
91
96
|
|
|
97
|
+
Watched previews keep the isolated frame alive during compatible edits. Component
|
|
98
|
+
state, entered text and focus can survive code and style updates; changed hook
|
|
99
|
+
signatures follow React or Preact's reset rules. Incompatible module changes and
|
|
100
|
+
restoring rejected revisions may reset the preview. “Checking changes…” is live
|
|
101
|
+
feedback, not acceptance: source gates and selected browser checks still decide
|
|
102
|
+
whether the revision passes. Application production builds are unchanged.
|
|
103
|
+
|
|
92
104
|
## Implementation support
|
|
93
105
|
|
|
94
106
|
Linaria is required for component and pattern styling. Projects choose their
|
|
@@ -573,7 +585,13 @@ choosing another ramp step.
|
|
|
573
585
|
Linaria style block (the template's top level, a nested block such as `&:hover` or
|
|
574
586
|
`&[aria-selected="true"]`, or an at-rule) declares both `color: var(--a)` and
|
|
575
587
|
`background` or `background-color: var(--b)`, the pair needs 4.5:1 in every theme and brand,
|
|
576
|
-
resolved and composited as `token-contrast` resolves it.
|
|
588
|
+
resolved and composited as `token-contrast` resolves it. Large text needs 3:1 (WCAG 1.4.3):
|
|
589
|
+
where the block or an enclosing block declares `font-size` of at least 24px, or at least
|
|
590
|
+
18.66px with `font-weight` 700 or more, in `px`, `pt` or `rem` (a 16px root), literally or
|
|
591
|
+
through a token resolved per theme and brand. Other sizes (`em`, `%`, `calc()`, keywords,
|
|
592
|
+
the `font` shorthand) are not known to be large and keep 4.5:1; a size set by another
|
|
593
|
+
composed class is not seen, so declare it in the block that pairs the colors. Each failing
|
|
594
|
+
context reports its `minimum`. Local custom properties set in the
|
|
577
595
|
block or an enclosing block resolve one level; an undeclared one reads its `var()` fallback.
|
|
578
596
|
Fix it with the role contract: `--x-text` on
|
|
579
597
|
`--x-bg`, `--x-fg` on `--x` (not `--success` as text on `--success-bg`). Disabled states
|
|
@@ -582,9 +600,30 @@ Fix it with the role contract: `--x-text` on
|
|
|
582
600
|
sides and native `<progress>`, `<meter>` and range parts are skipped. A side that names no
|
|
583
601
|
declared color token is a `component-contrast-unresolved` info item; so is text matching the
|
|
584
602
|
canvas (under 1.25:1) over a translucent background, which sits on another backdrop.
|
|
585
|
-
Pairs `token-contrast` checks are not repeated.
|
|
586
|
-
|
|
587
|
-
|
|
603
|
+
Pairs `token-contrast` checks are not repeated.
|
|
604
|
+
|
|
605
|
+
The same rule also follows source-resolvable owned JSX composition: imported component
|
|
606
|
+
calls, wrappers forwarding `children`, fragments, returned style objects and separate
|
|
607
|
+
Linaria classes. For actual text, it checks the resolved foreground against the element's
|
|
608
|
+
background or an owned ancestor's background, across themes and brands. For example, a
|
|
609
|
+
link using `--text-product` inside a panel using `--bg-menu` is checked automatically;
|
|
610
|
+
there is no custom pair declaration to remember. Transparent wrappers preserve the
|
|
611
|
+
backdrop; translucent token layers need a known opaque ancestor. Composed text can use a
|
|
612
|
+
known inherited font size/weight. Hidden and disabled text is excluded; matching text and
|
|
613
|
+
background tokens are still an error when the source proves that text is rendered.
|
|
614
|
+
Text supplied through a `string` or `number` prop is checked too. Literal class hooks
|
|
615
|
+
do not hide the backdrop when no captured paint selector targets them. Optional classes
|
|
616
|
+
that only change layout preserve contrast evidence; every alternative must establish
|
|
617
|
+
the same paint and visibility facts.
|
|
618
|
+
|
|
619
|
+
This composition pass does not guess the browser cascade. Competing classes, differing
|
|
620
|
+
paint/interpolation alternatives, unknown prop spreads or components, conditional or
|
|
621
|
+
descendant paint selectors, gradients, opacity, filters, out-of-flow positioning and
|
|
622
|
+
missing backdrops produce `component-contrast-unresolved` info where contrast evidence
|
|
623
|
+
is incomplete. SVG text, native control value/placeholder text and dynamically generated
|
|
624
|
+
DOM remain browser-audit concerns. An informational limit is not a contrast pass: run
|
|
625
|
+
`ads audit` on the affected composed scenario and interaction states. Axe remains the
|
|
626
|
+
rendered check, including actual cascade, visibility and backgrounds.
|
|
588
627
|
|
|
589
628
|
**Static accessibility.** Errors: `a11y-target-size` (`--control-height-*` at least 24 px),
|
|
590
629
|
`a11y-focus` (`--focus-w` at least 2 px and a `:focus-visible` indicator in `base.css`),
|
|
@@ -741,7 +780,7 @@ demo frame to a maximum.
|
|
|
741
780
|
|---|---|---|
|
|
742
781
|
| `img-attributes` | `ads check` | A raw `<img>` in components, patterns or compositions without `loading`, or without `width` and `height`, a visible `aspect-ratio`, a width and height in its style, or out-of-flow positioning. A `srcset` with width descriptors and no `sizes`, on `<img>` or the project's `Image`. A spread or a class from elsewhere is an `img-attributes-unresolved` info item |
|
|
743
782
|
| `asset-image-budget` | `ads check` | An image in `assets/` over its limit: SVG 100 KB, WebP and AVIF 300 KB, JPEG 400 KB, PNG and GIF 500 KB. `assets.imageBudgetKb` is one limit for every format |
|
|
744
|
-
| `img-shape` | `ads audit` | A visible image whose box differs from its
|
|
783
|
+
| `img-shape` | `ads audit` | A visible image whose CSS sizing box differs from its explicit `aspect-ratio`, or, with none and `object-fit: fill`, whose content box differs from its `width` and `height`. Explicit CSS ratios respect `box-sizing`; attribute ratios exclude border and padding. A height attribute beats `aspect-ratio`: add `height: auto`. `object-fit: cover` in a box of its own with no `aspect-ratio` is a deliberate crop |
|
|
745
784
|
| `layout-shift` | `ads audit` | A scenario with Cumulative Layout Shift above 0.1 on first render, where the browser reports it (Chromium) |
|
|
746
785
|
| `themes-generated` | `ads check` | A stale `tokens/fonts.preload.generated.ts` |
|
|
747
786
|
| `font-weight-missing` | `ads check` | CSS uses a weight of a family `tokens/fonts.css` declares and no face covers it. A range such as `100 900`, or a face with no `font-weight`, covers what it spans. A weight in a rule with no `font-family` counts against the body's family |
|
|
@@ -796,13 +835,17 @@ selected by default; `--port 4185` selects a fixed port.
|
|
|
796
835
|
The client negotiates the current modern MCP protocol, discovers menus with
|
|
797
836
|
`ads_tokens`/`ads_scenarios`, invokes `ads_show_scenario` and renders
|
|
798
837
|
Apps through the official bridge. It refreshes menus on catalogue notifications
|
|
799
|
-
and refreshes the active scenario in the same App after a successful build.
|
|
838
|
+
and refreshes the active scenario in the same App after a successful build.
|
|
839
|
+
Compatible React/Preact edits retain component state, typed values and focus.
|
|
840
|
+
Edits that change hook signatures or module boundaries can reset state; failed
|
|
841
|
+
checks restore verified output. Errors identify
|
|
800
842
|
stale retained output. Its neutral header and left pane align and collapse
|
|
801
843
|
together. Themes flow through the Apps host context. No project catalogue pages
|
|
802
844
|
or direct component imports are used by this client.
|
|
803
845
|
|
|
804
846
|
The project owns implementations, colocated scenarios/fixtures, foundation
|
|
805
|
-
CSS and a framework mount adapter. ADS
|
|
847
|
+
CSS and a framework mount adapter. ADS runs its preview compiler on Bun, using
|
|
848
|
+
incremental modules for watched previews and complete bundles for verification.
|
|
806
849
|
The starter and init provide the mount under `design-system/showcase/mcp/`.
|
|
807
850
|
Configure the framework; ADS compiles every scenario into one shared preview graph:
|
|
808
851
|
|
|
@@ -1422,3 +1465,5 @@ trusted local verification, not a signed attestation or a substitute for review.
|
|
|
1422
1465
|
|
|
1423
1466
|
Release CI checks the committed proof, builds and packs the tool, and publishes
|
|
1424
1467
|
the tagged version with its changelog entry as the release notes. It does not repeat the local browser/package suite.
|
|
1468
|
+
|
|
1469
|
+
To add illustrative SVG artwork, use `design-system/assets/pictograms/catalog.ads.json` and the separate **Pictograms** showcase section. The starter includes a Journey example and a project-owned Pictogram component. Read the [pictogram guide](../skills/ads-designer/references/pictograms.md) for full-color artwork, theme selection, accessibility and checks. Brand identity and UI icons keep their own sections.
|
package/docs/MCP.md
CHANGED
|
@@ -340,6 +340,12 @@ returns it as `dtcgUri`). If the client cannot render Apps, use the returned
|
|
|
340
340
|
showcase URL. Build reports identify current, stale and failed output; browser
|
|
341
341
|
review and project checks still verify behavior.
|
|
342
342
|
|
|
343
|
+
Pictograms are discoverable with `ads_scenarios({kind: "pictograms"})` and preview
|
|
344
|
+
ids `pictograms/<id>`. Their source owner is `assets/pictograms`; its drafts attach
|
|
345
|
+
to those gallery entries. `ads://guides/pictograms` documents the catalogue, theme
|
|
346
|
+
rules, artistic freedom and render-guard limits. They are tool-owned foundation
|
|
347
|
+
views, not authored `.ads.scenario.tsx` files.
|
|
348
|
+
|
|
343
349
|
The server supplies agent guidance through its instructions, tool descriptions,
|
|
344
350
|
`ads://project/guide` and packaged ADS skills.
|
|
345
351
|
|
|
@@ -799,6 +805,7 @@ the tool result. `resources/read` supplies these registered resources:
|
|
|
799
805
|
| `ui://ads/preview` | Tool-owned App bootstrap, official App SDK and resource loader |
|
|
800
806
|
| `ads://preview/manifest` | ADS preview compiler's versioned scenario/dependency graph |
|
|
801
807
|
| `ads://preview/live` | Current-source compiled feedback while checks are pending; explicitly unverified |
|
|
808
|
+
| `ads://preview/manifest{?from}` / `ads://preview/live{?from}` | Internal UI updates relative to a known SHA-256 graph revision |
|
|
802
809
|
| `ads://assets/<hash>.js` | Compiled shared runtime or scenario module |
|
|
803
810
|
| `ads://assets/<hash>.css` | Extracted foundation or scenario styles |
|
|
804
811
|
| `ads://assets/<hash>.woff2` (and other asset types) | Binary font/image/worker assets |
|
|
@@ -811,6 +818,18 @@ and asset references. URIs are immutable identities; manifests publish atomicall
|
|
|
811
818
|
after all files exist. The server validates the graph and served bytes. Binary
|
|
812
819
|
resources use MCP `blob` content rather than text encoding.
|
|
813
820
|
|
|
821
|
+
The App retains known manifests and uses the verified `manifestRevision` from
|
|
822
|
+
`ads://project/build` (or a current live/tool selection) to reuse one without
|
|
823
|
+
another graph download. When a read is needed, `?from=<revision>` returns a
|
|
824
|
+
version-1 envelope: `full` with `manifest`, `unchanged` with current metadata,
|
|
825
|
+
or `delta` with changed/removed asset and scenario records and, when changed,
|
|
826
|
+
scenario order. Updates name their exact `baseRevision`; the App reconstructs
|
|
827
|
+
and validates the graph without changing its cached base. Missing/pruned history
|
|
828
|
+
or a delta larger than the full response returns `full`. Omitting `from` still
|
|
829
|
+
returns the original manifest shape. Live queries retain the same current-source
|
|
830
|
+
and session checks. These exchanges stay inside the preview resource bridge;
|
|
831
|
+
tool replies continue to carry selection/status and graph references, not graphs.
|
|
832
|
+
|
|
814
833
|
The loader runs **inside the App iframe**. It reads through the host's resource
|
|
815
834
|
bridge, verifies bytes, materializes Blob URLs and native ESM import maps, loads
|
|
816
835
|
CSS/fonts, then invokes the selected module's `mount(container)`. It caches
|
|
@@ -875,10 +894,11 @@ showcase puts these states in a small monochrome header indicator with tooltip
|
|
|
875
894
|
and expandable details; it keeps status and loading overlays out of the widget
|
|
876
895
|
area. Other Apps hosts retain the in-App status fallback.
|
|
877
896
|
|
|
878
|
-
### ADS-owned
|
|
897
|
+
### ADS-owned preview compiler
|
|
879
898
|
|
|
880
|
-
Bun 1.4.1+
|
|
881
|
-
|
|
899
|
+
ADS runs on Bun 1.4.1+ and compiles previews independently of the application's
|
|
900
|
+
bundler. Watched previews use a private incremental module graph; complete
|
|
901
|
+
unwatched previews use Bun builds. Configure `framework`; ADS supplies its compiler and
|
|
882
902
|
publishes the graph to `.ds/preview/`:
|
|
883
903
|
|
|
884
904
|
```json
|
|
@@ -887,7 +907,7 @@ publishes the graph to `.ds/preview/`:
|
|
|
887
907
|
|
|
888
908
|
Use `preact` for native Preact. The project retains its framework mount in
|
|
889
909
|
`showcase/mcp/main.ads.mount.tsx` under the ADS root. It exports
|
|
890
|
-
`mountScenario(Scenario,container)` and returns cleanup.
|
|
910
|
+
`mountScenario(Scenario,container)` and returns cleanup. ADS selects the framework JSX
|
|
891
911
|
runtime, resolves the public alias and extracts Linaria through the shared tag
|
|
892
912
|
resolver. Project application build settings stay under project control.
|
|
893
913
|
|
|
@@ -898,14 +918,17 @@ continuous compiler. Project setup can call `compilePreviews` from
|
|
|
898
918
|
always runs native gates; `acceptance.scripts`, `acceptance.behavior` and
|
|
899
919
|
`acceptance.audit` choose additional scripts and whether the owners' tests and audit run. Oxlint is not an ADS gate dependency.
|
|
900
920
|
|
|
901
|
-
MCP warms the prioritized view first, then
|
|
902
|
-
|
|
921
|
+
MCP warms the prioritized view first, then warms remaining views sequentially
|
|
922
|
+
through the retained module graph, without delaying service startup. One compiler job runs
|
|
903
923
|
at a time; foreground selections take priority over queued warming. Compiled views stay cached; unchanged warmed navigation
|
|
904
924
|
needs no compilation. Linaria transforms and worker bundles reuse source and
|
|
905
925
|
transitive dependency hashes. Worker compilation also uses Bun and temporary
|
|
906
926
|
worker compiler processes release their heaps after output is captured.
|
|
907
927
|
|
|
908
|
-
The build resource includes `warmup: {state,completed,total,failed}
|
|
928
|
+
The build resource includes `warmup: {state,completed,total,failed}` and optional
|
|
929
|
+
`manifestRevision`, identifying the integrity-checked verified graph for its
|
|
930
|
+
session. The revision alone does not authorize freshness: the selected entry's
|
|
931
|
+
`current` and live status still govern rendering. Build changes
|
|
909
932
|
notify supported MCP subscribers and Explorer updates automatically. Warming and
|
|
910
933
|
acceptance never suspend the interactive compiler. Cached output remains visible
|
|
911
934
|
while changed source compiles and validates.
|
|
@@ -925,11 +948,14 @@ reuses successful validation/output only when inputs, compiler/tool code,
|
|
|
925
948
|
lockfile, recorded dependencies and content digests match. A source edit
|
|
926
949
|
revalidates the project and incrementally updates the watched module graph. Both
|
|
927
950
|
must succeed against unchanged source before verified atomic publication; a failed or
|
|
928
|
-
superseded build cannot become current. Files outside
|
|
929
|
-
validation and a reconciled build. Preview refresh retains the
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
951
|
+
superseded build cannot become current. Files outside the compiled module graph still trigger
|
|
952
|
+
validation and a reconciled build. Preview refresh retains the iframe and compatible component state across
|
|
953
|
+
source and style edits, including loaded lazy branches. Token/paint audits rerun
|
|
954
|
+
against the new manifest. React Refresh and native Prefresh determine compatible
|
|
955
|
+
component/hook updates. Incompatible exports, compiler changes or added/removed
|
|
956
|
+
source files that require renewing import resolution reopen the
|
|
957
|
+
isolated frame; rejected revisions also use a clean frame when restoring already
|
|
958
|
+
executed old code. Navigation to another scenario mounts that scenario normally. Normal application builds retain their own chunking and optimization.
|
|
933
959
|
|
|
934
960
|
Accepted MCP edits enqueue preparation even without an open preview. Matching
|
|
935
961
|
validated candidate graphs seed the same project cache; location-dependent,
|
|
@@ -945,14 +971,19 @@ directories under `.ds/preview/sessions/`. Tiny
|
|
|
945
971
|
`.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
|
|
946
972
|
they are not standalone runnable previews. Six previous graph revisions retain
|
|
947
973
|
old assets for in-flight reads; older references expire with a refresh error.
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
974
|
+
Watched manifests carry `refresh: {version: 1, epoch}` and module records carry
|
|
975
|
+
`hot: {id, source}`: a session-stable logical ID and SHA-256 of the module before
|
|
976
|
+
resource-address rewriting. Complete manifests omit these optional fields.
|
|
977
|
+
The App rejects malformed/duplicate refresh identities. Watched Apps bound
|
|
978
|
+
retained metadata to 4096 records and materialized resources to 64 MiB; complete
|
|
979
|
+
bundled Apps retain the 20 selected-module-revision limit. At the next mount the
|
|
980
|
+
built-in host recreates the App when a limit is exceeded; external hosts receive
|
|
981
|
+
`ADS_PREVIEW_REOPEN`. In-flight superseded refresh also requires a clean frame. Manifest size is capped at 2 MiB and individual resources
|
|
951
982
|
at 16 MiB; those development transport limits do not alter production bundles.
|
|
952
983
|
|
|
953
984
|
### One client command, managed preview builds
|
|
954
985
|
|
|
955
|
-
With a declared framework, `ads mcp` starts ADS's
|
|
986
|
+
With a declared framework, `ads mcp` starts ADS's watched preview
|
|
956
987
|
compiler and warms the prioritized view followed by the remaining graph in
|
|
957
988
|
the background. Jobs run sequentially; foreground selections have priority. The client configuration above stays the same; no second terminal
|
|
958
989
|
or separately managed server is needed. The same compiler also builds every draft
|
|
@@ -29,7 +29,7 @@ Other performance work needs a workload specific to the changed path:
|
|
|
29
29
|
| --- | --- |
|
|
30
30
|
| Persisted batch task reports | [Cache ownership and controls](../CACHING.md); `tests/integration/task-cache.test.mjs` |
|
|
31
31
|
| Preview compilation and imported computed CSS | [Preview architecture](../ARCHITECTURE.md); `tests/browser/bun-preview.test.mjs`, `tests/integration/analysis-preview-cache.test.mjs`, `tests/integration/preview-cache.test.mjs` |
|
|
32
|
-
| Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-
|
|
32
|
+
| Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-preview-compiler); affected browser/resource tests |
|
|
33
33
|
| Execution ownership, cancellation and recovery | [Execution coordination](../MCP.md#shared-process-execution-coordination); `tests/integration/execution-coordination.test.mjs` |
|
|
34
34
|
|
|
35
35
|
Correctness tests establish their assertions, not a performance baseline. For a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A design system your agent can see and shape. Your components. Your look. Your code.",
|
|
6
6
|
"repository": {
|
|
@@ -60,15 +60,20 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@modelcontextprotocol/server": "2.4.0",
|
|
63
|
+
"@prefresh/vite": "2.4.11",
|
|
64
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
63
65
|
"@wyw-in-js/transform": "2.1.3",
|
|
64
66
|
"axe-core": "4.14.0",
|
|
65
67
|
"css-tree": "3.2.1",
|
|
68
|
+
"es-module-lexer": "1.7.0",
|
|
66
69
|
"postcss": "^8.5.30",
|
|
67
70
|
"postcss-selector-parser": "^7.1.6",
|
|
68
71
|
"postcss-value-parser": "^4.2.0",
|
|
72
|
+
"saxes": "6.0.0",
|
|
69
73
|
"sharp": "^0.35.5",
|
|
70
74
|
"turbo": "2.11.10",
|
|
71
75
|
"typescript": "7.1.0-beta",
|
|
76
|
+
"vite": "6.4.3",
|
|
72
77
|
"yaml": "2.9.1",
|
|
73
78
|
"zod": "4.4.3"
|
|
74
79
|
},
|
|
@@ -88,14 +93,12 @@
|
|
|
88
93
|
"@types/node": "^25.9.2",
|
|
89
94
|
"@types/react": "^19.2.17",
|
|
90
95
|
"@types/react-dom": "^19.2.3",
|
|
91
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
92
96
|
"@wyw-in-js/babel-preset": "^2.0.1",
|
|
93
97
|
"@wyw-in-js/vite": "^2.0.1",
|
|
94
98
|
"oxlint": "^1.69.0",
|
|
95
99
|
"preact": "11.0.1",
|
|
96
100
|
"react": "^19.2.7",
|
|
97
|
-
"react-dom": "^19.2.7"
|
|
98
|
-
"vite": "^6.0.7"
|
|
101
|
+
"react-dom": "^19.2.7"
|
|
99
102
|
},
|
|
100
103
|
"license": "MIT",
|
|
101
104
|
"peerDependencies": {
|