@kungal/ui-tokens 2.32.0 → 2.33.0

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,5 +1,44 @@
1
1
  # @kungal/ui-tokens
2
2
 
3
+ ## 2.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d672af5: Tokens now generate into three targets: the CSS, a Dart package, and a DTCG export
8
+
9
+ `gen-tokens.mjs` has always been the single source of truth for every KunUI
10
+ colour — the OKLCH hue policy, the shared lightness ramp, and the WCAG-AA
11
+ assertion that fails the build when a solid/on-colour pair drops below 4.5:1.
12
+ It now emits three sibling outputs from that one in-memory model instead of one:
13
+
14
+ - **`palette.generated.css` — byte-identical.** Nothing about the web layer
15
+ changes. Same values, same file.
16
+ - **`kun_ui_tokens` on pub.dev**, generated into `packages/ui-tokens-flutter`.
17
+ The NextMoe/KunGal apps are Flutter, which has no DOM, no CSS cascade and no
18
+ Tailwind, so a Flutter app could only ever have hand-transcribed the palette.
19
+ Every design system that does that drifts on its first retheme. This package
20
+ is emitted from the same numbers the stylesheet ships — sRGB-clamped OKLCH
21
+ through the same `clampChroma` pass — as plain `const` holders
22
+ (`KunColors.light.primary.solid`, `KunEasing.standard`, `KunRadius.md`,
23
+ `KunShadows.md`) with no `ThemeExtension` and no Material coupling. Its
24
+ version is locked to the npm version: `2.32.1` here is `2.32.1` there.
25
+ - **A DTCG 2025.10 export** at the new subpath
26
+ `@kungal/ui-tokens/tokens.dtcg.json`, for Figma and external token tooling.
27
+ Colours carry their OKLCH components plus an sRGB `hex` fallback; radius,
28
+ easing, duration and elevation carry their spec types. It is an _export_, not
29
+ the pivot — a resolved-value format cannot express the hue policy or the
30
+ contrast assertion, so the generator stays the source of truth.
31
+
32
+ The generator also now reads the radius, motion and elevation tokens back out of
33
+ `tokens.css` rather than duplicating them, which turns that file's "keep the
34
+ `@theme` and `:root` copies in sync" instruction into a build failure when they
35
+ disagree.
36
+
37
+ Nothing to do as a consumer: no CSS changed, and the new export subpath is
38
+ additive.
39
+
40
+ ## 2.32.1
41
+
3
42
  ## 2.32.0
4
43
 
5
44
  ## 2.31.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungal/ui-tokens",
3
- "version": "2.32.0",
3
+ "version": "2.33.0",
4
4
  "description": "KunUI design tokens — framework-agnostic Tailwind v4 theme (semantic colors, radius, z-index, animations).",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -35,7 +35,8 @@
35
35
  "./css": "./src/tokens.css",
36
36
  "./tokens.css": "./src/tokens.css",
37
37
  "./base.css": "./src/base.css",
38
- "./index.css": "./src/index.css"
38
+ "./index.css": "./src/index.css",
39
+ "./tokens.dtcg.json": "./src/tokens.dtcg.json"
39
40
  },
40
41
  "peerDependencies": {
41
42
  "tailwindcss": "^4.0.0"