@pandacss/types 0.36.0 → 0.37.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/config.d.ts +15 -20
- package/dist/hooks.d.ts +9 -1
- package/dist/utility.d.ts +1 -0
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ interface ExtendableStaticCssOptions extends StaticCssOptions {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export type CssPropertySyntax =
|
|
87
|
+
| '*'
|
|
87
88
|
| '<length>'
|
|
88
89
|
| '<number>'
|
|
89
90
|
| '<percentage>'
|
|
@@ -108,7 +109,7 @@ export interface CssPropertyDefinition {
|
|
|
108
109
|
* Sets the initial value for the property.
|
|
109
110
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/initial-value
|
|
110
111
|
*/
|
|
111
|
-
initialValue
|
|
112
|
+
initialValue?: string
|
|
112
113
|
/**
|
|
113
114
|
* Describes the allowable syntax for the property.
|
|
114
115
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
|
|
@@ -125,15 +126,7 @@ interface ExtendableGlobalVars {
|
|
|
125
126
|
extend?: GlobalVarsDefinition
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
export interface ThemeVariant extends Pick<Theme, 'tokens' | 'semanticTokens'> {
|
|
129
|
-
/**
|
|
130
|
-
* Selector attribute to use for the generated theme, can be any `data-*` attribute
|
|
131
|
-
* @default 'data-panda-theme'
|
|
132
|
-
* ```
|
|
133
|
-
*
|
|
134
|
-
*/
|
|
135
|
-
attribute?: `data-${string}`
|
|
136
|
-
}
|
|
129
|
+
export interface ThemeVariant extends Pick<Theme, 'tokens' | 'semanticTokens'> {}
|
|
137
130
|
|
|
138
131
|
export interface ThemeVariantsMap {
|
|
139
132
|
[name: string]: ThemeVariant
|
|
@@ -181,19 +174,21 @@ export interface ExtendableOptions {
|
|
|
181
174
|
}
|
|
182
175
|
|
|
183
176
|
export interface ImportMapInput {
|
|
184
|
-
css
|
|
185
|
-
recipes
|
|
186
|
-
patterns
|
|
187
|
-
jsx?: string
|
|
177
|
+
css?: string | string[]
|
|
178
|
+
recipes?: string | string[]
|
|
179
|
+
patterns?: string | string[]
|
|
180
|
+
jsx?: string | string[]
|
|
188
181
|
}
|
|
189
182
|
|
|
190
|
-
export interface ImportMapOutput<T = string
|
|
191
|
-
css: T
|
|
192
|
-
recipe: T
|
|
193
|
-
pattern: T
|
|
194
|
-
jsx: T
|
|
183
|
+
export interface ImportMapOutput<T = string> {
|
|
184
|
+
css: T[]
|
|
185
|
+
recipe: T[]
|
|
186
|
+
pattern: T[]
|
|
187
|
+
jsx: T[]
|
|
195
188
|
}
|
|
196
189
|
|
|
190
|
+
type ImportMapOption = string | ImportMapInput
|
|
191
|
+
|
|
197
192
|
interface FileSystemOptions {
|
|
198
193
|
/**
|
|
199
194
|
* Whether to clean the output directory before generating the css.
|
|
@@ -217,7 +212,7 @@ interface FileSystemOptions {
|
|
|
217
212
|
* }
|
|
218
213
|
* ```
|
|
219
214
|
*/
|
|
220
|
-
importMap?:
|
|
215
|
+
importMap?: ImportMapOption | Array<ImportMapOption>
|
|
221
216
|
/**
|
|
222
217
|
* List of files glob to watch for changes.
|
|
223
218
|
* @default []
|
package/dist/hooks.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Artifact, ArtifactId, DiffConfigResult } from './artifact'
|
|
|
2
2
|
import type { LoadConfigResult, UserConfig } from './config'
|
|
3
3
|
import type { HooksApiInterface } from './hooks-api'
|
|
4
4
|
import type { LoggerInterface } from './logger'
|
|
5
|
-
import type { ParserResultInterface } from './parser'
|
|
5
|
+
import type { ParserResultInterface, ResultItem } from './parser'
|
|
6
6
|
|
|
7
7
|
export interface PandaHooks {
|
|
8
8
|
/**
|
|
@@ -32,6 +32,10 @@ export interface PandaHooks {
|
|
|
32
32
|
* You can also use this hook to parse the file's content on your side using a custom parser, in this case you don't have to return anything.
|
|
33
33
|
*/
|
|
34
34
|
'parser:before': (args: ParserResultBeforeHookArgs) => string | void
|
|
35
|
+
/**
|
|
36
|
+
* @private USE IT ONLY IF YOU KNOW WHAT YOU ARE DOING
|
|
37
|
+
*/
|
|
38
|
+
'parser:preprocess': JsxFactoryResultTransform['transform']
|
|
35
39
|
/**
|
|
36
40
|
* Called after the file styles are extracted and processed into the resulting ParserResult object.
|
|
37
41
|
* You can also use this hook to add your own extraction results from your custom parser to the ParserResult object.
|
|
@@ -149,6 +153,10 @@ export interface ParserResultBeforeHookArgs {
|
|
|
149
153
|
original?: string
|
|
150
154
|
}
|
|
151
155
|
|
|
156
|
+
export interface JsxFactoryResultTransform {
|
|
157
|
+
transform: (result: { type: 'jsx-factory'; data: ResultItem['data'] }) => ResultItem['data']
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
export interface ParserResultAfterHookArgs {
|
|
153
161
|
filePath: string
|
|
154
162
|
result: ParserResultInterface | undefined
|
package/dist/utility.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.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.37.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "tsx scripts/watch.ts",
|