@dcloudio/uni-app-x 0.7.41 → 0.7.42

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 (30) hide show
  1. package/package.json +1 -1
  2. package/types/UniPage.d.ts +3 -39
  3. package/types/app.d.ts +2 -2
  4. package/types/native/Animation.d.ts +578 -0
  5. package/types/native/AnimationPlaybackEvent.d.ts +12 -0
  6. package/types/native/CSSStyleDeclaration.d.ts +40 -7
  7. package/types/native/CanvasRenderingContext2D.d.ts +52 -2
  8. package/types/native/UniElement.d.ts +2 -0
  9. package/types/native/UniNativePage.d.ts +1 -19
  10. package/types/native/UniSafeAreaInsets.d.ts +74 -0
  11. package/types/native/global.d.ts +6 -0
  12. package/types/native/index.d.ts +3 -1
  13. package/types/uni/uni-map-tencent-global.d.ts +5 -1
  14. package/types/uni/uni-map-tencent-map.d.ts +7 -0
  15. package/types/uni/uts-plugin-api/global.d.ts +1 -0
  16. package/types/uni/uts-plugin-api/index.d.ts +1 -0
  17. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/global.d.ts +32 -0
  18. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/index.d.ts +15 -0
  19. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +405 -0
  20. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +105 -104
  21. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/global.d.ts +2 -0
  22. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/index.d.ts +1 -0
  23. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +4 -5
  24. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/global.d.ts +0 -22
  25. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/index.d.ts +0 -11
  26. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +0 -729
  27. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +1 -1
  28. package/types/uni/uts-plugin-biz/lib/uni-crash/utssdk/interface.d.ts +1 -1
  29. package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/interface.d.ts +268 -20
  30. package/types/native/UniSafeArea.d.ts +0 -185
@@ -0,0 +1,405 @@
1
+ /**
2
+ * 错误码
3
+ */
4
+ export type ChooseMediaErrorCode =
5
+ /**
6
+ * 用户取消
7
+ */
8
+ 1101001 |
9
+ /**
10
+ * 未获取权限
11
+ */
12
+ 1101005 |
13
+ /**
14
+ * 图片或视频保存失败
15
+ */
16
+ 1101006 |
17
+ /**
18
+ * 拍照或录像失败
19
+ */
20
+ 1101008;
21
+
22
+ /**
23
+ * 图片或视频操作失败的错误回调
24
+ */
25
+ export interface IChooseMediaError extends IUniError {
26
+ errCode : ChooseMediaErrorCode
27
+ };
28
+ export type ChooseMediaFileType = 'image' | 'video'
29
+ export type ChooseMediaTempFile = {
30
+ /**
31
+ * 选定视频的临时文件路径
32
+ */
33
+ tempFilePath : string,
34
+ /**
35
+ * 文件类型
36
+ */
37
+ fileType : ChooseMediaFileType
38
+ /**
39
+ * 选定视频的数据量大小
40
+ */
41
+ size : number,
42
+ /**
43
+ * 选定视频的时间长度
44
+ */
45
+ duration ?: number | null,
46
+ /**
47
+ * 返回选定视频的长
48
+ */
49
+ height ?: number | null,
50
+ /**
51
+ * 返回选定视频的宽
52
+ */
53
+ width ?: number | null,
54
+ /**
55
+ * 视频缩略图临时文件路径
56
+ */
57
+ thumbTempFilePath ?: string | null
58
+ }
59
+ export type ChooseMediaSuccess = {
60
+ tempFiles : ChooseMediaTempFile[],
61
+ type : 'image' | 'video' | 'mix'
62
+ };
63
+
64
+ export type ChooseMediaFail = IChooseMediaError;
65
+ export type ChooseMediaSuccessCallback = (callback : ChooseMediaSuccess) => void
66
+ export type ChooseMediaFailCallback = (callback : ChooseMediaFail) => void
67
+ export type ChooseMediaCompleteCallback = (callback : any) => void
68
+ export type ChooseMediaPageOrientation = /**
69
+ * 自动
70
+ */
71
+ "auto" |
72
+ /**
73
+ * 竖屏显示
74
+ */
75
+ "portrait" |
76
+ /**
77
+ * 横屏显示
78
+ */
79
+ "landscape"
80
+
81
+ export type ChooseMediaOptions = {
82
+ /**
83
+ * 屏幕方向。默认为page.json中的pageOrientation。
84
+ * @uniPlatform {
85
+ * "app": {
86
+ * "android": {
87
+ * "osVer": "5.0",
88
+ * "uniVer": "4.42",
89
+ * "unixVer": "4.42"
90
+ * },
91
+ * "ios": {
92
+ * "osVer": "12.0",
93
+ * "uniVer": "4.42",
94
+ * "unixVer": "4.42"
95
+ * },
96
+ * "harmony": {
97
+ * "osVer": "3.0",
98
+ * "uniVer": "4.31",
99
+ * "unixVer": "x"
100
+ * }
101
+ * },
102
+ * "mp": {
103
+ * "weixin": {
104
+ * "hostVer": "√",
105
+ * "uniVer": "√",
106
+ * "unixVer": "4.41"
107
+ * },
108
+ * "alipay": {
109
+ * "hostVer": "√",
110
+ * "uniVer": "√",
111
+ * "unixVer": "x"
112
+ * },
113
+ * "baidu": {
114
+ * "hostVer": "√",
115
+ * "uniVer": "√",
116
+ * "unixVer": "x"
117
+ * },
118
+ * "toutiao": {
119
+ * "hostVer": "√",
120
+ * "uniVer": "√",
121
+ * "unixVer": "x"
122
+ * },
123
+ * "lark": {
124
+ * "hostVer": "√",
125
+ * "uniVer": "√",
126
+ * "unixVer": "x"
127
+ * },
128
+ * "qq": {
129
+ * "hostVer": "√",
130
+ * "uniVer": "√",
131
+ * "unixVer": "x"
132
+ * },
133
+ * "kuaishou": {
134
+ * "hostVer": "√",
135
+ * "uniVer": "√",
136
+ * "unixVer": "x"
137
+ * },
138
+ * "jd": {
139
+ * "hostVer": "√",
140
+ * "uniVer": "√",
141
+ * "unixVer": "x"
142
+ * }
143
+ * },
144
+ * "web": {
145
+ * "uniVer": "x",
146
+ * "unixVer": "x"
147
+ * }
148
+ * }
149
+ */
150
+ pageOrientation ?: ChooseMediaPageOrientation | null,
151
+
152
+ /**
153
+ * 最多可以选择的文件个数
154
+ * @defaultValue 9
155
+ */
156
+ count ?: number | null
157
+ /**
158
+ * album 从相册选视频,camera 使用相机拍摄,合法值:'image'、'video'、'mix'
159
+ * @defaultValue ['image', 'video']
160
+ */
161
+ mediaType ?: (string[]) | null,
162
+ /**
163
+ * album 从相册选视频,camera 使用相机拍摄
164
+ * @defaultValue ['album', 'camera']
165
+ */
166
+ sourceType ?: (string[]) | null,
167
+ /**
168
+ * 拍摄视频最长拍摄时间,单位秒。时间范围为 3s 至 30s 之间
169
+ * @defaultValue 10
170
+ * @uniPlatform {
171
+ * "app": {
172
+ * "android": {
173
+ * "osVer": "5.0",
174
+ * "uniVer": "4.42",
175
+ * "unixVer": "4.42"
176
+ * },
177
+ * "ios": {
178
+ * "osVer": "10.0",
179
+ * "uniVer": "4.42",
180
+ * "unixVer": "4.42"
181
+ * },
182
+ * "harmony": {
183
+ * "osVer": "3.0",
184
+ * "uniVer": "4.31",
185
+ * "unixVer": "x"
186
+ * }
187
+ * },
188
+ * "mp": {
189
+ * "weixin": {
190
+ * "hostVer": "√",
191
+ * "uniVer": "√",
192
+ * "unixVer": "4.41"
193
+ * },
194
+ * "alipay": {
195
+ * "hostVer": "√",
196
+ * "uniVer": "√",
197
+ * "unixVer": "x"
198
+ * },
199
+ * "baidu": {
200
+ * "hostVer": "√",
201
+ * "uniVer": "√",
202
+ * "unixVer": "x"
203
+ * },
204
+ * "toutiao": {
205
+ * "hostVer": "√",
206
+ * "uniVer": "√",
207
+ * "unixVer": "x"
208
+ * },
209
+ * "lark": {
210
+ * "hostVer": "√",
211
+ * "uniVer": "√",
212
+ * "unixVer": "x"
213
+ * },
214
+ * "qq": {
215
+ * "hostVer": "√",
216
+ * "uniVer": "√",
217
+ * "unixVer": "x"
218
+ * },
219
+ * "kuaishou": {
220
+ * "hostVer": "√",
221
+ * "uniVer": "√",
222
+ * "unixVer": "x"
223
+ * },
224
+ * "jd": {
225
+ * "hostVer": "√",
226
+ * "uniVer": "√",
227
+ * "unixVer": "x"
228
+ * }
229
+ * },
230
+ * "web": {
231
+ * "uniVer": "x",
232
+ * "unixVer": "x"
233
+ * }
234
+ * }
235
+ */
236
+ maxDuration ?: number | null,
237
+ /**
238
+ * 仅在 sourceType 为 camera 时生效,使用前置或后置摄像头
239
+ *
240
+ * @uniPlatform {
241
+ * "app": {
242
+ * "android": {
243
+ * "osVer": "5.0",
244
+ * "uniVer": "4.42",
245
+ * "unixVer": "4.42"
246
+ * },
247
+ * "ios": {
248
+ * "osVer": "10.0",
249
+ * "uniVer": "4.42",
250
+ * "unixVer": "4.42"
251
+ * },
252
+ * "harmony": {
253
+ * "osVer": "3.0",
254
+ * "uniVer": "4.25",
255
+ * "unixVer": "x"
256
+ * }
257
+ * },
258
+ * "mp": {
259
+ * "weixin": {
260
+ * "hostVer": "√",
261
+ * "uniVer": "√",
262
+ * "unixVer": "4.41"
263
+ * },
264
+ * "alipay": {
265
+ * "hostVer": "√",
266
+ * "uniVer": "√",
267
+ * "unixVer": "x"
268
+ * },
269
+ * "baidu": {
270
+ * "hostVer": "√",
271
+ * "uniVer": "√",
272
+ * "unixVer": "x"
273
+ * },
274
+ * "toutiao": {
275
+ * "hostVer": "√",
276
+ * "uniVer": "√",
277
+ * "unixVer": "x"
278
+ * },
279
+ * "lark": {
280
+ * "hostVer": "√",
281
+ * "uniVer": "√",
282
+ * "unixVer": "x"
283
+ * },
284
+ * "qq": {
285
+ * "hostVer": "√",
286
+ * "uniVer": "√",
287
+ * "unixVer": "x"
288
+ * },
289
+ * "kuaishou": {
290
+ * "hostVer": "√",
291
+ * "uniVer": "√",
292
+ * "unixVer": "x"
293
+ * },
294
+ * "jd": {
295
+ * "hostVer": "√",
296
+ * "uniVer": "√",
297
+ * "unixVer": "x"
298
+ * }
299
+ * },
300
+ * "web": {
301
+ * "uniVer": "x",
302
+ * "unixVer": "x"
303
+ * }
304
+ * }
305
+ */
306
+ camera ?:
307
+ /**
308
+ * 前置摄像头
309
+ */
310
+ 'front' |
311
+ /**
312
+ * 后置摄像头
313
+ */
314
+ 'back' | null,
315
+ /**
316
+ * 接口调用成功,返回视频文件的临时文件路径,详见返回参数说明
317
+ */
318
+ success ?: (ChooseMediaSuccessCallback) | null,
319
+ /**
320
+ * 接口调用失败的回调函数
321
+ */
322
+ fail ?: (ChooseMediaFailCallback) | null,
323
+ /**
324
+ * 接口调用结束的回调函数(调用成功、失败都会执行)
325
+ */
326
+ complete ?: (ChooseMediaCompleteCallback) | null
327
+ };
328
+
329
+ export type ChooseMedia = (options : ChooseMediaOptions) => void;
330
+
331
+ export interface Uni {
332
+ /**
333
+ * 拍摄或从手机相册中选择图片或视频。
334
+ *
335
+ * @tutorial https://uniapp.dcloud.net.cn/api/media/video.html#choosemedia
336
+ * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/media/video.html#choosemedia
337
+ * @uniPlatform {
338
+ * "app": {
339
+ * "android": {
340
+ * "osVer": "x",
341
+ * "uniVer": "x",
342
+ * "unixVer": "x"
343
+ * },
344
+ * "ios": {
345
+ * "osVer": "x",
346
+ * "uniVer": "x",
347
+ * "unixVer": "x"
348
+ * },
349
+ * "harmony": {
350
+ * "osVer": "3.0",
351
+ * "uniVer": "4.31",
352
+ * "unixVer": "x"
353
+ * }
354
+ * },
355
+ * "mp": {
356
+ * "weixin": {
357
+ * "hostVer": "√",
358
+ * "uniVer": "√",
359
+ * "unixVer": "4.41"
360
+ * },
361
+ * "alipay": {
362
+ * "hostVer": "√",
363
+ * "uniVer": "√",
364
+ * "unixVer": "x"
365
+ * },
366
+ * "baidu": {
367
+ * "hostVer": "√",
368
+ * "uniVer": "√",
369
+ * "unixVer": "x"
370
+ * },
371
+ * "toutiao": {
372
+ * "hostVer": "√",
373
+ * "uniVer": "√",
374
+ * "unixVer": "x"
375
+ * },
376
+ * "lark": {
377
+ * "hostVer": "√",
378
+ * "uniVer": "√",
379
+ * "unixVer": "x"
380
+ * },
381
+ * "qq": {
382
+ * "hostVer": "√",
383
+ * "uniVer": "√",
384
+ * "unixVer": "x"
385
+ * },
386
+ * "kuaishou": {
387
+ * "hostVer": "√",
388
+ * "uniVer": "√",
389
+ * "unixVer": "x"
390
+ * },
391
+ * "jd": {
392
+ * "hostVer": "√",
393
+ * "uniVer": "√",
394
+ * "unixVer": "x"
395
+ * }
396
+ * },
397
+ * "web": {
398
+ * "uniVer": "x",
399
+ * "unixVer": "x"
400
+ * }
401
+ * }
402
+ */
403
+ chooseMedia: ChooseMedia;
404
+
405
+ }