Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .changeset/oklch-color-fallback.md

This file was deleted.

12 changes: 0 additions & 12 deletions .changeset/settings-validation.md

This file was deleted.

38 changes: 38 additions & 0 deletions packages/cssforge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/cssforge/jsr.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/cssforge/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/cssforge/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
8 changes: 8 additions & 0 deletions packages/unplugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/unplugin/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down