@pandacss/types 0.40.1 → 0.42.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/analyze-report.d.ts +107 -113
- package/dist/config.d.ts +0 -21
- package/dist/utility.d.ts +18 -17
- package/package.json +2 -2
package/dist/analyze-report.d.ts
CHANGED
|
@@ -1,45 +1,71 @@
|
|
|
1
|
-
import type { BoxNodeEmptyInitializer, BoxNodeLiteral, BoxNodeMap } from '@pandacss/extractor'
|
|
2
1
|
import type { Config } from './config'
|
|
3
2
|
|
|
4
|
-
export type ReportItemType =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export type ReportItemType =
|
|
4
|
+
| 'css'
|
|
5
|
+
| 'cva'
|
|
6
|
+
| 'sva'
|
|
7
|
+
| 'pattern'
|
|
8
|
+
| 'recipe'
|
|
9
|
+
| 'jsx-factory'
|
|
10
|
+
| 'jsx-pattern'
|
|
11
|
+
| 'jsx-recipe'
|
|
12
|
+
| 'jsx'
|
|
13
|
+
|
|
14
|
+
type ComponentKind = 'component' | 'function'
|
|
15
|
+
|
|
16
|
+
type Range = {
|
|
17
|
+
startPosition: number
|
|
18
|
+
startLineNumber: number
|
|
19
|
+
startColumn: number
|
|
20
|
+
endPosition: number
|
|
21
|
+
endLineNumber: number
|
|
22
|
+
endColumn: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface PropertyReportItem {
|
|
26
|
+
index: string
|
|
27
|
+
componentIndex: ComponentReportItem['componentIndex']
|
|
28
|
+
componentName: ComponentReportItem['componentName']
|
|
29
|
+
reportItemKind: 'token' | 'utility'
|
|
30
|
+
|
|
11
31
|
path: string[]
|
|
12
|
-
propName: string
|
|
13
32
|
conditionName?: string | undefined
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
propName: string
|
|
34
|
+
value: string | number | boolean
|
|
35
|
+
|
|
36
|
+
tokenType?: string
|
|
37
|
+
isKnownValue: boolean
|
|
38
|
+
|
|
39
|
+
range: Range
|
|
40
|
+
filepath: string
|
|
18
41
|
}
|
|
19
42
|
|
|
20
43
|
/**
|
|
21
|
-
* An
|
|
22
|
-
* @example an
|
|
44
|
+
* An component is either a component usage or a function usage
|
|
45
|
+
* @example an component name could be 'Button', 'css', 'panda.div', 'vstack', ...
|
|
23
46
|
*/
|
|
24
|
-
export interface
|
|
25
|
-
|
|
26
|
-
|
|
47
|
+
export interface ComponentReportItem extends Pick<PropertyReportItem, 'filepath'> {
|
|
48
|
+
componentIndex: string
|
|
49
|
+
componentName: string
|
|
50
|
+
reportItemType: ReportItemType
|
|
51
|
+
kind: ComponentKind
|
|
52
|
+
contains: Array<PropertyReportItem['index']>
|
|
27
53
|
value: Record<string, any>
|
|
28
|
-
|
|
54
|
+
range: Range
|
|
29
55
|
}
|
|
30
56
|
|
|
31
|
-
export interface
|
|
32
|
-
|
|
33
|
-
byPropertyName: Map<string, Set<
|
|
34
|
-
|
|
35
|
-
byConditionName: Map<string, Set<
|
|
36
|
-
byShorthand: Map<string, Set<
|
|
37
|
-
byTokenName: Map<string, Set<
|
|
38
|
-
byPropertyPath: Map<string, Set<
|
|
39
|
-
fromKind: Map<
|
|
40
|
-
byType: Map<string, Set<
|
|
41
|
-
|
|
42
|
-
colorsUsed: Map<string, Set<
|
|
57
|
+
export interface ReportDerivedMaps {
|
|
58
|
+
byComponentOfKind: Map<ComponentKind, Set<ComponentReportItem['componentIndex']>>
|
|
59
|
+
byPropertyName: Map<string, Set<PropertyReportItem['index']>>
|
|
60
|
+
byTokenType: Map<string, Set<PropertyReportItem['index']>>
|
|
61
|
+
byConditionName: Map<string, Set<PropertyReportItem['index']>>
|
|
62
|
+
byShorthand: Map<string, Set<PropertyReportItem['index']>>
|
|
63
|
+
byTokenName: Map<string, Set<PropertyReportItem['index']>>
|
|
64
|
+
byPropertyPath: Map<string, Set<PropertyReportItem['index']>>
|
|
65
|
+
fromKind: Map<ComponentKind, Set<PropertyReportItem['index']>>
|
|
66
|
+
byType: Map<string, Set<PropertyReportItem['index']>>
|
|
67
|
+
byComponentName: Map<string, Set<PropertyReportItem['index']>>
|
|
68
|
+
colorsUsed: Map<string, Set<PropertyReportItem['index']>>
|
|
43
69
|
}
|
|
44
70
|
|
|
45
71
|
export interface ReportCounts {
|
|
@@ -49,9 +75,9 @@ export interface ReportCounts {
|
|
|
49
75
|
shorthandUsed: number
|
|
50
76
|
propertyPathUsed: number
|
|
51
77
|
typeUsed: number
|
|
52
|
-
|
|
78
|
+
componentNameUsed: number
|
|
53
79
|
kindUsed: number
|
|
54
|
-
|
|
80
|
+
componentOfKindUsed: number
|
|
55
81
|
colorsUsed: number
|
|
56
82
|
}
|
|
57
83
|
|
|
@@ -60,8 +86,7 @@ export interface MostUsedItem {
|
|
|
60
86
|
count: number
|
|
61
87
|
}
|
|
62
88
|
export interface ReportStats {
|
|
63
|
-
|
|
64
|
-
filesWithMostPropValueCombinations: Record<string, number>
|
|
89
|
+
filesWithMostComponent: Record<string, number>
|
|
65
90
|
mostUseds: {
|
|
66
91
|
propNames: Array<MostUsedItem>
|
|
67
92
|
tokens: Array<MostUsedItem>
|
|
@@ -70,9 +95,9 @@ export interface ReportStats {
|
|
|
70
95
|
conditions: Array<MostUsedItem>
|
|
71
96
|
propertyPaths: Array<MostUsedItem>
|
|
72
97
|
types: Array<MostUsedItem>
|
|
73
|
-
|
|
98
|
+
componentNames: Array<MostUsedItem>
|
|
74
99
|
fromKinds: Array<MostUsedItem>
|
|
75
|
-
|
|
100
|
+
componentOfKinds: Array<MostUsedItem>
|
|
76
101
|
colors: Array<MostUsedItem>
|
|
77
102
|
}
|
|
78
103
|
}
|
|
@@ -80,13 +105,15 @@ export interface ReportStats {
|
|
|
80
105
|
export interface ReportDetails {
|
|
81
106
|
counts: ReportCounts
|
|
82
107
|
stats: ReportStats
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
|
90
117
|
}
|
|
91
118
|
}
|
|
92
119
|
|
|
@@ -97,83 +124,50 @@ interface FileSizes {
|
|
|
97
124
|
normal: string
|
|
98
125
|
minified: string
|
|
99
126
|
}
|
|
127
|
+
lightningCss?: {
|
|
128
|
+
normal: string
|
|
129
|
+
minified: string
|
|
130
|
+
}
|
|
100
131
|
}
|
|
101
132
|
|
|
102
|
-
export interface
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
export interface ReportSnapshot {
|
|
134
|
+
schemaVersion: string
|
|
135
|
+
details: ReportDetails
|
|
136
|
+
config: Omit<Config, 'globalCss'>
|
|
105
137
|
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
}
|
|
138
|
+
propByIndex: Map<PropertyReportItem['index'], PropertyReportItem>
|
|
139
|
+
componentByIndex: Map<ComponentReportItem['componentIndex'], ComponentReportItem>
|
|
119
140
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
|
141
|
+
derived: {
|
|
142
|
+
byFilepath: Map<string, Set<PropertyReportItem['index']>>
|
|
143
|
+
byComponentInFilepath: Map<string, Set<ComponentReportItem['componentIndex']>>
|
|
144
|
+
globalMaps: ReportDerivedMaps
|
|
145
|
+
byFilePathMaps: Map<string, ReportDerivedMaps>
|
|
139
146
|
}
|
|
140
147
|
}
|
|
141
148
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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']>>
|
|
147
161
|
}
|
|
148
162
|
|
|
149
|
-
export interface
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
}
|
|
163
|
+
export interface ReportSnapshotJSON extends Omit<ReportSnapshot, 'propByIndex' | 'componentByIndex' | 'derived'> {
|
|
164
|
+
propByIndex: Record<PropertyReportItem['index'], PropertyReportItem>
|
|
165
|
+
componentByIndex: Record<ComponentReportItem['componentIndex'], ComponentReportItem>
|
|
166
|
+
|
|
167
|
+
derived: {
|
|
168
|
+
byFilepath: Record<string, Array<PropertyReportItem['index']>>
|
|
169
|
+
byComponentInFilepath: Record<string, Array<ComponentReportItem['componentIndex']>>
|
|
170
|
+
globalMaps: ReportDerivedMapsJSON
|
|
171
|
+
byFilePathMaps: Record<string, ReportDerivedMapsJSON>
|
|
178
172
|
}
|
|
179
173
|
}
|
package/dist/config.d.ts
CHANGED
|
@@ -311,11 +311,6 @@ interface CssgenOptions {
|
|
|
311
311
|
* @default '_'
|
|
312
312
|
*/
|
|
313
313
|
separator?: '_' | '=' | '-'
|
|
314
|
-
/**
|
|
315
|
-
* Whether to optimize the generated css.
|
|
316
|
-
* @default true
|
|
317
|
-
*/
|
|
318
|
-
optimize?: boolean
|
|
319
314
|
/**
|
|
320
315
|
* Whether to minify the generated css.
|
|
321
316
|
* @default false
|
|
@@ -355,22 +350,6 @@ interface CssgenOptions {
|
|
|
355
350
|
}
|
|
356
351
|
|
|
357
352
|
interface CodegenOptions {
|
|
358
|
-
/**
|
|
359
|
-
* Whether to emit the artifacts to `node_modules` as a package.
|
|
360
|
-
* @default false
|
|
361
|
-
* @deprecated `emitPackage` is deprecated, it's known for causing several issues:
|
|
362
|
-
* - bundlers sometimes eagerly cache the `node_modules`, leading to `panda codegen` updates to the `styled-system` not visible in the browser
|
|
363
|
-
* - auto-imports are not suggested in your IDE.
|
|
364
|
-
* - in some IDE the typings are not always reflected properly
|
|
365
|
-
*
|
|
366
|
-
* As alternatives, you can use:
|
|
367
|
-
* - relative paths instead of absolute paths (e.g. `../styled-system/css` instead of `styled-system/css`)
|
|
368
|
-
* - use package.json #imports and/or tsconfig path aliases (prefer package.json#imports when possible, TS 5.4 supports them by default) like `#styled-system/css` instead of `styled-system/css`
|
|
369
|
-
* @see https://nodejs.org/api/packages.html#subpath-imports
|
|
370
|
-
* - for a component library, use a dedicated workspace package (e.g. `@acme/styled-system`) and use `importMap: "@acme/styled-system"` so that Panda knows which entrypoint to extract, e.g. `import { css } from '@acme/styled-system/css'`
|
|
371
|
-
* @see https://panda-css.com/docs/guides/component-library
|
|
372
|
-
*/
|
|
373
|
-
emitPackage?: boolean
|
|
374
353
|
/**
|
|
375
354
|
* Whether to only emit the `tokens` directory
|
|
376
355
|
* @default false
|
package/dist/utility.d.ts
CHANGED
|
@@ -71,33 +71,34 @@ export interface PropertyConfig {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export type CssSemanticGroup =
|
|
74
|
-
| '
|
|
74
|
+
| 'Animation'
|
|
75
|
+
| 'Background Gradient'
|
|
76
|
+
| 'Background'
|
|
77
|
+
| 'Border Radius'
|
|
78
|
+
| 'Border'
|
|
79
|
+
| 'Color'
|
|
75
80
|
| 'Container'
|
|
76
81
|
| 'Display'
|
|
77
|
-
| '
|
|
78
|
-
| 'Position'
|
|
79
|
-
| 'Transform'
|
|
82
|
+
| 'Effect'
|
|
80
83
|
| 'Flex Layout'
|
|
81
84
|
| 'Grid Layout'
|
|
82
|
-
| 'Layout'
|
|
83
|
-
| 'Border'
|
|
84
|
-
| 'Border Radius'
|
|
85
|
-
| 'Width'
|
|
86
85
|
| 'Height'
|
|
86
|
+
| 'Interactivity'
|
|
87
|
+
| 'Layout'
|
|
88
|
+
| 'List'
|
|
87
89
|
| 'Margin'
|
|
90
|
+
| 'Other'
|
|
88
91
|
| 'Padding'
|
|
89
|
-
| '
|
|
90
|
-
| '
|
|
91
|
-
| 'Background'
|
|
92
|
-
| 'Background Gradient'
|
|
92
|
+
| 'Position'
|
|
93
|
+
| 'Scroll'
|
|
93
94
|
| 'Shadow'
|
|
95
|
+
| 'System'
|
|
94
96
|
| 'Table'
|
|
95
|
-
| '
|
|
96
|
-
| 'Scroll'
|
|
97
|
-
| 'Interactivity'
|
|
97
|
+
| 'Transform'
|
|
98
98
|
| 'Transition'
|
|
99
|
-
| '
|
|
100
|
-
| '
|
|
99
|
+
| 'Typography'
|
|
100
|
+
| 'Visibility'
|
|
101
|
+
| 'Width'
|
|
101
102
|
|
|
102
103
|
export type UtilityConfig = {
|
|
103
104
|
[property in LiteralUnion<CssProperty>]?: PropertyConfig
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "The types for css panda",
|
|
5
5
|
"main": "dist/index.d.ts",
|
|
6
6
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"ncp": "2.0.0",
|
|
32
32
|
"pkg-types": "1.0.3",
|
|
33
33
|
"ts-morph": "21.0.1",
|
|
34
|
-
"@pandacss/extractor": "0.
|
|
34
|
+
"@pandacss/extractor": "0.42.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "tsx scripts/watch.ts",
|