@aiquants/console-ui 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,16 +18,23 @@ pnpm add @aiquants/console-ui
18
18
  | Import path | Contents |
19
19
  | --- | --- |
20
20
  | `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
21
- | `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the layout arithmetic, number, zoned-time and instant formatting, the label catalogs, the read contract with its keep-last-good machine, and the keyset paging machine (listed below). Server-side loaders and hosts import from here without loading React. |
22
- | `@aiquants/console-ui/testing` | DOM-only: `scanColourRoles(root)`, the colour-role scan a console runs on its own rendered DOM (see Tokens and colours). It takes an element and loads no React. |
21
+ | `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the layout arithmetic and the figure formulas, number, zoned-time and instant formatting, the reading of a number field's text, the rule of a text with nothing to read, the label catalogs, the read contract with its keep-last-good machine, and the keyset paging machine (listed below). Server-side loaders and hosts import from here without loading React. |
22
+ | `@aiquants/console-ui/testing` | DOM-only: `scanColourRoles(root)`, the colour-role scan a console runs on its own rendered DOM, text (the markers of a `List` included) and SVG graphics alike (see Tokens and colours), and the model of the modal dialog methods a test DOM lacks, `installDialogModel()` with `openModals()` and `pressEscape(dialog)` (see Testing in jsdom). It takes elements and loads no React. |
23
23
  | `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` and the component rules, all inside `@layer cui`. |
24
24
 
25
25
  The `/core` exports:
26
26
 
27
27
  - Tokens and contrast: `TOKENS`, `cssVar`, `contrastRatio`, `hexToSrgb`, `CONTRAST_PAIRS`, `CONTRAST_MINIMUM`, and the types `ColorScheme`, `SchemeColor` and `MotionToken` beside the other token names.
28
- - The geometry the tokens are computed on: `LATTICE_PX` (4), `TARGET_PX` (44), `ROW_WITH_CONTROL_PX` (52) and `ceilToLattice(px)` (the smallest lattice multiple at or above a length).
29
- - Layout arithmetic: `textWidthEm`, `monoTextWidthEm`, `ceil8`, `tileGridPlan`, `tableMinInlinePx`, `masterDetailPlan`.
28
+ - The geometry the tokens are computed on: `LATTICE_PX` (4), `TARGET_PX` (44), `ROW_WITH_CONTROL_PX` (52), `COMPACT_ROW_PX` (28) and `ceilToLattice(px)` (the smallest lattice multiple at or above a length).
29
+ - Layout arithmetic: `textWidthEm`, `monoTextWidthEm` (the type `TextFace` names the face each model sizes), `ceil8`, `tileGridPlan`, `tableMinInlinePx`, `tableFrameMinInlinePx` (the narrowest a `DataTable` is while its table shows without scrolling: the table's minimum and the scroll frame's 4 px inline padding on both sides), `masterDetailPlan`.
30
+ - Widths sized from what a box holds (see Layout): `fixedColumnPx({ header, note }, contents)` (a `DataTable` fixed column; the first argument, type `ColumnHeaderText`, mirrors `ColumnDef`'s `header` and, for a column with a note, lists every line its `note` may show; `contents` are `CellContent` values, measured one by one with `cellContentInlinePx(content)`), `FLEXIBLE_COLUMN_MIN_PX` (160: the one minimum every flexible column shares), `comparisonAttributePx(labels)` (a `ComparisonGrid`'s `attributePx`), `tileMinInlinePx(captions, values)` (a `TileGrid`'s `minInlinePx`),
31
+ `instantSampleText(formatLocale, timeZone)` (the text an instant column is measured with) and `countSampleText(formatLocale, unit?)` (the text a count column or a tile's count is measured with).
32
+ - Figure formulas (see Figures): `spacedTextWidthEm(text, face)` (a line's width under the widest letter and word spacing WCAG 1.4.12 allows), `figureBoxPlan({ name, notes })` (the narrowest width and the height of a figure node's box, types `FigureBoxLines` and `FigureBoxPlan`), `figureDiscLabelPlan(label, radiusPx)` (the width of the name under a disc and its reach below the centre; for `null`, a disc drawn without a name, width 0 and the reach of its focus ring; type `FigureDiscLabelPlan`) and `FIGURE_RING_REACH_PX` (4: how far a node's focus ring reaches beyond the node).
30
33
  - Formatting: `formatCount`, `toOffsetIso`, `toWallTime`, `formatInstant`, `ZonedTimeError`.
34
+ - The text of a number field: `readDecimalText(text)` reads a decimal text (an optional sign, digits with an optional fraction or a fraction alone, an optional exponent, blanks around it; the full-width forms of ASCII read as half-width, as typed with a Japanese input method on) and returns `null` for anything else, an infinity or a value that underflows to zero, so an unreadable entry is reported instead of saved as another number; `-0` reads as `0`. `readIntegerText(text)` also returns `null` unless the value is a safe integer.
35
+ - Text with nothing to read: `isReadableText(text)` is `true` when the text holds at least one character outside Unicode's white space (`White_Space`), control (`Cc`) and format (`Cf`) characters and default-ignorable code points (`Default_Ignorable_Code_Point`): the empty string, and a text of only spaces, line breaks, U+3000, U+FEFF, U+200B, the separators U+001C–U+001F, U+0085, U+00AD, the Hangul fillers or variation selectors, is not readable.
36
+ It covers the white space of both JavaScript (`\s`) and Python (`\s`), so a record written in either language that reads as blank in it is not readable here either.
37
+ It is the one rule of a blank text: `Measured` refuses a `text` or `unit` it rejects, and a host decides with it whether a text is worth drawing at all.
31
38
  - Labels: `CONSOLE_UI_LABEL_CATALOGS`, `resolveConsoleUiLabels` (a UI language's catalog, whose `loadFailed`, `refreshFailed` and `forbiddenBecause` build the failure sentences and whose `failureSentence` is the one rule that chooses between them), `reasonAside` (a failure's reason as a parenthetical).
32
39
  - The read contract: the types `ResourceOutcome<T>` / `ResourceState<T>` / `ReloadCause`, `HTTP_FORBIDDEN` (the status of a refusal), `keepLastGood`, `beginReload`, `mapOutcome` and `flatMapOutcome`.
33
40
  - The command contract: the type `CommandOutcome<T, R>` (a command the host can refuse with a structured body, which the failure carries as `rejection`).
@@ -108,53 +115,94 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
108
115
  - Every length, type step and duration is computed from a few formulas (no value is written by hand):
109
116
  - a 4 px lattice (`LATTICE_PX`) and the spaces 4, 8, 12, 16, 24, 32, 48, 64 and 96 (`space-1` … `space-24`, multipliers whose prime factors are 2 and 3);
110
117
  - type steps of round(16 × 1.25^k) px, never below 11 px, each line the smallest lattice multiple at or above 1.5 times its size (WCAG 1.4.8; `title`, beside controls, and `prose`, the reading line, at 1.75): `caption` 11/20, `body` 13/20, `prose` 13/24, `title` 16/28, `heading` 20/32, `display` 25/40, `display-lg` 31/48;
111
- - the 44 px target (`TARGET_PX`: a `body` line with 12 px above and below), which is also the height of a control and of a table row (`size-target`, `size-control`, `size-row`), and the 52 px row that holds a control (`ROW_WITH_CONTROL_PX`: the target with one lattice unit above and below, `size-row-control`);
118
+ - the 44 px target (`TARGET_PX`: a `body` line with 12 px above and below), which is also the height of a control and of a table row (`size-target`, `size-control`, `size-row`), the 52 px row that holds a control (`ROW_WITH_CONTROL_PX`: the target with one lattice unit above and below, `size-row-control`) and the 28 px compact row of a read-only line table (`COMPACT_ROW_PX`: a `body` line with one lattice unit above and below, `size-row-compact`);
112
119
  - motion of 120, 180 and 270 ms (`motion-1` … `motion-3`, 120 × 1.5^(k − 1)).
113
120
  Only `body` (20) and `title` (28) lines, whose difference from 44 is a multiple of 8, can be centred in a 44 px box on the lattice, so every control draws its text in `body` or `title`.
114
121
  - The token variables are declared on `[data-cui-root]` (never `:root`) with lengths in rem, the strokes (`border-width` 1, `focus-width` 2, `focus-offset` 2, `marker-width` 2) in px and the durations in ms. A browser snaps a used border width down to whole device pixels, so a rem stroke would leave the paddings that compensate for the border (`calc(… - var(--cui-border-width))`) off the lattice for a reader who enlarges the root font size; in px every lattice measure scales exactly with the root font size around a 1 px border.
115
122
  - Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`), so a component that moves stops without a rule of its own; no rule writes a duration by hand, and the indeterminate progress segment sweeps only for a reader who allows motion.
116
- - Text and surface colours are applied through role attributes only. `data-cui-fg` paints text, `data-cui-surface` paints the surface text sits on, `data-cui-accent` paints non-text graphics. Every role has a light and a dark value, written as `light-dark(<light>, <dark>)` (see Wrapping a console for the scheme). `CONTRAST_PAIRS.light` and `CONTRAST_PAIRS.dark` list the same pairs: for every role, the surfaces it may be drawn on with the WCAG 2 ratio on each in that scheme.
123
+ - Text and surface colours are applied through role attributes only. `data-cui-fg` paints text, `data-cui-surface` paints the surface text sits on, `data-cui-accent` paints non-text graphics, `data-cui-fill` paints the surface of a figure's shape (always the surface of the shape's group, which its text is measured on) and `data-cui-stroke` a figure's lines. Every role has a light and a dark value, written as `light-dark(<light>, <dark>)` (see Wrapping a console for the scheme). `CONTRAST_PAIRS.light` and `CONTRAST_PAIRS.dark` list the same pairs: for every role,
124
+ the surfaces it may be drawn on with the WCAG 2 ratio on each in that scheme.
117
125
  Every pair meets AAA (`CONTRAST_MINIMUM`: 7 for text, 4.5 for large text, 3 for non-text; the lowest text and non-text ratios are 7.12 and 3.47 in the light scheme, 9.29 and 5.54 in the dark one), and a pair not in the table is never drawn. `Text` is the only component that paints caller text, and it paints only through a text role.
118
126
  - The remaining colours are fixed non-text graphics, each drawn against listed surfaces of `CONTRAST_PAIRS`: the control border (`border-control`) of inputs, secondary buttons, segments and the switch's track, the slider's rail and a pending step's ring, the invalid border (`danger-accent`), the selected-row band, the radio mark, the current tab's marker and the slider's thumb (`info-accent`), and the focus ring (`focus`).
127
+ A figure's lines are the same roles (see Figures): a node's plate line on both the figure's `surface` and its own face (`border-control` on `surface` 4.76 / 6.78; `info-accent` 5.25 / 6.76 and 4.82 / 5.6 on `info-tint`; `success-accent` 3.65 / 9.2 and 3.47 / 7.83; `warning-accent` 5.03 / 10.4 and 4.85 / 8.75; `danger-accent` 4.77 / 6.17 and 4.36 / 5.6, light / dark), an edge and its arrowhead (`border-control`, or `info-accent` when strong) and a node's focus ring (`focus`, 5.25 / 6.76) on `surface`. A figure's text takes its text role's colour as its fill (`currentColor`,
128
+ in that one declaration only).
119
129
  The solid buttons', the pressed segment's and the checked switch track's border is their own fill, and the rules of cards, tables, comparison headings, description lists and dialogs (`border-subtle`) are decorative, never a component's only boundary. A switch's thumb stands out from its track by at least 3 : 1 in both schemes.
120
130
  - In forced-colors mode (Windows high contrast), which removes surfaces, shadows and backgrounds and paints transparent borders, the package redraws its non-colour cues in system colours: the selected row's start band (`Highlight`), the progress and meter tracks and fills (`CanvasText` / `Highlight`), the current tab's marker (`Highlight`, the other tabs' markers sunk into `Canvas`), the switch's thumb (`CanvasText`, `HighlightText` on a `Highlight` track when on), the slider's rail and thumb (`CanvasText` / `Highlight`),
121
- and the pressed segment and the current step's marker (`Highlight` with `HighlightText`).
131
+ and the pressed segment and the current step's marker (`Highlight` with `HighlightText`); a figure's surfaces are redrawn in `Canvas` and its lines and arrowheads in `CanvasText`, with a selected plate, a focus ring and a strong edge and its arrowhead in `Highlight` (their widths and dashes stay), while its text keeps the forced `CanvasText`.
122
132
  The band is the row's own inline-start border, taken out of its inline-start padding (the row's box and text stay where an unselected row has them, and the band stays at the start in a right-to-left root). The focus ring sets only `outline`, so a selected row that has focus keeps its band.
123
133
  Every rule is a border (the cell's own bottom border, taken out of the cell's bottom padding; no rule is drawn as a shadow, which forced colours remove), so it stays in the forced `CanvasText` with no rule of its own, and nothing is positioned for forced colours, so the focus rings of rows and of controls in cells stay whole.
124
134
  - A console scans its own rendered DOM with `scanColourRoles(root)` from `@aiquants/console-ui/testing`, the same oracle the package runs on its components: for each text node it reads the nearest `data-cui-fg` and `data-cui-surface` and looks the pair up in `CONTRAST_PAIRS` (both schemes list the same pairs), and it fails a text with no role, a pair not in the table, and any inline paint declaration from the text up to its farther role element
125
- — every declared inline property whose name contains `color`, `background`, `fill`, `stroke` or `shadow` (so every longhand such as `border-top-color` or `outline-color`), the `border`, `outline`, `text-decoration`, `column-rule` and `text-emphasis` shorthands, `border-image`, `opacity`, filters and blend modes.
126
- It returns `{failures, measured, texts}`; assert `failures` empty and `measured` non-empty. `contrastRatio` (sRGB channels in [0, 1], with `hexToSrgb` for `#rrggbb`) is the one contrast computation.
135
+ — every declared inline property whose name contains `color`, `background`, `fill`, `stroke` or `shadow` (so every longhand such as `border-top-color` or `outline-color`), the `border`, `outline`, `text-decoration`, `column-rule` and `text-emphasis` shorthands, `border-image`, `opacity`, filters and blend modes — and any paint attribute there (`fill`, `stroke`, `color`, `bgcolor`, `opacity` and every `*-opacity`, `stop-color`, `flood-color`, `lighting-color`, `filter`, `mask`). The text of an SVG `title`, `desc` or `metadata` is never drawn and is not read.
136
+ A list that draws markers (`data-cui-marker`, a `List` with `marker="bullet"` or `"number"`) paints one text per item that the DOM does not hold, so each item of such a list is read as one text measured from the item (its nearest `data-cui-fg` and `data-cui-surface`, no inline paint up to the farther role element) and named `印 <the item's data-testid>` in the failures.
137
+ It reads every SVG shape (`path`, `rect`, `circle`, `ellipse`, `line`, `polyline`, `polygon`) as a graphic: it fails a shape with no `data-cui-stroke` or `data-cui-fill` or no `data-cui-surface` above it, a fill that is not its nearest surface, a line that is not a non-text role paired in the table with that surface (and, for a filled shape, with the surface around it, the other side of its edge), and any inline paint or paint attribute up to its farther surface element.
138
+ It returns `{failures, measured, texts, measuredGraphics, graphics}` (`measuredGraphics` holds the `line/surface` pairs, `graphics` counts the shapes); assert `failures` empty and `measured` non-empty, and `measuredGraphics` non-empty on a screen that draws a figure. `contrastRatio` (sRGB channels in [0, 1], with `hexToSrgb` for `#rrggbb`) is the one contrast computation.
127
139
 
128
140
  ### Layout
129
141
 
130
142
  - The outermost element of each layout component (`TileGrid`, `DataTable`, `ComparisonGrid`, `MasterDetail`) is an anonymous container (`container-type: inline-size`) whose width the component queries; no viewport breakpoint is used. `Card` has a 1 px rule and 23 px padding (the rule's width comes out of the padding, so rule and padding sum to 24 and the card's outer box stays on the 4 px lattice), `CardSection` has no padding, rule or surface, so inside a card every layout measures the card's content width.
131
143
  - Layout components need a definite inline size from their parent. A container's content does not size it, so the anonymous container takes `inline-size: 100%` of its parent: in block flow (`Stack`, `Card`, `CardSection`, a `MasterDetail` pane) that is the parent's width, and in a wrapping flex row (`Cluster`, a host flex row) it claims a full line. Inside a parent that sizes itself to its content (a card's `actions`, an inline-block, a float) it gets no width of its own, so do not place a layout component there.
132
144
  - Container-query rules are emitted as React 19 `<style href precedence="cui">` elements keyed by their inputs (identical grids emit one element), outside the `cui` layer, so they win over the layered base rules.
145
+ - Spacing tokens are carried as attributes, each a promise about the element's computed gaps that a console can check on its rendered DOM: `data-cui-gap="<token>"` puts the token in both axes (`rowGap` and `columnGap`: a `Stack`, a `Cluster`, the grid of a `TileGrid`, a `List` without markers), `data-cui-row-gap="<token>"` in the gap between rows only and `data-cui-column-gap="space-2"` in the gap between columns only (a marked `List`: its `gap` between the items, and 8 px from the markers to the text).
146
+ The column-gap vocabulary is the one value the foundation draws there, `space-2`: the stylesheet has one single-property rule per space token for `data-cui-gap` and `data-cui-row-gap` and one for `data-cui-column-gap="space-2"`, and no other rule, the emitted container-query rules included, sets an axis such an attribute names on an element that carries it, whatever the value.
133
147
  - `TileGrid` chooses its column count among the divisors of the tile count (`tileGridPlan`), so the last row is never short. `DataTable` is `table-layout: fixed` with rem column widths from px numbers; flexible columns share the rest equally, so their minimums must be equal (`tableMinInlinePx` rejects the table otherwise). `ComparisonGrid` stacks one `<dl>` per column below `attributePx + columns × columnMinPx`.
148
+ - Size a `DataTable` fixed column from what it holds with `fixedColumnPx({ header, note }, contents)`: `ceil8(max(textWidthEm(header) × 11, textWidthEm(note line) × 11, every content) + 24)`, the header's name and every line its note may show (`note`, given only for a column with a `ColumnDef.note`: each line of a note of several lines and the word of every state it may name; the note is a block under the name in the same `caption` step, in the regular weight, which the model does not tell apart) and each content on one line, with the cell's 12 px inline padding on both sides.
149
+ Each `CellContent` names the part that draws it and lists every text it may show (a closed vocabulary's every word, a button's busy name, the unmeasured label), since the widest decides:
150
+ `text` (`Text` or a cell's bare text, in its `face` and `type`: the sans or mono model × the step's size), `measured` (what `Measured` writes, in the cell's `body`: a count as `countSampleText(formatLocale, unit?)` writes it, a formatted text such as `instantSampleText(formatLocale, timeZone)`, and `labels.unmeasured` when a value may be unmeasured), `pill` (`caption` + 2 × 8), `button` (a bordered `Button`: `max(44, body + 2 × 12 + 2 × 1)`), `link` (`Button variant="link"`, `Link`, `FragmentLink`: `max(44, body)`), `switch` (`labelHidden: true`: the track alone,
151
+ `2 × 20 + 3 × 4` = 52, as the hidden name is out of the flow; `labelHidden: false` with its visible `labels`: 52 + 8 + `body`, a visually hidden subject before the name not being drawn) and `cluster` (a `Cluster` on one line: the items' sum + (n − 1) × its gap).
152
+ Worked numbers: a status column of the pills `実行中` and `失敗` is `ceil8(max(22, 33 + 16) + 24)` = 80; a `↑` button is 44 wide (13 + 26 = 39 is below the target) and its column 72; the actions `詳細` and `子の実行 (3)` 8 px apart are 52 + 8 + 106.6 = 166.6 and their column 192; a count column of `9,999,999` and `未測定` is 96; an instant column is 160 in ja-JP (`2000/01/01 09:00:00`) and 168 in en-US (`01/01/2000, 00:00:00`); a column of a switch with its name hidden under the header `有効` is `ceil8(max(22, 52) + 24)` = 80, and one with the name `通知を送る` shown is `ceil8(52 + 8 + 65 + 24)` = 152;
153
+ a header `あいうえお` with a note `あいうえおかき` is `ceil8(max(55, 77) + 24)` = 104. `countSampleText` writes the largest seven-digit count, 9,999,999, the counts laid out on one line (a larger count breaks between its digits), in the root's grouping and with its unit as `Measured` writes it (`9,999,999 件`: 84.5, a column of 112).
154
+ Every flexible column takes `FLEXIBLE_COLUMN_MIN_PX` (`ceil8(10 × 13 + 24)` = 160, ten full-width characters a line), so the minimums are equal by construction. A metric tile's minimum is `tileMinInlinePx(captions, values)`: `ceil8(max(captions × 11, values × 20) + 24)`. A `ComparisonGrid`'s attribute column is `comparisonAttributePx(labels)`: `ceil8(max(labels × 13) + 24)`, its row headers in the table's `body` step (the corner cell above it holds nothing). A `DataTable` shows its table without scrolling while it is at least `tableFrameMinInlinePx(columns)` wide:
155
+ `tableMinInlinePx(columns) + 2 × 4`, the scroll frame's padding that keeps the cells' focus rings inside. A header or sample with nothing to read (`isReadableText`), an empty list of samples and a cluster without items throw `RangeError`, since a width measured from them is too narrow for what they stand for. The package's tests rebuild every one of these widths from the declarations the stylesheet applies to the rendered parts, so a rule that changes without the helpers fails there.
134
156
  - `MasterDetail` goes side by side when both minimums and the 24 px gap fit, the master preferring the 1 : φ share while neither pane goes below its minimum: master = min(max(masterMin, (c − 24) / (1 + φ)), c − 24 − detailMin), and the detail takes the rest. The upper clamp matters only when detailMin > φ × masterMin (a narrow list beside a wide detail).
135
- - Every rule that draws caller text wraps anywhere; nothing is cut with an ellipsis. A `Pill` keeps its text width + 16 px and wraps inside itself only when its text is longer than the column was sized for, instead of spilling into the next column.
136
- - Every `Text` keeps its own type step's line wherever it is placed (no rule forces a line height), and every line is a multiple of 4, so a cell, a list row or a stack mixing steps stays on the lattice: an outcome over its muted `caption` reason paragraph in a table cell is 12 + 20 + 20 + 11 + 1 = 64 px. An inline `Text` of a larger step than the line it sits on stretches that line off the lattice by the difference of the faces' metrics; give it a block of its own (`as="p"`).
157
+ - Every rule that draws caller text wraps anywhere; nothing is cut with an ellipsis. A `Pill` keeps its text width + 16 px and wraps inside itself only when its text is longer than the column was sized for, instead of spilling into the next column. A `Measured` text kept whole (`keep="whole"`) is the same inline-block: it moves to the next line whole and wraps inside only when longer than its column.
158
+ - Every paragraph the package draws carries the reading measure (`data-cui-measure="reading"`): its lines are at most 40ic long (40 ideographs, WCAG 1.4.8) however wide its container is. The paragraphs are `Text as="p"` (and with it the empty text of `DataTable` and `SelectableList`, a field's description, error and drawn reason, `LoadMore`'s end text and `ProgressBar`'s label and value), a `Card`'s description, a `CardSection`'s subtitle, `Notice`, `AlertMessage` (and with it the failures of `ResourceFailed` and `LoadMore`) and a `MetricTile`'s label, sublabel and value.
159
+ A plain paragraph is at most `40ic` wide; a padded paragraph box (`Notice`, `AlertMessage`) is `box-sizing: border-box` and at most `calc(40ic + 2 * var(--cui-space-3))`, its inline padding on both sides, so its text lines are 40ic too. Headings, table cells and the stacked `ComparisonGrid`'s column headings (a `div` underlined across the column) are not paragraphs and keep their container's width; `Dialog` is at most 40ic plus its padding wide on its own. A host paragraph inside the root takes the measure by being a `Text as="p"`.
160
+ - Every `Text` keeps its own type step's line wherever it is placed (no rule forces a line height), and every line is a multiple of 4, so a cell, a list row or a stack mixing steps stays on the lattice: an outcome over its muted `caption` reason paragraph in a table cell is 12 + 20 + 20 + 11 + 1 = 64 px.
161
+ An inline `Text` that names a face (`face`) is aligned to the top of its line box (`vertical-align: top`, as a `span` `Cluster` is): two faces with different ascent and descent ratios, each in an inline box as high as its line, set on one baseline make the line taller than either box (a mono `body` text in a sans cell would make a 28 px `row-compact` row 30 px), while a box aligned to the top shares no baseline and never reaches beyond the taller of the two lines, both multiples of 4.
162
+ Its baseline may sit about 1 px off the line's own; the line stays on the lattice, and its height is still the type step's. A block `Text` (`as="p"`, `as="div"`) is a line box of its own, to which `vertical-align` does not apply. An inline `Text` without a face, of a larger step than the line it sits on, stretches that line off the lattice by the difference of the faces' metrics; give it a block of its own (`as="p"`).
137
163
  - The table's scroll frame is `position: relative`, so it is the containing block of visually hidden text in its cells (for example the full name of a count button): the frame clips that text and scrolls it with the table, and a wide table scrolls inside its frame without widening the page.
138
164
  - A visible table caption (`captionHidden={false}`) wraps at the frame's visible width, not at the table's width, and stays at the frame's start while the table scrolls sideways, so the whole name of a table wider than its card is readable without scrolling.
139
165
  - A table row is 12 + 20 + 11 + 1 = 44 px: 12 px above a `body` line, 11 px below and the row's rule as each cell's own 1 px bottom border (the tables separate their borders, since a collapsed border adds half a rule to each row). A cell of k `body` lines is 24 + 20k px. Table cells are top-aligned.
140
166
  In a table whose rows hold controls (`rowSize="row-control"`, 52 px rows: 4 + 44 + 3 + 1) the cells are centred, which puts a one-line text on the centre line of a one-line bordered button's label. Size the button column so the label fits on one line (its width + 24 px padding + 2 px border): a label that wraps to k lines makes the button 24 + 20k px and the row 32 + 20k px, and its centred lines no longer share the text's line.
141
- This also holds only for buttons without an `unavailable` reason: an unavailable button belongs in card actions or a `Cluster`, because its reason is drawn beside it in `body` (13/20) and wraps under it in a narrow cell.
167
+ This also holds only for buttons that do not draw an `unavailable` reason: a button with `unavailable: { reason }` belongs in card actions or a `Cluster`, because its reason is drawn beside it in `body` (13/20) and wraps under it in a narrow cell. The buttons, switches and selects of a table's rows name one visible reason the caller draws outside the table instead (`unavailable: { reasonId }`).
142
168
  - Controls size by `box-sizing: border-box` whatever the host's reset: a text input, a select, a one-line bordered button and a segment are all 44 px high (1 + 11 + 20 + 11 + 1), a bordered label that wraps to k lines is 24 + 20k px, and a text area of k rows is 24(k + 1) px (1 + 11 + 24k + 11 + 1), never the height of a one-line field.
143
169
  - A `RowButton` is `body` text with 12 px of block padding, so a one-line row is the 44 px target. Its direct children are lines 4 px apart (the reach of a `Pill` beyond the 20 px line it sits on), each keeping its own type step's line, so a row of k `body` lines is 20 + 24k px and a row mixing a `title` name and `body` lines stays on the lattice.
170
+ - `Cluster as="span"` is the phrasing form of `Cluster` for a group of labels inside a control: an inline-flex `span` with the same gap tokens, aligned to the top of its line and never wider than its container, so a one-row group of pills and measured values keeps a 20 px line 20 px high (a `RowButton` line, a `Button` label, a `Disclosure` summary), and k wrapped rows with gap g are 20k + g(k − 1) px.
144
171
  - A `Pill` is 28 px high (a `caption` line with 4 px above and below): in a 44 px control or row it sits 8 px from each edge, and on a `body` line it overlaps the line by 4 px above and below (negative block margins), so its box is centred on the line and the line stays 20 px. Lines stacked next to a line of pills therefore need 4 px between them (a `RowButton` keeps them apart), and pills that may wrap onto several lines belong in a `Cluster` with a gap of at least `space-2`, whose wrapped rows keep the 28 px boxes apart (pills inline in one run of text overlap by 8 px when the run wraps).
145
172
  - A card's `actions` are centred on the title's 28 px line: their box is 44 px high with its content centred and overlaps the title line by 8 px above and below, so a 44 px bordered button and a 28 px `Pill` share the title's centre and the header stays as high as the title line. When the title and the actions do not fit on one line, the actions wrap below the title 8 px apart (the header's 16 px row gap gives back the 8 px overlap); the wrapped row still overhangs the header box by 8 px, so the card's next child is 8 px below it instead of 16. A `Dialog`'s header shares these rules.
146
173
  - A `RadioGroup` legend is 4 px above its first option, like a `Field` label above its control (the rendered legend sits outside the fieldset's flex box, so it carries the 4 px as its own padding). Each radio mark is a 20 px box (a `body` line) without the browser's default margins: it starts at the legend's edge, sits centred in the 44 px option line (12 px above and below), and the option text starts 20 + 8 = 28 px from the edge.
147
174
  - `Button variant="link"` and `Link` draw a `body` line (13/20) with 12 px of block padding in the regular weight of the surrounding text, `info-fg` and an underline, as the same `inline-flex` box at least 44 px wide: a one-line link is exactly the 44 px target and a label that wraps to k lines is 24 + 20k px, on the lattice (a 44 px minimum height with the text centred would put a two-line label 2 px off it).
148
175
  Every `Button` and `Link` draws its label (`children`, or `busyLabel` while busy) inside one label span, the only in-flow item of its flex box, so a label that mixes text and elements (`所見 <Measured …/> 件を開く`) is one paragraph:
149
176
  its spaces survive, it wraps as one text (24 + 20k px for the link-looking controls and for a bordered button) and its lines align like the control (start, or end in an end-aligned column, for the link-looking controls; centred in a bordered button, as the browser centres a button's text), while `justify-content` places the label in a box wider than it. Visually hidden parts of the label stay out of flow.
150
- Every control is at least 44 px high, so place it on a line of its own, in card actions, in a `Cluster` or in a `row-control` table row: inside a sentence its box stretches that line. Bordered buttons draw their label in `body` (13/20) and medium.
177
+ Every control is at least 44 px high, so place it on a line of its own, in card actions, in a `Cluster` or in a `row-control` table row: inside a sentence its box stretches that line. Bordered buttons draw their label in `body` (13/20) and medium, and are at least 44 px wide too, so a one- or two-character label (`↑`, `OK`) is still a 44 × 44 px target.
178
+ A control's content is phrasing content: the label of `Button` (and its `busyLabel`), `Link`, `FragmentLink` and `Switch`, a `RowButton` and a `Disclosure` summary hold text and non-interactive phrasing elements only (`Text` as `span`, `Pill`, `Measured`, `Meter`, `InlineChange`, `VisuallyHidden`), and a group of them on one line is a `Cluster as="span"`. A paragraph, a `div` (a `Cluster` in its block form), a link, a button or an element with `tabindex` or `contenteditable` inside throws `RangeError` after the render, naming the test id.
151
179
  Every clickable control (`Button`, `Link`, `RowButton`, `Switch`, `SegmentedControl`'s segments, `Disclosure`'s button) inherits `font-variant-numeric` (the browser's `font` shorthand on `<button>` resets it), so a clickable count in an end-aligned table column keeps the column's tabular figures.
152
180
  - The added controls are on the same lattice: a tab is 12 + 20 + 10 + 2 = 44 px (the 2 px marker is its bottom border, so its text stays centred), a breadcrumb item, a switch, a slider, a disclosure button and a step are 44 px lines, a switch's track is 52 × 28 px (two 20 px thumb places and three 4 px gaps across), a slider's thumb is a 20 px disc on a 4 px rail centred in its 44 px box, a step's marker is 28 px (the pill's height) and a description-list row is a table row (44 px, 24 + 20k px for k lines).
153
181
  - In the stacked layout of `ComparisonGrid` each column is its heading, 8 px above its definition list and underlined by the same decorative rule as the table layout's header row, then the attribute pairs 8 px apart; columns are 16 px apart.
154
182
 
183
+ ### Figures
184
+
185
+ - A figure (`Figure`, `FigureNode`, `FigureEdge`) scales as a picture: its CSS box is in rem (`--cui-figure-inline`, with `--cui-figure-block` or `--cui-figure-ratio`) and every length inside it (coordinates, type sizes, line widths) is in user units of a px `viewBox`, so a reader who enlarges the root font size enlarges the whole drawing in proportion and the text never outgrows its box. Figure text therefore carries no `data-cui-type`: the parts write the type step's px size as the `font-size` attribute (`body` 13 for a box's name, `caption` 11 for its notes and a disc's name)
186
+ and name the step with `data-cui-figure-type`.
187
+ - SVG text does not wrap, so a box is sized for the widest spacing WCAG 1.4.12 lets a reader apply: `spacedTextWidthEm` adds 0.12 em per character and 0.16 em per word separator to the text-width model, and `figureBoxPlan` makes the box `ceil8(max(spaced(name) × 13, spaced(note) × 11)) + 2 × 12` wide at least and `12 + 20 + 20 × notes + 12` high, so it is on the lattice for any number of notes (44, 64, 84, 104). A name `文書の取得` with notes `取得` and `門: 開` (72.8 and 41.14 px spaced) needs 80 + 24 = 104 px; a node narrower than its plan throws.
188
+ Each line is drawn on its centre (`dominant-baseline: central`), 12 px from the box's start.
189
+ - A disc's name is one `caption` line whose top is 4 px below the disc, centred under it in `fg-secondary` on the figure's `surface`: `figureDiscLabelPlan(label, r)` gives its width (`ceil8(spaced(label) × 11)`) and its reach below the centre (`r + 4 + 20`), for a layout to keep clear.
190
+ - A disc may be drawn without a name (`name: null`) where its layout leaves the name no room: no name line is drawn (no `<testId>-name`), and `figureDiscLabelPlan(null, r)` gives width 0 and reach `r + 4` (`FIGURE_RING_REACH_PX`, the focus ring of a pressable disc), so a layout reserves nothing for a name that is not drawn. A box's name is drawn inside the box and sizes it, so a box always has one: its type refuses `null`, and so does `FigureNode` at run time. A string name with nothing to read throws for either shape. A pressable disc of a `group` figure may be nameless too:
191
+ its accessible name is `press.label`, which every node of a group figure carries with a readable character; WCAG 2.5.3 (Label in Name) binds a visible text label only (a disc that draws its name is bound, and its `press.label` must contain the name), and 2.4.6 (Headings and Labels) asks the label there is to describe the purpose, not to be shown. A nameless disc costs a sighted operator the visible text, so drop the name only where it has no room and keep it readable elsewhere (the node's `title`; a decorative figure's table).
192
+ - A `group` figure is a named `role="group"` drawn at its natural size in a scroll frame (`position: relative`, `overflow-x: auto`, 4 px inside) that takes no focus: every node is a toggle button in the Tab order (Enter, Space or a press call `onPress` once; `aria-expanded`, and `aria-controls` only while open), at least the 44 px target, and the browser scrolls the focused node into view. A node draws its own focus ring (`focus`, 2 px wide, 2 px outside the node, shown on `:focus-visible`; the browser's outline is removed because it is not drawn, or drawn misshapen,
193
+ on an SVG group), so a pressable node keeps `FIGURE_RING_REACH_PX` (4) to the figure's edge. An Escape pressed on a node calls the figure's `onEscape` (the rule of `useEscapeToClose`).
194
+ - A `decorative` figure is `aria-hidden` and its nodes cannot be pressed; its caller draws the same content as a table, which is the accessible path. Its box is `round(down, min(100cqi, natural width), 4px)` wide, centred, inside an anonymous container, and the natural ratio high rounded to the lattice, so it shrinks with its container and stays on the lattice; a pannable one (`pointer`) shows its cursor (`data-cui-cursor`: `grab`, `grabbing` or `pointer`) and keeps vertical swipes and pinches for the page (`touch-action: pan-y pinch-zoom`, no text selection), and the caller moves its `viewBox`.
195
+ - A node's tone paints its plate and line (`neutral` on `surface` with `border-control`, `info`, `success`, `warning` and `danger` on their tints with their accents); a selected node is drawn on `info-tint` with an `info-accent` line twice as wide (`marker-width` × 2), and a `dashed` outline marks a state such as unmeasured, so no state is told by colour alone. A note's text role must be in the table on both faces a node takes (its tone's and `info-tint`), since selection flips at run time: `fg` fits every face, `fg-muted` every face but `success-tint`.
196
+ - An edge's line is `weight` × `border-width` (1 to 4), one step wider and `info-accent` when `high`; no edge is dimmed, so every edge keeps 3 : 1 on the figure's surface. The arrowheads are two 8 px markers per figure, filled in the line's role.
197
+
155
198
  ### Focus and announcements
156
199
 
157
- - `Button` in `busy` or `unavailable: {reason}` state is `aria-disabled="true"` with a press that does nothing (never `disabled`, which drops focus to `<body>`); the reason is drawn beside the button and is its accessible description.
200
+ - `Button` in `busy` or `unavailable` state, and `Switch` and `Select` in `unavailable` state, are `aria-disabled="true"` with a press or a choice that does nothing (never `disabled`, which drops focus to `<body>`).
201
+ The reason is the control's accessible description: drawn beside it (`unavailable: { reason }`; a `Select` draws it under the control), or drawn elsewhere (`unavailable: { reasonId }`, the id of that visible reason): a note the caller draws once for several controls, or the error of a field the control acts on (the field's `errorId`). A blank reason throws, and so does a reason id that is blank or holds whitespace (`aria-describedby` splits ids at whitespace).
202
+ `Button` also takes the id of a caller element that describes it (`describedBy`, listed before the reason), and its `busyLabel` may hold elements (a visually hidden subject keeps a row's name while busy).
203
+ - Only the control whose own request is in flight is `busy`. `usePendingPress()` tracks it: `press(key, action)` runs the action and, when the action returns a promise, keeps `key` as `pendingKey` until that promise settles either way; an action that returns no promise starts no wait, and a later press replaces the pending one.
204
+ While the host reports a request in flight on a channel several controls share, the controls that are not pending are `unavailable` with one reason, so no control reads as busy for a request it did not send. The promise's outcome stays the action's: the hook reports no refusal.
205
+ - `PanelTabs` is the ARIA tabs pattern: only the selected tab is in the Tab order, the arrow keys select the previous or next tab and wrap around (swapped in a right-to-left root), Home and End select the first and the last, and focus moves with the selection.
158
206
  - `useFocusRescue(getTarget)` returns a ref with one identity for the owner's lifetime; when the region it is attached to disappears while holding focus, focus moves to `getTarget()` right after the commit that removed it — also when the region is rendered and removed by a descendant that re-renders on its own.
159
207
  Focus resting on `<body>` or elsewhere is never taken, neither then nor on a later re-render.
160
208
  Exception: a pointer click on text inside a `DataTable` focuses its row (`tabIndex={-1}`, the `LoadMore` focus target) or its scroll frame (`tabIndex={0}`), not `<body>`, so a region holding a table the operator clicked into counts as holding focus, and its disappearance moves focus (and scrolls) to the target.
@@ -163,7 +211,9 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
163
211
  the rows shown at the press and at every commit while `busy` is up come before the page, the page's rows arrive in the commit in which `busy` falls (as `usePagedResource` delivers them), and the first of them is the marked element right after the last row shown before.
164
212
  A row a write added in front of or among the shown rows is not the page's, and a page that appended nothing after them (an empty last page) counts as adding nothing. Without `busy`, the rows shown at the press come before the page.
165
213
  - `data-cui-row-focus` is the public row-focus hook `LoadMore` finds rows by: inside `rows.ref` each shown row carries exactly one element with it (`rows.count` in all), and a row keeps that element while it stays shown (key rows by their record).
166
- `DataTable` rows and `RowButton` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`. In the first commit after a press, `LoadMore` throws when `rows.ref` is not attached or holds a number of marked elements other than `rows.count`.
214
+ `DataTable` rows and `RowButton` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`.
215
+ A marked element inside a `DataTable` row detail within `rows.ref` (a row of a table nested in the detail) belongs to that nested list: `LoadMore` neither counts it nor moves focus to it, so a table whose details hold tables pages its own records.
216
+ In the first commit after a press, `LoadMore` throws when `rows.ref` is not attached or holds a number of marked elements other than `rows.count`.
167
217
  - The focus ring (2 px `focus`, 2 px outset) is drawn only on the elements the package lets take focus; host controls placed inside the root keep their own focus style.
168
218
  - `Toolbar` is one stop in the Tab order (a roving tabindex over its buttons, `aria-disabled` ones included): Tab enters it at the control that last had focus (the first until then), the arrow keys move to the next and previous control and wrap around (swapped in a right-to-left toolbar), and Home and End move to the first and the last. `Tabs` and `Breadcrumb` are real links, each in the Tab order.
169
219
  - `Dialog` opens with `showModal()`, so the browser traps focus in it, makes the rest of the document inert and closes it on Escape; focus starts on its close button and returns, when it closes or unmounts open, to the element that had it when it opened. `onClose` is called when the operator closes it (the close button or Escape), not when the caller sets `open` to `false`. Escape does not close it while focus is in a text field holding a value, as `useEscapeToClose`.
@@ -179,6 +229,7 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
179
229
  `JobCard`'s state line is a live region of its own (polite and atomic, holding the job's hidden name and its state pill), so a changed state is read as `<name> <state>` without moving focus or interrupting (WCAG 2.2.4), exactly as drawn.
180
230
  The check needs the `:modal` selector (Chrome 105, Firefox 103, Safari 15.6): `ConsoleUiRoot` probes it once when it mounts and throws there, naming the requirement, in a document without it.
181
231
  A console that is not rendered is not checked: an ancestor with `hidden` or `display: none`, `visibility: hidden` or `content-visibility: hidden`, a closed `<details>` or `<dialog>`, or `<Activity mode="hidden">` (which detaches the announcer while keeping the root) hides the console from the operator as well, so its announcements are dropped without an error, as after unmount. A host that must not lose an outcome keeps the console rendered until the outcome is read.
232
+ - A `Card`, or a `CardSection` with `region`, that the operator closes with Escape takes `onEscape` (`useEscapeToClose` on the element: the press inside calls it and does not reach an enclosing region); without `onEscape` the element has no key handler, so the press reaches the region around it. Returning focus to the control that opened it is the caller's. A non-modal region such as an inspector is drawn this way rather than as a `role="dialog"`.
182
233
  - `useEscapeToClose(onClose)` ignores Escape during IME composition and in a text field that holds a value, including a partly typed date, time or number field (its `value` is `""` while `validity.badInput` is true): closing the region would discard what the operator typed.
183
234
  Escape changes nothing in most of these fields (a `text`, `number` or `textarea` value stays; only a `search` field clears its value), so the operator leaves the field (Tab) or empties it before Escape closes the region.
184
235
 
@@ -245,19 +296,21 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
245
296
  | Component / hook | Contract |
246
297
  | --- | --- |
247
298
  | `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS` | Root, token scope, language, format locale, time zone, announcer and its quiet window. |
248
- | `Text`, `VisuallyHidden` | Text in a role, a type step and optionally a face (`face="mono"` for identifiers); text read by assistive technology but not drawn. |
249
- | `Card`, `CardSection` | `h2` card (a named region that draws its content in the body type and the sans face) and flat `h3` section (a landmark only with `region`, for a non-modal region such as an inspector); `headingRef` makes the heading a programmatic focus target (`tabIndex={-1}`). A card or section that another control expands takes that control's `aria-controls` target as its `id` (the detail of a `SelectableList` is `<CardSection id={detailId} …>`), so the reference resolves. |
250
- | `Stack`, `Cluster` | Vertical and wrapping horizontal layout with a spacing token. |
251
- | `Button`, `Link` | Buttons that keep focus when they cannot act; an in-document move drawn as a link (no `href`). |
299
+ | `Text`, `VisuallyHidden` | Text in a role, a type step and optionally a face (`face="mono"` for identifiers; an inline text that names a face is aligned to the top of its line, so the line stays on the lattice, see Layout); `space="preserve"` keeps the spaces and line breaks as written (`white-space: pre-wrap`, `data-cui-space="preserve"`) for a multi-line value such as a JSON document in a table cell or a line of a diff, whose kept lines still wrap at the column (unlike `CodeBlock`, no scroll frame and no focus stop); a paragraph (`as="p"`) carries the reading measure. Text read by assistive technology but not drawn. |
300
+ | `Card`, `CardSection` | `h2` card (a named region that draws its content in the body type and the sans face) and flat `h3` section (a landmark only with `region`, for a non-modal region such as an inspector; `level={4}` draws an `h4` in the same step and weight for a section inside a section, so the outline does not skip a level); `headingRef` makes the heading a programmatic focus target (`tabIndex={-1}`). `onEscape` closes a card or a region section on Escape (only a region takes it; see Focus and announcements). A card or section that another control expands takes that control's `aria-controls` target as its `id` (the detail of a `SelectableList` is `<CardSection id={detailId} …>`), so the reference resolves. |
301
+ | `Stack`, `Cluster` | Vertical and wrapping horizontal layout with a spacing token; `Cluster as="span"` is the phrasing form a control's content may hold (an inline-flex `span`, same gap tokens). |
302
+ | `List`, `ListItem` | A list of items stacked with a spacing token (`gap`): a `ul` or an `ol` with an explicit `role="list"` (WebKit with VoiceOver does not expose a list without markers as a list), its items `li` that take the caller's `testId` (one for the items of a list, or one per item) and `dataAttributes` for their identity; the list derives no test id. `marker="bullet"` (a `ul`) or `"number"` (an `ol`) draws the foundation's markers in the items' `type` (`body` or `prose`) for items whose content carries no marker of its own (lines of text); `marker="none"` keeps the semantics and draws nothing for items that carry their own name, number or box (a disclosure, a row with a control, a link, a line that starts with its own number), and `ordered` picks the `ol` when the order means something. A marked list has a marker column at least 16 px (`space-4`) wide and as wide as its widest marker, shared by every item (a subgrid), and the text 8 px (`space-2`) after it: 24 px for a bullet and the numbers 1 to 9, further out together for longer numbers or wider text spacing. A list without markers carries its `gap` as `data-cui-gap`; a marked list, whose two axes differ, carries it as `data-cui-row-gap` (between the items) and the 8 px as `data-cui-column-gap="space-2"` (see Layout for what each attribute promises). The marker is one line of the list's type at the top of its item, in the text colour the item inherits: it never changes the item's height, it is text measured at 7:1 like any text (`scanColourRoles` reads one text per item) and forced colours repaint it as text; a bullet is hidden from assistive technology, a number is read. Items have no padding or border, so n items of k lines of a line L apart by g are nkL + (n − 1)g px high, on the lattice. An item may hold block content (a disclosure, a paragraph, a row of labels); a marked list's item text carries the reading measure. `label` names the list (`aria-label`; a blank one throws `RangeError` naming `testId`); `id` and `hidden` make it the `aria-controls` target of the control that shows it. `ListItem` throws outside a `List` and inside another item's content without a `List` of its own. |
303
+ | `Button`, `Link`, `FragmentLink` | Buttons that keep focus when they cannot act; an in-document move drawn as a link (no `href`); a real link to a place in the same document (`href="#<targetId>"`, drawn like `Link`, with an optional `onFollow` called after the press), for a jump list whose entries assistive technology should list with the links. |
252
304
  | `Pill` | A text status label, 28 px high (a body line it sits on stays 20 px), text width + 16 px wide, `vertical-align: top`; as a line of a `RowButton` it keeps that width. A line mixing a `Pill` and text is one `Text` span containing the `Pill`. |
253
- | `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. |
254
- | `Measured` | A count, or the `unmeasured` label for `null` (never `0`). |
255
- | `MetricTile`, `TileGrid` | Metric tiles (100 px high) and the divisor grid. `count` is checked against the element children: a Fragment's children count one by one, a condition that renders no tile (`false`, `null`) does not count, a text child throws, and a component child counts as one tile whatever it renders (a wrapper returning `null` or two tiles is still one), so render `MetricTile` elements directly. |
256
- | `DataTable`, `LoadMore` | Fixed-layout table in a focusable named scroll frame; load-more that moves focus to the first row the page appended or the end-of-records text. |
305
+ | `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. Both are paragraphs with the reading measure. |
306
+ | `Measured` | A measured value in tabular figures, or the `unmeasured` label for `null` (never `0` or an empty slot), marked `data-measured`: a count (`value`, in the root's format locale, with an optional `unit` after a space) or a text the caller formatted (`text`, such as a byte size, an instant, a version or a rate), never both. A text says how it breaks (`keep`, `data-cui-keep` in both states): `"whole"` for a figure read as one unit (`1.0 MiB`, `2026/09/24 01:00:00`), an inline-block like `Pill` that moves to the next line whole and breaks inside only when it is longer than its column (no `nowrap`, so it never overflows), or `"wrap"` for a text that wraps with its container (an identifier, a version). A `text` or `unit` with nothing to read (`isReadableText`) throws `RangeError` naming `testId`; pass `null` for a value that was not measured. |
307
+ | `InlineChange` | A changed fragment inside a line of text (`children` a string; an empty one throws): `kind="removed"` draws a `<del>` on `danger-tint`, `kind="added"` an `<ins>` on `success-tint`, both in `fg` (16.3 and 16.93 : 1 light, 15.45 and 14.51 : 1 dark), marked `data-cui-change`. The browser's line-through and underline are kept, so the change is not told by colour alone and survives forced colours. Draw it inside the line's `Text` (`space="preserve"` when the line's spaces matter). |
308
+ | `MetricTile`, `TileGrid` | Metric tiles (100 px high) and the divisor grid. A tile's value is a `Measured` count (`value`, optionally with `unit`) or text (`text`), `null` while not measured, when it must be `neutral`; its label, sublabel and value are paragraphs with the reading measure. `count` is checked against the element children: a Fragment's children count one by one, a condition that renders no tile (`false`, `null`) does not count, a text child throws, and a component child counts as one tile whatever it renders (a wrapper returning `null` or two tiles is still one), so render `MetricTile` elements directly. |
309
+ | `DataTable`, `LoadMore` | Fixed-layout table in a focusable named scroll frame; load-more that moves focus to the first row the page appended or the end-of-records text. A column header may carry a second line under its name (`ColumnDef.note`, a block in the regular weight inside the `th`, so it is part of the header every cell is read with; k caption lines make the header row 44 + 20k). One column may be the row header (`ColumnDef.rowHeader`: its cells are `th scope="row"`, centred like the other cells in a `row-control` table; two throw `RangeError`). The row header column may carry secondary lines per row under its cell's content (`ColumnDef.rowHeaderNote: (row) => ReactNode`, `null` for a row without one): a block in the regular weight inside the bold `th`, drawn like a column header's note, so the lines are part of the row header every cell of the row is read with, and a `row` row with k body lines of note is 24 + 20(k + 1), on the lattice. Only the row header column takes one: the type refuses it on another column, and a column that has one without being the row header throws `RangeError` naming `testId`. `rowDetail` (`open`, `id`, `render`) follows every record row with its detail row, one cell across every column whose `id` is the `aria-controls` of the row's opening button (`Button` with `expanded` and `controls`): open, it shows `render(row)` right after its row in the reading and focus order, any number at once; closed, it is `hidden` and empty, so a collapsed button's reference resolves too. A detail row carries `data-cui-row-detail` (`open` or `closed`) and no row-focus hook, and adds no rule: its cell keeps the table's cell padding, so it stays on the lattice. `rowSize` is `row` (44 px rows), `row-control` (52 px, for rows that hold a control) or `row-compact` (28 = 4 + 20 + 3 + 1: one `body` line with 4 px above and below, k lines 8 + 20k) for a read-only line table such as a text diff, where 500 lines are 14,000 px high instead of 22,000. A compact row holds no control or focus target, as a control's 44 px target does not fit it: a cell holding a link, a button, a field, a disclosure, a label, an element with `tabindex` or `contenteditable` or a nested table throws `RangeError` naming `testId` after the render, and a compact table takes no `rowDetail` (the type refuses it). |
257
310
  | `CodeBlock` | Preformatted text (a JSON document, an excerpt of a log) drawn exactly as given in the mono face and the `body` type, without wrapping, in a scroll frame on `sunken` with 8 px padding: a region named by `label` that takes keyboard focus, so a long line can be scrolled into view from the keyboard. As a focusable frame it is never lower than the 44 px target (one line draws 44 px; k lines draw 2 × 8 + 20k px from two lines on). |
258
311
  | `SelectableList`, `RowButton` | Master list of selectable rows (`data-selected`, `aria-expanded`, `aria-controls`); the list carries an explicit `role="list"`, which WebKit needs to expose an unstyled list as a list. |
259
312
  | `ComparisonGrid` | Side-by-side comparison: a table named by its (visually hidden) `caption`, or one group per column named by its heading. Both layouts are in the DOM; each cell is a function called once per layout with `"table"` or `"stack"`, so every cell is rendered and mounted twice (the hidden copy included) and the caller gives each copy its own ids, test ids and refs. Cells must be presentational: no data read (`useResource`), announcement (`useAnnounce`) or focus management (`useFocusRescue`); keep state and effects above the grid and pass values into the cells. |
260
- | `Field`, `TextInput`, `PasswordInput`, `TextArea`, `Select`, `RadioGroup` | Fields tied to their label, description and error with `useId`. `PasswordInput` masks what is typed, tells the browser's password manager what the password is (`autoComplete`: `new-password` for one the operator sets, `current-password` for a sign-in) and turns spell checking and capitalization off. |
313
+ | `Field`, `TextInput`, `PasswordInput`, `TextArea`, `Select`, `RadioGroup`, `CheckboxGroup` | Fields tied to their label, description and error with `useId`. `PasswordInput` masks what is typed, tells the browser's password manager what the password is (`autoComplete`: `new-password` for one the operator sets, `current-password` for a sign-in) and turns spell checking and capitalization off. `TextInput` takes the keyboard a touch device shows (`inputMode`: `numeric` or `decimal`; its value stays the typed text, which the caller parses) and fixed text drawn in front of the input in the same frame (`prefix`, such as a URI scheme; not part of the value, and the first text describing the input; a blank prefix throws). `TextInput`, `PasswordInput` and `Select` in a table cell or a repeated row whose headers show the name may hide their label (`labelHidden`; it stays tied by `for`). `CheckboxGroup` is a `fieldset` of native check boxes, each inside its 44 px label; it returns the chosen values in the options' order and refuses no option, repeated values and chosen values that are not options. Every field takes `errorId`, the id its error line takes (one token; generated when omitted), so another control can name the error as the reason it cannot act, such as the save button of a table row whose typed value cannot be read (`unavailable={{ reasonId: errorId }}`). Read a number field's text with `readDecimalText` or `readIntegerText`. |
261
314
  | `ProgressBar` | Determinate with a maximum (clamped at 100 %); indeterminate without, drawn as a quarter-length segment that sweeps the track when motion is allowed and rests in its middle otherwise. The visible label names the bar; the visible value text is hidden from assistive technology, which reads it once as the bar's `aria-valuetext`. |
262
315
  | `Meter` | A value at its place in a fixed range (a score in [0, 1], a share of a quota), not progress: `role="meter"` named by `label` (no visible label; the row or field around it says what it measures), its fill in `info-accent` on a `sunken` track as long as the value's place in the range, beside the value text in `fg` (hidden from assistive technology, which reads it once as the meter's `aria-valuetext`). It is phrasing content that fits one `body` line, so it can be a line of a `RowButton`: it takes its parent's whole width even where the parent aligns its lines to the start (a `RowButton`), and the 8 px track is centred on the value text's 20 px line and takes the width left after the text, never less than 48 px. Refuses a range that is not finite or whose `min` is not below `max`, and a value outside the range. |
263
316
  | `MasterDetail` | Master–detail layout by container width; side by side, neither pane goes below its minimum. |
@@ -265,15 +318,17 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
265
318
  | `Tabs` | The tab row of a console whose tabs are routes: a named `nav` of real links (not an ARIA `tablist`), the current one `aria-current="page"` with an `info-accent` marker and the medium weight. A plain click hands the tab's `href` to `onNavigate` (the host's router); a click with a modifier key or another button keeps the link's own behaviour. |
266
319
  | `Breadcrumb` | The trail to the current page: a `nav` named by the UI language's `breadcrumb` label around an ordered list of the ancestors' links (drawn like `Link`) and the current page's name as `aria-current="page"` text; separators are hidden from assistive technology. Clicks as `Tabs`. |
267
320
  | `Toolbar` | `role="toolbar"` with a roving tabindex over its buttons (see Focus and announcements), laid out like a `Cluster` with an 8 px gap. |
268
- | `Dialog` | A modal `<dialog>` named by its title, with its close button and its own live region (see Focus and announcements); at most 40 ideographs plus its padding wide (WCAG 1.4.8), never wider than the viewport less 24 px on each side. |
269
- | `Switch` | An on/off setting that takes effect at once: `role="switch"` with `aria-checked`, named by its label; the thumb sits at the track's start when off and at its end when on, moving over `motion-1`. |
321
+ | `Dialog` | A modal `<dialog>` named by its title, with its close button and its own live region (see Focus and announcements); at most 40 ideographs plus its padding wide (WCAG 1.4.8), never wider than the viewport less 24 px on each side. `description` (a confirmation's sentence) is drawn under the header as a paragraph with the reading measure and is the dialog's `aria-describedby`, so it is read with the dialog's name when the dialog opens; without it the dialog has no description. |
322
+ | `Figure`, `FigureNode`, `FigureEdge` | A drawing of nodes and edges (see Figures): `kind="group"` (a named `role="group"` at its natural size in a scroll frame, every node a 44 px toggle button with the foundation's focus ring, `onEscape`) or `kind="decorative"` (`aria-hidden`, cut down to the lattice as its container shrinks; `viewBox`, `pointer` and `svgRef` for a pannable one). `FigureNode` draws a box (`x`, `y` its top-left corner; a name, caption `notes` and a height from `figureBoxPlan`) or a disc (`x`, `y` its centre; its name under it, or none for `name: null`) in a `tone`, `selected` or not, with a `solid` or `dashed` outline, an optional tooltip (`title`) and, in a group figure, `press` (`label`, `description`, `expanded`, `controls`, `onPress`). `FigureEdge` draws a path (`d`) in an `emphasis` (`normal` or `high`) and a `weight` (1 to 4), with an optional arrowhead and tooltip. The parts paint only through role attributes and take no paint, class or style; `FigureNode` and `FigureEdge` throw outside a `Figure`, and every refusal (`RangeError`) names the part's `testId`: a size off the lattice, a blank name (or a box's `null` one), a box narrower than its plan, a note role not in the table on a face the node takes, a group node without `press` or a decorative one with it, a pressable node below 44 px or closer than 4 px to the edge, and a weight outside 1–4. |
323
+ | `Switch` | An on/off setting that takes effect at once: `role="switch"` with `aria-checked`, named by its label; the thumb sits at the track's start when off and at its end when on, moving over `motion-1`. In a table cell whose headers show the name it may hide its label (`labelHidden`; the target is the 44 px box across the 52 px track). A cell holding more than one switch shows which is which instead: each label is a short visible name after a `VisuallyHidden` subject (the row and the column), so the name stays whole and contains the visible name. Takes `unavailable`, a `ref` and caller `dataAttributes`. |
324
+ | `PanelTabs` | Tabs that switch one panel within the page: a `tablist` of `tab` buttons (the selected one `aria-selected`, drawn like a `Tabs` tab) and the `tabpanel` they control, named by the selected tab; a press on the selected tab asks for nothing. The panel may be described by visible text inside it (`panelDescribedBy`, such as a hint on scrolling a wide figure). A list of one tab is allowed. Refuses no tab, repeated keys and a selected key that is not a tab. |
270
325
  | `Slider` | A labelled native `input type="range"` whose value text is its `aria-valuetext`, drawn beside it and hidden from assistive technology; changes arrive as numbers. Refuses a range that is not finite, `min` not below `max`, a step that is not positive and a value outside the range. |
271
326
  | `SegmentedControl` | One choice among a few options: a named group of toggle buttons (`aria-pressed`) with exactly one pressed (`info-solid` with `on-solid` text); a press on the pressed option asks for nothing. Needs two or more options with unique values. |
272
- | `Disclosure` | A button with `aria-expanded` and `aria-controls` over the panel it shows and hides (`hidden` while closed), with a ▸ / ▾ marker; the open state is the caller's. |
327
+ | `Disclosure` | A button with `aria-expanded` and `aria-controls` over the panel it shows and hides (`hidden` while closed), with a ▸ / ▾ marker; the open state is the caller's. The `summary` is the button's content and name: text and non-interactive phrasing elements (a `Text` span, a `Pill`, a `Measured`), whose words join the name; a `Pill` keeps the button 44 px. A summary holding anything else (a paragraph, a `div`, a link, a button, an element with `tabindex` or `contenteditable`) throws `RangeError` after it renders; a group of labels is a `Cluster as="span"`. |
273
328
  | `DescriptionList` | A `dl` of name–value rows (`dt` and `dd` grouped in a `div`), the term a third of the row in `fg-secondary`. |
274
329
  | `Stepper` | A job's steps as a named ordered list: the current step `aria-current="step"`, the others followed by the hidden `stepDone` or `stepPending` word; a finished step's marker is a check mark on `success-solid`, the current one its number on `info-solid`. The states must run done, at most one current, then pending. |
275
330
  | `JobCard` | One job in a `Card`: its state pill in a live region of its own, an optional `ProgressBar` and an optional cancel button in the card's actions that is busy while the cancel is under way. |
276
- | `useEscapeToClose`, `useFocusRescue`, `useResource`, `usePagedResource`, `ResourceFailed` | See above. |
331
+ | `useEscapeToClose`, `useFocusRescue`, `usePendingPress`, `useResource`, `usePagedResource`, `ResourceFailed` | See above. |
277
332
 
278
333
  Every component except `Text` requires `testId`, exposes its state as `data-*` attributes, takes no `className`, and accepts caller `data-*` attributes through `dataAttributes` where a host needs to mark it (`data-cui-*` and `data-testid` are reserved and rejected there). The one `data-cui-*` attribute a host writes itself is the row-focus hook `data-cui-row-focus`, on the row elements of its own row list (see Focus and announcements).
279
334
 
@@ -282,23 +337,27 @@ The test ids a component derives from its `testId` are public test hooks:
282
337
  | Component | Derived test ids |
283
338
  | --- | --- |
284
339
  | `ConsoleUiRoot` | `<testId>-announcer` (the live region) |
340
+ | `Card`, `CardSection` | `<testId>-heading` (the title: a card's `h2`, a section's `h3` or `h4`) |
285
341
  | `Tabs` | `<testId>-<id>` (each tab's link) |
286
342
  | `Breadcrumb` | `<testId>-<id>` (each ancestor's link), `<testId>-current` (the current page's name) |
287
- | `Dialog` | `<testId>-close` (the close button), `<testId>-announcer` (the dialog's live region) |
288
- | `Switch` | `<testId>-track`, `<testId>-thumb` |
343
+ | `Dialog` | `<testId>-close` (the close button), `<testId>-announcer` (the dialog's live region), `<testId>-description` (the `description` paragraph) |
344
+ | `Figure` | `<testId>-frame` (the scroll frame of a `group` figure, the anonymous container of a `decorative` one; `testId` itself is on the `<svg>`), `<testId>-arrow-normal`, `<testId>-arrow-high` (the arrowheads) |
345
+ | `FigureNode` | `<testId>-plate` (the box or disc), `<testId>-name` (its name; absent for a disc drawn without a name), `<testId>-note-<i>` (each note of a box), `<testId>-ring` (the focus ring of a pressable node), `<testId>-description` (the `desc` its `press.description` is drawn in) |
346
+ | `Switch` | `<testId>-track`, `<testId>-thumb`, `<testId>-reason` (the `unavailable` reason it draws) |
347
+ | `PanelTabs` | `<testId>-<id>` (each tab's button), `<testId>-panel` (the `tabpanel`) |
289
348
  | `Slider` | `<testId>-field` (the field root; `testId` itself is on the input), `<testId>-value` (the drawn value text) |
290
349
  | `SegmentedControl` | `<testId>-<value>` (each option's button) |
291
350
  | `Disclosure` | `<testId>-button`, `<testId>-panel` |
292
351
  | `DescriptionList` | `<testId>-<key>` (each row) |
293
352
  | `Stepper` | `<testId>-<id>` (each step) |
294
353
  | `JobCard` | `<testId>-status` (the live region), `<testId>-status-pill`, `<testId>-progress` (with the `ProgressBar` ids), `<testId>-cancel` |
295
- | `Button` | `<testId>-reason` (the `unavailable` reason) |
296
- | `DataTable` | `<testId>-frame` (the scroll frame), `<testId>-empty` (the `empty` text) |
354
+ | `Button` | `<testId>-reason` (the `unavailable` reason it draws) |
355
+ | `DataTable` | `<testId>-frame` (the scroll frame), `<testId>-empty` (the `empty` text), `<rowTestId>-detail` (each record row's detail row, with `rowDetail`) |
297
356
  | `SelectableList` | `<testId>-empty` (the `empty` text) |
298
357
  | `LoadMore` | `<testId>-button`, `<testId>-failure`, `<testId>-end` |
299
358
  | `ResourceFailed` | `<testId>-alert`, `<testId>-reload` |
300
- | `TextInput`, `PasswordInput`, `TextArea`, `Select` | `<testId>-field` (the field root; `testId` itself is on the control), `<testId>-description`, `<testId>-error` |
301
- | `Field`, `RadioGroup` | `<testId>-description`, `<testId>-error`; `RadioGroup` also `<testId>-option-<value>` |
359
+ | `TextInput`, `PasswordInput`, `TextArea`, `Select` | `<testId>-field` (the field root; `testId` itself is on the control), `<testId>-description`, `<testId>-error`; `TextInput` also `<testId>-prefix` (the `prefix` text); `Select` also `<testId>-reason` (the `unavailable` reason it draws) |
360
+ | `Field`, `RadioGroup`, `CheckboxGroup` | `<testId>-description`, `<testId>-error`; `RadioGroup` and `CheckboxGroup` also `<testId>-option-<value>` (each option's input) |
302
361
  | `ProgressBar` | `<testId>-bar` (the `progressbar`), `<testId>-fill`, `<testId>-value` (the visible value text) |
303
362
  | `Meter` | `<testId>-bar` (the `meter`), `<testId>-fill`, `<testId>-value` (the visible value text) |
304
363
  | `CodeBlock` | `<testId>-code` (the `pre`; `testId` itself is on the frame) |
@@ -326,7 +385,8 @@ Announcements are written once the quiet window passes (`ANNOUNCE_SETTLE_MS`, 15
326
385
 
327
386
  `ConsoleUiRoot` needs a test DOM that parses the `:modal` selector (see Focus and announcements): jsdom 27 or later. On jsdom 26 and earlier the root throws when it mounts (`ConsoleUiRoot requires the :modal selector …`). jsdom 27 and later, and happy-dom, parse `:modal` but never match it, even after `showModal()`, so a test of an announcement under a modal dialog answers `document.querySelectorAll("dialog:modal")` itself with the dialogs a browser would return, and moves focus as the browser would (into the topmost modal).
328
387
 
329
- jsdom 27 reflects a dialog's `open` but implements neither `showModal()` nor `close()`, which `Dialog` calls, so a test of a `Dialog` installs both on `HTMLDialogElement.prototype` first: a model that sets and removes `open`, focuses the dialog's first focusable descendant, returns focus on close to the element that had it at the open, and fires `close` in a later task (the browser's order). It cannot make the rest of the document inert.
388
+ jsdom 27 reflects a dialog's `open` but implements neither `showModal()` nor `close()`, which `Dialog` calls, so a test of a `Dialog` installs both on `HTMLDialogElement.prototype` first with `installDialogModel()` from `@aiquants/console-ui/testing`, once in the test setup (it installs only where `showModal()` is missing): a model that sets and removes `open`, focuses the dialog's first focusable descendant, returns focus on close to the element that had it at the open, and fires `close` in a later task (the browser's order). It cannot make the rest of the document inert.
389
+ `openModals()` returns the dialogs a browser would match with `dialog:modal`, in the order they opened (answer `document.querySelectorAll("dialog:modal")` with it), and `pressEscape(dialog)` plays the browser's Escape: a cancelable `cancel`, then `close()` unless it was cancelled. The package's own tests read the model through the same entry.
330
390
 
331
391
  jsdom does not evaluate container queries, so only the layout components' default rules apply there. For `ComparisonGrid` that is the stacked layout: the column groups and the `stack` copy of every cell are shown and reachable by role, while the table is `display: none` and therefore not in the accessibility tree. Query the stacked copy (for example a cell test id `tie-stack`, or `getByRole("group", { name })`), and pass `hidden: true` to reach the table (`getByRole("table", { name, hidden: true })`); `toBeVisible()` is false for the table and its cells.
332
392
 
@@ -0,0 +1 @@
1
+ var X=new Map,S=(e,n)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let r=X.get(n);return r===void 0&&(r=new Intl.NumberFormat(n,{maximumFractionDigits:0,useGrouping:!0}),X.set(n,r)),r.format(e)},G=(e,n)=>n===void 0?e:`${e} ${n}`;var xe=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,he=/[!-~]/g;var ke=/^[^eE]*[1-9]/,j=e=>{let n=e.replace(he,t=>String.fromCharCode(t.charCodeAt(0)-65248)).trim();if(!xe.test(n))return null;let r=Number(n);return Number.isFinite(r)?r===0?ke.test(n)?null:0:r:null},Pe=e=>{let n=j(e);return n!==null&&Number.isSafeInteger(n)?n:null};var Ce=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m=e=>Ce.test(e);var l=class extends RangeError{reason;constructor(n,r){super(r),this.name="ZonedTimeError",this.reason=n}},Re=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Ee=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Se=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Y=864e5,I=6e4,P={min:1,max:9999},K=new Map,V=new Map,_e=e=>{let n=K.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),K.set(e,n)),n},J=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},w=(e,n)=>{let[r,t,o,s,u,i,k]=n;if(k!==void 0&&/[1-9]/.test(k))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(r),month:Number(t),day:Number(o),hour:Number(s),minute:Number(u),second:i===void 0?0:Number(i)},z=g.year>=P.min?J(g):null;if(z===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:z}},O=(e,n)=>{let r=new Map(_e(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),t={year:Number(r.get("year")),month:Number(r.get("month")),day:Number(r.get("day")),hour:Number(r.get("hour")),minute:Number(r.get("minute")),second:Number(r.get("second"))};if(r.get("era")!=="AD"||t.year>P.max)throw new l("malformed",`The wall clock falls outside years ${P.min}-${P.max}: ${new Date(e).toISOString()}`);return t},_=(e,n)=>J(O(e,n))-e,p=e=>String(e).padStart(2,"0"),q=(e,n)=>{let r=`${String(e.year).padStart(4,"0")}-${p(e.month)}-${p(e.day)}T${p(e.hour)}:${p(e.minute)}`;return n||e.second!==0?`${r}:${p(e.second)}`:r},Ie=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${p(Math.floor(n/60))}:${p(n%60)}`},we=(e,n)=>{let r=Re.exec(e);if(r===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:t,millis:o}=w(e,r.slice(1)),u=[...new Set([_(o-Y,n),_(o+Y,n)])].filter(i=>_(o-i,n)===i);if(u.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(u.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${q(t,!0)}${Ie(u[0])}`},Z=(e,n)=>{let[r,t,o,s]=n;if(r!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(t==="-"?-1:1)*(Number(o)*60+Number(s))*I},Oe=(e,n)=>{let r=Ee.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:t}=w(e,r.slice(1,8));return q(O(t-Z(e,r.slice(8)),n),!1)},Me=(e,n)=>{let r=JSON.stringify([e,n]),t=V.get(r);return t===void 0&&(t=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),V.set(r,t)),t},M=(e,n,r)=>{let t=Se.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=w(e,[...t.slice(1,7),void 0]),s=o-Z(e,t.slice(7));return O(s,r),Me(n,r).format(s)};var Q=403,Ne=(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,Fe=(e,n)=>e.ok?n(e.value):e,wn={kind:"idle"},Le={kind:"loading"},N=(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Le,F=(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,ee=e=>(n,r,t)=>n.status===403?e(r,n.reason):t(n.reason),ne=(e,n)=>n===""?e:`${e} Reason: ${n}.`,re=(e,n)=>n===""?e:`${e}${n}\u3002`,C={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:ee(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:ee(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ae=e=>{if(!Object.hasOwn(C,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(C).join(", ")}`);return C[e]};var $e=4,De=[1,2,3,4,6,8,12,16,24],ve=16,Ue=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},We=11,te=3/2,He=7/4,Be=7/4,ze=120,Xe=3/2,Ge=[1,2,3],oe=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},$=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(We,Math.round(ve*Ue**e))},D=(e,n)=>oe(e*n),ae=D($(A.body),te),f=ae+24,ie=f+8,se=ae+8,L={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},je=()=>Object.fromEntries(De.map(e=>[`space-${e}`,e*4])),Ye=()=>{let e=Object.fromEntries(Object.entries(A).map(([r,t])=>{let o=$(t);return[r,{size:o,lineHeight:D(o,r==="title"?Be:te)}]})),n=$(A.body);return{...e,prose:{size:n,lineHeight:D(n,He)}}},Ke=()=>Object.fromEntries(Ge.map(e=>[`motion-${e}`,ze*Xe**(e-1)])),le=e=>Object.freeze({space:Object.freeze(je()),type:Object.freeze(Ye()),weight:L.weight,radius:L.radius,size:Object.freeze({"size-target":f,"size-control":f,"size-row":f,"size-row-control":ie,"size-row-compact":se}),stroke:L.stroke,motion:Object.freeze(Ke()),color:Object.freeze({...e})});var Ve={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a=le(Ve),Je="--cui-",qe=e=>`var(${Je}${e})`;var Ze=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,de=(e,n)=>{let r=0,t=0;for(let o of e)Ze(o.codePointAt(0))?t+=1:r+=1;return r*1+t*n},b=e=>de(e,.55),x=e=>de(e,.6),c=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",H=2*a.space["space-3"],ce={type:"caption",paddingInlinePx:2*a.space["space-2"]},v={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},me={type:"body",minInlinePx:a.size["size-target"]},R={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},U={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},Qe=10,en="2000-01-01T00:00:00Z",nn=9999999,pe=(e,n,r)=>(n==="mono"?x(e):b(e))*a.type[r].size,rn=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let r of e)if(!m(r))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(r)}`);return e},d=(e,n,r,t)=>Math.max(...rn(e,n).map(o=>pe(o,r,t))),B=e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",ce.type)+ce.paddingInlinePx;case"button":return Math.max(v.minInlinePx,d(e.labels,"button","sans",v.type)+v.paddingInlinePx);case"link":return Math.max(me.minInlinePx,d(e.labels,"link","sans",me.type));case"switch":return e.labelHidden?R.trackInlinePx:R.trackInlinePx+R.labelGapPx+d(e.labels,"switch","sans",R.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((n,r)=>n+B(r),0)+(e.items.length-1)*a.space[e.gap]}}},tn=(e,n)=>{let r=d([e.header],"column header","sans",ue),t=e.note===void 0?0:d(e.note,"column header note","sans",ue);return c(Math.max(r,t,...n.map(B))+H)},on=c(pe("\u3042".repeat(Qe),"sans",W)+H),an=e=>c(d(e,"comparison attribute","sans",W)+H),sn=(e,n)=>M(en,e,n),ln=(e,n)=>{if(n!==void 0&&!m(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return G(S(nn,e),n)},dn=(e,n)=>c(Math.max(d(e,"tile caption","sans",U.captionType),d(n,"tile value","sans",U.valueType))+U.paddingInlinePx);var un=.12,cn=.16,mn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,h=a.space["space-3"],E=(e,n)=>{let r=0,t=0;for(let s of e)r+=1,mn.test(s)&&(t+=1);return(n==="mono"?x(e):b(e))+un*r+cn*t},pn=e=>{for(let r of[e.name,...e.notes])if(!m(r))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(r)}`);let n=Math.max(E(e.name,"sans")*a.type.body.size,...e.notes.map(r=>E(r,"sans")*a.type.caption.size));return{minWidthPx:c(n)+2*h,heightPx:2*h+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},Gn=e=>{let n=h+a.type.body.lineHeight;return{insetPx:h,namePx:h+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(r,t)=>n+t*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},yn=(e,n)=>{if(e!==null&&!m(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+ye}:{widthPx:c(E(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},ye=a.stroke["focus-offset"]+a.stroke["focus-width"],jn=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var gn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},y=e=>`${gn(e)/16}rem`;var ge=(1+Math.sqrt(5))/2,Te=({masterMinPx:e,detailMinPx:n,gapPx:r})=>{for(let t of[e,n])if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Pane minimum must be a positive px value: ${t}`);if(!(Number.isFinite(r)&&r>=0))throw new RangeError(`Gap must be a px value >= 0: ${r}`);return e+r+n},Tn=(e,n)=>{let r=Te(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<r)return{sideBySide:!1,sideBySideFromPx:r,masterInlinePx:e,detailInlinePx:e};let t=(e-n.gapPx)/(1+ge),o=Math.min(Math.max(n.masterMinPx,t),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:r,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},Jn=e=>{let n=Te(e),r=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,t=`[data-cui-master-detail="${r}"]`,o=y(e.gapPx),s=`${t}{grid-template-columns:minmax(0,1fr);gap:${o}}`,u=`clamp(${y(e.masterMinPx)},calc((100% - ${o}) / ${1+ge}),calc(100% - ${o} - ${y(e.detailMinPx)}))`,i=`@container (min-width:${y(n)}){${t}{grid-template-columns:${u} minmax(0,1fr)}}`;return{key:r,css:s+i}};var fn=2*a.space["space-1"],fe=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},be=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,r=null;for(let{width:t}of e){if(t.fixedPx!==void 0){n+=fe(t.fixedPx);continue}let o=fe(t.minPx);if(r!==null&&r!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${r} and ${o}`);r=o,n+=o}return n},bn=e=>be(e)+fn;var xn=(e,n,r)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(r)&&r>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${r}`);let t=[];for(let i=1;i<=e;i+=1)e%i===0&&t.push({columns:i,minContainerPx:i*n+(i-1)*r});let o=`cui-tiles-n${e}-m${n}-g${r}`,s=`[data-cui-tile-grid="${o}"]`,u=t.map(({columns:i,minContainerPx:k})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${y(k)}){${g}}`});return{key:o,steps:t,css:u.join("")}};var hn=(e,n)=>{let r=N(e,n);return r.kind==="ready"?{...r,value:{...r.value,loadingMore:!1}}:r},kn=(e,n)=>F(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),Pn=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Cn=(e,n,r)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(r.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...r.value.rows],next:r.value.next,loadingMore:!1,moreFailure:null}};let t=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:r.reason,occurrence:t}}}},Rn=(e,n)=>{if(e.kind!=="ready")return e;let{rows:r,meta:t}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:r,meta:t}}};export{S as a,G as b,j as c,Pe as d,m as e,l as f,we as g,Oe as h,M as i,Q as j,Ne as k,Fe as l,wn as m,Le as n,N as o,F as p,T as q,C as r,Ae as s,$e as t,oe as u,f as v,ie as w,se as x,a as y,qe as z,b as A,x as B,c as C,B as D,tn as E,on as F,an as G,sn as H,ln as I,dn as J,E as K,pn as L,Gn as M,yn as N,ye as O,jn as P,y as Q,Tn as R,Jn as S,be as T,bn as U,xn as V,hn as W,kn as X,Pn as Y,Cn as Z,Rn as _};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var X=new Map,S= exports.a =(e,n)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let r=X.get(n);return r===void 0&&(r=new Intl.NumberFormat(n,{maximumFractionDigits:0,useGrouping:!0}),X.set(n,r)),r.format(e)},G= exports.b =(e,n)=>n===void 0?e:`${e} ${n}`;var xe=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,he=/[!-~]/g;var ke=/^[^eE]*[1-9]/,j= exports.c =e=>{let n=e.replace(he,t=>String.fromCharCode(t.charCodeAt(0)-65248)).trim();if(!xe.test(n))return null;let r=Number(n);return Number.isFinite(r)?r===0?ke.test(n)?null:0:r:null},Pe= exports.d =e=>{let n=j(e);return n!==null&&Number.isSafeInteger(n)?n:null};var Ce=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m= exports.e =e=>Ce.test(e);var l=class extends RangeError{constructor(n,r){super(r),this.name="ZonedTimeError",this.reason=n}},Re=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Ee=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Se=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Y=864e5,I=6e4,P={min:1,max:9999},K=new Map,V=new Map,_e=e=>{let n=K.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),K.set(e,n)),n},J=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},w=(e,n)=>{let[r,t,o,s,u,i,k]=n;if(k!==void 0&&/[1-9]/.test(k))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(r),month:Number(t),day:Number(o),hour:Number(s),minute:Number(u),second:i===void 0?0:Number(i)},z=g.year>=P.min?J(g):null;if(z===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:z}},O=(e,n)=>{let r=new Map(_e(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),t={year:Number(r.get("year")),month:Number(r.get("month")),day:Number(r.get("day")),hour:Number(r.get("hour")),minute:Number(r.get("minute")),second:Number(r.get("second"))};if(r.get("era")!=="AD"||t.year>P.max)throw new l("malformed",`The wall clock falls outside years ${P.min}-${P.max}: ${new Date(e).toISOString()}`);return t},_=(e,n)=>J(O(e,n))-e,p=e=>String(e).padStart(2,"0"),q=(e,n)=>{let r=`${String(e.year).padStart(4,"0")}-${p(e.month)}-${p(e.day)}T${p(e.hour)}:${p(e.minute)}`;return n||e.second!==0?`${r}:${p(e.second)}`:r},Ie=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${p(Math.floor(n/60))}:${p(n%60)}`},we= exports.g =(e,n)=>{let r=Re.exec(e);if(r===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:t,millis:o}=w(e,r.slice(1)),u=[...new Set([_(o-Y,n),_(o+Y,n)])].filter(i=>_(o-i,n)===i);if(u.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(u.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${q(t,!0)}${Ie(u[0])}`},Z=(e,n)=>{let[r,t,o,s]=n;if(r!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(t==="-"?-1:1)*(Number(o)*60+Number(s))*I},Oe= exports.h =(e,n)=>{let r=Ee.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:t}=w(e,r.slice(1,8));return q(O(t-Z(e,r.slice(8)),n),!1)},Me=(e,n)=>{let r=JSON.stringify([e,n]),t=V.get(r);return t===void 0&&(t=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),V.set(r,t)),t},M= exports.i =(e,n,r)=>{let t=Se.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=w(e,[...t.slice(1,7),void 0]),s=o-Z(e,t.slice(7));return O(s,r),Me(n,r).format(s)};var Q=403,Ne= exports.k =(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,Fe= exports.l =(e,n)=>e.ok?n(e.value):e,wn= exports.m ={kind:"idle"},Le= exports.n ={kind:"loading"},N= exports.o =(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Le,F= exports.p =(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,ee=e=>(n,r,t)=>n.status===403?e(r,n.reason):t(n.reason),ne=(e,n)=>n===""?e:`${e} Reason: ${n}.`,re=(e,n)=>n===""?e:`${e}${n}\u3002`,C= exports.r ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:ee(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:ee(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ae= exports.s =e=>{if(!Object.hasOwn(C,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(C).join(", ")}`);return C[e]};var $e=4,De=[1,2,3,4,6,8,12,16,24],ve=16,Ue=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},We=11,te=3/2,He=7/4,Be=7/4,ze=120,Xe=3/2,Ge=[1,2,3],oe= exports.u =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},$=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(We,Math.round(ve*Ue**e))},D=(e,n)=>oe(e*n),ae=D($(A.body),te),f= exports.v =ae+24,ie= exports.w =f+8,se= exports.x =ae+8,L={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},je=()=>Object.fromEntries(De.map(e=>[`space-${e}`,e*4])),Ye=()=>{let e=Object.fromEntries(Object.entries(A).map(([r,t])=>{let o=$(t);return[r,{size:o,lineHeight:D(o,r==="title"?Be:te)}]})),n=$(A.body);return{...e,prose:{size:n,lineHeight:D(n,He)}}},Ke=()=>Object.fromEntries(Ge.map(e=>[`motion-${e}`,ze*Xe**(e-1)])),le=e=>Object.freeze({space:Object.freeze(je()),type:Object.freeze(Ye()),weight:L.weight,radius:L.radius,size:Object.freeze({"size-target":f,"size-control":f,"size-row":f,"size-row-control":ie,"size-row-compact":se}),stroke:L.stroke,motion:Object.freeze(Ke()),color:Object.freeze({...e})});var Ve={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a= exports.y =le(Ve),Je="--cui-",qe= exports.z =e=>`var(${Je}${e})`;var Ze=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,de=(e,n)=>{let r=0,t=0;for(let o of e)Ze(o.codePointAt(0))?t+=1:r+=1;return r*1+t*n},b= exports.A =e=>de(e,.55),x= exports.B =e=>de(e,.6),c= exports.C =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",H=2*a.space["space-3"],ce={type:"caption",paddingInlinePx:2*a.space["space-2"]},v={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},me={type:"body",minInlinePx:a.size["size-target"]},R={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},U={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},Qe=10,en="2000-01-01T00:00:00Z",nn=9999999,pe=(e,n,r)=>(n==="mono"?x(e):b(e))*a.type[r].size,rn=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let r of e)if(!m(r))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(r)}`);return e},d=(e,n,r,t)=>Math.max(...rn(e,n).map(o=>pe(o,r,t))),B= exports.D =e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",ce.type)+ce.paddingInlinePx;case"button":return Math.max(v.minInlinePx,d(e.labels,"button","sans",v.type)+v.paddingInlinePx);case"link":return Math.max(me.minInlinePx,d(e.labels,"link","sans",me.type));case"switch":return e.labelHidden?R.trackInlinePx:R.trackInlinePx+R.labelGapPx+d(e.labels,"switch","sans",R.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((n,r)=>n+B(r),0)+(e.items.length-1)*a.space[e.gap]}}},tn= exports.E =(e,n)=>{let r=d([e.header],"column header","sans",ue),t=e.note===void 0?0:d(e.note,"column header note","sans",ue);return c(Math.max(r,t,...n.map(B))+H)},on= exports.F =c(pe("\u3042".repeat(Qe),"sans",W)+H),an= exports.G =e=>c(d(e,"comparison attribute","sans",W)+H),sn= exports.H =(e,n)=>M(en,e,n),ln= exports.I =(e,n)=>{if(n!==void 0&&!m(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return G(S(nn,e),n)},dn= exports.J =(e,n)=>c(Math.max(d(e,"tile caption","sans",U.captionType),d(n,"tile value","sans",U.valueType))+U.paddingInlinePx);var un=.12,cn=.16,mn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,h=a.space["space-3"],E= exports.K =(e,n)=>{let r=0,t=0;for(let s of e)r+=1,mn.test(s)&&(t+=1);return(n==="mono"?x(e):b(e))+un*r+cn*t},pn= exports.L =e=>{for(let r of[e.name,...e.notes])if(!m(r))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(r)}`);let n=Math.max(E(e.name,"sans")*a.type.body.size,...e.notes.map(r=>E(r,"sans")*a.type.caption.size));return{minWidthPx:c(n)+2*h,heightPx:2*h+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},Gn= exports.M =e=>{let n=h+a.type.body.lineHeight;return{insetPx:h,namePx:h+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(r,t)=>n+t*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},yn= exports.N =(e,n)=>{if(e!==null&&!m(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+ye}:{widthPx:c(E(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},ye= exports.O =a.stroke["focus-offset"]+a.stroke["focus-width"],jn= exports.P =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var gn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},y= exports.Q =e=>`${gn(e)/16}rem`;var ge=(1+Math.sqrt(5))/2,Te=({masterMinPx:e,detailMinPx:n,gapPx:r})=>{for(let t of[e,n])if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Pane minimum must be a positive px value: ${t}`);if(!(Number.isFinite(r)&&r>=0))throw new RangeError(`Gap must be a px value >= 0: ${r}`);return e+r+n},Tn= exports.R =(e,n)=>{let r=Te(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<r)return{sideBySide:!1,sideBySideFromPx:r,masterInlinePx:e,detailInlinePx:e};let t=(e-n.gapPx)/(1+ge),o=Math.min(Math.max(n.masterMinPx,t),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:r,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},Jn= exports.S =e=>{let n=Te(e),r=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,t=`[data-cui-master-detail="${r}"]`,o=y(e.gapPx),s=`${t}{grid-template-columns:minmax(0,1fr);gap:${o}}`,u=`clamp(${y(e.masterMinPx)},calc((100% - ${o}) / ${1+ge}),calc(100% - ${o} - ${y(e.detailMinPx)}))`,i=`@container (min-width:${y(n)}){${t}{grid-template-columns:${u} minmax(0,1fr)}}`;return{key:r,css:s+i}};var fn=2*a.space["space-1"],fe=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},be= exports.T =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,r=null;for(let{width:t}of e){if(t.fixedPx!==void 0){n+=fe(t.fixedPx);continue}let o=fe(t.minPx);if(r!==null&&r!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${r} and ${o}`);r=o,n+=o}return n},bn= exports.U =e=>be(e)+fn;var xn=(e,n,r)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(r)&&r>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${r}`);let t=[];for(let i=1;i<=e;i+=1)e%i===0&&t.push({columns:i,minContainerPx:i*n+(i-1)*r});let o=`cui-tiles-n${e}-m${n}-g${r}`,s=`[data-cui-tile-grid="${o}"]`,u=t.map(({columns:i,minContainerPx:k})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${y(k)}){${g}}`});return{key:o,steps:t,css:u.join("")}};var hn=(e,n)=>{let r=N(e,n);return r.kind==="ready"?{...r,value:{...r.value,loadingMore:!1}}:r},kn= exports.X =(e,n)=>F(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),Pn= exports.Y =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Cn= exports.Z =(e,n,r)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(r.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...r.value.rows],next:r.value.next,loadingMore:!1,moreFailure:null}};let t=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:r.reason,occurrence:t}}}},Rn= exports._ =(e,n)=>{if(e.kind!=="ready")return e;let{rows:r,meta:t}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:r,meta:t}}};exports.a = S; exports.b = G; exports.c = j; exports.d = Pe; exports.e = m; exports.f = l; exports.g = we; exports.h = Oe; exports.i = M; exports.j = Q; exports.k = Ne; exports.l = Fe; exports.m = wn; exports.n = Le; exports.o = N; exports.p = F; exports.q = T; exports.r = C; exports.s = Ae; exports.t = $e; exports.u = oe; exports.v = f; exports.w = ie; exports.x = se; exports.y = a; exports.z = qe; exports.A = b; exports.B = x; exports.C = c; exports.D = B; exports.E = tn; exports.F = on; exports.G = an; exports.H = sn; exports.I = ln; exports.J = dn; exports.K = E; exports.L = pn; exports.M = Gn; exports.N = yn; exports.O = ye; exports.P = jn; exports.Q = y; exports.R = Tn; exports.S = Jn; exports.T = be; exports.U = bn; exports.V = xn; exports.W = hn; exports.X = kn; exports.Y = Pn; exports.Z = Cn; exports._ = Rn;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var u=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=u.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},o=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,c=n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*o(e)+.7152*o(s)+.0722*o(r)},f= exports.b =(n,e)=>{let[s,r]=[c(n),c(e)].sort((t,a)=>a-t);return(s+.05)/(r+.05)},g= exports.c ={text:7,largeText:4.5,nonText:3},l= exports.d ={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}}};exports.a = i; exports.b = f; exports.c = g; exports.d = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var u=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=u.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},o=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,c=n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*o(e)+.7152*o(s)+.0722*o(r)},f= exports.b =(n,e)=>{let[s,r]=[c(n),c(e)].sort((t,a)=>a-t);return(s+.05)/(r+.05)},g= exports.c ={text:7,largeText:4.5,nonText:3},l= exports.d ={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}}},b= exports.e ={fg:"text","fg-secondary":"text","fg-muted":"text","danger-fg":"text","warning-fg":"text","success-fg":"text","info-fg":"text","on-solid":"text","danger-accent":"nonText","warning-accent":"nonText","success-accent":"nonText","info-accent":"nonText",focus:"nonText","border-control":"nonText"};exports.a = i; exports.b = f; exports.c = g; exports.d = l; exports.e = b;
@@ -1 +1 @@
1
- var u=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=u.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},o=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,c=n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*o(e)+.7152*o(s)+.0722*o(r)},f=(n,e)=>{let[s,r]=[c(n),c(e)].sort((t,a)=>a-t);return(s+.05)/(r+.05)},g={text:7,largeText:4.5,nonText:3},l={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}}};export{i as a,f as b,g as c,l as d};
1
+ var u=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=u.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},o=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,c=n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*o(e)+.7152*o(s)+.0722*o(r)},f=(n,e)=>{let[s,r]=[c(n),c(e)].sort((t,a)=>a-t);return(s+.05)/(r+.05)},g={text:7,largeText:4.5,nonText:3},l={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}}},b={fg:"text","fg-secondary":"text","fg-muted":"text","danger-fg":"text","warning-fg":"text","success-fg":"text","info-fg":"text","on-solid":"text","danger-accent":"nonText","warning-accent":"nonText","success-accent":"nonText","info-accent":"nonText",focus:"nonText","border-control":"nonText"};export{i as a,f as b,g as c,l as d,b as e};
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA4D4K2WFcjs = require('./chunk-A4D4K2WF.cjs');var _chunkIR2WTSOWcjs = require('./chunk-IR2WTSOW.cjs');exports.CONSOLE_UI_LABEL_CATALOGS = _chunkA4D4K2WFcjs.n; exports.CONTRAST_MINIMUM = _chunkIR2WTSOWcjs.c; exports.CONTRAST_PAIRS = _chunkIR2WTSOWcjs.d; exports.HTTP_FORBIDDEN = _chunkA4D4K2WFcjs.f; exports.LATTICE_PX = _chunkA4D4K2WFcjs.C; exports.ROW_WITH_CONTROL_PX = _chunkA4D4K2WFcjs.F; exports.TARGET_PX = _chunkA4D4K2WFcjs.E; exports.TOKENS = _chunkA4D4K2WFcjs.G; exports.ZonedTimeError = _chunkA4D4K2WFcjs.b; exports.beginPage = _chunkA4D4K2WFcjs.z; exports.beginPagedReload = _chunkA4D4K2WFcjs.x; exports.beginReload = _chunkA4D4K2WFcjs.k; exports.ceil8 = _chunkA4D4K2WFcjs.v; exports.ceilToLattice = _chunkA4D4K2WFcjs.D; exports.contrastRatio = _chunkIR2WTSOWcjs.b; exports.cssVar = _chunkA4D4K2WFcjs.H; exports.flatMapOutcome = _chunkA4D4K2WFcjs.h; exports.formatCount = _chunkA4D4K2WFcjs.a; exports.formatInstant = _chunkA4D4K2WFcjs.e; exports.hexToSrgb = _chunkIR2WTSOWcjs.a; exports.keepLastGood = _chunkA4D4K2WFcjs.l; exports.mapOutcome = _chunkA4D4K2WFcjs.g; exports.mapPagedList = _chunkA4D4K2WFcjs.B; exports.masterDetailPlan = _chunkA4D4K2WFcjs.q; exports.monoTextWidthEm = _chunkA4D4K2WFcjs.u; exports.reasonAside = _chunkA4D4K2WFcjs.m; exports.resolveConsoleUiLabels = _chunkA4D4K2WFcjs.o; exports.settleFirstPage = _chunkA4D4K2WFcjs.y; exports.settlePage = _chunkA4D4K2WFcjs.A; exports.tableMinInlinePx = _chunkA4D4K2WFcjs.s; exports.textWidthEm = _chunkA4D4K2WFcjs.t; exports.tileGridPlan = _chunkA4D4K2WFcjs.w; exports.toOffsetIso = _chunkA4D4K2WFcjs.c; exports.toWallTime = _chunkA4D4K2WFcjs.d;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6WVTEB4Scjs = require('./chunk-6WVTEB4S.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunk6WVTEB4Scjs.x; exports.CONSOLE_UI_LABEL_CATALOGS = _chunk6WVTEB4Scjs.r; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunk6WVTEB4Scjs.O; exports.FLEXIBLE_COLUMN_MIN_PX = _chunk6WVTEB4Scjs.F; exports.HTTP_FORBIDDEN = _chunk6WVTEB4Scjs.j; exports.LATTICE_PX = _chunk6WVTEB4Scjs.t; exports.ROW_WITH_CONTROL_PX = _chunk6WVTEB4Scjs.w; exports.TARGET_PX = _chunk6WVTEB4Scjs.v; exports.TOKENS = _chunk6WVTEB4Scjs.y; exports.ZonedTimeError = _chunk6WVTEB4Scjs.f; exports.beginPage = _chunk6WVTEB4Scjs.Y; exports.beginPagedReload = _chunk6WVTEB4Scjs.W; exports.beginReload = _chunk6WVTEB4Scjs.o; exports.ceil8 = _chunk6WVTEB4Scjs.C; exports.ceilToLattice = _chunk6WVTEB4Scjs.u; exports.cellContentInlinePx = _chunk6WVTEB4Scjs.D; exports.comparisonAttributePx = _chunk6WVTEB4Scjs.G; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunk6WVTEB4Scjs.I; exports.cssVar = _chunk6WVTEB4Scjs.z; exports.figureBoxPlan = _chunk6WVTEB4Scjs.L; exports.figureDiscLabelPlan = _chunk6WVTEB4Scjs.N; exports.fixedColumnPx = _chunk6WVTEB4Scjs.E; exports.flatMapOutcome = _chunk6WVTEB4Scjs.l; exports.formatCount = _chunk6WVTEB4Scjs.a; exports.formatInstant = _chunk6WVTEB4Scjs.i; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunk6WVTEB4Scjs.H; exports.isReadableText = _chunk6WVTEB4Scjs.e; exports.keepLastGood = _chunk6WVTEB4Scjs.p; exports.mapOutcome = _chunk6WVTEB4Scjs.k; exports.mapPagedList = _chunk6WVTEB4Scjs._; exports.masterDetailPlan = _chunk6WVTEB4Scjs.R; exports.monoTextWidthEm = _chunk6WVTEB4Scjs.B; exports.readDecimalText = _chunk6WVTEB4Scjs.c; exports.readIntegerText = _chunk6WVTEB4Scjs.d; exports.reasonAside = _chunk6WVTEB4Scjs.q; exports.resolveConsoleUiLabels = _chunk6WVTEB4Scjs.s; exports.settleFirstPage = _chunk6WVTEB4Scjs.X; exports.settlePage = _chunk6WVTEB4Scjs.Z; exports.spacedTextWidthEm = _chunk6WVTEB4Scjs.K; exports.tableFrameMinInlinePx = _chunk6WVTEB4Scjs.U; exports.tableMinInlinePx = _chunk6WVTEB4Scjs.T; exports.textWidthEm = _chunk6WVTEB4Scjs.A; exports.tileGridPlan = _chunk6WVTEB4Scjs.V; exports.tileMinInlinePx = _chunk6WVTEB4Scjs.J; exports.toOffsetIso = _chunk6WVTEB4Scjs.g; exports.toWallTime = _chunk6WVTEB4Scjs.h;