@adea-ai/themes 0.5.1 → 0.6.1
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/NOTICE +16 -8
- package/README.md +19 -11
- package/dist/adapters/shadcn.d.ts +8 -4
- package/dist/adapters/shadcn.d.ts.map +1 -1
- package/dist/adapters/shadcn.js +12 -4
- package/dist/adapters/shadcn.js.map +1 -1
- package/dist/adapters/tailwind.d.ts +1 -1
- package/dist/adapters/tailwind.js +1 -1
- package/dist/derive.d.ts +9 -0
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +55 -0
- package/dist/derive.js.map +1 -1
- package/dist/generated/metadata.d.ts.map +1 -1
- package/dist/generated/metadata.js +74 -0
- package/dist/generated/metadata.js.map +1 -1
- package/dist/generated/schemes.d.ts.map +1 -1
- package/dist/generated/schemes.js +128 -0
- package/dist/generated/schemes.js.map +1 -1
- package/dist/generated/themes/contrast-dark.d.ts +11 -0
- package/dist/generated/themes/contrast-dark.d.ts.map +1 -0
- package/dist/generated/themes/contrast-dark.js +75 -0
- package/dist/generated/themes/contrast-dark.js.map +1 -0
- package/dist/generated/themes/contrast-light.d.ts +11 -0
- package/dist/generated/themes/contrast-light.d.ts.map +1 -0
- package/dist/generated/themes/contrast-light.js +75 -0
- package/dist/generated/themes/contrast-light.js.map +1 -0
- package/dist/generated/themes/slate-dark.d.ts +11 -0
- package/dist/generated/themes/slate-dark.d.ts.map +1 -0
- package/dist/generated/themes/slate-dark.js +77 -0
- package/dist/generated/themes/slate-dark.js.map +1 -0
- package/dist/generated/themes/slate-light.d.ts +11 -0
- package/dist/generated/themes/slate-light.d.ts.map +1 -0
- package/dist/generated/themes/slate-light.js +76 -0
- package/dist/generated/themes/slate-light.js.map +1 -0
- package/dist/generated/themes.d.ts.map +1 -1
- package/dist/generated/themes.js +26 -18
- package/dist/generated/themes.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/normalize.d.ts +3 -1
- package/dist/normalize.d.ts.map +1 -1
- package/dist/normalize.js +1 -0
- package/dist/normalize.js.map +1 -1
- package/dist/schema.d.ts +32 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js.map +1 -1
- package/dist/sources.d.ts +16 -22
- package/dist/sources.d.ts.map +1 -1
- package/dist/sources.js +231 -5
- package/dist/sources.js.map +1 -1
- package/package.json +2 -2
- package/src/adapters/shadcn.ts +19 -8
- package/src/adapters/tailwind.ts +1 -1
- package/src/derive.ts +63 -0
- package/src/generated/metadata.ts +74 -0
- package/src/generated/schemes.ts +128 -0
- package/src/generated/themes/contrast-dark.ts +77 -0
- package/src/generated/themes/contrast-light.ts +77 -0
- package/src/generated/themes/slate-dark.ts +79 -0
- package/src/generated/themes/slate-light.ts +78 -0
- package/src/generated/themes.ts +26 -18
- package/src/index.ts +8 -6
- package/src/normalize.ts +4 -0
- package/src/schema.ts +33 -0
- package/src/sources.ts +244 -23
package/src/sources.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Two lists. {@link VENDORED_SOURCES} names the Base24 schemes that
|
|
5
5
|
* `scripts/vendor-palettes.ts` reproduces from upstream, and {@link AUTHORED_SOURCES}
|
|
6
|
-
*
|
|
7
|
-
* catalogue's input; `scripts/build-catalogue.ts` runs them all through the
|
|
6
|
+
* records Adea-owned themes that have no upstream palette to vendor. Together they
|
|
7
|
+
* are the catalogue's input; `scripts/build-catalogue.ts` runs them all through the
|
|
8
8
|
* normalizer and writes the committed output.
|
|
9
9
|
*
|
|
10
10
|
* ## Provenance is per-family, and it was checked rather than assumed
|
|
@@ -29,8 +29,9 @@
|
|
|
29
29
|
* which is itself derived from `iTerm2-Color-Schemes` at a pinned revision, which
|
|
30
30
|
* is where the per-family values were first published as terminal schemes. Each
|
|
31
31
|
* family's official project is recorded as the design's origin, and the values were
|
|
32
|
-
* checked against those projects' published palettes —
|
|
33
|
-
* foregrounds
|
|
32
|
+
* checked against those projects' published palettes — imported backgrounds and
|
|
33
|
+
* foregrounds match their official palettes exactly. Adea's composed and authored
|
|
34
|
+
* families are asserted from their own source definitions instead.
|
|
34
35
|
*
|
|
35
36
|
* `tests/provenance.test.ts` holds those official values as assertions, so the
|
|
36
37
|
* claim "this is really Catppuccin Mocha" fails the build rather than drifting.
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
|
|
39
40
|
import type { Base24Slot } from './adapters/base24.js'
|
|
40
41
|
import { CONTRAST_FLOORS } from './normalize.js'
|
|
41
|
-
import type { ThemeAppearance, ThemeProvenance } from './schema.js'
|
|
42
|
+
import type { ShadcnThemeProjection, ThemeAppearance, ThemeProvenance } from './schema.js'
|
|
42
43
|
|
|
43
44
|
/** The dataset the Base24 schemes are reproduced from. */
|
|
44
45
|
export const CATALOGUE_REPOSITORY = 'https://github.com/williamzujkowski/oklch-terminal-themes'
|
|
@@ -338,6 +339,16 @@ export const COMPOSED_SOURCES: readonly ComposedSource[] = Object.freeze([
|
|
|
338
339
|
*/
|
|
339
340
|
export const FAMILY_PROVENANCE: Readonly<Record<string, ThemeProvenance>> = Object.freeze({
|
|
340
341
|
adea: ADEA_PROVENANCE,
|
|
342
|
+
slate: {
|
|
343
|
+
project: 'Adea',
|
|
344
|
+
url: 'https://github.com/adea-ai/adea',
|
|
345
|
+
license: 'Apache-2.0',
|
|
346
|
+
},
|
|
347
|
+
contrast: {
|
|
348
|
+
project: 'Adea',
|
|
349
|
+
url: 'https://github.com/adea-ai/adea',
|
|
350
|
+
license: 'Apache-2.0',
|
|
351
|
+
},
|
|
341
352
|
catppuccin: {
|
|
342
353
|
project: 'Catppuccin',
|
|
343
354
|
url: 'https://github.com/catppuccin/catppuccin',
|
|
@@ -768,24 +779,13 @@ export const VENDORED_SOURCES: readonly VendoredSource[] = Object.freeze([
|
|
|
768
779
|
])
|
|
769
780
|
|
|
770
781
|
/**
|
|
771
|
-
* Adea
|
|
772
|
-
*
|
|
773
|
-
* Authored here rather than vendored, and the only entry whose colours are chosen
|
|
774
|
-
* rather than reproduced. It is deliberately a neutral ladder with a monochrome
|
|
775
|
-
* accent — the design system's default has to work as a default for everyone, which
|
|
776
|
-
* means it cannot be anybody's favourite colour.
|
|
782
|
+
* Adea-authored themes whose exact semantic values have no external palette to vendor.
|
|
777
783
|
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
* moves, while an authored entry is a table of values nobody can refresh.
|
|
784
|
-
*
|
|
785
|
-
* The route stays because it is the only way to specify *semantic* roles directly
|
|
786
|
-
* rather than deriving them through Base24 slots — which is what a brand theme with
|
|
787
|
-
* values handed over by a designer would need. Nothing uses it today; if nothing has by
|
|
788
|
-
* the time someone reads this, delete it.
|
|
784
|
+
* The default pair is composed above because its donors can be named and refreshed.
|
|
785
|
+
* Slate and High Contrast are retained from the product's own appearance registry:
|
|
786
|
+
* these hand-maintained semantic roles are the source, not a transcription of a
|
|
787
|
+
* third-party palette. Their optional shadcn projection keeps distinctions (including
|
|
788
|
+
* source-authored alpha) that the canonical opaque roles cannot represent.
|
|
789
789
|
*/
|
|
790
790
|
export interface AuthoredSource {
|
|
791
791
|
id: string
|
|
@@ -794,6 +794,8 @@ export interface AuthoredSource {
|
|
|
794
794
|
label: string
|
|
795
795
|
name: string
|
|
796
796
|
description: string
|
|
797
|
+
/** Palette ownership plus any per-appearance lineage for retained ANSI roles. */
|
|
798
|
+
provenance?: ThemeProvenance
|
|
797
799
|
appearance: ThemeAppearance
|
|
798
800
|
tags: readonly string[]
|
|
799
801
|
/**
|
|
@@ -817,6 +819,8 @@ export interface AuthoredSource {
|
|
|
817
819
|
}
|
|
818
820
|
accent: string
|
|
819
821
|
accentForeground: string
|
|
822
|
+
/** Exact shadcn values for authored distinctions outside the canonical schema. */
|
|
823
|
+
shadcn?: ShadcnThemeProjection
|
|
820
824
|
status: {
|
|
821
825
|
success: string
|
|
822
826
|
warning: string
|
|
@@ -853,4 +857,221 @@ export interface AuthoredSource {
|
|
|
853
857
|
selection: string
|
|
854
858
|
}
|
|
855
859
|
|
|
856
|
-
|
|
860
|
+
// The Slate and Contrast ANSI values below are carried forward from Adea's existing
|
|
861
|
+
// product theme definitions; no external terminal-scheme lineage is claimed.
|
|
862
|
+
const SLATE_ANSI: AuthoredSource['ansi'] = {
|
|
863
|
+
black: '#1b1f24',
|
|
864
|
+
red: '#b91c1c',
|
|
865
|
+
green: '#116a2e',
|
|
866
|
+
yellow: '#8a5a1b',
|
|
867
|
+
blue: '#0b57d0',
|
|
868
|
+
magenta: '#a0186f',
|
|
869
|
+
cyan: '#0e7490',
|
|
870
|
+
white: '#57606a',
|
|
871
|
+
brightBlack: '#57606a',
|
|
872
|
+
brightRed: '#c94d4d',
|
|
873
|
+
brightGreen: '#1f9d4f',
|
|
874
|
+
brightYellow: '#a9752c',
|
|
875
|
+
brightBlue: '#3b82f6',
|
|
876
|
+
brightMagenta: '#c04a92',
|
|
877
|
+
brightCyan: '#0891b2',
|
|
878
|
+
brightWhite: '#24292f',
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
const CONTRAST_ANSI: AuthoredSource['ansi'] = {
|
|
882
|
+
black: '#2f3742',
|
|
883
|
+
red: '#ff8183',
|
|
884
|
+
green: '#56d364',
|
|
885
|
+
yellow: '#e3b341',
|
|
886
|
+
blue: '#6ca4f8',
|
|
887
|
+
magenta: '#db61a2',
|
|
888
|
+
cyan: '#39c5cf',
|
|
889
|
+
white: '#d5dde5',
|
|
890
|
+
brightBlack: '#57606a',
|
|
891
|
+
brightRed: '#ff9494',
|
|
892
|
+
brightGreen: '#79dd8a',
|
|
893
|
+
brightYellow: '#f0c264',
|
|
894
|
+
brightBlue: '#8db9ff',
|
|
895
|
+
brightMagenta: '#e87cb4',
|
|
896
|
+
brightCyan: '#66d3dc',
|
|
897
|
+
brightWhite: '#eef2f6',
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export const AUTHORED_SOURCES: readonly AuthoredSource[] = Object.freeze([
|
|
901
|
+
{
|
|
902
|
+
id: 'slate-light',
|
|
903
|
+
family: 'slate',
|
|
904
|
+
familyLabel: 'Slate',
|
|
905
|
+
label: 'Light',
|
|
906
|
+
name: 'Slate Light',
|
|
907
|
+
description: 'Adea’s slate neutral palette for light appearance.',
|
|
908
|
+
provenance: FAMILY_PROVENANCE.slate,
|
|
909
|
+
appearance: 'light',
|
|
910
|
+
tags: ['light', 'slate', 'neutral'],
|
|
911
|
+
ramp: {
|
|
912
|
+
background: '#f8fafc',
|
|
913
|
+
foreground: '#0f172a',
|
|
914
|
+
surface: '#f8fafc',
|
|
915
|
+
surfaceElevated: '#f8fafc',
|
|
916
|
+
surfaceHover: '#e2e8f0',
|
|
917
|
+
surfaceActive: '#e2e8f0',
|
|
918
|
+
border: '#cbd5e1',
|
|
919
|
+
borderMuted: '#cbd5e1',
|
|
920
|
+
textMuted: '#475569',
|
|
921
|
+
textSubtle: '#64748b',
|
|
922
|
+
},
|
|
923
|
+
accent: '#0f172a',
|
|
924
|
+
accentForeground: '#f8fafc',
|
|
925
|
+
status: {
|
|
926
|
+
success: '#15803d',
|
|
927
|
+
warning: SLATE_ANSI.yellow,
|
|
928
|
+
error: '#b91c1c',
|
|
929
|
+
info: SLATE_ANSI.blue,
|
|
930
|
+
},
|
|
931
|
+
ansi: SLATE_ANSI,
|
|
932
|
+
cursor: '#24292f',
|
|
933
|
+
selection: '#b6c7ff',
|
|
934
|
+
shadcn: {
|
|
935
|
+
card: '#ffffff',
|
|
936
|
+
popover: '#ffffff',
|
|
937
|
+
secondary: '#e2e8f0',
|
|
938
|
+
muted: '#e2e8f0',
|
|
939
|
+
border: '#cbd5e1',
|
|
940
|
+
input: '#cbd5e1',
|
|
941
|
+
ring: '#64748b',
|
|
942
|
+
},
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
id: 'slate-dark',
|
|
946
|
+
family: 'slate',
|
|
947
|
+
familyLabel: 'Slate',
|
|
948
|
+
label: 'Dark',
|
|
949
|
+
name: 'Slate Dark',
|
|
950
|
+
description: 'Adea’s slate neutral palette for dark appearance.',
|
|
951
|
+
provenance: FAMILY_PROVENANCE.slate,
|
|
952
|
+
appearance: 'dark',
|
|
953
|
+
tags: ['dark', 'slate', 'neutral'],
|
|
954
|
+
ramp: {
|
|
955
|
+
background: '#0f172a',
|
|
956
|
+
foreground: '#f1f5f9',
|
|
957
|
+
surface: '#1e293b',
|
|
958
|
+
surfaceElevated: '#1e293b',
|
|
959
|
+
surfaceHover: '#334155',
|
|
960
|
+
surfaceActive: '#334155',
|
|
961
|
+
border: '#94a3b8',
|
|
962
|
+
borderMuted: '#94a3b8',
|
|
963
|
+
textMuted: '#94a3b8',
|
|
964
|
+
textSubtle: '#64748b',
|
|
965
|
+
},
|
|
966
|
+
accent: '#e2e8f0',
|
|
967
|
+
accentForeground: '#0f172a',
|
|
968
|
+
status: {
|
|
969
|
+
success: '#4ade80',
|
|
970
|
+
warning: CONTRAST_ANSI.yellow,
|
|
971
|
+
error: '#f87171',
|
|
972
|
+
info: CONTRAST_ANSI.blue,
|
|
973
|
+
},
|
|
974
|
+
ansi: CONTRAST_ANSI,
|
|
975
|
+
cursor: '#e6edf3',
|
|
976
|
+
selection: '#264f78',
|
|
977
|
+
shadcn: {
|
|
978
|
+
card: '#1e293b',
|
|
979
|
+
popover: '#1e293b',
|
|
980
|
+
secondary: '#334155',
|
|
981
|
+
muted: '#334155',
|
|
982
|
+
// The old #94a3b8 remains canonical `textMuted`, but shared UI components
|
|
983
|
+
// also pair this role with the #334155 muted fill. Move lightness by the
|
|
984
|
+
// smallest 0.032 OKLCH step that clears 4.5:1 after sRGB conversion.
|
|
985
|
+
mutedForeground: 'oklch(0.7427 0.0351 256.79)',
|
|
986
|
+
border: 'rgba(148, 163, 184, 0.2)',
|
|
987
|
+
input: 'rgba(148, 163, 184, 0.25)',
|
|
988
|
+
ring: '#64748b',
|
|
989
|
+
},
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
id: 'contrast-light',
|
|
993
|
+
family: 'contrast',
|
|
994
|
+
familyLabel: 'High Contrast',
|
|
995
|
+
label: 'Light',
|
|
996
|
+
name: 'High Contrast Light',
|
|
997
|
+
description: 'Adea’s high-contrast palette for light appearance.',
|
|
998
|
+
provenance: FAMILY_PROVENANCE.contrast,
|
|
999
|
+
appearance: 'light',
|
|
1000
|
+
tags: ['light', 'high-contrast'],
|
|
1001
|
+
ramp: {
|
|
1002
|
+
background: '#ffffff',
|
|
1003
|
+
foreground: '#000000',
|
|
1004
|
+
surface: '#ffffff',
|
|
1005
|
+
surfaceElevated: '#ffffff',
|
|
1006
|
+
surfaceHover: '#f0f0f0',
|
|
1007
|
+
surfaceActive: '#f0f0f0',
|
|
1008
|
+
border: '#767676',
|
|
1009
|
+
borderMuted: '#767676',
|
|
1010
|
+
textMuted: '#333333',
|
|
1011
|
+
textSubtle: '#767676',
|
|
1012
|
+
},
|
|
1013
|
+
accent: '#143d8f',
|
|
1014
|
+
accentForeground: '#ffffff',
|
|
1015
|
+
status: {
|
|
1016
|
+
success: '#14532d',
|
|
1017
|
+
warning: SLATE_ANSI.yellow,
|
|
1018
|
+
error: '#b91c1c',
|
|
1019
|
+
info: SLATE_ANSI.blue,
|
|
1020
|
+
},
|
|
1021
|
+
ansi: SLATE_ANSI,
|
|
1022
|
+
cursor: '#24292f',
|
|
1023
|
+
selection: '#b6c7ff',
|
|
1024
|
+
shadcn: {
|
|
1025
|
+
card: '#ffffff',
|
|
1026
|
+
popover: '#ffffff',
|
|
1027
|
+
secondary: '#f0f0f0',
|
|
1028
|
+
muted: '#f0f0f0',
|
|
1029
|
+
border: '#767676',
|
|
1030
|
+
input: '#767676',
|
|
1031
|
+
ring: '#000000',
|
|
1032
|
+
},
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
id: 'contrast-dark',
|
|
1036
|
+
family: 'contrast',
|
|
1037
|
+
familyLabel: 'High Contrast',
|
|
1038
|
+
label: 'Dark',
|
|
1039
|
+
name: 'High Contrast Dark',
|
|
1040
|
+
description: 'Adea’s high-contrast palette for dark appearance.',
|
|
1041
|
+
provenance: FAMILY_PROVENANCE.contrast,
|
|
1042
|
+
appearance: 'dark',
|
|
1043
|
+
tags: ['dark', 'high-contrast'],
|
|
1044
|
+
ramp: {
|
|
1045
|
+
background: '#000000',
|
|
1046
|
+
foreground: '#ffffff',
|
|
1047
|
+
surface: '#0a0a0a',
|
|
1048
|
+
surfaceElevated: '#0a0a0a',
|
|
1049
|
+
surfaceHover: '#1a1a1a',
|
|
1050
|
+
surfaceActive: '#1a1a1a',
|
|
1051
|
+
border: '#8f8f8f',
|
|
1052
|
+
borderMuted: '#8f8f8f',
|
|
1053
|
+
textMuted: '#e5e5e5',
|
|
1054
|
+
textSubtle: '#8f8f8f',
|
|
1055
|
+
},
|
|
1056
|
+
accent: '#8ab4ff',
|
|
1057
|
+
accentForeground: '#000000',
|
|
1058
|
+
status: {
|
|
1059
|
+
success: '#4ade80',
|
|
1060
|
+
warning: CONTRAST_ANSI.yellow,
|
|
1061
|
+
error: '#ff6b6b',
|
|
1062
|
+
info: CONTRAST_ANSI.blue,
|
|
1063
|
+
},
|
|
1064
|
+
ansi: CONTRAST_ANSI,
|
|
1065
|
+
cursor: '#e6edf3',
|
|
1066
|
+
selection: '#264f78',
|
|
1067
|
+
shadcn: {
|
|
1068
|
+
card: '#0a0a0a',
|
|
1069
|
+
popover: '#0a0a0a',
|
|
1070
|
+
secondary: '#1a1a1a',
|
|
1071
|
+
muted: '#1a1a1a',
|
|
1072
|
+
border: '#8f8f8f',
|
|
1073
|
+
input: '#8f8f8f',
|
|
1074
|
+
ring: '#ffffff',
|
|
1075
|
+
},
|
|
1076
|
+
},
|
|
1077
|
+
])
|