@pandacss/types 0.11.1 → 0.12.0
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 +4 -2
- package/dist/system-types.d.ts +7 -4
- package/package.json +2 -2
package/dist/recipe.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SystemStyleObject } from './system-types'
|
|
1
|
+
import type { SystemStyleObject, DistributiveOmit } from './system-types'
|
|
2
2
|
|
|
3
3
|
type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
4
4
|
|
|
@@ -32,7 +32,9 @@ export type RecipeRuntimeFn<T extends RecipeVariantRecord> = RecipeVariantFn<T>
|
|
|
32
32
|
variantMap: RecipeVariantMap<T>
|
|
33
33
|
resolve: (props: RecipeSelection<T>) => SystemStyleObject
|
|
34
34
|
config: RecipeConfig<T>
|
|
35
|
-
splitVariantProps<Props extends RecipeSelection<T>>(
|
|
35
|
+
splitVariantProps<Props extends RecipeSelection<T>>(
|
|
36
|
+
props: Props,
|
|
37
|
+
): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export type RecipeCompoundSelection<T extends RecipeVariantRecord> = {
|
package/dist/system-types.d.ts
CHANGED
|
@@ -55,19 +55,22 @@ type StyleProps = SystemProperties & MinimalNested<SystemStyleObject>
|
|
|
55
55
|
|
|
56
56
|
export type JsxStyleProps = StyleProps & WithCss
|
|
57
57
|
|
|
58
|
-
export type
|
|
58
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
59
|
+
|
|
60
|
+
export type Assign<T, U> = {
|
|
61
|
+
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
62
|
+
} & U
|
|
59
63
|
|
|
60
64
|
export type PatchedHTMLProps = {
|
|
61
|
-
htmlSize?: string | number
|
|
62
65
|
htmlWidth?: string | number
|
|
63
66
|
htmlHeight?: string | number
|
|
64
67
|
htmlTranslate?: 'yes' | 'no' | undefined
|
|
65
68
|
htmlContent?: string
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | '
|
|
71
|
+
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
69
72
|
|
|
70
|
-
type WithHTMLProps<T> =
|
|
73
|
+
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
71
74
|
|
|
72
75
|
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
73
76
|
WithHTMLProps<T>,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
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.
|
|
20
|
+
"@pandacss/extractor": "0.12.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsx scripts/build.ts",
|