@adea-ai/themes 0.11.6 → 0.11.12
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/README.md +46 -0
- package/dist/accents.d.ts +19 -19
- package/dist/accents.d.ts.map +1 -1
- package/dist/accents.js +45 -93
- package/dist/accents.js.map +1 -1
- package/dist/adapters/base24.d.ts +21 -12
- package/dist/adapters/base24.d.ts.map +1 -1
- package/dist/adapters/base24.js +47 -72
- package/dist/adapters/base24.js.map +1 -1
- package/dist/adapters/css-variables.d.ts +29 -0
- package/dist/adapters/css-variables.d.ts.map +1 -0
- package/dist/adapters/css-variables.js +56 -0
- package/dist/adapters/css-variables.js.map +1 -0
- package/dist/adapters/css.d.ts +2 -4
- package/dist/adapters/css.d.ts.map +1 -1
- package/dist/adapters/css.js +7 -39
- package/dist/adapters/css.js.map +1 -1
- package/dist/adapters/shadcn.d.ts +8 -4
- package/dist/adapters/shadcn.d.ts.map +1 -1
- package/dist/adapters/shadcn.js +38 -57
- package/dist/adapters/shadcn.js.map +1 -1
- package/dist/adapters/shiki.d.ts +2 -10
- package/dist/adapters/shiki.d.ts.map +1 -1
- package/dist/adapters/shiki.js +16 -29
- package/dist/adapters/shiki.js.map +1 -1
- package/dist/adapters/tailwind.d.ts +3 -3
- package/dist/adapters/tailwind.d.ts.map +1 -1
- package/dist/adapters/tailwind.js +7 -28
- package/dist/adapters/tailwind.js.map +1 -1
- package/dist/adapters/xterm.d.ts.map +1 -1
- package/dist/adapters/xterm.js +9 -21
- package/dist/adapters/xterm.js.map +1 -1
- package/dist/base24-synthesis.d.ts +31 -0
- package/dist/base24-synthesis.d.ts.map +1 -0
- package/dist/base24-synthesis.js +25 -0
- package/dist/base24-synthesis.js.map +1 -0
- package/dist/derive.d.ts +1 -1
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +11 -26
- package/dist/derive.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/normalize.d.ts +0 -8
- package/dist/normalize.d.ts.map +1 -1
- package/dist/normalize.js +105 -232
- package/dist/normalize.js.map +1 -1
- package/dist/oklch.d.ts +4 -10
- package/dist/oklch.d.ts.map +1 -1
- package/dist/oklch.js +18 -38
- package/dist/oklch.js.map +1 -1
- package/dist/policy.d.ts +14 -4
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +16 -4
- package/dist/policy.js.map +1 -1
- package/dist/render.d.ts +30 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +74 -0
- package/dist/render.js.map +1 -0
- package/dist/schema.d.ts +2 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -1
- package/dist/schema.js.map +1 -1
- package/dist/sources.d.ts +26 -33
- package/dist/sources.d.ts.map +1 -1
- package/dist/sources.js +136 -305
- package/dist/sources.js.map +1 -1
- package/dist/step-search.d.ts +10 -0
- package/dist/step-search.d.ts.map +1 -0
- package/dist/step-search.js +21 -0
- package/dist/step-search.js.map +1 -0
- package/dist/theme-token-projection-script.d.ts +2 -0
- package/dist/theme-token-projection-script.js +2 -0
- package/dist/theme-token-projection.d.ts +35 -0
- package/dist/theme-token-projection.d.ts.map +1 -0
- package/dist/theme-token-projection.js +79 -0
- package/dist/theme-token-projection.js.map +1 -0
- package/dist/validate.d.ts +12 -17
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +33 -55
- package/dist/validate.js.map +1 -1
- package/package.json +14 -4
- package/src/accents.ts +57 -96
- package/src/adapters/base24.ts +53 -75
- package/src/adapters/css-variables.ts +67 -0
- package/src/adapters/css.ts +9 -54
- package/src/adapters/shadcn.ts +34 -60
- package/src/adapters/shiki.ts +17 -30
- package/src/adapters/tailwind.ts +7 -37
- package/src/adapters/xterm.ts +9 -21
- package/src/base24-synthesis.ts +29 -0
- package/src/derive.ts +12 -27
- package/src/index.ts +6 -5
- package/src/normalize.ts +140 -267
- package/src/oklch.ts +23 -38
- package/src/policy.ts +18 -4
- package/src/render.ts +82 -0
- package/src/schema.ts +2 -1
- package/src/sources.ts +160 -330
- package/src/step-search.ts +25 -0
- package/src/theme-token-projection.ts +126 -0
- package/src/validate.ts +46 -66
package/dist/sources.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What the catalogue contains, and where each palette came from.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `scripts/vendor-palettes.ts` reproduces from upstream,
|
|
6
|
-
*
|
|
4
|
+
* Three lists. {@link VENDORED_SOURCES} names the Base24 schemes that
|
|
5
|
+
* `scripts/vendor-palettes.ts` reproduces from upstream, {@link COMPOSED_SOURCES}
|
|
6
|
+
* the Adea themes it composes from two donor schemes, and {@link AUTHORED_SOURCES}
|
|
7
|
+
* Adea-owned themes that have no upstream palette to vendor. Together they
|
|
7
8
|
* are the catalogue's input; `scripts/build-catalogue.ts` runs them all through the
|
|
8
9
|
* normalizer and writes the committed output.
|
|
9
10
|
*
|
|
@@ -48,14 +49,14 @@ export declare const CATALOGUE_REVISION = "9e800e7fe760081d4c10317498038ed422734
|
|
|
48
49
|
/** Where Adea's own theme lives. */
|
|
49
50
|
export declare const ADEA_PROVENANCE: ThemeProvenance;
|
|
50
51
|
/**
|
|
51
|
-
* A theme composed from **two** upstream palettes.
|
|
52
|
+
* A theme composed from **two** upstream palettes, which may be the same one.
|
|
52
53
|
*
|
|
53
|
-
* Adea's own
|
|
54
|
-
* hand-authored either.
|
|
55
|
-
* cursor and the selection come from a
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
54
|
+
* Adea's own themes are not copies of any published palette, and they are not
|
|
55
|
+
* hand-authored either. Each is a deliberate composition: the canvas, the greys, the
|
|
56
|
+
* cursor and the selection come from a *structure* donor, and the sixteen ANSI hues
|
|
57
|
+
* from a *hues* donor. The light members take a GitHub light canvas and GitHub's
|
|
58
|
+
* dark hues; the dark members name the same GitHub palette for both halves, so
|
|
59
|
+
* either half can later diverge.
|
|
59
60
|
*
|
|
60
61
|
* The split exists because the two properties are in tension inside one palette. A
|
|
61
62
|
* palette tuned for a comfortable canvas mutes its hues to agree with it; a palette
|
|
@@ -65,7 +66,7 @@ export declare const ADEA_PROVENANCE: ThemeProvenance;
|
|
|
65
66
|
* ## Why it is composed rather than merged by hand
|
|
66
67
|
*
|
|
67
68
|
* The alternative was to read both palettes and paste the merged hex into
|
|
68
|
-
* `palettes/adea-
|
|
69
|
+
* `palettes/adea-light.json`. That works once and is wrong afterwards: nothing then
|
|
69
70
|
* records which donor each value came from, so neither donor could ever be
|
|
70
71
|
* refreshed. Composing in the vendor step keeps both parents named, keeps the values
|
|
71
72
|
* upstream's own bytes rather than a transcription, and makes "GitHub changed its
|
|
@@ -93,10 +94,10 @@ export interface ComposedSource {
|
|
|
93
94
|
/**
|
|
94
95
|
* Slots neither donor supplies, derived from one of them.
|
|
95
96
|
*
|
|
96
|
-
* `slots` and
|
|
97
|
-
* Base24 slot, and the vendor step
|
|
98
|
-
*
|
|
99
|
-
* "this value was computed" stay distinguishable in review.
|
|
97
|
+
* With `slots` and the orange and brown every composition takes from its hues donor
|
|
98
|
+
* (`SYNTHESISED_HUES`), these must cover every Base24 slot, and the vendor step
|
|
99
|
+
* asserts that rather than trusting it. The maps are separate so that "this value
|
|
100
|
+
* came from a donor" and "this value was computed" stay distinguishable in review.
|
|
100
101
|
*/
|
|
101
102
|
synthesise: Readonly<Partial<Record<Base24Slot, readonly ['structure' | 'hues', string, {
|
|
102
103
|
rotate?: number;
|
|
@@ -108,10 +109,9 @@ export interface ComposedSource {
|
|
|
108
109
|
* The greyscale ramp is normally *derived* by ranking a scheme's grey slots by
|
|
109
110
|
* measured contrast, because Base24 does not name `black`, `white` or
|
|
110
111
|
* `brightBlack` and light schemes invert them. That derivation is right for an
|
|
111
|
-
* imported palette and wrong here:
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* pinned to the donor's own values instead.
|
|
112
|
+
* imported palette and wrong here: the structure donor publishes a greyscale its
|
|
113
|
+
* author chose, and re-deriving it gives back something close but not equal. So
|
|
114
|
+
* the four roles are pinned to the donor's own values instead.
|
|
115
115
|
*/
|
|
116
116
|
ansiFromStructure: readonly ('black' | 'brightBlack' | 'white' | 'brightWhite')[];
|
|
117
117
|
/**
|
|
@@ -151,11 +151,9 @@ export interface ComposedSource {
|
|
|
151
151
|
* | Adea Light Colorblind | GitHub Light Colorblind `#ffffff` | GitHub Dark Colorblind, transposed | its violet |
|
|
152
152
|
* | Adea Light High Contrast | GitHub Light High Contrast | GitHub Dark High Contrast, transposed | its violet |
|
|
153
153
|
*
|
|
154
|
-
* The
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
* against a neutral ground instead of GitHub's blue one, and every variant's own
|
|
158
|
-
* accent is the accent slot — violet/magenta, which GitHub keeps constant across
|
|
154
|
+
* The dark canvases are re-greyed (chroma halved, hue rotated to violet-grey) so the
|
|
155
|
+
* family's violet accent reads against a neutral ground instead of GitHub's blue
|
|
156
|
+
* one, and every variant's own accent is the accent slot — violet/magenta, which GitHub keeps constant across
|
|
159
157
|
* all six of its palettes, colourblind and high-contrast included.
|
|
160
158
|
*
|
|
161
159
|
* The accessibility variants are compositions of GitHub's own accessibility
|
|
@@ -221,11 +219,8 @@ export declare const VENDORED_SOURCES: readonly VendoredSource[];
|
|
|
221
219
|
/**
|
|
222
220
|
* Adea-authored themes whose exact semantic values have no external palette to vendor.
|
|
223
221
|
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* these hand-maintained semantic roles are the source, not a transcription of a
|
|
227
|
-
* third-party palette. Their optional shadcn projection keeps distinctions (including
|
|
228
|
-
* source-authored alpha) that the canonical opaque roles cannot represent.
|
|
222
|
+
* Their optional shadcn projection keeps distinctions (including source-authored
|
|
223
|
+
* alpha) that the canonical opaque roles cannot represent.
|
|
229
224
|
*/
|
|
230
225
|
export interface AuthoredSource {
|
|
231
226
|
id: string;
|
|
@@ -270,10 +265,8 @@ export interface AuthoredSource {
|
|
|
270
265
|
/**
|
|
271
266
|
* The terminal palette.
|
|
272
267
|
*
|
|
273
|
-
* Adea ships a terminal, so
|
|
274
|
-
* questions the same way an imported theme does.
|
|
275
|
-
* already runs: the light set is GitHub's light scheme and the dark set GitHub's
|
|
276
|
-
* dark, which is what the embedded terminal was drawn against.
|
|
268
|
+
* Adea ships a terminal, so an authored theme has to answer the sixteen ANSI
|
|
269
|
+
* questions the same way an imported theme does.
|
|
277
270
|
*/
|
|
278
271
|
ansi: {
|
|
279
272
|
black: string;
|
package/dist/sources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAGtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1F,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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,eAAe,CAAA;IAC3B,IAAI,EAAE,SAAS,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