@pandacss/types 0.15.1 → 0.15.2

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.
@@ -2,7 +2,7 @@ import type { BoxNodeEmptyInitializer, BoxNodeLiteral, BoxNodeMap } from '@panda
2
2
  import type { Config } from './config'
3
3
 
4
4
  export type ReportItemType = 'object' | 'cva' | 'pattern' | 'recipe' | 'jsx' | 'jsx-factory'
5
- export type ReportItem = {
5
+ export interface ReportItem {
6
6
  id: number
7
7
  from: string
8
8
  type: ReportItemType
@@ -21,14 +21,14 @@ export type ReportItem = {
21
21
  * An instance is either a component usage or a function usage
22
22
  * @example an instance name could be 'Button', 'css', 'panda.div', 'vstack', ...
23
23
  */
24
- export type ReportInstanceItem = Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> & {
24
+ export interface ReportInstanceItem extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
25
25
  instanceId: number
26
26
  contains: Array<ReportItem['id']>
27
27
  value: Record<string, any>
28
28
  box: BoxNodeMap
29
29
  }
30
30
 
31
- export type ReportMaps = {
31
+ export interface ReportMaps {
32
32
  byInstanceOfKind: Map<'function' | 'component', Set<ReportInstanceItem['instanceId']>>
33
33
  byPropertyName: Map<string, Set<ReportItem['id']>>
34
34
  byCategory: Map<string, Set<ReportItem['id']>>
@@ -42,7 +42,7 @@ export type ReportMaps = {
42
42
  colorsUsed: Map<string, Set<ReportItem['id']>>
43
43
  }
44
44
 
45
- export type ReportCounts = {
45
+ export interface ReportCounts {
46
46
  filesWithTokens: number
47
47
  propNameUsed: number
48
48
  tokenUsed: number
@@ -55,8 +55,11 @@ export type ReportCounts = {
55
55
  colorsUsed: number
56
56
  }
57
57
 
58
- export type MostUsedItem = { key: string; count: number }
59
- export type ReportStats = {
58
+ export interface MostUsedItem {
59
+ key: string
60
+ count: number
61
+ }
62
+ export interface ReportStats {
60
63
  filesWithMostInstance: Record<string, number>
61
64
  filesWithMostPropValueCombinations: Record<string, number>
62
65
  mostUseds: {
@@ -74,7 +77,7 @@ export type ReportStats = {
74
77
  }
75
78
  }
76
79
 
77
- export type ReportDetails = {
80
+ export interface ReportDetails {
78
81
  counts: ReportCounts
79
82
  stats: ReportStats
80
83
  details: {
@@ -87,7 +90,7 @@ export type ReportDetails = {
87
90
  }
88
91
  }
89
92
 
90
- type FileSizes = {
93
+ interface FileSizes {
91
94
  normal: string
92
95
  minified: string
93
96
  gzip: {
@@ -96,11 +99,11 @@ type FileSizes = {
96
99
  }
97
100
  }
98
101
 
99
- export type AnalysisReport = ReportDetails & {
102
+ export interface AnalysisReport extends ReportDetails {
100
103
  fileSizes: FileSizes
101
104
  }
102
105
 
103
- type ReportMapsJSON = {
106
+ interface ReportMapsJSON {
104
107
  byInstanceOfKind: Record<'function' | 'component', Array<ReportInstanceItem['instanceId']>>
105
108
  byPropertyName: Record<string, Array<ReportItem['id']>>
106
109
  byCategory: Record<string, Array<ReportItem['id']>>
@@ -114,7 +117,7 @@ type ReportMapsJSON = {
114
117
  colorsUsed: Record<string, Array<ReportItem['id']>>
115
118
  }
116
119
 
117
- export type ReportItemJSON = {
120
+ export interface ReportItemJSON {
118
121
  id: number
119
122
  from: string
120
123
  type: ReportItemType
@@ -136,14 +139,14 @@ export type ReportItemJSON = {
136
139
  }
137
140
  }
138
141
 
139
- export type ReportInstanceItemJSON = Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> & {
142
+ export interface ReportInstanceItemJSON extends Pick<ReportItem, 'from' | 'type' | 'kind' | 'filepath'> {
140
143
  instanceId: number
141
144
  contains: Array<ReportItem['id']>
142
145
  value: Record<string, any>
143
146
  box: { type: 'map'; value: Record<string, any>; node: string; stack: string[]; line: number; column: number }
144
147
  }
145
148
 
146
- export type AnalysisReportJSON = {
149
+ export interface AnalysisReportJSON {
147
150
  counts: ReportCounts
148
151
  stats: ReportStats
149
152
  details: {
@@ -1,10 +1,10 @@
1
1
  import type { CompositionStyleObject } from './system-types'
2
2
 
3
- type Recursive<T> = {
3
+ interface Recursive<T> {
4
4
  [key: string]: Recursive<T> | T
5
5
  }
6
6
 
7
- export type Token<Value = any> = {
7
+ export interface Token<Value = any> {
8
8
  value: Value
9
9
  description?: string
10
10
  }
@@ -104,7 +104,7 @@ export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
104
104
 
105
105
  export type LayerStyles = Recursive<Token<LayerStyle>>
106
106
 
107
- export type CompositionStyles = {
107
+ export interface CompositionStyles {
108
108
  textStyles: TextStyles
109
109
  layerStyles: LayerStyles
110
110
  }
@@ -2,22 +2,28 @@ import type { AnySelector, Selectors } from './selectors'
2
2
 
3
3
  export type ConditionType = 'at-rule' | 'parent-nesting' | 'self-nesting' | 'combinator-nesting'
4
4
 
5
- export type ConditionDetails = {
5
+ export interface ConditionDetails {
6
6
  type: ConditionType
7
7
  value: string
8
8
  name?: string
9
9
  rawValue?: string
10
10
  }
11
11
 
12
- export type RawCondition = ConditionDetails & { raw: string }
12
+ export interface RawCondition extends ConditionDetails {
13
+ raw: string
14
+ }
13
15
 
14
16
  /* -----------------------------------------------------------------------------
15
17
  * Shadowed export (in CLI): DO NOT REMOVE
16
18
  * -----------------------------------------------------------------------------*/
17
19
 
18
- export type Conditions = {
20
+ export interface Conditions {
19
21
  [condition: string]: string
20
22
  }
23
+ export interface ExtendableConditions {
24
+ [condition: string]: string | Conditions | undefined
25
+ extend?: Conditions | undefined
26
+ }
21
27
 
22
28
  export type Condition = string
23
29
 
package/dist/config.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import type { TSConfig } from 'pkg-types'
2
- import type { Conditions } from './conditions'
2
+ import type { Conditions, ExtendableConditions } from './conditions'
3
3
  import type { PandaHooks } from './hooks'
4
4
  import type { PatternConfig } from './pattern'
5
- import type { Extendable, RequiredBy, UnwrapExtend } from './shared'
5
+ import type { RequiredBy } from './shared'
6
6
  import type { StaticCssOptions } from './static-css'
7
- import type { GlobalStyleObject } from './system-types'
8
- import type { Theme } from './theme'
9
- import type { UtilityConfig } from './utility'
7
+ import type { ExtendableGlobalStyleObject, GlobalStyleObject } from './system-types'
8
+ import type { ExtendableTheme, Theme } from './theme'
9
+ import type { ExtendableUtilityConfig, UtilityConfig } from './utility'
10
10
 
11
11
  export type { TSConfig }
12
12
 
@@ -14,7 +14,7 @@ export type CascadeLayer = 'reset' | 'base' | 'tokens' | 'recipes' | 'utilities'
14
14
 
15
15
  export type CascadeLayers = Record<CascadeLayer, string>
16
16
 
17
- type StudioOptions = {
17
+ interface StudioOptions {
18
18
  /**
19
19
  * Used to customize the design system studio
20
20
  * @default { title: 'Panda', logo: '🐼' }
@@ -38,7 +38,11 @@ type StudioOptions = {
38
38
  }
39
39
  }
40
40
 
41
- type PresetCore = {
41
+ interface Patterns {
42
+ [pattern: string]: PatternConfig
43
+ }
44
+
45
+ interface PresetCore {
42
46
  /**
43
47
  * The css selectors or media queries shortcuts.
44
48
  * @example `{ hover: "&:hover" }`
@@ -62,11 +66,36 @@ type PresetCore = {
62
66
  patterns: Record<string, PatternConfig>
63
67
  }
64
68
 
65
- type ExtendableOptions = {
66
- [K in keyof PresetCore]?: Extendable<PresetCore[K]>
69
+ interface ExtendablePatterns {
70
+ [pattern: string]: PatternConfig | Patterns | undefined
71
+ extend?: Patterns | undefined
72
+ }
73
+
74
+ export interface ExtendableOptions {
75
+ /**
76
+ * The css selectors or media queries shortcuts.
77
+ * @example `{ hover: "&:hover" }`
78
+ */
79
+ conditions?: ExtendableConditions
80
+ /**
81
+ * The global styles for your project.
82
+ */
83
+ globalCss?: ExtendableGlobalStyleObject
84
+ /**
85
+ * The theme configuration for your project.
86
+ */
87
+ theme?: ExtendableTheme
88
+ /**
89
+ * The css utility definitions.
90
+ */
91
+ utilities?: ExtendableUtilityConfig
92
+ /**
93
+ * Common styling or layout patterns for your project.
94
+ */
95
+ patterns?: ExtendablePatterns
67
96
  }
68
97
 
69
- type FileSystemOptions = {
98
+ interface FileSystemOptions {
70
99
  /**
71
100
  * Whether to clean the output directory before generating the css.
72
101
  * @default false
@@ -111,7 +140,7 @@ type FileSystemOptions = {
111
140
 
112
141
  type JsxFramework = 'react' | 'solid' | 'preact' | 'vue' | 'qwik'
113
142
 
114
- type JsxOptions = {
143
+ interface JsxOptions {
115
144
  /**
116
145
  * The framework to use for generating supercharged elements.
117
146
  */
@@ -152,7 +181,7 @@ type JsxOptions = {
152
181
  jsxStyleProps?: 'all' | 'minimal' | 'none'
153
182
  }
154
183
 
155
- type CssgenOptions = {
184
+ interface CssgenOptions {
156
185
  /**
157
186
  * Whether to include css reset styles in the generated css.
158
187
  * @default true
@@ -195,7 +224,7 @@ type CssgenOptions = {
195
224
  syntax?: 'template-literal' | 'object-literal'
196
225
  }
197
226
 
198
- type CodegenOptions = {
227
+ interface CodegenOptions {
199
228
  /**
200
229
  * Whether to emit the artifacts to `node_modules` as a package.
201
230
  * @default false
@@ -244,7 +273,7 @@ type CodegenOptions = {
244
273
  forceConsistentTypeExtension?: boolean
245
274
  }
246
275
 
247
- type PresetOptions = {
276
+ interface PresetOptions {
248
277
  /**
249
278
  * Used to create reusable config presets for your project or team.
250
279
  */
@@ -256,29 +285,32 @@ type PresetOptions = {
256
285
  eject?: boolean
257
286
  }
258
287
 
259
- type HooksOptions = {
288
+ interface HooksOptions {
260
289
  hooks?: Partial<PandaHooks>
261
290
  }
262
291
 
263
- export type Config = StudioOptions &
264
- ExtendableOptions &
265
- CssgenOptions &
266
- CodegenOptions &
267
- FileSystemOptions &
268
- JsxOptions &
269
- PresetOptions &
270
- HooksOptions
292
+ export interface Config
293
+ extends StudioOptions,
294
+ ExtendableOptions,
295
+ CssgenOptions,
296
+ CodegenOptions,
297
+ FileSystemOptions,
298
+ JsxOptions,
299
+ PresetOptions,
300
+ HooksOptions {}
271
301
 
272
- export type Preset = ExtendableOptions & PresetOptions
302
+ export interface Preset extends ExtendableOptions, PresetOptions {}
273
303
 
274
- export type UserConfig = UnwrapExtend<RequiredBy<Config, 'outdir' | 'cwd' | 'include'>>
304
+ export interface UserConfig
305
+ extends Partial<PresetCore>,
306
+ RequiredBy<Omit<Config, keyof PresetCore>, 'outdir' | 'cwd' | 'include'> {}
275
307
 
276
- export type PathMapping = {
308
+ export interface PathMapping {
277
309
  pattern: RegExp
278
310
  paths: string[]
279
311
  }
280
312
 
281
- export type ConfigTsOptions = {
313
+ export interface ConfigTsOptions {
282
314
  baseUrl?: string | undefined
283
315
  pathMappings: PathMapping[]
284
316
  }
package/dist/parser.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import type { BoxNodeMap, BoxNodeLiteral, Unboxed, BoxNodeArray } from '@pandacss/extractor'
2
2
 
3
- export type ResultItem = {
3
+ export interface ResultItem {
4
4
  name?: string
5
5
  data: Array<Unboxed['raw']>
6
6
  type?: 'object' | 'cva' | 'sva' | 'pattern' | 'recipe' | 'jsx-factory' | 'jsx-pattern' | 'jsx-recipe' | 'jsx'
7
7
  box: BoxNodeMap | BoxNodeLiteral | BoxNodeArray
8
8
  }
9
9
 
10
- export type ParserResultType = {
10
+ export interface ParserResultType {
11
11
  jsx: Set<ResultItem>
12
12
  css: Set<ResultItem>
13
13
  cva: Set<ResultItem>
package/dist/parts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type Part = {
1
+ export interface Part {
2
2
  selector: string
3
3
  }
4
4
 
package/dist/pattern.d.ts CHANGED
@@ -10,7 +10,7 @@ export type PatternProperty =
10
10
  | { type: 'token'; value: TokenCategory; property?: CssProperty }
11
11
  | { type: 'string' | 'boolean' | 'number' }
12
12
 
13
- export type PatternHelpers = {
13
+ export interface PatternHelpers {
14
14
  map: (value: any, fn: (value: string) => string | undefined) => any
15
15
  }
16
16
 
@@ -18,7 +18,7 @@ export type PatternProperties = Record<string, PatternProperty>
18
18
 
19
19
  type Props<T> = Record<LiteralUnion<keyof T>, any>
20
20
 
21
- export type PatternConfig<T extends PatternProperties = PatternProperties> = {
21
+ export interface PatternConfig<T extends PatternProperties = PatternProperties> {
22
22
  /**
23
23
  * The description of the pattern. This will be used in the JSDoc comment.
24
24
  */
@@ -5,7 +5,7 @@ import type { CssProperties } from './system-types'
5
5
  * Shadowed export (in CLI): DO NOT REMOVE
6
6
  * -----------------------------------------------------------------------------*/
7
7
 
8
- export type PropertyTypes = {}
8
+ export interface PropertyTypes {}
9
9
 
10
10
  export type PropertyValue<K extends string> = K extends keyof PropertyTypes
11
11
  ? ConditionalValue<PropertyTypes[K]>
package/dist/recipe.d.ts CHANGED
@@ -26,7 +26,7 @@ type RecipeVariantMap<T extends RecipeVariantRecord> = {
26
26
  * Recipe / Standard
27
27
  * -----------------------------------------------------------------------------*/
28
28
 
29
- export type RecipeRuntimeFn<T extends RecipeVariantRecord> = RecipeVariantFn<T> & {
29
+ export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVariantFn<T> {
30
30
  __type: RecipeSelection<T>
31
31
  variantKeys: (keyof T)[]
32
32
  variantMap: RecipeVariantMap<T>
@@ -45,7 +45,7 @@ export type RecipeCompoundVariant<T extends RecipeVariantRecord> = RecipeCompoun
45
45
  css: SystemStyleObject
46
46
  }
47
47
 
48
- export type RecipeDefinition<T extends RecipeVariantRecord> = {
48
+ export interface RecipeDefinition<T extends RecipeVariantRecord> {
49
49
  /**
50
50
  * The base styles of the recipe.
51
51
  */
@@ -66,7 +66,7 @@ export type RecipeDefinition<T extends RecipeVariantRecord> = {
66
66
 
67
67
  export type RecipeCreatorFn = <T extends RecipeVariantRecord>(config: RecipeDefinition<T>) => RecipeRuntimeFn<T>
68
68
 
69
- type RecipeConfigMeta = {
69
+ interface RecipeConfigMeta {
70
70
  /**
71
71
  * The name of the recipe.
72
72
  */
@@ -84,7 +84,9 @@ type RecipeConfigMeta = {
84
84
  jsx?: Array<string | RegExp>
85
85
  }
86
86
 
87
- export type RecipeConfig<T extends RecipeVariantRecord = RecipeVariantRecord> = RecipeDefinition<T> & RecipeConfigMeta
87
+ export interface RecipeConfig<T extends RecipeVariantRecord = RecipeVariantRecord>
88
+ extends RecipeDefinition<T>,
89
+ RecipeConfigMeta {}
88
90
 
89
91
  /* -----------------------------------------------------------------------------
90
92
  * Recipe / Slot
@@ -98,7 +100,8 @@ export type SlotRecipeVariantFn<S extends string, T extends RecipeVariantRecord>
98
100
  props?: RecipeSelection<T>,
99
101
  ) => SlotRecord<S, string>
100
102
 
101
- export type SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVariantRecord<S>> = SlotRecipeVariantFn<S, T> & {
103
+ export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVariantRecord<S>>
104
+ extends SlotRecipeVariantFn<S, T> {
102
105
  raw: (props?: RecipeSelection<T>) => Record<S, SystemStyleObject>
103
106
  variantKeys: (keyof T)[]
104
107
  variantMap: RecipeVariantMap<T>
@@ -109,7 +112,7 @@ export type SlotRecipeCompoundVariant<S extends string, T extends RecipeVariantR
109
112
  css: SlotRecord<S, SystemStyleObject>
110
113
  }
111
114
 
112
- export type SlotRecipeDefinition<S extends string, T extends SlotRecipeVariantRecord<S>> = {
115
+ export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVariantRecord<S>> {
113
116
  /**
114
117
  * The parts/slots of the recipe.
115
118
  */
package/dist/runtime.d.ts CHANGED
@@ -4,7 +4,7 @@ interface Watcher {
4
4
  close(): Promise<void>
5
5
  }
6
6
 
7
- type InputOptions = {
7
+ interface InputOptions {
8
8
  include: string[]
9
9
  exclude?: string[]
10
10
  cwd?: string
package/dist/shared.d.ts CHANGED
@@ -2,7 +2,9 @@ type Primitive = string | number | boolean | null | undefined
2
2
 
3
3
  export type LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)
4
4
 
5
- export type Recursive<T> = { [key: string]: T | Recursive<T> }
5
+ export interface Recursive<T> {
6
+ [key: string]: T | Recursive<T>
7
+ }
6
8
 
7
9
  export type Dict<T = any> = Record<string, T>
8
10
 
@@ -10,19 +12,8 @@ export type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pi
10
12
 
11
13
  export type AnyFunction<T = any> = (...args: T[]) => any
12
14
 
13
- type DeepPartialObject<T extends object> = {
14
- [K in keyof T]?: DeepPartial<T[K]>
15
- }
16
- export type DeepPartial<T> = T extends object ? DeepPartialObject<T> : T
17
-
18
- export type Extendable<T extends Record<any, any>> = T | { extend?: DeepPartial<T> }
19
-
20
15
  type Nullable<T> = T | null | undefined
21
16
 
22
- export type UnwrapExtend<T> = {
23
- [K in keyof T]: T[K] extends Nullable<Extendable<infer U>> ? U : T[K]
24
- }
25
-
26
17
  export type Artifact = Nullable<{
27
18
  dir?: string[]
28
19
  files: Array<{
@@ -1,4 +1,4 @@
1
- type CssRule = {
1
+ interface CssRule {
2
2
  /**
3
3
  * The css properties to generate utilities for.
4
4
  * @example ['margin', 'padding']
@@ -24,7 +24,7 @@ type RecipeRule =
24
24
  responsive?: boolean
25
25
  } & { [variant: string]: boolean | string[] })
26
26
 
27
- export type StaticCssOptions = {
27
+ export interface StaticCssOptions {
28
28
  /**
29
29
  * The css utility classes to generate.
30
30
  */
@@ -11,9 +11,9 @@ type Number = number & {}
11
11
 
12
12
  export type CssProperty = keyof PropertiesFallback
13
13
 
14
- export type CssProperties = PropertiesFallback<String | Number> & CssVarProperties
14
+ export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}
15
15
 
16
- export type CssKeyframes = {
16
+ export interface CssKeyframes {
17
17
  [name: string]: {
18
18
  [time: string]: CssProperties
19
19
  }
@@ -27,7 +27,7 @@ type MinimalNested<P> = {
27
27
  [K in keyof Conditions]?: Nested<P>
28
28
  }
29
29
 
30
- type GenericProperties = {
30
+ interface GenericProperties {
31
31
  [key: string]: ConditionalValue<String | Number | boolean>
32
32
  }
33
33
 
@@ -39,9 +39,13 @@ export type NestedCssProperties = Nested<CssProperties>
39
39
 
40
40
  export type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>
41
41
 
42
- export type GlobalStyleObject = {
42
+ export interface GlobalStyleObject {
43
43
  [selector: string]: SystemStyleObject
44
44
  }
45
+ export interface ExtendableGlobalStyleObject {
46
+ [selector: string]: SystemStyleObject | undefined
47
+ extend?: GlobalStyleObject | undefined
48
+ }
45
49
 
46
50
  export type CompositionStyleObject<Property extends string> = Nested<{
47
51
  [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
@@ -50,7 +54,9 @@ export type CompositionStyleObject<Property extends string> = Nested<{
50
54
  /* -----------------------------------------------------------------------------
51
55
  * Jsx style props
52
56
  * -----------------------------------------------------------------------------*/
53
- type WithCss = { css?: SystemStyleObject }
57
+ interface WithCss {
58
+ css?: SystemStyleObject
59
+ }
54
60
  type StyleProps = SystemProperties & MinimalNested<SystemStyleObject>
55
61
 
56
62
  export type JsxStyleProps = StyleProps & WithCss
@@ -61,7 +67,7 @@ export type Assign<T, U> = {
61
67
  [K in keyof T]: K extends keyof U ? U[K] : T[K]
62
68
  } & U
63
69
 
64
- export type PatchedHTMLProps = {
70
+ export interface PatchedHTMLProps {
65
71
  htmlWidth?: string | number
66
72
  htmlHeight?: string | number
67
73
  htmlTranslate?: 'yes' | 'no' | undefined
package/dist/theme.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { RecipeConfig, SlotRecipeConfig } from './recipe'
3
3
  import type { CssKeyframes } from './system-types'
4
4
  import type { SemanticTokens, Tokens } from './tokens'
5
5
 
6
- export type Theme = {
6
+ export interface Theme {
7
7
  /**
8
8
  * The breakpoints for your project.
9
9
  */
@@ -38,3 +38,7 @@ export type Theme = {
38
38
  */
39
39
  slotRecipes?: Record<string, SlotRecipeConfig>
40
40
  }
41
+
42
+ export interface ExtendableTheme extends Theme {
43
+ extend?: Theme | undefined
44
+ }
package/dist/tokens.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Recursive } from './shared'
2
2
 
3
3
  export type TokenStatus = 'deprecated' | 'experimental' | 'new'
4
4
 
5
- export type Token<Value = any> = {
5
+ export interface Token<Value = any> {
6
6
  value: Value
7
7
  description?: string
8
8
  type?: string
@@ -18,7 +18,8 @@ type RecursiveToken<C extends string, V> =
18
18
  [K in C]: RecursiveToken<C, V>
19
19
  }
20
20
 
21
- export type SemanticToken<Value = string, Condition extends string = string> = Token<RecursiveToken<Condition, Value>>
21
+ export interface SemanticToken<Value = string, Condition extends string = string>
22
+ extends Token<RecursiveToken<Condition, Value>> {}
22
23
 
23
24
  /* -----------------------------------------------------------------------------
24
25
  * Token data types
@@ -36,13 +37,13 @@ type BorderStyle =
36
37
  | 'ridge'
37
38
  | 'solid'
38
39
 
39
- type Border = {
40
+ interface Border {
40
41
  color: string
41
42
  width: string | number
42
43
  style: BorderStyle
43
44
  }
44
45
 
45
- type Shadow = {
46
+ interface Shadow {
46
47
  offsetX: number
47
48
  offsetY: number
48
49
  blur: number
@@ -51,7 +52,7 @@ type Shadow = {
51
52
  inset?: boolean
52
53
  }
53
54
 
54
- type Gradient = {
55
+ interface Gradient {
55
56
  type: 'linear' | 'radial'
56
57
  placement: string | number
57
58
  stops:
@@ -62,9 +63,12 @@ type Gradient = {
62
63
  | Array<string>
63
64
  }
64
65
 
65
- type Asset = { type: 'url' | 'svg'; value: string }
66
+ interface Asset {
67
+ type: 'url' | 'svg'
68
+ value: string
69
+ }
66
70
 
67
- export type TokenDataTypes = {
71
+ export interface TokenDataTypes {
68
72
  zIndex: string | number
69
73
  opacity: string | number
70
74
  colors: string
package/dist/utility.d.ts CHANGED
@@ -16,14 +16,14 @@ export type PropertyValues =
16
16
  | Record<string, string>
17
17
  | ThemeFn
18
18
 
19
- type TransformArgs = {
19
+ interface TransformArgs {
20
20
  token: TokenFn
21
21
  raw: any
22
22
  }
23
23
 
24
24
  export type PropertyTransform = (value: any, args: TransformArgs) => NestedCssProperties | undefined
25
25
 
26
- export type PropertyConfig = {
26
+ export interface PropertyConfig {
27
27
  /**
28
28
  * @internal
29
29
  * The cascade layer to which the property belongs
@@ -54,3 +54,7 @@ export type PropertyConfig = {
54
54
  export type UtilityConfig = {
55
55
  [property in LiteralUnion<CssProperty>]?: PropertyConfig
56
56
  }
57
+
58
+ export type ExtendableUtilityConfig = UtilityConfig & {
59
+ extend?: UtilityConfig
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "The types for css panda",
5
5
  "main": "dist/index.d.ts",
6
6
  "author": "Segun Adebayo <joseshegs@gmail.com>",
@@ -17,7 +17,7 @@
17
17
  "hookable": "5.5.3",
18
18
  "ncp": "^2.0.0",
19
19
  "pkg-types": "1.0.3",
20
- "@pandacss/extractor": "0.15.1"
20
+ "@pandacss/extractor": "0.15.2"
21
21
  },
22
22
  "scripts": {
23
23
  "build": "tsx scripts/build.ts",