@aiquants/console-ui 0.4.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var G=new Map,_= exports.a =(e,t)=>{if(!(Number.isSafeInteger(e)&&e>=0))throw new RangeError(`A count must be a non-negative safe integer: ${e}`);let n=G.get(t);return n===void 0&&(n=new Intl.NumberFormat(t,{maximumFractionDigits:0,useGrouping:!0}),G.set(t,n)),n.format(e)},j= exports.b =(e,t)=>t===void 0?e:`${e} ${t}`;var Ce=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,Ee=/[!-~]/g;var Pe=/^[^eE]*[1-9]/,Y= exports.c =e=>{let t=e.replace(Ee,r=>String.fromCharCode(r.charCodeAt(0)-65248)).trim();if(!Ce.test(t))return null;let n=Number(t);return Number.isFinite(n)?n===0?Pe.test(t)?null:0:n:null},Se= exports.d =e=>{let t=Y(e);return t!==null&&Number.isSafeInteger(t)?t:null};var _e=/[^\p{White_Space}\p{Cc}\p{Cf}\p{Default_Ignorable_Code_Point}]/u,m= exports.e =e=>_e.test(e);var l=class extends RangeError{constructor(t,n){super(n),this.name="ZonedTimeError",this.reason=t}},Oe=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?$/,we=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:(Z)|([+-])(\d{2}):(\d{2}))$/,Ie=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d+)?)?(?:(Z)|([+-])(\d{2}):?(\d{2}))$/,K=864e5,w=6e4,C={min:1,max:9999},V=new Map,J=new Map,Ne=e=>{let t=V.get(e);return t===void 0&&(t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),V.set(e,t)),t},q=e=>{let t=new Date(0);return t.setUTCFullYear(e.year,e.month-1,e.day),t.setUTCHours(e.hour,e.minute,e.second,0),t.getUTCFullYear()===e.year&&t.getUTCMonth()===e.month-1&&t.getUTCDate()===e.day&&t.getUTCHours()===e.hour&&t.getUTCMinutes()===e.minute&&t.getUTCSeconds()===e.second?t.getTime():null},I=(e,t)=>{let[n,r,o,s,c,i,R]=t;if(R!==void 0&&/[1-9]/.test(R))throw new l("subsecond",`Fractions of a second cannot be kept: ${e}`);let g={year:Number(n),month:Number(r),day:Number(o),hour:Number(s),minute:Number(c),second:i===void 0?0:Number(i)},X=g.year>=C.min?q(g):null;if(X===null)throw new l("malformed",`Not a calendar date and time: ${e}`);return{fields:g,millis:X}},N=(e,t)=>{let n=new Map(Ne(t).formatToParts(new Date(e)).map(o=>[o.type,o.value])),r={year:Number(n.get("year")),month:Number(n.get("month")),day:Number(n.get("day")),hour:Number(n.get("hour")),minute:Number(n.get("minute")),second:Number(n.get("second"))};if(n.get("era")!=="AD"||r.year>C.max)throw new l("malformed",`The wall clock falls outside years ${C.min}-${C.max}: ${new Date(e).toISOString()}`);return r},O=(e,t)=>q(N(e,t))-e,f=e=>String(e).padStart(2,"0"),Z=(e,t)=>{let n=`${String(e.year).padStart(4,"0")}-${f(e.month)}-${f(e.day)}T${f(e.hour)}:${f(e.minute)}`;return t||e.second!==0?`${n}:${f(e.second)}`:n},Me=e=>{if(e%w!==0)throw new l("malformed",`The zone's offset is not a whole number of minutes: ${e} ms`);let t=Math.abs(e)/w;return`${e<0?"-":"+"}${f(Math.floor(t/60))}:${f(t%60)}`},Le= exports.g =(e,t)=>{let n=Oe.exec(e);if(n===null)throw new l("malformed",`Not a wall time (YYYY-MM-DDTHH:mm[:ss]): ${e}`);let{fields:r,millis:o}=I(e,n.slice(1)),c=[...new Set([O(o-K,t),O(o+K,t)])].filter(i=>O(o-i,t)===i);if(c.length===0)throw new l("nonexistent",`${e} does not exist in ${t}`);if(c.length>1)throw new l("ambiguous",`${e} occurs twice in ${t}`);return`${Z(r,!0)}${Me(c[0])}`},Q=(e,t)=>{let[n,r,o,s]=t;if(n!==void 0)return 0;if(Number(o)>23||Number(s)>59)throw new l("malformed",`Not a valid offset: ${e}`);return(r==="-"?-1:1)*(Number(o)*60+Number(s))*w},Fe= exports.h =(e,t)=>{let n=we.exec(e);if(n===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:r}=I(e,n.slice(1,8));return Z(N(r-Q(e,n.slice(8)),t),!1)},$e=(e,t)=>{let n=JSON.stringify([e,t]),r=J.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hourCycle:"h23"}),J.set(n,r)),r},M= exports.i =(e,t,n)=>{let r=Ie.exec(e);if(r===null)throw new l("malformed",`Not an ISO 8601 instant with an offset: ${e}`);let{millis:o}=I(e,[...r.slice(1,7),void 0]),s=o-Q(e,r.slice(7));return N(s,n),$e(t,n).format(s)};var ee=403,Ae= exports.k =(e,t)=>e.ok?{ok:!0,value:t(e.value)}:e,De= exports.l =(e,t)=>e.ok?t(e.value):e,Ut= exports.m ={kind:"idle"},ve= exports.n ={kind:"loading"},L= exports.o =(e,t)=>e.kind==="ready"?{...e,refreshing:!0}:e.kind==="failed"?t==="reload"?{...e,retrying:!0}:e:ve,F= exports.p =(e,t)=>t.ok?{kind:"ready",value:t.value,refreshing:!1,refreshFailure:null}:e.kind==="failed"&&e.status===403?e.retrying?{...e,retrying:!1}:e:e.kind==="ready"&&t.status!==403?{kind:"ready",value:e.value,refreshing:!1,refreshFailure:{status:t.status,reason:t.reason}}:{kind:"failed",status:t.status,reason:t.reason,occurrence:e.kind==="failed"?e.occurrence+1:1,retrying:!1};var T=e=>e===""?"":` (${e})`,te=e=>(t,n,r)=>t.status===403?e(n,t.reason):r(t.reason),ne=(e,t)=>t===""?e:`${e} Reason: ${t}.`,re=(e,t)=>t===""?e:`${e}${t}\u3002`,E= exports.r ={en:{unmeasured:"Not measured",loading:"Loading",loadFailed:e=>`Could not load${T(e)}.`,refreshFailed:e=>`Could not refresh${T(e)}.`,forbiddenBecause:ne,failureSentence:te(ne),loadMore:e=>`Show ${e} more`,endOfRecords:"No more records",close:"Close",cancel:"Cancel",reload:"Reload",breadcrumb:"Breadcrumb",stepDone:"Done",stepPending:"Not started"},ja:{unmeasured:"\u672A\u6E2C\u5B9A",loading:"\u8AAD\u307F\u8FBC\u307F\u4E2D",loadFailed:e=>`\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F${T(e)}\u3002`,refreshFailed:e=>`\u66F4\u65B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F${T(e)}\u3002`,forbiddenBecause:re,failureSentence:te(re),loadMore:e=>`\u3055\u3089\u306B ${e} \u4EF6\u3092\u8868\u793A`,endOfRecords:"\u3053\u308C\u4EE5\u4E0A\u306E\u8A18\u9332\u306F\u3042\u308A\u307E\u305B\u3093",close:"\u9589\u3058\u308B",cancel:"\u3084\u3081\u308B",reload:"\u518D\u8AAD\u307F\u8FBC\u307F",breadcrumb:"\u30D1\u30F3\u304F\u305A",stepDone:"\u5B8C\u4E86",stepPending:"\u672A\u7740\u624B"}},Ue= exports.s =e=>{if(!Object.hasOwn(E,e))throw new RangeError(`No console UI labels for locale "${e}"; supported: ${Object.keys(E).join(", ")}`);return E[e]};var He=4,We=[1,2,3,4,6,8,12,16,24],Be=16,ze=5/4,A={caption:-2,body:-1,title:0,heading:1,display:2,"display-lg":3},Xe=11,oe=3/2,Ge=7/4,je=7/4,Ye=120,Ke=3/2,Ve=[1,2,3],ae= exports.u =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`A length must be a finite number of px at or above 0: ${e}`);return Math.ceil(e/4)*4},D=e=>{if(!Number.isInteger(e))throw new RangeError(`A type step must be an integer: ${e}`);return Math.max(Xe,Math.round(Be*ze**e))},v=(e,t)=>ae(e*t),ie=v(D(A.body),oe),b= exports.v =ie+24,se= exports.w =b+8,le= exports.x =ie+8,$={weight:{regular:400,medium:500,bold:700},radius:{"radius-control":4,"radius-item":8,"radius-container":12,"radius-pill":9999},stroke:{"border-width":1,"focus-width":2,"focus-offset":2,"marker-width":2}},Je=()=>Object.fromEntries(We.map(e=>[`space-${e}`,e*4])),qe=()=>{let e=Object.fromEntries(Object.entries(A).map(([n,r])=>{let o=D(r);return[n,{size:o,lineHeight:v(o,n==="title"?je:oe)}]})),t=D(A.body);return{...e,prose:{size:t,lineHeight:v(t,Ge)}}},Ze=()=>Object.fromEntries(Ve.map(e=>[`motion-${e}`,Ye*Ke**(e-1)])),de=e=>Object.freeze({space:Object.freeze(Je()),type:Object.freeze(qe()),weight:$.weight,radius:$.radius,size:Object.freeze({"size-target":b,"size-control":b,"size-row":b,"size-row-control":se,"size-row-compact":le}),stroke:$.stroke,motion:Object.freeze(Ze()),color:Object.freeze({...e})});var Qe={fg:{light:"#0f172b",dark:"#f8fafc"},"fg-secondary":{light:"#314158",dark:"#e2e8f0"},"fg-muted":{light:"#44536a",dark:"#cad5e2"},"danger-fg":{light:"#9f0712",dark:"#ffc9c9"},"warning-fg":{light:"#7b3306",dark:"#fee685"},"success-fg":{light:"#006045",dark:"#a4f4cf"},"info-fg":{light:"#193cb8",dark:"#bedbff"},"on-solid":{light:"#ffffff",dark:"#0f172b"},surface:{light:"#ffffff",dark:"#0f172b"},subtle:{light:"#f8fafc",dark:"#1d293d"},sunken:{light:"#f1f5f9",dark:"#020618"},"danger-tint":{light:"#fef2f2",dark:"#460809"},"warning-tint":{light:"#fffbeb",dark:"#461901"},"success-tint":{light:"#ecfdf5",dark:"#002c22"},"info-tint":{light:"#eff6ff",dark:"#162456"},"neutral-solid":{light:"#314158",dark:"#cad5e2"},"danger-solid":{light:"#9f0712",dark:"#ffa2a2"},"success-solid":{light:"#006045",dark:"#5ee9b5"},"info-solid":{light:"#193cb8",dark:"#8ec5ff"},"warning-solid":{light:"#7b3306",dark:"#ffd230"},"danger-accent":{light:"#e7000b",dark:"#ff6467"},"warning-accent":{light:"#bb4d00",dark:"#fcbb00"},"success-accent":{light:"#009966",dark:"#00d492"},"info-accent":{light:"#155dfc",dark:"#51a2ff"},focus:{light:"#155dfc",dark:"#51a2ff"},"border-control":{light:"#62748e",dark:"#90a1b9"},"border-subtle":{light:"#e2e8f0",dark:"#314158"}},a= exports.y =de(Qe),et="--cui-",tt= exports.z =e=>`var(${et}${e})`;var nt=e=>e>=32&&e<=126||e>=65377&&e<=65500||e>=65512&&e<=65518,ce=(e,t)=>{let n=0,r=0;for(let o of e)nt(o.codePointAt(0))?r+=1:n+=1;return n*1+r*t},h= exports.A =e=>ce(e,.55),x= exports.B =e=>ce(e,.6),u= exports.C =e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return Math.max(0,Math.ceil((e-1e-9)/8))*8};var ue="caption",W="body",B=2*a.space["space-3"],me={type:"caption",paddingInlinePx:2*a.space["space-2"]},U={type:"body",paddingInlinePx:2*a.space["space-3"]+2*a.stroke["border-width"],minInlinePx:a.size["size-control"]},fe={type:"body",minInlinePx:a.size["size-target"]},P={trackInlinePx:2*a.type.body.lineHeight+3*a.space["space-1"],labelGapPx:a.space["space-2"],type:"body"},H={captionType:"caption",valueType:"heading",paddingInlinePx:2*a.space["space-3"]},rt=10,ot="2000-01-01T00:00:00Z",at=9999999,pe=(e,t,n)=>(t==="mono"?x(e):h(e))*a.type[n].size,it=(e,t)=>{if(e.length===0)throw new RangeError(`A ${t} needs at least one text to be measured with`);for(let n of e)if(!m(n))throw new RangeError(`A ${t} sample must hold a readable character: ${JSON.stringify(n)}`);return e},d=(e,t,n,r)=>Math.max(...it(e,t).map(o=>pe(o,n,r))),z= exports.D =e=>{switch(e.kind){case"text":return d(e.texts,"text",e.face,e.type);case"measured":return d(e.texts,"measured value","sans",W);case"pill":return d(e.labels,"pill","sans",me.type)+me.paddingInlinePx;case"button":return Math.max(U.minInlinePx,d(e.labels,"button","sans",U.type)+U.paddingInlinePx);case"link":return Math.max(fe.minInlinePx,d(e.labels,"link","sans",fe.type));case"switch":return e.labelHidden?P.trackInlinePx:P.trackInlinePx+P.labelGapPx+d(e.labels,"switch","sans",P.type);case"cluster":{if(e.items.length===0)throw new RangeError("A cluster needs at least one item to be measured with");return e.items.reduce((t,n)=>t+z(n),0)+(e.items.length-1)*a.space[e.gap]}}},st= exports.E =(e,t)=>{let n=d([e.header],"column header","sans",ue),r=e.note===void 0?0:d(e.note,"column header note","sans",ue);return u(Math.max(n,r,...t.map(z))+B)},lt= exports.F =u(pe("\u3042".repeat(rt),"sans",W)+B),dt= exports.G =e=>u(d(e,"comparison attribute","sans",W)+B),ct= exports.H =(e,t)=>M(ot,e,t),ut= exports.I =(e,t)=>{if(t!==void 0&&!m(t))throw new RangeError(`A count sample's unit must hold a readable character: ${JSON.stringify(t)}`);return j(_(at,e),t)},mt= exports.J =(e,t)=>u(Math.max(d(e,"tile caption","sans",H.captionType),d(t,"tile value","sans",H.valueType))+H.paddingInlinePx);var ft=.12,pt=.16,gt=/[\u0020\u00a0\u1361\u{10100}\u{10101}\u{1039f}\u{1091f}]/u,k=a.space["space-3"],S= exports.K =(e,t)=>{let n=0,r=0;for(let s of e)n+=1,gt.test(s)&&(r+=1);return(t==="mono"?x(e):h(e))+ft*n+pt*r},yt= exports.L =e=>{for(let n of[e.name,...e.notes])if(!m(n))throw new RangeError(`A figure node's name and notes must hold a readable character: ${JSON.stringify(n)}`);let t=Math.max(S(e.name,"sans")*a.type.body.size,...e.notes.map(n=>S(n,"sans")*a.type.caption.size));return{minWidthPx:u(t)+2*k,heightPx:2*k+a.type.body.lineHeight+e.notes.length*a.type.caption.lineHeight}},tn= exports.M =e=>{let t=k+a.type.body.lineHeight;return{insetPx:k,namePx:k+a.type.body.lineHeight/2,notesPx:Array.from({length:e},(n,r)=>t+r*a.type.caption.lineHeight+a.type.caption.lineHeight/2)}},Tt= exports.N =(e,t)=>{if(e!==null&&!m(e))throw new RangeError(`A disc's name must hold a readable character: ${JSON.stringify(e)}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`A disc's radius must be a positive finite px value: ${t}`);return e===null?{widthPx:0,extentBelowPx:t+ge}:{widthPx:u(S(e,"sans")*a.type.caption.size),extentBelowPx:t+a.space["space-1"]+a.type.caption.lineHeight}},ge= exports.O =a.stroke["focus-offset"]+a.stroke["focus-width"],nn= exports.P =a.stroke["focus-offset"]+a.stroke["focus-width"]/2;var bt=e=>{if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Length must be a finite px value >= 0: ${e}`);return e},p= exports.Q =e=>`${bt(e)/16}rem`;var ye=(1+Math.sqrt(5))/2,Te=({masterMinPx:e,detailMinPx:t,gapPx:n})=>{for(let r of[e,t])if(!(Number.isFinite(r)&&r>0))throw new RangeError(`Pane minimum must be a positive px value: ${r}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Gap must be a px value >= 0: ${n}`);return e+n+t},ht= exports.R =(e,t)=>{let n=Te(t);if(!(Number.isFinite(e)&&e>=0))throw new RangeError(`Container width must be a px value >= 0: ${e}`);if(e<n)return{sideBySide:!1,sideBySideFromPx:n,masterInlinePx:e,detailInlinePx:e};let r=(e-t.gapPx)/(1+ye),o=Math.min(Math.max(t.masterMinPx,r),e-t.gapPx-t.detailMinPx);return{sideBySide:!0,sideBySideFromPx:n,masterInlinePx:o,detailInlinePx:e-t.gapPx-o}},sn= exports.S =e=>{let t=Te(e),n=`cui-master-detail-m${e.masterMinPx}-d${e.detailMinPx}-g${e.gapPx}`,r=`[data-cui-master-detail="${n}"]`,o=p(e.gapPx),s=`${r}{grid-template-columns:minmax(0,1fr);gap:${o}}`,c=`clamp(${p(e.masterMinPx)},calc((100% - ${o}) / ${1+ye}),calc(100% - ${o} - ${p(e.detailMinPx)}))`,i=`@container (min-width:${p(t)}){${r}{grid-template-columns:${c} minmax(0,1fr)}}`;return{key:n,css:s+i}};var xt=2*a.space["space-1"],be=e=>{if(!(Number.isFinite(e)&&e>0))throw new RangeError(`Column width must be a positive px value: ${e}`);return e},he= exports.T =e=>{if(e.length===0)throw new RangeError("A table needs at least one column");let t=0,n=null;for(let{width:r}of e){if(r.fixedPx!==void 0){t+=be(r.fixedPx);continue}let o=be(r.minPx);if(n!==null&&n!==o)throw new RangeError(`Flexible columns share the remaining width equally, so their minimums must be equal: ${n} and ${o}`);n=o,t+=o}return t},kt= exports.U =e=>he(e)+xt;var Rt=(e,t,n)=>{if(!(Number.isSafeInteger(e)&&e>0))throw new RangeError(`Tile count must be a positive integer: ${e}`);if(!(Number.isFinite(t)&&t>0))throw new RangeError(`Tile minimum width must be a positive px value: ${t}`);if(!(Number.isFinite(n)&&n>=0))throw new RangeError(`Tile gap must be a px value >= 0: ${n}`);let r=[];for(let i=1;i<=e;i+=1)e%i===0&&r.push({columns:i,minContainerPx:i*t+(i-1)*n});let o=`cui-tiles-n${e}-m${t}-g${n}`,s=`[data-cui-tile-grid="${o}"]`,c=r.map(({columns:i,minContainerPx:R})=>{let g=`${s}{grid-template-columns:repeat(${i},minmax(0,1fr))}`;return i===1?g:`@container (min-width:${p(R)}){${g}}`});return{key:o,steps:r,css:c.join("")}};var Ct=(e,t)=>{let n=L(e,t);return n.kind==="ready"?{...n,value:{...n.value,loadingMore:!1}}:n},Et= exports.X =(e,t)=>F(e,t.ok?{ok:!0,value:{rows:t.value.rows,next:t.value.next,meta:t.value.meta,loadingMore:!1,moreFailure:null}}:t),Pt= exports.Y =e=>e.kind==="ready"&&!e.refreshing&&e.value.next!==null&&!e.value.loadingMore?{...e,value:{...e.value,loadingMore:!0}}:e,St= exports.Z =(e,t,n)=>{if(!(e.kind==="ready"&&e.value.loadingMore&&Object.is(e.value.next,t)))return e;if(n.ok)return{...e,value:{...e.value,rows:[...e.value.rows,...n.value.rows],next:n.value.next,loadingMore:!1,moreFailure:null}};let r=e.value.moreFailure===null?1:e.value.moreFailure.occurrence+1;return{...e,value:{...e.value,loadingMore:!1,moreFailure:{reason:n.reason,occurrence:r}}}},_t= exports._ =(e,t)=>{if(e.kind!=="ready")return e;let{rows:n,meta:r}=t({rows:e.value.rows,meta:e.value.meta});return{...e,value:{...e.value,rows:n,meta:r}}};var Ot=/^#[0-9a-f]{6}$/i,wt=/^[a-z][a-z0-9-]*$/,xe=e=>{if(!Ot.test(e))throw new RangeError(`A palette colour must be #rrggbb: ${e}`);return e},ke= exports.$ =({light:e,dark:t})=>`light-dark(${xe(e)}, ${xe(t)})`,It= exports.aa =e=>{if(!wt.test(e))throw new RangeError(`A root attribute must be lowercase letters, digits and hyphens, starting with a letter: ${e}`);return`[${e}] ::placeholder { color: ${ke(a.color["fg-muted"])}; opacity: 1; }`};var Re=["indigo","violet","purple","fuchsia","pink","rose","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue"],Nt= exports.ca =["fg","tint","accent","line","solid","solid-hover"],Mt={indigo:{fg:{light:"#372aac",dark:"#c6d2ff"},tint:{light:"#eff3ff",dark:"#1e1a4d"},accent:{light:"#4f39f6",dark:"#7c86ff"}},violet:{fg:{light:"#5d0ec0",dark:"#ddd6ff"},tint:{light:"#f5f3ff",dark:"#2f0d68"},accent:{light:"#7f22fe",dark:"#a684ff"}},purple:{fg:{light:"#6e11b0",dark:"#e9d4ff"},tint:{light:"#faf5ff",dark:"#3c0366"},accent:{light:"#9810fa",dark:"#c27aff"}},fuchsia:{fg:{light:"#8a0194",dark:"#f6cfff"},tint:{light:"#fdf4ff",dark:"#4b004f"},accent:{light:"#c800de",dark:"#ed6aff"}},pink:{fg:{light:"#a3004c",dark:"#fccee8"},tint:{light:"#fdf2f8",dark:"#510424"},accent:{light:"#e60076",dark:"#fb64b6"}},rose:{fg:{light:"#a50036",dark:"#ffccd3"},tint:{light:"#fff1f2",dark:"#4d0218"},accent:{light:"#ec003f",dark:"#ff637e"}},red:{fg:{light:"#9f0712",dark:"#ffc9c9"},tint:{light:"#fef2f2",dark:"#460809"},accent:{light:"#e7000b",dark:"#ff6467"}},orange:{fg:{light:"#7e2a0c",dark:"#ffd6a7"},tint:{light:"#fff7ed",dark:"#441306"},accent:{light:"#f54900",dark:"#ff8904"}},amber:{fg:{light:"#7b3306",dark:"#fee685"},tint:{light:"#fffbeb",dark:"#461901"},accent:{light:"#bb4d00",dark:"#fcbb00"}},yellow:{fg:{light:"#733e0a",dark:"#fff085"},tint:{light:"#fefce8",dark:"#432004"},accent:{light:"#a65f00",dark:"#fdc700"}},lime:{fg:{light:"#35530e",dark:"#d8f999"},tint:{light:"#f7fee7",dark:"#192e03"},accent:{light:"#497d00",dark:"#9ae600"}},green:{fg:{light:"#0d542b",dark:"#b9f8cf"},tint:{light:"#f0fdf4",dark:"#032e15"},accent:{light:"#008236",dark:"#05df72"}},emerald:{fg:{light:"#004f3b",dark:"#a4f4cf"},tint:{light:"#ecfdf5",dark:"#002c22"},accent:{light:"#009966",dark:"#00d492"}},teal:{fg:{light:"#0b4f4a",dark:"#96f7e4"},tint:{light:"#f0fdfa",dark:"#022f2e"},accent:{light:"#009689",dark:"#00d5be"}},cyan:{fg:{light:"#104e64",dark:"#a2f4fd"},tint:{light:"#ecfeff",dark:"#053345"},accent:{light:"#0092b8",dark:"#00d3f2"}},sky:{fg:{light:"#024a70",dark:"#b8e6fe"},tint:{light:"#f0f9ff",dark:"#052f4a"},accent:{light:"#0084d1",dark:"#00bcff"}},blue:{fg:{light:"#193cb8",dark:"#bedbff"},tint:{light:"#eff6ff",dark:"#162456"},accent:{light:"#155dfc",dark:"#51a2ff"}}},y=({light:e,dark:t})=>Object.freeze({light:e,dark:t}),Lt=({fg:e,tint:t,accent:n})=>Object.freeze({fg:y(e),tint:y(t),accent:y(n),line:y({light:e.dark,dark:e.light}),solid:y(e),"solid-hover":y({light:t.dark,dark:t.light})}),Ft= exports.da =Object.freeze(Object.fromEntries(Re.map(e=>[e,Lt(Mt[e])])));exports.a = _; exports.b = j; exports.c = Y; exports.d = Se; exports.e = m; exports.f = l; exports.g = Le; exports.h = Fe; exports.i = M; exports.j = ee; exports.k = Ae; exports.l = De; exports.m = Ut; exports.n = ve; exports.o = L; exports.p = F; exports.q = T; exports.r = E; exports.s = Ue; exports.t = He; exports.u = ae; exports.v = b; exports.w = se; exports.x = le; exports.y = a; exports.z = tt; exports.A = h; exports.B = x; exports.C = u; exports.D = z; exports.E = st; exports.F = lt; exports.G = dt; exports.H = ct; exports.I = ut; exports.J = mt; exports.K = S; exports.L = yt; exports.M = tn; exports.N = Tt; exports.O = ge; exports.P = nn; exports.Q = p; exports.R = ht; exports.S = sn; exports.T = he; exports.U = kt; exports.V = Rt; exports.W = Ct; exports.X = Et; exports.Y = Pt; exports.Z = St; exports._ = _t; exports.$ = ke; exports.aa = It; exports.ba = Re; exports.ca = Nt; exports.da = Ft;
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA4D4K2WFcjs = require('./chunk-A4D4K2WF.cjs');var _chunkIR2WTSOWcjs = require('./chunk-IR2WTSOW.cjs');exports.CONSOLE_UI_LABEL_CATALOGS = _chunkA4D4K2WFcjs.n; exports.CONTRAST_MINIMUM = _chunkIR2WTSOWcjs.c; exports.CONTRAST_PAIRS = _chunkIR2WTSOWcjs.d; exports.HTTP_FORBIDDEN = _chunkA4D4K2WFcjs.f; exports.LATTICE_PX = _chunkA4D4K2WFcjs.C; exports.ROW_WITH_CONTROL_PX = _chunkA4D4K2WFcjs.F; exports.TARGET_PX = _chunkA4D4K2WFcjs.E; exports.TOKENS = _chunkA4D4K2WFcjs.G; exports.ZonedTimeError = _chunkA4D4K2WFcjs.b; exports.beginPage = _chunkA4D4K2WFcjs.z; exports.beginPagedReload = _chunkA4D4K2WFcjs.x; exports.beginReload = _chunkA4D4K2WFcjs.k; exports.ceil8 = _chunkA4D4K2WFcjs.v; exports.ceilToLattice = _chunkA4D4K2WFcjs.D; exports.contrastRatio = _chunkIR2WTSOWcjs.b; exports.cssVar = _chunkA4D4K2WFcjs.H; exports.flatMapOutcome = _chunkA4D4K2WFcjs.h; exports.formatCount = _chunkA4D4K2WFcjs.a; exports.formatInstant = _chunkA4D4K2WFcjs.e; exports.hexToSrgb = _chunkIR2WTSOWcjs.a; exports.keepLastGood = _chunkA4D4K2WFcjs.l; exports.mapOutcome = _chunkA4D4K2WFcjs.g; exports.mapPagedList = _chunkA4D4K2WFcjs.B; exports.masterDetailPlan = _chunkA4D4K2WFcjs.q; exports.monoTextWidthEm = _chunkA4D4K2WFcjs.u; exports.reasonAside = _chunkA4D4K2WFcjs.m; exports.resolveConsoleUiLabels = _chunkA4D4K2WFcjs.o; exports.settleFirstPage = _chunkA4D4K2WFcjs.y; exports.settlePage = _chunkA4D4K2WFcjs.A; exports.tableMinInlinePx = _chunkA4D4K2WFcjs.s; exports.textWidthEm = _chunkA4D4K2WFcjs.t; exports.tileGridPlan = _chunkA4D4K2WFcjs.w; exports.toOffsetIso = _chunkA4D4K2WFcjs.c; exports.toWallTime = _chunkA4D4K2WFcjs.d;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkS6DFKVUVcjs = require('./chunk-S6DFKVUV.cjs');var _chunk7M4I26BScjs = require('./chunk-7M4I26BS.cjs');exports.COMPACT_ROW_PX = _chunkS6DFKVUVcjs.x; exports.CONSOLE_UI_LABEL_CATALOGS = _chunkS6DFKVUVcjs.r; exports.CONTRAST_MINIMUM = _chunk7M4I26BScjs.c; exports.CONTRAST_PAIRS = _chunk7M4I26BScjs.d; exports.FIGURE_RING_REACH_PX = _chunkS6DFKVUVcjs.O; exports.FLEXIBLE_COLUMN_MIN_PX = _chunkS6DFKVUVcjs.F; exports.HTTP_FORBIDDEN = _chunkS6DFKVUVcjs.j; exports.LATTICE_PX = _chunkS6DFKVUVcjs.t; exports.ROW_WITH_CONTROL_PX = _chunkS6DFKVUVcjs.w; exports.TARGET_PX = _chunkS6DFKVUVcjs.v; exports.TOKENS = _chunkS6DFKVUVcjs.y; exports.TONES = _chunkS6DFKVUVcjs.da; exports.TONE_HUES = _chunkS6DFKVUVcjs.ba; exports.TONE_ROLES = _chunkS6DFKVUVcjs.ca; exports.ZonedTimeError = _chunkS6DFKVUVcjs.f; exports.beginPage = _chunkS6DFKVUVcjs.Y; exports.beginPagedReload = _chunkS6DFKVUVcjs.W; exports.beginReload = _chunkS6DFKVUVcjs.o; exports.ceil8 = _chunkS6DFKVUVcjs.C; exports.ceilToLattice = _chunkS6DFKVUVcjs.u; exports.cellContentInlinePx = _chunkS6DFKVUVcjs.D; exports.comparisonAttributePx = _chunkS6DFKVUVcjs.G; exports.contrastRatio = _chunk7M4I26BScjs.b; exports.countSampleText = _chunkS6DFKVUVcjs.I; exports.cssVar = _chunkS6DFKVUVcjs.z; exports.figureBoxPlan = _chunkS6DFKVUVcjs.L; exports.figureDiscLabelPlan = _chunkS6DFKVUVcjs.N; exports.fixedColumnPx = _chunkS6DFKVUVcjs.E; exports.flatMapOutcome = _chunkS6DFKVUVcjs.l; exports.formatCount = _chunkS6DFKVUVcjs.a; exports.formatInstant = _chunkS6DFKVUVcjs.i; exports.hexToSrgb = _chunk7M4I26BScjs.a; exports.instantSampleText = _chunkS6DFKVUVcjs.H; exports.isReadableText = _chunkS6DFKVUVcjs.e; exports.keepLastGood = _chunkS6DFKVUVcjs.p; exports.lightDark = _chunkS6DFKVUVcjs.$; exports.mapOutcome = _chunkS6DFKVUVcjs.k; exports.mapPagedList = _chunkS6DFKVUVcjs._; exports.masterDetailPlan = _chunkS6DFKVUVcjs.R; exports.monoTextWidthEm = _chunkS6DFKVUVcjs.B; exports.placeholderRule = _chunkS6DFKVUVcjs.aa; exports.readDecimalText = _chunkS6DFKVUVcjs.c; exports.readIntegerText = _chunkS6DFKVUVcjs.d; exports.reasonAside = _chunkS6DFKVUVcjs.q; exports.resolveConsoleUiLabels = _chunkS6DFKVUVcjs.s; exports.settleFirstPage = _chunkS6DFKVUVcjs.X; exports.settlePage = _chunkS6DFKVUVcjs.Z; exports.spacedTextWidthEm = _chunkS6DFKVUVcjs.K; exports.tableFrameMinInlinePx = _chunkS6DFKVUVcjs.U; exports.tableMinInlinePx = _chunkS6DFKVUVcjs.T; exports.textWidthEm = _chunkS6DFKVUVcjs.A; exports.tileGridPlan = _chunkS6DFKVUVcjs.V; exports.tileMinInlinePx = _chunkS6DFKVUVcjs.J; exports.toOffsetIso = _chunkS6DFKVUVcjs.g; exports.toWallTime = _chunkS6DFKVUVcjs.h;
package/dist/core.d.cts CHANGED
@@ -1,4 +1,7 @@
1
1
  declare const formatCount: (value: number, formatLocale: string) => string;
2
+ declare const readDecimalText: (text: string) => number | null;
3
+ declare const readIntegerText: (text: string) => number | null;
4
+ declare const isReadableText: (text: string) => boolean;
2
5
  type ZonedTimeErrorReason = "malformed" | "subsecond" | "nonexistent" | "ambiguous";
3
6
  declare class ZonedTimeError extends RangeError {
4
7
  readonly reason: ZonedTimeErrorReason;
@@ -30,117 +33,6 @@ type ConsoleUiLabels = {
30
33
  declare const reasonAside: (reason: string) => string;
31
34
  declare const CONSOLE_UI_LABEL_CATALOGS: Readonly<Record<ConsoleUiLocale, ConsoleUiLabels>>;
32
35
  declare const resolveConsoleUiLabels: (locale: string) => ConsoleUiLabels;
33
- type MasterDetailOptions = {
34
- readonly masterMinPx: number;
35
- readonly detailMinPx: number;
36
- readonly gapPx: number;
37
- };
38
- type MasterDetailPlan = {
39
- readonly sideBySide: boolean;
40
- readonly sideBySideFromPx: number;
41
- readonly masterInlinePx: number;
42
- readonly detailInlinePx: number;
43
- };
44
- declare const masterDetailPlan: (containerPx: number, options: MasterDetailOptions) => MasterDetailPlan;
45
- type ColumnWidth = {
46
- readonly fixedPx: number;
47
- readonly minPx?: never;
48
- } | {
49
- readonly minPx: number;
50
- readonly fixedPx?: never;
51
- };
52
- type ColumnWidthSource = {
53
- readonly width: ColumnWidth;
54
- };
55
- declare const tableMinInlinePx: (columns: readonly ColumnWidthSource[]) => number;
56
- declare const textWidthEm: (text: string) => number;
57
- declare const monoTextWidthEm: (text: string) => number;
58
- declare const ceil8: (px: number) => number;
59
- type TileGridStep = {
60
- readonly columns: number;
61
- readonly minContainerPx: number;
62
- };
63
- type TileGridPlan = {
64
- readonly key: string;
65
- readonly steps: readonly TileGridStep[];
66
- readonly css: string;
67
- };
68
- declare const tileGridPlan: (count: number, minInlinePx: number, gapPx: number) => TileGridPlan;
69
- declare const HTTP_FORBIDDEN = 403;
70
- type ResourceOutcome<T> = {
71
- readonly ok: true;
72
- readonly value: T;
73
- } | {
74
- readonly ok: false;
75
- readonly status: number | null;
76
- readonly reason: string;
77
- };
78
- type CommandOutcome<T, R> = {
79
- readonly ok: true;
80
- readonly value: T;
81
- } | {
82
- readonly ok: false;
83
- readonly status: number | null;
84
- readonly reason: string;
85
- readonly rejection: R | null;
86
- };
87
- declare const mapOutcome: <T, U>(outcome: ResourceOutcome<T>, map: (value: T) => U) => ResourceOutcome<U>;
88
- declare const flatMapOutcome: <T, U>(outcome: ResourceOutcome<T>, map: (value: T) => ResourceOutcome<U>) => ResourceOutcome<U>;
89
- type ResourceFailure = {
90
- readonly status: number | null;
91
- readonly reason: string;
92
- readonly occurrence: number;
93
- readonly retrying: boolean;
94
- };
95
- type ResourceState<T> = {
96
- readonly kind: "idle";
97
- } | {
98
- readonly kind: "loading";
99
- } | ({
100
- readonly kind: "failed";
101
- } & ResourceFailure) | {
102
- readonly kind: "ready";
103
- readonly value: T;
104
- readonly refreshing: boolean;
105
- readonly refreshFailure: {
106
- readonly status: number | null;
107
- readonly reason: string;
108
- } | null;
109
- };
110
- type ReloadCause = "reload" | "revision";
111
- declare const beginReload: <T>(state: ResourceState<T>, cause: ReloadCause) => ResourceState<T>;
112
- declare const keepLastGood: <T>(state: ResourceState<T>, outcome: ResourceOutcome<T>) => ResourceState<T>;
113
- type KeysetPage<T, C, M> = {
114
- readonly rows: readonly T[];
115
- readonly next: C | null;
116
- readonly meta: M;
117
- };
118
- type NextPage<T, C> = {
119
- readonly rows: readonly T[];
120
- readonly next: C | null;
121
- readonly meta?: never;
122
- };
123
- type PageFailure = {
124
- readonly reason: string;
125
- readonly occurrence: number;
126
- };
127
- type PagedValue<T, C, M> = {
128
- readonly rows: readonly T[];
129
- readonly next: C | null;
130
- readonly meta: M;
131
- readonly loadingMore: boolean;
132
- readonly moreFailure: PageFailure | null;
133
- };
134
- type PagedContent<T, M> = {
135
- readonly rows: readonly T[];
136
- readonly meta: M;
137
- };
138
- type PagedState<T, C, M> = ResourceState<PagedValue<T, C, M>>;
139
- declare const beginPagedReload: <T, C, M>(state: PagedState<T, C, M>, cause: ReloadCause) => PagedState<T, C, M>;
140
- declare const settleFirstPage: <T, C, M>(state: PagedState<T, C, M>, outcome: ResourceOutcome<KeysetPage<T, C, M>>) => PagedState<T, C, M>;
141
- declare const beginPage: <T, C, M>(state: PagedState<T, C, M>) => PagedState<T, C, M>;
142
- declare const settlePage: <T, C, M>(state: PagedState<T, C, M>, cursor: C, outcome: ResourceOutcome<NextPage<T, C>>) => PagedState<T, C, M>;
143
- declare const mapPagedList: <T, C, M>(state: PagedState<T, C, M>, map: (content: PagedContent<T, M>) => PagedContent<T, M>) => PagedState<T, C, M>;
144
36
  declare const LATTICE_PX = 4;
145
37
  declare const SPACE_MULTIPLIERS: readonly [
146
38
  1,
@@ -169,12 +61,13 @@ declare const MOTION_STEPS: readonly [
169
61
  declare const ceilToLattice: (px: number) => number;
170
62
  declare const TARGET_PX: number;
171
63
  declare const ROW_WITH_CONTROL_PX: number;
64
+ declare const COMPACT_ROW_PX: number;
172
65
  type SpaceToken = `space-${(typeof SPACE_MULTIPLIERS)[number]}`;
173
66
  type TypeToken = keyof typeof TYPE_STEPS | "prose";
174
67
  type MotionToken = `motion-${(typeof MOTION_STEPS)[number]}`;
175
68
  type WeightToken = "regular" | "medium" | "bold";
176
69
  type RadiusToken = "radius-control" | "radius-item" | "radius-container" | "radius-pill";
177
- type SizeToken = "size-control" | "size-row" | "size-row-control" | "size-target";
70
+ type SizeToken = "size-control" | "size-row" | "size-row-compact" | "size-row-control" | "size-target";
178
71
  type StrokeToken = "border-width" | "focus-width" | "focus-offset" | "marker-width";
179
72
  type SchemeColor = {
180
73
  readonly light: string;
@@ -311,6 +204,176 @@ type SurfaceRole = "surface" | "subtle" | "sunken" | "danger-tint" | "warning-ti
311
204
  type AccentRole = "danger-accent" | "warning-accent" | "success-accent" | "info-accent";
312
205
  type TokenName = SpaceToken | `font-size-${TypeToken}` | `line-height-${TypeToken}` | `font-weight-${WeightToken}` | RadiusToken | SizeToken | StrokeToken | MotionToken | ColorToken;
313
206
  declare const cssVar: (name: TokenName) => string;
207
+ type TextFace = "sans" | "mono";
208
+ declare const textWidthEm: (text: string) => number;
209
+ declare const monoTextWidthEm: (text: string) => number;
210
+ declare const ceil8: (px: number) => number;
211
+ type CellContent = {
212
+ readonly kind: "text";
213
+ readonly texts: readonly string[];
214
+ readonly face: TextFace;
215
+ readonly type: TypeToken;
216
+ } | {
217
+ readonly kind: "measured";
218
+ readonly texts: readonly string[];
219
+ } | {
220
+ readonly kind: "pill";
221
+ readonly labels: readonly string[];
222
+ } | {
223
+ readonly kind: "button";
224
+ readonly labels: readonly string[];
225
+ } | {
226
+ readonly kind: "link";
227
+ readonly labels: readonly string[];
228
+ } | {
229
+ readonly kind: "switch";
230
+ readonly labelHidden: true;
231
+ readonly labels?: never;
232
+ } | {
233
+ readonly kind: "switch";
234
+ readonly labelHidden: false;
235
+ readonly labels: readonly string[];
236
+ } | {
237
+ readonly kind: "cluster";
238
+ readonly gap: SpaceToken;
239
+ readonly items: readonly CellContent[];
240
+ };
241
+ type ColumnHeaderText = {
242
+ readonly header: string;
243
+ readonly note?: readonly string[];
244
+ };
245
+ declare const cellContentInlinePx: (content: CellContent) => number;
246
+ declare const fixedColumnPx: (column: ColumnHeaderText, contents: readonly CellContent[]) => number;
247
+ declare const FLEXIBLE_COLUMN_MIN_PX: number;
248
+ declare const comparisonAttributePx: (labels: readonly string[]) => number;
249
+ declare const instantSampleText: (formatLocale: string, timeZone: string) => string;
250
+ declare const countSampleText: (formatLocale: string, unit?: string) => string;
251
+ declare const tileMinInlinePx: (captions: readonly string[], values: readonly string[]) => number;
252
+ declare const spacedTextWidthEm: (text: string, face: TextFace) => number;
253
+ type FigureBoxLines = {
254
+ readonly name: string;
255
+ readonly notes: readonly string[];
256
+ };
257
+ type FigureBoxPlan = {
258
+ readonly minWidthPx: number;
259
+ readonly heightPx: number;
260
+ };
261
+ declare const figureBoxPlan: (lines: FigureBoxLines) => FigureBoxPlan;
262
+ type FigureDiscLabelPlan = {
263
+ readonly widthPx: number;
264
+ readonly extentBelowPx: number;
265
+ };
266
+ declare const figureDiscLabelPlan: (label: string | null, radiusPx: number) => FigureDiscLabelPlan;
267
+ declare const FIGURE_RING_REACH_PX: number;
268
+ type MasterDetailOptions = {
269
+ readonly masterMinPx: number;
270
+ readonly detailMinPx: number;
271
+ readonly gapPx: number;
272
+ };
273
+ type MasterDetailPlan = {
274
+ readonly sideBySide: boolean;
275
+ readonly sideBySideFromPx: number;
276
+ readonly masterInlinePx: number;
277
+ readonly detailInlinePx: number;
278
+ };
279
+ declare const masterDetailPlan: (containerPx: number, options: MasterDetailOptions) => MasterDetailPlan;
280
+ type ColumnWidth = {
281
+ readonly fixedPx: number;
282
+ readonly minPx?: never;
283
+ } | {
284
+ readonly minPx: number;
285
+ readonly fixedPx?: never;
286
+ };
287
+ type ColumnWidthSource = {
288
+ readonly width: ColumnWidth;
289
+ };
290
+ declare const tableMinInlinePx: (columns: readonly ColumnWidthSource[]) => number;
291
+ declare const tableFrameMinInlinePx: (columns: readonly ColumnWidthSource[]) => number;
292
+ type TileGridStep = {
293
+ readonly columns: number;
294
+ readonly minContainerPx: number;
295
+ };
296
+ type TileGridPlan = {
297
+ readonly key: string;
298
+ readonly steps: readonly TileGridStep[];
299
+ readonly css: string;
300
+ };
301
+ declare const tileGridPlan: (count: number, minInlinePx: number, gapPx: number) => TileGridPlan;
302
+ declare const HTTP_FORBIDDEN = 403;
303
+ type ResourceOutcome<T> = {
304
+ readonly ok: true;
305
+ readonly value: T;
306
+ } | {
307
+ readonly ok: false;
308
+ readonly status: number | null;
309
+ readonly reason: string;
310
+ };
311
+ type CommandOutcome<T, R> = {
312
+ readonly ok: true;
313
+ readonly value: T;
314
+ } | {
315
+ readonly ok: false;
316
+ readonly status: number | null;
317
+ readonly reason: string;
318
+ readonly rejection: R | null;
319
+ };
320
+ declare const mapOutcome: <T, U>(outcome: ResourceOutcome<T>, map: (value: T) => U) => ResourceOutcome<U>;
321
+ declare const flatMapOutcome: <T, U>(outcome: ResourceOutcome<T>, map: (value: T) => ResourceOutcome<U>) => ResourceOutcome<U>;
322
+ type ResourceFailure = {
323
+ readonly status: number | null;
324
+ readonly reason: string;
325
+ readonly occurrence: number;
326
+ readonly retrying: boolean;
327
+ };
328
+ type ResourceState<T> = {
329
+ readonly kind: "idle";
330
+ } | {
331
+ readonly kind: "loading";
332
+ } | ({
333
+ readonly kind: "failed";
334
+ } & ResourceFailure) | {
335
+ readonly kind: "ready";
336
+ readonly value: T;
337
+ readonly refreshing: boolean;
338
+ readonly refreshFailure: {
339
+ readonly status: number | null;
340
+ readonly reason: string;
341
+ } | null;
342
+ };
343
+ type ReloadCause = "reload" | "revision";
344
+ declare const beginReload: <T>(state: ResourceState<T>, cause: ReloadCause) => ResourceState<T>;
345
+ declare const keepLastGood: <T>(state: ResourceState<T>, outcome: ResourceOutcome<T>) => ResourceState<T>;
346
+ type KeysetPage<T, C, M> = {
347
+ readonly rows: readonly T[];
348
+ readonly next: C | null;
349
+ readonly meta: M;
350
+ };
351
+ type NextPage<T, C> = {
352
+ readonly rows: readonly T[];
353
+ readonly next: C | null;
354
+ readonly meta?: never;
355
+ };
356
+ type PageFailure = {
357
+ readonly reason: string;
358
+ readonly occurrence: number;
359
+ };
360
+ type PagedValue<T, C, M> = {
361
+ readonly rows: readonly T[];
362
+ readonly next: C | null;
363
+ readonly meta: M;
364
+ readonly loadingMore: boolean;
365
+ readonly moreFailure: PageFailure | null;
366
+ };
367
+ type PagedContent<T, M> = {
368
+ readonly rows: readonly T[];
369
+ readonly meta: M;
370
+ };
371
+ type PagedState<T, C, M> = ResourceState<PagedValue<T, C, M>>;
372
+ declare const beginPagedReload: <T, C, M>(state: PagedState<T, C, M>, cause: ReloadCause) => PagedState<T, C, M>;
373
+ declare const settleFirstPage: <T, C, M>(state: PagedState<T, C, M>, outcome: ResourceOutcome<KeysetPage<T, C, M>>) => PagedState<T, C, M>;
374
+ declare const beginPage: <T, C, M>(state: PagedState<T, C, M>) => PagedState<T, C, M>;
375
+ declare const settlePage: <T, C, M>(state: PagedState<T, C, M>, cursor: C, outcome: ResourceOutcome<NextPage<T, C>>) => PagedState<T, C, M>;
376
+ declare const mapPagedList: <T, C, M>(state: PagedState<T, C, M>, map: (content: PagedContent<T, M>) => PagedContent<T, M>) => PagedState<T, C, M>;
314
377
  type Srgb = readonly [
315
378
  red: number,
316
379
  green: number,
@@ -487,4 +550,37 @@ declare const CONTRAST_PAIRS: {
487
550
  };
488
551
  };
489
552
  };
490
- export { type AccentRole, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type ColorScheme, type ColorToken, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, type FgRole, 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, type TileGridPlan, type TileGridStep, type TokenName, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, contrastRatio, cssVar, flatMapOutcome, formatCount, formatInstant, hexToSrgb, keepLastGood, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, tableMinInlinePx, textWidthEm, tileGridPlan, toOffsetIso, toWallTime };
553
+ declare const lightDark: ({ light, dark }: SchemeColor) => string;
554
+ declare const placeholderRule: (rootAttribute: string) => string;
555
+ declare const TONE_HUES: readonly [
556
+ "indigo",
557
+ "violet",
558
+ "purple",
559
+ "fuchsia",
560
+ "pink",
561
+ "rose",
562
+ "red",
563
+ "orange",
564
+ "amber",
565
+ "yellow",
566
+ "lime",
567
+ "green",
568
+ "emerald",
569
+ "teal",
570
+ "cyan",
571
+ "sky",
572
+ "blue"
573
+ ];
574
+ type ToneHue = (typeof TONE_HUES)[number];
575
+ declare const TONE_ROLES: readonly [
576
+ "fg",
577
+ "tint",
578
+ "accent",
579
+ "line",
580
+ "solid",
581
+ "solid-hover"
582
+ ];
583
+ type ToneRole = (typeof TONE_ROLES)[number];
584
+ type Tone = Readonly<Record<ToneRole, SchemeColor>>;
585
+ declare const TONES: Readonly<Record<ToneHue, Tone>>;
586
+ export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };