@pandacss/types 0.0.0-dev-20221220033401 → 0.0.0-dev-20221220144042
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 +38 -33
- package/dist/shared.d.ts +6 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Conditions as TConditions } from './conditions'
|
|
|
3
3
|
import type { CssKeyframes, GlobalStyleObject } from './system-types'
|
|
4
4
|
import type { PatternConfig } from './pattern'
|
|
5
5
|
import type { RecipeConfig } from './recipe'
|
|
6
|
-
import type { Dict, RequiredBy, StringKeyOf } from './shared'
|
|
6
|
+
import type { Dict, Extendable, RequiredBy, StringKeyOf, UnwrapExtend } from './shared'
|
|
7
7
|
import type { SemanticTokens, Tokens as PartialTokens } from './tokens'
|
|
8
8
|
import type { UtilityConfig } from './utility'
|
|
9
9
|
import type { StaticCssOptions } from './static-css'
|
|
@@ -80,48 +80,53 @@ export type Config<
|
|
|
80
80
|
* The css selectors or media queries shortcuts.
|
|
81
81
|
* @example `{ hover: "&:hover" }`
|
|
82
82
|
*/
|
|
83
|
-
conditions?: TConditions
|
|
84
|
-
/**
|
|
85
|
-
* The breakpoints for your project.
|
|
86
|
-
*/
|
|
87
|
-
breakpoints?: Breakpoints
|
|
88
|
-
/**
|
|
89
|
-
* The css animation keyframes definitions.
|
|
90
|
-
*/
|
|
91
|
-
keyframes?: CssKeyframes
|
|
83
|
+
conditions?: Extendable<TConditions>
|
|
92
84
|
/**
|
|
93
85
|
* The global styles for your project.
|
|
94
86
|
*/
|
|
95
87
|
globalCss?: GlobalStyleObject
|
|
96
88
|
/**
|
|
97
|
-
* The
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
89
|
+
* The theme configuration for your project.
|
|
90
|
+
*/
|
|
91
|
+
theme?: Extendable<{
|
|
92
|
+
/**
|
|
93
|
+
* The breakpoints for your project.
|
|
94
|
+
*/
|
|
95
|
+
breakpoints?: Breakpoints
|
|
96
|
+
/**
|
|
97
|
+
* The css animation keyframes definitions.
|
|
98
|
+
*/
|
|
99
|
+
keyframes?: CssKeyframes
|
|
100
|
+
/**
|
|
101
|
+
* The design tokens for your project.
|
|
102
|
+
*/
|
|
103
|
+
tokens?: Tokens
|
|
104
|
+
/**
|
|
105
|
+
* The semantic design tokens for your project.
|
|
106
|
+
*/
|
|
107
|
+
semanticTokens?: SemanticTokens<StringKeyOf<Conditions> | StringKeyOf<Breakpoints> | 'base' | '_'>
|
|
108
|
+
/**
|
|
109
|
+
* The typography styles for your project.
|
|
110
|
+
*/
|
|
111
|
+
textStyles?: TextStyles
|
|
112
|
+
/**
|
|
113
|
+
* The layer styles for your project.
|
|
114
|
+
*/
|
|
115
|
+
layerStyles?: LayerStyles
|
|
116
|
+
/**
|
|
117
|
+
* Multi-variant style definitions for your project.
|
|
118
|
+
* Useful for defining component styles.
|
|
119
|
+
*/
|
|
120
|
+
recipes?: Record<string, RecipeConfig>
|
|
121
|
+
}>
|
|
112
122
|
/**
|
|
113
123
|
* The css utility definitions.
|
|
114
124
|
*/
|
|
115
|
-
utilities?: UtilityConfig
|
|
116
|
-
/**
|
|
117
|
-
* Multi-variant style definitions for your project.
|
|
118
|
-
* Useful for defining component styles.
|
|
119
|
-
*/
|
|
120
|
-
recipes?: Record<string, RecipeConfig>
|
|
125
|
+
utilities?: Extendable<UtilityConfig>
|
|
121
126
|
/**
|
|
122
127
|
* Common styling or layout patterns for your project.
|
|
123
128
|
*/
|
|
124
|
-
patterns?: Record<string, PatternConfig
|
|
129
|
+
patterns?: Extendable<Record<string, PatternConfig>>
|
|
125
130
|
/**
|
|
126
131
|
* The framework to use for generating supercharged elements.
|
|
127
132
|
* @default 'react'
|
|
@@ -150,4 +155,4 @@ export type Config<
|
|
|
150
155
|
|
|
151
156
|
export type TConfig = Config<TConditions, Dict, Dict>
|
|
152
157
|
|
|
153
|
-
export type UserConfig = RequiredBy<Config, 'outdir' | 'cwd' | 'include'
|
|
158
|
+
export type UserConfig = UnwrapExtend<RequiredBy<Config, 'outdir' | 'cwd' | 'include'>>
|
package/dist/shared.d.ts
CHANGED
|
@@ -15,3 +15,9 @@ export type AnyFunction<T = any> = (...args: T[]) => any
|
|
|
15
15
|
export type StringKeyOf<T> = Extract<keyof T, string>
|
|
16
16
|
|
|
17
17
|
export type Extendable<T> = T & { extend?: T }
|
|
18
|
+
|
|
19
|
+
type Nullable<T> = T | null | undefined
|
|
20
|
+
|
|
21
|
+
export type UnwrapExtend<T extends Record<string, unknown>> = {
|
|
22
|
+
[K in keyof T]: T[K] extends Nullable<Extendable<infer U>> ? U : T[K]
|
|
23
|
+
}
|