@pandacss/types 0.0.0-dev-20230205182145 → 0.0.0-dev-20230206084557
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 +1 -1
- package/dist/index.d.ts +11 -9
- package/dist/parser.d.ts +18 -0
- package/dist/runtime.d.ts +41 -0
- package/dist/shared.d.ts +8 -0
- package/package.json +1 -1
- package/dist/dot-path.d.ts +0 -21
package/dist/config.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
1
|
+
export type { CompositionStyles, LayerStyles, TextStyles } from './composition'
|
|
2
|
+
export type { ConditionDetails, Conditions, ConditionType, RawCondition } from './conditions'
|
|
3
|
+
export type { Config, LoadConfigResult, Preset, UserConfig } from './config'
|
|
4
|
+
export type { ParserResult } from './parser'
|
|
5
|
+
export type { Part, Parts } from './parts'
|
|
6
|
+
export type { PatternConfig, PatternHelpers, PatternProperty } from './pattern'
|
|
6
7
|
export type { RecipeConfig, RecipeVariantRecord } from './recipe'
|
|
7
|
-
export type {
|
|
8
|
-
export type {
|
|
9
|
-
export type { Dict, RequiredBy, AnyFunction } from './shared'
|
|
10
|
-
export type { Parts, Part } from './parts'
|
|
8
|
+
export type { Runtime } from './runtime'
|
|
9
|
+
export type { AnyFunction, Artifact, Dict, RequiredBy } from './shared'
|
|
11
10
|
export type { StaticCssOptions } from './static-css'
|
|
11
|
+
export type { CssKeyframes, GlobalStyleObject, SystemStyleObject } from './system-types'
|
|
12
|
+
export type { SemanticToken, SemanticTokens, Token, TokenCategory, TokenDataTypes, Tokens } from './tokens'
|
|
13
|
+
export type { PropertyConfig, PropertyTransform, PropertyValues, UtilityConfig } from './utility'
|
package/dist/parser.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type Result = {
|
|
2
|
+
name?: string
|
|
3
|
+
data: Record<string, any>
|
|
4
|
+
type?: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type ParserResult = {
|
|
8
|
+
jsx: Set<Result>
|
|
9
|
+
css: Set<Result>
|
|
10
|
+
cva: Set<Result>
|
|
11
|
+
recipe: Map<string, Set<Result>>
|
|
12
|
+
pattern: Map<string, Set<Result>>
|
|
13
|
+
set: (name: 'cva' | 'css', result: Result) => void
|
|
14
|
+
setCva: (result: Result) => void
|
|
15
|
+
setRecipe: (name: string, result: Result) => void
|
|
16
|
+
setPattern: (name: string, result: Result) => void
|
|
17
|
+
isEmpty: () => boolean
|
|
18
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface Watcher {
|
|
2
|
+
on(event: 'add' | 'addDir' | 'change', listener: (path: string) => void): this
|
|
3
|
+
on(event: 'all', listener: (evt: 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir', path: string) => void): this
|
|
4
|
+
close(): Promise<void>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type InputOptions = {
|
|
8
|
+
include: string[]
|
|
9
|
+
exclude?: string[]
|
|
10
|
+
cwd?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface FileSystem {
|
|
14
|
+
readDirSync(dir: string): string[]
|
|
15
|
+
existsSync(fileLike: string): boolean
|
|
16
|
+
glob(opts: InputOptions): string[]
|
|
17
|
+
readFileSync(filePath: string): string
|
|
18
|
+
rmDirSync(dirPath: string): void
|
|
19
|
+
writeFile(file: string, content: string): Promise<void>
|
|
20
|
+
rmFileSync(file: string): void
|
|
21
|
+
ensureDirSync(dirPath: string): void
|
|
22
|
+
writeFileSync(filePath: string, content: string): void
|
|
23
|
+
watch(options: InputOptions & { poll?: boolean }): Watcher
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Path {
|
|
27
|
+
join(...paths: string[]): string
|
|
28
|
+
dirname(path: string): string
|
|
29
|
+
extname(path: string): string
|
|
30
|
+
relative(from: string, to: string): string
|
|
31
|
+
isAbsolute(path: string): boolean
|
|
32
|
+
sep: string
|
|
33
|
+
abs(cwd: string, path: string): string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Runtime {
|
|
37
|
+
fs: FileSystem
|
|
38
|
+
path: Path
|
|
39
|
+
cwd(): string
|
|
40
|
+
env(name: string): string | undefined
|
|
41
|
+
}
|
package/dist/shared.d.ts
CHANGED
|
@@ -25,3 +25,11 @@ type Nullable<T> = T | null | undefined
|
|
|
25
25
|
export type UnwrapExtend<T extends Record<string, unknown>> = {
|
|
26
26
|
[K in keyof T]: T[K] extends Nullable<Extendable<infer U>> ? U : T[K]
|
|
27
27
|
}
|
|
28
|
+
|
|
29
|
+
export type Artifact = Nullable<{
|
|
30
|
+
dir?: string[]
|
|
31
|
+
files: Array<{
|
|
32
|
+
file: string
|
|
33
|
+
code: string | undefined
|
|
34
|
+
}>
|
|
35
|
+
}>
|
package/package.json
CHANGED
package/dist/dot-path.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type CastToString<T> = T extends number ? `${T}` : T
|
|
2
|
-
|
|
3
|
-
type PathsToStringProps<T> = T extends string | number
|
|
4
|
-
? []
|
|
5
|
-
: {
|
|
6
|
-
[Key in Extract<keyof T, string | number>]: [CastToString<Key>, ...PathsToStringProps<T[Key]>]
|
|
7
|
-
}[Extract<keyof T, string | number>]
|
|
8
|
-
|
|
9
|
-
type Join<Paths extends string[], Delimiter extends string> = Paths extends []
|
|
10
|
-
? never
|
|
11
|
-
: Paths extends [infer Property]
|
|
12
|
-
? Property
|
|
13
|
-
: Paths extends [infer Property, ...infer Rest]
|
|
14
|
-
? Property extends string
|
|
15
|
-
? `${Property}${Delimiter}${Join<Extract<Rest, string[]>, Delimiter>}`
|
|
16
|
-
: never
|
|
17
|
-
: string
|
|
18
|
-
|
|
19
|
-
type TDotPath = Record<string, any> | string
|
|
20
|
-
|
|
21
|
-
export type DotPath<T extends TDotPath> = Join<PathsToStringProps<T>, '.'>
|