@reqvire-org/ads 0.5.4 → 0.5.6
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/dist/ads-errors.mjs +105 -8
- package/dist/analysis/client-directive.mjs +26 -0
- package/dist/analysis/externals.mjs +47 -0
- package/dist/analysis/module-graph.mjs +6 -0
- package/dist/analysis/owner-analysis-key.mjs +1 -1
- package/dist/analysis/owner-choices.mjs +12 -2
- package/dist/analysis/owner-composition.mjs +19 -4
- package/dist/analysis/owner-source.mjs +112 -15
- package/dist/border-paint.mjs +34 -0
- package/dist/check.mjs +2 -0
- package/dist/composed-contrast.mjs +10 -7
- package/dist/construction-output.mjs +52 -27
- package/dist/construction-spec.d.mts +40 -10
- package/dist/construction-spec.mjs +41 -19
- package/dist/corner-overpaint.mjs +3 -1
- package/dist/design-foundation.mjs +14 -0
- package/dist/emit/owner-emission-cache.mjs +1 -1
- package/dist/end-alignment.mjs +75 -0
- package/dist/external-macro.d.mts +20 -0
- package/dist/external-macro.mjs +12 -0
- package/dist/finding-rules.mjs +3 -0
- package/dist/forced-colors.mjs +81 -0
- package/dist/frame-regions.mjs +2 -2
- package/dist/grid-facts.mjs +1 -1
- package/dist/guard/externals.mjs +64 -0
- package/dist/guard/run.mjs +9 -5
- package/dist/inventories.mjs +1 -1
- package/dist/lowering-emitter.mjs +2 -1
- package/dist/lowering-layer.mjs +39 -4
- package/dist/lowering-overlaps.mjs +7 -0
- package/dist/lowering-properties.mjs +2 -0
- package/dist/lowering-region-layout.mjs +23 -3
- package/dist/lowering-session.mjs +1 -1
- package/dist/mcp/preview-http.bundle.js +2 -2
- package/dist/mcp/preview-widget.bundle.js +12 -12
- package/dist/measured-geometry.mjs +8 -2
- package/dist/owner-analysis-check.mjs +190 -11
- package/dist/owner-errors.mjs +3 -0
- package/dist/owner-lowering.mjs +3 -2
- package/dist/ownership-model.mjs +6 -3
- package/dist/platform-features.mjs +2 -0
- package/dist/preview-bun.mjs +15 -2
- package/dist/profile-macro.d.mts +18 -0
- package/dist/recipe-macro.d.mts +49 -6
- package/dist/recipe-model.mjs +13 -5
- package/dist/region-lowering.mjs +115 -22
- package/dist/render-audit/axe-run.page.mjs +40 -1
- package/dist/render-audit/forced-states.page.mjs +37 -0
- package/dist/render-audit/layout-overflow.page.mjs +52 -2
- package/dist/render-audit/non-text-contrast.page.mjs +14 -10
- package/dist/render-audit/worker.mjs +38 -0
- package/dist/render-audit.mjs +42 -5
- package/dist/role-vocabulary.d.mts +2 -2
- package/dist/role-vocabulary.mjs +3 -3
- package/dist/scenario-kit.d.mts +2 -2
- package/dist/showcase/assets-view.mjs +17 -47
- package/dist/showcase/client.bundle.js +54 -54
- package/dist/showcase/http-client.bundle.js +18 -18
- package/dist/showcase/token-sample.mjs +16 -6
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +13 -13
- package/dist/skills/ads-designer/references/accessibility.md +21 -1
- package/dist/skills/ads-designer/references/branding.md +4 -0
- package/dist/skills/ads-designer/references/design-data.md +6 -0
- package/dist/skills/ads-designer/references/layers.md +5 -0
- package/dist/skills/ads-designer/references/layout.md +8 -1
- package/dist/skills/ads-designer/references/recipes.md +36 -0
- package/dist/skills/ads-designer/references/runtimes.md +4 -0
- package/dist/skills/ads-designer/references/scenarios.md +2 -0
- package/dist/skills/ads-import/references/design-data.md +6 -0
- package/dist/skills/ads-import/references/layers.md +5 -0
- package/dist/skills/ads-import/references/layout.md +8 -1
- package/dist/skills/ads-import/references/recipes.md +36 -0
- package/dist/skills/ads-import/references/runtimes.md +4 -0
- package/dist/skills/ads-import/references/scenarios.md +2 -0
- package/dist/skills/ads-migrate/SKILL.md +1 -0
- package/dist/skills/ads-migrate/references/0.5.4-to-0.5.5.md +61 -0
- package/dist/skills/ads-port/references/design-data.md +6 -0
- package/dist/skills/ads-port/references/layers.md +5 -0
- package/dist/skills/ads-port/references/layout.md +8 -1
- package/dist/skills/ads-port/references/recipes.md +36 -0
- package/dist/skills/ads-port/references/runtimes.md +4 -0
- package/dist/skills/ads-port/references/scenarios.md +2 -0
- package/dist/spatial-model.mjs +37 -10
- package/dist/system-colors.d.mts +9 -0
- package/dist/system-colors.mjs +1 -0
- package/dist/target-size.mjs +14 -1
- package/dist/tsconfig.declarations.json +1 -0
- package/docs/ADS.md +23 -1
- package/docs/ASSETS.md +21 -0
- package/docs/CACHING.md +1 -1
- package/docs/CHANGELOG.md +184 -27
- package/docs/GUIDE.md +31 -20
- package/docs/LANGUAGE.md +122 -6
- package/docs/PROFILE-KINDS.md +50 -4
- package/docs/RULES.md +21 -8
- package/package.json +7 -1
package/dist/spatial-model.mjs
CHANGED
|
@@ -73,7 +73,18 @@ export function spatialModel(input, values) {
|
|
|
73
73
|
for (const [mode, declared] of Object.entries(declaredGutters)) {
|
|
74
74
|
if (!name.test(mode))
|
|
75
75
|
fail(`Invalid gutter mode ${mode}.`);
|
|
76
|
-
const edges = closed(declared, ["start", "end"], "Gutter")
|
|
76
|
+
const edges = closed(declared, ["start", "end", "gap"], "Gutter");
|
|
77
|
+
if (edges.gap !== void 0) {
|
|
78
|
+
if (edges.start !== void 0 || edges.end !== void 0)
|
|
79
|
+
fail(`${mode} is a gap gutter or an edge gutter, not both.`);
|
|
80
|
+
const gap = token(edges.gap), gapPx = length(gap);
|
|
81
|
+
for (const point of breakpoints)
|
|
82
|
+
if (point.fromPx - point.marginPx * 2 <= gapPx * (point.count - 1))
|
|
83
|
+
fail(`${mode} gaps leave no track width at ${point.name}.`);
|
|
84
|
+
gutters[mode] = { start: "0", end: "0", gap };
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const start = token(edges.start), startPx = length(start), end = token(edges.end), inset = startPx + length(end);
|
|
77
88
|
for (const point of breakpoints)
|
|
78
89
|
if ((point.fromPx - point.marginPx * 2) / point.count < inset)
|
|
79
90
|
fail(`${mode} cell insets exceed a track at ${point.name}.`);
|
|
@@ -97,7 +108,7 @@ export function spatialModel(input, values) {
|
|
|
97
108
|
return px;
|
|
98
109
|
} };
|
|
99
110
|
}
|
|
100
|
-
const regionKeys = ["columns", "weights", "gutter", "row-gap", "margin", "bound", "tile", "ratio", "fixed-start", "fixed-end", "context", "rows", "align", "overlay-layer"], trackKeys = ["fixed-start", "fixed-end"], placementKeys = ["start", "span", "end", "overlay", "row", "row-span", "visible"], cellKeys = [...placementKeys, "padding", "ratio", "container"];
|
|
111
|
+
const regionKeys = ["columns", "weights", "gutter", "row-gap", "margin", "bound", "tile", "ratio", "fixed-start", "fixed-end", "context", "rows", "align", "overlay-layer", "content-from"], trackKeys = ["fixed-start", "fixed-end"], placementKeys = ["start", "span", "end", "overlay", "row", "row-span", "visible"], cellKeys = [...placementKeys, "padding", "ratio", "container"];
|
|
101
112
|
function declarations(node, allowed) {
|
|
102
113
|
const result = {}, isAllowed = (prop) => allowed.includes(prop);
|
|
103
114
|
for (const child of node.nodes ?? [])
|
|
@@ -114,8 +125,8 @@ function declarations(node, allowed) {
|
|
|
114
125
|
const isAtRule = (node) => node.type === "atrule", cssToken = (value) => value === "0" ? "0" : `var(${value})`, append = (node, property, value) => {
|
|
115
126
|
node.append(postcss.decl({ prop: property, value: String(value) }));
|
|
116
127
|
}, selector = (value) => /^\.[a-zA-Z_][\w-]*$|^\[data-[\w-]+=["'][\w-]+["']\]$/.test(value), regionContainer = "ads-region", overlaySides = ["none", "start", "end"], layoutModes = ["fluid", "hybrid", "fixed", "flow", "inherited"], isLayoutMode = (value) => layoutModes.includes(value);
|
|
117
|
-
function regionTracks(model, props, point, mode, tracks, fixedTracks) {
|
|
118
|
-
const count = Number(props.columns ?? point.count), margin = model.length(props.margin ?? point.margin), cap = props.bound === "full" ? 1 / 0 : model.length(!props.bound || props.bound === "system" ? model.maxWidth : props.bound, !0), width = Math.min(point.fromPx, cap) - 2 * margin;
|
|
128
|
+
function regionTracks(model, props, point, mode, tracks, fixedTracks, gap = 0) {
|
|
129
|
+
const count = Number(props.columns ?? point.count), margin = model.length(props.margin ?? point.margin), cap = props.bound === "full" ? 1 / 0 : model.length(!props.bound || props.bound === "system" ? model.maxWidth : props.bound, !0), width = Math.min(point.fromPx, cap) - 2 * margin - gap * (count - 1);
|
|
119
130
|
if (width <= 0)
|
|
120
131
|
fail(`Region bounds and margins leave no content width at ${point.name}.`);
|
|
121
132
|
if (mode !== "hybrid") {
|
|
@@ -210,10 +221,19 @@ function expand(css, model) {
|
|
|
210
221
|
fail("Inherited tracks keep their parent's span and bounds.");
|
|
211
222
|
if (props.weights !== void 0 && mode !== "fluid")
|
|
212
223
|
fail("Track weights belong to a fluid region with local columns.");
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
224
|
+
const contentFrom = props["content-from"] === void 0 ? null : system.breakpoints.findIndex((point) => point.name === props["content-from"]);
|
|
225
|
+
if (contentFrom !== null && mode !== "fluid")
|
|
226
|
+
fail("contentFrom belongs to a fluid region.");
|
|
227
|
+
if (contentFrom === -1)
|
|
228
|
+
fail(`contentFrom names no breakpoint tier: ${String(props["content-from"])}.`);
|
|
229
|
+
if (contentFrom === 0)
|
|
230
|
+
fail("contentFrom needs a tier below it: there the columns share the width, for when their content does not fit side by side.");
|
|
231
|
+
if (contentFrom !== null && props.weights !== void 0)
|
|
232
|
+
fail("contentFrom and weights are two ways to size columns: choose one.");
|
|
233
|
+
const gutter = props.gutter ?? "wide", declaredGutter = gutter === "none" ? null : system.gutters[gutter];
|
|
234
|
+
if (gutter !== "none" && !declaredGutter)
|
|
215
235
|
fail(`Unknown gutter ${gutter}.`);
|
|
216
|
-
const spacing = (value) => {
|
|
236
|
+
const trackGap = declaredGutter?.gap ?? null, edges = trackGap === null ? declaredGutter : null, spacing = (value) => {
|
|
217
237
|
if (value !== "0")
|
|
218
238
|
system.length(value);
|
|
219
239
|
return cssToken(value);
|
|
@@ -296,7 +316,7 @@ function expand(css, model) {
|
|
|
296
316
|
append(output, "flex-direction", "column");
|
|
297
317
|
append(output, "row-gap", rowGap);
|
|
298
318
|
if (mode !== "flow")
|
|
299
|
-
append(output, "column-gap", mode === "fixed" ? rowGap : "0");
|
|
319
|
+
append(output, "column-gap", mode === "fixed" ? rowGap : mode === "inherited" ? "normal" : trackGap === null ? "0" : spacing(trackGap));
|
|
300
320
|
if (props.ratio)
|
|
301
321
|
append(output, "aspect-ratio", props.ratio.replace(":", " / "));
|
|
302
322
|
if (rows)
|
|
@@ -324,12 +344,16 @@ function expand(css, model) {
|
|
|
324
344
|
} else {
|
|
325
345
|
const count = Number(props.columns ?? point.count), margin = spacing(props.margin ?? point.margin), variant = trackVariants.get(point.name) ?? {};
|
|
326
346
|
tracks = { start: variant["fixed-start"] ?? tracks.start, end: variant["fixed-end"] ?? tracks.end };
|
|
327
|
-
const widths = regionTracks(system, props, point, mode, tracks, fixedTracks), insets = edges ? system.length(edges.start) + system.length(edges.end) : 0;
|
|
347
|
+
const gapPx = trackGap === null ? 0 : system.length(trackGap), widths = regionTracks(system, props, point, mode, tracks, fixedTracks, gapPx), insets = edges ? system.length(edges.start) + system.length(edges.end) : 0, contentSized = contentFrom !== null && index >= contentFrom;
|
|
328
348
|
for (const item of cellModels) {
|
|
329
349
|
const placement = item.placements[index];
|
|
330
350
|
if (!placement)
|
|
331
351
|
continue;
|
|
332
|
-
|
|
352
|
+
if (contentSized) {
|
|
353
|
+
region(item.cell.params, point, placement.visible ? { kind: "content" } : { kind: "hidden" });
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
const total = (from) => widths.slice(from, from + placement.span).reduce((sum, value) => sum + value, 0) + gapPx * (placement.span - 1), spanWidth = placement.overlay !== "none" ? widths.reduce((sum, value) => sum + value, 0) + gapPx * (widths.length - 1) : placement.auto ? Math.min(...Array.from({ length: count - placement.span + 1 }, (_, from) => total(from))) : total(placement.start - 1);
|
|
333
357
|
region(item.cell.params, point, !placement.visible ? { kind: "hidden" } : { kind: "px", px: item.nested.length ? spanWidth : spanWidth - insets });
|
|
334
358
|
if (!edges || item.nested.length || placement.overlay !== "none")
|
|
335
359
|
continue;
|
|
@@ -339,6 +363,9 @@ function expand(css, model) {
|
|
|
339
363
|
if (mode === "hybrid") {
|
|
340
364
|
const fluidCount = count - fixedTracks.length;
|
|
341
365
|
append(rule, "grid-template-columns", [tracks.start === void 0 ? "" : spacing(tracks.start), `repeat(${fluidCount}, minmax(0, 1fr))`, tracks.end === void 0 ? "" : spacing(tracks.end)].filter(Boolean).join(" "));
|
|
366
|
+
} else if (contentSized) {
|
|
367
|
+
append(rule, "grid-template-columns", `repeat(${count}, minmax(min-content, auto))`);
|
|
368
|
+
append(rule, "justify-content", "space-between");
|
|
342
369
|
} else if (props.weights !== void 0)
|
|
343
370
|
append(rule, "grid-template-columns", trackWeights(props, count).map((weight) => `minmax(0, ${weight}fr)`).join(" "));
|
|
344
371
|
else
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The CSS system colours a surface may declare for forced colours. */
|
|
2
|
+
export declare const SYSTEM_COLORS: readonly ["Canvas", "CanvasText", "Highlight", "HighlightText", "ButtonFace", "ButtonText", "LinkText", "GrayText", "AccentColor", "AccentColorText"];
|
|
3
|
+
export type SystemColor = (typeof SYSTEM_COLORS)[number];
|
|
4
|
+
/** The macro's `forcedColors` keys, as profile fields. */
|
|
5
|
+
export declare const FORCED_KEYS: {
|
|
6
|
+
readonly background: "forced-colors-background";
|
|
7
|
+
readonly color: "forced-colors-color";
|
|
8
|
+
readonly border: "forced-colors-border";
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SYSTEM_COLORS = ["Canvas", "CanvasText", "Highlight", "HighlightText", "ButtonFace", "ButtonText", "LinkText", "GrayText", "AccentColor", "AccentColorText"], FORCED_KEYS = { background: "forced-colors-background", color: "forced-colors-color", border: "forced-colors-border" };
|
package/dist/target-size.mjs
CHANGED
|
@@ -117,11 +117,14 @@ function contentWidth(content) {
|
|
|
117
117
|
}
|
|
118
118
|
const undersized = (box) => box.block < TARGET_MIN_PX || box.inline.px < TARGET_MIN_PX;
|
|
119
119
|
function spaced(geometry, pairs, context) {
|
|
120
|
+
return spacedFrom(geometry, pairs.map((pair) => ({ axis: pair.axis, gap: pair.gap, other: pair.first.element === geometry.element ? pair.second : pair.first })), context);
|
|
121
|
+
}
|
|
122
|
+
function spacedFrom(geometry, pairs, context) {
|
|
120
123
|
if (pairs.length === 0)
|
|
121
124
|
return !1;
|
|
122
125
|
const radius = TARGET_MIN_PX / 2;
|
|
123
126
|
return pairs.every((pair) => {
|
|
124
|
-
const own = measure(geometry, context), other = measure(pair.
|
|
127
|
+
const own = measure(geometry, context), other = measure(pair.other, context), gap = lengthPx(pair.gap, context);
|
|
125
128
|
if (own.kind !== "measured" || other.kind !== "measured" || gap.kind !== "px")
|
|
126
129
|
return !1;
|
|
127
130
|
const along = (box) => pair.axis === "inline" ? box.inline.px : box.block, half = along(own.size.target) / 2, otherHalf = along(other.size.target) / 2;
|
|
@@ -160,6 +163,16 @@ function elementFindings(geometry, contexts, pairs) {
|
|
|
160
163
|
findings.push({ kind: "target-size-unresolved", element: geometry.element, contexts: unproven.contexts, reason: unproven.first });
|
|
161
164
|
return findings;
|
|
162
165
|
}
|
|
166
|
+
export function placedSpaced(foundation, geometry, neighbours) {
|
|
167
|
+
if (neighbours.length === 0)
|
|
168
|
+
return !1;
|
|
169
|
+
return tokenValueContexts(foundation).every((context) => {
|
|
170
|
+
const read = measure(geometry, context);
|
|
171
|
+
if (read.kind !== "measured")
|
|
172
|
+
return !1;
|
|
173
|
+
return !undersized(read.size.target) || spacedFrom(geometry, neighbours, context);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
163
176
|
function reach(size, axis) {
|
|
164
177
|
const own = axis === "inline" ? size.own.inline : { px: size.own.block, exact: !0 }, hit = axis === "inline" ? size.hit.inline : size.hit.block;
|
|
165
178
|
return { px: Math.max(0, (hit - own.px) / 2), exact: own.exact };
|
package/docs/ADS.md
CHANGED
|
@@ -290,6 +290,18 @@ See [LANGUAGE.md](LANGUAGE.md#spatial-construction-and-public-alignment).
|
|
|
290
290
|
placed in such a cell is held to the same by its root frame, across owners
|
|
291
291
|
(`component-keyline`; a root ADS cannot read is `component-keyline-unresolved`).
|
|
292
292
|
Controls, frames without inline padding and `gutter: "none"` grids are exempt.
|
|
293
|
+
- Blocks a stack holds end on one line: a block that paints a box by its outer
|
|
294
|
+
edge, one that does not where its content ends (its frame's inline end
|
|
295
|
+
padding, a grid's gutter end); a block more than 1px and at most 64px off its
|
|
296
|
+
siblings fails at the stack (`source/end-misaligned`). Text is not compared.
|
|
297
|
+
- A part with a background or a border of its own does not reach a rounded
|
|
298
|
+
corner of an unclipped, uninset root (`construction/corner-overpaint`). A
|
|
299
|
+
frame that draws a border has a border paint on its element's surface
|
|
300
|
+
(`review/border-paint-missing`).
|
|
301
|
+
- The document's text profile states its font family, size and line height
|
|
302
|
+
(`foundation/document-text-incomplete`). A `<button>`, `<input>`,
|
|
303
|
+
`<textarea>` or `<select>` a construction draws resets the browser's font,
|
|
304
|
+
alignment, border, fill and margin where the construction states none.
|
|
293
305
|
- Every declared spatial profile, selected or not, reads through the grid
|
|
294
306
|
algebra in the base context and in every theme, brand and condition context
|
|
295
307
|
that changes a token it reads (`spatial-profile-invalid`). Every grid
|
|
@@ -318,7 +330,17 @@ Accessibility follows WCAG 2.2 AA.
|
|
|
318
330
|
document surface (`a11y-focus`).
|
|
319
331
|
- Every control and control-frame part is a 24 × 24px target computed from its
|
|
320
332
|
lowered box, an owned `min-target-*` hit area included, without overlapping
|
|
321
|
-
neighbouring hit areas (`a11y-target-size`).
|
|
333
|
+
neighbouring hit areas (`a11y-target-size`); a smaller one passes 2.5.8's
|
|
334
|
+
spacing exception in its arrangement, or as a private control placed only
|
|
335
|
+
between spaced neighbours.
|
|
336
|
+
- In forced colours (Windows contrast themes) every control keeps an edge: its
|
|
337
|
+
frame draws a border, or `borderStyle: "forced-only"`; a surface's
|
|
338
|
+
`forcedColors` names CSS system colours (`a11y-forced-colors`). A selected,
|
|
339
|
+
pressed, checked or current state shown only by fill is reviewed
|
|
340
|
+
(`a11y-forced-colors-review`).
|
|
341
|
+
- Text and icons are proven against the surfaces they sit on through every
|
|
342
|
+
placement and provided role (`component-contrast`); text and artwork hidden
|
|
343
|
+
with `aria-hidden` is decoration and has no minimum.
|
|
322
344
|
- Icon-only control choices are named (`a11y-icon-label`), and every `<img>` has
|
|
323
345
|
`alt` (`a11y-image-alt`).
|
|
324
346
|
- A toggle's `aria-pressed` agrees with the `selected` state its artwork draws
|
package/docs/ASSETS.md
CHANGED
|
@@ -378,6 +378,27 @@ declared asset by group and every glyph set with its members, each drawn from
|
|
|
378
378
|
its authored SVG in the preview's theme
|
|
379
379
|
([guide](GUIDE.md#showcase)). `ads check` and `ads_catalog` report them too.
|
|
380
380
|
|
|
381
|
+
## Declared artwork that follows the page's scheme
|
|
382
|
+
|
|
383
|
+
A logo with a drawing per colour scheme (black on light, white on dark) can
|
|
384
|
+
follow the page's scheme with no `theme` prop: the owner renders both drawings
|
|
385
|
+
in two visual parts, `scheme: "light"` and `scheme: "dark"`, each bound for a
|
|
386
|
+
theme of that scheme, and the scheme switch `foundation.css` writes displays
|
|
387
|
+
one, as for a content image pair below. A binding of the other scheme is
|
|
388
|
+
`source/scheme-image-element`. An exact theme's drawing (a high-contrast one) is
|
|
389
|
+
chosen by a `theme` the owner passes, as before.
|
|
390
|
+
|
|
391
|
+
```tsx
|
|
392
|
+
const anatomy = recipe({ layout: "inline", parts: {
|
|
393
|
+
light: { selector: ".logo-light", required: true, kind: "visual", scheme: "light" },
|
|
394
|
+
dark: { selector: ".logo-dark", required: true, kind: "visual", scheme: "dark" },
|
|
395
|
+
} }).root;
|
|
396
|
+
const light = recipe({ theme: "light", parts: { visual: { kind: "visual", asset: "openai", visual: "product-logo" } } });
|
|
397
|
+
const dark = recipe({ theme: "dark", parts: { visual: { kind: "visual", asset: "openai", visual: "product-logo" } } });
|
|
398
|
+
// <span className={anatomy}><span className={`logo-light ${light.parts.visual}`}><img src={light.assets.visual.source} alt="OpenAI" /></span>
|
|
399
|
+
// <span className={`logo-dark ${dark.parts.visual}`}><img src={dark.assets.visual.source} alt="OpenAI" /></span></span>
|
|
400
|
+
```
|
|
401
|
+
|
|
381
402
|
## A content image with a light and a dark file
|
|
382
403
|
|
|
383
404
|
Declared artwork selects its drawing by theme at compile time, from its
|
package/docs/CACHING.md
CHANGED
|
@@ -173,7 +173,7 @@ the profile declarations already in its key. The composed contrast join over
|
|
|
173
173
|
every owner's facts belongs to the revision's memoized check, not to an owner's
|
|
174
174
|
entry: a token edit reuses every owner analysis and reruns only the join (stage
|
|
175
175
|
`composed-contrast`), and an owner edit changes that owner's facts alone. The
|
|
176
|
-
outcome schema is `ads-owner-analysis/
|
|
176
|
+
outcome schema is `ads-owner-analysis/14` (it carries each owner's closed props for the showcase's live controls, the assets it draws with the size of each, which value of each prop a placement that leaves the prop out selects, each element's marker and generated-content colours, and which elements are visual parts); it includes the composition facts and
|
|
177
177
|
the profile/choice inventory `design`.
|
|
178
178
|
|
|
179
179
|
- Settled outcomes (facts or a deterministic analysis failure) are reused;
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,59 +1,216 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.5.
|
|
3
|
+
## 0.5.6
|
|
4
4
|
|
|
5
5
|
<!-- ads-local-tests:start -->
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Hot patch: the unit and integration groups; the browser group was not run.
|
|
7
|
+
Local verification: **1831/1831 passed** with `bun run test:hotpatch`.
|
|
8
|
+
Tested commit: `bc9dc911af53f90f5e0eac726006ee5bcd4dca53`; Bun 1.4.4.
|
|
9
|
+
Completed 2026-11-23T21:54:11.296Z (1231 seconds).
|
|
9
10
|
|
|
10
11
|
<!-- ads-local-test-proof
|
|
11
12
|
{
|
|
12
13
|
"schema": 3,
|
|
13
|
-
"version": "0.5.
|
|
14
|
-
"commit": "
|
|
15
|
-
"sourceSha256": "
|
|
16
|
-
"command": "bun run test",
|
|
14
|
+
"version": "0.5.6",
|
|
15
|
+
"commit": "bc9dc911af53f90f5e0eac726006ee5bcd4dca53",
|
|
16
|
+
"sourceSha256": "44b66d09cf6958427d01a55600efb0f6815ddd0beecf27c3beaec601988a85d3",
|
|
17
|
+
"command": "bun run test:hotpatch",
|
|
18
|
+
"scope": "hotpatch",
|
|
17
19
|
"result": "pass",
|
|
18
|
-
"tests":
|
|
19
|
-
"pass":
|
|
20
|
+
"tests": 1831,
|
|
21
|
+
"pass": 1831,
|
|
20
22
|
"fail": 0,
|
|
21
23
|
"skipped": 0,
|
|
22
24
|
"groups": [
|
|
23
25
|
{
|
|
24
26
|
"name": "unit",
|
|
25
|
-
"tests":
|
|
26
|
-
"pass":
|
|
27
|
+
"tests": 841,
|
|
28
|
+
"pass": 841,
|
|
27
29
|
"fail": 0,
|
|
28
30
|
"skipped": 0,
|
|
29
|
-
"reportSha256": "
|
|
31
|
+
"reportSha256": "f2a350271d37187ee2b6e22ad0103ceddbdba87f585d947a3907fe8a2bd02c77"
|
|
30
32
|
},
|
|
31
33
|
{
|
|
32
34
|
"name": "integration",
|
|
33
|
-
"tests":
|
|
34
|
-
"pass":
|
|
35
|
+
"tests": 990,
|
|
36
|
+
"pass": 990,
|
|
35
37
|
"fail": 0,
|
|
36
38
|
"skipped": 0,
|
|
37
|
-
"reportSha256": "
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "browser",
|
|
41
|
-
"tests": 307,
|
|
42
|
-
"pass": 307,
|
|
43
|
-
"fail": 0,
|
|
44
|
-
"skipped": 0,
|
|
45
|
-
"reportSha256": "632f6be63e9efd765fe48121d7809d2d5998f085478ef9b8d91ac313c83bef8e"
|
|
39
|
+
"reportSha256": "b6396e700a9d9b6ab6bf11bdeb64ef94b0e91ef5210906d798c12ca0c747696b"
|
|
46
40
|
}
|
|
47
41
|
],
|
|
48
42
|
"testOverrides": {},
|
|
49
43
|
"bun": "1.4.4",
|
|
50
|
-
"completedAt": "2026-11-
|
|
51
|
-
"durationMs":
|
|
52
|
-
"logSha256": "
|
|
44
|
+
"completedAt": "2026-11-23T21:54:11.296Z",
|
|
45
|
+
"durationMs": 1230915,
|
|
46
|
+
"logSha256": "3abdd1b475f8fc10d9a443c70b10c67f6599a819ade39435aa4d7e29e5894840"
|
|
53
47
|
}
|
|
54
48
|
-->
|
|
55
49
|
<!-- ads-local-tests:end -->
|
|
56
50
|
|
|
51
|
+
- **Gap gutters work.** A spatial profile with a gap gutter (`gutters: { cards: { gap } }`) failed as "Undefined or
|
|
52
|
+
cyclic spatial token 0": the grid facts read its absent cell insets as a token.
|
|
53
|
+
- **A block-start modal card** keeps the layer profile's `edgeGap` from the top and its `viewportMargin` at the
|
|
54
|
+
sides, and **an open card keeps the page's scrollbar room** (`scrollbar-gutter: stable`, keyed to the card), so
|
|
55
|
+
the page behind it does not shift.
|
|
56
|
+
- **A press scale under several states.** The motion profile's scale endpoint may apply under more than one root
|
|
57
|
+
state (a play button that grows on hover and on keyboard focus).
|
|
58
|
+
- **End alignment:** a rule only above or below a block (a hairline under a window's bar) is a divider, not the
|
|
59
|
+
block's edge; the block lines up by where its content ends.
|
|
60
|
+
- **Native controls:** a rounded field without a border lost the browser's border reset, because its corner radius
|
|
61
|
+
read as a border the construction draws.
|
|
62
|
+
- **Showcase:** every token sample is held to its card (a large inset, gap or length is drawn at the card's size); a
|
|
63
|
+
control size shorter than a line of text draws its bar without a label; the artwork catalogue draws each size at
|
|
64
|
+
the asset's own width, so a wordmark is as wide as its shape.
|
|
65
|
+
|
|
66
|
+
## 0.5.5
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
|
|
70
|
+
- **A drawing picked by state.** `const glyph = open ? closeGlyph : arrowGlyph` drawn with `glyph.source` was refused
|
|
71
|
+
as a glyph read (`source/glyph-reference-read`): the local's own declaration counted as a read. A control (a
|
|
72
|
+
fold's chevron) or any owner may pick its drawing by its own state.
|
|
73
|
+
- **The document's text profile is complete.** It is every text's fallback (foundation.css writes it on `<body>`),
|
|
74
|
+
so it states `fontFamily`, `fontSize` and `lineHeight` (`foundation/document-text-incomplete`): text without a text
|
|
75
|
+
profile of its own never shows the browser's default 16 px. The example and reference design systems stated only
|
|
76
|
+
the family. This can newly fail a design system.
|
|
77
|
+
- **Tokens a script reads are emitted.** A declared token an owner's script names in a string
|
|
78
|
+
(`getPropertyValue("--toast-duration")`, `"var(--toast-gap)"`) is emitted with the owner's token CSS, as its
|
|
79
|
+
constructions' tokens are; before, a token only a script read was never emitted.
|
|
80
|
+
- **Native controls no longer keep the browser's look.** A root or part rendered as a `<button>`, `<input>`,
|
|
81
|
+
`<textarea>` or `<select>` resets what its construction does not state: the font (inherited), centred text (a
|
|
82
|
+
button's label starts at the start), the border, the fill and the margin. A text profile, a frame's border and a
|
|
83
|
+
surface's fill still apply as written. This changes emitted CSS for such elements.
|
|
84
|
+
- **A filling part no longer collapses in a stack sized by its content.** `extent: "fill"` in a stack wrote a zero
|
|
85
|
+
flex basis: where nothing gave the stack a height, a clipping or scrolling part shrank to its padding. It now
|
|
86
|
+
starts at its content (`flex-basis: auto`) and still grows to fill, and shrinks to fit, a stack that is given a
|
|
87
|
+
height.
|
|
88
|
+
- **Truncated text no longer cuts descenders.** One-line truncation (`wrap: "truncate"`) clipped both axes
|
|
89
|
+
(`overflow: hidden`): with a trimmed line box (`textEdge: ["cap", "alphabetic"]`) the `g` of "general" lost its
|
|
90
|
+
descender. It now clips only the inline axis (`overflow: clip visible`), where the ellipsis is.
|
|
91
|
+
- **A part's own border over a rounded corner.** `construction/corner-overpaint` now also fails a part that draws a
|
|
92
|
+
border of its own (a field inside a rounded composer) where it reaches a rounded corner of its unclipped,
|
|
93
|
+
uninset root without a matching radius: its square border corner covers the curve, and its edge doubles the
|
|
94
|
+
root's. Clip the root, inset it, or round the part. This can newly fail a design system.
|
|
95
|
+
- **A control part's emitted box is the proven one.** A `frame: "control"` part (a window control) wrote
|
|
96
|
+
`min-inline-size: 0` over its frame's inline minimum, and a part without text of its own was sized by its
|
|
97
|
+
parent's line instead of the text slot's line its target-size proof used: it rendered 14 × 28 px where the check
|
|
98
|
+
proved 20 × 20. It now writes both, so the rendered box and the proof agree.
|
|
99
|
+
- **A phone-width scenario container.** `Container inline: "phone"` is 390 px, the phone-viewport tool's width;
|
|
100
|
+
phone scenarios no longer borrow the 360 px column.
|
|
101
|
+
- **Showcase profile cards draw a control at its own size.** A composite's control sample was stretched to the card's
|
|
102
|
+
width, so a 16 px check box or a switch looked like a card-wide bar; it now stands centred at its own size. The
|
|
103
|
+
navigation pane toggle draws a sidebar glyph instead of a bare chevron beside the title.
|
|
104
|
+
- **End alignment of stacked blocks.** Blocks a stack holds end on one line (`source/end-misaligned`): a block that
|
|
105
|
+
paints a box lines up by its outer edge, one that does not by where its content ends (its frame's inline end
|
|
106
|
+
padding, and a grid's gutter end). A block a few pixels to a gutter off its siblings (a header whose actions end
|
|
107
|
+
past the sections below) is an error at the stack; text is not compared, and a block further than 64px off is
|
|
108
|
+
taken as deliberately narrower. This can newly fail a design system.
|
|
109
|
+
- **A border without a paint is listed for review** (`review/border-paint-missing`): a frame that draws a border on
|
|
110
|
+
an element whose surfaces set no border colour, which CSS paints in the text colour (a near-black frame).
|
|
111
|
+
- **A wrapping row's line gap.** `gap` and `rowGap` together on a wrapping `inline` row write `column-gap` between
|
|
112
|
+
its items and `row-gap` between its lines; before, they were one value.
|
|
113
|
+
- **Cut boxes in the render audit.** A box that paints a visible edge (a border, or a fill) cut by a clipping
|
|
114
|
+
ancestor by more than its border, such as the last card of a toast stack missing its lower edge and corners, is
|
|
115
|
+
reported like cut text (`clipped`, `block-clipped`), naming the box.
|
|
116
|
+
- **Collapsed scroll areas in the render audit.** A scroll area that holds content but is collapsed to nothing (a
|
|
117
|
+
whole screen rendered empty) is reported (`collapsed-scroller`); a folded inert pane and hidden content are not.
|
|
118
|
+
- **Broken words in the render audit.** A word broken across lines because its box is narrower than the word (a
|
|
119
|
+
field squeezed beside its tools reading "Mess / age / ware / hous / e") is reported at the width it happens
|
|
120
|
+
(`broken-word`), with a placeholder's words measured in the field's own font. Long strings meant to wrap (URLs,
|
|
121
|
+
paths, identifiers), preformatted text and truncations are not.
|
|
122
|
+
- **Render audit false positives.** An inert pane of no size (a folded pane that keeps its state) is no longer
|
|
123
|
+
checked for cut-off text; `aria-hidden` text (avatar initials) is not counted as a control's visible label for
|
|
124
|
+
label-in-name (2.5.3); and an icon-only control's multi-colour mark is judged by its paint that stands out most
|
|
125
|
+
from the background, not by its first outline (1.4.11).
|
|
126
|
+
- **The render audit's target size counts owned hit areas.** axe's target-size measures an element's own box; a
|
|
127
|
+
control drawn at 16 px with a 24 × 24 px hit area (`minTargetInlineSize` / `minTargetBlockSize`, lowered to
|
|
128
|
+
`::after`) meets WCAG 2.5.8 and is no longer reported. A drawn native input is judged by its drawing's hit area.
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
- **Preserved text that wraps.** `wrap: "preserve"` on a text part keeps spaces and line breaks and continues a line
|
|
133
|
+
too long for the column on the next visual line (`white-space: pre-wrap`), so a code block stays fully visible at
|
|
134
|
+
the column's width. `overflow: "scroll-inline"` remains the choice that keeps each line whole.
|
|
135
|
+
- **Icons through provided roles.** A visual part's own colour (an icon in a banner's provided ink) is proven by
|
|
136
|
+
composed contrast at 3:1 from the icon outward, through every placement and provider, as text is; decorative
|
|
137
|
+
artwork (`aria-hidden`) keeps no minimum. Owner analysis schema `ads-owner-analysis/14`.
|
|
138
|
+
- **Content-sized grid columns.** `contentFrom: "<tier>"` on a fluid grid makes its columns as wide as their
|
|
139
|
+
content from that tier up, with the free space between them (`repeat(n, minmax(min-content, auto))` and
|
|
140
|
+
`space-between`); below it the columns share the width. Cells fit their columns by construction; the outer
|
|
141
|
+
columns meet the region's edges and each column lines up across rows, which a browser test with generated content
|
|
142
|
+
proves. The showcase's column guides draw distributed tracks where the browser places them.
|
|
143
|
+
- **A control frame's inline sizes apply.** A `frame: "control"` part (a search field) and a control construction
|
|
144
|
+
write the frame's stated `inlineSize` and `maxInlineSize`, with the frame rule's minimum (the stated size unless a
|
|
145
|
+
maximum frees the box to narrow); they were dropped, so a field took the browser's default width.
|
|
146
|
+
- **ADS's own showcase passes this release's checks.** On states (the current section, a pressed tool, a toggle
|
|
147
|
+
tile) declare forced colours; a quiet select's hover border reaches 3:1; icon buttons keep their square beside
|
|
148
|
+
the brand; the section menu scrolls its own row; tables, the layout inspector and the navigation pane scroll
|
|
149
|
+
instead of cutting enlarged text; the guide layer tiles size in rem.
|
|
150
|
+
- **Showcase artwork pages.** A folder's page is the catalogue alone (every asset enlarged on its grid and at every
|
|
151
|
+
size, with where it is drawn); the compact view and its size, guide and placement options are gone. The box drawn
|
|
152
|
+
around a card's drawings no longer touches its name, and a size token larger than its card is drawn at the card's
|
|
153
|
+
width.
|
|
154
|
+
- **Typed external components.** `external<Props>({ from, renders, name?, client? })` in `externals/*.ads.ts`
|
|
155
|
+
declares a library component (a framework's link) as the element it renders: owners use it with their recipe's
|
|
156
|
+
class and are checked as if they wrote that element. The emitted declaration re-exports the real component (the
|
|
157
|
+
package becomes a requirement), previews render a stand-in element, `client: true` makes its owners "use client",
|
|
158
|
+
and `ads-guard` renders each once with the application's React to verify one element of the declared kind, the
|
|
159
|
+
class passed through and no style of its own.
|
|
160
|
+
- **The document pattern.** `element: "document"` on a pattern's root renders the page's `<html>` (with `lang`
|
|
161
|
+
and a `<body>`), the framework's head and end passed in as slots; one per design system. A preview draws its
|
|
162
|
+
`<html>`, `<head>` and `<body>` as boxes inside the preview's own page; the emitted output keeps the real
|
|
163
|
+
elements. The example design system has a `Document` pattern.
|
|
164
|
+
- **`"use client"` is derived.** An emitted owner that calls a hook or gives an element an event handler starts with
|
|
165
|
+
`"use client"`; a purely presentational owner does not, so it renders in a React Server Component. A directive the
|
|
166
|
+
author wrote where nothing needs the client is listed for review (`review/client-directive-unneeded`). Emitted owner
|
|
167
|
+
modules change: the owner emission cache moves to `ads-owner-emission/2`.
|
|
168
|
+
- **Gap gutters.** A spatial profile's gutter may be a gap (`gutters: { cards: { gap: "--card-gap" } }`): the grid
|
|
169
|
+
writes `column-gap`, its outer cells are flush with the region's edges, and the algebra sizes tracks from the width
|
|
170
|
+
left after the gaps. An edge gutter still insets each cell.
|
|
171
|
+
- **Styled range sliders.** `pseudo: { sliderTrack, sliderThumb }` on an `<input type="range">` part, each a
|
|
172
|
+
surface and a frame profile, written once per engine; tick labels are a `space-between` row. The thumb needs 3:1
|
|
173
|
+
against the track in every context and state.
|
|
174
|
+
- **Declared artwork that follows the page's scheme.** Two visual parts with `scheme: "light"` and `"dark"` may
|
|
175
|
+
each bind declared artwork for a theme of that scheme; the scheme switch displays one, so a logo black on light and
|
|
176
|
+
white on dark needs no `theme` prop.
|
|
177
|
+
- **Video as content media.** A visual part rendered as a `<video>` is application media like an `<img>`: with
|
|
178
|
+
`fit: "cover"` its poster and frames fill the frame's box (`object-fit: cover`), otherwise they fit it.
|
|
179
|
+
- **Loose lists.** `carry: true` on a stack root: on a list and its item, an item that ends in a paragraph, a code
|
|
180
|
+
block or a figure is followed by the next item at the larger of the list's gap and that block's space after, as
|
|
181
|
+
collapsing margins gave.
|
|
182
|
+
- **Modal cards.** A dialog layer with `edge: "center"` or `"block-start"` is a card in the viewport, kept the layer
|
|
183
|
+
profile's `viewportMargin` from its edges, fading in with `motion: "fade"`. A backdrop surface may blur the page
|
|
184
|
+
behind (`backdropBlur`). A measured
|
|
185
|
+
`scale` (unitless factors per axis) joins the measured `translate`, so a zoom view grows an image from its place.
|
|
186
|
+
- **Images capped by their width.** A visual profile's `sizeAxis: "inline"` makes `size` cap an application
|
|
187
|
+
image's width (`min(100%, size)`, the height following its ratio) instead of its height: logo strips of one width.
|
|
188
|
+
- **Table cells and width.** `align: "start" | "center" | "end"` on a cell places its content on the row's block
|
|
189
|
+
axis (`vertical-align`; centred as before when unstated), and `extent: "container"` on a table root makes it as
|
|
190
|
+
wide as its container.
|
|
191
|
+
- **Distribution.** `justify: "space-between"` (and `"space-around"`, `"space-evenly"`) on an inline or stack
|
|
192
|
+
arrangement: a logo at the start of a header and its actions at the end. Refused on a layered element.
|
|
193
|
+
- **Decorative text.** Text hidden from assistive technology (`aria-hidden="true"`, a breadcrumb's "/") is pure
|
|
194
|
+
decoration, which WCAG 1.4.3 exempts: composed contrast gives it no minimum, as it gives decorative artwork none.
|
|
195
|
+
Information must not be hidden that way.
|
|
196
|
+
- **Environment passes in the render audit.** Each scenario is also rendered in forced colours (Chromium's emulation
|
|
197
|
+
of Windows contrast themes) and with a coarse pointer (a touch context, so touch-density tokens apply). axe runs in
|
|
198
|
+
both; what it finds only there names the environment. In forced colours, a selected, pressed, checked or current
|
|
199
|
+
element that renders exactly like a sibling without that state fails (`a11y-forced-colors-render`).
|
|
200
|
+
- **Forced colours.** A surface profile's `forcedColors` (`background`, `color`, `border`, from the CSS system
|
|
201
|
+
colours) is written under `@media (forced-colors: active)` wherever the surface applies, its states included. A
|
|
202
|
+
frame's `borderStyle: "forced-only"` gives a fill-only control an edge that only forced colours draw. New checks:
|
|
203
|
+
`a11y-forced-colors` (a control without a border in some context; a value that is not a system colour) and
|
|
204
|
+
`a11y-forced-colors-review` (a selected, pressed, checked or current state shown only by fill).
|
|
205
|
+
- **Small controls placed by another owner.** 2.5.8's spacing exception now also covers a private control component
|
|
206
|
+
that the design system places only as a component part of stack or inline arrangements (a title bar's 20 px
|
|
207
|
+
window buttons): its root is checked against its neighbours in every such placement. A public component, or one
|
|
208
|
+
placed anywhere else, keeps the 24 px minimum.
|
|
209
|
+
- **A counter no recipe resets is listed for review** (`review/counter-unreset`): the browser would start a count at
|
|
210
|
+
each counted element, so every item shows 1. The check reads every owner's counters, design-system wide.
|
|
211
|
+
|
|
212
|
+
## 0.5.4
|
|
213
|
+
|
|
57
214
|
### Changed
|
|
58
215
|
|
|
59
216
|
- **A part's browser margin is reset.** A part rendered as an element the browser gives a margin (`p`, `h1`–`h6`,
|
package/docs/GUIDE.md
CHANGED
|
@@ -855,20 +855,19 @@ edit appears after it is emitted.
|
|
|
855
855
|
whether or not an owner draws it. The left menu lists the asset groups (the
|
|
856
856
|
folders under `assets/`). The Summary lists every glyph set with its
|
|
857
857
|
members: a set is a named list of glyphs that a component may choose from by
|
|
858
|
-
name at run time, declared beside the glyphs
|
|
859
|
-
(takes the text colour), slots
|
|
860
|
-
(
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
text size, then each asset enlarged on its grid and at every artwork size.
|
|
858
|
+
name at run time, declared beside the glyphs, and every folder with its
|
|
859
|
+
assets counted by paint kind: foreground (takes the text colour), slots
|
|
860
|
+
(takes its paint slots' tokens) and intrinsic (keeps its own colours). Every
|
|
861
|
+
drawing is the asset's authored SVG, made inert by ADS's sanitizer; a themed
|
|
862
|
+
asset shows the drawing of the preview's theme.
|
|
863
|
+
A folder's page is the artwork catalogue: the folder at text size, then a
|
|
864
|
+
card per asset, enlarged on its construction grid and drawn at every artwork
|
|
865
|
+
size (with the drawing registered for a size where the asset has one). Each
|
|
866
|
+
card also says which owners draw the asset and at what size ("drawn at 20px by
|
|
867
|
+
Button; 16px by Menu"): the visual size of each binding, a glyph set's members
|
|
868
|
+
at the set's size, and a `glyph()` reference without a size (its caller gives
|
|
869
|
+
it), with its title, aliases, glyph sets and optical centre when that is not
|
|
870
|
+
the middle of its box.
|
|
872
871
|
`ads_show_scenario({ id: "assets" })` opens the view like a scenario.
|
|
873
872
|
- **Tokens** (id `tokens`, the Tokens section) lists every token of the
|
|
874
873
|
token inventory (`ads tokens`), whether or not an owner uses it. No scenario
|
|
@@ -1834,7 +1833,7 @@ sometimes needs around it. The kit renders only in an ADS preview.
|
|
|
1834
1833
|
|
|
1835
1834
|
| Kit | Purpose |
|
|
1836
1835
|
| --- | --- |
|
|
1837
|
-
| `Container` | A parent of a named size and direction, for a subject that only makes sense inside one. `inline`: `fill`, `pane
|
|
1836
|
+
| `Container` | A parent of a named size and direction, for a subject that only makes sense inside one. `inline`: `fill`, `pane` (280 px), `column` (360 px), `phone` (390 px, the phone-viewport tool's width), `page` (720 px). `block`: `content`, `short`, `medium`, `tall`. |
|
|
1838
1837
|
| `Placeholder` | A labelled, tinted stand-in for a slot that the application fills. |
|
|
1839
1838
|
| `Anchor` | The control an overlay opens from. Its child is a function that receives the control's element. |
|
|
1840
1839
|
| `EventLog`, `useEvents` | Shows what the owner's callbacks received. |
|
|
@@ -1951,7 +1950,12 @@ follows:
|
|
|
1951
1950
|
between targets of one arrangement passes by the spacing exception: a 24 px
|
|
1952
1951
|
circle centred on it reaches neither a neighbouring target nor a smaller
|
|
1953
1952
|
neighbour's circle, at every gap (window controls 20 px wide, 28 px apart).
|
|
1954
|
-
A
|
|
1953
|
+
A control component placed as a component part of another construction's
|
|
1954
|
+
stack or inline arrangement (a title bar's window buttons) is checked the same
|
|
1955
|
+
way, at its root, against its neighbours there. It passes only when the design
|
|
1956
|
+
system places it nowhere else: it is not public (applications could place it
|
|
1957
|
+
anywhere), and no plain module or markup outside an arrangement places it. A
|
|
1958
|
+
root or a part with no neighbouring target keeps the minimum. Larger touch
|
|
1955
1959
|
targets (44 px is a common platform guideline) are a design choice that the
|
|
1956
1960
|
tokens express, not a rule that ADS enforces. An owned hit area
|
|
1957
1961
|
(`minTargetBlockSize`, `minTargetInlineSize` on a frame profile) can enlarge
|
|
@@ -2034,9 +2038,13 @@ recipe({ layout: "inline", surface: "row", when: { '&[aria-selected="true"]': {
|
|
|
2034
2038
|
provides a token its own fields read is refused
|
|
2035
2039
|
(`foundation/provided-role-self`): the element would repaint itself.
|
|
2036
2040
|
|
|
2037
|
-
**
|
|
2038
|
-
|
|
2039
|
-
|
|
2041
|
+
**Icons.** A visual part's own colour (an icon in the banner's provided ink) is
|
|
2042
|
+
proven like text, at the non-text minimum (3:1), from the icon outward through
|
|
2043
|
+
every placement and provider. Artwork hidden from assistive technology
|
|
2044
|
+
(`aria-hidden`) is decoration and has no minimum; so is text hidden that way
|
|
2045
|
+
(a breadcrumb's "/"), which WCAG 1.4.3 exempts. Never hide information that way. A boundary (a border) that reads
|
|
2046
|
+
a provided role is checked with its own default value; check it in the rendered
|
|
2047
|
+
container (the render audit).
|
|
2040
2048
|
|
|
2041
2049
|
#### Nested theme and brand sections
|
|
2042
2050
|
|
|
@@ -2220,7 +2228,10 @@ The folder holds:
|
|
|
2220
2228
|
|
|
2221
2229
|
- **Owner modules and sheets**, at the owner's path inside the design system.
|
|
2222
2230
|
The module is the authored source with class expressions replaced by compiled
|
|
2223
|
-
classes.
|
|
2231
|
+
classes. It starts with `"use client"` when the owner calls a hook or gives an
|
|
2232
|
+
element an event handler, and not otherwise, so a presentational owner renders
|
|
2233
|
+
in a React Server Component; ADS writes the directive, and one the author
|
|
2234
|
+
wrote where nothing needs it is a review item. `<Owner>.css` holds the token CSS that the owner uses and its
|
|
2224
2235
|
compiled atomic rules. With `sections: true` it also holds the section rules
|
|
2225
2236
|
that apply the contexts of those tokens to nested `data-theme`/`data-brand`
|
|
2226
2237
|
sections.
|