@bigpixelrocket/uiok 0.1.3 → 0.2.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +95 -1
  2. package/README.md +1 -1
  3. package/dist/activity/ActivityBar.d.ts +21 -8
  4. package/dist/activity/ActivityBar.js +15 -5
  5. package/dist/activity/activity.css +53 -6
  6. package/dist/button/Button.d.ts +10 -6
  7. package/dist/button/Button.js +6 -1
  8. package/dist/button/button.css +201 -33
  9. package/dist/charts/Line.logic.d.ts +6 -0
  10. package/dist/charts/Line.logic.js +9 -0
  11. package/dist/charts/LineChart.js +11 -4
  12. package/dist/charts/Pie.logic.d.ts +89 -1
  13. package/dist/charts/Pie.logic.js +272 -2
  14. package/dist/charts/PieChart.d.ts +2 -1
  15. package/dist/charts/PieChart.js +12 -5
  16. package/dist/charts/PieFill.d.ts +15 -0
  17. package/dist/charts/PieFill.js +33 -0
  18. package/dist/charts/ResultChart.d.ts +2 -2
  19. package/dist/charts/ResultChart.js +173 -47
  20. package/dist/charts/ResultChart.logic.d.ts +60 -4
  21. package/dist/charts/ResultChart.logic.js +105 -6
  22. package/dist/charts/Scatter.logic.d.ts +18 -4
  23. package/dist/charts/Scatter.logic.js +98 -22
  24. package/dist/charts/ScatterChart.js +19 -5
  25. package/dist/charts/charts.css +233 -116
  26. package/dist/charts/seriesColour.d.ts +2 -0
  27. package/dist/charts/seriesColour.js +1 -1
  28. package/dist/datetime/DateTimePicker.d.ts +12 -2
  29. package/dist/datetime/DateTimePicker.js +61 -16
  30. package/dist/datetime/DateTimePicker.logic.d.ts +29 -0
  31. package/dist/datetime/DateTimePicker.logic.js +25 -0
  32. package/dist/datetime/datetime.css +89 -49
  33. package/dist/dialog/ConfirmDialog.d.ts +69 -20
  34. package/dist/dialog/ConfirmDialog.js +39 -12
  35. package/dist/dialog/DialogLayer.d.ts +25 -0
  36. package/dist/dialog/DialogLayer.js +24 -0
  37. package/dist/dialog/DialogLegend.d.ts +2 -1
  38. package/dist/dialog/DialogLegend.js +10 -5
  39. package/dist/dialog/DialogLegend.logic.d.ts +15 -3
  40. package/dist/dialog/DialogLegend.logic.js +8 -4
  41. package/dist/dialog/DialogLists.d.ts +157 -0
  42. package/dist/dialog/DialogLists.js +137 -0
  43. package/dist/dialog/ModalDialog.d.ts +20 -15
  44. package/dist/dialog/ModalDialog.js +22 -7
  45. package/dist/dialog/dialog.css +570 -127
  46. package/dist/dialog/index.d.ts +7 -1
  47. package/dist/dialog/index.js +7 -1
  48. package/dist/field/Check.d.ts +15 -0
  49. package/dist/field/Check.js +23 -0
  50. package/dist/field/field.css +812 -0
  51. package/dist/field/index.d.ts +10 -0
  52. package/dist/field/index.js +10 -0
  53. package/dist/field/labelHelp.d.ts +33 -0
  54. package/dist/field/labelHelp.js +22 -0
  55. package/dist/filter/FilterIcon.js +2 -1
  56. package/dist/filter/filter.css +72 -20
  57. package/dist/grid/DataGrid.d.ts +8 -1
  58. package/dist/grid/DataGrid.js +115 -40
  59. package/dist/grid/DataGrid.logic.d.ts +15 -3
  60. package/dist/grid/DataGrid.logic.js +18 -5
  61. package/dist/grid/grid.css +481 -56
  62. package/dist/icon/Spinner.d.ts +16 -0
  63. package/dist/icon/Spinner.js +13 -0
  64. package/dist/icon/index.d.ts +5 -0
  65. package/dist/icon/index.js +5 -0
  66. package/dist/icon/sizes.d.ts +19 -0
  67. package/dist/icon/sizes.js +19 -0
  68. package/dist/index.d.ts +2 -0
  69. package/dist/index.js +2 -0
  70. package/dist/keychord/KeyChord.d.ts +12 -1
  71. package/dist/keychord/KeyChord.js +2 -2
  72. package/dist/keychord/index.d.ts +1 -1
  73. package/dist/keychord/keychord.css +87 -9
  74. package/dist/labels/dialog.d.ts +12 -1
  75. package/dist/labels/dialog.js +3 -1
  76. package/dist/labels/selectAll.d.ts +4 -4
  77. package/dist/labels/selectAll.js +1 -1
  78. package/dist/legend/KeyLegendStrip.js +1 -1
  79. package/dist/legend/legend.css +82 -57
  80. package/dist/listing/Listing.d.ts +17 -10
  81. package/dist/listing/Listing.js +33 -26
  82. package/dist/listing/listing.css +1665 -237
  83. package/dist/menu/menu.css +227 -67
  84. package/dist/menu/useBellBeat.js +2 -2
  85. package/dist/namecut/NameCut.d.ts +3 -1
  86. package/dist/namecut/NameCut.js +152 -5
  87. package/dist/namecut/NameCut.logic.d.ts +5 -3
  88. package/dist/namecut/NameCut.logic.js +20 -5
  89. package/dist/namecut/namecut.css +27 -7
  90. package/dist/pager/Pager.d.ts +12 -4
  91. package/dist/pager/Pager.js +21 -7
  92. package/dist/pager/pager.css +41 -30
  93. package/dist/palette/Palette.js +2 -1
  94. package/dist/palette/palette.css +121 -60
  95. package/dist/pane/PaneActions.d.ts +56 -14
  96. package/dist/pane/PaneActions.js +64 -16
  97. package/dist/pane/PaneFrame.d.ts +37 -5
  98. package/dist/pane/PaneFrame.js +246 -11
  99. package/dist/pane/index.d.ts +4 -2
  100. package/dist/pane/index.js +4 -2
  101. package/dist/pane/toolWords.d.ts +14 -0
  102. package/dist/pane/toolWords.js +26 -0
  103. package/dist/pane/useToolbarFit.d.ts +25 -0
  104. package/dist/pane/useToolbarFit.js +95 -0
  105. package/dist/run/RunHeader.d.ts +5 -3
  106. package/dist/run/RunHeader.js +11 -8
  107. package/dist/run/run.css +64 -79
  108. package/dist/segmented/SegmentedChoice.d.ts +18 -2
  109. package/dist/segmented/SegmentedChoice.js +18 -7
  110. package/dist/segmented/segmented.css +62 -22
  111. package/dist/selectall/SelectAllBar.d.ts +4 -3
  112. package/dist/selectall/SelectAllBar.js +4 -3
  113. package/dist/selectall/selectall.css +17 -12
  114. package/dist/shell/shell.css +1073 -0
  115. package/dist/styles.css +620 -22
  116. package/dist/surface/surface.css +154 -0
  117. package/dist/tabs/PageTabs.d.ts +10 -5
  118. package/dist/tabs/PageTabs.js +126 -37
  119. package/dist/tabs/tabs.css +131 -51
  120. package/dist/terminal/Terminal.js +3 -1
  121. package/dist/terminal/Terminal.logic.d.ts +5 -4
  122. package/dist/terminal/Terminal.logic.js +9 -4
  123. package/dist/terminal/TerminalMenu.d.ts +4 -1
  124. package/dist/terminal/TerminalMenu.js +12 -5
  125. package/dist/terminal/ghostty/contrast.logic.d.ts +45 -0
  126. package/dist/terminal/ghostty/contrast.logic.js +130 -0
  127. package/dist/terminal/ghostty/core.d.ts +6 -0
  128. package/dist/terminal/ghostty/renderer.d.ts +9 -2
  129. package/dist/terminal/ghostty/renderer.js +91 -14
  130. package/dist/terminal/ghostty/surface.d.ts +8 -0
  131. package/dist/terminal/ghostty/surface.js +27 -1
  132. package/dist/terminal/terminal.css +87 -61
  133. package/dist/text/text.css +16 -7
  134. package/dist/themes/catalog.js +4 -3
  135. package/dist/themes/themes.generated.css +1307 -264
  136. package/dist/themes/tokens.d.ts +69 -14
  137. package/dist/themes/tokens.js +920 -97
  138. package/dist/tokens.css +239 -0
  139. package/dist/tooltip/Tooltip.d.ts +6 -0
  140. package/dist/tooltip/Tooltip.js +48 -6
  141. package/dist/tooltip/Tooltip.logic.d.ts +89 -12
  142. package/dist/tooltip/Tooltip.logic.js +142 -20
  143. package/dist/tooltip/index.d.ts +1 -1
  144. package/dist/tooltip/index.js +1 -1
  145. package/dist/tooltip/tooltip.css +39 -9
  146. package/package.json +9 -3
@@ -10,8 +10,14 @@
10
10
  * the override. A token other tokens read straight from the palette (the
11
11
  * panel, the text, the primary hue, the group hues) takes no override; a
12
12
  * theme sets it through its palette, or a group hue through `Theme.groups`.
13
- * Tokens that read the same in every theme (aliases, shadows, the disabled
14
- * opacity, the chart series) are fixed.
13
+ * Tokens that read the same in every theme (aliases, washes, the disabled
14
+ * opacity) are fixed.
15
+ *
16
+ * Every colour has one job. A fill the text sits on (`--accent`, `--danger`)
17
+ * is not the colour of a word: each coloured word has a text role
18
+ * (`--accent-text`, `--danger-text`) floored at 4.5:1 on every ground the
19
+ * word is drawn on, and each mark read by shape (a dot, an icon, a chart
20
+ * line, a control's outline) has a role floored at 3:1 on its grounds.
15
21
  *
16
22
  * An app that needs tokens of its own derives them from the same theme and
17
23
  * emits them through `themeStylesheet`'s options, so one stylesheet holds
@@ -21,12 +27,11 @@ import { type GroupHue, type TerminalPalette, type Theme, type ThemePalette } fr
21
27
  import { type Hex } from './color.js';
22
28
  import { type ThemeAppearance } from './ids.js';
23
29
  /**
24
- * The value a theme may override a token with, by what the token holds: a
25
- * hex colour for a colour, a number or a percentage for a factor. A token
26
- * written as a compound value (a translucent colour, a mix, a `var()`, a
27
- * shadow) follows its rule in every theme and takes no override.
30
+ * The value a theme may override a token with: a hex colour for a colour. A
31
+ * token written as a compound value (a translucent colour, a mix, a `var()`,
32
+ * a shadow) follows its rule in every theme and takes no override.
28
33
  */
29
- type OverrideValue<Value> = Value extends Hex ? Hex : Value extends `${number}%` ? `${number}%` : Value extends `${number}` ? `${number}` : never;
34
+ type OverrideValue<Value> = Value extends Hex ? Hex : never;
30
35
  /**
31
36
  * Every token a theme sets, as `themeTokens` gives it, before it is written
32
37
  * into the stylesheet. `overrides` replaces a token where the theme was
@@ -56,26 +61,68 @@ declare function derivedTokens(palette: ThemePalette, terminal: TerminalPalette,
56
61
  '--bg-header': `#${string}`;
57
62
  '--border': `#${string}`;
58
63
  '--border-strong': `#${string}`;
64
+ '--control-border': `#${string}`;
65
+ '--control-border-strong': `#${string}`;
66
+ '--control-track': string;
67
+ '--progress-idle': `#${string}`;
68
+ '--idle-mark': `#${string}`;
59
69
  '--text': `#${string}`;
60
70
  '--text-dim': `#${string}`;
61
71
  '--text-on-surface': `#${string}`;
72
+ '--text-dim-on-surface': `#${string}`;
73
+ '--text-faint': `#${string}`;
62
74
  '--accent': `#${string}`;
63
75
  '--on-accent': `#${string}`;
76
+ '--accent-text': `#${string}`;
77
+ '--on-selected-dim': `#${string}`;
78
+ '--selection-cursor': `#${string}`;
79
+ '--selection-hit': `#${string}`;
80
+ '--marked-bg': string;
81
+ '--marked-cursor-bg': string;
82
+ '--current-bg': string;
83
+ '--current-ring': `#${string}`;
84
+ '--match-bg': string;
85
+ '--text-selection-bg': string;
64
86
  '--primary-hue': `#${string}`;
87
+ '--primary-mark': `#${string}`;
65
88
  '--primary': `#${string}`;
66
89
  '--on-primary': `#${string}`;
90
+ '--primary-hover': `#${string}`;
91
+ '--primary-pressed': `#${string}`;
67
92
  '--on-tonal': `#${string}`;
68
93
  '--tonal-border': `#${string}`;
69
- '--tonal-hover-brightness': `${number}`;
94
+ '--tonal-hover': `#${string}`;
95
+ '--tonal-pressed': `#${string}`;
70
96
  '--row-lift': string;
71
97
  '--cursor-bg': `#${string}`;
72
98
  '--cursor-row-bg': `#${string}`;
73
99
  '--row-meta-text': `#${string}`;
74
100
  '--glass-edge': string;
75
101
  '--hover-wash': string;
102
+ '--pressed-wash': string;
103
+ '--well-shade': string;
104
+ '--row-hover': string;
105
+ '--accent-wash': string;
106
+ '--accent-wash-strong': string;
107
+ '--accent-wash-pressed': string;
76
108
  '--warning': `#${string}`;
77
109
  '--success': `#${string}`;
78
110
  '--danger': `#${string}`;
111
+ '--danger-text': `#${string}`;
112
+ '--warning-text': `#${string}`;
113
+ '--success-text': `#${string}`;
114
+ '--danger-wash-strong': string;
115
+ '--warning-wash-strong': string;
116
+ '--cell-binary-text': `#${string}`;
117
+ '--on-danger': `#${string}`;
118
+ '--on-warning': `#${string}`;
119
+ '--on-success': `#${string}`;
120
+ '--accent-pressed': `#${string}`;
121
+ '--danger-pressed': `#${string}`;
122
+ '--warning-pressed': `#${string}`;
123
+ '--shadow-raised': string;
124
+ '--shadow-popover': string;
125
+ '--shadow-modal': string;
79
126
  '--group-blue': `#${string}`;
80
127
  '--group-green': `#${string}`;
81
128
  '--group-purple': `#${string}`;
@@ -85,10 +132,19 @@ declare function derivedTokens(palette: ThemePalette, terminal: TerminalPalette,
85
132
  '--group-yellow': `#${string}`;
86
133
  '--group-red': `#${string}`;
87
134
  '--group-dot-ring': string;
135
+ '--chart-1': `#${string}`;
136
+ '--chart-2': `#${string}`;
137
+ '--chart-3': `#${string}`;
138
+ '--chart-4': `#${string}`;
139
+ '--chart-5': `#${string}`;
140
+ '--chart-6': `#${string}`;
141
+ '--chart-7': `#${string}`;
142
+ '--chart-8': `#${string}`;
88
143
  '--terminal-bg': `#${string}`;
89
144
  '--terminal-fg': `#${string}`;
90
145
  '--terminal-cursor': `#${string}`;
91
146
  '--terminal-selection': string;
147
+ '--terminal-selection-text': `#${string}`;
92
148
  };
93
149
  /** A colour token a theme sets. */
94
150
  export type ThemeTokenName = keyof ReturnType<typeof derivedTokens>;
@@ -104,9 +160,8 @@ export type ThemeTokens = Readonly<Record<ThemeTokenName, string>>;
104
160
  */
105
161
  type PaletteDrawnToken = '--bg-panel' | '--text' | '--primary-hue' | `--group-${GroupHue}`;
106
162
  /**
107
- * The tokens a theme may override, each with the kind of value it holds: a
108
- * colour token takes a six-digit hex colour, a factor its number or
109
- * percentage. A token drawn straight from the palette (the panel, the text,
163
+ * The tokens a theme may override, each a colour token that takes a
164
+ * six-digit hex colour. A token drawn straight from the palette (the panel, the text,
110
165
  * the primary hue, the group hues) and a compound token (a shadow, a
111
166
  * translucent colour) take none.
112
167
  */
@@ -118,9 +173,9 @@ export type ThemeOverrides = {
118
173
  /** Every colour token `theme` sets, in the stylesheet's order, its overrides applied. */
119
174
  export declare function themeTokens(theme: Theme): ThemeTokens;
120
175
  /**
121
- * The colour tokens every theme shares: names for the grounds by role, mixes
122
- * of a theme's tokens, shadows, the chart series, and the colours that hold
123
- * in every theme by what they sit on.
176
+ * The colour tokens every theme shares: names for the grounds by role, the
177
+ * washes and lines of each hue, and aliases of a theme's tokens by the role
178
+ * they play.
124
179
  */
125
180
  export declare const FIXED_TOKENS: Readonly<Record<string, string>>;
126
181
  /**