From 3963c0516def50179fe0f2af38780fb50dcc4d5e Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 31 Oct 2026 02:03:48 +0000 Subject: [PATCH] fix: remove the color tokens added by mistake in 0.4.0 Color tokens match v0.2.0 again. Consumers should use *.subtle. The required-field asterisk stays color danger. Co-authored-by: ROBJkE --- .agents/skills/panda-v2-migration/SKILL.md | 6 ++-- CHANGELOG.md | 26 ++++++--------- bun.lock | 8 ++--- package.json | 2 +- packages/components/package.json | 4 +-- packages/nuxt/package.json | 2 +- packages/nuxt/test/preset-tokens.test.ts | 26 ++++++--------- packages/preset/package.json | 2 +- packages/preset/src/tokens/semantic-tokens.ts | 32 ++----------------- 9 files changed, 33 insertions(+), 75 deletions(-) diff --git a/.agents/skills/panda-v2-migration/SKILL.md b/.agents/skills/panda-v2-migration/SKILL.md index 2d6a2da..8774b5c 100644 --- a/.agents/skills/panda-v2-migration/SKILL.md +++ b/.agents/skills/panda-v2-migration/SKILL.md @@ -80,16 +80,16 @@ v2 keeps `css()`, recipes, tokens, conditions, and JSX props. It rewrites the co | Vue entry CSS imports | `styled-system/css` (bundled or aliased) | published JS imports `@fyrst/ui/css` so stale-buildinfo fallback can re-extract | | Inline `style=` | Card/Loader/Progress/FormPrompt used CSS variables on `style=` | variants are classes; SSR HTML has no `style=` from those components | -### 0.4.0 (consumer patches) — additive on 0.3.x +### 0.4.x (consumer patches) — additive on 0.3.x -| Area | 0.3.x | 0.4.0 | +| Area | 0.3.x | 0.4.x | | --- | --- | --- | | `@pandacss/preset-base` | peer; `designSystem` apps still installed it so Panda could resolve the string from the app | dependency of `@fyrst/ui`; inlined into `dist/panda/preset.mjs`. Do not add it on a `designSystem` app | | `Button` | `size` `sm` \| `md` \| `lg` only; no `font-family` | `fullWidth` boolean (default `false`); `fontFamily: 'inherit'` | | Fields | input / textarea / select trigger used the user-agent font when preflight was off | `fontFamily: 'inherit'` on those controls. Field URL already had `font: inherit` | | `AlertRoot` | `#icon` only replaces the default icon | `hideIcon` omits the icon and its gap | | Fonts | no `fonts.sans` / `serif` / `mono` on this preset | Figtree sans stack, system serif and mono, semantic `fonts.body`. Load the face in the app (root README). The package does not ship font files | -| `*.lucid.700`, `*.lucid.900`, `brand.pale.lucid` | absent (dropped when `*.subtle` was added, still absent in 0.3.0) | restored with the previous values. `*.subtle` remains the muted fill. `primary.subtle` / `primary.subtle.light` / `primary.text` added | +| Status washes | `danger` / `success` / `warning` / `info` use `*.subtle`. `primary` is a single color | unchanged in 0.4.1. 0.4.0 added `*.lucid.700`, `*.lucid.900`, `brand.pale.lucid`, `primary.subtle`, `primary.subtle.light`, and `primary.text` by mistake; 0.4.1 removes them. Use `*.subtle` | | Required asterisk | `danger.subtle` (grey wash in dark mode) | `danger` again | No props were removed. `fullWidth` and `hideIcon` default to `false`. diff --git a/CHANGELOG.md b/CHANGELOG.md index c95c36d..0b1df30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.1] - 2026-10-31 + +Patch on 0.4.0. Font tokens, `font-family: inherit`, `Button` `fullWidth`, `AlertRoot` `hideIcon`, the required-field asterisk (`color: 'danger'`), and the inlined `@pandacss/preset-base` dependency are unchanged. + +### Removed + +- Color tokens added in 0.4.0 by mistake: `brand.pale.lucid`, `primary.subtle`, `primary.subtle.light`, `primary.text`, and `primary` / `danger` / `success` / `warning` / `info` `.lucid.700` and `.lucid.900`. Color tokens match v0.2.0 again. Consumers should use `*.subtle`. + ## [0.4.0] - 2026-10-30 Additive release for apps already on 0.3.0 (`designSystem: '@fyrst/ui'`, Panda 2.4). No prop was removed or renamed. @@ -25,21 +33,6 @@ Additive release for apps already on 0.3.0 (`designSystem: '@fyrst/ui'`, Panda 2 - The required-field asterisk uses `color: 'danger'` again (solid red). It had been switched to `danger.subtle`, which reads as a grey wash in dark mode. - `@pandacss/preset-base` is a dependency of `@fyrst/ui`, and the published design-system preset inlines that module. Apps on `designSystem: '@fyrst/ui'` no longer add `@pandacss/preset-base` themselves. `@pandacss/dev` stays a peer. [Publishing](https://panda-css.com/docs/design-systems/publishing) keeps Panda itself as a peer; a string preset name is resolved from the app, so the library passes the module through `panda lib` instead. -### Token mapping - -If a local patch recreated the old washes, you can drop it and use the restored tokens, or move to the muted mixes: - -| Previous token | Restored in 0.4.0 | Preferred muted fill | -| --- | --- | --- | -| `brand.pale.lucid` | `brand.pale.lucid` (`brand.100` at 25%) | — | -| `primary.lucid.700` / `.900` | same paths | `primary.subtle` | -| `danger.lucid.700` / `.900` | same paths | `danger.subtle` | -| `success.lucid.700` / `.900` | same paths | `success.subtle` | -| `warning.lucid.700` / `.900` | same paths | `warning.subtle` | -| `info.lucid.700` / `.900` | same paths | `info.subtle` | - -`*.lucid.700` is a 25% wash in dark mode and 40% in light mode. `*.lucid.900` is 10% / 25%. `*.subtle` is a grey mix, not the same wash. - ## [0.3.0] - 2026-10-30 Official Panda 2 **library** consumption (`panda lib` / `designSystem`) plus CSP-safe SSR. This is a **breaking** upgrade from 0.2.0 for consuming apps. Follow [`.agents/skills/panda-v2-migration/SKILL.md`](.agents/skills/panda-v2-migration/SKILL.md) and the official [Build a design system](https://panda-css.com/docs/design-systems/build-a-design-system) guide. @@ -93,7 +86,8 @@ Public export names are unchanged: `preset`, `breakpoints`, `@fyrst/ui/design-pr - Initial `@fyrst/ui` design system: Panda CSS preset, Vue 3 components, and Nuxt module. -[unreleased]: https://github.com/fyrst-dev/ui/compare/v0.4.0...HEAD +[unreleased]: https://github.com/fyrst-dev/ui/compare/v0.4.1...HEAD +[0.4.1]: https://github.com/fyrst-dev/ui/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/fyrst-dev/ui/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/fyrst-dev/ui/compare/v0.2.0...v0.3.0 [0.2.0]: https://github.com/fyrst-dev/ui/compare/v0.1.0...v0.2.0 diff --git a/bun.lock b/bun.lock index 2863a58..c1d4abb 100644 --- a/bun.lock +++ b/bun.lock @@ -47,7 +47,7 @@ }, "packages/components": { "name": "@fyrst/ui-components", - "version": "0.4.0", + "version": "0.4.1", "devDependencies": { "@fyrst/design-preset": "workspace:*", "@iconify/json": "^2.2.548", @@ -62,7 +62,7 @@ "vitest": "^5.0.5", }, "peerDependencies": { - "@fyrst/design-preset": "^0.4.0", + "@fyrst/design-preset": "^0.4.1", "@pandacss/dev": "^2.4.0", "@pandacss/preset-base": "^2.4.0", "reka-ui": "^2.10.3", @@ -71,7 +71,7 @@ }, "packages/nuxt": { "name": "@fyrst/ui-nuxt", - "version": "0.4.0", + "version": "0.4.1", "dependencies": { "@nuxt/kit": "^4.6.3", }, @@ -84,7 +84,7 @@ }, "packages/preset": { "name": "@fyrst/design-preset", - "version": "0.4.0", + "version": "0.4.1", "devDependencies": { "@pandacss/dev": "^2.4.0", "@pandacss/preset-base": "^2.4.0", diff --git a/package.json b/package.json index bbfb6be..aac1e50 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fyrst/ui", - "version": "0.4.0", + "version": "0.4.1", "description": "fyrst.dev design system: Panda CSS preset, Vue components, and Nuxt module", "license": "MIT", "author": "fyrst.dev", diff --git a/packages/components/package.json b/packages/components/package.json index bd6e09c..a85b930 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@fyrst/ui-components", - "version": "0.4.0", + "version": "0.4.1", "private": true, "description": "Vue 3 UI components for the fyrst.dev design system", "license": "MIT", @@ -67,7 +67,7 @@ }, "peerDependencies": { "vue": "^3.5.41", - "@fyrst/design-preset": "^0.4.0", + "@fyrst/design-preset": "^0.4.1", "@pandacss/dev": "^2.4.0", "@pandacss/preset-base": "^2.4.0", "reka-ui": "^2.10.3" diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 49a0b10..c721108 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,6 +1,6 @@ { "name": "@fyrst/ui-nuxt", - "version": "0.4.0", + "version": "0.4.1", "private": true, "description": "Nuxt module for the fyrst.dev Vue UI components", "license": "MIT", diff --git a/packages/nuxt/test/preset-tokens.test.ts b/packages/nuxt/test/preset-tokens.test.ts index 564ee6d..ab4ef41 100644 --- a/packages/nuxt/test/preset-tokens.test.ts +++ b/packages/nuxt/test/preset-tokens.test.ts @@ -17,27 +17,19 @@ describe('preset tokens', () => { expect(semanticFonts.body?.value).toBe('{fonts.sans}') }) - it('keeps status lucid steps, brand.pale.lucid, and primary.subtle', () => { - expect(colors.brand.pale).toMatchObject({ - DEFAULT: { value: '{colors.brand.100}' }, - lucid: { value: '{colors.brand.100/25}' }, - }) - expect(colors.primary).toMatchObject({ - subtle: { - DEFAULT: { value: expect.objectContaining({ base: expect.stringContaining('brand.100') }) }, - }, - lucid: { - 700: { value: { base: '{colors.brand.pale/25}', _light: '{colors.brand.pale/40}' } }, - 900: { value: { base: '{colors.brand.pale/10}', _light: '{colors.brand.pale/25}' } }, - }, + it('matches the v0.2.0 color tokens', () => { + expect(colors.brand.pale).toEqual({ value: '{colors.brand.100}' }) + expect(colors.primary).toEqual({ + value: { base: '{colors.brand.pale}', _light: '{colors.brand.day}' }, }) + expect(colors.primary).not.toHaveProperty('subtle') + expect(colors.primary).not.toHaveProperty('text') + expect(colors.primary).not.toHaveProperty('lucid') for (const name of ['danger', 'success', 'warning', 'info'] as const) { - expect(colors[name].lucid).toMatchObject({ - 700: { value: expect.objectContaining({ base: expect.any(String), _light: expect.any(String) }) }, - 900: { value: expect.objectContaining({ base: expect.any(String), _light: expect.any(String) }) }, - }) expect(colors[name].subtle).toBeTruthy() + expect(colors[name].text).toBeTruthy() + expect(colors[name]).not.toHaveProperty('lucid') } }) }) diff --git a/packages/preset/package.json b/packages/preset/package.json index da8b758..169f2aa 100644 --- a/packages/preset/package.json +++ b/packages/preset/package.json @@ -1,6 +1,6 @@ { "name": "@fyrst/design-preset", - "version": "0.4.0", + "version": "0.4.1", "private": true, "description": "Panda CSS preset with fyrst.dev design tokens", "license": "MIT", diff --git a/packages/preset/src/tokens/semantic-tokens.ts b/packages/preset/src/tokens/semantic-tokens.ts index 136c057..3b06067 100644 --- a/packages/preset/src/tokens/semantic-tokens.ts +++ b/packages/preset/src/tokens/semantic-tokens.ts @@ -34,10 +34,7 @@ export const fonts = defineSemanticTokens.fonts({ export const colors = defineSemanticTokens.colors({ brand: { - pale: { - DEFAULT: { value: '{colors.brand.100}' }, - lucid: { value: '{colors.brand.100/25}' }, - }, + pale: { value: '{colors.brand.100}' }, day: { value: '{colors.brand.300}' }, brand: { value: '{colors.brand.400}' }, dawn: { value: '{colors.brand.600}' }, @@ -50,16 +47,7 @@ export const colors = defineSemanticTokens.colors({ black: { value: '{colors.grey.950}' }, }, primary: { - DEFAULT: { value: { base: '{colors.brand.pale}', _light: '{colors.brand.day}' } }, - subtle: { - DEFAULT: subtleMix('brand.100', 'brand.300'), - light: subtleMix('brand.100', 'brand.100', '{opacity.color.status.lighter}', '{opacity.color.neutral.lighter}'), - }, - text: { value: { base: '{colors.brand.600}' } }, - lucid: { - 700: { value: { base: '{colors.brand.pale/25}', _light: '{colors.brand.pale/40}' } }, - 900: { value: { base: '{colors.brand.pale/10}', _light: '{colors.brand.pale/25}' } }, - }, + value: { base: '{colors.brand.pale}', _light: '{colors.brand.day}' }, }, danger: { DEFAULT: { value: { base: '{colors.red.400}', _light: '{colors.red.600}' } }, @@ -68,10 +56,6 @@ export const colors = defineSemanticTokens.colors({ light: subtleMix('red.200', 'red.400', '{opacity.color.status.lighter}', '{opacity.color.neutral.lighter}'), }, text: { value: { base: '{colors.red.900}' } }, - lucid: { - 700: { value: { base: '{colors.red.400/25}', _light: '{colors.red.600/40}' } }, - 900: { value: { base: '{colors.red.400/10}', _light: '{colors.red.600/25}' } }, - }, }, success: { DEFAULT: { value: { base: '{colors.green.400}', _light: '{colors.green.600}' } }, @@ -80,10 +64,6 @@ export const colors = defineSemanticTokens.colors({ light: subtleMix('green.200', 'green.400', '{opacity.color.status.lighter}', '{opacity.color.neutral.lighter}'), }, text: { value: { base: '{colors.green.900}' } }, - lucid: { - 700: { value: { base: '{colors.green.400/25}', _light: '{colors.green.600/40}' } }, - 900: { value: { base: '{colors.green.400/10}', _light: '{colors.green.600/25}' } }, - }, }, warning: { DEFAULT: { value: { base: '{colors.yellow.400}', _light: '{colors.yellow.600}' } }, @@ -92,10 +72,6 @@ export const colors = defineSemanticTokens.colors({ light: subtleMix('yellow.200', 'yellow.400', '{opacity.color.status.lighter}', '{opacity.color.neutral.lighter}'), }, text: { value: { base: '{colors.yellow.900}' } }, - lucid: { - 700: { value: { base: '{colors.yellow.400/25}', _light: '{colors.yellow.600/40}' } }, - 900: { value: { base: '{colors.yellow.400/10}', _light: '{colors.yellow.600/25}' } }, - }, }, info: { DEFAULT: { value: { base: '{colors.blue.400}', _light: '{colors.blue.600}' } }, @@ -104,10 +80,6 @@ export const colors = defineSemanticTokens.colors({ light: subtleMix('blue.200', 'blue.400', '{opacity.color.status.lighter}', '{opacity.color.neutral.lighter}'), }, text: { value: { base: '{colors.blue.900}' } }, - lucid: { - 700: { value: { base: '{colors.blue.400/25}', _light: '{colors.blue.600/40}' } }, - 900: { value: { base: '{colors.blue.400/10}', _light: '{colors.blue.600/25}' } }, - }, }, neutral: { DEFAULT: { value: { base: '{colors.white}', _light: '{colors.grey.night}' } },