@seyuna/postcss 1.0.0-canary.30 → 1.0.0-canary.31

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.0.0-canary.31](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.30...v1.0.0-canary.31) (2026-01-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * add 24 default Greek alphabet-based hues ([e6fd8f8](https://github.com/seyuna-corp/seyuna-postcss/commit/e6fd8f8d0c59c8e204c36809a116bb84816ff165))
7
+
1
8
  # [1.0.0-canary.30](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.29...v1.0.0-canary.30) (2026-01-21)
2
9
 
3
10
 
package/README.md CHANGED
@@ -157,13 +157,21 @@ Seyuna operates entirely in the **OKLCH color space**.
157
157
 
158
158
  Standard colors define only a hue angle in the config and inherit theme lightness.
159
159
 
160
+ ### Default Hues
161
+
162
+ Seyuna comes with 24 default hues based on the Greek alphabet, spaced evenly at 15-degree increments:
163
+
164
+ `alpha (15)`, `beta (30)`, `gamma (45)`, `delta (60)`, `epsilon (75)`, `zeta (90)`, `eta (105)`, `theta (120)`, `iota (135)`, `kappa (150)`, `lambda (165)`, `mu (180)`, `nu (195)`, `xi (210)`, `omicron (225)`, `pi (240)`, `rho (255)`, `sigma (270)`, `tau (285)`, `upsilon (300)`, `phi (315)`, `chi (330)`, `psi (345)`, `omega (360)`.
165
+
166
+ You can use these directly without configuration, or override them in the `@config` block.
167
+
160
168
  ```css
161
169
  @config "seyuna" {
162
- --hue-primary: 240;
170
+ --hue-alpha: 200; /* Override default Alpha hue */
163
171
  }
164
172
 
165
173
  .badge {
166
- background: SeyunaStandardColor(primary);
174
+ background: SeyunaStandardColor(alpha);
167
175
  }
168
176
  ```
169
177
 
package/dist/config.js CHANGED
@@ -1,39 +1,71 @@
1
+ const DEFAULT_HUES = {
2
+ alpha: 15,
3
+ beta: 30,
4
+ gamma: 45,
5
+ delta: 60,
6
+ epsilon: 75,
7
+ zeta: 90,
8
+ eta: 105,
9
+ theta: 120,
10
+ iota: 135,
11
+ kappa: 150,
12
+ lambda: 165,
13
+ mu: 180,
14
+ nu: 195,
15
+ xi: 210,
16
+ omicron: 225,
17
+ pi: 240,
18
+ rho: 255,
19
+ sigma: 270,
20
+ tau: 285,
21
+ upsilon: 300,
22
+ phi: 315,
23
+ chi: 330,
24
+ psi: 345,
25
+ omega: 360,
26
+ };
1
27
  const DEFAULT_OPTIONS = {
2
28
  config: undefined,
3
29
  functions: undefined,
4
30
  };
5
31
  export function loadConfig(options = {}) {
6
32
  const mergedOptions = { ...DEFAULT_OPTIONS, ...options };
33
+ const baseConfig = {
34
+ ui: {
35
+ theme: {
36
+ hues: { ...DEFAULT_HUES },
37
+ colors: {},
38
+ light: {
39
+ chroma: 0,
40
+ lightness: 0,
41
+ background: { lightness: 0, chroma: 0, hue: 0 },
42
+ text: { lightness: 0, chroma: 0, hue: 0 },
43
+ colors: {},
44
+ },
45
+ dark: {
46
+ chroma: 0,
47
+ lightness: 0,
48
+ background: { lightness: 0, chroma: 0, hue: 0 },
49
+ text: { lightness: 0, chroma: 0, hue: 0 },
50
+ colors: {},
51
+ },
52
+ },
53
+ },
54
+ };
7
55
  if (mergedOptions.config) {
56
+ // Deep merge or at least merge hues
57
+ const config = mergedOptions.config;
58
+ if (config.ui?.theme) {
59
+ config.ui.theme.hues = { ...DEFAULT_HUES, ...config.ui.theme.hues };
60
+ }
8
61
  return {
9
- config: mergedOptions.config,
62
+ config: config,
10
63
  options: { ...mergedOptions, modeAttribute: "data-mode" },
11
64
  };
12
65
  }
13
- // Return base empty config - we'll populate it from CSS
66
+ // Return base config with defaults
14
67
  return {
15
- config: {
16
- ui: {
17
- theme: {
18
- hues: {},
19
- colors: {},
20
- light: {
21
- chroma: 0,
22
- lightness: 0,
23
- background: { lightness: 0, chroma: 0, hue: 0 },
24
- text: { lightness: 0, chroma: 0, hue: 0 },
25
- colors: {},
26
- },
27
- dark: {
28
- chroma: 0,
29
- lightness: 0,
30
- background: { lightness: 0, chroma: 0, hue: 0 },
31
- text: { lightness: 0, chroma: 0, hue: 0 },
32
- colors: {},
33
- },
34
- },
35
- },
36
- },
68
+ config: baseConfig,
37
69
  options: { ...mergedOptions, modeAttribute: "data-mode" },
38
70
  };
39
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seyuna/postcss",
3
- "version": "1.0.0-canary.30",
3
+ "version": "1.0.0-canary.31",
4
4
  "description": "Seyuna UI's postcss plugin",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/config.ts CHANGED
@@ -10,6 +10,33 @@ import {
10
10
  // Re-export types for backwards compatibility
11
11
  export type { PluginOptions, PluginContext, FunctionMap } from "./types.js";
12
12
 
13
+ const DEFAULT_HUES = {
14
+ alpha: 15,
15
+ beta: 30,
16
+ gamma: 45,
17
+ delta: 60,
18
+ epsilon: 75,
19
+ zeta: 90,
20
+ eta: 105,
21
+ theta: 120,
22
+ iota: 135,
23
+ kappa: 150,
24
+ lambda: 165,
25
+ mu: 180,
26
+ nu: 195,
27
+ xi: 210,
28
+ omicron: 225,
29
+ pi: 240,
30
+ rho: 255,
31
+ sigma: 270,
32
+ tau: 285,
33
+ upsilon: 300,
34
+ phi: 315,
35
+ chi: 330,
36
+ psi: 345,
37
+ omega: 360,
38
+ };
39
+
13
40
  const DEFAULT_OPTIONS: Required<PluginOptions> = {
14
41
  config: undefined as any,
15
42
  functions: undefined as any,
@@ -21,37 +48,44 @@ export function loadConfig(options: PluginOptions = {}): {
21
48
  } {
22
49
  const mergedOptions = { ...DEFAULT_OPTIONS, ...options };
23
50
 
51
+ const baseConfig: SeyunaConfig = {
52
+ ui: {
53
+ theme: {
54
+ hues: { ...DEFAULT_HUES },
55
+ colors: {},
56
+ light: {
57
+ chroma: 0,
58
+ lightness: 0,
59
+ background: { lightness: 0, chroma: 0, hue: 0 },
60
+ text: { lightness: 0, chroma: 0, hue: 0 },
61
+ colors: {},
62
+ },
63
+ dark: {
64
+ chroma: 0,
65
+ lightness: 0,
66
+ background: { lightness: 0, chroma: 0, hue: 0 },
67
+ text: { lightness: 0, chroma: 0, hue: 0 },
68
+ colors: {},
69
+ },
70
+ },
71
+ },
72
+ };
73
+
24
74
  if (mergedOptions.config) {
75
+ // Deep merge or at least merge hues
76
+ const config = mergedOptions.config;
77
+ if (config.ui?.theme) {
78
+ config.ui.theme.hues = { ...DEFAULT_HUES, ...config.ui.theme.hues };
79
+ }
25
80
  return {
26
- config: mergedOptions.config,
81
+ config: config,
27
82
  options: { ...mergedOptions, modeAttribute: "data-mode" },
28
83
  };
29
84
  }
30
85
 
31
- // Return base empty config - we'll populate it from CSS
86
+ // Return base config with defaults
32
87
  return {
33
- config: {
34
- ui: {
35
- theme: {
36
- hues: {},
37
- colors: {},
38
- light: {
39
- chroma: 0,
40
- lightness: 0,
41
- background: { lightness: 0, chroma: 0, hue: 0 },
42
- text: { lightness: 0, chroma: 0, hue: 0 },
43
- colors: {},
44
- },
45
- dark: {
46
- chroma: 0,
47
- lightness: 0,
48
- background: { lightness: 0, chroma: 0, hue: 0 },
49
- text: { lightness: 0, chroma: 0, hue: 0 },
50
- colors: {},
51
- },
52
- },
53
- },
54
- } as any,
88
+ config: baseConfig,
55
89
  options: { ...mergedOptions, modeAttribute: "data-mode" },
56
90
  };
57
91
  }
@@ -140,7 +140,8 @@ describe("Seyuna PostCSS Plugin", () => {
140
140
  expect(result.css).toContain(":root");
141
141
  expect(result.css).toContain("--primary-hue: 200");
142
142
  expect(result.css).toContain("--secondary-hue: 100");
143
- expect(result.css).not.toContain("--alpha-hue");
143
+ expect(result.css).toContain("--alpha-hue: 15");
144
+ expect(result.css).toContain("--omega-hue: 360");
144
145
 
145
146
  // Check for mode selectors
146
147
  expect(result.css).toContain('[data-mode="light"]');