@bamboocss/types 1.11.1 → 1.11.3
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 +65 -0
- package/dist/composition.d.ts +226 -0
- package/dist/conditions.d.ts +74 -0
- package/dist/config.d.ts +535 -0
- package/dist/csstype.d.ts +22569 -0
- package/dist/hooks-api.d.ts +61 -0
- package/dist/hooks.d.ts +237 -0
- package/dist/index.d.ts +21 -0
- package/dist/logger.d.ts +28 -0
- package/dist/parser.d.ts +43 -0
- package/dist/parts.d.ts +7 -0
- package/dist/pattern.d.ts +77 -0
- package/dist/prop-type.d.ts +14 -0
- package/dist/recipe.d.ts +181 -0
- package/dist/reporter.d.ts +167 -0
- package/dist/runtime.d.ts +48 -0
- package/dist/selectors.d.ts +58 -0
- package/dist/shared.d.ts +39 -0
- package/dist/spec.d.ts +197 -0
- package/dist/static-css.d.ts +55 -0
- package/dist/style-props.d.ts +20 -0
- package/dist/style-rules.d.ts +41 -0
- package/dist/system-types.d.ts +150 -0
- package/dist/theme.d.ts +94 -0
- package/dist/tokens.d.ts +104 -0
- package/dist/utility.d.ts +114 -0
- package/package.json +6 -6
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type Difference } from 'microdiff'
|
|
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-create-style-context'
|
|
27
|
+
| 'jsx-patterns-index'
|
|
28
|
+
| 'css-index'
|
|
29
|
+
| 'themes'
|
|
30
|
+
| 'package.json'
|
|
31
|
+
| 'types-jsx'
|
|
32
|
+
| 'types-entry'
|
|
33
|
+
| 'types-styles'
|
|
34
|
+
| 'types-conditions'
|
|
35
|
+
| 'types-gen'
|
|
36
|
+
| 'types-gen-system'
|
|
37
|
+
| 'static-css'
|
|
38
|
+
| 'styles.css'
|
|
39
|
+
| 'styles'
|
|
40
|
+
| `recipes.${string}`
|
|
41
|
+
| `patterns.${string}`
|
|
42
|
+
|
|
43
|
+
export type CssArtifactType = 'preflight' | 'tokens' | 'static' | 'global' | 'keyframes'
|
|
44
|
+
|
|
45
|
+
export type Artifact = {
|
|
46
|
+
id: ArtifactId
|
|
47
|
+
dir?: string[]
|
|
48
|
+
files: ArtifactContent[]
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface AffectedArtifacts {
|
|
52
|
+
recipes: string[]
|
|
53
|
+
patterns: string[]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ArtifactFilters {
|
|
57
|
+
ids?: ArtifactId[]
|
|
58
|
+
affecteds?: AffectedArtifacts
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface DiffConfigResult {
|
|
62
|
+
hasConfigChanged: boolean
|
|
63
|
+
artifacts: Set<ArtifactId>
|
|
64
|
+
diffs: Difference[]
|
|
65
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import type { CompositionStyleObject } from './system-types'
|
|
2
|
+
|
|
3
|
+
interface Token<T> {
|
|
4
|
+
value: T
|
|
5
|
+
description?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Recursive<T> {
|
|
9
|
+
[key: string]: Recursive<T> | T
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* -----------------------------------------------------------------------------
|
|
13
|
+
* Text styles
|
|
14
|
+
* -----------------------------------------------------------------------------*/
|
|
15
|
+
|
|
16
|
+
type TextStyleProperty =
|
|
17
|
+
| 'color'
|
|
18
|
+
| 'direction'
|
|
19
|
+
| 'font'
|
|
20
|
+
| 'fontFamily'
|
|
21
|
+
| 'fontFeatureSettings'
|
|
22
|
+
| 'fontKerning'
|
|
23
|
+
| 'fontLanguageOverride'
|
|
24
|
+
| 'fontOpticalSizing'
|
|
25
|
+
| 'fontPalette'
|
|
26
|
+
| 'fontSize'
|
|
27
|
+
| 'fontSizeAdjust'
|
|
28
|
+
| 'fontStretch'
|
|
29
|
+
| 'fontStyle'
|
|
30
|
+
| 'fontSynthesis'
|
|
31
|
+
| 'fontVariant'
|
|
32
|
+
| 'fontVariantAlternates'
|
|
33
|
+
| 'fontVariantCaps'
|
|
34
|
+
| 'fontVariantLigatures'
|
|
35
|
+
| 'fontVariantNumeric'
|
|
36
|
+
| 'fontVariantPosition'
|
|
37
|
+
| 'fontVariationSettings'
|
|
38
|
+
| 'fontWeight'
|
|
39
|
+
| 'hangingPunctuation'
|
|
40
|
+
| 'hypens'
|
|
41
|
+
| 'hyphenateCharacter'
|
|
42
|
+
| 'hyphenateLimitChars'
|
|
43
|
+
| 'letterSpacing'
|
|
44
|
+
| 'lineBreak'
|
|
45
|
+
| 'lineHeight'
|
|
46
|
+
| 'quotes'
|
|
47
|
+
| 'overflowWrap'
|
|
48
|
+
| 'tabSize'
|
|
49
|
+
| 'textAlign'
|
|
50
|
+
| 'textAlignLast'
|
|
51
|
+
| 'textBox'
|
|
52
|
+
| 'textBoxEdge'
|
|
53
|
+
| 'textBoxTrim'
|
|
54
|
+
| 'textCombineUpright'
|
|
55
|
+
| 'textDecoration'
|
|
56
|
+
| 'textDecorationColor'
|
|
57
|
+
| 'textDecorationLine'
|
|
58
|
+
| 'textDecorationSkip'
|
|
59
|
+
| 'textDecorationSkipBox'
|
|
60
|
+
| 'textDecorationSkipInk'
|
|
61
|
+
| 'textDecorationSkipInset'
|
|
62
|
+
| 'textDecorationStyle'
|
|
63
|
+
| 'textDecorationThickness'
|
|
64
|
+
| 'textEmphasis'
|
|
65
|
+
| 'textEmphasisColor'
|
|
66
|
+
| 'textEmphasisPosition'
|
|
67
|
+
| 'textEmphasisStyle'
|
|
68
|
+
| 'textIndent'
|
|
69
|
+
| 'textJustify'
|
|
70
|
+
| 'textOrientation'
|
|
71
|
+
| 'textOverflow'
|
|
72
|
+
| 'textRendering'
|
|
73
|
+
| 'textShadow'
|
|
74
|
+
| 'textStroke'
|
|
75
|
+
| 'textStrokeColor'
|
|
76
|
+
| 'textStrokeWidth'
|
|
77
|
+
| 'textTransform'
|
|
78
|
+
| 'textUnderlineOffset'
|
|
79
|
+
| 'textUnderlinePosition'
|
|
80
|
+
| 'textWrap'
|
|
81
|
+
| 'textWrapMode'
|
|
82
|
+
| 'textWrapStyle'
|
|
83
|
+
| 'unicodeBidi'
|
|
84
|
+
| 'verticalAlign'
|
|
85
|
+
| 'whiteSpace'
|
|
86
|
+
| 'wordBreak'
|
|
87
|
+
| 'wordSpacing'
|
|
88
|
+
| 'writingMode'
|
|
89
|
+
|
|
90
|
+
export type TextStyle = CompositionStyleObject<TextStyleProperty>
|
|
91
|
+
|
|
92
|
+
export type TextStyles = Recursive<Token<TextStyle>>
|
|
93
|
+
|
|
94
|
+
/* -----------------------------------------------------------------------------
|
|
95
|
+
* Layer styles
|
|
96
|
+
* -----------------------------------------------------------------------------*/
|
|
97
|
+
|
|
98
|
+
type LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'
|
|
99
|
+
|
|
100
|
+
type PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'
|
|
101
|
+
|
|
102
|
+
type Placement = PhysicalPlacement | LogicalPlacement
|
|
103
|
+
|
|
104
|
+
type Radius =
|
|
105
|
+
| `Top${'Right' | 'Left'}`
|
|
106
|
+
| `Bottom${'Right' | 'Left'}`
|
|
107
|
+
| `Start${'Start' | 'End'}`
|
|
108
|
+
| `End${'Start' | 'End'}`
|
|
109
|
+
|
|
110
|
+
type LayerStyleProperty =
|
|
111
|
+
| 'aspectRatio'
|
|
112
|
+
| 'background'
|
|
113
|
+
| 'backgroundColor'
|
|
114
|
+
| 'backgroundImage'
|
|
115
|
+
| 'border'
|
|
116
|
+
| 'borderColor'
|
|
117
|
+
| 'borderImage'
|
|
118
|
+
| 'borderImageOutset'
|
|
119
|
+
| 'borderImageRepeat'
|
|
120
|
+
| 'borderImageSlice'
|
|
121
|
+
| 'borderImageSource'
|
|
122
|
+
| 'borderImageWidth'
|
|
123
|
+
| 'borderRadius'
|
|
124
|
+
| 'borderStyle'
|
|
125
|
+
| 'borderWidth'
|
|
126
|
+
| `border${Placement}`
|
|
127
|
+
| `border${Placement}Color`
|
|
128
|
+
| `border${Placement}Style`
|
|
129
|
+
| `border${Placement}Width`
|
|
130
|
+
| 'borderRadius'
|
|
131
|
+
| `border${Radius}Radius`
|
|
132
|
+
| 'boxShadow'
|
|
133
|
+
| 'boxShadowColor'
|
|
134
|
+
| 'clipPath'
|
|
135
|
+
| 'color'
|
|
136
|
+
| 'contain'
|
|
137
|
+
| 'content'
|
|
138
|
+
| 'contentVisibility'
|
|
139
|
+
| 'cursor'
|
|
140
|
+
| 'display'
|
|
141
|
+
| 'filter'
|
|
142
|
+
| 'backdropFilter'
|
|
143
|
+
| 'height'
|
|
144
|
+
| 'width'
|
|
145
|
+
| 'minHeight'
|
|
146
|
+
| 'minWidth'
|
|
147
|
+
| 'maxHeight'
|
|
148
|
+
| 'maxWidth'
|
|
149
|
+
| `margin${Placement}`
|
|
150
|
+
| 'inset'
|
|
151
|
+
| `inset${LogicalPlacement}`
|
|
152
|
+
| Lowercase<PhysicalPlacement>
|
|
153
|
+
| 'isolation'
|
|
154
|
+
| 'mask'
|
|
155
|
+
| 'maskClip'
|
|
156
|
+
| 'maskComposite'
|
|
157
|
+
| 'maskImage'
|
|
158
|
+
| 'maskMode'
|
|
159
|
+
| 'maskOrigin'
|
|
160
|
+
| 'maskPosition'
|
|
161
|
+
| 'maskRepeat'
|
|
162
|
+
| 'maskSize'
|
|
163
|
+
| 'mixBlendMode'
|
|
164
|
+
| 'objectFit'
|
|
165
|
+
| 'objectPosition'
|
|
166
|
+
| 'opacity'
|
|
167
|
+
| 'outline'
|
|
168
|
+
| 'outlineColor'
|
|
169
|
+
| 'outlineOffset'
|
|
170
|
+
| 'outlineStyle'
|
|
171
|
+
| 'outlineWidth'
|
|
172
|
+
| 'overflow'
|
|
173
|
+
| 'overflowX'
|
|
174
|
+
| 'overflowY'
|
|
175
|
+
| 'padding'
|
|
176
|
+
| `padding${Placement}`
|
|
177
|
+
| 'pointerEvents'
|
|
178
|
+
| 'position'
|
|
179
|
+
| 'resize'
|
|
180
|
+
| 'transform'
|
|
181
|
+
| 'transition'
|
|
182
|
+
| 'visibility'
|
|
183
|
+
| 'willChange'
|
|
184
|
+
| 'zIndex'
|
|
185
|
+
| 'backgroundBlendMode'
|
|
186
|
+
| 'backgroundAttachment'
|
|
187
|
+
| 'backgroundClip'
|
|
188
|
+
| 'backgroundOrigin'
|
|
189
|
+
| 'backgroundPosition'
|
|
190
|
+
| 'backgroundRepeat'
|
|
191
|
+
| 'backgroundSize'
|
|
192
|
+
|
|
193
|
+
export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
194
|
+
|
|
195
|
+
export type LayerStyles = Recursive<Token<LayerStyle>>
|
|
196
|
+
|
|
197
|
+
/* -----------------------------------------------------------------------------
|
|
198
|
+
* Motion styles
|
|
199
|
+
* -----------------------------------------------------------------------------*/
|
|
200
|
+
|
|
201
|
+
type AnimationStyleProperty =
|
|
202
|
+
| 'animation'
|
|
203
|
+
| 'animationComposition'
|
|
204
|
+
| 'animationDelay'
|
|
205
|
+
| 'animationDirection'
|
|
206
|
+
| 'animationDuration'
|
|
207
|
+
| 'animationFillMode'
|
|
208
|
+
| 'animationIterationCount'
|
|
209
|
+
| 'animationName'
|
|
210
|
+
| 'animationPlayState'
|
|
211
|
+
| 'animationTimingFunction'
|
|
212
|
+
| 'animationRange'
|
|
213
|
+
| 'animationRangeStart'
|
|
214
|
+
| 'animationRangeEnd'
|
|
215
|
+
| 'animationTimeline'
|
|
216
|
+
| 'transformOrigin'
|
|
217
|
+
|
|
218
|
+
export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>
|
|
219
|
+
|
|
220
|
+
export type AnimationStyles = Recursive<Token<AnimationStyle>>
|
|
221
|
+
|
|
222
|
+
export interface CompositionStyles {
|
|
223
|
+
textStyles: TextStyles
|
|
224
|
+
layerStyles: LayerStyles
|
|
225
|
+
animationStyles: AnimationStyles
|
|
226
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { AnySelector, Selectors } from './selectors'
|
|
2
|
+
|
|
3
|
+
export type ConditionType =
|
|
4
|
+
| 'at-rule'
|
|
5
|
+
| 'parent-nesting'
|
|
6
|
+
| 'self-nesting'
|
|
7
|
+
| 'combinator-nesting'
|
|
8
|
+
| 'mixed'
|
|
9
|
+
| 'multi-block'
|
|
10
|
+
|
|
11
|
+
export type ConditionDetails = AtRuleCondition | SelectorCondition | MixedCondition | MultiBlockCondition
|
|
12
|
+
|
|
13
|
+
export interface AtRuleCondition {
|
|
14
|
+
type: 'at-rule'
|
|
15
|
+
value: string
|
|
16
|
+
raw: string
|
|
17
|
+
name: string
|
|
18
|
+
params: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SelectorCondition {
|
|
22
|
+
type: 'self-nesting' | 'parent-nesting' | 'combinator-nesting'
|
|
23
|
+
value: string
|
|
24
|
+
raw: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface MixedCondition {
|
|
28
|
+
type: 'mixed'
|
|
29
|
+
value: ConditionDetails[]
|
|
30
|
+
raw: string[]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface MultiBlockCondition {
|
|
34
|
+
type: 'multi-block'
|
|
35
|
+
value: MixedCondition[]
|
|
36
|
+
raw: Record<string, any>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* -----------------------------------------------------------------------------
|
|
40
|
+
* Shadowed export (in CLI): DO NOT REMOVE
|
|
41
|
+
* -----------------------------------------------------------------------------*/
|
|
42
|
+
|
|
43
|
+
export type ConditionObjectQuery = {
|
|
44
|
+
[key: string]: ConditionObjectQuery | '@slot'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ConditionQuery = string | string[] | ConditionObjectQuery
|
|
48
|
+
|
|
49
|
+
export interface Conditions {
|
|
50
|
+
[condition: string]: ConditionQuery
|
|
51
|
+
}
|
|
52
|
+
export interface ExtendableConditions {
|
|
53
|
+
[condition: string]: ConditionQuery | Conditions | undefined
|
|
54
|
+
extend?: Conditions | undefined
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type Condition = string
|
|
58
|
+
|
|
59
|
+
export type ConditionalValue<V> =
|
|
60
|
+
| V
|
|
61
|
+
| Array<V | null>
|
|
62
|
+
| {
|
|
63
|
+
[K in keyof Conditions]?: ConditionalValue<V>
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type Nested<P> =
|
|
67
|
+
| (P & {
|
|
68
|
+
[K in Selectors]?: Nested<P>
|
|
69
|
+
} & {
|
|
70
|
+
[K in AnySelector]?: Nested<P>
|
|
71
|
+
})
|
|
72
|
+
| {
|
|
73
|
+
[K in Condition]?: Nested<P>
|
|
74
|
+
}
|