@pandacss/types 0.0.0-dev-20231122180455 → 0.0.0-dev-20231128191244
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/artifact.d.ts +49 -0
- package/dist/config.d.ts +16 -2
- package/dist/index.d.ts +1 -0
- package/dist/shared.d.ts +23 -11
- package/package.json +2 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Nullable } from './shared'
|
|
2
|
+
|
|
3
|
+
export interface ArtifactContent {
|
|
4
|
+
file: string
|
|
5
|
+
code: string | undefined
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type ArtifactId =
|
|
9
|
+
| 'helpers'
|
|
10
|
+
| 'keyframes'
|
|
11
|
+
| 'design-tokens'
|
|
12
|
+
| 'types'
|
|
13
|
+
| 'css-fn'
|
|
14
|
+
| 'cva'
|
|
15
|
+
| 'sva'
|
|
16
|
+
| 'cx'
|
|
17
|
+
| 'create-recipe'
|
|
18
|
+
| 'recipes'
|
|
19
|
+
| 'recipes-index'
|
|
20
|
+
| 'patterns'
|
|
21
|
+
| 'patterns-index'
|
|
22
|
+
| 'jsx-is-valid-prop'
|
|
23
|
+
| 'jsx-helpers'
|
|
24
|
+
| 'jsx-factory'
|
|
25
|
+
| 'jsx-patterns'
|
|
26
|
+
| 'jsx-patterns-index'
|
|
27
|
+
| 'css-index'
|
|
28
|
+
| 'reset.css'
|
|
29
|
+
| 'global.css'
|
|
30
|
+
| 'static.css'
|
|
31
|
+
| 'package.json'
|
|
32
|
+
| 'styles.css'
|
|
33
|
+
| (string & {})
|
|
34
|
+
|
|
35
|
+
export type Artifact = Nullable<{
|
|
36
|
+
id: ArtifactId
|
|
37
|
+
dir?: string[]
|
|
38
|
+
files: ArtifactContent[]
|
|
39
|
+
}>
|
|
40
|
+
|
|
41
|
+
export interface AffectedArtifacts {
|
|
42
|
+
recipes: string[]
|
|
43
|
+
patterns: string[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ArtifactFilters {
|
|
47
|
+
ids?: ArtifactId[]
|
|
48
|
+
affecteds?: AffectedArtifacts
|
|
49
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { TSConfig } from 'pkg-types'
|
|
|
2
2
|
import type { Conditions, ExtendableConditions } from './conditions'
|
|
3
3
|
import type { PandaHooks } from './hooks'
|
|
4
4
|
import type { PatternConfig } from './pattern'
|
|
5
|
-
import type { RequiredBy } from './shared'
|
|
5
|
+
import type { Keys, PathIn, RequiredBy } from './shared'
|
|
6
6
|
import type { StaticCssOptions } from './static-css'
|
|
7
7
|
import type { ExtendableGlobalStyleObject, GlobalStyleObject } from './system-types'
|
|
8
8
|
import type { ExtendableTheme, Theme } from './theme'
|
|
@@ -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
|
-
interface StudioOptions {
|
|
17
|
+
export interface StudioOptions {
|
|
18
18
|
/**
|
|
19
19
|
* Used to customize the design system studio
|
|
20
20
|
* @default { title: 'Panda', logo: '🐼' }
|
|
@@ -336,8 +336,11 @@ export interface ConfigTsOptions {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
export interface LoadConfigResult {
|
|
339
|
+
/** Config path */
|
|
339
340
|
path: string
|
|
340
341
|
config: UserConfig
|
|
342
|
+
serialized: string
|
|
343
|
+
deserialize: () => Config
|
|
341
344
|
tsconfig?: TSConfig
|
|
342
345
|
tsOptions?: ConfigTsOptions
|
|
343
346
|
tsconfigFile?: string
|
|
@@ -353,3 +356,14 @@ export interface PrefixOptions {
|
|
|
353
356
|
tokens: string | undefined
|
|
354
357
|
className: string | undefined
|
|
355
358
|
}
|
|
359
|
+
|
|
360
|
+
type ReqConf = Required<UserConfig>
|
|
361
|
+
|
|
362
|
+
export type ConfigPath = Exclude<
|
|
363
|
+
| Exclude<NonNullable<Keys<ReqConf>>, 'theme'>
|
|
364
|
+
| PathIn<ReqConf, 'theme'>
|
|
365
|
+
| PathIn<ReqConf, 'patterns'>
|
|
366
|
+
| PathIn<ReqConf, 'staticCss'>
|
|
367
|
+
| (string & {}),
|
|
368
|
+
undefined
|
|
369
|
+
>
|
package/dist/index.d.ts
CHANGED
package/dist/shared.d.ts
CHANGED
|
@@ -12,14 +12,26 @@ export type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pi
|
|
|
12
12
|
|
|
13
13
|
export type AnyFunction<T = any> = (...args: T[]) => any
|
|
14
14
|
|
|
15
|
-
type Nullable<T> = T | null | undefined
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
export type Nullable<T> = T | null | undefined
|
|
16
|
+
|
|
17
|
+
export type Keys<T> = keyof NonNullable<T>
|
|
18
|
+
|
|
19
|
+
type Subtract<T extends number, D extends number> = T extends D ? 0 : T extends D | any ? Exclude<T, D> : never
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get all the (nested) paths of an object until a certain depth
|
|
23
|
+
* e.g. Paths<{a: {b: {c: 1}}}, '', 2> => 'a' | 'a.b' | 'a.b.c'
|
|
24
|
+
*/
|
|
25
|
+
type Paths<T, Prefix extends string = '', Depth extends number = 0> = {
|
|
26
|
+
[K in keyof T]: Depth extends 0
|
|
27
|
+
? never
|
|
28
|
+
: T[K] extends object
|
|
29
|
+
? K extends string
|
|
30
|
+
? `${Prefix}${K}` | Paths<T[K], `${Prefix}${K}.`, Depth extends 1 ? 0 : Subtract<Depth, 1>>
|
|
31
|
+
: never
|
|
32
|
+
: K extends string | number
|
|
33
|
+
? `${Prefix}${K}`
|
|
34
|
+
: never
|
|
35
|
+
}[keyof T]
|
|
36
|
+
|
|
37
|
+
export type PathIn<T, Key extends keyof T> = Key extends string ? Paths<T[Key], `${Key}.`, 1> : never
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20231128191244",
|
|
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.0.0-dev-
|
|
27
|
+
"@pandacss/extractor": "0.0.0-dev-20231128191244"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "tsx scripts/watch.ts",
|