@aiquants/console-ui 0.6.2 → 0.6.4
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 +8 -4
- package/dist/chunk-5TR7VUZM.js +1 -0
- package/dist/chunk-K7BETTSL.cjs +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +2 -1
- package/dist/core.d.ts +2 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/styles/console-ui.css +86 -0
- package/package.json +1 -1
- package/dist/chunk-5TCPOLTI.js +0 -1
- package/dist/chunk-WKYOVFUG.cjs +0 -1
package/README.md
CHANGED
|
@@ -32,7 +32,11 @@ The `/core` exports:
|
|
|
32
32
|
- 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`),
|
|
33
33
|
`instantSampleText(formatLocale, timeZone)` (the text an instant column is measured with) and `countSampleText(formatLocale, unit?)` (the text a count column or a tile's count is measured with).
|
|
34
34
|
- Figure formulas (see Figures): `spacedTextWidthEm(text, face)` (a line's width under the widest letter and word spacing WCAG 1.4.12 allows), `figureBoxPlan({ name, notes })` (the narrowest width and the height of a figure node's box, types `FigureBoxLines` and `FigureBoxPlan`), `figureDiscLabelPlan(label, radiusPx)` (the width of the name under a disc and its reach below the centre; for `null`, a disc drawn without a name, width 0 and the reach of its focus ring; type `FigureDiscLabelPlan`) and `FIGURE_RING_REACH_PX` (4: how far a node's focus ring reaches beyond the node).
|
|
35
|
-
- Formatting: `formatCount`, `toOffsetIso`, `toWallTime`, `formatInstant`, `ZonedTimeError`.
|
|
35
|
+
- Formatting: `formatCount`, `formatByteSize`, `toOffsetIso`, `toWallTime`, `formatInstant`, `ZonedTimeError`.
|
|
36
|
+
`formatCount(value, formatLocale)` writes a count with the grouping of the format locale (`9,999,999`).
|
|
37
|
+
`formatByteSize(size, formatLocale)` writes a byte size in a binary unit (B, KiB, MiB, GiB or TiB: powers of 1024 under their IEC names) chosen after rounding: the smallest unit whose rounded mantissa stays below 1024, or TiB, which has no upper bound.
|
|
38
|
+
B has no digits after the point, KiB and MiB one, GiB and TiB two, and the mantissa is grouped in the format locale (`1,023 B`, `1.0 MiB` for 1,048,575 bytes, `8,192.00 TiB` for the largest safe integer).
|
|
39
|
+
Both refuse a value that is not a non-negative safe integer and an invalid locale with a `RangeError`, and write `-0` as `0`.
|
|
36
40
|
- The text of a number field: `readDecimalText(text)` reads a decimal text (an optional sign, digits with an optional fraction or a fraction alone, an optional exponent, blanks around it; the full-width forms of ASCII read as half-width, as typed with a Japanese input method on) and returns `null` for anything else, an infinity or a value that underflows to zero, so an unreadable entry is reported instead of saved as another number; `-0` reads as `0`. `readIntegerText(text)` also returns `null` unless the value is a safe integer.
|
|
37
41
|
- Text with nothing to read: `isReadableText(text)` is `true` when the text holds at least one character outside Unicode's white space (`White_Space`), control (`Cc`) and format (`Cf`) characters and default-ignorable code points (`Default_Ignorable_Code_Point`): the empty string, and a text of only spaces, line breaks, U+3000, U+FEFF, U+200B, the separators U+001C–U+001F, U+0085, U+00AD, the Hangul fillers or variation selectors, is not readable.
|
|
38
42
|
It covers the white space of both JavaScript (`\s`) and Python (`\s`), so a record written in either language that reads as blank in it is not readable here either.
|
|
@@ -45,7 +49,7 @@ The `/core` exports:
|
|
|
45
49
|
- The command contract: the type `CommandOutcome<T, R>` (a command the host can refuse with a structured body, which the failure carries as `rejection`).
|
|
46
50
|
- The keyset paging machine: the types `KeysetPage<T, C, M>` / `NextPage<T, C>` / `PagedValue<T, C, M>` / `PagedState<T, C, M>` / `PageFailure` / `PagedContent<T, M>`, `beginPagedReload`, `settleFirstPage`, `beginPage`, `settlePage` and `mapPagedList`.
|
|
47
51
|
|
|
48
|
-
`@aiquants/console-ui` and `@aiquants/console-ui/core` share one module instance of the core code: the build emits the code several entries reach as a shared chunk per format (ESM / CommonJS), so a host that imports both paths in the same module format gets one copy of every core export and of any module state behind it (for example the `Intl.NumberFormat` cache
|
|
52
|
+
`@aiquants/console-ui` and `@aiquants/console-ui/core` share one module instance of the core code: the build emits the code several entries reach as a shared chunk per format (ESM / CommonJS), so a host that imports both paths in the same module format gets one copy of every core export and of any module state behind it (for example the `Intl.NumberFormat` cache `formatCount` and `formatByteSize` share).
|
|
49
53
|
|
|
50
54
|
## Usage
|
|
51
55
|
|
|
@@ -364,7 +368,7 @@ Draw any other overlay as a non-modal `<dialog>` (opened with `show()`) or a pop
|
|
|
364
368
|
| `Meter` | A value at its place in a fixed range (a score in [0, 1], a share of a quota), not progress: `role="meter"` named by `label` (no visible label; the row or field around it says what it measures), its fill in `info-accent` on a `sunken` track as long as the value's place in the range, beside the value text in `fg` (hidden from assistive technology, which reads it once as the meter's `aria-valuetext`). It is phrasing content that fits one `body` line, so it can be a line of a `RowButton`: it takes its parent's whole width even where the parent aligns its lines to the start (a `RowButton`), and the 8 px track is centred on the value text's 20 px line and takes the width left after the text, never less than 48 px. Refuses a range that is not finite or whose `min` is not below `max`, and a value outside the range. |
|
|
365
369
|
| `MasterDetail` | Master–detail layout by container width; side by side, neither pane goes below its minimum. |
|
|
366
370
|
| `Heading` | A page or region heading outside a `Card`: `h1` to `h3` in a heading step (`title`, `heading`, `display`, `display-lg`), bold, without margins; with `headingRef` a programmatic focus target (`tabIndex={-1}`) for the focus a host moves after a navigation. |
|
|
367
|
-
| `Tabs` | The tab row of a console whose tabs are routes: a named `nav` of real links (not an ARIA `tablist`), the current one `aria-current="page"` with an `info-accent` marker and the medium weight. A plain click hands the tab's `href` to `onNavigate` (the host's router); a click with a modifier key or another button keeps the link's own behaviour. |
|
|
371
|
+
| `Tabs` | The tab row of a console whose tabs are routes: a named `nav` of real links (not an ARIA `tablist`), the current one `aria-current="page"` with an `info-accent` marker and the medium weight. A plain click hands the tab's `href` to `onNavigate` (the host's router); a click with a modifier key or another button keeps the link's own behaviour. With `collapsible`, a container narrower than 48rem (an inline-size container query on the tab row's own width) folds the links into a full-width 44 px button naming the current tab and a popup of every tab below it (opened on press, closed on choosing a tab, Escape or a press outside); a wider container is the ordinary wrapping row, so a caller that does not set it is unchanged. |
|
|
368
372
|
| `Breadcrumb` | The trail to the current page: a `nav` named by the UI language's `breadcrumb` label around an ordered list of the ancestors' links (drawn like `Link`) and the current page's name as `aria-current="page"` text; separators are hidden from assistive technology. Clicks as `Tabs`. |
|
|
369
373
|
| `Toolbar` | `role="toolbar"` with a roving tabindex over its buttons (see Focus and announcements), laid out like a `Cluster` with an 8 px gap. |
|
|
370
374
|
| `Dialog` | A modal `<dialog>` named by its title, with its close button and its own live region (see Focus and announcements); at most 40 ideographs plus its padding wide (WCAG 1.4.8), never wider than the viewport less 24 px on each side. `description` (a confirmation's sentence) is drawn under the header as a paragraph with the reading measure and is the dialog's `aria-describedby`, so it is read with the dialog's name when the dialog opens; without it the dialog has no description. |
|
|
@@ -387,7 +391,7 @@ The test ids a component derives from its `testId` are public test hooks:
|
|
|
387
391
|
| --- | --- |
|
|
388
392
|
| `ConsoleUiRoot` | `<testId>-announcer` (the live region) |
|
|
389
393
|
| `Card`, `CardSection` | `<testId>-heading` (the title: a card's `h2`, a section's `h3` or `h4`) |
|
|
390
|
-
| `Tabs` | `<testId>-<id>` (each tab's link) |
|
|
394
|
+
| `Tabs` | `<testId>-<id>` (each tab's link), `<testId>-summary` (the collapsed button, with `collapsible`) |
|
|
391
395
|
| `Breadcrumb` | `<testId>-<id>` (each ancestor's link), `<testId>-current` (the current page's name) |
|
|
392
396
|
| `Dialog` | `<testId>-close` (the close button), `<testId>-announcer` (the dialog's live region), `<testId>-description` (the `description` paragraph) |
|
|
393
397
|
| `Figure` | `<testId>-frame` (the scroll frame of a `group` figure, the anonymous container of a `decorative` one; `testId` itself is on the `<svg>`), `<testId>-arrow-normal`, `<testId>-arrow-high` (the arrowheads) |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Pe=[{name:"B",power:0,fractionDigits:0},{name:"KiB",power:1,fractionDigits:1},{name:"MiB",power:2,fractionDigits:1},{name:"GiB",power:3,fractionDigits:2},{name:"TiB",power:4,fractionDigits:2}],j=new Map,K=e=>Number.isSafeInteger(e)&&e>=0,V=(e,n,t)=>{let r=`${t} ${n}`,o=j.get(r);return o===void 0&&(o=new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:!0}),j.set(r,o)),o.format(e===0?0:e)},w=(e,n)=>{if(!K(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return V(e,n,0)},Y=(e,n)=>Number((e/1024**n.power).toFixed(n.fractionDigits)),_e=(e,n)=>{if(!K(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[t,...r]=Pe,o=t,i=Y(e,o);for(let d of r){if(i<1024)break;o=d,i=Y(e,o)}return`${V(i,n,o.fractionDigits)} ${o.name}`},J=(e,n)=>n===void 0?e:`${e} ${n}`;var we=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Oe=/[!-~]/g;var Ie=/^[^eE]*[1-9]/,q=e=>{let n=e.replace(Oe,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!we.test(n))return null;let t=Number(n);return Number.isFinite(t)?t===0?Ie.test(n)?null:0:t:null},Ne=e=>{let n=q(e);return n!==null&&Number.isSafeInteger(n)?n:null};var Me=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f=e=>Me.test(e);var l=class extends RangeError{reason;constructor(n,t){super(t),this.name="ZonedTimeError",this.reason=n}},Le=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Fe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,$e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Z=864e5,I=6e4,E={min:1,max:9999},Q=new Map,ee=new Map,Ae=e=>{let n=Q.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Q.set(e,n)),n},ne=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},N=(e,n)=>{let[t,r,o,i,d,s,R]=n;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let p={year:Number(t),month:Number(r),day:Number(o),hour:Number(i),minute:Number(d),second:s===void 0?0:Number(s)},X=p.year>=E.min?ne(p):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:p,millis:X}},M=(e,n)=>{let t=new Map(Ae(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(t.get("year")),month:Number(t.get("month")),day:Number(t.get("day")),hour:Number(t.get("hour")),minute:Number(t.get("minute")),second:Number(t.get("second"))};if(t.get("era")!=="AD"||r.year>E.max)throw new l("malformed",`The wall clock falls outside years ${E.min}-${E.max}: ${new Date(e).toISOString()}`);return r},O=(e,n)=>ne(M(e,n))-e,g=e=>String(e).padStart(2,"0"),te=(e,n)=>{let t=`${String(e.year).padStart(4,"0")}-${g(e.month)}-${g(e.day)}T${g(e.hour)}:${g(e.minute)}`;return n||e.second!==0?`${t}:${g(e.second)}`:t},De=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${g(Math.floor(n/60))}:${g(n%60)}`},Ue=(e,n)=>{let t=Le.exec(e);if(t===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,t.slice(1)),d=[...new Set([O(o-Z,n),O(o+Z,n)])].filter(s=>O(o-s,n)===s);if(d.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(d.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${te(r,!0)}${De(d[0])}`},re=(e,n)=>{let[t,r,o,i]=n;if(t!==void 0)return 0;if(Number(o)>23||Number(i)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(i))*I},ve=(e,n)=>{let t=Fe.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,t.slice(1,8));return te(M(r-re(e,t.slice(8)),n),!1)},Be=(e,n)=>{let t=JSON.stringify([e,n]),r=ee.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),ee.set(t,r)),r},L=(e,n,t)=>{let r=$e.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),i=o-re(e,r.slice(7));return M(i,t),Be(n,t).format(i)};function He(e,n){return e.replace(/\{(\w+)\}/g,(t,r)=>Object.hasOwn(n,r)?String(n[r]):t)}var oe=403,We=(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,ze=(e,n)=>e.ok?n(e.value):e,Kn={kind:"idle"},Ge={kind:"loading"},F=(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Ge,$=(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,ae=e=>(n,t,r)=>n.status===403?e(t,n.reason):r(n.reason),ie=(e,n)=>n===""?e:`${e} Reason: ${n}.`,se=(e,n)=>n===""?e:`${e}${n}\u3002`,C={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ie,failureSentence:ae(ie),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:se,failureSentence:ae(se),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"}},Xe=e=>{if(!Object.hasOwn(C,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(C).join(", ")}`);return C[e]};var je=4,Ye=[1,2,3,4,6,8,12,16,24],Ke=16,Ve=5/4,D={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Je=11,le=3/2,qe=7/4,Ze=7/4,Qe=120,en=3/2,nn=[1,2,3],de=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},U=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Je,Math.round(Ke*Ve**e))},v=(e,n)=>de(e*n),ce=v(U(D.body),le),b=ce+24,ue=b+8,me=ce+8,A={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}},tn=()=>Object.fromEntries(Ye.map(e=>[`space-${e}`,e*4])),rn=()=>{let e=Object.fromEntries(Object.entries(D).map(([t,r])=>{let o=U(r);return[t,{size:o,lineHeight:v(o,t==="title"?Ze:le)}]})),n=U(D.body);return{...e,prose:{size:n,lineHeight:v(n,qe)}}},on=()=>Object.fromEntries(nn.map(e=>[`motion-${e}`,Qe*en**(e-1)])),fe=e=>Object.freeze({space:Object.freeze(tn()),type:Object.freeze(rn()),weight:A.weight,radius:A.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":ue,"size-row-compact":me}),stroke:A.stroke,motion:Object.freeze(on()),color:Object.freeze({...e})});var an={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=fe(an),sn="--cui-",ln=e=>`var(${sn}${e})`;var dn=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ge=(e,n)=>{let t=0,r=0;for(let o of e)dn(o.codePointAt(0))?r+=1:t+=1;return t*1+r*n},h=e=>ge(e,.55),x=e=>ge(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 pe="caption",W="body",z=2*a.space["space-3"],ye={type:"caption",paddingInlinePx:2*a.space["space-2"]},B={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},Te={type:"body",minInlinePx:a.size["size-target"]},S={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"]},cn=10,un="2000-01-01T00:00:00Z",mn=9999999,be=(e,n,t)=>(n==="mono"?x(e):h(e))*a.type[t].size,fn=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let t of e)if(!f(t))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(t)}`);return e},c=(e,n,t,r)=>Math.max(...fn(e,n).map(o=>be(o,t,r))),G=e=>{switch(e.kind){case"text":return c(e.texts,"text",e.face,e.type);case"measured":return c(e.texts,"measured value","sans",W);case"pill":return c(e.labels,"pill","sans",ye.type)+ye.paddingInlinePx;case"button":return Math.max(B.minInlinePx,c(e.labels,"button","sans",B.type)+B.paddingInlinePx);case"link":return Math.max(Te.minInlinePx,c(e.labels,"link","sans",Te.type));case"switch":return e.labelHidden?S.trackInlinePx:S.trackInlinePx+S.labelGapPx+c(e.labels,"switch","sans",S.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((n,t)=>n+G(t),0)+(e.items.length-1)*a.space[e.gap]}}},gn=(e,n)=>{let t=c([e.header],"column header","sans",pe),r=e.note===void 0?0:c(e.note,"column header note","sans",pe);return u(Math.max(t,r,...n.map(G))+z)},pn=u(be("\u3042".repeat(cn),"sans",W)+z),yn=e=>u(c(e,"comparison attribute","sans",W)+z),Tn=(e,n)=>L(un,e,n),bn=(e,n)=>{if(n!==void 0&&!f(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return J(w(mn,e),n)},hn=(e,n)=>u(Math.max(c(e,"tile caption","sans",H.captionType),c(n,"tile value","sans",H.valueType))+H.paddingInlinePx);var xn=.12,kn=.16,Rn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],P=(e,n)=>{let t=0,r=0;for(let i of e)t+=1,Rn.test(i)&&(r+=1);return(n==="mono"?x(e):h(e))+xn*t+kn*r},En=e=>{for(let t of[e.name,...e.notes])if(!f(t))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(t)}`);let n=Math.max(P(e.name,"sans")*a.type.body.size,...e.notes.map(t=>P(t,"sans")*a.type.caption.size));return{minWidthPx:u(n)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},ct=e=>{let n=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(t,r)=>n+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},Cn=(e,n)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+he}:{widthPx:u(P(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},he=a.stroke["focus-offset"]+a.stroke["focus-width"],ut=a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,Sn=(e,n)=>{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(n)&&n>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${n}`);return e/_**n};var Pn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m=e=>`${Pn(e)/16}rem`;var xe=({masterMinPx:e,detailMinPx:n,gapPx:t})=>{for(let r of[e,n])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Gap must be a px value >= 0: ${t}`);return e+t+n},_n=(e,n)=>{let t=xe(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<t)return{sideBySide:!1,sideBySideFromPx:t,masterInlinePx:e,detailInlinePx:e};let r=(e-n.gapPx)/(1+_),o=Math.min(Math.max(n.masterMinPx,r),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:t,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},Tt=e=>{let n=xe(e),t=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${t}"]`,o=m(e.gapPx),i=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,d=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,s=`@container (min-width:${m(n)}){${r}{grid-template-columns:${d} minmax(0,1fr)}}`;return{key:t,css:i+s}};var wn=2*a.space["space-1"],ke=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},Re=e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,t=null;for(let{width:r}of e){if(r.fixedPx!==void 0){n+=ke(r.fixedPx);continue}let o=ke(r.minPx);if(t!==null&&t!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${t} and ${o}`);t=o,n+=o}return n},On=e=>Re(e)+wn;var In=(e,n,t)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${t}`);let r=[];for(let s=1;s<=e;s+=1)e%s===0&&r.push({columns:s,minContainerPx:s*n+(s-1)*t});let o=`cui-tiles-n${e}-m${n}-g${t}`,i=`[data-cui-tile-grid="${o}"]`,d=r.map(({columns:s,minContainerPx:R})=>{let p=`${i}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?p:`@container (min-width:${m(R)}){${p}}`});return{key:o,steps:r,css:d.join("")}};var Nn=(e,n)=>{let t=F(e,n);return t.kind==="ready"?{...t,value:{...t.value,loadingMore:!1}}:t},Mn=(e,n)=>$(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),Ln=e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Fn=(e,n,t)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(t.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...t.value.rows],next:t.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:t.reason,occurrence:r}}}},$n=(e,n)=>{if(e.kind!=="ready")return e;let{rows:t,meta:r}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:t,meta:r}}};var An=/^#[0-9a-f]{6}$/i,Dn=/^[a-z][a-z0-9-]*$/,Ee=e=>{if(!An.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},Ce=({light:e,dark:n})=>`light-dark(${Ee(e)}, ${Ee(n)})`,Un=e=>{if(!Dn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${Ce(a.color["fg-muted"])}; opacity: 1; }`};var Se=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],vn=["fg","tint","accent","line","solid","solid-hover"],Bn={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:n})=>Object.freeze({light:e,dark:n}),Hn=({fg:e,tint:n,accent:t})=>Object.freeze({fg:y(e),tint:y(n),accent:y(t),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:n.dark,dark:n.light})}),Wn=Object.freeze(Object.fromEntries(Se.map(e=>[e,Hn(Bn[e])])));export{w as a,_e as b,J as c,q as d,Ne as e,f,l as g,Ue as h,ve as i,L as j,He as k,oe as l,We as m,ze as n,Kn as o,Ge as p,F as q,$ as r,T as s,C as t,Xe as u,je as v,de as w,b as x,ue as y,me as z,a as A,ln as B,h as C,x as D,u as E,G as F,gn as G,pn as H,yn as I,Tn as J,bn as K,hn as L,P as M,En as N,ct as O,Cn as P,he as Q,ut as R,Sn as S,m as T,_n as U,Tt as V,Re as W,On as X,In as Y,Nn as Z,Mn as _,Ln as $,Fn as aa,$n as ba,Ce as ca,Un as da,Se as ea,vn as fa,Wn as ga};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var Pe=[{name:"B",power:0,fractionDigits:0},{name:"KiB",power:1,fractionDigits:1},{name:"MiB",power:2,fractionDigits:1},{name:"GiB",power:3,fractionDigits:2},{name:"TiB",power:4,fractionDigits:2}],j=new Map,K=e=>Number.isSafeInteger(e)&&e>=0,V=(e,n,t)=>{let r=`${t} ${n}`,o=j.get(r);return o===void 0&&(o=new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:!0}),j.set(r,o)),o.format(e===0?0:e)},w= exports.a =(e,n)=>{if(!K(e))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);return V(e,n,0)},Y=(e,n)=>Number((e/1024**n.power).toFixed(n.fractionDigits)),_e= exports.b =(e,n)=>{if(!K(e))throw new RangeError(`A byte size must be a non-negative safe integer: ${e}`);let[t,...r]=Pe,o=t,i=Y(e,o);for(let d of r){if(i<1024)break;o=d,i=Y(e,o)}return`${V(i,n,o.fractionDigits)} ${o.name}`},J= exports.c =(e,n)=>n===void 0?e:`${e} ${n}`;var we=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Oe=/[!-~]/g;var Ie=/^[^eE]*[1-9]/,q= exports.d =e=>{let n=e.replace(Oe,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!we.test(n))return null;let t=Number(n);return Number.isFinite(t)?t===0?Ie.test(n)?null:0:t:null},Ne= exports.e =e=>{let n=q(e);return n!==null&&Number.isSafeInteger(n)?n:null};var Me=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,f= exports.f =e=>Me.test(e);var l=class extends RangeError{constructor(n,t){super(t),this.name="ZonedTimeError",this.reason=n}},Le=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,Fe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,$e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,Z=864e5,I=6e4,E={min:1,max:9999},Q=new Map,ee=new Map,Ae=e=>{let n=Q.get(e);return n===void 0&&(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Q.set(e,n)),n},ne=e=>{let n=new Date(0);return n.setUTCFullYear(e.year,e.month-1,e.day),n.setUTCHours(e.hour,e.minute,e.second,0),n.getUTCFullYear()===e.year&&n.getUTCMonth()===e.month-1&&n.getUTCDate()===e.day&&n.getUTCHours()===e.hour&&n.getUTCMinutes()===e.minute&&n.getUTCSeconds()===e.second?n.getTime():null},N=(e,n)=>{let[t,r,o,i,d,s,R]=n;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let p={year:Number(t),month:Number(r),day:Number(o),hour:Number(i),minute:Number(d),second:s===void 0?0:Number(s)},X=p.year>=E.min?ne(p):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:p,millis:X}},M=(e,n)=>{let t=new Map(Ae(n).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(t.get("year")),month:Number(t.get("month")),day:Number(t.get("day")),hour:Number(t.get("hour")),minute:Number(t.get("minute")),second:Number(t.get("second"))};if(t.get("era")!=="AD"||r.year>E.max)throw new l("malformed",`The wall clock falls outside years ${E.min}-${E.max}: ${new Date(e).toISOString()}`);return r},O=(e,n)=>ne(M(e,n))-e,g=e=>String(e).padStart(2,"0"),te=(e,n)=>{let t=`${String(e.year).padStart(4,"0")}-${g(e.month)}-${g(e.day)}T${g(e.hour)}:${g(e.minute)}`;return n||e.second!==0?`${t}:${g(e.second)}`:t},De=e=>{if(e%I!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let n=Math.abs(e)/I;return`${e<0?"-":"+"}${g(Math.floor(n/60))}:${g(n%60)}`},Ue= exports.h =(e,n)=>{let t=Le.exec(e);if(t===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=N(e,t.slice(1)),d=[...new Set([O(o-Z,n),O(o+Z,n)])].filter(s=>O(o-s,n)===s);if(d.length===0)throw new l("nonexistent",`${e} does not exist in ${n}`);if(d.length>1)throw new l("ambiguous",`${e} occurs twice in ${n}`);return`${te(r,!0)}${De(d[0])}`},re=(e,n)=>{let[t,r,o,i]=n;if(t!==void 0)return 0;if(Number(o)>23||Number(i)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(i))*I},ve= exports.i =(e,n)=>{let t=Fe.exec(e);if(t===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=N(e,t.slice(1,8));return te(M(r-re(e,t.slice(8)),n),!1)},Be=(e,n)=>{let t=JSON.stringify([e,n]),r=ee.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),ee.set(t,r)),r},L= exports.j =(e,n,t)=>{let r=$e.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=N(e,[...r.slice(1,7),void 0]),i=o-re(e,r.slice(7));return M(i,t),Be(n,t).format(i)};function He(e,n){return e.replace(/\{(\w+)\}/g,(t,r)=>Object.hasOwn(n,r)?String(n[r]):t)}var oe=403,We= exports.m =(e,n)=>e.ok?{ok:!0,value:n(e.value)}:e,ze= exports.n =(e,n)=>e.ok?n(e.value):e,Kn= exports.o ={kind:"idle"},Ge= exports.p ={kind:"loading"},F= exports.q =(e,n)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?n==="reload"?{...e,retrying:!0}:e:Ge,$= exports.r =(e,n)=>n.ok?{kind:"ready",value:n.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&n.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:n.status,reason:n.reason}}:{kind:"failed",status:n.status,reason:n.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,ae=e=>(n,t,r)=>n.status===403?e(t,n.reason):r(n.reason),ie=(e,n)=>n===""?e:`${e} Reason: ${n}.`,se=(e,n)=>n===""?e:`${e}${n}\u3002`,C= exports.t ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ie,failureSentence:ae(ie),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:se,failureSentence:ae(se),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"}},Xe= exports.u =e=>{if(!Object.hasOwn(C,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(C).join(", ")}`);return C[e]};var je=4,Ye=[1,2,3,4,6,8,12,16,24],Ke=16,Ve=5/4,D={caption:-2,body:-1,"body-lg":0,title:0,heading:1,display:2,"display-lg":3},Je=11,le=3/2,qe=7/4,Ze=7/4,Qe=120,en=3/2,nn=[1,2,3],de= exports.w =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},U=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Je,Math.round(Ke*Ve**e))},v=(e,n)=>de(e*n),ce=v(U(D.body),le),b= exports.x =ce+24,ue= exports.y =b+8,me= exports.z =ce+8,A={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}},tn=()=>Object.fromEntries(Ye.map(e=>[`space-${e}`,e*4])),rn=()=>{let e=Object.fromEntries(Object.entries(D).map(([t,r])=>{let o=U(r);return[t,{size:o,lineHeight:v(o,t==="title"?Ze:le)}]})),n=U(D.body);return{...e,prose:{size:n,lineHeight:v(n,qe)}}},on=()=>Object.fromEntries(nn.map(e=>[`motion-${e}`,Qe*en**(e-1)])),fe=e=>Object.freeze({space:Object.freeze(tn()),type:Object.freeze(rn()),weight:A.weight,radius:A.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":ue,"size-row-compact":me}),stroke:A.stroke,motion:Object.freeze(on()),color:Object.freeze({...e})});var an={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.A =fe(an),sn="--cui-",ln= exports.B =e=>`var(${sn}${e})`;var dn=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ge=(e,n)=>{let t=0,r=0;for(let o of e)dn(o.codePointAt(0))?r+=1:t+=1;return t*1+r*n},h= exports.C =e=>ge(e,.55),x= exports.D =e=>ge(e,.6),u= exports.E =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 pe="caption",W="body",z=2*a.space["space-3"],ye={type:"caption",paddingInlinePx:2*a.space["space-2"]},B={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},Te={type:"body",minInlinePx:a.size["size-target"]},S={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"]},cn=10,un="2000-01-01T00:00:00Z",mn=9999999,be=(e,n,t)=>(n==="mono"?x(e):h(e))*a.type[t].size,fn=(e,n)=>{if(e.length===0)throw new RangeError(`A ${n} needs at least one text to be measured with`);for(let t of e)if(!f(t))throw new RangeError(`A ${n} sample must hold a readable character: ${JSON.stringify(t)}`);return e},c=(e,n,t,r)=>Math.max(...fn(e,n).map(o=>be(o,t,r))),G= exports.F =e=>{switch(e.kind){case"text":return c(e.texts,"text",e.face,e.type);case"measured":return c(e.texts,"measured value","sans",W);case"pill":return c(e.labels,"pill","sans",ye.type)+ye.paddingInlinePx;case"button":return Math.max(B.minInlinePx,c(e.labels,"button","sans",B.type)+B.paddingInlinePx);case"link":return Math.max(Te.minInlinePx,c(e.labels,"link","sans",Te.type));case"switch":return e.labelHidden?S.trackInlinePx:S.trackInlinePx+S.labelGapPx+c(e.labels,"switch","sans",S.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((n,t)=>n+G(t),0)+(e.items.length-1)*a.space[e.gap]}}},gn= exports.G =(e,n)=>{let t=c([e.header],"column header","sans",pe),r=e.note===void 0?0:c(e.note,"column header note","sans",pe);return u(Math.max(t,r,...n.map(G))+z)},pn= exports.H =u(be("\u3042".repeat(cn),"sans",W)+z),yn= exports.I =e=>u(c(e,"comparison attribute","sans",W)+z),Tn= exports.J =(e,n)=>L(un,e,n),bn= exports.K =(e,n)=>{if(n!==void 0&&!f(n))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(n)}`);return J(w(mn,e),n)},hn= exports.L =(e,n)=>u(Math.max(c(e,"tile caption","sans",H.captionType),c(n,"tile value","sans",H.valueType))+H.paddingInlinePx);var xn=.12,kn=.16,Rn=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],P= exports.M =(e,n)=>{let t=0,r=0;for(let i of e)t+=1,Rn.test(i)&&(r+=1);return(n==="mono"?x(e):h(e))+xn*t+kn*r},En= exports.N =e=>{for(let t of[e.name,...e.notes])if(!f(t))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(t)}`);let n=Math.max(P(e.name,"sans")*a.type.body.size,...e.notes.map(t=>P(t,"sans")*a.type.caption.size));return{minWidthPx:u(n)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},ct= exports.O =e=>{let n=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(t,r)=>n+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},Cn= exports.P =(e,n)=>{if(e!==null&&!f(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${n}`);return e===null?{widthPx:0,extentBelowPx:n+he}:{widthPx:u(P(e,"sans")*a.type.caption.size),extentBelowPx:n+a.space["space-1"]+a.type.caption.lineHeight}},he= exports.Q =a.stroke["focus-offset"]+a.stroke["focus-width"],ut= exports.R =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var _=(1+Math.sqrt(5))/2,Sn= exports.S =(e,n)=>{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(n)&&n>=0))throw new RangeError(`A golden section step must be an integer at or above 0: ${n}`);return e/_**n};var Pn=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},m= exports.T =e=>`${Pn(e)/16}rem`;var xe=({masterMinPx:e,detailMinPx:n,gapPx:t})=>{for(let r of[e,n])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Gap must be a px value >= 0: ${t}`);return e+t+n},_n= exports.U =(e,n)=>{let t=xe(n);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<t)return{sideBySide:!1,sideBySideFromPx:t,masterInlinePx:e,detailInlinePx:e};let r=(e-n.gapPx)/(1+_),o=Math.min(Math.max(n.masterMinPx,r),e-n.gapPx-n.detailMinPx);return{sideBySide:!0,sideBySideFromPx:t,masterInlinePx:o,detailInlinePx:e-n.gapPx-o}},Tt= exports.V =e=>{let n=xe(e),t=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${t}"]`,o=m(e.gapPx),i=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,d=`clamp(${m(e.masterMinPx)},calc((100% - ${o}) / ${1+_}),calc(100% - ${o} - ${m(e.detailMinPx)}))`,s=`@container (min-width:${m(n)}){${r}{grid-template-columns:${d} minmax(0,1fr)}}`;return{key:t,css:i+s}};var wn=2*a.space["space-1"],ke=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},Re= exports.W =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let n=0,t=null;for(let{width:r}of e){if(r.fixedPx!==void 0){n+=ke(r.fixedPx);continue}let o=ke(r.minPx);if(t!==null&&t!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${t} and ${o}`);t=o,n+=o}return n},On= exports.X =e=>Re(e)+wn;var In=(e,n,t)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(n)&&n>0))throw new RangeError(`Tile minimum width must be a positive px value: ${n}`);if(!(Number.isFinite(t)&&t>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${t}`);let r=[];for(let s=1;s<=e;s+=1)e%s===0&&r.push({columns:s,minContainerPx:s*n+(s-1)*t});let o=`cui-tiles-n${e}-m${n}-g${t}`,i=`[data-cui-tile-grid="${o}"]`,d=r.map(({columns:s,minContainerPx:R})=>{let p=`${i}{grid-template-columns:repeat(${s},minmax(0,1fr))}`;return s===1?p:`@container (min-width:${m(R)}){${p}}`});return{key:o,steps:r,css:d.join("")}};var Nn=(e,n)=>{let t=F(e,n);return t.kind==="ready"?{...t,value:{...t.value,loadingMore:!1}}:t},Mn= exports._ =(e,n)=>$(e,n.ok?{ok:!0,value:{rows:n.value.rows,next:n.value.next,meta:n.value.meta,loadingMore:!1,moreFailure:null}}:n),Ln= exports.$ =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,Fn= exports.aa =(e,n,t)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,n)))return e;if(t.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...t.value.rows],next:t.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:t.reason,occurrence:r}}}},$n= exports.ba =(e,n)=>{if(e.kind!=="ready")return e;let{rows:t,meta:r}=n({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:t,meta:r}}};var An=/^#[0-9a-f]{6}$/i,Dn=/^[a-z][a-z0-9-]*$/,Ee=e=>{if(!An.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},Ce= exports.ca =({light:e,dark:n})=>`light-dark(${Ee(e)}, ${Ee(n)})`,Un= exports.da =e=>{if(!Dn.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${Ce(a.color["fg-muted"])}; opacity: 1; }`};var Se=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],vn= exports.fa =["fg","tint","accent","line","solid","solid-hover"],Bn={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:n})=>Object.freeze({light:e,dark:n}),Hn=({fg:e,tint:n,accent:t})=>Object.freeze({fg:y(e),tint:y(n),accent:y(t),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:n.dark,dark:n.light})}),Wn= exports.ga =Object.freeze(Object.fromEntries(Se.map(e=>[e,Hn(Bn[e])])));exports.a = w; exports.b = _e; exports.c = J; exports.d = q; exports.e = Ne; exports.f = f; exports.g = l; exports.h = Ue; exports.i = ve; exports.j = L; exports.k = He; exports.l = oe; exports.m = We; exports.n = ze; exports.o = Kn; exports.p = Ge; exports.q = F; exports.r = $; exports.s = T; exports.t = C; exports.u = Xe; exports.v = je; exports.w = de; exports.x = b; exports.y = ue; exports.z = me; exports.A = a; exports.B = ln; exports.C = h; exports.D = x; exports.E = u; exports.F = G; exports.G = gn; exports.H = pn; exports.I = yn; exports.J = Tn; exports.K = bn; exports.L = hn; exports.M = P; exports.N = En; exports.O = ct; exports.P = Cn; exports.Q = he; exports.R = ut; exports.S = Sn; exports.T = m; exports.U = _n; exports.V = Tt; exports.W = Re; exports.X = On; exports.Y = In; exports.Z = Nn; exports._ = Mn; exports.$ = Ln; exports.aa = Fn; exports.ba = $n; exports.ca = Ce; exports.da = Un; exports.ea = Se; exports.fa = vn; exports.ga = Wn;
|
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 _chunkK7BETTSLcjs = require('./chunk-K7BETTSL.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunkK7BETTSLcjs.z; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkK7BETTSLcjs.t; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunkK7BETTSLcjs.Q; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkK7BETTSLcjs.H; exports.HTTP_FORBIDDEN = _chunkK7BETTSLcjs.l; exports.LATTICE_PX = _chunkK7BETTSLcjs.v; exports.ROW_WITH_CONTROL_PX = _chunkK7BETTSLcjs.y; exports.TARGET_PX = _chunkK7BETTSLcjs.x; exports.TOKENS = _chunkK7BETTSLcjs.A; exports.TONES = _chunkK7BETTSLcjs.ga; exports.TONE_HUES = _chunkK7BETTSLcjs.ea; exports.TONE_ROLES = _chunkK7BETTSLcjs.fa; exports.ZonedTimeError = _chunkK7BETTSLcjs.g; exports.beginPage = _chunkK7BETTSLcjs.$; exports.beginPagedReload = _chunkK7BETTSLcjs.Z; exports.beginReload = _chunkK7BETTSLcjs.q; exports.ceil8 = _chunkK7BETTSLcjs.E; exports.ceilToLattice = _chunkK7BETTSLcjs.w; exports.cellContentInlinePx = _chunkK7BETTSLcjs.F; exports.comparisonAttributePx = _chunkK7BETTSLcjs.I; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkK7BETTSLcjs.K; exports.cssVar = _chunkK7BETTSLcjs.B; exports.figureBoxPlan = _chunkK7BETTSLcjs.N; exports.figureDiscLabelPlan = _chunkK7BETTSLcjs.P; exports.fillLabel = _chunkK7BETTSLcjs.k; exports.fixedColumnPx = _chunkK7BETTSLcjs.G; exports.flatMapOutcome = _chunkK7BETTSLcjs.n; exports.formatByteSize = _chunkK7BETTSLcjs.b; exports.formatCount = _chunkK7BETTSLcjs.a; exports.formatInstant = _chunkK7BETTSLcjs.j; exports.goldenSectionPx = _chunkK7BETTSLcjs.S; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkK7BETTSLcjs.J; exports.isReadableText = _chunkK7BETTSLcjs.f; exports.keepLastGood = _chunkK7BETTSLcjs.r; exports.lightDark = _chunkK7BETTSLcjs.ca; exports.mapOutcome = _chunkK7BETTSLcjs.m; exports.mapPagedList = _chunkK7BETTSLcjs.ba; exports.masterDetailPlan = _chunkK7BETTSLcjs.U; exports.monoTextWidthEm = _chunkK7BETTSLcjs.D; exports.placeholderRule = _chunkK7BETTSLcjs.da; exports.pxToRem = _chunkK7BETTSLcjs.T; exports.readDecimalText = _chunkK7BETTSLcjs.d; exports.readIntegerText = _chunkK7BETTSLcjs.e; exports.reasonAside = _chunkK7BETTSLcjs.s; exports.resolveConsoleUiLabels = _chunkK7BETTSLcjs.u; exports.settleFirstPage = _chunkK7BETTSLcjs._; exports.settlePage = _chunkK7BETTSLcjs.aa; exports.spacedTextWidthEm = _chunkK7BETTSLcjs.M; exports.tableFrameMinInlinePx = _chunkK7BETTSLcjs.X; exports.tableMinInlinePx = _chunkK7BETTSLcjs.W; exports.textWidthEm = _chunkK7BETTSLcjs.C; exports.tileGridPlan = _chunkK7BETTSLcjs.Y; exports.tileMinInlinePx = _chunkK7BETTSLcjs.L; exports.toOffsetIso = _chunkK7BETTSLcjs.h; exports.toWallTime = _chunkK7BETTSLcjs.i;
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const formatCount: (value: number, formatLocale: string) => string;
|
|
2
|
+
declare const formatByteSize: (size: number, formatLocale: string) => string;
|
|
2
3
|
declare const readDecimalText: (text: string) => number | null;
|
|
3
4
|
declare const readIntegerText: (text: string) => number | null;
|
|
4
5
|
declare const isReadableText: (text: string) => boolean;
|
|
@@ -587,4 +588,4 @@ declare const TONE_ROLES: readonly [
|
|
|
587
588
|
type ToneRole = (typeof TONE_ROLES)[number];
|
|
588
589
|
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
589
590
|
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
590
|
-
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, 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 };
|
|
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 };
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const formatCount: (value: number, formatLocale: string) => string;
|
|
2
|
+
declare const formatByteSize: (size: number, formatLocale: string) => string;
|
|
2
3
|
declare const readDecimalText: (text: string) => number | null;
|
|
3
4
|
declare const readIntegerText: (text: string) => number | null;
|
|
4
5
|
declare const isReadableText: (text: string) => boolean;
|
|
@@ -587,4 +588,4 @@ declare const TONE_ROLES: readonly [
|
|
|
587
588
|
type ToneRole = (typeof TONE_ROLES)[number];
|
|
588
589
|
type Tone = Readonly<Record<ToneRole, SchemeColor>>;
|
|
589
590
|
declare const TONES: Readonly<Record<ToneHue, Tone>>;
|
|
590
|
-
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, 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 };
|
|
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 };
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as V,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,M as J,
|
|
1
|
+
import{$ as V,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,M as J,N as K,P as L,Q as M,S as N,T as O,U as P,W as Q,X as R,Y as S,Z as T,_ as U,a,aa as W,b,ba as X,ca as aa,d as c,da as ba,e as d,ea as ca,f as e,fa as da,g as f,ga as ea,h as g,i as h,j as i,k as j,l as k,m as l,n as m,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-5TR7VUZM.js";import{a as Y,b as Z,c as _,d as $}from"./chunk-FXEGLGL7.js";export{w as COMPACT_ROW_PX,q as CONSOLE_UI_LABEL_CATALOGS,_ as CONTRAST_MINIMUM,$ as CONTRAST_PAIRS,M as FIGURE_RING_REACH_PX,E as FLEXIBLE_COLUMN_MIN_PX,k as HTTP_FORBIDDEN,s as LATTICE_PX,v as ROW_WITH_CONTROL_PX,u as TARGET_PX,x as TOKENS,ea as TONES,ca as TONE_HUES,da as TONE_ROLES,f as ZonedTimeError,V as beginPage,T as beginPagedReload,n as beginReload,B as ceil8,t as ceilToLattice,C as cellContentInlinePx,F as comparisonAttributePx,Z as contrastRatio,H as countSampleText,y as cssVar,K as figureBoxPlan,L as figureDiscLabelPlan,j as fillLabel,D as fixedColumnPx,m as flatMapOutcome,b as formatByteSize,a as formatCount,i as formatInstant,N as goldenSectionPx,Y as hexToSrgb,G as instantSampleText,e as isReadableText,o as keepLastGood,aa as lightDark,l as mapOutcome,X as mapPagedList,P as masterDetailPlan,A as monoTextWidthEm,ba as placeholderRule,O as pxToRem,c as readDecimalText,d as readIntegerText,p as reasonAside,r as resolveConsoleUiLabels,U as settleFirstPage,W as settlePage,J as spacedTextWidthEm,R as tableFrameMinInlinePx,Q as tableMinInlinePx,z as textWidthEm,S as tileGridPlan,I as tileMinInlinePx,g as toOffsetIso,h as toWallTime};
|