@pandacss/types 0.48.1 → 0.50.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/composition.d.ts +26 -0
- package/dist/index.d.ts +1 -1
- package/dist/{analyze-report.d.ts → reporter.d.ts} +47 -54
- package/dist/theme.d.ts +5 -1
- package/dist/tokens.d.ts +4 -4
- package/package.json +2 -2
package/dist/composition.d.ts
CHANGED
|
@@ -131,7 +131,33 @@ export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
|
131
131
|
|
|
132
132
|
export type LayerStyles = Recursive<Token<LayerStyle>>
|
|
133
133
|
|
|
134
|
+
/* -----------------------------------------------------------------------------
|
|
135
|
+
* Motion styles
|
|
136
|
+
* -----------------------------------------------------------------------------*/
|
|
137
|
+
|
|
138
|
+
type AnimationStyleProperty =
|
|
139
|
+
| 'animation'
|
|
140
|
+
| 'animationComposition'
|
|
141
|
+
| 'animationDelay'
|
|
142
|
+
| 'animationDirection'
|
|
143
|
+
| 'animationDuration'
|
|
144
|
+
| 'animationFillMode'
|
|
145
|
+
| 'animationIterationCount'
|
|
146
|
+
| 'animationName'
|
|
147
|
+
| 'animationPlayState'
|
|
148
|
+
| 'animationTimingFunction'
|
|
149
|
+
| 'animationRange'
|
|
150
|
+
| 'animationRangeStart'
|
|
151
|
+
| 'animationRangeEnd'
|
|
152
|
+
| 'animationTimeline'
|
|
153
|
+
| 'transformOrigin'
|
|
154
|
+
|
|
155
|
+
export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>
|
|
156
|
+
|
|
157
|
+
export type AnimationStyles = Recursive<Token<AnimationStyle>>
|
|
158
|
+
|
|
134
159
|
export interface CompositionStyles {
|
|
135
160
|
textStyles: TextStyles
|
|
136
161
|
layerStyles: LayerStyles
|
|
162
|
+
animationStyles: AnimationStyles
|
|
137
163
|
}
|
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/theme.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LayerStyles, TextStyles } from './composition'
|
|
1
|
+
import type { AnimationStyles, LayerStyles, TextStyles } from './composition'
|
|
2
2
|
import type { RecipeConfig, SlotRecipeConfig } from './recipe'
|
|
3
3
|
import type { CssKeyframes } from './system-types'
|
|
4
4
|
import type { SemanticTokens, Tokens } from './tokens'
|
|
@@ -28,6 +28,10 @@ export interface Theme {
|
|
|
28
28
|
* The layer styles for your project.
|
|
29
29
|
*/
|
|
30
30
|
layerStyles?: LayerStyles
|
|
31
|
+
/**
|
|
32
|
+
* The animation styles for your project.
|
|
33
|
+
*/
|
|
34
|
+
animationStyles?: AnimationStyles
|
|
31
35
|
/**
|
|
32
36
|
* Multi-variant style definitions for your project.
|
|
33
37
|
* Useful for defining component styles.
|
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.50.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.50.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "tsx scripts/watch.ts",
|