@wtasnorg/candi 0.0.22 → 0.0.27

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 CHANGED
@@ -1,4 +1,4 @@
1
- Copyright © 2025 wtasg
1
+ Copyright © 2026 wtasg
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
package/README.md CHANGED
@@ -19,6 +19,7 @@ Candi provides a single source of truth for colors using the OKLCH color space,
19
19
  | **KDE Plasma** | Full | Color schemes for KDE 4, 5 & 6 |
20
20
  | **GNOME** | Full | GTK3 & GTK4 themes for X11 and Wayland |
21
21
  | **Obsidian** | Full | Light & Dark themes with 60+ CSS variables |
22
+ | **Showcase App** | Full | Interactive Flutter gallery & playground |
22
23
 
23
24
  ---
24
25
 
@@ -32,19 +33,23 @@ All colors are defined in `src/data/colors.js`. This file is the canonical sourc
32
33
  src/data/colors.js (Source of Truth)
33
34
 
34
35
 
36
+ scripts/gen-oklch-primitives.js (Derivation Engine)
37
+
38
+
35
39
  scripts/sync-colors.js (Generator)
36
40
 
37
41
  ├── src/css/base.css (CSS Variables)
38
42
  ├── src/v4/theme.css (Tailwind v4 @theme)
39
43
  └── dist/colors.json (Data export)
40
44
 
41
- Platform Builds (all consume colors.js directly):
45
+ Platform Builds (all consume colors.js & derivation engine):
42
46
  ├── build-flutter.js → flutter/lib/candi_colors.dart
43
47
  ├── build-vscode.js → vscode/themes/*.json
44
48
  ├── build-vim.js → vim/colors/*.vim
45
49
  ├── build-kde.js → kde/v4,v5/*.colors
46
50
  ├── build-gnome.js → gnome/gtk-*/*.css
47
- └── build-obsidian.js → obsidian/theme.css
51
+ ├── build-obsidian.js → obsidian/theme.css
52
+ └── build-showcase.js → showcase_flutter/ (Vite/Web build)
48
53
  ```
49
54
 
50
55
  ### OKLCH Color Space
@@ -85,7 +90,8 @@ candi/
85
90
  ├── vim/ # Vim colorschemes
86
91
  ├── kde/ # KDE Plasma color schemes
87
92
  ├── gnome/ # GTK3/GTK4 themes
88
- └── obsidian/ # Obsidian theme
93
+ ├── obsidian/ # Obsidian theme
94
+ └── showcase_flutter/ # Flutter showcase application
89
95
  ```
90
96
 
91
97
  ---
@@ -104,6 +110,7 @@ candi/
104
110
  | `npm run build:kde` | Build KDE color schemes only |
105
111
  | `npm run build:gnome` | Build GNOME/GTK themes only |
106
112
  | `npm run build:obsidian` | Build Obsidian theme only |
113
+ | `npm run build:showcase` | Build Flutter showcase app only |
107
114
 
108
115
  ### Test
109
116
 
@@ -118,6 +125,7 @@ candi/
118
125
  | `npm run test:kde` | Test KDE color schemes |
119
126
  | `npm run test:gnome` | Test GNOME themes |
120
127
  | `npm run test:obsidian` | Test Obsidian theme |
128
+ | `npm run test:showcase` | Test Flutter showcase app |
121
129
 
122
130
  ### Package & Publish
123
131
 
@@ -137,38 +145,7 @@ Download ready-to-use artifacts from GitHub releases (recommended for most users
137
145
 
138
146
  **[Using Prebuilt Releases Guide](docs/using-release-artifacts.md)**
139
147
 
140
- ### GitHub Packages Authentication (Required)
141
-
142
- > [!IMPORTANT]
143
- > This package is published to **GitHub Packages**, not npmjs.com. You must authenticate with GitHub before installing.
144
-
145
- To install the package, you need to authenticate with GitHub:
146
-
147
- 1. **Create a Personal Access Token (PAT)**:
148
- - Go to GitHub Settings → [Developer settings → Personal access tokens → Tokens (classic)](https://github.com/settings/tokens)
149
- - Click "Generate new token (classic)"
150
- - Give it a descriptive name (e.g., "npm packages")
151
- - Select the `read:packages` scope
152
- - Click "Generate token" and copy the token
153
-
154
- 2. **Configure npm authentication**:
155
-
156
- ```bash
157
- npm login --scope=@wtasg --auth-type=legacy --registry=https://npm.pkg.github.com
158
- ```
159
-
160
- - Username: Your GitHub username
161
- - Password: The PAT you just created
162
- - Email: Your GitHub email
163
-
164
- Or create/update your `~/.npmrc` file:
165
-
166
- ```text
167
- //npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT
168
- @wtasg:registry=https://npm.pkg.github.com
169
- ```
170
-
171
- ### Web (Tailwind CSS)
148
+ ### Web (npm Package)
172
149
 
173
150
  ```bash
174
151
  npm install @wtasnorg/candi
@@ -212,9 +189,9 @@ module.exports = {
212
189
 
213
190
  | Token | Light | Dark | Usage |
214
191
  | :--- | :--- | :--- | :--- |
215
- | `bg` | Warm white | Warm dark | Page background |
216
- | `surface` | Soft cream | Card surface | Cards, sections |
217
- | `elevated` | Pure white | Elevated dark | Modals, popups |
192
+ | `bg` | Warm white | Warm dark (Hygge) | Page background |
193
+ | `surface` | Soft cream | Warm dark surface | Cards, sections |
194
+ | `elevated` | Pure white | Warm elevated dark | Modals, popups |
218
195
  | `text` | Warm charcoal | Off-white | Primary text |
219
196
  | `text-subtle` | Medium gray | Light gray | Secondary text |
220
197
  | `text-muted` | Light gray | Muted gray | Tertiary text |
@@ -230,11 +207,11 @@ module.exports = {
230
207
 
231
208
  ## Design & Accessibility
232
209
 
233
- Candi is built with accessibility as a core requirement:
210
+ Candi prioritizes accessibility through automated validation:
234
211
 
235
- - **WCAG Standards**: Color extraction pipeline automatically validates contrast ratios
236
- - **Primary Text**: Aimed at **4.5:1** contrast (WCAG AA) for standard text
237
- - **UI Elements**: Accents and status indicators tuned for **3.0:1** contrast (WCAG Graphical Objects)
212
+ - **WCAG Compliance**: Contrast ratios are validated programmatically during the color extraction pipeline.
213
+ - **Primary Text**: Targets **4.5:1** (WCAG AA) for standard text.
214
+ - **UI Elements**: Accents and state indicators target **3.0:1** (WCAG Graphical Objects).
238
215
 
239
216
  ---
240
217
 
@@ -260,23 +237,21 @@ npm install
260
237
  npm run build:all
261
238
  ```
262
239
 
263
- ### Working on the Documentation Website
240
+ ### Documentation Website
264
241
 
265
- The docs website lives in `website/` and uses the built theme from `dist/`:
242
+ The documentation site in `website/` consumes the built theme from `dist/`:
266
243
 
267
244
  ```bash
268
245
  cd website
269
246
  npm install
270
- npm run dev # Starts dev server at http://localhost:3000
247
+ npm run dev
271
248
  ```
272
249
 
273
- The `predev` and `prebuild` scripts automatically rebuild the parent package, so changes to `src/data/colors.js` are reflected immediately.
274
-
275
- ### Making Color Changes
250
+ ### Color Modifications
276
251
 
277
- 1. Edit `src/data/colors.js` (the single source of truth)
278
- 2. Run `npm run build:all` to regenerate all platform themes
279
- 3. Run `npm test` to validate color accuracy and contrast ratios
252
+ 1. Edit authoritative anchors in `src/data/colors.js`.
253
+ 2. Run `npm run build:all` to regenerate platform themes via the derivation engine.
254
+ 3. Run `npm test` to validate system-wide harmony and contrast.
280
255
 
281
256
  ---
282
257
 
package/dist/base.css CHANGED
@@ -12,29 +12,15 @@
12
12
 
13
13
  :root {
14
14
  /* @tokens-start-light */
15
- --candi-bg: oklch(98% 0.008 85);
16
- --candi-surface: oklch(95.5% 0.012 85);
15
+ --candi-bg: oklch(96% 0.012 85);
16
+ --candi-surface: oklch(93% 0.015 85);
17
17
  --candi-elevated: oklch(100% 0 0);
18
- --candi-text: oklch(28% 0.015 250);
19
- --candi-text-subtle: oklch(50% 0.01 250);
20
- --candi-text-muted: oklch(62% 0.008 250);
21
- --candi-border: oklch(90% 0.008 85);
22
- --candi-border-strong: oklch(82% 0.01 85);
23
- --candi-divider: oklch(88% 0.006 85);
24
- --candi-accent: oklch(52% 0.06 230);
25
- --candi-accent-subtle: oklch(85% 0.03 230);
26
- --candi-on-accent: oklch(100% 0 0);
27
- --candi-secondary: oklch(58% 0.12 55);
28
- --candi-secondary-subtle: oklch(88% 0.04 55);
29
- --candi-on-secondary: oklch(100% 0 0);
30
- --candi-success: oklch(52% 0.08 145);
31
- --candi-on-success: oklch(100% 0 0);
32
- --candi-warning: oklch(68% 0.13 70);
33
- --candi-on-warning: oklch(20% 0.02 70);
34
- --candi-error: oklch(58% 0.12 25);
35
- --candi-on-error: oklch(100% 0 0);
36
- --candi-info: oklch(55% 0.1 240);
37
- --candi-on-info: oklch(100% 0 0);
18
+ --candi-text: oklch(25% 0.02 250);
19
+ --candi-text-subtle: oklch(45% 0.015 250);
20
+ --candi-text-muted: oklch(60% 0.01 250);
21
+ --candi-border: oklch(88% 0.012 85);
22
+ --candi-border-strong: oklch(80% 0.015 85);
23
+ --candi-divider: oklch(85% 0.01 85);
38
24
  --candi-link: oklch(50% 0.08 230);
39
25
  --candi-disabled: oklch(75% 0.005 250);
40
26
  --candi-overlay: oklch(0% 0 0 / 0.5);
@@ -62,55 +48,67 @@
62
48
  --candi-terminal-magenta: oklch(60% 0.15 0);
63
49
  --candi-terminal-cyan: oklch(65% 0.1 200);
64
50
  --candi-terminal-white: oklch(92% 0.01 85);
65
-
66
- /* Terminal Palette */
67
- --candi-terminal-black: oklch(25% 0.01 250);
68
- --candi-terminal-red: var(--candi-error);
69
- --candi-terminal-green: var(--candi-success);
70
- --candi-terminal-yellow: var(--candi-warning);
71
- --candi-terminal-blue: var(--candi-accent);
72
- --candi-terminal-magenta: var(--candi-syntax-keyword);
73
- --candi-terminal-cyan: var(--candi-syntax-var);
74
- --candi-terminal-white: var(--candi-text);
51
+ --candi-accent: oklch(52% 0.14 275);
52
+ --candi-accent-subtle: oklch(85% 0.112 275);
53
+ --candi-accent-soft: oklch(62% 0.126 275);
54
+ --candi-accent-strong: oklch(42% 0.154 275);
55
+ --candi-accent-outline: oklch(37% 0.126 275);
56
+ --candi-on-accent: oklch(100% 0 0);
57
+ --candi-secondary: oklch(60% 0.10 15);
58
+ --candi-secondary-subtle: oklch(93% 0.08 15);
59
+ --candi-secondary-soft: oklch(70% 0.09 15);
60
+ --candi-secondary-strong: oklch(50% 0.11 15);
61
+ --candi-secondary-outline: oklch(45% 0.09 15);
62
+ --candi-on-secondary: oklch(0% 0 0);
63
+ --candi-success: oklch(50% 0.08 145);
64
+ --candi-success-subtle: oklch(83% 0.064 145);
65
+ --candi-success-soft: oklch(60% 0.072 145);
66
+ --candi-success-strong: oklch(40% 0.088 145);
67
+ --candi-success-outline: oklch(35% 0.072 145);
68
+ --candi-on-success: oklch(100% 0 0);
69
+ --candi-warning: oklch(60% 0.10 75);
70
+ --candi-warning-subtle: oklch(93% 0.08 75);
71
+ --candi-warning-soft: oklch(70% 0.09 75);
72
+ --candi-warning-strong: oklch(50% 0.11 75);
73
+ --candi-warning-outline: oklch(45% 0.09 75);
74
+ --candi-on-warning: oklch(0% 0 0);
75
+ --candi-error: oklch(50% 0.10 25);
76
+ --candi-error-subtle: oklch(83% 0.08 25);
77
+ --candi-error-soft: oklch(60% 0.09 25);
78
+ --candi-error-strong: oklch(40% 0.11 25);
79
+ --candi-error-outline: oklch(35% 0.09 25);
80
+ --candi-on-error: oklch(100% 0 0);
81
+ --candi-info: oklch(50% 0.08 225);
82
+ --candi-info-subtle: oklch(83% 0.064 225);
83
+ --candi-info-soft: oklch(60% 0.072 225);
84
+ --candi-info-strong: oklch(40% 0.088 225);
85
+ --candi-info-outline: oklch(35% 0.072 225);
86
+ --candi-on-info: oklch(100% 0 0);
75
87
  /* @tokens-end-light */
76
88
  }
77
89
 
78
90
  .dark {
79
91
  /* @tokens-start-dark */
80
- --candi-bg: oklch(18% 0.015 250);
81
- --candi-surface: oklch(22% 0.012 250);
82
- --candi-elevated: oklch(25% 0.015 250);
92
+ --candi-bg: oklch(18% 0.015 85);
93
+ --candi-surface: oklch(22% 0.012 85);
94
+ --candi-elevated: oklch(25% 0.015 85);
83
95
  --candi-text: oklch(92% 0.01 85);
84
96
  --candi-text-subtle: oklch(72% 0.008 85);
85
97
  --candi-text-muted: oklch(58% 0.006 85);
86
- --candi-border: oklch(30% 0.01 250);
87
- --candi-border-strong: oklch(40% 0.012 250);
88
- --candi-divider: oklch(28% 0.008 250);
89
- --candi-accent: oklch(62% 0.08 230);
90
- --candi-accent-subtle: oklch(35% 0.04 230);
91
- --candi-on-accent: oklch(15% 0.01 230);
92
- --candi-secondary: oklch(65% 0.12 55);
93
- --candi-secondary-subtle: oklch(30% 0.05 55);
94
- --candi-on-secondary: oklch(15% 0.02 55);
95
- --candi-success: oklch(60% 0.1 145);
96
- --candi-on-success: oklch(15% 0.02 145);
97
- --candi-warning: oklch(72% 0.13 70);
98
- --candi-on-warning: oklch(15% 0.02 70);
99
- --candi-error: oklch(65% 0.12 25);
100
- --candi-on-error: oklch(15% 0.02 25);
101
- --candi-info: oklch(65% 0.1 240);
102
- --candi-on-info: oklch(15% 0.02 240);
103
- --candi-link: oklch(60% 0.08 230);
104
- --candi-disabled: oklch(45% 0.005 250);
98
+ --candi-border: oklch(30% 0.01 85);
99
+ --candi-border-strong: oklch(40% 0.012 85);
100
+ --candi-divider: oklch(28% 0.008 85);
101
+ --candi-link: oklch(65% 0.08 85);
102
+ --candi-disabled: oklch(45% 0.005 85);
105
103
  --candi-overlay: oklch(0% 0 0 / 0.7);
106
104
  --candi-scrim: oklch(0% 0 0 / 0.6);
107
105
  --candi-inverse-surface: oklch(92% 0.008 85);
108
- --candi-inverse-text: oklch(25% 0.015 250);
106
+ --candi-inverse-text: oklch(25% 0.015 275);
109
107
  --candi-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
110
108
  --candi-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
111
109
  --candi-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
112
110
  --candi-shadow-color: oklch(0% 0 0 / 0.4);
113
- --candi-focus-ring: oklch(62% 0.08 230 / 0.5);
111
+ --candi-focus-ring: oklch(62% 0.08 275 / 0.5);
114
112
  --candi-syntax-keyword: oklch(70% 0.15 0);
115
113
  --candi-syntax-type: oklch(75% 0.12 280);
116
114
  --candi-syntax-var: oklch(75% 0.1 200);
@@ -119,24 +117,50 @@
119
117
  --candi-syntax-string: oklch(70% 0.12 140);
120
118
  --candi-hover: oklch(100% 0 0 / 0.1);
121
119
  --candi-active: oklch(100% 0 0 / 0.2);
122
- --candi-terminal-black: oklch(15% 0.01 250);
123
- --candi-terminal-red: oklch(65% 0.12 25);
124
- --candi-terminal-green: oklch(60% 0.1 145);
125
- --candi-terminal-yellow: oklch(72% 0.13 70);
126
- --candi-terminal-blue: oklch(62% 0.08 230);
127
- --candi-terminal-magenta: oklch(70% 0.15 0);
128
- --candi-terminal-cyan: oklch(75% 0.1 200);
120
+ --candi-terminal-black: oklch(15% 0.01 275);
121
+ --candi-terminal-red: oklch(65% 0.05 25);
122
+ --candi-terminal-green: oklch(65% 0.04 145);
123
+ --candi-terminal-yellow: oklch(75% 0.06 75);
124
+ --candi-terminal-blue: oklch(65% 0.13 275);
125
+ --candi-terminal-magenta: oklch(70% 0.10 15);
126
+ --candi-terminal-cyan: oklch(70% 0.04 225);
129
127
  --candi-terminal-white: oklch(92% 0.01 85);
130
-
131
- /* Terminal Palette */
132
- --candi-terminal-black: oklch(15% 0.01 250);
133
- --candi-terminal-red: var(--candi-error);
134
- --candi-terminal-green: var(--candi-success);
135
- --candi-terminal-yellow: var(--candi-warning);
136
- --candi-terminal-blue: var(--candi-accent);
137
- --candi-terminal-magenta: var(--candi-syntax-keyword);
138
- --candi-terminal-cyan: var(--candi-syntax-var);
139
- --candi-terminal-white: var(--candi-text);
128
+ --candi-accent: oklch(65% 0.13 275);
129
+ --candi-accent-subtle: oklch(38% 0.104 275);
130
+ --candi-accent-soft: oklch(75% 0.117 275);
131
+ --candi-accent-strong: oklch(55% 0.143 275);
132
+ --candi-accent-outline: oklch(50% 0.117 275);
133
+ --candi-on-accent: oklch(0% 0 0);
134
+ --candi-secondary: oklch(70% 0.10 15);
135
+ --candi-secondary-subtle: oklch(43% 0.08 15);
136
+ --candi-secondary-soft: oklch(80% 0.09 15);
137
+ --candi-secondary-strong: oklch(60% 0.11 15);
138
+ --candi-secondary-outline: oklch(55% 0.09 15);
139
+ --candi-on-secondary: oklch(0% 0 0);
140
+ --candi-success: oklch(75% 0.08 145);
141
+ --candi-success-subtle: oklch(48% 0.064 145);
142
+ --candi-success-soft: oklch(85% 0.072 145);
143
+ --candi-success-strong: oklch(65% 0.088 145);
144
+ --candi-success-outline: oklch(60% 0.072 145);
145
+ --candi-on-success: oklch(0% 0 0);
146
+ --candi-warning: oklch(80% 0.10 75);
147
+ --candi-warning-subtle: oklch(53% 0.08 75);
148
+ --candi-warning-soft: oklch(90% 0.09 75);
149
+ --candi-warning-strong: oklch(70% 0.11 75);
150
+ --candi-warning-outline: oklch(65% 0.09 75);
151
+ --candi-on-warning: oklch(0% 0 0);
152
+ --candi-error: oklch(75% 0.10 25);
153
+ --candi-error-subtle: oklch(48% 0.08 25);
154
+ --candi-error-soft: oklch(85% 0.09 25);
155
+ --candi-error-strong: oklch(65% 0.11 25);
156
+ --candi-error-outline: oklch(60% 0.09 25);
157
+ --candi-on-error: oklch(0% 0 0);
158
+ --candi-info: oklch(75% 0.08 225);
159
+ --candi-info-subtle: oklch(48% 0.064 225);
160
+ --candi-info-soft: oklch(85% 0.072 225);
161
+ --candi-info-strong: oklch(65% 0.088 225);
162
+ --candi-info-outline: oklch(60% 0.072 225);
163
+ --candi-on-info: oklch(0% 0 0);
140
164
  /* @tokens-end-dark */
141
165
  }
142
166