@pandacss/types 0.13.0 → 0.14.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 +13 -6
- package/dist/hooks.d.ts +4 -0
- package/dist/recipe.d.ts +1 -0
- package/dist/utility.d.ts +7 -4
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -102,10 +102,6 @@ type FileSystemOptions = {
|
|
|
102
102
|
* @default 'process.cwd()'
|
|
103
103
|
*/
|
|
104
104
|
cwd?: string
|
|
105
|
-
/**
|
|
106
|
-
* File extension for generated javascript files.
|
|
107
|
-
*/
|
|
108
|
-
outExtension?: 'mjs' | 'js'
|
|
109
105
|
/**
|
|
110
106
|
* The log level for the built-in logger.
|
|
111
107
|
* @default 'info'
|
|
@@ -211,8 +207,8 @@ type CodegenOptions = {
|
|
|
211
207
|
*/
|
|
212
208
|
emitTokensOnly?: boolean
|
|
213
209
|
/**
|
|
214
|
-
* Whether to hash the generated class names.
|
|
215
|
-
* 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.
|
|
216
212
|
* @default false
|
|
217
213
|
*/
|
|
218
214
|
hash?: boolean | { cssVar: boolean; className: boolean }
|
|
@@ -235,6 +231,17 @@ type CodegenOptions = {
|
|
|
235
231
|
* @default 'true'
|
|
236
232
|
*/
|
|
237
233
|
layers?: Partial<CascadeLayers>
|
|
234
|
+
/**
|
|
235
|
+
* File extension for generated javascript files.
|
|
236
|
+
* @default 'mjs'
|
|
237
|
+
*/
|
|
238
|
+
outExtension?: 'mjs' | 'js'
|
|
239
|
+
/**
|
|
240
|
+
* Whether to force consistent type extensions for generated typescript .d.ts files.
|
|
241
|
+
* If set to `true` and `outExtension` is set to `mjs`, the generated typescript .d.ts files will have the extension `.d.mts`.
|
|
242
|
+
* @default false
|
|
243
|
+
*/
|
|
244
|
+
forceConsistentTypeExtension?: boolean
|
|
238
245
|
}
|
|
239
246
|
|
|
240
247
|
type PresetOptions = {
|
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/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.14.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.14.0"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsx scripts/build.ts",
|