feat: glaze 1.2.0 + lightness→tone palette migration - #1267
Merged
Conversation
Splits the non-pastel half of the redesign branch (#1229) out so the Glaze upgrade and the fixes riding on it can land without waiting on the postponed visual redesign. Glaze 0.13.0 -> 1.2.0. Glaze 1.x removed `lightness` as a color-def input, so the upgrade and the axis migration are inseparable: all 54 palette declarations are re-authored against the contrast-shaped `tone` axis. This DOES change resolved colors — `tone` is contrast-shaped, not lightness-shaped, so tokens do not land on their previous values. Measured per-channel RGB delta vs main across every token in all four scheme variants: core surfaces/text mean ~13 (max 51), accent mean ~13 (max 48). Seed hue and saturation are unchanged, so hue relationships and relative ramps are preserved; the shift is in tone placement. Deliberately EXCLUDED (stays in #1229, the visual redesign): the pastel migration — `{ pastel: true }` on both theme seeds and `SEED_SATURATION` 80 -> 100. Worth recording why, because it is counter-intuitive: dropping `pastel` while keeping seed 100 moves accents FURTHER from main (mean 43.7) than keeping pastel does (31.0), because the tone values were authored against pastel's hue-independent chroma boundary. Reverting the seed to 80 alongside is what brings the delta down to ~13. Also included, all previously blocked on the Glaze upgrade or independent of it: - `accent-disabled-surface-text` authored as `tone: 'max'` (was `lightness: '+1'` + `contrast: 1.51`) — only viable from Glaze 1.2.0. - item-themes: selected labels move to the soft accent text token and intensify on hover. - Lazy Glaze token resolution (`getPaletteTokens()` / `lazyStyles`). - `s2`/`s3`/`s4` monospace typography presets; PrismCode HTML support; CopySnippet + use-action fixes; new Colors stories/docs. Size budget raised 445kB -> 460kB (bundle is 451.31 kB). Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit passes.
🦋 Changeset detectedLatest commit: 9c260e1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 NPM canary releaseDeployed canary version 0.0.0-canary-c64b528. |
Contributor
🧪 Storybook is successfully deployed!
|
Contributor
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
Both from review on #1267, both verified against main before fixing. #pink — the legacy alias was dropped from LEGACY_ALIASES while `tasty.config.ts`, `Usage.docs.mdx`, the `colors.ts` header and the `pink` key in `tasty-augment.d.ts` all still advertised it. Confirmed absent from the built dist, so consumer styles using it would silently stop resolving with types still reporting it valid. Restored as the same scheme-static literal. (`pink-01` / `pink-02` are declared in the augmentation but were never defined on main either — pre-existing, left alone.) CopySnippet serif — moving the code element onto the `s3` / `t3` presets lost the font family. `s3` carries `fontFamily: var(--font-mono)` but `t3` sets no family at all, so the `serif` variant inherited the `<code>` element's UA monospace default and rendered monospace, contradicting the `serif` prop's documented behaviour. Main expressed this as `font: { '': 'monospace', serif: true }`; that map is restored alongside the presets, which keep the size/line-height parity. Verified: build clean, 997 tests pass, oxlint + prettier clean; `#pink` and the serif font map both present in the built output.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8aff65c. Configure here.
Merged
tenphi
added a commit
that referenced
this pull request
Jul 30, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has landed (#1267, #1268, released as 0.150.0). The branch's previous 22 commits were the OKHST/tone migration plus the fixes riding on it — all of which are now IN main via #1267. Replaying them would have meant resolving `palette.ts` against itself 15 times for a known 5-line end state, so the branch is reconstructed on main instead of rebased commit-by-commit. Verified the result: the tree differs from the old branch tip only where main moved ahead (`#pink`, the CopySnippet serif font map), and both of those survive. What remains — the actual redesign: - `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special theme seeds. The two are coupled: raising the seed without pastel over-saturates, enabling pastel without raising it washes the palette out. Plus two component changes that were on the branch and are unrelated to colour: - `DialogTrigger`: `mobileType` now falls back to `'modal'` for `'popover'` rather than reusing `type`, so a popover gets a sheet on mobile. - `FilterPicker`: drop `isDismissable={false}` so the picker closes on outside press like the other overlays. This IS a visual change and every token moves. Per-channel RGB delta vs main, all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk, which is the intent — that is where the per-hue chroma inconsistency showed. Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit passes (451.35 kB / 460 kB).
tenphi
added a commit
that referenced
this pull request
Jul 30, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has landed (#1267, #1268, released as 0.150.0). The branch's previous 22 commits were the OKHST/tone migration plus the fixes riding on it — all now IN main via #1267. Replaying them would have meant resolving `palette.ts` against itself 15 times for a 3-line end state, so the branch is reconstructed on main rather than rebased commit-by-commit. The whole change is now: - `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special theme seeds. The two are coupled: raising the seed without pastel over-saturates, enabling pastel without raising it washes the palette out. This IS a visual change and every token moves. Per-channel RGB delta vs main, all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk, which is the intent — that is where the per-hue chroma inconsistency showed. Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit passes (451.35 kB / 460 kB).
tenphi
added a commit
that referenced
this pull request
Jul 31, 2026
Rebuilds the redesign branch on top of main now that the non-visual half has landed (#1267, #1268, released as 0.150.0). The branch's previous 22 commits were the OKHST/tone migration plus the fixes riding on it — all now IN main via #1267. Replaying them would have meant resolving `palette.ts` against itself 15 times for a 3-line end state, so the branch is reconstructed on main rather than rebased commit-by-commit. The whole change is now: - `SEED_SATURATION` 80 -> 100 with `{ pastel: true }` on the default and special theme seeds. The two are coupled: raising the seed without pastel over-saturates, enabling pastel without raising it washes the palette out. This IS a visual change and every token moves. Per-channel RGB delta vs main, all 156 tokens x 4 scheme variants: core surfaces/text mean ~5 (max 43), accent mean ~28 (max 60), accent-disabled mean ~8 (max 17). Accent carries the bulk, which is the intent — that is where the per-hue chroma inconsistency showed. Verified: build clean, 997 tests pass, oxlint + prettier clean, size-limit passes (451.35 kB / 460 kB).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Splits the non-pastel half of #1229 out, so the Glaze upgrade and the fixes riding on it can land without waiting on the postponed visual redesign.
Why the upgrade and the migration are one change
Glaze 1.x removed
lightnessas a color-def input.RegularColorDefnow exposestone, notlightness, so bumping Glaze forces all 54 palette declarations to be re-authored against the contrast-shapedtoneaxis. There is no way to take the upgrade without the migration.⚠ This changes resolved colors
toneis contrast-shaped rather than lightness-shaped, so tokens do not land on their previous values. Measured per-channel RGB delta vsmain, across every token in all four scheme variants:Seed hue and saturation are unchanged, so hue relationships and relative ramps are preserved — the shift is in tone placement, not in the palette's structure.
What is deliberately excluded
The pastel migration stays in #1229:
{ pastel: true }on both theme seeds, andSEED_SATURATION80 → 100.Worth recording, because it is counter-intuitive: dropping
pastelwhile keeping seed 100 moves accents further frommain(mean Δ 43.7) than keeping pastel does (31.0) — the tone values were authored against pastel's hue-independent chroma boundary. Reverting the seed to 80 alongside is what brings the delta down to ~13. So this PR reverts both together or neither.Also included
Previously blocked on the Glaze upgrade, or independent of it:
accent-disabled-surface-textauthored astone: 'max'(waslightness: '+1'+contrast: 1.51) — only viable from Glaze 1.2.0, which stopped re-mapping a based extreme through the dark tone window.getPaletteTokens()/lazyStyles).s2/s3/s4monospace typography presets; PrismCode HTML support; CopySnippet +use-actionfixes; new Colors stories/docs.Size budget raised 445kB → 460kB (bundle is 451.31 kB). Note the tree-shaking budget is now the tighter one — 117.63 kB against 118 kB.
Verification
Build clean · 997 tests pass · oxlint + prettier clean · size-limit passes.
🤖 Generated with Claude Code
Note
High Risk
The Glaze upgrade and full-palette re-authoring change resolved colors app-wide (visual regression risk for consumers), while lazy token caching means host
glaze.configure()must run before first token access.Overview
Major design-token change: bumps
@tenphi/glazeto 1.2.0 and rewritespalette.tsfromlightnessto contrast-shapedtone(includingaccent-selected-fillfor accent text contrast,tone: 'max'on accent-disabled labels, andoklchexport). Resolved colors shift across light/dark/HC (~mean Δ13 on core/accent tokens).Lazy resolution: adds
lazyStylesplusgetPaletteTokens/getColorTokens/getTokens;TOKENS/COLOR_TOKENS/PALETTE_TOKENSstay as proxies so hosts canglaze.configure()before first paint.GlobalStylescallsgetTokens().Typography & code: new
s2–s4monospace presets;PrismCode/CopySnippetdefault tos3;CopySnippetserifkeeps non-mono font explicitly; restores#pinklegacy alias; Prism global CSS gains HTML token rules (tags/attrs/values).Item chrome: outline/clear selected labels use
#primary-accent-text-soft, intensifying to#primary-accent-texton hover (aligned with links).Docs & budget: new Colors Storybook reference; Usage/Typography docs updated; full bundle size limit 445kB → 460kB.
Reviewed by Cursor Bugbot for commit 9c260e1. Bugbot is set up for automated code reviews on this repo. Configure here.