@pandacss/types 0.0.0-dev-20240326210434 → 0.0.0-dev-20240328120054

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 CHANGED
@@ -173,19 +173,21 @@ export interface ExtendableOptions {
173
173
  }
174
174
 
175
175
  export interface ImportMapInput {
176
- css: string
177
- recipes: string
178
- patterns: string
179
- jsx?: string
176
+ css?: string | string[]
177
+ recipes?: string | string[]
178
+ patterns?: string | string[]
179
+ jsx?: string | string[]
180
180
  }
181
181
 
182
- export interface ImportMapOutput<T = string[]> {
183
- css: T
184
- recipe: T
185
- pattern: T
186
- jsx: T
182
+ export interface ImportMapOutput<T = string> {
183
+ css: T[]
184
+ recipe: T[]
185
+ pattern: T[]
186
+ jsx: T[]
187
187
  }
188
188
 
189
+ type ImportMapOption = string | ImportMapInput
190
+
189
191
  interface FileSystemOptions {
190
192
  /**
191
193
  * Whether to clean the output directory before generating the css.
@@ -209,7 +211,7 @@ interface FileSystemOptions {
209
211
  * }
210
212
  * ```
211
213
  */
212
- importMap?: string | ImportMapInput
214
+ importMap?: ImportMapOption | Array<ImportMapOption>
213
215
  /**
214
216
  * List of files glob to watch for changes.
215
217
  * @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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.0.0-dev-20240326210434",
3
+ "version": "0.0.0-dev-20240328120054",
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.0.0-dev-20240326210434"
34
+ "@pandacss/extractor": "0.0.0-dev-20240328120054"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "tsx scripts/watch.ts",