refactor(www): upgrade tailwind-variants, drop tailwind-merge and cnfast - #550
Open
mehdibha wants to merge 5 commits into
Open
refactor(www): upgrade tailwind-variants, drop tailwind-merge and cnfast#550mehdibha wants to merge 5 commits into
mehdibha wants to merge 5 commits into
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mehdibha
force-pushed
the
claude/tailwind-variant-release-a95f42
branch
from
July 31, 2026 15:34
43cfbb6 to
9332ea6
Compare
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.
Summary
Upgrades
tailwind-variantsto 3.3.0 — the full TypeScript rewrite (heroui-inc/tailwind-variants#301) that vendors the tailwind-merge engine — and consolidates the design system's styling dependencies onto that single package:tailwind-mergeremoved (www dep + shipped registry deps). It was only ever listed as tv's optional peer; 3.3.0 never imports it at runtime.cnfastremoved.cninregistry/lib/utilsnow wraps tv's owncn, narrowed tostring(React AriaclassNamerender props rejectundefined). The publisher's init-emittedsrc/lib/utils.tsships the same wrapper (CN_UTILS_TS, now exported and reused by the publish smoke test's fixture).InferTvadapted inlib/styles.tsx:TVReturnTypeis now an interface with a 6thE(extend) type param; composed tv objects carry a real extend, so the cast passesTVReturnTypeLike<never, never> | undefined.Users installing components now get
tailwind-variantsinstead oftailwind-variants+tailwind-merge+cnfast.Why 3.3.0 is safe (verified)
createStylescomposes for density/params), slots,classNameoverrides, v4 syntax (rounded-(--btn-radius),**:[svg]:) — byte-identical output on every case.cnparity: tv'scnvscnfast— identical on strings, objects, nested arrays, falsy values, and merge conflicts.compoundSlots+extend (feat: enhance landing page #199),compoundVariants+slots+defaultVariants(refactor(www): decouple accordion from disclosure parts #238), falsy boolean compound variants (refactor(www): reorganize docs + revamp the components gallery (/docs/components) #209). The one behavioral break (emptyslots: {}enables slot mode) has zero occurrences here.pnpm build:registry(zero drift in tracked generated output),typecheck,test(235),checkall green; the publish smoke test type-checks the full emitted set against the new utils.Notes
tailwind-mergewasn't installed next to tv.focus-ring,cursor-interactive, …) are unaffected. Consumers who usetailwind-mergefor their own code will carry both engines (~7KB gzip overlap) — their call.compoundVariants/compoundSlotsare now reliable with the runtime extend chains — previously unused in the registry (0/49styles.ts); style authors can reach for them.