@aiquants/console-ui 0.8.1 → 0.9.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 +12 -8
- package/dist/chunk-HROMRBBM.js +1 -0
- package/dist/chunk-RYHSVWM2.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +1 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +22 -6
- package/dist/index.d.ts +22 -6
- package/dist/index.js +1 -1
- package/dist/styles/console-ui.css +35 -8
- package/package.json +2 -2
- package/dist/chunk-K46FVHUL.js +0 -1
- package/dist/chunk-W3FRNSCO.cjs +0 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ pnpm add @aiquants/console-ui
|
|
|
21
21
|
| `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
|
|
22
22
|
| `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the topmost open modal dialog of a document, 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. |
|
|
23
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. |
|
|
24
|
-
| `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` (
|
|
24
|
+
| `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` (with their more-contrast colours on `[data-cui-root][data-cui-contrast="more"]` and every duration at `0ms` on `[data-cui-root][data-cui-reduced-motion]`) and the component rules, all inside `@layer cui`. |
|
|
25
25
|
|
|
26
26
|
The `/core` exports:
|
|
27
27
|
|
|
@@ -137,6 +137,8 @@ A console shows every instant with `formatInstant(iso, formatLocale, timeZone)`
|
|
|
137
137
|
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.
|
|
138
138
|
`contrast` picks the contrast of the palette: `"standard"` (the default) or `"more"`, the more-contrast palette (see Tokens and colours). It is written to the root's `data-cui-contrast`, and any other value throws `RangeError` when the root renders instead of drawing the standard palette silently.
|
|
139
139
|
A host with a contrast setting of its own maps that setting here; a host that follows the operating system passes `"more"` while `prefers-contrast: more` matches. Forced-colors mode (Windows high contrast) is not this setting: there the browser replaces the palette with system colours whatever `contrast` is (see Tokens and colours).
|
|
140
|
+
`reducedMotion` lets a host reduce the motion of every component whatever the operating system prefers: `true` marks the root with `data-cui-reduced-motion`, under which the package draws as it does for a reader whose `prefers-reduced-motion` is `reduce` (every duration `0ms`, the indeterminate progress segment resting in the middle of its track). Without it (or with `false`) the root carries no mark and the media query alone decides. A value other than a boolean throws `TypeError` when the root renders.
|
|
141
|
+
A host with a per-user motion setting passes that setting here (the operating system's preference still applies on its own); any part of the host that moves by its own rules reads the same setting.
|
|
140
142
|
|
|
141
143
|
The root sets no font property: host content inside the root keeps its own font family, size, weight and line height, and inherits only the root's text colour (the `fg` role) and the `--cui-*` variables, drawn over the root's `surface` background. The package's body type (13/20) and sans face are declared by `Card` for what is drawn in it.
|
|
142
144
|
The root declares no `color-scheme` either: every colour is a `light-dark()` pair, so the palette follows the scheme the root inherits. A host with its own light and dark modes binds them to `color-scheme` (`html { color-scheme: light; }` and `html.dark { color-scheme: dark; }`), so the console and the host never show different schemes; `color-scheme: light dark` on `:root` would follow the operating system instead and can disagree with the host's own switch.
|
|
@@ -155,7 +157,8 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
155
157
|
- the dialog's measure `measure-dialog`, `calc(40ic + 2 * var(--cui-space-6))`: a paragraph of 40 ideographs (WCAG 1.4.8 keeps a CJK line at or below 40 characters; `ic` is the font's own ideograph advance) and the dialog's inset of 24 on both sides, its border included. It is the width of a `Dialog`, and a host that draws a box of the same outer width (an empty state's card) reads the same variable instead of copying the formula.
|
|
156
158
|
Only the 20 px lines (`caption` and `body`) and the 28 px `title` line, whose difference from 44 is a multiple of 8, can be centred in a 44 px box on the lattice, and every control draws its text in `body` or `title`, except a compact `SegmentedControl` (a band of supplementary controls), whose 28 px faces draw `caption` text inside 44 px targets.
|
|
157
159
|
- The token variables are declared on `[data-cui-root]` (never `:root`) with lengths in rem, the strokes (`border-width` 1, `focus-width` 2, `focus-offset` 2, `marker-width` 2) in px and the durations in ms. A browser snaps a used border width down to whole device pixels, so a rem stroke would leave the paddings that compensate for the border (`calc(… - var(--cui-border-width))`) off the lattice for a reader who enlarges the root font size; in px every lattice measure scales exactly with the root font size around a 1 px border.
|
|
158
|
-
- Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`)
|
|
160
|
+
- Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`) and in a root the host asks to reduce motion (`reducedMotion`, the rule `[data-cui-root][data-cui-reduced-motion]` with the same declarations), so a component that moves stops without a rule of its own.
|
|
161
|
+
No rule writes a duration by hand, and the indeterminate progress segment sweeps only for a reader who allows motion, outside every root that has asked to reduce it (`:not([data-cui-reduced-motion] *)` on the moving element inside the media query; the stylesheet's tests hold every animation to that form).
|
|
159
162
|
- Text and surface colours are applied through role attributes only. `data-cui-fg` paints text, `data-cui-surface` paints the surface text sits on, `data-cui-accent` paints non-text graphics, `data-cui-fill` paints the surface of a figure's shape (always the surface of the shape's group, which its text is measured on) and `data-cui-stroke` a figure's lines. Every role has a light and a dark value, written as `light-dark(<light>, <dark>)` (see Wrapping a console for the scheme). `CONTRAST_PAIRS.light` and `CONTRAST_PAIRS.dark` list the same pairs: for every role,
|
|
160
163
|
the surfaces it may be drawn on with the WCAG 2 ratio on each in that scheme.
|
|
161
164
|
Every pair meets AAA (`CONTRAST_MINIMUM`: 7 for text, 4.5 for large text, 3 for non-text; the lowest text and non-text ratios are 7.12 and 3.47 in the light scheme, 9.29 and 5.54 in the dark one), and a pair not in the table is never drawn. `Text` is the only component that paints caller text, and it paints only through a text role.
|
|
@@ -296,7 +299,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
296
299
|
the rows shown at the press and at every commit while `busy` is up come before the page, the page's rows arrive in the commit in which `busy` falls (as `usePagedResource` delivers them), and the first of them is the marked element right after the last row shown before.
|
|
297
300
|
A row a write added in front of or among the shown rows is not the page's, and a page that appended nothing after them (an empty last page) counts as adding nothing. Without `busy`, the rows shown at the press come before the page.
|
|
298
301
|
- `data-cui-row-focus` is the public row-focus hook `LoadMore` finds rows by: inside `rows.ref` each shown row carries exactly one element with it (`rows.count` in all), and a row keeps that element while it stays shown (key rows by their record).
|
|
299
|
-
`DataTable` rows and `
|
|
302
|
+
`DataTable` rows, `RowButton` and `RowLink` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`.
|
|
300
303
|
A marked element inside a `DataTable` row detail within `rows.ref` (a row of a table nested in the detail) belongs to that nested list: `LoadMore` neither counts it nor moves focus to it, so a table whose details hold tables pages its own records.
|
|
301
304
|
`DataTable`'s own rescue counts its rows by the same hook: the marked direct children of its body are its record rows, which give the positions focus moves by.
|
|
302
305
|
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`.
|
|
@@ -309,7 +312,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
309
312
|
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.
|
|
310
313
|
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.
|
|
311
314
|
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.
|
|
312
|
-
- A pressed `Button` (busy and unavailable ones included) or `
|
|
315
|
+
- A pressed `Button` (busy and unavailable ones included), `RowButton` or `RowLink` takes focus before its `onClick`, `onSelect` or `onNavigate` runs, without scrolling, when it does not have it: WebKit (Safari on iOS and macOS) and Firefox on macOS do not focus a button or a link 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.
|
|
313
316
|
- 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).
|
|
314
317
|
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.
|
|
315
318
|
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.
|
|
@@ -321,7 +324,8 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
321
324
|
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.
|
|
322
325
|
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.
|
|
323
326
|
The write lands in the root's region when every candidate contains the console. Otherwise the topmost is the innermost candidate (the one inside all the others): when it is a `Dialog`, of this console or of another console on the page, the write lands in that dialog's region; when it is any other modal, the write throws. When no candidate lies inside all the others (focus is in none of the open modal dialogs and they do not nest), which one is topmost cannot be told, and the write throws as well.
|
|
324
|
-
`topmostModalOf(document)` of `@aiquants/console-ui/core` is that rule: it returns `{ kind: "none" }` while no modal dialog is open, `{ kind: "topmost", dialog }` with the topmost one, or `{ kind: "undecidable" }
|
|
327
|
+
`topmostModalOf(document)` of `@aiquants/console-ui/core` is that rule: it returns `{ kind: "none" }` while no modal dialog is open, `{ kind: "topmost", dialog }` with the topmost one, or `{ kind: "undecidable", dialogs }` with the open modal dialogs in document order (any of which may be the topmost), and reads only the document it is given.
|
|
328
|
+
A host that routes announcements or focus of its own by the topmost modal calls it instead of keeping a copy of the rule. When the topmost cannot be told, the host can still route to an owner of every one of the `dialogs` that tells which of its own modals is on top; `announce` cannot write then (the write throws, as above), so a host holds what it would announce through it until the topmost can be told.
|
|
325
329
|
The check runs at the write, not at the call, so a handler may announce its outcome and close the modal in the same task, or let an effect close it, as long as the modal is closed when the quiet window passes: an outcome announced inside a `Dialog` that then closes is heard in the root's region.
|
|
326
330
|
`JobCard`'s state line is a live region of its own (polite and atomic, holding the job's hidden name and its state pill), so a changed state is read as `<name> <state>` without moving focus or interrupting (WCAG 2.2.4), exactly as drawn.
|
|
327
331
|
The check needs the `:modal` selector (Chrome 105, Firefox 103, Safari 15.6): `ConsoleUiRoot` probes it once when it mounts and throws there, naming the requirement, in a document without it.
|
|
@@ -403,12 +407,12 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
403
407
|
|
|
404
408
|
| Component / hook | Contract |
|
|
405
409
|
| --- | --- |
|
|
406
|
-
| `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). |
|
|
410
|
+
| `ConsoleUiRoot`, `useConsoleUi`, `useAnnounce`, `ANNOUNCE_SETTLE_MS`, `useAccessFailure` | Root, token scope, contrast of the palette (`contrast`), the host's reduced motion (`reducedMotion`), 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). |
|
|
407
411
|
| `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. |
|
|
408
412
|
| `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. |
|
|
409
413
|
| `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). |
|
|
410
414
|
| `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. |
|
|
411
|
-
| `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. |
|
|
415
|
+
| `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. Each takes `keyShortcuts`, the keyboard shortcuts its caller handles in WAI-ARIA's notation (`Control+Enter Meta+Enter`), drawn unchanged as `aria-keyshortcuts`; an empty or white-space-only text throws `RangeError` naming the `testId`. |
|
|
412
416
|
| `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`. |
|
|
413
417
|
| `Notice`, `AlertMessage` | Quiet note; failure message read once per occurrence. Both are paragraphs with the reading measure. |
|
|
414
418
|
| `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. |
|
|
@@ -418,7 +422,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
418
422
|
| `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. |
|
|
419
423
|
| `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). |
|
|
420
424
|
| `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). |
|
|
421
|
-
| `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). |
|
|
425
|
+
| `SelectableList`, `RowButton`, `RowLink` | 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). `RowLink` is the row as a real link (`href`), for a list whose rows open places with addresses of their own: a plain primary click takes focus and hands `href` to the host's router (`onNavigate`), while a click with a modifier key or another button keeps the browser's own behaviour on the real `href` (a new tab, a new window); `current` marks the row of the current page with `aria-current="page"` and draws it like a selected `RowButton`. It has `RowButton`'s shape, text, focus ring and `LoadMore` mark and holds the same phrasing content; list such rows in a `List` without markers and with the `space-1` gap (`marker="none"`, `gap="space-1"`), as `SelectableList` lists its own. Both rows take `keyShortcuts` as `Button` does. |
|
|
422
426
|
| `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. |
|
|
423
427
|
| `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`. |
|
|
424
428
|
| `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`. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as P,b as te,c as ne,d as F,i as A}from"./chunk-RA33TN5N.js";var Be="dialog:modal",He=e=>{let t=[...e.querySelectorAll(Be)];if(t.length===0)return{kind:"none"};let n=e.activeElement,r=t.filter(l=>l.contains(n)),o=r.length>0?r:t,a=o.find(l=>o.every(s=>s.contains(l)));return a===void 0?{kind:"undecidable",dialogs:o}:{kind:"topmost",dialog:a}};var ze=[{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}],re=new Map,ae=e=>Number.isSafeInteger(e)&&e>=0,ie=(e,t,n)=>{let r=`${n} ${t}`,o=re.get(r);return o===void 0&&(o=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:!0}),re.set(r,o)),o.format(e===0?0:e)},$=(e,t)=>{if(!ae(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return ie(e,t,0)},oe=(e,t)=>Number((e/1024**t.power).toFixed(t.fractionDigits)),We=(e,t)=>{if(!ae(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[n,...r]=ze,o=n,a=oe(e,o);for(let l of r){if(a<1024)break;o=l,a=oe(e,o)}return`${ie(a,t,o.fractionDigits)} ${o.name}`},se=(e,t)=>t===void 0?e:`${e} ${t}`;var je=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ge=/[!-~]/g;var Xe=/^[^eE]*[1-9]/,le=e=>{let t=e.replace(Ge,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!je.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Xe.test(t)?null:0:n:null},Ye=e=>{let t=le(e);return t!==null&&Number.isSafeInteger(t)?t:null};var Ke=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,T=e=>Ke.test(e);var c=class extends RangeError{reason;constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Ve=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,qe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Je=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,de=864e5,v=6e4,O={min:1,max:9999},ce=new Map,ue=new Map,Ze=e=>{let t=ce.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"}),ce.set(e,t)),t},me=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},U=(e,t)=>{let[n,r,o,a,l,s,f]=t;if(f!==void 0&&/[1-9]/.test(f))throw new c("subsecond",`Fractions of a second cannot be kept: ${e}`);let u={year:Number(n),month:Number(r),day:Number(o),hour:Number(a),minute:Number(l),second:s===void 0?0:Number(s)},E=u.year>=O.min?me(u):null;if(E===null)throw new c("malformed",`Not a calendar date and time: ${e}`);return{fields:u,millis:E}},B=(e,t)=>{let n=new Map(Ze(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>O.max)throw new c("malformed",`The wall clock falls outside years ${O.min}-${O.max}: ${new Date(e).toISOString()}`);return r},D=(e,t)=>me(B(e,t))-e,b=e=>String(e).padStart(2,"0"),fe=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${b(e.month)}-${b(e.day)}T${b(e.hour)}:${b(e.minute)}`;return t||e.second!==0?`${n}:${b(e.second)}`:n},Qe=e=>{if(e%v!==0)throw new c("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/v;return`${e<0?"-":"+"}${b(Math.floor(t/60))}:${b(t%60)}`},et=(e,t)=>{let n=Ve.exec(e);if(n===null)throw new c("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=U(e,n.slice(1)),l=[...new Set([D(o-de,t),D(o+de,t)])].filter(s=>D(o-s,t)===s);if(l.length===0)throw new c("nonexistent",`${e} does not exist in ${t}`);if(l.length>1)throw new c("ambiguous",`${e} occurs twice in ${t}`);return`${fe(r,!0)}${Qe(l[0])}`},ge=(e,t)=>{let[n,r,o,a]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(a)>59)throw new c("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(a))*v},tt=(e,t)=>{let n=qe.exec(e);if(n===null)throw new c("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=U(e,n.slice(1,8));return fe(B(r-ge(e,n.slice(8)),t),!1)},nt=(e,t)=>{let n=JSON.stringify([e,t]),r=ue.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"}),ue.set(n,r)),r},H=(e,t,n)=>{let r=Je.exec(e);if(r===null)throw new c("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=U(e,[...r.slice(1,7),void 0]),a=o-ge(e,r.slice(7));return B(a,n),nt(t,n).format(a)};function rt(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.hasOwn(t,r)?String(t[r]):n)}import{accessFailureKindOfStatus as ot}from"@aiquants/auth-core";var x=e=>e===""?"":` (${e})`,pe=(e,t)=>{if(e.status!==null&&ot(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)},at=(e,t)=>t===""?e:`${e} Reason: ${t}.`,it=(e,t)=>t===""?e:`${e}${t}\u3002`,w={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${x(e)}.`,refreshFailed:e=>`Could not refresh${x(e)}.`,forbiddenBecause:at,failureSentence:pe,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${x(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${x(e)}\u3002`,forbiddenBecause:it,failureSentence:pe,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"}},st=e=>{if(!Object.hasOwn(w,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(w).join(", ")}`);return w[e]};var dt=64,ct=255,ye=([e,t,n])=>{let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),o=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*o-.0040720468*a,1.9779984951*r-2.428592205*o+.4505937099*a,.0259040371*r+.7827717662*o-.808675766*a]},ut=([e,t,n])=>{let r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3,l=s=>Math.min(1,Math.max(0,s));return[l(4.0767416621*r-3.3077115913*o+.2309699292*a),l(-1.2684380046*r+2.6097574011*o-.3413193965*a),l(-.0041960863*r-.7034186147*o+1.707614701*a)]},mt=e=>`#${e.map(t=>Math.round(ne(t)*ct).toString(16).padStart(2,"0")).join("")}`,Te=(e,t)=>{let n=P(e);if(t.length===0)throw new RangeError(`A more-contrast colour needs the surfaces it is drawn on: ${e}`);let r=F(n),o=t.map(d=>F(P(d))),a=o.every(d=>d>r);if(!(a||o.every(d=>d<r)))throw new RangeError(`The surfaces of a more-contrast colour must all be lighter or all be darker than it: ${e} on ${t.join(", ")}`);let l=a?Math.min(...o):Math.max(...o),s=a?0:1,f=d=>(Math.max(d,l)+.05)/(Math.min(d,l)+.05),u=Math.sqrt(f(r)*f(s));if(r===s)return e.toLowerCase();let E=ye(n.map(te)),ve=ye([s,s,s]),Q=d=>ut(E.map((p,L)=>p+d*(ve[L]-p))),Ue=([d,p,L])=>.2126*d+.7152*p+.0722*L,ee=0,N=1;for(let d=0;d<dt;d+=1){let p=(ee+N)/2;f(Ue(Q(p)))>=u?N=p:ee=p}return mt(Q(N))},be=(e,t)=>{let n=o=>{if(!Object.hasOwn(e,o))throw new RangeError(`Not a role of the palette: ${o}`);return e[o]};for(let o of Object.keys(t))n(o);let r=Object.fromEntries(Object.keys(e).map(o=>{let a=t[o];if(a===void 0)return[o,e[o]];let l=a.map(n),{light:s,dark:f}=e[o];return[o,Object.freeze({light:Te(s,l.map(u=>u.light)),dark:Te(f,l.map(u=>u.dark))})]}));return Object.freeze(r)};var ft=4,gt=[1,2,3,4,6,8,12,16,24],pt=16,yt=5/4,W={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Tt=11,he=3/2,bt=7/4,ht=7/4,xt=120,kt=3/2,Rt=[1,2,3],Ct=40,St="space-6",xe=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},j=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Tt,Math.round(pt*yt**e))},G=(e,t)=>xe(e*t),ke=G(j(W.body),he),k=ke+24,Re=k+8,Ce=ke+8,z={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}},Et=()=>Object.fromEntries(gt.map(e=>[`space-${e}`,e*4])),Pt=()=>{let e=Object.fromEntries(Object.entries(W).map(([n,r])=>{let o=j(r);return[n,{size:o,lineHeight:G(o,n==="title"?ht:he)}]})),t=j(W.body);return{...e,prose:{size:t,lineHeight:G(t,bt)}}},Ot=()=>Object.fromEntries(Rt.map(e=>[`motion-${e}`,xt*kt**(e-1)])),Se=(e,t)=>{let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||!n.every(o=>Object.hasOwn(t,o)))throw new RangeError(`The more-contrast palette must hold the roles of the standard one: ${n.join(", ")} / ${r.join(", ")}`);return Object.freeze({space:Object.freeze(Et()),type:Object.freeze(Pt()),weight:z.weight,radius:z.radius,size:Object.freeze({"size-target":k,"size-control":k,"size-row":k,"size-row-control":Re,"size-row-compact":Ce}),stroke:z.stroke,motion:Object.freeze(Ot()),measure:Object.freeze({"measure-dialog":Object.freeze({ic:Ct,inset:St})}),color:Object.freeze({...e}),moreContrastColor:Object.freeze({...t})})};var Ee={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"}},wt=Object.freeze({...Object.fromEntries(Object.entries(A.light).map(([e,t])=>[e,Object.freeze(Object.keys(t))])),"border-subtle":Object.freeze(["surface","subtle","sunken"])}),i=Se(Ee,be(Ee,wt)),_t="--cui-",Mt=e=>`var(${_t}${e})`;var It=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,Pe=(e,t)=>{let n=0,r=0;for(let o of e)It(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},R=e=>Pe(e,.55),C=e=>Pe(e,.6),g=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 Oe="caption",K="body",V=2*i.space["space-3"],we={type:"caption",paddingInlinePx:2*i.space["space-2"]},X={type:"body",paddingInlinePx:2*i.space["space-3"]+2*i.stroke["border-width"],minInlinePx:i.size["size-control"]},_e={type:"body",minInlinePx:i.size["size-target"]},_={trackInlinePx:2*i.type.body.lineHeight+3*i.space["space-1"],labelGapPx:i.space["space-2"],type:"body"},Y={captionType:"caption",valueType:"heading",paddingInlinePx:2*i.space["space-3"]},Nt=10,Lt="2000-01-01T00:00:00Z",Ft=9999999,Me=(e,t,n)=>(t==="mono"?C(e):R(e))*i.type[n].size,At=(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(!T(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},m=(e,t,n,r)=>Math.max(...At(e,t).map(o=>Me(o,n,r))),q=e=>{switch(e.kind){case"text":return m(e.texts,"text",e.face,e.type);case"measured":return m(e.texts,"measured value","sans",K);case"pill":return m(e.labels,"pill","sans",we.type)+we.paddingInlinePx;case"button":return Math.max(X.minInlinePx,m(e.labels,"button","sans",X.type)+X.paddingInlinePx);case"link":return Math.max(_e.minInlinePx,m(e.labels,"link","sans",_e.type));case"switch":return e.labelHidden?_.trackInlinePx:_.trackInlinePx+_.labelGapPx+m(e.labels,"switch","sans",_.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+q(n),0)+(e.items.length-1)*i.space[e.gap]}}},$t=(e,t)=>{let n=m([e.header],"column header","sans",Oe),r=e.note===void 0?0:m(e.note,"column header note","sans",Oe);return g(Math.max(n,r,...t.map(q))+V)},Dt=g(Me("\u3042".repeat(Nt),"sans",K)+V),vt=e=>g(m(e,"comparison attribute","sans",K)+V),Ut=(e,t)=>H(Lt,e,t),Bt=(e,t)=>{if(t!==void 0&&!T(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return se($(Ft,e),t)},Ht=(e,t)=>g(Math.max(m(e,"tile caption","sans",Y.captionType),m(t,"tile value","sans",Y.valueType))+Y.paddingInlinePx);var zt=.12,Wt=.16,jt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,S=i.space["space-3"],M=(e,t)=>{let n=0,r=0;for(let a of e)n+=1,jt.test(a)&&(r+=1);return(t==="mono"?C(e):R(e))+zt*n+Wt*r},Gt=e=>{for(let n of[e.name,...e.notes])if(!T(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(M(e.name,"sans")*i.type.body.size,...e.notes.map(n=>M(n,"sans")*i.type.caption.size));return{minWidthPx:g(t)+2*S,heightPx:2*S+i.type.body.lineHeight+e.notes.length*i.type.caption.lineHeight}},Hn=e=>{let t=S+i.type.body.lineHeight;return{insetPx:S,namePx:S+i.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*i.type.caption.lineHeight+i.type.caption.lineHeight/2)}},Xt=(e,t)=>{if(e!==null&&!T(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+Ie}:{widthPx:g(M(e,"sans")*i.type.caption.size),extentBelowPx:t+i.space["space-1"]+i.type.caption.lineHeight}},Ie=i.stroke["focus-offset"]+i.stroke["focus-width"],zn=i.stroke["focus-offset"]+i.stroke["focus-width"]/2;var I=(1+Math.sqrt(5))/2,Yt=(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/I**t};var Kt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},y=e=>`${Kt(e)/16}rem`;var Ne=({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},Vt=(e,t)=>{let n=Ne(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+I),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}},Kn=e=>{let t=Ne(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=y(e.gapPx),a=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,l=`clamp(${y(e.masterMinPx)},calc((100% - ${o}) / ${1+I}),calc(100% - ${o} - ${y(e.detailMinPx)}))`,s=`@container (min-width:${y(t)}){${r}{grid-template-columns:${l} minmax(0,1fr)}}`;return{key:n,css:a+s}};var qt=2*i.space["space-1"],Le=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},Fe=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+=Le(r.fixedPx);continue}let o=Le(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},Jt=e=>Fe(e)+qt;var Zt=(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}`,a=`[data-cui-tile-grid="${o}"]`,l=r.map(({columns:s,minContainerPx:f})=>{let u=`${a}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?u:`@container (min-width:${y(f)}){${u}}`});return{key:o,steps:r,css:l.join("")}};var Qt=403,en=(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,tn=(e,t)=>e.ok?t(e.value):e,er={kind:"idle"},nn={kind:"loading"},J=(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:nn,Z=(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 rn=(e,t)=>{let n=J(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},on=(e,t)=>Z(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),an=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,sn=(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}}}},ln=(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 dn=/^#[0-9a-f]{6}$/i,cn=/^[a-z][a-z0-9-]*$/,Ae=e=>{if(!dn.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},$e=({light:e,dark:t})=>`light-dark(${Ae(e)}, ${Ae(t)})`,un=e=>{if(!cn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${$e(i.color["fg-muted"])}; opacity: 1; }`};var De=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],mn=["fg","tint","accent","line","solid","solid-hover"],fn={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"}}},h=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),gn=({fg:e,tint:t,accent:n})=>Object.freeze({fg:h(e),tint:h(t),accent:h(n),line:h({light:e.dark,dark:e.light}),solid:h(e),"solid-hover":h({light:t.dark,dark:t.light})}),pn=Object.freeze(Object.fromEntries(De.map(e=>[e,gn(fn[e])])));export{Be as a,He as b,$ as c,We as d,se as e,le as f,Ye as g,T as h,c as i,et as j,tt as k,H as l,rt as m,x as n,w as o,st as p,ft as q,xe as r,k as s,Re as t,Ce as u,i as v,Mt as w,R as x,C as y,g as z,q as A,$t as B,Dt as C,vt as D,Ut as E,Bt as F,Ht as G,M as H,Gt as I,Hn as J,Xt as K,Ie as L,zn as M,Yt as N,y as O,Vt as P,Kn as Q,Fe as R,Jt as S,Zt as T,Qt as U,en as V,tn as W,er as X,nn as Y,J as Z,Z as _,rn as $,on as aa,an as ba,sn as ca,ln as da,$e as ea,un as fa,De as ga,mn as ha,pn as ia};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkXLOWKWIIcjs = require('./chunk-XLOWKWII.cjs');var Be="dialog:modal",He= exports.b =e=>{let t=[...e.querySelectorAll(Be)];if(t.length===0)return{kind:"none"};let n=e.activeElement,r=t.filter(l=>l.contains(n)),o=r.length>0?r:t,a=o.find(l=>o.every(s=>s.contains(l)));return a===void 0?{kind:"undecidable",dialogs:o}:{kind:"topmost",dialog:a}};var ze=[{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}],re=new Map,ae=e=>Number.isSafeInteger(e)&&e>=0,ie=(e,t,n)=>{let r=`${n} ${t}`,o=re.get(r);return o===void 0&&(o=new Intl.NumberFormat(t,{minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:!0}),re.set(r,o)),o.format(e===0?0:e)},$= exports.c =(e,t)=>{if(!ae(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return ie(e,t,0)},oe=(e,t)=>Number((e/1024**t.power).toFixed(t.fractionDigits)),We= exports.d =(e,t)=>{if(!ae(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[n,...r]=ze,o=n,a=oe(e,o);for(let l of r){if(a<1024)break;o=l,a=oe(e,o)}return`${ie(a,t,o.fractionDigits)} ${o.name}`},se= exports.e =(e,t)=>t===void 0?e:`${e} ${t}`;var je=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ge=/[!-~]/g;var Xe=/^[^eE]*[1-9]/,le= exports.f =e=>{let t=e.replace(Ge,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!je.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Xe.test(t)?null:0:n:null},Ye= exports.g =e=>{let t=le(e);return t!==null&&Number.isSafeInteger(t)?t:null};var Ke=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,T= exports.h =e=>Ke.test(e);var c=class extends RangeError{constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Ve=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,qe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Je=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,de=864e5,v=6e4,O={min:1,max:9999},ce=new Map,ue=new Map,Ze=e=>{let t=ce.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"}),ce.set(e,t)),t},me=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},U=(e,t)=>{let[n,r,o,a,l,s,f]=t;if(f!==void 0&&/[1-9]/.test(f))throw new c("subsecond",`Fractions of a second cannot be kept: ${e}`);let u={year:Number(n),month:Number(r),day:Number(o),hour:Number(a),minute:Number(l),second:s===void 0?0:Number(s)},E=u.year>=O.min?me(u):null;if(E===null)throw new c("malformed",`Not a calendar date and time: ${e}`);return{fields:u,millis:E}},B=(e,t)=>{let n=new Map(Ze(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>O.max)throw new c("malformed",`The wall clock falls outside years ${O.min}-${O.max}: ${new Date(e).toISOString()}`);return r},D=(e,t)=>me(B(e,t))-e,b=e=>String(e).padStart(2,"0"),fe=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${b(e.month)}-${b(e.day)}T${b(e.hour)}:${b(e.minute)}`;return t||e.second!==0?`${n}:${b(e.second)}`:n},Qe=e=>{if(e%v!==0)throw new c("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/v;return`${e<0?"-":"+"}${b(Math.floor(t/60))}:${b(t%60)}`},et= exports.j =(e,t)=>{let n=Ve.exec(e);if(n===null)throw new c("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=U(e,n.slice(1)),l=[...new Set([D(o-de,t),D(o+de,t)])].filter(s=>D(o-s,t)===s);if(l.length===0)throw new c("nonexistent",`${e} does not exist in ${t}`);if(l.length>1)throw new c("ambiguous",`${e} occurs twice in ${t}`);return`${fe(r,!0)}${Qe(l[0])}`},ge=(e,t)=>{let[n,r,o,a]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(a)>59)throw new c("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(a))*v},tt= exports.k =(e,t)=>{let n=qe.exec(e);if(n===null)throw new c("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=U(e,n.slice(1,8));return fe(B(r-ge(e,n.slice(8)),t),!1)},nt=(e,t)=>{let n=JSON.stringify([e,t]),r=ue.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"}),ue.set(n,r)),r},H= exports.l =(e,t,n)=>{let r=Je.exec(e);if(r===null)throw new c("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=U(e,[...r.slice(1,7),void 0]),a=o-ge(e,r.slice(7));return B(a,n),nt(t,n).format(a)};function rt(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.hasOwn(t,r)?String(t[r]):n)}var _authcore = require('@aiquants/auth-core');var x=e=>e===""?"":` (${e})`,pe=(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)},at=(e,t)=>t===""?e:`${e} Reason: ${t}.`,it=(e,t)=>t===""?e:`${e}${t}\u3002`,w= exports.o ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${x(e)}.`,refreshFailed:e=>`Could not refresh${x(e)}.`,forbiddenBecause:at,failureSentence:pe,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${x(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${x(e)}\u3002`,forbiddenBecause:it,failureSentence:pe,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"}},st= exports.p =e=>{if(!Object.hasOwn(w,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(w).join(", ")}`);return w[e]};var dt=64,ct=255,ye=([e,t,n])=>{let r=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),o=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*r+.793617785*o-.0040720468*a,1.9779984951*r-2.428592205*o+.4505937099*a,.0259040371*r+.7827717662*o-.808675766*a]},ut=([e,t,n])=>{let r=(e+.3963377774*t+.2158037573*n)**3,o=(e-.1055613458*t-.0638541728*n)**3,a=(e-.0894841775*t-1.291485548*n)**3,l=s=>Math.min(1,Math.max(0,s));return[l(4.0767416621*r-3.3077115913*o+.2309699292*a),l(-1.2684380046*r+2.6097574011*o-.3413193965*a),l(-.0041960863*r-.7034186147*o+1.707614701*a)]},mt=e=>`#${e.map(t=>Math.round(_chunkXLOWKWIIcjs.c.call(void 0, t)*ct).toString(16).padStart(2,"0")).join("")}`,Te=(e,t)=>{let n=_chunkXLOWKWIIcjs.a.call(void 0, e);if(t.length===0)throw new RangeError(`A more-contrast colour needs the surfaces it is drawn on: ${e}`);let r=_chunkXLOWKWIIcjs.d.call(void 0, n),o=t.map(d=>_chunkXLOWKWIIcjs.d.call(void 0, _chunkXLOWKWIIcjs.a.call(void 0, d))),a=o.every(d=>d>r);if(!(a||o.every(d=>d<r)))throw new RangeError(`The surfaces of a more-contrast colour must all be lighter or all be darker than it: ${e} on ${t.join(", ")}`);let l=a?Math.min(...o):Math.max(...o),s=a?0:1,f=d=>(Math.max(d,l)+.05)/(Math.min(d,l)+.05),u=Math.sqrt(f(r)*f(s));if(r===s)return e.toLowerCase();let E=ye(n.map(_chunkXLOWKWIIcjs.b)),ve=ye([s,s,s]),Q=d=>ut(E.map((p,L)=>p+d*(ve[L]-p))),Ue=([d,p,L])=>.2126*d+.7152*p+.0722*L,ee=0,N=1;for(let d=0;d<dt;d+=1){let p=(ee+N)/2;f(Ue(Q(p)))>=u?N=p:ee=p}return mt(Q(N))},be=(e,t)=>{let n=o=>{if(!Object.hasOwn(e,o))throw new RangeError(`Not a role of the palette: ${o}`);return e[o]};for(let o of Object.keys(t))n(o);let r=Object.fromEntries(Object.keys(e).map(o=>{let a=t[o];if(a===void 0)return[o,e[o]];let l=a.map(n),{light:s,dark:f}=e[o];return[o,Object.freeze({light:Te(s,l.map(u=>u.light)),dark:Te(f,l.map(u=>u.dark))})]}));return Object.freeze(r)};var ft=4,gt=[1,2,3,4,6,8,12,16,24],pt=16,yt=5/4,W={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Tt=11,he=3/2,bt=7/4,ht=7/4,xt=120,kt=3/2,Rt=[1,2,3],Ct=40,St="space-6",xe= exports.r =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},j=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Tt,Math.round(pt*yt**e))},G=(e,t)=>xe(e*t),ke=G(j(W.body),he),k= exports.s =ke+24,Re= exports.t =k+8,Ce= exports.u =ke+8,z={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}},Et=()=>Object.fromEntries(gt.map(e=>[`space-${e}`,e*4])),Pt=()=>{let e=Object.fromEntries(Object.entries(W).map(([n,r])=>{let o=j(r);return[n,{size:o,lineHeight:G(o,n==="title"?ht:he)}]})),t=j(W.body);return{...e,prose:{size:t,lineHeight:G(t,bt)}}},Ot=()=>Object.fromEntries(Rt.map(e=>[`motion-${e}`,xt*kt**(e-1)])),Se=(e,t)=>{let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||!n.every(o=>Object.hasOwn(t,o)))throw new RangeError(`The more-contrast palette must hold the roles of the standard one: ${n.join(", ")} / ${r.join(", ")}`);return Object.freeze({space:Object.freeze(Et()),type:Object.freeze(Pt()),weight:z.weight,radius:z.radius,size:Object.freeze({"size-target":k,"size-control":k,"size-row":k,"size-row-control":Re,"size-row-compact":Ce}),stroke:z.stroke,motion:Object.freeze(Ot()),measure:Object.freeze({"measure-dialog":Object.freeze({ic:Ct,inset:St})}),color:Object.freeze({...e}),moreContrastColor:Object.freeze({...t})})};var Ee={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"}},wt=Object.freeze({...Object.fromEntries(Object.entries(_chunkXLOWKWIIcjs.i.light).map(([e,t])=>[e,Object.freeze(Object.keys(t))])),"border-subtle":Object.freeze(["surface","subtle","sunken"])}),i= exports.v =Se(Ee,be(Ee,wt)),_t="--cui-",Mt= exports.w =e=>`var(${_t}${e})`;var It=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,Pe=(e,t)=>{let n=0,r=0;for(let o of e)It(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},R= exports.x =e=>Pe(e,.55),C= exports.y =e=>Pe(e,.6),g= exports.z =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 Oe="caption",K="body",V=2*i.space["space-3"],we={type:"caption",paddingInlinePx:2*i.space["space-2"]},X={type:"body",paddingInlinePx:2*i.space["space-3"]+2*i.stroke["border-width"],minInlinePx:i.size["size-control"]},_e={type:"body",minInlinePx:i.size["size-target"]},_={trackInlinePx:2*i.type.body.lineHeight+3*i.space["space-1"],labelGapPx:i.space["space-2"],type:"body"},Y={captionType:"caption",valueType:"heading",paddingInlinePx:2*i.space["space-3"]},Nt=10,Lt="2000-01-01T00:00:00Z",Ft=9999999,Me=(e,t,n)=>(t==="mono"?C(e):R(e))*i.type[n].size,At=(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(!T(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},m=(e,t,n,r)=>Math.max(...At(e,t).map(o=>Me(o,n,r))),q= exports.A =e=>{switch(e.kind){case"text":return m(e.texts,"text",e.face,e.type);case"measured":return m(e.texts,"measured value","sans",K);case"pill":return m(e.labels,"pill","sans",we.type)+we.paddingInlinePx;case"button":return Math.max(X.minInlinePx,m(e.labels,"button","sans",X.type)+X.paddingInlinePx);case"link":return Math.max(_e.minInlinePx,m(e.labels,"link","sans",_e.type));case"switch":return e.labelHidden?_.trackInlinePx:_.trackInlinePx+_.labelGapPx+m(e.labels,"switch","sans",_.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+q(n),0)+(e.items.length-1)*i.space[e.gap]}}},$t= exports.B =(e,t)=>{let n=m([e.header],"column header","sans",Oe),r=e.note===void 0?0:m(e.note,"column header note","sans",Oe);return g(Math.max(n,r,...t.map(q))+V)},Dt= exports.C =g(Me("\u3042".repeat(Nt),"sans",K)+V),vt= exports.D =e=>g(m(e,"comparison attribute","sans",K)+V),Ut= exports.E =(e,t)=>H(Lt,e,t),Bt= exports.F =(e,t)=>{if(t!==void 0&&!T(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return se($(Ft,e),t)},Ht= exports.G =(e,t)=>g(Math.max(m(e,"tile caption","sans",Y.captionType),m(t,"tile value","sans",Y.valueType))+Y.paddingInlinePx);var zt=.12,Wt=.16,jt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,S=i.space["space-3"],M= exports.H =(e,t)=>{let n=0,r=0;for(let a of e)n+=1,jt.test(a)&&(r+=1);return(t==="mono"?C(e):R(e))+zt*n+Wt*r},Gt= exports.I =e=>{for(let n of[e.name,...e.notes])if(!T(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(M(e.name,"sans")*i.type.body.size,...e.notes.map(n=>M(n,"sans")*i.type.caption.size));return{minWidthPx:g(t)+2*S,heightPx:2*S+i.type.body.lineHeight+e.notes.length*i.type.caption.lineHeight}},Hn= exports.J =e=>{let t=S+i.type.body.lineHeight;return{insetPx:S,namePx:S+i.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*i.type.caption.lineHeight+i.type.caption.lineHeight/2)}},Xt= exports.K =(e,t)=>{if(e!==null&&!T(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+Ie}:{widthPx:g(M(e,"sans")*i.type.caption.size),extentBelowPx:t+i.space["space-1"]+i.type.caption.lineHeight}},Ie= exports.L =i.stroke["focus-offset"]+i.stroke["focus-width"],zn= exports.M =i.stroke["focus-offset"]+i.stroke["focus-width"]/2;var I=(1+Math.sqrt(5))/2,Yt= exports.N =(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/I**t};var Kt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},y= exports.O =e=>`${Kt(e)/16}rem`;var Ne=({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},Vt= exports.P =(e,t)=>{let n=Ne(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+I),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}},Kn= exports.Q =e=>{let t=Ne(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=y(e.gapPx),a=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,l=`clamp(${y(e.masterMinPx)},calc((100% - ${o}) / ${1+I}),calc(100% - ${o} - ${y(e.detailMinPx)}))`,s=`@container (min-width:${y(t)}){${r}{grid-template-columns:${l} minmax(0,1fr)}}`;return{key:n,css:a+s}};var qt=2*i.space["space-1"],Le=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},Fe= exports.R =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+=Le(r.fixedPx);continue}let o=Le(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},Jt= exports.S =e=>Fe(e)+qt;var Zt=(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}`,a=`[data-cui-tile-grid="${o}"]`,l=r.map(({columns:s,minContainerPx:f})=>{let u=`${a}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?u:`@container (min-width:${y(f)}){${u}}`});return{key:o,steps:r,css:l.join("")}};var Qt=403,en= exports.V =(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,tn= exports.W =(e,t)=>e.ok?t(e.value):e,er= exports.X ={kind:"idle"},nn= exports.Y ={kind:"loading"},J= exports.Z =(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:nn,Z= exports._ =(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 rn=(e,t)=>{let n=J(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},on= exports.aa =(e,t)=>Z(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),an= exports.ba =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,sn= exports.ca =(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}}}},ln= exports.da =(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 dn=/^#[0-9a-f]{6}$/i,cn=/^[a-z][a-z0-9-]*$/,Ae=e=>{if(!dn.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},$e= exports.ea =({light:e,dark:t})=>`light-dark(${Ae(e)}, ${Ae(t)})`,un= exports.fa =e=>{if(!cn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${$e(i.color["fg-muted"])}; opacity: 1; }`};var De=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],mn= exports.ha =["fg","tint","accent","line","solid","solid-hover"],fn={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"}}},h=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),gn=({fg:e,tint:t,accent:n})=>Object.freeze({fg:h(e),tint:h(t),accent:h(n),line:h({light:e.dark,dark:e.light}),solid:h(e),"solid-hover":h({light:t.dark,dark:t.light})}),pn= exports.ia =Object.freeze(Object.fromEntries(De.map(e=>[e,gn(fn[e])])));exports.a = Be; exports.b = He; exports.c = $; exports.d = We; exports.e = se; exports.f = le; exports.g = Ye; exports.h = T; exports.i = c; exports.j = et; exports.k = tt; exports.l = H; exports.m = rt; exports.n = x; exports.o = w; exports.p = st; exports.q = ft; exports.r = xe; exports.s = k; exports.t = Re; exports.u = Ce; exports.v = i; exports.w = Mt; exports.x = R; exports.y = C; exports.z = g; exports.A = q; exports.B = $t; exports.C = Dt; exports.D = vt; exports.E = Ut; exports.F = Bt; exports.G = Ht; exports.H = M; exports.I = Gt; exports.J = Hn; exports.K = Xt; exports.L = Ie; exports.M = zn; exports.N = Yt; exports.O = y; exports.P = Vt; exports.Q = Kn; exports.R = Fe; exports.S = Jt; exports.T = Zt; exports.U = Qt; exports.V = en; exports.W = tn; exports.X = er; exports.Y = nn; exports.Z = J; exports._ = Z; exports.$ = rn; exports.aa = on; exports.ba = an; exports.ca = sn; exports.da = ln; exports.ea = $e; exports.fa = un; exports.ga = De; exports.ha = mn; exports.ia = pn;
|
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 _chunkRYHSVWM2cjs = require('./chunk-RYHSVWM2.cjs');var _chunkXLOWKWIIcjs = require('./chunk-XLOWKWII.cjs');exports.COMPACT_ROW_PX = _chunkRYHSVWM2cjs.u; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkRYHSVWM2cjs.o; exports.CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.f; exports.CONTRAST_PAIRS = _chunkXLOWKWIIcjs.i; exports.FIGURE_RING_REACH_PX = _chunkRYHSVWM2cjs.L; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkRYHSVWM2cjs.C; exports.HTTP_FORBIDDEN = _chunkRYHSVWM2cjs.U; exports.LATTICE_PX = _chunkRYHSVWM2cjs.q; exports.MORE_CONTRAST_MINIMUM = _chunkXLOWKWIIcjs.g; exports.ROW_WITH_CONTROL_PX = _chunkRYHSVWM2cjs.t; exports.TARGET_PX = _chunkRYHSVWM2cjs.s; exports.TOKENS = _chunkRYHSVWM2cjs.v; exports.TONES = _chunkRYHSVWM2cjs.ia; exports.TONE_HUES = _chunkRYHSVWM2cjs.ga; exports.TONE_ROLES = _chunkRYHSVWM2cjs.ha; exports.ZonedTimeError = _chunkRYHSVWM2cjs.i; exports.beginPage = _chunkRYHSVWM2cjs.ba; exports.beginPagedReload = _chunkRYHSVWM2cjs.$; exports.beginReload = _chunkRYHSVWM2cjs.Z; exports.ceil8 = _chunkRYHSVWM2cjs.z; exports.ceilToLattice = _chunkRYHSVWM2cjs.r; exports.cellContentInlinePx = _chunkRYHSVWM2cjs.A; exports.comparisonAttributePx = _chunkRYHSVWM2cjs.D; exports.contrastRatio = _chunkXLOWKWIIcjs.e; exports.countSampleText = _chunkRYHSVWM2cjs.F; exports.cssVar = _chunkRYHSVWM2cjs.w; exports.figureBoxPlan = _chunkRYHSVWM2cjs.I; exports.figureDiscLabelPlan = _chunkRYHSVWM2cjs.K; exports.fillLabel = _chunkRYHSVWM2cjs.m; exports.fixedColumnPx = _chunkRYHSVWM2cjs.B; exports.flatMapOutcome = _chunkRYHSVWM2cjs.W; exports.formatByteSize = _chunkRYHSVWM2cjs.d; exports.formatCount = _chunkRYHSVWM2cjs.c; exports.formatInstant = _chunkRYHSVWM2cjs.l; exports.goldenSectionPx = _chunkRYHSVWM2cjs.N; exports.hexToSrgb = _chunkXLOWKWIIcjs.a; exports.instantSampleText = _chunkRYHSVWM2cjs.E; exports.isReadableText = _chunkRYHSVWM2cjs.h; exports.keepLastGood = _chunkRYHSVWM2cjs._; exports.lightDark = _chunkRYHSVWM2cjs.ea; exports.mapOutcome = _chunkRYHSVWM2cjs.V; exports.mapPagedList = _chunkRYHSVWM2cjs.da; exports.masterDetailPlan = _chunkRYHSVWM2cjs.P; exports.monoTextWidthEm = _chunkRYHSVWM2cjs.y; exports.placeholderRule = _chunkRYHSVWM2cjs.fa; exports.pxToRem = _chunkRYHSVWM2cjs.O; exports.readDecimalText = _chunkRYHSVWM2cjs.f; exports.readIntegerText = _chunkRYHSVWM2cjs.g; exports.reasonAside = _chunkRYHSVWM2cjs.n; exports.resolveConsoleUiLabels = _chunkRYHSVWM2cjs.p; exports.settleFirstPage = _chunkRYHSVWM2cjs.aa; exports.settlePage = _chunkRYHSVWM2cjs.ca; exports.spacedTextWidthEm = _chunkRYHSVWM2cjs.H; exports.tableFrameMinInlinePx = _chunkRYHSVWM2cjs.S; exports.tableMinInlinePx = _chunkRYHSVWM2cjs.R; exports.textWidthEm = _chunkRYHSVWM2cjs.x; exports.tileGridPlan = _chunkRYHSVWM2cjs.T; exports.tileMinInlinePx = _chunkRYHSVWM2cjs.G; exports.toOffsetIso = _chunkRYHSVWM2cjs.j; exports.toWallTime = _chunkRYHSVWM2cjs.k; exports.topmostModalOf = _chunkRYHSVWM2cjs.b;
|
package/dist/core.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ type TopmostModal = {
|
|
|
5
5
|
readonly dialog: HTMLDialogElement;
|
|
6
6
|
} | {
|
|
7
7
|
readonly kind: "undecidable";
|
|
8
|
+
readonly dialogs: readonly HTMLDialogElement[];
|
|
8
9
|
};
|
|
9
10
|
declare const topmostModalOf: (document: Document) => TopmostModal;
|
|
10
11
|
declare const formatCount: (value: number, formatLocale: string) => string;
|
package/dist/core.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ type TopmostModal = {
|
|
|
5
5
|
readonly dialog: HTMLDialogElement;
|
|
6
6
|
} | {
|
|
7
7
|
readonly kind: "undecidable";
|
|
8
|
+
readonly dialogs: readonly HTMLDialogElement[];
|
|
8
9
|
};
|
|
9
10
|
declare const topmostModalOf: (document: Document) => TopmostModal;
|
|
10
11
|
declare const formatCount: (value: number, formatLocale: string) => string;
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as Z,A as D,B as E,C as F,D as G,E as H,F as I,G as J,H as K,I as L,K as M,L as N,N as O,O as P,P as Q,R,S,T,U,V,W,Z as X,_ as Y,aa as _,b as a,ba as $,c as b,ca as aa,d as c,da as ba,ea as ca,f as d,fa as da,g as e,ga as ea,h as f,ha as fa,i as g,ia as ga,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as t,r as u,s as v,t as w,u as x,v as y,w as z,x as A,y as B,z as C}from"./chunk-
|
|
1
|
+
import{$ as Z,A as D,B as E,C as F,D as G,E as H,F as I,G as J,H as K,I as L,K as M,L as N,N as O,O as P,P as Q,R,S,T,U,V,W,Z as X,_ as Y,aa as _,b as a,ba as $,c as b,ca as aa,d as c,da as ba,ea as ca,f as d,fa as da,g as e,ga as ea,h as f,ha as fa,i as g,ia as ga,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as t,r as u,s as v,t as w,u as x,v as y,w as z,x as A,y as B,z as C}from"./chunk-HROMRBBM.js";import{a as o,e as p,f as q,g as r,i as s}from"./chunk-RA33TN5N.js";export{x as COMPACT_ROW_PX,m as CONSOLE_UI_LABEL_CATALOGS,q as CONTRAST_MINIMUM,s as CONTRAST_PAIRS,N as FIGURE_RING_REACH_PX,F as FLEXIBLE_COLUMN_MIN_PX,U as HTTP_FORBIDDEN,t as LATTICE_PX,r as MORE_CONTRAST_MINIMUM,w as ROW_WITH_CONTROL_PX,v as TARGET_PX,y as TOKENS,ga as TONES,ea as TONE_HUES,fa as TONE_ROLES,g as ZonedTimeError,$ as beginPage,Z as beginPagedReload,X as beginReload,C as ceil8,u as ceilToLattice,D as cellContentInlinePx,G as comparisonAttributePx,p as contrastRatio,I as countSampleText,z as cssVar,L as figureBoxPlan,M as figureDiscLabelPlan,k as fillLabel,E as fixedColumnPx,W as flatMapOutcome,c as formatByteSize,b as formatCount,j as formatInstant,O as goldenSectionPx,o as hexToSrgb,H as instantSampleText,f as isReadableText,Y as keepLastGood,ca as lightDark,V as mapOutcome,ba as mapPagedList,Q as masterDetailPlan,B as monoTextWidthEm,da as placeholderRule,P as pxToRem,d as readDecimalText,e as readIntegerText,l as reasonAside,n as resolveConsoleUiLabels,_ as settleFirstPage,aa as settlePage,K as spacedTextWidthEm,S as tableFrameMinInlinePx,R as tableMinInlinePx,A as textWidthEm,T as tileGridPlan,J as tileMinInlinePx,h as toOffsetIso,i as toWallTime,a as topmostModalOf};
|