@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.
- package/LICENSE +201 -0
- package/NOTICE +110 -0
- package/README.md +157 -0
- package/dist/adapters/base24.d.ts +117 -0
- package/dist/adapters/base24.d.ts.map +1 -0
- package/dist/adapters/base24.js +313 -0
- package/dist/adapters/base24.js.map +1 -0
- package/dist/adapters/css.d.ts +68 -0
- package/dist/adapters/css.d.ts.map +1 -0
- package/dist/adapters/css.js +107 -0
- package/dist/adapters/css.js.map +1 -0
- package/dist/adapters/shadcn.d.ts +43 -0
- package/dist/adapters/shadcn.d.ts.map +1 -0
- package/dist/adapters/shadcn.js +89 -0
- package/dist/adapters/shadcn.js.map +1 -0
- package/dist/adapters/shiki.d.ts +60 -0
- package/dist/adapters/shiki.d.ts.map +1 -0
- package/dist/adapters/shiki.js +135 -0
- package/dist/adapters/shiki.js.map +1 -0
- package/dist/adapters/tailwind.d.ts +35 -0
- package/dist/adapters/tailwind.d.ts.map +1 -0
- package/dist/adapters/tailwind.js +58 -0
- package/dist/adapters/tailwind.js.map +1 -0
- package/dist/adapters/xterm.d.ts +64 -0
- package/dist/adapters/xterm.d.ts.map +1 -0
- package/dist/adapters/xterm.js +112 -0
- package/dist/adapters/xterm.js.map +1 -0
- package/dist/catalogue.d.ts +66 -0
- package/dist/catalogue.d.ts.map +1 -0
- package/dist/catalogue.js +110 -0
- package/dist/catalogue.js.map +1 -0
- package/dist/derive.d.ts +89 -0
- package/dist/derive.d.ts.map +1 -0
- package/dist/derive.js +165 -0
- package/dist/derive.js.map +1 -0
- package/dist/generated/schemes.d.ts +16 -0
- package/dist/generated/schemes.d.ts.map +1 -0
- package/dist/generated/schemes.js +880 -0
- package/dist/generated/schemes.js.map +1 -0
- package/dist/generated/themes.d.ts +11 -0
- package/dist/generated/themes.d.ts.map +1 -0
- package/dist/generated/themes.js +1650 -0
- package/dist/generated/themes.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/normalize.d.ts +160 -0
- package/dist/normalize.d.ts.map +1 -0
- package/dist/normalize.js +795 -0
- package/dist/normalize.js.map +1 -0
- package/dist/oklch.d.ts +141 -0
- package/dist/oklch.d.ts.map +1 -0
- package/dist/oklch.js +306 -0
- package/dist/oklch.js.map +1 -0
- package/dist/schema.d.ts +178 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +69 -0
- package/dist/schema.js.map +1 -0
- package/dist/sources.d.ts +171 -0
- package/dist/sources.d.ts.map +1 -0
- package/dist/sources.js +559 -0
- package/dist/sources.js.map +1 -0
- package/dist/validate.d.ts +121 -0
- package/dist/validate.d.ts.map +1 -0
- package/dist/validate.js +255 -0
- package/dist/validate.js.map +1 -0
- package/package.json +106 -0
- package/palettes/ayu-light.json +38 -0
- package/palettes/ayu-mirage.json +38 -0
- package/palettes/ayu.json +38 -0
- package/palettes/catppuccin-frappe.json +38 -0
- package/palettes/catppuccin-latte.json +38 -0
- package/palettes/catppuccin-macchiato.json +38 -0
- package/palettes/catppuccin-mocha.json +38 -0
- package/palettes/dracula.json +38 -0
- package/palettes/everforest-dark.json +38 -0
- package/palettes/everforest-light.json +38 -0
- package/palettes/gruvbox-dark.json +38 -0
- package/palettes/gruvbox-light.json +38 -0
- package/palettes/kanagawa.json +38 -0
- package/palettes/monokai.json +38 -0
- package/palettes/nord.json +38 -0
- package/palettes/one-dark.json +38 -0
- package/palettes/rosepine-dawn.json +38 -0
- package/palettes/rosepine-moon.json +38 -0
- package/palettes/rosepine.json +38 -0
- package/palettes/solarized-dark.json +38 -0
- package/palettes/solarized-light.json +38 -0
- package/palettes/tokyonight-day.json +38 -0
- package/palettes/tokyonight-night.json +38 -0
- package/palettes/tokyonight-storm.json +38 -0
- package/palettes/vesper.json +38 -0
- package/src/adapters/base24.ts +355 -0
- package/src/adapters/css.ts +149 -0
- package/src/adapters/shadcn.ts +99 -0
- package/src/adapters/shiki.ts +168 -0
- package/src/adapters/tailwind.ts +79 -0
- package/src/adapters/xterm.ts +159 -0
- package/src/catalogue.ts +129 -0
- package/src/derive.ts +203 -0
- package/src/generated/schemes.ts +882 -0
- package/src/generated/themes.ts +1652 -0
- package/src/index.ts +146 -0
- package/src/normalize.ts +1010 -0
- package/src/oklch.ts +366 -0
- package/src/schema.ts +222 -0
- package/src/sources.ts +682 -0
- package/src/validate.ts +325 -0
package/dist/schema.d.ts
ADDED
|
@@ -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;IAC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,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,171 @@
|
|
|
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
|
+
* Per-family provenance.
|
|
51
|
+
*
|
|
52
|
+
* `url` is the project's own repository — the place its palette is defined — while
|
|
53
|
+
* the vendored values come through the chain described in this module's header.
|
|
54
|
+
* Recording both is the point: one answers "whose palette is this", the other
|
|
55
|
+
* answers "which bytes are in the file".
|
|
56
|
+
*/
|
|
57
|
+
export declare const FAMILY_PROVENANCE: Readonly<Record<string, ThemeProvenance>>;
|
|
58
|
+
/** A theme that is normalized from a vendored Base24 scheme. */
|
|
59
|
+
export interface VendoredSource {
|
|
60
|
+
id: string;
|
|
61
|
+
/** The scheme's slug in the dataset. */
|
|
62
|
+
slug: string;
|
|
63
|
+
family: keyof typeof FAMILY_PROVENANCE;
|
|
64
|
+
familyLabel: string;
|
|
65
|
+
label: string;
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
appearance: ThemeAppearance;
|
|
69
|
+
tags: readonly string[];
|
|
70
|
+
/** Declared when the family's identity is not in its blue slot. */
|
|
71
|
+
accentSlot?: 'blue' | 'magenta' | 'cyan' | 'green';
|
|
72
|
+
/**
|
|
73
|
+
* Corrections to the vendored scheme, applied before normalization.
|
|
74
|
+
*
|
|
75
|
+
* One entry uses this, and it is worth reading as the example of when it is
|
|
76
|
+
* legitimate: iTerm2's One Dark port deliberately darkens the canvas to `#21252b`
|
|
77
|
+
* so a terminal reads as a distinct surface, but Atom's own editor palette — the
|
|
78
|
+
* thing "One Dark" means — is `hsl(220, 13%, 18%)` = `#282c34`, with comments at
|
|
79
|
+
* `#5c6370` rather than the port's `#767676`. Adea themes an application, so the
|
|
80
|
+
* project's value is the correct one. Every correction is reported as a finding
|
|
81
|
+
* and appears in the catalogue's build log.
|
|
82
|
+
*/
|
|
83
|
+
palette?: Partial<Record<Base24Slot, string>>;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The vendored catalogue.
|
|
87
|
+
*
|
|
88
|
+
* Ordered family by family, and within a family light-to-dark or by the order the
|
|
89
|
+
* project itself lists its flavours. The order is the order a picker shows, so it
|
|
90
|
+
* is deliberate rather than alphabetical.
|
|
91
|
+
*/
|
|
92
|
+
export declare const VENDORED_SOURCES: readonly VendoredSource[];
|
|
93
|
+
/**
|
|
94
|
+
* Adea's own theme.
|
|
95
|
+
*
|
|
96
|
+
* Authored here rather than vendored, and the only entry whose colours are chosen
|
|
97
|
+
* rather than reproduced. It is deliberately a neutral ladder with a monochrome
|
|
98
|
+
* accent — the design system's default has to work as a default for everyone, which
|
|
99
|
+
* means it cannot be anybody's favourite colour.
|
|
100
|
+
*
|
|
101
|
+
* Both appearances are generated from the accent-and-grey ramp below, so the two
|
|
102
|
+
* variants cannot drift apart: a change to the ramp changes both, and the contrast
|
|
103
|
+
* suite measures both.
|
|
104
|
+
*/
|
|
105
|
+
export interface AuthoredSource {
|
|
106
|
+
id: string;
|
|
107
|
+
family: string;
|
|
108
|
+
familyLabel: string;
|
|
109
|
+
label: string;
|
|
110
|
+
name: string;
|
|
111
|
+
description: string;
|
|
112
|
+
appearance: ThemeAppearance;
|
|
113
|
+
tags: readonly string[];
|
|
114
|
+
/**
|
|
115
|
+
* The greyscale ramp the theme is built from, darkest first.
|
|
116
|
+
*
|
|
117
|
+
* Authored as hex rather than OKLCH because that is how the design system's
|
|
118
|
+
* values were originally specified and reviewed; the normalizer converts, and the
|
|
119
|
+
* committed catalogue is OKLCH.
|
|
120
|
+
*/
|
|
121
|
+
ramp: {
|
|
122
|
+
background: string;
|
|
123
|
+
foreground: string;
|
|
124
|
+
surface: string;
|
|
125
|
+
surfaceElevated: string;
|
|
126
|
+
surfaceHover: string;
|
|
127
|
+
surfaceActive: string;
|
|
128
|
+
border: string;
|
|
129
|
+
borderMuted: string;
|
|
130
|
+
textMuted: string;
|
|
131
|
+
textSubtle: string;
|
|
132
|
+
};
|
|
133
|
+
accent: string;
|
|
134
|
+
accentForeground: string;
|
|
135
|
+
status: {
|
|
136
|
+
success: string;
|
|
137
|
+
warning: string;
|
|
138
|
+
error: string;
|
|
139
|
+
info: string;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* The terminal palette.
|
|
143
|
+
*
|
|
144
|
+
* Adea ships a terminal, so its own theme has to answer the sixteen ANSI
|
|
145
|
+
* questions the same way an imported theme does. These are the values the product
|
|
146
|
+
* already runs: the light set is GitHub's light scheme and the dark set GitHub's
|
|
147
|
+
* dark, which is what the embedded terminal was drawn against.
|
|
148
|
+
*/
|
|
149
|
+
ansi: {
|
|
150
|
+
black: string;
|
|
151
|
+
red: string;
|
|
152
|
+
green: string;
|
|
153
|
+
yellow: string;
|
|
154
|
+
blue: string;
|
|
155
|
+
magenta: string;
|
|
156
|
+
cyan: string;
|
|
157
|
+
white: string;
|
|
158
|
+
brightBlack: string;
|
|
159
|
+
brightRed: string;
|
|
160
|
+
brightGreen: string;
|
|
161
|
+
brightYellow: string;
|
|
162
|
+
brightBlue: string;
|
|
163
|
+
brightMagenta: string;
|
|
164
|
+
brightCyan: string;
|
|
165
|
+
brightWhite: string;
|
|
166
|
+
};
|
|
167
|
+
cursor: string;
|
|
168
|
+
selection: string;
|
|
169
|
+
}
|
|
170
|
+
export declare const AUTHORED_SOURCES: readonly AuthoredSource[];
|
|
171
|
+
//# 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,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAEhE,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,8DAA8D,CAAA;AAE/F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,6CAA6C,CAAA;AAK5E,oCAAoC;AACpC,eAAO,MAAM,eAAe,EAAE,eAI5B,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAqFtE,CAAA;AAEF,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,OAAO,iBAAiB,CAAA;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,eAAe,CAAA;IAC3B,IAAI,EAAE,SAAS,MAAM,E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