@dcloudio/uni-app-x 0.5.0 → 0.5.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.
Files changed (108) hide show
  1. package/README.md +39 -0
  2. package/package.json +5 -3
  3. package/types/app.d.ts +26 -72
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/DOMRect.d.ts +4 -4
  6. package/types/native/DomNode.d.ts +48 -0
  7. package/types/native/DrawableContext.d.ts +42 -16
  8. package/types/native/Element.d.ts +234 -0
  9. package/types/native/Event.d.ts +14 -3
  10. package/types/native/IDocument.d.ts +6 -6
  11. package/types/native/IPage.d.ts +28 -10
  12. package/types/native/IPageManager.d.ts +2 -2
  13. package/types/native/ITabsNode.d.ts +4 -4
  14. package/types/native/IUniError.d.ts +20 -0
  15. package/types/native/IWebViewNode.d.ts +2 -2
  16. package/types/native/InputBlurEvent.d.ts +13 -0
  17. package/types/native/InputConfirmEvent.d.ts +13 -0
  18. package/types/native/InputEvent.d.ts +21 -0
  19. package/types/native/InputFocusEvent.d.ts +17 -0
  20. package/types/native/InputKeyboardHeightChangeEvent.d.ts +17 -0
  21. package/types/native/MouseEvent.d.ts +13 -1
  22. package/types/native/NestedPreScrollEvent.d.ts +23 -0
  23. package/types/native/ScrollToLowerEvent.d.ts +4 -1
  24. package/types/native/ScrollToUpperEvent.d.ts +5 -2
  25. package/types/native/StartNestedScrollEvent.d.ts +12 -0
  26. package/types/native/SwiperAnimationFinishEvent.d.ts +11 -0
  27. package/types/native/SwiperChangeEvent.d.ts +11 -0
  28. package/types/native/SwiperTransitionEvent.d.ts +11 -0
  29. package/types/native/TextareaBlurEvent.d.ts +17 -0
  30. package/types/native/TextareaFocusEvent.d.ts +17 -0
  31. package/types/native/TextareaLineChangeEvent.d.ts +21 -0
  32. package/types/native/UniError.d.ts +7 -2
  33. package/types/native/index.d.ts +18 -1
  34. package/types/page.d.ts +38 -193
  35. package/types/uni/core/index.d.ts +9 -8
  36. package/types/uni/core/lib/base/event/interface.d.ts +4 -4
  37. package/types/uni/core/lib/lifecycle/interface.d.ts +1 -1
  38. package/types/uni/core/lib/route/index.d.ts +0 -10
  39. package/types/uni/core/lib/route/interface.d.ts +1805 -10
  40. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +242 -2
  41. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +9 -0
  42. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +72 -0
  43. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +486 -3
  44. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +0 -2
  45. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +93 -9
  46. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +0 -2
  47. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -5
  48. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +373 -4
  49. package/types/uni/core/lib/ui/tab-bar/index.d.ts +2 -18
  50. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +32 -35
  51. package/types/uni/index.d.ts +2 -1
  52. package/types/uni/{ext → uts-plugin-api}/index.d.ts +18 -17
  53. package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/interface.d.ts +2 -2
  54. package/types/uni/{ext → uts-plugin-api}/lib/uni-createWebviewContext/utssdk/interface.d.ts +9 -9
  55. package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/interface.d.ts +1 -1
  56. package/types/uni/{ext → uts-plugin-api}/lib/uni-file-manager/utssdk/interface.d.ts +2 -2
  57. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
  58. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +108 -10
  59. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +233 -0
  60. package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/interface.d.ts +58 -46
  61. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/interface.d.ts +13 -1
  62. package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -5
  63. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
  64. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/interface.d.ts +108 -36
  65. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/interface.d.ts +3 -3
  66. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +794 -0
  67. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/interface.d.ts +60 -19
  68. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/index.d.ts +4 -0
  69. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/interface.d.ts +138 -49
  70. package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +8 -5
  71. package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/interface.d.ts +6 -6
  72. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/interface.d.ts +27 -27
  73. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/index.d.ts +2 -0
  74. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/interface.d.ts +60 -35
  75. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  76. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +15 -0
  77. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +171 -0
  78. package/types/uni-cloud/index.d.ts +59 -330
  79. package/types/uni-cloud/interface.d.ts +786 -0
  80. package/types/vue/CheckboxGroupChangeEvent.d.ts +1 -1
  81. package/types/vue/PickerViewChangeEvent.d.ts +1 -1
  82. package/types/vue/ProgressActiveendEvent.d.ts +1 -1
  83. package/types/vue/RadioGroupChangeEvent.d.ts +1 -1
  84. package/types/vue/SliderChangeEvent.d.ts +10 -1
  85. package/types/vue/SwitchChangeEvent.d.ts +1 -1
  86. package/uts-plugin.d.ts +10 -0
  87. package/types/native/INode.d.ts +0 -181
  88. package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +0 -31
  89. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -120
  90. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
  91. package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +0 -795
  92. /package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/index.d.ts +0 -0
  93. /package/types/uni/{ext → uts-plugin-api}/lib/uni-createWebviewContext/utssdk/index.d.ts +0 -0
  94. /package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/index.d.ts +0 -0
  95. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -0
  96. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  97. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -0
  98. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -0
  99. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/index.d.ts +0 -0
  100. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/index.d.ts +0 -0
  101. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -0
  102. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -0
  103. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -0
  104. /package/types/uni/{ext → uts-plugin-api}/lib/uni-media/utssdk/index.d.ts +0 -0
  105. /package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/index.d.ts +0 -0
  106. /package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  107. /package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/index.d.ts +0 -0
  108. /package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/index.d.ts +0 -0
@@ -16,7 +16,7 @@ export interface Uni {
16
16
  * "ios": {
17
17
  * "osVer": "9.0",
18
18
  * "uniVer": "√",
19
- * "unixVer": "3.9.0"
19
+ * "unixVer": "x"
20
20
  * }
21
21
  * }
22
22
  * }
@@ -32,7 +32,7 @@ export interface Uni {
32
32
  })
33
33
  ```
34
34
  */
35
- getSystemInfo: GetSystemInfo;
35
+ getSystemInfo(options: GetSystemInfoOptions): void;
36
36
 
37
37
  /**
38
38
  * getSystemInfoSync()
@@ -51,7 +51,7 @@ export interface Uni {
51
51
  * "ios": {
52
52
  * "osVer": "9.0",
53
53
  * "uniVer": "√",
54
- * "unixVer": "3.9.0"
54
+ * "unixVer": "x"
55
55
  * }
56
56
  * }
57
57
  * }
@@ -60,7 +60,7 @@ export interface Uni {
60
60
  uni.getSystemInfoSync()
61
61
  ```
62
62
  */
63
- getSystemInfoSync: GetSystemInfoSync;
63
+ getSystemInfoSync(): GetSystemInfoResult;
64
64
 
65
65
  /**
66
66
  * getWindowInfo()
@@ -79,7 +79,7 @@ export interface Uni {
79
79
  * "ios": {
80
80
  * "osVer": "9.0",
81
81
  * "uniVer": "√",
82
- * "unixVer": "3.9.0"
82
+ * "unixVer": "x"
83
83
  * }
84
84
  * }
85
85
  * }
@@ -88,7 +88,7 @@ export interface Uni {
88
88
  uni.getWindowInfo()
89
89
  ```
90
90
  */
91
- getWindowInfo: GetWindowInfo;
91
+ getWindowInfo(): GetWindowInfoResult;
92
92
  }
93
93
 
94
94
  export type GetSystemInfo = (options: GetSystemInfoOptions) => void;
@@ -148,35 +148,50 @@ export type GetSystemInfoResult = {
148
148
  */
149
149
  appId: string,
150
150
  /**
151
- * 应用设置的语言。仅 App、H5 支持
151
+ * 应用设置的语言。
152
152
  */
153
- appLanguage: string | null,
153
+ appLanguage: string,
154
154
  /**
155
- * `manifest.json` 中应用名称。和`字节跳动小程序、飞书小程序`字段冲突,原字端与`hostName`一致
155
+ * `manifest.json` 中应用名称。
156
156
  */
157
157
  appName: string,
158
158
  /**
159
- * `manifest.json` 中应用版本名称。
159
+ * `manifest.json` 中应用版本名称(真机运行时,为基座的版本名称)。
160
160
  */
161
161
  appVersion: string,
162
162
  /**
163
- * `manifest.json` 中应用版本名号
163
+ * `manifest.json` 中应用版本名号(真机运行时,为基座的版本号)。
164
164
  */
165
165
  appVersionCode: number,
166
166
  /**
167
- * 应用资源(wgt)的版本名称。(仅 App 支持)
167
+ * 应用资源(wgt)的版本名称。
168
+ *
169
+ * @uniPlatform {
170
+ * "app": {
171
+ * "android": {
172
+ * "osVer": "4.4",
173
+ * "uniVer": "√",
174
+ * "unixVer": "x"
175
+ * },
176
+ * "ios": {
177
+ * "osVer": "9.0",
178
+ * "uniVer": "√",
179
+ * "unixVer": "x"
180
+ * }
181
+ * }
182
+ * }
168
183
  */
169
184
  appWgtVersion: string | null,
170
185
  /**
171
- * 手机品牌。H5 不支持
186
+ * 手机品牌。
172
187
  */
173
- brand: string | null,
188
+ brand: string,
174
189
  /**
175
190
  * 浏览器名称。`App` 端是系统 webview 的名字,比如 wkwebview、chrome。小程序端为空
176
191
  */
177
192
  browserName: string,
178
193
  /**
179
- * 浏览器版本、webview 版本。小程序端为空
194
+ * 浏览器版本、webview 版本。
180
195
  */
181
196
  browserVersion: string,
182
197
  /**
@@ -184,9 +199,9 @@ export type GetSystemInfoResult = {
184
199
  */
185
200
  deviceId: string,
186
201
  /**
187
- * 设备品牌。如:`apple`、`huawei`。H5 不支持
202
+ * 设备品牌。如:`apple`、`huawei`。
188
203
  */
189
- deviceBrand: string | null,
204
+ deviceBrand: string,
190
205
  /**
191
206
  * 设备型号
192
207
  */
@@ -209,7 +224,7 @@ export type GetSystemInfoResult = {
209
224
  /**
210
225
  * 程序设置的语言
211
226
  */
212
- language: string | null,
227
+ language: string,
213
228
  /**
214
229
  * 手机型号
215
230
  */
@@ -223,11 +238,26 @@ export type GetSystemInfoResult = {
223
238
  */
224
239
  osVersion: string,
225
240
  /**
226
- * 操作系统语言,小程序端与 `version` 相同,H5 与浏览器语言一致
227
- */
228
- osLanguage: string | null,
229
- /**
230
- * |操作系统主题 light、dark。小程序端为小程序主题,H5 端为空
241
+ * 操作系统语言
242
+ */
243
+ osLanguage: string,
244
+ /**
245
+ * 操作系统主题 light、dark
246
+ *
247
+ * @uniPlatform {
248
+ * "app": {
249
+ * "android": {
250
+ * "osVer": "4.4",
251
+ * "uniVer": "√",
252
+ * "unixVer": "x"
253
+ * },
254
+ * "ios": {
255
+ * "osVer": "9.0",
256
+ * "uniVer": "√",
257
+ * "unixVer": "x"
258
+ * }
259
+ * }
260
+ * }
231
261
  */
232
262
  osTheme: string | null,
233
263
  /**
@@ -249,7 +279,7 @@ export type GetSystemInfoResult = {
249
279
  /**
250
280
  * 状态栏的高度
251
281
  */
252
- statusBarHeight: number | null,
282
+ statusBarHeight: number,
253
283
  /**
254
284
  * 操作系统版本
255
285
  */
@@ -257,17 +287,17 @@ export type GetSystemInfoResult = {
257
287
  /**
258
288
  * 在竖屏正方向下的安全区域
259
289
  */
260
- safeArea: SafeArea | null,
290
+ safeArea: SafeArea,
261
291
  /**
262
292
  * 在竖屏正方向下的安全区域插入位置
263
293
  */
264
- safeAreaInsets: SafeAreaInsets | null,
294
+ safeAreaInsets: SafeAreaInsets,
265
295
  /**
266
296
  * 用户标识。小程序端为空
267
297
  */
268
298
  ua: string,
269
299
  /**
270
- * uni 编译器版本号
300
+ * uni 编译器版本
271
301
  */
272
302
  uniCompileVersion: string,
273
303
  /**
@@ -277,19 +307,28 @@ export type GetSystemInfoResult = {
277
307
  /**
278
308
  * uni 运行时版本
279
309
  */
280
- uniRuntimeVersion: string,
310
+ uniRuntimeVersion: string,
311
+ /**
312
+ * uni 编译器版本号
313
+ */
314
+ uniCompileVersionCode: number,
315
+ /**
316
+ * uni 运行时版本号
317
+ */
318
+ uniRuntimeVersionCode: number,
281
319
  /**
282
- * 引擎版本号
320
+ * 引擎版本号
321
+ * @deprecated 已废弃,仅为了向下兼容保留
283
322
  */
284
323
  version: string,
285
324
  /**
286
325
  * rom 名称。Android 部分机型获取不到值。iOS 恒为 `ios`
287
326
  */
288
- romName: string | null,
327
+ romName: string,
289
328
  /**
290
329
  * rom 版本号。Android 部分机型获取不到值。iOS 恒为 `ios 版本号`
291
330
  */
292
- romVersion: string | null,
331
+ romVersion: string,
293
332
  /**
294
333
  * 可使用窗口宽度
295
334
  */
@@ -307,11 +346,41 @@ export type GetSystemInfoResult = {
307
346
  */
308
347
  windowBottom: number,
309
348
  /**
310
- * oaid
349
+ * oaid
350
+ *
351
+ * @uniPlatform {
352
+ * "app": {
353
+ * "android": {
354
+ * "osVer": "4.4",
355
+ * "uniVer": "√",
356
+ * "unixVer": "√"
357
+ * },
358
+ * "ios": {
359
+ * "osVer": "x",
360
+ * "uniVer": "x",
361
+ * "unixVer": "x"
362
+ * }
363
+ * }
364
+ * }
311
365
  */
312
366
  oaid: string | null
313
367
  /**
314
- * Android 系统API库的版本。
368
+ * Android 系统API库的版本。
369
+ *
370
+ * @uniPlatform {
371
+ * "app": {
372
+ * "android": {
373
+ * "osVer": "4.4",
374
+ * "uniVer": "√",
375
+ * "unixVer": "√"
376
+ * },
377
+ * "ios": {
378
+ * "osVer": "x",
379
+ * "uniVer": "x",
380
+ * "unixVer": "x"
381
+ * }
382
+ * }
383
+ * }
315
384
  */
316
385
  osAndroidAPILevel: number | null
317
386
  };
@@ -322,15 +391,18 @@ export type GetSystemInfoComplete = any;
322
391
  export type GetSystemInfoCompleteCallback = (result: GetSystemInfoComplete) => void;
323
392
  export type GetSystemInfoOptions = {
324
393
  /**
325
- * 接口调用成功的回调函数
394
+ * 接口调用成功的回调函数
395
+ * @defaultValue null
326
396
  */
327
397
  success?: GetSystemInfoSuccessCallback | null,
328
398
  /**
329
- * 接口调用失败的回调函数
399
+ * 接口调用失败的回调函数
400
+ * @defaultValue null
330
401
  */
331
402
  fail?: GetSystemInfoFailCallback | null,
332
403
  /**
333
- * 接口调用结束的回调函数(调用成功、失败都会执行)
404
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
405
+ * @defaultValue null
334
406
  */
335
407
  complete?: GetSystemInfoCompleteCallback | null
336
408
  };
@@ -12,7 +12,7 @@ export type GetSystemSettingResult = {
12
12
  /**
13
13
  * 位置是否开启
14
14
  */
15
- locationEnabled?: boolean,
15
+ locationEnabled : boolean,
16
16
  /**
17
17
  * wifi是否开启
18
18
  */
@@ -24,7 +24,7 @@ export type GetSystemSettingResult = {
24
24
  /**
25
25
  * 设备方向
26
26
  */
27
- deviceOrientation?: string
27
+ deviceOrientation : string
28
28
  }
29
29
 
30
30
 
@@ -57,5 +57,5 @@ export interface Uni {
57
57
  uni.getSystemSetting()
58
58
  ```
59
59
  */
60
- getSystemSetting: GetSystemSetting
60
+ getSystemSetting(): GetSystemSettingResult;
61
61
  }