@dcloudio/uni-app-x 0.7.46 → 0.7.48

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 (86) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +160 -4
  3. package/types/native/IUniElement.d.ts +1248 -3
  4. package/types/native/IUniNativeViewElement.d.ts +4 -0
  5. package/types/native/UniAnimation.d.ts +22 -22
  6. package/types/native/UniElement.d.ts +6 -2
  7. package/types/native/UniFormControlElement.d.ts +1 -0
  8. package/types/{UniPage.d.ts → native/UniPage.d.ts} +9 -8
  9. package/types/page.d.ts +91 -94
  10. package/types/uni/uts-plugin-api/global.d.ts +2 -0
  11. package/types/uni/uts-plugin-api/index.d.ts +2 -0
  12. package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +74 -427
  13. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +1 -1
  14. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +1 -1
  15. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +3 -3
  16. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +1 -1
  17. package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +18 -18
  18. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +8 -8
  19. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +2 -2
  20. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +1 -1
  21. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +1 -1
  22. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +1 -1
  23. package/types/uni/uts-plugin-api/lib/uni-document/utssdk/interface.d.ts +1 -1
  24. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +8 -8
  25. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +2 -2
  26. package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +5 -5
  27. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +2 -0
  28. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +1 -0
  29. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +46 -2
  30. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +1 -1
  31. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +14 -14
  32. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +1 -1
  33. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +162 -20
  34. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +3 -2
  35. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +2 -2
  36. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +2 -2
  37. package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +1668 -1666
  38. package/types/uni/uts-plugin-api/lib/uni-getLocation-tencent-uni1/utssdk/interface.d.ts +14 -14
  39. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +3 -3
  40. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +11 -11
  41. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +12 -12
  42. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +234 -92
  43. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +7 -7
  44. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +2 -2
  45. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +1 -1
  46. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +1 -1
  47. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +17 -17
  48. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/global.d.ts +18 -0
  49. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/index.d.ts +8 -0
  50. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +190 -0
  51. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +7 -7
  52. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +40 -40
  53. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +6 -6
  54. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +59 -59
  55. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +1 -1
  56. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +2 -2
  57. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +18 -18
  58. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/interface.d.ts +4 -4
  59. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +49 -49
  60. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +2 -2
  61. package/types/uni/uts-plugin-api/lib/uni-requestMerchantTransfer/utssdk/global.d.ts +20 -0
  62. package/types/uni/uts-plugin-api/lib/uni-requestMerchantTransfer/utssdk/index.d.ts +9 -0
  63. package/types/uni/uts-plugin-api/lib/uni-requestMerchantTransfer/utssdk/interface.d.ts +615 -0
  64. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +30 -30
  65. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +1 -1
  66. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +1 -1
  67. package/types/uni/uts-plugin-api/lib/uni-shareWithSystem/utssdk/interface.d.ts +8 -8
  68. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +10 -10
  69. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +9 -9
  70. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +21 -21
  71. package/types/uni/uts-plugin-biz/lib/uni-camera/utssdk/global.d.ts +34 -0
  72. package/types/uni/uts-plugin-biz/lib/uni-camera/utssdk/index.d.ts +16 -0
  73. package/types/uni/uts-plugin-biz/lib/uni-camera/utssdk/interface.d.ts +221 -0
  74. package/types/uni/uts-plugin-biz/lib/uni-facialRecognitionVerify/utssdk/interface.d.ts +2 -2
  75. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +16 -16
  76. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +40 -40
  77. package/types/uni/uts-plugin-component/global.d.ts +1 -0
  78. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  79. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +34 -0
  80. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +16 -0
  81. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +221 -0
  82. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/global.d.ts +2 -0
  83. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +1 -0
  84. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +38 -11
  85. package/uts-plugin.d.ts +4 -0
  86. package/types/native/global.d.ts +0 -646
@@ -17,8 +17,8 @@ export interface Uni {
17
17
  * },
18
18
  * "harmony": {
19
19
  * "osVer": "5.0.0",
20
- * "uniVer": "4.52",
21
- * "unixVer": "4.52"
20
+ * "uniVer": "4.53",
21
+ * "unixVer": "4.61"
22
22
  * }
23
23
  * },
24
24
  * "web": {
@@ -46,8 +46,8 @@ export interface Uni {
46
46
  * },
47
47
  * "harmony": {
48
48
  * "osVer": "5.0.0",
49
- * "uniVer": "4.52",
50
- * "unixVer": "4.52"
49
+ * "uniVer": "4.53",
50
+ * "unixVer": "4.61"
51
51
  * }
52
52
  * },
53
53
  * "web": {
@@ -89,8 +89,8 @@ export interface UniverifyManager {
89
89
  * },
90
90
  * "harmony": {
91
91
  * "osVer": "5.0.0",
92
- * "uniVer": "4.52",
93
- * "unixVer": "4.52"
92
+ * "uniVer": "4.53",
93
+ * "unixVer": "4.61"
94
94
  * }
95
95
  * }
96
96
  * }
@@ -112,8 +112,8 @@ export interface UniverifyManager {
112
112
  * },
113
113
  * "harmony": {
114
114
  * "osVer": "5.0.0",
115
- * "uniVer": "4.52",
116
- * "unixVer": "4.52"
115
+ * "uniVer": "4.53",
116
+ * "unixVer": "4.61"
117
117
  * }
118
118
  * }
119
119
  * }
@@ -158,8 +158,8 @@ export interface UniverifyManager {
158
158
  * },
159
159
  * "harmony": {
160
160
  * "osVer": "5.0.0",
161
- * "uniVer": "4.52",
162
- * "unixVer": "4.52"
161
+ * "uniVer": "4.53",
162
+ * "unixVer": "4.61"
163
163
  * }
164
164
  * }
165
165
  * }
@@ -181,8 +181,8 @@ export interface UniverifyManager {
181
181
  * },
182
182
  * "harmony": {
183
183
  * "osVer": "5.0.0",
184
- * "uniVer": "4.52",
185
- * "unixVer": "4.52"
184
+ * "uniVer": "4.53",
185
+ * "unixVer": "4.61"
186
186
  * }
187
187
  * }
188
188
  * }
@@ -218,8 +218,8 @@ export type UniVerifyManagerLoginOptions = {
218
218
  * },
219
219
  * "harmony": {
220
220
  * "osVer": "5.0.0",
221
- * "uniVer": "4.52",
222
- * "unixVer": "4.52"
221
+ * "uniVer": "4.53",
222
+ * "unixVer": "4.61"
223
223
  * }
224
224
  * }
225
225
  * }
@@ -321,8 +321,8 @@ export type UniVerifyManagerPreLoginSuccess = {
321
321
  * },
322
322
  * "harmony": {
323
323
  * "osVer": "5.0.0",
324
- * "uniVer": "4.52",
325
- * "unixVer": "4.52"
324
+ * "uniVer": "4.53",
325
+ * "unixVer": "4.61"
326
326
  * }
327
327
  * }
328
328
  * }
@@ -344,8 +344,8 @@ export type UniVerifyManagerPreLoginSuccess = {
344
344
  * },
345
345
  * "harmony": {
346
346
  * "osVer": "5.0.0",
347
- * "uniVer": "4.52",
348
- * "unixVer": "4.52"
347
+ * "uniVer": "4.53",
348
+ * "unixVer": "4.61"
349
349
  * }
350
350
  * }
351
351
  * }
@@ -445,8 +445,8 @@ export type UniVerifyManagerErrorCode =
445
445
  * },
446
446
  * "harmony": {
447
447
  * "osVer": "5.0.0",
448
- * "uniVer": "4.52",
449
- * "unixVer": "4.52"
448
+ * "uniVer": "4.53",
449
+ * "unixVer": "4.61"
450
450
  * }
451
451
  * }
452
452
  * }
@@ -468,8 +468,8 @@ export type UniVerifyManagerErrorCode =
468
468
  * },
469
469
  * "harmony": {
470
470
  * "osVer": "5.0.0",
471
- * "uniVer": "4.52",
472
- * "unixVer": "4.52"
471
+ * "uniVer": "4.53",
472
+ * "unixVer": "4.61"
473
473
  * }
474
474
  * }
475
475
  * }
@@ -491,8 +491,8 @@ export type UniVerifyManagerErrorCode =
491
491
  * },
492
492
  * "harmony": {
493
493
  * "osVer": "5.0.0",
494
- * "uniVer": "4.52",
495
- * "unixVer": "4.52"
494
+ * "uniVer": "4.53",
495
+ * "unixVer": "4.61"
496
496
  * }
497
497
  * }
498
498
  * }
@@ -514,8 +514,8 @@ export type UniVerifyManagerErrorCode =
514
514
  * },
515
515
  * "harmony": {
516
516
  * "osVer": "5.0.0",
517
- * "uniVer": "4.52",
518
- * "unixVer": "4.52"
517
+ * "uniVer": "4.53",
518
+ * "unixVer": "4.61"
519
519
  * }
520
520
  * }
521
521
  * }
@@ -537,8 +537,8 @@ export type UniVerifyManagerErrorCode =
537
537
  * },
538
538
  * "harmony": {
539
539
  * "osVer": "5.0.0",
540
- * "uniVer": "4.52",
541
- * "unixVer": "4.52"
540
+ * "uniVer": "4.53",
541
+ * "unixVer": "4.61"
542
542
  * }
543
543
  * }
544
544
  * }
@@ -560,8 +560,8 @@ export type UniVerifyManagerErrorCode =
560
560
  * },
561
561
  * "harmony": {
562
562
  * "osVer": "5.0.0",
563
- * "uniVer": "4.52",
564
- * "unixVer": "4.52"
563
+ * "uniVer": "4.53",
564
+ * "unixVer": "4.61"
565
565
  * }
566
566
  * }
567
567
  * }
@@ -583,8 +583,8 @@ export type UniVerifyManagerErrorCode =
583
583
  * },
584
584
  * "harmony": {
585
585
  * "osVer": "5.0.0",
586
- * "uniVer": "4.52",
587
- * "unixVer": "4.52"
586
+ * "uniVer": "4.53",
587
+ * "unixVer": "4.61"
588
588
  * }
589
589
  * }
590
590
  * }
@@ -606,8 +606,8 @@ export type UniVerifyManagerErrorCode =
606
606
  * },
607
607
  * "harmony": {
608
608
  * "osVer": "5.0.0",
609
- * "uniVer": "4.52",
610
- * "unixVer": "4.52"
609
+ * "uniVer": "4.53",
610
+ * "unixVer": "4.61"
611
611
  * }
612
612
  * }
613
613
  * }
@@ -629,8 +629,8 @@ export type UniVerifyManagerErrorCode =
629
629
  * },
630
630
  * "harmony": {
631
631
  * "osVer": "5.0.0",
632
- * "uniVer": "4.52",
633
- * "unixVer": "4.52"
632
+ * "uniVer": "4.53",
633
+ * "unixVer": "4.61"
634
634
  * }
635
635
  * }
636
636
  * }
@@ -652,8 +652,8 @@ export type UniVerifyManagerErrorCode =
652
652
  * },
653
653
  * "harmony": {
654
654
  * "osVer": "5.0.0",
655
- * "uniVer": "4.52",
656
- * "unixVer": "4.52"
655
+ * "uniVer": "4.53",
656
+ * "unixVer": "4.61"
657
657
  * }
658
658
  * }
659
659
  * }
@@ -675,8 +675,8 @@ export type UniVerifyManagerErrorCode =
675
675
  * },
676
676
  * "harmony": {
677
677
  * "osVer": "5.0.0",
678
- * "uniVer": "4.52",
679
- * "unixVer": "4.52"
678
+ * "uniVer": "4.53",
679
+ * "unixVer": "4.61"
680
680
  * }
681
681
  * }
682
682
  * }
@@ -1 +1,2 @@
1
+ /// <reference path='./lib/uni-camera/utssdk/global.d.ts' />
1
2
  /// <reference path='./lib/uni-video/utssdk/global.d.ts' />
@@ -1 +1,2 @@
1
+ export * from './lib/uni-camera/utssdk'
1
2
  export * from './lib/uni-video/utssdk'
@@ -0,0 +1,34 @@
1
+ // 本文件为自动构建生成
2
+ import {
3
+ CameraContextCameraFrameListenerStartOptions as CameraContextCameraFrameListenerStartOptionsOrigin,
4
+ CameraContextCameraFrameListenerStopOptions as CameraContextCameraFrameListenerStopOptionsOrigin,
5
+ CameraContextCameraFrameListener as CameraContextCameraFrameListenerOrigin,
6
+ CameraContextOnCameraFrame as CameraContextOnCameraFrameOrigin,
7
+ CameraContextSetZoomOptions as CameraContextSetZoomOptionsOrigin,
8
+ CameraContextTakePhotoResult as CameraContextTakePhotoResultOrigin,
9
+ CameraContextTakePhotoOptions as CameraContextTakePhotoOptionsOrigin,
10
+ CameraContextStartRecordTimeoutResult as CameraContextStartRecordTimeoutResultOrigin,
11
+ CameraContextStartRecordOptions as CameraContextStartRecordOptionsOrigin,
12
+ CameraContextStopRecordResult as CameraContextStopRecordResultOrigin,
13
+ CameraContextStopRecordOptions as CameraContextStopRecordOptionsOrigin,
14
+ CameraContext as CameraContextOrigin,
15
+ CreateCameraContext as CreateCameraContextOrigin,
16
+ Uni as UniOrigin
17
+ } from './interface'
18
+
19
+ declare global {
20
+ type CameraContextCameraFrameListenerStartOptions = CameraContextCameraFrameListenerStartOptionsOrigin
21
+ type CameraContextCameraFrameListenerStopOptions = CameraContextCameraFrameListenerStopOptionsOrigin
22
+ type CameraContextCameraFrameListener = CameraContextCameraFrameListenerOrigin
23
+ type CameraContextOnCameraFrame = CameraContextOnCameraFrameOrigin
24
+ type CameraContextSetZoomOptions = CameraContextSetZoomOptionsOrigin
25
+ type CameraContextTakePhotoResult = CameraContextTakePhotoResultOrigin
26
+ type CameraContextTakePhotoOptions = CameraContextTakePhotoOptionsOrigin
27
+ type CameraContextStartRecordTimeoutResult = CameraContextStartRecordTimeoutResultOrigin
28
+ type CameraContextStartRecordOptions = CameraContextStartRecordOptionsOrigin
29
+ type CameraContextStopRecordResult = CameraContextStopRecordResultOrigin
30
+ type CameraContextStopRecordOptions = CameraContextStopRecordOptionsOrigin
31
+ type CameraContext = CameraContextOrigin
32
+ type CreateCameraContext = CreateCameraContextOrigin
33
+ interface Uni extends UniOrigin { }
34
+ }
@@ -0,0 +1,16 @@
1
+ // 本文件为自动构建生成
2
+ export {
3
+ CameraContextCameraFrameListenerStartOptions,
4
+ CameraContextCameraFrameListenerStopOptions,
5
+ CameraContextCameraFrameListener,
6
+ CameraContextOnCameraFrame,
7
+ CameraContextSetZoomOptions,
8
+ CameraContextTakePhotoResult,
9
+ CameraContextTakePhotoOptions,
10
+ CameraContextStartRecordTimeoutResult,
11
+ CameraContextStartRecordOptions,
12
+ CameraContextStopRecordResult,
13
+ CameraContextStopRecordOptions,
14
+ CameraContext,
15
+ CreateCameraContext,
16
+ } from './interface'
@@ -0,0 +1,221 @@
1
+
2
+
3
+ export type CameraContextCameraFrameListenerStartOptions = {
4
+ /**
5
+ * 接口调用成功的回调函数
6
+ */
7
+ success ?: ((result : any) => void) | null;
8
+ /**
9
+ * 接口调用失败的回调函数
10
+ * @defaultValue null
11
+ */
12
+ fail ?: ((result : any) => void) | null;
13
+ /**
14
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
15
+ * @defaultValue null
16
+ */
17
+ complete ?: ((result : any) => void) | null;
18
+ }
19
+
20
+ export type CameraContextCameraFrameListenerStopOptions = {
21
+ /**
22
+ * 接口调用成功的回调函数
23
+ */
24
+ success ?: ((result : any) => void) | null;
25
+ /**
26
+ * 接口调用失败的回调函数
27
+ * @defaultValue null
28
+ */
29
+ fail ?: ((result : any) => void) | null;
30
+ /**
31
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
32
+ * @defaultValue null
33
+ */
34
+ complete ?: ((result : any) => void) | null;
35
+ }
36
+
37
+ export interface CameraContextCameraFrameListener {
38
+ /**
39
+ * 开始监听帧数据
40
+ */
41
+ start(options : CameraContextCameraFrameListenerStartOptions) : void;
42
+ /**
43
+ * 停止监听帧数据
44
+ */
45
+ stop(options : CameraContextCameraFrameListenerStopOptions) : void;
46
+ }
47
+
48
+ export type CameraContextOnCameraFrame = {
49
+ /**
50
+ * 图像数据矩形的宽度
51
+ */
52
+ width ?: number | null;
53
+ /**
54
+ * 图像数据矩形的高度
55
+ */
56
+ height ?: number | null;
57
+ /**
58
+ * 图像像素点数据,一维数组,每四项表示一个像素点的 rgba
59
+ */
60
+ data ?: ArrayBuffer | null
61
+ }
62
+
63
+ export type CameraContextSetZoomOptions = {
64
+ /**
65
+ * 缩放级别,范围[1, maxZoom]。zoom 可取小数,精确到小数后一位。maxZoom 可在 initdone 返回值中获取。
66
+ */
67
+ zoom : number;
68
+ /**
69
+ * 接口调用成功的回调函数
70
+ */
71
+ success ?: ((result : any) => void) | null;
72
+ /**
73
+ * 接口调用失败的回调函数
74
+ * @defaultValue null
75
+ */
76
+ fail ?: ((result : any) => void) | null;
77
+ /**
78
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
79
+ * @defaultValue null
80
+ */
81
+ complete ?: ((result : any) => void) | null;
82
+ }
83
+
84
+ export type CameraContextTakePhotoResult = {
85
+ /**
86
+ * 照片文件的临时路径 (本地路径),安卓是jpg图片格式,ios是png
87
+ */
88
+ tempImagePath ?: string | null
89
+ }
90
+
91
+ export type CameraContextTakePhotoOptions = {
92
+ /**
93
+ * 成像质量
94
+ */
95
+ quality ?: "high" | "normal" | "low" | "original" | null;
96
+ /**
97
+ * 是否开启镜像
98
+ */
99
+ selfieMirror?: boolean | null;
100
+
101
+ /**
102
+ * 接口调用成功的回调函数
103
+ */
104
+ success ?: ((result : CameraContextTakePhotoResult) => void) | null;
105
+ /**
106
+ * 接口调用失败的回调函数
107
+ * @defaultValue null
108
+ */
109
+ fail ?: ((result : any) => void) | null;
110
+ /**
111
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
112
+ * @defaultValue null
113
+ */
114
+ complete ?: ((result : any) => void) | null;
115
+ }
116
+
117
+ export type CameraContextStartRecordTimeoutResult = {
118
+ /**
119
+ * 封面图片文件的临时路径 (本地路径)
120
+ */
121
+ tempThumbPath ?: string | null;
122
+ /**
123
+ * 视频的文件的临时路径 (本地路径)
124
+ */
125
+ tempVideoPath ?: string | null;
126
+ }
127
+
128
+
129
+ export type CameraContextStartRecordOptions = {
130
+ /**
131
+ * 超过录制时长上限时会结束录像并触发此回调,录像异常退出时也会触发此回调
132
+ */
133
+ timeoutCallback ?: ((result: any) => void) | null;
134
+ /**
135
+ * 录制时长上限,单位为秒,最长不能超过 5 分钟
136
+ * @defaultValue 30
137
+ */
138
+ timeout ?: number | null;
139
+ /**
140
+ * 是否开启镜像
141
+ * @defaultValue true
142
+ */
143
+ selfieMirror ?: boolean | null;
144
+ /**
145
+ * 接口调用成功的回调函数
146
+ */
147
+ success ?: ((result : any) => void) | null;
148
+ /**
149
+ * 接口调用失败的回调函数
150
+ * @defaultValue null
151
+ */
152
+ fail ?: ((result : any) => void) | null;
153
+ /**
154
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
155
+ * @defaultValue null
156
+ */
157
+ complete ?: ((result : any) => void) | null;
158
+ }
159
+
160
+ export type CameraContextStopRecordResult = {
161
+ /**
162
+ * 封面图片文件的临时路径 (本地路径)
163
+ */
164
+ tempThumbPath ?: string | null;
165
+ /**
166
+ * 视频的文件的临时路径 (本地路径)
167
+ */
168
+ tempVideoPath ?: string | null;
169
+ }
170
+
171
+ export type CameraContextStopRecordOptions = {
172
+ /**
173
+ * 启动视频压缩,压缩效果同chooseVideo
174
+ */
175
+ compressed ?: boolean | null;
176
+ /**
177
+ * 接口调用成功的回调函数
178
+ */
179
+ success ?: ((result : CameraContextStopRecordResult) => void) | null;
180
+ /**
181
+ * 接口调用失败的回调函数
182
+ * @defaultValue null
183
+ */
184
+ fail ?: ((result : any) => void) | null;
185
+ /**
186
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
187
+ * @defaultValue null
188
+ */
189
+ complete ?: ((result : any) => void) | null;
190
+ }
191
+
192
+
193
+ export interface CameraContext {
194
+ /**
195
+ * 获取 Camera 实时帧数据
196
+ */
197
+ onCameraFrame(callback : (frame : CameraContextOnCameraFrame) => void) : CameraContextCameraFrameListener | null;
198
+ /**
199
+ * 设置缩放级别
200
+ */
201
+ setZoom(options : CameraContextSetZoomOptions) : void;
202
+ /**
203
+ * 拍摄照片
204
+ */
205
+ takePhoto(options : CameraContextTakePhotoOptions) : void;
206
+ /**
207
+ * 开始录像
208
+ */
209
+ startRecord(options: CameraContextStartRecordOptions): void;
210
+ /**
211
+ * 结束录像
212
+ */
213
+ stopRecord(options: CameraContextStopRecordOptions) : void;
214
+ }
215
+
216
+ export type CreateCameraContext = () => CameraContext | null;
217
+
218
+
219
+ export interface Uni {
220
+ createCameraContext: CreateCameraContext
221
+ }
@@ -7,6 +7,7 @@ import {
7
7
  UniVideoTimeUpdateEvent as UniVideoTimeUpdateEventOrigin,
8
8
  UniVideoTimeUpdateEventDetail as UniVideoTimeUpdateEventDetailOrigin,
9
9
  UniVideoFullScreenChangeEvent as UniVideoFullScreenChangeEventOrigin,
10
+ UniVideoFullScreenDirection as UniVideoFullScreenDirectionOrigin,
10
11
  UniVideoFullScreenChangeEventDetail as UniVideoFullScreenChangeEventDetailOrigin,
11
12
  UniVideoErrorEvent as UniVideoErrorEventOrigin,
12
13
  VideoErrorCode as VideoErrorCodeOrigin,
@@ -39,6 +40,7 @@ declare global {
39
40
  type UniVideoTimeUpdateEvent = UniVideoTimeUpdateEventOrigin
40
41
  type UniVideoTimeUpdateEventDetail = UniVideoTimeUpdateEventDetailOrigin
41
42
  type UniVideoFullScreenChangeEvent = UniVideoFullScreenChangeEventOrigin
43
+ type UniVideoFullScreenDirection = UniVideoFullScreenDirectionOrigin
42
44
  type UniVideoFullScreenChangeEventDetail = UniVideoFullScreenChangeEventDetailOrigin
43
45
  type UniVideoErrorEvent = UniVideoErrorEventOrigin
44
46
  type VideoErrorCode = VideoErrorCodeOrigin
@@ -7,6 +7,7 @@ export {
7
7
  UniVideoTimeUpdateEvent,
8
8
  UniVideoTimeUpdateEventDetail,
9
9
  UniVideoFullScreenChangeEvent,
10
+ UniVideoFullScreenDirection,
10
11
  UniVideoFullScreenChangeEventDetail,
11
12
  UniVideoErrorEvent,
12
13
  VideoErrorCode,
@@ -18,10 +18,6 @@ export type Danmu = {
18
18
  export type RequestFullScreenOptions = {
19
19
  /**
20
20
  * direction
21
- * - 0: 正常竖向
22
- * - 90: 屏幕逆时针90度
23
- * - -90: 屏幕顺时针90度
24
- * @type 0 | 90 | -90
25
21
  * @uniPlatform {
26
22
  * "app": {
27
23
  * "android": {
@@ -83,7 +79,19 @@ export type RequestFullScreenOptions = {
83
79
  * }
84
80
  * }
85
81
  */
86
- direction?: number | null
82
+ direction?:
83
+ /**
84
+ * 正常竖向
85
+ */
86
+ 0 |
87
+ /**
88
+ * 屏幕逆时针90度
89
+ */
90
+ 90 |
91
+ /**
92
+ * 屏幕顺时针90度
93
+ */
94
+ -90 | null
87
95
  };
88
96
 
89
97
  export interface VideoContext {
@@ -799,15 +807,25 @@ export interface UniVideoFullScreenChangeEvent extends UniVideoEvent {
799
807
  detail: UniVideoFullScreenChangeEventDetail
800
808
  }
801
809
 
810
+ export type UniVideoFullScreenDirection =
811
+ /**
812
+ * 竖屏
813
+ */
814
+ 'vertical' |
815
+ /**
816
+ * 横屏
817
+ */
818
+ 'horizontal'
819
+
802
820
  export type UniVideoFullScreenChangeEventDetail = {
803
821
  /**
804
822
  * 是否全屏
805
823
  */
806
824
  fullScreen: boolean,
807
825
  /**
808
- * 横竖屏,取值 vertical 或 horizontal
826
+ * 横竖屏
809
827
  */
810
- direction: string
828
+ direction: UniVideoFullScreenDirection
811
829
  }
812
830
 
813
831
  /**
@@ -820,11 +838,20 @@ export interface UniVideoErrorEvent extends UniVideoEvent {
820
838
 
821
839
  /**
822
840
  * 统一错误码
823
- * 100001 网络错误
824
- * 200001 内部错误
825
- * 300001 SDK错误
826
841
  */
827
- export type VideoErrorCode = 100001 | 200001 | 300001
842
+ export type VideoErrorCode =
843
+ /**
844
+ * 网络错误
845
+ */
846
+ 100001 |
847
+ /**
848
+ * 内部错误
849
+ */
850
+ 200001 |
851
+ /**
852
+ * SDK错误
853
+ */
854
+ 300001
828
855
 
829
856
  export interface VideoError extends IUniError {
830
857
  errCode: VideoErrorCode
package/uts-plugin.d.ts CHANGED
@@ -5,7 +5,9 @@
5
5
  /// <reference path='./types/uni/uts-plugin-api/lib/uni-network/utssdk/global.d.ts' />
6
6
  /// <reference path='./types/uni/uts-plugin-api/lib/uni-prompt/utssdk/global.d.ts' />
7
7
  /// <reference path='./types/uni/uts-plugin-api/lib/uni-storage/utssdk/global.d.ts' />
8
+ /// <reference path='./types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/global.d.ts' />
8
9
  /// <reference path='./types/uni-cloud/index.d.ts' />
10
+ /// <reference path='./types/native-global/index.d.ts' />
9
11
 
10
12
  import {
11
13
  UniError as UniErrorOrigin,
@@ -14,6 +16,7 @@ import {
14
16
  UTSAndroidHookProxy as UTSAndroidHookProxyOrigin,
15
17
  IUniError as IUniErrorOrigin,
16
18
  AsyncApiSuccessResult as AsyncApiSuccessResultOrigin,
19
+ UniNativeViewElement as UniNativeViewElementOrigin,
17
20
  } from './types/native'
18
21
 
19
22
  declare global {
@@ -26,4 +29,5 @@ declare global {
26
29
  type UniAggregateError = UniAggregateErrorOrigin
27
30
  type UTSAndroidHookProxy = UTSAndroidHookProxyOrigin
28
31
  type AsyncApiSuccessResult = AsyncApiSuccessResultOrigin
32
+ type UniNativeViewElement = UniNativeViewElementOrigin
29
33
  }