@pandacss/types 2.0.0-beta.14 → 2.0.0-beta.16
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 +9 -58
- package/dist/global-vars.d.ts +39 -0
- package/dist/index.d.ts +1 -0
- package/dist/system-types.d.ts +11 -1
- package/dist/theme.d.ts +12 -1
- package/dist/utility.d.ts +7 -0
- package/package.json +2 -1
package/dist/config.d.ts
CHANGED
|
@@ -2,16 +2,16 @@ import type { TSConfig } from 'pkg-types'
|
|
|
2
2
|
import type { Conditions, ExtendableConditions } from './conditions'
|
|
3
3
|
import type { HookRegistry } from './hooks'
|
|
4
4
|
import type { PatternConfig } from './pattern'
|
|
5
|
-
import type { Keys,
|
|
5
|
+
import type { Keys, PathIn, RequiredBy } from './shared'
|
|
6
6
|
import type { StaticCssOptions } from './static-css'
|
|
7
7
|
import type {
|
|
8
8
|
ExtendableGlobalFontface,
|
|
9
9
|
ExtendableGlobalStyleObject,
|
|
10
10
|
GlobalFontface,
|
|
11
11
|
GlobalStyleObject,
|
|
12
|
-
SystemStyleObject,
|
|
13
12
|
} from './system-types'
|
|
14
13
|
import type { ExtendableTheme, Theme } from './theme'
|
|
14
|
+
import type { CssPropertyDefinition, GlobalVarsDefinition } from './global-vars'
|
|
15
15
|
import type { ExtendableUtilityConfig, UtilityConfig } from './utility'
|
|
16
16
|
|
|
17
17
|
export type { TSConfig }
|
|
@@ -39,10 +39,6 @@ export interface PresetCore {
|
|
|
39
39
|
* The global fontface for your project.
|
|
40
40
|
*/
|
|
41
41
|
globalFontface?: GlobalFontface
|
|
42
|
-
/**
|
|
43
|
-
* The global custom position try fallback option
|
|
44
|
-
*/
|
|
45
|
-
globalPositionTry?: GlobalPositionTry
|
|
46
42
|
/**
|
|
47
43
|
* Used to generate css utility classes for your project.
|
|
48
44
|
*/
|
|
@@ -74,58 +70,13 @@ interface ExtendableStaticCssOptions extends StaticCssOptions {
|
|
|
74
70
|
extend?: StaticCssOptions | undefined
|
|
75
71
|
}
|
|
76
72
|
|
|
77
|
-
export type CssPropertySyntax
|
|
78
|
-
| '*'
|
|
79
|
-
| '<length>'
|
|
80
|
-
| '<number>'
|
|
81
|
-
| '<percentage>'
|
|
82
|
-
| '<length-percentage>'
|
|
83
|
-
| '<color>'
|
|
84
|
-
| '<image>'
|
|
85
|
-
| '<url>'
|
|
86
|
-
| '<integer>'
|
|
87
|
-
| '<angle>'
|
|
88
|
-
| '<time>'
|
|
89
|
-
| '<resolution>'
|
|
90
|
-
| '<transform-function>'
|
|
91
|
-
| '<length> | <percentage>'
|
|
92
|
-
|
|
93
|
-
export interface CssPropertyDefinition {
|
|
94
|
-
/**
|
|
95
|
-
* Controls whether the custom property registration specified by @property inherits by default.
|
|
96
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/inherits
|
|
97
|
-
*/
|
|
98
|
-
inherits: boolean
|
|
99
|
-
/**
|
|
100
|
-
* Sets the initial value for the property.
|
|
101
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/initial-value
|
|
102
|
-
*/
|
|
103
|
-
initialValue?: string
|
|
104
|
-
/**
|
|
105
|
-
* Describes the allowable syntax for the property.
|
|
106
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
|
|
107
|
-
*/
|
|
108
|
-
syntax: LiteralUnion<CssPropertySyntax>
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface GlobalVarsDefinition {
|
|
112
|
-
[key: string]: string | CssPropertyDefinition
|
|
113
|
-
}
|
|
73
|
+
export type { CssPropertyDefinition, CssPropertySyntax, GlobalVarsDefinition } from './global-vars'
|
|
114
74
|
|
|
115
75
|
interface ExtendableGlobalVars {
|
|
116
76
|
[key: string]: string | CssPropertyDefinition | GlobalVarsDefinition | undefined
|
|
117
77
|
extend?: GlobalVarsDefinition
|
|
118
78
|
}
|
|
119
79
|
|
|
120
|
-
export interface GlobalPositionTry {
|
|
121
|
-
[key: string]: SystemStyleObject
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
interface ExtendableGlobalPositionTry {
|
|
125
|
-
[key: string]: SystemStyleObject | GlobalPositionTry | undefined
|
|
126
|
-
extend?: GlobalPositionTry | undefined
|
|
127
|
-
}
|
|
128
|
-
|
|
129
80
|
export interface ThemeVariant extends Pick<Theme, 'tokens' | 'semanticTokens'> {}
|
|
130
81
|
|
|
131
82
|
export interface ThemeVariantsMap {
|
|
@@ -154,7 +105,6 @@ export interface ExtendableOptions {
|
|
|
154
105
|
/**
|
|
155
106
|
* The global custom position try fallback option
|
|
156
107
|
*/
|
|
157
|
-
globalPositionTry?: ExtendableGlobalPositionTry
|
|
158
108
|
/**
|
|
159
109
|
* Used to generate css utility classes for your project.
|
|
160
110
|
*/
|
|
@@ -315,11 +265,6 @@ interface CssgenOptions {
|
|
|
315
265
|
* @default ':where(:host, :root)'
|
|
316
266
|
*/
|
|
317
267
|
cssVarRoot?: string
|
|
318
|
-
/**
|
|
319
|
-
* The css syntax kind to use
|
|
320
|
-
* @default 'object-literal'
|
|
321
|
-
*/
|
|
322
|
-
syntax?: 'template-literal' | 'object-literal'
|
|
323
268
|
/**
|
|
324
269
|
* Layer mappings used in the generated css.
|
|
325
270
|
* @default 'true'
|
|
@@ -355,6 +300,12 @@ export interface OptimizeOptions {
|
|
|
355
300
|
* Off by default. Namespace / side-effect imports still hydrate everything.
|
|
356
301
|
*/
|
|
357
302
|
treeshakeDesignSystem?: boolean
|
|
303
|
+
/**
|
|
304
|
+
* Also seed `@property` registrations as plain declarations, for engines that ignore
|
|
305
|
+
* `@property` (Safari < 16.4, Firefox < 128) and would otherwise drop any declaration
|
|
306
|
+
* reading an unregistered variable. Off by default — modern engines don't need it.
|
|
307
|
+
*/
|
|
308
|
+
propertyFallback?: boolean
|
|
358
309
|
}
|
|
359
310
|
|
|
360
311
|
interface CodegenOptions {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { LiteralUnion } from './shared'
|
|
2
|
+
|
|
3
|
+
export type CssPropertySyntax =
|
|
4
|
+
| '*'
|
|
5
|
+
| '<length>'
|
|
6
|
+
| '<number>'
|
|
7
|
+
| '<percentage>'
|
|
8
|
+
| '<length-percentage>'
|
|
9
|
+
| '<color>'
|
|
10
|
+
| '<image>'
|
|
11
|
+
| '<url>'
|
|
12
|
+
| '<integer>'
|
|
13
|
+
| '<angle>'
|
|
14
|
+
| '<time>'
|
|
15
|
+
| '<resolution>'
|
|
16
|
+
| '<transform-function>'
|
|
17
|
+
| '<length> | <percentage>'
|
|
18
|
+
|
|
19
|
+
export interface CssPropertyDefinition {
|
|
20
|
+
/**
|
|
21
|
+
* Controls whether the custom property registration specified by @property inherits by default.
|
|
22
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/inherits
|
|
23
|
+
*/
|
|
24
|
+
inherits: boolean
|
|
25
|
+
/**
|
|
26
|
+
* Sets the initial value for the property.
|
|
27
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/initial-value
|
|
28
|
+
*/
|
|
29
|
+
initialValue?: string
|
|
30
|
+
/**
|
|
31
|
+
* Describes the allowable syntax for the property.
|
|
32
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
|
|
33
|
+
*/
|
|
34
|
+
syntax: LiteralUnion<CssPropertySyntax>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GlobalVarsDefinition {
|
|
38
|
+
[key: string]: string | CssPropertyDefinition
|
|
39
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/system-types.d.ts
CHANGED
|
@@ -96,7 +96,17 @@ export interface ViewTransitionStyleObject {
|
|
|
96
96
|
new?: SystemStyleObject
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export type
|
|
99
|
+
export type ViewTransitions = Record<string, ViewTransitionStyleObject>
|
|
100
|
+
|
|
101
|
+
export type ViewTransitionFn = (options: ViewTransitionStyleObject | string) => string
|
|
102
|
+
|
|
103
|
+
/** Named `@position-try` fallback bags. Referenced by `positionTry('name')`. */
|
|
104
|
+
export type PositionTry = Record<string, SystemStyleObject>
|
|
105
|
+
|
|
106
|
+
export type PositionTryFn = (options: SystemStyleObject | string) => string
|
|
107
|
+
|
|
108
|
+
/** Inline `@keyframes` factory: `keyframes({...})` returns the animation name. Object form only. */
|
|
109
|
+
export type KeyframesFn = (keyframe: CssKeyframes[string]) => string
|
|
100
110
|
|
|
101
111
|
export interface GlobalStyleObject {
|
|
102
112
|
[selector: string]: SystemStyleObject
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnimationStyles, LayerStyles, TextStyles } from './composition'
|
|
2
2
|
import type { RecipeConfig, SlotRecipeConfig } from './recipe'
|
|
3
|
-
import type { CssKeyframes } from './system-types'
|
|
3
|
+
import type { CssKeyframes, PositionTry, ViewTransitions } from './system-types'
|
|
4
4
|
import type { SemanticTokens, Tokens } from './tokens'
|
|
5
5
|
|
|
6
6
|
export interface ColorPaletteOptions {
|
|
@@ -50,6 +50,17 @@ export interface Theme {
|
|
|
50
50
|
* The animation styles for your project.
|
|
51
51
|
*/
|
|
52
52
|
animationStyles?: AnimationStyles
|
|
53
|
+
/**
|
|
54
|
+
* Named View Transition bags. Call `viewTransition('slide')` to use one.
|
|
55
|
+
* Panda emits the shared `::view-transition-*` CSS; you still set unique
|
|
56
|
+
* `view-transition-name` values at runtime.
|
|
57
|
+
*/
|
|
58
|
+
viewTransitions?: ViewTransitions
|
|
59
|
+
/**
|
|
60
|
+
* Named `@position-try` anchor-positioning fallbacks. Call `positionTry('bottom')`
|
|
61
|
+
* to get the dashed-ident for `positionTryFallbacks`. Emitted only when used.
|
|
62
|
+
*/
|
|
63
|
+
positionTry?: PositionTry
|
|
53
64
|
/**
|
|
54
65
|
* Multi-variant style definitions for your project.
|
|
55
66
|
* Useful for defining component styles.
|
package/dist/utility.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GlobalVarsDefinition } from './global-vars'
|
|
1
2
|
import type { LiteralUnion } from './shared'
|
|
2
3
|
import type { CssProperty, NestedCssProperties } from './system-types'
|
|
3
4
|
import type { Token, TokenCategory } from './tokens'
|
|
@@ -68,6 +69,11 @@ export interface PropertyConfig {
|
|
|
68
69
|
* Whether this utility is deprecated or not.
|
|
69
70
|
*/
|
|
70
71
|
deprecated?: boolean
|
|
72
|
+
/**
|
|
73
|
+
* `@property` registrations for the CSS variables this utility writes. Merged into the
|
|
74
|
+
* config-level `globalVars`, and pruned when the stylesheet never references them.
|
|
75
|
+
*/
|
|
76
|
+
globalVars?: GlobalVarsDefinition
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
export type CssSemanticGroup =
|
|
@@ -88,6 +94,7 @@ export type CssSemanticGroup =
|
|
|
88
94
|
| 'Layout'
|
|
89
95
|
| 'List'
|
|
90
96
|
| 'Margin'
|
|
97
|
+
| 'Mask'
|
|
91
98
|
| 'Other'
|
|
92
99
|
| 'Padding'
|
|
93
100
|
| 'Position'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/types",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.16",
|
|
4
4
|
"description": "The types for css panda",
|
|
5
5
|
"main": "dist/index.d.ts",
|
|
6
6
|
"author": "Segun Adebayo <joseshegs@gmail.com>",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"@parcel/watcher": "2.5.6",
|
|
30
31
|
"csstype": "3.2.3",
|
|
31
32
|
"ncp": "2.0.0",
|
|
32
33
|
"pkg-types": "2.3.0"
|