@aiquants/console-ui 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Quants
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,271 @@
1
+ # @aiquants/console-ui
2
+
3
+ Host-agnostic UI foundation for React admin consoles: design tokens (TypeScript is the source, CSS is generated), a WCAG 2 contrast computation with the palette table, layout arithmetic, number, zoned-time and instant formatting, a read contract with a keep-last-good state machine and a keyset paging state machine, the minimal components a console is drawn with, and the colour-role scan a console runs on its own screens.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js >= 18.0.0
8
+ - React >= 19.0.0 and React DOM >= 19.0.0 (peer dependencies; the layout components emit hoisted `<style href precedence>` elements)
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pnpm add @aiquants/console-ui
14
+ ```
15
+
16
+ ## Entry Points
17
+
18
+ | Import path | Contents |
19
+ | --- | --- |
20
+ | `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
21
+ | `@aiquants/console-ui/core` | React-free: the tokens 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. |
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
+
25
+ The `/core` exports:
26
+
27
+ - Tokens and contrast: `TOKENS`, `cssVar`, `contrastRatio`, `hexToSrgb`, `CONTRAST_PAIRS`, `CONTRAST_MINIMUM`.
28
+ - Layout arithmetic: `textWidthEm`, `monoTextWidthEm`, `ceil8`, `tileGridPlan`, `tableMinInlinePx`, `masterDetailPlan`.
29
+ - Formatting: `formatCount`, `toOffsetIso`, `toWallTime`, `formatInstant`, `ZonedTimeError`.
30
+ - Labels: `CONSOLE_UI_LABEL_CATALOGS`, `resolveConsoleUiLabels`.
31
+ - The read contract: the types `ResourceOutcome<T>` / `ResourceState<T>` / `ReloadCause`, `keepLastGood`, `beginReload`, `mapOutcome` and `flatMapOutcome`.
32
+ - The command contract: the type `CommandOutcome<T, R>` (a command the host can refuse with a structured body, which the failure carries as `rejection`).
33
+ - The keyset paging machine: the types `KeysetPage<T, C, M>` / `NextPage<T, C>` / `PagedValue<T, C, M>` / `PagedState<T, C, M>` / `PageFailure` / `PagedContent<T, M>`, `beginPagedReload`, `settleFirstPage`, `beginPage`, `settlePage` and `mapPagedList`.
34
+
35
+ `@aiquants/console-ui` and `@aiquants/console-ui/core` share one module instance of the core code: the build emits the code several entries reach as a shared chunk per format (ESM / CommonJS), so a host that imports both paths in the same module format gets one copy of every core export and of any module state behind it (for example the `Intl.NumberFormat` cache of `formatCount`).
36
+
37
+ ## Usage
38
+
39
+ Load the stylesheet once, bind the package's neutral font variables to the host's fonts, and wrap the console in `ConsoleUiRoot`.
40
+
41
+ ### Loading the stylesheet
42
+
43
+ Every rule of the stylesheet sits in the cascade layer `cui`. Cascade layers rank in the order they are first declared, and the `cui` layer must rank above any layer that holds a reset: the paddings and borders the layout arithmetic counts (the card's 24 px padding and 1 px rule, the 32 px controls, the 40 px rows) are otherwise overridden by the reset (Tailwind's preflight sets `padding: 0; border: 0 solid` on every element in its `base` layer).
44
+ Unlayered host rules beat every layer whatever their order or specificity, so the host's reset must itself sit in a layer ranked below `cui`: an unlayered reset (normalize.css, modern-normalize, Tailwind v3's `@tailwind base`) overrides the package.
45
+
46
+ - **Tailwind v4 host**: `@import` the stylesheet in the CSS entry after the Tailwind layer statement, so `cui` is declared after `base` (it then ranks last), or name the order explicitly:
47
+
48
+ ```css
49
+ @layer theme, base, components, utilities;
50
+ @import "@aiquants/console-ui/styles/console-ui.css";
51
+ ```
52
+
53
+ ```css
54
+ @layer theme, base, components, cui, utilities;
55
+ @import "@aiquants/console-ui/styles/console-ui.css";
56
+ ```
57
+
58
+ Importing it as `@import "@aiquants/console-ui/styles/console-ui.css" layer(components);` also works: `cui` becomes a sub-layer of `components`, above `base`. The package's rules match only the package's own elements (and its focus ring only the elements it lets take focus), so ranking `cui` above `utilities` does not restyle host elements inside the root.
59
+ - **Host with an unlayered reset**: import the reset into a layer before the package, so the reset's layer is declared first and ranks below `cui`:
60
+
61
+ ```css
62
+ @import "normalize.css" layer(base);
63
+ @import "@aiquants/console-ui/styles/console-ui.css";
64
+ ```
65
+
66
+ - **Host without a CSS build**: import it from JavaScript (`import "@aiquants/console-ui/styles/console-ui.css"`) or link it (`<link rel="stylesheet" href=".../dist/styles/console-ui.css">`) after any stylesheet that declares a reset layer.
67
+
68
+ ### Fonts
69
+
70
+ ```css
71
+ [data-cui-root] {
72
+ --cui-font-sans: var(--font-sans);
73
+ --cui-font-mono: var(--font-mono);
74
+ }
75
+ ```
76
+
77
+ Unbound, the variables fall back to `system-ui, sans-serif` and `ui-monospace, monospace`. The text-width models the layout arithmetic sizes columns with assume a sans face for `textWidthEm` (full-width 1 em, half-width 0.55 em) and a monospace face for `monoTextWidthEm` (half-width 0.6 em, `Text` with `face="mono"`).
78
+ They are estimates, not an upper bound on every face: digits, uppercase Latin and wide letters run wider in some faces (a 13 px `2026/04/01 00:00:00` that the model gives 135.9 px is 137.5 px in DejaVu Sans and 139.5 px in IPAPGothic), so a column sized from the model has no margin beyond the 8 px rounding.
79
+ Bind the variables to faces the models fit; with the generic fallback or while a web font has not loaded, a text that overruns its column wraps inside its cell instead of spilling into the next one.
80
+
81
+ ### Wrapping a console
82
+
83
+ ```tsx
84
+ import { Card, ConsoleUiRoot, Measured } from "@aiquants/console-ui"
85
+
86
+ export const Console = ({ orphanCount }: { orphanCount: number | null }) => (
87
+ <ConsoleUiRoot locale="ja" formatLocale="ja-JP" timeZone="Asia/Tokyo" testId="console">
88
+ <Card title="Tri-Store データ整合性監査" testId="audit">
89
+ <Measured value={orphanCount} unit="件" testId="orphans" />
90
+ </Card>
91
+ </ConsoleUiRoot>
92
+ )
93
+ ```
94
+
95
+ `ConsoleUiRoot` has no default language (`locale` is `"en"` or `"ja"`; anything else throws), validates `formatLocale` as a BCP 47 tag and `timeZone` as an IANA time zone `Intl` knows (both reach the context in canonical form), and has no default for either.
96
+ A console shows every instant with `formatInstant(iso, formatLocale, timeZone)` from the values `useConsoleUi()` returns, so every panel names the same instant with the same string and a page rendered on the server hydrates without a mismatch (the ambient time zone differs between the server and the browser).
97
+ A console has exactly one root: a `ConsoleUiRoot` rendered inside another one throws, because a second root would add a second live region and a second token scope and could switch the language partway through the console. A view that is also used inside a console built on the package therefore takes the root from its host instead of wrapping itself in one.
98
+
99
+ The root sets no font property: host content inside the root keeps its own font family, size, weight and line height, and inherits only the root's text colour (the `fg` role), `color-scheme: light` and the `--cui-*` variables, drawn over the root's `surface` background. The package's body type (13/20) and sans face are declared by `Card` for what is drawn in it.
100
+
101
+ Every component that renders an element throws outside the root, because the token variables and the colour roles are scoped to the root's DOM and would not reach it; the hooks `useFocusRescue`, `useEscapeToClose`, `useResource` and `usePagedResource` do not need the root. For the same reason an overlay must render inside the root's DOM, not in a portal to `<body>`: a portal keeps the React context but loses every `--cui-*` variable.
102
+ Draw it as a non-modal `<dialog>` (opened with `show()`) or a popover placed in the tree. A modal `<dialog>` (`showModal()`) makes everything outside it inert, the root's announcer included, and so does a host's `inert` or `aria-hidden="true"` on the console: a write to the hidden announcer throws instead of being dropped (see Focus and announcements). Announce after the modal closes, or draw the outcome inside the dialog.
103
+
104
+ ### Tokens and colours
105
+
106
+ - Spacing is an 8 px grid with a 4 px half step (`space-1` 4 … `space-12` 48). Type follows a 1.25 ratio: `caption` 11/16, `body` 13/20, `prose` 13/24, `title` 16/24, `heading` 20/28, `display` 25/32. A `prose` line with 4 px block padding makes rows of 8 + 24k px.
107
+ - The token variables are declared on `[data-cui-root]` (never `:root`) with lengths in rem and the strokes (`border-width` 1, `focus-width` 2, `focus-offset` 2) in px, and the root declares `color-scheme: light`: the palette is tested on light surfaces only. 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 grid for a reader who enlarges the root font size; in px every 8 + 24k measure scales exactly with the root font size around a 1 px border.
108
+ - 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. `CONTRAST_PAIRS` lists, for every role, the surfaces it may be drawn on with the WCAG 2 ratio on each; every pair meets AA (`CONTRAST_MINIMUM`: 4.5 for text, 3 for non-text), 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.
109
+ - The remaining colours are fixed non-text strokes, each drawn against listed surfaces of `CONTRAST_PAIRS`: the control border (`border-control`), the invalid border (`danger-accent`), the selected-row band and the radio mark (`info-accent`), and the focus ring (`focus`). The solid buttons' border is their own fill, and the card and row rules (`border-subtle`) are decorative, never a component's only boundary.
110
+ - In forced-colors mode (Windows high contrast), which removes surfaces, shadows and backgrounds, the selected row's start band is drawn in `Highlight`, the progress track and fill are drawn in `CanvasText` / `Highlight`, and table rows, comparison rows and stacked comparison headings get `CanvasText` rules.
111
+ 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.
112
+ Each rule is its cell's own bottom border, taken out of the cell's bottom padding, and the tables separate their cell borders while forced (a collapsed border would add half a rule to each row), so every row keeps its 8 + 24k height. Nothing is positioned for them, so the focus rings of rows and of controls in cells stay whole.
113
+ - 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`, 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
114
+ — 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.
115
+ 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.
116
+
117
+ ### Layout
118
+
119
+ - 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 24 px padding, `CardSection` has no padding, rule or surface, so inside a card every layout measures the card's content width.
120
+ - 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.
121
+ - 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.
122
+ - `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`.
123
+ - `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).
124
+ - 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.
125
+ - 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.
126
+ - 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.
127
+ - Table cells are top-aligned. In a table whose rows hold bordered buttons (`rowSize="row-control"`, 40 px rows) the cells are centred, which, for one-line bordered buttons, puts the text's baseline on the button label's baseline and keeps multi-line rows at max(40, 8 + 24k) px.
128
+ 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 12 + 20k px and the row 20 + 20k px (60 and 100 px for 2 and 4 lines, off the 8 + 24k grid), and its centred lines no longer share the text's baseline.
129
+ 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 (a row of 8 + 32 + 8 + 20k px).
130
+ - Controls size by `box-sizing: border-box` whatever the host's reset: a text input, a select and a one-line bordered button are all 32 px high, and a text area of k rows is 8 + 24k px. A bordered button holds its 5 px block padding (1 + 5 + 20 + 5 + 1 = 32), so a label that wraps to k lines stays clear of the border at 12 + 20k px.
131
+ - Every direct child of a `RowButton` except a `Pill` gets the `prose` line height (24 px) at any type step up to `heading`, so a row of k lines is 8 + 24k px also with a `body` or `caption` line (`display`, 25 px, is larger than the 24 px line and does not belong in a row: its wrapped lines would overlap).
132
+ The same holds for a block `Text` (`as="p"` or `"div"`) placed directly in a value cell (a `DataTable` cell, a `ComparisonGrid` cell in either layout): a cell whose second line is a muted `caption` paragraph (an outcome over its reason) is 8 + 24k px.
133
+ An inline `Text` (the default `span`) of the `caption` or `body` step (for example a `caption` mono key) keeps its own step and sits inside the cell's 24 px `prose` line. A `prose`, `title` or `heading` `Text` in a value cell must be a block `Text` (`as="p"`): inline, its box of 24 px or more sits off that line's baseline unless it shares the cell's face and size, or is taller than the line, and stretches the row past 8 + 24k (33 to 41 px for one line); a `display` `Text` does not belong in a value cell.
134
+ Only the cell's direct children get it; a `Text` nested deeper, inside a button's label for instance, keeps its own step, so a bordered button in a cell stays 32 px.
135
+ - A card's `actions` are centred on the title's 24 px line: their box is 32 px high with its content centred and overlaps the title line by 4 px above and below, so a 32 px bordered button and a 24 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 12 px row gap gives back the 4 px overlap); the wrapped row still overhangs the header box by 4 px, so the card's next child is 12 px below it instead of 16 (on the 4 px half step).
136
+ - 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 16 px box without the browser's default margins: it starts at the legend's edge, sits centred in the 24 px option line (4 px above and below), and the option text starts 16 + 8 = 24 px from the edge.
137
+ - `Button variant="link"` and `Link` draw on the `prose` line (13/24) in the regular weight of the surrounding text, `info-fg` and an underline, as the same `inline-flex` box: a one-line link is the 24 px target and a label that wraps to k lines is 24k px high, so a table row holding a wrapping link stays at 8 + 24k px.
138
+ 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:
139
+ its spaces survive, it wraps as one text (24k px for the link-looking controls, 12 + 20k px 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.
140
+ Place them on a `prose` line (a table cell, a `RowButton` line, prose text) or on a line of their own: inside a `body` (13/20) sentence the 24 px box stretches that line to 24 px and the paragraph gets uneven leading. Bordered buttons draw their label in `body` (13/20) and medium.
141
+ Every clickable control (`Button`, `Link`, `RowButton`) 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.
142
+ - 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.
143
+
144
+ ### Focus and announcements
145
+
146
+ - `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.
147
+ - `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.
148
+ Focus resting on `<body>` or elsewhere is never taken, neither then nor on a later re-render.
149
+ 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.
150
+ - `LoadMore` moves focus to the first row the page appended (or the end-of-records text) only if focus is still on its button, or left with it; an operator who moved on while the page loaded keeps their place. When the button and the end-of-records text swap outside a load (a re-read exhausts the records, or brings more while the end text has focus) and the one leaving held focus, focus moves to the one now rendered.
151
+ The appended rows are told from the others by element identity, not by position, because a write's reply may remove, replace or add rows while the page is in flight:
152
+ 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.
153
+ 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.
154
+ - `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).
155
+ `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`.
156
+ - 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.
157
+ - The root owns the only polite live region: `useAnnounce()` returns `announce(text)`.
158
+ Calls are coalesced over a quiet window: every call restarts a timer of `ANNOUNCE_SETTLE_MS` (150 ms), and when it passes without a call (or 1 s after the first pending call, so a stream of calls cannot hold the write back) the pending sentences are written to the region once, as one string in call order.
159
+ A browser exposes the accessibility tree per rendering update, not per task, while one operator action spreads its calls over several tasks (an async handler continues after `await`, and React runs a default-lane commit's passive effects in a later task), so a write per task would let a later sentence replace an earlier one before it is read.
160
+ The merge is by time, not by cause: calls less than 150 ms apart are one write unless the 1 s deadline of the pending write falls between them. The calls of one commit or one action are therefore one write when they come within the window and before that deadline; a handler that awaits longer than the window between two calls, or a commit whose passive effects run after the deadline, gives two writes. Any two writes are at least 150 ms apart, so no sentence is replaced before it is exposed.
161
+ The same sentence announced again later is read again. `announce` throws `RangeError` for an empty or blank sentence (a missing label or outcome text), which would otherwise clear the region or pad the merged string. `AlertMessage` (`role="alert"`, keyed by the failure's `occurrence`) is used for failures only; `Notice` has no live-region role.
162
+ A live region hidden from assistive technology drops every sentence without an error, so the write throws `Error` (from the timer, as an uncaught error that names the lost sentences) when, at that moment, the console is rendered but its announcer is hidden from assistive technology: an ancestor of the announcer is `inert` or `aria-hidden="true"` (in any letter case, as ARIA reads the value), or the topmost open modal `<dialog>` does not contain the console (everything outside the topmost modal is inert, lower modal dialogs included).
163
+ The DOM does not expose which open modal is topmost, so it is told from focus, which inert content cannot hold: the candidates are the open modal dialogs that contain the focused element, or all of them while focus is in none. The write lands when every candidate contains the console and throws when none does; when only some do (modal dialogs inside and outside the console's ancestors are open at once, and focus is in none of them) whether the sentence would be heard cannot be told, and the write throws as well.
164
+ The check runs at the write, not at the call, so a handler may announce its outcome and close the modal in the same task, or let an effect close it, as long as the modal is closed when the quiet window passes.
165
+ 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.
166
+ 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.
167
+ - `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.
168
+ 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.
169
+
170
+ ### Reads
171
+
172
+ - A host read resolves to `ResourceOutcome<T>` (`{ok: true, value}` or `{ok: false, status, reason}`) and takes an `AbortSignal` as its last argument. Adapt a host read to the shape a hook reads with `mapOutcome(outcome, map)`, which maps a success's value and passes a failure through as the same object (its `status` and `reason`, so a 403 stays a 403 for `ResourceFailed`).
173
+ When a host success is not always a success of that shape (a later page the host answers as not measured, which the list shows as a failed page), use `flatMapOutcome(outcome, map)`: `map` returns an outcome, a success or a failure, and a failure of the host read still passes through as the same object without calling `map`.
174
+ - A command the host can refuse with a structured body (a code, the current row of a stale command, field errors) resolves to `CommandOutcome<T, R>`: `{ok: true, value}` or `{ok: false, status, reason, rejection}`, where `rejection` is the refusal body the host parsed with its own schema (`R`), and `null` when there was no response or the body was not one the schema reads (a network failure, a status the command does not declare, an unreadable body).
175
+ The screen derives its sentence and its state change from `rejection` when it is present, narrowing on the rejection's own discriminant (`!outcome.ok && outcome.rejection?.code === "STALE"` narrows to what that code carries, for example the current row it puts in place with `put` or `updateList`), and shows `reason` otherwise. Every failure carries `rejection`, so a failure that leaves it out is a type error, and every `CommandOutcome<T, R>` is a `ResourceOutcome<T>`.
176
+ - `key` holds every input that selects the target or the list. Encode several inputs injectively with `JSON.stringify([...inputs])` (for a findings list, the run and the cell: `JSON.stringify([runUid, store, scopeKey, itemClass])`): joining free text with a separator is not injective (category `A` with query `x|y` and category `A|x` with query `y` give the same `A|x|y`).
177
+ The read functions are read through a ref, so changing them alone never re-reads, and a key that leaves out a selecting input, or encodes two inputs to the same key, keeps showing the first target's data without an error.
178
+ - `useResource(key, load, revision)` is `idle` for a `null` key, starts a new key from `loading`, re-reads the same key on a `revision` change, `refresh()` or `reload()` while keeping the shown value (`beginReload`, `keepLastGood`), aborts the read in flight on every re-read and discards its answer. A failure stays on screen while it is re-read; only a `reload()` marks it `retrying` (its reload button busy), a `revision` or `refresh()` re-read leaves it as it is. A rejection that is not the abort of a superseded read is rethrown to the nearest error boundary.
179
+ `reload()` is the operator's re-read (the `Reload` button of `ResourceFailed`); `refresh()` is the screen's own re-read of the same target, the same as a `revision` change, for a re-read a screen starts after a command (a count after a decision) without a prop of its host's.
180
+ `put(key, value)` shows the value a write's reply carries (the decided detail, or the current detail a 409 returns) as the success of a read, only while `key` is still the shown key (pass the key the command started on); a read of that key in flight is aborted and started again, because its answer may predate the write.
181
+ - `usePagedResource(key, {first, next}, revision)` reads a keyset-paged list: `first(signal)` resolves to `ResourceOutcome<KeysetPage<T, C, M>>` (`{rows, next, meta}`: `next` is the cursor the next page starts after, `null` when the records are exhausted, and `meta` is the list's own data, such as a total or category choices, which only the first page carries), and `next(cursor, signal)` to `ResourceOutcome<NextPage<T, C>>` (`{rows, next}`; a later page that carries `meta` is a type error).
182
+ The first page follows `useResource` (`idle` for a `null` key, `loading` for a new key, `revision`, `refresh()` and `reload()` keep the shown list while re-reading), and a re-read's success replaces the whole list with the new first page, dropping the pages read after it together with any focus inside them. `loadMore()` appends the next page; a failed page keeps every shown row and advances its own `moreFailure.occurrence`.
183
+ A key change, a `revision` change, `refresh()`, `reload()` and unmounting abort the page in flight, no page starts while the first page is re-read, and a page that settles after the list moved on is discarded, so a stale page is never appended to a new first page. `loadMore()` throws outside a shown list with a next cursor, no page in flight and no re-read in flight.
184
+ Reflect a command on a row with `updateList(key, map)`, not with `reload()` or `revision`: `map` receives the shown `{rows, meta}` (`PagedContent<T, M>`) and returns them changed together, replacing the row with the reply's row, leaving a deleted row out or adding a registered one, and changing the list's own data with it (a new category choice, a total). It keeps every page read so far, the cursor (a value, still valid when its row goes) and the rows' DOM, so focus on a row past the first page stays.
185
+ It applies only while `key` is still the shown list's (a reply that comes after the operator changed the filter is dropped); a first-page read of `key` in flight is aborted and started again, because its answer may predate the write, and a page in flight continues, its answer predating the write as well, so every `map` applied while it is in flight is applied again, in order, once its rows are appended (a row the write replaced or removed arrives replaced or removed).
186
+ When `key` shows no rows (the operator came back to the list and it is read from scratch, or its first read failed) the reply changes nothing, and a read in flight is still started again.
187
+ `map` must be idempotent and give the same list whether or not the shown list already holds the write: when the operator leaves the list and comes back, the list is read again after the command was sent, and that read can settle before the reply, and a page in flight gets the same `map` again. A replace or a removal is idempotent by itself; an add must be an upsert by the row's identity, and a change of `meta` must be derived the same way (add a category only when absent, change a total only when the upsert inserted the row).
188
+ The value maps onto `LoadMore`; `busy` includes a re-read of the first page, so the button cannot start a page the re-read would drop:
189
+
190
+ ```tsx
191
+ const findingsKey = JSON.stringify([runUid, store, scopeKey, itemClass])
192
+ const { state, loadMore, updateList } = usePagedResource(findingsKey, { first: loadFirstFindings, next: loadNextFindings }, revision)
193
+ // state.kind === "ready"
194
+ <LoadMore onLoad={loadMore} busy={state.value.loadingMore || state.refreshing} done={state.value.next === null} failure={state.value.moreFailure} limit={FINDINGS_PAGE_LIMIT} rows={{ count: state.value.rows.length, ref: tableRef }} testId="findings-more" />
195
+ // a command started on the list of listKey; its reply carries the row's new state
196
+ updateList(listKey, ({ rows, meta }) => ({ rows: rows.map((row) => (row.authorityId === reply.row.authorityId ? reply.row : row)), meta }))
197
+ // a register: an upsert, so a list that already holds the new row keeps one copy, and a category choice added only when absent
198
+ const sameRow = (row: AuthorityRow) => row.authorityId === reply.row.authorityId
199
+ updateList(listKey, ({ rows, meta }) => ({
200
+ rows: rows.some(sameRow) ? rows.map((row) => (sameRow(row) ? reply.row : row)) : [reply.row, ...rows],
201
+ meta: meta.categories.includes(reply.row.category) ? meta : { ...meta, categories: [...meta.categories, reply.row.category] },
202
+ }))
203
+ ```
204
+
205
+ - `ResourceFailed` is the one way to draw a failed read: `loadFailed(reason)` in an `AlertMessage` and a `Reload` button that stays busy while re-reading; a 403 draws the caller's fixed message without reload. The caller's `useFocusRescue` ref (`rescueRef`) is attached to the `Reload` button, so focus on it moves to the section heading both when the reload succeeds (the block goes) and when it comes back 403 (the button goes).
206
+
207
+ ## Components
208
+
209
+ | Component / hook | Contract |
210
+ | --- | --- |
211
+ | `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS` | Root, token scope, language, format locale, time zone, announcer and its quiet window. |
212
+ | `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. |
213
+ | `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. |
214
+ | `Stack`, `Cluster` | Vertical and wrapping horizontal layout with a spacing token. |
215
+ | `Button`, `Link` | Buttons that keep focus when they cannot act; an in-document move drawn as a link (no `href`). |
216
+ | `Pill` | A text status label, 24 px high, 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`. |
217
+ | `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. |
218
+ | `Measured` | A count, or the `unmeasured` label for `null` (never `0`). |
219
+ | `MetricTile`, `TileGrid` | Metric tiles (88 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. |
220
+ | `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. |
221
+ | `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. |
222
+ | `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. |
223
+ | `Field`, `TextInput`, `TextArea`, `Select`, `RadioGroup` | Fields tied to their label, description and error with `useId`. |
224
+ | `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`. |
225
+ | `MasterDetail` | Master–detail layout by container width; side by side, neither pane goes below its minimum. |
226
+ | `useEscapeToClose`, `useFocusRescue`, `useResource`, `usePagedResource`, `ResourceFailed` | See above. |
227
+
228
+ 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).
229
+
230
+ The test ids a component derives from its `testId` are public test hooks:
231
+
232
+ | Component | Derived test ids |
233
+ | --- | --- |
234
+ | `ConsoleUiRoot` | `<testId>-announcer` (the live region) |
235
+ | `Button` | `<testId>-reason` (the `unavailable` reason) |
236
+ | `DataTable` | `<testId>-frame` (the scroll frame), `<testId>-empty` (the `empty` text) |
237
+ | `SelectableList` | `<testId>-empty` (the `empty` text) |
238
+ | `LoadMore` | `<testId>-button`, `<testId>-failure`, `<testId>-end` |
239
+ | `ResourceFailed` | `<testId>-alert`, `<testId>-reload` |
240
+ | `TextInput`, `TextArea`, `Select` | `<testId>-field` (the field root; `testId` itself is on the control), `<testId>-description`, `<testId>-error` |
241
+ | `Field`, `RadioGroup` | `<testId>-description`, `<testId>-error`; `RadioGroup` also `<testId>-option-<value>` |
242
+ | `ProgressBar` | `<testId>-bar` (the `progressbar`), `<testId>-fill`, `<testId>-value` (the visible value text) |
243
+ | `MetricTile` | `<testId>-value` (the `Measured` value) |
244
+ | `MasterDetail` | `<testId>-master`, `<testId>-detail` |
245
+
246
+ ## Development
247
+
248
+ ```bash
249
+ pnpm --filter @aiquants/console-ui run build # dist/index.*, dist/core.*, dist/testing.*, shared dist/chunk-*, dist/styles/console-ui.css
250
+ pnpm --filter @aiquants/console-ui run clean # removes dist
251
+ pnpm --filter @aiquants/console-ui run typecheck
252
+ pnpm --filter @aiquants/console-ui run test:coverage # exits non-zero below 100 % statements / branches / functions / lines
253
+ ```
254
+
255
+ The stylesheet tests read `src/styles/components.css` with `node:fs` and parse it with postcss.
256
+
257
+ ### Testing in jsdom
258
+
259
+ Announcements are written once the quiet window passes (`ANNOUNCE_SETTLE_MS`, 150 ms, exported from `@aiquants/console-ui`). The write does not go through React state, so reading it needs no `act`.
260
+
261
+ - By default read the live region (`<testId>-announcer`) with real timers and a waiting query: `await waitFor(() => expect(screen.getByTestId("console-announcer")).toHaveTextContent("承認しました。"))` or `await screen.findByText("承認しました。")`. The window is well inside their 1 s default timeout, and user-event works as usual.
262
+ - Fake the clock only to assert timing (nothing is written before the window ends, two writes a window apart). Faking `setTimeout` fakes it for the whole test, including the `setTimeout` that Testing Library's `waitFor` / `findBy*` and user-event wait on (their own clock advance goes through a `jest` global that Vitest does not define), so with `vi.useFakeTimers({ toFake: ["setTimeout", "clearTimeout"] })` every `await user.click(...)`, `findBy*` and `waitFor` hangs until the test times out.
263
+ Either drive the screen with `fireEvent` inside `act` and advance with `vi.advanceTimersByTime(ANNOUNCE_SETTLE_MS)` (React's scheduler keeps its real `setImmediate`), or add `shouldAdvanceTime: true` so the fake clock follows real time and those helpers settle; a "not written yet" assertion is then reliable only before the first `await`.
264
+
265
+ `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).
266
+
267
+ 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.
268
+
269
+ ## License
270
+
271
+ MIT
@@ -0,0 +1 @@
1
+ var C=new Map,v=(e,r)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=C.get(r);return n===void 0&&(n=new Intl.NumberFormat(r,{maximumFractionDigits:0,useGrouping:!0}),C.set(r,n)),n.format(e)};var i=class extends RangeError{reason;constructor(r,n){super(n),this.name="ZonedTimeError",this.reason=r}},_=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,I=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,D=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,k=864e5,p=6e4,y={min:1,max:9999},w=new Map,S=new Map,L=e=>{let r=w.get(e);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),w.set(e,r)),r},M=e=>{let r=new Date(0);return r.setUTCFullYear(e.year,e.month-1,e.day),r.setUTCHours(e.hour,e.minute,e.second,0),r.getUTCFullYear()===e.year&&r.getUTCMonth()===e.month-1&&r.getUTCDate()===e.day&&r.getUTCHours()===e.hour&&r.getUTCMinutes()===e.minute&&r.getUTCSeconds()===e.second?r.getTime():null},T=(e,r)=>{let[n,t,o,s,l,a,m]=r;if(m!==void 0&&/[1-9]/.test(m))throw new i("subsecond",`Fractions of a second cannot be kept: ${e}`);let c={year:Number(n),month:Number(t),day:Number(o),hour:Number(s),minute:Number(l),second:a===void 0?0:Number(a)},R=c.year>=y.min?M(c):null;if(R===null)throw new i("malformed",`Not a calendar date and time: ${e}`);return{fields:c,millis:R}},b=(e,r)=>{let n=new Map(L(r).formatToParts(new Date(e)).map(o=>[o.type,o.value])),t={year:Number(n.get("year")),month:Number(n.get("month")),day:Number(n.get("day")),hour:Number(n.get("hour")),minute:Number(n.get("minute")),second:Number(n.get("second"))};if(n.get("era")!=="AD"||t.year>y.max)throw new i("malformed",`The wall clock falls outside years ${y.min}-${y.max}: ${new Date(e).toISOString()}`);return t},f=(e,r)=>M(b(e,r))-e,d=e=>String(e).padStart(2,"0"),O=(e,r)=>{let n=`${String(e.year).padStart(4,"0")}-${d(e.month)}-${d(e.day)}T${d(e.hour)}:${d(e.minute)}`;return r||e.second!==0?`${n}:${d(e.second)}`:n},U=e=>{if(e%p!==0)throw new i("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let r=Math.abs(e)/p;return`${e<0?"-":"+"}${d(Math.floor(r/60))}:${d(r%60)}`},A=(e,r)=>{let n=_.exec(e);if(n===null)throw new i("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:t,millis:o}=T(e,n.slice(1)),l=[...new Set([f(o-k,r),f(o+k,r)])].filter(a=>f(o-a,r)===a);if(l.length===0)throw new i("nonexistent",`${e} does not exist in ${r}`);if(l.length>1)throw new i("ambiguous",`${e} occurs twice in ${r}`);return`${O(t,!0)}${U(l[0])}`},$=(e,r)=>{let[n,t,o,s]=r;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new i("malformed",`Not a valid offset: ${e}`);return(t==="-"?-1:1)*(Number(o)*60+Number(s))*p},W=(e,r)=>{let n=I.exec(e);if(n===null)throw new i("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:t}=T(e,n.slice(1,8));return O(b(t-$(e,n.slice(8)),r),!1)},G=(e,r)=>{let n=JSON.stringify([e,r]),t=S.get(n);return t===void 0&&(t=new Intl.DateTimeFormat(e,{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),S.set(n,t)),t},H=(e,r,n)=>{let t=D.exec(e);if(t===null)throw new i("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=T(e,[...t.slice(1,7),void 0]),s=o-$(e,t.slice(7));return b(s,n),G(r,n).format(s)};var g={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load (${e}).`,refreshFailed:e=>`Could not refresh (${e}).`,loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F (${e})\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F (${e})\u3002`,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"}},z=e=>{if(!Object.hasOwn(g,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(g).join(", ")}`);return g[e]};var K=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},u=e=>`${K(e)/16}rem`;var N=(1+Math.sqrt(5))/2,F=({masterMinPx:e,detailMinPx:r,gapPx:n})=>{for(let t of[e,r])if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Pane minimum must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+r},B=(e,r)=>{let n=F(r);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<n)return{sideBySide:!1,sideBySideFromPx:n,masterInlinePx:e,detailInlinePx:e};let t=(e-r.gapPx)/(1+N),o=Math.min(Math.max(r.masterMinPx,t),e-r.gapPx-r.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-r.gapPx-o}},ge=e=>{let r=F(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,t=`[data-cui-master-detail="${n}"]`,o=u(e.gapPx),s=`${t}{grid-template-columns:minmax(0,1fr);gap:${o}}`,l=`clamp(${u(e.masterMinPx)},calc((100% - ${o}) / ${1+N}),calc(100% - ${o} - ${u(e.detailMinPx)}))`,a=`@container (min-width:${u(r)}){${t}{grid-template-columns:${l} minmax(0,1fr)}}`;return{key:n,css:s+a}};var P=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},j=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let r=0,n=null;for(let{width:t}of e){if(t.fixedPx!==void 0){r+=P(t.fixedPx);continue}let o=P(t.minPx);if(n!==null&&n!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${n} and ${o}`);n=o,r+=o}return r};var X=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,E=(e,r)=>{let n=0,t=0;for(let o of e)X(o.codePointAt(0))?t+=1:n+=1;return n*1+t*r},Y=e=>E(e,.55),V=e=>E(e,.6),q=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 J=(e,r,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Tile minimum width must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let t=[];for(let a=1;a<=e;a+=1)e%a===0&&t.push({columns:a,minContainerPx:a*r+(a-1)*n});let o=`cui-tiles-n${e}-m${r}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,l=t.map(({columns:a,minContainerPx:m})=>{let c=`${s}{grid-template-columns:repeat(${a},minmax(0,1fr))}`;return a===1?c:`@container (min-width:${u(m)}){${c}}`});return{key:o,steps:t,css:l.join("")}};var Z=(e,r)=>e.ok?{ok:!0,value:r(e.value)}:e,Q=(e,r)=>e.ok?r(e.value):e,he={kind:"idle"},ee={kind:"loading"},x=(e,r)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?r==="reload"?{...e,retrying:!0}:e:ee,h=(e,r)=>r.ok?{kind:"ready",value:r.value,refreshing:!1,refreshFailure:null}:e.kind==="ready"?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:r.status,reason:r.reason}}:{kind:"failed",status:r.status,reason:r.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var re=(e,r)=>{let n=x(e,r);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},ne=(e,r)=>h(e,r.ok?{ok:!0,value:{rows:r.value.rows,next:r.value.next,meta:r.value.meta,loadingMore:!1,moreFailure:null}}:r),te=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,oe=(e,r,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,r)))return e;if(n.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...n.value.rows],next:n.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:n.reason,occurrence:t}}}},ae=(e,r)=>{if(e.kind!=="ready")return e;let{rows:n,meta:t}=r({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:t}}};var ie={space:{"space-1":4,"space-2":8,"space-3":12,"space-4":16,"space-6":24,"space-8":32,"space-12":48},type:{caption:{size:11,lineHeight:16},body:{size:13,lineHeight:20},prose:{size:13,lineHeight:24},title:{size:16,lineHeight:24},heading:{size:20,lineHeight:28},display:{size:25,lineHeight:32}},weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},size:{"size-control":32,"size-row":32,"size-row-control":40,"size-target":24},stroke:{"border-width":1,"focus-width":2,"focus-offset":2},color:{fg:"#0f172b","fg-secondary":"#314158","fg-muted":"#45556c","danger-fg":"#9f0712","warning-fg":"#7b3306","success-fg":"#006045","info-fg":"#193cb8","on-solid":"#ffffff",surface:"#ffffff",subtle:"#f8fafc",sunken:"#f1f5f9","danger-tint":"#fef2f2","warning-tint":"#fffbeb","success-tint":"#ecfdf5","info-tint":"#eff6ff","neutral-solid":"#314158","danger-solid":"#9f0712","success-solid":"#006045","info-solid":"#193cb8","warning-solid":"#7b3306","danger-accent":"#e7000b","warning-accent":"#bb4d00","success-accent":"#009966","info-accent":"#155dfc",focus:"#155dfc","border-control":"#62748e","border-subtle":"#e2e8f0"}},se="--cui-",le=e=>`var(${se}${e})`;export{v as a,i as b,A as c,W as d,H as e,g as f,z as g,u as h,B as i,ge as j,j as k,Y as l,V as m,q as n,J as o,Z as p,Q as q,he as r,ee as s,x as t,h as u,re as v,ne as w,te as x,oe as y,ae as z,ie as A,le as B};
@@ -0,0 +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[,r,s,t]=e;return[Number.parseInt(r,16)/255,Number.parseInt(s,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,r,s]=n;return .2126*o(e)+.7152*o(r)+.0722*o(s)},f= exports.b =(n,e)=>{let[r,s]=[c(n),c(e)].sort((t,a)=>a-t);return(r+.05)/(s+.05)},g= exports.c ={text:4.5,nonText:3},b= exports.d ={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.58,subtle:7.25,sunken:6.92,"danger-tint":6.93,"warning-tint":7.31,"info-tint":6.97},"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}};exports.a = i; exports.b = f; exports.c = g; exports.d = b;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var C=new Map,v= exports.a =(e,r)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=C.get(r);return n===void 0&&(n=new Intl.NumberFormat(r,{maximumFractionDigits:0,useGrouping:!0}),C.set(r,n)),n.format(e)};var i=class extends RangeError{constructor(r,n){super(n),this.name="ZonedTimeError",this.reason=r}},_=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,I=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,D=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,k=864e5,p=6e4,y={min:1,max:9999},w=new Map,S=new Map,L=e=>{let r=w.get(e);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),w.set(e,r)),r},M=e=>{let r=new Date(0);return r.setUTCFullYear(e.year,e.month-1,e.day),r.setUTCHours(e.hour,e.minute,e.second,0),r.getUTCFullYear()===e.year&&r.getUTCMonth()===e.month-1&&r.getUTCDate()===e.day&&r.getUTCHours()===e.hour&&r.getUTCMinutes()===e.minute&&r.getUTCSeconds()===e.second?r.getTime():null},T=(e,r)=>{let[n,t,o,s,l,a,m]=r;if(m!==void 0&&/[1-9]/.test(m))throw new i("subsecond",`Fractions of a second cannot be kept: ${e}`);let c={year:Number(n),month:Number(t),day:Number(o),hour:Number(s),minute:Number(l),second:a===void 0?0:Number(a)},R=c.year>=y.min?M(c):null;if(R===null)throw new i("malformed",`Not a calendar date and time: ${e}`);return{fields:c,millis:R}},b=(e,r)=>{let n=new Map(L(r).formatToParts(new Date(e)).map(o=>[o.type,o.value])),t={year:Number(n.get("year")),month:Number(n.get("month")),day:Number(n.get("day")),hour:Number(n.get("hour")),minute:Number(n.get("minute")),second:Number(n.get("second"))};if(n.get("era")!=="AD"||t.year>y.max)throw new i("malformed",`The wall clock falls outside years ${y.min}-${y.max}: ${new Date(e).toISOString()}`);return t},f=(e,r)=>M(b(e,r))-e,d=e=>String(e).padStart(2,"0"),O=(e,r)=>{let n=`${String(e.year).padStart(4,"0")}-${d(e.month)}-${d(e.day)}T${d(e.hour)}:${d(e.minute)}`;return r||e.second!==0?`${n}:${d(e.second)}`:n},U=e=>{if(e%p!==0)throw new i("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let r=Math.abs(e)/p;return`${e<0?"-":"+"}${d(Math.floor(r/60))}:${d(r%60)}`},A= exports.c =(e,r)=>{let n=_.exec(e);if(n===null)throw new i("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:t,millis:o}=T(e,n.slice(1)),l=[...new Set([f(o-k,r),f(o+k,r)])].filter(a=>f(o-a,r)===a);if(l.length===0)throw new i("nonexistent",`${e} does not exist in ${r}`);if(l.length>1)throw new i("ambiguous",`${e} occurs twice in ${r}`);return`${O(t,!0)}${U(l[0])}`},$=(e,r)=>{let[n,t,o,s]=r;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new i("malformed",`Not a valid offset: ${e}`);return(t==="-"?-1:1)*(Number(o)*60+Number(s))*p},W= exports.d =(e,r)=>{let n=I.exec(e);if(n===null)throw new i("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:t}=T(e,n.slice(1,8));return O(b(t-$(e,n.slice(8)),r),!1)},G=(e,r)=>{let n=JSON.stringify([e,r]),t=S.get(n);return t===void 0&&(t=new Intl.DateTimeFormat(e,{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),S.set(n,t)),t},H= exports.e =(e,r,n)=>{let t=D.exec(e);if(t===null)throw new i("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=T(e,[...t.slice(1,7),void 0]),s=o-$(e,t.slice(7));return b(s,n),G(r,n).format(s)};var g={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load (${e}).`,refreshFailed:e=>`Could not refresh (${e}).`,loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F (${e})\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F (${e})\u3002`,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"}},z= exports.g =e=>{if(!Object.hasOwn(g,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(g).join(", ")}`);return g[e]};var K=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},u= exports.h =e=>`${K(e)/16}rem`;var N=(1+Math.sqrt(5))/2,F=({masterMinPx:e,detailMinPx:r,gapPx:n})=>{for(let t of[e,r])if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Pane minimum must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+r},B= exports.i =(e,r)=>{let n=F(r);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<n)return{sideBySide:!1,sideBySideFromPx:n,masterInlinePx:e,detailInlinePx:e};let t=(e-r.gapPx)/(1+N),o=Math.min(Math.max(r.masterMinPx,t),e-r.gapPx-r.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-r.gapPx-o}},ge= exports.j =e=>{let r=F(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,t=`[data-cui-master-detail="${n}"]`,o=u(e.gapPx),s=`${t}{grid-template-columns:minmax(0,1fr);gap:${o}}`,l=`clamp(${u(e.masterMinPx)},calc((100% - ${o}) / ${1+N}),calc(100% - ${o} - ${u(e.detailMinPx)}))`,a=`@container (min-width:${u(r)}){${t}{grid-template-columns:${l} minmax(0,1fr)}}`;return{key:n,css:s+a}};var P=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},j= exports.k =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let r=0,n=null;for(let{width:t}of e){if(t.fixedPx!==void 0){r+=P(t.fixedPx);continue}let o=P(t.minPx);if(n!==null&&n!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${n} and ${o}`);n=o,r+=o}return r};var X=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,E=(e,r)=>{let n=0,t=0;for(let o of e)X(o.codePointAt(0))?t+=1:n+=1;return n*1+t*r},Y= exports.l =e=>E(e,.55),V= exports.m =e=>E(e,.6),q= exports.n =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 J=(e,r,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Tile minimum width must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let t=[];for(let a=1;a<=e;a+=1)e%a===0&&t.push({columns:a,minContainerPx:a*r+(a-1)*n});let o=`cui-tiles-n${e}-m${r}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,l=t.map(({columns:a,minContainerPx:m})=>{let c=`${s}{grid-template-columns:repeat(${a},minmax(0,1fr))}`;return a===1?c:`@container (min-width:${u(m)}){${c}}`});return{key:o,steps:t,css:l.join("")}};var Z=(e,r)=>e.ok?{ok:!0,value:r(e.value)}:e,Q= exports.q =(e,r)=>e.ok?r(e.value):e,he= exports.r ={kind:"idle"},ee= exports.s ={kind:"loading"},x= exports.t =(e,r)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?r==="reload"?{...e,retrying:!0}:e:ee,h= exports.u =(e,r)=>r.ok?{kind:"ready",value:r.value,refreshing:!1,refreshFailure:null}:e.kind==="ready"?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:r.status,reason:r.reason}}:{kind:"failed",status:r.status,reason:r.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var re=(e,r)=>{let n=x(e,r);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},ne= exports.w =(e,r)=>h(e,r.ok?{ok:!0,value:{rows:r.value.rows,next:r.value.next,meta:r.value.meta,loadingMore:!1,moreFailure:null}}:r),te= exports.x =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,oe= exports.y =(e,r,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,r)))return e;if(n.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...n.value.rows],next:n.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:n.reason,occurrence:t}}}},ae= exports.z =(e,r)=>{if(e.kind!=="ready")return e;let{rows:n,meta:t}=r({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:t}}};var ie={space:{"space-1":4,"space-2":8,"space-3":12,"space-4":16,"space-6":24,"space-8":32,"space-12":48},type:{caption:{size:11,lineHeight:16},body:{size:13,lineHeight:20},prose:{size:13,lineHeight:24},title:{size:16,lineHeight:24},heading:{size:20,lineHeight:28},display:{size:25,lineHeight:32}},weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},size:{"size-control":32,"size-row":32,"size-row-control":40,"size-target":24},stroke:{"border-width":1,"focus-width":2,"focus-offset":2},color:{fg:"#0f172b","fg-secondary":"#314158","fg-muted":"#45556c","danger-fg":"#9f0712","warning-fg":"#7b3306","success-fg":"#006045","info-fg":"#193cb8","on-solid":"#ffffff",surface:"#ffffff",subtle:"#f8fafc",sunken:"#f1f5f9","danger-tint":"#fef2f2","warning-tint":"#fffbeb","success-tint":"#ecfdf5","info-tint":"#eff6ff","neutral-solid":"#314158","danger-solid":"#9f0712","success-solid":"#006045","info-solid":"#193cb8","warning-solid":"#7b3306","danger-accent":"#e7000b","warning-accent":"#bb4d00","success-accent":"#009966","info-accent":"#155dfc",focus:"#155dfc","border-control":"#62748e","border-subtle":"#e2e8f0"}},se="--cui-",le= exports.B =e=>`var(${se}${e})`;exports.a = v; exports.b = i; exports.c = A; exports.d = W; exports.e = H; exports.f = g; exports.g = z; exports.h = u; exports.i = B; exports.j = ge; exports.k = j; exports.l = Y; exports.m = V; exports.n = q; exports.o = J; exports.p = Z; exports.q = Q; exports.r = he; exports.s = ee; exports.t = x; exports.u = h; exports.v = re; exports.w = ne; exports.x = te; exports.y = oe; exports.z = ae; exports.A = ie; exports.B = le;
@@ -0,0 +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[,r,s,t]=e;return[Number.parseInt(r,16)/255,Number.parseInt(s,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,r,s]=n;return .2126*o(e)+.7152*o(r)+.0722*o(s)},f=(n,e)=>{let[r,s]=[c(n),c(e)].sort((t,a)=>a-t);return(r+.05)/(s+.05)},g={text:4.5,nonText:3},b={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.58,subtle:7.25,sunken:6.92,"danger-tint":6.93,"warning-tint":7.31,"info-tint":6.97},"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}};export{i as a,f as b,g as c,b as d};
package/dist/core.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJUHDBYOCcjs = require('./chunk-JUHDBYOC.cjs');var _chunkBEDKWWJCcjs = require('./chunk-BEDKWWJC.cjs');exports.CONSOLE_UI_LABEL_CATALOGS = _chunkJUHDBYOCcjs.f; exports.CONTRAST_MINIMUM = _chunkBEDKWWJCcjs.c; exports.CONTRAST_PAIRS = _chunkBEDKWWJCcjs.d; exports.TOKENS = _chunkJUHDBYOCcjs.A; exports.ZonedTimeError = _chunkJUHDBYOCcjs.b; exports.beginPage = _chunkJUHDBYOCcjs.x; exports.beginPagedReload = _chunkJUHDBYOCcjs.v; exports.beginReload = _chunkJUHDBYOCcjs.t; exports.ceil8 = _chunkJUHDBYOCcjs.n; exports.contrastRatio = _chunkBEDKWWJCcjs.b; exports.cssVar = _chunkJUHDBYOCcjs.B; exports.flatMapOutcome = _chunkJUHDBYOCcjs.q; exports.formatCount = _chunkJUHDBYOCcjs.a; exports.formatInstant = _chunkJUHDBYOCcjs.e; exports.hexToSrgb = _chunkBEDKWWJCcjs.a; exports.keepLastGood = _chunkJUHDBYOCcjs.u; exports.mapOutcome = _chunkJUHDBYOCcjs.p; exports.mapPagedList = _chunkJUHDBYOCcjs.z; exports.masterDetailPlan = _chunkJUHDBYOCcjs.i; exports.monoTextWidthEm = _chunkJUHDBYOCcjs.m; exports.resolveConsoleUiLabels = _chunkJUHDBYOCcjs.g; exports.settleFirstPage = _chunkJUHDBYOCcjs.w; exports.settlePage = _chunkJUHDBYOCcjs.y; exports.tableMinInlinePx = _chunkJUHDBYOCcjs.k; exports.textWidthEm = _chunkJUHDBYOCcjs.l; exports.tileGridPlan = _chunkJUHDBYOCcjs.o; exports.toOffsetIso = _chunkJUHDBYOCcjs.c; exports.toWallTime = _chunkJUHDBYOCcjs.d;