@aiquants/console-ui 0.8.0 → 0.8.1

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/dist/core.d.ts CHANGED
@@ -1,3 +1,12 @@
1
+ type TopmostModal = {
2
+ readonly kind: "none";
3
+ } | {
4
+ readonly kind: "topmost";
5
+ readonly dialog: HTMLDialogElement;
6
+ } | {
7
+ readonly kind: "undecidable";
8
+ };
9
+ declare const topmostModalOf: (document: Document) => TopmostModal;
1
10
  declare const formatCount: (value: number, formatLocale: string) => string;
2
11
  declare const formatByteSize: (size: number, formatLocale: string) => string;
3
12
  declare const readDecimalText: (text: string) => number | null;
@@ -72,6 +81,11 @@ type WeightToken = "regular" | "medium" | "bold";
72
81
  type RadiusToken = "radius-control" | "radius-item" | "radius-container" | "radius-pill";
73
82
  type SizeToken = "size-control" | "size-row" | "size-row-compact" | "size-row-control" | "size-target";
74
83
  type StrokeToken = "border-width" | "focus-width" | "focus-offset" | "marker-width";
84
+ type MeasureToken = "measure-dialog";
85
+ type Measure = {
86
+ readonly ic: number;
87
+ readonly inset: SpaceToken;
88
+ };
75
89
  type SchemeColor = {
76
90
  readonly light: string;
77
91
  readonly dark: string;
@@ -87,7 +101,9 @@ type ConsoleUiTokens$1<ColorToken extends string = string> = {
87
101
  readonly size: Readonly<Record<SizeToken, number>>;
88
102
  readonly stroke: Readonly<Record<StrokeToken, number>>;
89
103
  readonly motion: Readonly<Record<MotionToken, number>>;
104
+ readonly measure: Readonly<Record<MeasureToken, Measure>>;
90
105
  readonly color: Readonly<Record<ColorToken, SchemeColor>>;
106
+ readonly moreContrastColor: Readonly<Record<ColorToken, SchemeColor>>;
91
107
  };
92
108
  declare const CONSOLE_PALETTE: {
93
109
  readonly fg: {
@@ -205,7 +221,7 @@ declare const TOKENS: ConsoleUiTokens;
205
221
  type FgRole = "fg" | "fg-secondary" | "fg-muted" | "danger-fg" | "warning-fg" | "success-fg" | "info-fg" | "on-solid";
206
222
  type SurfaceRole = "surface" | "subtle" | "sunken" | "danger-tint" | "warning-tint" | "success-tint" | "info-tint" | "neutral-solid" | "danger-solid" | "success-solid" | "info-solid" | "warning-solid";
207
223
  type AccentRole = "danger-accent" | "warning-accent" | "success-accent" | "info-accent";
208
- type TokenName = SpaceToken | `font-size-${TypeToken}` | `line-height-${TypeToken}` | `font-weight-${WeightToken}` | RadiusToken | SizeToken | StrokeToken | MotionToken | ColorToken;
224
+ type TokenName = SpaceToken | `font-size-${TypeToken}` | `line-height-${TypeToken}` | `font-weight-${WeightToken}` | RadiusToken | SizeToken | StrokeToken | MotionToken | MeasureToken | ColorToken;
209
225
  declare const cssVar: (name: TokenName) => string;
210
226
  type TextFace = "sans" | "mono";
211
227
  declare const textWidthEm: (text: string) => number;
@@ -391,8 +407,15 @@ declare const CONTRAST_MINIMUM: {
391
407
  readonly largeText: 4.5;
392
408
  readonly nonText: 3;
393
409
  };
410
+ declare const MORE_CONTRAST_MINIMUM: {
411
+ readonly text: 7;
412
+ readonly largeText: 4.5;
413
+ readonly nonText: 4.5;
414
+ };
394
415
  type ContrastRole = FgRole | AccentRole | "focus" | "border-control";
395
416
  type ColorScheme = "light" | "dark";
417
+ type ContrastLevel = "standard" | "more";
418
+ type PaletteName = ColorScheme | "contrastLight" | "contrastDark";
396
419
  declare const CONTRAST_PAIRS: {
397
420
  readonly light: {
398
421
  readonly fg: {
@@ -554,6 +577,166 @@ declare const CONTRAST_PAIRS: {
554
577
  readonly sunken: 7.66;
555
578
  };
556
579
  };
580
+ readonly contrastLight: {
581
+ readonly fg: {
582
+ readonly surface: 19.36;
583
+ readonly subtle: 18.5;
584
+ readonly sunken: 17.67;
585
+ readonly "danger-tint": 17.7;
586
+ readonly "warning-tint": 18.67;
587
+ readonly "success-tint": 18.38;
588
+ readonly "info-tint": 17.79;
589
+ };
590
+ readonly "fg-secondary": {
591
+ readonly surface: 14.67;
592
+ readonly subtle: 14.02;
593
+ readonly sunken: 13.39;
594
+ };
595
+ readonly "fg-muted": {
596
+ readonly surface: 12.75;
597
+ readonly subtle: 12.19;
598
+ readonly sunken: 11.64;
599
+ readonly "danger-tint": 11.66;
600
+ readonly "warning-tint": 12.3;
601
+ readonly "info-tint": 11.72;
602
+ };
603
+ readonly "danger-fg": {
604
+ readonly surface: 13.28;
605
+ readonly subtle: 12.69;
606
+ readonly "danger-tint": 12.14;
607
+ };
608
+ readonly "warning-fg": {
609
+ readonly surface: 13.82;
610
+ readonly subtle: 13.21;
611
+ readonly "warning-tint": 13.33;
612
+ };
613
+ readonly "success-fg": {
614
+ readonly surface: 12.67;
615
+ readonly subtle: 12.11;
616
+ readonly "success-tint": 12.03;
617
+ };
618
+ readonly "info-fg": {
619
+ readonly surface: 13.64;
620
+ readonly "info-tint": 12.54;
621
+ readonly subtle: 13.04;
622
+ };
623
+ readonly "on-solid": {
624
+ readonly "neutral-solid": 10.36;
625
+ readonly "danger-solid": 8.36;
626
+ readonly "success-solid": 7.61;
627
+ readonly "info-solid": 8.82;
628
+ readonly "warning-solid": 9.06;
629
+ };
630
+ readonly "danger-accent": {
631
+ readonly surface: 10;
632
+ readonly "danger-tint": 9.14;
633
+ };
634
+ readonly "warning-accent": {
635
+ readonly surface: 10.32;
636
+ readonly "warning-tint": 9.95;
637
+ };
638
+ readonly "success-accent": {
639
+ readonly surface: 8.79;
640
+ readonly "success-tint": 8.35;
641
+ };
642
+ readonly "info-accent": {
643
+ readonly surface: 10.48;
644
+ readonly subtle: 10.01;
645
+ readonly sunken: 9.56;
646
+ readonly "info-tint": 9.63;
647
+ };
648
+ readonly focus: {
649
+ readonly surface: 10.48;
650
+ readonly subtle: 10.01;
651
+ readonly sunken: 9.56;
652
+ readonly "info-tint": 9.63;
653
+ };
654
+ readonly "border-control": {
655
+ readonly surface: 10.02;
656
+ readonly subtle: 9.58;
657
+ readonly sunken: 9.15;
658
+ };
659
+ };
660
+ readonly contrastDark: {
661
+ readonly fg: {
662
+ readonly surface: 17.36;
663
+ readonly subtle: 14.23;
664
+ readonly sunken: 19.62;
665
+ readonly "danger-tint": 15.74;
666
+ readonly "warning-tint": 14.6;
667
+ readonly "success-tint": 14.78;
668
+ readonly "info-tint": 14.39;
669
+ };
670
+ readonly "fg-secondary": {
671
+ readonly surface: 16.02;
672
+ readonly subtle: 13.13;
673
+ readonly sunken: 18.11;
674
+ };
675
+ readonly "fg-muted": {
676
+ readonly surface: 14.59;
677
+ readonly subtle: 11.96;
678
+ readonly sunken: 16.49;
679
+ readonly "danger-tint": 13.22;
680
+ readonly "warning-tint": 12.27;
681
+ readonly "info-tint": 12.09;
682
+ };
683
+ readonly "danger-fg": {
684
+ readonly surface: 14.82;
685
+ readonly subtle: 12.15;
686
+ readonly "danger-tint": 13.44;
687
+ };
688
+ readonly "warning-fg": {
689
+ readonly surface: 15.99;
690
+ readonly subtle: 13.11;
691
+ readonly "warning-tint": 13.45;
692
+ };
693
+ readonly "success-fg": {
694
+ readonly surface: 15.78;
695
+ readonly subtle: 12.94;
696
+ readonly "success-tint": 13.44;
697
+ };
698
+ readonly "info-fg": {
699
+ readonly surface: 15;
700
+ readonly "info-tint": 12.43;
701
+ readonly subtle: 12.29;
702
+ };
703
+ readonly "on-solid": {
704
+ readonly "neutral-solid": 13.02;
705
+ readonly "danger-solid": 10.09;
706
+ readonly "success-solid": 12.72;
707
+ readonly "info-solid": 10.68;
708
+ readonly "warning-solid": 13.38;
709
+ };
710
+ readonly "danger-accent": {
711
+ readonly surface: 10.47;
712
+ readonly "danger-tint": 9.49;
713
+ };
714
+ readonly "warning-accent": {
715
+ readonly surface: 13.62;
716
+ readonly "warning-tint": 11.46;
717
+ };
718
+ readonly "success-accent": {
719
+ readonly surface: 12.81;
720
+ readonly "success-tint": 10.91;
721
+ };
722
+ readonly "info-accent": {
723
+ readonly surface: 11.01;
724
+ readonly subtle: 9.03;
725
+ readonly sunken: 12.45;
726
+ readonly "info-tint": 9.13;
727
+ };
728
+ readonly focus: {
729
+ readonly surface: 11.01;
730
+ readonly subtle: 9.03;
731
+ readonly sunken: 12.45;
732
+ readonly "info-tint": 9.13;
733
+ };
734
+ readonly "border-control": {
735
+ readonly surface: 10.98;
736
+ readonly subtle: 9;
737
+ readonly sunken: 12.41;
738
+ };
739
+ };
557
740
  };
558
741
  declare const lightDark: ({ light, dark }: SchemeColor) => string;
559
742
  declare const placeholderRule: (rootAttribute: string) => string;
@@ -588,4 +771,4 @@ declare const TONE_ROLES: readonly [
588
771
  type ToneRole = (typeof TONE_ROLES)[number];
589
772
  type Tone = Readonly<Record<ToneRole, SchemeColor>>;
590
773
  declare const TONES: Readonly<Record<ToneHue, Tone>>;
591
- export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, type MasterDetailOptions, type MasterDetailPlan, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatByteSize, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime };
774
+ export { type AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, type CellContent, type ColorScheme, type ColorToken, type ColumnHeaderText, type ColumnWidth, type ColumnWidthSource, type CommandOutcome, type ConsoleUiLabels, type ConsoleUiLocale, type ConsoleUiTokens, type ContrastLevel, type ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, type FgRole, type FigureBoxLines, type FigureBoxPlan, type FigureDiscLabelPlan, HTTP_FORBIDDEN, type KeysetPage, LATTICE_PX, MORE_CONTRAST_MINIMUM, type MasterDetailOptions, type MasterDetailPlan, type Measure, type MeasureToken, type MotionToken, type NextPage, type PageFailure, type PagedContent, type PagedState, type PagedValue, type PaletteName, ROW_WITH_CONTROL_PX, type RadiusToken, type ReloadCause, type ResourceFailure, type ResourceOutcome, type ResourceState, type SchemeColor, type SizeToken, type SpaceToken, type Srgb, type StrokeToken, type SurfaceRole, TARGET_PX, TOKENS, TONES, TONE_HUES, TONE_ROLES, type TextFace, type TileGridPlan, type TileGridStep, type TokenName, type Tone, type ToneHue, type ToneRole, type TopmostModal, type TypeToken, type WeightToken, ZonedTimeError, type ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fillLabel, fixedColumnPx, flatMapOutcome, formatByteSize, formatCount, formatInstant, goldenSectionPx, hexToSrgb, instantSampleText, isReadableText, keepLastGood, lightDark, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, placeholderRule, pxToRem, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime, topmostModalOf };
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- import{$ as V,A as z,B as A,C as B,D as C,E as D,F as E,G as F,I as G,J as H,L as I,M as J,N as K,P as L,Q as M,R as N,S as O,T as P,U 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,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-H4DAGEIG.js";import{a as Y,b as Z,c as _,d as $}from"./chunk-FXEGLGL7.js";export{r as COMPACT_ROW_PX,l as CONSOLE_UI_LABEL_CATALOGS,_ as CONTRAST_MINIMUM,$ as CONTRAST_PAIRS,H as FIGURE_RING_REACH_PX,z as FLEXIBLE_COLUMN_MIN_PX,O as HTTP_FORBIDDEN,n as LATTICE_PX,q as ROW_WITH_CONTROL_PX,p as TARGET_PX,s as TOKENS,ea as TONES,ca as TONE_HUES,da as TONE_ROLES,f as ZonedTimeError,V as beginPage,T as beginPagedReload,R as beginReload,w as ceil8,o as ceilToLattice,x as cellContentInlinePx,A as comparisonAttributePx,Z as contrastRatio,C as countSampleText,t as cssVar,F as figureBoxPlan,G as figureDiscLabelPlan,j as fillLabel,y as fixedColumnPx,Q as flatMapOutcome,b as formatByteSize,a as formatCount,i as formatInstant,I as goldenSectionPx,Y as hexToSrgb,B as instantSampleText,e as isReadableText,S as keepLastGood,aa as lightDark,P as mapOutcome,X as mapPagedList,K as masterDetailPlan,v as monoTextWidthEm,ba as placeholderRule,J as pxToRem,c as readDecimalText,d as readIntegerText,k as reasonAside,m as resolveConsoleUiLabels,U as settleFirstPage,W as settlePage,E as spacedTextWidthEm,M as tableFrameMinInlinePx,L as tableMinInlinePx,u as textWidthEm,N as tileGridPlan,D as tileMinInlinePx,g as toOffsetIso,h as toWallTime};
1
+ import{$ as Z,A as D,B as E,C as F,D as G,E as H,F as I,G as J,H as K,I as L,K as M,L as N,N as O,O as P,P as Q,R,S,T,U,V,W,Z as X,_ as Y,aa as _,b as a,ba as $,c as b,ca as aa,d as c,da as ba,ea as ca,f as d,fa as da,g as e,ga as ea,h as f,ha as fa,i as g,ia as ga,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as t,r as u,s as v,t as w,u as x,v as y,w as z,x as A,y as B,z as C}from"./chunk-K46FVHUL.js";import{a as o,e as p,f as q,g as r,i as s}from"./chunk-RA33TN5N.js";export{x as COMPACT_ROW_PX,m as CONSOLE_UI_LABEL_CATALOGS,q as CONTRAST_MINIMUM,s as CONTRAST_PAIRS,N as FIGURE_RING_REACH_PX,F as FLEXIBLE_COLUMN_MIN_PX,U as HTTP_FORBIDDEN,t as LATTICE_PX,r as MORE_CONTRAST_MINIMUM,w as ROW_WITH_CONTROL_PX,v as TARGET_PX,y as TOKENS,ga as TONES,ea as TONE_HUES,fa as TONE_ROLES,g as ZonedTimeError,$ as beginPage,Z as beginPagedReload,X as beginReload,C as ceil8,u as ceilToLattice,D as cellContentInlinePx,G as comparisonAttributePx,p as contrastRatio,I as countSampleText,z as cssVar,L as figureBoxPlan,M as figureDiscLabelPlan,k as fillLabel,E as fixedColumnPx,W as flatMapOutcome,c as formatByteSize,b as formatCount,j as formatInstant,O as goldenSectionPx,o as hexToSrgb,H as instantSampleText,f as isReadableText,Y as keepLastGood,ca as lightDark,V as mapOutcome,ba as mapPagedList,Q as masterDetailPlan,B as monoTextWidthEm,da as placeholderRule,P as pxToRem,d as readDecimalText,e as readIntegerText,l as reasonAside,n as resolveConsoleUiLabels,_ as settleFirstPage,aa as settlePage,K as spacedTextWidthEm,S as tableFrameMinInlinePx,R as tableMinInlinePx,A as textWidthEm,T as tileGridPlan,J as tileMinInlinePx,h as toOffsetIso,i as toWallTime,a as topmostModalOf};