@pandacss/types 0.17.1 → 0.17.2
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/package.json +2 -2
- package/dist/analyze-report.d.ts +0 -179
- package/dist/composition.d.ts +0 -106
- package/dist/conditions.d.ts +0 -47
- package/dist/config.d.ts +0 -345
- package/dist/csstype.d.ts +0 -20748
- package/dist/hooks.d.ts +0 -44
- package/dist/index.d.ts +0 -16
- package/dist/parser.d.ts +0 -36
- package/dist/parts.d.ts +0 -5
- package/dist/pattern.d.ts +0 -60
- package/dist/prop-type.d.ts +0 -14
- package/dist/recipe.d.ts +0 -147
- package/dist/runtime.d.ts +0 -41
- package/dist/selectors.d.ts +0 -58
- package/dist/shared.d.ts +0 -25
- package/dist/static-css.d.ts +0 -38
- package/dist/style-props.d.ts +0 -20
- package/dist/system-types.d.ts +0 -90
- package/dist/theme.d.ts +0 -56
- package/dist/tokens.d.ts +0 -101
- package/dist/utility.d.ts +0 -64
package/dist/hooks.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { HookKeys, Hookable } from 'hookable'
|
|
2
|
-
import type { LoadConfigResult, UserConfig } from './config'
|
|
3
|
-
import type { ParserResultType } from './parser'
|
|
4
|
-
|
|
5
|
-
type MaybeAsyncReturn = Promise<void> | void
|
|
6
|
-
|
|
7
|
-
export interface PandaHooks {
|
|
8
|
-
/**
|
|
9
|
-
* Called when the config is resolved, after all the presets are loaded and merged.
|
|
10
|
-
*/
|
|
11
|
-
'config:resolved': (conf: LoadConfigResult) => MaybeAsyncReturn
|
|
12
|
-
/**
|
|
13
|
-
* Called when the config file or one of its dependencies (imports) has changed.
|
|
14
|
-
*/
|
|
15
|
-
'config:change': (ctx: UserConfig) => MaybeAsyncReturn
|
|
16
|
-
/**
|
|
17
|
-
* Called after reading the file content but before parsing it.
|
|
18
|
-
*/
|
|
19
|
-
'parser:before': (file: string, content: string) => void
|
|
20
|
-
/**
|
|
21
|
-
* Called after the file styles are extracted and processed into the resulting ParserResult object.
|
|
22
|
-
*/
|
|
23
|
-
'parser:after': (file: string, result: ParserResultType | undefined) => void
|
|
24
|
-
/**
|
|
25
|
-
* Called after the extracted ParserResult has been transformed to a CSS string
|
|
26
|
-
*/
|
|
27
|
-
'parser:css': (file: string, css: string | undefined) => void
|
|
28
|
-
/**
|
|
29
|
-
* Called before generating the design-system CSS files (global, static, preflight, tokens, keyframes)
|
|
30
|
-
*/
|
|
31
|
-
'generator:css': (
|
|
32
|
-
file: 'global.css' | 'static.css' | 'reset.css' | 'tokens.css' | 'keyframes.css' | 'styles.css',
|
|
33
|
-
css: string,
|
|
34
|
-
) => void
|
|
35
|
-
/**
|
|
36
|
-
* Called after the codegen is completed
|
|
37
|
-
*/
|
|
38
|
-
'generator:done': () => void | Promise<void>
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type PandaHookable = Hookable<PandaHooks, HookKeys<PandaHooks>>
|
|
42
|
-
export interface ConfigResultWithHooks extends LoadConfigResult {
|
|
43
|
-
hooks: PandaHookable
|
|
44
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type * from './analyze-report'
|
|
2
|
-
export type * from './composition'
|
|
3
|
-
export type * from './conditions'
|
|
4
|
-
export type * from './config'
|
|
5
|
-
export type * from './hooks'
|
|
6
|
-
export type * from './parser'
|
|
7
|
-
export type * from './parts'
|
|
8
|
-
export type * from './pattern'
|
|
9
|
-
export type * from './recipe'
|
|
10
|
-
export type * from './runtime'
|
|
11
|
-
export type * from './shared'
|
|
12
|
-
export type * from './static-css'
|
|
13
|
-
export type * from './system-types'
|
|
14
|
-
export type * from './theme'
|
|
15
|
-
export type * from './tokens'
|
|
16
|
-
export type * from './utility'
|
package/dist/parser.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { BoxNodeMap, BoxNodeLiteral, Unboxed, BoxNodeArray } from '@pandacss/extractor'
|
|
2
|
-
|
|
3
|
-
export interface ResultItem {
|
|
4
|
-
name?: string
|
|
5
|
-
data: Array<Unboxed['raw']>
|
|
6
|
-
type?: 'object' | 'cva' | 'sva' | 'pattern' | 'recipe' | 'jsx-factory' | 'jsx-pattern' | 'jsx-recipe' | 'jsx'
|
|
7
|
-
box: BoxNodeMap | BoxNodeLiteral | BoxNodeArray
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ParserResultType {
|
|
11
|
-
jsx: Set<ResultItem>
|
|
12
|
-
css: Set<ResultItem>
|
|
13
|
-
cva: Set<ResultItem>
|
|
14
|
-
sva: Set<ResultItem>
|
|
15
|
-
recipe: Map<string, Set<ResultItem>>
|
|
16
|
-
pattern: Map<string, Set<ResultItem>>
|
|
17
|
-
filePath: string | undefined
|
|
18
|
-
set: (name: 'cva' | 'css', result: ResultItem) => void
|
|
19
|
-
setSva: (result: ResultItem) => void
|
|
20
|
-
setCva: (result: ResultItem) => void
|
|
21
|
-
setJsx: (result: ResultItem) => void
|
|
22
|
-
setRecipe: (name: string, result: ResultItem) => void
|
|
23
|
-
setPattern: (name: string, result: ResultItem) => void
|
|
24
|
-
isEmpty: () => boolean
|
|
25
|
-
setFilePath: (filePath: string) => ParserResultType
|
|
26
|
-
toArray: () => Array<ResultItem>
|
|
27
|
-
toJSON: () => {
|
|
28
|
-
sva: Array<ResultItem>
|
|
29
|
-
css: Array<ResultItem>
|
|
30
|
-
cva: Array<ResultItem>
|
|
31
|
-
recipe: Record<string, ResultItem[]>
|
|
32
|
-
pattern: Record<string, ResultItem[]>
|
|
33
|
-
jsx: Array<ResultItem>
|
|
34
|
-
}
|
|
35
|
-
merge: (result: ParserResultType) => ParserResultType
|
|
36
|
-
}
|
package/dist/parts.d.ts
DELETED
package/dist/pattern.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { CssProperty, SystemStyleObject } from './system-types'
|
|
2
|
-
import type { TokenCategory } from './tokens'
|
|
3
|
-
|
|
4
|
-
type Primitive = string | number | boolean | null | undefined
|
|
5
|
-
type LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)
|
|
6
|
-
|
|
7
|
-
export type PatternProperty =
|
|
8
|
-
| { type: 'property'; value: CssProperty }
|
|
9
|
-
| { type: 'enum'; value: string[] }
|
|
10
|
-
| { type: 'token'; value: TokenCategory; property?: CssProperty }
|
|
11
|
-
| { type: 'string' | 'boolean' | 'number' }
|
|
12
|
-
|
|
13
|
-
export interface PatternHelpers {
|
|
14
|
-
map: (value: any, fn: (value: string) => string | undefined) => any
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type PatternProperties = Record<string, PatternProperty>
|
|
18
|
-
|
|
19
|
-
type Props<T> = Record<LiteralUnion<keyof T>, any>
|
|
20
|
-
|
|
21
|
-
export interface PatternConfig<T extends PatternProperties = PatternProperties> {
|
|
22
|
-
/**
|
|
23
|
-
* The description of the pattern. This will be used in the JSDoc comment.
|
|
24
|
-
*/
|
|
25
|
-
description?: string
|
|
26
|
-
/**
|
|
27
|
-
* The JSX element rendered by the pattern
|
|
28
|
-
* @default 'div'
|
|
29
|
-
*/
|
|
30
|
-
jsxElement?: string
|
|
31
|
-
/**
|
|
32
|
-
* The properties of the pattern.
|
|
33
|
-
*/
|
|
34
|
-
properties?: T
|
|
35
|
-
/**
|
|
36
|
-
* The css object this pattern will generate.
|
|
37
|
-
*/
|
|
38
|
-
transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject
|
|
39
|
-
/**
|
|
40
|
-
* The jsx element name this pattern will generate.
|
|
41
|
-
*/
|
|
42
|
-
jsxName?: string
|
|
43
|
-
/**
|
|
44
|
-
* The jsx elements to track for this pattern. Can be string or Regexp.
|
|
45
|
-
*
|
|
46
|
-
* @default capitalize(pattern.name)
|
|
47
|
-
* @example ['Button', 'Link', /Button$/]
|
|
48
|
-
*/
|
|
49
|
-
jsx?: Array<string | RegExp>
|
|
50
|
-
/**
|
|
51
|
-
* Whether to only generate types for the specified properties.
|
|
52
|
-
* This will disallow css properties
|
|
53
|
-
*/
|
|
54
|
-
strict?: boolean
|
|
55
|
-
/**
|
|
56
|
-
* @experimental
|
|
57
|
-
* Disallow certain css properties for this pattern
|
|
58
|
-
*/
|
|
59
|
-
blocklist?: LiteralUnion<CssProperty>[]
|
|
60
|
-
}
|
package/dist/prop-type.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ConditionalValue } from './conditions'
|
|
2
|
-
import type { CssProperties } from './system-types'
|
|
3
|
-
|
|
4
|
-
/* -----------------------------------------------------------------------------
|
|
5
|
-
* Shadowed export (in CLI): DO NOT REMOVE
|
|
6
|
-
* -----------------------------------------------------------------------------*/
|
|
7
|
-
|
|
8
|
-
export interface PropertyTypes {}
|
|
9
|
-
|
|
10
|
-
export type PropertyValue<K extends string> = K extends keyof PropertyTypes
|
|
11
|
-
? ConditionalValue<PropertyTypes[K]>
|
|
12
|
-
: K extends keyof CssProperties
|
|
13
|
-
? ConditionalValue<CssProperties[K]>
|
|
14
|
-
: never
|
package/dist/recipe.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import type { SystemStyleObject, DistributiveOmit } from './system-types'
|
|
2
|
-
|
|
3
|
-
type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
4
|
-
|
|
5
|
-
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T
|
|
6
|
-
|
|
7
|
-
export type RecipeVariantRecord = Record<any, Record<any, SystemStyleObject>>
|
|
8
|
-
|
|
9
|
-
export type RecipeSelection<T extends RecipeVariantRecord> = keyof any extends keyof T
|
|
10
|
-
? {}
|
|
11
|
-
: {
|
|
12
|
-
[K in keyof T]?: StringToBoolean<keyof T[K]>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type RecipeVariantFn<T extends RecipeVariantRecord> = (props?: RecipeSelection<T>) => string
|
|
16
|
-
|
|
17
|
-
export type RecipeVariantProps<
|
|
18
|
-
T extends RecipeVariantFn<RecipeVariantRecord> | SlotRecipeVariantFn<string, SlotRecipeVariantRecord<string>>,
|
|
19
|
-
> = Pretty<Parameters<T>[0]>
|
|
20
|
-
|
|
21
|
-
type RecipeVariantMap<T extends RecipeVariantRecord> = {
|
|
22
|
-
[K in keyof T]: Array<keyof T[K]>
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* -----------------------------------------------------------------------------
|
|
26
|
-
* Recipe / Standard
|
|
27
|
-
* -----------------------------------------------------------------------------*/
|
|
28
|
-
|
|
29
|
-
export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVariantFn<T> {
|
|
30
|
-
__type: RecipeSelection<T>
|
|
31
|
-
variantKeys: (keyof T)[]
|
|
32
|
-
variantMap: RecipeVariantMap<T>
|
|
33
|
-
raw: (props?: RecipeSelection<T>) => SystemStyleObject
|
|
34
|
-
config: RecipeConfig<T>
|
|
35
|
-
splitVariantProps<Props extends RecipeSelection<T>>(
|
|
36
|
-
props: Props,
|
|
37
|
-
): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
type OneOrMore<T> = T | Array<T>
|
|
41
|
-
|
|
42
|
-
export type RecipeCompoundSelection<T> = {
|
|
43
|
-
[K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>>
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type RecipeCompoundVariant<T> = T & {
|
|
47
|
-
css: SystemStyleObject
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface RecipeDefinition<T extends RecipeVariantRecord> {
|
|
51
|
-
/**
|
|
52
|
-
* The base styles of the recipe.
|
|
53
|
-
*/
|
|
54
|
-
base?: SystemStyleObject
|
|
55
|
-
/**
|
|
56
|
-
* The multi-variant styles of the recipe.
|
|
57
|
-
*/
|
|
58
|
-
variants?: T
|
|
59
|
-
/**
|
|
60
|
-
* The default variants of the recipe.
|
|
61
|
-
*/
|
|
62
|
-
defaultVariants?: RecipeSelection<T>
|
|
63
|
-
/**
|
|
64
|
-
* The styles to apply when a combination of variants is selected.
|
|
65
|
-
*/
|
|
66
|
-
compoundVariants?: Pretty<RecipeCompoundVariant<RecipeCompoundSelection<T>>>[]
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export type RecipeCreatorFn = <T extends RecipeVariantRecord>(config: RecipeDefinition<T>) => RecipeRuntimeFn<T>
|
|
70
|
-
|
|
71
|
-
interface RecipeConfigMeta {
|
|
72
|
-
/**
|
|
73
|
-
* The name of the recipe.
|
|
74
|
-
*/
|
|
75
|
-
className: string
|
|
76
|
-
/**
|
|
77
|
-
* The description of the recipe. This will be used in the JSDoc comment.
|
|
78
|
-
*/
|
|
79
|
-
description?: string
|
|
80
|
-
/**
|
|
81
|
-
* The jsx elements to track for this recipe. Can be string or Regexp.
|
|
82
|
-
*
|
|
83
|
-
* @default capitalize(recipe.name)
|
|
84
|
-
* @example ['Button', 'Link', /Button$/]
|
|
85
|
-
*/
|
|
86
|
-
jsx?: Array<string | RegExp>
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface RecipeConfig<T extends RecipeVariantRecord = RecipeVariantRecord>
|
|
90
|
-
extends RecipeDefinition<T>,
|
|
91
|
-
RecipeConfigMeta {}
|
|
92
|
-
|
|
93
|
-
/* -----------------------------------------------------------------------------
|
|
94
|
-
* Recipe / Slot
|
|
95
|
-
* -----------------------------------------------------------------------------*/
|
|
96
|
-
|
|
97
|
-
type SlotRecord<S extends string, T> = Partial<Record<S, T>>
|
|
98
|
-
|
|
99
|
-
export type SlotRecipeVariantRecord<S extends string> = Record<any, Record<any, SlotRecord<S, SystemStyleObject>>>
|
|
100
|
-
|
|
101
|
-
export type SlotRecipeVariantFn<S extends string, T extends RecipeVariantRecord> = (
|
|
102
|
-
props?: RecipeSelection<T>,
|
|
103
|
-
) => SlotRecord<S, string>
|
|
104
|
-
|
|
105
|
-
export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVariantRecord<S>>
|
|
106
|
-
extends SlotRecipeVariantFn<S, T> {
|
|
107
|
-
raw: (props?: RecipeSelection<T>) => Record<S, SystemStyleObject>
|
|
108
|
-
variantKeys: (keyof T)[]
|
|
109
|
-
variantMap: RecipeVariantMap<T>
|
|
110
|
-
splitVariantProps<Props extends RecipeSelection<T>>(props: Props): [RecipeSelection<T>, Pretty<Omit<Props, keyof T>>]
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export type SlotRecipeCompoundVariant<S extends string, T> = T & {
|
|
114
|
-
css: SlotRecord<S, SystemStyleObject>
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface SlotRecipeDefinition<S extends string, T extends SlotRecipeVariantRecord<S>> {
|
|
118
|
-
/**
|
|
119
|
-
* The parts/slots of the recipe.
|
|
120
|
-
*/
|
|
121
|
-
slots: S[] | Readonly<S[]>
|
|
122
|
-
/**
|
|
123
|
-
* The base styles of the recipe.
|
|
124
|
-
*/
|
|
125
|
-
base?: SlotRecord<S, SystemStyleObject>
|
|
126
|
-
/**
|
|
127
|
-
* The multi-variant styles of the recipe.
|
|
128
|
-
*/
|
|
129
|
-
variants?: T
|
|
130
|
-
/**
|
|
131
|
-
* The default variants of the recipe.
|
|
132
|
-
*/
|
|
133
|
-
defaultVariants?: RecipeSelection<T>
|
|
134
|
-
/**
|
|
135
|
-
* The styles to apply when a combination of variants is selected.
|
|
136
|
-
*/
|
|
137
|
-
compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
|
|
141
|
-
config: SlotRecipeDefinition<S, T>,
|
|
142
|
-
) => SlotRecipeRuntimeFn<S, T>
|
|
143
|
-
|
|
144
|
-
export type SlotRecipeConfig<
|
|
145
|
-
S extends string = string,
|
|
146
|
-
T extends SlotRecipeVariantRecord<S> = SlotRecipeVariantRecord<S>,
|
|
147
|
-
> = SlotRecipeDefinition<S, T> & RecipeConfigMeta
|
package/dist/runtime.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
interface 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/selectors.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { Pseudos } from './csstype'
|
|
2
|
-
|
|
3
|
-
type AriaAttributes =
|
|
4
|
-
| '[aria-disabled]'
|
|
5
|
-
| '[aria-hidden]'
|
|
6
|
-
| '[aria-invalid]'
|
|
7
|
-
| '[aria-readonly]'
|
|
8
|
-
| '[aria-required]'
|
|
9
|
-
| '[aria-selected]'
|
|
10
|
-
| '[aria-checked]'
|
|
11
|
-
| '[aria-expanded]'
|
|
12
|
-
| '[aria-pressed]'
|
|
13
|
-
| `[aria-current=${'page' | 'step' | 'location' | 'date' | 'time'}]`
|
|
14
|
-
| '[aria-invalid]'
|
|
15
|
-
| `[aria-sort=${'ascending' | 'descending'}]`
|
|
16
|
-
|
|
17
|
-
type DataAttributes =
|
|
18
|
-
| '[data-selected]'
|
|
19
|
-
| '[data-highlighted]'
|
|
20
|
-
| '[data-hover]'
|
|
21
|
-
| '[data-active]'
|
|
22
|
-
| '[data-checked]'
|
|
23
|
-
| '[data-disabled]'
|
|
24
|
-
| '[data-readonly]'
|
|
25
|
-
| '[data-focus]'
|
|
26
|
-
| '[data-focus-visible]'
|
|
27
|
-
| '[data-focus-visible-added]'
|
|
28
|
-
| '[data-invalid]'
|
|
29
|
-
| '[data-pressed]'
|
|
30
|
-
| '[data-expanded]'
|
|
31
|
-
| '[data-grabbed]'
|
|
32
|
-
| '[data-dragged]'
|
|
33
|
-
| '[data-orientation=horizontal]'
|
|
34
|
-
| '[data-orientation=vertical]'
|
|
35
|
-
| '[data-in-range]'
|
|
36
|
-
| '[data-out-of-range]'
|
|
37
|
-
| '[data-placeholder-shown]'
|
|
38
|
-
| `[data-part=${string}]`
|
|
39
|
-
| `[data-attr=${string}]`
|
|
40
|
-
| `[data-placement=${string}]`
|
|
41
|
-
| `[data-theme=${string}]`
|
|
42
|
-
| `[data-size=${string}]`
|
|
43
|
-
| `[data-state=${string}]`
|
|
44
|
-
| '[data-empty]'
|
|
45
|
-
| '[data-loading]'
|
|
46
|
-
| '[data-loaded]'
|
|
47
|
-
| '[data-enter]'
|
|
48
|
-
| '[data-entering]'
|
|
49
|
-
| '[data-exited]'
|
|
50
|
-
| '[data-exiting]'
|
|
51
|
-
|
|
52
|
-
type AttributeSelector = `&${Pseudos | DataAttributes | AriaAttributes}`
|
|
53
|
-
type ParentSelector = `${DataAttributes | AriaAttributes} &`
|
|
54
|
-
|
|
55
|
-
type AtRuleType = 'media' | 'layer' | 'container' | 'supports' | 'page'
|
|
56
|
-
|
|
57
|
-
export type AnySelector = `${string}&` | `&${string}` | `@${AtRuleType}${string}`
|
|
58
|
-
export type Selectors = AttributeSelector | ParentSelector
|
package/dist/shared.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Primitive = string | number | boolean | null | undefined
|
|
2
|
-
|
|
3
|
-
export type LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)
|
|
4
|
-
|
|
5
|
-
export interface Recursive<T> {
|
|
6
|
-
[key: string]: T | Recursive<T>
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type Dict<T = any> = Record<string, T>
|
|
10
|
-
|
|
11
|
-
export type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>
|
|
12
|
-
|
|
13
|
-
export type AnyFunction<T = any> = (...args: T[]) => any
|
|
14
|
-
|
|
15
|
-
type Nullable<T> = T | null | undefined
|
|
16
|
-
|
|
17
|
-
export interface ArtifactContent {
|
|
18
|
-
file: string
|
|
19
|
-
code: string | undefined
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type Artifact = Nullable<{
|
|
23
|
-
dir?: string[]
|
|
24
|
-
files: ArtifactContent[]
|
|
25
|
-
}>
|
package/dist/static-css.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
interface CssRule {
|
|
2
|
-
/**
|
|
3
|
-
* The css properties to generate utilities for.
|
|
4
|
-
* @example ['margin', 'padding']
|
|
5
|
-
*/
|
|
6
|
-
properties: {
|
|
7
|
-
[property: string]: string[]
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The css conditions to generate utilities for.
|
|
11
|
-
* @example ['hover', 'focus']
|
|
12
|
-
*/
|
|
13
|
-
conditions?: string[]
|
|
14
|
-
/**
|
|
15
|
-
* Whether to generate responsive utilities.
|
|
16
|
-
*/
|
|
17
|
-
responsive?: boolean
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type RecipeRule =
|
|
21
|
-
| '*'
|
|
22
|
-
| ({
|
|
23
|
-
conditions?: string[]
|
|
24
|
-
responsive?: boolean
|
|
25
|
-
} & { [variant: string]: boolean | string[] })
|
|
26
|
-
|
|
27
|
-
export interface StaticCssOptions {
|
|
28
|
-
/**
|
|
29
|
-
* The css utility classes to generate.
|
|
30
|
-
*/
|
|
31
|
-
css?: CssRule[]
|
|
32
|
-
/**
|
|
33
|
-
* The css recipes to generate.
|
|
34
|
-
*/
|
|
35
|
-
recipes?: {
|
|
36
|
-
[recipe: string]: RecipeRule[]
|
|
37
|
-
}
|
|
38
|
-
}
|
package/dist/style-props.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ConditionalValue } from './conditions'
|
|
2
|
-
import type { PropertiesFallback } from './csstype'
|
|
3
|
-
import type { PropertyValue } from './prop-type'
|
|
4
|
-
|
|
5
|
-
type String = string & {}
|
|
6
|
-
type Number = number & {}
|
|
7
|
-
|
|
8
|
-
/* -----------------------------------------------------------------------------
|
|
9
|
-
* Shadowed export (in CLI): DO NOT REMOVE
|
|
10
|
-
* -----------------------------------------------------------------------------*/
|
|
11
|
-
|
|
12
|
-
type CssProperties = PropertiesFallback<String | Number>
|
|
13
|
-
|
|
14
|
-
export type CssVarProperties = {
|
|
15
|
-
[key in `--${string}`]?: ConditionalValue<string | number>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type SystemProperties = {
|
|
19
|
-
[K in keyof CssProperties]?: PropertyValue<K>
|
|
20
|
-
}
|
package/dist/system-types.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { ConditionalValue, Conditions, Nested } from './conditions'
|
|
2
|
-
import type { PropertiesFallback } from './csstype'
|
|
3
|
-
import type { SystemProperties, CssVarProperties } from './style-props'
|
|
4
|
-
|
|
5
|
-
type String = string & {}
|
|
6
|
-
type Number = number & {}
|
|
7
|
-
|
|
8
|
-
export type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
9
|
-
|
|
10
|
-
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
11
|
-
|
|
12
|
-
export type DistributiveUnion<T, U> = {
|
|
13
|
-
[K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
|
|
14
|
-
} & DistributiveOmit<U, keyof T>
|
|
15
|
-
|
|
16
|
-
export type Assign<T, U> = {
|
|
17
|
-
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
18
|
-
} & U
|
|
19
|
-
|
|
20
|
-
/* -----------------------------------------------------------------------------
|
|
21
|
-
* Native css properties
|
|
22
|
-
* -----------------------------------------------------------------------------*/
|
|
23
|
-
|
|
24
|
-
export type CssProperty = keyof PropertiesFallback
|
|
25
|
-
|
|
26
|
-
export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}
|
|
27
|
-
|
|
28
|
-
export interface CssKeyframes {
|
|
29
|
-
[name: string]: {
|
|
30
|
-
[time: string]: CssProperties
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/* -----------------------------------------------------------------------------
|
|
35
|
-
* Conditional css properties
|
|
36
|
-
* -----------------------------------------------------------------------------*/
|
|
37
|
-
|
|
38
|
-
type MinimalNested<P> = {
|
|
39
|
-
[K in keyof Conditions]?: Nested<P>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface GenericProperties {
|
|
43
|
-
[key: string]: ConditionalValue<String | Number | boolean>
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* -----------------------------------------------------------------------------
|
|
47
|
-
* Native css props
|
|
48
|
-
* -----------------------------------------------------------------------------*/
|
|
49
|
-
|
|
50
|
-
export type NestedCssProperties = Nested<CssProperties>
|
|
51
|
-
|
|
52
|
-
export type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>
|
|
53
|
-
|
|
54
|
-
export interface GlobalStyleObject {
|
|
55
|
-
[selector: string]: SystemStyleObject
|
|
56
|
-
}
|
|
57
|
-
export interface ExtendableGlobalStyleObject {
|
|
58
|
-
[selector: string]: SystemStyleObject | undefined
|
|
59
|
-
extend?: GlobalStyleObject | undefined
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type CompositionStyleObject<Property extends string> = Nested<{
|
|
63
|
-
[K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
|
|
64
|
-
}>
|
|
65
|
-
|
|
66
|
-
/* -----------------------------------------------------------------------------
|
|
67
|
-
* Jsx style props
|
|
68
|
-
* -----------------------------------------------------------------------------*/
|
|
69
|
-
interface WithCss {
|
|
70
|
-
css?: SystemStyleObject
|
|
71
|
-
}
|
|
72
|
-
type StyleProps = SystemProperties & MinimalNested<SystemStyleObject>
|
|
73
|
-
|
|
74
|
-
export type JsxStyleProps = StyleProps & WithCss
|
|
75
|
-
|
|
76
|
-
export interface PatchedHTMLProps {
|
|
77
|
-
htmlWidth?: string | number
|
|
78
|
-
htmlHeight?: string | number
|
|
79
|
-
htmlTranslate?: 'yes' | 'no' | undefined
|
|
80
|
-
htmlContent?: string
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
84
|
-
|
|
85
|
-
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
86
|
-
|
|
87
|
-
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
88
|
-
WithHTMLProps<T>,
|
|
89
|
-
P
|
|
90
|
-
>
|
package/dist/theme.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { LayerStyles, TextStyles } from './composition'
|
|
2
|
-
import type { RecipeConfig, SlotRecipeConfig } from './recipe'
|
|
3
|
-
import type { CssKeyframes } from './system-types'
|
|
4
|
-
import type { SemanticTokens, Tokens } from './tokens'
|
|
5
|
-
|
|
6
|
-
export interface Theme {
|
|
7
|
-
/**
|
|
8
|
-
* The breakpoints for your project.
|
|
9
|
-
*/
|
|
10
|
-
breakpoints?: Record<string, string>
|
|
11
|
-
/**
|
|
12
|
-
* The css animation keyframes definitions.
|
|
13
|
-
*/
|
|
14
|
-
keyframes?: CssKeyframes
|
|
15
|
-
/**
|
|
16
|
-
* The design tokens for your project.
|
|
17
|
-
*/
|
|
18
|
-
tokens?: Tokens
|
|
19
|
-
/**
|
|
20
|
-
* The semantic design tokens for your project.
|
|
21
|
-
*/
|
|
22
|
-
semanticTokens?: SemanticTokens
|
|
23
|
-
/**
|
|
24
|
-
* The typography styles for your project.
|
|
25
|
-
*/
|
|
26
|
-
textStyles?: TextStyles
|
|
27
|
-
/**
|
|
28
|
-
* The layer styles for your project.
|
|
29
|
-
*/
|
|
30
|
-
layerStyles?: LayerStyles
|
|
31
|
-
/**
|
|
32
|
-
* Multi-variant style definitions for your project.
|
|
33
|
-
* Useful for defining component styles.
|
|
34
|
-
*/
|
|
35
|
-
recipes?: Record<string, RecipeConfig>
|
|
36
|
-
/**
|
|
37
|
-
* Multi-variant style definitions for component slots.
|
|
38
|
-
*/
|
|
39
|
-
slotRecipes?: Record<string, SlotRecipeConfig>
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
interface PartialTheme extends Omit<Theme, 'recipes' | 'slotRecipes'> {
|
|
43
|
-
/**
|
|
44
|
-
* Multi-variant style definitions for your project.
|
|
45
|
-
* Useful for defining component styles.
|
|
46
|
-
*/
|
|
47
|
-
recipes?: Record<string, Partial<RecipeConfig>>
|
|
48
|
-
/**
|
|
49
|
-
* Multi-variant style definitions for component slots.
|
|
50
|
-
*/
|
|
51
|
-
slotRecipes?: Record<string, Partial<SlotRecipeConfig>>
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface ExtendableTheme extends Theme {
|
|
55
|
-
extend?: PartialTheme | undefined
|
|
56
|
-
}
|