@adea-ai/themes 0.3.1 → 0.4.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 (69) hide show
  1. package/package.json +1 -1
  2. package/src/accents.ts +249 -0
  3. package/src/generated/themes.ts +17 -17
  4. package/src/index.ts +15 -0
  5. package/src/sources.ts +13 -3
  6. package/dist/adapters/base24.d.ts +0 -117
  7. package/dist/adapters/base24.d.ts.map +0 -1
  8. package/dist/adapters/base24.js +0 -313
  9. package/dist/adapters/base24.js.map +0 -1
  10. package/dist/adapters/css.d.ts +0 -68
  11. package/dist/adapters/css.d.ts.map +0 -1
  12. package/dist/adapters/css.js +0 -107
  13. package/dist/adapters/css.js.map +0 -1
  14. package/dist/adapters/shadcn.d.ts +0 -51
  15. package/dist/adapters/shadcn.d.ts.map +0 -1
  16. package/dist/adapters/shadcn.js +0 -120
  17. package/dist/adapters/shadcn.js.map +0 -1
  18. package/dist/adapters/shiki.d.ts +0 -60
  19. package/dist/adapters/shiki.d.ts.map +0 -1
  20. package/dist/adapters/shiki.js +0 -139
  21. package/dist/adapters/shiki.js.map +0 -1
  22. package/dist/adapters/tailwind.d.ts +0 -35
  23. package/dist/adapters/tailwind.d.ts.map +0 -1
  24. package/dist/adapters/tailwind.js +0 -58
  25. package/dist/adapters/tailwind.js.map +0 -1
  26. package/dist/adapters/xterm.d.ts +0 -64
  27. package/dist/adapters/xterm.d.ts.map +0 -1
  28. package/dist/adapters/xterm.js +0 -112
  29. package/dist/adapters/xterm.js.map +0 -1
  30. package/dist/catalogue.d.ts +0 -66
  31. package/dist/catalogue.d.ts.map +0 -1
  32. package/dist/catalogue.js +0 -110
  33. package/dist/catalogue.js.map +0 -1
  34. package/dist/derive.d.ts +0 -89
  35. package/dist/derive.d.ts.map +0 -1
  36. package/dist/derive.js +0 -172
  37. package/dist/derive.js.map +0 -1
  38. package/dist/generated/schemes.d.ts +0 -16
  39. package/dist/generated/schemes.d.ts.map +0 -1
  40. package/dist/generated/schemes.js +0 -880
  41. package/dist/generated/schemes.js.map +0 -1
  42. package/dist/generated/themes.d.ts +0 -11
  43. package/dist/generated/themes.d.ts.map +0 -1
  44. package/dist/generated/themes.js +0 -1658
  45. package/dist/generated/themes.js.map +0 -1
  46. package/dist/index.d.ts +0 -67
  47. package/dist/index.d.ts.map +0 -1
  48. package/dist/index.js +0 -58
  49. package/dist/index.js.map +0 -1
  50. package/dist/normalize.d.ts +0 -192
  51. package/dist/normalize.d.ts.map +0 -1
  52. package/dist/normalize.js +0 -958
  53. package/dist/normalize.js.map +0 -1
  54. package/dist/oklch.d.ts +0 -141
  55. package/dist/oklch.d.ts.map +0 -1
  56. package/dist/oklch.js +0 -311
  57. package/dist/oklch.js.map +0 -1
  58. package/dist/schema.d.ts +0 -178
  59. package/dist/schema.d.ts.map +0 -1
  60. package/dist/schema.js +0 -69
  61. package/dist/schema.js.map +0 -1
  62. package/dist/sources.d.ts +0 -296
  63. package/dist/sources.d.ts.map +0 -1
  64. package/dist/sources.js +0 -624
  65. package/dist/sources.js.map +0 -1
  66. package/dist/validate.d.ts +0 -121
  67. package/dist/validate.d.ts.map +0 -1
  68. package/dist/validate.js +0 -255
  69. package/dist/validate.js.map +0 -1
@@ -1,121 +0,0 @@
1
- /**
2
- * The catalogue's gate.
3
- *
4
- * Nothing enters this package on taste. Every theme — imported from a stranger's
5
- * palette or authored here — is measured against the same floors, and this module
6
- * is where that happens. It is what makes the catalogue able to accept external
7
- * palettes at all: a palette either clears the floors or it fails the build with
8
- * the pairing and the number, and a reviewer never has to decide by eye whether
9
- * `#8f8f8f` on `#2e2e2e` is acceptable.
10
- *
11
- * ## What is measured, and what is not
12
- *
13
- * Measured: every pairing a component renders as *text*, plus the border and
14
- * selection pairings, which are decorative and have a perceptibility floor rather
15
- * than a legibility one.
16
- *
17
- * Not measured: a colour against itself, and the surface ladder against anything
18
- * but the canvas. A rung's job is to be distinguishable from the canvas, not to
19
- * carry text — components put text on `background`, and the ladder is decoration on
20
- * top of it. Measuring the ladder against every foreground would produce failures
21
- * no theme could pass and no component would care about.
22
- *
23
- * ## Why the validator is exported
24
- *
25
- * A consumer that adds its own theme — an application with a brand palette, or a
26
- * test that builds a theme from a design tool — needs to run the same gate. It is
27
- * the only way to know a theme is admissible without reimplementing the rules.
28
- */
29
- import type { AdeaTheme, AnsiKey, ThemeColorKey } from './schema';
30
- /** One measured pairing that failed. */
31
- export interface ContrastFinding {
32
- themeId: string;
33
- /** The role the finding is about, e.g. `textMuted`. */
34
- role: string;
35
- /** The role or roles it was measured against. */
36
- against: readonly string[];
37
- ratio: number;
38
- minimum: number;
39
- message: string;
40
- }
41
- /**
42
- * The pairings a theme is required to satisfy.
43
- *
44
- * Declared as data rather than as a sequence of assertions so that the set is
45
- * reviewable in one place, and so a consumer can see exactly what is guaranteed.
46
- * `background` appears as the counterpart almost everywhere because a component's
47
- * default surface is the canvas; the two exceptions are the pairs drawn on a
48
- * raised surface or on the accent.
49
- */
50
- export interface Pairing {
51
- role: ThemeColorKey | AnsiKey | 'accentForeground' | 'border' | 'borderMuted' | 'selection';
52
- against: readonly (ThemeColorKey | 'background' | 'accent')[];
53
- minimum: number;
54
- /** Findings for pairings marked `advisory` are reported but do not fail. */
55
- advisory?: boolean;
56
- }
57
- /**
58
- * Every pairing the catalogue guarantees.
59
- *
60
- * `textSubtle` and `brightBlack` are held to 3:1 rather than 4.5:1 — see
61
- * `derive` and the schema's note on `textSubtle`. That is not a relaxation for
62
- * convenience: at 4.5:1 there is no visible difference between tertiary and
63
- * secondary text and the role stops earning its place in the schema.
64
- */
65
- export declare const REQUIRED_PAIRINGS: readonly Pairing[];
66
- /**
67
- * The status pairings, which are the same for each of the four roles.
68
- *
69
- * Two tiers, matching the normalizer: the body floor on the canvas, where a status
70
- * colour is read as small text, and the indicator floor on a raised surface. The
71
- * reasoning is in `normalize.CONTRAST_FLOORS.statusRaised`.
72
- */
73
- export declare const STATUS_PAIRINGS: readonly Pairing[];
74
- /**
75
- * The greyscale ANSI invariants.
76
- *
77
- * Deliberately **not** contrast floors. A palette's ANSI greyscale is the author's
78
- * decision and the useful ones are not high-contrast: on a light terminal ANSI
79
- * white is nearly the canvas by definition, because it is the colour used to *fill*
80
- * rather than to write with, and holding it to a legibility floor would reject
81
- * every well-made light scheme. Base24 compounds this by not naming `black`,
82
- * `white` or `brightBlack` at all.
83
- *
84
- * What is worth asserting is the pair of failures that are actually defects and are
85
- * invisible in a screenshot:
86
- *
87
- * - **Collapse** — a ramp whose roles resolve to the same colour, which means the
88
- * theme cannot express dim text at all.
89
- * - **Inversion** — an ANSI black lighter than its bright black on a dark theme, or
90
- * a light theme whose "white" is darker than its text. This is the defect the
91
- * normalizer's ramp logic was rewritten to avoid, and the one a palette with a
92
- * degenerate `base05`/`base06`/`base07` produces.
93
- */
94
- export interface AnsiInvariant {
95
- themeId: string;
96
- role: string;
97
- message: string;
98
- }
99
- /** Checks the greyscale ramp for collapse and inversion. */
100
- export declare function checkAnsiRamp(theme: AdeaTheme): AnsiInvariant[];
101
- /**
102
- * Validates one theme.
103
- *
104
- * Returns every failure rather than the first, because a theme with three bad
105
- * pairings should be fixed in one pass — and because a palette that fails one floor
106
- * usually fails several, and seeing all of them is what shows which single value is
107
- * wrong.
108
- */
109
- export declare function validateTheme(theme: AdeaTheme): ContrastFinding[];
110
- /**
111
- * Validates a whole catalogue.
112
- *
113
- * Also checks the things that are true of a catalogue rather than of a theme:
114
- * unique ids, a shape that is complete, and a mix of appearances. A catalogue that
115
- * is all dark leaves a light-theme user with one option, which is a defect in the
116
- * catalogue rather than in any theme.
117
- */
118
- export declare function validateCatalogue(themes: readonly AdeaTheme[]): ContrastFinding[];
119
- /** Formats findings for a terminal, one per line. */
120
- export declare function formatFindings(findings: readonly ContrastFinding[]): string;
121
- //# sourceMappingURL=validate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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AG,eAAe,EAAE,CAiCjF;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAI3E"}
package/dist/validate.js DELETED
@@ -1,255 +0,0 @@
1
- /**
2
- * The catalogue's gate.
3
- *
4
- * Nothing enters this package on taste. Every theme — imported from a stranger's
5
- * palette or authored here — is measured against the same floors, and this module
6
- * is where that happens. It is what makes the catalogue able to accept external
7
- * palettes at all: a palette either clears the floors or it fails the build with
8
- * the pairing and the number, and a reviewer never has to decide by eye whether
9
- * `#8f8f8f` on `#2e2e2e` is acceptable.
10
- *
11
- * ## What is measured, and what is not
12
- *
13
- * Measured: every pairing a component renders as *text*, plus the border and
14
- * selection pairings, which are decorative and have a perceptibility floor rather
15
- * than a legibility one.
16
- *
17
- * Not measured: a colour against itself, and the surface ladder against anything
18
- * but the canvas. A rung's job is to be distinguishable from the canvas, not to
19
- * carry text — components put text on `background`, and the ladder is decoration on
20
- * top of it. Measuring the ladder against every foreground would produce failures
21
- * no theme could pass and no component would care about.
22
- *
23
- * ## Why the validator is exported
24
- *
25
- * A consumer that adds its own theme — an application with a brand palette, or a
26
- * test that builds a theme from a design tool — needs to run the same gate. It is
27
- * the only way to know a theme is admissible without reimplementing the rules.
28
- */
29
- import { ANSI_KEYS, THEME_COLOR_KEYS } from './schema';
30
- import { contrastRatio, deltaEok, parseColor } from './oklch';
31
- import { CONTRAST_FLOORS } from './normalize';
32
- import { STATUS_ROLES, statusForeground } from './derive';
33
- /**
34
- * Every pairing the catalogue guarantees.
35
- *
36
- * `textSubtle` and `brightBlack` are held to 3:1 rather than 4.5:1 — see
37
- * `derive` and the schema's note on `textSubtle`. That is not a relaxation for
38
- * convenience: at 4.5:1 there is no visible difference between tertiary and
39
- * secondary text and the role stops earning its place in the schema.
40
- */
41
- export const REQUIRED_PAIRINGS = Object.freeze([
42
- { role: 'text', against: ['background'], minimum: CONTRAST_FLOORS.text },
43
- { role: 'foreground', against: ['background'], minimum: CONTRAST_FLOORS.text },
44
- { role: 'textMuted', against: ['background'], minimum: CONTRAST_FLOORS.textMuted },
45
- { role: 'text', against: ['surface'], minimum: CONTRAST_FLOORS.text },
46
- { role: 'text', against: ['surfaceElevated'], minimum: CONTRAST_FLOORS.text },
47
- { role: 'textMuted', against: ['surface'], minimum: CONTRAST_FLOORS.textMuted },
48
- { role: 'textSubtle', against: ['background'], minimum: CONTRAST_FLOORS.textSubtle },
49
- { role: 'accent', against: ['background'], minimum: CONTRAST_FLOORS.accent },
50
- {
51
- role: 'accent',
52
- against: ['surface', 'surfaceElevated'],
53
- minimum: CONTRAST_FLOORS.accentRaised,
54
- },
55
- { role: 'accentForeground', against: ['accent'], minimum: CONTRAST_FLOORS.accentForeground },
56
- { role: 'border', against: ['background'], minimum: CONTRAST_FLOORS.border },
57
- { role: 'borderMuted', against: ['background'], minimum: CONTRAST_FLOORS.borderMuted },
58
- { role: 'selection', against: ['background'], minimum: CONTRAST_FLOORS.selection },
59
- ]);
60
- /**
61
- * The status pairings, which are the same for each of the four roles.
62
- *
63
- * Two tiers, matching the normalizer: the body floor on the canvas, where a status
64
- * colour is read as small text, and the indicator floor on a raised surface. The
65
- * reasoning is in `normalize.CONTRAST_FLOORS.statusRaised`.
66
- */
67
- export const STATUS_PAIRINGS = Object.freeze([
68
- ...STATUS_ROLES.map((role) => ({
69
- role,
70
- against: ['background'],
71
- minimum: CONTRAST_FLOORS.status,
72
- })),
73
- ...STATUS_ROLES.map((role) => ({
74
- role,
75
- against: ['surface', 'surfaceElevated'],
76
- minimum: CONTRAST_FLOORS.statusRaised,
77
- })),
78
- ]);
79
- /** Checks the greyscale ramp for collapse and inversion. */
80
- export function checkAnsiRamp(theme) {
81
- const findings = [];
82
- const black = parseColor(theme.ansi.black);
83
- const brightBlack = parseColor(theme.ansi.brightBlack);
84
- const white = parseColor(theme.ansi.white);
85
- const brightWhite = parseColor(theme.ansi.brightWhite);
86
- if (black && brightBlack) {
87
- if (deltaEok(black, brightBlack) < 0.02) {
88
- findings.push({
89
- themeId: theme.id,
90
- role: 'black',
91
- message: 'ANSI black and bright black resolve to the same colour, so the theme cannot express dim text',
92
- });
93
- }
94
- // On both appearances ANSI 8 sits above ANSI 0 in lightness: it is the dim grey
95
- // a comment is written in, and ANSI 0 is the darker of the pair.
96
- if (brightBlack.l <= black.l) {
97
- findings.push({
98
- themeId: theme.id,
99
- role: 'brightBlack',
100
- message: `ANSI bright black (L ${brightBlack.l.toFixed(3)}) is not lighter than ANSI black (L ${black.l.toFixed(3)}), which inverts the greyscale ramp`,
101
- });
102
- }
103
- }
104
- // The light end is deliberately not asserted. On a light terminal the ANSI white
105
- // and bright white roles are *foregrounds*: GitHub's light scheme, which Adea's
106
- // own light theme uses, sets white to a mid grey and bright white darker still,
107
- // and several palettes in the catalogue set the two to the same value. There is no
108
- // invariant there — unlike ANSI 0/8, whose ordering holds in both appearances.
109
- void white;
110
- void brightWhite;
111
- return findings;
112
- }
113
- function resolve(theme, role) {
114
- if (role === 'accent')
115
- return parseColor(theme.colors.accent);
116
- if (role === 'background')
117
- return parseColor(theme.colors.background);
118
- if (THEME_COLOR_KEYS.includes(role)) {
119
- return parseColor(theme.colors[role]);
120
- }
121
- if (ANSI_KEYS.includes(role)) {
122
- return parseColor(theme.ansi[role]);
123
- }
124
- if (role === 'cursor')
125
- return parseColor(theme.cursor);
126
- if (role === 'selection')
127
- return parseColor(theme.selection);
128
- return undefined;
129
- }
130
- /** Measures one pairing, returning a finding when it fails. */
131
- function measure(theme, pairing) {
132
- const subject = resolve(theme, pairing.role);
133
- if (!subject) {
134
- return {
135
- themeId: theme.id,
136
- role: pairing.role,
137
- against: pairing.against,
138
- ratio: 0,
139
- minimum: pairing.minimum,
140
- message: `${pairing.role} is missing or is not a colour`,
141
- };
142
- }
143
- for (const counterpartName of pairing.against) {
144
- const counterpart = resolve(theme, counterpartName);
145
- if (!counterpart)
146
- continue;
147
- const ratio = contrastRatio(subject, counterpart);
148
- if (ratio < pairing.minimum - 1e-9) {
149
- return {
150
- themeId: theme.id,
151
- role: pairing.role,
152
- against: [counterpartName],
153
- ratio,
154
- minimum: pairing.minimum,
155
- message: `${pairing.role} measures ${ratio.toFixed(2)}:1 against ${counterpartName}, below the ${pairing.minimum}:1 floor`,
156
- };
157
- }
158
- }
159
- return undefined;
160
- }
161
- /**
162
- * Validates one theme.
163
- *
164
- * Returns every failure rather than the first, because a theme with three bad
165
- * pairings should be fixed in one pass — and because a palette that fails one floor
166
- * usually fails several, and seeing all of them is what shows which single value is
167
- * wrong.
168
- */
169
- export function validateTheme(theme) {
170
- const findings = [];
171
- for (const pairing of [...REQUIRED_PAIRINGS, ...STATUS_PAIRINGS]) {
172
- const finding = measure(theme, pairing);
173
- if (finding)
174
- findings.push(finding);
175
- }
176
- // The greyscale ramp's failures are structural rather than contrast-based, so
177
- // they are reported as findings with no ratio.
178
- for (const invariant of checkAnsiRamp(theme)) {
179
- findings.push({
180
- themeId: invariant.themeId,
181
- role: invariant.role,
182
- against: [],
183
- ratio: 0,
184
- minimum: 0,
185
- message: invariant.message,
186
- });
187
- }
188
- // The status foreground pairing cannot be declared as a table entry because it
189
- // depends on the theme: the correct colour is whichever extreme of the theme
190
- // measures better, so it is derived and then measured rather than named.
191
- for (const role of STATUS_ROLES) {
192
- const fill = parseColor(theme.colors[role]);
193
- const chosen = parseColor(statusForeground(theme, role));
194
- if (!fill || !chosen)
195
- continue;
196
- const ratio = contrastRatio(chosen, fill);
197
- if (ratio < CONTRAST_FLOORS.accentForeground - 1e-9) {
198
- findings.push({
199
- themeId: theme.id,
200
- role: `${role}-foreground`,
201
- against: [role],
202
- ratio,
203
- minimum: CONTRAST_FLOORS.accentForeground,
204
- message: `no text colour clears ${CONTRAST_FLOORS.accentForeground}:1 on the ${role} fill; the best of the theme's two extremes is ${ratio.toFixed(2)}:1`,
205
- });
206
- }
207
- }
208
- return findings;
209
- }
210
- /**
211
- * Validates a whole catalogue.
212
- *
213
- * Also checks the things that are true of a catalogue rather than of a theme:
214
- * unique ids, a shape that is complete, and a mix of appearances. A catalogue that
215
- * is all dark leaves a light-theme user with one option, which is a defect in the
216
- * catalogue rather than in any theme.
217
- */
218
- export function validateCatalogue(themes) {
219
- const findings = [];
220
- const ids = new Set();
221
- for (const theme of themes) {
222
- if (ids.has(theme.id)) {
223
- findings.push({
224
- themeId: theme.id,
225
- role: 'id',
226
- against: [],
227
- ratio: 0,
228
- minimum: 0,
229
- message: `duplicate theme id: ${theme.id}`,
230
- });
231
- }
232
- ids.add(theme.id);
233
- findings.push(...validateTheme(theme));
234
- }
235
- const light = themes.filter((theme) => theme.appearance === 'light').length;
236
- const dark = themes.filter((theme) => theme.appearance === 'dark').length;
237
- if (light === 0 || dark === 0) {
238
- findings.push({
239
- themeId: 'catalogue',
240
- role: 'appearance',
241
- against: [],
242
- ratio: 0,
243
- minimum: 0,
244
- message: `catalogue covers ${light} light and ${dark} dark themes; both appearances must be represented`,
245
- });
246
- }
247
- return findings;
248
- }
249
- /** Formats findings for a terminal, one per line. */
250
- export function formatFindings(findings) {
251
- return findings
252
- .map((finding) => `${finding.themeId} ${finding.role}: ${finding.message}`)
253
- .join('\n');
254
- }
255
- //# sourceMappingURL=validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AA+BzD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAuB,MAAM,CAAC,MAAM,CAAC;IACjE,EAAE,IAAI,EAAE,M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