@pandacss/types 0.18.2 → 0.19.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.
@@ -1,5 +1,9 @@
1
1
  import type { CompositionStyleObject } from './system-types'
2
- import type { Token } from './tokens'
2
+
3
+ interface Token<T> {
4
+ value: T
5
+ description?: string
6
+ }
3
7
 
4
8
  interface Recursive<T> {
5
9
  [key: string]: Recursive<T> | T
package/dist/recipe.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import type { SystemStyleObject, DistributiveOmit } from './system-types'
2
-
3
- type Pretty<T> = { [K in keyof T]: T[K] } & {}
1
+ import type { SystemStyleObject, DistributiveOmit, Pretty } from './system-types'
4
2
 
5
3
  type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T
6
4
 
@@ -9,7 +7,7 @@ export type RecipeVariantRecord = Record<any, Record<any, SystemStyleObject>>
9
7
  export type RecipeSelection<T extends RecipeVariantRecord> = keyof any extends keyof T
10
8
  ? {}
11
9
  : {
12
- [K in keyof T]?: StringToBoolean<keyof T[K]>
10
+ [K in keyof T]?: StringToBoolean<keyof T[K]> | undefined
13
11
  }
14
12
 
15
13
  export type RecipeVariantFn<T extends RecipeVariantRecord> = (props?: RecipeSelection<T>) => string
@@ -40,7 +38,7 @@ export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVa
40
38
  type OneOrMore<T> = T | Array<T>
41
39
 
42
40
  export type RecipeCompoundSelection<T> = {
43
- [K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>>
41
+ [K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>> | undefined
44
42
  }
45
43
 
46
44
  export type RecipeCompoundVariant<T> = T & {
@@ -59,9 +59,11 @@ export interface ExtendableGlobalStyleObject {
59
59
  extend?: GlobalStyleObject | undefined
60
60
  }
61
61
 
62
- export type CompositionStyleObject<Property extends string> = Nested<{
63
- [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
64
- }>
62
+ type FilterStyleObject<P extends string> = {
63
+ [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
64
+ }
65
+
66
+ export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
65
67
 
66
68
  /* -----------------------------------------------------------------------------
67
69
  * Jsx style props
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "description": "The types for css panda",
5
5
  "main": "dist/index.d.ts",
6
6
  "author": "Segun Adebayo <joseshegs@gmail.com>",
@@ -24,7 +24,7 @@
24
24
  "hookable": "5.5.3",
25
25
  "ncp": "^2.0.0",
26
26
  "pkg-types": "1.0.3",
27
- "@pandacss/extractor": "0.18.2"
27
+ "@pandacss/extractor": "0.19.0"
28
28
  },
29
29
  "scripts": {
30
30
  "dev": "tsx scripts/watch.ts",