@seyuna/postcss 1.0.0-canary.38 → 1.0.0-canary.39
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 +14 -0
- package/README.md +22 -51
- package/dist/functions/index.js +0 -2
- package/package.json +1 -1
- package/dist/functions/theme.d.ts +0 -6
- package/dist/functions/theme.js +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.0.0-canary.39](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.38...v1.0.0-canary.39) (2026-04-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* feat!: remove SeyunaTheme() function ([a5ae01a](https://github.com/seyuna-corp/seyuna-postcss/commit/a5ae01a5ad86da239e0a5a5c7e0e33b73402c0f7))
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### BREAKING CHANGES
|
|
8
|
+
|
|
9
|
+
* SeyunaTheme() has been removed. There is no replacement —
|
|
10
|
+
use standard CSS custom properties or hardcoded values for non-color config
|
|
11
|
+
lookups instead.
|
|
12
|
+
|
|
13
|
+
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
14
|
+
|
|
1
15
|
# [1.0.0-canary.38](https://github.com/seyuna-corp/seyuna-postcss/compare/v1.0.0-canary.37...v1.0.0-canary.38) (2026-04-05)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -3,31 +3,39 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@seyuna/postcss)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
>
|
|
6
|
+
> A CSS compiler for theme-aware design tokens.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Overview
|
|
11
11
|
|
|
12
|
-
`@seyuna/postcss` is a PostCSS plugin that
|
|
12
|
+
`@seyuna/postcss` is a PostCSS plugin that turns Seyuna-specific CSS syntax into plain CSS.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
It is designed for projects that want:
|
|
15
15
|
|
|
16
|
-
- design tokens
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- design tokens declared directly in CSS
|
|
17
|
+
- theme-aware colors without runtime JavaScript
|
|
18
|
+
- reusable light/dark/system mode styling
|
|
19
|
+
- container query shortcuts
|
|
20
|
+
- generated utility-like selectors from token lists
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
In practice, you write Seyuna syntax such as:
|
|
22
23
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
24
|
+
- `@config "seyuna"` for tokens and theme settings
|
|
25
|
+
- `@seyuna;` to inject the generated design system
|
|
26
|
+
- helper functions like `SeyunaTone(primary)` and `SeyunaSwatch(brand)`
|
|
27
|
+
- at-rules like `@dark`, `@light`, `@xs`, `@each-tone`, and `@each-swatch`
|
|
28
|
+
|
|
29
|
+
Seyuna compiles that into regular CSS:
|
|
30
|
+
|
|
31
|
+
- custom properties
|
|
32
|
+
- light and dark mode selectors
|
|
25
33
|
- system preference media queries
|
|
26
34
|
- container queries
|
|
27
|
-
-
|
|
28
|
-
- a global reset
|
|
35
|
+
- repeated selectors for palette iteration
|
|
36
|
+
- a global reset and layer setup
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
The important idea is that the source stays token-driven, but the browser receives standard CSS with no JavaScript color runtime.
|
|
31
39
|
|
|
32
40
|
---
|
|
33
41
|
|
|
@@ -586,20 +594,6 @@ If you write nested parseable selectors inside the block, Seyuna still replaces
|
|
|
586
594
|
|
|
587
595
|
---
|
|
588
596
|
|
|
589
|
-
## Accessing Values from Config
|
|
590
|
-
|
|
591
|
-
Use `SeyunaTheme()` when you want a non-color value directly from the config object.
|
|
592
|
-
|
|
593
|
-
```css
|
|
594
|
-
.container {
|
|
595
|
-
max-width: SeyunaTheme(ui.theme.breakpoints.lg);
|
|
596
|
-
}
|
|
597
|
-
```
|
|
598
|
-
|
|
599
|
-
It performs a simple dot-path lookup. If the path does not exist, Seyuna leaves the original string in place instead of failing the build.
|
|
600
|
-
|
|
601
|
-
---
|
|
602
|
-
|
|
603
597
|
## Common Gotchas
|
|
604
598
|
|
|
605
599
|
- Run Seyuna early in the PostCSS chain.
|
|
@@ -611,29 +605,6 @@ It performs a simple dot-path lookup. If the path does not exist, Seyuna leaves
|
|
|
611
605
|
If output looks wrong, check plugin order first. That is the most common source of problems.
|
|
612
606
|
|
|
613
607
|
---
|
|
614
|
-
|
|
615
|
-
## Migration Notes
|
|
616
|
-
|
|
617
|
-
The current color helper names are:
|
|
618
|
-
|
|
619
|
-
- `SeyunaTone`
|
|
620
|
-
- `SeyunaSwatch`
|
|
621
|
-
- `SeyunaAlpha`
|
|
622
|
-
- `SeyunaTint`
|
|
623
|
-
- `SeyunaShade`
|
|
624
|
-
- `SeyunaContrast`
|
|
625
|
-
|
|
626
|
-
Earlier names were replaced:
|
|
627
|
-
|
|
628
|
-
- `@each-standard-color` -> `@each-tone`
|
|
629
|
-
- `@each-fixed-color` -> `@each-swatch`
|
|
630
|
-
- `SeyunaStandardColor()` -> `SeyunaTone()`
|
|
631
|
-
- `SeyunaFixedColor()` -> `SeyunaSwatch()`
|
|
632
|
-
- `SeyunaLighten()` -> `SeyunaTint()`
|
|
633
|
-
- `SeyunaDarken()` -> `SeyunaShade()`
|
|
634
|
-
|
|
635
|
-
`@seyuna;` also replaces the older `@import "seyuna"` style.
|
|
636
|
-
|
|
637
608
|
---
|
|
638
609
|
|
|
639
610
|
## License
|
package/dist/functions/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SeyunaTone, SeyunaSwatch, SeyunaAlpha, SeyunaTint, SeyunaShade, SeyunaContrast, } from "./color.js";
|
|
2
|
-
import { SeyunaTheme } from "./theme.js";
|
|
3
2
|
export const functions = {
|
|
4
3
|
SeyunaTone,
|
|
5
4
|
SeyunaSwatch,
|
|
@@ -7,5 +6,4 @@ export const functions = {
|
|
|
7
6
|
SeyunaTint,
|
|
8
7
|
SeyunaShade,
|
|
9
8
|
SeyunaContrast,
|
|
10
|
-
SeyunaTheme,
|
|
11
9
|
};
|
package/package.json
CHANGED
package/dist/functions/theme.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Accesses values from the Seyuna configuration using dot notation
|
|
3
|
-
* Example: theme(ui.theme.breakpoints.tablet)
|
|
4
|
-
*/
|
|
5
|
-
export function SeyunaTheme(context, path) {
|
|
6
|
-
const parts = path.split('.');
|
|
7
|
-
let current = context.config;
|
|
8
|
-
for (const part of parts) {
|
|
9
|
-
if (current && typeof current === 'object' && part in current) {
|
|
10
|
-
current = current[part];
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
return path; // Return original path if not found
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return String(current);
|
|
17
|
-
}
|