@brimveyn/aimux-config 0.4.4 → 0.4.6

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 (78) hide show
  1. package/package.json +1 -1
  2. package/src/actions.ts +11 -8
  3. package/src/defaults.ts +3 -2
  4. package/src/house-themes.ts +44 -302
  5. package/src/index.ts +20 -16
  6. package/src/palette-to-shiki.ts +134 -0
  7. package/src/palette-utils.ts +92 -0
  8. package/src/resolver.ts +0 -1
  9. package/src/themes/opencode.ts +1460 -0
  10. package/src/themes.ts +18 -88
  11. package/src/types.ts +46 -131
  12. package/src/normalize-theme.ts +0 -260
  13. package/src/themes/generated/andromeeda.ts +0 -346
  14. package/src/themes/generated/aurora-x.ts +0 -603
  15. package/src/themes/generated/ayu-dark.ts +0 -817
  16. package/src/themes/generated/ayu-light.ts +0 -817
  17. package/src/themes/generated/ayu-mirage.ts +0 -817
  18. package/src/themes/generated/catppuccin-frappe.ts +0 -2041
  19. package/src/themes/generated/catppuccin-latte.ts +0 -2041
  20. package/src/themes/generated/catppuccin-macchiato.ts +0 -2041
  21. package/src/themes/generated/catppuccin-mocha.ts +0 -2041
  22. package/src/themes/generated/dark-plus.ts +0 -614
  23. package/src/themes/generated/dracula-soft.ts +0 -947
  24. package/src/themes/generated/dracula.ts +0 -947
  25. package/src/themes/generated/everforest-dark.ts +0 -2246
  26. package/src/themes/generated/everforest-light.ts +0 -2246
  27. package/src/themes/generated/github-dark-default.ts +0 -605
  28. package/src/themes/generated/github-dark-dimmed.ts +0 -605
  29. package/src/themes/generated/github-dark-high-contrast.ts +0 -608
  30. package/src/themes/generated/github-dark.ts +0 -519
  31. package/src/themes/generated/github-light-default.ts +0 -602
  32. package/src/themes/generated/github-light-high-contrast.ts +0 -604
  33. package/src/themes/generated/github-light.ts +0 -515
  34. package/src/themes/generated/gruvbox-dark-hard.ts +0 -1124
  35. package/src/themes/generated/gruvbox-dark-medium.ts +0 -1124
  36. package/src/themes/generated/gruvbox-dark-soft.ts +0 -1124
  37. package/src/themes/generated/gruvbox-light-hard.ts +0 -1124
  38. package/src/themes/generated/gruvbox-light-medium.ts +0 -1124
  39. package/src/themes/generated/gruvbox-light-soft.ts +0 -1124
  40. package/src/themes/generated/horizon-bright.ts +0 -420
  41. package/src/themes/generated/horizon.ts +0 -418
  42. package/src/themes/generated/houston.ts +0 -1819
  43. package/src/themes/generated/index.ts +0 -140
  44. package/src/themes/generated/kanagawa-dragon.ts +0 -753
  45. package/src/themes/generated/kanagawa-lotus.ts +0 -753
  46. package/src/themes/generated/kanagawa-wave.ts +0 -753
  47. package/src/themes/generated/laserwave.ts +0 -489
  48. package/src/themes/generated/light-plus.ts +0 -639
  49. package/src/themes/generated/material-theme-darker.ts +0 -759
  50. package/src/themes/generated/material-theme-lighter.ts +0 -759
  51. package/src/themes/generated/material-theme-ocean.ts +0 -759
  52. package/src/themes/generated/material-theme-palenight.ts +0 -759
  53. package/src/themes/generated/material-theme.ts +0 -759
  54. package/src/themes/generated/min-dark.ts +0 -326
  55. package/src/themes/generated/min-light.ts +0 -331
  56. package/src/themes/generated/monokai.ts +0 -463
  57. package/src/themes/generated/night-owl-light.ts +0 -1526
  58. package/src/themes/generated/night-owl.ts +0 -1628
  59. package/src/themes/generated/nord.ts +0 -1277
  60. package/src/themes/generated/one-dark-pro.ts +0 -1920
  61. package/src/themes/generated/one-light.ts +0 -1599
  62. package/src/themes/generated/plastic.ts +0 -315
  63. package/src/themes/generated/poimandres.ts +0 -1233
  64. package/src/themes/generated/red.ts +0 -395
  65. package/src/themes/generated/rose-pine-dawn.ts +0 -696
  66. package/src/themes/generated/rose-pine-moon.ts +0 -696
  67. package/src/themes/generated/rose-pine.ts +0 -696
  68. package/src/themes/generated/slack-dark.ts +0 -594
  69. package/src/themes/generated/slack-ochin.ts +0 -461
  70. package/src/themes/generated/snazzy-light.ts +0 -1254
  71. package/src/themes/generated/solarized-dark.ts +0 -387
  72. package/src/themes/generated/solarized-light.ts +0 -379
  73. package/src/themes/generated/synthwave-84.ts +0 -751
  74. package/src/themes/generated/tokyo-night.ts +0 -1420
  75. package/src/themes/generated/vesper.ts +0 -578
  76. package/src/themes/generated/vitesse-black.ts +0 -629
  77. package/src/themes/generated/vitesse-dark.ts +0 -629
  78. package/src/themes/generated/vitesse-light.ts +0 -627
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimveyn/aimux-config",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "TypeScript configuration API for aimux — keymaps, themes, and backends with a fluent builder.",
5
5
  "keywords": [
6
6
  "aimux",
package/src/actions.ts CHANGED
@@ -314,14 +314,17 @@ export const toggleSidebarFromInput: KeyResult = r([{ type: 'toggle-sidebar' }])
314
314
  export const confirmSessionRename: ActionFn = (ctx: ModeContext) => {
315
315
  const trimmed = (ctx.state.modal.editBuffer ?? '').trim()
316
316
  const sessionId = ctx.state.modal.sessionTargetId
317
- if (trimmed && sessionId) {
318
- return r(
319
- [{ type: 'open-session-picker' }],
320
- [{ name: trimmed, sessionId, type: 'rename-session' }],
321
- 'modal.session-picker.filtering'
322
- )
323
- }
324
- return r([{ type: 'open-session-picker' }], [], 'modal.session-picker.filtering')
317
+ const returnToPicker =
318
+ ctx.state.modal.type === 'session-name' ? ctx.state.modal.returnToSessionPicker : true
319
+ const closeAction: AppAction = returnToPicker
320
+ ? { type: 'open-session-picker' }
321
+ : { type: 'close-modal' }
322
+ const transition: KeyResult['transition'] = returnToPicker
323
+ ? 'modal.session-picker.filtering'
324
+ : 'navigation'
325
+ const effects: KeyResult['effects'] =
326
+ trimmed && sessionId ? [{ name: trimmed, sessionId, type: 'rename-session' }] : []
327
+ return r([closeAction], effects, transition)
325
328
  }
326
329
 
327
330
  // Rename tab modal
package/src/defaults.ts CHANGED
@@ -89,8 +89,8 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
89
89
  .map('v', actions.toggleGitDiffView, 'Toggle split/stacked')
90
90
  .map('t', actions.toggleGitFileListMode, 'Toggle flat/tree')
91
91
  .map('T', actions.toggleTreeCompaction, 'Toggle tree compaction')
92
- .map(']', actions.shiftGitHeadOffset(1), 'Older commit')
93
- .map('[', actions.shiftGitHeadOffset(-1), 'Newer commit')
92
+ .map(']', actions.shiftGitHeadOffset(-1), 'Newer commit')
93
+ .map('[', actions.shiftGitHeadOffset(1), 'Older commit')
94
94
  .map('?', actions.helpModal('git-mode'), 'Help')
95
95
  .map('<Esc>', actions.exitGitMode, 'Exit git')
96
96
  .map('j', actions.selectGitFile(1), 'Next entry')
@@ -266,6 +266,7 @@ export function getDefaultKeymapConfig(): ResolvedKeymapConfig {
266
266
  .map('<C-n>', actions.moveModalSelection(1))
267
267
  .map('<C-p>', actions.moveModalSelection(-1))
268
268
  .map('<CR>', actions.confirmSplit, 'Confirm')
269
+ .passthrough()
269
270
  )
270
271
 
271
272
  // -----------------------------------------------------------------------
@@ -1,313 +1,55 @@
1
- // Hand-curated aimux house themes, full Shiki theme shape. Colors follow the
2
- // VSCode workbench color key namespace; `settings` is a TextMate token rule
3
- // array shared by the in-repo diff highlighter and `shiki.loadTheme`.
1
+ // Hand-curated aimux house palettes. The opencode-style semantic palette
2
+ // drives both UI chrome and the runtime-generated Shiki theme see
3
+ // `palette-to-shiki.ts`.
4
4
  /* eslint-disable perfectionist/sort-objects */
5
5
 
6
- import type { Theme, ThemeColorMap } from './types'
7
-
8
- // --- aimux --------------------------------------------------------------
9
- //
10
- // Teal accents on a deep blue-black background. Designed to look at home
11
- // inside the aimux chrome.
12
- const AIMUX_BG = '#11151b'
13
- const AIMUX_FG = '#edf4ff'
14
-
15
- const AIMUX_COLORS: ThemeColorMap = {
16
- 'contrastBorder': '#3a4c60',
17
- 'descriptionForeground': '#6b829a',
18
- 'diffEditor.insertedLineBackground': '#1e3d2b',
19
- 'diffEditor.removedLineBackground': '#3b1e27',
20
- 'editor.background': AIMUX_BG,
21
- 'editor.foreground': AIMUX_FG,
22
- 'editor.lineHighlightBackground': '#1a2330',
23
- 'editor.selectionBackground': '#1f3344',
24
- 'editorCursor.foreground': '#7cd1b8',
25
- 'editorError.foreground': '#f38ba8',
26
- 'editorGroup.border': '#2d3f52',
27
- 'editorGroupHeader.tabsBackground': '#16202b',
28
- 'editorLineNumber.foreground': '#3e506a',
29
- 'editorWarning.foreground': '#f6c177',
30
- 'editorWidget.background': '#0b1016',
31
- 'errorForeground': '#f38ba8',
32
- 'focusBorder': '#7cd1b8',
33
- 'foreground': AIMUX_FG,
34
- 'gitDecoration.addedResourceForeground': '#8bd5ca',
35
- 'gitDecoration.deletedResourceForeground': '#f38ba8',
36
- 'gitDecoration.modifiedResourceForeground': '#f6c177',
37
- 'gitDecoration.untrackedResourceForeground': '#8bd5ca',
38
- 'input.background': '#1c2734',
39
- 'input.border': '#2d3f52',
40
- 'input.foreground': AIMUX_FG,
41
- 'list.activeSelectionBackground': '#1f3344',
42
- 'list.activeSelectionForeground': AIMUX_FG,
43
- 'list.hoverBackground': '#1a2330',
44
- 'panel.background': '#16202b',
45
- 'panel.border': '#2d3f52',
46
- 'sideBar.background': '#16202b',
47
- 'sideBar.foreground': AIMUX_FG,
48
- 'sideBarSectionHeader.background': '#1c2734',
49
- 'sideBarSectionHeader.foreground': '#b8c5d6',
50
- 'terminal.ansiBlue': '#7cb3ff',
51
- 'terminal.ansiCyan': '#7cd1b8',
52
- 'terminal.ansiGreen': '#8bd5ca',
53
- 'terminal.ansiMagenta': '#c4a7e7',
54
- 'terminal.ansiRed': '#f38ba8',
55
- 'terminal.ansiYellow': '#f6c177',
56
- 'textLink.activeForeground': '#7cd1b8',
57
- 'textLink.foreground': '#7cd1b8',
6
+ import type { AimuxPalette, AimuxTheme } from './types'
7
+
8
+ const AIMUX_DARK_PALETTE: AimuxPalette = {
9
+ neutral: '#11151b',
10
+ ink: '#edf4ff',
11
+ primary: '#7cd1b8',
12
+ success: '#8bd5ca',
13
+ warning: '#f6c177',
14
+ error: '#f38ba8',
15
+ info: '#7cb3ff',
16
+ accent: '#c4a7e7',
17
+ interactive: '#1f3344',
18
+ diffAdd: '#1e3d2b',
19
+ diffDelete: '#3b1e27',
58
20
  }
59
21
 
60
- // --- dracula-at-night --------------------------------------------------
61
- const DAN_BG = '#0e1419'
62
- const DAN_FG = '#f8f8f2'
63
-
64
- const DAN_COLORS: ThemeColorMap = {
65
- 'contrastBorder': '#44475a',
66
- 'descriptionForeground': '#6272a4',
67
- 'diffEditor.insertedLineBackground': '#162b1d',
68
- 'diffEditor.removedLineBackground': '#2a1820',
69
- 'editor.background': DAN_BG,
70
- 'editor.foreground': DAN_FG,
71
- 'editor.lineHighlightBackground': '#1a2129',
72
- 'editor.selectionBackground': '#222a33',
73
- 'editorCursor.foreground': '#f8f8f0',
74
- 'editorError.foreground': '#ff5555',
75
- 'editorGroup.border': '#2a3440',
76
- 'editorGroupHeader.tabsBackground': '#131920',
77
- 'editorLineNumber.foreground': '#495466',
78
- 'editorWarning.foreground': '#f1fa8c',
79
- 'editorWidget.background': '#090d11',
80
- 'errorForeground': '#ff5555',
81
- 'focusBorder': '#bd93f9',
82
- 'foreground': DAN_FG,
83
- 'gitDecoration.addedResourceForeground': '#50fa7b',
84
- 'gitDecoration.deletedResourceForeground': '#ff5555',
85
- 'gitDecoration.modifiedResourceForeground': '#f1fa8c',
86
- 'gitDecoration.untrackedResourceForeground': '#50fa7b',
87
- 'input.background': '#1a2129',
88
- 'input.border': '#2a3440',
89
- 'input.foreground': DAN_FG,
90
- 'list.activeSelectionBackground': '#222a33',
91
- 'list.activeSelectionForeground': DAN_FG,
92
- 'list.hoverBackground': '#1a2129',
93
- 'panel.background': '#131920',
94
- 'panel.border': '#2a3440',
95
- 'sideBar.background': '#131920',
96
- 'sideBar.foreground': DAN_FG,
97
- 'sideBarSectionHeader.background': '#1a2129',
98
- 'sideBarSectionHeader.foreground': '#bdc3cf',
99
- 'terminal.ansiBlue': '#6272a4',
100
- 'terminal.ansiCyan': '#8be9fd',
101
- 'terminal.ansiGreen': '#50fa7b',
102
- 'terminal.ansiMagenta': '#ff79c6',
103
- 'terminal.ansiRed': '#ff5555',
104
- 'terminal.ansiYellow': '#f1fa8c',
105
- 'textLink.activeForeground': '#ff79c6',
106
- 'textLink.foreground': '#bd93f9',
22
+ const AIMUX_LIGHT_PALETTE: AimuxPalette = {
23
+ neutral: '#f7f9fc',
24
+ ink: '#11151b',
25
+ primary: '#1f8a72',
26
+ success: '#2e9a83',
27
+ warning: '#b8770f',
28
+ error: '#c43b58',
29
+ info: '#2e6cc1',
30
+ accent: '#7d57b8',
31
+ interactive: '#dbe6f0',
32
+ diffAdd: '#d4ebd9',
33
+ diffDelete: '#f0d6dc',
107
34
  }
108
35
 
109
- // --- Shared TextMate rule helpers --------------------------------------
110
-
111
- const AIMUX_SETTINGS = [
112
- { settings: { background: AIMUX_BG, foreground: AIMUX_FG } },
113
- {
114
- scope: ['comment', 'punctuation.definition.comment'],
115
- settings: { fontStyle: 'italic', foreground: '#6b829a' },
116
- },
117
- { scope: ['comment.documentation'], settings: { foreground: '#8fa6bf', fontStyle: 'italic' } },
118
- { scope: ['string', 'string.quoted'], settings: { foreground: '#f6c177' } },
119
- { scope: ['string.template'], settings: { foreground: '#f6c177' } },
120
- {
121
- scope: ['string.regexp', 'string.escape', 'constant.character.escape'],
122
- settings: { foreground: '#c4a7e7' },
123
- },
124
- {
125
- scope: ['constant.numeric', 'constant.language', 'constant.language.boolean'],
126
- settings: { foreground: '#f38ba8' },
127
- },
128
- { scope: ['constant.character', 'constant.other'], settings: { foreground: '#f38ba8' } },
129
- {
130
- scope: ['keyword', 'keyword.control', 'keyword.operator.new', 'keyword.other'],
131
- settings: { fontStyle: 'bold', foreground: '#c4a7e7' },
132
- },
133
- {
134
- scope: ['storage', 'storage.type', 'storage.modifier'],
135
- settings: { fontStyle: 'bold', foreground: '#c4a7e7' },
136
- },
137
- {
138
- scope: ['keyword.operator', 'punctuation', 'meta.brace', 'punctuation.separator'],
139
- settings: { foreground: '#6b829a' },
140
- },
141
- {
142
- scope: [
143
- 'entity.name.function',
144
- 'support.function',
145
- 'meta.function-call',
146
- 'entity.name.function.member',
147
- ],
148
- settings: { foreground: '#8bd5ca' },
149
- },
150
- {
151
- scope: [
152
- 'entity.name.type',
153
- 'support.type',
154
- 'support.class',
155
- 'entity.name.class',
156
- 'entity.name.interface',
157
- 'entity.name.namespace',
158
- ],
159
- settings: { fontStyle: 'italic', foreground: '#7cd1b8' },
160
- },
161
- {
162
- scope: ['entity.name.type.enum', 'entity.name.type.alias'],
163
- settings: { foreground: '#7cd1b8' },
164
- },
165
- { scope: ['variable', 'meta.variable'], settings: { foreground: AIMUX_FG } },
166
- {
167
- scope: ['variable.parameter', 'meta.function.parameters'],
168
- settings: { fontStyle: 'italic', foreground: AIMUX_FG },
169
- },
170
- {
171
- scope: ['variable.other.property', 'variable.other.member', 'meta.object-literal.key'],
172
- settings: { foreground: '#7cd1b8' },
173
- },
174
- {
175
- scope: ['variable.language', 'variable.language.this'],
176
- settings: { foreground: '#f38ba8', fontStyle: 'italic' },
177
- },
178
- { scope: ['entity.name.tag', 'meta.tag'], settings: { foreground: '#f38ba8' } },
179
- {
180
- scope: ['entity.other.attribute-name'],
181
- settings: { fontStyle: 'italic', foreground: '#f6c177' },
182
- },
183
- { scope: ['support.constant'], settings: { foreground: '#f38ba8' } },
184
- { scope: ['support.variable'], settings: { foreground: AIMUX_FG } },
185
- // Markdown
186
- { scope: ['markup.heading'], settings: { fontStyle: 'bold', foreground: '#7cd1b8' } },
187
- { scope: ['markup.bold'], settings: { fontStyle: 'bold', foreground: AIMUX_FG } },
188
- { scope: ['markup.italic'], settings: { fontStyle: 'italic', foreground: AIMUX_FG } },
189
- { scope: ['markup.underline.link', 'markup.inline.raw'], settings: { foreground: '#8bd5ca' } },
190
- { scope: ['markup.list'], settings: { foreground: '#c4a7e7' } },
191
- { scope: ['markup.quote'], settings: { foreground: '#6b829a', fontStyle: 'italic' } },
192
- { scope: ['markup.raw'], settings: { foreground: '#f6c177' } },
193
- // JSX / TSX
194
- {
195
- scope: ['entity.name.tag.jsx', 'support.class.component'],
196
- settings: { foreground: '#7cd1b8' },
197
- },
198
- { scope: ['meta.jsx.children'], settings: { foreground: AIMUX_FG } },
199
- // Diff
200
- { scope: ['markup.inserted', 'meta.diff.header.to-file'], settings: { foreground: '#8bd5ca' } },
201
- { scope: ['markup.deleted', 'meta.diff.header.from-file'], settings: { foreground: '#f38ba8' } },
202
- { scope: ['markup.changed'], settings: { foreground: '#f6c177' } },
203
- { scope: ['meta.diff.range'], settings: { foreground: '#c4a7e7' } },
204
- ]
205
-
206
- const DAN_SETTINGS = [
207
- { settings: { background: DAN_BG, foreground: DAN_FG } },
208
- {
209
- scope: ['comment', 'punctuation.definition.comment'],
210
- settings: { fontStyle: 'italic', foreground: '#6272a4' },
211
- },
212
- { scope: ['comment.documentation'], settings: { fontStyle: 'italic', foreground: '#8a96b4' } },
213
- { scope: ['string', 'string.quoted'], settings: { foreground: '#f1fa8c' } },
214
- { scope: ['string.template'], settings: { foreground: '#f1fa8c' } },
215
- {
216
- scope: ['string.regexp', 'string.escape', 'constant.character.escape'],
217
- settings: { foreground: '#ff79c6' },
218
- },
219
- {
220
- scope: ['constant.numeric', 'constant.language', 'constant.language.boolean'],
221
- settings: { foreground: '#bd93f9' },
222
- },
223
- { scope: ['constant.character', 'constant.other'], settings: { foreground: '#bd93f9' } },
224
- {
225
- scope: ['keyword', 'keyword.control', 'keyword.other'],
226
- settings: { fontStyle: 'bold', foreground: '#ff79c6' },
227
- },
228
- {
229
- scope: ['storage', 'storage.type', 'storage.modifier'],
230
- settings: { fontStyle: 'bold italic', foreground: '#ff79c6' },
231
- },
232
- {
233
- scope: ['keyword.operator', 'punctuation', 'meta.brace', 'punctuation.separator'],
234
- settings: { foreground: '#f8f8f2' },
235
- },
236
- {
237
- scope: ['entity.name.function', 'support.function', 'meta.function-call'],
238
- settings: { foreground: '#50fa7b' },
239
- },
240
- {
241
- scope: [
242
- 'entity.name.type',
243
- 'support.type',
244
- 'support.class',
245
- 'entity.name.class',
246
- 'entity.name.interface',
247
- ],
248
- settings: { fontStyle: 'italic', foreground: '#8be9fd' },
249
- },
250
- {
251
- scope: ['entity.name.type.enum', 'entity.name.type.alias'],
252
- settings: { foreground: '#8be9fd' },
253
- },
254
- { scope: ['variable', 'meta.variable'], settings: { foreground: DAN_FG } },
255
- {
256
- scope: ['variable.parameter', 'meta.function.parameters'],
257
- settings: { fontStyle: 'italic', foreground: '#ffb86c' },
258
- },
259
- {
260
- scope: ['variable.other.property', 'variable.other.member', 'meta.object-literal.key'],
261
- settings: { foreground: '#8be9fd' },
262
- },
263
- {
264
- scope: ['variable.language', 'variable.language.this'],
265
- settings: { foreground: '#bd93f9', fontStyle: 'italic' },
266
- },
267
- { scope: ['entity.name.tag', 'meta.tag'], settings: { foreground: '#ff79c6' } },
268
- {
269
- scope: ['entity.other.attribute-name'],
270
- settings: { fontStyle: 'italic', foreground: '#50fa7b' },
271
- },
272
- { scope: ['support.constant'], settings: { foreground: '#bd93f9' } },
273
- // Markdown
274
- { scope: ['markup.heading'], settings: { fontStyle: 'bold', foreground: '#bd93f9' } },
275
- { scope: ['markup.bold'], settings: { fontStyle: 'bold', foreground: '#ffb86c' } },
276
- { scope: ['markup.italic'], settings: { fontStyle: 'italic', foreground: '#f1fa8c' } },
277
- { scope: ['markup.underline.link', 'markup.inline.raw'], settings: { foreground: '#8be9fd' } },
278
- { scope: ['markup.list'], settings: { foreground: '#ff79c6' } },
279
- { scope: ['markup.quote'], settings: { foreground: '#6272a4', fontStyle: 'italic' } },
280
- { scope: ['markup.raw'], settings: { foreground: '#f1fa8c' } },
281
- // JSX / TSX
282
- {
283
- scope: ['entity.name.tag.jsx', 'support.class.component'],
284
- settings: { foreground: '#8be9fd' },
285
- },
286
- // Diff
287
- { scope: ['markup.inserted'], settings: { foreground: '#50fa7b' } },
288
- { scope: ['markup.deleted'], settings: { foreground: '#ff5555' } },
289
- { scope: ['markup.changed'], settings: { foreground: '#f1fa8c' } },
290
- ]
291
-
292
- export const HOUSE_THEMES: Record<string, Theme> = {
293
- 'aimux': {
294
- bg: AIMUX_BG,
295
- colors: AIMUX_COLORS,
296
- displayName: 'Aimux',
297
- fg: AIMUX_FG,
36
+ export const HOUSE_THEMES: Record<string, AimuxTheme> = {
37
+ 'aimux-dark': {
298
38
  name: 'aimux',
299
- settings: AIMUX_SETTINGS,
300
- type: 'dark',
39
+ mode: 'dark',
40
+ displayName: 'Aimux Dark',
41
+ palette: AIMUX_DARK_PALETTE,
42
+ fg: AIMUX_DARK_PALETTE.ink,
43
+ bg: AIMUX_DARK_PALETTE.neutral,
301
44
  },
302
- 'dracula-at-night': {
303
- bg: DAN_BG,
304
- colors: DAN_COLORS,
305
- displayName: 'Dracula At Night',
306
- fg: DAN_FG,
307
- name: 'dracula-at-night',
308
- settings: DAN_SETTINGS,
309
- type: 'dark',
45
+ 'aimux-light': {
46
+ name: 'aimux',
47
+ mode: 'light',
48
+ displayName: 'Aimux Light',
49
+ palette: AIMUX_LIGHT_PALETTE,
50
+ fg: AIMUX_LIGHT_PALETTE.ink,
51
+ bg: AIMUX_LIGHT_PALETTE.neutral,
310
52
  },
311
53
  }
312
54
 
313
- export const HOUSE_THEME_IDS: string[] = Object.keys(HOUSE_THEMES)
55
+ export const HOUSE_THEME_IDS: string[] = ['aimux-dark', 'aimux-light']
package/src/index.ts CHANGED
@@ -2,15 +2,23 @@
2
2
 
3
3
  export { defineConfig } from './define-config'
4
4
  export * as actions from './actions'
5
+ export { isKnownThemeId, migrateThemeId, THEME_IDS, THEMES } from './themes'
6
+ export { HOUSE_THEME_IDS, HOUSE_THEMES } from './house-themes'
7
+ export { OPENCODE_THEME_IDS, OPENCODE_THEMES } from './themes/opencode'
5
8
  export {
6
- isKnownThemeId,
7
- migrateThemeId,
8
- registerUserThemes,
9
- THEME_IDS,
10
- themes,
11
- THEMES,
12
- } from './themes'
13
- export { normalizeTheme } from './normalize-theme'
9
+ accent,
10
+ border,
11
+ diffAddBg,
12
+ diffDeleteBg,
13
+ elevated,
14
+ extendPalette,
15
+ faint,
16
+ hover,
17
+ mix,
18
+ muted,
19
+ selected,
20
+ } from './palette-utils'
21
+ export { paletteToShikiTheme } from './palette-to-shiki'
14
22
  export { GroupBuilder, KeymapBuilder, ModeBindingBuilder } from './keymap-builder'
15
23
  export { getDefaultKeymapConfig } from './defaults'
16
24
  export { resolveConfig } from './resolver'
@@ -20,7 +28,9 @@ export type {
20
28
  // Action types
21
29
  Action,
22
30
  ActionFn,
23
- AimuxColorKey,
31
+ AimuxPalette,
32
+ AimuxTheme,
33
+ AimuxThemeConfig,
24
34
  // User-facing config
25
35
  AimuxUserConfig,
26
36
  AppAction,
@@ -49,8 +59,6 @@ export type {
49
59
  // Mode / state
50
60
  ModeId,
51
61
  ModeKeymapDef,
52
- NamedTheme,
53
- NamedThemeDefinition,
54
62
  // Resolved config (internal, but exported for tooling)
55
63
  ResolvedConfig,
56
64
  ResolvedKeymapConfig,
@@ -62,10 +70,6 @@ export type {
62
70
  SplitDirection,
63
71
  TabSession,
64
72
  Theme,
65
- ThemeColorMap,
66
- ThemeDefinition,
67
73
  ThemeId,
68
- ThemeSettings,
69
- ThemeTokenRule,
74
+ ThemeMode,
70
75
  } from './types'
71
- export { AIMUX_COLOR_KEYS } from './types'
@@ -0,0 +1,134 @@
1
+ // Build a Shiki ThemeRegistrationRaw from an AimuxPalette. The same palette
2
+ // powers the UI chrome and the diff syntax highlighter — there's no static
3
+ // theme JSON, so light/dark/overrides stay coherent automatically.
4
+
5
+ import type { ThemeRegistrationRaw } from 'shiki'
6
+
7
+ import type { AimuxPalette, ThemeMode } from './types'
8
+
9
+ import { accent as accentOf, muted } from './palette-utils'
10
+
11
+ export interface PaletteToShikiOptions {
12
+ name: string
13
+ mode: ThemeMode
14
+ palette: AimuxPalette
15
+ }
16
+
17
+ export function paletteToShikiTheme(opts: PaletteToShikiOptions): ThemeRegistrationRaw {
18
+ const { mode, name, palette: p } = opts
19
+ const m = muted(p)
20
+ const a = accentOf(p)
21
+
22
+ return {
23
+ bg: p.neutral,
24
+ colors: {
25
+ 'editor.background': p.neutral,
26
+ 'editor.foreground': p.ink,
27
+ },
28
+ fg: p.ink,
29
+ name,
30
+ settings: [
31
+ { settings: { background: p.neutral, foreground: p.ink } },
32
+ {
33
+ scope: ['comment', 'punctuation.definition.comment'],
34
+ settings: { fontStyle: 'italic', foreground: m },
35
+ },
36
+ { scope: ['comment.documentation'], settings: { fontStyle: 'italic', foreground: m } },
37
+ {
38
+ scope: ['string', 'string.quoted', 'string.template'],
39
+ settings: { foreground: p.warning },
40
+ },
41
+ {
42
+ scope: ['string.regexp', 'string.escape', 'constant.character.escape'],
43
+ settings: { foreground: a },
44
+ },
45
+ {
46
+ scope: [
47
+ 'constant.numeric',
48
+ 'constant.language',
49
+ 'constant.language.boolean',
50
+ 'constant.character',
51
+ 'constant.other',
52
+ 'support.constant',
53
+ ],
54
+ settings: { foreground: p.error },
55
+ },
56
+ {
57
+ scope: ['keyword', 'keyword.control', 'keyword.operator.new', 'keyword.other'],
58
+ settings: { fontStyle: 'bold', foreground: a },
59
+ },
60
+ {
61
+ scope: ['storage', 'storage.type', 'storage.modifier'],
62
+ settings: { fontStyle: 'bold', foreground: a },
63
+ },
64
+ {
65
+ scope: ['keyword.operator', 'punctuation', 'meta.brace', 'punctuation.separator'],
66
+ settings: { foreground: m },
67
+ },
68
+ {
69
+ scope: [
70
+ 'entity.name.function',
71
+ 'support.function',
72
+ 'meta.function-call',
73
+ 'entity.name.function.member',
74
+ ],
75
+ settings: { foreground: p.success },
76
+ },
77
+ {
78
+ scope: [
79
+ 'entity.name.type',
80
+ 'support.type',
81
+ 'support.class',
82
+ 'entity.name.class',
83
+ 'entity.name.interface',
84
+ 'entity.name.namespace',
85
+ 'entity.name.type.enum',
86
+ 'entity.name.type.alias',
87
+ 'entity.name.tag.jsx',
88
+ 'support.class.component',
89
+ ],
90
+ settings: { fontStyle: 'italic', foreground: p.primary },
91
+ },
92
+ { scope: ['variable', 'meta.variable'], settings: { foreground: p.ink } },
93
+ {
94
+ scope: ['variable.parameter', 'meta.function.parameters'],
95
+ settings: { fontStyle: 'italic', foreground: p.ink },
96
+ },
97
+ {
98
+ scope: ['variable.other.property', 'variable.other.member', 'meta.object-literal.key'],
99
+ settings: { foreground: p.primary },
100
+ },
101
+ {
102
+ scope: ['variable.language', 'variable.language.this'],
103
+ settings: { fontStyle: 'italic', foreground: p.error },
104
+ },
105
+ { scope: ['entity.name.tag', 'meta.tag'], settings: { foreground: p.error } },
106
+ {
107
+ scope: ['entity.other.attribute-name'],
108
+ settings: { fontStyle: 'italic', foreground: p.warning },
109
+ },
110
+ // Markdown
111
+ { scope: ['markup.heading'], settings: { fontStyle: 'bold', foreground: p.primary } },
112
+ { scope: ['markup.bold'], settings: { fontStyle: 'bold', foreground: p.ink } },
113
+ { scope: ['markup.italic'], settings: { fontStyle: 'italic', foreground: p.ink } },
114
+ {
115
+ scope: ['markup.underline.link', 'markup.inline.raw', 'markup.raw'],
116
+ settings: { foreground: p.success },
117
+ },
118
+ { scope: ['markup.list'], settings: { foreground: a } },
119
+ { scope: ['markup.quote'], settings: { fontStyle: 'italic', foreground: m } },
120
+ // Diff
121
+ {
122
+ scope: ['markup.inserted', 'meta.diff.header.to-file'],
123
+ settings: { foreground: p.success },
124
+ },
125
+ {
126
+ scope: ['markup.deleted', 'meta.diff.header.from-file'],
127
+ settings: { foreground: p.error },
128
+ },
129
+ { scope: ['markup.changed'], settings: { foreground: p.warning } },
130
+ { scope: ['meta.diff.range'], settings: { foreground: a } },
131
+ ],
132
+ type: mode,
133
+ }
134
+ }