@aiquants/console-ui 0.5.0 → 0.6.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 +42 -2
- package/dist/chunk-4IQKQ7WF.js +1 -0
- package/dist/chunk-S6DFKVUV.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +34 -1
- package/dist/core.d.ts +34 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-34QJXV5R.js +0 -1
- package/dist/chunk-6WVTEB4S.cjs +0 -1
package/README.md
CHANGED
|
@@ -18,13 +18,14 @@ pnpm add @aiquants/console-ui
|
|
|
18
18
|
| Import path | Contents |
|
|
19
19
|
| --- | --- |
|
|
20
20
|
| `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
|
|
21
|
-
| `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the layout arithmetic 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. |
|
|
21
|
+
| `@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
22
|
| `@aiquants/console-ui/testing` | DOM-only: `scanColourRoles(root)`, the colour-role scan a console runs on its own rendered DOM, text (the markers of a `List` included) and SVG graphics alike (see Tokens and colours), and the model of the modal dialog methods a test DOM lacks, `installDialogModel()` with `openModals()` and `pressEscape(dialog)` (see Testing in jsdom). It takes elements and loads no React. |
|
|
23
23
|
| `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` and the component rules, all inside `@layer cui`. |
|
|
24
24
|
|
|
25
25
|
The `/core` exports:
|
|
26
26
|
|
|
27
27
|
- Tokens and contrast: `TOKENS`, `cssVar`, `contrastRatio`, `hexToSrgb`, `CONTRAST_PAIRS`, `CONTRAST_MINIMUM`, and the types `ColorScheme`, `SchemeColor` and `MotionToken` beside the other token names.
|
|
28
|
+
- Tones and the CSS text of a colour (see Tokens and colours): `TONES`, `TONE_HUES`, `TONE_ROLES` and the types `Tone`, `ToneHue` and `ToneRole`; `lightDark(color)` and `placeholderRule(rootAttribute)`.
|
|
28
29
|
- The geometry the tokens are computed on: `LATTICE_PX` (4), `TARGET_PX` (44), `ROW_WITH_CONTROL_PX` (52), `COMPACT_ROW_PX` (28) and `ceilToLattice(px)` (the smallest lattice multiple at or above a length).
|
|
29
30
|
- Layout arithmetic: `textWidthEm`, `monoTextWidthEm` (the type `TextFace` names the face each model sizes), `ceil8`, `tileGridPlan`, `tableMinInlinePx`, `tableFrameMinInlinePx` (the narrowest a `DataTable` is while its table shows without scrolling: the table's minimum and the scroll frame's 4 px inline padding on both sides), `masterDetailPlan`.
|
|
30
31
|
- Widths sized from what a box holds (see Layout): `fixedColumnPx({ header, note }, contents)` (a `DataTable` fixed column; the first argument, type `ColumnHeaderText`, mirrors `ColumnDef`'s `header` and, for a column with a note, lists every line its `note` may show; `contents` are `CellContent` values, measured one by one with `cellContentInlinePx(content)`), `FLEXIBLE_COLUMN_MIN_PX` (160: the one minimum every flexible column shares), `comparisonAttributePx(labels)` (a `ComparisonGrid`'s `attributePx`), `tileMinInlinePx(captions, values)` (a `TileGrid`'s `minInlinePx`),
|
|
@@ -127,6 +128,11 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
|
|
|
127
128
|
A figure's lines are the same roles (see Figures): a node's plate line on both the figure's `surface` and its own face (`border-control` on `surface` 4.76 / 6.78; `info-accent` 5.25 / 6.76 and 4.82 / 5.6 on `info-tint`; `success-accent` 3.65 / 9.2 and 3.47 / 7.83; `warning-accent` 5.03 / 10.4 and 4.85 / 8.75; `danger-accent` 4.77 / 6.17 and 4.36 / 5.6, light / dark), an edge and its arrowhead (`border-control`, or `info-accent` when strong) and a node's focus ring (`focus`, 5.25 / 6.76) on `surface`. A figure's text takes its text role's colour as its fill (`currentColor`,
|
|
128
129
|
in that one declaration only).
|
|
129
130
|
The solid buttons', the pressed segment's and the checked switch track's border is their own fill, and the rules of cards, tables, comparison headings, description lists and dialogs (`border-subtle`) are decorative, never a component's only boundary. A switch's thumb stands out from its track by at least 3 : 1 in both schemes.
|
|
131
|
+
- The tone table (`TONES`) is for a host that colours by hue outside the components (a category, a tag, a person, a kind of record); the components paint only with the roles above. It holds seventeen hues (`TONE_HUES`: indigo, violet, purple, fuchsia, pink, rose, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky and blue, each Tailwind CSS's family of that name) with six roles each (`TONE_ROLES`): the text `fg`, the tinted surface `tint`, the mark `accent` (a status dot, a bar, the ring of a selected item), the decorative line `line`, the solid fill under `on-solid` text `solid` and its hover `solid-hover`.
|
|
132
|
+
In both schemes every tone's text keeps 7:1, and every tone's mark, `focus` and `border-control` keep 3:1, on `surface`, `subtle`, `sunken` and every tone's tint; every neutral text keeps 7:1 on every tint; and `on-solid` keeps 7:1 on every solid and its hover. The line is decorative, never a component's only boundary, and nothing in the table is translucent.
|
|
133
|
+
The text, the tint and the mark follow one rule over Tailwind CSS's palette and the status tokens, stated with its two exceptions where `TONES` is declared; the red, amber, emerald and blue tones take the danger, warning, success and info tokens wherever those meet the rule, and the tests rebuild every value from the rule. The line is the text with its schemes swapped, the solid is the text and the solid's hover is the tint with its schemes swapped.
|
|
134
|
+
A host writes a role into an inline style as `lightDark(TONES.blue.fg)` (`light-dark(#193cb8, #bedbff)`; `lightDark` refuses a value that is not `#rrggbb`, and the stylesheet's token variables are written through it), or reads one scheme's value, `TONES.blue.fg.light`, where `light-dark()` cannot be resolved (a canvas).
|
|
135
|
+
- An inline style cannot reach a field's placeholder, and a browser's own placeholder colour, or a reset's translucent one, falls below 7:1. A host that paints its fields inline writes `placeholderRule("data-my-console")` into a `<style>` element and puts that attribute on its root: every placeholder under the root takes `fg-muted` at full opacity, and the host's other fields are not reached. The attribute is lowercase letters, digits and hyphens, starting with a letter; any other name is refused.
|
|
130
136
|
- In forced-colors mode (Windows high contrast), which removes surfaces, shadows and backgrounds and paints transparent borders, the package redraws its non-colour cues in system colours: the selected row's start band (`Highlight`), the progress and meter tracks and fills (`CanvasText` / `Highlight`), the current tab's marker (`Highlight`, the other tabs' markers sunk into `Canvas`), the switch's thumb (`CanvasText`, `HighlightText` on a `Highlight` track when on), the slider's rail and thumb (`CanvasText` / `Highlight`),
|
|
131
137
|
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`.
|
|
132
138
|
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.
|
|
@@ -203,9 +209,42 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
|
|
|
203
209
|
- Only the control whose own request is in flight is `busy`. `usePendingPress()` tracks it: `press(key, action)` runs the action and, when the action returns a promise, keeps `key` as `pendingKey` until that promise settles either way; an action that returns no promise starts no wait, and a later press replaces the pending one.
|
|
204
210
|
While the host reports a request in flight on a channel several controls share, the controls that are not pending are `unavailable` with one reason, so no control reads as busy for a request it did not send. The promise's outcome stays the action's: the hook reports no refusal.
|
|
205
211
|
- `PanelTabs` is the ARIA tabs pattern: only the selected tab is in the Tab order, the arrow keys select the previous or next tab and wrap around (swapped in a right-to-left root), Home and End select the first and the last, and focus moves with the selection.
|
|
206
|
-
- `useFocusRescue(getTarget)` returns a ref with one identity for the owner's lifetime; when the region it is attached to disappears while holding focus, focus moves to `getTarget()` right after the commit that removed it — also when the region is rendered and removed by a descendant that re-renders on its own.
|
|
212
|
+
- `useFocusRescue(getTarget)` returns a ref (`(node: HTMLElement | null) => () => void`) with one identity for the owner's lifetime; when the region it is attached to disappears while holding focus, focus moves to `getTarget(lost)` right after the commit that removed it, `lost` being the region's node that left — also when the region is rendered and removed by a descendant that re-renders on its own.
|
|
213
|
+
The ref always returns its cleanup, so a caller that also keeps the node in a ref of its own calls that cleanup from its own (as `LoadMore` and `DataTable` do), and the ref fits an element's `ref`, a `Ref<HTMLElement>` prop and a `RefCallback<HTMLElement>` prop.
|
|
207
214
|
Focus resting on `<body>` or elsewhere is never taken, neither then nor on a later re-render.
|
|
215
|
+
The region is rendered below the hook's owner. A node is recorded only while the owner's layout effects are connected: hiding the owner (`<Activity mode="hidden">`, a `Suspense` fallback) disconnects them before the region's ref and discards a record not yet resolved, so nothing is recorded while the owner is hidden and showing it again moves nothing. A region rendered outside the owner is therefore not rescued while the owner is hidden.
|
|
208
216
|
Exception: a pointer click on text inside a `DataTable` focuses its row (`tabIndex={-1}`, the `LoadMore` focus target) or its scroll frame (`tabIndex={0}`), not `<body>`, so a region holding a table the operator clicked into counts as holding focus, and its disappearance moves focus (and scrolls) to the target.
|
|
217
|
+
- `DataTable` keeps focus when a row holding it leaves (a record row, its detail row, or anything inside them): focus moves to the record row now at that row's position, to the last record row when fewer rows are left, and to the empty text (`tabIndex={-1}`, outside the Tab order) when none is left, also from the scroll frame when every row leaves while it holds focus. The empty text holding focus passes it to the first row when rows replace it.
|
|
218
|
+
The table applies the two rules of `useFocusRescue` to its rescued nodes (each record row, each detail row, the scroll frame and the empty text), and every outcome below follows from these two rules and the order within one commit:
|
|
219
|
+
- Record: at the cleanup of a rescued node's ref (in the commit that removes the node, before its layout effects), the node is recorded when focus is inside it in the DOM (`node.contains`; inside the scroll frame includes the column headers and every row), and only while the table's layout effects are connected. What a component inside the node renders through a portal is inside it in the React tree but outside it in the DOM, so it does not count. One node is kept: a node recorded later in the same commit replaces it.
|
|
220
|
+
- Check: in the table's layout effect of the same commit, when the recorded node has left the document and focus is free (`document.activeElement` is `<body>` or `null`), focus moves from that node by the rule above. The check uses the record up, whether it moves focus or not.
|
|
221
|
+
|
|
222
|
+
So focus stays where it is when no node holding focus leaves (a reorder, or rows inserted in front: React does not detach a moved row's ref), when focus was outside the leaving node at its ref's cleanup (on a filter outside the table, or in what a component in the row rendered through a portal), while the table or an ancestor is hidden (`<Activity mode="hidden">`, a `Suspense` fallback), and when something else took focus earlier in the same commit (focus restoration included, below).
|
|
223
|
+
The table does not guard a row detail that closes (the caller that closes it decides where focus goes) or its own removal (it checks nothing as it leaves; the rescue of the region holding it decides).
|
|
224
|
+
When focus is outside the leaving node at its ref's cleanup and the element holding focus then leaves or moves in the same commit, nothing is recorded and focus falls to `<body>` unless focus restoration returns it to an element that stays: the owner of what moved focus, or the caller, decides where it goes then (a dialog drawn inside the row's DOM, not through a portal, is guarded by the table).
|
|
225
|
+
In a table nested in a row detail, the outer detail row records focus in the inner table: an outer row that leaves moves focus to the outer table's row at its position (the inner table leaves with it and checks nothing), and an inner row that leaves alone moves it to the inner table's row.
|
|
226
|
+
React runs layout effects children first, so the table checks before the rescue of any ancestor, and a rescue a caller attached inside a row (in a cell or a detail) finds focus off `<body>` when the whole row leaves and moves nothing.
|
|
227
|
+
The order within one commit below comes from how react-dom commits, not from a public React contract, and may change between versions; the two rules do not depend on it. A commit runs three steps in turn, and what runs after the commit follows them. Anything else that moves focus decides the outcome by whether it runs before or after the record (a ref cleanup, in the mutation step) and the check (the table's layout effect, in the layout step):
|
|
228
|
+
- Mutation step: the cleanups of the layout effects of the components that leave or whose dependencies changed, and the ref cleanups. React walks the tree parent first and earlier sibling first; a leaving node is handled when its parent is reached, before the parent's remaining children are walked, and a dependency cleanup when the component's own subtree is done.
|
|
229
|
+
Inside a leaving subtree an element's ref cleanup runs before the cleanups of the components inside it, and the subtree's top element leaves the DOM after them; an entry with several top elements (a row's record row and detail row) is handled one top element at a time, in order. Moved children are re-inserted while the remaining children are walked, after the leaving ones, and focus inside a moved element is lost then.
|
|
230
|
+
Before a row's ref cleanup run the removal of the siblings of the table and of its ancestors (earlier and later ones alike), what leaves and the dependency cleanups inside the earlier siblings of the table and of its ancestors, and those inside the table's header. After it run the cleanups of the components inside the leaving row, what leaves and the dependency cleanups inside the remaining rows (earlier rows included) and inside the later siblings of the table and of its ancestors (when those siblings remain), and the dependency cleanups of the table's ancestors.
|
|
231
|
+
Rows leaving in the same commit are handled one at a time, normally the earlier first: the cleanups inside an earlier row run before the ref cleanup of a later row, which then finds the earlier row out of the document — except in a commit that removes every row, where the rows stay in the scroll frame until the frame leaves. Within one row, the record row (with the cleanups inside it) is handled and removed from the DOM before the detail row's ref cleanup runs.
|
|
232
|
+
When every row leaves, the scroll frame leaves as a whole, so its ref cleanup runs before anything inside it (the headers and every row).
|
|
233
|
+
- Focus restoration: react-dom notes the focused element (and the selection of a text field) when the commit starts; after the mutation step, when that element is still in the document and focus has moved from it, it restores the selection and calls the element's `focus()`, reading the scroll positions of its ancestors right before and writing them back right after (undoing the scroll of `focus()`, not returning to the positions before the commit).
|
|
234
|
+
`focus()` is called without checking that the element can take focus, so one that cannot (`<body>`, a control disabled in the same commit) keeps focus where it is. An element that held focus before the commit gets it back after losing it by being moved; one that took focus during the commit does not. From the start of the commit to this point React holds its events back, so a `focus()` in between fires the DOM events (`focus`, `blur`, `focusin`, `focusout`) but not React's `onFocus` and `onBlur`.
|
|
235
|
+
- Layout step: React walks its tree (not the DOM: a portal counts where it is in the tree) children first and earlier sibling's subtree first, running each component's layout effects, ref attachments and `autoFocus` in that order (within one element, `autoFocus` before the ref). The table's check runs after what is inside the table and inside the earlier siblings of the table and of its ancestors, and before the table's ancestors and the later siblings of the table and of its ancestors.
|
|
236
|
+
- After the commit: every component's `useEffect` (those inside the table too), a `focus()` after `flushSync`, and later commits.
|
|
237
|
+
|
|
238
|
+
Examples, with nothing else moving focus:
|
|
239
|
+
- What takes focus in the layout step before the check (a layout effect or `autoFocus` inside the table or in an earlier sibling of the table or of its ancestors, such as an `autoFocus` field rendered before the table) leaves focus taken at the check, so the table moves nothing.
|
|
240
|
+
- What moves focus after the check (a layout effect or `autoFocus` of an ancestor or of a later sibling, or anything after the commit) runs after the table moved focus, so the table's target holds focus for a moment (`focusin`, `focusout`, `onFocus` and `onBlur` run, and the rescue's `focus()`, which has no `preventScroll` so that the target is seen, may scroll it into view even then). When the later move takes focus wherever it is, the final focus is there; when it moves only free focus (as `useFocusRescue` does), it moves nothing and focus stays on the table's target.
|
|
241
|
+
- What moves focus in the mutation step to an element that stays (a closing dialog's layout effect cleanup returning focus to a control outside the table): when that element stays in place and able to take focus to the end of the commit, focus is taken at the check (there, or on the element focus restoration returned it to), and the table moves nothing.
|
|
242
|
+
When the element is moved by a reorder it loses focus, and restoration acts only on the element focused before the commit, so the two rules decide: the table moves focus when the leaving row was recorded (focus before the commit was inside it and a component inside the row moved focus), and nothing when it was not (an earlier sibling of the table moved focus); focus is then where restoration returned it, or on `<body>`.
|
|
243
|
+
- What moves focus in the mutation step into a leaving row (a dialog opened from a row's button that closes in the commit removing that row and returns focus to the button) decides the record by focus at the row's ref cleanup. When it runs before that cleanup (in the order above), the row is recorded: the table moves focus when restoration changes nothing (the element focused before the commit left, or cannot take focus), and moves nothing when restoration returns focus to that element.
|
|
244
|
+
When it runs after (inside the row, inside the remaining rows, inside the later siblings of the table and of its ancestors, or as a dependency cleanup of an ancestor), the record follows focus before the commit: inside the row's DOM (a dialog drawn inside the row), the row is recorded and the table moves focus; inside no rescued node (a dialog a component in the row rendered through a portal, a dialog outside the table), nothing is recorded and the table moves nothing.
|
|
245
|
+
Focus moved by a cleanup inside the row leaves with the row, and a `focus()` that runs after the row left the DOM does nothing (in a commit that removes every row the rows stay in the document until the frame leaves, so a `focus()` works, but the row's ref cleanup has run and records nothing); focus falls to `<body>` unless restoration returns it to an element that stays.
|
|
246
|
+
When the commit removes several nodes (several rows, or a row's record row and detail row), the cleanups inside a node handled earlier run before a later node's ref cleanup, so moving focus into the later node records it in place of the earlier one, and the table takes the later node's position (a detail row has the position of its record row).
|
|
247
|
+
- A commit that removes every row while focus is in what a component in a column header note rendered through a portal (a menu), whose cleanup returns focus to a button in the note, records nothing (focus is in the menu at the frame's ref cleanup and in the header at the rows'): the table moves nothing, and the button leaves with the frame, so focus falls to `<body>`.
|
|
209
248
|
- `LoadMore` moves focus to the first row the page appended (or the end-of-records text) only if focus is still on its button, or left with it; an operator who moved on while the page loaded keeps their place. When the button and the end-of-records text swap outside a load (a re-read exhausts the records, or brings more while the end text has focus) and the one leaving held focus, focus moves to the one now rendered.
|
|
210
249
|
The appended rows are told from the others by element identity, not by position, because a write's reply may remove, replace or add rows while the page is in flight:
|
|
211
250
|
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.
|
|
@@ -213,6 +252,7 @@ Draw a modal as a `Dialog`: a modal `<dialog>` (`showModal()`) makes everything
|
|
|
213
252
|
- `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).
|
|
214
253
|
`DataTable` rows and `RowButton` set it; a custom row list (cards, a tree, grouped rows) sets `data-cui-row-focus=""` on each row's focusable element (for example with `tabIndex={-1}`) and passes the element holding them as `rows.ref`.
|
|
215
254
|
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.
|
|
255
|
+
`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.
|
|
216
256
|
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`.
|
|
217
257
|
- 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.
|
|
218
258
|
- `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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var G=new Map,_=(e,t)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=G.get(t);return n===void 0&&(n=new Intl.NumberFormat(t,{maximumFractionDigits:0,useGrouping:!0}),G.set(t,n)),n.format(e)},j=(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,Y=e=>{let t=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Pe.test(t)?null:0:n:null},Se=e=>{let t=Y(e);return t!==null&&Number.isSafeInteger(t)?t:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m=e=>_e.test(e);var l=class extends RangeError{reason;constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,K=864e5,w=6e4,C={min:1,max:9999},V=new Map,J=new Map,Ne=e=>{let t=V.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"}),V.set(e,t)),t},q=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},I=(e,t)=>{let[n,r,o,s,c,i,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(n),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},X=g.year>=C.min?q(g):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:X}},N=(e,t)=>{let n=new Map(Ne(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>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>q(N(e,t))-e,f=e=>String(e).padStart(2,"0"),Z=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${f(e.month)}-${f(e.day)}T${f(e.hour)}:${f(e.minute)}`;return t||e.second!==0?`${n}:${f(e.second)}`:n},Me=e=>{if(e%w!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/w;return`${e<0?"-":"+"}${f(Math.floor(t/60))}:${f(t%60)}`},Le=(e,t)=>{let n=Oe.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=I(e,n.slice(1)),c=[...new Set([O(o-K,t),O(o+K,t)])].filter(i=>O(o-i,t)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${Z(r,!0)}${Me(c[0])}`},Q=(e,t)=>{let[n,r,o,s]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*w},Fe=(e,t)=>{let n=we.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=I(e,n.slice(1,8));return Z(N(r-Q(e,n.slice(8)),t),!1)},$e=(e,t)=>{let n=JSON.stringify([e,t]),r=J.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"}),J.set(n,r)),r},M=(e,t,n)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=I(e,[...r.slice(1,7),void 0]),s=o-Q(e,r.slice(7));return N(s,n),$e(t,n).format(s)};var ee=403,Ae=(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,De=(e,t)=>e.ok?t(e.value):e,Ut={kind:"idle"},ve={kind:"loading"},L=(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:ve,F=(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 T=e=>e===""?"":` (${e})`,te=e=>(t,n,r)=>t.status===403?e(n,t.reason):r(t.reason),ne=(e,t)=>t===""?e:`${e} Reason: ${t}.`,re=(e,t)=>t===""?e:`${e}${t}\u3002`,E={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:te(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ue=e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var He=4,We=[1,2,3,4,6,8,12,16,24],Be=16,ze=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},Xe=11,oe=3/2,Ge=7/4,je=7/4,Ye=120,Ke=3/2,Ve=[1,2,3],ae=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},D=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Xe,Math.round(Be*ze**e))},v=(e,t)=>ae(e*t),ie=v(D(A.body),oe),b=ie+24,se=b+8,le=ie+8,$={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},Je=()=>Object.fromEntries(We.map(e=>[`space-${e}`,e*4])),qe=()=>{let e=Object.fromEntries(Object.entries(A).map(([n,r])=>{let o=D(r);return[n,{size:o,lineHeight:v(o,n==="title"?je:oe)}]})),t=D(A.body);return{...e,prose:{size:t,lineHeight:v(t,Ge)}}},Ze=()=>Object.fromEntries(Ve.map(e=>[`motion-${e}`,Ye*Ke**(e-1)])),de=e=>Object.freeze({space:Object.freeze(Je()),type:Object.freeze(qe()),weight:$.weight,radius:$.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":se,"size-row-compact":le}),stroke:$.stroke,motion:Object.freeze(Ze()),color:Object.freeze({...e})});var Qe={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=de(Qe),et="--cui-",tt=e=>`var(${et}${e})`;var nt=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ce=(e,t)=>{let n=0,r=0;for(let o of e)nt(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h=e=>ce(e,.55),x=e=>ce(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 ue="caption",W="body",B=2*a.space["space-3"],me={type:"caption",paddingInlinePx:2*a.space["space-2"]},U={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},fe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},H={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},rt=10,ot="2000-01-01T00:00:00Z",at=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,it=(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(!m(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},d=(e,t,n,r)=>Math.max(...it(e,t).map(o=>pe(o,n,r))),z=e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",me.type)+me.paddingInlinePx;case"button":return Math.max(U.minInlinePx,d(e.labels,"button","sans",U.type)+U.paddingInlinePx);case"link":return Math.max(fe.minInlinePx,d(e.labels,"link","sans",fe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.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+z(n),0)+(e.items.length-1)*a.space[e.gap]}}},st=(e,t)=>{let n=d([e.header],"column header","sans",ue),r=e.note===void 0?0:d(e.note,"column header note","sans",ue);return u(Math.max(n,r,...t.map(z))+B)},lt=u(pe("\u3042".repeat(rt),"sans",W)+B),dt=e=>u(d(e,"comparison attribute","sans",W)+B),ct=(e,t)=>M(ot,e,t),ut=(e,t)=>{if(t!==void 0&&!m(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return j(_(at,e),t)},mt=(e,t)=>u(Math.max(d(e,"tile caption","sans",H.captionType),d(t,"tile value","sans",H.valueType))+H.paddingInlinePx);var ft=.12,pt=.16,gt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S=(e,t)=>{let n=0,r=0;for(let s of e)n+=1,gt.test(s)&&(r+=1);return(t==="mono"?x(e):h(e))+ft*n+pt*r},yt=e=>{for(let n of[e.name,...e.notes])if(!m(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(n=>S(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}},tn=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)}},Tt=(e,t)=>{if(e!==null&&!m(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+ge}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ge=a.stroke["focus-offset"]+a.stroke["focus-width"],nn=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var bt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},p=e=>`${bt(e)/16}rem`;var ye=(1+Math.sqrt(5))/2,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},ht=(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+ye),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}},sn=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=p(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${p(e.masterMinPx)},calc((100% - ${o}) / ${1+ye}),calc(100% - ${o} - ${p(e.detailMinPx)}))`,i=`@container (min-width:${p(t)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:n,css:s+i}};var xt=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},kt=e=>he(e)+xt;var Rt=(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 i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*t+(i-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${p(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Ct=(e,t)=>{let n=L(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Et=(e,t)=>F(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Pt=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,St=(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 Ot=/^#[0-9a-f]{6}$/i,wt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Ot.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)})`,It=e=>{if(!wt.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"],Nt=["fg","tint","accent","line","solid","solid-hover"],Mt={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}),Lt=({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})}),Ft=Object.freeze(Object.fromEntries(Re.map(e=>[e,Lt(Mt[e])])));export{_ as a,j as b,Y as c,Se as d,m as e,l as f,Le as g,Fe as h,M as i,ee as j,Ae as k,De as l,Ut as m,ve as n,L as o,F as p,T as q,E as r,Ue as s,He as t,ae as u,b as v,se as w,le as x,a as y,tt as z,h as A,x as B,u as C,z as D,st as E,lt as F,dt as G,ct as H,ut as I,mt as J,S as K,yt as L,tn as M,Tt as N,ge as O,nn as P,p as Q,ht as R,sn as S,he as T,kt as U,Rt as V,Ct as W,Et as X,Pt as Y,St as Z,_t as _,ke as $,It as aa,Re as ba,Nt as ca,Ft as da};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var G=new Map,_= exports.a =(e,t)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=G.get(t);return n===void 0&&(n=new Intl.NumberFormat(t,{maximumFractionDigits:0,useGrouping:!0}),G.set(t,n)),n.format(e)},j= exports.b =(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,Y= exports.c =e=>{let t=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Pe.test(t)?null:0:n:null},Se= exports.d =e=>{let t=Y(e);return t!==null&&Number.isSafeInteger(t)?t:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m= exports.e =e=>_e.test(e);var l=class extends RangeError{constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,K=864e5,w=6e4,C={min:1,max:9999},V=new Map,J=new Map,Ne=e=>{let t=V.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"}),V.set(e,t)),t},q=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},I=(e,t)=>{let[n,r,o,s,c,i,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(n),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},X=g.year>=C.min?q(g):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:X}},N=(e,t)=>{let n=new Map(Ne(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>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>q(N(e,t))-e,f=e=>String(e).padStart(2,"0"),Z=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${f(e.month)}-${f(e.day)}T${f(e.hour)}:${f(e.minute)}`;return t||e.second!==0?`${n}:${f(e.second)}`:n},Me=e=>{if(e%w!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/w;return`${e<0?"-":"+"}${f(Math.floor(t/60))}:${f(t%60)}`},Le= exports.g =(e,t)=>{let n=Oe.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=I(e,n.slice(1)),c=[...new Set([O(o-K,t),O(o+K,t)])].filter(i=>O(o-i,t)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${Z(r,!0)}${Me(c[0])}`},Q=(e,t)=>{let[n,r,o,s]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*w},Fe= exports.h =(e,t)=>{let n=we.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=I(e,n.slice(1,8));return Z(N(r-Q(e,n.slice(8)),t),!1)},$e=(e,t)=>{let n=JSON.stringify([e,t]),r=J.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"}),J.set(n,r)),r},M= exports.i =(e,t,n)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=I(e,[...r.slice(1,7),void 0]),s=o-Q(e,r.slice(7));return N(s,n),$e(t,n).format(s)};var ee=403,Ae= exports.k =(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,De= exports.l =(e,t)=>e.ok?t(e.value):e,Ut= exports.m ={kind:"idle"},ve= exports.n ={kind:"loading"},L= exports.o =(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:ve,F= exports.p =(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 T=e=>e===""?"":` (${e})`,te=e=>(t,n,r)=>t.status===403?e(n,t.reason):r(t.reason),ne=(e,t)=>t===""?e:`${e} Reason: ${t}.`,re=(e,t)=>t===""?e:`${e}${t}\u3002`,E= exports.r ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:te(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ue= exports.s =e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var He=4,We=[1,2,3,4,6,8,12,16,24],Be=16,ze=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},Xe=11,oe=3/2,Ge=7/4,je=7/4,Ye=120,Ke=3/2,Ve=[1,2,3],ae= exports.u =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},D=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Xe,Math.round(Be*ze**e))},v=(e,t)=>ae(e*t),ie=v(D(A.body),oe),b= exports.v =ie+24,se= exports.w =b+8,le= exports.x =ie+8,$={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},Je=()=>Object.fromEntries(We.map(e=>[`space-${e}`,e*4])),qe=()=>{let e=Object.fromEntries(Object.entries(A).map(([n,r])=>{let o=D(r);return[n,{size:o,lineHeight:v(o,n==="title"?je:oe)}]})),t=D(A.body);return{...e,prose:{size:t,lineHeight:v(t,Ge)}}},Ze=()=>Object.fromEntries(Ve.map(e=>[`motion-${e}`,Ye*Ke**(e-1)])),de=e=>Object.freeze({space:Object.freeze(Je()),type:Object.freeze(qe()),weight:$.weight,radius:$.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":se,"size-row-compact":le}),stroke:$.stroke,motion:Object.freeze(Ze()),color:Object.freeze({...e})});var Qe={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a= exports.y =de(Qe),et="--cui-",tt= exports.z =e=>`var(${et}${e})`;var nt=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ce=(e,t)=>{let n=0,r=0;for(let o of e)nt(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h= exports.A =e=>ce(e,.55),x= exports.B =e=>ce(e,.6),u= exports.C =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",B=2*a.space["space-3"],me={type:"caption",paddingInlinePx:2*a.space["space-2"]},U={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},fe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},H={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},rt=10,ot="2000-01-01T00:00:00Z",at=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,it=(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(!m(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},d=(e,t,n,r)=>Math.max(...it(e,t).map(o=>pe(o,n,r))),z= exports.D =e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",me.type)+me.paddingInlinePx;case"button":return Math.max(U.minInlinePx,d(e.labels,"button","sans",U.type)+U.paddingInlinePx);case"link":return Math.max(fe.minInlinePx,d(e.labels,"link","sans",fe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.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+z(n),0)+(e.items.length-1)*a.space[e.gap]}}},st= exports.E =(e,t)=>{let n=d([e.header],"column header","sans",ue),r=e.note===void 0?0:d(e.note,"column header note","sans",ue);return u(Math.max(n,r,...t.map(z))+B)},lt= exports.F =u(pe("\u3042".repeat(rt),"sans",W)+B),dt= exports.G =e=>u(d(e,"comparison attribute","sans",W)+B),ct= exports.H =(e,t)=>M(ot,e,t),ut= exports.I =(e,t)=>{if(t!==void 0&&!m(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return j(_(at,e),t)},mt= exports.J =(e,t)=>u(Math.max(d(e,"tile caption","sans",H.captionType),d(t,"tile value","sans",H.valueType))+H.paddingInlinePx);var ft=.12,pt=.16,gt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S= exports.K =(e,t)=>{let n=0,r=0;for(let s of e)n+=1,gt.test(s)&&(r+=1);return(t==="mono"?x(e):h(e))+ft*n+pt*r},yt= exports.L =e=>{for(let n of[e.name,...e.notes])if(!m(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(n=>S(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}},tn= exports.M =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)}},Tt= exports.N =(e,t)=>{if(e!==null&&!m(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+ge}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ge= exports.O =a.stroke["focus-offset"]+a.stroke["focus-width"],nn= exports.P =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var bt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},p= exports.Q =e=>`${bt(e)/16}rem`;var ye=(1+Math.sqrt(5))/2,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},ht= exports.R =(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+ye),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}},sn= exports.S =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=p(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${p(e.masterMinPx)},calc((100% - ${o}) / ${1+ye}),calc(100% - ${o} - ${p(e.detailMinPx)}))`,i=`@container (min-width:${p(t)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:n,css:s+i}};var xt=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.T =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},kt= exports.U =e=>he(e)+xt;var Rt=(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 i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*t+(i-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${p(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Ct=(e,t)=>{let n=L(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Et= exports.X =(e,t)=>F(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Pt= exports.Y =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,St= exports.Z =(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._ =(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 Ot=/^#[0-9a-f]{6}$/i,wt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Ot.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke= exports.$ =({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,It= exports.aa =e=>{if(!wt.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"],Nt= exports.ca =["fg","tint","accent","line","solid","solid-hover"],Mt={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}),Lt=({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})}),Ft= exports.da =Object.freeze(Object.fromEntries(Re.map(e=>[e,Lt(Mt[e])])));exports.a = _; exports.b = j; exports.c = Y; exports.d = Se; exports.e = m; exports.f = l; exports.g = Le; exports.h = Fe; exports.i = M; exports.j = ee; exports.k = Ae; exports.l = De; exports.m = Ut; exports.n = ve; exports.o = L; exports.p = F; exports.q = T; exports.r = E; exports.s = Ue; exports.t = He; exports.u = ae; exports.v = b; exports.w = se; exports.x = le; exports.y = a; exports.z = tt; exports.A = h; exports.B = x; exports.C = u; exports.D = z; exports.E = st; exports.F = lt; exports.G = dt; exports.H = ct; exports.I = ut; exports.J = mt; exports.K = S; exports.L = yt; exports.M = tn; exports.N = Tt; exports.O = ge; exports.P = nn; exports.Q = p; exports.R = ht; exports.S = sn; exports.T = he; exports.U = kt; exports.V = Rt; exports.W = Ct; exports.X = Et; exports.Y = Pt; exports.Z = St; exports._ = _t; exports.$ = ke; exports.aa = It; exports.ba = Re; exports.ca = Nt; exports.da = Ft;
|
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 _chunkS6DFKVUVcjs = require('./chunk-S6DFKVUV.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunkS6DFKVUVcjs.x; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkS6DFKVUVcjs.r; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunkS6DFKVUVcjs.O; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkS6DFKVUVcjs.F; exports.HTTP_FORBIDDEN = _chunkS6DFKVUVcjs.j; exports.LATTICE_PX = _chunkS6DFKVUVcjs.t; exports.ROW_WITH_CONTROL_PX = _chunkS6DFKVUVcjs.w; exports.TARGET_PX = _chunkS6DFKVUVcjs.v; exports.TOKENS = _chunkS6DFKVUVcjs.y; exports.TONES = _chunkS6DFKVUVcjs.da; exports.TONE_HUES = _chunkS6DFKVUVcjs.ba; exports.TONE_ROLES = _chunkS6DFKVUVcjs.ca; exports.ZonedTimeError = _chunkS6DFKVUVcjs.f; exports.beginPage = _chunkS6DFKVUVcjs.Y; exports.beginPagedReload = _chunkS6DFKVUVcjs.W; exports.beginReload = _chunkS6DFKVUVcjs.o; exports.ceil8 = _chunkS6DFKVUVcjs.C; exports.ceilToLattice = _chunkS6DFKVUVcjs.u; exports.cellContentInlinePx = _chunkS6DFKVUVcjs.D; exports.comparisonAttributePx = _chunkS6DFKVUVcjs.G; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkS6DFKVUVcjs.I; exports.cssVar = _chunkS6DFKVUVcjs.z; exports.figureBoxPlan = _chunkS6DFKVUVcjs.L; exports.figureDiscLabelPlan = _chunkS6DFKVUVcjs.N; exports.fixedColumnPx = _chunkS6DFKVUVcjs.E; exports.flatMapOutcome = _chunkS6DFKVUVcjs.l; exports.formatCount = _chunkS6DFKVUVcjs.a; exports.formatInstant = _chunkS6DFKVUVcjs.i; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkS6DFKVUVcjs.H; exports.isReadableText = _chunkS6DFKVUVcjs.e; exports.keepLastGood = _chunkS6DFKVUVcjs.p; exports.lightDark = _chunkS6DFKVUVcjs.$; exports.mapOutcome = _chunkS6DFKVUVcjs.k; exports.mapPagedList = _chunkS6DFKVUVcjs._; exports.masterDetailPlan = _chunkS6DFKVUVcjs.R; exports.monoTextWidthEm = _chunkS6DFKVUVcjs.B; exports.placeholderRule = _chunkS6DFKVUVcjs.aa; exports.readDecimalText = _chunkS6DFKVUVcjs.c; exports.readIntegerText = _chunkS6DFKVUVcjs.d; exports.reasonAside = _chunkS6DFKVUVcjs.q; exports.resolveConsoleUiLabels = _chunkS6DFKVUVcjs.s; exports.settleFirstPage = _chunkS6DFKVUVcjs.X; exports.settlePage = _chunkS6DFKVUVcjs.Z; exports.spacedTextWidthEm = _chunkS6DFKVUVcjs.K; exports.tableFrameMinInlinePx = _chunkS6DFKVUVcjs.U; exports.tableMinInlinePx = _chunkS6DFKVUVcjs.T; exports.textWidthEm = _chunkS6DFKVUVcjs.A; exports.tileGridPlan = _chunkS6DFKVUVcjs.V; exports.tileMinInlinePx = _chunkS6DFKVUVcjs.J; exports.toOffsetIso = _chunkS6DFKVUVcjs.g; exports.toWallTime = _chunkS6DFKVUVcjs.h;
|
package/dist/core.d.cts
CHANGED
|
@@ -550,4 +550,37 @@ declare const CONTRAST_PAIRS: {
|
|
|
550
550
|
};
|
|
551
551
|
};
|
|
552
552
|
};
|
|
553
|
-
|
|
553
|
+
declare const lightDark: ({ light, dark }: SchemeColor) => string;
|
|
554
|
+
declare const placeholderRule: (rootAttribute: string) => string;
|
|
555
|
+
declare const TONE_HUES: readonly [
|
|
556
|
+
"indigo",
|
|
557
|
+
"violet",
|
|
558
|
+
"purple",
|
|
559
|
+
"fuchsia",
|
|
560
|
+
"pink",
|
|
561
|
+
"rose",
|
|
562
|
+
"red",
|
|
563
|
+
"orange",
|
|
564
|
+
"amber",
|
|
565
|
+
"yellow",
|
|
566
|
+
"lime",
|
|
567
|
+
"green",
|
|
568
|
+
"emerald",
|
|
569
|
+
"teal",
|
|
570
|
+
"cyan",
|
|
571
|
+
"sky",
|
|
572
|
+
"blue"
|
|
573
|
+
];
|
|
574
|
+
type ToneHue = (typeof TONE_HUES)[number];
|
|
575
|
+
declare const TONE_ROLES: readonly [
|
|
576
|
+
"fg",
|
|
577
|
+
"tint",
|
|
578
|
+
"accent",
|
|
579
|
+
"line",
|
|
580
|
+
"solid",
|
|
581
|
+
"solid-hover"
|
|
582
|
+
];
|
|
583
|
+
type ToneRole = (typeof TONE_ROLES)[number];
|
|
584
|
+
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
585
|
+
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
586
|
+
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
package/dist/core.d.ts
CHANGED
|
@@ -550,4 +550,37 @@ declare const CONTRAST_PAIRS: {
|
|
|
550
550
|
};
|
|
551
551
|
};
|
|
552
552
|
};
|
|
553
|
-
|
|
553
|
+
declare const lightDark: ({ light, dark }: SchemeColor) => string;
|
|
554
|
+
declare const placeholderRule: (rootAttribute: string) => string;
|
|
555
|
+
declare const TONE_HUES: readonly [
|
|
556
|
+
"indigo",
|
|
557
|
+
"violet",
|
|
558
|
+
"purple",
|
|
559
|
+
"fuchsia",
|
|
560
|
+
"pink",
|
|
561
|
+
"rose",
|
|
562
|
+
"red",
|
|
563
|
+
"orange",
|
|
564
|
+
"amber",
|
|
565
|
+
"yellow",
|
|
566
|
+
"lime",
|
|
567
|
+
"green",
|
|
568
|
+
"emerald",
|
|
569
|
+
"teal",
|
|
570
|
+
"cyan",
|
|
571
|
+
"sky",
|
|
572
|
+
"blue"
|
|
573
|
+
];
|
|
574
|
+
type ToneHue = (typeof TONE_HUES)[number];
|
|
575
|
+
declare const TONE_ROLES: readonly [
|
|
576
|
+
"fg",
|
|
577
|
+
"tint",
|
|
578
|
+
"accent",
|
|
579
|
+
"line",
|
|
580
|
+
"solid",
|
|
581
|
+
"solid-hover"
|
|
582
|
+
];
|
|
583
|
+
type ToneRole = (typeof TONE_ROLES)[number];
|
|
584
|
+
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
585
|
+
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
586
|
+
export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as x,B as y,C as z,D as A,E as B,F as C,G as D,H as E,I as F,J as G,K as H,L as I,N as J,O as K,R as L,T as M,U as N,V as O,W as P,X as Q,Y as R,Z as S,_ as T,a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u,y as v,z as w}from"./chunk-
|
|
1
|
+
import{$ as Y,A as x,B as y,C as z,D as A,E as B,F as C,G as D,H as E,I as F,J as G,K as H,L as I,N as J,O as K,R as L,T as M,U as N,V as O,W as P,X as Q,Y as R,Z as S,_ as T,a,aa as Z,ba as _,c as b,ca as $,d as c,da as aa,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u,y as v,z as w}from"./chunk-4IQKQ7WF.js";import{a as U,b as V,c as W,d as X}from"./chunk-FXEGLGL7.js";export{u as COMPACT_ROW_PX,o as CONSOLE_UI_LABEL_CATALOGS,W as CONTRAST_MINIMUM,X as CONTRAST_PAIRS,K as FIGURE_RING_REACH_PX,C as FLEXIBLE_COLUMN_MIN_PX,i as HTTP_FORBIDDEN,q as LATTICE_PX,t as ROW_WITH_CONTROL_PX,s as TARGET_PX,v as TOKENS,aa as TONES,_ as TONE_HUES,$ as TONE_ROLES,e as ZonedTimeError,R as beginPage,P as beginPagedReload,l as beginReload,z as ceil8,r as ceilToLattice,A as cellContentInlinePx,D as comparisonAttributePx,V as contrastRatio,F as countSampleText,w as cssVar,I as figureBoxPlan,J as figureDiscLabelPlan,B as fixedColumnPx,k as flatMapOutcome,a as formatCount,h as formatInstant,U as hexToSrgb,E as instantSampleText,d as isReadableText,m as keepLastGood,Y as lightDark,j as mapOutcome,T as mapPagedList,L as masterDetailPlan,y as monoTextWidthEm,Z as placeholderRule,b as readDecimalText,c as readIntegerText,n as reasonAside,p as resolveConsoleUiLabels,Q as settleFirstPage,S as settlePage,H as spacedTextWidthEm,N as tableFrameMinInlinePx,M as tableMinInlinePx,x as textWidthEm,O as tileGridPlan,G as tileMinInlinePx,f as toOffsetIso,g as toWallTime};
|