@pandacss/types 0.13.1 → 0.15.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.
- package/dist/config.d.ts +2 -2
- package/dist/hooks.d.ts +4 -0
- package/dist/recipe.d.ts +1 -0
- package/dist/shared.d.ts +3 -2
- package/dist/tokens.d.ts +2 -2
- package/dist/utility.d.ts +7 -4
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -207,8 +207,8 @@ type CodegenOptions = {
|
|
|
207
207
|
*/
|
|
208
208
|
emitTokensOnly?: boolean
|
|
209
209
|
/**
|
|
210
|
-
* Whether to hash the generated class names.
|
|
211
|
-
* This is useful if want to shorten the class names.
|
|
210
|
+
* Whether to hash the generated class names / css variables.
|
|
211
|
+
* This is useful if want to shorten the class names or css variables.
|
|
212
212
|
* @default false
|
|
213
213
|
*/
|
|
214
214
|
hash?: boolean | { cssVar: boolean; className: boolean }
|
package/dist/hooks.d.ts
CHANGED
|
@@ -32,6 +32,10 @@ export interface PandaHooks {
|
|
|
32
32
|
file: 'global.css' | 'static.css' | 'reset.css' | 'tokens.css' | 'keyframes.css' | 'styles.css',
|
|
33
33
|
css: string,
|
|
34
34
|
) => void
|
|
35
|
+
/**
|
|
36
|
+
* Called after the codegen is completed
|
|
37
|
+
*/
|
|
38
|
+
'generator:done': () => void | Promise<void>
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
export type PandaHookable = Hookable<PandaHooks, HookKeys<PandaHooks>>
|
package/dist/recipe.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export type SlotRecipeVariantFn<S extends string, T extends RecipeVariantRecord>
|
|
|
99
99
|
) => SlotRecord<S, string>
|
|
100
100
|
|
|
101
101
|
export type SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVariantRecord<S>> = SlotRecipeVariantFn<S, T> & {
|
|
102
|
+
raw: (props?: RecipeSelection<T>) => Record<S, SystemStyleObject>
|
|
102
103
|
variantKeys: (keyof T)[]
|
|
103
104
|
variantMap: RecipeVariantMap<T>
|
|
104
105
|
splitVariantProps<Props extends RecipeSelection<T>>(props: Props): [RecipeSelection<T>, Pretty<Omit<Props, keyof T>>]
|
package/dist/shared.d.ts
CHANGED
|
@@ -10,9 +10,10 @@ export type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pi
|
|
|
10
10
|
|
|
11
11
|
export type AnyFunction<T = any> = (...args: T[]) => any
|
|
12
12
|
|
|
13
|
-
type
|
|
14
|
-
[
|
|
13
|
+
type DeepPartialObject<T extends object> = {
|
|
14
|
+
[K in keyof T]?: DeepPartial<T[K]>
|
|
15
15
|
}
|
|
16
|
+
export type DeepPartial<T> = T extends object ? DeepPartialObject<T> : T
|
|
16
17
|
|
|
17
18
|
export type Extendable<T extends Record<any, any>> = T | { extend?: DeepPartial<T> }
|
|
18
19
|
|
package/dist/tokens.d.ts
CHANGED
|
@@ -65,8 +65,8 @@ type Gradient = {
|
|
|
65
65
|
type Asset = { type: 'url' | 'svg'; value: string }
|
|
66
66
|
|
|
67
67
|
export type TokenDataTypes = {
|
|
68
|
-
zIndex: number
|
|
69
|
-
opacity: number
|
|
68
|
+
zIndex: string | number
|
|
69
|
+
opacity: string | number
|
|
70
70
|
colors: string
|
|
71
71
|
fonts: string | string[]
|
|
72
72
|
fontSizes: string
|
package/dist/utility.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { LiteralUnion } from './shared'
|
|
2
2
|
import type { CssProperty, NestedCssProperties } from './system-types'
|
|
3
|
-
import type { TokenCategory } from './tokens'
|
|
3
|
+
import type { Token, TokenCategory } from './tokens'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
interface TokenFn {
|
|
6
|
+
(path: string): string | undefined
|
|
7
|
+
raw: (path: string) => Token | undefined
|
|
8
|
+
}
|
|
6
9
|
|
|
7
|
-
type ThemeFn = (token:
|
|
10
|
+
type ThemeFn = (token: (path: string) => any) => Record<string, string>
|
|
8
11
|
|
|
9
12
|
export type PropertyValues =
|
|
10
13
|
| LiteralUnion<TokenCategory>
|
|
@@ -14,7 +17,7 @@ export type PropertyValues =
|
|
|
14
17
|
| ThemeFn
|
|
15
18
|
|
|
16
19
|
type TransformArgs = {
|
|
17
|
-
token:
|
|
20
|
+
token: TokenFn
|
|
18
21
|
raw: any
|
|
19
22
|
}
|
|
20
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
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.
|
|
20
|
+
"@pandacss/extractor": "0.15.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsx scripts/build.ts",
|