feat(cva): support internal variants prefixed with _#382
Draft
joe-bell wants to merge 1 commit into
Draft
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
cva | d5eb7a9 | Commit Preview URL Branch Preview URL |
Jul 12 2026, 06:54 PM |
Owner
Author
|
Unsure about this approach, would an |
c260801 to
4c7bec6
Compare
4c7bec6 to
493138d
Compare
Contributor
BenchmarksComparing this PR's local benchmark run against the latest published npm versions. Aim for higher ops/s. Treat deltas within ±5% as noise.
|
| Task | This PR | 0.7.1 |
Δ |
|---|---|---|---|
cva (runtime)component call with defaults |
1,138,165 ops/s ±0.12% | 1,111,138 ops/s ±0.29% | +2.4% |
cva (runtime)component call with props |
178,275 ops/s ±0.27% | 190,144 ops/s ±0.33% | 🔴 -6.2% |
cx (runtime)class join |
12,262,745 ops/s ±0.37% | 12,636,414 ops/s ±1.72% | -3.0% |
cva (static)component definition |
24,983,440 ops/s ±0.22% | 22,957,015 ops/s ±0.60% | 🟢 +8.8% |
compose (static + runtime)define, join and call |
944,171 ops/s ±0.39% | 935,170 ops/s ±0.91% | +1.0% |
cva
| Task | This PR | 1.0.0-beta.6 (beta) |
Δ |
|---|---|---|---|
cva (runtime)component call with defaults |
1,110,925 ops/s ±0.18% | 1,147,788 ops/s ±0.63% | -3.2% |
cva (runtime)component call with props |
176,792 ops/s ±0.17% | 176,395 ops/s ±0.54% | +0.2% |
cx (runtime)class join |
11,153,386 ops/s ±0.11% | 8,983,262 ops/s ±0.52% | 🟢 +24.2% |
cva (static)component definition |
4,051,796 ops/s ±0.80% | 3,834,469 ops/s ±1.59% | 🟢 +5.7% |
composes property (static + runtime)define, join and call |
449,454 ops/s ±0.23% | 454,774 ops/s ±0.37% | -1.2% |
Commit e1d355b · Node v24.18.0 · linux x64 · 2026-07-12T18:54:24.986Z
These benchmarks ran in CI on this PR's code. The comment checks that the report looks valid before posting it, but it cannot guarantee the numbers are correct. If you see a large change, re-run the benchmarks locally before treating it as a real improvement or regression.
Variant names starting with `_` are now internal: still declarable in `variants`, settable via `defaultVariants`, and matchable in `compoundVariants`, but hidden from the component's props type and from `getSchema` (both its return type and runtime object). Hiding is type-level only, so an untyped caller can still resolve one directly. This is a breaking change for any config that already used a `_`-prefixed variant name as a public prop; those variants disappear from prop types and getSchema results, though their runtime class resolution is unaffected. Documented in variants.mdx, api-reference.mdx, and flagged in whats-new.mdx. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALpEtdErxKFkdm3jhvSjmS
493138d to
d5eb7a9
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.
Variant names starting with
_are now internal: still declarable invariants, settable viadefaultVariants, and matchable incompoundVariants, but hidden from the component's props type andfrom
getSchema(both its return type and runtime object). Hiding istype-level only, so an untyped caller can still resolve one directly.
This is a breaking change for any config that already used a
_-prefixed variant name as a public prop; those variants disappearfrom prop types and getSchema results, though their runtime class
resolution is unaffected. Documented in variants.mdx, api-reference.mdx,
and flagged in whats-new.mdx.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01ALpEtdErxKFkdm3jhvSjmS