@lynx-js/types 3.3.1 → 3.4.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/CHANGELOG.md CHANGED
@@ -1,8 +1,46 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.4.3
4
+ - Add `font-variation-settings`,`font-feature-settings` and `font-optical-sizing` CSS properties.
5
+ - Add `experimental-recycle-available-item-before-layout` property for list.
6
+
7
+ ## 3.4.2
8
+ - And `lynx.fetchBundle` api defines.
9
+ - And `ResponseHandler` defines.
10
+
11
+ ## 3.4.1
12
+
13
+ - Add the following properties: `custom-context-menu`, `custom-text-selection`, `text-selection`.
14
+ - Add the following methods: `setTextSelection`, `getTextBoundingRect`, `getSelectedText`.
15
+ - Add `bindselectionchange` event.
16
+ - Add `addFont` method.
17
+
18
+ ## 3.4.0
19
+
20
+ ### Major Changes
21
+
22
+ - Introduce <input> and <textarea>
23
+
24
+ ## 3.3.4
25
+
26
+ - Add typing for the runtime interfaces.
27
+
28
+ ## 3.3.3
29
+
30
+ - [Infra][Types] Codegen longhand and shorthand properties from css_defines
31
+ - Add `experimental-recycle-sticky-item` and `sticky-buffer-count` for list
32
+ - Add `experimental-update-sticky-for-diff` for list
33
+ - Add ReloadBundleEntry to standardize the timing of reload behavior.
34
+
35
+ ## 3.3.2
36
+
37
+ - Add typing for MessageEvent.
38
+
3
39
  ## 3.3.1
4
40
 
5
41
  - [Infra][Types] Codegen csstype.d.ts from css_defines
42
+ - Rename `visibleCellsAfterUpdate` to `visibleItemAfterUpdate` for `list`
43
+ - Rename `visibleCellsBeforeUpdate` to `visibleItemBeforeUpdate` for `list`
6
44
 
7
45
  ## 3.3.0
8
46
 
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@lynx-js/types",
3
- "version": "3.3.1",
3
+ "version": "3.4.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lynx",
7
7
  "types"
8
8
  ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/lynx-family/lynx.git"
12
+ },
9
13
  "license": "Apache-2.0",
10
14
  "author": "Lynx Authors",
11
15
  "types": "types/index.d.ts",
@@ -34,6 +34,7 @@ export interface PipelineEntry extends PerformanceEntry {
34
34
  layoutUiOperationExecuteEnd: number;
35
35
  paintEnd: number;
36
36
  frameworkRenderingTiming: FrameworkRenderingTimings[keyof FrameworkRenderingTimings] & FrameworkRenderingTiming;
37
+ hostPlatformTiming: HostPlatformTiming;
37
38
  }
38
39
 
39
40
  export interface LoadBundleEntry extends PipelineEntry {
@@ -88,3 +89,55 @@ export interface MetricActualFmpEntry extends PerformanceEntry {
88
89
  lynxActualFmp: PerformanceMetric;
89
90
  totalActualFmp: PerformanceMetric;
90
91
  }
92
+
93
+ export interface ReloadBundleEntry extends PipelineEntry {
94
+ reloadBundleStart: number;
95
+ reloadBundleEnd: number;
96
+ reloadBackgroundStart: number;
97
+ reloadBackgroundEnd: number;
98
+ ffiStart: number;
99
+ ffiEnd: number;
100
+ }
101
+
102
+ export interface MemoryUsageEntry extends PerformanceEntry {
103
+ sizeBytes: any;
104
+ detail: Record<string, MemoryUsageItem>;
105
+ }
106
+
107
+ export interface MemoryUsageItem {
108
+ category: string;
109
+ sizeBytes: any;
110
+ detail: Record<string, string>;
111
+ }
112
+
113
+ export interface LazyBundleEntry extends PerformanceEntry {
114
+ componentUrl: string;
115
+ mode: string;
116
+ size: number;
117
+ sync: boolean;
118
+ loadSuccess: boolean;
119
+ requireStart: number;
120
+ requireEnd: number;
121
+ decodeStart: number;
122
+ decodeEnd: number;
123
+ }
124
+
125
+ export interface AndroidHostPlatformTiming {
126
+ hostPlatformType: 'Android';
127
+ measureStart: number;
128
+ measureEnd: number;
129
+ layoutStart: number;
130
+ layoutEnd: number;
131
+ drawStart: number;
132
+ drawEnd: number;
133
+ }
134
+
135
+ export interface IOSHostPlatformTiming {
136
+ hostPlatformType: 'iOS';
137
+ }
138
+
139
+ export interface HarmonyHostPlatformTiming {
140
+ hostPlatformType: 'Harmony';
141
+ }
142
+
143
+ export type HostPlatformTiming = AndroidHostPlatformTiming | IOSHostPlatformTiming | HarmonyHostPlatformTiming
@@ -70,6 +70,11 @@ export interface ResourcePrefetchResult {
70
70
  }[];
71
71
  }
72
72
 
73
+ export interface FontFace {
74
+ 'font-family': string;
75
+ 'src': string;
76
+ }
77
+
73
78
  export type GetElementByIdFunc = (id: string) => AnimationElement;
74
79
 
75
80
  /**
@@ -150,4 +155,9 @@ export interface Lynx extends CommonLynx {
150
155
  */
151
156
  onError?: (error: Error) => void;
152
157
 
158
+ /**
159
+ * @description Dynamic add font
160
+ * @since 2.12
161
+ */
162
+ addFont(fontFace: FontFace, callback?: () => void): void;
153
163
  }
@@ -10,234 +10,259 @@
10
10
  * 3. For other types: Uses string type
11
11
  */
12
12
 
13
- import type * as CSS from 'csstype';
13
+ export type CSSProperties = {
14
+ // layout
15
+ flexFlow?: string;
16
+ marginInlineStart?: string;
17
+ marginInlineEnd?: string;
18
+ paddingInlineStart?: string;
19
+ paddingInlineEnd?: string;
20
+ gridTemplateColumns?: string;
21
+ gridTemplateRows?: string;
22
+ gridAutoColumns?: string;
23
+ gridAutoRows?: string;
24
+ gridColumnSpan?: number;
25
+ gridRowSpan?: number;
26
+ gridColumnStart?: string;
27
+ gridColumnEnd?: string;
28
+ gridRowStart?: string;
29
+ gridRowEnd?: string;
30
+ gridColumnGap?: string;
31
+ gridRowGap?: string;
32
+ gridAutoFlow?: 'row' | 'column' | 'dense' | 'row dense' | 'column dense';
33
+ maskPosition?: string;
34
+ display?: 'none' | 'flex' | 'grid' | 'linear' | 'relative' | 'block' | 'auto';
35
+ padding?: string;
36
+ paddingLeft?: string;
37
+ paddingRight?: string;
38
+ paddingTop?: string;
39
+ paddingBottom?: string;
40
+ margin?: string;
41
+ marginLeft?: string;
42
+ marginRight?: string;
43
+ marginTop?: string;
44
+ marginBottom?: string;
45
+ flex?: string;
46
+ position?: 'absolute' | 'relative' | 'fixed' | 'sticky';
47
+ flexGrow?: number;
48
+ flexShrink?: number;
49
+ flexBasis?: string;
50
+ flexDirection?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
51
+ flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
52
+ backgroundPosition?: string;
14
53
 
15
- export type Modify<T, R> = Omit<T, keyof R> & R;
54
+ // typography
55
+ outline?: string;
56
+ outlineColor?: string;
57
+ outlineStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
58
+ outlineWidth?: string;
59
+ textDecorationColor?: string;
60
+ linearCrossGravity?: 'none' | 'start' | 'end' | 'center' | 'stretch';
61
+ borderInlineStartColor?: string;
62
+ borderInlineEndColor?: string;
63
+ borderInlineStartWidth?: string;
64
+ borderInlineEndWidth?: string;
65
+ borderInlineStartStyle?: string;
66
+ borderInlineEndStyle?: string;
67
+ relativeAlignInlineStart?: string;
68
+ relativeAlignInlineEnd?: string;
69
+ relativeInlineStartOf?: number;
70
+ relativeInlineEndOf?: number;
71
+ insetInlineStart?: string;
72
+ insetInlineEnd?: string;
73
+ linearDirection?: string;
74
+ textIndent?: string;
75
+ textStroke?: string;
76
+ textStrokeWidth?: string;
77
+ textStrokeColor?: string;
78
+ XAutoFontSize?: string;
79
+ XAutoFontSizePresetSizes?: string;
80
+ fontVariationSettings?: string;
81
+ fontFeatureSettings?: string;
82
+ fontOpticalSizing?: 'none' | 'auto';
83
+ textAlign?: 'left' | 'center' | 'right' | 'start' | 'end' | 'justify';
84
+ lineHeight?: string;
85
+ textOverflow?: 'clip' | 'ellipsis';
86
+ fontSize?: string;
87
+ fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
88
+ fontFamily?: string;
89
+ fontStyle?: 'normal' | 'italic' | 'oblique';
90
+ lineSpacing?: string;
91
+ linearOrientation?: 'horizontal' | 'vertical' | 'horizontal-reverse' | 'vertical-reverse' | 'row' | 'column' | 'row-reverse' | 'column-reverse';
92
+ linearWeightSum?: number;
93
+ linearWeight?: number;
94
+ linearGravity?: 'none' | 'top' | 'bottom' | 'left' | 'right' | 'center-vertical' | 'center-horizontal' | 'space-between' | 'start' | 'end' | 'center';
95
+ linearLayoutGravity?: 'none' | 'top' | 'bottom' | 'left' | 'right' | 'center-vertical' | 'center-horizontal' | 'fill-vertical' | 'fill-horizontal' | 'center' | 'stretch' | 'start' | 'end';
96
+ adaptFontSize?: string;
97
+ textDecoration?: 'none' | 'underline' | 'line-through' | (string & {});
98
+ textShadow?: string;
16
99
 
17
- export type CSSProperties = Modify<
18
- CSS.Properties<string | number>,
19
- {
20
- // layout
21
- flexFlow?: string;
22
- marginInlineStart?: string;
23
- marginInlineEnd?: string;
24
- paddingInlineStart?: string;
25
- paddingInlineEnd?: string;
26
- gridTemplateColumns?: string;
27
- gridTemplateRows?: string;
28
- gridAutoColumns?: string;
29
- gridAutoRows?: string;
30
- gridColumnSpan?: number;
31
- gridRowSpan?: number;
32
- gridColumnStart?: string;
33
- gridColumnEnd?: string;
34
- gridRowStart?: string;
35
- gridRowEnd?: string;
36
- gridColumnGap?: string;
37
- gridRowGap?: string;
38
- gridAutoFlow?: 'row' | 'column' | 'dense' | 'row dense' | 'column dense';
39
- maskPosition?: string;
40
- display?: 'none' | 'flex' | 'grid' | 'linear' | 'relative' | 'block' | 'auto';
41
- padding?: string;
42
- paddingLeft?: string;
43
- paddingRight?: string;
44
- paddingTop?: string;
45
- paddingBottom?: string;
46
- margin?: string;
47
- marginLeft?: string;
48
- marginRight?: string;
49
- marginTop?: string;
50
- marginBottom?: string;
51
- flex?: string;
52
- position?: 'absolute' | 'relative' | 'fixed' | 'sticky';
53
- flexGrow?: number;
54
- flexShrink?: number;
55
- flexBasis?: string;
56
- flexDirection?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
57
- flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
58
- backgroundPosition?: string;
100
+ // visual
101
+ borderTopColor?: string;
102
+ backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box';
103
+ backgroundRepeat?: 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat' | 'round' | 'space';
104
+ backgroundSize?: string;
105
+ border?: string;
106
+ borderRight?: string;
107
+ borderLeft?: string;
108
+ borderTop?: string;
109
+ borderBottom?: string;
110
+ borderBottomColor?: string;
111
+ borderLeftStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
112
+ borderRightStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
113
+ borderTopStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
114
+ borderBottomStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
115
+ borderRadius?: string;
116
+ backgroundClip?: 'border-box' | 'content-box' | 'padding-box' | 'text';
117
+ caretColor?: string;
118
+ borderTopLeftRadius?: string;
119
+ borderBottomLeftRadius?: string;
120
+ borderTopRightRadius?: string;
121
+ borderBottomRightRadius?: string;
122
+ borderStartStartRadius?: string;
123
+ borderEndStartRadius?: string;
124
+ borderStartEndRadius?: string;
125
+ borderEndEndRadius?: string;
126
+ borderWidth?: string;
127
+ borderLeftWidth?: string;
128
+ borderRightWidth?: string;
129
+ borderTopWidth?: string;
130
+ borderBottomWidth?: string;
131
+ XAnimationColorInterpolation?: 'auto' | 'sRGB' | 'linearRGB';
132
+ XHandleColor?: string;
133
+ color?: string;
134
+ background?: string;
135
+ borderColor?: string;
136
+ backgroundColor?: string;
137
+ borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
138
+ borderLeftColor?: string;
139
+ borderRightColor?: string;
140
+ backgroundImage?: string;
59
141
 
60
- // typography
61
- outline?: string;
62
- outlineColor?: string;
63
- outlineStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
64
- outlineWidth?: string;
65
- textDecorationColor?: string;
66
- linearCrossGravity?: 'none' | 'start' | 'end' | 'center' | 'stretch';
67
- borderInlineStartColor?: string;
68
- borderInlineEndColor?: string;
69
- borderInlineStartWidth?: string;
70
- borderInlineEndWidth?: string;
71
- borderInlineStartStyle?: string;
72
- borderInlineEndStyle?: string;
73
- relativeAlignInlineStart?: string;
74
- relativeAlignInlineEnd?: string;
75
- relativeInlineStartOf?: number;
76
- relativeInlineEndOf?: number;
77
- insetInlineStart?: string;
78
- insetInlineEnd?: string;
79
- linearDirection?: string;
80
- textIndent?: string;
81
- textStroke?: string;
82
- textStrokeWidth?: string;
83
- textStrokeColor?: string;
84
- XAutoFontSize?: string;
85
- XAutoFontSizePresetSizes?: string;
86
- textAlign?: 'left' | 'center' | 'right' | 'start' | 'end' | 'justify';
87
- lineHeight?: string;
88
- textOverflow?: 'clip' | 'ellipsis';
89
- fontSize?: string;
90
- fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
91
- fontFamily?: string;
92
- fontStyle?: 'normal' | 'italic' | 'oblique';
93
- lineSpacing?: string;
94
- linearOrientation?: 'horizontal' | 'vertical' | 'horizontal-reverse' | 'vertical-reverse' | 'row' | 'column' | 'row-reverse' | 'column-reverse';
95
- linearWeightSum?: number;
96
- linearWeight?: number;
97
- linearGravity?: 'none' | 'top' | 'bottom' | 'left' | 'right' | 'center-vertical' | 'center-horizontal' | 'space-between' | 'start' | 'end' | 'center';
98
- linearLayoutGravity?: 'none' | 'top' | 'bottom' | 'left' | 'right' | 'center-vertical' | 'center-horizontal' | 'fill-vertical' | 'fill-horizontal' | 'center' | 'stretch' | 'start' | 'end';
99
- adaptFontSize?: string;
100
- textDecoration?: 'none' | 'underline' | 'line-through' | (string & {});
101
- textShadow?: string;
142
+ // animation
143
+ transition?: string;
144
+ transitionProperty?: 'none' | 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | 'width' | 'height' | 'background-color' | 'visibility' | 'left' | 'top' | 'right' | 'bottom' | 'transform' | 'all' | (string & {});
145
+ transitionDuration?: string;
146
+ transitionDelay?: string;
147
+ transitionTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
148
+ implicitAnimation?: string;
149
+ enterTransitionName?: string;
150
+ exitTransitionName?: string;
151
+ pauseTransitionName?: string;
152
+ resumeTransitionName?: string;
153
+ animation?: string;
154
+ animationName?: string;
155
+ animationDuration?: string;
156
+ animationTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
157
+ animationDelay?: string;
158
+ animationIterationCount?: string;
159
+ animationDirection?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
160
+ animationFillMode?: 'none' | 'forwards' | 'backwards' | 'both';
161
+ animationPlayState?: 'paused' | 'running';
162
+ layoutAnimationCreateDuration?: string;
163
+ layoutAnimationCreateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
164
+ layoutAnimationCreateDelay?: string;
165
+ layoutAnimationCreateProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
166
+ layoutAnimationDeleteDuration?: string;
167
+ layoutAnimationDeleteTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
168
+ layoutAnimationDeleteDelay?: string;
169
+ layoutAnimationDeleteProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
170
+ layoutAnimationUpdateDuration?: string;
171
+ layoutAnimationUpdateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
172
+ layoutAnimationUpdateDelay?: string;
102
173
 
103
- // visual
104
- borderTopColor?: string;
105
- backgroundOrigin?: 'border-box' | 'content-box' | 'padding-box';
106
- backgroundRepeat?: 'no-repeat' | 'repeat-x' | 'repeat-y' | 'repeat' | 'round' | 'space';
107
- backgroundSize?: string;
108
- border?: string;
109
- borderRight?: string;
110
- borderLeft?: string;
111
- borderTop?: string;
112
- borderBottom?: string;
113
- borderBottomColor?: string;
114
- borderLeftStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
115
- borderRightStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
116
- borderTopStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
117
- borderBottomStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
118
- borderRadius?: string;
119
- backgroundClip?: 'border-box' | 'content-box' | 'padding-box' | 'text';
120
- caretColor?: string;
121
- borderTopLeftRadius?: string;
122
- borderBottomLeftRadius?: string;
123
- borderTopRightRadius?: string;
124
- borderBottomRightRadius?: string;
125
- borderStartStartRadius?: string;
126
- borderEndStartRadius?: string;
127
- borderStartEndRadius?: string;
128
- borderEndEndRadius?: string;
129
- borderWidth?: string;
130
- borderLeftWidth?: string;
131
- borderRightWidth?: string;
132
- borderTopWidth?: string;
133
- borderBottomWidth?: string;
134
- XAnimationColorInterpolation?: 'auto' | 'sRGB' | 'linearRGB';
135
- XHandleColor?: string;
136
- color?: string;
137
- background?: string;
138
- borderColor?: string;
139
- backgroundColor?: string;
140
- borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
141
- borderLeftColor?: string;
142
- borderRightColor?: string;
143
- backgroundImage?: string;
174
+ // other
175
+ top?: string;
176
+ visibility?: 'hidden' | 'visible' | 'none' | 'collapse';
177
+ content?: string;
178
+ overflowX?: 'hidden' | 'visible' | (string & {});
179
+ overflowY?: 'hidden' | 'visible' | (string & {});
180
+ wordBreak?: 'normal' | 'break-all' | 'keep-all';
181
+ verticalAlign?: 'baseline' | 'sub' | 'super' | 'top' | 'text-top' | 'middle' | 'bottom' | 'text-bottom' | (string & {});
182
+ direction?: 'normal' | 'lynx-rtl' | 'rtl' | 'ltr';
183
+ relativeId?: number;
184
+ relativeAlignTop?: string;
185
+ relativeAlignRight?: string;
186
+ relativeAlignBottom?: string;
187
+ relativeAlignLeft?: string;
188
+ relativeTopOf?: number;
189
+ relativeRightOf?: number;
190
+ relativeBottomOf?: number;
191
+ relativeLeftOf?: number;
192
+ relativeLayoutOnce?: string;
193
+ relativeCenter?: 'none' | 'vertical' | 'horizontal' | 'both';
194
+ zIndex?: number;
195
+ maskImage?: string;
196
+ justifyItems?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
197
+ justifySelf?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
198
+ filter?: string;
199
+ listMainAxisGap?: 'grayscale' | (string & {});
200
+ listCrossAxisGap?: string;
201
+ perspective?: 'number' | 'vw' | 'vh' | 'default' | 'px';
202
+ cursor?: string;
203
+ clipPath?: string;
204
+ mask?: string;
205
+ left?: string;
206
+ maskRepeat?: string;
207
+ maskClip?: string;
208
+ maskOrigin?: string;
209
+ maskSize?: string;
210
+ gap?: string;
211
+ columnGap?: string;
212
+ rowGap?: string;
213
+ imageRendering?: 'auto' | 'crisp-edges' | 'pixelated';
214
+ hyphens?: 'none' | 'manual' | 'auto';
215
+ XAppRegion?: 'none' | 'drag' | 'no-drag';
216
+ XHandleSize?: string;
217
+ offsetDistance?: number;
218
+ offsetPath?: string;
219
+ offsetRotate?: string;
220
+ opacity?: number;
221
+ overflow?: 'hidden' | 'visible' | (string & {});
222
+ height?: string;
223
+ width?: string;
224
+ maxWidth?: string;
225
+ minWidth?: string;
226
+ right?: string;
227
+ maxHeight?: string;
228
+ minHeight?: string;
229
+ bottom?: string;
230
+ whiteSpace?: 'normal' | 'nowrap';
231
+ letterSpacing?: string;
232
+ alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'auto' | 'start' | 'end' | 'baseline';
233
+ alignSelf?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'auto' | 'start' | 'end' | 'baseline';
234
+ alignContent?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'start' | 'end';
235
+ justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'start' | 'end';
236
+ boxSizing?: 'border-box' | 'content-box' | 'auto';
237
+ transform?: 'translate' | 'translateX' | 'translateY' | 'translateZ' | 'translate' | 'translate3d' | 'translate3D' | 'rotate' | 'rotateX' | 'rotateY' | 'rotateZ' | 'scale' | 'scaleX' | 'scaleY' | (string & {});
238
+ order?: number;
239
+ boxShadow?: string;
240
+ transformOrigin?: 'left' | 'right' | 'top' | 'bottom' | 'center' | (string & {});
241
+ aspectRatio?: string;
242
+ };
144
243
 
145
- // animation
146
- transition?: string;
147
- transitionProperty?: 'none' | 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | 'width' | 'height' | 'background-color' | 'visibility' | 'left' | 'top' | 'right' | 'bottom' | 'transform' | 'all' | (string & {});
148
- transitionDuration?: string;
149
- transitionDelay?: string;
150
- transitionTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
151
- implicitAnimation?: string;
152
- enterTransitionName?: string;
153
- exitTransitionName?: string;
154
- pauseTransitionName?: string;
155
- resumeTransitionName?: string;
156
- animation?: string;
157
- animationName?: string;
158
- animationDuration?: string;
159
- animationTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
160
- animationDelay?: string;
161
- animationIterationCount?: string;
162
- animationDirection?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
163
- animationFillMode?: 'none' | 'forwards' | 'backwards' | 'both';
164
- animationPlayState?: 'paused' | 'running';
165
- layoutAnimationCreateDuration?: string;
166
- layoutAnimationCreateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
167
- layoutAnimationCreateDelay?: string;
168
- layoutAnimationCreateProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
169
- layoutAnimationDeleteDuration?: string;
170
- layoutAnimationDeleteTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
171
- layoutAnimationDeleteDelay?: string;
172
- layoutAnimationDeleteProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
173
- layoutAnimationUpdateDuration?: string;
174
- layoutAnimationUpdateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
175
- layoutAnimationUpdateDelay?: string;
244
+ export type Shorthands =
245
+ // layout
246
+ "flexFlow" | "padding" | "margin" | "flex" | "backgroundPosition" |
247
+ // typography
248
+ "outline" | "textDecoration" |
249
+ // visual
250
+ "border" | "borderRight" | "borderLeft" | "borderTop" | "borderBottom" | "borderRadius" | "borderWidth" | "background" | "borderColor" | "borderStyle" |
251
+ // animation
252
+ "transition" | "animation" |
253
+ // other
254
+ "mask" | "gap" | "overflow" | "whiteSpace";
255
+ export type Longhands =
256
+ // layout
257
+ "marginInlineStart" | "marginInlineEnd" | "paddingInlineStart" | "paddingInlineEnd" | "gridTemplateColumns" | "gridTemplateRows" | "gridAutoColumns" | "gridAutoRows" | "gridColumnSpan" | "gridRowSpan" | "gridColumnStart" | "gridColumnEnd" | "gridRowStart" | "gridRowEnd" | "gridColumnGap" | "gridRowGap" | "gridAutoFlow" | "maskPosition" | "display" | "paddingLeft" | "paddingRight" | "paddingTop" | "paddingBottom" | "marginLeft" | "marginRight" | "marginTop" | "marginBottom" | "position" | "flexGrow" | "flexShrink" | "flexBasis" | "flexDirection" | "flexWrap" |
258
+ // typography
259
+ "outlineColor" | "outlineStyle" | "outlineWidth" | "textDecorationColor" | "linearCrossGravity" | "borderInlineStartColor" | "borderInlineEndColor" | "borderInlineStartWidth" | "borderInlineEndWidth" | "borderInlineStartStyle" | "borderInlineEndStyle" | "relativeAlignInlineStart" | "relativeAlignInlineEnd" | "relativeInlineStartOf" | "relativeInlineEndOf" | "insetInlineStart" | "insetInlineEnd" | "linearDirection" | "textIndent" | "textStroke" | "textStrokeWidth" | "textStrokeColor" | "XAutoFontSize" | "XAutoFontSizePresetSizes" | "fontVariationSettings" | "fontFeatureSettings" | "fontOpticalSizing" | "textAlign" | "lineHeight" | "textOverflow" | "fontSize" | "fontWeight" | "fontFamily" | "fontStyle" | "lineSpacing" | "linearOrientation" | "linearWeightSum" | "linearWeight" | "linearGravity" | "linearLayoutGravity" | "adaptFontSize" | "textShadow" |
260
+ // visual
261
+ "borderTopColor" | "backgroundOrigin" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderLeftStyle" | "borderRightStyle" | "borderTopStyle" | "borderBottomStyle" | "backgroundClip" | "caretColor" | "borderTopLeftRadius" | "borderBottomLeftRadius" | "borderTopRightRadius" | "borderBottomRightRadius" | "borderStartStartRadius" | "borderEndStartRadius" | "borderStartEndRadius" | "borderEndEndRadius" | "borderLeftWidth" | "borderRightWidth" | "borderTopWidth" | "borderBottomWidth" | "XAnimationColorInterpolation" | "XHandleColor" | "color" | "backgroundColor" | "borderLeftColor" | "borderRightColor" | "backgroundImage" |
262
+ // animation
263
+ "transitionProperty" | "transitionDuration" | "transitionDelay" | "transitionTimingFunction" | "implicitAnimation" | "enterTransitionName" | "exitTransitionName" | "pauseTransitionName" | "resumeTransitionName" | "animationName" | "animationDuration" | "animationTimingFunction" | "animationDelay" | "animationIterationCount" | "animationDirection" | "animationFillMode" | "animationPlayState" | "layoutAnimationCreateDuration" | "layoutAnimationCreateTimingFunction" | "layoutAnimationCreateDelay" | "layoutAnimationCreateProperty" | "layoutAnimationDeleteDuration" | "layoutAnimationDeleteTimingFunction" | "layoutAnimationDeleteDelay" | "layoutAnimationDeleteProperty" | "layoutAnimationUpdateDuration" | "layoutAnimationUpdateTimingFunction" | "layoutAnimationUpdateDelay" |
264
+ // other
265
+ "top" | "visibility" | "content" | "overflowX" | "overflowY" | "wordBreak" | "verticalAlign" | "direction" | "relativeId" | "relativeAlignTop" | "relativeAlignRight" | "relativeAlignBottom" | "relativeAlignLeft" | "relativeTopOf" | "relativeRightOf" | "relativeBottomOf" | "relativeLeftOf" | "relativeLayoutOnce" | "relativeCenter" | "zIndex" | "maskImage" | "justifyItems" | "justifySelf" | "filter" | "listMainAxisGap" | "listCrossAxisGap" | "perspective" | "cursor" | "clipPath" | "left" | "maskRepeat" | "maskClip" | "maskOrigin" | "maskSize" | "columnGap" | "rowGap" | "imageRendering" | "hyphens" | "XAppRegion" | "XHandleSize" | "offsetDistance" | "offsetPath" | "offsetRotate" | "opacity" | "height" | "width" | "maxWidth" | "minWidth" | "right" | "maxHeight" | "minHeight" | "bottom" | "letterSpacing" | "alignItems" | "alignSelf" | "alignContent" | "justifyContent" | "boxSizing" | "transform" | "order" | "boxShadow" | "transformOrigin" | "aspectRatio";
176
266
 
177
- // other
178
- top?: string;
179
- visibility?: 'hidden' | 'visible' | 'none' | 'collapse';
180
- content?: string;
181
- overflowX?: 'hidden' | 'visible' | (string & {});
182
- overflowY?: 'hidden' | 'visible' | (string & {});
183
- wordBreak?: 'normal' | 'break-all' | 'keep-all';
184
- verticalAlign?: 'baseline' | 'sub' | 'super' | 'top' | 'text-top' | 'middle' | 'bottom' | 'text-bottom' | (string & {});
185
- direction?: 'normal' | 'lynx-rtl' | 'rtl' | 'ltr';
186
- relativeId?: number;
187
- relativeAlignTop?: string;
188
- relativeAlignRight?: string;
189
- relativeAlignBottom?: string;
190
- relativeAlignLeft?: string;
191
- relativeTopOf?: number;
192
- relativeRightOf?: number;
193
- relativeBottomOf?: number;
194
- relativeLeftOf?: number;
195
- relativeLayoutOnce?: string;
196
- relativeCenter?: 'none' | 'vertical' | 'horizontal' | 'both';
197
- zIndex?: number;
198
- maskImage?: string;
199
- justifyItems?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
200
- justifySelf?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
201
- filter?: string;
202
- listMainAxisGap?: 'grayscale' | (string & {});
203
- listCrossAxisGap?: string;
204
- perspective?: 'number' | 'vw' | 'vh' | 'default' | 'px';
205
- cursor?: string;
206
- clipPath?: string;
207
- mask?: string;
208
- left?: string;
209
- maskRepeat?: string;
210
- maskClip?: string;
211
- maskOrigin?: string;
212
- maskSize?: string;
213
- gap?: string;
214
- columnGap?: string;
215
- rowGap?: string;
216
- imageRendering?: 'auto' | 'crisp-edges' | 'pixelated';
217
- hyphens?: 'none' | 'manual' | 'auto';
218
- XAppRegion?: 'none' | 'drag' | 'no-drag';
219
- XHandleSize?: string;
220
- opacity?: number;
221
- overflow?: 'hidden' | 'visible' | (string & {});
222
- height?: string;
223
- width?: string;
224
- maxWidth?: string;
225
- minWidth?: string;
226
- right?: string;
227
- maxHeight?: string;
228
- minHeight?: string;
229
- bottom?: string;
230
- whiteSpace?: 'normal' | 'nowrap';
231
- letterSpacing?: string;
232
- alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'auto' | 'start' | 'end' | 'baseline';
233
- alignSelf?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'auto' | 'start' | 'end' | 'baseline';
234
- alignContent?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'start' | 'end';
235
- justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'start' | 'end';
236
- boxSizing?: 'border-box' | 'content-box' | 'auto';
237
- transform?: 'translate' | 'translateX' | 'translateY' | 'translateZ' | 'translate' | 'translate3d' | 'translate3D' | 'rotate' | 'rotateX' | 'rotateY' | 'rotateZ' | 'scale' | 'scaleX' | 'scaleY' | (string & {});
238
- order?: number;
239
- boxShadow?: string;
240
- transformOrigin?: 'left' | 'right' | 'top' | 'bottom' | 'center' | (string & {});
241
- aspectRatio?: string;
242
- }
243
- >;
267
+ export type CSSPropertiesWithShorthands = Pick<CSSProperties, Shorthands>;
268
+ export type CSSPropertiesWithLonghands = Pick<CSSProperties, Longhands>;