@pandacss/types 0.17.0 → 0.17.2
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/package.json +15 -7
- package/dist/analyze-report.d.ts +0 -179
- package/dist/composition.d.ts +0 -106
- package/dist/conditions.d.ts +0 -47
- package/dist/config.d.ts +0 -345
- package/dist/csstype.d.ts +0 -20748
- package/dist/hooks.d.ts +0 -44
- package/dist/index.d.ts +0 -16
- package/dist/parser.d.ts +0 -36
- package/dist/parts.d.ts +0 -5
- package/dist/pattern.d.ts +0 -60
- package/dist/prop-type.d.ts +0 -14
- package/dist/recipe.d.ts +0 -147
- package/dist/runtime.d.ts +0 -41
- package/dist/selectors.d.ts +0 -58
- package/dist/shared.d.ts +0 -25
- package/dist/static-css.d.ts +0 -38
- package/dist/style-props.d.ts +0 -20
- package/dist/system-types.d.ts +0 -90
- package/dist/theme.d.ts +0 -56
- package/dist/tokens.d.ts +0 -101
- package/dist/utility.d.ts +0 -64
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "The types for css panda",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
6
8
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"source": "./src/index.ts",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
7
17
|
"sideEffects": false,
|
|
8
18
|
"publishConfig": {
|
|
9
19
|
"access": "public"
|
|
@@ -12,16 +22,14 @@
|
|
|
12
22
|
"dist"
|
|
13
23
|
],
|
|
14
24
|
"devDependencies": {
|
|
15
|
-
"chokidar-cli": "^3.0.0",
|
|
16
25
|
"csstype": "3.1.2",
|
|
17
26
|
"hookable": "5.5.3",
|
|
18
27
|
"ncp": "^2.0.0",
|
|
19
28
|
"pkg-types": "1.0.3",
|
|
20
|
-
"@pandacss/extractor": "0.17.
|
|
29
|
+
"@pandacss/extractor": "0.17.2"
|
|
21
30
|
},
|
|
22
31
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"build
|
|
25
|
-
"dev": "chokidar -c 'pnpm build' src --initial"
|
|
32
|
+
"dev": "tsx scripts/watch.ts",
|
|
33
|
+
"build": "PANDA_BUILD=1 tsx scripts/postbuild.ts"
|
|
26
34
|
}
|
|
27
35
|
}
|
package/dist/analyze-report.d.ts
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import type { BoxNodeEmptyInitializer, BoxNodeLiteral, BoxNodeMap } from '@pandacss/extractor'
|
|
2
|
-
import type { Config } from './config'
|
|
3
|
-
|
|
4
|
-
export type ReportItemType = 'object' | 'cva' | 'pattern' | 'recipe' | 'jsx' | 'jsx-factory'
|
|
5
|
-
export interface ReportItem {
|
|
6
|
-
id: number
|
|
7
|
-
from: string
|
|
8
|
-
type: ReportItemType
|
|
9
|
-
filepath: string
|
|
10
|
-
kind: 'function' | 'component'
|
|
11
|
-
path: string[]
|
|
12
|
-
propName: string
|
|
13
|
-
conditionName?: string | undefined
|
|
14
|
-
value: string | number | true
|
|
15
|
-
category: string
|
|
16
|
-
isKnown: boolean
|
|
17
|
-
box: BoxNodeLiteral | BoxNodeEmptyInitializer
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* An instance is either a component usage or a function usage
|
|
22
|
-
* @example an instance name could be 'Button', 'css', 'panda.div', 'vstack', ...
|
|
23
|
-
*/
|
|
24
|
-
export interface ReportInstanceItem extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
|
|
25
|
-
instanceId: number
|
|
26
|
-
contains: Array<ReportItem['id']>
|
|
27
|
-
value: Record<string, any>
|
|
28
|
-
box: BoxNodeMap
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface ReportMaps {
|
|
32
|
-
byInstanceOfKind: Map<'function' | 'component', Set<ReportInstanceItem['instanceId']>>
|
|
33
|
-
byPropertyName: Map<string, Set<ReportItem['id']>>
|
|
34
|
-
byCategory: Map<string, Set<ReportItem['id']>>
|
|
35
|
-
byConditionName: Map<string, Set<ReportItem['id']>>
|
|
36
|
-
byShorthand: Map<string, Set<ReportItem['id']>>
|
|
37
|
-
byTokenName: Map<string, Set<ReportItem['id']>>
|
|
38
|
-
byPropertyPath: Map<string, Set<ReportItem['id']>>
|
|
39
|
-
fromKind: Map<'function' | 'component', Set<ReportItem['id']>>
|
|
40
|
-
byType: Map<string, Set<ReportItem['id']>>
|
|
41
|
-
byInstanceName: Map<string, Set<ReportItem['id']>>
|
|
42
|
-
colorsUsed: Map<string, Set<ReportItem['id']>>
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface ReportCounts {
|
|
46
|
-
filesWithTokens: number
|
|
47
|
-
propNameUsed: number
|
|
48
|
-
tokenUsed: number
|
|
49
|
-
shorthandUsed: number
|
|
50
|
-
propertyPathUsed: number
|
|
51
|
-
typeUsed: number
|
|
52
|
-
instanceNameUsed: number
|
|
53
|
-
kindUsed: number
|
|
54
|
-
instanceOfKindUsed: number
|
|
55
|
-
colorsUsed: number
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface MostUsedItem {
|
|
59
|
-
key: string
|
|
60
|
-
count: number
|
|
61
|
-
}
|
|
62
|
-
export interface ReportStats {
|
|
63
|
-
filesWithMostInstance: Record<string, number>
|
|
64
|
-
filesWithMostPropValueCombinations: Record<string, number>
|
|
65
|
-
mostUseds: {
|
|
66
|
-
propNames: Array<MostUsedItem>
|
|
67
|
-
tokens: Array<MostUsedItem>
|
|
68
|
-
shorthands: Array<MostUsedItem>
|
|
69
|
-
categories: Array<MostUsedItem>
|
|
70
|
-
conditions: Array<MostUsedItem>
|
|
71
|
-
propertyPaths: Array<MostUsedItem>
|
|
72
|
-
types: Array<MostUsedItem>
|
|
73
|
-
instanceNames: Array<MostUsedItem>
|
|
74
|
-
fromKinds: Array<MostUsedItem>
|
|
75
|
-
instanceOfKinds: Array<MostUsedItem>
|
|
76
|
-
colors: Array<MostUsedItem>
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface ReportDetails {
|
|
81
|
-
counts: ReportCounts
|
|
82
|
-
stats: ReportStats
|
|
83
|
-
details: {
|
|
84
|
-
byId: Map<ReportItem['id'], ReportItem>
|
|
85
|
-
byInstanceId: Map<ReportInstanceItem['instanceId'], ReportInstanceItem>
|
|
86
|
-
byFilepath: Map<string, Set<ReportItem['id']>>
|
|
87
|
-
byInstanceInFilepath: Map<string, Set<ReportInstanceItem['instanceId']>>
|
|
88
|
-
globalMaps: ReportMaps
|
|
89
|
-
byFilePathMaps: Map<string, ReportMaps>
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
interface FileSizes {
|
|
94
|
-
normal: string
|
|
95
|
-
minified: string
|
|
96
|
-
gzip: {
|
|
97
|
-
normal: string
|
|
98
|
-
minified: string
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface AnalysisReport extends ReportDetails {
|
|
103
|
-
fileSizes: FileSizes
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
interface ReportMapsJSON {
|
|
107
|
-
byInstanceOfKind: Record<'function' | 'component', Array<ReportInstanceItem['instanceId']>>
|
|
108
|
-
byPropertyName: Record<string, Array<ReportItem['id']>>
|
|
109
|
-
byCategory: Record<string, Array<ReportItem['id']>>
|
|
110
|
-
byConditionName: Record<string, Array<ReportItem['id']>>
|
|
111
|
-
byShorthand: Record<string, Array<ReportItem['id']>>
|
|
112
|
-
byTokenName: Record<string, Array<ReportItem['id']>>
|
|
113
|
-
byPropertyPath: Record<string, Array<ReportItem['id']>>
|
|
114
|
-
fromKind: Record<'function' | 'component', Array<ReportItem['id']>>
|
|
115
|
-
byType: Record<string, Array<ReportItem['id']>>
|
|
116
|
-
byInstanceName: Record<string, Array<ReportItem['id']>>
|
|
117
|
-
colorsUsed: Record<string, Array<ReportItem['id']>>
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export interface ReportItemJSON {
|
|
121
|
-
id: number
|
|
122
|
-
from: string
|
|
123
|
-
type: ReportItemType
|
|
124
|
-
filepath: string
|
|
125
|
-
kind: 'function' | 'component'
|
|
126
|
-
path: string[]
|
|
127
|
-
propName: string
|
|
128
|
-
conditionName?: string | undefined
|
|
129
|
-
value: string | number | true
|
|
130
|
-
category: string
|
|
131
|
-
isKnown: boolean
|
|
132
|
-
box: {
|
|
133
|
-
type: 'literal' | 'empty-initializer'
|
|
134
|
-
value: string | number | boolean | undefined | null
|
|
135
|
-
node: string
|
|
136
|
-
stack: string[]
|
|
137
|
-
line: number
|
|
138
|
-
column: number
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export interface ReportInstanceItemJSON extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
|
|
143
|
-
instanceId: number
|
|
144
|
-
contains: Array<ReportItem['id']>
|
|
145
|
-
value: Record<string, any>
|
|
146
|
-
box: { type: 'map'; value: Record<string, any>; node: string; stack: string[]; line: number; column: number }
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
export interface AnalysisReportJSON {
|
|
150
|
-
counts: ReportCounts
|
|
151
|
-
stats: ReportStats
|
|
152
|
-
details: {
|
|
153
|
-
byId: Record<ReportItemJSON['id'], ReportItemJSON>
|
|
154
|
-
byInstanceId: Record<ReportInstanceItemJSON['instanceId'], ReportInstanceItemJSON>
|
|
155
|
-
byFilepath: Record<string, Array<ReportItemJSON['id']>>
|
|
156
|
-
byInstanceInFilepath: Record<string, Array<ReportInstanceItemJSON['instanceId']>>
|
|
157
|
-
globalMaps: ReportMapsJSON
|
|
158
|
-
byFilePathMaps: Record<string, ReportMapsJSON>
|
|
159
|
-
}
|
|
160
|
-
fileSizes: FileSizes
|
|
161
|
-
cwd: Config['cwd']
|
|
162
|
-
theme: Config['theme']
|
|
163
|
-
utilities: Config['utilities']
|
|
164
|
-
conditions: Config['conditions']
|
|
165
|
-
shorthands: Record<string, string>
|
|
166
|
-
// Generator["parserOptions""]
|
|
167
|
-
parserOptions: {
|
|
168
|
-
importMap: {
|
|
169
|
-
css: string
|
|
170
|
-
recipe: string
|
|
171
|
-
pattern: string
|
|
172
|
-
jsx: string
|
|
173
|
-
}
|
|
174
|
-
jsx: {
|
|
175
|
-
factory: string
|
|
176
|
-
nodes: Array<{ type: 'string'; name: string; props: string[]; baseName: string }>
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
package/dist/composition.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import type { CompositionStyleObject } from './system-types'
|
|
2
|
-
import type { Token } from './tokens'
|
|
3
|
-
|
|
4
|
-
interface Recursive<T> {
|
|
5
|
-
[key: string]: Recursive<T> | T
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/* -----------------------------------------------------------------------------
|
|
9
|
-
* Text styles
|
|
10
|
-
* -----------------------------------------------------------------------------*/
|
|
11
|
-
|
|
12
|
-
type TextStyleProperty =
|
|
13
|
-
| 'fontSize'
|
|
14
|
-
| 'fontSizeAdjust'
|
|
15
|
-
| 'fontVariationSettings'
|
|
16
|
-
| 'fontVariantPosition'
|
|
17
|
-
| 'fontVariantCaps'
|
|
18
|
-
| 'fontVariantNumeric'
|
|
19
|
-
| 'fontVariantAlternates'
|
|
20
|
-
| 'fontVariantLigatures'
|
|
21
|
-
| 'fontFamily'
|
|
22
|
-
| 'fontWeight'
|
|
23
|
-
| 'fontSynthesis'
|
|
24
|
-
| 'fontStyle'
|
|
25
|
-
| 'fontVariant'
|
|
26
|
-
| 'lineHeight'
|
|
27
|
-
| 'letterSpacing'
|
|
28
|
-
| 'textDecoration'
|
|
29
|
-
| 'textTransform'
|
|
30
|
-
| 'textIndent'
|
|
31
|
-
| 'textDecorationColor'
|
|
32
|
-
| 'textDecorationLine'
|
|
33
|
-
| 'textDecorationStyle'
|
|
34
|
-
| 'textEmphasisColor'
|
|
35
|
-
| 'textEmphasisPosition'
|
|
36
|
-
| 'textEmphasisStyle'
|
|
37
|
-
| 'hyphenateCharacter'
|
|
38
|
-
| 'textOrientation'
|
|
39
|
-
| 'textOverflow'
|
|
40
|
-
| 'textRendering'
|
|
41
|
-
|
|
42
|
-
export type TextStyle = CompositionStyleObject<TextStyleProperty>
|
|
43
|
-
|
|
44
|
-
export type TextStyles = Recursive<Token<TextStyle>>
|
|
45
|
-
|
|
46
|
-
/* -----------------------------------------------------------------------------
|
|
47
|
-
* Layer styles
|
|
48
|
-
* -----------------------------------------------------------------------------*/
|
|
49
|
-
|
|
50
|
-
type Placement =
|
|
51
|
-
| 'Top'
|
|
52
|
-
| 'Right'
|
|
53
|
-
| 'Bottom'
|
|
54
|
-
| 'Left'
|
|
55
|
-
| 'Inline'
|
|
56
|
-
| 'Block'
|
|
57
|
-
| 'InlineStart'
|
|
58
|
-
| 'InlineEnd'
|
|
59
|
-
| 'BlockStart'
|
|
60
|
-
| 'BlockEnd'
|
|
61
|
-
|
|
62
|
-
type Radius =
|
|
63
|
-
| `Top${'Right' | 'Left'}`
|
|
64
|
-
| `Bottom${'Right' | 'Left'}`
|
|
65
|
-
| `Start${'Start' | 'End'}`
|
|
66
|
-
| `End${'Start' | 'End'}`
|
|
67
|
-
|
|
68
|
-
type LayerStyleProperty =
|
|
69
|
-
| 'background'
|
|
70
|
-
| 'backgroundColor'
|
|
71
|
-
| 'backgroundImage'
|
|
72
|
-
| 'borderRadius'
|
|
73
|
-
| 'border'
|
|
74
|
-
| 'borderWidth'
|
|
75
|
-
| 'borderColor'
|
|
76
|
-
| 'borderStyle'
|
|
77
|
-
| 'boxShadow'
|
|
78
|
-
| 'filter'
|
|
79
|
-
| 'backdropFilter'
|
|
80
|
-
| 'transform'
|
|
81
|
-
| 'color'
|
|
82
|
-
| 'opacity'
|
|
83
|
-
| 'backgroundBlendMode'
|
|
84
|
-
| 'backgroundAttachment'
|
|
85
|
-
| 'backgroundClip'
|
|
86
|
-
| 'backgroundOrigin'
|
|
87
|
-
| 'backgroundPosition'
|
|
88
|
-
| 'backgroundRepeat'
|
|
89
|
-
| 'backgroundSize'
|
|
90
|
-
| `border${Placement}`
|
|
91
|
-
| `border${Placement}Width`
|
|
92
|
-
| 'borderRadius'
|
|
93
|
-
| `border${Radius}Radius`
|
|
94
|
-
| `border${Placement}Color`
|
|
95
|
-
| `border${Placement}Style`
|
|
96
|
-
| 'padding'
|
|
97
|
-
| `padding${Placement}`
|
|
98
|
-
|
|
99
|
-
export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
100
|
-
|
|
101
|
-
export type LayerStyles = Recursive<Token<LayerStyle>>
|
|
102
|
-
|
|
103
|
-
export interface CompositionStyles {
|
|
104
|
-
textStyles: TextStyles
|
|
105
|
-
layerStyles: LayerStyles
|
|
106
|
-
}
|
package/dist/conditions.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { AnySelector, Selectors } from './selectors'
|
|
2
|
-
|
|
3
|
-
export type ConditionType = 'at-rule' | 'parent-nesting' | 'self-nesting' | 'combinator-nesting'
|
|
4
|
-
|
|
5
|
-
export interface ConditionDetails {
|
|
6
|
-
type: ConditionType
|
|
7
|
-
value: string
|
|
8
|
-
name?: string
|
|
9
|
-
rawValue?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface RawCondition extends ConditionDetails {
|
|
13
|
-
raw: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* -----------------------------------------------------------------------------
|
|
17
|
-
* Shadowed export (in CLI): DO NOT REMOVE
|
|
18
|
-
* -----------------------------------------------------------------------------*/
|
|
19
|
-
|
|
20
|
-
export interface Conditions {
|
|
21
|
-
[condition: string]: string
|
|
22
|
-
}
|
|
23
|
-
export interface ExtendableConditions {
|
|
24
|
-
[condition: string]: string | Conditions | undefined
|
|
25
|
-
extend?: Conditions | undefined
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type Condition = string
|
|
29
|
-
|
|
30
|
-
export type Conditional<V> =
|
|
31
|
-
| V
|
|
32
|
-
| Array<V | null>
|
|
33
|
-
| {
|
|
34
|
-
[K in keyof Conditions]?: Conditional<V>
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export type ConditionalValue<T> = Conditional<T>
|
|
38
|
-
|
|
39
|
-
export type Nested<P> =
|
|
40
|
-
| (P & {
|
|
41
|
-
[K in Selectors]?: Nested<P>
|
|
42
|
-
} & {
|
|
43
|
-
[K in AnySelector]?: Nested<P>
|
|
44
|
-
})
|
|
45
|
-
| {
|
|
46
|
-
[K in Condition]?: Nested<P>
|
|
47
|
-
}
|