@reqvire-org/ads 0.5.12 → 0.5.14
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 +40 -3
- package/dist/analysis/content-model.mjs +156 -0
- package/dist/analysis/owner-source.mjs +23 -1
- package/dist/check.mjs +1 -0
- package/dist/construction-output.mjs +11 -2
- package/dist/construction-spec.d.mts +45 -8
- package/dist/construction-spec.mjs +22 -12
- package/dist/end-alignment.mjs +9 -4
- package/dist/lowering-layer.mjs +50 -15
- package/dist/lowering-paint.mjs +1 -1
- package/dist/lowering-region-layout.mjs +5 -0
- package/dist/lowering-sequence.mjs +4 -3
- package/dist/measured-geometry.mjs +8 -2
- package/dist/owner-analysis-check.mjs +1 -0
- package/dist/owner-errors.mjs +1 -0
- package/dist/ownership-model.mjs +5 -5
- package/dist/recipe-macro.d.mts +13 -6
- package/dist/recipe-model.mjs +2 -2
- package/dist/region-lowering.mjs +42 -17
- package/dist/showcase/client.bundle.js +46 -46
- package/dist/showcase/http-client.bundle.js +13 -13
- package/dist/showcase/ui/ui.css +1 -1
- package/dist/showcase/ui/ui.js +3 -3
- package/dist/skills/ads-designer/references/behaviors.md +31 -0
- package/dist/skills/ads-designer/references/recipes.md +7 -5
- package/dist/skills/ads-import/references/behaviors.md +31 -0
- package/dist/skills/ads-import/references/recipes.md +7 -5
- package/dist/skills/ads-port/references/behaviors.md +31 -0
- package/dist/skills/ads-port/references/recipes.md +7 -5
- package/dist/token-shapes.mjs +42 -1
- package/docs/ADS.md +3 -2
- package/docs/CHANGELOG.md +130 -18
- package/docs/GUIDE.md +8 -0
- package/docs/LANGUAGE.md +28 -10
- package/docs/MOTION.md +5 -0
- package/docs/PROFILE-KINDS.md +8 -5
- package/docs/RULES.md +9 -4
- package/docs/TOKEN-ROLES.md +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,37 @@ the emitted modules require are recorded in the output's `ads-dependencies.json`
|
|
|
22
22
|
Keep business data in application adapters. External package internals and
|
|
23
23
|
delegated DOM behavior still require source, build and browser review.
|
|
24
24
|
|
|
25
|
+
<a id="owner-code"></a>
|
|
26
|
+
## Owner behaviour code
|
|
27
|
+
|
|
28
|
+
An owner's script switches state; its recipes draw what each state looks like. These rules keep the two apart and
|
|
29
|
+
the markup readable by browsers and assistive technology. They hold for any design system.
|
|
30
|
+
|
|
31
|
+
- **Your own elements by reference.** Reach an element the owner renders through a ref (one per element, or a map of
|
|
32
|
+
refs by key for a list), never by querying its own markup with classes, `data-*` lookups or `parentElement`
|
|
33
|
+
walks. A class is styling the recipe owns; a query couples behaviour to it and breaks when the markup moves.
|
|
34
|
+
- **State on the element, look from the recipe.** A trigger that opens something carries `aria-expanded` and
|
|
35
|
+
`aria-controls` (the id of what it opens, on that element's root); its open look is the recipe's
|
|
36
|
+
`when: { '&[aria-expanded="true"]': … }`, never a class the script toggles. The same holds for `aria-pressed`,
|
|
37
|
+
`aria-selected`, `aria-current`, `data-*` states and native states (`:checked`, `:disabled`, `[open]`).
|
|
38
|
+
- **One element per popup, shown and hidden.** Keep a popover or dialog rendered and switch it with
|
|
39
|
+
`showPopover()`/`hidePopover()` or `showModal()`/`close()`. Re-mounting it on open skips its layer motion, which
|
|
40
|
+
runs from `@starting-style` on an element that exists. Render it inside the element whose pointer events should
|
|
41
|
+
include it: a top-layer element stays a DOM child, so `pointerleave` on its parent does not fire while the
|
|
42
|
+
pointer crosses into it.
|
|
43
|
+
- **Opening and dismissal.** Hover opening is for a mouse (`event.pointerType === "mouse"`) and closes after a
|
|
44
|
+
short grace, so the pointer can cross into the popup; keyboard and touch toggle on activation. Escape and a press
|
|
45
|
+
outside close it; a non-modal popup that opened from a trigger returns focus there when it closes by keyboard.
|
|
46
|
+
- **Placement by measurement only.** For a measured popover the script reports where the anchor is
|
|
47
|
+
(`recipe.measured.set(element, { x, y })` from `getBoundingClientRect()`); its distance from the anchor is the
|
|
48
|
+
layer profile's (`anchorGap`/`anchorOverlap`, `anchorOutdent`/`anchorIndent`), never a number in the script.
|
|
49
|
+
Measure again when what it depends on moves: on resize, and on scroll when the anchor scrolls.
|
|
50
|
+
- **Valid nesting.** An owner's markup follows HTML's content model (`source/invalid-nesting`): no `div`, list,
|
|
51
|
+
paragraph or heading inside a `span`, `p`, `button`, `label` or heading (a link takes its parent's rule); no
|
|
52
|
+
button, link or form control inside a link or a button; list items in a list, rows in a table, cells in a row.
|
|
53
|
+
A box that holds a popup and a trigger is a `div` (or a list item), not a `span`.
|
|
54
|
+
- **Release what you start.** Listeners, timers, observers and animation frames are removed in the effect's cleanup.
|
|
55
|
+
|
|
25
56
|
## Development boundary
|
|
26
57
|
|
|
27
58
|
Production includes real components, patterns, controllers and their compiled
|
|
@@ -303,7 +303,8 @@ fragment or a native frame-only element.
|
|
|
303
303
|
- a dot grid: a surface's `backgroundTile`; a grey logo shown light in the dark theme: `grayscale` and `invert`
|
|
304
304
|
with `brightness` on the image's surface;
|
|
305
305
|
- an illustration that animates (a diagram, a wordmark): an asset with named `groups`, shown in a decoration, its
|
|
306
|
-
groups played by the part's `groups`, and its labels as text parts with `anchor: { artwork, x, y }
|
|
306
|
+
groups played by the part's `groups`, and its labels as text parts with `anchor: { artwork, x, y }` (`size` in the
|
|
307
|
+
drawing's units scales them with it, never below their text profile's size; `block: "baseline"` takes SVG text's `y`). Never draw it
|
|
307
308
|
as markup in the owner.
|
|
308
309
|
- **Rules between items.** Hairlines between rows, between items in a row or between a grid's cells are
|
|
309
310
|
`between: { surface, frame, axes }` on the arrangement: ADS places them at every width, centred in the gap, partial
|
|
@@ -357,10 +358,11 @@ A region recipe's root can live in the browser's top layer through a closed
|
|
|
357
358
|
- **Modal cards.** A dialog with `edge: "center"` or `"block-start"` is a card in the viewport, kept the layer
|
|
358
359
|
profile's `viewportMargin` from its edges, fading in with `motion: "fade"`. The backdrop surface may set
|
|
359
360
|
`backdropBlur`. A zoom view grows an image from its place with a measured `translate` and a measured `scale`.
|
|
360
|
-
- **A
|
|
361
|
-
|
|
362
|
-
`anchorOutdent`/`anchorIndent`,
|
|
363
|
-
|
|
361
|
+
- **A popup that opens from a trigger** (a menu, a picker's list): a `popover: "manual"` measured popover placed
|
|
362
|
+
from the trigger's measured corner with the layer profile's `anchorOverlap`/`anchorGap` and
|
|
363
|
+
`anchorOutdent`/`anchorIndent`, with `motion: "fade"` or `"drop"`. Its script follows
|
|
364
|
+
[owner behaviour code](behaviors.md#owner-code): refs, `aria-expanded`, one element shown and hidden, dismissal,
|
|
365
|
+
placement by measurement only.
|
|
364
366
|
|
|
365
367
|
<a id="measured"></a>
|
|
366
368
|
## Measured values and runtime paints
|
|
@@ -22,6 +22,37 @@ the emitted modules require are recorded in the output's `ads-dependencies.json`
|
|
|
22
22
|
Keep business data in application adapters. External package internals and
|
|
23
23
|
delegated DOM behavior still require source, build and browser review.
|
|
24
24
|
|
|
25
|
+
<a id="owner-code"></a>
|
|
26
|
+
## Owner behaviour code
|
|
27
|
+
|
|
28
|
+
An owner's script switches state; its recipes draw what each state looks like. These rules keep the two apart and
|
|
29
|
+
the markup readable by browsers and assistive technology. They hold for any design system.
|
|
30
|
+
|
|
31
|
+
- **Your own elements by reference.** Reach an element the owner renders through a ref (one per element, or a map of
|
|
32
|
+
refs by key for a list), never by querying its own markup with classes, `data-*` lookups or `parentElement`
|
|
33
|
+
walks. A class is styling the recipe owns; a query couples behaviour to it and breaks when the markup moves.
|
|
34
|
+
- **State on the element, look from the recipe.** A trigger that opens something carries `aria-expanded` and
|
|
35
|
+
`aria-controls` (the id of what it opens, on that element's root); its open look is the recipe's
|
|
36
|
+
`when: { '&[aria-expanded="true"]': … }`, never a class the script toggles. The same holds for `aria-pressed`,
|
|
37
|
+
`aria-selected`, `aria-current`, `data-*` states and native states (`:checked`, `:disabled`, `[open]`).
|
|
38
|
+
- **One element per popup, shown and hidden.** Keep a popover or dialog rendered and switch it with
|
|
39
|
+
`showPopover()`/`hidePopover()` or `showModal()`/`close()`. Re-mounting it on open skips its layer motion, which
|
|
40
|
+
runs from `@starting-style` on an element that exists. Render it inside the element whose pointer events should
|
|
41
|
+
include it: a top-layer element stays a DOM child, so `pointerleave` on its parent does not fire while the
|
|
42
|
+
pointer crosses into it.
|
|
43
|
+
- **Opening and dismissal.** Hover opening is for a mouse (`event.pointerType === "mouse"`) and closes after a
|
|
44
|
+
short grace, so the pointer can cross into the popup; keyboard and touch toggle on activation. Escape and a press
|
|
45
|
+
outside close it; a non-modal popup that opened from a trigger returns focus there when it closes by keyboard.
|
|
46
|
+
- **Placement by measurement only.** For a measured popover the script reports where the anchor is
|
|
47
|
+
(`recipe.measured.set(element, { x, y })` from `getBoundingClientRect()`); its distance from the anchor is the
|
|
48
|
+
layer profile's (`anchorGap`/`anchorOverlap`, `anchorOutdent`/`anchorIndent`), never a number in the script.
|
|
49
|
+
Measure again when what it depends on moves: on resize, and on scroll when the anchor scrolls.
|
|
50
|
+
- **Valid nesting.** An owner's markup follows HTML's content model (`source/invalid-nesting`): no `div`, list,
|
|
51
|
+
paragraph or heading inside a `span`, `p`, `button`, `label` or heading (a link takes its parent's rule); no
|
|
52
|
+
button, link or form control inside a link or a button; list items in a list, rows in a table, cells in a row.
|
|
53
|
+
A box that holds a popup and a trigger is a `div` (or a list item), not a `span`.
|
|
54
|
+
- **Release what you start.** Listeners, timers, observers and animation frames are removed in the effect's cleanup.
|
|
55
|
+
|
|
25
56
|
## Development boundary
|
|
26
57
|
|
|
27
58
|
Production includes real components, patterns, controllers and their compiled
|
|
@@ -303,7 +303,8 @@ fragment or a native frame-only element.
|
|
|
303
303
|
- a dot grid: a surface's `backgroundTile`; a grey logo shown light in the dark theme: `grayscale` and `invert`
|
|
304
304
|
with `brightness` on the image's surface;
|
|
305
305
|
- an illustration that animates (a diagram, a wordmark): an asset with named `groups`, shown in a decoration, its
|
|
306
|
-
groups played by the part's `groups`, and its labels as text parts with `anchor: { artwork, x, y }
|
|
306
|
+
groups played by the part's `groups`, and its labels as text parts with `anchor: { artwork, x, y }` (`size` in the
|
|
307
|
+
drawing's units scales them with it, never below their text profile's size; `block: "baseline"` takes SVG text's `y`). Never draw it
|
|
307
308
|
as markup in the owner.
|
|
308
309
|
- **Rules between items.** Hairlines between rows, between items in a row or between a grid's cells are
|
|
309
310
|
`between: { surface, frame, axes }` on the arrangement: ADS places them at every width, centred in the gap, partial
|
|
@@ -357,10 +358,11 @@ A region recipe's root can live in the browser's top layer through a closed
|
|
|
357
358
|
- **Modal cards.** A dialog with `edge: "center"` or `"block-start"` is a card in the viewport, kept the layer
|
|
358
359
|
profile's `viewportMargin` from its edges, fading in with `motion: "fade"`. The backdrop surface may set
|
|
359
360
|
`backdropBlur`. A zoom view grows an image from its place with a measured `translate` and a measured `scale`.
|
|
360
|
-
- **A
|
|
361
|
-
|
|
362
|
-
`anchorOutdent`/`anchorIndent`,
|
|
363
|
-
|
|
361
|
+
- **A popup that opens from a trigger** (a menu, a picker's list): a `popover: "manual"` measured popover placed
|
|
362
|
+
from the trigger's measured corner with the layer profile's `anchorOverlap`/`anchorGap` and
|
|
363
|
+
`anchorOutdent`/`anchorIndent`, with `motion: "fade"` or `"drop"`. Its script follows
|
|
364
|
+
[owner behaviour code](behaviors.md#owner-code): refs, `aria-expanded`, one element shown and hidden, dismissal,
|
|
365
|
+
placement by measurement only.
|
|
364
366
|
|
|
365
367
|
<a id="measured"></a>
|
|
366
368
|
## Measured values and runtime paints
|
package/dist/token-shapes.mjs
CHANGED
|
@@ -7,7 +7,48 @@ export function readShape(shape, value, scheme) {
|
|
|
7
7
|
const trimmed = value.trim();
|
|
8
8
|
if (CSS_WIDE.has(trimmed.toLowerCase()))
|
|
9
9
|
return { kind: "invalid", reason: `${trimmed} is a CSS-wide keyword, not a value` };
|
|
10
|
-
|
|
10
|
+
const grammar = tokenShapeGrammars[shape];
|
|
11
|
+
if (grammar.kind === "quantity" && grammar.textScaled) {
|
|
12
|
+
const fluid = fluidText(trimmed);
|
|
13
|
+
if (fluid !== null)
|
|
14
|
+
return fluid;
|
|
15
|
+
}
|
|
16
|
+
return readGrammar(grammar, trimmed, scheme);
|
|
17
|
+
}
|
|
18
|
+
const FLUID_UNITS = new Set(["rem", "em", "vw", "vi", "svw", "lvw", "dvw", "cqi", "cqw"]), TEXT_BOUND = /^(\d*\.?\d+)(rem|em)$/;
|
|
19
|
+
function fluidText(value) {
|
|
20
|
+
const match = /^clamp\((.*)\)$/i.exec(value);
|
|
21
|
+
if (match === null)
|
|
22
|
+
return null;
|
|
23
|
+
const parts = [];
|
|
24
|
+
let depth = 0, start = 0;
|
|
25
|
+
const body = match[1] ?? "";
|
|
26
|
+
for (let index = 0;index < body.length; index++) {
|
|
27
|
+
const char = body[index];
|
|
28
|
+
if (char === "(")
|
|
29
|
+
depth++;
|
|
30
|
+
else if (char === ")")
|
|
31
|
+
depth--;
|
|
32
|
+
else if (char === "," && depth === 0) {
|
|
33
|
+
parts.push(body.slice(start, index).trim());
|
|
34
|
+
start = index + 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
parts.push(body.slice(start).trim());
|
|
38
|
+
if (parts.length !== 3)
|
|
39
|
+
return null;
|
|
40
|
+
const [low = "", preferred = "", high = ""] = parts, units = [...preferred.matchAll(/\d(?:\.\d+)?([a-z%]+)/gi)].map((unit) => (unit[1] ?? "").toLowerCase());
|
|
41
|
+
if (!units.some((unit) => unit !== "rem" && unit !== "em"))
|
|
42
|
+
return null;
|
|
43
|
+
const min = TEXT_BOUND.exec(low), max = TEXT_BOUND.exec(high);
|
|
44
|
+
if (min === null || max === null || min[2] !== max[2] || !units.every((unit) => FLUID_UNITS.has(unit)))
|
|
45
|
+
return { kind: "unscaled", reason: "is a fluid size not of the form clamp(<rem>, <rem> + <vw>, <rem>), whose bounds keep it scaling with the reader's text size" };
|
|
46
|
+
const smallest = Number(min[1]), largest = Number(max[1]);
|
|
47
|
+
if (!(smallest > 0) || largest < smallest)
|
|
48
|
+
return { kind: "invalid", reason: "its smallest size is not positive and at most its largest" };
|
|
49
|
+
if (largest > smallest * 2.5)
|
|
50
|
+
return { kind: "unscaled", reason: `grows from ${low} to ${high}, more than 2.5 times: enlarged text would not reach 200% across that range` };
|
|
51
|
+
return { kind: "valid" };
|
|
11
52
|
}
|
|
12
53
|
function readGrammar(grammar, value, scheme) {
|
|
13
54
|
switch (grammar.kind) {
|
package/docs/ADS.md
CHANGED
|
@@ -290,8 +290,9 @@ 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
|
|
294
|
-
|
|
293
|
+
- Blocks a stack holds end on one line: a block that paints a box (a colour or
|
|
294
|
+
gradient fill, a border at its end, or a crop of what it holds at its edge)
|
|
295
|
+
by its outer edge, one that does not where its content ends (its frame's inline end
|
|
295
296
|
padding, a grid's gutter end); a block more than 1px and at most 64px off its
|
|
296
297
|
siblings fails at the stack (`source/end-misaligned`). Text is not compared.
|
|
297
298
|
- A part with a background or a border of its own does not reach a rounded
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,53 +1,165 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.5.
|
|
3
|
+
## 0.5.14
|
|
4
|
+
|
|
5
|
+
<!-- ads-local-tests:start -->
|
|
6
|
+
Hot patch: the unit and integration groups; the browser group was not run.
|
|
7
|
+
Local verification: **1907/1907 passed** with `bun run test:hotpatch`.
|
|
8
|
+
Tested commit: `02ada39029cebaddd1eb23ab327cb65820dda686`; released with the E1 fix in `64e09b15` (see the note below); Bun 1.4.4.
|
|
9
|
+
Completed 2026-11-26T10:34:03.758Z (1386 seconds).
|
|
10
|
+
|
|
11
|
+
<!-- ads-local-test-proof
|
|
12
|
+
{
|
|
13
|
+
"schema": 3,
|
|
14
|
+
"version": "0.5.14",
|
|
15
|
+
"commit": "64e09b15d660c6eda00d12549dc50c5a9e862b2d",
|
|
16
|
+
"sourceSha256": "7a22940de4c3387c7fdf971e9e352c353c70f5a78d6bd0a1ee7f3d0043b31056",
|
|
17
|
+
"command": "bun run test:hotpatch",
|
|
18
|
+
"scope": "hotpatch",
|
|
19
|
+
"result": "pass",
|
|
20
|
+
"tests": 1907,
|
|
21
|
+
"pass": 1907,
|
|
22
|
+
"fail": 0,
|
|
23
|
+
"skipped": 0,
|
|
24
|
+
"groups": [
|
|
25
|
+
{
|
|
26
|
+
"name": "unit",
|
|
27
|
+
"tests": 851,
|
|
28
|
+
"pass": 851,
|
|
29
|
+
"fail": 0,
|
|
30
|
+
"skipped": 0,
|
|
31
|
+
"reportSha256": "93ea0e08769137adacfbed8d6fa950b14725050be4cd59ff6bb314e256c00efe"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "integration",
|
|
35
|
+
"tests": 1056,
|
|
36
|
+
"pass": 1056,
|
|
37
|
+
"fail": 0,
|
|
38
|
+
"skipped": 0,
|
|
39
|
+
"reportSha256": "cb0d564d9c42519d45e6510048305748855d84cfa04685ddedb0c044cc8ec9ac"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"testOverrides": {},
|
|
43
|
+
"bun": "1.4.4",
|
|
44
|
+
"completedAt": "2026-11-26T10:34:03.758Z",
|
|
45
|
+
"durationMs": 1385934,
|
|
46
|
+
"logSha256": "2b5c7f6cee57f7f2839ba9fcc2edd9673a08cf78d6aa8091cdd45eeaffd40cc9"
|
|
47
|
+
}
|
|
48
|
+
-->
|
|
49
|
+
<!-- ads-local-tests:end -->
|
|
50
|
+
|
|
51
|
+
- *Fixed: a picture stage set the end-alignment line for the text under it*
|
|
52
|
+
(#66): a painted or cropping part that holds no text (a stage with a
|
|
53
|
+
screenshot) is a picture, not a line the text beside it ends on.
|
|
54
|
+
- *Zoom cursors* (#69): `normalize.cursor` takes `zoom-in` and `zoom-out`.
|
|
55
|
+
- *Fixed: an emitted owner kept unused local aliases* (reqvire E1): a constant
|
|
56
|
+
inside a component that only aliases an authoring value (`const drawn =
|
|
57
|
+
sizes[size]`) is removed with the recipe table only it read, so a consumer
|
|
58
|
+
that type-checks with `noUnusedLocals` accepts the output.
|
|
59
|
+
|
|
60
|
+
Verification note: the hot-patch run below covered commit 02ada390. The E1 fix
|
|
61
|
+
was added after it on the owner's instruction and verified only by its related
|
|
62
|
+
tests (the new emission test, owner emission, lowering parity, the example
|
|
63
|
+
project, helper drawings, measured geometry and the unit group, all passing);
|
|
64
|
+
the stamp below names the released source.
|
|
65
|
+
- *Valid nesting in an owner's markup*: a new error, `source/invalid-nesting`,
|
|
66
|
+
for flow content inside phrasing-only elements (a `div` in a `span`, a list in
|
|
67
|
+
a `p`), a link, button or form control inside a link or a button, and list
|
|
68
|
+
items, table rows and cells outside their list, table and row.
|
|
69
|
+
- Skills: *owner behaviour code* in the behaviors guide: elements by ref,
|
|
70
|
+
`aria-expanded` with the recipe's state for the open look, one popup element
|
|
71
|
+
shown and hidden, opening and dismissal, placement by measurement only, valid
|
|
72
|
+
nesting, cleanup.
|
|
73
|
+
|
|
74
|
+
## 0.5.13
|
|
4
75
|
|
|
5
76
|
<!-- ads-local-tests:start -->
|
|
6
77
|
Hot patch: the unit and integration groups; the browser group was not run.
|
|
7
|
-
Local verification: **
|
|
8
|
-
Tested commit: `
|
|
9
|
-
Completed 2026-11-
|
|
78
|
+
Local verification: **1903/1903 passed** with `bun run test:hotpatch`.
|
|
79
|
+
Tested commit: `20668647cf0f7d58fe7f1ae2449ea8ee6a2872c9`; Bun 1.4.4.
|
|
80
|
+
Completed 2026-11-26T08:19:36.167Z (1452 seconds).
|
|
10
81
|
|
|
11
82
|
<!-- ads-local-test-proof
|
|
12
83
|
{
|
|
13
84
|
"schema": 3,
|
|
14
|
-
"version": "0.5.
|
|
15
|
-
"commit": "
|
|
16
|
-
"sourceSha256": "
|
|
85
|
+
"version": "0.5.13",
|
|
86
|
+
"commit": "20668647cf0f7d58fe7f1ae2449ea8ee6a2872c9",
|
|
87
|
+
"sourceSha256": "efe08eecc94ea7c9502692707f0e4788ed865ffe378fb6797959292a9738efc0",
|
|
17
88
|
"command": "bun run test:hotpatch",
|
|
18
89
|
"scope": "hotpatch",
|
|
19
90
|
"result": "pass",
|
|
20
|
-
"tests":
|
|
21
|
-
"pass":
|
|
91
|
+
"tests": 1903,
|
|
92
|
+
"pass": 1903,
|
|
22
93
|
"fail": 0,
|
|
23
94
|
"skipped": 0,
|
|
24
95
|
"groups": [
|
|
25
96
|
{
|
|
26
97
|
"name": "unit",
|
|
27
|
-
"tests":
|
|
28
|
-
"pass":
|
|
98
|
+
"tests": 851,
|
|
99
|
+
"pass": 851,
|
|
29
100
|
"fail": 0,
|
|
30
101
|
"skipped": 0,
|
|
31
|
-
"reportSha256": "
|
|
102
|
+
"reportSha256": "0dfbbea8f12a5b7fb692755cad174bdd03a18ccb8a3e6d1e3668dee2282f8681"
|
|
32
103
|
},
|
|
33
104
|
{
|
|
34
105
|
"name": "integration",
|
|
35
|
-
"tests":
|
|
36
|
-
"pass":
|
|
106
|
+
"tests": 1052,
|
|
107
|
+
"pass": 1052,
|
|
37
108
|
"fail": 0,
|
|
38
109
|
"skipped": 0,
|
|
39
|
-
"reportSha256": "
|
|
110
|
+
"reportSha256": "f5604c0b8e13cd293c9d122cce8237b8564ac595facd77eccb1d0828c105aab7"
|
|
40
111
|
}
|
|
41
112
|
],
|
|
42
113
|
"testOverrides": {},
|
|
43
114
|
"bun": "1.4.4",
|
|
44
|
-
"completedAt": "2026-11-
|
|
45
|
-
"durationMs":
|
|
46
|
-
"logSha256": "
|
|
115
|
+
"completedAt": "2026-11-26T08:19:36.167Z",
|
|
116
|
+
"durationMs": 1452001,
|
|
117
|
+
"logSha256": "aec0afad38322c2bd2ed23a6d791cbb484ac4576c9e0eda7818de26662d8a3d7"
|
|
47
118
|
}
|
|
48
119
|
-->
|
|
49
120
|
<!-- ads-local-tests:end -->
|
|
50
121
|
|
|
122
|
+
- *Fixed: a modal card with a fixed width overflowed a phone* (#52). A card's
|
|
123
|
+
frame `inlineSize` is the size it prefers; on a narrower screen the viewport's
|
|
124
|
+
room wins. Cards and popovers measure that room from their containing block
|
|
125
|
+
(`100%`), the viewport without its scrollbar's room, not `100vw`.
|
|
126
|
+
- *A modal card keeps its scroll to itself* (#51): `overscroll: "contain"` on a
|
|
127
|
+
layer root the layer makes scroll, with no `overflow`.
|
|
128
|
+
- *Fixed: a popover dropped its frame's maximum height* (#56): the smaller of the
|
|
129
|
+
frame's `maxBlockSize` and the viewport's room applies.
|
|
130
|
+
- *A multi-line field* (#53): `element: "textarea"` keeps a control frame's
|
|
131
|
+
stated insets around the lines; a `<textarea>` with a control frame declares
|
|
132
|
+
it (`source/textarea-element-missing`).
|
|
133
|
+
- *Fixed: a drawing read in a helper function was emitted as a read of `{}`*
|
|
134
|
+
(#57): a recipe drawing read outside the markup of the part that shows it is
|
|
135
|
+
refused at check time (`source/drawing-read-unbound`).
|
|
136
|
+
- *Fixed: a themed decoration two parts deep failed to lower* (#59).
|
|
137
|
+
- *Fixed: a part hidden under a condition kept its space after* (#62): it gives
|
|
138
|
+
that space only where it shows.
|
|
139
|
+
- *Fixed: a stage whose screenshot runs off its end set the end-alignment line*
|
|
140
|
+
(#54, #64): a gradient fill and a part that crops what it holds show their
|
|
141
|
+
box's edge, as a colour fill does.
|
|
142
|
+
- *Items that grow from their own width* (#55): `extent: "grow"` (`flex: 1 1
|
|
143
|
+
auto`); in a wrapping row items sit at their own widths where they fit and
|
|
144
|
+
fill their line where they wrap.
|
|
145
|
+
- *A whole-viewport modal that drops in* (#58): a dialog's `edge: "fill"`
|
|
146
|
+
covers the viewport; `motion: "drop"` now also applies to dialogs.
|
|
147
|
+
- *A zoom view* (#61): `motion: "veil"` fades only a dialog's backdrop, while
|
|
148
|
+
what it holds animates on its own (an image growing from its place).
|
|
149
|
+
- *Labels that scale with their drawing* (#60): an anchored label's `size`, in
|
|
150
|
+
the drawing's units, grows with the drawing and never goes below its text
|
|
151
|
+
profile's size; `anchor.block: "baseline"` sits it on its baseline.
|
|
152
|
+
- *A fluid text size* (#65): a font-size token may be `clamp(<rem>, <rem> +
|
|
153
|
+
<vw>, <rem>)`, its largest bound at most 2.5 times its smallest, so enlarged
|
|
154
|
+
text still reaches 200%.
|
|
155
|
+
- *In turn, however many* (#65): `play: { sequence, orderBy }` staggers each
|
|
156
|
+
instance of a repeated part by a measured `index` the owner writes at render.
|
|
157
|
+
New code: `construction/sequence-order-unmeasured`.
|
|
158
|
+
- *A pulse that starts over* (#63): a sequence's `repeat: "restart"` repeats from
|
|
159
|
+
its first step without requiring its end to match its start.
|
|
160
|
+
|
|
161
|
+
## 0.5.12
|
|
162
|
+
|
|
51
163
|
- *Fixed: a row in block flow could not span its column* (#47). `extent: "fill"`
|
|
52
164
|
on a part with its own `recipe` in block flow makes it a block as wide as its
|
|
53
165
|
container; a heading row's `space-between` puts its switch at the column's end.
|
package/docs/GUIDE.md
CHANGED
|
@@ -1281,6 +1281,14 @@ an owner-analysis finding with its fine-grained code, reported under its
|
|
|
1281
1281
|
- `a11y-image-alt` (error, at the image): every `<img>` that an owner renders
|
|
1282
1282
|
has `alt`: artwork (`source/intrinsic-alt-missing`), content media and any
|
|
1283
1283
|
other image (`source/image-alt-missing`). `alt=""` marks a decorative one.
|
|
1284
|
+
- `a11y-nesting` (error, at the element): an owner's markup follows HTML's
|
|
1285
|
+
content model (`source/invalid-nesting`): no flow content (a `div`, a list, a
|
|
1286
|
+
paragraph, a heading) inside an element that takes phrasing content only (a
|
|
1287
|
+
`span`, `p`, `button`, `label`, heading; a link takes its parent's rule), no
|
|
1288
|
+
link, button or form control inside a link or a button, and list items, table
|
|
1289
|
+
rows and cells in their list, table and row. The parent is known through
|
|
1290
|
+
expressions and the callbacks of a list the markup renders; a component or a
|
|
1291
|
+
function boundary reports nothing.
|
|
1284
1292
|
- `a11y-keyboard` (review, at the element): `onClick` on a non-interactive
|
|
1285
1293
|
element (div, span, li, img, …) without a role and `tabIndex`
|
|
1286
1294
|
(`review/click-without-keyboard`). Composite-widget items (option, tab,
|
package/docs/LANGUAGE.md
CHANGED
|
@@ -248,11 +248,11 @@ them all.
|
|
|
248
248
|
| `kind: "component"` | region part | a public component placed with the part's marker (`<Heading className="ds-content-heading" …/>`), as a grid cell is: its interior is its owner's, so the part states placement only (`required`, `repeat`, `extent`, `at`, `spaceBefore`, `spaceAfter`) | any other field (`spec/field-unsupported`); a forwarded `className` that carries a recipe (`source/foreign-interior`) |
|
|
249
249
|
| `spaceBefore` / `spaceAfter: { slot: "spacing", field }` | part of a `stack`, or of a parent without an arrangement (block flow: a list item that keeps its marker) | the part's own space before it and after it. In a stack, in place of the gap (`margin-block-start: calc(space - gap)` on the part, or on what follows it), the larger where two meet, the first part flush. In block flow, the part's own `margin-block-start` and `margin-block-end`, which the browser collapses: the larger where two meet, and a last block's space passes out through containers without padding or border (a list item, a component's root) to what follows them, so loose list items whose content is another component keep their space. A placed component (`kind: "component"`) takes its space the same way. A part laid out as an `inline` row that states its own space (`spaceBefore`, `spaceAfter`, `spacing`) is a block in block flow (`display: flex; inline-size: fit-content`, or its full width with `extent: "fill"`), so its space collapses with the blocks around it; a row without space of its own stays inline-level (`inline-flex`) and keeps its line beside inline text. Inside its own block padding or border, a block flow starts and ends flush (`> :first-child` loses its space before, `> :last-child` its space after): there the space could not pass out and would only add to the padding | another parent layout (`space-parent-unsupported`) |
|
|
250
250
|
| `spacing: "<spacing profile>"` | part of a `stack` or block flow | the part's space before and after it from that profile's `spaceBefore` and `spaceAfter` fields, where a flow needs more distances than one spacing profile holds (a heading 44 px above and 14 px below, 24 px after a quote); the same "larger of the two" rule | a profile that states neither field (`profile-field-missing`) |
|
|
251
|
-
| (a `stack` of blocks) | root, part recipe | the blocks a stack holds end on one line: a painted block by its outer edge, an unpainted one where its content ends (frame end padding, a grid's gutter end); one off by more than 1px and at most 64px fails (`source/end-misaligned`); text is not compared | n/a |
|
|
251
|
+
| (a `stack` of blocks) | root, part recipe | the blocks a stack holds end on one line: a painted block (a colour or gradient fill, a border at its end, or a part that crops what it holds at its edge, such as a stage whose screenshot runs off) by its outer edge, an unpainted one where its content ends (frame end padding, a grid's gutter end); one off by more than 1px and at most 64px fails (`source/end-misaligned`); text is not compared | n/a |
|
|
252
252
|
| `flow: { edges: "trim" }` | block-flow root (no `layout`) | its first child's space before and its last child's space after become nothing, as a stack starts and ends flush: a page that opens with a heading starts at its top. Without it, a frameless block-flow root passes those spaces out, as CSS margins do (the loose list's item content). The automatic flush applies only to padding or a border on the flow's own element: a flow that is a component's root placed inside another component's padding (Content inside a Callout) is frameless, so it declares this to end flush | `recipe.flow` on a root with a `layout` (`spec/value-invalid`) |
|
|
253
253
|
| `frame: { …, safeArea: ["block-end", …] }` (a root's frame; a part's `frame: { profile, safeArea }`) | root, part | each named side's padding plus `env(safe-area-inset-<side>, 0px)`: a phone's bottom bar above the home indicator; an inline side is written for left-to-right and mirrored under `:dir(rtl)` | a side outside `block-start`, `block-end`, `inline-start`, `inline-end` (`spec/value-invalid`) |
|
|
254
254
|
| `groups: { "<name>": { play?, when?: { "<owner state>": { play } } } }` | visual or decoration part | sequences played by named groups of the part's drawing (`<part> > svg [data-group]`), each around its own box; `play.paused` holds one at its first step under a state ([MOTION.md](MOTION.md#groups-inside-a-drawing)) | a group the drawing does not declare, or a drawing not shown as inline SVG (`artwork-group-unknown`); a drawn group without `pathLength="1"` (`artwork-group-draw-length`) |
|
|
255
|
-
| `anchor: { artwork, x, y, inline?, block? }` | text part | the text placed on a sibling decoration's drawing at `x`, `y` in the drawing's coordinates (its viewBox), aligned by its start, centre or end on each axis (`position: absolute`, a share of the parent's box): real, checked text over a diagram. The parent is sized to the drawing (`aspect-ratio` of its viewBox), so the drawing fills it exactly | an artwork that is not a sibling decoration with a drawing, labels on two drawings in one parent, or a parent that states its own block size or ratio (`text-anchor-unsupported`) |
|
|
255
|
+
| `anchor: { artwork, x, y, inline?, block?, size? }` | text part | the text placed on a sibling decoration's drawing at `x`, `y` in the drawing's coordinates (its viewBox), aligned by its start, centre or end (and on the block axis by its `baseline`, as SVG text sits: the label is trimmed to end at its first baseline, which falls back to its line box where `text-box-trim` is not supported). `size` (drawing units) sizes the label with the drawing (`max(<text size>, 100cqi × size / viewBox width)`, the parent its inline-size container), never below its text profile's size, which it needs (`text-anchor-unsupported`) on each axis (`position: absolute`, a share of the parent's box): real, checked text over a diagram. The parent is sized to the drawing (`aspect-ratio` of its viewBox), so the drawing fills it exactly | an artwork that is not a sibling decoration with a drawing, labels on two drawings in one parent, or a parent that states its own block size or ratio (`text-anchor-unsupported`) |
|
|
256
256
|
| `origin: "center" \| "inline-start" \| "inline-end" \| "block-start" \| "block-end"` | root, part | where its scales and `rotate` grow from, in states, entrances and sequences alike (`transform-origin`; an inline edge also writes its mirror under `:dir(rtl)`); `"center"`, the default, writes nothing | another value (`spec/value-invalid`) |
|
|
257
257
|
| `carry: true` | `stack` root | loose flow (a list whose items hold paragraphs, code, figures): the stack gives its gap to its children (`--ads-flow-gap`), and its last part's own space after carries out of it between items (`margin-block-end: max(0px, space - gap)`), so on a list and its item the next item starts at the larger of the list's gap and the item's last block's space after; after the last item the list's own space after applies | a root that is not a stack (`space-parent-unsupported`) |
|
|
258
258
|
| a part rendered as `p`, `h1`–`h6`, `ul`, `ol`, `dl`, `dd`, `blockquote`, `figure`, `pre`, `hr`, `menu` | region part | `margin: 0`: the arrangement owns the space around a part, so the browser's margin is reset; a part that states its own margin (`normalize: { margin: 0 }`, now allowed on parts too) keeps it | n/a |
|
|
@@ -270,7 +270,7 @@ them all.
|
|
|
270
270
|
| `align` / `justify` on an element that scrolls | root, part | `safe center` / `safe end` on the axis the element itself scrolls: content stays aligned while it fits and starts at the scroll origin when it overflows, so its start is never unreachable | n/a (automatic) |
|
|
271
271
|
| a rounded frame (`radius`) with visible overflow | region root | n/a | a first or last part of a stack, or a layer, that paints a background over a corner with no inset there (`construction/corner-overpaint`): clip the root, inset it, or round the part |
|
|
272
272
|
| `sticky: { edge: "block-start" \| "block-end", clear?: "block-start" }` | root (not a top-layer root), part | `position: sticky` at that edge of the nearest scrolling container (`inset-block-start: 0`); with `clear`, below the region the layer profile's `clearBlockStart` names; `z-index` from the layer profile's `stickyLayer` when it has one | `clear` with the end edge; `clear` without a layer profile that states `clearBlockStart` |
|
|
273
|
-
| `extent: "fill" \| "fill-both"` | part | `flex: 1 1 0`, the main-axis minimum released, so the part's content is confined to it; in a `stack` whose frame states only a minimum height (`minBlockSize`, with no `blockSize`, `maxBlockSize`, ratio or `overflow`) the part keeps its content's height and the stack grows with it; `align-self: stretch` with `fill-both`. In block flow (a parent without an arrangement), `fill` on a part with its own `recipe` makes it a block as wide as its container: a heading row whose switch sits at the column's end (a row is `display: flex` there, without `fit-content`) | the parent is not `stack`/`inline` (`extent-parent-unsupported`); a frame or reserved lines set that minimum |
|
|
273
|
+
| `extent: "fill" \| "fill-both" \| "grow"` | part | `grow`: `flex: 1 1 auto`, the part grows from its own size, so in a wrapping row items sit side by side at their own widths where they fit and each fills its line where they wrap (a pricing hero's two buttons). `fill`: `flex: 1 1 0`, the main-axis minimum released, so the part's content is confined to it; in a `stack` whose frame states only a minimum height (`minBlockSize`, with no `blockSize`, `maxBlockSize`, ratio or `overflow`) the part keeps its content's height and the stack grows with it; `align-self: stretch` with `fill-both`. In block flow (a parent without an arrangement), `fill` on a part with its own `recipe` makes it a block as wide as its container: a heading row whose switch sits at the column's end (a row is `display: flex` there, without `fit-content`) | the parent is not `stack`/`inline` (`extent-parent-unsupported`); a frame or reserved lines set that minimum |
|
|
274
274
|
| `extent: "content" \| "container"` | root of an `inline` row, or of a control | `"content"` (the default): as wide as its content, never wider than its container (`display: inline-flex; max-inline-size: 100%`, or `min(100%, <cap>)` under its frame's own cap); `"container"`: the width available in any parent, a block one, a column that aligns its children, or a row beside siblings (`display: flex; inline-size: 100%`), so a filling part has the rest of the row | on a `stack`, `flow`, `layered` or top-layer root, which never hug (`spec/field-unsupported`); `"container"` with a frame that fixes the row's width (`construction/extent-conflict`); a part with `extent: "fill"` in a `"content"` row whose frame does not fix its width (`construction/extent-row-hugs`) |
|
|
275
275
|
| `layout: "layered"` | root, part recipe | one `minmax(0,1fr)` grid area; every declared child part at `1 / 1`; paint order is DOM order, no `z-index` | fewer than two parts (`layered-parts-missing`); `gap` or `wrap` |
|
|
276
276
|
| `outset: { block?, inline? }` (spacing fields) | a childless, non-text part of a `layered` parent | `margin-block` / `margin-inline: calc(-1 * <spacing>)`: the backdrop is drawn past its parent's box (a glow behind a card); the grid area and the layout around it are unchanged. A field bound to a `box-share` token (the spacing profile's `outsetBlock` / `outsetInline`) is a share of the box on that axis and grows with it: the same margin on the inline axis, and on the block axis `block-size: calc(100% + 2 * <share>)` centred over the area (`align-self: center`) | any other part (`construction/outset-unsupported`) |
|
|
@@ -281,7 +281,7 @@ them all.
|
|
|
281
281
|
| `frame: { profile, rules?, corners? }`; `at: { "<condition>": { frame: { rules?, corners? } } }` | part with its own box | the box's one-sided rules and rounded corners as a root frame's, and under the condition only what the condition changes: a tinted side with a hairline on top and rounded bottom corners while stacked, on its start side and end corners beside | a frame change on a part without its own box; condition `rules` on a box without `rules` (`spec/value-invalid`) |
|
|
282
282
|
| `at: { "<condition>": { align?, justify?, textAlign? } }` | region root, part | the element's arrangement alignment (`align-items`, `justify-content`) and `text-align` inside the condition's range, its own outside it: a banner centred on phones and start-aligned from a width; a root's alignment needs no `frame` | unknown condition (`condition-unknown`); an entry that changes nothing (`spec/value-invalid`) |
|
|
283
283
|
| `recipe.conditionQuery["<condition>"]` | owner code | the literal media range the CSS writes (`(width < 47.5rem)`), for `matchMedia` | the recipe's spatial profile lacks it (`choice/recipe-access-unsupported`) |
|
|
284
|
-
| `element: "iframe" \| "select" \| "search-input" \| "text-input" \| "table" \| "header-cell" \| "cell" \| "list" \| "summary" \| "document"`, `marker: "none"` | root, part (`document`: a pattern's root only) | the element's closed UA normalization (`text-input`: an `<input>` of type `text`, `email`, `tel`, `url`, `password` or `number`, or without a type; `search-input`: `type="search"`) (no iframe border, list markers or summary marker; collapsed table; start-aligned, middle cells) | another tag (`source/part-element-mismatch`); a summary outside `<details>` (`source/summary-outside-details`) |
|
|
284
|
+
| `element: "iframe" \| "select" \| "search-input" \| "text-input" \| "textarea" \| "table" \| "header-cell" \| "cell" \| "list" \| "summary" \| "document"`, `marker: "none"` | root, part (`document`: a pattern's root only) | the element's closed UA normalization (`text-input`: an `<input>` of type `text`, `email`, `tel`, `url`, `password` or `number`, or without a type; `search-input`: `type="search"`; `textarea`: a `<textarea>`, whose control frame keeps its stated insets around its lines instead of centring one; a `<textarea>` with a control frame declares it, `source/textarea-element-missing`) (no iframe border, list markers or summary marker; collapsed table; start-aligned, middle cells) | another tag (`source/part-element-mismatch`); a summary outside `<details>` (`source/summary-outside-details`) |
|
|
285
285
|
| `align: "start" \| "center" \| "end"` on a cell (`element: "cell" \| "header-cell"`); `extent: "container"` on a table root | cell; table root | `vertical-align: top \| middle \| bottom` (rows whose cells wrap to different line counts start together at the top); `inline-size: 100%` (a table as wide as its container instead of its content) | `align` on any other part (`field-unsupported`); a table frame that fixes its width as well (`extent-conflict`) |
|
|
286
286
|
| `normalize: { textDecoration: "none", pointerEvents: "none", borderStyle: "none" }` | root, `normalize.when`; `textDecoration` and `pointerEvents` also on a part (a link card's link, a decorative layer at any depth) | `text-decoration-line`, `pointer-events`, `border-style` | pointer transparency on focusable or interactive, non-`aria-hidden` markup (`source/pointer-transparent-interactive`) |
|
|
287
287
|
| `normalize: { cursor, touchAction, userSelect }`, `snap` | root, part, `normalize.when`; scrolling arrangement | see [interaction properties](#interaction-properties) | a value outside its set (`spec/value-invalid`); snap without scrolling (`snap-without-scroll`) |
|
|
@@ -826,16 +826,28 @@ recipe({
|
|
|
826
826
|
page must not move behind a modal keeps the room at all times with the
|
|
827
827
|
foundation's `scrollbarGutter: "stable"`; where scrollbars overlay the page it
|
|
828
828
|
reserves nothing.
|
|
829
|
+
- **Whole-viewport modal** (`element: "dialog"`; `edge: "fill"`): a `<dialog>`
|
|
830
|
+
over the entire viewport, no margin and no layer profile (a phone menu, a
|
|
831
|
+
zoom view); its content is placed inside it (a close control is a layer in
|
|
832
|
+
its corner, the viewport's corner). It takes a card's motions.
|
|
829
833
|
- **Modal card** (`element: "dialog"`; `edge: "center" | "block-start"`): the
|
|
830
834
|
same `<dialog>`, a card centred in the viewport, or centred inline below the
|
|
831
835
|
top. A centred card keeps the layer profile's `viewport-margin` from every
|
|
832
836
|
viewport edge; a block-start card keeps its `edge-gap` from the top and the
|
|
833
837
|
bottom (the margin when it declares none) and the margin at the sides
|
|
834
|
-
(`max-inline-size`, `max-block-size: calc(100dvh -
|
|
835
|
-
frame's size within it
|
|
838
|
+
(`max-inline-size: calc(100% - 2 × margin)`, `max-block-size: calc(100dvh -
|
|
839
|
+
2 × gap)`), with its frame's size within it: the frame's `inlineSize` is the
|
|
840
|
+
size it prefers, and on a narrower screen the room wins (a 540px card on a
|
|
841
|
+
phone). The room is measured from the card's containing block, the viewport
|
|
842
|
+
without its scrollbar's room. A card taller than the screen scrolls inside;
|
|
843
|
+
`overscroll: "contain"` on its root (with no `overflow`, the layer makes it
|
|
844
|
+
scroll) keeps that scroll from reaching the page. The scroll lock hides the page's scrollbar; a page
|
|
836
845
|
that should not shift then keeps the scrollbar's room at all times with the
|
|
837
846
|
foundation's `scrollbarGutter: "stable"`. `motion: "fade"`
|
|
838
|
-
fades the card and its backdrop in
|
|
847
|
+
fades the card and its backdrop in; `"drop"` fades it while it comes down
|
|
848
|
+
its motion profile's `distance` from its `scale`; `"veil"` fades only the
|
|
849
|
+
backdrop and keeps the dialog shown until it has (a zoom view, whose image
|
|
850
|
+
grows from its place by its own measured motion). A close control in its corner is a layer of a layered part.
|
|
839
851
|
A zoom view that grows an image from its place sets a measured `translate`
|
|
840
852
|
and a measured `scale` (`{ type: "scale", property: "scale" }`, unitless
|
|
841
853
|
factors per axis) on the image and animates them with their `motion`.
|
|
@@ -843,12 +855,14 @@ recipe({
|
|
|
843
855
|
non-modal panel pinned to a viewport `corner` by logical insets, with light
|
|
844
856
|
dismiss and Escape from `popover="auto"`. A `layer` profile (`edge-gap`,
|
|
845
857
|
`viewport-margin` and, for `clear: "block-start"`, `clear-block-start`)
|
|
846
|
-
places it; `100dvh` bounds its height
|
|
858
|
+
places it; `100dvh` bounds its height, and the frame's own `maxBlockSize`
|
|
859
|
+
when it is smaller (a list that scrolls past 320px). The clearance must resolve to a fixed
|
|
847
860
|
length (`construction/layer-clearance-unbounded`).
|
|
848
861
|
- **Measured popover** (`placement: "measured"`): the same panel, anchored by
|
|
849
862
|
the owner to an element (its trigger, a pointer, a text selection). The
|
|
850
863
|
compiler fixes it in the top layer with every inset released and its size
|
|
851
|
-
within the viewport less the layer profile's `viewport-margin
|
|
864
|
+
within the viewport less the layer profile's `viewport-margin`, and within
|
|
865
|
+
the frame's own caps when they are smaller. The owner
|
|
852
866
|
writes the position through the recipe's
|
|
853
867
|
[measured values](#measured-runtime-geometry), which the panel reads only
|
|
854
868
|
while open. Its root declares at least one measured inset or `translate`
|
|
@@ -951,6 +965,10 @@ Each `type` (setter value; place) has a closed property list:
|
|
|
951
965
|
`slider-fill`, the fill of a range slider with a `sliderFill` treatment, or
|
|
952
966
|
`slider-step`, the place of each step label in a row `along` a slider
|
|
953
967
|
([range sliders](#range-sliders)). Written with `measured.props` at render.
|
|
968
|
+
- `index` (0, 1, 2…, an instance's place among its siblings):
|
|
969
|
+
`sequence-order`, read by a sequence staggered by it
|
|
970
|
+
(`play: { sequence, orderBy: "<name>" }`, [MOTION.md](MOTION.md#sequences)).
|
|
971
|
+
Written on each instance with `measured.props` at render.
|
|
954
972
|
|
|
955
973
|
Rules:
|
|
956
974
|
|
|
@@ -1035,7 +1053,7 @@ resize a multi-line text field. It belongs on a part rendered as `<textarea>`
|
|
|
1035
1053
|
The fields occur in a root's or a part's `normalize` and in its `when`:
|
|
1036
1054
|
|
|
1037
1055
|
- `cursor`: `pointer`, `default`, `grab`, `grabbing`, `col-resize`,
|
|
1038
|
-
`row-resize`, `move`, `text` or `
|
|
1056
|
+
`row-resize`, `move`, `text`, `not-allowed`, `zoom-in` or `zoom-out`.
|
|
1039
1057
|
- `touchAction` (lowers to `touch-action`): `none`, `pan-x` or `pan-y`.
|
|
1040
1058
|
- `userSelect`: `none`. It lowers to `user-select` with its prefixed companion
|
|
1041
1059
|
`-webkit-user-select` (some engines read only the prefixed property; the
|
package/docs/MOTION.md
CHANGED
|
@@ -468,6 +468,11 @@ recipe({
|
|
|
468
468
|
it. An indicator rendered only while work is in progress needs nothing more.
|
|
469
469
|
- The older continuous rotation (`repeat: "continuous"` with `rotate` on a
|
|
470
470
|
standalone artwork part) is unchanged.
|
|
471
|
+
- **In turn, however many.** `play: { sequence, orderBy: "word" }` on a
|
|
472
|
+
repeated part starts each instance as many staggers late as its measured
|
|
473
|
+
`index` (`measured: { word: { type: "index", property: "sequence-order" } }`,
|
|
474
|
+
written on each instance with `measured.props({ word: i })`): a title from
|
|
475
|
+
props whose words rise one after another.
|
|
471
476
|
- **Held, then played.** `play: { sequence, paused: true }` under one owner
|
|
472
477
|
state holds the element at its first step (`animation-play-state: paused`),
|
|
473
478
|
and the same sequence under another state plays it: a diagram armed before it
|
package/docs/PROFILE-KINDS.md
CHANGED
|
@@ -480,15 +480,18 @@ profile({
|
|
|
480
480
|
steps that state it.
|
|
481
481
|
- The steps run from `0` to `100`, at distinct whole percentages
|
|
482
482
|
(`construction/sequence-steps-invalid`).
|
|
483
|
-
- `repeat` is `"loop"` (the default), `"alternate"` or `"once"`.
|
|
484
|
-
where it starts: its step at 100 states the values of its step
|
|
485
|
-
has no jump (`construction/sequence-not-seamless`). `"
|
|
486
|
-
|
|
483
|
+
- `repeat` is `"loop"` (the default), `"restart"`, `"alternate"` or `"once"`.
|
|
484
|
+
A loop ends where it starts: its step at 100 states the values of its step
|
|
485
|
+
at 0, so it has no jump (`construction/sequence-not-seamless`). `"restart"`
|
|
486
|
+
starts over from its first step, for a pulse whose end differs from its start
|
|
487
|
+
by design (a ring that grows and fades out). `"alternate"` plays forward then
|
|
488
|
+
backward, forever. `"once"` plays one time and holds its last
|
|
487
489
|
step.
|
|
488
490
|
- `reduced: "static"` is required: under reduced motion nothing plays and the
|
|
489
491
|
part keeps its own look.
|
|
490
492
|
- `stagger` is the time between parts that share the sequence
|
|
491
|
-
([Sequences](MOTION.md#sequences))
|
|
493
|
+
([Sequences](MOTION.md#sequences)): `order` fixes how many staggers a part
|
|
494
|
+
starts late, and `orderBy` reads it per instance from a measured `index`.
|
|
492
495
|
|
|
493
496
|
## Focus
|
|
494
497
|
|