@pandacss/types 0.15.2 → 0.15.3
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/config.d.ts +20 -0
- package/dist/index.d.ts +10 -1
- package/dist/recipe.d.ts +10 -8
- package/dist/theme.d.ts +13 -1
- package/dist/utility.d.ts +6 -2
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -95,6 +95,13 @@ export interface ExtendableOptions {
|
|
|
95
95
|
patterns?: ExtendablePatterns
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
export interface OutdirImportMap {
|
|
99
|
+
css: string
|
|
100
|
+
recipes: string
|
|
101
|
+
patterns: string
|
|
102
|
+
jsx?: string
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
interface FileSystemOptions {
|
|
99
106
|
/**
|
|
100
107
|
* Whether to clean the output directory before generating the css.
|
|
@@ -106,6 +113,19 @@ interface FileSystemOptions {
|
|
|
106
113
|
* @default 'styled-system'
|
|
107
114
|
*/
|
|
108
115
|
outdir?: string
|
|
116
|
+
/**
|
|
117
|
+
* Allows you to customize the import paths for the generated outdir.
|
|
118
|
+
* @default
|
|
119
|
+
* ```js
|
|
120
|
+
* {
|
|
121
|
+
* css: 'styled-system/css',
|
|
122
|
+
* recipes: 'styled-system/recipes',
|
|
123
|
+
* patterns: 'styled-system/patterns',
|
|
124
|
+
* jsx: 'styled-system/jsx',
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
importMap?: OutdirImportMap
|
|
109
129
|
/**
|
|
110
130
|
* List of files glob to watch for changes.
|
|
111
131
|
* @default []
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,16 @@ export type {
|
|
|
9
9
|
} from './analyze-report'
|
|
10
10
|
export type { CompositionStyles, LayerStyles, TextStyles } from './composition'
|
|
11
11
|
export type { ConditionDetails, ConditionType, Conditions, RawCondition } from './conditions'
|
|
12
|
-
export type {
|
|
12
|
+
export type {
|
|
13
|
+
Config,
|
|
14
|
+
ConfigTsOptions,
|
|
15
|
+
LoadConfigResult,
|
|
16
|
+
Preset,
|
|
17
|
+
UserConfig,
|
|
18
|
+
TSConfig,
|
|
19
|
+
CascadeLayers,
|
|
20
|
+
OutdirImportMap,
|
|
21
|
+
} from './config'
|
|
13
22
|
export type { ConfigResultWithHooks, PandaHooks, PandaHookable } from './hooks'
|
|
14
23
|
export type { ParserResultType, ResultItem } from './parser'
|
|
15
24
|
export type { Part, Parts } from './parts'
|
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
|
-
|
|
41
|
-
|
|
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
|
|
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
|
|
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?:
|
|
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
|
|
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
|
|
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?:
|
|
137
|
+
compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
|
package/dist/theme.d.ts
CHANGED
|
@@ -39,6 +39,18 @@ export interface Theme {
|
|
|
39
39
|
slotRecipes?: Record<string, SlotRecipeConfig>
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
interface PartialTheme extends Omit<Theme, 'recipes' | 'slotRecipes'> {
|
|
43
|
+
/**
|
|
44
|
+
* Multi-variant style definitions for your project.
|
|
45
|
+
* Useful for defining component styles.
|
|
46
|
+
*/
|
|
47
|
+
recipes?: Record<string, Partial<RecipeConfig>>
|
|
48
|
+
/**
|
|
49
|
+
* Multi-variant style definitions for component slots.
|
|
50
|
+
*/
|
|
51
|
+
slotRecipes?: Record<string, Partial<SlotRecipeConfig>>
|
|
52
|
+
}
|
|
53
|
+
|
|
42
54
|
export interface ExtendableTheme extends Theme {
|
|
43
|
-
extend?:
|
|
55
|
+
extend?: PartialTheme | undefined
|
|
44
56
|
}
|
package/dist/utility.d.ts
CHANGED
|
@@ -55,6 +55,10 @@ export type UtilityConfig = {
|
|
|
55
55
|
[property in LiteralUnion<CssProperty>]?: PropertyConfig
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
type UtilityConfigWithExtend = {
|
|
59
|
+
[pattern in LiteralUnion<CssProperty>]?: PropertyConfig | UtilityConfig | undefined
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type ExtendableUtilityConfig = UtilityConfigWithExtend & {
|
|
63
|
+
extend?: UtilityConfig | undefined
|
|
60
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
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.15.
|
|
20
|
+
"@pandacss/extractor": "0.15.3"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsx scripts/build.ts",
|