@pandacss/types 0.0.0-dev-20240126232947 → 0.0.0-dev-20240128131310
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/pattern.d.ts +13 -2
- package/package.json +2 -2
package/dist/pattern.d.ts
CHANGED
|
@@ -12,13 +12,20 @@ export type PatternProperty =
|
|
|
12
12
|
|
|
13
13
|
export interface PatternHelpers {
|
|
14
14
|
map: (value: any, fn: (value: string) => string | undefined) => any
|
|
15
|
+
isCssUnit: (value: any) => boolean
|
|
16
|
+
isCssVar: (value: any) => boolean
|
|
17
|
+
isCssFunction: (value: any) => boolean
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
export interface PatternProperties {
|
|
18
21
|
[key: string]: PatternProperty
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
type
|
|
24
|
+
type InferProps<T> = Record<LiteralUnion<keyof T>, any>
|
|
25
|
+
|
|
26
|
+
export type PatternDefaultValue<T> = Partial<InferProps<T>>
|
|
27
|
+
|
|
28
|
+
export type PatternDefaultValueFn<T> = (props: InferProps<T>) => PatternDefaultValue<T>
|
|
22
29
|
|
|
23
30
|
export interface PatternConfig<T extends PatternProperties = PatternProperties> {
|
|
24
31
|
/**
|
|
@@ -34,10 +41,14 @@ export interface PatternConfig<T extends PatternProperties = PatternProperties>
|
|
|
34
41
|
* The properties of the pattern.
|
|
35
42
|
*/
|
|
36
43
|
properties?: T
|
|
44
|
+
/**
|
|
45
|
+
* The default values of the pattern.
|
|
46
|
+
*/
|
|
47
|
+
defaultValues?: PatternDefaultValue<T> | PatternDefaultValueFn<T>
|
|
37
48
|
/**
|
|
38
49
|
* The css object this pattern will generate.
|
|
39
50
|
*/
|
|
40
|
-
transform?: (props:
|
|
51
|
+
transform?: (props: InferProps<T>, helpers: PatternHelpers) => SystemStyleObject
|
|
41
52
|
/**
|
|
42
53
|
* The jsx element name this pattern will generate.
|
|
43
54
|
*/
|
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-20240128131310",
|
|
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-20240128131310"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "tsx scripts/watch.ts",
|