@reqvire-org/ads 0.3.52 → 0.3.53
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 +1 -1
- package/dist/assets.mjs +15 -1
- package/dist/browser-audit/first-render.mjs +22 -0
- package/dist/browser-audit/image-shape.mjs +36 -0
- package/dist/browser-audit/render-states.mjs +61 -35
- package/dist/browser-audit/worker.mjs +47 -12
- package/dist/browser-audit.mjs +69 -11
- package/dist/check.mjs +4 -1
- package/dist/cli.mjs +1 -1
- package/dist/config.mjs +3 -1
- package/dist/finding-rules.mjs +8 -1
- package/dist/font-rules.mjs +103 -0
- package/dist/fonts-generated.mjs +30 -12
- package/dist/mcp/preview-widget.bundle.js +50 -47
- package/dist/mcp/project-widget.bundle.js +45 -42
- package/dist/mcp/server.mjs +2 -2
- package/dist/mcp/widget.bundle.js +49 -46
- package/dist/showcase/client.bundle.js +27 -27
- package/dist/skills/ads-designer/SKILL.md +5 -3
- package/dist/skills/ads-designer/references/branding.md +2 -2
- package/dist/skills/ads-designer/references/performance.md +54 -4
- package/dist/starters/react/design-system/brand/Icons/AppIcon/AppIcon.ads.fixture.ts +1 -1
- package/dist/starters/react/design-system/brand/Identity/Logo/Logo.ads.fixture.ts +2 -2
- package/dist/starters/react/design-system/components/Content/Logo/Logo.tsx +2 -2
- package/docs/ARCHITECTURE.md +26 -2
- package/docs/CHANGELOG.md +58 -12
- package/docs/GUIDE.md +35 -3
- package/package.json +7 -7
|
@@ -341,9 +341,11 @@ does not keep rule order: give queries on one property exclusive ranges, such as
|
|
|
341
341
|
|
|
342
342
|
Use the project's image component; give `priority` to the view's main visible image only, since
|
|
343
343
|
lazy loading above the fold hurts. Call `preloadFonts()` from `tokens/fonts.preload.generated.ts`
|
|
344
|
-
in the app entry when it exists
|
|
345
|
-
|
|
346
|
-
(`
|
|
344
|
+
in the app entry when it exists, or put its `fontPreloadTags()` in the page from a build step for an
|
|
345
|
+
earlier preload. `ads check` fails unsized or unchosen `<img>` (`img-attributes`), oversized assets
|
|
346
|
+
(`asset-image-budget`, `asset-font-budget`) and a weight no face covers (`font-weight-missing`);
|
|
347
|
+
`ads audit` fails layout shift above 0.1 (`layout-shift`) and an image at another shape than it
|
|
348
|
+
declares (`img-shape`). ADS does not cover page metadata, `noindex`, sitemaps or hosting: run Lighthouse
|
|
347
349
|
on a production build with real URLs. Read [performance.md](references/performance.md)
|
|
348
350
|
(`ads://guides/performance`).
|
|
349
351
|
|
|
@@ -30,7 +30,7 @@ artwork; component styles still use tokens.
|
|
|
30
30
|
`--display-brand-<brand>` the same way.
|
|
31
31
|
- **Show it in a component.** A logo appears in the UI through a project
|
|
32
32
|
component (the starter's `components/Content/Logo`) that imports the SVG with
|
|
33
|
-
|
|
33
|
+
a plain import, which gives its URL. Artwork that nothing uses is reported (`brand-unused`).
|
|
34
34
|
- **Preview it.** Brand previews are the showcase's first section, **Brand**. They
|
|
35
35
|
live in `brand/`, grouped by folder like components: the starter has
|
|
36
36
|
`brand/Identity/Logo` and `brand/Icons/AppIcon`, rendered by the review
|
|
@@ -147,7 +147,7 @@ the rule it is used under. Their owners' trademark and usage guidelines
|
|
|
147
147
|
apply: use the official artwork, keep its colors and proportions, and do not change
|
|
148
148
|
it to match the project's look.
|
|
149
149
|
|
|
150
|
-
Show them as images: import the file
|
|
150
|
+
Show them as images: import the file, which gives its URL, and render an `<img>` with an
|
|
151
151
|
`alt` that names the product, or `alt=""` beside text that already names it.
|
|
152
152
|
|
|
153
153
|
Never mute, tint or recolor another product's logo. Use a one-color version only where
|
|
@@ -40,6 +40,18 @@ Suggestions for large content images:
|
|
|
40
40
|
network panel. The file should be the smallest candidate at least as wide as the image at that
|
|
41
41
|
device's pixel ratio.
|
|
42
42
|
|
|
43
|
+
`img-shape` (`ads audit`) fails a visible image whose box differs from its CSS `aspect-ratio`, or,
|
|
44
|
+
with none and `object-fit: fill`, from its `width` and `height`. `aspect-ratio` with both attributes
|
|
45
|
+
needs `height: auto`, or the height attribute wins and the image crops: it still reserves its space
|
|
46
|
+
and passes `layout-shift`. A deliberate crop sets `object-fit` in a box of its own, with no
|
|
47
|
+
`aspect-ratio`.
|
|
48
|
+
|
|
49
|
+
Other choices that are the project's, since ADS owns no image pipeline:
|
|
50
|
+
|
|
51
|
+
- Load lazily below the fold, and never the main image.
|
|
52
|
+
- A light and a dark eager `<img>` download both. Where only the system theme applies, use one `<img>`
|
|
53
|
+
with a dark `<source>` and one preload per scheme. `<picture>` cannot see a page's `data-theme`.
|
|
54
|
+
|
|
43
55
|
Preloading the main image, as a suggestion:
|
|
44
56
|
|
|
45
57
|
- `priority` makes the browser fetch the image once it sees the `<img>`. In a client-rendered app
|
|
@@ -55,13 +67,47 @@ Preloading the main image, as a suggestion:
|
|
|
55
67
|
|
|
56
68
|
## Fonts
|
|
57
69
|
|
|
58
|
-
|
|
70
|
+
`ads check` holds what `tokens/fonts.css` declares against the CSS:
|
|
71
|
+
|
|
72
|
+
| Rule | Fails or flags | Do |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `font-weight-missing` (error) | A weight no face covers, which the browser fakes or replaces | Add the file, use a variable font with a weight range, or use a declared weight |
|
|
75
|
+
| `asset-font-budget` (error) | A file above 150 KB, or `assets.fontBudgetKb` | Use WOFF2 and subset it |
|
|
76
|
+
| `font-file-unused` (review) | A face no CSS uses | Remove it and the file |
|
|
77
|
+
| `font-display` (review) | None, or `optional` | Use `swap`: `optional` decides per file, and can leave some weights in the fallback on one page |
|
|
78
|
+
| `font-format` (review) | Not WOFF2 | Convert it |
|
|
79
|
+
|
|
80
|
+
Choosing fonts:
|
|
81
|
+
|
|
82
|
+
- Prefer one variable font to a file per weight: one request covers every weight.
|
|
83
|
+
- Serve a Latin subset as WOFF2, with other scripts as separate `unicode-range` files, so a page only
|
|
84
|
+
downloads what it draws.
|
|
85
|
+
- Give files hashed names and long-lived caching.
|
|
86
|
+
- Size a fallback to match the font to reduce shift. A word can still rewrap.
|
|
87
|
+
|
|
88
|
+
Preloading:
|
|
89
|
+
|
|
59
90
|
- When body or heading text uses a declared font, `ads assets` writes
|
|
60
91
|
`tokens/fonts.preload.generated.ts` naming only those files. `ads check` fails it when stale
|
|
61
92
|
(`themes-generated`). Without such a font it is not generated.
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
93
|
+
- Preload one file per typeface the first screen uses. More compete with what matters.
|
|
94
|
+
- If headings get their font per component, `ads assets` cannot read it from `base.css`: list the files
|
|
95
|
+
in `assets.preloadFonts` in `ds.config.json`, as `{ "family": "Heading", "weight": 700 }` entries. A
|
|
96
|
+
family or weight `tokens/fonts.css` does not have is an error (`font-preload-config`).
|
|
97
|
+
- `preloadFonts()` runs from JavaScript, so it starts late. For an early preload, have the build step
|
|
98
|
+
or prerender put `fontPreloadTags()` in the HTML. Send `fontPreloadHeader()` as a `Link` header too:
|
|
99
|
+
that works on any host, and a CDN can turn it into `103 Early Hints` where supported.
|
|
100
|
+
- Use these rather than hand-written tags. A URL or `crossorigin` that differs from the stylesheet's
|
|
101
|
+
request downloads the file twice. Set the bundler's public path, so the URL works from any page.
|
|
102
|
+
- Use `preconnect` only when fonts are on another host.
|
|
103
|
+
|
|
104
|
+
Measure first paint on a slow connection and read which face is actually drawn, in the browser's
|
|
105
|
+
rendered-fonts panel. `document.fonts` reports loaded faces, which may not be in use.
|
|
106
|
+
|
|
107
|
+
## Width
|
|
108
|
+
|
|
109
|
+
`max-width` caps stay fluid and are fine; a fixed `width` is the problem. A very wide window needs caps
|
|
110
|
+
on text and screenshots, or they grow without limit.
|
|
65
111
|
|
|
66
112
|
## CSS delivery
|
|
67
113
|
|
|
@@ -81,6 +127,10 @@ late content, and preloading first-text fonts. It runs where the browser reports
|
|
|
81
127
|
Run Lighthouse on a production build and real URLs before tuning. Once Largest Contentful Paint is
|
|
82
128
|
under 2.5 s, preloads and delivery changes bring modest gains.
|
|
83
129
|
|
|
130
|
+
Find which metric is red first. Insights such as the network dependency tree do not score by
|
|
131
|
+
themselves. Compare screenshots against a baseline taken before the change: a broken baseline hides
|
|
132
|
+
regressions.
|
|
133
|
+
|
|
84
134
|
## What ADS does not cover
|
|
85
135
|
|
|
86
136
|
- Page metadata, `noindex`, `robots.txt` and sitemaps belong to the application.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import logo from "../../../assets/brand/logo.svg
|
|
2
|
-
import logoDark from "../../../assets/brand/logo.dark.svg
|
|
1
|
+
import logo from "../../../assets/brand/logo.svg";
|
|
2
|
+
import logoDark from "../../../assets/brand/logo.dark.svg";
|
|
3
3
|
|
|
4
4
|
export const fixture = {
|
|
5
5
|
title: "Logo",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, cx } from "@linaria/atomic";
|
|
2
|
-
import logo from "../../../assets/brand/logo.svg
|
|
3
|
-
import logoDark from "../../../assets/brand/logo.dark.svg
|
|
2
|
+
import logo from "../../../assets/brand/logo.svg";
|
|
3
|
+
import logoDark from "../../../assets/brand/logo.dark.svg";
|
|
4
4
|
|
|
5
5
|
export interface LogoProps {
|
|
6
6
|
/** The product name, read by assistive technology. */
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -18,6 +18,12 @@ the enforceable contract, [GUIDE.md](GUIDE.md) covers tool integration, and the
|
|
|
18
18
|
|
|
19
19
|
## Shared tooling, project-owned design
|
|
20
20
|
|
|
21
|
+
Skills ship in the package and are served as an immutable snapshot, each file under
|
|
22
|
+
`skill://ads/<name>/`. Connections on protocol `2026-07-28` get the skills extension: entries with
|
|
23
|
+
verbatim frontmatter and complete manifests, each digest computed from the bytes served, and directory
|
|
24
|
+
reads. Earlier connections get the same files as ordinary resources and through tools. ADS serves
|
|
25
|
+
content; verification, approval and activation belong to the host.
|
|
26
|
+
|
|
21
27
|
The shared layer supplies architectural rules, token definitions, checks,
|
|
22
28
|
skills, and setup. Components, patterns, themes, and examples are authored in
|
|
23
29
|
the project or brought in through explicit imports and adaptations.
|
|
@@ -802,8 +808,26 @@ that float above the layout (`layout.fixedWidthUnits`) in `ds.config.json`, and
|
|
|
802
808
|
both for review; ADS knows a unit's layer, not whether it is an overlay, and there is no
|
|
803
809
|
per-declaration exception. The browser
|
|
804
810
|
audit adds what source cannot show: axe-core, non-text contrast of control borders and icons,
|
|
805
|
-
and horizontal overflow at 390, 768 and 1280 px, by resizing each rendered scenario
|
|
806
|
-
|
|
811
|
+
image shape and horizontal overflow at 390, 768 and 1280 px, by resizing each rendered scenario. It
|
|
812
|
+
also narrows components and patterns to a 240 px container: a set width above the small-part limit
|
|
813
|
+
that overflows it is a review item, since whether a part ever sits in a pane takes judgement.
|
|
814
|
+
|
|
815
|
+
Each render waits, bounded, for its content to settle before anything is measured, and says so when it
|
|
816
|
+
did not. The audit also renders what a scenario shows only after someone acts on it. It opens what
|
|
817
|
+
`aria-haspopup` controls open, and hovers and focuses controls for contrast. Each worker lists what
|
|
818
|
+
every render could measure, then assigns targets in request order, so which render measures a shared
|
|
819
|
+
control does not depend on page speed. Its result states what it covered, and what it skipped is an
|
|
820
|
+
info item per reason.
|
|
821
|
+
|
|
822
|
+
Static errors split by what they stop. A preview session the audit starts renders despite policy
|
|
823
|
+
errors, records no pass, and reports them with the audit's findings; the audit still exits non-zero.
|
|
824
|
+
Only errors that stop rendering block it (source and CSS syntax, project structure, the styles entry,
|
|
825
|
+
scenario contracts). `ads check`, `ads compile`, validation and acceptance stop on every error.
|
|
826
|
+
|
|
827
|
+
Fonts are read from `tokens/fonts.css` and `base.css`. `ads assets` generates a module naming the files
|
|
828
|
+
the first text uses, importing each plainly so that Vite, Bun and the preview compiler give the
|
|
829
|
+
stylesheet's URL. `ads check` holds declared faces against the weights CSS uses. ADS writes no HTML and
|
|
830
|
+
touches no hosting: the module's list, tags and header value are for the project to place.
|
|
807
831
|
|
|
808
832
|
Static checks establish the policies and source formats they cover. Behavior
|
|
809
833
|
tests and browser review verify the resulting accessibility, layout, themes,
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,34 +1,80 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.3.
|
|
3
|
+
## 0.3.53
|
|
4
4
|
|
|
5
5
|
<!-- ads-local-tests:start -->
|
|
6
|
-
Local verification: **
|
|
7
|
-
Tested commit: `
|
|
8
|
-
Completed 2026-11-
|
|
6
|
+
Local verification: **783/783 passed** with `ADS_TEST_BUN=1 npm test`.
|
|
7
|
+
Tested commit: `8f3a806ac725a95486d5a607e67b6ec4e534c8f4`; Node v24.13.0, Bun 1.4.1.
|
|
8
|
+
Completed 2026-11-03T00:48:45.537Z (1159 seconds).
|
|
9
9
|
|
|
10
10
|
<!-- ads-local-test-proof
|
|
11
11
|
{
|
|
12
12
|
"schema": 1,
|
|
13
|
-
"version": "0.3.
|
|
14
|
-
"commit": "
|
|
15
|
-
"sourceSha256": "
|
|
13
|
+
"version": "0.3.53",
|
|
14
|
+
"commit": "8f3a806ac725a95486d5a607e67b6ec4e534c8f4",
|
|
15
|
+
"sourceSha256": "45f075cbced8c463385133739ed676adc4cd15954e507c946ecec8f73f71c545",
|
|
16
16
|
"command": "ADS_TEST_BUN=1 npm test",
|
|
17
17
|
"result": "pass",
|
|
18
|
-
"tests":
|
|
19
|
-
"pass":
|
|
18
|
+
"tests": 783,
|
|
19
|
+
"pass": 783,
|
|
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-11-
|
|
26
|
-
"durationMs":
|
|
27
|
-
"logSha256": "
|
|
25
|
+
"completedAt": "2026-11-03T00:48:45.537Z",
|
|
26
|
+
"durationMs": 1158876,
|
|
27
|
+
"logSha256": "43e59421b92a927e4319b81a0aab98cb51e0f38d227ffc7f8be166d68d0b368c"
|
|
28
28
|
}
|
|
29
29
|
-->
|
|
30
30
|
<!-- ads-local-tests:end -->
|
|
31
31
|
|
|
32
|
+
- **Run `ads assets` once after upgrading.** The generated font module changed, so `ads check` fails it as
|
|
33
|
+
stale (`themes-generated`) until then.
|
|
34
|
+
- **`assets.preloadFonts` names the fonts to preload.** An array of `{ family, weight }` replaces the
|
|
35
|
+
reading of `base.css`; a variable range counts as a match. An entry `tokens/fonts.css` does not have
|
|
36
|
+
is a `font-preload-config` error. Without it, nothing changes.
|
|
37
|
+
- **`npm run build` syncs skill references** before it continues, so editing
|
|
38
|
+
`skills/ads-designer/references/` and building leaves every skill current. `lint:tool` run alone and
|
|
39
|
+
`release:verify` still fail on copies that differ, and the proof refuses a sync left uncommitted.
|
|
40
|
+
- **MCP SDKs updated, and skills checked against the final extension.** `@modelcontextprotocol/server` and
|
|
41
|
+
`client` 2.4.0, `ext-apps` 2.0.4, `sdk` 1.32.2. `skills/list` now returns all skills at once instead of
|
|
42
|
+
two per page, and `resources/directory/read` now carries `ttlMs` and `cacheScope`.
|
|
43
|
+
- **The audit measures settled content.** It waits, up to 5 s, for no change in the scenario for 500 ms,
|
|
44
|
+
no finite animation and nothing loading, so colours that land after first render are measured every
|
|
45
|
+
run. A page that never settles is a `content-still-changing` info item.
|
|
46
|
+
- **Font rules.** New errors: `font-weight-missing` for a weight no face in `tokens/fonts.css` covers, and
|
|
47
|
+
`asset-font-budget` for a file above 150 KB (`assets.fontBudgetKb`). New review items: `font-file-unused`,
|
|
48
|
+
`font-display` (none or `optional`), `font-format` (not WOFF2). Weight ranges and faces with no
|
|
49
|
+
`font-weight` cover what they span. System-font projects get none of this. Run `ads assets` to
|
|
50
|
+
regenerate the preload module.
|
|
51
|
+
- **Plain `bun build` works with generated fonts and the starter Logo.** The generated module and the
|
|
52
|
+
starter import files plainly, not with `?url`, which Bun cannot resolve. Vite and the preview compiler
|
|
53
|
+
read both.
|
|
54
|
+
- **Early font preloads.** The generated module adds `fontPreloadTags()` and `fontPreloadHeader()`, for a
|
|
55
|
+
build step or prerender to put the exact URLs in HTML or a `Link` header. It still selects the same
|
|
56
|
+
files.
|
|
57
|
+
- **The performance guide** covers font choices and preloading, image shape and theme pairs, width caps,
|
|
58
|
+
and how to read Lighthouse.
|
|
59
|
+
- **The audit says what it covers.** A new line reports renders, overlays opened and controls measured,
|
|
60
|
+
and the result gains `coverage`. What was skipped is an info item per reason (`browser-audit-skipped`):
|
|
61
|
+
an overlay that did not open, a trigger or control that left the page or timed out, a cap reached
|
|
62
|
+
with no other scenario holding those targets. A render that could measure none of its targets is
|
|
63
|
+
a `browser-audit-nothing-measured` review item. A page that fails to render stays a `browser-audit` error.
|
|
64
|
+
- **Coverage is the same each run.** A shared control or trigger is now measured by the first scenario in
|
|
65
|
+
request order, not the first page to load, which also fixes which scenario a shared finding names.
|
|
66
|
+
Brands no longer share that bookkeeping. Controls that failed no longer count as measured. An overlay
|
|
67
|
+
whose element a closed one left behind now counts as opening, a trigger gets a second click, and a
|
|
68
|
+
focus outline is read after its transition.
|
|
69
|
+
- **The focus check skips what a keyboard cannot reach:** `aria-hidden` on it or an ancestor, `inert`, and
|
|
70
|
+
`tabindex="-1"` outside a composite widget that holds a `tabindex="0"`. Hover is still measured.
|
|
71
|
+
- **New `img-shape` error.** The audit fails a visible image whose box differs from its CSS `aspect-ratio`,
|
|
72
|
+
or, with none and `object-fit: fill`, from its `width` and `height`. A height attribute beats
|
|
73
|
+
`aspect-ratio` unless the CSS says `height: auto`, so such an image reserves its space and passes
|
|
74
|
+
`layout-shift` while cropped.
|
|
75
|
+
|
|
76
|
+
## 0.3.52
|
|
77
|
+
|
|
32
78
|
- **The audit opens overlays.** It clicks each distinct `aria-haspopup` control, up to 3 per render,
|
|
33
79
|
and runs axe, non-text contrast and a phone-width check on what opens, in every theme. An overlay a
|
|
34
80
|
scenario renders open is measured the same way. Results name the state, such as
|
package/docs/GUIDE.md
CHANGED
|
@@ -70,6 +70,16 @@ changes mark images stale. There is no previous slot, history or TTL.
|
|
|
70
70
|
updates when supported, and explicitly reread otherwise. Screenshots provide visual
|
|
71
71
|
evidence for one state; they do not replace behavior checks.
|
|
72
72
|
|
|
73
|
+
ADS serves its skills over MCP, by what the client speaks:
|
|
74
|
+
|
|
75
|
+
| Client | How it gets skills |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Protocol `2026-07-28` | The `io.modelcontextprotocol/skills` extension: `skills/list` and `skills/get` give each skill's frontmatter and its complete file list with digests and sizes, `resources/directory/read` lists a folder, and `resources/read` gets a file |
|
|
78
|
+
| Earlier protocols | `skill://` resources through `resources/list` and `resources/read`, and the `ads_skills` and `ads_read_skill` tools |
|
|
79
|
+
|
|
80
|
+
Whether a skill is loaded into an agent's context is up to the host. `npx skills` installs them locally
|
|
81
|
+
for a host that does not read them over MCP.
|
|
82
|
+
|
|
73
83
|
The [MCP guide](MCP.md) details tool/resource schemas, prompts, skills and
|
|
74
84
|
notifications. The portable [capture guide](../skills/ads-designer/references/captures.md)
|
|
75
85
|
explains screenshot setup, named targets, limits and comparison usage; MCP serves
|
|
@@ -647,10 +657,16 @@ Exempt: `overflow-x: auto` or `scroll` scrollers and their content, except the o
|
|
|
647
657
|
carousels (`aria-roledescription="carousel"`), pannable widgets (`role="application"`), native text fields, fixed-position layers and visually hidden content.
|
|
648
658
|
|
|
649
659
|
Each measurement waits for layout to stop moving, so a component that refits after a resize is
|
|
650
|
-
measured after it refits.
|
|
660
|
+
measured after it refits. Before measuring anything, the audit waits up to 5 s for the page to settle:
|
|
661
|
+
no change in the scenario for 500 ms, no finite animation running, and nothing still loading. Content
|
|
662
|
+
that arrives late, such as syntax colours, is then measured every run. A page that never settles is
|
|
663
|
+
measured anyway and reported as `content-still-changing`.
|
|
651
664
|
|
|
652
665
|
The audit also renders what a scenario shows after someone acts on it, in every theme and brand.
|
|
653
666
|
Findings name the state in the selector, such as `open overlay "Edit": button` or `hover: button`.
|
|
667
|
+
The result's `coverage`, also printed as a `Covered:` line, gives what was measured. What was skipped is
|
|
668
|
+
a `browser-audit-skipped` info item per reason, with up to 5 examples. A render that could measure none
|
|
669
|
+
of its targets is a `browser-audit-nothing-measured` review item.
|
|
654
670
|
|
|
655
671
|
- **Overlays.** It clicks each distinct control with `aria-haspopup`, up to 3 per render, once per
|
|
656
672
|
theme and brand across the audit. What opens
|
|
@@ -658,7 +674,10 @@ Findings name the state in the selector, such as `open overlay "Edit": button` o
|
|
|
658
674
|
contrast, and must fit the 390 px viewport. Give a trigger `aria-haspopup`, or render the overlay
|
|
659
675
|
open in its scenario. Tooltips are not opened.
|
|
660
676
|
- **Hover and focus.** Up to 6 controls per render, in document order, each distinct control once per
|
|
661
|
-
theme and brand on the same surface
|
|
677
|
+
theme and brand on the same surface, measured by the first scenario in request order. Focus skips a
|
|
678
|
+
control a keyboard cannot reach: `aria-hidden` on it or an ancestor, `inert`, or `tabindex="-1"`
|
|
679
|
+
outside a `group`, `tablist`, `menu`, `menubar`, `radiogroup`, `toolbar`, `listbox`, `tree` or `grid` that
|
|
680
|
+
holds a `tabindex="0"`. Under hover it runs axe
|
|
662
681
|
`color-contrast` and the non-text check. A `:focus-visible` outline needs 3:1 against what is around
|
|
663
682
|
it. A focus ring drawn with `box-shadow` is not read, and an outline beside one is left alone.
|
|
664
683
|
- **Busy.** A control with `aria-busy="true"` is checked even when disabled, and its icon even when it
|
|
@@ -683,13 +702,26 @@ demo frame to a maximum.
|
|
|
683
702
|
|---|---|---|
|
|
684
703
|
| `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 |
|
|
685
704
|
| `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 |
|
|
705
|
+
| `img-shape` | `ads audit` | A visible image whose box differs from its CSS `aspect-ratio`, or, with none and `object-fit: fill`, from its `width` and `height`. 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 |
|
|
686
706
|
| `layout-shift` | `ads audit` | A scenario with Cumulative Layout Shift above 0.1 on first render, where the browser reports it (Chromium) |
|
|
687
707
|
| `themes-generated` | `ads check` | A stale `tokens/fonts.preload.generated.ts` |
|
|
708
|
+
| `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 |
|
|
709
|
+
| `asset-font-budget` | `ads check` | A font file in `assets/` above 150 KB. `assets.fontBudgetKb` changes the limit |
|
|
710
|
+
|
|
711
|
+
Review items, which fail nothing: `font-file-unused` (a declared face no CSS uses; weights 400 and 700
|
|
712
|
+
count as used, since browsers apply them by default), `font-display` (none, or `optional`, which decides
|
|
713
|
+
per file and can leave some weights in the fallback on one page) and `font-format` (not WOFF2). A
|
|
714
|
+
project with no `@font-face` gets none of these.
|
|
688
715
|
|
|
689
716
|
The starters' `Image` lazily loads and reserves space; `priority` marks the view's main visible
|
|
690
717
|
image. When body or heading text uses a font from `tokens/fonts.css`, `ads assets` writes
|
|
691
718
|
`tokens/fonts.preload.generated.ts`: call its `preloadFonts()` in the app entry before the first
|
|
692
|
-
render. It imports the files through the bundler, so the preload and the stylesheet share
|
|
719
|
+
render. It imports the files through the bundler, Vite or Bun, so the preload and the stylesheet share
|
|
720
|
+
one URL. For a preload earlier than JavaScript, a build step or prerender can call `fontPreloadTags()`
|
|
721
|
+
for `<link>` tags or `fontPreloadHeader()` for a `Link` header value; `fontPreloads` is the same list.
|
|
722
|
+
A project that sets heading fonts per component names what to preload in `assets.preloadFonts`:
|
|
723
|
+
`[{ "family": "Body", "weight": 400 }, { "family": "Heading", "weight": 700 }]`. That list replaces the
|
|
724
|
+
reading of `base.css`, and an entry `tokens/fonts.css` cannot satisfy is a `font-preload-config` error.
|
|
693
725
|
ADS does not cover page metadata, `noindex`, sitemaps or hosting; run Lighthouse on a production
|
|
694
726
|
build with real URLs.
|
|
695
727
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.53",
|
|
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": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"ads-read-mcp": "node scripts/build-ads-tool.mjs 1>&2 && bun dist/cli.mjs mcp",
|
|
26
26
|
"dev:showcase": "node scripts/build-ads-tool.mjs && bun dist/cli.mjs showcase",
|
|
27
27
|
"dev:mcp-explorer": "node scripts/build-ads-tool.mjs && node mcp-explorer/server.mjs",
|
|
28
|
-
"build": "npm run lint:tool && npm run build:tool",
|
|
28
|
+
"build": "npm run sync:skill-references && npm run lint:tool && npm run build:tool",
|
|
29
29
|
"build:tool": "node scripts/build-ads-tool.mjs",
|
|
30
30
|
"build:project": "npm run build:tool && npm run lint:project && npm run generate:icons && npm run typecheck && vite build && node scripts/build-mcp-previews.mjs",
|
|
31
31
|
"build:lib": "npm run generate:icons && vite build",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"pack:tool": "node scripts/pack-ads-tool.mjs",
|
|
48
48
|
"ads": "bun dist/cli.mjs",
|
|
49
49
|
"prepack": "npm run build",
|
|
50
|
-
"release:verify": "node scripts/local-test-proof.mjs",
|
|
50
|
+
"release:verify": "node scripts/sync-skill-references.mjs --check && node scripts/local-test-proof.mjs",
|
|
51
51
|
"release:proof": "node scripts/local-test-proof.mjs --check"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@modelcontextprotocol/server": "2.
|
|
54
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
55
55
|
"@wyw-in-js/transform": "2.1.3",
|
|
56
56
|
"axe-core": "4.14.0",
|
|
57
57
|
"css-tree": "3.2.1",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"@linaria/atomic": "^8.0.0",
|
|
73
73
|
"@linaria/core": "^7.0.0",
|
|
74
74
|
"@linaria/react": "^7.0.1",
|
|
75
|
-
"@modelcontextprotocol/client": "2.
|
|
76
|
-
"@modelcontextprotocol/ext-apps": "2.0.
|
|
77
|
-
"@modelcontextprotocol/sdk": "1.32.
|
|
75
|
+
"@modelcontextprotocol/client": "2.4.0",
|
|
76
|
+
"@modelcontextprotocol/ext-apps": "2.0.4",
|
|
77
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
78
78
|
"@playwright/test": "1.64.1",
|
|
79
79
|
"@preact/signals": "2.11.3",
|
|
80
80
|
"@types/node": "^25.9.2",
|