silvery 0.18.2 → 0.19.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 (156) hide show
  1. package/dist/{animation-DhINOJk8.mjs → animation-Cn64yepo.mjs} +1 -1
  2. package/dist/{animation-DhINOJk8.mjs.map → animation-Cn64yepo.mjs.map} +1 -1
  3. package/dist/{ansi-C6Qs1Wn2.mjs → ansi-CLOitHKx.mjs} +1 -1
  4. package/dist/ansi-CLOitHKx.mjs.map +1 -0
  5. package/dist/{ansi-CsjnZtAw.d.mts → ansi-Cc33mW54.d.mts} +1 -1
  6. package/dist/{ansi-CsjnZtAw.d.mts.map → ansi-Cc33mW54.d.mts.map} +1 -1
  7. package/dist/{chunk-BSw8zbkd.mjs → chunk-Vs_PY4HZ.mjs} +1 -1
  8. package/dist/cli-BKp0YtBD.mjs +4 -0
  9. package/dist/{context-BjWgrikx.mjs → context-BU5LkkIy.mjs} +8 -7
  10. package/dist/context-BU5LkkIy.mjs.map +1 -0
  11. package/dist/devtools-9QY4teqI.mjs +2 -0
  12. package/dist/{devtools-CeO9X_uv.mjs → devtools-DxkSLXDA.mjs} +4 -5
  13. package/dist/devtools-DxkSLXDA.mjs.map +1 -0
  14. package/dist/{eta-BnQSZcWf.mjs → eta-Bb3RH3wh.mjs} +1 -1
  15. package/dist/{eta-BnQSZcWf.mjs.map → eta-Bb3RH3wh.mjs.map} +1 -1
  16. package/dist/{flexily-zero-adapter-BOM0cl8R.mjs → flexily-zero-adapter-BlQa46nr.mjs} +21 -64
  17. package/dist/flexily-zero-adapter-BlQa46nr.mjs.map +1 -0
  18. package/dist/{flexily-zero-adapter-V8R3HQtK.mjs → flexily-zero-adapter-CMxXhdOL.mjs} +1 -1
  19. package/dist/{image-B0zMbVUr.mjs → image-CTII5QWI.mjs} +3 -3
  20. package/dist/image-CTII5QWI.mjs.map +1 -0
  21. package/dist/{index-Bh3U1K09.d.mts → index-BXslOebb.d.mts} +547 -137
  22. package/dist/index-BXslOebb.d.mts.map +1 -0
  23. package/dist/{index-C4vrhbud.d.mts → index-BnA7mNpo.d.mts} +1 -1
  24. package/dist/{index-C4vrhbud.d.mts.map → index-BnA7mNpo.d.mts.map} +1 -1
  25. package/dist/index-D3saHouR.d.mts +1392 -0
  26. package/dist/index-D3saHouR.d.mts.map +1 -0
  27. package/dist/index.d.mts +5 -33
  28. package/dist/index.d.mts.map +1 -1
  29. package/dist/index.mjs +13 -13
  30. package/dist/{layout-engine--drvrWjD.mjs → layout-engine-B6Cdz1yZ.mjs} +1 -1
  31. package/dist/{layout-engine-Dr3cY5U4.mjs → layout-engine-ClUgv6jB.mjs} +3 -3
  32. package/dist/{layout-engine-Dr3cY5U4.mjs.map → layout-engine-ClUgv6jB.mjs.map} +1 -1
  33. package/dist/{multi-progress-CcdqJFlf.mjs → multi-progress-Bq9Oi_WI.mjs} +3 -3
  34. package/dist/{multi-progress-CcdqJFlf.mjs.map → multi-progress-Bq9Oi_WI.mjs.map} +1 -1
  35. package/dist/{multi-progress-DQ-uUzLf.d.mts → multi-progress-DAQC7eap.d.mts} +2 -2
  36. package/dist/{multi-progress-DQ-uUzLf.d.mts.map → multi-progress-DAQC7eap.d.mts.map} +1 -1
  37. package/dist/{node-CP5WChgr.mjs → node-BeWlnCPY.mjs} +4 -4
  38. package/dist/node-BeWlnCPY.mjs.map +1 -0
  39. package/dist/{progress-bar-IrUjkLfU.mjs → progress-bar-CXE5Qfkd.mjs} +4 -4
  40. package/dist/progress-bar-CXE5Qfkd.mjs.map +1 -0
  41. package/dist/reconciler-Cwgm8hRR.mjs +8459 -0
  42. package/dist/reconciler-Cwgm8hRR.mjs.map +1 -0
  43. package/dist/{render-string-DVfgc8xr.mjs → render-string-Cbuf63Ya.mjs} +936 -136
  44. package/dist/render-string-Cbuf63Ya.mjs.map +1 -0
  45. package/dist/{render-string-BwLG7rIX.mjs → render-string-Tv-jqM16.mjs} +1 -1
  46. package/dist/runtime.d.mts +2 -2
  47. package/dist/runtime.mjs +3 -3
  48. package/dist/{spinner-BRkaJI0N.d.mts → spinner-CGo34vyR.d.mts} +2 -2
  49. package/dist/{spinner-BRkaJI0N.d.mts.map → spinner-CGo34vyR.d.mts.map} +1 -1
  50. package/dist/{spinner-BmldKx0M.mjs → spinner-CeOmcuw_.mjs} +3 -3
  51. package/dist/spinner-CeOmcuw_.mjs.map +1 -0
  52. package/dist/src-B5GjfG7g.mjs +4305 -0
  53. package/dist/src-B5GjfG7g.mjs.map +1 -0
  54. package/dist/{src-CJPXf3fC.mjs → src-C2uvC-r0.mjs} +7535 -6467
  55. package/dist/src-C2uvC-r0.mjs.map +1 -0
  56. package/dist/{src-D8kLrQBT.mjs → src-CChwjk0Z.mjs} +8 -86
  57. package/dist/src-CChwjk0Z.mjs.map +1 -0
  58. package/dist/{src-D_BS-as7.mjs → src-NCKb8kE5.mjs} +777 -776
  59. package/dist/src-NCKb8kE5.mjs.map +1 -0
  60. package/dist/theme.d.mts +2 -130
  61. package/dist/theme.mjs +3 -8
  62. package/dist/{types-B4A8Ebba.d.mts → types-BH_v3iMT.d.mts} +1 -1
  63. package/dist/{types-B4A8Ebba.d.mts.map → types-BH_v3iMT.d.mts.map} +1 -1
  64. package/dist/{types-e4dpfbSa.mjs → types-Bk2yw9Qj.mjs} +3 -3
  65. package/dist/types-Bk2yw9Qj.mjs.map +1 -0
  66. package/dist/ui/animation.d.mts +1 -1
  67. package/dist/ui/animation.mjs +1 -1
  68. package/dist/ui/ansi.d.mts +1 -1
  69. package/dist/ui/ansi.mjs +1 -1
  70. package/dist/ui/cli.d.mts +3 -3
  71. package/dist/ui/cli.mjs +5 -5
  72. package/dist/ui/display.d.mts +1 -1
  73. package/dist/ui/display.mjs.map +1 -1
  74. package/dist/ui/image.d.mts +1 -1
  75. package/dist/ui/image.mjs +1 -1
  76. package/dist/ui/input.d.mts +1 -1
  77. package/dist/ui/input.d.mts.map +1 -1
  78. package/dist/ui/input.mjs +2 -4
  79. package/dist/ui/input.mjs.map +1 -1
  80. package/dist/ui/progress.d.mts +3 -3
  81. package/dist/ui/progress.d.mts.map +1 -1
  82. package/dist/ui/progress.mjs +3 -3
  83. package/dist/ui/progress.mjs.map +1 -1
  84. package/dist/ui/react.d.mts +1 -1
  85. package/dist/ui/react.d.mts.map +1 -1
  86. package/dist/ui/react.mjs +2 -2
  87. package/dist/ui/react.mjs.map +1 -1
  88. package/dist/ui/utils.mjs +1 -1
  89. package/dist/ui/wrappers.d.mts +2 -2
  90. package/dist/ui/wrappers.mjs +1 -1
  91. package/dist/ui.d.mts +5 -5
  92. package/dist/ui.mjs +6 -6
  93. package/dist/{useLatest-6xqnGIU6.d.mts → useLatest-Bg2x4bfP.d.mts} +1 -1
  94. package/dist/{useLatest-6xqnGIU6.d.mts.map → useLatest-Bg2x4bfP.d.mts.map} +1 -1
  95. package/dist/{with-text-input-lUh9gYAG.d.mts → with-text-input-CRfoiFFG.d.mts} +3 -3
  96. package/dist/with-text-input-CRfoiFFG.d.mts.map +1 -0
  97. package/dist/{wrappers-JrEYTuKA.mjs → wrappers-UTADQkSY.mjs} +4 -4
  98. package/dist/wrappers-UTADQkSY.mjs.map +1 -0
  99. package/dist/{yoga-adapter-Bc8XT9cN.mjs → yoga-adapter-8oRGRw8V.mjs} +2 -2
  100. package/dist/{yoga-adapter-Bc8XT9cN.mjs.map → yoga-adapter-8oRGRw8V.mjs.map} +1 -1
  101. package/dist/yoga-adapter-D_CcxSt5.mjs +2 -0
  102. package/package.json +54 -45
  103. package/dist/UPNG-DvKjM6wE.mjs +0 -5076
  104. package/dist/UPNG-DvKjM6wE.mjs.map +0 -1
  105. package/dist/__vite-browser-external-2447137e-DPKHHqQK.mjs +0 -6
  106. package/dist/__vite-browser-external-2447137e-DPKHHqQK.mjs.map +0 -1
  107. package/dist/ansi-C6Qs1Wn2.mjs.map +0 -1
  108. package/dist/apng-CvSlLBtc.mjs +0 -3
  109. package/dist/apng-DFFVOItr.mjs +0 -70
  110. package/dist/apng-DFFVOItr.mjs.map +0 -1
  111. package/dist/assets/resvgjs.darwin-arm64-BtufyGW1.node +0 -0
  112. package/dist/backend-DU0Y938U.mjs +0 -13396
  113. package/dist/backend-DU0Y938U.mjs.map +0 -1
  114. package/dist/backends-BihMKFY_.mjs +0 -1181
  115. package/dist/backends-BihMKFY_.mjs.map +0 -1
  116. package/dist/backends-Dk_5G_gC.mjs +0 -3
  117. package/dist/cli-GwJ0S2In.mjs +0 -4
  118. package/dist/context-BjWgrikx.mjs.map +0 -1
  119. package/dist/derive-O_Kb1Bk_.d.mts +0 -28
  120. package/dist/derive-O_Kb1Bk_.d.mts.map +0 -1
  121. package/dist/devtools-CeO9X_uv.mjs.map +0 -1
  122. package/dist/devtools-nX4tj6OH.mjs +0 -2
  123. package/dist/flexily-zero-adapter-BOM0cl8R.mjs.map +0 -1
  124. package/dist/gif-B9Uq4qZA.mjs +0 -73
  125. package/dist/gif-B9Uq4qZA.mjs.map +0 -1
  126. package/dist/gif-BdrLRBmM.mjs +0 -3
  127. package/dist/gifenc-DfhOb4xr.mjs +0 -730
  128. package/dist/gifenc-DfhOb4xr.mjs.map +0 -1
  129. package/dist/image-B0zMbVUr.mjs.map +0 -1
  130. package/dist/index-Bh3U1K09.d.mts.map +0 -1
  131. package/dist/index-dehZ18K-.d.mts +0 -679
  132. package/dist/index-dehZ18K-.d.mts.map +0 -1
  133. package/dist/key-mapping-7k2ufK2b.mjs +0 -3
  134. package/dist/key-mapping-WLUmxjx1.mjs +0 -132
  135. package/dist/key-mapping-WLUmxjx1.mjs.map +0 -1
  136. package/dist/node-CP5WChgr.mjs.map +0 -1
  137. package/dist/progress-bar-IrUjkLfU.mjs.map +0 -1
  138. package/dist/reconciler-B8uxQxaU.mjs +0 -16482
  139. package/dist/reconciler-B8uxQxaU.mjs.map +0 -1
  140. package/dist/render-string-DVfgc8xr.mjs.map +0 -1
  141. package/dist/resvg-js-Cwipz-_J.mjs +0 -203
  142. package/dist/resvg-js-Cwipz-_J.mjs.map +0 -1
  143. package/dist/spinner-BmldKx0M.mjs.map +0 -1
  144. package/dist/src-C0sOQW-t.mjs +0 -3866
  145. package/dist/src-C0sOQW-t.mjs.map +0 -1
  146. package/dist/src-CJPXf3fC.mjs.map +0 -1
  147. package/dist/src-D8kLrQBT.mjs.map +0 -1
  148. package/dist/src-D_BS-as7.mjs.map +0 -1
  149. package/dist/theme.d.mts.map +0 -1
  150. package/dist/theme.mjs.map +0 -1
  151. package/dist/types-e4dpfbSa.mjs.map +0 -1
  152. package/dist/with-text-input-lUh9gYAG.d.mts.map +0 -1
  153. package/dist/wrapper-CE6GQ27z.mjs +0 -3527
  154. package/dist/wrapper-CE6GQ27z.mjs.map +0 -1
  155. package/dist/wrappers-JrEYTuKA.mjs.map +0 -1
  156. package/dist/yoga-adapter-B8LZpQcE.mjs +0 -2
@@ -1,679 +0,0 @@
1
- import React from "react";
2
-
3
- //#region packages/ansi/src/detection.d.ts
4
- interface TerminalCaps {
5
- /** Terminal program name (from TERM_PROGRAM) */
6
- program: string;
7
- /** TERM value */
8
- term: string;
9
- /** Color support level */
10
- colorLevel: "none" | "basic" | "256" | "truecolor";
11
- /** Kitty keyboard protocol supported */
12
- kittyKeyboard: boolean;
13
- /** Kitty graphics protocol (inline images) */
14
- kittyGraphics: boolean;
15
- /** Sixel graphics supported */
16
- sixel: boolean;
17
- /** OSC 52 clipboard */
18
- osc52: boolean;
19
- /** OSC 8 hyperlinks */
20
- hyperlinks: boolean;
21
- /** OSC 9/99 notifications */
22
- notifications: boolean;
23
- /** Bracketed paste mode */
24
- bracketedPaste: boolean;
25
- /** SGR mouse tracking */
26
- mouse: boolean;
27
- /** Synchronized output (DEC 2026) */
28
- syncOutput: boolean;
29
- /** Unicode/emoji support */
30
- unicode: boolean;
31
- /** SGR 4:x underline style subparameters (curly, dotted, dashed) */
32
- underlineStyles: boolean;
33
- /** SGR 58 underline color */
34
- underlineColor: boolean;
35
- /** Text-presentation emoji (⚠, ☑, ⭐) rendered as 2-wide.
36
- * Modern terminals (Ghostty, iTerm, Kitty) render these at emoji width (2 cells).
37
- * Terminal.app renders them at text width (1 cell). */
38
- textEmojiWide: boolean;
39
- /** OSC 66 text sizing protocol likely supported (Kitty 0.40+, Ghostty) */
40
- textSizingSupported: boolean;
41
- /** Heuristic: likely dark background (for theme selection) */
42
- darkBackground: boolean;
43
- /** Heuristic: likely has Nerd Font installed (for icon selection) */
44
- nerdfont: boolean;
45
- }
46
- /**
47
- * Default capabilities (assumes modern terminal with full support).
48
- */
49
- declare function defaultCaps(): TerminalCaps;
50
- /** Detect terminal capabilities from environment variables.
51
- * Synchronous. Minimal I/O: may run `defaults` on macOS for Apple_Terminal.
52
- */
53
- declare function detectTerminalCaps(): TerminalCaps;
54
- //#endregion
55
- //#region packages/ansi/src/types.d.ts
56
- /**
57
- * Type definitions for @silvery/ansi
58
- */
59
- /**
60
- * Color level supported by terminal.
61
- * - 'basic': 16 colors (SGR 30-37, 40-47)
62
- * - '256': 256 colors (SGR 38;5;n)
63
- * - 'truecolor': 16M colors (SGR 38;2;r;g;b)
64
- */
65
- type ColorLevel = "basic" | "256" | "truecolor";
66
- /**
67
- * Standard ANSI color names (the 16 base colors).
68
- * These map to SGR 30-37 (foreground) and 40-47 (background),
69
- * plus their bright variants (SGR 90-97, 100-107).
70
- */
71
- type AnsiColorName = "black" | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "blackBright" | "redBright" | "greenBright" | "yellowBright" | "blueBright" | "magentaBright" | "cyanBright" | "whiteBright";
72
- //#endregion
73
- //#region packages/ansi/src/theme/types.d.ts
74
- /**
75
- * Core type definitions for the theme system.
76
- *
77
- * Two-layer architecture:
78
- * Layer 1: ColorScheme — 22 terminal colors (what schemes expose; auto-detectable)
79
- * Layer 2: Theme — ~33 semantic tokens (what UI apps consume)
80
- *
81
- * Pipeline: Scheme catalog → ColorScheme (22) → deriveTheme() → Theme (33)
82
- */
83
- interface ColorScheme {
84
- name?: string;
85
- dark?: boolean;
86
- primary?: string;
87
- black: string;
88
- red: string;
89
- green: string;
90
- yellow: string;
91
- blue: string;
92
- magenta: string;
93
- cyan: string;
94
- white: string;
95
- brightBlack: string;
96
- brightRed: string;
97
- brightGreen: string;
98
- brightYellow: string;
99
- brightBlue: string;
100
- brightMagenta: string;
101
- brightCyan: string;
102
- brightWhite: string;
103
- foreground: string;
104
- background: string;
105
- cursorColor: string;
106
- cursorText: string;
107
- selectionBackground: string;
108
- selectionForeground: string;
109
- }
110
- declare const COLOR_SCHEME_FIELDS: readonly ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "brightBlack", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite", "foreground", "background", "cursorColor", "cursorText", "selectionBackground", "selectionForeground"];
111
- interface Theme {
112
- name: string;
113
- bg: string;
114
- fg: string;
115
- muted: string;
116
- mutedbg: string;
117
- surface: string;
118
- surfacebg: string;
119
- popover: string;
120
- popoverbg: string;
121
- inverse: string;
122
- inversebg: string;
123
- cursor: string;
124
- cursorbg: string;
125
- selection: string;
126
- selectionbg: string;
127
- primary: string;
128
- primaryfg: string;
129
- secondary: string;
130
- secondaryfg: string;
131
- accent: string;
132
- accentfg: string;
133
- error: string;
134
- errorfg: string;
135
- warning: string;
136
- warningfg: string;
137
- success: string;
138
- successfg: string;
139
- info: string;
140
- infofg: string;
141
- border: string;
142
- inputborder: string;
143
- focusborder: string;
144
- link: string;
145
- disabledfg: string;
146
- palette: string[];
147
- brand: string;
148
- brandHover: string;
149
- brandActive: string;
150
- red: string;
151
- orange: string;
152
- yellow: string;
153
- green: string;
154
- teal: string;
155
- blue: string;
156
- purple: string;
157
- pink: string;
158
- /** @deprecated Use `red` (available as `$red` token). Will be removed in next silvery major. */
159
- brandRed: string;
160
- /** @deprecated Use `orange` (available as `$orange` token). Will be removed in next silvery major. */
161
- brandOrange: string;
162
- /** @deprecated Use `yellow` (available as `$yellow` token). Will be removed in next silvery major. */
163
- brandYellow: string;
164
- /** @deprecated Use `green` (available as `$green` token). Will be removed in next silvery major. */
165
- brandGreen: string;
166
- /** @deprecated Use `teal` (available as `$teal` token). Will be removed in next silvery major. */
167
- brandTeal: string;
168
- /** @deprecated Use `blue` (available as `$blue` token). Will be removed in next silvery major. */
169
- brandBlue: string;
170
- /** @deprecated Use `purple` (available as `$purple` token). Will be removed in next silvery major. */
171
- brandPurple: string;
172
- /** @deprecated Use `pink` (available as `$pink` token). Will be removed in next silvery major. */
173
- brandPink: string;
174
- }
175
- type AnsiPrimary = "yellow" | "cyan" | "magenta" | "green" | "red" | "blue" | "white";
176
- type HueName = "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "purple" | "pink";
177
- //#endregion
178
- //#region packages/theme/src/ThemeContext.d.ts
179
- /** @internal Exported for @silvery/ag-react ThemeProvider — not public API. */
180
- declare const ThemeContext: React.Context<Theme>;
181
- interface ThemeProviderProps {
182
- theme: Theme;
183
- children: React.ReactNode;
184
- }
185
- /**
186
- * Provide a theme to the subtree.
187
- *
188
- * Components beneath this provider can use `useTheme()` or `$token`
189
- * color props (e.g. `color="$primary"`).
190
- */
191
- declare function ThemeProvider({
192
- theme,
193
- children
194
- }: ThemeProviderProps): React.ReactElement;
195
- /**
196
- * Read the current theme from context.
197
- *
198
- * Returns `defaultDarkTheme` when no `ThemeProvider` is present.
199
- */
200
- declare function useTheme(): Theme;
201
- //#endregion
202
- //#region packages/theme/src/generate.d.ts
203
- /**
204
- * Generate a complete ANSI 16 theme from a primary color + dark/light preference.
205
- *
206
- * All token values are ANSI color names (e.g. "yellow", "blueBright").
207
- */
208
- declare function generateTheme(primary: AnsiPrimary, dark: boolean): Theme;
209
- //#endregion
210
- //#region packages/theme/src/builder.d.ts
211
- interface ThemeBuilder {
212
- /** Set background color. */
213
- bg(color: string): ThemeBuilder;
214
- /** Set foreground color. */
215
- fg(color: string): ThemeBuilder;
216
- /** Set primary accent color. */
217
- primary(color: string): ThemeBuilder;
218
- /** Alias for `.primary()`. */
219
- accent(color: string): ThemeBuilder;
220
- /** Force dark mode. */
221
- dark(): ThemeBuilder;
222
- /** Force light mode. */
223
- light(): ThemeBuilder;
224
- /** Set any palette color by name. */
225
- color(name: keyof Omit<ColorScheme, "name" | "dark">, value: string): ThemeBuilder;
226
- /** Set full palette at once. */
227
- palette(p: ColorScheme): ThemeBuilder;
228
- /** Load a built-in palette by name. */
229
- preset(name: string): ThemeBuilder;
230
- /** Derive the final Theme from accumulated state. */
231
- build(): Theme;
232
- }
233
- /** Create a chainable theme builder. */
234
- declare function createTheme(): ThemeBuilder;
235
- /**
236
- * Quick theme from a primary color or color name.
237
- *
238
- * @example
239
- * ```typescript
240
- * quickTheme('#EBCB8B', 'dark') // yellow primary, dark mode
241
- * quickTheme('blue') // blue primary, default dark
242
- * ```
243
- */
244
- declare function quickTheme(primaryOrHex: string, mode?: "dark" | "light"): Theme;
245
- /**
246
- * Create a theme from a built-in preset name.
247
- *
248
- * @example
249
- * ```typescript
250
- * presetTheme('catppuccin-mocha')
251
- * presetTheme('nord')
252
- * ```
253
- */
254
- declare function presetTheme(name: string): Theme;
255
- //#endregion
256
- //#region packages/theme/src/generators.d.ts
257
- /**
258
- * Generate a ColorScheme from a Base16 YAML scheme.
259
- *
260
- * Maps base00–base0F to ANSI palette colors, derives special colors.
261
- */
262
- declare function fromBase16(yamlOrJson: string): ColorScheme;
263
- interface FromColorsOptions {
264
- /** Background color (infers dark/light). */
265
- background?: string;
266
- /** Foreground/text color. Generated if omitted. */
267
- foreground?: string;
268
- /** Primary accent color. Generated if omitted. */
269
- primary?: string;
270
- /** Force dark mode. */
271
- dark?: boolean;
272
- /** Theme name. */
273
- name?: string;
274
- }
275
- /**
276
- * Generate a full ColorScheme from 1-3 hex colors.
277
- *
278
- * At minimum, provide `background` or `primary`. Missing colors are
279
- * generated via surface ramp (from bg) and hue rotation (from primary).
280
- */
281
- declare function fromColors(opts: FromColorsOptions): ColorScheme;
282
- /**
283
- * Look up a built-in palette by name.
284
- *
285
- * @returns The ColorScheme, or undefined if not found.
286
- */
287
- declare function fromPreset(name: string): ColorScheme | undefined;
288
- //#endregion
289
- //#region packages/theme/src/state.d.ts
290
- /** Set the active theme (called by ThemeProvider). */
291
- declare function setActiveTheme(theme: Theme): void;
292
- /** Get the active theme (called by parseColor in render-helpers). */
293
- declare function getActiveTheme(): Theme;
294
- /**
295
- * Color tier the render pipeline is targeting.
296
- *
297
- * Mirrors `TerminalCaps.colorLevel` but lives in module state for the
298
- * render-helpers parseColor() / getTextStyle() functions, which don't have
299
- * access to the OutputContext or React props. Set by the runtime
300
- * (`createPipeline()` in `@silvery/ag-term/measurer.ts`) before the first
301
- * render, and updated on cap changes.
302
- *
303
- * At `"none"` (monochrome), `parseColor("$primary")` returns `null` and
304
- * `getTextStyle()` injects mono-attrs (bold, dim, italic, underline, inverse,
305
- * strikethrough) from `DEFAULT_MONO_ATTRS`. See `hub/silvery/design/v10-terminal/theme-system-v2-plan.md#p4`.
306
- */
307
- type ActiveColorLevel = "none" | "basic" | "256" | "truecolor";
308
- /** Set the active color level (called by the runtime based on TerminalCaps). */
309
- declare function setActiveColorLevel(level: ActiveColorLevel): void;
310
- /** Get the active color level (called by parseColor / getTextStyle in render-helpers). */
311
- declare function getActiveColorLevel(): ActiveColorLevel;
312
- /** Push a context theme (called by render phase for Box nodes with theme prop). */
313
- declare function pushContextTheme(theme: Theme): void;
314
- /** Pop a context theme (called by render phase after processing Box subtree). */
315
- declare function popContextTheme(): void;
316
- //#endregion
317
- //#region packages/theme/src/validate.d.ts
318
- /** Validation result from validateColorScheme(). */
319
- interface ValidationResult {
320
- valid: boolean;
321
- errors: string[];
322
- warnings: string[];
323
- }
324
- /**
325
- * Validate a ColorScheme.
326
- *
327
- * Checks:
328
- * - All 22 color fields are present and non-empty hex strings
329
- * - Warns on low-contrast foreground/background combinations
330
- */
331
- declare function validateColorScheme(p: ColorScheme): ValidationResult;
332
- //#endregion
333
- //#region packages/theme/src/validate-theme.d.ts
334
- /**
335
- * Theme validation — checks that all required semantic tokens are present.
336
- *
337
- * Complements validateColorScheme() which validates the lower-level
338
- * ColorScheme. This validates the derived Theme object.
339
- */
340
- /** All 33 required semantic token keys on Theme (excludes `name` and `palette`). */
341
- declare const THEME_TOKEN_KEYS: readonly string[];
342
- /** Result of theme validation. */
343
- interface ThemeValidationResult {
344
- /** Whether the theme has all required tokens. */
345
- valid: boolean;
346
- /** Token keys that are required but missing or empty. */
347
- missing: string[];
348
- /** Token keys that exist on the object but are not recognized theme tokens. */
349
- extra: string[];
350
- }
351
- /**
352
- * Validate a Theme object — check that all required tokens are present.
353
- *
354
- * @param theme - The theme object to validate
355
- * @returns Validation result with missing and extra token lists
356
- *
357
- * @example
358
- * ```typescript
359
- * const result = validateTheme(myTheme)
360
- * if (!result.valid) {
361
- * console.log("Missing tokens:", result.missing)
362
- * }
363
- * ```
364
- */
365
- declare function validateTheme(theme: Record<string, unknown>): ThemeValidationResult;
366
- //#endregion
367
- //#region packages/theme/src/alias.d.ts
368
- /**
369
- * Resolve all token aliases in a theme.
370
- *
371
- * Token values that start with `$` are treated as references to other tokens.
372
- * Alias chains are followed until a concrete (non-$) value is reached.
373
- * Circular references are detected via a depth limit and left unresolved.
374
- *
375
- * @param theme - A theme-like object where values may reference other tokens via `$name`
376
- * @returns A new object with all aliases resolved to concrete values
377
- *
378
- * @example
379
- * ```typescript
380
- * const themed = resolveAliases({
381
- * ...baseTheme,
382
- * button: "$primary", // resolves to the value of 'primary'
383
- * buttonHover: "$button", // chain: buttonHover -> button -> primary -> hex
384
- * })
385
- * ```
386
- */
387
- declare function resolveAliases(theme: Record<string, string>): Record<string, string>;
388
- /**
389
- * Resolve a single alias value against a Theme.
390
- *
391
- * Useful for resolving individual values without processing the entire theme.
392
- *
393
- * @param value - The value to resolve (may be "$tokenName" or a concrete value)
394
- * @param theme - The theme to resolve against
395
- * @returns The resolved concrete value
396
- */
397
- declare function resolveTokenAlias(value: string, theme: Theme): string;
398
- //#endregion
399
- //#region packages/theme/src/css.d.ts
400
- /**
401
- * Convert a Theme to CSS custom properties.
402
- *
403
- * Token names are kebab-cased with a `--` prefix:
404
- * - `bg` → `--bg`
405
- * - `surfacebg` → `--surfacebg`
406
- * - `disabledfg` → `--disabledfg`
407
- * - Palette entries: `--color0` through `--color15`
408
- *
409
- * @param theme - The theme to convert
410
- * @returns A record mapping CSS custom property names to color values
411
- *
412
- * @example
413
- * ```typescript
414
- * const vars = themeToCSSVars(myTheme)
415
- * // { "--bg": "#1E1E2E", "--fg": "#CDD6F4", "--primary": "#F9E2AF", ... }
416
- *
417
- * // Apply to an element:
418
- * Object.assign(element.style, vars)
419
- * ```
420
- */
421
- declare function themeToCSSVars(theme: Theme): Record<string, string>;
422
- //#endregion
423
- //#region packages/theme/src/auto-generate.d.ts
424
- /**
425
- * Generate a complete Theme from a single primary color.
426
- *
427
- * Derives a full ColorScheme using OKLCH color manipulation:
428
- * - Background/foreground from lightness endpoints using the primary's hue
429
- * - Complementary and analogous accent colors from hue rotation
430
- * - Surface ramp from bg lightness offsets
431
- * - Status colors (error, warning, success, info) from standard hue positions
432
- *
433
- * @param primaryColor - A hex color string (e.g. "#5E81AC")
434
- * @param mode - "dark" or "light" theme mode
435
- * @returns A complete Theme with all 33 semantic tokens
436
- *
437
- * @example
438
- * ```typescript
439
- * const theme = autoGenerateTheme("#5E81AC", "dark")
440
- * // Generates a full dark theme with blue as the primary accent
441
- *
442
- * const light = autoGenerateTheme("#E06C75", "light")
443
- * // Generates a full light theme with red/rose as the primary accent
444
- * ```
445
- */
446
- declare function autoGenerateTheme(primaryColor: string, mode: "dark" | "light"): Theme;
447
- //#endregion
448
- //#region packages/theme/src/import/types.d.ts
449
- /**
450
- * Base16 scheme type — the 16-color format used by hundreds of community themes.
451
- *
452
- * @see https://github.com/chriskempson/base16
453
- */
454
- /** A parsed Base16 color scheme. All hex values are WITHOUT `#` prefix. */
455
- interface Base16Scheme {
456
- scheme: string;
457
- author: string;
458
- base00: string;
459
- base01: string;
460
- base02: string;
461
- base03: string;
462
- base04: string;
463
- base05: string;
464
- base06: string;
465
- base07: string;
466
- base08: string;
467
- base09: string;
468
- base0A: string;
469
- base0B: string;
470
- base0C: string;
471
- base0D: string;
472
- base0E: string;
473
- base0F: string;
474
- }
475
- //#endregion
476
- //#region packages/theme/src/import/base16.d.ts
477
- /**
478
- * Import a Base16 YAML (or JSON) scheme into a ColorScheme.
479
- *
480
- * Mapping:
481
- * base00 → background, base01 → brightBlack, base02 → selectionBackground,
482
- * base03 → white (muted fg), base05 → foreground/brightWhite,
483
- * base08 → red, base09 → brightRed, base0A → yellow,
484
- * base0B → green, base0C → cyan, base0D → blue, base0E → magenta,
485
- * base0F → brightMagenta.
486
- *
487
- * Bright color variants are derived by brightening normals.
488
- * `dark` is inferred from base00 luminance.
489
- */
490
- declare function importBase16(yamlOrJson: string): ColorScheme;
491
- //#endregion
492
- //#region packages/theme/src/export/base16.d.ts
493
- /**
494
- * Export a ColorScheme to Base16 YAML format.
495
- *
496
- * Mapping:
497
- * background → base00, brightBlack → base01, selectionBackground → base02,
498
- * white → base03, (interpolated) → base04, foreground → base05,
499
- * (interpolated) → base06, (interpolated) → base07,
500
- * red → base08, brightRed → base09, yellow → base0A, green → base0B,
501
- * cyan → base0C, blue → base0D, magenta → base0E, brightMagenta → base0F.
502
- */
503
- declare function exportBase16(palette: ColorScheme): string;
504
- //#endregion
505
- //#region packages/theme/src/detect.d.ts
506
- interface DetectThemeOptions {
507
- /** Fallback ColorScheme when detection fails or returns partial data.
508
- * Detected colors override matching fallback fields. */
509
- fallback?: ColorScheme;
510
- /** Timeout per OSC query in ms (default 150). */
511
- timeoutMs?: number;
512
- /** Terminal capabilities (from detectTerminalCaps). When provided:
513
- * - colorLevel "none"/"basic" skips OSC detection and returns ANSI 16 theme
514
- * - darkBackground informs fallback selection when detection fails */
515
- caps?: {
516
- colorLevel?: string;
517
- darkBackground?: boolean;
518
- };
519
- }
520
- /**
521
- * Detect the terminal's color palette and derive a Theme.
522
- *
523
- * Enhanced version that uses Nord (dark) or Catppuccin Latte (light)
524
- * as fallback palettes for richer defaults than the base @silvery/ansi version.
525
- */
526
- declare function detectTheme(opts?: DetectThemeOptions): Promise<Theme>;
527
- //#endregion
528
- //#region packages/theme/src/schemes/catppuccin.d.ts
529
- /** Catppuccin Mocha — the classic dark variant. */
530
- declare const catppuccinMocha: ColorScheme;
531
- /** Catppuccin Frappe — muted dark variant. */
532
- declare const catppuccinFrappe: ColorScheme;
533
- /** Catppuccin Macchiato — warm dark variant. */
534
- declare const catppuccinMacchiato: ColorScheme;
535
- /** Catppuccin Latte — the light variant. */
536
- declare const catppuccinLatte: ColorScheme;
537
- //#endregion
538
- //#region packages/theme/src/schemes/nord.d.ts
539
- /** Nord — the classic dark arctic theme. */
540
- declare const nord: ColorScheme;
541
- //#endregion
542
- //#region packages/theme/src/schemes/dracula.d.ts
543
- /** Dracula — vibrant dark theme. */
544
- declare const dracula: ColorScheme;
545
- //#endregion
546
- //#region packages/theme/src/schemes/solarized.d.ts
547
- /** Solarized Dark — Ethan Schoonover's classic dark variant. */
548
- declare const solarizedDark: ColorScheme;
549
- /** Solarized Light — Ethan Schoonover's classic light variant. */
550
- declare const solarizedLight: ColorScheme;
551
- //#endregion
552
- //#region packages/theme/src/schemes/tokyo-night.d.ts
553
- /** Tokyo Night — the default dark variant. */
554
- declare const tokyoNight: ColorScheme;
555
- /** Tokyo Night Storm — slightly lighter background. */
556
- declare const tokyoNightStorm: ColorScheme;
557
- /** Tokyo Night Day — the light variant. */
558
- declare const tokyoNightDay: ColorScheme;
559
- //#endregion
560
- //#region packages/theme/src/schemes/one-dark.d.ts
561
- /** One Dark — the classic Atom editor theme. */
562
- declare const oneDark: ColorScheme;
563
- //#endregion
564
- //#region packages/theme/src/schemes/gruvbox.d.ts
565
- /** Gruvbox Dark — warm retro dark theme. */
566
- declare const gruvboxDark: ColorScheme;
567
- /** Gruvbox Light — warm retro light theme. */
568
- declare const gruvboxLight: ColorScheme;
569
- //#endregion
570
- //#region packages/theme/src/schemes/rose-pine.d.ts
571
- /** Rosé Pine — the main dark variant. */
572
- declare const rosePine: ColorScheme;
573
- /** Rosé Pine Moon — slightly lighter dark variant. */
574
- declare const rosePineMoon: ColorScheme;
575
- /** Rosé Pine Dawn — the light variant. */
576
- declare const rosePineDawn: ColorScheme;
577
- //#endregion
578
- //#region packages/theme/src/schemes/kanagawa.d.ts
579
- /** Kanagawa Wave — the default dark variant, inspired by "The Great Wave off Kanagawa". */
580
- declare const kanagawaWave: ColorScheme;
581
- /** Kanagawa Dragon — a muted, earthy dark variant. */
582
- declare const kanagawaDragon: ColorScheme;
583
- /** Kanagawa Lotus — the light variant, inspired by lotus flowers. */
584
- declare const kanagawaLotus: ColorScheme;
585
- //#endregion
586
- //#region packages/theme/src/schemes/everforest.d.ts
587
- /** Everforest Dark — warm green-based dark theme (medium background). */
588
- declare const everforestDark: ColorScheme;
589
- /** Everforest Light — warm green-based light theme (medium background). */
590
- declare const everforestLight: ColorScheme;
591
- //#endregion
592
- //#region packages/theme/src/schemes/monokai.d.ts
593
- /** Monokai Classic — the original Sublime Text Monokai colors. */
594
- declare const monokai: ColorScheme;
595
- /** Monokai Pro — the modern, refined Monokai with balanced colors. */
596
- declare const monokaiPro: ColorScheme;
597
- //#endregion
598
- //#region packages/theme/src/schemes/snazzy.d.ts
599
- /** Snazzy — clean dark theme by Sindre Sorhus. */
600
- declare const snazzy: ColorScheme;
601
- //#endregion
602
- //#region packages/theme/src/schemes/material.d.ts
603
- /** Material Darker — the deep dark Material variant. */
604
- declare const materialDark: ColorScheme;
605
- /** Material Lighter — the light Material variant. */
606
- declare const materialLight: ColorScheme;
607
- //#endregion
608
- //#region packages/theme/src/schemes/palenight.d.ts
609
- /** Palenight — the soft, purple-tinted Material dark variant. */
610
- declare const palenight: ColorScheme;
611
- //#endregion
612
- //#region packages/theme/src/schemes/ayu.d.ts
613
- /** Ayu Dark — deep dark variant with warm accents. */
614
- declare const ayuDark: ColorScheme;
615
- /** Ayu Mirage — balanced dark variant with softer contrast. */
616
- declare const ayuMirage: ColorScheme;
617
- /** Ayu Light — clean light variant. */
618
- declare const ayuLight: ColorScheme;
619
- //#endregion
620
- //#region packages/theme/src/schemes/nightfox.d.ts
621
- /** Nightfox — dark blue-toned variant. */
622
- declare const nightfox: ColorScheme;
623
- /** Dawnfox — warm light variant inspired by Rose Pine Dawn. */
624
- declare const dawnfox: ColorScheme;
625
- //#endregion
626
- //#region packages/theme/src/schemes/horizon.d.ts
627
- /** Horizon — warm dark variant with vivid accents. */
628
- declare const horizon: ColorScheme;
629
- //#endregion
630
- //#region packages/theme/src/schemes/moonfly.d.ts
631
- /** Moonfly — dark charcoal theme. */
632
- declare const moonfly: ColorScheme;
633
- //#endregion
634
- //#region packages/theme/src/schemes/nightfly.d.ts
635
- /** Nightfly — midnight-blue dark theme. */
636
- declare const nightfly: ColorScheme;
637
- //#endregion
638
- //#region packages/theme/src/schemes/oxocarbon.d.ts
639
- /** Oxocarbon Dark — IBM Carbon-inspired dark variant. */
640
- declare const oxocarbonDark: ColorScheme;
641
- /** Oxocarbon Light — IBM Carbon-inspired light variant. */
642
- declare const oxocarbonLight: ColorScheme;
643
- //#endregion
644
- //#region packages/theme/src/schemes/sonokai.d.ts
645
- /** Sonokai — vivid dark theme with Monokai-inspired accents. */
646
- declare const sonokai: ColorScheme;
647
- //#endregion
648
- //#region packages/theme/src/schemes/edge.d.ts
649
- /** Edge Dark — clean dark variant with balanced accents. */
650
- declare const edgeDark: ColorScheme;
651
- /** Edge Light — clean, readable light variant. */
652
- declare const edgeLight: ColorScheme;
653
- //#endregion
654
- //#region packages/theme/src/schemes/modus.d.ts
655
- /** Modus Vivendi — elegant dark theme with maximum legibility. */
656
- declare const modusVivendi: ColorScheme;
657
- /** Modus Operandi — elegant light theme with maximum legibility. */
658
- declare const modusOperandi: ColorScheme;
659
- //#endregion
660
- //#region packages/theme/src/schemes/index.d.ts
661
- /** Dark ANSI 16 theme — works on any terminal. Primary = yellow. */
662
- declare const ansi16DarkTheme: Theme;
663
- /** Light ANSI 16 theme — works on any terminal. Primary = blue. */
664
- declare const ansi16LightTheme: Theme;
665
- /** Dark truecolor theme — derived from Nord. */
666
- declare const defaultDarkTheme: Theme;
667
- /** Light truecolor theme — derived from Catppuccin Latte. */
668
- declare const defaultLightTheme: Theme;
669
- /** All built-in ColorScheme definitions (70+ palettes). */
670
- declare const builtinPalettes: Record<string, ColorScheme>;
671
- /** All built-in themes, indexed by name (includes backward-compat aliases). */
672
- declare const builtinThemes: Record<string, Theme>;
673
- /** Resolve a theme by name. Defaults to dark-ansi16. */
674
- declare function getThemeByName(name?: string): Theme;
675
- /** Resolve a palette by name. Returns undefined if not found. */
676
- declare function getSchemeByName(name: string): ColorScheme | undefined;
677
- //#endregion
678
- export { detectTheme as $, everforestDark as A, AnsiPrimary as At, oneDark as B, ayuMirage as C, presetTheme as Ct, snazzy as D, ThemeProvider as Dt, materialLight as E, ThemeContext as Et, rosePine as F, AnsiColorName as Ft, solarizedLight as G, tokyoNightDay as H, rosePineDawn as I, ColorLevel as It, catppuccinFrappe as J, dracula as K, rosePineMoon as L, TerminalCaps as Lt, kanagawaDragon as M, ColorScheme as Mt, kanagawaLotus as N, HueName as Nt, monokai as O, ThemeProviderProps as Ot, kanagawaWave as P, Theme as Pt, DetectThemeOptions as Q, gruvboxDark as R, defaultCaps as Rt, ayuLight as S, createTheme as St, materialDark as T, generateTheme as Tt, tokyoNightStorm as U, tokyoNight as V, solarizedDark as W, catppuccinMacchiato as X, catppuccinLatte as Y, catppuccinMocha as Z, moonfly as _, setActiveColorLevel as _t, defaultDarkTheme as a, resolveAliases as at, nightfox as b, fromColors as bt, getThemeByName as c, ThemeValidationResult as ct, edgeDark as d, validateColorScheme as dt, exportBase16 as et, edgeLight as f, ActiveColorLevel as ft, nightfly as g, pushContextTheme as gt, oxocarbonLight as h, popContextTheme as ht, builtinThemes as i, themeToCSSVars as it, everforestLight as j, COLOR_SCHEME_FIELDS as jt, monokaiPro as k, useTheme as kt, modusOperandi as l, validateTheme as lt, oxocarbonDark as m, getActiveTheme as mt, ansi16LightTheme as n, Base16Scheme as nt, defaultLightTheme as o, resolveTokenAlias as ot, sonokai as p, getActiveColorLevel as pt, nord as q, builtinPalettes as r, autoGenerateTheme as rt, getSchemeByName as s, THEME_TOKEN_KEYS as st, ansi16DarkTheme as t, importBase16 as tt, modusVivendi as u, ValidationResult as ut, horizon as v, setActiveTheme as vt, palenight as w, quickTheme as wt, ayuDark as x, fromPreset as xt, dawnfox as y, fromBase16 as yt, gruvboxLight as z, detectTerminalCaps as zt };
679
- //# sourceMappingURL=index-dehZ18K-.d.mts.map