diff --git a/.changeset/oklch-color-fallback.md b/.changeset/oklch-color-fallback.md deleted file mode 100644 index 13d350d..0000000 --- a/.changeset/oklch-color-fallback.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -"@hebilicious/cssforge": minor ---- - -Generate palette colors in extra sRGB formats alongside `oklch()`, so a browser without -`oklch()` support still renders them and non-CSS consumers read the value they need. - -`settings.color.formats` selects the formats and outputs: `hex` produces `"#ff7f50"`, -`"ff7f50"` and `0xff7f50`, `rgb` produces `"rgb(255 127 80)"` and `[255, 127, 80]`, and a -format set to `true` produces its CSS value only. Each format takes `alpha`: `true` keeps the -color's alpha, a number from 0 to 1 sets it, `false` rejects the color. - -`settings.color.fallback` names the format whose `string` value becomes the declaration for -browsers without `oklch()` support, emitted after the root block inside -`@supports not (color: oklch(0% 0 0))` and mirroring the color's `atRule` and `selector`. -Without it, the first format that produces a CSS value is used, and `false` declares nothing. - -A palette color's settings override the palette's per setting, and its `formats` merge per -format with `false` to remove one. The color settings are a closed schema: unknown keys, a -`formats` that is not an object, and color format settings on a gradient, a theme, or a level -that reads no settings throw with the configuration path. The settings types are exported -from the package entry. - -Tokens gain a `color` object keyed by format and output, plus `gamutMapped: true` when a -format is generated for a color outside sRGB, mirrored by `attributes.color`, `$color` and -`$gamutMapped` in Style Dictionary. `cssforge --color-formats hex,rgb` adds formats for a run. diff --git a/.changeset/settings-validation.md b/.changeset/settings-validation.md deleted file mode 100644 index 11243e5..0000000 --- a/.changeset/settings-validation.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"@hebilicious/cssforge": patch ---- - -Reject unknown, misplaced, and wrongly shaped settings in every module, not just in colors. - -A setting no schema accepts generated nothing quietly: a misspelled key was ignored, a -`settings` on a primitive group or a gradient variant did nothing, and a `settings` that was -not an object silently disabled the px-to-rem conversion, so `8px` was emitted where `0.5rem` -was meant. Spacing, typography, primitives, gradients and themes now report the configuration -path, the unknown key, and the keys the level accepts. The `settings` fields no module reads -are gone from `Primitive` and the gradient variant type. diff --git a/packages/cssforge/CHANGELOG.md b/packages/cssforge/CHANGELOG.md index 4064864..284de48 100644 --- a/packages/cssforge/CHANGELOG.md +++ b/packages/cssforge/CHANGELOG.md @@ -1,5 +1,43 @@ # @hebilicious/cssforge +## 0.9.0 + +### Minor Changes + +- 2561cc8: Generate palette colors in extra sRGB formats alongside `oklch()`, so a browser without + `oklch()` support still renders them and non-CSS consumers read the value they need. + + `settings.color.formats` selects the formats and outputs: `hex` produces `"#ff7f50"`, + `"ff7f50"` and `0xff7f50`, `rgb` produces `"rgb(255 127 80)"` and `[255, 127, 80]`, and a + format set to `true` produces its CSS value only. Each format takes `alpha`: `true` keeps the + color's alpha, a number from 0 to 1 sets it, `false` rejects the color. + + `settings.color.fallback` names the format whose `string` value becomes the declaration for + browsers without `oklch()` support, emitted after the root block inside + `@supports not (color: oklch(0% 0 0))` and mirroring the color's `atRule` and `selector`. + Without it, the first format that produces a CSS value is used, and `false` declares nothing. + + A palette color's settings override the palette's per setting, and its `formats` merge per + format with `false` to remove one. The color settings are a closed schema: unknown keys, a + `formats` that is not an object, and color format settings on a gradient, a theme, or a level + that reads no settings throw with the configuration path. The settings types are exported + from the package entry. + + Tokens gain a `color` object keyed by format and output, plus `gamutMapped: true` when a + format is generated for a color outside sRGB, mirrored by `attributes.color`, `$color` and + `$gamutMapped` in Style Dictionary. `cssforge --color-formats hex,rgb` adds formats for a run. + +### Patch Changes + +- 2561cc8: Reject unknown, misplaced, and wrongly shaped settings in every module, not just in colors. + + A setting no schema accepts generated nothing quietly: a misspelled key was ignored, a + `settings` on a primitive group or a gradient variant did nothing, and a `settings` that was + not an object silently disabled the px-to-rem conversion, so `8px` was emitted where `0.5rem` + was meant. Spacing, typography, primitives, gradients and themes now report the configuration + path, the unknown key, and the keys the level accepts. The `settings` fields no module reads + are gone from `Primitive` and the gradient variant type. + ## 0.8.3 ### Patch Changes diff --git a/packages/cssforge/jsr.json b/packages/cssforge/jsr.json index ffc2aed..8a67019 100644 --- a/packages/cssforge/jsr.json +++ b/packages/cssforge/jsr.json @@ -1,7 +1,7 @@ { "$schema": "https://jsr.io/schema/config-file.v1.json", "name": "@hebilicious/cssforge", - "version": "0.8.3", + "version": "0.9.0", "license": "MIT", "exports": { ".": "./src/mod.ts", diff --git a/packages/cssforge/package.json b/packages/cssforge/package.json index 2d8be16..343ccb4 100644 --- a/packages/cssforge/package.json +++ b/packages/cssforge/package.json @@ -1,6 +1,6 @@ { "name": "@hebilicious/cssforge", - "version": "0.8.3", + "version": "0.9.0", "description": "0 runtime design tokens generator for modern style systems.", "license": "MIT", "type": "module", diff --git a/packages/cssforge/src/version.ts b/packages/cssforge/src/version.ts index d9cf172..32cbbe7 100644 --- a/packages/cssforge/src/version.ts +++ b/packages/cssforge/src/version.ts @@ -3,4 +3,4 @@ * * Generated by `scripts/version.ts` from `package.json`. Do not edit by hand. */ -export const version = "0.8.3"; +export const version = "0.9.0"; diff --git a/packages/unplugin/CHANGELOG.md b/packages/unplugin/CHANGELOG.md index deea78d..163c446 100644 --- a/packages/unplugin/CHANGELOG.md +++ b/packages/unplugin/CHANGELOG.md @@ -1,5 +1,13 @@ # @hebilicious/cssforge-unplugin +## 0.1.1 + +### Patch Changes + +- Updated dependencies [2561cc8] +- Updated dependencies [2561cc8] + - @hebilicious/cssforge@0.9.0 + ## 0.1.0 ### Minor Changes diff --git a/packages/unplugin/package.json b/packages/unplugin/package.json index 4bcf887..e56e1df 100644 --- a/packages/unplugin/package.json +++ b/packages/unplugin/package.json @@ -1,6 +1,6 @@ { "name": "@hebilicious/cssforge-unplugin", - "version": "0.1.0", + "version": "0.1.1", "description": "Bundler plugin that generates CSS Forge design-token output inside the build.", "license": "MIT", "type": "module",