@lynx-js/type-config 0.0.0 → 3.6.1-alpha.0
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 +7 -0
- package/README.md +21 -0
- package/config-keys.js +161 -0
- package/index.d.ts +26 -0
- package/index.js +7 -1
- package/package.json +29 -4
- package/types/compiler-options.d.ts +212 -0
- package/types/config.d.ts +1313 -0
- package/types/index.d.ts +6 -0
- package/LICENSE +0 -202
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
Type definitions for Lynx Config(aka PageConfig) provided by the Lynx team, used to optimize the configuration experience of Lynx Config.
|
|
4
|
+
|
|
5
|
+
# Usage
|
|
6
|
+
|
|
7
|
+
## For Framework Developers
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@lynx-js/type-config": "latest"
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## For Product Developers
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@lynx-js/type-config": "latest"
|
|
20
|
+
}
|
|
21
|
+
```
|
package/config-keys.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
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.
|
|
4
|
+
|
|
5
|
+
const compilerOptionsKeys = [
|
|
6
|
+
'debugInfoOutside',
|
|
7
|
+
'defaultDisplayLinear',
|
|
8
|
+
'defaultOverflowVisible',
|
|
9
|
+
'disableMultipleCascadeCSS',
|
|
10
|
+
'enableComponentConfig',
|
|
11
|
+
'enableCSSAsyncDecode',
|
|
12
|
+
'enableCSSClassMerge',
|
|
13
|
+
'enableCSSEngine',
|
|
14
|
+
'enableCSSExternalClass',
|
|
15
|
+
'enableCSSInvalidation',
|
|
16
|
+
'enableCSSLazyDecode',
|
|
17
|
+
'enableCSSSelector',
|
|
18
|
+
'enableCSSStrictMode',
|
|
19
|
+
'enableCSSVariable',
|
|
20
|
+
'enableEventRefactor',
|
|
21
|
+
'enableFiberArch',
|
|
22
|
+
'enableFlexibleTemplate',
|
|
23
|
+
'enableKeepPageData',
|
|
24
|
+
'enableRemoveCSSScope',
|
|
25
|
+
'enableSimpleStyling',
|
|
26
|
+
'experimental_encodeQuickjsBytecode',
|
|
27
|
+
'forceCalcNewStyle',
|
|
28
|
+
'implicitAnimation',
|
|
29
|
+
'removeCSSParserLog',
|
|
30
|
+
'targetSdkVersion',
|
|
31
|
+
'templateDebugUrl',
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
const configKeys = [
|
|
35
|
+
'absoluteInContentBound',
|
|
36
|
+
'asyncRedirect',
|
|
37
|
+
'autoExpose',
|
|
38
|
+
'CSSAlignWithLegacyW3C',
|
|
39
|
+
'customCSSInheritanceList',
|
|
40
|
+
'dataStrictMode',
|
|
41
|
+
'disableLongpressAfterScroll',
|
|
42
|
+
'disableQuickTracingGC',
|
|
43
|
+
'enableA11y',
|
|
44
|
+
'enableAccessibilityElement',
|
|
45
|
+
'enableAsyncInitVideoEngine',
|
|
46
|
+
'enableAsyncRequestImage',
|
|
47
|
+
'enableAsyncResolveSubtree',
|
|
48
|
+
'enableCheckExposureOptimize',
|
|
49
|
+
'enableCheckLocalImage',
|
|
50
|
+
'enableCircularDataCheck',
|
|
51
|
+
'enableComponentAsyncDecode',
|
|
52
|
+
'enableComponentNullProp',
|
|
53
|
+
'enableCreateViewAsync',
|
|
54
|
+
'enableCSSInheritance',
|
|
55
|
+
'enableCSSInlineVariables',
|
|
56
|
+
'enableCSSLazyImport',
|
|
57
|
+
'enableCSSStrictMode',
|
|
58
|
+
'enableDisexposureWhenLynxHidden',
|
|
59
|
+
'enableEndGestureAtLastFingerUp',
|
|
60
|
+
'enableEventHandleRefactor',
|
|
61
|
+
'enableEventThrough',
|
|
62
|
+
'enableExposureUIMargin',
|
|
63
|
+
'enableExposureWhenLayout',
|
|
64
|
+
'enableExposureWhenReload',
|
|
65
|
+
'enableFixedNew',
|
|
66
|
+
'enableHarmonyNewOverlay',
|
|
67
|
+
'enableHarmonyVisibleAreaChangeForExposure',
|
|
68
|
+
'enableICU',
|
|
69
|
+
'enableImageDownsampling',
|
|
70
|
+
'enableJsBindingApiThrowException',
|
|
71
|
+
'enableJSDataProcessor',
|
|
72
|
+
'enableListMoveOperation',
|
|
73
|
+
'enableListNewArchitecture',
|
|
74
|
+
'enableListPlug',
|
|
75
|
+
'enableLynxScrollFluency',
|
|
76
|
+
'enableMicrotaskPromisePolyfill',
|
|
77
|
+
'enableMultiTouch',
|
|
78
|
+
'enableMultiTouchParamsCompatible',
|
|
79
|
+
'enableNativeList',
|
|
80
|
+
'enableNewAnimator',
|
|
81
|
+
'enableNewClipMode',
|
|
82
|
+
'enableNewGesture',
|
|
83
|
+
'enableNewImage',
|
|
84
|
+
'enableNewIntersectionObserver',
|
|
85
|
+
'enableNewListContainer',
|
|
86
|
+
'enableNewTransformOrigin',
|
|
87
|
+
'enablePlatformGesture',
|
|
88
|
+
'enablePropertyBasedSimpleStyle',
|
|
89
|
+
'enableQueryComponentSync',
|
|
90
|
+
'enableReactOnlyPropsId',
|
|
91
|
+
'enableReduceInitDataCopy',
|
|
92
|
+
'enableReloadLifecycle',
|
|
93
|
+
'enableRemoveComponentExtraData',
|
|
94
|
+
'enableReuseLoadScriptExports',
|
|
95
|
+
'enableSignalAPI',
|
|
96
|
+
'enableSimultaneousTap',
|
|
97
|
+
'enableTextBoringLayout',
|
|
98
|
+
'enableTextGradientOpt',
|
|
99
|
+
'enableTextLanguageAlignment',
|
|
100
|
+
'enableTextLayerRender',
|
|
101
|
+
'enableTextLayoutCache',
|
|
102
|
+
'enableTextNonContiguousLayout',
|
|
103
|
+
'enableTextOverflow',
|
|
104
|
+
'enableTextRefactor',
|
|
105
|
+
'enableTouchRefactor',
|
|
106
|
+
'enableUIOperationOptimize',
|
|
107
|
+
'enableUnifiedPipeline',
|
|
108
|
+
'enableUseContextPool',
|
|
109
|
+
'enableUseMapBuffer',
|
|
110
|
+
'enableViewReceiveTouch',
|
|
111
|
+
'enableVsyncAlignedFlush',
|
|
112
|
+
'enableXTextLayoutReused',
|
|
113
|
+
'extendedLayoutOnlyOpt',
|
|
114
|
+
'extraInfo',
|
|
115
|
+
'flatten',
|
|
116
|
+
'fontScaleEffectiveOnlyOnSp',
|
|
117
|
+
'implicit',
|
|
118
|
+
'includeFontPadding',
|
|
119
|
+
'keyboardCallbackPassRelativeHeight',
|
|
120
|
+
'longPressDuration',
|
|
121
|
+
'observerFrameRate',
|
|
122
|
+
'pipelineSchedulerConfig',
|
|
123
|
+
'preferredFps',
|
|
124
|
+
'quirksMode',
|
|
125
|
+
'removeDescendantSelectorScope',
|
|
126
|
+
'strictPropType',
|
|
127
|
+
'tapSlop',
|
|
128
|
+
'trailNewImage',
|
|
129
|
+
'unifyVWVHBehavior',
|
|
130
|
+
'useImagePostProcessor',
|
|
131
|
+
'useNewSwiper',
|
|
132
|
+
'autoResumeAnimation',
|
|
133
|
+
'cli',
|
|
134
|
+
'compileRender',
|
|
135
|
+
'customData',
|
|
136
|
+
'enableA11yIDMutationObserver',
|
|
137
|
+
'enableAsyncDisplay',
|
|
138
|
+
'enableBackgroundShapeLayer',
|
|
139
|
+
'enableCascadePseudo',
|
|
140
|
+
'enableCheckDataWhenUpdatePage',
|
|
141
|
+
'enableComponentLayoutOnly',
|
|
142
|
+
'enableGlobalComponentMap',
|
|
143
|
+
'enableNativeScheduleCreateViewAsync',
|
|
144
|
+
'enableNewAccessibility',
|
|
145
|
+
'enableNewLayoutOnly',
|
|
146
|
+
'enableOptPushStyleToBundle',
|
|
147
|
+
'enableOverlapForAccessibilityElement',
|
|
148
|
+
'fixCSSImportRuleOrder',
|
|
149
|
+
'forceCalcNewStyle',
|
|
150
|
+
'reactVersion',
|
|
151
|
+
'redBoxImageSizeWarningThreshold',
|
|
152
|
+
'removeComponentElement',
|
|
153
|
+
'syncImageAttach',
|
|
154
|
+
'useNewImage',
|
|
155
|
+
'version',
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
module.exports = {
|
|
159
|
+
compilerOptionsKeys,
|
|
160
|
+
configKeys,
|
|
161
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from './types'
|
|
2
|
+
import { CompilerOptions, Config } from './types'
|
|
3
|
+
|
|
4
|
+
// Copyied from https://github.com/type-challenges/type-challenges/issues/737#issuecomment-3486953045
|
|
5
|
+
type UnionToIntersection<U> = (
|
|
6
|
+
U extends unknown ? (arg: U) => unknown : never
|
|
7
|
+
) extends (arg: infer I) => void
|
|
8
|
+
? I
|
|
9
|
+
: never;
|
|
10
|
+
|
|
11
|
+
type LastInUnion<T> = UnionToIntersection<
|
|
12
|
+
T extends unknown ? () => T : never
|
|
13
|
+
> extends () => infer R
|
|
14
|
+
? R
|
|
15
|
+
: never;
|
|
16
|
+
|
|
17
|
+
type UnionToTuple<U, T extends unknown[] = []> = [U] extends [T[number]]
|
|
18
|
+
? T
|
|
19
|
+
: UnionToTuple<U, [...T, LastInUnion<Exclude<U, T[number]>>]>;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export type CompilerOptionsKeys = UnionToTuple<keyof CompilerOptions>
|
|
23
|
+
export type ConfigKeys = UnionToTuple<keyof Config>
|
|
24
|
+
|
|
25
|
+
export const compilerOptionsKeys: CompilerOptionsKeys
|
|
26
|
+
export const configKeys: ConfigKeys
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/type-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.6.1-alpha.0",
|
|
4
4
|
"description": "Type definitions for Lynx Config(aka PageConfig) provided by the Lynx team, used to optimize the configuration experience of Lynx Config.",
|
|
5
|
-
"keywords": [
|
|
5
|
+
"keywords": [
|
|
6
|
+
"lynx-config",
|
|
7
|
+
"types"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/lynx-family/lynx.git",
|
|
12
|
+
"directory": "js_libraries/type-config"
|
|
13
|
+
},
|
|
6
14
|
"license": "Apache-2.0",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
15
|
+
"author": "Lynx Authors",
|
|
16
|
+
"types": "index.d.ts",
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "vitest --run && tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"index.js",
|
|
23
|
+
"index.d.ts",
|
|
24
|
+
"config-keys.js",
|
|
25
|
+
"types/",
|
|
26
|
+
"CHANGELOG.md"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"typescript": "5.8.3",
|
|
31
|
+
"tsd": "0.30.4",
|
|
32
|
+
"vitest": "2.1.9"
|
|
33
|
+
}
|
|
9
34
|
}
|
|
@@ -0,0 +1,212 @@
|
|
|
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.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Lynx compiler options to set.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export interface CompilerOptions {
|
|
12
|
+
/**
|
|
13
|
+
* @defaultValue false
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
debugInfoOutside?: boolean
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Since: LynxSDK 2.2
|
|
20
|
+
*
|
|
21
|
+
* @defaultValue true
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
defaultDisplayLinear?: boolean
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Since: LynxSDK 1.6
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
defaultOverflowVisible?: boolean
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Since: LynxSDK 2.0
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue false
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
disableMultipleCascadeCSS?: boolean
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Since: LynxSDK 2.6
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue false
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
enableComponentConfig?: boolean
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @defaultValue undefined
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
enableCSSAsyncDecode?: boolean
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Since: LynxSDK 2.1
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue false
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
enableCSSClassMerge?: boolean
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @defaultValue true
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
enableCSSEngine?: boolean
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Since: LynxSDK 1.6
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue true
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
enableCSSExternalClass?: boolean
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* If enable CSS invalidation we use RuleInvalidationSet to gather the selector invalidation.
|
|
80
|
+
*
|
|
81
|
+
* Since: LynxSDK 2.10
|
|
82
|
+
*
|
|
83
|
+
* @defaultValue false
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
enableCSSInvalidation?: boolean
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @defaultValue undefined
|
|
90
|
+
*
|
|
91
|
+
*/
|
|
92
|
+
enableCSSLazyDecode?: boolean
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* This switch will enable the css module in blink standard mode.
|
|
96
|
+
*
|
|
97
|
+
* Since: LynxSDK 2.8
|
|
98
|
+
*
|
|
99
|
+
* @defaultValue false
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
enableCSSSelector?: boolean
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Since: LynxSDK 1.6
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue false
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
enableCSSStrictMode?: boolean
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Since: LynxSDK 2.0
|
|
114
|
+
*
|
|
115
|
+
* @defaultValue true
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
enableCSSVariable?: boolean
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Since: LynxSDK 2.5
|
|
122
|
+
*
|
|
123
|
+
* @defaultValue undefined
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
enableEventRefactor?: boolean
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @defaultValue false
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
enableFiberArch?: boolean
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* If enable this value, the template will be encoded as flexible template.
|
|
136
|
+
*
|
|
137
|
+
* Since: LynxSDK 2.8
|
|
138
|
+
*
|
|
139
|
+
* @defaultValue false
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
enableFlexibleTemplate?: boolean
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Since: LynxSDK 2.1
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue false
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
enableKeepPageData?: boolean
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @defaultValue false
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
enableRemoveCSSScope?: boolean
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Using the simplified styling module.
|
|
160
|
+
*
|
|
161
|
+
* Since: LynxSDK 3.3
|
|
162
|
+
*
|
|
163
|
+
* @defaultValue false
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
enableSimpleStyling?: boolean
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Allow encoding quickjs bytecode instead of source code in template.
|
|
170
|
+
*
|
|
171
|
+
* Since: LynxSDK 2.12
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue false
|
|
174
|
+
*
|
|
175
|
+
*/
|
|
176
|
+
experimental_encodeQuickjsBytecode?: boolean
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Since: LynxSDK 2.6
|
|
180
|
+
*
|
|
181
|
+
* @defaultValue undefined
|
|
182
|
+
*
|
|
183
|
+
*/
|
|
184
|
+
forceCalcNewStyle?: boolean
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Since: LynxSDK 1.4
|
|
188
|
+
*
|
|
189
|
+
* @defaultValue false
|
|
190
|
+
*
|
|
191
|
+
*/
|
|
192
|
+
implicitAnimation?: boolean
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @defaultValue false
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
removeCSSParserLog?: boolean
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @defaultValue ""
|
|
202
|
+
*
|
|
203
|
+
*/
|
|
204
|
+
targetSdkVersion?: string
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @defaultValue ""
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
templateDebugUrl?: string
|
|
211
|
+
|
|
212
|
+
}
|