@a9s/cli 1.0.8 → 1.0.10
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/src/App.js +35 -3
- package/dist/src/components/AdvancedTextInput.js +3 -1
- package/dist/src/components/AutocompleteInput.js +3 -1
- package/dist/src/components/DetailPanel.js +3 -1
- package/dist/src/components/DiffViewer.js +3 -1
- package/dist/src/components/ErrorStatePanel.js +3 -1
- package/dist/src/components/HUD.js +3 -1
- package/dist/src/components/HelpPanel.js +6 -4
- package/dist/src/components/ModeBar.js +5 -8
- package/dist/src/components/Table/index.js +19 -26
- package/dist/src/components/TableSkeleton.js +3 -1
- package/dist/src/components/YankHelpPanel.js +3 -1
- package/dist/src/constants/commands.js +2 -1
- package/dist/src/constants/theme.js +608 -0
- package/dist/src/contexts/ThemeContext.js +13 -0
- package/dist/src/features/AppMainView.integration.test.js +1 -0
- package/dist/src/features/AppMainView.js +6 -4
- package/dist/src/hooks/useCommandRouter.js +5 -0
- package/dist/src/hooks/usePickerManager.js +35 -1
- package/dist/src/index.js +2 -1
- package/dist/src/state/atoms.js +3 -0
- package/dist/src/utils/config.js +36 -0
- package/dist/src/views/dynamodb/adapter.js +2 -1
- package/dist/src/views/iam/adapter.js +2 -1
- package/dist/src/views/route53/adapter.js +2 -1
- package/dist/src/views/s3/adapter.js +2 -1
- package/dist/src/views/secretsmanager/adapter.js +2 -1
- package/package.json +2 -1
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme system: multiple named themes, switchable at runtime via :theme command.
|
|
3
|
+
*
|
|
4
|
+
* Monokai color strategy:
|
|
5
|
+
* - Magenta: Primary brand/structure — panel titles, account name
|
|
6
|
+
* - Blue: Active state — selected row bg, path bar bg, active tab bg
|
|
7
|
+
* - Cyan: Table & panel structure — column headers, mode icon, detail labels, profile
|
|
8
|
+
* - Yellow: Data & keys — account ID, identity line, keybinding keys
|
|
9
|
+
* - Green: Location & success — region, success feedback, confirm keys
|
|
10
|
+
* - Red: Errors & destructive
|
|
11
|
+
* - White: Body text
|
|
12
|
+
* - Gray: Subtle chrome — separators, dividers, inactive elements
|
|
13
|
+
*
|
|
14
|
+
* Catppuccin Mocha strategy (256-color hex palette):
|
|
15
|
+
* - #cba6f7 Mauve: panel titles, account name
|
|
16
|
+
* - #89b4fa Blue: selected row bg, path bar bg, active tab bg
|
|
17
|
+
* - #89dceb Sky: column headers, mode icon, detail labels, profile
|
|
18
|
+
* - #f9e2af Yellow: account ID, identity line, keybinding keys
|
|
19
|
+
* - #a6e3a1 Green: region, success feedback
|
|
20
|
+
* - #f38ba8 Red: errors
|
|
21
|
+
* - #cdd6f4 Text: body text
|
|
22
|
+
* - #45475a Surface1: separators, dividers
|
|
23
|
+
*/
|
|
24
|
+
export const THEME_LABELS = {
|
|
25
|
+
monokai: "Monokai",
|
|
26
|
+
"catppuccin-mocha": "Catppuccin Mocha",
|
|
27
|
+
nord: "Nord",
|
|
28
|
+
"tokyo-night": "Tokyo Night",
|
|
29
|
+
"gruvbox-dark": "Gruvbox Dark",
|
|
30
|
+
dracula: "Dracula",
|
|
31
|
+
};
|
|
32
|
+
// ─── Monokai (named terminal colors) ──────────────────────────────────────────
|
|
33
|
+
const MONOKAI_THEME = {
|
|
34
|
+
global: {
|
|
35
|
+
mainBg: "black",
|
|
36
|
+
},
|
|
37
|
+
table: {
|
|
38
|
+
tableContainerBg: "black",
|
|
39
|
+
selectedRowBg: "blue",
|
|
40
|
+
selectedRowText: "white",
|
|
41
|
+
filterMatchText: "yellow",
|
|
42
|
+
filterMatchSelectedText: "white",
|
|
43
|
+
columnHeaderText: "cyan",
|
|
44
|
+
columnHeaderMarker: "yellow",
|
|
45
|
+
rowSeparatorText: "gray",
|
|
46
|
+
emptyStateText: "white",
|
|
47
|
+
scrollPositionText: "green",
|
|
48
|
+
},
|
|
49
|
+
hud: {
|
|
50
|
+
accountNameText: "magenta",
|
|
51
|
+
accountIdText: "yellow",
|
|
52
|
+
regionText: "green",
|
|
53
|
+
profileText: "cyan",
|
|
54
|
+
separatorText: "gray",
|
|
55
|
+
currentIdentityText: "yellow",
|
|
56
|
+
pathBarBg: "blue",
|
|
57
|
+
pathBarText: "white",
|
|
58
|
+
loadingSpinnerText: "cyan",
|
|
59
|
+
},
|
|
60
|
+
modebar: {
|
|
61
|
+
modeIconText: "cyan",
|
|
62
|
+
keybindingKeyText: "yellow",
|
|
63
|
+
keybindingDescText: "white",
|
|
64
|
+
keybindingSeparatorText: "gray",
|
|
65
|
+
},
|
|
66
|
+
panel: {
|
|
67
|
+
panelTitleText: "magenta",
|
|
68
|
+
panelDividerText: "gray",
|
|
69
|
+
panelHintText: "white",
|
|
70
|
+
panelScrollIndicatorText: "cyan",
|
|
71
|
+
detailFieldLabelText: "cyan",
|
|
72
|
+
defaultBorderText: "gray",
|
|
73
|
+
helpPanelBorderText: "cyan",
|
|
74
|
+
yankPanelBorderText: "cyan",
|
|
75
|
+
detailPanelBorderText: "gray",
|
|
76
|
+
activeTabBg: "blue",
|
|
77
|
+
activeTabText: "white",
|
|
78
|
+
inactiveTabText: "gray",
|
|
79
|
+
keyText: "yellow",
|
|
80
|
+
},
|
|
81
|
+
diff: {
|
|
82
|
+
originalHeaderText: "red",
|
|
83
|
+
updatedHeaderText: "green",
|
|
84
|
+
diffDividerText: "gray",
|
|
85
|
+
},
|
|
86
|
+
error: {
|
|
87
|
+
errorBorderText: "red",
|
|
88
|
+
errorTitleText: "red",
|
|
89
|
+
errorHintText: "white",
|
|
90
|
+
},
|
|
91
|
+
upload: {
|
|
92
|
+
uploadBorderText: "yellow",
|
|
93
|
+
uploadTitleText: "yellow",
|
|
94
|
+
uploadSubtitleText: "white",
|
|
95
|
+
uploadDiffDividerText: "gray",
|
|
96
|
+
uploadConfirmPromptText: "white",
|
|
97
|
+
uploadLoadingText: "cyan",
|
|
98
|
+
uploadConfirmKeyText: "green",
|
|
99
|
+
uploadCancelKeyText: "red",
|
|
100
|
+
},
|
|
101
|
+
feedback: {
|
|
102
|
+
successText: "green",
|
|
103
|
+
promptText: "cyan",
|
|
104
|
+
confirmText: "green",
|
|
105
|
+
},
|
|
106
|
+
input: {
|
|
107
|
+
placeholderText: "gray",
|
|
108
|
+
suggestionText: "cyan",
|
|
109
|
+
},
|
|
110
|
+
skeleton: {
|
|
111
|
+
skeletonContextLabelText: "cyan",
|
|
112
|
+
skeletonHeaderText: "yellow",
|
|
113
|
+
skeletonDividerText: "gray",
|
|
114
|
+
skeletonCellText: "gray",
|
|
115
|
+
skeletonSeparatorText: "gray",
|
|
116
|
+
},
|
|
117
|
+
serviceColors: {
|
|
118
|
+
s3: { bg: "red", fg: "white" },
|
|
119
|
+
iam: { bg: "blue", fg: "white" },
|
|
120
|
+
secretsmanager: { bg: "magenta", fg: "white" },
|
|
121
|
+
route53: { bg: "cyan", fg: "black" },
|
|
122
|
+
dynamodb: { bg: "green", fg: "black" },
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
// ─── Catppuccin Mocha (256-color hex palette) ─────────────────────────────────
|
|
126
|
+
// https://github.com/catppuccin/catppuccin#-palette
|
|
127
|
+
const CATPPUCCIN_MOCHA_THEME = {
|
|
128
|
+
global: {
|
|
129
|
+
mainBg: "#1e1e2e", // Base
|
|
130
|
+
},
|
|
131
|
+
table: {
|
|
132
|
+
tableContainerBg: "#1e1e2e", // Base
|
|
133
|
+
selectedRowBg: "#313244", // Surface0
|
|
134
|
+
selectedRowText: "#cdd6f4", // Text
|
|
135
|
+
filterMatchText: "#f9e2af", // Yellow
|
|
136
|
+
filterMatchSelectedText: "#cdd6f4",
|
|
137
|
+
columnHeaderText: "#89dceb", // Sky
|
|
138
|
+
columnHeaderMarker: "#f9e2af",
|
|
139
|
+
rowSeparatorText: "#313244", // Surface0
|
|
140
|
+
emptyStateText: "#cdd6f4",
|
|
141
|
+
scrollPositionText: "#a6e3a1", // Green
|
|
142
|
+
},
|
|
143
|
+
hud: {
|
|
144
|
+
accountNameText: "#cba6f7", // Mauve
|
|
145
|
+
accountIdText: "#f9e2af", // Yellow
|
|
146
|
+
regionText: "#a6e3a1", // Green
|
|
147
|
+
profileText: "#89dceb", // Sky
|
|
148
|
+
separatorText: "#45475a", // Surface1
|
|
149
|
+
currentIdentityText: "#f9e2af",
|
|
150
|
+
pathBarBg: "#89b4fa", // Blue
|
|
151
|
+
pathBarText: "#1e1e2e", // Base
|
|
152
|
+
loadingSpinnerText: "#89dceb",
|
|
153
|
+
},
|
|
154
|
+
modebar: {
|
|
155
|
+
modeIconText: "#89dceb", // Sky
|
|
156
|
+
keybindingKeyText: "#f9e2af", // Yellow
|
|
157
|
+
keybindingDescText: "#cdd6f4",
|
|
158
|
+
keybindingSeparatorText: "#45475a",
|
|
159
|
+
},
|
|
160
|
+
panel: {
|
|
161
|
+
panelTitleText: "#cba6f7", // Mauve
|
|
162
|
+
panelDividerText: "#45475a", // Surface1
|
|
163
|
+
panelHintText: "#cdd6f4",
|
|
164
|
+
panelScrollIndicatorText: "#89dceb",
|
|
165
|
+
detailFieldLabelText: "#89dceb",
|
|
166
|
+
defaultBorderText: "#45475a",
|
|
167
|
+
helpPanelBorderText: "#89dceb",
|
|
168
|
+
yankPanelBorderText: "#89dceb",
|
|
169
|
+
detailPanelBorderText: "#45475a",
|
|
170
|
+
activeTabBg: "#89b4fa", // Blue
|
|
171
|
+
activeTabText: "#1e1e2e", // Base
|
|
172
|
+
inactiveTabText: "#6c7086", // Overlay0
|
|
173
|
+
keyText: "#f9e2af",
|
|
174
|
+
},
|
|
175
|
+
diff: {
|
|
176
|
+
originalHeaderText: "#f38ba8", // Red
|
|
177
|
+
updatedHeaderText: "#a6e3a1", // Green
|
|
178
|
+
diffDividerText: "#45475a",
|
|
179
|
+
},
|
|
180
|
+
error: {
|
|
181
|
+
errorBorderText: "#f38ba8",
|
|
182
|
+
errorTitleText: "#f38ba8",
|
|
183
|
+
errorHintText: "#cdd6f4",
|
|
184
|
+
},
|
|
185
|
+
upload: {
|
|
186
|
+
uploadBorderText: "#f9e2af",
|
|
187
|
+
uploadTitleText: "#f9e2af",
|
|
188
|
+
uploadSubtitleText: "#cdd6f4",
|
|
189
|
+
uploadDiffDividerText: "#45475a",
|
|
190
|
+
uploadConfirmPromptText: "#cdd6f4",
|
|
191
|
+
uploadLoadingText: "#89dceb",
|
|
192
|
+
uploadConfirmKeyText: "#a6e3a1",
|
|
193
|
+
uploadCancelKeyText: "#f38ba8",
|
|
194
|
+
},
|
|
195
|
+
feedback: {
|
|
196
|
+
successText: "#a6e3a1",
|
|
197
|
+
promptText: "#89dceb",
|
|
198
|
+
confirmText: "#a6e3a1",
|
|
199
|
+
},
|
|
200
|
+
input: {
|
|
201
|
+
placeholderText: "#6c7086", // Overlay0
|
|
202
|
+
suggestionText: "#89dceb",
|
|
203
|
+
},
|
|
204
|
+
skeleton: {
|
|
205
|
+
skeletonContextLabelText: "#89dceb",
|
|
206
|
+
skeletonHeaderText: "#f9e2af",
|
|
207
|
+
skeletonDividerText: "#45475a",
|
|
208
|
+
skeletonCellText: "#45475a",
|
|
209
|
+
skeletonSeparatorText: "#45475a",
|
|
210
|
+
},
|
|
211
|
+
serviceColors: {
|
|
212
|
+
s3: { bg: "#f38ba8", fg: "#1e1e2e" }, // Red
|
|
213
|
+
iam: { bg: "#89b4fa", fg: "#1e1e2e" }, // Blue
|
|
214
|
+
secretsmanager: { bg: "#cba6f7", fg: "#1e1e2e" }, // Mauve
|
|
215
|
+
route53: { bg: "#89dceb", fg: "#1e1e2e" }, // Sky
|
|
216
|
+
dynamodb: { bg: "#a6e3a1", fg: "#1e1e2e" }, // Green
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
// ─── Nord ─────────────────────────────────────────────────────────────────────
|
|
220
|
+
// https://www.nordtheme.com/docs/colors-and-palettes
|
|
221
|
+
const NORD_THEME = {
|
|
222
|
+
global: {
|
|
223
|
+
mainBg: "#2e3440", // Polar Night 0
|
|
224
|
+
},
|
|
225
|
+
table: {
|
|
226
|
+
tableContainerBg: "#2e3440",
|
|
227
|
+
selectedRowBg: "#3b4252", // Polar Night 1
|
|
228
|
+
selectedRowText: "#eceff4", // Snow Storm 2
|
|
229
|
+
filterMatchText: "#ebcb8b", // Aurora Yellow
|
|
230
|
+
filterMatchSelectedText: "#eceff4",
|
|
231
|
+
columnHeaderText: "#88c0d0", // Frost Blue
|
|
232
|
+
columnHeaderMarker: "#ebcb8b",
|
|
233
|
+
rowSeparatorText: "#3b4252",
|
|
234
|
+
emptyStateText: "#d8dee9",
|
|
235
|
+
scrollPositionText: "#a3be8c", // Aurora Green
|
|
236
|
+
},
|
|
237
|
+
hud: {
|
|
238
|
+
accountNameText: "#b48ead", // Aurora Purple
|
|
239
|
+
accountIdText: "#ebcb8b",
|
|
240
|
+
regionText: "#a3be8c",
|
|
241
|
+
profileText: "#88c0d0",
|
|
242
|
+
separatorText: "#4c566a", // Polar Night 3
|
|
243
|
+
currentIdentityText: "#ebcb8b",
|
|
244
|
+
pathBarBg: "#5e81ac", // Frost Dark Blue
|
|
245
|
+
pathBarText: "#eceff4",
|
|
246
|
+
loadingSpinnerText: "#88c0d0",
|
|
247
|
+
},
|
|
248
|
+
modebar: {
|
|
249
|
+
modeIconText: "#88c0d0",
|
|
250
|
+
keybindingKeyText: "#ebcb8b",
|
|
251
|
+
keybindingDescText: "#d8dee9",
|
|
252
|
+
keybindingSeparatorText: "#4c566a",
|
|
253
|
+
},
|
|
254
|
+
panel: {
|
|
255
|
+
panelTitleText: "#b48ead",
|
|
256
|
+
panelDividerText: "#4c566a",
|
|
257
|
+
panelHintText: "#d8dee9",
|
|
258
|
+
panelScrollIndicatorText: "#88c0d0",
|
|
259
|
+
detailFieldLabelText: "#88c0d0",
|
|
260
|
+
defaultBorderText: "#4c566a",
|
|
261
|
+
helpPanelBorderText: "#88c0d0",
|
|
262
|
+
yankPanelBorderText: "#88c0d0",
|
|
263
|
+
detailPanelBorderText: "#4c566a",
|
|
264
|
+
activeTabBg: "#5e81ac",
|
|
265
|
+
activeTabText: "#eceff4",
|
|
266
|
+
inactiveTabText: "#4c566a",
|
|
267
|
+
keyText: "#ebcb8b",
|
|
268
|
+
},
|
|
269
|
+
diff: {
|
|
270
|
+
originalHeaderText: "#bf616a", // Aurora Red
|
|
271
|
+
updatedHeaderText: "#a3be8c",
|
|
272
|
+
diffDividerText: "#4c566a",
|
|
273
|
+
},
|
|
274
|
+
error: {
|
|
275
|
+
errorBorderText: "#bf616a",
|
|
276
|
+
errorTitleText: "#bf616a",
|
|
277
|
+
errorHintText: "#d8dee9",
|
|
278
|
+
},
|
|
279
|
+
upload: {
|
|
280
|
+
uploadBorderText: "#ebcb8b",
|
|
281
|
+
uploadTitleText: "#ebcb8b",
|
|
282
|
+
uploadSubtitleText: "#d8dee9",
|
|
283
|
+
uploadDiffDividerText: "#4c566a",
|
|
284
|
+
uploadConfirmPromptText: "#d8dee9",
|
|
285
|
+
uploadLoadingText: "#88c0d0",
|
|
286
|
+
uploadConfirmKeyText: "#a3be8c",
|
|
287
|
+
uploadCancelKeyText: "#bf616a",
|
|
288
|
+
},
|
|
289
|
+
feedback: {
|
|
290
|
+
successText: "#a3be8c",
|
|
291
|
+
promptText: "#88c0d0",
|
|
292
|
+
confirmText: "#a3be8c",
|
|
293
|
+
},
|
|
294
|
+
input: {
|
|
295
|
+
placeholderText: "#4c566a",
|
|
296
|
+
suggestionText: "#88c0d0",
|
|
297
|
+
},
|
|
298
|
+
skeleton: {
|
|
299
|
+
skeletonContextLabelText: "#88c0d0",
|
|
300
|
+
skeletonHeaderText: "#ebcb8b",
|
|
301
|
+
skeletonDividerText: "#4c566a",
|
|
302
|
+
skeletonCellText: "#4c566a",
|
|
303
|
+
skeletonSeparatorText: "#4c566a",
|
|
304
|
+
},
|
|
305
|
+
serviceColors: {
|
|
306
|
+
s3: { bg: "#bf616a", fg: "#eceff4" }, // Aurora Red
|
|
307
|
+
iam: { bg: "#5e81ac", fg: "#eceff4" }, // Frost Dark Blue
|
|
308
|
+
secretsmanager: { bg: "#b48ead", fg: "#eceff4" }, // Aurora Purple
|
|
309
|
+
route53: { bg: "#88c0d0", fg: "#2e3440" }, // Frost Blue
|
|
310
|
+
dynamodb: { bg: "#a3be8c", fg: "#2e3440" }, // Aurora Green
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
// ─── Tokyo Night ──────────────────────────────────────────────────────────────
|
|
314
|
+
// https://github.com/folke/tokyonight.nvim
|
|
315
|
+
const TOKYO_NIGHT_THEME = {
|
|
316
|
+
global: {
|
|
317
|
+
mainBg: "#1a1b26",
|
|
318
|
+
},
|
|
319
|
+
table: {
|
|
320
|
+
tableContainerBg: "#1a1b26",
|
|
321
|
+
selectedRowBg: "#292e42", // bg_highlight
|
|
322
|
+
selectedRowText: "#c0caf5", // fg
|
|
323
|
+
filterMatchText: "#e0af68", // yellow
|
|
324
|
+
filterMatchSelectedText: "#c0caf5",
|
|
325
|
+
columnHeaderText: "#7dcfff", // cyan
|
|
326
|
+
columnHeaderMarker: "#e0af68",
|
|
327
|
+
rowSeparatorText: "#292e42",
|
|
328
|
+
emptyStateText: "#c0caf5",
|
|
329
|
+
scrollPositionText: "#9ece6a", // green
|
|
330
|
+
},
|
|
331
|
+
hud: {
|
|
332
|
+
accountNameText: "#bb9af7", // magenta/purple
|
|
333
|
+
accountIdText: "#e0af68",
|
|
334
|
+
regionText: "#9ece6a",
|
|
335
|
+
profileText: "#7dcfff",
|
|
336
|
+
separatorText: "#414868", // terminal_black
|
|
337
|
+
currentIdentityText: "#e0af68",
|
|
338
|
+
pathBarBg: "#7aa2f7", // blue
|
|
339
|
+
pathBarText: "#1a1b26",
|
|
340
|
+
loadingSpinnerText: "#7dcfff",
|
|
341
|
+
},
|
|
342
|
+
modebar: {
|
|
343
|
+
modeIconText: "#7dcfff",
|
|
344
|
+
keybindingKeyText: "#e0af68",
|
|
345
|
+
keybindingDescText: "#c0caf5",
|
|
346
|
+
keybindingSeparatorText: "#414868",
|
|
347
|
+
},
|
|
348
|
+
panel: {
|
|
349
|
+
panelTitleText: "#bb9af7",
|
|
350
|
+
panelDividerText: "#414868",
|
|
351
|
+
panelHintText: "#c0caf5",
|
|
352
|
+
panelScrollIndicatorText: "#7dcfff",
|
|
353
|
+
detailFieldLabelText: "#7dcfff",
|
|
354
|
+
defaultBorderText: "#414868",
|
|
355
|
+
helpPanelBorderText: "#7dcfff",
|
|
356
|
+
yankPanelBorderText: "#7dcfff",
|
|
357
|
+
detailPanelBorderText: "#414868",
|
|
358
|
+
activeTabBg: "#7aa2f7",
|
|
359
|
+
activeTabText: "#1a1b26",
|
|
360
|
+
inactiveTabText: "#414868",
|
|
361
|
+
keyText: "#e0af68",
|
|
362
|
+
},
|
|
363
|
+
diff: {
|
|
364
|
+
originalHeaderText: "#f7768e", // red
|
|
365
|
+
updatedHeaderText: "#9ece6a",
|
|
366
|
+
diffDividerText: "#414868",
|
|
367
|
+
},
|
|
368
|
+
error: {
|
|
369
|
+
errorBorderText: "#f7768e",
|
|
370
|
+
errorTitleText: "#f7768e",
|
|
371
|
+
errorHintText: "#c0caf5",
|
|
372
|
+
},
|
|
373
|
+
upload: {
|
|
374
|
+
uploadBorderText: "#e0af68",
|
|
375
|
+
uploadTitleText: "#e0af68",
|
|
376
|
+
uploadSubtitleText: "#c0caf5",
|
|
377
|
+
uploadDiffDividerText: "#414868",
|
|
378
|
+
uploadConfirmPromptText: "#c0caf5",
|
|
379
|
+
uploadLoadingText: "#7dcfff",
|
|
380
|
+
uploadConfirmKeyText: "#9ece6a",
|
|
381
|
+
uploadCancelKeyText: "#f7768e",
|
|
382
|
+
},
|
|
383
|
+
feedback: {
|
|
384
|
+
successText: "#9ece6a",
|
|
385
|
+
promptText: "#7dcfff",
|
|
386
|
+
confirmText: "#9ece6a",
|
|
387
|
+
},
|
|
388
|
+
input: {
|
|
389
|
+
placeholderText: "#414868",
|
|
390
|
+
suggestionText: "#7dcfff",
|
|
391
|
+
},
|
|
392
|
+
skeleton: {
|
|
393
|
+
skeletonContextLabelText: "#7dcfff",
|
|
394
|
+
skeletonHeaderText: "#e0af68",
|
|
395
|
+
skeletonDividerText: "#414868",
|
|
396
|
+
skeletonCellText: "#414868",
|
|
397
|
+
skeletonSeparatorText: "#414868",
|
|
398
|
+
},
|
|
399
|
+
serviceColors: {
|
|
400
|
+
s3: { bg: "#f7768e", fg: "#1a1b26" }, // red
|
|
401
|
+
iam: { bg: "#7aa2f7", fg: "#1a1b26" }, // blue
|
|
402
|
+
secretsmanager: { bg: "#bb9af7", fg: "#1a1b26" }, // magenta
|
|
403
|
+
route53: { bg: "#7dcfff", fg: "#1a1b26" }, // cyan
|
|
404
|
+
dynamodb: { bg: "#9ece6a", fg: "#1a1b26" }, // green
|
|
405
|
+
},
|
|
406
|
+
};
|
|
407
|
+
// ─── Gruvbox Dark ─────────────────────────────────────────────────────────────
|
|
408
|
+
// https://github.com/morhetz/gruvbox
|
|
409
|
+
const GRUVBOX_DARK_THEME = {
|
|
410
|
+
global: {
|
|
411
|
+
mainBg: "#282828",
|
|
412
|
+
},
|
|
413
|
+
table: {
|
|
414
|
+
tableContainerBg: "#282828",
|
|
415
|
+
selectedRowBg: "#3c3836", // bg1
|
|
416
|
+
selectedRowText: "#ebdbb2", // fg
|
|
417
|
+
filterMatchText: "#fabd2f", // bright yellow
|
|
418
|
+
filterMatchSelectedText: "#ebdbb2",
|
|
419
|
+
columnHeaderText: "#83a598", // bright blue
|
|
420
|
+
columnHeaderMarker: "#fabd2f",
|
|
421
|
+
rowSeparatorText: "#3c3836",
|
|
422
|
+
emptyStateText: "#ebdbb2",
|
|
423
|
+
scrollPositionText: "#b8bb26", // bright green
|
|
424
|
+
},
|
|
425
|
+
hud: {
|
|
426
|
+
accountNameText: "#d3869b", // bright purple
|
|
427
|
+
accountIdText: "#fabd2f",
|
|
428
|
+
regionText: "#b8bb26",
|
|
429
|
+
profileText: "#83a598",
|
|
430
|
+
separatorText: "#665c54", // bg3
|
|
431
|
+
currentIdentityText: "#fabd2f",
|
|
432
|
+
pathBarBg: "#458588", // blue
|
|
433
|
+
pathBarText: "#ebdbb2",
|
|
434
|
+
loadingSpinnerText: "#83a598",
|
|
435
|
+
},
|
|
436
|
+
modebar: {
|
|
437
|
+
modeIconText: "#83a598",
|
|
438
|
+
keybindingKeyText: "#fabd2f",
|
|
439
|
+
keybindingDescText: "#ebdbb2",
|
|
440
|
+
keybindingSeparatorText: "#665c54",
|
|
441
|
+
},
|
|
442
|
+
panel: {
|
|
443
|
+
panelTitleText: "#d3869b",
|
|
444
|
+
panelDividerText: "#665c54",
|
|
445
|
+
panelHintText: "#ebdbb2",
|
|
446
|
+
panelScrollIndicatorText: "#83a598",
|
|
447
|
+
detailFieldLabelText: "#83a598",
|
|
448
|
+
defaultBorderText: "#665c54",
|
|
449
|
+
helpPanelBorderText: "#83a598",
|
|
450
|
+
yankPanelBorderText: "#83a598",
|
|
451
|
+
detailPanelBorderText: "#665c54",
|
|
452
|
+
activeTabBg: "#458588",
|
|
453
|
+
activeTabText: "#ebdbb2",
|
|
454
|
+
inactiveTabText: "#665c54",
|
|
455
|
+
keyText: "#fabd2f",
|
|
456
|
+
},
|
|
457
|
+
diff: {
|
|
458
|
+
originalHeaderText: "#fb4934", // bright red
|
|
459
|
+
updatedHeaderText: "#b8bb26",
|
|
460
|
+
diffDividerText: "#665c54",
|
|
461
|
+
},
|
|
462
|
+
error: {
|
|
463
|
+
errorBorderText: "#fb4934",
|
|
464
|
+
errorTitleText: "#fb4934",
|
|
465
|
+
errorHintText: "#ebdbb2",
|
|
466
|
+
},
|
|
467
|
+
upload: {
|
|
468
|
+
uploadBorderText: "#fabd2f",
|
|
469
|
+
uploadTitleText: "#fabd2f",
|
|
470
|
+
uploadSubtitleText: "#ebdbb2",
|
|
471
|
+
uploadDiffDividerText: "#665c54",
|
|
472
|
+
uploadConfirmPromptText: "#ebdbb2",
|
|
473
|
+
uploadLoadingText: "#83a598",
|
|
474
|
+
uploadConfirmKeyText: "#b8bb26",
|
|
475
|
+
uploadCancelKeyText: "#fb4934",
|
|
476
|
+
},
|
|
477
|
+
feedback: {
|
|
478
|
+
successText: "#b8bb26",
|
|
479
|
+
promptText: "#83a598",
|
|
480
|
+
confirmText: "#b8bb26",
|
|
481
|
+
},
|
|
482
|
+
input: {
|
|
483
|
+
placeholderText: "#665c54",
|
|
484
|
+
suggestionText: "#83a598",
|
|
485
|
+
},
|
|
486
|
+
skeleton: {
|
|
487
|
+
skeletonContextLabelText: "#83a598",
|
|
488
|
+
skeletonHeaderText: "#fabd2f",
|
|
489
|
+
skeletonDividerText: "#665c54",
|
|
490
|
+
skeletonCellText: "#665c54",
|
|
491
|
+
skeletonSeparatorText: "#665c54",
|
|
492
|
+
},
|
|
493
|
+
serviceColors: {
|
|
494
|
+
s3: { bg: "#fb4934", fg: "#282828" }, // bright red
|
|
495
|
+
iam: { bg: "#83a598", fg: "#282828" }, // bright blue
|
|
496
|
+
secretsmanager: { bg: "#d3869b", fg: "#282828" }, // bright purple
|
|
497
|
+
route53: { bg: "#8ec07c", fg: "#282828" }, // bright aqua
|
|
498
|
+
dynamodb: { bg: "#b8bb26", fg: "#282828" }, // bright green
|
|
499
|
+
},
|
|
500
|
+
};
|
|
501
|
+
// ─── Dracula ──────────────────────────────────────────────────────────────────
|
|
502
|
+
// https://draculatheme.com/contribute
|
|
503
|
+
const DRACULA_THEME = {
|
|
504
|
+
global: {
|
|
505
|
+
mainBg: "#282a36",
|
|
506
|
+
},
|
|
507
|
+
table: {
|
|
508
|
+
tableContainerBg: "#282a36",
|
|
509
|
+
selectedRowBg: "#44475a", // Current Line
|
|
510
|
+
selectedRowText: "#f8f8f2", // Foreground
|
|
511
|
+
filterMatchText: "#f1fa8c", // Yellow
|
|
512
|
+
filterMatchSelectedText: "#f8f8f2",
|
|
513
|
+
columnHeaderText: "#8be9fd", // Cyan
|
|
514
|
+
columnHeaderMarker: "#f1fa8c",
|
|
515
|
+
rowSeparatorText: "#44475a",
|
|
516
|
+
emptyStateText: "#f8f8f2",
|
|
517
|
+
scrollPositionText: "#50fa7b", // Green
|
|
518
|
+
},
|
|
519
|
+
hud: {
|
|
520
|
+
accountNameText: "#ff79c6", // Pink
|
|
521
|
+
accountIdText: "#f1fa8c",
|
|
522
|
+
regionText: "#50fa7b",
|
|
523
|
+
profileText: "#8be9fd",
|
|
524
|
+
separatorText: "#6272a4", // Comment
|
|
525
|
+
currentIdentityText: "#f1fa8c",
|
|
526
|
+
pathBarBg: "#bd93f9", // Purple
|
|
527
|
+
pathBarText: "#282a36",
|
|
528
|
+
loadingSpinnerText: "#8be9fd",
|
|
529
|
+
},
|
|
530
|
+
modebar: {
|
|
531
|
+
modeIconText: "#8be9fd",
|
|
532
|
+
keybindingKeyText: "#f1fa8c",
|
|
533
|
+
keybindingDescText: "#f8f8f2",
|
|
534
|
+
keybindingSeparatorText: "#6272a4",
|
|
535
|
+
},
|
|
536
|
+
panel: {
|
|
537
|
+
panelTitleText: "#ff79c6",
|
|
538
|
+
panelDividerText: "#6272a4",
|
|
539
|
+
panelHintText: "#f8f8f2",
|
|
540
|
+
panelScrollIndicatorText: "#8be9fd",
|
|
541
|
+
detailFieldLabelText: "#8be9fd",
|
|
542
|
+
defaultBorderText: "#6272a4",
|
|
543
|
+
helpPanelBorderText: "#8be9fd",
|
|
544
|
+
yankPanelBorderText: "#8be9fd",
|
|
545
|
+
detailPanelBorderText: "#6272a4",
|
|
546
|
+
activeTabBg: "#bd93f9",
|
|
547
|
+
activeTabText: "#282a36",
|
|
548
|
+
inactiveTabText: "#6272a4",
|
|
549
|
+
keyText: "#f1fa8c",
|
|
550
|
+
},
|
|
551
|
+
diff: {
|
|
552
|
+
originalHeaderText: "#ff5555", // Red
|
|
553
|
+
updatedHeaderText: "#50fa7b",
|
|
554
|
+
diffDividerText: "#6272a4",
|
|
555
|
+
},
|
|
556
|
+
error: {
|
|
557
|
+
errorBorderText: "#ff5555",
|
|
558
|
+
errorTitleText: "#ff5555",
|
|
559
|
+
errorHintText: "#f8f8f2",
|
|
560
|
+
},
|
|
561
|
+
upload: {
|
|
562
|
+
uploadBorderText: "#ffb86c", // Orange
|
|
563
|
+
uploadTitleText: "#ffb86c",
|
|
564
|
+
uploadSubtitleText: "#f8f8f2",
|
|
565
|
+
uploadDiffDividerText: "#6272a4",
|
|
566
|
+
uploadConfirmPromptText: "#f8f8f2",
|
|
567
|
+
uploadLoadingText: "#8be9fd",
|
|
568
|
+
uploadConfirmKeyText: "#50fa7b",
|
|
569
|
+
uploadCancelKeyText: "#ff5555",
|
|
570
|
+
},
|
|
571
|
+
feedback: {
|
|
572
|
+
successText: "#50fa7b",
|
|
573
|
+
promptText: "#8be9fd",
|
|
574
|
+
confirmText: "#50fa7b",
|
|
575
|
+
},
|
|
576
|
+
input: {
|
|
577
|
+
placeholderText: "#6272a4",
|
|
578
|
+
suggestionText: "#8be9fd",
|
|
579
|
+
},
|
|
580
|
+
skeleton: {
|
|
581
|
+
skeletonContextLabelText: "#8be9fd",
|
|
582
|
+
skeletonHeaderText: "#f1fa8c",
|
|
583
|
+
skeletonDividerText: "#6272a4",
|
|
584
|
+
skeletonCellText: "#6272a4",
|
|
585
|
+
skeletonSeparatorText: "#6272a4",
|
|
586
|
+
},
|
|
587
|
+
serviceColors: {
|
|
588
|
+
s3: { bg: "#ff5555", fg: "#282a36" }, // Red
|
|
589
|
+
iam: { bg: "#bd93f9", fg: "#282a36" }, // Purple
|
|
590
|
+
secretsmanager: { bg: "#ff79c6", fg: "#282a36" }, // Pink
|
|
591
|
+
route53: { bg: "#8be9fd", fg: "#282a36" }, // Cyan
|
|
592
|
+
dynamodb: { bg: "#50fa7b", fg: "#282a36" }, // Green
|
|
593
|
+
},
|
|
594
|
+
};
|
|
595
|
+
// ─── Registry ─────────────────────────────────────────────────────────────────
|
|
596
|
+
export const THEMES = {
|
|
597
|
+
monokai: MONOKAI_THEME,
|
|
598
|
+
"catppuccin-mocha": CATPPUCCIN_MOCHA_THEME,
|
|
599
|
+
nord: NORD_THEME,
|
|
600
|
+
"tokyo-night": TOKYO_NIGHT_THEME,
|
|
601
|
+
"gruvbox-dark": GRUVBOX_DARK_THEME,
|
|
602
|
+
dracula: DRACULA_THEME,
|
|
603
|
+
};
|
|
604
|
+
/**
|
|
605
|
+
* Backward-compat export for service adapters that statically import hudColor.
|
|
606
|
+
* Components should derive hudColor from useTheme().serviceColors instead.
|
|
607
|
+
*/
|
|
608
|
+
export const SERVICE_COLORS = MONOKAI_THEME.serviceColors;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
import { useAtomValue } from "jotai";
|
|
4
|
+
import { THEMES } from "../constants/theme.js";
|
|
5
|
+
import { themeNameAtom } from "../state/atoms.js";
|
|
6
|
+
const ThemeContext = createContext(THEMES.monokai);
|
|
7
|
+
export function useTheme() {
|
|
8
|
+
return useContext(ThemeContext);
|
|
9
|
+
}
|
|
10
|
+
export function ThemeProvider({ children }) {
|
|
11
|
+
const themeName = useAtomValue(themeNameAtom);
|
|
12
|
+
return _jsx(ThemeContext.Provider, { value: THEMES[themeName], children: children });
|
|
13
|
+
}
|
|
@@ -13,7 +13,9 @@ import { debugLog } from "../utils/debugLogger.js";
|
|
|
13
13
|
import { revealSecretsAtom } from "../state/atoms.js";
|
|
14
14
|
import { truncateSecretForTable } from "../utils/secretDisplay.js";
|
|
15
15
|
import { getCellValue } from "../types.js";
|
|
16
|
+
import { useTheme } from "../contexts/ThemeContext.js";
|
|
16
17
|
export function AppMainView({ helpPanel, helpTabs, pickers, error, describeState, isLoading, filteredRows, uploadPending, uploadPreview, columns, selectedIndex, scrollOffset, filterText, adapter, termCols, tableHeight, headerMarkers, yankHelpOpen, yankOptions, yankHelpRow, panelScrollOffset, }) {
|
|
18
|
+
const THEME = useTheme();
|
|
17
19
|
const revealSecrets = useAtomValue(revealSecretsAtom);
|
|
18
20
|
// Format secret values for display ONLY - original rows (via filteredRows) stay unchanged for editing
|
|
19
21
|
const displayRows = useMemo(() => {
|
|
@@ -65,7 +67,7 @@ export function AppMainView({ helpPanel, helpTabs, pickers, error, describeState
|
|
|
65
67
|
error,
|
|
66
68
|
]);
|
|
67
69
|
if (helpPanel.helpOpen) {
|
|
68
|
-
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor:
|
|
70
|
+
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor: THEME.panel.helpPanelBorderText, children: _jsx(HelpPanel, { title: "Keyboard Help", scopeLabel: "All modes reference", tabs: helpTabs, activeTab: helpPanel.helpTabIndex, terminalWidth: termCols, maxRows: helpPanel.helpVisibleRows, scrollOffset: helpPanel.helpScrollOffset }) }));
|
|
69
71
|
}
|
|
70
72
|
if (pickers.activePicker) {
|
|
71
73
|
const ap = pickers.activePicker;
|
|
@@ -73,17 +75,17 @@ export function AppMainView({ helpPanel, helpTabs, pickers, error, describeState
|
|
|
73
75
|
return (_jsx(Table, { rows: ap.filteredRows, columns: ap.columns, selectedIndex: ap.selectedIndex, filterText: ap.filter, terminalWidth: termCols, maxHeight: tableHeight, scrollOffset: ap.scrollOffset, contextLabel: ap.contextLabel }));
|
|
74
76
|
}
|
|
75
77
|
if (yankHelpOpen) {
|
|
76
|
-
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor:
|
|
78
|
+
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor: THEME.panel.yankPanelBorderText, children: _jsx(YankHelpPanel, { options: yankOptions, row: yankHelpRow }) }));
|
|
77
79
|
}
|
|
78
80
|
if (uploadPending) {
|
|
79
81
|
// Overhead: border 2 + header 4 + separators 2 + DiffViewer header+divider 2 = 10
|
|
80
82
|
const diffVisibleLines = Math.max(1, tableHeight - 10);
|
|
81
|
-
return (_jsxs(Box, { width: "100%", borderStyle: "round", borderColor:
|
|
83
|
+
return (_jsxs(Box, { width: "100%", borderStyle: "round", borderColor: THEME.upload.uploadBorderText, flexDirection: "column", children: [_jsxs(Box, { paddingX: 1, paddingY: 1, flexDirection: "column", children: [_jsx(Text, { bold: true, color: THEME.upload.uploadTitleText, children: "\u26A0 Overwrite Secret on AWS?" }), _jsx(Text, { color: THEME.upload.uploadSubtitleText, children: "This will update the secret permanently." })] }), _jsx(Box, { paddingX: 1, paddingY: 1, borderTop: true, borderColor: THEME.upload.uploadDiffDividerText, children: uploadPreview ? (_jsx(DiffViewer, { oldValue: uploadPreview.old, newValue: uploadPreview.new, scrollOffset: panelScrollOffset, visibleLines: diffVisibleLines })) : (_jsx(Text, { color: THEME.upload.uploadLoadingText, children: "Loading preview..." })) }), _jsx(Box, { paddingX: 1, paddingY: 1, borderTop: true, borderColor: THEME.upload.uploadConfirmPromptText, children: _jsxs(Text, { children: ["Press", " ", _jsx(Text, { bold: true, color: THEME.upload.uploadConfirmKeyText, children: "y" }), " ", "to confirm or", " ", _jsx(Text, { bold: true, color: THEME.upload.uploadCancelKeyText, children: "n" }), " ", "to cancel"] }) })] }));
|
|
82
84
|
}
|
|
83
85
|
if (describeState) {
|
|
84
86
|
// Overhead: border 2 + title 1 + separator 1 + footer 2 = 6
|
|
85
87
|
const detailVisibleLines = Math.max(1, tableHeight - 6);
|
|
86
|
-
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor:
|
|
88
|
+
return (_jsx(Box, { width: "100%", borderStyle: "round", borderColor: THEME.panel.detailPanelBorderText, children: _jsx(DetailPanel, { title: getCellValue(describeState.row.cells.name) ?? describeState.row.id, fields: describeState.fields ?? [], isLoading: describeState.loading, scrollOffset: panelScrollOffset, visibleLines: detailVisibleLines }) }));
|
|
87
89
|
}
|
|
88
90
|
if (isLoading) {
|
|
89
91
|
return (_jsx(TableSkeleton, { columns: columns, terminalWidth: termCols, rows: 1, contextLabel: adapter.getContextLabel?.() ?? "" }));
|