@pandacss/types 0.36.1 → 0.37.1

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
@@ -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: string
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
@@ -173,19 +174,21 @@ export interface ExtendableOptions {
173
174
  }
174
175
 
175
176
  export interface ImportMapInput {
176
- css: string
177
- recipes: string
178
- patterns: string
179
- jsx?: string
177
+ css?: string | string[]
178
+ recipes?: string | string[]
179
+ patterns?: string | string[]
180
+ jsx?: string | string[]
180
181
  }
181
182
 
182
- export interface ImportMapOutput<T = string[]> {
183
- css: T
184
- recipe: T
185
- pattern: T
186
- jsx: T
183
+ export interface ImportMapOutput<T = string> {
184
+ css: T[]
185
+ recipe: T[]
186
+ pattern: T[]
187
+ jsx: T[]
187
188
  }
188
189
 
190
+ type ImportMapOption = string | ImportMapInput
191
+
189
192
  interface FileSystemOptions {
190
193
  /**
191
194
  * Whether to clean the output directory before generating the css.
@@ -209,7 +212,7 @@ interface FileSystemOptions {
209
212
  * }
210
213
  * ```
211
214
  */
212
- importMap?: string | ImportMapInput
215
+ importMap?: ImportMapOption | Array<ImportMapOption>
213
216
  /**
214
217
  * List of files glob to watch for changes.
215
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/recipe.d.ts CHANGED
@@ -45,6 +45,7 @@ export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVa
45
45
  splitVariantProps<Props extends RecipeSelection<T>>(
46
46
  props: Props,
47
47
  ): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
48
+ getVariantProps: (props?: RecipeSelection<T>) => RecipeSelection<T>
48
49
  }
49
50
 
50
51
  type OneOrMore<T> = T | Array<T>
@@ -121,7 +122,7 @@ export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVaria
121
122
  raw: (props?: RecipeSelection<T>) => Record<S, SystemStyleObject>
122
123
  variantKeys: (keyof T)[]
123
124
  variantMap: RecipeVariantMap<T>
124
- splitVariantProps<Props extends RecipeSelection<T>>(props: Props): [RecipeSelection<T>, Pretty<Omit<Props, keyof T>>]
125
+ getVariantProps: (props?: RecipeSelection<T>) => RecipeSelection<T>
125
126
  }
126
127
 
127
128
  export type SlotRecipeCompoundVariant<S extends string, T> = T & {
package/dist/utility.d.ts CHANGED
@@ -85,6 +85,7 @@ export type CssSemanticGroup =
85
85
  | 'Color'
86
86
  | 'Typography'
87
87
  | 'Background'
88
+ | 'Background Gradient'
88
89
  | 'Shadow'
89
90
  | 'Table'
90
91
  | 'List'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.36.1",
3
+ "version": "0.37.1",
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.36.1"
34
+ "@pandacss/extractor": "0.37.1"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "tsx scripts/watch.ts",