@reqvire-org/ads 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/ads-errors.mjs +105 -8
  2. package/dist/analysis/client-directive.mjs +26 -0
  3. package/dist/analysis/externals.mjs +47 -0
  4. package/dist/analysis/module-graph.mjs +6 -0
  5. package/dist/analysis/owner-analysis-key.mjs +1 -1
  6. package/dist/analysis/owner-choices.mjs +14 -2
  7. package/dist/analysis/owner-composition.mjs +32 -4
  8. package/dist/analysis/owner-source.mjs +121 -17
  9. package/dist/border-paint.mjs +34 -0
  10. package/dist/check.mjs +2 -0
  11. package/dist/composed-contrast.mjs +34 -12
  12. package/dist/construction-output.mjs +58 -31
  13. package/dist/construction-spec.d.mts +111 -15
  14. package/dist/construction-spec.mjs +129 -20
  15. package/dist/corner-overpaint.mjs +3 -1
  16. package/dist/design-foundation.mjs +18 -4
  17. package/dist/emit/owner-emission-cache.mjs +1 -1
  18. package/dist/end-alignment.mjs +69 -0
  19. package/dist/external-macro.d.mts +20 -0
  20. package/dist/external-macro.mjs +12 -0
  21. package/dist/finding-rules.mjs +3 -0
  22. package/dist/forced-colors.mjs +81 -0
  23. package/dist/frame-regions.mjs +2 -2
  24. package/dist/guard/externals.mjs +64 -0
  25. package/dist/guard/run.mjs +9 -5
  26. package/dist/inventories.mjs +1 -1
  27. package/dist/lowering-layer.mjs +38 -4
  28. package/dist/lowering-overlaps.mjs +13 -1
  29. package/dist/lowering-properties.mjs +4 -0
  30. package/dist/lowering-region-layout.mjs +22 -3
  31. package/dist/lowering-session.mjs +1 -1
  32. package/dist/lowering-transitions.mjs +1 -0
  33. package/dist/mcp/preview-http.bundle.js +2 -2
  34. package/dist/mcp/preview-widget.bundle.js +12 -12
  35. package/dist/measured-geometry.mjs +8 -2
  36. package/dist/owner-analysis-check.mjs +190 -11
  37. package/dist/owner-errors.mjs +3 -0
  38. package/dist/owner-lowering.mjs +3 -2
  39. package/dist/ownership-model.mjs +14 -5
  40. package/dist/platform-features.mjs +7 -0
  41. package/dist/preview-bun.mjs +15 -2
  42. package/dist/profile-macro.d.mts +18 -0
  43. package/dist/recipe-macro.d.mts +107 -9
  44. package/dist/recipe-model.mjs +22 -8
  45. package/dist/region-lowering.mjs +204 -49
  46. package/dist/render-audit/axe-run.page.mjs +40 -1
  47. package/dist/render-audit/forced-states.page.mjs +37 -0
  48. package/dist/render-audit/layout-overflow.page.mjs +52 -2
  49. package/dist/render-audit/non-text-contrast.page.mjs +14 -10
  50. package/dist/render-audit/worker.mjs +38 -0
  51. package/dist/render-audit.mjs +42 -5
  52. package/dist/role-vocabulary.d.mts +5 -2
  53. package/dist/role-vocabulary.mjs +6 -3
  54. package/dist/scenario-kit.d.mts +2 -2
  55. package/dist/showcase/assets-view.mjs +12 -47
  56. package/dist/showcase/client.bundle.js +50 -50
  57. package/dist/showcase/http-client.bundle.js +18 -18
  58. package/dist/showcase/token-sample.mjs +2 -2
  59. package/dist/showcase/ui/ui.css +1 -1
  60. package/dist/showcase/ui/ui.js +13 -13
  61. package/dist/skills/ads-designer/references/accessibility.md +21 -1
  62. package/dist/skills/ads-designer/references/branding.md +4 -0
  63. package/dist/skills/ads-designer/references/design-data.md +6 -0
  64. package/dist/skills/ads-designer/references/layers.md +5 -0
  65. package/dist/skills/ads-designer/references/layout.md +8 -1
  66. package/dist/skills/ads-designer/references/recipes.md +52 -2
  67. package/dist/skills/ads-designer/references/runtimes.md +4 -0
  68. package/dist/skills/ads-designer/references/scenarios.md +2 -0
  69. package/dist/skills/ads-import/references/design-data.md +6 -0
  70. package/dist/skills/ads-import/references/layers.md +5 -0
  71. package/dist/skills/ads-import/references/layout.md +8 -1
  72. package/dist/skills/ads-import/references/recipes.md +52 -2
  73. package/dist/skills/ads-import/references/runtimes.md +4 -0
  74. package/dist/skills/ads-import/references/scenarios.md +2 -0
  75. package/dist/skills/ads-migrate/SKILL.md +2 -0
  76. package/dist/skills/ads-migrate/references/0.5.3-to-0.5.4.md +42 -0
  77. package/dist/skills/ads-migrate/references/0.5.4-to-0.5.5.md +61 -0
  78. package/dist/skills/ads-port/references/design-data.md +6 -0
  79. package/dist/skills/ads-port/references/layers.md +5 -0
  80. package/dist/skills/ads-port/references/layout.md +8 -1
  81. package/dist/skills/ads-port/references/recipes.md +52 -2
  82. package/dist/skills/ads-port/references/runtimes.md +4 -0
  83. package/dist/skills/ads-port/references/scenarios.md +2 -0
  84. package/dist/spatial-model.mjs +37 -10
  85. package/dist/system-colors.d.mts +9 -0
  86. package/dist/system-colors.mjs +1 -0
  87. package/dist/target-size.mjs +14 -1
  88. package/dist/tsconfig.declarations.json +1 -0
  89. package/docs/ADS.md +23 -1
  90. package/docs/ASSETS.md +21 -0
  91. package/docs/CACHING.md +1 -1
  92. package/docs/CHANGELOG.md +220 -21
  93. package/docs/GUIDE.md +31 -20
  94. package/docs/LANGUAGE.md +146 -11
  95. package/docs/MOTION.md +11 -1
  96. package/docs/PROFILE-KINDS.md +60 -9
  97. package/docs/RULES.md +21 -8
  98. package/package.json +5 -1
package/docs/CHANGELOG.md CHANGED
@@ -1,59 +1,258 @@
1
1
  # Changelog
2
2
 
3
- ## 0.5.3
3
+ ## 0.5.5
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
- Local verification: **2084/2084 passed** with `bun run test`.
7
- Tested commit: `711c30248604d51ecdc97d29646e5ecdd5678882`; Bun 1.4.4.
8
- Completed 2026-11-23T09:25:04.569Z (1184 seconds).
6
+ Local verification: **2145/2145 passed** with `bun run test`.
7
+ Tested commit: `a1b9127dfe6de83db6fabc20e94d4417592c6a13`; Bun 1.4.4.
8
+ Completed 2026-11-23T20:28:21.165Z (1386 seconds).
9
9
 
10
10
  <!-- ads-local-test-proof
11
11
  {
12
12
  "schema": 3,
13
- "version": "0.5.3",
14
- "commit": "711c30248604d51ecdc97d29646e5ecdd5678882",
15
- "sourceSha256": "502077186e3c070c9d51fabe16bab71fb7a6562aa892f65f686e7f749cd64afc",
13
+ "version": "0.5.5",
14
+ "commit": "a1b9127dfe6de83db6fabc20e94d4417592c6a13",
15
+ "sourceSha256": "8f973fc1c8979432b1a17460cf6afc9224738200e9453c9a74dd5a80a4049bc9",
16
16
  "command": "bun run test",
17
17
  "result": "pass",
18
- "tests": 2084,
19
- "pass": 2084,
18
+ "tests": 2145,
19
+ "pass": 2145,
20
20
  "fail": 0,
21
21
  "skipped": 0,
22
22
  "groups": [
23
23
  {
24
24
  "name": "unit",
25
- "tests": 803,
26
- "pass": 803,
25
+ "tests": 838,
26
+ "pass": 838,
27
27
  "fail": 0,
28
28
  "skipped": 0,
29
- "reportSha256": "c8f17e0c1eeec0163f2c1f18855627a3058daa01440ed90226a56bd36c1ceb09"
29
+ "reportSha256": "52885ba2e12add744abc6582e516ac140cb747e7c01f567d68fe99f6afdf3b71"
30
30
  },
31
31
  {
32
32
  "name": "integration",
33
- "tests": 974,
34
- "pass": 974,
33
+ "tests": 987,
34
+ "pass": 987,
35
35
  "fail": 0,
36
36
  "skipped": 0,
37
- "reportSha256": "2c14c1c8fb8b405bab9b1809a3890e6f5fdf34e95944dc7382b64dc2ff3781a8"
37
+ "reportSha256": "ccba44f357a6492ebc1f2584517bc15c6f2fc39d27ff2b33f8c188c634abc6e8"
38
38
  },
39
39
  {
40
40
  "name": "browser",
41
- "tests": 307,
42
- "pass": 307,
41
+ "tests": 320,
42
+ "pass": 320,
43
43
  "fail": 0,
44
44
  "skipped": 0,
45
- "reportSha256": "6e0fe63a3fec9b2dffa14e48769f22f9c4bb8c040e45398cb08a6e5835e45a68"
45
+ "reportSha256": "d699857990e68caf361135bde7a3f3620f1d99977d2bdcd005445ce7571cda75"
46
46
  }
47
47
  ],
48
48
  "testOverrides": {},
49
49
  "bun": "1.4.4",
50
- "completedAt": "2026-11-23T09:25:04.569Z",
51
- "durationMs": 1184094,
52
- "logSha256": "bdd920145024bad87c373ad0751b99cb20731f28efd76ea4b68b8fe65f50aec2"
50
+ "completedAt": "2026-11-23T20:28:21.165Z",
51
+ "durationMs": 1385759,
52
+ "logSha256": "106e7bdbd0235b8f6e9da4b654d341f505f5476eb588b0605bfcb047c1fe5316"
53
53
  }
54
54
  -->
55
55
  <!-- ads-local-tests:end -->
56
56
 
57
+ ### Fixed
58
+
59
+ - **A drawing picked by state.** `const glyph = open ? closeGlyph : arrowGlyph` drawn with `glyph.source` was refused
60
+ as a glyph read (`source/glyph-reference-read`): the local's own declaration counted as a read. A control (a
61
+ fold's chevron) or any owner may pick its drawing by its own state.
62
+ - **The document's text profile is complete.** It is every text's fallback (foundation.css writes it on `<body>`),
63
+ so it states `fontFamily`, `fontSize` and `lineHeight` (`foundation/document-text-incomplete`): text without a text
64
+ profile of its own never shows the browser's default 16 px. The example and reference design systems stated only
65
+ the family. This can newly fail a design system.
66
+ - **Tokens a script reads are emitted.** A declared token an owner's script names in a string
67
+ (`getPropertyValue("--toast-duration")`, `"var(--toast-gap)"`) is emitted with the owner's token CSS, as its
68
+ constructions' tokens are; before, a token only a script read was never emitted.
69
+ - **Native controls no longer keep the browser's look.** A root or part rendered as a `<button>`, `<input>`,
70
+ `<textarea>` or `<select>` resets what its construction does not state: the font (inherited), centred text (a
71
+ button's label starts at the start), the border, the fill and the margin. A text profile, a frame's border and a
72
+ surface's fill still apply as written. This changes emitted CSS for such elements.
73
+ - **A filling part no longer collapses in a stack sized by its content.** `extent: "fill"` in a stack wrote a zero
74
+ flex basis: where nothing gave the stack a height, a clipping or scrolling part shrank to its padding. It now
75
+ starts at its content (`flex-basis: auto`) and still grows to fill, and shrinks to fit, a stack that is given a
76
+ height.
77
+ - **Truncated text no longer cuts descenders.** One-line truncation (`wrap: "truncate"`) clipped both axes
78
+ (`overflow: hidden`): with a trimmed line box (`textEdge: ["cap", "alphabetic"]`) the `g` of "general" lost its
79
+ descender. It now clips only the inline axis (`overflow: clip visible`), where the ellipsis is.
80
+ - **A part's own border over a rounded corner.** `construction/corner-overpaint` now also fails a part that draws a
81
+ border of its own (a field inside a rounded composer) where it reaches a rounded corner of its unclipped,
82
+ uninset root without a matching radius: its square border corner covers the curve, and its edge doubles the
83
+ root's. Clip the root, inset it, or round the part. This can newly fail a design system.
84
+ - **A control part's emitted box is the proven one.** A `frame: "control"` part (a window control) wrote
85
+ `min-inline-size: 0` over its frame's inline minimum, and a part without text of its own was sized by its
86
+ parent's line instead of the text slot's line its target-size proof used: it rendered 14 × 28 px where the check
87
+ proved 20 × 20. It now writes both, so the rendered box and the proof agree.
88
+ - **A phone-width scenario container.** `Container inline: "phone"` is 390 px, the phone-viewport tool's width;
89
+ phone scenarios no longer borrow the 360 px column.
90
+ - **Showcase profile cards draw a control at its own size.** A composite's control sample was stretched to the card's
91
+ 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
92
+ navigation pane toggle draws a sidebar glyph instead of a bare chevron beside the title.
93
+ - **End alignment of stacked blocks.** Blocks a stack holds end on one line (`source/end-misaligned`): a block that
94
+ paints a box lines up by its outer edge, one that does not by where its content ends (its frame's inline end
95
+ padding, and a grid's gutter end). A block a few pixels to a gutter off its siblings (a header whose actions end
96
+ past the sections below) is an error at the stack; text is not compared, and a block further than 64px off is
97
+ taken as deliberately narrower. This can newly fail a design system.
98
+ - **A border without a paint is listed for review** (`review/border-paint-missing`): a frame that draws a border on
99
+ an element whose surfaces set no border colour, which CSS paints in the text colour (a near-black frame).
100
+ - **A wrapping row's line gap.** `gap` and `rowGap` together on a wrapping `inline` row write `column-gap` between
101
+ its items and `row-gap` between its lines; before, they were one value.
102
+ - **Cut boxes in the render audit.** A box that paints a visible edge (a border, or a fill) cut by a clipping
103
+ ancestor by more than its border, such as the last card of a toast stack missing its lower edge and corners, is
104
+ reported like cut text (`clipped`, `block-clipped`), naming the box.
105
+ - **Collapsed scroll areas in the render audit.** A scroll area that holds content but is collapsed to nothing (a
106
+ whole screen rendered empty) is reported (`collapsed-scroller`); a folded inert pane and hidden content are not.
107
+ - **Broken words in the render audit.** A word broken across lines because its box is narrower than the word (a
108
+ field squeezed beside its tools reading "Mess / age / ware / hous / e") is reported at the width it happens
109
+ (`broken-word`), with a placeholder's words measured in the field's own font. Long strings meant to wrap (URLs,
110
+ paths, identifiers), preformatted text and truncations are not.
111
+ - **Render audit false positives.** An inert pane of no size (a folded pane that keeps its state) is no longer
112
+ checked for cut-off text; `aria-hidden` text (avatar initials) is not counted as a control's visible label for
113
+ label-in-name (2.5.3); and an icon-only control's multi-colour mark is judged by its paint that stands out most
114
+ from the background, not by its first outline (1.4.11).
115
+ - **The render audit's target size counts owned hit areas.** axe's target-size measures an element's own box; a
116
+ control drawn at 16 px with a 24 × 24 px hit area (`minTargetInlineSize` / `minTargetBlockSize`, lowered to
117
+ `::after`) meets WCAG 2.5.8 and is no longer reported. A drawn native input is judged by its drawing's hit area.
118
+
119
+ ### Added
120
+
121
+ - **Preserved text that wraps.** `wrap: "preserve"` on a text part keeps spaces and line breaks and continues a line
122
+ too long for the column on the next visual line (`white-space: pre-wrap`), so a code block stays fully visible at
123
+ the column's width. `overflow: "scroll-inline"` remains the choice that keeps each line whole.
124
+ - **Icons through provided roles.** A visual part's own colour (an icon in a banner's provided ink) is proven by
125
+ composed contrast at 3:1 from the icon outward, through every placement and provider, as text is; decorative
126
+ artwork (`aria-hidden`) keeps no minimum. Owner analysis schema `ads-owner-analysis/14`.
127
+ - **Content-sized grid columns.** `contentFrom: "<tier>"` on a fluid grid makes its columns as wide as their
128
+ content from that tier up, with the free space between them (`repeat(n, minmax(min-content, auto))` and
129
+ `space-between`); below it the columns share the width. Cells fit their columns by construction; the outer
130
+ columns meet the region's edges and each column lines up across rows, which a browser test with generated content
131
+ proves. The showcase's column guides draw distributed tracks where the browser places them.
132
+ - **A control frame's inline sizes apply.** A `frame: "control"` part (a search field) and a control construction
133
+ write the frame's stated `inlineSize` and `maxInlineSize`, with the frame rule's minimum (the stated size unless a
134
+ maximum frees the box to narrow); they were dropped, so a field took the browser's default width.
135
+ - **ADS's own showcase passes this release's checks.** On states (the current section, a pressed tool, a toggle
136
+ tile) declare forced colours; a quiet select's hover border reaches 3:1; icon buttons keep their square beside
137
+ the brand; the section menu scrolls its own row; tables, the layout inspector and the navigation pane scroll
138
+ instead of cutting enlarged text; the guide layer tiles size in rem.
139
+ - **Showcase artwork pages.** A folder's page is the catalogue alone (every asset enlarged on its grid and at every
140
+ size, with where it is drawn); the compact view and its size, guide and placement options are gone. The box drawn
141
+ around a card's drawings no longer touches its name, and a size token larger than its card is drawn at the card's
142
+ width.
143
+ - **Typed external components.** `external<Props>({ from, renders, name?, client? })` in `externals/*.ads.ts`
144
+ declares a library component (a framework's link) as the element it renders: owners use it with their recipe's
145
+ class and are checked as if they wrote that element. The emitted declaration re-exports the real component (the
146
+ package becomes a requirement), previews render a stand-in element, `client: true` makes its owners "use client",
147
+ and `ads-guard` renders each once with the application's React to verify one element of the declared kind, the
148
+ class passed through and no style of its own.
149
+ - **The document pattern.** `element: "document"` on a pattern's root renders the page's `<html>` (with `lang`
150
+ and a `<body>`), the framework's head and end passed in as slots; one per design system. A preview draws its
151
+ `<html>`, `<head>` and `<body>` as boxes inside the preview's own page; the emitted output keeps the real
152
+ elements. The example design system has a `Document` pattern.
153
+ - **`"use client"` is derived.** An emitted owner that calls a hook or gives an element an event handler starts with
154
+ `"use client"`; a purely presentational owner does not, so it renders in a React Server Component. A directive the
155
+ author wrote where nothing needs the client is listed for review (`review/client-directive-unneeded`). Emitted owner
156
+ modules change: the owner emission cache moves to `ads-owner-emission/2`.
157
+ - **Gap gutters.** A spatial profile's gutter may be a gap (`gutters: { cards: { gap: "--card-gap" } }`): the grid
158
+ writes `column-gap`, its outer cells are flush with the region's edges, and the algebra sizes tracks from the width
159
+ left after the gaps. An edge gutter still insets each cell.
160
+ - **Styled range sliders.** `pseudo: { sliderTrack, sliderThumb }` on an `<input type="range">` part, each a
161
+ surface and a frame profile, written once per engine; tick labels are a `space-between` row. The thumb needs 3:1
162
+ against the track in every context and state.
163
+ - **Declared artwork that follows the page's scheme.** Two visual parts with `scheme: "light"` and `"dark"` may
164
+ each bind declared artwork for a theme of that scheme; the scheme switch displays one, so a logo black on light and
165
+ white on dark needs no `theme` prop.
166
+ - **Video as content media.** A visual part rendered as a `<video>` is application media like an `<img>`: with
167
+ `fit: "cover"` its poster and frames fill the frame's box (`object-fit: cover`), otherwise they fit it.
168
+ - **Loose lists.** `carry: true` on a stack root: on a list and its item, an item that ends in a paragraph, a code
169
+ 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
170
+ collapsing margins gave.
171
+ - **Modal cards.** A dialog layer with `edge: "center"` or `"block-start"` is a card in the viewport, kept the layer
172
+ profile's `viewportMargin` from its edges, fading in with `motion: "fade"`. A backdrop surface may blur the page
173
+ behind (`backdropBlur`). A measured
174
+ `scale` (unitless factors per axis) joins the measured `translate`, so a zoom view grows an image from its place.
175
+ - **Images capped by their width.** A visual profile's `sizeAxis: "inline"` makes `size` cap an application
176
+ image's width (`min(100%, size)`, the height following its ratio) instead of its height: logo strips of one width.
177
+ - **Table cells and width.** `align: "start" | "center" | "end"` on a cell places its content on the row's block
178
+ axis (`vertical-align`; centred as before when unstated), and `extent: "container"` on a table root makes it as
179
+ wide as its container.
180
+ - **Distribution.** `justify: "space-between"` (and `"space-around"`, `"space-evenly"`) on an inline or stack
181
+ arrangement: a logo at the start of a header and its actions at the end. Refused on a layered element.
182
+ - **Decorative text.** Text hidden from assistive technology (`aria-hidden="true"`, a breadcrumb's "/") is pure
183
+ decoration, which WCAG 1.4.3 exempts: composed contrast gives it no minimum, as it gives decorative artwork none.
184
+ Information must not be hidden that way.
185
+ - **Environment passes in the render audit.** Each scenario is also rendered in forced colours (Chromium's emulation
186
+ of Windows contrast themes) and with a coarse pointer (a touch context, so touch-density tokens apply). axe runs in
187
+ both; what it finds only there names the environment. In forced colours, a selected, pressed, checked or current
188
+ element that renders exactly like a sibling without that state fails (`a11y-forced-colors-render`).
189
+ - **Forced colours.** A surface profile's `forcedColors` (`background`, `color`, `border`, from the CSS system
190
+ colours) is written under `@media (forced-colors: active)` wherever the surface applies, its states included. A
191
+ frame's `borderStyle: "forced-only"` gives a fill-only control an edge that only forced colours draw. New checks:
192
+ `a11y-forced-colors` (a control without a border in some context; a value that is not a system colour) and
193
+ `a11y-forced-colors-review` (a selected, pressed, checked or current state shown only by fill).
194
+ - **Small controls placed by another owner.** 2.5.8's spacing exception now also covers a private control component
195
+ that the design system places only as a component part of stack or inline arrangements (a title bar's 20 px
196
+ window buttons): its root is checked against its neighbours in every such placement. A public component, or one
197
+ placed anywhere else, keeps the 24 px minimum.
198
+ - **A counter no recipe resets is listed for review** (`review/counter-unreset`): the browser would start a count at
199
+ each counted element, so every item shows 1. The check reads every owner's counters, design-system wide.
200
+
201
+ ## 0.5.4
202
+
203
+ ### Changed
204
+
205
+ - **A part's browser margin is reset.** A part rendered as an element the browser gives a margin (`p`, `h1`–`h6`,
206
+ `ul`, `ol`, `dl`, `dd`, `blockquote`, `figure`, `pre`, `hr`, `menu`) now has `margin: 0`: the arrangement owns the
207
+ space around it. Before, a paragraph or heading declared as a part kept the browser's margin on top of the gap,
208
+ while `normalize: { margin: 0 }` was refused on parts (it is allowed now). Emitted CSS changes for such parts.
209
+ - Owner analysis schema `ads-owner-analysis/13`: composition facts carry each element's marker and generated-content
210
+ colours, so the first check after the upgrade analyses every owner again.
211
+
212
+ ### Added
213
+
214
+ - **List markers.** `pseudo: { marker: { surface, text, content } }` on a list item: a colour-only surface (with
215
+ states), a text profile of weight and numerals, generated content. `markers: [...]` on a list sets the number
216
+ system or bullet at each nesting depth. Prose's `marker`, `markerText` and `markers` have their component form
217
+ again. Composed contrast proves a marker where its item is placed (3:1 for a bullet, the text minimum for a
218
+ number), through provided roles.
219
+ - **CSS counters.** `counter: { reset, increment }` on roots and parts, and generated content
220
+ (`content: { counter | counters, style, separator, prefix, suffix }`) on `marker` or a new `before`
221
+ pseudo-element: clause numbering (1, 1.1, 1.1.2), numbered headings and figures, step numbers. Literals are at most
222
+ four punctuation marks or spaces; `before` is refused on replaced elements.
223
+ - **A part's own spacing profile.** `spacing: "<spacing profile>"` on a part reads that profile's new `spaceBefore`
224
+ and `spaceAfter` fields, so a flow can have as many distances as its design needs (44/14 px around an h2, 24 px
225
+ after a quote). The overlap check now knows that adjacent-sibling selectors name one fixed element each.
226
+ - **A rule between children.** `between: { surface, frame }` draws the frame's border width in the surface's border
227
+ paint between consecutive children, none after the last: table rows without a header row, settings rows, menus.
228
+ - **Visually hidden text.** `presence: "assistive"` on a part: hidden on screen, read by assistive technology (a
229
+ table caption, a skip link's text).
230
+ - **Underlines in states.** A state's text profile may change the underline's colour, thickness and offset (a hover
231
+ that thickens a link's underline), and `provides` accepts the `border-width` role, so links in a table cell can
232
+ thicken there only.
233
+
234
+ - **An underline is a paint of its surface.** `textDecorationColor` on a surface profile, so a hover state deepens
235
+ a link's pale underline and `paintTransition` fades it (`text-decoration-color` channel). Before, the underline
236
+ colour lived only in the text profile, which a state may change in weight and tracking only.
237
+
238
+ ### Fixed
239
+
240
+ - **The sideways entrance is accepted.** `enter.from.translateInline` (0.5.3) was refused through the recipe macro
241
+ ("Unsupported owner value: translate-inline"): the grammar named the field in camel case, the macro writes it in
242
+ kebab case. The tests now go through the macro as owners author it.
243
+ - **A glyph inside an optional part.** A required visual part inside an optional part that a combination does not
244
+ render (a frame's mark, which a lead replaces: `lead !== undefined ? <span …lead/> : icon && <span mark><span
245
+ glyph/></span>`) reported `construction/artwork-binding-missing`. It now needs no drawing there.
246
+ - **Optional text as design state.** `const rest: string | undefined = more > 0 ? \`+${more}\` : undefined` was "not
247
+ from a finite set"; text a derivation computes is a presence choice, shown or not, like an optional element.
248
+ - **Composed contrast through nested content renderers.** A walk that reaches a component's root again with the same
249
+ evaluated elements continues as before, so it is taken once: a content renderer nested in lists and tables no
250
+ longer ends in "compositions exceed 512 distinct chains".
251
+ - **A glyph-only control part.** A `frame: "control"` part without text of its own (a window control) failed
252
+ "Profile text has no field line-height"; it now sits on its text slot's line, composed through `with`.
253
+
254
+ ## 0.5.3
255
+
57
256
  ### Removed
58
257
 
59
258
  - **Prose (`layout: "prose"`) is retired.** Long-form content is assembled from the design system's own components,
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. A group's assets are sections by paint kind: foreground
859
- (takes the text colour), slots (takes its paint slots' tokens) and intrinsic
860
- (keeps its own colours). Each row draws the asset from its authored SVG, made
861
- inert by ADS's sanitizer, and shows its title, aliases, glyph sets, what
862
- differs between its drawings (themes, sizes, states), its optical centre
863
- when that is not the middle of its box, and where it is declared. A themed asset shows the drawing of the preview's theme.
864
- Each tile also says which owners draw the asset and at what size ("drawn at
865
- 20px by Button; 16px by Menu"): the visual size of each binding, a glyph set's
866
- members at the set's size, and a `glyph()` reference without a size (its
867
- caller gives it). A folder's settings choose the size the tiles draw at
868
- (**Size**), the construction grid and optical centre (**Guides**), and
869
- whether each asset stands alone or before its title in body text
870
- (**Place**); **View: all sizes** shows the artwork catalogue: the folder at
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`, `column`, `page`. `block`: `content`, `short`, `medium`, `tall`. |
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 root or a part with no neighbouring target keeps the minimum. Larger touch
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
- **Limits.** Composed contrast covers text. An icon or a boundary that reads a
2038
- provided role is checked with its own default value where it is defined; check
2039
- such non-text paints in the rendered container (the render audit).
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. `<Owner>.css` holds the token CSS that the owner uses and its
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.