-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.d.ts
205 lines (192 loc) · 8.32 KB
/
style.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
declare module "preact/jsx" {
import { Color, Font, Texture, Texture2D, FontStyle, ScaleMode, TextAnchor, Sprite } from "UnityEngine"
import { float2, float3, float4 } from "Unity/Mathematics"
import { Align, BackgroundRepeat, DisplayStyle, EasingFunction, EasingMode, FlexDirection, FontDefinition, Justify, Overflow, OverflowClipBox, Position, TextOverflow, TextOverflowPosition, Visibility, WhiteSpace, Wrap } from "UnityEngine/UIElements"
export type ColorInfo = float4 | number[] | string | Color
type TextShadowInfo = { offset: float2 | number[], blurRadius: number, color: ColorInfo }
type CursorInfo = { hotspot: float2 | number[], texture: Texture2D }
export type Style = {
alignContent?: keyof typeof Align
alignItems?: keyof typeof Align
alignSelf?: keyof typeof Align
backgroundColor?: ColorInfo // StyleColor
backgroundImage?: Sprite | Texture | string // StyleBackground
backgroundSize?: BackgroundSize | string // StyleBackgroundSize
backgroundRepeat?: BackgroundRepeat | string // StyleBackgroundRepeat
// backgroundPosition?: string // TODO StyleBackgroundPosition (Custom)
backgroundPositionX?: BackgroundPosition | string // StyleBackgroundPosition
backgroundPositionY?: BackgroundPosition | string // StyleBackgroundPosition
borderColor?: ColorInfo // StyleBorderColor (Custom)
borderWidth?: number | number[] // StyleBorderWidth (Custom)
borderRadius?: number | number[] // StyleBorderRadius (Custom)
borderBottomColor?: ColorInfo // StyleColor
borderBottomLeftRadius?: number | string // StyleLength
borderBottomRightRadius?: number | string // StyleLength
borderBottomWidth?: number // StyleFloat
borderLeftColor?: ColorInfo // StyleColor
borderLeftWidth?: number // StyleFloat
borderRightColor?: ColorInfo // StyleColor
borderRightWidth?: number // StyleFloat
borderTopColor?: ColorInfo // StyleColor
borderTopLeftRadius?: number | string // StyleLength
borderTopRightRadius?: number | string // StyleLength
borderTopWidth?: number // StyleFloat
bottom?: number | string // StyleLength
color?: ColorInfo // StyleColor
cursor?: CursorInfo // StyleCursor
display?: keyof typeof DisplayStyle
flexBasis?: number | string // StyleLength
flexDirection?: keyof typeof FlexDirection
flexGrow?: number // StyleFloat
flexShrink?: number // StyleFloat
flexWrap?: keyof typeof Wrap
fontSize?: number | string // StyleLength
height?: number | string // StyleLength
justifyContent?: keyof typeof Justify
left?: number | string // StyleLength
letterSpacing?: number | string // StyleLength
margin?: number | number[] // StyleMargin (Custom)
marginBottom?: number | string // StyleLength
marginLeft?: number | string // StyleLength
marginRight?: number | string // StyleLength
marginTop?: number | string // StyleLength
maxHeight?: number | string // StyleLength
maxWidth?: number | string // StyleLength
minHeight?: number | string // StyleLength
minWidth?: number | string // StyleLength
opacity?: number // StyleFloat
overflow?: keyof typeof Overflow
padding?: number | number[] // StylePadding (Custom)
paddingBottom?: number | string // StyleLength
paddingLeft?: number | string // StyleLength
paddingRight?: number | string // StyleLength
paddingTop?: number | string // StyleLength
position?: keyof typeof Position
right?: number | string // StyleLength
rotate?: number | string // StyleRotate
scale?: float2 | number[] // StyleScale
textOverflow?: keyof typeof TextOverflow
textShadow?: TextShadowInfo // StyleTextShadow
top?: number | string // StyleLength
transformOrigin?: float2 | number[] | string[] // StyleTransformOrigin
transitionDelay?: number[] // StyleList<TimeValue>
transitionDuration?: number[] // StyleList<TimeValue>
transitionProperty?: (keyof StyleKeys)[] // StyleList<StylePropertyName>
transitionTimingFunction?: (keyof typeof EasingMode)[] // StyleList<EasingFunction>
translate?: float2 | number[] | string // StyleTranslate
unityBackgroundImageTintColor?: ColorInfo // StyleColor
unityBackgroundScaleMode?: keyof typeof ScaleMode
unityFont?: Font | string // StyleFont
unityFontDefinition?: FontDefinition | string // StyleFontDefinition
unityFontStyleAndWeight?: keyof typeof FontStyle
unityOverflowClipBox?: keyof typeof OverflowClipBox
unityParagraphSpacing?: number | string // StyleLength
unitySliceBottom?: number // StyleInt
unitySliceLeft?: number // StyleInt
unitySliceRight?: number // StyleInt
unitySliceTop?: number // StyleInt
unitySliceScale?: number // StyleFloat
unityTextAlign?: keyof typeof TextAnchor
unityTextOutlineColor?: ColorInfo // StyleColor
unityTextOutlineWidth?: number // StyleFloat
unityTextOverflowPosition?: keyof typeof TextOverflowPosition
visibility?: keyof typeof Visibility
whiteSpace?: keyof typeof WhiteSpace
width?: number | string // StyleLength
wordSpacing?: number | string // StyleLength
}
// UnityEngine.UIElements.StyleSheets.StylePropertyUtil
export type StyleKeys = {
"align-content": any,
"align-items": any,
"align-self": any,
"all": any,
"background-color": any,
"background-image": any,
"background-size": any,
"background-repeat": any,
"background-position-x": any,
"background-position-y": any,
"border-bottom-color": any,
"border-bottom-left-radius": any,
"border-bottom-right-radius": any,
"border-bottom-width": any,
"border-color": any,
"border-left-color": any,
"border-left-width": any,
"border-radius": any,
"border-right-color": any,
"border-right-width": any,
"border-top-color": any,
"border-top-left-radius": any,
"border-top-right-radius": any,
"border-top-width": any,
"border-width": any,
"bottom": any,
"color": any,
"cursor": any,
"display": any,
"flex": any,
"flex-basis": any,
"flex-direction": any,
"flex-grow": any,
"flex-shrink": any,
"flex-wrap": any,
"font-size": any,
"height": any,
"justify-content": any,
"left": any,
"letter-spacing": any,
"margin": any,
"margin-bottom": any,
"margin-left": any,
"margin-right": any,
"margin-top": any,
"max-height": any,
"max-width": any,
"min-height": any,
"min-width": any,
"opacity": any,
"overflow": any,
"padding": any,
"padding-bottom": any,
"padding-left": any,
"padding-right": any,
"padding-top": any,
"position": any,
"right": any,
"rotate": any,
"scale": any,
"text-overflow": any,
"text-shadow": any,
"top": any,
"transform-origin": any,
"transition": any,
"transition-delay": any,
"transition-duration": any,
"transition-property": any,
"transition-timing-function": any,
"translate": any,
"-unity-background-image-tint-color": any,
"-unity-background-scale-mode": any,
"-unity-font": any,
"-unity-font-definition": any,
"-unity-font-style": any,
"-unity-overflow-clip-box": any,
"-unity-paragraph-spacing": any,
"-unity-slice-bottom": any,
"-unity-slice-left": any,
"-unity-slice-right": any,
"-unity-slice-top": any,
"-unity-slice-scale": any,
"-unity-text-align": any,
"-unity-text-outline": any,
"-unity-text-outline-color": any,
"-unity-text-outline-width": any,
"-unity-text-overflow-position": any,
"visibility": any,
"white-space": any,
"width": any,
"word-spacing": any,
}
}