@adea-ai/themes 0.1.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 (109) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +110 -0
  3. package/README.md +157 -0
  4. package/dist/adapters/base24.d.ts +117 -0
  5. package/dist/adapters/base24.d.ts.map +1 -0
  6. package/dist/adapters/base24.js +313 -0
  7. package/dist/adapters/base24.js.map +1 -0
  8. package/dist/adapters/css.d.ts +68 -0
  9. package/dist/adapters/css.d.ts.map +1 -0
  10. package/dist/adapters/css.js +107 -0
  11. package/dist/adapters/css.js.map +1 -0
  12. package/dist/adapters/shadcn.d.ts +43 -0
  13. package/dist/adapters/shadcn.d.ts.map +1 -0
  14. package/dist/adapters/shadcn.js +89 -0
  15. package/dist/adapters/shadcn.js.map +1 -0
  16. package/dist/adapters/shiki.d.ts +60 -0
  17. package/dist/adapters/shiki.d.ts.map +1 -0
  18. package/dist/adapters/shiki.js +135 -0
  19. package/dist/adapters/shiki.js.map +1 -0
  20. package/dist/adapters/tailwind.d.ts +35 -0
  21. package/dist/adapters/tailwind.d.ts.map +1 -0
  22. package/dist/adapters/tailwind.js +58 -0
  23. package/dist/adapters/tailwind.js.map +1 -0
  24. package/dist/adapters/xterm.d.ts +64 -0
  25. package/dist/adapters/xterm.d.ts.map +1 -0
  26. package/dist/adapters/xterm.js +112 -0
  27. package/dist/adapters/xterm.js.map +1 -0
  28. package/dist/catalogue.d.ts +66 -0
  29. package/dist/catalogue.d.ts.map +1 -0
  30. package/dist/catalogue.js +110 -0
  31. package/dist/catalogue.js.map +1 -0
  32. package/dist/derive.d.ts +89 -0
  33. package/dist/derive.d.ts.map +1 -0
  34. package/dist/derive.js +165 -0
  35. package/dist/derive.js.map +1 -0
  36. package/dist/generated/schemes.d.ts +16 -0
  37. package/dist/generated/schemes.d.ts.map +1 -0
  38. package/dist/generated/schemes.js +880 -0
  39. package/dist/generated/schemes.js.map +1 -0
  40. package/dist/generated/themes.d.ts +11 -0
  41. package/dist/generated/themes.d.ts.map +1 -0
  42. package/dist/generated/themes.js +1650 -0
  43. package/dist/generated/themes.js.map +1 -0
  44. package/dist/index.d.ts +67 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +58 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/normalize.d.ts +160 -0
  49. package/dist/normalize.d.ts.map +1 -0
  50. package/dist/normalize.js +795 -0
  51. package/dist/normalize.js.map +1 -0
  52. package/dist/oklch.d.ts +141 -0
  53. package/dist/oklch.d.ts.map +1 -0
  54. package/dist/oklch.js +306 -0
  55. package/dist/oklch.js.map +1 -0
  56. package/dist/schema.d.ts +178 -0
  57. package/dist/schema.d.ts.map +1 -0
  58. package/dist/schema.js +69 -0
  59. package/dist/schema.js.map +1 -0
  60. package/dist/sources.d.ts +171 -0
  61. package/dist/sources.d.ts.map +1 -0
  62. package/dist/sources.js +559 -0
  63. package/dist/sources.js.map +1 -0
  64. package/dist/validate.d.ts +121 -0
  65. package/dist/validate.d.ts.map +1 -0
  66. package/dist/validate.js +255 -0
  67. package/dist/validate.js.map +1 -0
  68. package/package.json +106 -0
  69. package/palettes/ayu-light.json +38 -0
  70. package/palettes/ayu-mirage.json +38 -0
  71. package/palettes/ayu.json +38 -0
  72. package/palettes/catppuccin-frappe.json +38 -0
  73. package/palettes/catppuccin-latte.json +38 -0
  74. package/palettes/catppuccin-macchiato.json +38 -0
  75. package/palettes/catppuccin-mocha.json +38 -0
  76. package/palettes/dracula.json +38 -0
  77. package/palettes/everforest-dark.json +38 -0
  78. package/palettes/everforest-light.json +38 -0
  79. package/palettes/gruvbox-dark.json +38 -0
  80. package/palettes/gruvbox-light.json +38 -0
  81. package/palettes/kanagawa.json +38 -0
  82. package/palettes/monokai.json +38 -0
  83. package/palettes/nord.json +38 -0
  84. package/palettes/one-dark.json +38 -0
  85. package/palettes/rosepine-dawn.json +38 -0
  86. package/palettes/rosepine-moon.json +38 -0
  87. package/palettes/rosepine.json +38 -0
  88. package/palettes/solarized-dark.json +38 -0
  89. package/palettes/solarized-light.json +38 -0
  90. package/palettes/tokyonight-day.json +38 -0
  91. package/palettes/tokyonight-night.json +38 -0
  92. package/palettes/tokyonight-storm.json +38 -0
  93. package/palettes/vesper.json +38 -0
  94. package/src/adapters/base24.ts +355 -0
  95. package/src/adapters/css.ts +149 -0
  96. package/src/adapters/shadcn.ts +99 -0
  97. package/src/adapters/shiki.ts +168 -0
  98. package/src/adapters/tailwind.ts +79 -0
  99. package/src/adapters/xterm.ts +159 -0
  100. package/src/catalogue.ts +129 -0
  101. package/src/derive.ts +203 -0
  102. package/src/generated/schemes.ts +882 -0
  103. package/src/generated/themes.ts +1652 -0
  104. package/src/index.ts +146 -0
  105. package/src/normalize.ts +1010 -0
  106. package/src/oklch.ts +366 -0
  107. package/src/schema.ts +222 -0
  108. package/src/sources.ts +682 -0
  109. package/src/validate.ts +325 -0
package/src/sources.ts ADDED
@@ -0,0 +1,682 @@
1
+ /**
2
+ * What the catalogue contains, and where each palette came from.
3
+ *
4
+ * Two lists. {@link VENDORED_SOURCES} names the Base24 schemes that
5
+ * `scripts/vendor-palettes.ts` reproduces from upstream, and {@link AUTHORED_SOURCES}
6
+ * is Adea's own theme, which has no upstream to vendor from. Together they are the
7
+ * catalogue's input; `scripts/build-catalogue.ts` runs them all through the
8
+ * normalizer and writes the committed output.
9
+ *
10
+ * ## Provenance is per-family, and it was checked rather than assumed
11
+ *
12
+ * Every licence below was read from the upstream repository, not recalled. Two
13
+ * needed care:
14
+ *
15
+ * - **Gruvbox** declares MIT/X11 in its README and ships no `LICENSE` file, so
16
+ * GitHub's detector reports nothing. The README is the licence grant and it is
17
+ * recorded as MIT.
18
+ * - **Monokai** has no permissively licensed repository of its own: the repository
19
+ * under the Monokai organisation carries no licence at all. The *values* in the
20
+ * catalogue are therefore taken from the MIT-licensed iTerm2-Color-Schemes port,
21
+ * which is the artefact recorded as the licence basis, and Monokai is credited
22
+ * as the design's origin. See NOTICE for the full reasoning.
23
+ *
24
+ * ## The chain of custody
25
+ *
26
+ * These palettes reach the catalogue through one intermediate artefact, and the
27
+ * honest description of that is: `palettes/<id>.json` holds values reproduced from
28
+ * a Base24 scheme in the `oklch-terminal-themes` dataset at a pinned revision,
29
+ * which is itself derived from `iTerm2-Color-Schemes` at a pinned revision, which
30
+ * is where the per-family values were first published as terminal schemes. Each
31
+ * family's official project is recorded as the design's origin, and the values were
32
+ * checked against those projects' published palettes — the backgrounds and
33
+ * foregrounds of all fourteen families match the official palettes exactly.
34
+ *
35
+ * `tests/provenance.test.ts` holds those official values as assertions, so the
36
+ * claim "this is really Catppuccin Mocha" fails the build rather than drifting.
37
+ */
38
+
39
+ import type { Base24Slot } from './adapters/base24'
40
+ import type { ThemeAppearance, ThemeProvenance } from './schema'
41
+
42
+ /** The dataset the Base24 schemes are reproduced from. */
43
+ export const CATALOGUE_REPOSITORY = 'https://github.com/williamzujkowski/oklch-terminal-themes'
44
+
45
+ /**
46
+ * The pinned revision. Refreshing the catalogue starts by changing this, which is
47
+ * what makes a palette update a reviewable diff rather than an invisible drift.
48
+ */
49
+ export const CATALOGUE_REVISION = '9e800e7fe760081d4c10317498038ed4227341d6'
50
+
51
+ /** The upstream the dataset's per-family values were first published in. */
52
+ const ITERM2 = 'https://github.com/mbadolato/iTerm2-Color-Schemes'
53
+
54
+ /** Where Adea's own theme lives. */
55
+ export const ADEA_PROVENANCE: ThemeProvenance = Object.freeze({
56
+ project: 'Adea',
57
+ url: 'https://github.com/adea-ai/themes',
58
+ license: 'Apache-2.0',
59
+ })
60
+
61
+ /**
62
+ * Per-family provenance.
63
+ *
64
+ * `url` is the project's own repository — the place its palette is defined — while
65
+ * the vendored values come through the chain described in this module's header.
66
+ * Recording both is the point: one answers "whose palette is this", the other
67
+ * answers "which bytes are in the file".
68
+ */
69
+ export const FAMILY_PROVENANCE: Readonly<Record<string, ThemeProvenance>> = Object.freeze({
70
+ adea: ADEA_PROVENANCE,
71
+ catppuccin: {
72
+ project: 'Catppuccin',
73
+ url: 'https://github.com/catppuccin/catppuccin',
74
+ license: 'MIT',
75
+ bootstrappedFrom: [ITERM2],
76
+ },
77
+ tokyonight: {
78
+ project: 'Tokyo Night',
79
+ url: 'https://github.com/folke/tokyonight.nvim',
80
+ license: 'Apache-2.0',
81
+ bootstrappedFrom: [ITERM2],
82
+ },
83
+ rosepine: {
84
+ project: 'Rosé Pine',
85
+ url: 'https://github.com/rose-pine/rose-pine-theme',
86
+ license: 'MIT',
87
+ bootstrappedFrom: [ITERM2],
88
+ },
89
+ gruvbox: {
90
+ project: 'Gruvbox',
91
+ // Gruvbox grants MIT/X11 in its README and ships no LICENSE file, so
92
+ // repository licence detection finds nothing. The README is the grant.
93
+ url: 'https://github.com/morhetz/gruvbox#license',
94
+ license: 'MIT',
95
+ bootstrappedFrom: [ITERM2],
96
+ },
97
+ nord: {
98
+ project: 'Nord',
99
+ url: 'https://github.com/nordtheme/nord',
100
+ license: 'MIT',
101
+ bootstrappedFrom: [ITERM2],
102
+ },
103
+ dracula: {
104
+ project: 'Dracula',
105
+ url: 'https://github.com/dracula/dracula-theme',
106
+ license: 'MIT',
107
+ bootstrappedFrom: [ITERM2],
108
+ },
109
+ onedark: {
110
+ project: 'One Dark',
111
+ url: 'https://github.com/atom/one-dark-syntax',
112
+ license: 'MIT',
113
+ bootstrappedFrom: [ITERM2],
114
+ },
115
+ solarized: {
116
+ project: 'Solarized',
117
+ url: 'https://github.com/altercation/solarized',
118
+ license: 'MIT',
119
+ bootstrappedFrom: [ITERM2],
120
+ },
121
+ everforest: {
122
+ project: 'Everforest',
123
+ url: 'https://github.com/sainnhe/everforest',
124
+ license: 'MIT',
125
+ bootstrappedFrom: [ITERM2],
126
+ },
127
+ ayu: {
128
+ project: 'Ayu',
129
+ url: 'https://github.com/ayu-theme/ayu-colors',
130
+ license: 'MIT',
131
+ bootstrappedFrom: [ITERM2],
132
+ },
133
+ kanagawa: {
134
+ project: 'Kanagawa',
135
+ url: 'https://github.com/rebelot/kanagawa.nvim',
136
+ license: 'MIT',
137
+ bootstrappedFrom: [ITERM2],
138
+ },
139
+ vesper: {
140
+ project: 'Vesper',
141
+ url: 'https://github.com/raunofreiberg/vesper',
142
+ license: 'MIT',
143
+ bootstrappedFrom: [ITERM2],
144
+ },
145
+ monokai: {
146
+ project: 'Monokai',
147
+ // Monokai's own repository carries no licence. The values are therefore taken
148
+ // from the MIT port, which is the artefact the licence below attaches to;
149
+ // Monokai is credited here as the design's origin.
150
+ url: 'https://monokai.pro',
151
+ license: 'MIT',
152
+ bootstrappedFrom: [ITERM2],
153
+ },
154
+ })
155
+
156
+ /** A theme that is normalized from a vendored Base24 scheme. */
157
+ export interface VendoredSource {
158
+ id: string
159
+ /** The scheme's slug in the dataset. */
160
+ slug: string
161
+ family: keyof typeof FAMILY_PROVENANCE
162
+ familyLabel: string
163
+ label: string
164
+ name: string
165
+ description: string
166
+ appearance: ThemeAppearance
167
+ tags: readonly string[]
168
+ /** Declared when the family's identity is not in its blue slot. */
169
+ accentSlot?: 'blue' | 'magenta' | 'cyan' | 'green'
170
+ /**
171
+ * Corrections to the vendored scheme, applied before normalization.
172
+ *
173
+ * One entry uses this, and it is worth reading as the example of when it is
174
+ * legitimate: iTerm2's One Dark port deliberately darkens the canvas to `#21252b`
175
+ * so a terminal reads as a distinct surface, but Atom's own editor palette — the
176
+ * thing "One Dark" means — is `hsl(220, 13%, 18%)` = `#282c34`, with comments at
177
+ * `#5c6370` rather than the port's `#767676`. Adea themes an application, so the
178
+ * project's value is the correct one. Every correction is reported as a finding
179
+ * and appears in the catalogue's build log.
180
+ */
181
+ palette?: Partial<Record<Base24Slot, string>>
182
+ }
183
+
184
+ /** Convenience for the one source that corrects its palette. */
185
+ const ONE_DARK_OFFICIAL = Object.freeze({
186
+ base00: '#282c34',
187
+ base03: '#5c6370',
188
+ base04: '#818896',
189
+ })
190
+
191
+ /**
192
+ * The vendored catalogue.
193
+ *
194
+ * Ordered family by family, and within a family light-to-dark or by the order the
195
+ * project itself lists its flavours. The order is the order a picker shows, so it
196
+ * is deliberate rather than alphabetical.
197
+ */
198
+ export const VENDORED_SOURCES: readonly VendoredSource[] = Object.freeze([
199
+ /* --- Catppuccin: four flavours, lightest first ------------------------- */
200
+ {
201
+ id: 'catppuccin-latte',
202
+ slug: 'catppuccin-latte',
203
+ family: 'catppuccin',
204
+ familyLabel: 'Catppuccin',
205
+ label: 'Latte',
206
+ name: 'Catppuccin Latte',
207
+ description: 'The light flavour. Warm and low-contrast, built for long sessions.',
208
+ appearance: 'light',
209
+ tags: ['light', 'warm', 'muted'],
210
+ },
211
+ {
212
+ id: 'catppuccin-frappe',
213
+ slug: 'catppuccin-frappe',
214
+ family: 'catppuccin',
215
+ familyLabel: 'Catppuccin',
216
+ label: 'Frappé',
217
+ name: 'Catppuccin Frappé',
218
+ description: 'The first dark flavour: soft, desaturated, easy on the eyes.',
219
+ appearance: 'dark',
220
+ tags: ['dark', 'muted', 'soft'],
221
+ },
222
+ {
223
+ id: 'catppuccin-macchiato',
224
+ slug: 'catppuccin-macchiato',
225
+ family: 'catppuccin',
226
+ familyLabel: 'Catppuccin',
227
+ label: 'Macchiato',
228
+ name: 'Catppuccin Macchiato',
229
+ description: 'The middle dark flavour, a shade deeper than Frappé.',
230
+ appearance: 'dark',
231
+ tags: ['dark', 'muted'],
232
+ },
233
+ {
234
+ id: 'catppuccin-mocha',
235
+ slug: 'catppuccin-mocha',
236
+ family: 'catppuccin',
237
+ familyLabel: 'Catppuccin',
238
+ label: 'Mocha',
239
+ name: 'Catppuccin Mocha',
240
+ description: 'The deepest flavour, and the most used of the four.',
241
+ appearance: 'dark',
242
+ tags: ['dark', 'muted', 'popular'],
243
+ },
244
+
245
+ /* --- Tokyo Night ------------------------------------------------------- */
246
+ {
247
+ id: 'tokyonight-day',
248
+ slug: 'tokyonight-day',
249
+ family: 'tokyonight',
250
+ familyLabel: 'Tokyo Night',
251
+ label: 'Day',
252
+ name: 'Tokyo Night Day',
253
+ description: 'The daylight variant: cool paper rather than warm.',
254
+ appearance: 'light',
255
+ tags: ['light', 'cool'],
256
+ },
257
+ {
258
+ id: 'tokyonight-storm',
259
+ slug: 'tokyonight-storm',
260
+ family: 'tokyonight',
261
+ familyLabel: 'Tokyo Night',
262
+ label: 'Storm',
263
+ name: 'Tokyo Night Storm',
264
+ description: 'A lifted dark canvas, a touch brighter than Night.',
265
+ appearance: 'dark',
266
+ tags: ['dark', 'cool'],
267
+ },
268
+ {
269
+ id: 'tokyonight-night',
270
+ slug: 'tokyonight-night',
271
+ family: 'tokyonight',
272
+ familyLabel: 'Tokyo Night',
273
+ label: 'Night',
274
+ name: 'Tokyo Night',
275
+ description: 'The original: deep blue-black with neon-adjacent hues.',
276
+ appearance: 'dark',
277
+ tags: ['dark', 'cool', 'popular'],
278
+ },
279
+
280
+ /* --- Rosé Pine: the family's accent is iris, not blue ------------------ */
281
+ {
282
+ id: 'rosepine-dawn',
283
+ slug: 'rose-pine-dawn',
284
+ family: 'rosepine',
285
+ familyLabel: 'Rosé Pine',
286
+ label: 'Dawn',
287
+ name: 'Rosé Pine Dawn',
288
+ description: 'The light variant: a warm paper ground with muted rose ink.',
289
+ appearance: 'light',
290
+ tags: ['light', 'warm'],
291
+ accentSlot: 'magenta',
292
+ },
293
+ {
294
+ id: 'rosepine-moon',
295
+ slug: 'rose-pine-moon',
296
+ family: 'rosepine',
297
+ familyLabel: 'Rosé Pine',
298
+ label: 'Moon',
299
+ name: 'Rosé Pine Moon',
300
+ description: 'The lifted dark variant, greyer than Main.',
301
+ appearance: 'dark',
302
+ tags: ['dark', 'muted'],
303
+ accentSlot: 'magenta',
304
+ },
305
+ {
306
+ id: 'rosepine',
307
+ slug: 'rose-pine',
308
+ family: 'rosepine',
309
+ familyLabel: 'Rosé Pine',
310
+ label: 'Main',
311
+ name: 'Rosé Pine',
312
+ description: 'The original: deep plum ground, iris and foam accents.',
313
+ appearance: 'dark',
314
+ tags: ['dark', 'muted', 'popular'],
315
+ accentSlot: 'magenta',
316
+ },
317
+
318
+ /* --- Gruvbox ----------------------------------------------------------- */
319
+ {
320
+ id: 'gruvbox-light',
321
+ slug: 'gruvbox-light',
322
+ family: 'gruvbox',
323
+ familyLabel: 'Gruvbox',
324
+ label: 'Light',
325
+ name: 'Gruvbox Light',
326
+ description: 'Retro warm cream and burnt orange.',
327
+ appearance: 'light',
328
+ tags: ['light', 'warm', 'retro'],
329
+ },
330
+ {
331
+ id: 'gruvbox-dark',
332
+ slug: 'gruvbox-dark',
333
+ family: 'gruvbox',
334
+ familyLabel: 'Gruvbox',
335
+ label: 'Dark',
336
+ name: 'Gruvbox Dark',
337
+ description: 'The classic: warm brown-black with high-chroma retro accents.',
338
+ appearance: 'dark',
339
+ tags: ['dark', 'warm', 'retro', 'popular'],
340
+ },
341
+
342
+ /* --- Single-variant families ------------------------------------------ */
343
+ {
344
+ id: 'nord',
345
+ slug: 'nord',
346
+ family: 'nord',
347
+ familyLabel: 'Nord',
348
+ label: 'Nord',
349
+ name: 'Nord',
350
+ description: 'Arctic blue-grey, all cool and all low-contrast by design.',
351
+ appearance: 'dark',
352
+ tags: ['dark', 'cool', 'muted', 'popular'],
353
+ },
354
+ {
355
+ id: 'dracula',
356
+ slug: 'dracula',
357
+ family: 'dracula',
358
+ familyLabel: 'Dracula',
359
+ label: 'Dracula',
360
+ name: 'Dracula',
361
+ description: 'Deep grey-purple with a violet accent and vivid hues.',
362
+ appearance: 'dark',
363
+ tags: ['dark', 'purple', 'vivid', 'popular'],
364
+ },
365
+ {
366
+ id: 'one-dark',
367
+ slug: 'atom-one-dark',
368
+ family: 'onedark',
369
+ familyLabel: 'One Dark',
370
+ label: 'One Dark',
371
+ name: 'One Dark',
372
+ description: "Atom's editor palette: cool grey ground, one blue accent.",
373
+ appearance: 'dark',
374
+ tags: ['dark', 'cool', 'editor'],
375
+ palette: ONE_DARK_OFFICIAL,
376
+ },
377
+ {
378
+ id: 'kanagawa',
379
+ slug: 'kanagawa-wave',
380
+ family: 'kanagawa',
381
+ familyLabel: 'Kanagawa',
382
+ label: 'Wave',
383
+ name: 'Kanagawa',
384
+ description: 'Sumi ink and indigo, after the Great Wave.',
385
+ appearance: 'dark',
386
+ tags: ['dark', 'ink', 'muted', 'popular'],
387
+ },
388
+ {
389
+ id: 'vesper',
390
+ slug: 'vesper',
391
+ family: 'vesper',
392
+ familyLabel: 'Vesper',
393
+ label: 'Vesper',
394
+ name: 'Vesper',
395
+ description: 'Near-black with a single warm amber accent. Very high contrast.',
396
+ appearance: 'dark',
397
+ tags: ['dark', 'high-contrast', 'minimal'],
398
+ },
399
+ {
400
+ id: 'monokai',
401
+ slug: 'monokai-classic',
402
+ family: 'monokai',
403
+ familyLabel: 'Monokai',
404
+ label: 'Classic',
405
+ name: 'Monokai',
406
+ description: 'The original 2006 palette: olive ground, pink and acid green.',
407
+ appearance: 'dark',
408
+ tags: ['dark', 'vivid', 'retro', 'popular'],
409
+ // Monokai's blue slot is orange in the terminal port, which would read as a
410
+ // warning colour. The family's own accent is its magenta.
411
+ accentSlot: 'magenta',
412
+ },
413
+
414
+ /* --- Solarized: one palette, two appearances --------------------------- */
415
+ {
416
+ id: 'solarized-light',
417
+ slug: 'iterm2-solarized-light',
418
+ family: 'solarized',
419
+ familyLabel: 'Solarized',
420
+ label: 'Light',
421
+ name: 'Solarized Light',
422
+ description: 'Ethan Schoonover\'s paper variant, on the same eight accents.',
423
+ appearance: 'light',
424
+ tags: ['light', 'warm', 'precision'],
425
+ },
426
+ {
427
+ id: 'solarized-dark',
428
+ slug: 'iterm2-solarized-dark',
429
+ family: 'solarized',
430
+ familyLabel: 'Solarized',
431
+ label: 'Dark',
432
+ name: 'Solarized Dark',
433
+ description: 'The base16 teal ground, with deliberately equalised contrast.',
434
+ appearance: 'dark',
435
+ tags: ['dark', 'precision', 'popular'],
436
+ },
437
+
438
+ /* --- Everforest: the accent is its green ----------------------------- */
439
+ {
440
+ id: 'everforest-light',
441
+ slug: 'everforest-light-med',
442
+ family: 'everforest',
443
+ familyLabel: 'Everforest',
444
+ label: 'Light',
445
+ name: 'Everforest Light',
446
+ description: 'A soft light green-grey, medium contrast.',
447
+ appearance: 'light',
448
+ tags: ['light', 'green', 'soft'],
449
+ accentSlot: 'green',
450
+ },
451
+ {
452
+ id: 'everforest-dark',
453
+ slug: 'everforest-dark-med',
454
+ family: 'everforest',
455
+ familyLabel: 'Everforest',
456
+ label: 'Dark',
457
+ name: 'Everforest Dark',
458
+ description: 'Forest green ground with the family\'s signature green accent.',
459
+ appearance: 'dark',
460
+ tags: ['dark', 'green', 'soft', 'popular'],
461
+ accentSlot: 'green',
462
+ },
463
+
464
+ /* --- Ayu: three variants --------------------------------------------- */
465
+ {
466
+ id: 'ayu-light',
467
+ slug: 'ayu-light',
468
+ family: 'ayu',
469
+ familyLabel: 'Ayu',
470
+ label: 'Light',
471
+ name: 'Ayu Light',
472
+ description: 'Clean white paper with an orange accent.',
473
+ appearance: 'light',
474
+ tags: ['light', 'warm'],
475
+ },
476
+ {
477
+ id: 'ayu-mirage',
478
+ slug: 'ayu-mirage',
479
+ family: 'ayu',
480
+ familyLabel: 'Ayu',
481
+ label: 'Mirage',
482
+ name: 'Ayu Mirage',
483
+ description: 'The mid-dark variant: blue-grey rather than black.',
484
+ appearance: 'dark',
485
+ tags: ['dark', 'cool'],
486
+ },
487
+ {
488
+ id: 'ayu',
489
+ slug: 'ayu',
490
+ family: 'ayu',
491
+ familyLabel: 'Ayu',
492
+ label: 'Dark',
493
+ name: 'Ayu Dark',
494
+ description: 'The original: near-black with orange and blue.',
495
+ appearance: 'dark',
496
+ tags: ['dark', 'popular'],
497
+ },
498
+ ])
499
+
500
+ /**
501
+ * Adea's own theme.
502
+ *
503
+ * Authored here rather than vendored, and the only entry whose colours are chosen
504
+ * rather than reproduced. It is deliberately a neutral ladder with a monochrome
505
+ * accent — the design system's default has to work as a default for everyone, which
506
+ * means it cannot be anybody's favourite colour.
507
+ *
508
+ * Both appearances are generated from the accent-and-grey ramp below, so the two
509
+ * variants cannot drift apart: a change to the ramp changes both, and the contrast
510
+ * suite measures both.
511
+ */
512
+ export interface AuthoredSource {
513
+ id: string
514
+ family: string
515
+ familyLabel: string
516
+ label: string
517
+ name: string
518
+ description: string
519
+ appearance: ThemeAppearance
520
+ tags: readonly string[]
521
+ /**
522
+ * The greyscale ramp the theme is built from, darkest first.
523
+ *
524
+ * Authored as hex rather than OKLCH because that is how the design system's
525
+ * values were originally specified and reviewed; the normalizer converts, and the
526
+ * committed catalogue is OKLCH.
527
+ */
528
+ ramp: {
529
+ background: string
530
+ foreground: string
531
+ surface: string
532
+ surfaceElevated: string
533
+ surfaceHover: string
534
+ surfaceActive: string
535
+ border: string
536
+ borderMuted: string
537
+ textMuted: string
538
+ textSubtle: string
539
+ }
540
+ accent: string
541
+ accentForeground: string
542
+ status: {
543
+ success: string
544
+ warning: string
545
+ error: string
546
+ info: string
547
+ }
548
+ /**
549
+ * The terminal palette.
550
+ *
551
+ * Adea ships a terminal, so its own theme has to answer the sixteen ANSI
552
+ * questions the same way an imported theme does. These are the values the product
553
+ * already runs: the light set is GitHub's light scheme and the dark set GitHub's
554
+ * dark, which is what the embedded terminal was drawn against.
555
+ */
556
+ ansi: {
557
+ black: string
558
+ red: string
559
+ green: string
560
+ yellow: string
561
+ blue: string
562
+ magenta: string
563
+ cyan: string
564
+ white: string
565
+ brightBlack: string
566
+ brightRed: string
567
+ brightGreen: string
568
+ brightYellow: string
569
+ brightBlue: string
570
+ brightMagenta: string
571
+ brightCyan: string
572
+ brightWhite: string
573
+ }
574
+ cursor: string
575
+ selection: string
576
+ }
577
+
578
+ export const AUTHORED_SOURCES: readonly AuthoredSource[] = Object.freeze([
579
+ {
580
+ id: 'adea-light',
581
+ family: 'adea',
582
+ familyLabel: 'Adea',
583
+ label: 'Light',
584
+ name: 'Adea Light',
585
+ description: "The default light theme. A neutral ladder with a monochrome accent.",
586
+ appearance: 'light',
587
+ tags: ['light', 'neutral', 'default'],
588
+ ramp: {
589
+ background: '#ffffff',
590
+ foreground: '#252525',
591
+ surface: '#ffffff',
592
+ surfaceElevated: '#ffffff',
593
+ surfaceHover: '#f7f7f7',
594
+ surfaceActive: '#f0f0f0',
595
+ border: '#ebebeb',
596
+ borderMuted: '#f2f2f2',
597
+ textMuted: '#6f6f6f',
598
+ textSubtle: '#767676',
599
+ },
600
+ accent: '#343434',
601
+ accentForeground: '#fcfcfc',
602
+ status: {
603
+ success: '#1a7f37',
604
+ warning: '#a16207',
605
+ error: '#c53c2b',
606
+ info: '#0e7490',
607
+ },
608
+ ansi: {
609
+ black: '#1b1f24',
610
+ red: '#b91c1c',
611
+ green: '#116a2e',
612
+ yellow: '#8a5a1b',
613
+ blue: '#0b57d0',
614
+ magenta: '#a0186f',
615
+ cyan: '#0e7490',
616
+ white: '#57606a',
617
+ brightBlack: '#57606a',
618
+ brightRed: '#c94d4d',
619
+ brightGreen: '#1f9d4f',
620
+ brightYellow: '#a9752c',
621
+ brightBlue: '#3b82f6',
622
+ brightMagenta: '#c04a92',
623
+ brightCyan: '#0891b2',
624
+ brightWhite: '#24292f',
625
+ },
626
+ cursor: '#24292f',
627
+ selection: '#b6c7ff',
628
+ },
629
+ {
630
+ id: 'adea-dark',
631
+ family: 'adea',
632
+ familyLabel: 'Adea',
633
+ label: 'Dark',
634
+ name: 'Adea Dark',
635
+ description: "The default dark theme. A soft grey, never a near-black.",
636
+ appearance: 'dark',
637
+ tags: ['dark', 'neutral', 'default'],
638
+ ramp: {
639
+ background: '#252525',
640
+ foreground: '#fcfcfc',
641
+ surface: '#2d2d2d',
642
+ surfaceElevated: '#343434',
643
+ surfaceHover: '#444444',
644
+ surfaceActive: '#4d4d4d',
645
+ border: '#3d3d3d',
646
+ borderMuted: '#333333',
647
+ textMuted: '#a3a3a3',
648
+ textSubtle: '#8a8a8a',
649
+ },
650
+ accent: '#ebebeb',
651
+ accentForeground: '#343434',
652
+ status: {
653
+ success: '#3fb950',
654
+ warning: '#e3b341',
655
+ // Lighter than the value the product shipped: `#e07060` measures 4.37:1 on
656
+ // this theme's raised surface and 4.09:1 on a popover, which is where an
657
+ // alert is most likely to sit. Same hue, same chroma, four steps up.
658
+ error: '#ee7c6c',
659
+ info: '#39c5cf',
660
+ },
661
+ ansi: {
662
+ black: '#2f3742',
663
+ red: '#ff8183',
664
+ green: '#56d364',
665
+ yellow: '#e3b341',
666
+ blue: '#6ca4f8',
667
+ magenta: '#db61a2',
668
+ cyan: '#39c5cf',
669
+ white: '#d5dde5',
670
+ brightBlack: '#57606a',
671
+ brightRed: '#ff9494',
672
+ brightGreen: '#79dd8a',
673
+ brightYellow: '#f0c264',
674
+ brightBlue: '#8db9ff',
675
+ brightMagenta: '#e87cb4',
676
+ brightCyan: '#66d3dc',
677
+ brightWhite: '#eef2f6',
678
+ },
679
+ cursor: '#e6edf3',
680
+ selection: '#264f78',
681
+ },
682
+ ])