@aiquants/console-ui 0.8.0 → 0.8.2
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 +15 -4
- package/dist/chunk-HROMRBBM.js +1 -0
- package/dist/chunk-RA33TN5N.js +1 -0
- package/dist/chunk-RYHSVWM2.cjs +1 -0
- package/dist/chunk-XLOWKWII.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +186 -2
- package/dist/core.d.ts +186 -2
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +1 -1
- package/dist/styles/console-ui.css +34 -3
- package/dist/testing.cjs +1 -1
- package/dist/testing.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-7M4I26BS.cjs +0 -1
- package/dist/chunk-FXEGLGL7.js +0 -1
- package/dist/chunk-H4DAGEIG.js +0 -1
- package/dist/chunk-WUST5VT6.cjs +0 -1
package/README.md
CHANGED
|
@@ -19,13 +19,14 @@ pnpm add @aiquants/console-ui
|
|
|
19
19
|
| Import path | Contents |
|
|
20
20
|
| --- | --- |
|
|
21
21
|
| `@aiquants/console-ui` | Components and hooks; re-exports everything from `@aiquants/console-ui/core`. |
|
|
22
|
-
| `@aiquants/console-ui/core` | React-free: the tokens with the geometry of their formulas and the contrast computation, the tone table and the CSS text of a colour of both schemes, the layout arithmetic and the figure formulas, number, zoned-time and instant formatting, the reading of a number field's text, the rule of a text with nothing to read, the label catalogs, the read contract with its keep-last-good machine, and the keyset paging machine (listed below). Server-side loaders and hosts import from here without loading React. |
|
|
22
|
+
| `@aiquants/console-ui/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]` and the component rules, all inside `@layer cui`. |
|
|
24
|
+
| `@aiquants/console-ui/styles/console-ui.css` | The stylesheet: the token variables on `[data-cui-root]` (and their more-contrast colours on `[data-cui-root][data-cui-contrast="more"]`) and the component rules, all inside `@layer cui`. |
|
|
25
25
|
|
|
26
26
|
The `/core` exports:
|
|
27
27
|
|
|
28
|
-
- Tokens and contrast: `TOKENS
|
|
28
|
+
- Tokens and contrast: `TOKENS` (its `moreContrastColor` is the more-contrast palette), `cssVar`, `contrastRatio`, `hexToSrgb`, `CONTRAST_PAIRS`, `CONTRAST_MINIMUM`, `MORE_CONTRAST_MINIMUM`, and the types `ColorScheme`, `ContrastLevel`, `PaletteName`, `SchemeColor`, `Measure`, `MeasureToken` and `MotionToken` beside the other token names.
|
|
29
|
+
- The topmost modal dialog (see Focus and announcements): `topmostModalOf(document)` and the type `TopmostModal`.
|
|
29
30
|
- 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)`.
|
|
30
31
|
- 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).
|
|
31
32
|
- 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`.
|
|
@@ -134,6 +135,8 @@ Drawing it with `AccessFailureNotice` keeps the console's look, and the presente
|
|
|
134
135
|
Pass a presenter with one identity (`useCallback`, or a module constant): a new function on every render changes the root's context and re-renders every component that reads it.
|
|
135
136
|
A console shows every instant with `formatInstant(iso, formatLocale, timeZone)` from the values `useConsoleUi()` returns, so every panel names the same instant with the same string and a page rendered on the server hydrates without a mismatch (the ambient time zone differs between the server and the browser).
|
|
136
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
|
+
`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
|
+
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).
|
|
137
140
|
|
|
138
141
|
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.
|
|
139
142
|
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.
|
|
@@ -148,13 +151,19 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
148
151
|
- a 4 px lattice (`LATTICE_PX`) and the spaces 4, 8, 12, 16, 24, 32, 48, 64 and 96 (`space-1` … `space-24`, multipliers whose prime factors are 2 and 3);
|
|
149
152
|
- type steps of round(16 × 1.25^k) px, never below 11 px, each line the smallest lattice multiple at or above 1.5 times its size (WCAG 1.4.8; `title`, beside controls, and `prose`, the reading line, at 1.75): `caption` 11/20, `body` 13/20, `prose` 13/24, `body-lg` 16/24 (the body of a surface read at length, such as a conversation or an article: the 16 px base step with the 1.5 line), `title` 16/28, `heading` 20/32, `display` 25/40, `display-lg` 31/48;
|
|
150
153
|
- the 44 px target (`TARGET_PX`: a `body` line with 12 px above and below), which is also the height of a control and of a table row (`size-target`, `size-control`, `size-row`), the 52 px row that holds a control (`ROW_WITH_CONTROL_PX`: the target with one lattice unit above and below, `size-row-control`) and the 28 px compact row of a read-only line table (`COMPACT_ROW_PX`: a `body` line with one lattice unit above and below, `size-row-compact`);
|
|
151
|
-
- motion of 120, 180 and 270 ms (`motion-1` … `motion-3`, 120 × 1.5^(k − 1))
|
|
154
|
+
- motion of 120, 180 and 270 ms (`motion-1` … `motion-3`, 120 × 1.5^(k − 1));
|
|
155
|
+
- 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.
|
|
152
156
|
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.
|
|
153
157
|
- 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.
|
|
154
158
|
- Every duration is read from the `--cui-motion-*` variables, which are `0ms` while the reader prefers reduced motion (`prefers-reduced-motion: reduce`), so a component that moves stops without a rule of its own; no rule writes a duration by hand, and the indeterminate progress segment sweeps only for a reader who allows motion.
|
|
155
159
|
- 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,
|
|
156
160
|
the surfaces it may be drawn on with the WCAG 2 ratio on each in that scheme.
|
|
157
161
|
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.
|
|
162
|
+
- `TOKENS.moreContrastColor` is the more-contrast palette, which a root with `contrast="more"` draws: the rule `[data-cui-root][data-cui-contrast="more"]` gives every colour variable its more-contrast value, so every component takes it with no rule of its own. It is not a second choice but derived from the palette by one rule.
|
|
163
|
+
The surfaces keep their colours. Every role drawn on them moves along its own hue toward black or white, whichever is farther from its surfaces, until its ratio on the surface it stands out from least is the geometric mean of its standard ratio there and the ratio of black or white there: half the way, on the logarithmic scale of the ratio, to the strongest colour it could have on that surface. The move is a mix in OKLab, which keeps the hue angle (a mix in linear sRGB toward white turns an amber into a pink), and a colour already at its end (white text on the light scheme's solid fills) stays.
|
|
164
|
+
`CONTRAST_PAIRS.contrastLight` and `CONTRAST_PAIRS.contrastDark` list the same pairs as the standard tables, every one at `MORE_CONTRAST_MINIMUM` (7 for text, 4.5 for large text and for non-text) and none below its standard ratio; the lowest text ratio is 7.61 in the light scheme and 10.09 in the dark one, and the lowest non-text ratios are 8.35 and 9.
|
|
165
|
+
The light scheme's 7.61 is white `on-solid` text on `success-solid`, the same pair as in the standard palette: white is already at its end and the solid fills are surfaces, which keep their colours. Every other text role of the light scheme reaches 11.64 at least.
|
|
166
|
+
The decorative `border-subtle` is raised too, to at least 4.67 (light) and 4.53 (dark) on `surface`, `subtle` and `sunken`, so every edge of a card, a table or a dialog stands out.
|
|
158
167
|
- The remaining colours are fixed non-text graphics, each drawn against listed surfaces of `CONTRAST_PAIRS`: the control border (`border-control`) of inputs, secondary buttons, segments (a compact segment's face) and the switch's track, the slider's rail and a pending step's ring, the invalid border (`danger-accent`), the selected-row band, the radio mark, the current tab's marker and the slider's thumb (`info-accent`), and the focus ring (`focus`).
|
|
159
168
|
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`,
|
|
160
169
|
in that one declaration only).
|
|
@@ -312,6 +321,8 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
312
321
|
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.
|
|
313
322
|
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.
|
|
314
323
|
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", dialogs }` with the open modal dialogs in document order (any of which may be the topmost), and reads only the document it is given.
|
|
325
|
+
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.
|
|
315
326
|
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.
|
|
316
327
|
`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.
|
|
317
328
|
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.
|
|
@@ -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
|
+
var o=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=o.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},c=n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,f=n=>n<=.0031308?n*12.92:1.055*n**.4166666666666667-.055,a=n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*c(e)+.7152*c(s)+.0722*c(r)},g=(n,e)=>{let[s,r]=[a(n),a(e)].sort((t,u)=>u-t);return(s+.05)/(r+.05)},l={text:7,largeText:4.5,nonText:3},d={text:7,largeText:4.5,nonText:4.5},b=["standard","more"],x={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}},contrastLight:{fg:{surface:19.36,subtle:18.5,sunken:17.67,"danger-tint":17.7,"warning-tint":18.67,"success-tint":18.38,"info-tint":17.79},"fg-secondary":{surface:14.67,subtle:14.02,sunken:13.39},"fg-muted":{surface:12.75,subtle:12.19,sunken:11.64,"danger-tint":11.66,"warning-tint":12.3,"info-tint":11.72},"danger-fg":{surface:13.28,subtle:12.69,"danger-tint":12.14},"warning-fg":{surface:13.82,subtle:13.21,"warning-tint":13.33},"success-fg":{surface:12.67,subtle:12.11,"success-tint":12.03},"info-fg":{surface:13.64,"info-tint":12.54,subtle:13.04},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:10,"danger-tint":9.14},"warning-accent":{surface:10.32,"warning-tint":9.95},"success-accent":{surface:8.79,"success-tint":8.35},"info-accent":{surface:10.48,subtle:10.01,sunken:9.56,"info-tint":9.63},focus:{surface:10.48,subtle:10.01,sunken:9.56,"info-tint":9.63},"border-control":{surface:10.02,subtle:9.58,sunken:9.15}},contrastDark:{fg:{surface:17.36,subtle:14.23,sunken:19.62,"danger-tint":15.74,"warning-tint":14.6,"success-tint":14.78,"info-tint":14.39},"fg-secondary":{surface:16.02,subtle:13.13,sunken:18.11},"fg-muted":{surface:14.59,subtle:11.96,sunken:16.49,"danger-tint":13.22,"warning-tint":12.27,"info-tint":12.09},"danger-fg":{surface:14.82,subtle:12.15,"danger-tint":13.44},"warning-fg":{surface:15.99,subtle:13.11,"warning-tint":13.45},"success-fg":{surface:15.78,subtle:12.94,"success-tint":13.44},"info-fg":{surface:15,"info-tint":12.43,subtle:12.29},"on-solid":{"neutral-solid":13.02,"danger-solid":10.09,"success-solid":12.72,"info-solid":10.68,"warning-solid":13.38},"danger-accent":{surface:10.47,"danger-tint":9.49},"warning-accent":{surface:13.62,"warning-tint":11.46},"success-accent":{surface:12.81,"success-tint":10.91},"info-accent":{surface:11.01,subtle:9.03,sunken:12.45,"info-tint":9.13},focus:{surface:11.01,subtle:9.03,sunken:12.45,"info-tint":9.13},"border-control":{surface:10.98,subtle:9,sunken:12.41}}},w={fg:"text","fg-secondary":"text","fg-muted":"text","danger-fg":"text","warning-fg":"text","success-fg":"text","info-fg":"text","on-solid":"text","danger-accent":"nonText","warning-accent":"nonText","success-accent":"nonText","info-accent":"nonText",focus:"nonText","border-control":"nonText"};export{i as a,c as b,f as c,a as d,g as e,l as f,d as g,b as h,x as i,w as j};
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var o=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;var i=n=>{let e=o.exec(n);if(e===null)throw new RangeError(`Colour must be #rrggbb: ${n}`);let[,s,r,t]=e;return[Number.parseInt(s,16)/255,Number.parseInt(r,16)/255,Number.parseInt(t,16)/255]},c= exports.b =n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4,f= exports.c =n=>n<=.0031308?n*12.92:1.055*n**.4166666666666667-.055,a= exports.d =n=>{for(let t of n)if(!(t>=0&&t<=1))throw new RangeError(`sRGB channels must be numbers in [0, 1]: ${n.join(", ")}`);let[e,s,r]=n;return .2126*c(e)+.7152*c(s)+.0722*c(r)},g= exports.e =(n,e)=>{let[s,r]=[a(n),a(e)].sort((t,u)=>u-t);return(s+.05)/(r+.05)},l= exports.f ={text:7,largeText:4.5,nonText:3},d= exports.g ={text:7,largeText:4.5,nonText:4.5},b= exports.h =["standard","more"],x= exports.i ={light:{fg:{surface:17.83,subtle:17.04,sunken:16.28,"danger-tint":16.3,"warning-tint":17.19,"success-tint":16.93,"info-tint":16.38},"fg-secondary":{surface:10.36,subtle:9.9,sunken:9.45},"fg-muted":{surface:7.8,subtle:7.46,sunken:7.12,"danger-tint":7.13,"warning-tint":7.52,"info-tint":7.17},"danger-fg":{surface:8.36,subtle:7.99,"danger-tint":7.64},"warning-fg":{surface:9.06,subtle:8.66,"warning-tint":8.73},"success-fg":{surface:7.61,subtle:7.27,"success-tint":7.23},"info-fg":{surface:8.82,"info-tint":8.11,subtle:8.43},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:4.77,"danger-tint":4.36},"warning-accent":{surface:5.03,"warning-tint":4.85},"success-accent":{surface:3.65,"success-tint":3.47},"info-accent":{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},focus:{surface:5.25,subtle:5.01,sunken:4.79,"info-tint":4.82},"border-control":{surface:4.76,subtle:4.55,sunken:4.35}},dark:{fg:{surface:17.04,subtle:13.97,sunken:19.27,"danger-tint":15.45,"warning-tint":14.34,"success-tint":14.51,"info-tint":14.13},"fg-secondary":{surface:14.46,subtle:11.86,sunken:16.35},"fg-muted":{surface:12,subtle:9.83,sunken:13.56,"danger-tint":10.87,"warning-tint":10.09,"info-tint":9.94},"danger-fg":{surface:12.27,subtle:10.06,"danger-tint":11.12},"warning-fg":{surface:14.33,subtle:11.74,"warning-tint":12.05},"success-fg":{surface:13.94,subtle:11.43,"success-tint":11.87},"info-fg":{surface:12.54,"info-tint":10.39,subtle:10.28},"on-solid":{"neutral-solid":12,"danger-solid":9.29,"success-solid":11.72,"info-solid":9.83,"warning-solid":12.32},"danger-accent":{surface:6.17,"danger-tint":5.6},"warning-accent":{surface:10.4,"warning-tint":8.75},"success-accent":{surface:9.2,"success-tint":7.83},"info-accent":{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},focus:{surface:6.76,subtle:5.54,sunken:7.64,"info-tint":5.6},"border-control":{surface:6.78,subtle:5.56,sunken:7.66}},contrastLight:{fg:{surface:19.36,subtle:18.5,sunken:17.67,"danger-tint":17.7,"warning-tint":18.67,"success-tint":18.38,"info-tint":17.79},"fg-secondary":{surface:14.67,subtle:14.02,sunken:13.39},"fg-muted":{surface:12.75,subtle:12.19,sunken:11.64,"danger-tint":11.66,"warning-tint":12.3,"info-tint":11.72},"danger-fg":{surface:13.28,subtle:12.69,"danger-tint":12.14},"warning-fg":{surface:13.82,subtle:13.21,"warning-tint":13.33},"success-fg":{surface:12.67,subtle:12.11,"success-tint":12.03},"info-fg":{surface:13.64,"info-tint":12.54,subtle:13.04},"on-solid":{"neutral-solid":10.36,"danger-solid":8.36,"success-solid":7.61,"info-solid":8.82,"warning-solid":9.06},"danger-accent":{surface:10,"danger-tint":9.14},"warning-accent":{surface:10.32,"warning-tint":9.95},"success-accent":{surface:8.79,"success-tint":8.35},"info-accent":{surface:10.48,subtle:10.01,sunken:9.56,"info-tint":9.63},focus:{surface:10.48,subtle:10.01,sunken:9.56,"info-tint":9.63},"border-control":{surface:10.02,subtle:9.58,sunken:9.15}},contrastDark:{fg:{surface:17.36,subtle:14.23,sunken:19.62,"danger-tint":15.74,"warning-tint":14.6,"success-tint":14.78,"info-tint":14.39},"fg-secondary":{surface:16.02,subtle:13.13,sunken:18.11},"fg-muted":{surface:14.59,subtle:11.96,sunken:16.49,"danger-tint":13.22,"warning-tint":12.27,"info-tint":12.09},"danger-fg":{surface:14.82,subtle:12.15,"danger-tint":13.44},"warning-fg":{surface:15.99,subtle:13.11,"warning-tint":13.45},"success-fg":{surface:15.78,subtle:12.94,"success-tint":13.44},"info-fg":{surface:15,"info-tint":12.43,subtle:12.29},"on-solid":{"neutral-solid":13.02,"danger-solid":10.09,"success-solid":12.72,"info-solid":10.68,"warning-solid":13.38},"danger-accent":{surface:10.47,"danger-tint":9.49},"warning-accent":{surface:13.62,"warning-tint":11.46},"success-accent":{surface:12.81,"success-tint":10.91},"info-accent":{surface:11.01,subtle:9.03,sunken:12.45,"info-tint":9.13},focus:{surface:11.01,subtle:9.03,sunken:12.45,"info-tint":9.13},"border-control":{surface:10.98,subtle:9,sunken:12.41}}},w= exports.j ={fg:"text","fg-secondary":"text","fg-muted":"text","danger-fg":"text","warning-fg":"text","success-fg":"text","info-fg":"text","on-solid":"text","danger-accent":"nonText","warning-accent":"nonText","success-accent":"nonText","info-accent":"nonText",focus:"nonText","border-control":"nonText"};exports.a = i; exports.b = c; exports.c = f; exports.d = a; exports.e = g; exports.f = l; exports.g = d; exports.h = b; exports.i = x; exports.j = w;
|
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
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
type TopmostModal = {
|
|
2
|
+
readonly kind: "none";
|
|
3
|
+
} | {
|
|
4
|
+
readonly kind: "topmost";
|
|
5
|
+
readonly dialog: HTMLDialogElement;
|
|
6
|
+
} | {
|
|
7
|
+
readonly kind: "undecidable";
|
|
8
|
+
readonly dialogs: readonly HTMLDialogElement[];
|
|
9
|
+
};
|
|
10
|
+
declare const topmostModalOf: (document: Document) => TopmostModal;
|
|
1
11
|
declare const formatCount: (value: number, formatLocale: string) => string;
|
|
2
12
|
declare const formatByteSize: (size: number, formatLocale: string) => string;
|
|
3
13
|
declare const readDecimalText: (text: string) => number | null;
|
|
@@ -72,6 +82,11 @@ type WeightToken = "regular" | "medium" | "bold";
|
|
|
72
82
|
type RadiusToken = "radius-control" | "radius-item" | "radius-container" | "radius-pill";
|
|
73
83
|
type SizeToken = "size-control" | "size-row" | "size-row-compact" | "size-row-control" | "size-target";
|
|
74
84
|
type StrokeToken = "border-width" | "focus-width" | "focus-offset" | "marker-width";
|
|
85
|
+
type MeasureToken = "measure-dialog";
|
|
86
|
+
type Measure = {
|
|
87
|
+
readonly ic: number;
|
|
88
|
+
readonly inset: SpaceToken;
|
|
89
|
+
};
|
|
75
90
|
type SchemeColor = {
|
|
76
91
|
readonly light: string;
|
|
77
92
|
readonly dark: string;
|
|
@@ -87,7 +102,9 @@ type ConsoleUiTokens$1<ColorToken extends string = string> = {
|
|
|
87
102
|
readonly size: Readonly<Record<SizeToken, number>>;
|
|
88
103
|
readonly stroke: Readonly<Record<StrokeToken, number>>;
|
|
89
104
|
readonly motion: Readonly<Record<MotionToken, number>>;
|
|
105
|
+
readonly measure: Readonly<Record<MeasureToken, Measure>>;
|
|
90
106
|
readonly color: Readonly<Record<ColorToken, SchemeColor>>;
|
|
107
|
+
readonly moreContrastColor: Readonly<Record<ColorToken, SchemeColor>>;
|
|
91
108
|
};
|
|
92
109
|
declare const CONSOLE_PALETTE: {
|
|
93
110
|
readonly fg: {
|
|
@@ -205,7 +222,7 @@ declare const TOKENS: ConsoleUiTokens;
|
|
|
205
222
|
type FgRole = "fg" | "fg-secondary" | "fg-muted" | "danger-fg" | "warning-fg" | "success-fg" | "info-fg" | "on-solid";
|
|
206
223
|
type SurfaceRole = "surface" | "subtle" | "sunken" | "danger-tint" | "warning-tint" | "success-tint" | "info-tint" | "neutral-solid" | "danger-solid" | "success-solid" | "info-solid" | "warning-solid";
|
|
207
224
|
type AccentRole = "danger-accent" | "warning-accent" | "success-accent" | "info-accent";
|
|
208
|
-
type TokenName = SpaceToken | `font-size-${TypeToken}` | `line-height-${TypeToken}` | `font-weight-${WeightToken}` | RadiusToken | SizeToken | StrokeToken | MotionToken | ColorToken;
|
|
225
|
+
type TokenName = SpaceToken | `font-size-${TypeToken}` | `line-height-${TypeToken}` | `font-weight-${WeightToken}` | RadiusToken | SizeToken | StrokeToken | MotionToken | MeasureToken | ColorToken;
|
|
209
226
|
declare const cssVar: (name: TokenName) => string;
|
|
210
227
|
type TextFace = "sans" | "mono";
|
|
211
228
|
declare const textWidthEm: (text: string) => number;
|
|
@@ -391,8 +408,15 @@ declare const CONTRAST_MINIMUM: {
|
|
|
391
408
|
readonly largeText: 4.5;
|
|
392
409
|
readonly nonText: 3;
|
|
393
410
|
};
|
|
411
|
+
declare const MORE_CONTRAST_MINIMUM: {
|
|
412
|
+
readonly text: 7;
|
|
413
|
+
readonly largeText: 4.5;
|
|
414
|
+
readonly nonText: 4.5;
|
|
415
|
+
};
|
|
394
416
|
type ContrastRole = FgRole | AccentRole | "focus" | "border-control";
|
|
395
417
|
type ColorScheme = "light" | "dark";
|
|
418
|
+
type ContrastLevel = "standard" | "more";
|
|
419
|
+
type PaletteName = ColorScheme | "contrastLight" | "contrastDark";
|
|
396
420
|
declare const CONTRAST_PAIRS: {
|
|
397
421
|
readonly light: {
|
|
398
422
|
readonly fg: {
|
|
@@ -554,6 +578,166 @@ declare const CONTRAST_PAIRS: {
|
|
|
554
578
|
readonly sunken: 7.66;
|
|
555
579
|
};
|
|
556
580
|
};
|
|
581
|
+
readonly contrastLight: {
|
|
582
|
+
readonly fg: {
|
|
583
|
+
readonly surface: 19.36;
|
|
584
|
+
readonly subtle: 18.5;
|
|
585
|
+
readonly sunken: 17.67;
|
|
586
|
+
readonly "danger-tint": 17.7;
|
|
587
|
+
readonly "warning-tint": 18.67;
|
|
588
|
+
readonly "success-tint": 18.38;
|
|
589
|
+
readonly "info-tint": 17.79;
|
|
590
|
+
};
|
|
591
|
+
readonly "fg-secondary": {
|
|
592
|
+
readonly surface: 14.67;
|
|
593
|
+
readonly subtle: 14.02;
|
|
594
|
+
readonly sunken: 13.39;
|
|
595
|
+
};
|
|
596
|
+
readonly "fg-muted": {
|
|
597
|
+
readonly surface: 12.75;
|
|
598
|
+
readonly subtle: 12.19;
|
|
599
|
+
readonly sunken: 11.64;
|
|
600
|
+
readonly "danger-tint": 11.66;
|
|
601
|
+
readonly "warning-tint": 12.3;
|
|
602
|
+
readonly "info-tint": 11.72;
|
|
603
|
+
};
|
|
604
|
+
readonly "danger-fg": {
|
|
605
|
+
readonly surface: 13.28;
|
|
606
|
+
readonly subtle: 12.69;
|
|
607
|
+
readonly "danger-tint": 12.14;
|
|
608
|
+
};
|
|
609
|
+
readonly "warning-fg": {
|
|
610
|
+
readonly surface: 13.82;
|
|
611
|
+
readonly subtle: 13.21;
|
|
612
|
+
readonly "warning-tint": 13.33;
|
|
613
|
+
};
|
|
614
|
+
readonly "success-fg": {
|
|
615
|
+
readonly surface: 12.67;
|
|
616
|
+
readonly subtle: 12.11;
|
|
617
|
+
readonly "success-tint": 12.03;
|
|
618
|
+
};
|
|
619
|
+
readonly "info-fg": {
|
|
620
|
+
readonly surface: 13.64;
|
|
621
|
+
readonly "info-tint": 12.54;
|
|
622
|
+
readonly subtle: 13.04;
|
|
623
|
+
};
|
|
624
|
+
readonly "on-solid": {
|
|
625
|
+
readonly "neutral-solid": 10.36;
|
|
626
|
+
readonly "danger-solid": 8.36;
|
|
627
|
+
readonly "success-solid": 7.61;
|
|
628
|
+
readonly "info-solid": 8.82;
|
|
629
|
+
readonly "warning-solid": 9.06;
|
|
630
|
+
};
|
|
631
|
+
readonly "danger-accent": {
|
|
632
|
+
readonly surface: 10;
|
|
633
|
+
readonly "danger-tint": 9.14;
|
|
634
|
+
};
|
|
635
|
+
readonly "warning-accent": {
|
|
636
|
+
readonly surface: 10.32;
|
|
637
|
+
readonly "warning-tint": 9.95;
|
|
638
|
+
};
|
|
639
|
+
readonly "success-accent": {
|
|
640
|
+
readonly surface: 8.79;
|
|
641
|
+
readonly "success-tint": 8.35;
|
|
642
|
+
};
|
|
643
|
+
readonly "info-accent": {
|
|
644
|
+
readonly surface: 10.48;
|
|
645
|
+
readonly subtle: 10.01;
|
|
646
|
+
readonly sunken: 9.56;
|
|
647
|
+
readonly "info-tint": 9.63;
|
|
648
|
+
};
|
|
649
|
+
readonly focus: {
|
|
650
|
+
readonly surface: 10.48;
|
|
651
|
+
readonly subtle: 10.01;
|
|
652
|
+
readonly sunken: 9.56;
|
|
653
|
+
readonly "info-tint": 9.63;
|
|
654
|
+
};
|
|
655
|
+
readonly "border-control": {
|
|
656
|
+
readonly surface: 10.02;
|
|
657
|
+
readonly subtle: 9.58;
|
|
658
|
+
readonly sunken: 9.15;
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
readonly contrastDark: {
|
|
662
|
+
readonly fg: {
|
|
663
|
+
readonly surface: 17.36;
|
|
664
|
+
readonly subtle: 14.23;
|
|
665
|
+
readonly sunken: 19.62;
|
|
666
|
+
readonly "danger-tint": 15.74;
|
|
667
|
+
readonly "warning-tint": 14.6;
|
|
668
|
+
readonly "success-tint": 14.78;
|
|
669
|
+
readonly "info-tint": 14.39;
|
|
670
|
+
};
|
|
671
|
+
readonly "fg-secondary": {
|
|
672
|
+
readonly surface: 16.02;
|
|
673
|
+
readonly subtle: 13.13;
|
|
674
|
+
readonly sunken: 18.11;
|
|
675
|
+
};
|
|
676
|
+
readonly "fg-muted": {
|
|
677
|
+
readonly surface: 14.59;
|
|
678
|
+
readonly subtle: 11.96;
|
|
679
|
+
readonly sunken: 16.49;
|
|
680
|
+
readonly "danger-tint": 13.22;
|
|
681
|
+
readonly "warning-tint": 12.27;
|
|
682
|
+
readonly "info-tint": 12.09;
|
|
683
|
+
};
|
|
684
|
+
readonly "danger-fg": {
|
|
685
|
+
readonly surface: 14.82;
|
|
686
|
+
readonly subtle: 12.15;
|
|
687
|
+
readonly "danger-tint": 13.44;
|
|
688
|
+
};
|
|
689
|
+
readonly "warning-fg": {
|
|
690
|
+
readonly surface: 15.99;
|
|
691
|
+
readonly subtle: 13.11;
|
|
692
|
+
readonly "warning-tint": 13.45;
|
|
693
|
+
};
|
|
694
|
+
readonly "success-fg": {
|
|
695
|
+
readonly surface: 15.78;
|
|
696
|
+
readonly subtle: 12.94;
|
|
697
|
+
readonly "success-tint": 13.44;
|
|
698
|
+
};
|
|
699
|
+
readonly "info-fg": {
|
|
700
|
+
readonly surface: 15;
|
|
701
|
+
readonly "info-tint": 12.43;
|
|
702
|
+
readonly subtle: 12.29;
|
|
703
|
+
};
|
|
704
|
+
readonly "on-solid": {
|
|
705
|
+
readonly "neutral-solid": 13.02;
|
|
706
|
+
readonly "danger-solid": 10.09;
|
|
707
|
+
readonly "success-solid": 12.72;
|
|
708
|
+
readonly "info-solid": 10.68;
|
|
709
|
+
readonly "warning-solid": 13.38;
|
|
710
|
+
};
|
|
711
|
+
readonly "danger-accent": {
|
|
712
|
+
readonly surface: 10.47;
|
|
713
|
+
readonly "danger-tint": 9.49;
|
|
714
|
+
};
|
|
715
|
+
readonly "warning-accent": {
|
|
716
|
+
readonly surface: 13.62;
|
|
717
|
+
readonly "warning-tint": 11.46;
|
|
718
|
+
};
|
|
719
|
+
readonly "success-accent": {
|
|
720
|
+
readonly surface: 12.81;
|
|
721
|
+
readonly "success-tint": 10.91;
|
|
722
|
+
};
|
|
723
|
+
readonly "info-accent": {
|
|
724
|
+
readonly surface: 11.01;
|
|
725
|
+
readonly subtle: 9.03;
|
|
726
|
+
readonly sunken: 12.45;
|
|
727
|
+
readonly "info-tint": 9.13;
|
|
728
|
+
};
|
|
729
|
+
readonly focus: {
|
|
730
|
+
readonly surface: 11.01;
|
|
731
|
+
readonly subtle: 9.03;
|
|
732
|
+
readonly sunken: 12.45;
|
|
733
|
+
readonly "info-tint": 9.13;
|
|
734
|
+
};
|
|
735
|
+
readonly "border-control": {
|
|
736
|
+
readonly surface: 10.98;
|
|
737
|
+
readonly subtle: 9;
|
|
738
|
+
readonly sunken: 12.41;
|
|
739
|
+
};
|
|
740
|
+
};
|
|
557
741
|
};
|
|
558
742
|
declare const lightDark: ({ light, dark }: SchemeColor) => string;
|
|
559
743
|
declare const placeholderRule: (rootAttribute: string) => string;
|
|
@@ -588,4 +772,4 @@ declare const TONE_ROLES: readonly [
|
|
|
588
772
|
type ToneRole = (typeof TONE_ROLES)[number];
|
|
589
773
|
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
590
774
|
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
591
|
-
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, fillLabel, fixedColumnPx, flatMapOutcome, formatByteSize, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
|
|
775
|
+
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 ContrastLevel, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, MORE_CONTRAST_MINIMUM, type MasterDetailOptions, type MasterDetailPlan, type Measure, type MeasureToken, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, type PaletteName, 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 TopmostModal, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatByteSize, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime, topmostModalOf };
|