@pandacss/types 0.0.0-dev-20230927132629 → 0.0.0-dev-20230927144111

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.
Files changed (2) hide show
  1. package/dist/recipe.d.ts +10 -8
  2. package/package.json +2 -2
package/dist/recipe.d.ts CHANGED
@@ -37,11 +37,13 @@ export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVa
37
37
  ): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
38
38
  }
39
39
 
40
- export type RecipeCompoundSelection<T extends RecipeVariantRecord> = {
41
- [K in keyof T]?: StringToBoolean<keyof T[K]> | Array<StringToBoolean<keyof T[K]>>
40
+ type OneOrMore<T> = T | Array<T>
41
+
42
+ export type RecipeCompoundSelection<T> = {
43
+ [K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>>
42
44
  }
43
45
 
44
- export type RecipeCompoundVariant<T extends RecipeVariantRecord> = RecipeCompoundSelection<T> & {
46
+ export type RecipeCompoundVariant<T> = T & {
45
47
  css: SystemStyleObject
46
48
  }
47
49
 
@@ -53,7 +55,7 @@ export interface RecipeDefinition<T extends RecipeVariantRecord> {
53
55
  /**
54
56
  * The multi-variant styles of the recipe.
55
57
  */
56
- variants?: T | RecipeVariantRecord
58
+ variants?: T
57
59
  /**
58
60
  * The default variants of the recipe.
59
61
  */
@@ -61,7 +63,7 @@ export interface RecipeDefinition<T extends RecipeVariantRecord> {
61
63
  /**
62
64
  * The styles to apply when a combination of variants is selected.
63
65
  */
64
- compoundVariants?: Array<RecipeCompoundVariant<T>>
66
+ compoundVariants?: Pretty<RecipeCompoundVariant<RecipeCompoundSelection<T>>>[]
65
67
  }
66
68
 
67
69
  export type RecipeCreatorFn = <T extends RecipeVariantRecord>(config: RecipeDefinition<T>) => RecipeRuntimeFn<T>
@@ -108,7 +110,7 @@ export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVaria
108
110
  splitVariantProps<Props extends RecipeSelection<T>>(props: Props): [RecipeSelection<T>, Pretty<Omit<Props, keyof T>>]
109
111
  }
110
112
 
111
- export type SlotRecipeCompoundVariant<S extends string, T extends RecipeVariantRecord> = RecipeCompoundSelection<T> & {
113
+ export type SlotRecipeCompoundVariant<S extends string, T> = T & {
112
114
  css: SlotRecord<S, SystemStyleObject>
113
115
  }
114
116
 
@@ -124,7 +126,7 @@ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVari
124
126
  /**
125
127
  * The multi-variant styles of the recipe.
126
128
  */
127
- variants?: T | SlotRecipeVariantRecord<S>
129
+ variants?: T
128
130
  /**
129
131
  * The default variants of the recipe.
130
132
  */
@@ -132,7 +134,7 @@ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVari
132
134
  /**
133
135
  * The styles to apply when a combination of variants is selected.
134
136
  */
135
- compoundVariants?: Array<SlotRecipeCompoundVariant<S, T>>
137
+ compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
136
138
  }
137
139
 
138
140
  export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.0.0-dev-20230927132629",
3
+ "version": "0.0.0-dev-20230927144111",
4
4
  "description": "The types for css panda",
5
5
  "main": "dist/index.d.ts",
6
6
  "author": "Segun Adebayo <joseshegs@gmail.com>",
@@ -17,7 +17,7 @@
17
17
  "hookable": "5.5.3",
18
18
  "ncp": "^2.0.0",
19
19
  "pkg-types": "1.0.3",
20
- "@pandacss/extractor": "0.0.0-dev-20230927132629"
20
+ "@pandacss/extractor": "0.0.0-dev-20230927144111"
21
21
  },
22
22
  "scripts": {
23
23
  "build": "tsx scripts/build.ts",