Skip to content

Commit 3375691

Browse files
timphandevclaude
andcommitted
chore: release class-recipe 1.4.0
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 08d3a27 commit 3375691

3 files changed

Lines changed: 57 additions & 34 deletions

File tree

‎docs/src/measurements/class-recipe.json‎

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,84 +6,84 @@
66
{
77
"name": "strings",
88
"speeds": [
9-
{ "hz": 16863734.730190888, "name": "class-recipe" },
10-
{ "hz": 15928023.885014597, "name": "classnames" },
11-
{ "hz": 15471346.613208268, "name": "clsx" }
9+
{ "hz": 16526161.884322787, "name": "class-recipe" },
10+
{ "hz": 15434241.861063814, "name": "clsx" },
11+
{ "hz": 14927014.999950258, "name": "classnames" }
1212
]
1313
},
1414
{
1515
"name": "an object",
1616
"speeds": [
17-
{ "hz": 15005702.71489226, "name": "class-recipe" },
18-
{ "hz": 14889835.91272407, "name": "classnames" },
19-
{ "hz": 14449908.219739389, "name": "clsx" }
17+
{ "hz": 15014344.789911786, "name": "class-recipe" },
18+
{ "hz": 14858509.584001321, "name": "clsx" },
19+
{ "hz": 14194956.914868549, "name": "classnames" }
2020
]
2121
},
2222
{
2323
"name": "an array",
2424
"speeds": [
25-
{ "hz": 14949729.804073641, "name": "class-recipe" },
26-
{ "hz": 13807893.654824946, "name": "clsx" },
27-
{ "hz": 13780408.903532693, "name": "classnames" }
25+
{ "hz": 15594316.830474518, "name": "class-recipe" },
26+
{ "hz": 13643870.904526325, "name": "clsx" },
27+
{ "hz": 13535412.864647204, "name": "classnames" }
2828
]
2929
},
3030
{
3131
"name": "nested arrays",
3232
"speeds": [
33-
{ "hz": 9605664.875063132, "name": "class-recipe" },
34-
{ "hz": 9131116.936052993, "name": "clsx" },
35-
{ "hz": 8241801.83523155, "name": "classnames" }
33+
{ "hz": 9614972.634620283, "name": "class-recipe" },
34+
{ "hz": 8972587.81149353, "name": "clsx" },
35+
{ "hz": 8230876.415773644, "name": "classnames" }
3636
]
3737
},
3838
{
3939
"name": "mixed values",
4040
"speeds": [
41-
{ "hz": 7690685.015712852, "name": "class-recipe" },
42-
{ "hz": 7399664.801272741, "name": "clsx" },
43-
{ "hz": 7197056.6184267895, "name": "classnames" }
41+
{ "hz": 7824470.960685833, "name": "class-recipe" },
42+
{ "hz": 7493344.100276852, "name": "clsx" },
43+
{ "hz": 7297869.364975926, "name": "classnames" }
4444
]
4545
},
4646
{
4747
"name": "a component's classes",
4848
"speeds": [
49-
{ "hz": 16309467.527293826, "name": "class-recipe" },
50-
{ "hz": 14685731.427113846, "name": "classnames" },
51-
{ "hz": 13640456.072602706, "name": "clsx" }
49+
{ "hz": 16126674.725865327, "name": "class-recipe" },
50+
{ "hz": 15026726.985124476, "name": "classnames" },
51+
{ "hz": 11413160.703206401, "name": "clsx" }
5252
]
5353
}
5454
],
5555
"recipe": {
5656
"merged": [
57-
{ "hz": 4064700.675242927, "name": "class-recipe" },
58-
{ "hz": 1034448.5577656605, "name": "tailwind-variants" },
59-
{ "hz": 942571.44078195, "name": "class-variance-authority" }
57+
{ "hz": 4031324.8273459896, "name": "class-recipe" },
58+
{ "hz": 1025111.6309597876, "name": "tailwind-variants" },
59+
{ "hz": 943996.2432230052, "name": "class-variance-authority" }
6060
],
6161
"plain": [
62-
{ "hz": 13778926.608327739, "name": "class-recipe" },
63-
{ "hz": 1482225.2060054843, "name": "class-variance-authority" },
64-
{ "hz": 1030481.0447440818, "name": "tailwind-variants" }
62+
{ "hz": 13597756.585834987, "name": "class-recipe" },
63+
{ "hz": 1503034.4593896475, "name": "class-variance-authority" },
64+
{ "hz": 1018850.0173153721, "name": "tailwind-variants" }
6565
]
6666
},
6767
"recipeCache": [
68-
{ "hz": 12828290.767270476, "name": "cached" },
69-
{ "hz": 7671063.246087108, "name": "uncached" }
68+
{ "hz": 13318059.203207089, "name": "cached" },
69+
{ "hz": 7911309.856040934, "name": "uncached" }
7070
],
7171
"slotRecipe": {
7272
"merged": [
73-
{ "hz": 5171897.281106973, "name": "class-recipe" },
74-
{ "hz": 848713.9847340672, "name": "tailwind-variants" }
73+
{ "hz": 5035866.138250829, "name": "class-recipe" },
74+
{ "hz": 845790.4566893834, "name": "tailwind-variants" }
7575
],
7676
"plain": [
77-
{ "hz": 8270495.917294582, "name": "class-recipe" },
78-
{ "hz": 855946.1177745225, "name": "tailwind-variants" }
77+
{ "hz": 8220701.860246979, "name": "class-recipe" },
78+
{ "hz": 844828.1793952463, "name": "tailwind-variants" }
7979
]
8080
},
8181
"slotRecipeCache": [
82-
{ "hz": 9928253.116385706, "name": "cached" },
83-
{ "hz": 3523262.9664706914, "name": "uncached" }
82+
{ "hz": 9425819.227083523, "name": "cached" },
83+
{ "hz": 3374948.182932919, "name": "uncached" }
8484
],
8585
"versions": {
86-
"class-recipe": "1.3.0",
86+
"class-recipe": "1.4.0",
8787
"class-variance-authority": "0.7.1",
8888
"classnames": "2.5.1",
8989
"clsx": "2.1.1",

‎packages/class-recipe/CHANGELOG.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@ All notable changes to `@lynstack/class-recipe`. Each version is published
44
on npm and as a [GitHub release](https://github.com/lynstack/recipe/releases)
55
tagged `class-recipe@<version>`.
66

7+
## 1.4.0 — 2026-10-07
8+
9+
A recipe lists the options and defaults of its variants, so that a
10+
library or a story can list every selection of a recipe without reading
11+
its config.
12+
13+
- `cva` and `sva` recipes have `variantOptions`, the names of the options
14+
of each variant, as strings, in the order the recipe numbers them:
15+
integer names first, in ascending order, then `"false"` and `"true"`,
16+
which a variant that declares either one has, then the others in the
17+
order of the config.
18+
- They have `defaultVariants`, the option each variant uses when the
19+
recipe is called without it, as a string: its default, or `"false"` for
20+
a variant whose only options are `"true"` and `"false"`. A variant
21+
without a default is not in it.
22+
- Both are frozen and typed with the names of the options of each
23+
variant, without `className` or `classNames`. A recipe that composes
24+
others lists the variants of the one config it stands for. They hold
25+
names only, never classes.
26+
- `Recipe` and `SlotRecipe` have the two properties, so a type that
27+
implements them by hand needs them too.
28+
- Depends on `@lynstack/recipe` through the range `^1.5.0`.
29+
730
## 1.3.0 — 2026-10-07
831

932
A recipe can build on other recipes with `composes`.

‎packages/class-recipe/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lynstack/class-recipe",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Fast, type-safe class name recipes with variants, compound variants, and slots, plus a clsx-compatible cx.",
55
"keywords": [
66
"class",

0 commit comments

Comments
 (0)