@aiquants/console-ui 0.6.4 → 0.7.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 +84 -40
- package/dist/chunk-H4DAGEIG.js +1 -0
- package/dist/chunk-WUST5VT6.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +39 -9
- package/dist/index.d.ts +39 -9
- package/dist/index.js +1 -1
- package/dist/styles/console-ui.css +35 -0
- package/dist/testing.cjs +1 -1
- package/dist/testing.d.cts +6 -2
- package/dist/testing.d.ts +6 -2
- package/dist/testing.js +1 -1
- package/package.json +6 -4
- package/dist/chunk-5TR7VUZM.js +0 -1
- package/dist/chunk-K7BETTSL.cjs +0 -1
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ Host-agnostic UI foundation for React admin consoles: design tokens computed fro
|
|
|
6
6
|
|
|
7
7
|
- Node.js >= 18.0.0
|
|
8
8
|
- React >= 19.0.0 and React DOM >= 19.0.0 (peer dependencies; the layout components emit hoisted `<style href precedence>` elements)
|
|
9
|
+
- `@aiquants/auth-core` >= 0.8.0 (peer dependency): the root's presenter of access failures is its `AccessFailurePresenter`, `AccessFailureNotice` draws its `AccessFailureView`, and `accessFailureKindOfStatus` decides which failures are access failures, so the host and the package share one copy of the module
|
|
9
10
|
|
|
10
11
|
## Installation
|
|
11
12
|
|
|
@@ -19,7 +20,7 @@ pnpm add @aiquants/console-ui
|
|
|
19
20
|
| --- | --- |
|
|
20
21
|
| `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
|
|
21
22
|
| `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the tone table and the CSS text of a colour of both schemes, 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 `
|
|
23
|
+
| `@aiquants/console-ui/testing` | DOM-only: `scanColourRoles(root, { exclude })`, 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()`, `pressEscape(dialog)` and `sendCloseRequest(dialog)` (see Testing in jsdom). It takes elements and loads no React. |
|
|
23
24
|
| `@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
|
|
|
25
26
|
The `/core` exports:
|
|
@@ -41,7 +42,7 @@ The `/core` exports:
|
|
|
41
42
|
- 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.
|
|
42
43
|
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.
|
|
43
44
|
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.
|
|
44
|
-
- Labels: `CONSOLE_UI_LABEL_CATALOGS`, `resolveConsoleUiLabels` (a UI language's catalog, whose `loadFailed
|
|
45
|
+
- Labels: `CONSOLE_UI_LABEL_CATALOGS`, `resolveConsoleUiLabels` (a UI language's catalog, whose `loadFailed` and `refreshFailed` build the sentences of failures that are not access failures, whose `failureSentence` is the one rule of those sentences (it throws for a 401 or a 403, which the root's presenter states), and whose `forbiddenBecause` builds the denied sentence a 403 hands to the presenter), `reasonAside` (a failure's reason as a parenthetical). The catalogs hold no text of an access failure: the host's presenter takes those from its own catalog (`resolveAccessFailureLabels` of `@aiquants/auth-core`).
|
|
45
46
|
- Label templates: `fillLabel(template, values)` is the one filler of a label that carries a value (a count, a name) as a `{key}` placeholder (a key is ASCII letters, digits and `_`), so the label's language, not the code that draws it, decides where the value stands; a label that crosses a loader as a plain string carries its values this way.
|
|
46
47
|
It scans the template once and writes every value as plain text: a `{key}` inside a value is not filled again, and `$&`, `$1` or `` $` `` in a value are not replacement patterns, so a name a user controls cannot pull another value in or forge another sentence.
|
|
47
48
|
A placeholder whose key `values` does not own (an inherited key such as `{constructor}` included) stays as written, so a forgotten value shows instead of leaving a sentence with a word missing. A number is written with `String`: format a count with `formatCount` first when it should follow a locale.
|
|
@@ -98,18 +99,38 @@ Bind the variables to faces the models fit; with the generic fallback or while a
|
|
|
98
99
|
### Wrapping a console
|
|
99
100
|
|
|
100
101
|
```tsx
|
|
101
|
-
import {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
)
|
|
102
|
+
import { type AccessFailurePresenter, accessFailureView, resolveAccessFailureLabels } from "@aiquants/auth-core"
|
|
103
|
+
import { AccessFailureNotice, Card, ConsoleUiRoot, Measured } from "@aiquants/console-ui"
|
|
104
|
+
import { type ReactNode, useCallback } from "react"
|
|
105
|
+
|
|
106
|
+
const ACCESS_FAILURE_LABELS = resolveAccessFailureLabels("ja")
|
|
107
|
+
|
|
108
|
+
export const Console = ({ orphanCount, openSignIn }: { orphanCount: number | null; openSignIn: () => void }) => {
|
|
109
|
+
const accessFailure = useCallback<AccessFailurePresenter<ReactNode>>(
|
|
110
|
+
(occurrence) => (
|
|
111
|
+
<AccessFailureNotice
|
|
112
|
+
view={accessFailureView(occurrence, { keepsWork: true }, ACCESS_FAILURE_LABELS)}
|
|
113
|
+
handlers={{ "sign-in-again-in-new-window": openSignIn, ...(occurrence.retry === null ? {} : { retry: occurrence.retry }) }}
|
|
114
|
+
testId="access-failure"
|
|
115
|
+
/>
|
|
116
|
+
),
|
|
117
|
+
[openSignIn],
|
|
118
|
+
)
|
|
119
|
+
return (
|
|
120
|
+
<ConsoleUiRoot locale="ja" formatLocale="ja-JP" timeZone="Asia/Tokyo" accessFailure={accessFailure} testId="console">
|
|
121
|
+
<Card title="Tri-Store データ整合性監査" testId="audit">
|
|
122
|
+
<Measured value={orphanCount} unit="件" testId="orphans" />
|
|
123
|
+
</Card>
|
|
124
|
+
</ConsoleUiRoot>
|
|
125
|
+
)
|
|
126
|
+
}
|
|
110
127
|
```
|
|
111
128
|
|
|
112
129
|
`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.
|
|
130
|
+
`accessFailure` is the host's presenter of access failures (`AccessFailurePresenter<ReactNode>` of `@aiquants/auth-core`), and it has no default either: a value that is not a function throws `TypeError` when the root renders, not at the first 401 or 403.
|
|
131
|
+
Every 401 and 403 the console shows goes through it, as one occurrence (`{ kind, place, deniedSentence, retry }`: `unauthenticated` or `forbidden`, `read` or `write`, the denied sentence of a 403 or `null`, and the retry or `null`), and the node it returns is drawn in place of a failure sentence (`FailureMessage`, `ResourceFailed`; a component of the host's own reaches it with `useAccessFailure()`).
|
|
132
|
+
So the host decides once, for the whole console, the texts (its own catalog, `resolveAccessFailureLabels` of `@aiquants/auth-core`), whether work in progress survives signing in again (`keepsWork`: in a new window, the screen stays as it is) and where each action leads; drawing it with `AccessFailureNotice` keeps the console's look, and the presenter passes a handler for every action the view can show at the places the console uses (a missing one throws `TypeError`).
|
|
133
|
+
Pass a presenter with one identity (`useCallback`, or a module constant): a new function on every render changes the root's context and re-renders every component that reads it.
|
|
113
134
|
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).
|
|
114
135
|
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.
|
|
115
136
|
|
|
@@ -147,10 +168,12 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
147
168
|
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`.
|
|
148
169
|
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.
|
|
149
170
|
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.
|
|
150
|
-
- 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
|
|
171
|
+
- A console scans its own rendered DOM with `scanColourRoles(root, { exclude })` 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
|
|
151
172
|
— 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.
|
|
152
173
|
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.
|
|
153
174
|
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.
|
|
175
|
+
A screen that holds DOM another package paints by its own rules (a drop-down list, a header the host slots in) names those subtrees in the optional `exclude`, each by one `data-*` attribute selector (`[data-select-box]`, `[data-testid="host-heading"]`, or another value comparison such as `^=`); nothing inside them is read, the markers of excluded items included.
|
|
176
|
+
An entry that is not one such selector, that matches the scanned root itself, or that matches no element under it throws `RangeError`, so a stale or overbroad entry cannot empty the scan unnoticed; assert a lower bound on `texts` for each screen as well.
|
|
154
177
|
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.
|
|
155
178
|
|
|
156
179
|
### Layout
|
|
@@ -171,8 +194,9 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
171
194
|
`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.
|
|
172
195
|
- `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).
|
|
173
196
|
- 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.
|
|
174
|
-
- 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.
|
|
175
|
-
|
|
197
|
+
- 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.
|
|
198
|
+
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`), the tint of `AccessFailureNotice` with its title and its sentences, and a `MetricTile`'s label, sublabel and value.
|
|
199
|
+
A plain paragraph is at most `40ic` wide; a padded paragraph box (`Notice`, `AlertMessage`, the tint of `AccessFailureNotice`) 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"`.
|
|
176
200
|
- 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.
|
|
177
201
|
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.
|
|
178
202
|
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"`).
|
|
@@ -266,14 +290,21 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
266
290
|
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`.
|
|
267
291
|
- 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.
|
|
268
292
|
- `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.
|
|
269
|
-
- `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
|
|
270
|
-
|
|
293
|
+
- `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, or on the element the caller names in `initialFocus` (a ref, such as to the first field of a form), and returns, when it closes or unmounts open, to the element that had it when it opened.
|
|
294
|
+
An `initialFocus` that holds no element or one outside the dialog throws `RangeError` before the dialog opens; one that does not take focus (a `disabled` field, a `div` without `tabindex`) closes the dialog again and throws `RangeError`. `onClose` is called when the operator closes it (the close button or Escape), not when the caller sets `open` to `false`.
|
|
295
|
+
A `close` event that arrives while it is open again (it closed and reopened in one task, as `StrictMode` does to a dialog mounted open) is not the operator's, so it moves no focus and calls no `onClose`.
|
|
296
|
+
Escape does not close it while an IME composes (a keydown with `isComposing` or the keyCode 229, read in the capture phase so a control inside that stops the keydown cannot hide it; the Escape cancels the composition), nor while focus is in a text field holding a value, as `useEscapeToClose`.
|
|
297
|
+
In a field holding a value the dialog cancels the Escape's keydown in the capture phase (without stopping it, so a control inside, such as a list that closes on Escape, still gets it), so the browser makes no close request and the dialog stays open however often Escape is pressed.
|
|
298
|
+
A `search` field holding a value is left to the browser: Chromium and Firefox clear the value as the keydown's default action and make no close request, so the next Escape closes the dialog.
|
|
299
|
+
A composing Escape, a close request that comes from no key (a phone's back gesture) and the close request of a browser that keeps a `search` field's value on Escape are refused at `cancel`: once a page has refused a close request, a browser that follows the HTML rule lets it refuse the next one only after the operator has interacted with the page (an Escape does not count), so there a second such request in a row closes the dialog.
|
|
300
|
+
- A pressed `Button` (busy and unavailable ones included) or `RowButton` takes focus before its `onClick` or `onSelect` runs, without scrolling, when it does not have it: WebKit (Safari on iOS and macOS) and Firefox on macOS do not focus a button on a pointer press, so the element that had focus before the press would keep it, and a `Dialog` the press opens would return focus there when it closes. A keyboard press, which comes from the focused button, moves no focus. After a pointer press the browser draws no `:focus-visible` ring.
|
|
271
301
|
- The root owns the one announcer: `useAnnounce()` returns `announce(text)`. It writes to the root's polite live region or, while a `Dialog` (of this console or of another console on the page) is the topmost open modal, to that dialog's own polite region (which the modal leaves reachable while it hides every root's).
|
|
272
302
|
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.
|
|
273
303
|
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.
|
|
274
304
|
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.
|
|
275
305
|
A `Dialog`'s region also takes the writes of the other consoles on the page, which are not spaced against each other, so a write there carries along, before its own sentence, every sentence other consoles wrote there less than 150 ms before: none is replaced before it is exposed, and one carried along may be read twice.
|
|
276
306
|
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.
|
|
307
|
+
`AccessFailureNotice` is read once per mount by its view's politeness: `alert` (the outcome of the operator's own navigation or write) makes its tint `role="alert"`; `status` (a read that arrives without the operator's action) gives the tint no role and writes its title and sentences through `announce`, because a polite live region inserted together with its content is not read reliably. A re-render with the same view reads nothing, and neither does the second mount `StrictMode` simulates; it never moves focus.
|
|
277
308
|
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 no region it writes to reaches assistive technology:
|
|
278
309
|
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>` neither contains the console nor is a `Dialog` (everything outside the topmost modal is inert, lower modal dialogs included), or it is a `Dialog` whose region such an ancestor hides.
|
|
279
310
|
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.
|
|
@@ -290,21 +321,28 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
290
321
|
|
|
291
322
|
- A host read resolves to `ResourceOutcome<T>` (`{ok: true, value}` or `{ok: false, status, reason}`) and takes an `AbortSignal` as its last argument.
|
|
292
323
|
The status and the `reason`, of a command's outcome as well, carry different facts.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
`
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
//
|
|
324
|
+
An access failure is the status's to state: a 401 (`unauthenticated`) or a 403 (`forbidden`, `HTTP_FORBIDDEN`), as `accessFailureKindOfStatus(status)` of `@aiquants/auth-core` reads it, is drawn by the root's presenter (`accessFailure`, see Wrapping a console), never as a failed sentence.
|
|
325
|
+
`FailureMessage` is the one way to draw a failure, the one rule that branches on the status: an access failure is handed to the presenter as one occurrence of the caller's `place` (`read`, a read that arrives without the operator's action, or `write`, the outcome of the operator's command) with the caller's `retry` (or `null` when it cannot be retried) and, for a 403, the denied sentence `forbiddenBecause(deniedSentence, reason)`.
|
|
326
|
+
That sentence is the caller's own fixed denied sentence, ending with the UI language's full stop, followed by the declared cause, and the node the presenter returns is drawn as it is.
|
|
327
|
+
Any other status, or `null` for no response (a network failure is no access failure), is `labels.failureSentence(failure, failed)` in an `AlertMessage`: `failed(reason)`, the caller's own failed sentence of the reason (the catalog's `loadFailed` and `refreshFailed` fit as `failed`; a screen's own sentence places the reason with `reasonAside`; `labels` from `useConsoleUi()`, or `resolveConsoleUiLabels(locale)` outside React).
|
|
328
|
+
`failureSentence` throws `RangeError` for a 401 or a 403, so no failed sentence shows an access failure as a failed read; a sentence the host draws elsewhere (an announcement, a field's error) hands those to the presenter first (`useAccessFailure()`).
|
|
329
|
+
`ResourceFailed` draws its failure with `FailureMessage` (`read`), and so does a screen whose own sentence shows a failure (its own re-read, a command):
|
|
330
|
+
|
|
331
|
+
```tsx
|
|
332
|
+
<FailureMessage failure={saveFailure} place="write" deniedSentence="この規程を変更する権限がありません。" failed={(reason) => `規程を保存できませんでした${reasonAside(reason)}。`} retry={save} testId="save-failure" />
|
|
333
|
+
// 403 and "" → the presenter's notice, with the denied sentence この規程を変更する権限がありません。
|
|
334
|
+
// 403 and "編集の権限に行のスコープが設定されています" → … この規程を変更する権限がありません。編集の権限に行のスコープが設定されています。
|
|
335
|
+
// 401 → the presenter's notice of signing in again, with save as its retry
|
|
336
|
+
// 503 and "HTTP 503" → 規程を保存できませんでした (HTTP 503)。 in an AlertMessage
|
|
303
337
|
```
|
|
304
338
|
|
|
305
|
-
`
|
|
339
|
+
`failure` carries its `occurrence`, a number that advances with every failure shown (a `ResourceFailure` carries it; a screen counts its own command's failures), and both the presenter's node and the `AlertMessage` are keyed by it, so the same failure again is mounted and read again.
|
|
340
|
+
A notice can hold buttons, so a screen that keeps a failure on screen through a retry attaches its `useFocusRescue` ref to an element keyed by the same occurrence around it, as `ResourceFailed` does (below).
|
|
341
|
+
A blank `deniedSentence` throws `RangeError` whatever the status, so a forgotten sentence fails at the first render instead of at the first 403.
|
|
342
|
+
|
|
343
|
+
`reason` is a phrase without a closing full stop, because the sentence that shows it ends it. A 403's `reason` names only the cause the route declared (which permission or scope to fix) and states no refusal, not even as a consequence of the cause (`閲覧の権限に列のスコープが設定されています`, not `…ため、閲覧できません`), and is `""` when the route declared none, since a phrase the host makes up there (the status, "refused") only repeats the status the failure already carries; only a 403's `reason` can be `""`. A 401's `reason` is never shown: the presenter states that the session ended.
|
|
306
344
|
`""` means that no cause was declared, and every sentence built from a `reason` leaves it out, the package's and a screen's alike: `loadFailed("")` is `読み込めませんでした。`, and a screen that places a `reason` in parentheses in its own sentence does so with `reasonAside(reason)` (a space and the reason in parentheses, or `""` for `""`).
|
|
307
|
-
A sentence that does not branch on the status (`loadFailed`, `refreshFailed`) then says only that the read failed. `PageFailure` carries no status, so a host whose later page can
|
|
345
|
+
A sentence that does not branch on the status (`loadFailed`, `refreshFailed`) then says only that the read failed. `PageFailure` carries no status, so a host whose later page can fail with an access failure routes it to a read that carries the status: a re-read of the first page, whose 403 withdraws the shown list (`keepLastGood`, below) for `ResourceFailed` to state as above, and whose 401 keeps the shown list and raises `refreshFailure`, as any other failed re-read does.
|
|
308
346
|
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`).
|
|
309
347
|
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`.
|
|
310
348
|
- 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).
|
|
@@ -312,7 +350,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
312
350
|
- `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`).
|
|
313
351
|
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.
|
|
314
352
|
- `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.
|
|
315
|
-
A failed re-read keeps the shown value and raises `refreshFailure`, all but a 403: the operator may no longer read the value, so `keepLastGood` withdraws it and the resource is `failed` with `occurrence` 1, exactly as a first read answered 403 is (`ResourceFailed` then
|
|
353
|
+
A failed re-read keeps the shown value and raises `refreshFailure`, all but a 403: the operator may no longer read the value, so `keepLastGood` withdraws it and the resource is `failed` with `occurrence` 1, exactly as a first read answered 403 is (`ResourceFailed` then hands it to the presenter with the denied sentence and its cause, with no reload).
|
|
316
354
|
A 403 failure then stays as it is, its reason and its `occurrence` included, through every later answer that carries no value (another failure such as a 503, a re-read in flight, another 403): none of them says anything about the permission the 403 revoked, so the refusal is announced once and no later failure brings the value back. Only a value read again for the key (a read's success, or `put`) or another key ends it.
|
|
317
355
|
`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.
|
|
318
356
|
`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.
|
|
@@ -340,38 +378,41 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
340
378
|
}))
|
|
341
379
|
```
|
|
342
380
|
|
|
343
|
-
- `ResourceFailed` is the one way to draw a failed read: `labels.failureSentence(failure,
|
|
344
|
-
A 403, a first read's or a re-read's that withdrew the shown value,
|
|
345
|
-
|
|
381
|
+
- `ResourceFailed` is the one way to draw a failed read, built on `FailureMessage` (`read`): a failure that is not an access failure is `labels.failureSentence(failure, failed)` in an `AlertMessage`, where `failed` is `loadFailed` or the section's own sentence (`failureMessage`), and a `Reload` button that stays busy while re-reading.
|
|
382
|
+
An access failure draws no reload: it is the presenter's notice. A 403, a first read's or a re-read's that withdrew the shown value, hands the presenter `labels.forbiddenBecause(deniedSentence, reason)`: the caller's fixed denied sentence, a complete sentence ending with the UI language's full stop (`。` or `.`), followed by the declared cause as a second sentence (`閲覧する権限がありません。` and `ファイルの閲覧権限に列のスコープが設定されています` give `閲覧する権限がありません。ファイルの閲覧権限に列のスコープが設定されています。`; English adds `Reason: <reason>.`).
|
|
383
|
+
A 401 hands it `onReload` as the retry after signing in again (the presenter's own action, a `retry` button of `AccessFailureNotice`). An access failure never reaches the section's own sentence (`failureMessage`).
|
|
384
|
+
The caller's `useFocusRescue` ref (`rescueRef`) is attached to the element that leaves, so focus on it moves to the section heading instead of falling to `<body>`: to the `Reload` button of a failure that is not an access failure, which goes when the reload succeeds (the block goes) or comes back with an access failure (the button goes), and to the block around the presenter's notice for an access failure, keyed by the failure's `occurrence`, which goes when the retry succeeds and is replaced when the failure occurs again.
|
|
346
385
|
|
|
347
386
|
## Components
|
|
348
387
|
|
|
349
388
|
| Component / hook | Contract |
|
|
350
389
|
| --- | --- |
|
|
351
|
-
| `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS` | Root, token scope, language, format locale, time zone, announcer and its quiet window. |
|
|
390
|
+
| `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS`, `useAccessFailure` | Root, token scope, language, format locale, time zone, announcer and its quiet window, and the host's presenter of access failures (`accessFailure`; `useAccessFailure()` returns it, see Wrapping a console). |
|
|
352
391
|
| `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. |
|
|
353
392
|
| `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. |
|
|
354
393
|
| `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). |
|
|
355
394
|
| `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. |
|
|
356
|
-
| `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 with the click event; the browser moves unless it calls `event.preventDefault()`, as a caller that moves the focus itself must, since the browser's move drops the focus when the target cannot take it), for a jump list whose entries assistive technology should list with the links. |
|
|
395
|
+
| `Button`, `Link`, `FragmentLink` | Buttons that keep focus when they cannot act (a pressed `Button` takes focus; see Focus and announcements); 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 with the click event; the browser moves unless it calls `event.preventDefault()`, as a caller that moves the focus itself must, since the browser's move drops the focus when the target cannot take it), for a jump list whose entries assistive technology should list with the links. |
|
|
357
396
|
| `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`. |
|
|
358
397
|
| `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. Both are paragraphs with the reading measure. |
|
|
398
|
+
| `AccessFailureNotice` | The in-place notice of an access failure, drawing the `AccessFailureView` `accessFailureView` of `@aiquants/auth-core` builds and deciding nothing the view does not say: the title (bold) and one paragraph per sentence on a `warning-tint` with the reading measure, then one `Button` per action in the view's order on the surface below the tint (the `warning-tint` has no border or focus pair), signing in (`sign-in`, `sign-in-again`, `sign-in-again-in-new-window`) primary and every other action (`retry`, `back`, `top`) secondary; a view without actions draws no row. `handlers` (`AccessFailureHandlers`) holds one function per action the view shows: an action without one throws `TypeError`. Read by the view's politeness (see Focus and announcements); `data-cui-access-failure` carries the kind. |
|
|
399
|
+
| `FailureMessage` | The one way to draw a failure (see Reads): an access failure is the presenter's node, with the caller's `place` (`read` or `write`), `retry` and, for a 403, `deniedSentence` followed by the declared cause; any other failure is the caller's `failed(reason)` in an `AlertMessage` with `testId`. Both are keyed by the failure's `occurrence`; a blank `deniedSentence` throws `RangeError`. |
|
|
359
400
|
| `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. |
|
|
360
401
|
| `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). |
|
|
361
402
|
| `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. |
|
|
362
403
|
| `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). |
|
|
363
404
|
| `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). |
|
|
364
|
-
| `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. |
|
|
405
|
+
| `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. A pressed row takes focus before `onSelect` runs, as a pressed `Button` does (see Focus and announcements). |
|
|
365
406
|
| `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. |
|
|
366
|
-
| `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`. |
|
|
407
|
+
| `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`). `TextInput` is `text`, `search`, `email` (the touch keyboard for an address, and the browser checks the address before a native form submits) or `datetime-local`. `TextInput`, `TextArea` and `Select` take `name`, under which a native form submits the value (one token without whitespace; an empty name, one holding whitespace or one that is not a string throws `RangeError`); a field without `name` renders none and submits nothing. `TextInput` of the `text`, `search` and `email` types and `TextArea` take `maxLength`, the most characters the field takes, counted in UTF-16 code units as the browser counts them (a positive integer: `0`, a negative number, a fraction, `NaN` or an infinity throws `RangeError`, and so does a `maxLength` on a `datetime-local` input, which the browser would ignore). `PasswordInput` takes neither. On a coarse pointer (a touch screen) the text of every field and of an input's prefix is the larger of the `body` step and 16 px, so iOS does not zoom the page each time a field takes focus; the line stays the step's, so a one-line field stays 44 px high. `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`. |
|
|
367
408
|
| `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`. |
|
|
368
409
|
| `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. |
|
|
369
410
|
| `MasterDetail` | Master–detail layout by container width; side by side, neither pane goes below its minimum. |
|
|
370
411
|
| `Heading` | A page or region heading outside a `Card`: `h1` to `h3` in a heading step (`title`, `heading`, `display`, `display-lg`), bold, without margins; with `headingRef` a programmatic focus target (`tabIndex={-1}`) for the focus a host moves after a navigation. |
|
|
371
|
-
| `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. With `collapsible`, a container narrower than 48rem (an inline-size container query on the tab row's own width) folds the links into a full-width 44 px button naming the current tab and a popup of every tab below it (opened on press, closed on choosing a tab, Escape
|
|
412
|
+
| `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. With `collapsible`, a container narrower than 48rem (an inline-size container query on the tab row's own width) folds the links into a full-width 44 px button naming the current tab and a popup of every tab below it (opened on press, closed on choosing a tab, Escape, a press outside or focus moving to an element outside the row, which keeps that focus where it went so the popup never covers it; focus lost to nothing, such as another window, leaves it open); a wider container is the ordinary wrapping row, so a caller that does not set it is unchanged. |
|
|
372
413
|
| `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`. |
|
|
373
414
|
| `Toolbar` | `role="toolbar"` with a roving tabindex over its buttons (see Focus and announcements), laid out like a `Cluster` with an 8 px gap. |
|
|
374
|
-
| `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. |
|
|
415
|
+
| `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. `initialFocus` names the element focus moves to when it opens (the first field of a form; see Focus and announcements). |
|
|
375
416
|
| `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. |
|
|
376
417
|
| `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`. |
|
|
377
418
|
| `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. |
|
|
@@ -408,7 +449,8 @@ The test ids a component derives from its `testId` are public test hooks:
|
|
|
408
449
|
| `DataTable` | `<testId>-frame` (the scroll frame), `<testId>-empty` (the `empty` text), `<rowTestId>-detail` (each record row's detail row, with `rowDetail`) |
|
|
409
450
|
| `SelectableList` | `<testId>-empty` (the `empty` text) |
|
|
410
451
|
| `LoadMore` | `<testId>-button`, `<testId>-failure`, `<testId>-end` |
|
|
411
|
-
| `
|
|
452
|
+
| `AccessFailureNotice` | `<testId>-message` (the tint), `<testId>-title`, `<testId>-actions` (the row of buttons), `<testId>-<action>` (each action's button, such as `<testId>-retry`) |
|
|
453
|
+
| `ResourceFailed` | `<testId>-alert` (the `AlertMessage` of a failure that is not an access failure; an access failure carries the test ids its presenter gives), `<testId>-reload` |
|
|
412
454
|
| `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) |
|
|
413
455
|
| `Field`, `RadioGroup`, `CheckboxGroup` | `<testId>-description`, `<testId>-error`; `RadioGroup` and `CheckboxGroup` also `<testId>-option-<value>` (each option's input) |
|
|
414
456
|
| `ProgressBar` | `<testId>-bar` (the `progressbar`), `<testId>-fill`, `<testId>-value` (the visible value text) |
|
|
@@ -439,7 +481,9 @@ Announcements are written once the quiet window passes (`ANNOUNCE_SETTLE_MS`, 15
|
|
|
439
481
|
`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).
|
|
440
482
|
|
|
441
483
|
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.
|
|
442
|
-
`openModals()` returns the dialogs a browser would match with `dialog:modal`, in the order they opened (answer `document.querySelectorAll("dialog:modal")` with it)
|
|
484
|
+
`openModals()` returns the dialogs a browser would match with `dialog:modal`, in the order they opened (answer `document.querySelectorAll("dialog:modal")` with it).
|
|
485
|
+
`pressEscape(dialog)` plays the browser's Escape: a cancelable, bubbling Escape `keydown` on the focused element and, unless it was cancelled, the close request it makes; `sendCloseRequest(dialog)` plays a close request that comes from no key (a phone's back gesture, or the close request a browser makes after a composing Escape's keydown, which a test fires itself): a cancelable `cancel`, then `close()` unless it was cancelled.
|
|
486
|
+
Every close request the model plays can be cancelled: it does not model the browser's rule that lets a page cancel one only when the operator has interacted with the page since the last cancelled one. The package's own tests read the model through the same entry.
|
|
443
487
|
|
|
444
488
|
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.
|
|
445
489
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ee=[{name:"B",power:0,fractionDigits:0},{name:"KiB",power:1,fractionDigits:1},{name:"MiB",power:2,fractionDigits:1},{name:"GiB",power:3,fractionDigits:2},{name:"TiB",power:4,fractionDigits:2}],j=new Map,K=e=>Number.isSafeInteger(e)&&e>=0,V=(e,t,n)=>{let r=`${n} ${t}`,o=j.get(r);return o===void 0&&(o=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:!0}),j.set(r,o)),o.format(e===0?0:e)},w=(e,t)=>{if(!K(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return V(e,t,0)},Y=(e,t)=>Number((e/1024**t.power).toFixed(t.fractionDigits)),Se=(e,t)=>{if(!K(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[n,...r]=Ee,o=n,i=Y(e,o);for(let d of r){if(i<1024)break;o=d,i=Y(e,o)}return`${V(i,t,o.fractionDigits)} ${o.name}`},J=(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Pe=/[!-~]/g;var _e=/^[^eE]*[1-9]/,q=e=>{let t=e.replace(Pe,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?_e.test(t)?null:0:n:null},we=e=>{let t=q(e);return t!==null&&Number.isSafeInteger(t)?t:null};var Oe=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f=e=>Oe.test(e);var l=class extends RangeError{reason;constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Ne=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Me=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Z=864e5,I=6e4,E={min:1,max:9999},Q=new Map,ee=new Map,Le=e=>{let t=Q.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Q.set(e,t)),t},te=e=>{let t=new Date(0);return t.setUTCFullYear(e.year,e.month-1,e.day),t.setUTCHours(e.hour,e.minute,e.second,0),t.getUTCFullYear()===e.year&&t.getUTCMonth()===e.month-1&&t.getUTCDate()===e.day&&t.getUTCHours()===e.hour&&t.getUTCMinutes()===e.minute&&t.getUTCSeconds()===e.second?t.getTime():null},N=(e,t)=>{let[n,r,o,i,d,s,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let p={year:Number(n),month:Number(r),day:Number(o),hour:Number(i),minute:Number(d),second:s===void 0?0:Number(s)},X=p.year>=E.min?te(p):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:p,millis:X}},M=(e,t)=>{let n=new Map(Le(t).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={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"||r.year>E.max)throw new l("malformed",`The wall clock falls outside years ${E.min}-${E.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>te(M(e,t))-e,g=e=>String(e).padStart(2,"0"),ne=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${g(e.month)}-${g(e.day)}T${g(e.hour)}:${g(e.minute)}`;return t||e.second!==0?`${n}:${g(e.second)}`:n},Fe=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/I;return`${e<0?"-":"+"}${g(Math.floor(t/60))}:${g(t%60)}`},$e=(e,t)=>{let n=Ie.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,n.slice(1)),d=[...new Set([O(o-Z,t),O(o+Z,t)])].filter(s=>O(o-s,t)===s);if(d.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(d.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${ne(r,!0)}${Fe(d[0])}`},re=(e,t)=>{let[n,r,o,i]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(i)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(i))*I},Ae=(e,t)=>{let n=Ne.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,n.slice(1,8));return ne(M(r-re(e,n.slice(8)),t),!1)},De=(e,t)=>{let n=JSON.stringify([e,t]),r=ee.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),ee.set(n,r)),r},L=(e,t,n)=>{let r=Me.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),i=o-re(e,r.slice(7));return M(i,n),De(t,n).format(i)};function ve(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.hasOwn(t,r)?String(t[r]):n)}import{accessFailureKindOfStatus as Ue}from"@aiquants/auth-core";var T=e=>e===""?"":` (${e})`,oe=(e,t)=>{if(e.status!==null&&Ue(e.status)!==null)throw new RangeError(`failureSentence: a ${e.status} is an access failure, which the root's presenter states (draw it with FailureMessage or ResourceFailed)`);return t(e.reason)},Be=(e,t)=>t===""?e:`${e} Reason: ${t}.`,He=(e,t)=>t===""?e:`${e}${t}\u3002`,S={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:Be,failureSentence:oe,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:He,failureSentence:oe,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"}},We=e=>{if(!Object.hasOwn(S,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(S).join(", ")}`);return S[e]};var ze=4,Ge=[1,2,3,4,6,8,12,16,24],Xe=16,je=5/4,$={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Ye=11,ae=3/2,Ke=7/4,Ve=7/4,Je=120,qe=3/2,Ze=[1,2,3],ie=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},A=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Ye,Math.round(Xe*je**e))},D=(e,t)=>ie(e*t),se=D(A($.body),ae),b=se+24,le=b+8,de=se+8,F={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}},Qe=()=>Object.fromEntries(Ge.map(e=>[`space-${e}`,e*4])),et=()=>{let e=Object.fromEntries(Object.entries($).map(([n,r])=>{let o=A(r);return[n,{size:o,lineHeight:D(o,n==="title"?Ve:ae)}]})),t=A($.body);return{...e,prose:{size:t,lineHeight:D(t,Ke)}}},tt=()=>Object.fromEntries(Ze.map(e=>[`motion-${e}`,Je*qe**(e-1)])),ce=e=>Object.freeze({space:Object.freeze(Qe()),type:Object.freeze(et()),weight:F.weight,radius:F.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":le,"size-row-compact":de}),stroke:F.stroke,motion:Object.freeze(tt()),color:Object.freeze({...e})});var nt={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=ce(nt),rt="--cui-",ot=e=>`var(${rt}${e})`;var at=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ue=(e,t)=>{let n=0,r=0;for(let o of e)at(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h=e=>ue(e,.55),x=e=>ue(e,.6),u=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 me="caption",B="body",H=2*a.space["space-3"],fe={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"]},ge={type:"body",minInlinePx:a.size["size-target"]},C={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"]},it=10,st="2000-01-01T00:00:00Z",lt=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,dt=(e,t)=>{if(e.length===0)throw new RangeError(`A ${t} needs at least one text to be measured with`);for(let n of e)if(!f(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},c=(e,t,n,r)=>Math.max(...dt(e,t).map(o=>pe(o,n,r))),W=e=>{switch(e.kind){case"text":return c(e.texts,"text",e.face,e.type);case"measured":return c(e.texts,"measured value","sans",B);case"pill":return c(e.labels,"pill","sans",fe.type)+fe.paddingInlinePx;case"button":return Math.max(v.minInlinePx,c(e.labels,"button","sans",v.type)+v.paddingInlinePx);case"link":return Math.max(ge.minInlinePx,c(e.labels,"link","sans",ge.type));case"switch":return e.labelHidden?C.trackInlinePx:C.trackInlinePx+C.labelGapPx+c(e.labels,"switch","sans",C.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((t,n)=>t+W(n),0)+(e.items.length-1)*a.space[e.gap]}}},ct=(e,t)=>{let n=c([e.header],"column header","sans",me),r=e.note===void 0?0:c(e.note,"column header note","sans",me);return u(Math.max(n,r,...t.map(W))+H)},ut=u(pe("\u3042".repeat(it),"sans",B)+H),mt=e=>u(c(e,"comparison attribute","sans",B)+H),ft=(e,t)=>L(st,e,t),gt=(e,t)=>{if(t!==void 0&&!f(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return J(w(lt,e),t)},pt=(e,t)=>u(Math.max(c(e,"tile caption","sans",U.captionType),c(t,"tile value","sans",U.valueType))+U.paddingInlinePx);var yt=.12,Tt=.16,bt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],P=(e,t)=>{let n=0,r=0;for(let i of e)n+=1,bt.test(i)&&(r+=1);return(t==="mono"?x(e):h(e))+yt*n+Tt*r},ht=e=>{for(let n of[e.name,...e.notes])if(!f(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(P(e.name,"sans")*a.type.body.size,...e.notes.map(n=>P(n,"sans")*a.type.caption.size));return{minWidthPx:u(t)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},cn=e=>{let t=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},xt=(e,t)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${t}`);return e===null?{widthPx:0,extentBelowPx:t+ye}:{widthPx:u(P(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ye=a.stroke["focus-offset"]+a.stroke["focus-width"],un=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,kt=(e,t)=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);if(!(Number.isInteger(t)&&t>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${t}`);return e/_**t};var Rt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m=e=>`${Rt(e)/16}rem`;var Te=({masterMinPx:e,detailMinPx:t,gapPx:n})=>{for(let r of[e,t])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+t},Et=(e,t)=>{let n=Te(t);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 r=(e-t.gapPx)/(1+_),o=Math.min(Math.max(t.masterMinPx,r),e-t.gapPx-t.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-t.gapPx-o}},Tn=e=>{let t=Te(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=m(e.gapPx),i=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,d=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,s=`@container (min-width:${m(t)}){${r}{grid-template-columns:${d} minmax(0,1fr)}}`;return{key:n,css:i+s}};var St=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let t=0,n=null;for(let{width:r}of e){if(r.fixedPx!==void 0){t+=be(r.fixedPx);continue}let o=be(r.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,t+=o}return t},Ct=e=>he(e)+St;var Pt=(e,t,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Tile minimum width must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let r=[];for(let s=1;s<=e;s+=1)e%s===0&&r.push({columns:s,minContainerPx:s*t+(s-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,i=`[data-cui-tile-grid="${o}"]`,d=r.map(({columns:s,minContainerPx:R})=>{let p=`${i}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?p:`@container (min-width:${m(R)}){${p}}`});return{key:o,steps:r,css:d.join("")}};var _t=403,wt=(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,Ot=(e,t)=>e.ok?t(e.value):e,En={kind:"idle"},It={kind:"loading"},z=(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:It,G=(e,t)=>t.ok?{kind:"ready",value:t.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&t.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:t.status,reason:t.reason}}:{kind:"failed",status:t.status,reason:t.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var Nt=(e,t)=>{let n=z(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Mt=(e,t)=>G(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Lt=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Ft=(e,t,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,t)))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 r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:n.reason,occurrence:r}}}},$t=(e,t)=>{if(e.kind!=="ready")return e;let{rows:n,meta:r}=t({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:r}}};var At=/^#[0-9a-f]{6}$/i,Dt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!At.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke=({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,vt=e=>{if(!Dt.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Ut=["fg","tint","accent","line","solid","solid-hover"],Bt={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),Ht=({fg:e,tint:t,accent:n})=>Object.freeze({fg:y(e),tint:y(t),accent:y(n),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:t.dark,dark:t.light})}),Wt=Object.freeze(Object.fromEntries(Re.map(e=>[e,Ht(Bt[e])])));export{w as a,Se as b,J as c,q as d,we as e,f,l as g,$e as h,Ae as i,L as j,ve as k,T as l,S as m,We as n,ze as o,ie as p,b as q,le as r,de as s,a as t,ot as u,h as v,x as w,u as x,W as y,ct as z,ut as A,mt as B,ft as C,gt as D,pt as E,P as F,ht as G,cn as H,xt as I,ye as J,un as K,kt as L,m as M,Et as N,Tn as O,he as P,Ct as Q,Pt as R,_t as S,wt as T,Ot as U,En as V,It as W,z as X,G as Y,Nt as Z,Mt as _,Lt as $,Ft as aa,$t as ba,ke as ca,vt as da,Re as ea,Ut as fa,Wt as ga};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var Ee=[{name:"B",power:0,fractionDigits:0},{name:"KiB",power:1,fractionDigits:1},{name:"MiB",power:2,fractionDigits:1},{name:"GiB",power:3,fractionDigits:2},{name:"TiB",power:4,fractionDigits:2}],j=new Map,K=e=>Number.isSafeInteger(e)&&e>=0,V=(e,t,n)=>{let r=`${n} ${t}`,o=j.get(r);return o===void 0&&(o=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:!0}),j.set(r,o)),o.format(e===0?0:e)},w= exports.a =(e,t)=>{if(!K(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return V(e,t,0)},Y=(e,t)=>Number((e/1024**t.power).toFixed(t.fractionDigits)),Se= exports.b =(e,t)=>{if(!K(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[n,...r]=Ee,o=n,i=Y(e,o);for(let d of r){if(i<1024)break;o=d,i=Y(e,o)}return`${V(i,t,o.fractionDigits)} ${o.name}`},J= exports.c =(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Pe=/[!-~]/g;var _e=/^[^eE]*[1-9]/,q= exports.d =e=>{let t=e.replace(Pe,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?_e.test(t)?null:0:n:null},we= exports.e =e=>{let t=q(e);return t!==null&&Number.isSafeInteger(t)?t:null};var Oe=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f= exports.f =e=>Oe.test(e);var l=class extends RangeError{constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Ne=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Me=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Z=864e5,I=6e4,E={min:1,max:9999},Q=new Map,ee=new Map,Le=e=>{let t=Q.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Q.set(e,t)),t},te=e=>{let t=new Date(0);return t.setUTCFullYear(e.year,e.month-1,e.day),t.setUTCHours(e.hour,e.minute,e.second,0),t.getUTCFullYear()===e.year&&t.getUTCMonth()===e.month-1&&t.getUTCDate()===e.day&&t.getUTCHours()===e.hour&&t.getUTCMinutes()===e.minute&&t.getUTCSeconds()===e.second?t.getTime():null},N=(e,t)=>{let[n,r,o,i,d,s,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let p={year:Number(n),month:Number(r),day:Number(o),hour:Number(i),minute:Number(d),second:s===void 0?0:Number(s)},X=p.year>=E.min?te(p):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:p,millis:X}},M=(e,t)=>{let n=new Map(Le(t).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={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"||r.year>E.max)throw new l("malformed",`The wall clock falls outside years ${E.min}-${E.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>te(M(e,t))-e,g=e=>String(e).padStart(2,"0"),ne=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${g(e.month)}-${g(e.day)}T${g(e.hour)}:${g(e.minute)}`;return t||e.second!==0?`${n}:${g(e.second)}`:n},Fe=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/I;return`${e<0?"-":"+"}${g(Math.floor(t/60))}:${g(t%60)}`},$e= exports.h =(e,t)=>{let n=Ie.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,n.slice(1)),d=[...new Set([O(o-Z,t),O(o+Z,t)])].filter(s=>O(o-s,t)===s);if(d.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(d.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${ne(r,!0)}${Fe(d[0])}`},re=(e,t)=>{let[n,r,o,i]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(i)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(i))*I},Ae= exports.i =(e,t)=>{let n=Ne.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,n.slice(1,8));return ne(M(r-re(e,n.slice(8)),t),!1)},De=(e,t)=>{let n=JSON.stringify([e,t]),r=ee.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),ee.set(n,r)),r},L= exports.j =(e,t,n)=>{let r=Me.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),i=o-re(e,r.slice(7));return M(i,n),De(t,n).format(i)};function ve(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.hasOwn(t,r)?String(t[r]):n)}var _authcore = require('@aiquants/auth-core');var T=e=>e===""?"":` (${e})`,oe=(e,t)=>{if(e.status!==null&&_authcore.accessFailureKindOfStatus.call(void 0, e.status)!==null)throw new RangeError(`failureSentence: a ${e.status} is an access failure, which the root's presenter states (draw it with FailureMessage or ResourceFailed)`);return t(e.reason)},Be=(e,t)=>t===""?e:`${e} Reason: ${t}.`,He=(e,t)=>t===""?e:`${e}${t}\u3002`,S= exports.m ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:Be,failureSentence:oe,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:He,failureSentence:oe,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"}},We= exports.n =e=>{if(!Object.hasOwn(S,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(S).join(", ")}`);return S[e]};var ze=4,Ge=[1,2,3,4,6,8,12,16,24],Xe=16,je=5/4,$={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Ye=11,ae=3/2,Ke=7/4,Ve=7/4,Je=120,qe=3/2,Ze=[1,2,3],ie= exports.p =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},A=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Ye,Math.round(Xe*je**e))},D=(e,t)=>ie(e*t),se=D(A($.body),ae),b= exports.q =se+24,le= exports.r =b+8,de= exports.s =se+8,F={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}},Qe=()=>Object.fromEntries(Ge.map(e=>[`space-${e}`,e*4])),et=()=>{let e=Object.fromEntries(Object.entries($).map(([n,r])=>{let o=A(r);return[n,{size:o,lineHeight:D(o,n==="title"?Ve:ae)}]})),t=A($.body);return{...e,prose:{size:t,lineHeight:D(t,Ke)}}},tt=()=>Object.fromEntries(Ze.map(e=>[`motion-${e}`,Je*qe**(e-1)])),ce=e=>Object.freeze({space:Object.freeze(Qe()),type:Object.freeze(et()),weight:F.weight,radius:F.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":le,"size-row-compact":de}),stroke:F.stroke,motion:Object.freeze(tt()),color:Object.freeze({...e})});var nt={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.t =ce(nt),rt="--cui-",ot= exports.u =e=>`var(${rt}${e})`;var at=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ue=(e,t)=>{let n=0,r=0;for(let o of e)at(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h= exports.v =e=>ue(e,.55),x= exports.w =e=>ue(e,.6),u= exports.x =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 me="caption",B="body",H=2*a.space["space-3"],fe={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"]},ge={type:"body",minInlinePx:a.size["size-target"]},C={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"]},it=10,st="2000-01-01T00:00:00Z",lt=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,dt=(e,t)=>{if(e.length===0)throw new RangeError(`A ${t} needs at least one text to be measured with`);for(let n of e)if(!f(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},c=(e,t,n,r)=>Math.max(...dt(e,t).map(o=>pe(o,n,r))),W= exports.y =e=>{switch(e.kind){case"text":return c(e.texts,"text",e.face,e.type);case"measured":return c(e.texts,"measured value","sans",B);case"pill":return c(e.labels,"pill","sans",fe.type)+fe.paddingInlinePx;case"button":return Math.max(v.minInlinePx,c(e.labels,"button","sans",v.type)+v.paddingInlinePx);case"link":return Math.max(ge.minInlinePx,c(e.labels,"link","sans",ge.type));case"switch":return e.labelHidden?C.trackInlinePx:C.trackInlinePx+C.labelGapPx+c(e.labels,"switch","sans",C.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((t,n)=>t+W(n),0)+(e.items.length-1)*a.space[e.gap]}}},ct= exports.z =(e,t)=>{let n=c([e.header],"column header","sans",me),r=e.note===void 0?0:c(e.note,"column header note","sans",me);return u(Math.max(n,r,...t.map(W))+H)},ut= exports.A =u(pe("\u3042".repeat(it),"sans",B)+H),mt= exports.B =e=>u(c(e,"comparison attribute","sans",B)+H),ft= exports.C =(e,t)=>L(st,e,t),gt= exports.D =(e,t)=>{if(t!==void 0&&!f(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return J(w(lt,e),t)},pt= exports.E =(e,t)=>u(Math.max(c(e,"tile caption","sans",U.captionType),c(t,"tile value","sans",U.valueType))+U.paddingInlinePx);var yt=.12,Tt=.16,bt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],P= exports.F =(e,t)=>{let n=0,r=0;for(let i of e)n+=1,bt.test(i)&&(r+=1);return(t==="mono"?x(e):h(e))+yt*n+Tt*r},ht= exports.G =e=>{for(let n of[e.name,...e.notes])if(!f(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(P(e.name,"sans")*a.type.body.size,...e.notes.map(n=>P(n,"sans")*a.type.caption.size));return{minWidthPx:u(t)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},cn= exports.H =e=>{let t=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},xt= exports.I =(e,t)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${t}`);return e===null?{widthPx:0,extentBelowPx:t+ye}:{widthPx:u(P(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ye= exports.J =a.stroke["focus-offset"]+a.stroke["focus-width"],un= exports.K =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,kt= exports.L =(e,t)=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);if(!(Number.isInteger(t)&&t>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${t}`);return e/_**t};var Rt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m= exports.M =e=>`${Rt(e)/16}rem`;var Te=({masterMinPx:e,detailMinPx:t,gapPx:n})=>{for(let r of[e,t])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+t},Et= exports.N =(e,t)=>{let n=Te(t);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 r=(e-t.gapPx)/(1+_),o=Math.min(Math.max(t.masterMinPx,r),e-t.gapPx-t.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-t.gapPx-o}},Tn= exports.O =e=>{let t=Te(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=m(e.gapPx),i=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,d=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,s=`@container (min-width:${m(t)}){${r}{grid-template-columns:${d} minmax(0,1fr)}}`;return{key:n,css:i+s}};var St=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he= exports.P =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let t=0,n=null;for(let{width:r}of e){if(r.fixedPx!==void 0){t+=be(r.fixedPx);continue}let o=be(r.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,t+=o}return t},Ct= exports.Q =e=>he(e)+St;var Pt=(e,t,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Tile minimum width must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let r=[];for(let s=1;s<=e;s+=1)e%s===0&&r.push({columns:s,minContainerPx:s*t+(s-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,i=`[data-cui-tile-grid="${o}"]`,d=r.map(({columns:s,minContainerPx:R})=>{let p=`${i}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?p:`@container (min-width:${m(R)}){${p}}`});return{key:o,steps:r,css:d.join("")}};var _t=403,wt= exports.T =(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,Ot= exports.U =(e,t)=>e.ok?t(e.value):e,En= exports.V ={kind:"idle"},It= exports.W ={kind:"loading"},z= exports.X =(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:It,G= exports.Y =(e,t)=>t.ok?{kind:"ready",value:t.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&t.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:t.status,reason:t.reason}}:{kind:"failed",status:t.status,reason:t.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var Nt=(e,t)=>{let n=z(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Mt= exports._ =(e,t)=>G(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Lt= exports.$ =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Ft= exports.aa =(e,t,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,t)))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 r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:n.reason,occurrence:r}}}},$t= exports.ba =(e,t)=>{if(e.kind!=="ready")return e;let{rows:n,meta:r}=t({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:r}}};var At=/^#[0-9a-f]{6}$/i,Dt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!At.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke= exports.ca =({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,vt= exports.da =e=>{if(!Dt.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Ut= exports.fa =["fg","tint","accent","line","solid","solid-hover"],Bt={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),Ht=({fg:e,tint:t,accent:n})=>Object.freeze({fg:y(e),tint:y(t),accent:y(n),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:t.dark,dark:t.light})}),Wt= exports.ga =Object.freeze(Object.fromEntries(Re.map(e=>[e,Ht(Bt[e])])));exports.a = w; exports.b = Se; exports.c = J; exports.d = q; exports.e = we; exports.f = f; exports.g = l; exports.h = $e; exports.i = Ae; exports.j = L; exports.k = ve; exports.l = T; exports.m = S; exports.n = We; exports.o = ze; exports.p = ie; exports.q = b; exports.r = le; exports.s = de; exports.t = a; exports.u = ot; exports.v = h; exports.w = x; exports.x = u; exports.y = W; exports.z = ct; exports.A = ut; exports.B = mt; exports.C = ft; exports.D = gt; exports.E = pt; exports.F = P; exports.G = ht; exports.H = cn; exports.I = xt; exports.J = ye; exports.K = un; exports.L = kt; exports.M = m; exports.N = Et; exports.O = Tn; exports.P = he; exports.Q = Ct; exports.R = Pt; exports.S = _t; exports.T = wt; exports.U = Ot; exports.V = En; exports.W = It; exports.X = z; exports.Y = G; exports.Z = Nt; exports._ = Mt; exports.$ = Lt; exports.aa = Ft; exports.ba = $t; exports.ca = ke; exports.da = vt; exports.ea = Re; exports.fa = Ut; exports.ga = Wt;
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWUST5VT6cjs = require('./chunk-WUST5VT6.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunkWUST5VT6cjs.s; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkWUST5VT6cjs.m; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunkWUST5VT6cjs.J; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkWUST5VT6cjs.A; exports.HTTP_FORBIDDEN = _chunkWUST5VT6cjs.S; exports.LATTICE_PX = _chunkWUST5VT6cjs.o; exports.ROW_WITH_CONTROL_PX = _chunkWUST5VT6cjs.r; exports.TARGET_PX = _chunkWUST5VT6cjs.q; exports.TOKENS = _chunkWUST5VT6cjs.t; exports.TONES = _chunkWUST5VT6cjs.ga; exports.TONE_HUES = _chunkWUST5VT6cjs.ea; exports.TONE_ROLES = _chunkWUST5VT6cjs.fa; exports.ZonedTimeError = _chunkWUST5VT6cjs.g; exports.beginPage = _chunkWUST5VT6cjs.$; exports.beginPagedReload = _chunkWUST5VT6cjs.Z; exports.beginReload = _chunkWUST5VT6cjs.X; exports.ceil8 = _chunkWUST5VT6cjs.x; exports.ceilToLattice = _chunkWUST5VT6cjs.p; exports.cellContentInlinePx = _chunkWUST5VT6cjs.y; exports.comparisonAttributePx = _chunkWUST5VT6cjs.B; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkWUST5VT6cjs.D; exports.cssVar = _chunkWUST5VT6cjs.u; exports.figureBoxPlan = _chunkWUST5VT6cjs.G; exports.figureDiscLabelPlan = _chunkWUST5VT6cjs.I; exports.fillLabel = _chunkWUST5VT6cjs.k; exports.fixedColumnPx = _chunkWUST5VT6cjs.z; exports.flatMapOutcome = _chunkWUST5VT6cjs.U; exports.formatByteSize = _chunkWUST5VT6cjs.b; exports.formatCount = _chunkWUST5VT6cjs.a; exports.formatInstant = _chunkWUST5VT6cjs.j; exports.goldenSectionPx = _chunkWUST5VT6cjs.L; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkWUST5VT6cjs.C; exports.isReadableText = _chunkWUST5VT6cjs.f; exports.keepLastGood = _chunkWUST5VT6cjs.Y; exports.lightDark = _chunkWUST5VT6cjs.ca; exports.mapOutcome = _chunkWUST5VT6cjs.T; exports.mapPagedList = _chunkWUST5VT6cjs.ba; exports.masterDetailPlan = _chunkWUST5VT6cjs.N; exports.monoTextWidthEm = _chunkWUST5VT6cjs.w; exports.placeholderRule = _chunkWUST5VT6cjs.da; exports.pxToRem = _chunkWUST5VT6cjs.M; exports.readDecimalText = _chunkWUST5VT6cjs.d; exports.readIntegerText = _chunkWUST5VT6cjs.e; exports.reasonAside = _chunkWUST5VT6cjs.l; exports.resolveConsoleUiLabels = _chunkWUST5VT6cjs.n; exports.settleFirstPage = _chunkWUST5VT6cjs._; exports.settlePage = _chunkWUST5VT6cjs.aa; exports.spacedTextWidthEm = _chunkWUST5VT6cjs.F; exports.tableFrameMinInlinePx = _chunkWUST5VT6cjs.Q; exports.tableMinInlinePx = _chunkWUST5VT6cjs.P; exports.textWidthEm = _chunkWUST5VT6cjs.v; exports.tileGridPlan = _chunkWUST5VT6cjs.R; exports.tileMinInlinePx = _chunkWUST5VT6cjs.E; exports.toOffsetIso = _chunkWUST5VT6cjs.h; exports.toWallTime = _chunkWUST5VT6cjs.i;
|
package/dist/core.d.cts
CHANGED
|
@@ -22,7 +22,7 @@ type ConsoleUiLabels = {
|
|
|
22
22
|
readonly failureSentence: (failure: {
|
|
23
23
|
readonly status: number | null;
|
|
24
24
|
readonly reason: string;
|
|
25
|
-
},
|
|
25
|
+
}, failed: (reason: string) => string) => string;
|
|
26
26
|
readonly loadMore: (limit: string) => string;
|
|
27
27
|
readonly endOfRecords: string;
|
|
28
28
|
readonly close: string;
|
package/dist/core.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ type ConsoleUiLabels = {
|
|
|
22
22
|
readonly failureSentence: (failure: {
|
|
23
23
|
readonly status: number | null;
|
|
24
24
|
readonly reason: string;
|
|
25
|
-
},
|
|
25
|
+
}, failed: (reason: string) => string) => string;
|
|
26
26
|
readonly loadMore: (limit: string) => string;
|
|
27
27
|
readonly endOfRecords: string;
|
|
28
28
|
readonly close: string;
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as V,A as
|
|
1
|
+
import{$ as V,A as z,B as A,C as B,D as C,E as D,F as E,G as F,I as G,J as H,L as I,M as J,N as K,P as L,Q as M,R as N,S as O,T as P,U as Q,X as R,Y as S,Z as T,_ as U,a,aa as W,b,ba as X,ca as aa,d as c,da as ba,e as d,ea as ca,f as e,fa as da,g as f,ga as ea,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-H4DAGEIG.js";import{a as Y,b as Z,c as _,d as $}from"./chunk-FXEGLGL7.js";export{r as COMPACT_ROW_PX,l as CONSOLE_UI_LABEL_CATALOGS,_ as CONTRAST_MINIMUM,$ as CONTRAST_PAIRS,H as FIGURE_RING_REACH_PX,z as FLEXIBLE_COLUMN_MIN_PX,O as HTTP_FORBIDDEN,n as LATTICE_PX,q as ROW_WITH_CONTROL_PX,p as TARGET_PX,s as TOKENS,ea as TONES,ca as TONE_HUES,da as TONE_ROLES,f as ZonedTimeError,V as beginPage,T as beginPagedReload,R as beginReload,w as ceil8,o as ceilToLattice,x as cellContentInlinePx,A as comparisonAttributePx,Z as contrastRatio,C as countSampleText,t as cssVar,F as figureBoxPlan,G as figureDiscLabelPlan,j as fillLabel,y as fixedColumnPx,Q as flatMapOutcome,b as formatByteSize,a as formatCount,i as formatInstant,I as goldenSectionPx,Y as hexToSrgb,B as instantSampleText,e as isReadableText,S as keepLastGood,aa as lightDark,P as mapOutcome,X as mapPagedList,K as masterDetailPlan,v as monoTextWidthEm,ba as placeholderRule,J as pxToRem,c as readDecimalText,d as readIntegerText,k as reasonAside,m as resolveConsoleUiLabels,U as settleFirstPage,W as settlePage,E as spacedTextWidthEm,M as tableFrameMinInlinePx,L as tableMinInlinePx,u as textWidthEm,N as tileGridPlan,D as tileMinInlinePx,g as toOffsetIso,h as toWallTime};
|