@lynx-js/types 3.3.1 → 3.3.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/CHANGELOG.md +54 -1
- package/package.json +5 -1
- package/types/background-thread/fetch.d.ts +15 -0
- package/types/background-thread/index.d.ts +1 -0
- package/types/background-thread/lynx-performance-entry.d.ts +53 -0
- package/types/background-thread/lynx.d.ts +11 -1
- package/types/background-thread/nodes-ref.d.ts +2 -0
- package/types/background-thread/text-encoder-decoder.d.ts +15 -21
- package/types/common/csstype.d.ts +103 -213
- package/types/common/element/element.d.ts +11 -1
- package/types/common/element/image.d.ts +82 -65
- package/types/common/element/index.d.ts +2 -0
- package/types/common/element/input.d.ts +386 -0
- package/types/common/element/list.d.ts +45 -3
- package/types/common/element/methods.d.ts +2 -2
- package/types/common/element/scroll-view.d.ts +92 -137
- package/types/common/element/text.d.ts +174 -11
- package/types/common/element/textarea.d.ts +411 -0
- package/types/common/events.d.ts +155 -15
- package/types/common/global.d.ts +4 -2
- package/types/common/lynx.d.ts +60 -0
- package/types/common/performance.d.ts +10 -1
- package/types/main-thread/element.d.ts +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,61 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
- Add a new `flowIds` subfield to the TraceOption parameter in the Trace API to support one-to-many trace associations.
|
|
5
|
+
- Refactor event definitions for improved IDE compatibility.
|
|
6
|
+
|
|
7
|
+
## 3.4.9
|
|
8
|
+
- Add more interface for `scroll-view`.
|
|
9
|
+
|
|
10
|
+
## 3.4.8
|
|
11
|
+
- Introduce `disabled` for input and textarea.
|
|
12
|
+
|
|
13
|
+
## 3.4.6
|
|
14
|
+
- fix `TextCodecHelper` defines.
|
|
15
|
+
- Update `fetch` defines for chunk streaming.
|
|
16
|
+
|
|
17
|
+
## 3.4.5
|
|
18
|
+
- Complete the documentation for image related APIs.
|
|
19
|
+
|
|
20
|
+
## 3.4.4
|
|
21
|
+
- Complete the documentation for text related APIs.
|
|
22
|
+
|
|
23
|
+
## 3.4.3
|
|
24
|
+
- Add `font-variation-settings`,`font-feature-settings` and `font-optical-sizing` CSS properties.
|
|
25
|
+
- Add `experimental-recycle-available-item-before-layout` and `enable-dynamic-span-count` property for list.
|
|
26
|
+
|
|
27
|
+
## 3.4.2
|
|
28
|
+
- And `lynx.fetchBundle` api defines.
|
|
29
|
+
- And `ResponseHandler` defines.
|
|
30
|
+
|
|
31
|
+
## 3.4.1
|
|
32
|
+
|
|
33
|
+
- Add the following properties: `custom-context-menu`, `custom-text-selection`, `text-selection`.
|
|
34
|
+
- Add the following methods: `setTextSelection`, `getTextBoundingRect`, `getSelectedText`.
|
|
35
|
+
- Add `bindselectionchange` event.
|
|
36
|
+
- Add `addFont` method.
|
|
37
|
+
|
|
38
|
+
## 3.4.0
|
|
39
|
+
|
|
40
|
+
### Major Changes
|
|
41
|
+
|
|
42
|
+
- Introduce <input> and <textarea>
|
|
43
|
+
|
|
44
|
+
## 3.3.2
|
|
45
|
+
- SelectorQuery FieldsParams adds query attribute
|
|
46
|
+
- Revert automatically generated cssTypes
|
|
47
|
+
- Add typing for the runtime interfaces.
|
|
48
|
+
- Codegen longhand and shorthand properties from css_defines
|
|
49
|
+
- Add `experimental-recycle-sticky-item` and `sticky-buffer-count` for list
|
|
50
|
+
- Add `experimental-update-sticky-for-diff` for list
|
|
51
|
+
- Add ReloadBundleEntry to standardize the timing of reload behavior.
|
|
52
|
+
- Add typing for MessageEvent.
|
|
53
|
+
|
|
3
54
|
## 3.3.1
|
|
4
55
|
|
|
5
|
-
-
|
|
56
|
+
- Codegen csstype.d.ts from css_defines
|
|
57
|
+
- Rename `visibleCellsAfterUpdate` to `visibleItemAfterUpdate` for `list`
|
|
58
|
+
- Rename `visibleCellsBeforeUpdate` to `visibleItemBeforeUpdate` for `list`
|
|
6
59
|
|
|
7
60
|
## 3.3.0
|
|
8
61
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/types",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
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",
|
|
@@ -74,6 +74,10 @@ export declare var Request: {
|
|
|
74
74
|
new (input: RequestInfo | URL, init?: RequestInit): Request;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
export interface LynxExtension {
|
|
78
|
+
useStreaming?: boolean;
|
|
79
|
+
}
|
|
80
|
+
|
|
77
81
|
/**
|
|
78
82
|
* @description This Fetch API interface represents the response to a request.
|
|
79
83
|
* @see https://developer.mozilla.org/docs/Web/API/Response
|
|
@@ -95,6 +99,11 @@ export interface RequestInit {
|
|
|
95
99
|
* @since 2.18
|
|
96
100
|
*/
|
|
97
101
|
method?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @description Lynx extension, currently used for requesting chunk streaming
|
|
104
|
+
* @since 3.4
|
|
105
|
+
*/
|
|
106
|
+
lynxExtension?: LynxExtension;
|
|
98
107
|
}
|
|
99
108
|
|
|
100
109
|
/**
|
|
@@ -133,6 +142,12 @@ export interface Response extends Body {
|
|
|
133
142
|
* @since 2.18
|
|
134
143
|
*/
|
|
135
144
|
readonly url: string;
|
|
145
|
+
/**
|
|
146
|
+
* @description body of ReadableStream
|
|
147
|
+
* @see https://developer.mozilla.org/docs/Web/API/Response/body
|
|
148
|
+
* @since 3.4
|
|
149
|
+
*/
|
|
150
|
+
readonly body: ReadableStream;
|
|
136
151
|
/**
|
|
137
152
|
* @description clone()
|
|
138
153
|
* @see https://developer.mozilla.org/docs/Web/API/Response/clone
|
|
@@ -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
|
|
@@ -7,7 +7,7 @@ import { AnimationElement } from './animation';
|
|
|
7
7
|
import { BeforePublishEvent, GlobalEventEmitter, IntersectionObserver } from './event';
|
|
8
8
|
import { SelectorQuery } from './nodes-ref';
|
|
9
9
|
import { Performance } from './performance';
|
|
10
|
-
import { Response } from './fetch';
|
|
10
|
+
import { Response, RequestInit } from './fetch';
|
|
11
11
|
|
|
12
12
|
export * from './fetch';
|
|
13
13
|
|
|
@@ -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
|
}
|
|
@@ -47,6 +47,7 @@ export interface FieldsParams {
|
|
|
47
47
|
index?: boolean;
|
|
48
48
|
class?: boolean;
|
|
49
49
|
attribute?: boolean;
|
|
50
|
+
query?:boolean;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
export interface FieldsData {
|
|
@@ -56,6 +57,7 @@ export interface FieldsData {
|
|
|
56
57
|
index: number;
|
|
57
58
|
class: Array<string>;
|
|
58
59
|
attribute: Record<string, unknown>;
|
|
60
|
+
query:SelectorQuery;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
export type PathCallback = (data: PathData, status: { data: string; code: number }) => void;
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
type TypedArray =
|
|
7
|
-
| Int8Array
|
|
8
|
-
| Uint8Array
|
|
9
|
-
| Uint8ClampedArray
|
|
10
|
-
| Int16Array
|
|
11
|
-
| Uint16Array
|
|
12
|
-
| Int32Array
|
|
13
|
-
| Uint32Array
|
|
14
|
-
| Float32Array
|
|
15
|
-
| Float64Array;
|
|
1
|
+
// Copyright 2025 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
16
4
|
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
export interface ITextCodecHelper {
|
|
6
|
+
/**
|
|
7
|
+
* @description decode array buffer to string
|
|
8
|
+
* @since 3.4
|
|
9
|
+
*/
|
|
10
|
+
decode(input: ArrayBuffer): string;
|
|
11
|
+
/**
|
|
12
|
+
* @description encode string to array buffer
|
|
13
|
+
* @since 3.4
|
|
14
|
+
*/
|
|
15
|
+
encode(input: string): ArrayBuffer;
|
|
16
|
+
}
|
|
@@ -2,242 +2,132 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
* This file is auto-generated from CSS define files in the css_defines directory.
|
|
7
|
-
* Each property's type is determined by:
|
|
8
|
-
* 1. For enum types: Uses the values array from the CSS define file
|
|
9
|
-
* 2. For properties with keywords: Uses the keywords array as enum values, with (string & {}) for open-ended types
|
|
10
|
-
* 3. For other types: Uses string type
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type * as CSS from 'csstype';
|
|
5
|
+
import * as CSS from 'csstype';
|
|
14
6
|
|
|
15
7
|
export type Modify<T, R> = Omit<T, keyof R> & R;
|
|
16
8
|
|
|
17
9
|
export type CSSProperties = Modify<
|
|
18
10
|
CSS.Properties<string | number>,
|
|
19
11
|
{
|
|
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
12
|
position?: 'absolute' | 'relative' | 'fixed' | 'sticky';
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
backgroundPosition?: string;
|
|
59
|
-
|
|
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;
|
|
13
|
+
boxSizing?: 'border-box' | 'content-box' | 'auto';
|
|
14
|
+
display?: 'none' | 'flex' | 'grid' | 'linear' | 'relative' | 'block' | 'auto';
|
|
15
|
+
overflow?: 'hidden' | 'visible' | (string & {});
|
|
16
|
+
whiteSpace?: 'normal' | 'nowrap';
|
|
17
|
+
textAlign?: 'left' | 'center' | 'right' | 'start' | 'end';
|
|
88
18
|
textOverflow?: 'clip' | 'ellipsis';
|
|
89
|
-
fontSize?: string;
|
|
90
19
|
fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
91
|
-
|
|
20
|
+
flexDirection?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
|
|
21
|
+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
22
|
+
alignContent?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'start' | 'end';
|
|
23
|
+
justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'stretch' | 'start' | 'end';
|
|
92
24
|
fontStyle?: 'normal' | 'italic' | 'oblique';
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
25
|
+
transform?:
|
|
26
|
+
| 'translate'
|
|
27
|
+
| 'translateX'
|
|
28
|
+
| 'translateY'
|
|
29
|
+
| 'translateZ'
|
|
30
|
+
| 'translate'
|
|
31
|
+
| 'translate3d'
|
|
32
|
+
| 'translate3D'
|
|
33
|
+
| 'rotate'
|
|
34
|
+
| 'rotateX'
|
|
35
|
+
| 'rotateY'
|
|
36
|
+
| 'rotateZ'
|
|
37
|
+
| 'scale'
|
|
38
|
+
| 'scaleX'
|
|
39
|
+
| 'scaleY'
|
|
40
|
+
| (string & {});
|
|
41
|
+
animationTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
|
|
42
|
+
borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
43
|
+
transformOrigin?: 'left' | 'right' | 'top' | 'bottom' | 'center' | (string & {});
|
|
44
|
+
linearDirection?: 'column' | 'row' | 'column-reverse' | 'row-reverse';
|
|
45
|
+
linearOrientation?: 'horizontal' | 'vertical' | 'horizontal-reverse' | 'vertical-reverse';
|
|
96
46
|
linearWeight?: number;
|
|
97
47
|
linearGravity?: 'none' | 'top' | 'bottom' | 'left' | 'right' | 'center-vertical' | 'center-horizontal' | 'space-between' | 'start' | 'end' | 'center';
|
|
98
|
-
linearLayoutGravity?:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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;
|
|
144
|
-
|
|
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;
|
|
48
|
+
linearLayoutGravity?:
|
|
49
|
+
| 'none'
|
|
50
|
+
| 'top'
|
|
51
|
+
| 'bottom'
|
|
52
|
+
| 'left'
|
|
53
|
+
| 'right'
|
|
54
|
+
| 'center-vertical'
|
|
55
|
+
| 'center-horizontal'
|
|
56
|
+
| 'fill-vertical'
|
|
57
|
+
| 'fill-horizontal'
|
|
58
|
+
| 'center'
|
|
59
|
+
| 'stretch'
|
|
60
|
+
| 'start'
|
|
61
|
+
| 'end';
|
|
166
62
|
layoutAnimationCreateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
|
|
167
|
-
layoutAnimationCreateDelay?: string;
|
|
168
63
|
layoutAnimationCreateProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
|
|
169
|
-
layoutAnimationDeleteDuration?: string;
|
|
170
64
|
layoutAnimationDeleteTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
|
|
171
|
-
layoutAnimationDeleteDelay?: string;
|
|
172
65
|
layoutAnimationDeleteProperty?: 'opacity' | 'scaleX' | 'scaleY' | 'scaleXY' | (string & {});
|
|
173
|
-
layoutAnimationUpdateDuration?: string;
|
|
174
66
|
layoutAnimationUpdateTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// other
|
|
178
|
-
top?: string;
|
|
67
|
+
textDecoration?: 'none' | 'underline' | 'line-through' | (string & {});
|
|
179
68
|
visibility?: 'hidden' | 'visible' | 'none' | 'collapse';
|
|
180
|
-
|
|
69
|
+
transitionProperty?:
|
|
70
|
+
| 'none'
|
|
71
|
+
| 'opacity'
|
|
72
|
+
| 'scaleX'
|
|
73
|
+
| 'scaleY'
|
|
74
|
+
| 'scaleXY'
|
|
75
|
+
| 'width'
|
|
76
|
+
| 'height'
|
|
77
|
+
| 'background-color'
|
|
78
|
+
| 'visibility'
|
|
79
|
+
| 'left'
|
|
80
|
+
| 'top'
|
|
81
|
+
| 'right'
|
|
82
|
+
| 'bottom'
|
|
83
|
+
| 'transform'
|
|
84
|
+
| 'all'
|
|
85
|
+
| (string & {});
|
|
86
|
+
transitionTimingFunction?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-ease-out' | 'ease' | 'ease-in-out' | 'square-bezier' | 'cubic-bezier' | (string & {});
|
|
87
|
+
borderLeftStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
88
|
+
borderRightStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
89
|
+
borderTopStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
90
|
+
borderBottomStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
181
91
|
overflowX?: 'hidden' | 'visible' | (string & {});
|
|
182
92
|
overflowY?: 'hidden' | 'visible' | (string & {});
|
|
183
93
|
wordBreak?: 'normal' | 'break-all' | 'keep-all';
|
|
94
|
+
outlineStyle?: 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'hidden' | 'none' | (string & {});
|
|
184
95
|
verticalAlign?: 'baseline' | 'sub' | 'super' | 'top' | 'text-top' | 'middle' | 'bottom' | 'text-bottom' | (string & {});
|
|
185
96
|
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
97
|
relativeCenter?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
197
|
-
|
|
198
|
-
maskImage?: string;
|
|
199
|
-
justifyItems?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
|
|
200
|
-
justifySelf?: 'start' | 'end' | 'center' | 'stretch' | 'auto';
|
|
201
|
-
filter?: string;
|
|
98
|
+
linearCrossGravity?: 'none' | 'start' | 'end' | 'center' | 'stretch';
|
|
202
99
|
listMainAxisGap?: 'grayscale' | (string & {});
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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;
|
|
100
|
+
fontVariationSettings?: string;
|
|
101
|
+
fontFeatureSettings?: string;
|
|
102
|
+
fontOpticalSizing?: 'none' | 'auto';
|
|
242
103
|
}
|
|
243
|
-
>;
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export type Shorthands =
|
|
107
|
+
// layout
|
|
108
|
+
"flexFlow" | "padding" | "margin" | "flex" | "backgroundPosition" |
|
|
109
|
+
// typography
|
|
110
|
+
"outline" | "textDecoration" |
|
|
111
|
+
// visual
|
|
112
|
+
"border" | "borderRight" | "borderLeft" | "borderTop" | "borderBottom" | "borderRadius" | "borderWidth" | "background" | "borderColor" | "borderStyle" |
|
|
113
|
+
// animation
|
|
114
|
+
"transition" | "animation" |
|
|
115
|
+
// other
|
|
116
|
+
"mask" | "gap" | "overflow" | "whiteSpace";
|
|
117
|
+
export type Longhands =
|
|
118
|
+
// layout
|
|
119
|
+
"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" |
|
|
120
|
+
// typography
|
|
121
|
+
"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" |
|
|
122
|
+
// visual
|
|
123
|
+
"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" |
|
|
124
|
+
// animation
|
|
125
|
+
"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" |
|
|
126
|
+
// other
|
|
127
|
+
"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";
|
|
128
|
+
|
|
129
|
+
// Since `Shorthands` and `Longhands` are auto generated, there may be properties
|
|
130
|
+
// such as `gridColumnSpan` is not manually defined in `CSSProperties` yet.
|
|
131
|
+
// Use `& keyof CSSProperties` to ensure only the defined keys are included to avoid type error.
|
|
132
|
+
export type CSSPropertiesWithShorthands = Pick<CSSProperties, Shorthands & keyof CSSProperties>;
|
|
133
|
+
export type CSSPropertiesWithLonghands = Pick<CSSProperties, Longhands & keyof CSSProperties>;
|
|
@@ -10,13 +10,19 @@ import { ImageProps, ImageUIMethods } from './image';
|
|
|
10
10
|
import { ListItemProps, ListProps, ListRowProps, ListUIMethods } from './list';
|
|
11
11
|
import { PageProps } from './page';
|
|
12
12
|
import { ScrollViewProps, ScrollViewUIMethods } from './scroll-view';
|
|
13
|
-
import { TextProps } from './text';
|
|
13
|
+
import { TextProps, TextUIMethods } from './text';
|
|
14
14
|
import { ViewProps } from './view';
|
|
15
|
+
import { InputProps, InputUIMethods } from './input';
|
|
16
|
+
import { TextAreaProps, TextAreaUIMethods } from './textarea';
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
export interface UIMethods {
|
|
17
20
|
'list': ListUIMethods;
|
|
18
21
|
'scroll-view': ScrollViewUIMethods;
|
|
19
22
|
'image': ImageUIMethods;
|
|
23
|
+
'input': InputUIMethods;
|
|
24
|
+
'textarea': TextAreaUIMethods;
|
|
25
|
+
'text': TextUIMethods;
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
type LynxComponentProps = ComponentProps;
|
|
@@ -37,6 +43,8 @@ export interface IntrinsicElements {
|
|
|
37
43
|
'text': TextProps;
|
|
38
44
|
'view': ViewProps;
|
|
39
45
|
'raw-text': StandardProps & { text: number | string };
|
|
46
|
+
'input': InputProps;
|
|
47
|
+
'textarea': TextAreaProps;
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
declare module 'react' {
|
|
@@ -57,6 +65,8 @@ declare module 'react' {
|
|
|
57
65
|
'text': TextProps;
|
|
58
66
|
'view': ViewProps;
|
|
59
67
|
'raw-text': StandardProps & { text: number | string };
|
|
68
|
+
'input': InputProps;
|
|
69
|
+
'textarea': TextAreaProps;
|
|
60
70
|
}
|
|
61
71
|
}
|
|
62
72
|
}
|