@pandacss/types 0.0.0-dev-20240211192055 → 0.0.0-dev-20240212091351
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/recipe.d.ts +11 -0
- package/package.json +2 -2
package/dist/recipe.d.ts
CHANGED
|
@@ -13,10 +13,21 @@ export type RecipeSelection<T extends RecipeVariantRecord> = keyof any extends k
|
|
|
13
13
|
|
|
14
14
|
export type RecipeVariantFn<T extends RecipeVariantRecord> = (props?: RecipeSelection<T>) => string
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Extract the variant as optional props from a `cva` function.
|
|
18
|
+
* Intended to be used with a JSX component, prefer `RecipeVariant` for a more strict type.
|
|
19
|
+
*/
|
|
16
20
|
export type RecipeVariantProps<
|
|
17
21
|
T extends RecipeVariantFn<RecipeVariantRecord> | SlotRecipeVariantFn<string, SlotRecipeVariantRecord<string>>,
|
|
18
22
|
> = Pretty<Parameters<T>[0]>
|
|
19
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Extract the variants from a `cva` function.
|
|
26
|
+
*/
|
|
27
|
+
export type RecipeVariant<
|
|
28
|
+
T extends RecipeVariantFn<RecipeVariantRecord> | SlotRecipeVariantFn<string, SlotRecipeVariantRecord<string>>,
|
|
29
|
+
> = Exclude<Pretty<Required<RecipeVariantProps<T>>>, undefined>
|
|
30
|
+
|
|
20
31
|
type RecipeVariantMap<T extends RecipeVariantRecord> = {
|
|
21
32
|
[K in keyof T]: Array<keyof T[K]>
|
|
22
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20240212091351",
|
|
4
4
|
"description": "The types for css panda",
|
|
5
5
|
"main": "dist/index.d.ts",
|
|
6
6
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"microdiff": "^1.3.2",
|
|
31
31
|
"ncp": "^2.0.0",
|
|
32
32
|
"pkg-types": "1.0.3",
|
|
33
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
33
|
+
"@pandacss/extractor": "0.0.0-dev-20240212091351"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "tsx scripts/watch.ts",
|