Skip to content

chore(deps): bump @tenphi/glaze to 3.0.1 - #1616

Draft
tenphi wants to merge 5 commits into
mainfrom
andrew/glaze-3-canary
Draft

tenphi wants to merge 5 commits into
mainfrom
andrew/glaze-3-canary

Conversation

@tenphi

@tenphi tenphi commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Moves the palette to Glaze 3: @tenphi/glaze is pinned to 3.0.1, the current stable release. This PR started on the canary 0.0.0-snapshot.f404191 (tenphi/glaze#107) to see how Glaze 3 moves UI Kit colors before 3.0 shipped; it is now rebased on main and on the stable release.

From the canary to 3.0.1

  • 🎨 Colors: no change. I resolved every token in all four schemes under six configs (default, tinted surfaces, non-pastel, tinted + non-pastel, a sky accent, contrast level 60) with both builds: 171 tokens × 24 variants, 0 differences. The swap alone leaves the palette snapshot unchanged, so the measurements below still hold. The one color change since then is the soft accent text fix below.
  • 🔕 Fewer warnings. The canary warned once per shadow token in dark high contrast, where the surface is black (and in the dark pass at contrast level 60). 3.0.1 reports a shadow that falls short only in the normal-contrast pass, or when it falls short in both light and dark, so these warnings are gone. The shadows still resolve to transparent there.
  • 📦 Re-exported API. src/index.ts re-exports @tenphi/glaze, so consumers that import Glaze functions or types from @cube-dev/ui-kit get Glaze 3 as well. The changeset now points them to Glaze's migration guide (input that now throws, removed output options).

What changes

palette.ts works on Glaze 3 with two changes. The shadows are retuned so the light and dark schemes keep their Glaze 2 colors, and the soft accent text keeps the contrast headroom Glaze 2 gave it. I measured every token in all four schemes against 2.0.0, under five configs: default, tinted surfaces, pastel, a sky accent, and contrast level 60.

Shadows

Glaze 3 solves a shadow as an exact tone step over its surface, with a pure black pigment by default. Unchanged, UI Kit's intensities (5 / 10 / 15) nearly doubled the light shadows: shadow-lg darkened the white surface by 22.1 tones instead of 12.3.

Each shadow now carries its own intensity and tuning, fitted to what Glaze 2 drew:

Token intensity (normal, HC) objectInfluence Light step Dark step
shadow-sm 3.95, 4.4 0 3.95 → 3.95 3.94 → 3.95
shadow-md 6.97, 7.73 0.165 8.07 → 8.06 5.96 → 5.96
shadow-lg 9.39, 10.37 0.33 12.34 → 12.33 6.67 → 6.68
  • reach: 0.86 parks the pigment at tone 14, Glaze 2's dark gray, instead of pure black. With the same pigment and step, the light opacities match too: 0.0662 / 0.1321 / 0.1971 → 0.0660 / 0.1315 / 0.1963.
  • objectInfluence sets how much each shadow weakens in dark mode, where surface-text is lighter than the surface. Glaze 2 kept sm at the same depth in both schemes and flattened the larger two, so sm gets none and lg the most. It also keeps dark shadow-lg within reach of the pigment, so Glaze no longer warns about it.
  • Light high contrast matches too, through the HC intensities: 4.40 / 9.01 / 13.79 tones.
  • Dark: the steps match, at a lower opacity (0.497 / 0.844 / 1 → 0.452 / 0.765 / 0.907), since the pigment is slightly darker.
  • Tinted dark surfaces get slightly lighter shadows than in Glaze 2: 4.28 / 6.86 / 8.11 → 3.95 / 5.98 / 6.73 tones.
  • Dark high contrast: the surface is pure black, so no shadow can darken it. All three resolve to transparent; 3.0.1 does not warn about it. In 2.x they were opaque black, which is invisible on the surface but showed wherever a box shadow spills onto something lighter.

Soft accent text

accent-text-soft (selected outline / clear labels and the rest link color) is now floored at 4.6:1 instead of 'AA' against its anchor, accent-selected-fill.

  • Why: Glaze 3 solves it onto the floor exactly, 4.55:1 for the primary hue, where 2.x overshot to 4.60:1 (the migration guide calls out this hue-280 case). The anchor mixes in linear light, so in light mode it reads lighter than the gamma-blended fills Buttons paint. That overshoot was the only headroom the focused clear-selected label had: it fell from above 4.5 to 4.47:1, and Accessibility (axe) (1/3) failed on actions-button--default-states (7 → 8).
  • Effect: only the seven *-accent-text-soft tokens move, by about half a tone (L ±0.006), darker in light and lighter in dark. High contrast is unchanged. The focused clear-selected label is back at 4.55–4.57:1 in every status theme.
  • Not changed: selected outline / outline-2 labels sit on surface-2 / surface-3 + 9% and were already below AA on main (4.36–4.46 and 4.12–4.21). They stay in the baseline, a few hundredths better. Lifting them to AA is a design call, so it's left out of this PR. The two comments that claimed the anchor covered them are corrected.

Everything else

  • Light, normal contrast: 16 values move besides the shadows, by at most 1.0 tone (ΔEOK ≤ 0.0073). The largest are danger-accent-text (+1.0 tone, WCAG 6.71 → 6.51 against danger-surface) and note-accent-text (+0.7). Glaze 3's contrast solver lands closer to each floor than 2.x did, which overshot by a theme-dependent amount.
  • Other schemes: most tokens move by under 1.5 tones. The largest moves are the code syntax colors in light high contrast (code-keyword / code-function +2.9, code-string +2.0) then success-accent-text, code-number and code-attribute in dark (-1.0 to -1.4).
  • No text color crosses a WCAG threshold (3, 4.5 or 7) in any scheme or config. For example, success-accent-text in dark is 7.46 → 7.16 against success-surface.
  • tinted, pastel and accent-sky move the same way as the default. At contrast level 60 the light variants blend toward high contrast and move too, up to 3.1 tones (code-keyword).

Docs links

Glaze 3 reorganized its docs: methodology.md became methodology.mdx, and api.md was split into reference/. AGENTS.md and docs/rules/review.md now point at the new paths, and AGENTS.md adds the shadows page. All of them exist in 3.0.1.

Checks

  • pnpm test:types passes.
  • pnpm test passes. Against the canary, the palette snapshot only moves the seven *-accent-text-soft tokens.
  • pnpm diagnostics:a11y --check passes on all 1086 stories: no story fails more than the baseline allows. The baseline file is unchanged, because local Chromium and fonts differ from CI's and would record layout noise.
  • Oxlint and Prettier pass on the touched files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gr8S7CBr9shZaiq3CeGhD6

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cube-ui-kit Ready Ready Preview Nov 9, 2026 7:05pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dd0721f

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 Minor

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 Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

📦 NPM canary release

Deployed canary version 0.0.0-canary-dbfa06f.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🧪 Storybook is successfully deployed!

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🏋️ Size limit report

Name Size Change
All 640.13 KB +1.54% 🔺
Tree shaking (just a Button) 160.49 KB · 25.1% of All -0.05% 🔽👏

Compared against main at d29a8bf — run 42668868916, 2026-11-09T17:52:42Z.

Third-party packages

✅ No third-party package entered or left the bundle, and none grew more than 10 KB past its approved size.


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

tenphi and others added 4 commits November 9, 2026 18:15
Pin 0.0.0-snapshot.f404191 (tenphi/glaze#107) to see how Glaze 3 moves
the palette. palette.ts works unchanged; only the palette snapshot moves,
mostly the shadows (deeper in light, lighter in dark, transparent in dark
high contrast). Point the Glaze doc links at the reorganized docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glaze 3 solves shadows as exact tone steps with a pure black pigment, so
the old intensities nearly doubled the light shadows. Each shadow now has
its own intensity pair and tuning (reach 0.86, objectInfluence 0 / 0.165 /
0.33), fitted to the light, light high-contrast and dark steps of 2.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Glaze 3 is released. 3.0.1 resolves every palette token exactly as the
canary did, in all four schemes, so the shadow tuning and the palette
snapshot stand. It also stops warning about the dark high-contrast
shadows it cannot draw. The changeset now names the release and notes
that the re-exported Glaze API moves to 3.0 too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gr8S7CBr9shZaiq3CeGhD6
@tenphi
tenphi force-pushed the andrew/glaze-3-canary branch from 2ede26a to a54d38c Compare November 9, 2026 18:26
@tenphi tenphi changed the title chore(deps): bump @tenphi/glaze to the 3.0 canary chore(deps): bump @tenphi/glaze to 3.0.1 Nov 9, 2026

tenphi commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Tests & lint failed on a54d38c, but not because of this change.

In run 42674020710, 6 jobs never got a runner and have no result: Source tests (3/3), Lint, types & diagnostics, the three remaining Browser tests shards, and Accessibility (axe) (1/3). GitHub reports them to the gate as abandoned, and check-required-jobs.cjs accepts only success, so the gate failed (tests: expected success, got abandoned). All 10 jobs that did run passed, and the full suite passes locally on this tree (212 files, 5526 tests).

I re-ran the whole workflow once, since a failed-jobs-only re-run could skip the jobs that never started. If the re-run fails again, I'll treat it as a real failure.


Generated by Claude Code

Glaze 3 solves `accent-text-soft` exactly onto its AA floor (4.55:1 for
the primary hue, where 2.x overshot to 4.60:1). Its anchor,
`accent-selected-fill`, mixes in linear light and so reads lighter in
light mode than the gamma-blended fills Buttons paint. That overshoot
was the only headroom the focused clear-selected label had, and it fell
to 4.47:1, failing the accessibility baseline.

Floor the soft text at 4.6:1 instead. Only the seven
`*-accent-text-soft` tokens move, by about half a tone, with high
contrast unchanged. Correct the two comments that claimed the anchor
matched the painted fill and covered outline / outline-2: those stay
below AA, as on Glaze 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gr8S7CBr9shZaiq3CeGhD6

This branch was successfully deployed

2 active deployments
Preview — dd0721f7 Deployed Nov 9, 2026 by vercel[bot]
Chromatic staging — dd0721f7 Deployed Nov 9, 2026 by tenphi via Prepare Storybook for review & tests #4337
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.

2 participants