@pandacss/types 0.28.0 → 0.29.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/artifact.d.ts +0 -4
- package/dist/config.d.ts +17 -1
- package/dist/pattern.d.ts +13 -2
- package/dist/theme.d.ts +8 -0
- package/dist/tokens.d.ts +1 -0
- package/dist/utility.d.ts +13 -2
- package/package.json +2 -2
package/dist/artifact.d.ts
CHANGED
|
@@ -26,11 +26,7 @@ export type ArtifactId =
|
|
|
26
26
|
| 'jsx-patterns'
|
|
27
27
|
| 'jsx-patterns-index'
|
|
28
28
|
| 'css-index'
|
|
29
|
-
| 'reset.css'
|
|
30
|
-
| 'global.css'
|
|
31
|
-
| 'static.css'
|
|
32
29
|
| 'package.json'
|
|
33
|
-
| 'styles.css'
|
|
34
30
|
| (string & {})
|
|
35
31
|
|
|
36
32
|
export type CssArtifactType = 'preflight' | 'tokens' | 'static' | 'global' | 'keyframes'
|
package/dist/config.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface StudioOptions {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface Patterns {
|
|
41
|
+
export interface Patterns {
|
|
42
42
|
[pattern: string]: PatternConfig
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -155,6 +155,13 @@ interface FileSystemOptions {
|
|
|
155
155
|
* @default []
|
|
156
156
|
*/
|
|
157
157
|
exclude?: string[]
|
|
158
|
+
/**
|
|
159
|
+
* List of globs or files that will trigger a config reload when changed.
|
|
160
|
+
*
|
|
161
|
+
* We automatically track the config file and (transitive) files imported by the config file as much as possible, but sometimes we might miss some.
|
|
162
|
+
* Use this option as a workaround.
|
|
163
|
+
*/
|
|
164
|
+
dependencies?: string[]
|
|
158
165
|
/**
|
|
159
166
|
* Whether to watch for changes and regenerate the css.
|
|
160
167
|
* @default false
|
|
@@ -346,6 +353,15 @@ export interface Config
|
|
|
346
353
|
* @default 'false'
|
|
347
354
|
*/
|
|
348
355
|
eject?: boolean
|
|
356
|
+
/**
|
|
357
|
+
* The validation strcictnesss to use when validating the config.
|
|
358
|
+
* - When set to 'none', no validation will be performed.
|
|
359
|
+
* - When set to 'warn', warnings will be logged when validation fails.
|
|
360
|
+
* - When set to 'error', errors will be thrown when validation fails.
|
|
361
|
+
*
|
|
362
|
+
* @default 'error'
|
|
363
|
+
*/
|
|
364
|
+
validation?: 'none' | 'warn' | 'error'
|
|
349
365
|
}
|
|
350
366
|
|
|
351
367
|
export interface Preset extends ExtendableOptions, PresetOptions {}
|
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/dist/theme.d.ts
CHANGED
|
@@ -37,6 +37,14 @@ export interface Theme {
|
|
|
37
37
|
* Multi-variant style definitions for component slots.
|
|
38
38
|
*/
|
|
39
39
|
slotRecipes?: Record<string, SlotRecipeConfig>
|
|
40
|
+
/**
|
|
41
|
+
* The predefined container names for your project.
|
|
42
|
+
*/
|
|
43
|
+
containerNames?: string[]
|
|
44
|
+
/**
|
|
45
|
+
* The predefined container sizes for your project.
|
|
46
|
+
*/
|
|
47
|
+
containerSizes?: Record<string, string>
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
interface PartialTheme extends Omit<Theme, 'recipes' | 'slotRecipes'> {
|
package/dist/tokens.d.ts
CHANGED
package/dist/utility.d.ts
CHANGED
|
@@ -16,9 +16,20 @@ export type PropertyValues =
|
|
|
16
16
|
| Record<string, string>
|
|
17
17
|
| ThemeFn
|
|
18
18
|
|
|
19
|
-
interface
|
|
19
|
+
export interface ColorMixResult {
|
|
20
|
+
invalid: boolean
|
|
21
|
+
value: string
|
|
22
|
+
color?: string
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface TransformUtils {
|
|
26
|
+
colorMix(value: string): ColorMixResult
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TransformArgs<T = any> {
|
|
20
30
|
token: TokenFn
|
|
21
|
-
raw:
|
|
31
|
+
raw: T
|
|
32
|
+
utils: TransformUtils
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
export type PropertyTransform = (value: any, args: TransformArgs) => NestedCssProperties | undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
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.
|
|
33
|
+
"@pandacss/extractor": "0.29.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "tsx scripts/watch.ts",
|