@adea-ai/themes 0.4.0 → 0.4.2

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 (70) hide show
  1. package/dist/accents.d.ts +150 -0
  2. package/dist/accents.d.ts.map +1 -0
  3. package/dist/accents.js +205 -0
  4. package/dist/accents.js.map +1 -0
  5. package/dist/adapters/base24.d.ts +108 -0
  6. package/dist/adapters/base24.d.ts.map +1 -0
  7. package/dist/adapters/base24.js +338 -0
  8. package/dist/adapters/base24.js.map +1 -0
  9. package/dist/adapters/css.d.ts +68 -0
  10. package/dist/adapters/css.d.ts.map +1 -0
  11. package/dist/adapters/css.js +107 -0
  12. package/dist/adapters/css.js.map +1 -0
  13. package/dist/adapters/shadcn.d.ts +51 -0
  14. package/dist/adapters/shadcn.d.ts.map +1 -0
  15. package/dist/adapters/shadcn.js +120 -0
  16. package/dist/adapters/shadcn.js.map +1 -0
  17. package/dist/adapters/shiki.d.ts +60 -0
  18. package/dist/adapters/shiki.d.ts.map +1 -0
  19. package/dist/adapters/shiki.js +139 -0
  20. package/dist/adapters/shiki.js.map +1 -0
  21. package/dist/adapters/tailwind.d.ts +35 -0
  22. package/dist/adapters/tailwind.d.ts.map +1 -0
  23. package/dist/adapters/tailwind.js +58 -0
  24. package/dist/adapters/tailwind.js.map +1 -0
  25. package/dist/adapters/xterm.d.ts +64 -0
  26. package/dist/adapters/xterm.d.ts.map +1 -0
  27. package/dist/adapters/xterm.js +112 -0
  28. package/dist/adapters/xterm.js.map +1 -0
  29. package/dist/catalogue.d.ts +66 -0
  30. package/dist/catalogue.d.ts.map +1 -0
  31. package/dist/catalogue.js +110 -0
  32. package/dist/catalogue.js.map +1 -0
  33. package/dist/derive.d.ts +89 -0
  34. package/dist/derive.d.ts.map +1 -0
  35. package/dist/derive.js +172 -0
  36. package/dist/derive.js.map +1 -0
  37. package/dist/generated/schemes.d.ts +16 -0
  38. package/dist/generated/schemes.d.ts.map +1 -0
  39. package/dist/generated/schemes.js +880 -0
  40. package/dist/generated/schemes.js.map +1 -0
  41. package/dist/generated/themes.d.ts +11 -0
  42. package/dist/generated/themes.d.ts.map +1 -0
  43. package/dist/generated/themes.js +1658 -0
  44. package/dist/generated/themes.js.map +1 -0
  45. package/dist/index.d.ts +69 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +59 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/normalize.d.ts +192 -0
  50. package/dist/normalize.d.ts.map +1 -0
  51. package/dist/normalize.js +958 -0
  52. package/dist/normalize.js.map +1 -0
  53. package/dist/oklch.d.ts +141 -0
  54. package/dist/oklch.d.ts.map +1 -0
  55. package/dist/oklch.js +311 -0
  56. package/dist/oklch.js.map +1 -0
  57. package/dist/schema.d.ts +178 -0
  58. package/dist/schema.d.ts.map +1 -0
  59. package/dist/schema.js +69 -0
  60. package/dist/schema.js.map +1 -0
  61. package/dist/sources.d.ts +296 -0
  62. package/dist/sources.d.ts.map +1 -0
  63. package/dist/sources.js +634 -0
  64. package/dist/sources.js.map +1 -0
  65. package/dist/validate.d.ts +121 -0
  66. package/dist/validate.d.ts.map +1 -0
  67. package/dist/validate.js +255 -0
  68. package/dist/validate.js.map +1 -0
  69. package/package.json +2 -1
  70. package/src/adapters/base24.ts +25 -1
@@ -0,0 +1,178 @@
1
+ /**
2
+ * The canonical schema.
3
+ *
4
+ * This file is the contract. Everything else in the package — the normalizer, the
5
+ * Base24 bridge, the terminal and editor adapters — exists to move values into or
6
+ * out of the shapes declared here, and no adapter is allowed to invent a role that
7
+ * is not in this file.
8
+ *
9
+ * ## Why this and not Base24
10
+ *
11
+ * Base24 is an excellent interchange format and a poor application schema. Its
12
+ * sixteen `base00`–`base0F` slots describe an editor: there is a slot for the
13
+ * background, a slot for comments, and a slot for the colour of a deprecated API,
14
+ * but nothing that means "the surface one step above the card" or "the text a
15
+ * caption uses". A UI built by reading Base24 directly ends up with component
16
+ * authors choosing between `base01` and `base02` by eye, which is how a design
17
+ * system acquires four nearly-identical greys that no one dares consolidate.
18
+ *
19
+ * So the roles below are the ones a component actually asks for — a surface, a
20
+ * border, a muted text, an accent — and Base24 is a bridge at the edge. See
21
+ * `adapters/base24.ts` for both directions.
22
+ *
23
+ * ## Why OKLCH strings and not numbers
24
+ *
25
+ * Every colour here is an `oklch(L C H)` string rather than a parsed object. It
26
+ * keeps the catalogue readable and diffable in review, it can be handed straight
27
+ * to CSS with no serialisation step, and it cannot be mutated by a consumer that
28
+ * receives it. Call {@link "../oklch".parseColor} when the numbers are needed.
29
+ */
30
+ /** Whether a theme is a light or a dark theme. */
31
+ export type ThemeAppearance = 'dark' | 'light';
32
+ /**
33
+ * The seventeen colours that describe a surface.
34
+ *
35
+ * The set is deliberately small and deliberately semantic. There is no `grey300`
36
+ * and no `blue500`: a component that needs "a slightly raised panel" asks for
37
+ * `surfaceElevated` and gets whichever value the active theme considers one step
38
+ * up, at every theme in the catalogue, without the component knowing.
39
+ */
40
+ export interface AdeaThemeColors {
41
+ /** The canvas. Everything that is not a surface sits on this. */
42
+ background: string;
43
+ /** Default body text on `background`. Clears 4.5:1 against it in every theme. */
44
+ foreground: string;
45
+ /** The first rung above the canvas: cards, panels, sidebars. */
46
+ surface: string;
47
+ /** The second rung: popovers, dialogs, menus floating above a card. */
48
+ surfaceElevated: string;
49
+ /** A surface under the pointer. */
50
+ surfaceHover: string;
51
+ /** A surface under an active press or a selected row. */
52
+ surfaceActive: string;
53
+ /** The default divider and input outline. */
54
+ border: string;
55
+ /** A divider that should recede: table rules, separators inside a card. */
56
+ borderMuted: string;
57
+ /** Text at full strength. Identical to `foreground` unless a theme overrides it. */
58
+ text: string;
59
+ /** Secondary text: descriptions, captions, table cell metadata. Clears 4.5:1. */
60
+ textMuted: string;
61
+ /**
62
+ * Tertiary text: timestamps, counts, placeholder copy. Clears 3:1, which is the
63
+ * WCAG floor for large text and for non-essential text — the floor is lower
64
+ * here on purpose, because at 4.5:1 there is no longer any visual difference
65
+ * between this role and `textMuted` and the role stops earning its place.
66
+ */
67
+ textSubtle: string;
68
+ /** The one interactive colour: primary buttons, selected tabs, focus rings. */
69
+ accent: string;
70
+ /** Text and icons drawn on top of `accent`. Clears 4.5:1 against it. */
71
+ accentForeground: string;
72
+ /** Positive status. Text-legible against `background`, unlike most palettes' green. */
73
+ success: string;
74
+ /** Cautionary status. Text-legible against `background`. */
75
+ warning: string;
76
+ /** Destructive status and destructive text. Text-legible against `background`. */
77
+ error: string;
78
+ /** Neutral notice. Text-legible against `background`. */
79
+ info: string;
80
+ }
81
+ /**
82
+ * The sixteen ANSI colours.
83
+ *
84
+ * Carried in the canonical schema rather than derived on demand because they are
85
+ * what a shell, a diff and a build log are coloured with, and a terminal embedded
86
+ * in the app must agree with the terminal the user has open beside it. When a
87
+ * theme is imported from a palette that publishes ANSI values, these are those
88
+ * values, not a reconstruction.
89
+ */
90
+ export interface AdeaAnsi {
91
+ black: string;
92
+ red: string;
93
+ green: string;
94
+ yellow: string;
95
+ blue: string;
96
+ magenta: string;
97
+ cyan: string;
98
+ white: string;
99
+ brightBlack: string;
100
+ brightRed: string;
101
+ brightGreen: string;
102
+ brightYellow: string;
103
+ brightBlue: string;
104
+ brightMagenta: string;
105
+ brightCyan: string;
106
+ brightWhite: string;
107
+ }
108
+ /**
109
+ * A theme.
110
+ *
111
+ * This is the published contract: the three identity fields, the seventeen surface
112
+ * roles, the sixteen ANSI colours, and the two state colours a selection needs.
113
+ */
114
+ export interface AdeaTheme {
115
+ /** Stable id. The `data-theme` value and what a preference stores. */
116
+ id: string;
117
+ /** Human-readable name, e.g. `"Catppuccin Mocha"`. */
118
+ name: string;
119
+ appearance: ThemeAppearance;
120
+ colors: AdeaThemeColors;
121
+ ansi: AdeaAnsi;
122
+ /** The text cursor. Usually the foreground, but a palette may disagree. */
123
+ cursor: string;
124
+ /** The selection background. */
125
+ selection: string;
126
+ }
127
+ /** Where a palette came from and the terms it is used under. */
128
+ export interface ThemeProvenance {
129
+ /** The project or person the palette belongs to. */
130
+ project: string;
131
+ /** The canonical upstream URL. */
132
+ url: string;
133
+ /** An SPDX identifier. Every palette in this catalogue is permissive. */
134
+ license: string;
135
+ /**
136
+ * The commit the vendored values were taken from, when they were taken from a
137
+ * vendored artefact rather than from the project directly. This is what makes
138
+ * the palette data auditable: the numbers in `palettes/` can be re-derived from
139
+ * a named revision rather than trusted.
140
+ */
141
+ revision?: string;
142
+ /** The upstream artefacts this palette's ANSI half was bootstrapped from. */
143
+ bootstrappedFrom?: readonly string[];
144
+ }
145
+ /**
146
+ * A catalogue entry: the theme, plus what a picker and an audit need.
147
+ *
148
+ * Kept as a separate type rather than folded into {@link AdeaTheme} so that a
149
+ * consumer receiving a theme can depend on exactly the documented contract and
150
+ * nothing else, while the catalogue still carries the provenance that lets a
151
+ * licence audit answer "where did this colour come from".
152
+ */
153
+ export interface AdeaThemeRecord extends AdeaTheme {
154
+ /** Groups the variants that came from one project, e.g. `catppuccin`. */
155
+ family: string;
156
+ /** How the family is written in a picker, e.g. `Catppuccin`. */
157
+ familyLabel: string;
158
+ /** Short display name within the family, e.g. `Mocha`. */
159
+ label: string;
160
+ /** One line, shown in a picker. */
161
+ description: string;
162
+ provenance: ThemeProvenance;
163
+ /** Search and filter terms, e.g. `['dark', 'muted', 'popular']`. */
164
+ tags: readonly string[];
165
+ }
166
+ /** A family of themes: one project, one or more variants. */
167
+ export interface ThemeFamily {
168
+ id: string;
169
+ label: string;
170
+ themes: readonly AdeaThemeRecord[];
171
+ }
172
+ /** The keys of {@link AdeaThemeColors}, for iteration and validation. */
173
+ export declare const THEME_COLOR_KEYS: readonly ["background", "foreground", "surface", "surfaceElevated", "surfaceHover", "surfaceActive", "border", "borderMuted", "text", "textMuted", "textSubtle", "accent", "accentForeground", "success", "warning", "error", "info"];
174
+ /** The keys of {@link AdeaAnsi}. */
175
+ export declare const ANSI_KEYS: readonly ["black", "red", "green", "yellow", "blue", "magenta", "cyan", "white", "brightBlack", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite"];
176
+ export type ThemeColorKey = (typeof THEME_COLOR_KEYS)[number];
177
+ export type AnsiKey = (typeof ANSI_KEYS)[number];
178
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,kDAAkD;AAClD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAA;AAE9C;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAA;IAClB,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAA;IAClB,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAA;IACf,uEAAuE;IACvE,eAAe,EAAE,MAAM,CAAA;IACvB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,aAAa,EAAE,MAAM,CAAA;IACrB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAA;IACnB,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAA;IACZ,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,CAAA;IACxB,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;IACf,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAA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ACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,eAAe,CAAA;IAC3B,oEAAoE;IACpE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CACxB;AAED,6DAA6D;AAC7D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CACnC;AAED,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,uOAkB0B,CAAA;AAEvD,oCAAoC;AACpC,eAAO,MAAM,SAAS,yMAiB0B,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC7D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA"}
package/dist/schema.js ADDED
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The canonical schema.
3
+ *
4
+ * This file is the contract. Everything else in the package — the normalizer, the
5
+ * Base24 bridge, the terminal and editor adapters — exists to move values into or
6
+ * out of the shapes declared here, and no adapter is allowed to invent a role that
7
+ * is not in this file.
8
+ *
9
+ * ## Why this and not Base24
10
+ *
11
+ * Base24 is an excellent interchange format and a poor application schema. Its
12
+ * sixteen `base00`–`base0F` slots describe an editor: there is a slot for the
13
+ * background, a slot for comments, and a slot for the colour of a deprecated API,
14
+ * but nothing that means "the surface one step above the card" or "the text a
15
+ * caption uses". A UI built by reading Base24 directly ends up with component
16
+ * authors choosing between `base01` and `base02` by eye, which is how a design
17
+ * system acquires four nearly-identical greys that no one dares consolidate.
18
+ *
19
+ * So the roles below are the ones a component actually asks for — a surface, a
20
+ * border, a muted text, an accent — and Base24 is a bridge at the edge. See
21
+ * `adapters/base24.ts` for both directions.
22
+ *
23
+ * ## Why OKLCH strings and not numbers
24
+ *
25
+ * Every colour here is an `oklch(L C H)` string rather than a parsed object. It
26
+ * keeps the catalogue readable and diffable in review, it can be handed straight
27
+ * to CSS with no serialisation step, and it cannot be mutated by a consumer that
28
+ * receives it. Call {@link "../oklch".parseColor} when the numbers are needed.
29
+ */
30
+ /** The keys of {@link AdeaThemeColors}, for iteration and validation. */
31
+ export const THEME_COLOR_KEYS = [
32
+ 'background',
33
+ 'foreground',
34
+ 'surface',
35
+ 'surfaceElevated',
36
+ 'surfaceHover',
37
+ 'surfaceActive',
38
+ 'border',
39
+ 'borderMuted',
40
+ 'text',
41
+ 'textMuted',
42
+ 'textSubtle',
43
+ 'accent',
44
+ 'accentForeground',
45
+ 'success',
46
+ 'warning',
47
+ 'error',
48
+ 'info',
49
+ ];
50
+ /** The keys of {@link AdeaAnsi}. */
51
+ export const ANSI_KEYS = [
52
+ 'black',
53
+ 'red',
54
+ 'green',
55
+ 'yellow',
56
+ 'blue',
57
+ 'magenta',
58
+ 'cyan',
59
+ 'white',
60
+ 'brightBlack',
61
+ 'brightRed',
62
+ 'brightGreen',
63
+ 'brightYellow',
64
+ 'brightBlue',
65
+ 'brightMagenta',
66
+ 'brightCyan',
67
+ 'brightWhite',
68
+ ];
69
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAuJH,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,iBAAiB;IACjB,cAAc;IACd,eAAe;IACf,QAAQ;IACR,aAAa;IACb,MAAM;IACN,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,kBAAkB;IAClB,SAAS;IACT,SAAS;IACT,OAAO;IACP,MAAM;CAC+C,CAAA;AAEvD,oCAAoC;AACpC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO;IACP,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,aAAa;IACb,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,aAAa;CACiC,CAAA"}
@@ -0,0 +1,296 @@
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
+ import type { Base24Slot } from './adapters/base24';
39
+ import type { ThemeAppearance, ThemeProvenance } from './schema';
40
+ /** The dataset the Base24 schemes are reproduced from. */
41
+ export declare const CATALOGUE_REPOSITORY = "https://github.com/williamzujkowski/oklch-terminal-themes";
42
+ /**
43
+ * The pinned revision. Refreshing the catalogue starts by changing this, which is
44
+ * what makes a palette update a reviewable diff rather than an invisible drift.
45
+ */
46
+ export declare const CATALOGUE_REVISION = "9e800e7fe760081d4c10317498038ed4227341d6";
47
+ /** Where Adea's own theme lives. */
48
+ export declare const ADEA_PROVENANCE: ThemeProvenance;
49
+ /**
50
+ * A theme composed from **two** upstream palettes.
51
+ *
52
+ * Adea's own dark theme is not a copy of any published palette, and it is not
53
+ * hand-authored either. It is a deliberate composition: the canvas, the greys, the
54
+ * cursor and the selection come from a palette chosen for exactly those — Aardvark
55
+ * Ink, whose near-black navy and muted blue-grey foreground are why it was picked —
56
+ * and the sixteen ANSI hues come from a second palette chosen for its saturation,
57
+ * GitHub's dark scheme.
58
+ *
59
+ * The split exists because the two properties are in tension inside one palette. A
60
+ * palette tuned for a comfortable canvas mutes its hues to agree with it; a palette
61
+ * tuned for vivid syntax colours tends to sit on a canvas that is very dark or very
62
+ * flat. Taking one of each yields a calm ground with legible colour on it.
63
+ *
64
+ * ## Why it is composed rather than merged by hand
65
+ *
66
+ * The alternative was to read both palettes and paste the merged hex into
67
+ * `palettes/adea-dark.json`. That works once and is wrong afterwards: nothing then
68
+ * records which donor each value came from, so neither donor could ever be
69
+ * refreshed. Composing in the vendor step keeps both parents named, keeps the values
70
+ * upstream's own bytes rather than a transcription, and makes "GitHub changed its
71
+ * blue" a one-line diff plus a rebuild.
72
+ */
73
+ export interface ComposedSource {
74
+ id: string;
75
+ name: string;
76
+ family: 'adea';
77
+ familyLabel: string;
78
+ label: string;
79
+ description: string;
80
+ appearance: ThemeAppearance;
81
+ tags: readonly string[];
82
+ /** The two donors' slugs in the dataset, and which half each supplies. */
83
+ donors: Readonly<Record<'structure' | 'hues', string>>;
84
+ /**
85
+ * The Base24 slot map.
86
+ *
87
+ * Each entry is `[donor, key]`, where the donor is `structure` or `hues` and the
88
+ * key is a role name in that donor's published palette — the dataset's own names,
89
+ * so `purple` is Base24's magenta slot and `brightPurple` its bright magenta.
90
+ */
91
+ slots: Readonly<Partial<Record<Base24Slot, readonly ['structure' | 'hues', string]>>>;
92
+ /**
93
+ * Slots neither donor supplies, derived from one of them.
94
+ *
95
+ * `slots` and `synthesise` are jointly total: between them they must cover every
96
+ * Base24 slot, and the vendor step asserts that rather than trusting it. The two
97
+ * are separate maps rather than one so that "this value came from a donor" and
98
+ * "this value was computed" stay distinguishable in review.
99
+ */
100
+ synthesise: Readonly<Partial<Record<Base24Slot, readonly ['structure' | 'hues', string, {
101
+ rotate?: number;
102
+ lighten?: number;
103
+ }]>>>;
104
+ /**
105
+ * ANSI roles pinned to the structure donor's own values.
106
+ *
107
+ * The greyscale ramp is normally *derived* by ranking a scheme's grey slots by
108
+ * measured contrast, because Base24 does not name `black`, `white` or
109
+ * `brightBlack` and light schemes invert them. That derivation is right for an
110
+ * imported palette and wrong here: Aardvark Ink publishes a greyscale it chose,
111
+ * the greyscale is the reason it was chosen as the structure donor, and
112
+ * re-deriving it gives back something close but not equal. So the four roles are
113
+ * pinned to the donor's own values instead.
114
+ */
115
+ ansiFromStructure: readonly ('black' | 'brightBlack' | 'white' | 'brightWhite')[];
116
+ /** The role supplying the accent, when the family's identity demands one. */
117
+ accentSlot?: 'blue' | 'magenta' | 'cyan' | 'green';
118
+ palette?: Partial<Record<Base24Slot, string>>;
119
+ /**
120
+ * Transpose this composition's hues onto the borrowed canvas.
121
+ *
122
+ * Set when a composition takes its hues from a palette authored against a different
123
+ * kind of canvas — which is what borrowing a *dark* palette's hues for a *light*
124
+ * canvas is. See `transposeHues` in `src/normalize.ts` for why the whole hue set
125
+ * moves by one common step rather than each hue being repaired on its own.
126
+ */
127
+ hueTranspose?: {
128
+ floor: number;
129
+ };
130
+ /** The body-text floor; the defaults are held to AAA rather than the catalogue's AA. */
131
+ textFloor?: number;
132
+ provenance: ThemeProvenance;
133
+ }
134
+ /**
135
+ * Adea's two default themes.
136
+ *
137
+ * Both are compositions and both were previously authored here — the light one as a
138
+ * neutral grey ramp on white with a monochrome accent, the dark one as a neutral grey
139
+ * ramp on `#252525`. They replaced those entirely while keeping their names, because
140
+ * they are the defaults: the system's own appearance, not a pair of options beside it.
141
+ *
142
+ * ## Why they are a *pair* rather than two themes
143
+ *
144
+ * They share one hue donor, so a red is the same red and a blue the same blue in both,
145
+ * and each borrows its canvas from a palette chosen for the *canvas* rather than for
146
+ * its colours:
147
+ *
148
+ * | | canvas | canvas hue | hues |
149
+ * | --- | --- | --- | --- |
150
+ * | Adea Dark | Aardvark Ink `#0f141f` | 265° | GitHub Dark Default |
151
+ * | Adea Light | Nord Light `#e3e9f4` | 262° | GitHub Dark Default |
152
+ *
153
+ * Three degrees apart, and both canvases are *tinted* rather than neutral — 0.024 and
154
+ * 0.016 of chroma — which is the property that makes the pair feel like one theme seen
155
+ * at two exposures instead of two themes that happen to ship together. Switching
156
+ * appearance changes lightness and nothing else about the theme's identity; that claim
157
+ * is asserted in `tests/provenance.test.ts` rather than left as intent.
158
+ *
159
+ * The light theme is the reason `hueTranspose` exists: GitHub's dark hues measure
160
+ * between 2.5:1 and 4.1:1 on a light canvas, so the whole hue set is transposed down in
161
+ * lightness by one common step — hue and chroma intact, relative brightness ordering
162
+ * intact — rather than repaired hue by hue, which would have collapsed every bright
163
+ * variant onto its normal sibling.
164
+ */
165
+ export declare const COMPOSED_SOURCES: readonly ComposedSource[];
166
+ /**
167
+ * Per-family provenance.
168
+ *
169
+ * `url` is the project's own repository — the place its palette is defined — while
170
+ * the vendored values come through the chain described in this module's header.
171
+ * Recording both is the point: one answers "whose palette is this", the other
172
+ * answers "which bytes are in the file".
173
+ */
174
+ export declare const FAMILY_PROVENANCE: Readonly<Record<string, ThemeProvenance>>;
175
+ /** A theme that is normalized from a vendored Base24 scheme. */
176
+ export interface VendoredSource {
177
+ id: string;
178
+ /** The scheme's slug in the dataset. */
179
+ slug: string;
180
+ family: keyof typeof FAMILY_PROVENANCE;
181
+ familyLabel: string;
182
+ label: string;
183
+ name: string;
184
+ description: string;
185
+ appearance: ThemeAppearance;
186
+ tags: readonly string[];
187
+ /** Declared when the family's identity is not in its blue slot. */
188
+ accentSlot?: 'blue' | 'magenta' | 'cyan' | 'green';
189
+ /**
190
+ * Corrections to the vendored scheme, applied before normalization.
191
+ *
192
+ * One entry uses this, and it is worth reading as the example of when it is
193
+ * legitimate: iTerm2's One Dark port deliberately darkens the canvas to `#21252b`
194
+ * so a terminal reads as a distinct surface, but Atom's own editor palette — the
195
+ * thing "One Dark" means — is `hsl(220, 13%, 18%)` = `#282c34`, with comments at
196
+ * `#5c6370` rather than the port's `#767676`. Adea themes an application, so the
197
+ * project's value is the correct one. Every correction is reported as a finding
198
+ * and appears in the catalogue's build log.
199
+ */
200
+ palette?: Partial<Record<Base24Slot, string>>;
201
+ }
202
+ /**
203
+ * The vendored catalogue.
204
+ *
205
+ * Ordered family by family, and within a family light-to-dark or by the order the
206
+ * project itself lists its flavours. The order is the order a picker shows, so it
207
+ * is deliberate rather than alphabetical.
208
+ */
209
+ export declare const VENDORED_SOURCES: readonly VendoredSource[];
210
+ /**
211
+ * Adea's own theme.
212
+ *
213
+ * Authored here rather than vendored, and the only entry whose colours are chosen
214
+ * rather than reproduced. It is deliberately a neutral ladder with a monochrome
215
+ * accent — the design system's default has to work as a default for everyone, which
216
+ * means it cannot be anybody's favourite colour.
217
+ *
218
+ * Intentionally empty, and worth leaving that way until something needs it.
219
+ *
220
+ * This was where both default themes lived. They are now
221
+ * {@link COMPOSED_SOURCES} entries instead, which is a better home for them: a
222
+ * composition names the upstream palettes it came from and can be rebuilt when either
223
+ * moves, while an authored entry is a table of values nobody can refresh.
224
+ *
225
+ * The route stays because it is the only way to specify *semantic* roles directly
226
+ * rather than deriving them through Base24 slots — which is what a brand theme with
227
+ * values handed over by a designer would need. Nothing uses it today; if nothing has by
228
+ * the time someone reads this, delete it.
229
+ */
230
+ export interface AuthoredSource {
231
+ id: string;
232
+ family: string;
233
+ familyLabel: string;
234
+ label: string;
235
+ name: string;
236
+ description: string;
237
+ appearance: ThemeAppearance;
238
+ tags: readonly string[];
239
+ /**
240
+ * The greyscale ramp the theme is built from, darkest first.
241
+ *
242
+ * Authored as hex rather than OKLCH because that is how the design system's
243
+ * values were originally specified and reviewed; the normalizer converts, and the
244
+ * committed catalogue is OKLCH.
245
+ */
246
+ ramp: {
247
+ background: string;
248
+ foreground: string;
249
+ surface: string;
250
+ surfaceElevated: string;
251
+ surfaceHover: string;
252
+ surfaceActive: string;
253
+ border: string;
254
+ borderMuted: string;
255
+ textMuted: string;
256
+ textSubtle: string;
257
+ };
258
+ accent: string;
259
+ accentForeground: string;
260
+ status: {
261
+ success: string;
262
+ warning: string;
263
+ error: string;
264
+ info: string;
265
+ };
266
+ /**
267
+ * The terminal palette.
268
+ *
269
+ * Adea ships a terminal, so its own theme has to answer the sixteen ANSI
270
+ * questions the same way an imported theme does. These are the values the product
271
+ * already runs: the light set is GitHub's light scheme and the dark set GitHub's
272
+ * dark, which is what the embedded terminal was drawn against.
273
+ */
274
+ ansi: {
275
+ black: string;
276
+ red: string;
277
+ green: string;
278
+ yellow: string;
279
+ blue: string;
280
+ magenta: string;
281
+ cyan: string;
282
+ white: string;
283
+ brightBlack: string;
284
+ brightRed: string;
285
+ brightGreen: string;
286
+ brightYellow: string;
287
+ brightBlue: string;
288
+ brightMagenta: string;
289
+ brightCyan: string;
290
+ brightWhite: string;
291
+ };
292
+ cursor: string;
293
+ selection: string;
294
+ }
295
+ export declare const AUTHORED_SOURCES: readonly AuthoredSource[];
296
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAA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