@pandacss/types 0.32.0 → 0.33.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 +8 -1
- package/dist/conditions.d.ts +21 -8
- package/dist/config.d.ts +1 -1
- package/dist/hooks.d.ts +5 -9
- package/dist/prop-type.d.ts +2 -2
- package/dist/shared.d.ts +6 -6
- package/dist/style-rules.d.ts +2 -6
- package/dist/utility.d.ts +32 -0
- package/package.json +2 -2
package/dist/artifact.d.ts
CHANGED
|
@@ -26,7 +26,14 @@ export type ArtifactId =
|
|
|
26
26
|
| 'jsx-patterns-index'
|
|
27
27
|
| 'css-index'
|
|
28
28
|
| 'package.json'
|
|
29
|
-
|
|
|
29
|
+
| 'types-jsx'
|
|
30
|
+
| 'types-entry'
|
|
31
|
+
| 'types-styles'
|
|
32
|
+
| 'types-conditions'
|
|
33
|
+
| 'types-gen'
|
|
34
|
+
| 'types-gen-system'
|
|
35
|
+
| `recipes.${string}`
|
|
36
|
+
| `patterns.${string}`
|
|
30
37
|
|
|
31
38
|
export type CssArtifactType = 'preflight' | 'tokens' | 'static' | 'global' | 'keyframes'
|
|
32
39
|
|
package/dist/conditions.d.ts
CHANGED
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import type { AnySelector, Selectors } from './selectors'
|
|
2
2
|
|
|
3
|
-
export type ConditionType = 'at-rule' | 'parent-nesting' | 'self-nesting' | 'combinator-nesting'
|
|
3
|
+
export type ConditionType = 'at-rule' | 'parent-nesting' | 'self-nesting' | 'combinator-nesting' | 'mixed'
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
5
|
+
export type ConditionDetails = AtRuleCondition | SelectorCondition | MixedCondition
|
|
6
|
+
|
|
7
|
+
export interface AtRuleCondition {
|
|
8
|
+
type: 'at-rule'
|
|
7
9
|
value: string
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
raw: string
|
|
11
|
+
name: string
|
|
12
|
+
params: string
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
export interface
|
|
15
|
+
export interface SelectorCondition {
|
|
16
|
+
type: 'self-nesting' | 'parent-nesting' | 'combinator-nesting'
|
|
17
|
+
value: string
|
|
13
18
|
raw: string
|
|
14
19
|
}
|
|
15
20
|
|
|
21
|
+
export interface MixedCondition {
|
|
22
|
+
type: 'mixed'
|
|
23
|
+
value: ConditionDetails[]
|
|
24
|
+
raw: string[]
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
/* -----------------------------------------------------------------------------
|
|
17
28
|
* Shadowed export (in CLI): DO NOT REMOVE
|
|
18
29
|
* -----------------------------------------------------------------------------*/
|
|
19
30
|
|
|
31
|
+
export type ConditionQuery = string | string[]
|
|
32
|
+
|
|
20
33
|
export interface Conditions {
|
|
21
|
-
[condition: string]:
|
|
34
|
+
[condition: string]: ConditionQuery
|
|
22
35
|
}
|
|
23
36
|
export interface ExtendableConditions {
|
|
24
|
-
[condition: string]:
|
|
37
|
+
[condition: string]: ConditionQuery | Conditions | undefined
|
|
25
38
|
extend?: Conditions | undefined
|
|
26
39
|
}
|
|
27
40
|
|
package/dist/config.d.ts
CHANGED
|
@@ -232,7 +232,7 @@ interface CssgenOptions {
|
|
|
232
232
|
* Whether to include css reset styles in the generated css.
|
|
233
233
|
* @default true
|
|
234
234
|
*/
|
|
235
|
-
preflight?: boolean | { scope: string }
|
|
235
|
+
preflight?: boolean | { scope: string; level?: 'element' | 'parent' }
|
|
236
236
|
/**
|
|
237
237
|
* The namespace prefix for the generated css classes and css variables.
|
|
238
238
|
* @default ''
|
package/dist/hooks.d.ts
CHANGED
|
@@ -41,14 +41,7 @@ export interface PandaHooks {
|
|
|
41
41
|
* Called right before writing the codegen files to disk.
|
|
42
42
|
* You can use this hook to tweak the codegen files before they are written to disk.
|
|
43
43
|
*/
|
|
44
|
-
'codegen:prepare': (args:
|
|
45
|
-
artifacts: Artifact[]
|
|
46
|
-
/**
|
|
47
|
-
* The original state of the artifacts, as it was generated by Panda, without any modification from other preset hooks
|
|
48
|
-
*/
|
|
49
|
-
original?: Artifact[]
|
|
50
|
-
changed: ArtifactId[] | undefined
|
|
51
|
-
}) => MaybeAsyncReturn<Artifact[]>
|
|
44
|
+
'codegen:prepare': (args: CodegenPrepareHookArgs) => MaybeAsyncReturn<void | Artifact[]>
|
|
52
45
|
/**
|
|
53
46
|
* Called after the codegen is completed
|
|
54
47
|
*/
|
|
@@ -165,9 +158,12 @@ export interface ParserResultAfterHookArgs {
|
|
|
165
158
|
|
|
166
159
|
export interface CodegenPrepareHookArgs {
|
|
167
160
|
artifacts: Artifact[]
|
|
161
|
+
/**
|
|
162
|
+
* The original state of the artifacts, as it was generated by Panda, without any modification from other preset hooks
|
|
163
|
+
*/
|
|
164
|
+
original?: Artifact[]
|
|
168
165
|
changed: ArtifactId[] | undefined
|
|
169
166
|
}
|
|
170
|
-
|
|
171
167
|
export interface CodegenDoneHookArgs {
|
|
172
168
|
changed: ArtifactId[] | undefined
|
|
173
169
|
}
|
package/dist/prop-type.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export interface PropertyTypes {}
|
|
|
10
10
|
export type PropertyValue<K extends string> = K extends keyof PropertyTypes
|
|
11
11
|
? ConditionalValue<PropertyTypes[K]>
|
|
12
12
|
: K extends keyof CssProperties
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
? ConditionalValue<CssProperties[K]>
|
|
14
|
+
: never
|
package/dist/shared.d.ts
CHANGED
|
@@ -26,12 +26,12 @@ type Paths<T, Prefix extends string = '', Depth extends number = 0> = {
|
|
|
26
26
|
[K in keyof T]: Depth extends 0
|
|
27
27
|
? never
|
|
28
28
|
: T[K] extends object
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
? K extends string
|
|
30
|
+
? `${Prefix}${K}` | Paths<T[K], `${Prefix}${K}.`, Depth extends 1 ? 0 : Subtract<Depth, 1>>
|
|
31
|
+
: never
|
|
32
|
+
: K extends string | number
|
|
33
|
+
? `${Prefix}${K}`
|
|
34
|
+
: never
|
|
35
35
|
}[keyof T]
|
|
36
36
|
|
|
37
37
|
export type PathIn<T, Key extends keyof T> = Key extends string ? Paths<T[Key], `${Key}.`, 1> : never
|
package/dist/style-rules.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConditionDetails } from './conditions'
|
|
2
2
|
|
|
3
3
|
export interface StyleResultObject {
|
|
4
4
|
[key: string]: any
|
|
@@ -17,16 +17,12 @@ export interface StyleEntry {
|
|
|
17
17
|
variants?: boolean
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
interface ExpandedCondition extends RawCondition {
|
|
21
|
-
params?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
20
|
export interface AtomicStyleResult {
|
|
25
21
|
result: StyleResultObject
|
|
26
22
|
entry: StyleEntry
|
|
27
23
|
hash: string
|
|
28
24
|
className: string
|
|
29
|
-
conditions?:
|
|
25
|
+
conditions?: ConditionDetails[]
|
|
30
26
|
layer?: string
|
|
31
27
|
}
|
|
32
28
|
|
package/dist/utility.d.ts
CHANGED
|
@@ -60,8 +60,40 @@ export interface PropertyConfig {
|
|
|
60
60
|
* The shorthand of the property.
|
|
61
61
|
*/
|
|
62
62
|
shorthand?: string | string[]
|
|
63
|
+
/**
|
|
64
|
+
* The CSS semantic group this property belongs
|
|
65
|
+
*/
|
|
66
|
+
group?: CssSemanticGroup
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
export type CssSemanticGroup =
|
|
70
|
+
| 'System'
|
|
71
|
+
| 'Container'
|
|
72
|
+
| 'Display'
|
|
73
|
+
| 'Visibility'
|
|
74
|
+
| 'Position'
|
|
75
|
+
| 'Transform'
|
|
76
|
+
| 'Flex Layout'
|
|
77
|
+
| 'Grid Layout'
|
|
78
|
+
| 'Layout'
|
|
79
|
+
| 'Border'
|
|
80
|
+
| 'Border Radius'
|
|
81
|
+
| 'Width'
|
|
82
|
+
| 'Height'
|
|
83
|
+
| 'Margin'
|
|
84
|
+
| 'Padding'
|
|
85
|
+
| 'Color'
|
|
86
|
+
| 'Typography'
|
|
87
|
+
| 'Background'
|
|
88
|
+
| 'Shadow'
|
|
89
|
+
| 'Table'
|
|
90
|
+
| 'List'
|
|
91
|
+
| 'Scroll'
|
|
92
|
+
| 'Interactivity'
|
|
93
|
+
| 'Transition'
|
|
94
|
+
| 'Effect'
|
|
95
|
+
| 'Other'
|
|
96
|
+
|
|
65
97
|
export type UtilityConfig = {
|
|
66
98
|
[property in LiteralUnion<CssProperty>]?: PropertyConfig
|
|
67
99
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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.33.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"dev": "tsx scripts/watch.ts",
|