@invana/styling 0.0.11 → 0.0.13
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/package.json +1 -1
- package/src/themes/presets-base.css +4 -4
- package/src/themes/presets.css +532 -1767
- package/src/themes.config.ts +22 -42
package/src/themes.config.ts
CHANGED
|
@@ -18,52 +18,32 @@ export interface Theme {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* (
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* Colour-preset themes contributed as first-class themes. Each preset is a named
|
|
22
|
+
* palette (Gold, Ocean, Forest, Rose, Minimal) carrying its own signature accent,
|
|
23
|
+
* and — like the classic themes — varies by light/dark/system. The variants are
|
|
24
|
+
* `${id}-light`, `${id}-dark`, `${id}-system`; the colours for the light and dark
|
|
25
|
+
* blocks are plain CSS in `themes/presets.css`. Only the ids/names/modes are
|
|
26
|
+
* listed here so they register with the toolbar and `applyTheme()`.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
['purple', 'Purple'], ['amber', 'Amber'], ['teal', 'Teal'], ['slate', 'Slate'],
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
// `default` is each preset's signature accent. It is
|
|
38
|
-
// placed FIRST so it becomes the theme's default variant (variants[0]) — the value
|
|
39
|
-
// consumers fall back to when no accent is specified.
|
|
40
|
-
const PRESET_THEMES: { id: string; name: string; dark: boolean; accents: [string, string][]; default: string }[] = [
|
|
41
|
-
{ id: 'dark-gold', name: 'Dark Gold', dark: true, accents: DARK_ACCENTS, default: 'gold' },
|
|
42
|
-
{ id: 'dark-ocean', name: 'Dark Ocean', dark: true, accents: DARK_ACCENTS, default: 'ocean' },
|
|
43
|
-
{ id: 'dark-forest', name: 'Dark Forest', dark: true, accents: DARK_ACCENTS, default: 'emerald' },
|
|
44
|
-
{ id: 'dark-rose', name: 'Dark Rose', dark: true, accents: DARK_ACCENTS, default: 'rose' },
|
|
45
|
-
{ id: 'light-minimal', name: 'Light Minimal', dark: false, accents: LIGHT_ACCENTS, default: 'indigo' },
|
|
28
|
+
const PRESET_THEMES: { id: string; name: string; description: string }[] = [
|
|
29
|
+
{ id: 'gold', name: 'Gold', description: 'Warm gold accent — near-black canvas (dark) or cream (light)' },
|
|
30
|
+
{ id: 'ocean', name: 'Ocean', description: 'Cool blue accent — deep navy canvas (dark) or soft sky-grey (light)' },
|
|
31
|
+
{ id: 'forest', name: 'Forest', description: 'Emerald accent — deep green-black canvas (dark) or pale green (light)' },
|
|
32
|
+
{ id: 'rose', name: 'Rose', description: 'Rose accent — warm near-black canvas (dark) or blush (light)' },
|
|
33
|
+
{ id: 'minimal', name: 'Minimal', description: 'Indigo accent on a clean neutral canvas, light or dark' },
|
|
46
34
|
];
|
|
47
35
|
|
|
48
36
|
function buildPresetThemes(): Theme[] {
|
|
49
|
-
return PRESET_THEMES.map((p) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
id: p.id,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
variants: ordered.map(([accentId, accentName]) => ({
|
|
60
|
-
id: `${p.id}-${accentId}`,
|
|
61
|
-
name: accentName,
|
|
62
|
-
mode: (p.dark ? 'dark' : 'light') as ThemeVariant['mode'],
|
|
63
|
-
icon: 'circle',
|
|
64
|
-
})),
|
|
65
|
-
};
|
|
66
|
-
});
|
|
37
|
+
return PRESET_THEMES.map((p) => ({
|
|
38
|
+
id: p.id,
|
|
39
|
+
name: p.name,
|
|
40
|
+
description: p.description,
|
|
41
|
+
variants: [
|
|
42
|
+
{ id: `${p.id}-light`, name: `${p.name} Light`, mode: 'light', icon: 'sun' },
|
|
43
|
+
{ id: `${p.id}-dark`, name: `${p.name} Dark`, mode: 'dark', icon: 'moon' },
|
|
44
|
+
{ id: `${p.id}-system`, name: `${p.name} System`, mode: 'system', icon: 'circle' },
|
|
45
|
+
],
|
|
46
|
+
}));
|
|
67
47
|
}
|
|
68
48
|
|
|
69
49
|
export const themes: Theme[] = [
|