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
5 changes: 5 additions & 0 deletions .changeset/tasty-relative-alpha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cube-dev/ui-kit': patch
---

Update Tasty to 3.1.0. Colour-token opacity is now applied with CSS relative colour syntax instead of the token's channel components, so every `#token.N` value — `#surface-text.04`, `#purple.10` and the rest — emits `oklch(from var(--surface-text-color) l c h / .04)`. The colours are unchanged, `#current.N` still composes with the alpha it inherits, and the `--*-color-rgb` companion variables are untouched, so raw CSS that reads them directly (`rgb(var(--primary-color-rgb) / .2)` in `GlobalStyles`) keeps working. Tasty also now treats `light-dark()` and `contrast-color()` as colours, alongside `color-mix()` and `color()`.
31 changes: 27 additions & 4 deletions .size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ module.exports = [
}),
);
},
// 510 kB, raised from 505 kB for ItemTable/DataTable tree rows. The shared
// 515 kB. 509.94 kB locally with `@tenphi/tasty` 3.1.0, against 509.55 kB
// for the same code on 3.0.2 — +0.39 kB for the colour-function work, and
// the Button entry below moved by the same amount, which is what a change
// inside Tasty's always-included core looks like.
//
// The old 510 kB was not this branch's to spend: `main` had already reached
// 509.55 kB on its own, 450 B under, so any dependency bump was going to
// trip it. Rounded to the next 5 kB step rather than fitted to the reading,
// per the note further down about the local figure running low.
//
// Before this: 510 kB, raised from 505 kB for ItemTable/DataTable tree rows. The shared
// immutable hierarchy model, recursive operations, React Aria treegrid
// wiring, cascading selection and disclosure renderer add 2.97 kB locally
// (507.97 kB total). The Button-only budget below is unchanged, confirming
Expand Down Expand Up @@ -118,14 +128,27 @@ module.exports = [
//
// Note when checking locally: `size-limit` bundles the built `./dist`, it
// does not build. Run `pnpm build` first or you will measure a stale bundle.
limit: '510kB',
limit: '515kB',
},
{
name: 'Tree shaking (just a Button)',
path: './dist/index.js',
webpack: true,
import: '{ Button }',
// 123.67 kB at the time of writing, against `main`'s 123.32 kB with both
// 124.03 kB in CI (124,026 B, 26 bytes over the previous 124 kB), and all of
// it the dependency again — `@tenphi/tasty` 3.0.2 -> the colour-function
// work. Both sides rebuilt here read 123.63 kB on 3.0.2 and 124.03 kB on the
// snapshot, +0.40 kB, and `All` moved by the same 0.40 kB (508.98 ->
// 509.38 kB). Matching deltas on both entries is what a change inside
// Tasty's always-included core looks like, exactly as the 3.0.1 -> 3.0.2
// note below describes. The kit's own source is unchanged.
//
// Raised to 125 kB rather than shaved, as the note below asks for: the
// previous entry left 330 B and this needs 400 B. Nothing here is padding —
// it is `light-dark()`/`contrast-color()` support and the relative-colour
// opacity path, all in the parser and style handlers every consumer loads.
//
// Before this: 123.67 kB, against `main`'s 123.32 kB with both
// sides rebuilt on the same machine: +0.35 kB for the `current` theme. This
// is the one entry the theme legitimately moves, and it is worth being clear
// about why, because the comments above use this budget staying flat as the
Expand Down Expand Up @@ -155,6 +178,6 @@ module.exports = [
// (directional syntax, handler displacement, chunk conflicts) ship in every
// bundle, because `isDevEnv()` is evaluated at runtime so one build serves
// dev and production. Headroom stays small so real bloat still trips.
limit: '124kB',
limit: '125kB',
},
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@tabler/icons-react": "^3.31.0",
"@tanstack/react-virtual": "^3.13.12",
"@tenphi/glaze": "2.0.0",
"@tenphi/tasty": "^3.0.2",
"@tenphi/tasty": "^3.1.0",
"clipboard-copy": "^4.0.1",
"clsx": "^1.1.1",
"diff": "^8.0.3",
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/components/data/TableBase/row-state-matrix.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ describe('row state matrix', () => {
// This is the rule that disappears when the merge fires: it sits between
// `hovered` and the top of the group.
expect(compound).toBeDefined();
expect(compound!.body).toMatch(/--row-overlay-color:\s*rgb\(/);
// Matched on the token it derives from, not on how the opacity is applied:
// Tasty fades a colour token with `color-mix()`, and that form is its
// business to change.
expect(compound!.body).toMatch(
/--row-overlay-color:[^;]*var\(--surface-text-color\)/,
);
});

it('keeps `dimmed` out of the fill maps entirely', () => {
Expand Down
Loading