@aiquants/console-ui 0.8.0 → 0.8.2

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