@pandacss/types 0.49.0 → 0.51.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/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ParserResultInterface } from './parser'
|
|
2
2
|
|
|
3
3
|
export type ReportItemType =
|
|
4
4
|
| 'css'
|
|
@@ -13,7 +13,7 @@ export type ReportItemType =
|
|
|
13
13
|
|
|
14
14
|
type ComponentKind = 'component' | 'function'
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
interface PropertyLocationRange {
|
|
17
17
|
startPosition: number
|
|
18
18
|
startLineNumber: number
|
|
19
19
|
startColumn: number
|
|
@@ -27,6 +27,7 @@ export interface PropertyReportItem {
|
|
|
27
27
|
componentIndex: ComponentReportItem['componentIndex']
|
|
28
28
|
componentName: ComponentReportItem['componentName']
|
|
29
29
|
reportItemKind: 'token' | 'utility'
|
|
30
|
+
reportItemType: ReportItemType
|
|
30
31
|
|
|
31
32
|
path: string[]
|
|
32
33
|
conditionName?: string | undefined
|
|
@@ -36,7 +37,7 @@ export interface PropertyReportItem {
|
|
|
36
37
|
tokenType?: string
|
|
37
38
|
isKnownValue: boolean
|
|
38
39
|
|
|
39
|
-
range:
|
|
40
|
+
range: PropertyLocationRange | null
|
|
40
41
|
filepath: string
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -51,7 +52,8 @@ export interface ComponentReportItem extends Pick<PropertyReportItem, 'filepath'
|
|
|
51
52
|
kind: ComponentKind
|
|
52
53
|
contains: Array<PropertyReportItem['index']>
|
|
53
54
|
value: Record<string, any>
|
|
54
|
-
range:
|
|
55
|
+
range: PropertyLocationRange | null
|
|
56
|
+
debug?: boolean
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export interface ReportDerivedMaps {
|
|
@@ -68,6 +70,20 @@ export interface ReportDerivedMaps {
|
|
|
68
70
|
colorsUsed: Map<string, Set<PropertyReportItem['index']>>
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
interface ReportDerivedMapsJSON {
|
|
74
|
+
byComponentOfKind: Record<ComponentKind, Array<ComponentReportItem['componentIndex']>>
|
|
75
|
+
byPropertyName: Record<string, Array<PropertyReportItem['index']>>
|
|
76
|
+
byTokenType: Record<string, Array<PropertyReportItem['index']>>
|
|
77
|
+
byConditionName: Record<string, Array<PropertyReportItem['index']>>
|
|
78
|
+
byShorthand: Record<string, Array<PropertyReportItem['index']>>
|
|
79
|
+
byTokenName: Record<string, Array<PropertyReportItem['index']>>
|
|
80
|
+
byPropertyPath: Record<string, Array<PropertyReportItem['index']>>
|
|
81
|
+
fromKind: Record<ComponentKind, Array<PropertyReportItem['index']>>
|
|
82
|
+
byType: Record<string, Array<PropertyReportItem['index']>>
|
|
83
|
+
byComponentName: Record<string, Array<PropertyReportItem['index']>>
|
|
84
|
+
colorsUsed: Record<string, Array<PropertyReportItem['index']>>
|
|
85
|
+
}
|
|
86
|
+
|
|
71
87
|
export interface ReportCounts {
|
|
72
88
|
filesWithTokens: number
|
|
73
89
|
propNameUsed: number
|
|
@@ -85,6 +101,7 @@ export interface MostUsedItem {
|
|
|
85
101
|
key: string
|
|
86
102
|
count: number
|
|
87
103
|
}
|
|
104
|
+
|
|
88
105
|
export interface ReportStats {
|
|
89
106
|
filesWithMostComponent: Record<string, number>
|
|
90
107
|
mostUseds: {
|
|
@@ -105,69 +122,45 @@ export interface ReportStats {
|
|
|
105
122
|
export interface ReportDetails {
|
|
106
123
|
counts: ReportCounts
|
|
107
124
|
stats: ReportStats
|
|
108
|
-
fileSizes: FileSizes
|
|
109
|
-
duration: {
|
|
110
|
-
classify: number
|
|
111
|
-
cssMs: number
|
|
112
|
-
cssMinifyMs: number
|
|
113
|
-
extractTotal: number
|
|
114
|
-
extractTimeByFiles: Record<string, number>
|
|
115
|
-
lightningCssMs?: number
|
|
116
|
-
lightningCssMinifiedMs?: number
|
|
117
|
-
}
|
|
118
125
|
}
|
|
119
126
|
|
|
120
|
-
interface
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
export interface AnalysisOptions {
|
|
128
|
+
onResult?: (file: string, result: ParserResultInterface) => void
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface ReportDerivedMap {
|
|
132
|
+
byFilepath: Map<string, Set<PropertyReportItem['index']>>
|
|
133
|
+
byComponentInFilepath: Map<string, Set<ComponentReportItem['componentIndex']>>
|
|
134
|
+
globalMaps: ReportDerivedMaps
|
|
135
|
+
byFilePathMaps: Map<string, ReportDerivedMaps>
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface ReportDerivedMapJSON {
|
|
139
|
+
byFilepath: Record<string, Array<PropertyReportItem['index']>>
|
|
140
|
+
byComponentInFilepath: Record<string, Array<ComponentReportItem['componentIndex']>>
|
|
141
|
+
globalMaps: ReportDerivedMapsJSON
|
|
142
|
+
byFilePathMaps: Record<string, ReportDerivedMapsJSON>
|
|
131
143
|
}
|
|
132
144
|
|
|
133
|
-
export interface
|
|
145
|
+
export interface AnalysisReport {
|
|
134
146
|
schemaVersion: string
|
|
135
147
|
details: ReportDetails
|
|
136
|
-
config: Omit<Config, 'globalCss' | 'globalFontface'>
|
|
137
148
|
|
|
138
149
|
propByIndex: Map<PropertyReportItem['index'], PropertyReportItem>
|
|
139
150
|
componentByIndex: Map<ComponentReportItem['componentIndex'], ComponentReportItem>
|
|
140
151
|
|
|
141
|
-
derived:
|
|
142
|
-
byFilepath: Map<string, Set<PropertyReportItem['index']>>
|
|
143
|
-
byComponentInFilepath: Map<string, Set<ComponentReportItem['componentIndex']>>
|
|
144
|
-
globalMaps: ReportDerivedMaps
|
|
145
|
-
byFilePathMaps: Map<string, ReportDerivedMaps>
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
interface ReportDerivedMapsJSON {
|
|
150
|
-
byComponentOfKind: Record<ComponentKind, Array<ComponentReportItem['componentIndex']>>
|
|
151
|
-
byPropertyName: Record<string, Array<PropertyReportItem['index']>>
|
|
152
|
-
byTokenType: Record<string, Array<PropertyReportItem['index']>>
|
|
153
|
-
byConditionName: Record<string, Array<PropertyReportItem['index']>>
|
|
154
|
-
byShorthand: Record<string, Array<PropertyReportItem['index']>>
|
|
155
|
-
byTokenName: Record<string, Array<PropertyReportItem['index']>>
|
|
156
|
-
byPropertyPath: Record<string, Array<PropertyReportItem['index']>>
|
|
157
|
-
fromKind: Record<ComponentKind, Array<PropertyReportItem['index']>>
|
|
158
|
-
byType: Record<string, Array<PropertyReportItem['index']>>
|
|
159
|
-
byComponentName: Record<string, Array<PropertyReportItem['index']>>
|
|
160
|
-
colorsUsed: Record<string, Array<PropertyReportItem['index']>>
|
|
152
|
+
derived: ReportDerivedMap
|
|
161
153
|
}
|
|
162
154
|
|
|
163
|
-
export interface ReportSnapshotJSON extends Omit<
|
|
155
|
+
export interface ReportSnapshotJSON extends Omit<AnalysisReport, 'propByIndex' | 'componentByIndex' | 'derived'> {
|
|
164
156
|
propByIndex: Record<PropertyReportItem['index'], PropertyReportItem>
|
|
165
157
|
componentByIndex: Record<ComponentReportItem['componentIndex'], ComponentReportItem>
|
|
158
|
+
derived: ReportDerivedMapJSON
|
|
159
|
+
}
|
|
166
160
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
161
|
+
export interface ClassifyReport {
|
|
162
|
+
propById: Map<string, PropertyReportItem>
|
|
163
|
+
componentById: Map<ComponentReportItem['componentIndex'], ComponentReportItem>
|
|
164
|
+
details: Pick<ReportDetails, 'counts' | 'stats'>
|
|
165
|
+
derived: ReportDerivedMap
|
|
173
166
|
}
|
package/dist/tokens.d.ts
CHANGED
|
@@ -42,10 +42,10 @@ export interface Border {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export interface Shadow {
|
|
45
|
-
offsetX: number
|
|
46
|
-
offsetY: number
|
|
47
|
-
blur: number
|
|
48
|
-
spread: number
|
|
45
|
+
offsetX: number | string
|
|
46
|
+
offsetY: number | string
|
|
47
|
+
blur: number | string
|
|
48
|
+
spread: number | string
|
|
49
49
|
color: string
|
|
50
50
|
inset?: boolean
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.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,8 +30,8 @@
|
|
|
30
30
|
"microdiff": "1.3.2",
|
|
31
31
|
"ncp": "2.0.0",
|
|
32
32
|
"pkg-types": "1.0.3",
|
|
33
|
-
"ts-morph": "
|
|
34
|
-
"@pandacss/extractor": "0.
|
|
33
|
+
"ts-morph": "24.0.0",
|
|
34
|
+
"@pandacss/extractor": "0.51.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "tsx scripts/watch.ts",
|