Skip to content

chore(deps): update @tenphi/tasty to 3.1.0 - #1341

Merged
tenphi merged 6 commits into
mainfrom
chore/tasty-color-mix-alpha
Aug 21, 2026
Merged

chore(deps): update @tenphi/tasty to 3.1.0#1341
tenphi merged 6 commits into
mainfrom
chore/tasty-color-mix-alpha

Conversation

@tenphi

@tenphi tenphi commented Aug 21, 2026

Copy link
Copy Markdown
Member

Updates @tenphi/tasty to the released 3.1.0 (was pinned to a snapshot while tenphi/tasty#268 was in review) and merges main.

What changes upstream

3.1.0 carries two colour changes, #266 and #268:

Colour-token opacity is applied with CSS relative colour syntax instead of the token's channel components:

#surface-text.04
  before  rgb(var(--surface-text-color-rgb) / .04)
  after   oklch(from var(--surface-text-color) l c h / .04)

The channels are copied and the alpha slot is written, so the colour is identical and the alpha is replaced rather than composed. Because the outer function is oklch(), the computed value keeps the shape it had before. It no longer needs the token decomposed into channels first, which is what makes a color-mix()/light-dark() token — or a --x-color declared in plain CSS — fade correctly instead of falling back to an @property initial value.

Modern colour functionslight-dark() and contrast-color() join color-mix(), color-contrast() and color() as recognised colours, so a call lands in the colour slot of whichever style property uses it.

What this touches here

Every #token.N value in the kit re-serialises: #surface-text.04, #purple.10, the #row-overlay state map in TableBase, and so on. Chromatic reported 1057 tests unchanged on the snapshot this release was cut from — the colours really are identical.

Two things deliberately did not change, both of which this kit depends on:

  • #current.N still composes with the alpha it inherits. The current ramp is authored against that — CURRENT_OUTLINE_STYLES notes that .18 "renders as ~.07" because the disabled label already dimmed currentcolor to .4. An earlier snapshot had unified #current onto replacement, and Chromatic on this PR caught it: disabled+selected buttons rendered 2.5× more opaque. Fixed upstream before release.
  • --*-color-rgb companions are still generated with numeric components, so the raw CSS in GlobalStyles.tsx that reads one directly — rgb(var(--primary-color-rgb) / .2) — keeps working. Verified resolving to 109 113 176 via pnpm probe globals.

One test changed

row-state-matrix.test.tsx asserted /--row-overlay-color:\s*rgb\(/ on the selected & hovered compound rule. That pinned the old alpha syntax as a proxy for what the test actually guards — per its own comment, that the compound rule doesn't vanish into the state-map merge. Rewritten to match the token it derives from:

expect(compound!.body).toMatch(
  /--row-overlay-color:[^;]*var\(--surface-text-color\)/,
);

Nothing else in 2094 unit tests or 123 browser tests needed touching.

Both size budgets move

Neither is this branch's own growth. Measured with main merged and the kit's source held constant:

entry tasty 3.0.2 tasty 3.1.0 limit
All 509.55 kB 509.94 kB 510 → 515 kB
Tree shaking (just a Button) 123.63 kB 124.03 kB 124 → 125 kB

Matching +0.4 kB deltas on both entries, which per .size-limit.cjs's own diagnostic is what a change inside Tasty's always-included core looks like. All had only 450 B of headroom on main before this, so any dependency bump was going to trip it; it is rounded to the next 5 kB step per the convention in that file. The Button entry goes to 125 kB, which its own note asks for once a change needs more than its 330 B. Both raises are recorded in the file with the measurements.

The cost is real and worth stating plainly: ~0.4 kB gzipped reaches every consumer who imports anything, because it is in the parser and style handlers. There is nothing to tree-shake.

Verified locally

  • pnpm test — 2093 pass, 1 skipped (97 files)
  • pnpm test:browser — 123 pass (10 files)
  • pnpm lint — clean (only the pre-existing consistent-token-usage / maskSize warnings)
  • pnpm size — 509.94/515 kB and 124.03/125 kB, both measured after a fresh pnpm build
  • npx tsc --noEmit — pre-existing NodeListOf iteration errors in src/test/probe/ only, unchanged from main and not part of CI

🤖 Generated with Claude Code

Points at 0.0.0-snapshot.5776c4c to run CI and Chromatic against the change
before it releases. Colour-token opacity is now applied with `color-mix()`
rather than the token's channel components, so every `#token.N` value emits
`color-mix(in oklab, var(--x-color) N%, transparent)`.

The colours are identical — mixing premultiplied against `transparent` leaves
the channels alone — and the `--*-color-rgb` companions are untouched, so the
raw CSS in GlobalStyles that reads them directly still works.

One test pinned the old alpha syntax as a proxy for "the compound rule survived
the merge". Rewritten to match the token it derives from instead, which is what
it was actually guarding.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview Aug 21, 2026 1:59pm

Request Review

@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d58ca86

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-9dc6bba.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Passed?
All 497.99 KB (+0.08% 🔺) Yes 🎉
Tree shaking (just a Button) 121.12 KB (+0.32% 🔺) Yes 🎉

Compared against main at 947bd47run 32488249408, 2026-08-21T13:42:30Z.

To see which modules changed, download the size-limit-statoscope-report artifact from this run and open report.html.

Re-points at 0.0.0-snapshot.5a79c6d. Review of the upstream PR replaced
`color-mix()` with relative colour syntax: mixing against `transparent`
composed alpha instead of replacing it, and broke a percentage-valued opacity
variable. `#token.N` now emits `oklch(from var(--x-color) l c h / .N)`, which
also restores the previous computed-value shape.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tenphi tenphi changed the title chore(deps): tasty snapshot with color-mix() token opacity chore(deps): tasty snapshot with relative-syntax token opacity Aug 21, 2026
Re-points at 0.0.0-snapshot.73ab317. Chromatic on the previous snapshot caught
disabled+selected buttons on the `current` theme rendering 2.5x more opaque: the
upstream change had moved `#current.N` from composing its inherited alpha to
replacing it, and this kit's `current` ramp is authored against the composition
(`CURRENT_OUTLINE_STYLES` notes ".18 renders as ~.07").

`#current` is back to `color-mix()`, unchanged from 3.0.2. The generated CSS now
differs from baseline only in the form of the token fades — same colour, same
alpha.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
124.03 kB in CI, 26 bytes over the 124 kB entry, and all of it the dependency:
both sides rebuilt here read 123.63 kB on tasty 3.0.2 and 124.03 kB on the
snapshot, +0.40 kB, with `All` moving by the same 0.40 kB — the signature of a
change inside Tasty's always-included core, as the 3.0.1 -> 3.0.2 note in the
same entry describes.

Raised to 125 kB rather than shaved, which is what that entry's own note asks
for once a change needs more than its 330 B of headroom. `All` is left at
510 kB; it still passes at 509.37 kB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tenphi and others added 2 commits August 21, 2026 15:49
Replaces the snapshot pin now that the release is out, and merges main.

3.1.0 carries both colour changes: `light-dark()`/`contrast-color()` treated as
colours, and colour-token opacity applied with relative colour syntax
(`oklch(from var(--x-color) l c h / .N)`) rather than the channel components.
`#current.N` still composes with the alpha it inherits, so the `current` ramp is
untouched, and the `--*-color-rgb` companions still hold numeric components for
the raw CSS in GlobalStyles that reads them.

Both size budgets move, and neither is this branch's own growth. Measured with
main merged and the kit's source held constant, tasty is +0.39 kB on `All`
(509.55 -> 509.94 kB) and +0.40 kB on the Button entry (123.63 -> 124.03 kB) —
matching deltas, i.e. a change inside Tasty's always-included core. `All` had
only 450 B of headroom on main before this, so 510 -> 515 kB; the Button entry
goes 124 -> 125 kB, which its own note asks for rather than shaving something
real.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@tenphi tenphi changed the title chore(deps): tasty snapshot with relative-syntax token opacity chore(deps): update @tenphi/tasty to 3.1.0 Aug 21, 2026
@tenphi
tenphi merged commit 7a4b677 into main Aug 21, 2026
16 checks passed
@tenphi
tenphi deleted the chore/tasty-color-mix-alpha branch August 21, 2026 14:06
@tenphi tenphi mentioned this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant