diff --git a/.agent/skills/basalt-html/parts/menu.css b/.agent/skills/basalt-html/parts/menu.css
index 35064113..61d6db6a 100644
--- a/.agent/skills/basalt-html/parts/menu.css
+++ b/.agent/skills/basalt-html/parts/menu.css
@@ -1 +1 @@
-@layer basalt{.menu{min-width:var(--basalt-size-menu-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.menu-item{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);--_gap: var(--basalt-space-2-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--_gap);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);border:0;border-radius:0;background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:default;user-select:none;outline:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item svg{flex:none}.menu-item-label{flex:1;min-width:0}.menu-item .kbd-group{margin-inline-start:var(--basalt-space-4)}.menu-item[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.menu-item[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.menu-item[data-danger],.menu-item[data-danger][data-highlighted]{color:var(--basalt-status-danger)}.menu-item:is([disabled],[aria-disabled=true]){color:var(--basalt-text-disabled)}.menu-check{display:inline-flex;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);flex:none;color:var(--basalt-text-primary)}.menu-check>*{visibility:hidden}[aria-checked=true]>.menu-check>*{visibility:visible}.menu-radio-dot{display:block;width:var(--basalt-space-1-5);height:var(--basalt-space-1-5);border-radius:var(--basalt-radius-full);background:currentColor}.menu-item:has(>.menu-item-description){--_line: var(--basalt-text-base-line-height);--_desc: var(--basalt-text-sm-line-height);display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:var(--_line) var(--_desc);align-items:center;align-content:center;gap:0;height:auto;min-height:calc(var(--_h) + var(--_desc) + 2 * var(--_inset));padding-block:calc(var(--_inset) + (var(--_h) - var(--_line)) / 2)}.menu-item:has(>.menu-item-description)>:is(svg,.menu-check){grid-column:1;grid-row:1;margin-inline-end:var(--_gap)}.menu-item:has(>.menu-item-description)>.menu-item-label{grid-column:2;grid-row:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item:has(>.menu-item-description)>.menu-item-description{grid-column:2 / -1;grid-row:2}.menu-item:has(>.menu-item-description)>.kbd-group{grid-column:3;grid-row:1}.menu-item-description{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item[data-highlighted] .menu-item-description{color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}.menu-item:is([disabled],[aria-disabled=true]) .menu-item-description{color:var(--basalt-text-disabled)}.menu:has(.menu-item-description){width:max-content;max-width:min(var(--basalt-size-popover-max),calc(100vw - 2 * var(--basalt-space-4)))}@media(pointer:coarse){.menu-item{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}.menu-item:has(>.menu-item-description){height:auto;min-height:max(calc(var(--_h) + var(--_desc) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.menu-separator{height:var(--basalt-size-hairline);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1));background:var(--basalt-border-divider)}.menu-group-label{padding:var(--basalt-space-2) var(--basalt-space-3) var(--basalt-space-0-5);font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-tertiary)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.menu[data-glide] .menu-item[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.menu-item:is([disabled],[aria-disabled=true]){color:GrayText}.menu-item[data-highlighted]{forced-color-adjust:none;color:HighlightText}.menu-item[data-highlighted]:before{background-color:Highlight}.menu-item[data-highlighted] :is(svg,.menu-item-label,.menu-item-description,.menu-check){color:HighlightText}.menu-item[data-highlighted] .kbd{background:Highlight;border-color:HighlightText;color:HighlightText}.menu-item[data-danger][data-highlighted]{color:HighlightText}.menu-radio-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}}}
+@layer basalt{.menu{min-width:var(--basalt-size-menu-min);max-height:var(--available-height, 100vh);overflow-y:auto;padding:var(--basalt-space-0-5) var(--basalt-space-1)}.menu-item{--_h: var(--basalt-size-menu-row);--_inset: var(--basalt-space-0-5);--_gap: var(--basalt-space-2-5);box-sizing:border-box;position:relative;isolation:isolate;display:flex;align-items:center;gap:var(--_gap);width:100%;height:calc(var(--_h) + 2 * var(--_inset));margin:0;padding:0 var(--basalt-space-3);border:0;border-radius:0;background:transparent;color:var(--basalt-text-secondary);font:var(--basalt-font-weight-regular) var(--bh-base);text-align:start;text-decoration:none;cursor:default;user-select:none;outline:none;transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item:before{content:"";position:absolute;inset:var(--_inset) 0;z-index:-1;border-radius:var(--basalt-radius-md);background-color:transparent;transition:background-color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item svg{flex:none}.menu-item-label{flex:1;min-width:0}.menu-item .kbd-group{margin-inline-start:var(--basalt-space-4)}.menu-item[data-highlighted]{color:var(--basalt-text-primary);transition-duration:var(--basalt-duration-instant)}.menu-item[data-highlighted]:before{background-color:var(--panel-plate);transition-duration:var(--basalt-duration-instant)}.menu-item[data-danger],.menu-item[data-danger][data-highlighted]{color:var(--basalt-status-danger)}.menu-item:is([disabled],[aria-disabled=true]){color:var(--basalt-text-disabled)}.menu-check{display:inline-flex;align-items:center;justify-content:center;width:var(--basalt-size-icon-sm);flex:none;color:var(--basalt-text-primary)}.menu-check>*{visibility:hidden}[aria-checked=true]>.menu-check>*{visibility:visible}.menu-radio-dot{display:block;width:var(--basalt-space-1-5);height:var(--basalt-space-1-5);border-radius:var(--basalt-radius-full);background:currentColor}.menu-item:has(>.menu-item-description){--_line: var(--basalt-text-base-line-height);--_desc: var(--basalt-text-sm-line-height);display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:var(--_line) auto;align-items:center;align-content:center;gap:0;height:auto;min-height:calc(var(--_h) + var(--_desc) + 2 * var(--_inset));padding-block:calc(var(--_inset) + (var(--_h) - var(--_line)) / 2)}.menu-item:has(>.menu-item-description)>:is(svg,.menu-check){grid-column:1;grid-row:1;margin-inline-end:var(--_gap)}.menu-item:has(>.menu-item-description)>.menu-item-label{grid-column:2;grid-row:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item:has(>.menu-item-description)>.menu-item-description{grid-column:2 / -1;grid-row:2}.menu-item:has(>.menu-item-description)>.kbd-group{grid-column:3;grid-row:1}.menu-item-description{min-width:0;white-space:normal;overflow-wrap:break-word;text-wrap:pretty;font-size:var(--basalt-text-sm-size);line-height:var(--basalt-text-sm-line-height);color:var(--basalt-text-tertiary);transition:color var(--basalt-duration-fast) var(--basalt-ease-out)}.menu-item[data-highlighted] .menu-item-description{color:var(--basalt-text-secondary);transition-duration:var(--basalt-duration-instant)}.menu-item:is([disabled],[aria-disabled=true]) .menu-item-description{color:var(--basalt-text-disabled)}.menu:has(.menu-item-description){width:max-content;max-width:min(var(--basalt-size-popover-max),calc(100vw - 2 * var(--basalt-space-4)))}@media(pointer:coarse){.menu-item{height:max(calc(var(--_h) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}.menu-item:has(>.menu-item-description){height:auto;min-height:max(calc(var(--_h) + var(--_desc) + 2 * var(--_inset)),var(--basalt-size-menu-row-touch))}}.menu-separator{height:var(--basalt-size-hairline);margin:var(--basalt-space-0-5) calc(-1 * var(--basalt-space-1));background:var(--basalt-border-divider)}.menu-group-label{padding:var(--basalt-space-2) var(--basalt-space-3) var(--basalt-space-0-5);font:var(--basalt-font-weight-medium) var(--bh-xs);color:var(--basalt-text-tertiary)}@media(prefers-reduced-motion:no-preference)and (forced-colors:none)and (hover:hover)and (pointer:fine){.menu[data-glide] .menu-item[data-highlighted]:before{background-color:transparent}}@media(forced-colors:active){.menu-item:is([disabled],[aria-disabled=true]){color:GrayText}.menu-item[data-highlighted]{forced-color-adjust:none;color:HighlightText}.menu-item[data-highlighted]:before{background-color:Highlight}.menu-item[data-highlighted] :is(svg,.menu-item-label,.menu-item-description,.menu-check){color:HighlightText}.menu-item[data-highlighted] .kbd{background:Highlight;border-color:HighlightText;color:HighlightText}.menu-item[data-danger][data-highlighted]{color:HighlightText}.menu-radio-dot{box-sizing:border-box;border:calc(var(--basalt-size-dot) / 2) solid;background:none}}}
diff --git a/.agent/skills/basalt-html/parts/usage/menu.md b/.agent/skills/basalt-html/parts/usage/menu.md
index 43a779c0..76874ade 100644
--- a/.agent/skills/basalt-html/parts/usage/menu.md
+++ b/.agent/skills/basalt-html/parts/usage/menu.md
@@ -19,6 +19,6 @@ A popup of actions: the opener is a `popovertarget` button, the menu comes right
- Every row is a `button.menu-item` with its role (`menuitem`, `menuitemcheckbox`, `menuitemradio`); a radio sits in a `role="group"` with its siblings. The script adds the check seat; a click flips `aria-checked` (a radio picks one) and fires `menuchange` on the row, then leaves the menu open. A plain item closes the menu: listen for its `click`.
- Arrow keys, Home, End and typing a name move the lit row; opened by a key the first row is lit. Tab closes.
-- `.menu-item-description` is a second line, only when the label alone can't tell choices apart; it makes the row two lines and the menu as wide as its text.
+- `.menu-item-description` is a second line, only when the label alone can't tell choices apart; the menu is as wide as its text up to 320, and a longer description wraps (the row grows; the label stays one line).
- A shortcut is a real one the page binds: `` last in the row, and `aria-keyshortcuts="Meta+D"` on the row. At most one per row.
- `data-danger` is red text, never a fill.
diff --git a/docs/foundations.md b/docs/foundations.md
index 245538e5..083cf397 100644
--- a/docs/foundations.md
+++ b/docs/foundations.md
@@ -150,7 +150,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer
items are focusable rows: their ring goes around the hugging pill (see [Navigation](#navigation)). So are the
notification centre's entries: links or buttons, which join the hover glide on navigation's rules (below), and the disclosure row (see [The conversation stream](#the-conversation-stream)). Otherwise Basalt ships none:
the rows of Menu, Select, Combobox and CommandMenu are options and show the plate, breadcrumbs and pagination are
- inline, and a settings or list row is the app's own markup. The accordion trigger is the one full-width band that is
+ inline, a `PanelList` row is a band that is itself the link or button (the flush −2 inset; see [Lists and facts](#lists-and-facts)), and any other settings or list row is the app's own markup. The accordion trigger is the one full-width band that is
itself a button; it keeps the ring it was built with
and is open for the panel.
- **Hover and selected:** washes of 6% and 9% white, or 4% and 7% black, so they work on any
@@ -235,6 +235,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer
box that is mixed while some rows are selected), and the count ("3 of 12 selected") is written in a polite live
region by the app. Basalt ships no helper for the column or the count: the column is the app's own markup on
`Table`, `TableCell` and `Checkbox`, given a first column `size-control-md` wide, and the row takes `selected`.
+ Outside a table the same selection is `SelectableList` (see [Lists and facts](#lists-and-facts)), which draws the boxes, the all box and the count.
Do not mark selection with a vertical line.
- **The still table** (the owner's rule, decision 71: header positions, column widths and alignment never move, through
sort, filter, paging or loading). `Table` takes `columns` and is then `table-layout: fixed` from a `colgroup`: every
@@ -500,12 +501,14 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer
(its dividers then stay inside the card's padding). The label column is a fixed 160px (`size-description-label`), never
sized to its longest label, so every list on a page shares one value edge; a long label wraps inside it. The list is
its own container and stacks, label over value `space-0-5` apart, when its own width is under 480px (30rem), whatever
- the viewport. The label is 13/18 at 400 in secondary ink on the value's baseline; the value is 14/20 at 400 in primary
+ the viewport; with `narrow="line"` it keeps each label and value on one row there instead, the label column at 80px (see
+ [Lists and facts](#lists-and-facts)). The label is 13/18 at 400 in secondary ink on the value's baseline; the value is 14/20 at 400 in primary
ink with tabular numerals, start-aligned. Mono is for identifiers only (a `mono` option), at 13px on the 20px line.
Rows take `space-2-5` above and below, so a one-line row is 40px, with a `border-divider` between rows (drawn inside
the row, as the table's is), never above the first or below the last; the first and last rows lose their outer
padding. Several values in one row stack `space-1` apart. A missing value says "Not observed" in tertiary ink, with no
- mark, as a table cell does (decision 95). The gap between the label column and the value is `space-4`.
+ mark, as a table cell does (decision 95); a value that is absent rather than unmeasured says so in the app's words, in the
+ same ink (see [Lists and facts](#lists-and-facts)). The gap between the label column and the value is `space-4`.
- **Meter** (`Meter`, on Base UI's Meter): how much of a cap is used, and not `Progress` (a task finishing). The head has
the label at the start (13/18 at 500, primary) and the reading at the end: the value in primary at 500 with tabular
numerals, then "of" with the cap and its unit in secondary ("1,240 of 2,000 min"), reserving the width of the cap
@@ -551,7 +554,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer
live transcript is `role="log"` only while lines arrive, never idle, paused or finished; it has a fixed height of nine
lines that scrolls inside, so arriving lines never move the page, and follows new lines only while the reader is at
the end. A replay has a pause control, and every word that changes in place in the head reserves its widest form.
- Long lines scroll sideways, as `CodeBlock`'s do. (Decision 98.) The gutter is one column for the whole block, `CodeBlock`'s
+ Long lines scroll sideways, as `CodeBlock`'s do unless it is given `wrap` (see [Lists and facts](#lists-and-facts)). (Decision 98.) The gutter is one column for the whole block, `CodeBlock`'s
too: the prompt's width plus 1ch, at least 24px, measured by the browser and never counted in characters, so `$` is exactly
24px and a longer prompt ("PS>") or a wide glyph widens the column for every line and the text of every line starts on one
edge. The terminal is the container for its own head: under 30rem of its own width (not the viewport's) the copy button is
@@ -614,7 +617,9 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer
the wider seat on whole pixels (1 + 6 + 2 at 20, 3 + 6 + 3 at 24). The 20 cell (9 by 15) sits in a
9 by 16 box, one hairline below, so it lands on whole pixels in any even line. A plain `Badge`
takes the size and sets the seat and the gap, and a braille `Spinner` inside it takes the same
- size. The toast's 16px mark seat is unchanged. Status: decided by the council (DECISIONS 99); the
+ size. A plain `Badge` sets no font size of its own: it is a word in its line (a cell, a row, a heading) and takes that line's size, which is what lets
+ its `size` follow the word's cap height. So an app sets its base type on its root (`font: text-base` on `body`), as it sets the page's colour, and a
+ plain badge outside a component is never the browser's 16px (cimip-gaps-2, B6: kept by design). The toast's 16px mark seat is unchanged. Status: decided by the council (DECISIONS 99); the
implementation hasn't been reviewed. `LoopsToggle` and the ambient loop: decided by the council (DECISIONS 136) and approved by the
owner (DECISIONS 139); the implementation hasn't been reviewed.
- **A control that asks the server is busy until the answer, and never sends twice** (DECISIONS 255, 260). Every button waits for its own
@@ -1071,7 +1076,11 @@ The padding is the one-line row's, so a two-line plate is the one-line plate plu
and secondary when lit (in light tertiary on the plate falls under 4.5:1; in dark the step is kept as a rule, DECISIONS 166), with no weight change; compact is 13/18 over 12/16. The 20 and 18
line boxes touch, with no gap.
- **Where things sit.** The glyph, a check seat, a key chip and a time sit on the title line, centred on it; the description runs from the
- text's edge to the row's end, under the chip's column too. Both lines truncate with an ellipsis and never wrap, so a row's height is known.
+ text's edge to the row's end, under the chip's column too. The title is one line and truncates with an ellipsis. In Select, Combobox and the command menu
+ and list the description truncates too and never wraps, so a row's height is known. **In a Menu the description wraps** (DECISIONS 275, the owner's option B, from
+ the pictures in round 56): the menu stays at most `size-popover-max` (320) wide, a description longer than that wraps inside it, and the row grows by the
+ description's line (18) for each line it takes. The row's own plate covers the whole taller row, the shared plate takes each row's own height as it glides
+ (as between a one-line and a two-line row), and the title line keeps its glyph, check and chip.
- **Mixed lists.** One-line and two-line rows may share a list, each its own height, and the shared plate changes height as it glides.
A row with no description is one line: it holds no empty second line.
- **Danger.** The title and the glyph take the danger ink; the description keeps its own.
@@ -1079,7 +1088,7 @@ The padding is the one-line row's, so a two-line plate is the one-line plate plu
- **Search.** Descriptions are search keywords, ranked below title matches. There is no match highlighting: bold letters change widths as you type.
- **Where to use it.** Freely in the command menu and the list. In Menu and Select, describe a choice only when the label alone can't tell the
choices apart (a visibility, a role, a plan, a model), never to explain an obvious action ("Copy link" stays one line). A described
- menu is as wide as its content, up to `size-popover-max` (320), and then descriptions truncate.
+ menu is as wide as its content, up to `size-popover-max` (320), and then a Menu's descriptions wrap (Select's and Combobox's truncate).
### Overlays and search
@@ -2195,6 +2204,57 @@ every page, every sort), the band, Previous, Next, the count's seat, the page si
(`packages/react/test/lists-modals.test.mjs`). Not checked: a real phone (on iOS the held foot sits under the keyboard while typing, as in any web form), WebKit, Firefox, a screen reader and a
Windows contrast theme.
+## Lists and facts
+
+**Status.** Gaps found by building CIMIP on Basalt (cimip-gaps-2, batch B6), decided and built by Opus on the no-council path (DECISIONS 226 and 265); Astra reviews the
+code and the lead checks the pixels (both done; the menu rows' wrap is the owner's pick, DECISIONS 275). Every part is general and is shown in the review round (62) in at least two unlike
+domains. React's alone (see [What the HTML skill does not draw](#what-the-html-skill-does-not-draw)).
+
+- **A panel of rows** (`PanelList`, `PanelRow`). Rows of one list in one panel: the panel's level (one above what it sits in, 3 at most), its one rim, radius 12 (a card's),
+ and a `border-divider` between rows, never above the first or below the last. Each row is a link (with `href`) or a button across the whole band. It is not a form of
+ `DirectoryList`: the directory is a site's ruled list on the page, rimless, with no wash, three fixed columns and an arrow; a panel of rows is an app's list of things to
+ open, where the band is the target. A row is a title (primary, 500, `text-base`), an optional description (secondary, `text-sm`), a leading seat centred on the title's line
+ (a plain `Badge`, an `Avatar`, an icon), a trailing value on the title's line (secondary, `text-sm`, tabular, never cut) and anything the app adds under the description.
+ The title and the description are one line each, cut with an ellipsis, so a row's height is known; the whole text is still read. Padding `space-3` by `space-4`; at least
+ 44 tall on a coarse pointer. **Hover** is the hover wash, full bleed, and lifts no ink; a **press** steps to the selected wash; **focus** is the 2px ring inside at −2, because
+ the band is flush with the panel's clipping edge, and the first and last rows take the panel's inner corner (12 less the rim, 11) so the ring follows it. A row that opens a
+ new tab draws the new-tab arrow after its title and says so. Name the list (`aria-label`, or `aria-labelledby` on its heading).
+- **A list to choose several from, outside a table** (`SelectableList`, `SelectableItem`, `SelectionBar`). The table's selection (see Selected rows), for a list: a chosen
+ row is the selected wash as a band and its checked box carries the state, and rows are divided by `border-divider` as a table's are. The row is its checkbox's label, so a
+ press anywhere on it chooses it; focus is the box's own ring at +2, inside the row's padding (`space-2-5` by `space-3`), as a band that holds its own control focuses that
+ control. The **bar** holds the all box (checked when every row is chosen, mixed while some are, disabled when none can be; its words are the app's, "Select all" by
+ default), the count in words in a polite `role="status"` line ("2 of 8 selected" by default, or the app's own noun) whose room is held for the widest of its wordings for none, one, all but one and all (or the app's `widest`), and the actions
+ at the end, which stay mounted and are `aria-disabled` at zero so focus stays. It sticks to its edge of the scroller (`barSide`: above the rows, or under them for a list at
+ a sheet's foot), opaque in its surface's colour on a `border-divider` (it is not the smoked surface), and is static in print. The app owns the data: `values` lists what can
+ be chosen now, and a row whose value has left it (one dealt with) keeps its place and its box with an empty check seat, so nothing moves under a pointer, and it is no longer
+ counted. A row that leaves, or is dealt with, while its box holds focus hands focus to the next row that can still be chosen (else the one before, else the all box),
+ so focus is never lost to the page. A chosen row keeps the selected wash under the pointer: hover is for rows that are not chosen. The value is always in the list's order.
+- **Entries outside the notification centre** are B7's `NotificationList` (the centre's rows in the page, with no head, a current entry and a name), not a part of this batch.
+- **One-line facts in a narrow column** (`DescriptionList narrow="line"`). Under 480 of its own width a list stacks by default, which doubles a narrow column's height. With
+ `narrow="line"` each label and value stay on one row there, and the label column narrows to `size-field-label-inline` (80px, the inline field label's width, so no token is
+ made); the gap stays `space-4`, a long label wraps inside its column, and several values (`values`, a name then a line then an action) stack in the value column `space-1`
+ apart, as from 480. From 480 it is the list as it ships. The default stays `stack`, so no shipped list changes.
+- **Missing-value words.** "Not observed" is for a reading that could have been taken and was not (a measurement, a sensor, a coverage figure): it stays the default of
+ `DescriptionItem missing` and `TableCell notObserved`. Anything else that has no value says what is absent, in the app's words, as the children of the same prop (or a `DescriptionItem`'s `values`; whatever the caller supplies is what the row says, and "Not observed" is only the default): "None yet",
+ "No one", "No email", "No issue linked", in sentence case, naming the thing where the label does not. It is the same tertiary ink with no mark, and never blank, a dash or a
+ zero (a zero is a value). The words belong to the product: Basalt has no second default.
+- **Code that wraps** (`CodeBlock wrap`). An opt-in for a command that must be read whole in a narrow column (one a reader is asked to approve). Each run of characters
+ between spaces is drawn as one word that never breaks inside, and the spaces stand between the words, so a line breaks at a space and nowhere else: never after a hyphen, a
+ slash or a dot, where a browser's own wrap would break a flag or a path. A word longer than the line is not broken: the block scrolls sideways for it, as an unwrapped block
+ does. With no prompt each source line is a row whose continuation is indented 2ch (an empty line keeps its 20px), so a wrapped line never reads as a new one; beside a
+ prompt the gutter already marks where a line starts and the continuation starts at the text's edge. Copy takes the code as given. The default still scrolls.
+- **A select at its own width** (`Select toolbar`). In a toolbar row a `Select` is as wide as its widest label, not its container's width: every option and the placeholder
+ stand unseen in the value's one cell (as `MultiSelect toolbar` does), so a choice moves nothing after it, and two selects and a search share a row. With a `valuePrefix` the label leads and the seat follows it, holding the
+ same width. In a column narrower than that it fills the column and cuts the value with an ellipsis; in `FilterToolbar` under 720 it fills its column, as the filters' triggers do. `numeric` stays the form for numbers.
+- **What sits between a form dialog's description and its first field.** A spacing rule, not a slot: the body's blocks after the description are one stack at the form gap
+ (`space-4`), so a block between the description and the first field (a row of ready answers, a callout, a sentence) sits `space-4` above the field's label, as one field
+ sits above the next, and the description keeps its own `space-5` under it (the two margins collapse). The body already takes any children; a slot would only fix their order.
+ A group of ready answers is named by the app.
+- **Described menu rows longer than 320** wrap (DECISIONS 275: the owner picked option B of three pictured in round 56). A Menu stays at most `size-popover-max` (320)
+ wide; a described row's description wraps and the row grows; the title stays one line. Menus only: Select, Combobox and the command menu keep the cut. React and the
+ HTML skill's `menu` module both draw it; see [Two-line rows](#two-line-rows).
+- **A plain `Badge`'s size** is kept by design (see the status marks under [Lines, states and actions](#lines-states-and-actions)).
+
## The conversation stream
**Status.** Decided and built by Opus on the no-council path (DECISIONS 226 and 265); the implementation is reviewed by Astra and the pixels by the
@@ -2330,7 +2390,7 @@ as if it were known, which Basalt can't detect.
## What the HTML skill does not draw
-The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). React's alone too: `Composer`, `Mention` and `MentionPicker` (cimip-gaps-2, B3; see [Writing to someone](#writing-to-someone-the-composer-the-mention-and-the-picker)). So are the conversation stream's parts (`Stream` and its entries, `StreamQuote`, the arrived mark, `DisclosureRow`, `ActivityList` and `Presence`; round 56, a follow-up batch). React's alone as well: `NotificationList` (the center's page form), a group's reveal track (the skill's group opens at once), and the search over a server (`SearchField`, `SearchPassages`, `SearchPassage`, `markMatches`); the skill's `notifications` module draws the pending ring and groups (cimip-gaps-2, B7). The app shell's gaps (cimip-gaps-2, B4) are in the skill: `data-capped` on `.app-shell` (the `app-shell` module, cap 4,300 from 3,250, the skip link on the brand's start edge included), `.app-heading` and `.app-facts` under the title, the primary kept under 720, `data-size="sm"` on a `.nav` (the `nav` module, cap 5,350 from 4,800), and the `pane` module (`.pane-layout`, cap 1,700), whose script makes an overflowing pane a tab stop, including when its content arrives or grows after the page. Whether the skill gets the links and the charts is not decided.
+The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). React's alone too: `Composer`, `Mention` and `MentionPicker` (cimip-gaps-2, B3; see [Writing to someone](#writing-to-someone-the-composer-the-mention-and-the-picker)). So are the conversation stream's parts (`Stream` and its entries, `StreamQuote`, the arrived mark, `DisclosureRow`, `ActivityList` and `Presence`; round 56, a follow-up batch). React's alone as well: `NotificationList` (the center's page form), a group's reveal track (the skill's group opens at once), and the search over a server (`SearchField`, `SearchPassages`, `SearchPassage`, `markMatches`); the skill's `notifications` module draws the pending ring and groups (cimip-gaps-2, B7). The app shell's gaps (cimip-gaps-2, B4) are in the skill: `data-capped` on `.app-shell` (the `app-shell` module, cap 4,300 from 3,250, the skip link on the brand's start edge included), `.app-heading` and `.app-facts` under the title, the primary kept under 720, `data-size="sm"` on a `.nav` (the `nav` module, cap 5,350 from 4,800), and the `pane` module (`.pane-layout`, cap 1,700), whose script makes an overflowing pane a tab stop, including when its content arrives or grows after the page. React's alone too: the parts of [Lists and facts](#lists-and-facts) (`PanelList`, `SelectableList`, `DescriptionList narrow`, `CodeBlock wrap`, `Select toolbar` and the form dialog body's stack); a later batch may bring them to the skill. Whether the skill gets the links and the charts is not decided.
## Logs, status and forms
diff --git a/packages/react/README.md b/packages/react/README.md
index ecd82bf3..29ed6fc7 100644
--- a/packages/react/README.md
+++ b/packages/react/README.md
@@ -135,7 +135,7 @@ only where `prefers-reduced-transparency` is evaluated (Chromium 118 and later);
| `BadgePair` | A name with at most two badges: the `status` first, then one neutral `fact`. When the name and the pair don't fit on one line the pair moves under the name as a unit; a badge never truncates. |
| `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter` | `CardTitle` is an `h3`; give it `level` (2 to 6) to put the card in the page's outline where it belongs. The size and weight stay the same at every level. |
| `ChoiceCard`, `ChoiceCardGroup` | A card you can choose: a native radio (or, with `multiple`, a checkbox) wearing a card, with `title`, `description` and `children`; the whole card is the label and the choice box sits in a seat reserved on every card, so choosing moves no title. Put the cards of one choice in a `ChoiceCardGroup` and name it (`aria-label` or `aria-labelledby`). |
-| `DescriptionList`, `DescriptionItem` | Facts about one thing as a `dl`: each `DescriptionItem` has a `term` and its `children` (or `values` for several `dd`s); `mono` for identifiers; `missing` keeps the label and says "Not observed". The label column is fixed and the list stacks under 480px of its own width. |
+| `DescriptionList`, `DescriptionItem` | Facts about one thing as a `dl`: each `DescriptionItem` has a `term` and its `children` (or `values` for several `dd`s); `mono` for identifiers; `missing` keeps the label and says "Not observed" (a reading not taken), or the app's own words given as its children ("None yet", "No one") for a value that is absent. The label column is fixed and the list stacks under 480px of its own width; `narrow="line"` keeps each label and value on one row there, the label column at 80px. |
| `Stats`, `Stat`, `formatStatTime` | A row of figures, never boxed (`Stats`, one `dl`; `min` is the narrowest a stat gets before the row wraps): each `Stat` has a `label`, a `value`, a `note` and a `source` with its `time`. `formatStatTime(time, { now, timeZone, locale })` writes the time as the stat does, in the locale's hour (`en-US` by default: "4:41 AM", "Nov 7, 8:02 AM"). |
| `TableContainer`, `Table`, `TableHeader`, `TableBody`, `TableRow`, `TableHead`, `TableCell` | `numeric` cells use tabular numerals, end-aligned with their header; `mono` cells for IDs and hashes. Give `TableContainer` a `label` ("Runs table"): while the table is wider than its box the container is a keyboard stop with that name as a `region`, so the hidden columns can be scrolled to without a pointer (an `aria-label` or `aria-labelledby` works too; with none of the three the stop is named by the table's `caption`, and with no caption "Scrollable table"). On touch a lone checkbox or link in a cell has a 44px hit box. In a still table (`columns`) a cell whose text is cut by the ellipsis is a focus stop (`data-cut`, `tabindex="0"`), and on hover or focus its whole value opens in place on a level-3 plate (Esc closes it; it is `aria-hidden`, the cell holds the value); each cut cell is one added tab stop. Size a column of one fixed form (a date, a time, a status) for its longest form under WCAG 1.4.12 spacing, so only free text is cut, and size a header's label to fit its column under the same spacing: a cut sortable header opens no plate (the sort button is the whole cell and its name holds the label), a plain header does. A sortable `TableHead` (`onSortChange`) asks for the first direction, then the reverse, then `undefined`: the table's own order, with no column lit. Sort with `sortRows(rows, value, direction)` from the order the rows loaded in, every time, so ties keep it and the third press gives it back row for row. `TableHeadExplainer`, given to a sortable header as `explainer` (a `title`, one to three sentences and at most one link), says what a column a reader could misread means: it opens from the header on hover after 600ms, on keyboard focus and on a long press on touch, above the header or beside it and never over its column; a press still sorts. A `Table` renders every row it is given (see [Long lists](#long-lists)): page one that can pass a few hundred rows with `Pagination`. |
| `TableEmpty`, `TableScrollHint` | `TableEmpty` is the row a table shows when no row matches: one cell across `colSpan` columns, under the unchanged header, with a sentence (`children`) and an `action` that names what hid the rows: a search alone gets a sentence that names the term (`No runs match “zzq”.`) and "Clear search"; a chosen filter gets "Clear filters", and in the mixed case "Clear filters" clears the search too. `TableScrollHint` is one line right after a `TableContainer` that is wider than its box ("Scroll sideways to see all 6 columns", `label` sets the words); it shows only while the table overflows, is `aria-hidden` and never changes while the table scrolls. |
@@ -143,7 +143,7 @@ only where `prefers-reduced-transparency` is evaluated (Chromium 118 and later);
| `Tooltip`, `TooltipProvider` | Supplements a name with a linked accessible description; never replaces a label. |
| `Checkbox`, `Switch` | The label is `children`. A switch takes effect immediately; a checkbox on submit. `Switch` takes a `description`: a line under its row in a `Field` description's style, at the column's start edge (not indented past the switch), linked with `aria-describedby` (DECISIONS 242). |
| `RadioGroup`, `Radio` | A few options, all visible; arrow keys move the choice. |
-| `Select` | `options` of `{ value, label, disabled? }`; labelled by its `Field`. `numeric` makes a Select of numbers (a page size) as wide as its widest option, below `size-select-min`, whatever is chosen. |
+| `Select` | `options` of `{ value, label, disabled? }`; labelled by its `Field`. `numeric` makes a Select of numbers (a page size) as wide as its widest option, below `size-select-min`, whatever is chosen. `toolbar` makes any Select as wide as its widest label instead of its container, so selects share a toolbar row and a choice moves nothing after it; in a narrower column it fills the column and cuts the value. |
| `ToastProvider`, `useToast` | `useToast().show({ title, description?, status?, action?, home?, group?, running? })`, then `update(id, patch)`, `close(id)` or `promise(work, { running, success, error })`. A toast stays until dismissed unless it names a `home` for what it says (`"centre"`, `"row"`, `"key"` or `"page"`; an action needs one that is not the page), and then it closes after 5s. Level 1, three deep, danger announced assertively. A toast with an `action` is announced with one more sentence: "Undo is available. Press F6 to reach it." (F6 moves to the stack's named region, where the action is a stop.) Pass `actionWords={(label) => string}` to `ToastProvider` to say it in another language or other words; a toast with no action says nothing extra. Nothing extra is drawn, and it is said once. |
| `NotificationCenter` (alias `NotificationCentre`) | The durable copy a toast points to: a bell button with a dot (count in its name) opening a popover of `entries` (`{ id, title, description?, time, dateTime?, status?, unread?, href?, current?, entries?, count? }`), "Mark all as read", "View all" and, with `onClearAll`, "Clear all" at the footer's start. `status` is `success`, `warning`, `danger` or `pending` (waiting: the empty ring, no colour). An entry with `entries` is a group: its row shows the title, "×N" (`count`, default `entries.length`) and a chevron, and opens in place to them. Presentational: you own the entries, the grouping, their read state and the page. |
| `NotificationList` | The center's entries in the page: your notifications page (what "View all" opens) and, on a phone, the tab bar's destination (`TabBarItem` with `NotificationsGlyph` and its `dot`). A head band with the count and "Mark all as read" (`head={false}` drops it, for a list in a sidebar), the list named by `label` or `aria-labelledby`, `empty`. No popover, title, rim or glide. `current` on an entry is `aria-current` and its title at 600. `onClearAll` adds a foot with "Clear all" at its start. |
@@ -161,7 +161,7 @@ only where `prefers-reduced-transparency` is evaluated (Chromium 118 and later);
| `Spinner`, `Skeleton`, `NumberTicker` | Loading and rolling tabular digits. Spinner variants: `ring` (default) and `braille`. `glide` eases a ticker toward its value over `slow`. Under reduced motion and in forced colours the strips are hidden, the number is plain tabular text in the sentence's own line, and a new value changes in place; the system then paints one selection band and its selected-text colour on the digits. A ticker is an inline box, so in a stretched flex row its digits sit where a plain-text sibling's text sits, not on the bottom of the row as they used to (the sparkline's own headline keeps its place). |
| `Slide`, `useGlide`, `useReducedMotion`, `useSlideDirection` | Motion helpers. `Slide` wraps a tab or segment panel so a change slides it in (or fades it under reduced motion) without re-keying it, so a field inside keeps its value and focus; `useSlideDirection(value, order)` says which way a value moved through an ordered list (`""` until the first change). `useGlide(target)` eases a number toward `target` over `slow` (give a screen reader `target`, not the in-between value). `useReducedMotion()` is true after mount when the reader asked for reduced motion. |
| `MorphIcon`, `TextMorph`, `Sparkline`, `Stepper`, `LivePreview`, `TravelSpinner` | Motion primitives. `Sparkline` is a line and its latest value, not a charting component. See [docs/motion.md](../../docs/motion.md). `TextMorph`'s `label` is what a screen reader hears when `text` changes, if that should say more than the glyphs show; nothing extra is drawn. `Stepper` is a `group` named "Steps" (`label` sets the name), and the step's name is read with where the user is: "Step 2 of 3: Review", once, when it changes. `positionLabel={(step, total) => string}` sets those words for another language. |
-| `CodeBlock` | `code`, optional `language`, `title`, `copyable`. Language-aware syntax; exact-text copying and keyboard scrolling. Each language loads on first use: plain text first, colour moments later. For highlighted server-rendered HTML, `await preloadCodeLanguages(["ts", "bash"])` before rendering. |
+| `CodeBlock` | `code`, optional `language`, `title`, `copyable`, `prompt`, and `wrap` (break long lines at spaces only, each run between spaces kept whole; a continuation indented 2ch; a word longer than the line still scrolls). Language-aware syntax; exact-text copying and keyboard scrolling. Each language loads on first use: plain text first, colour moments later. For highlighted server-rendered HTML, `await preloadCodeLanguages(["ts", "bash"])` before rendering. |
| `Accordion`, `AccordionItem` | Secondary detail; keyboard operated, with coordinated panel and caret motion. An item's header is an `h3`; `headingLevel` (2 to 6) sets its level in the page's outline, and it draws the same at every level. |
| `Toolbar`, `ToolbarButton`, `ToolbarIconButton`, `ToolbarLink`, `ToolbarInput`, `ToolbarGroup`, `ToolbarSeparator` | One tab stop for a row (or column) of controls, as the WAI-ARIA toolbar pattern describes: the arrow keys along its `orientation` move between the controls and wrap (`loopFocus={false}` stops at the ends), Home and End go to the first and last, and in a right-to-left page the arrows follow the page. See [Toolbar](#toolbar). |
| The core glyphs | `HomeGlyph` and `ArrowDownGlyph`, `ArrowLeftGlyph`, `ArrowRightGlyph`, `ArrowUpGlyph`, `CalendarGlyph`, `CheckGlyph`, `ChevronDownGlyph`, `ChevronLeftGlyph`, `ChevronRightGlyph`, `ChevronUpGlyph`, `CloseGlyph`, `CopyGlyph`, `DownloadGlyph`, `EditGlyph`, `ExternalGlyph`, `HistoryGlyph`, `MenuGlyph`, `MessagesGlyph`, `MinusGlyph`, `MoreGlyph`, `MoreNavGlyph`, `NotificationsGlyph`, `PauseGlyph`, `PlanGlyph`, `PlayGlyph`, `PlusGlyph`, `PolicyGlyph`, `ProfileGlyph`, `RecordsGlyph`, `RoutesGlyph`, `RunsGlyph`, `SandboxesGlyph`, `SearchGlyph`, `SettingsGlyph`, `SourcesGlyph`, `TrashGlyph`, `TrendsGlyph`: one module each, drawn by `Icon` (next row) or passed to any `icon` prop. |
@@ -260,6 +260,8 @@ None of these changes how anything looks: each is an option Base UI already had,
| `AppTile` | The picture an app gives it (`src`), clipped to a superellipse of exponent 5 (no radius) with a 1px `border-hairline` that follows it (DECISIONS 162, votes 5 and 6). `size` is 20, 32, 36, 40, 44, 48 or 52; left out it is as wide as its box, square. Decorative (`aria-hidden`), always beside the company's name; flat (no shadow); not drawn in forced colours. Each tile carries its own clip. Basalt ships no company's icon file: the product gives one it has the right to show. |
| `PeriodStepper` | Two icon buttons round a label that says which stretch of time is shown (DECISIONS 162, D19b): `label`, `spokenPrefix`, `previousLabel`, `nextLabel`, `onPrevious`, `onNext`. `atStart` and `atEnd` stop a button and keep its focus (`aria-disabled`); `whole` hides both and keeps their room, for the view with no periods. The core chevrons, ghost, 32px; the label is 500, tabular, in a seat of at least 128px. The label is spoken once, after it holds still for `delay` ms (400), with the prefix. Under 640px of the app's container (`container-type: inline-size`, in a bar that wraps) it takes its own row, 52px tall with a hairline above and 44 by 44 buttons. Not `Stepper` (a short flow) and not `Pagination`. |
| `ListBand` | The count, the pager and the page size of a list, as one band above it (DECISIONS 222): `total`, `maxTotal`, `page`, `pageSize`, `pageSizes` (10, 25, 50, 100), `onPageChange`, `onPageSizeChange`, `noun` ("Incidents": it names the select, "Incidents per page", and is said in the announcement), `sizeLabel` ("per page"). The count ("1–25 of 214") sits at the start in a seat as wide as its widest form, the `Pagination` in the centre, the page size at the end. From 720 it is sticky under the app's bar, opaque, with a divider only while stuck; a page or size change while stuck returns the window to where the band rests. A new size keeps the reader's first row in view (it calls `onPageChange` after `onPageSizeChange`). A page or size change is spoken once after 400ms by the band's own polite line; a change of `total` clears it. Under 640px of its width (720 on a coarse pointer) the numbers go, and the page size follows the pager or, where the two do not fit together, is the end of a second row. The app owns the rows, the page and the filters, and returns to page 1 on a search, a filter or a sort. `children` is the list itself: it follows the band and its Back to top and is followed by the foot. Under 720, with more than one page, the band's Previous, count and Next are drawn again centred under the list (the foot, named by `footLabel`): a press changes the page, returns the window to where the band rests and moves focus to the band's own arrow. `heading` (an id or a ref) is what Back to top focuses; `backToTop={false}` leaves it out. |
+| `PanelList`, `PanelRow` | Rows of one list in one panel (its level, one rim, radius 12, a divider between rows). A `PanelRow` is a link (`href`) or a button across its whole band: `title` (500, one line, cut), `description` (secondary, one line, cut), `leading` (a seat on the title's line: a plain `Badge`, an `Avatar`), `trailing` (a time or count, never cut) and children under the description. Hover is the wash, full bleed; focus is the ring inside at −2, following the panel's corner on the end rows. Name the list with `aria-label` or `aria-labelledby`. Not `DirectoryList`, which is a site's rimless list on the page. |
+| `SelectableList`, `SelectableItem`, `SelectionBar` | Several to choose from, outside a table. `SelectableList` takes `label`, `values` (what can be chosen now, in order), `value`/`defaultValue`/`onValueChange`, a `bar` and `barSide` (`top` or `bottom`). A `SelectableItem` (`value`, optional `label` for the box's name) is its checkbox's label, so the whole row is the target; chosen, it is the selected wash. A row whose value leaves `values` keeps its place with an empty seat. `SelectionBar` holds the all box (`allLabel`, mixed while some are chosen), the count in words (`count(chosen, total)`, "2 of 8 selected" by default; its room is held for the widest of its wordings for none, one, all but one and all, or for `widest` when the app's widest wording is another) and the actions (children); it sticks to its edge of the scroller, opaque on a divider. |
| `BackToTop` | A button that takes the window to the top of a long list (DECISIONS 227 and 228; `ListBand` draws one). It sits at the top of the screen, centred on the list, `space-2` under the bar and from 720 under the stuck band, in a dock of zero height right after the band, so it takes no room. It is drawn while the reader scrolls down once the list's top (`list`, a ref) is more than one window above, and it leaves when they scroll up by 8px (the position is held between the page's ends). It never leaves while it holds focus and is not drawn while a modal is open. It fades over `duration-fast` and never slides. A press goes to the top at once and focuses the `heading`. A secondary `sm` Button with the up arrow and "Back to top", with `shadow-overlay`, at every width. |
| `ambient(index)`, `AmbientMark`, `AMBIENT_MAX`, `ambientTiming(index)` | A page's one ambient loop: opacity only, in a `Stage`'s art or a framed drawing, at most 24 marks of `size-dot`. `ambient(i)` returns the props for any element (`ambientTiming(i)` is the period factor, 0.6 to 1.4, and the phase it is built from); `AmbientMark` is a `size-dot` span. Held by the hold, still under reduced motion, in forced colours and in print. |
| `Reflow`, `ReflowItem`, `REFLOW_BOUND` | A list or grid that is filtered or sorted: `order` names the ids shown, every `ReflowItem` stays mounted (an item not shown is `hidden`), and the items that stay move by transform. `fallbackFocus` is the result line focus falls back to; `onReflow` reports what moved. Past `REFLOW_BOUND` (48) items that would move on screen, a change lands at once. |
diff --git a/packages/react/src/choice.tsx b/packages/react/src/choice.tsx
index 016b8539..c9211cb9 100644
--- a/packages/react/src/choice.tsx
+++ b/packages/react/src/choice.tsx
@@ -216,6 +216,12 @@ export interface SelectProps {
* chosen value's width: every option is drawn in the trigger's one cell, unseen, so choosing moves nothing beside it.
*/
numeric?: boolean;
+ /**
+ * Use in a toolbar row: the trigger is as wide as its widest option (or the placeholder), not its container's width, so two selects and a search share a row,
+ * and choosing never moves what follows it. Every option's label is laid out unseen in the value's one cell, as `MultiSelect toolbar` does. In a column
+ * narrower than that it fills the column and cuts the value with an ellipsis. For numbers, use `numeric`.
+ */
+ toolbar?: boolean;
className?: string;
}
@@ -223,20 +229,30 @@ export interface SelectProps {
* One choice from a list too long for radios. Inside a `Field` it takes the field's label.
* The list opens below the trigger, like a menu.
*/
-export function Select({ options, placeholder = "Select…", controlSize = "md", className, "aria-label": ariaLabel, valuePrefix, numeric, inputRef, ...props }: SelectProps) {
+export function Select({ options, placeholder = "Select…", controlSize = "md", className, "aria-label": ariaLabel, valuePrefix, numeric, toolbar, inputRef, ...props }: SelectProps) {
const mirror = useMirrorRef(inputRef);
const ids = { prefix: React.useId(), value: React.useId() };
const layer = useFloatingLayer();
const level = usePopupLevel();
const items = options.map((o) => ({ value: o.value, label: o.label }));
+ // A toolbar select holds the width of its widest label: each option (and the placeholder) stands unseen in the value's one cell, so choosing moves nothing after it.
+ const value = ;
+ const seat = toolbar ? (
+
+ {value}
+ {[placeholder, ...options.map((o) => o.label)].map((label, i) => {label})}
+
+ ) : null;
return (
{valuePrefix ? (
{valuePrefix}
-
+ {seat ?? value}
+ ) : seat ? (
+ seat
) : (
// A numeric select holds the width of its widest option: the value's cell carries it as eights in an attribute that a pseudo-element paints, so choosing moves nothing and the DOM holds the words once.
String(o.label).length))) : undefined} className="basalt-select-value" placeholder={placeholder} />
diff --git a/packages/react/src/code-lines.tsx b/packages/react/src/code-lines.tsx
index 2bfd120b..f32c5e88 100644
--- a/packages/react/src/code-lines.tsx
+++ b/packages/react/src/code-lines.tsx
@@ -45,6 +45,50 @@ export function codeLines(code: string, tokens: CodeToken[] | null): CodeRun[][]
return lines;
}
+const SPACE = /([ \t]+)/;
+
+/**
+ * One line's runs as words for a block that wraps (`CodeBlock wrap`): each run of characters between spaces is one `basalt-code-word`, which never
+ * breaks inside, and the spaces stand between the words, so a wrapped line breaks at a space and nowhere else (never after a hyphen or a slash).
+ * A word longer than the line is not broken: the block scrolls sideways for it, as an unwrapped block does. Colours are kept inside the words.
+ *
+ * The words are the same whatever the colours, so a server that sent coloured spans and a client that has not loaded the grammar yet draw the
+ * same tree down to the words: spaces are joined into one text node across runs, and a word with no colour is one string child. React hydrates a
+ * string child by its text alone, so the server's coloured spans inside a word are kept (the same trick the unwrapped lines use).
+ */
+export function codeWords(line: CodeRun[]): React.ReactNode[] {
+ const out: React.ReactNode[] = [];
+ let word: React.ReactNode[] = [];
+ let coloured = false;
+ const flush = () => {
+ if (!word.length) return;
+ const children = coloured ? word : word.join("");
+ out.push({children});
+ word = [];
+ coloured = false;
+ };
+ for (const run of line) {
+ for (const piece of run.text.split(SPACE)) {
+ if (!piece) continue;
+ if (SPACE.test(piece)) {
+ flush();
+ const last = out.length - 1;
+ if (typeof out[last] === "string") out[last] = out[last] + piece;
+ else out.push(piece);
+ } else if (run.color) {
+ coloured = true;
+ word.push({piece});
+ } else if (typeof word[word.length - 1] === "string") {
+ word[word.length - 1] = (word[word.length - 1] as string) + piece;
+ } else {
+ word.push(piece);
+ }
+ }
+ }
+ flush();
+ return out;
+}
+
/** Whether a line ends in a backslash, so the next line continues it and takes an empty gutter. */
export const continues = (line: CodeRun[] | undefined) => line?.at(-1)?.text.endsWith("\\") ?? false;
diff --git a/packages/react/src/description-list.tsx b/packages/react/src/description-list.tsx
index 5291b04d..c69f00d4 100644
--- a/packages/react/src/description-list.tsx
+++ b/packages/react/src/description-list.tsx
@@ -2,7 +2,10 @@ import * as React from "react";
import { join } from "./utils";
-/** The words for a fact with no value. Batch 2's table cell says the same words in the same ink; see `docs/foundations.md`. */
+/**
+ * The default words for a fact with no value: a reading that could have been taken and was not. Batch 2's table cell says the same words in
+ * the same ink; see `docs/foundations.md`. Any other absence says what is absent in the app's own words ("No ticket", "None yet").
+ */
export const NOT_OBSERVED = "Not observed";
export interface DescriptionListProps extends React.ComponentProps<"dl"> {
@@ -12,6 +15,12 @@ export interface DescriptionListProps extends React.ComponentProps<"dl"> {
* the list, and the detail takes the rest.
*/
form?: "rows" | "stacked" | "three";
+ /**
+ * How a `rows` list lays out under 480px of its own width. `stack` (the default) puts each label over its value. `line` keeps the label and the value
+ * on one row, the label column narrowing to `size-field-label-inline` (80px, the inline field label's), so a list in a narrow column (a sidebar, a
+ * card beside the page) is no taller than its values. A long label wraps inside the column; several values stack in the value column.
+ */
+ narrow?: "stack" | "line";
}
/**
@@ -19,8 +28,8 @@ export interface DescriptionListProps extends React.ComponentProps<"dl"> {
* own; it goes in a card only when the card is the object. The label column is a fixed width (`size-description-label`), and the
* list stacks (label over value) when its own width, not the viewport's, is under 480px.
*/
-export function DescriptionList({ form = "rows", className, ...props }: DescriptionListProps) {
- return