@tarojs/taro 3.7.0-alpha.8 → 3.7.0-beta.1
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/package.json +4 -4
- package/types/api/ad/index.d.ts +6 -18
- package/types/api/ai/inference.d.ts +4 -8
- package/types/api/media/audio.d.ts +50 -30
- package/types/api/network/download.d.ts +2 -10
- package/types/api/network/upload.d.ts +2 -10
- package/types/api/route/index.d.ts +2 -0
- package/types/compile/config/index.d.ts +0 -1
- package/types/compile/config/harmony.d.ts +0 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "3.7.0-
|
|
3
|
+
"version": "3.7.0-beta.1",
|
|
4
4
|
"description": "Taro framework",
|
|
5
5
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "3.7.0-
|
|
25
|
-
"@tarojs/runtime": "3.7.0-
|
|
24
|
+
"@tarojs/api": "3.7.0-beta.1",
|
|
25
|
+
"@tarojs/runtime": "3.7.0-beta.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tarojs/helper": "3.7.0-
|
|
28
|
+
"@tarojs/helper": "3.7.0-beta.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
31
31
|
"@types/react": {
|
package/types/api/ad/index.d.ts
CHANGED
|
@@ -41,17 +41,17 @@ declare module '../../index' {
|
|
|
41
41
|
* @supported weapp
|
|
42
42
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/InterstitialAd.offClose.html
|
|
43
43
|
*/
|
|
44
|
-
offClose(callback: InterstitialAd.
|
|
44
|
+
offClose(callback: InterstitialAd.OnCloseCallback): void
|
|
45
45
|
/** 取消监听插屏错误事件
|
|
46
46
|
* @supported weapp
|
|
47
47
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/InterstitialAd.offError.html
|
|
48
48
|
*/
|
|
49
|
-
offError(callback: InterstitialAd.
|
|
49
|
+
offError(callback: InterstitialAd.OnErrorCallback): void
|
|
50
50
|
/** 取消监听插屏广告加载事件
|
|
51
51
|
* @supported weapp
|
|
52
52
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/InterstitialAd.offLoad.html
|
|
53
53
|
*/
|
|
54
|
-
offLoad(callback: InterstitialAd.
|
|
54
|
+
offLoad(callback: InterstitialAd.OnLoadCallback): void
|
|
55
55
|
/** 监听插屏广告关闭事件。
|
|
56
56
|
* @supported weapp
|
|
57
57
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/InterstitialAd.onClose.html
|
|
@@ -91,12 +91,6 @@ declare module '../../index' {
|
|
|
91
91
|
show(): Promise<any>
|
|
92
92
|
}
|
|
93
93
|
namespace InterstitialAd {
|
|
94
|
-
/** 插屏广告关闭事件的回调函数 */
|
|
95
|
-
type OffCloseCallback = (res: TaroGeneral.CallbackResult) => void
|
|
96
|
-
/** 插屏错误事件的回调函数 */
|
|
97
|
-
type OffErrorCallback = (res: TaroGeneral.CallbackResult) => void
|
|
98
|
-
/** 插屏广告加载事件的回调函数 */
|
|
99
|
-
type OffLoadCallback = (res: TaroGeneral.CallbackResult) => void
|
|
100
94
|
/** 插屏广告关闭事件的回调函数 */
|
|
101
95
|
type OnCloseCallback = (res: TaroGeneral.CallbackResult) => void
|
|
102
96
|
/** 插屏错误事件的回调函数 */
|
|
@@ -137,17 +131,17 @@ declare module '../../index' {
|
|
|
137
131
|
* @supported weapp
|
|
138
132
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/RewardedVideoAd.offClose.html
|
|
139
133
|
*/
|
|
140
|
-
offClose(callback: RewardedVideoAd.
|
|
134
|
+
offClose(callback: RewardedVideoAd.OnCloseCallback): void
|
|
141
135
|
/** 取消监听激励视频错误事件
|
|
142
136
|
* @supported weapp
|
|
143
137
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/RewardedVideoAd.offError.html
|
|
144
138
|
*/
|
|
145
|
-
offError(callback: RewardedVideoAd.
|
|
139
|
+
offError(callback: RewardedVideoAd.OnErrorCallback): void
|
|
146
140
|
/** 取消监听激励视频广告加载事件
|
|
147
141
|
* @supported weapp
|
|
148
142
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/RewardedVideoAd.offLoad.html
|
|
149
143
|
*/
|
|
150
|
-
offLoad(callback: RewardedVideoAd.
|
|
144
|
+
offLoad(callback: RewardedVideoAd.OnLoadCallback): void
|
|
151
145
|
/** 监听用户点击 `关闭广告` 按钮的事件。
|
|
152
146
|
* @supported weapp
|
|
153
147
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ad/RewardedVideoAd.onClose.html
|
|
@@ -179,12 +173,6 @@ declare module '../../index' {
|
|
|
179
173
|
isEnded: boolean
|
|
180
174
|
}
|
|
181
175
|
/** 用户点击 `关闭广告` 按钮的事件的回调函数 */
|
|
182
|
-
type OffCloseCallback = (res: TaroGeneral.CallbackResult) => void
|
|
183
|
-
/** 激励视频错误事件的回调函数 */
|
|
184
|
-
type OffErrorCallback = (res: TaroGeneral.CallbackResult) => void
|
|
185
|
-
/** 激励视频广告加载事件的回调函数 */
|
|
186
|
-
type OffLoadCallback = (res: TaroGeneral.CallbackResult) => void
|
|
187
|
-
/** 用户点击 `关闭广告` 按钮的事件的回调函数 */
|
|
188
176
|
type OnCloseCallback = (result: OnCloseCallbackResult) => void
|
|
189
177
|
/** 激励视频错误事件的回调函数 */
|
|
190
178
|
type OnErrorCallback = (result: OnErrorCallbackResult) => void
|
|
@@ -57,17 +57,17 @@ declare module '../../index' {
|
|
|
57
57
|
* @supported weapp
|
|
58
58
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/inference/InferenceSession.offError.html
|
|
59
59
|
*/
|
|
60
|
-
offError(callback?: InferenceSession.
|
|
60
|
+
offError(callback?: InferenceSession.OnErrorCallback): void
|
|
61
61
|
/** 取消监听模型加载完成事件
|
|
62
62
|
* @supported weapp
|
|
63
63
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/inference/InferenceSession.offLoad.html
|
|
64
64
|
*/
|
|
65
|
-
offLoad(callback?: InferenceSession.
|
|
65
|
+
offLoad(callback?: InferenceSession.OnLoadCallback): void
|
|
66
66
|
/** 监听模型加载失败事件
|
|
67
67
|
* @supported weapp
|
|
68
68
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/inference/InferenceSession.onError.html
|
|
69
69
|
*/
|
|
70
|
-
onError(callback: InferenceSession.
|
|
70
|
+
onError(callback: InferenceSession.OnErrorCallback): void
|
|
71
71
|
/** 监听模型加载完成事件
|
|
72
72
|
* @supported weapp
|
|
73
73
|
* @see https://developers.weixin.qq.com/miniprogram/dev/api/ai/inference/InferenceSession.onLoad.html
|
|
@@ -103,12 +103,8 @@ declare module '../../index' {
|
|
|
103
103
|
[key: string]: Tensor
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
/** 模型加载失败回调函数。*/
|
|
107
|
-
type OffErrorCallback = (res: TaroGeneral.CallbackResult) => void
|
|
108
|
-
/** 模型加载完成回调函数 */
|
|
109
|
-
type OffLoadCallback = (res: TaroGeneral.CallbackResult) => void
|
|
110
106
|
/** 模型加载失败回调函数 */
|
|
111
|
-
type
|
|
107
|
+
type OnErrorCallback = (res: TaroGeneral.CallbackResult) => void
|
|
112
108
|
/** 模型加载完成回调函数 */
|
|
113
109
|
type OnLoadCallback = (res: TaroGeneral.CallbackResult) => void
|
|
114
110
|
}
|
|
@@ -292,83 +292,83 @@ declare module '../../index' {
|
|
|
292
292
|
/** 音频进入可以播放状态,但不保证后面可以流畅播放
|
|
293
293
|
* @supported weapp, h5, rn
|
|
294
294
|
*/
|
|
295
|
-
onCanplay(callback?:
|
|
295
|
+
onCanplay(callback?: InnerAudioContext.OnCanplayCallback): void
|
|
296
296
|
/** 音频播放事件
|
|
297
297
|
* @supported weapp, h5, rn
|
|
298
298
|
*/
|
|
299
|
-
onPlay(callback?:
|
|
299
|
+
onPlay(callback?: InnerAudioContext.OnPlayCallback): void
|
|
300
300
|
/** 音频暂停事件
|
|
301
301
|
* @supported weapp, h5, rn
|
|
302
302
|
*/
|
|
303
|
-
onPause(callback?:
|
|
303
|
+
onPause(callback?: InnerAudioContext.OnPauseCallback): void
|
|
304
304
|
/** 音频停止事件
|
|
305
305
|
* @supported weapp, h5, rn
|
|
306
306
|
*/
|
|
307
|
-
onStop(callback?:
|
|
307
|
+
onStop(callback?: InnerAudioContext.OnStopCallback): void
|
|
308
308
|
/** 音频自然播放结束事件
|
|
309
309
|
* @supported weapp, h5, rn
|
|
310
310
|
*/
|
|
311
|
-
onEnded(callback?:
|
|
311
|
+
onEnded(callback?: InnerAudioContext.OnEndedCallback): void
|
|
312
312
|
/** 音频播放进度更新事件
|
|
313
313
|
* @supported weapp, h5, rn
|
|
314
314
|
*/
|
|
315
|
-
onTimeUpdate(callback?:
|
|
315
|
+
onTimeUpdate(callback?: InnerAudioContext.OnTimeUpdateCallback): void
|
|
316
316
|
/** 音频播放错误事件
|
|
317
317
|
* @supported weapp, h5, rn
|
|
318
318
|
*/
|
|
319
|
-
onError(callback?:
|
|
319
|
+
onError(callback?: InnerAudioContext.OnErrorCallback): void
|
|
320
320
|
/** 音频加载中事件,当音频因为数据不足,需要停下来加载时会触发
|
|
321
321
|
* @supported weapp, h5, rn
|
|
322
322
|
*/
|
|
323
|
-
onWaiting(callback?:
|
|
323
|
+
onWaiting(callback?: InnerAudioContext.OnWaitingCallback): void
|
|
324
324
|
/** 音频进行 seek 操作事件
|
|
325
325
|
* @supported weapp, h5, rn
|
|
326
326
|
*/
|
|
327
|
-
onSeeking(callback?:
|
|
327
|
+
onSeeking(callback?: InnerAudioContext.OnSeekingCallback): void
|
|
328
328
|
/** 音频完成 seek 操作事件
|
|
329
329
|
* @supported weapp, h5, rn
|
|
330
330
|
*/
|
|
331
|
-
onSeeked(callback?:
|
|
332
|
-
/** 取消监听
|
|
331
|
+
onSeeked(callback?: InnerAudioContext.OnSeekedCallback): void
|
|
332
|
+
/** 取消监听 canplay 事件
|
|
333
333
|
* @supported weapp, h5, rn
|
|
334
334
|
*/
|
|
335
|
-
offCanplay(callback?:
|
|
336
|
-
/** 取消监听
|
|
335
|
+
offCanplay(callback?: InnerAudioContext.OnCanplayCallback): void
|
|
336
|
+
/** 取消监听 play 事件
|
|
337
337
|
* @supported weapp, h5, rn
|
|
338
338
|
*/
|
|
339
|
-
offPlay(callback?:
|
|
340
|
-
/** 取消监听
|
|
339
|
+
offPlay(callback?: InnerAudioContext.OnPlayCallback): void
|
|
340
|
+
/** 取消监听 pause 事件
|
|
341
341
|
* @supported weapp, h5, rn
|
|
342
342
|
*/
|
|
343
|
-
offPause(callback?:
|
|
344
|
-
/** 取消监听
|
|
343
|
+
offPause(callback?: InnerAudioContext.OnPauseCallback): void
|
|
344
|
+
/** 取消监听 stop 事件
|
|
345
345
|
* @supported weapp, h5, rn
|
|
346
346
|
*/
|
|
347
|
-
offStop(callback?:
|
|
348
|
-
/** 取消监听
|
|
347
|
+
offStop(callback?: InnerAudioContext.OnStopCallback): void
|
|
348
|
+
/** 取消监听 ended 事件
|
|
349
349
|
* @supported weapp, h5, rn
|
|
350
350
|
*/
|
|
351
|
-
offEnded(callback?:
|
|
352
|
-
/** 取消监听
|
|
351
|
+
offEnded(callback?: InnerAudioContext.OnEndedCallback): void
|
|
352
|
+
/** 取消监听 timeUpdate 事件
|
|
353
353
|
* @supported weapp, h5, rn
|
|
354
354
|
*/
|
|
355
|
-
offTimeUpdate(callback?:
|
|
356
|
-
/** 取消监听
|
|
355
|
+
offTimeUpdate(callback?: InnerAudioContext.OnTimeUpdateCallback): void
|
|
356
|
+
/** 取消监听 error 事件
|
|
357
357
|
* @supported weapp, h5, rn
|
|
358
358
|
*/
|
|
359
|
-
offError(callback?:
|
|
360
|
-
/** 取消监听
|
|
359
|
+
offError(callback?: InnerAudioContext.OnErrorCallback): void
|
|
360
|
+
/** 取消监听 waiting 事件
|
|
361
361
|
* @supported weapp, h5, rn
|
|
362
362
|
*/
|
|
363
|
-
offWaiting(callback?:
|
|
364
|
-
/** 取消监听
|
|
363
|
+
offWaiting(callback?: InnerAudioContext.OnWaitingCallback): void
|
|
364
|
+
/** 取消监听 seeking 事件
|
|
365
365
|
* @supported weapp, h5, rn
|
|
366
366
|
*/
|
|
367
|
-
offSeeking(callback?:
|
|
368
|
-
/** 取消监听
|
|
367
|
+
offSeeking(callback?: InnerAudioContext.OnSeekingCallback): void
|
|
368
|
+
/** 取消监听 seeked 事件
|
|
369
369
|
* @supported weapp, h5, rn
|
|
370
370
|
*/
|
|
371
|
-
offSeeked(callback?:
|
|
371
|
+
offSeeked(callback?: InnerAudioContext.OnSeekedCallback): void
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
namespace InnerAudioContext {
|
|
@@ -391,6 +391,26 @@ declare module '../../index' {
|
|
|
391
391
|
/** 未知错误 */
|
|
392
392
|
'-1'
|
|
393
393
|
}
|
|
394
|
+
/** 音频进入可以播放状态事件的回调函数 */
|
|
395
|
+
type OnCanplayCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
396
|
+
/** 音频播放事件的回调函数 */
|
|
397
|
+
type OnPlayCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
398
|
+
/** 音频暂停事件的回调函数 */
|
|
399
|
+
type OnPauseCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
400
|
+
/** 音频停止事件的回调函数 */
|
|
401
|
+
type OnStopCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
402
|
+
/** 音频自然播放结束事件的回调函数 */
|
|
403
|
+
type OnEndedCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
404
|
+
/** 音频播放进度更新事件的回调函数 */
|
|
405
|
+
type OnTimeUpdateCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
406
|
+
/** 音频播放错误事件的回调函数 */
|
|
407
|
+
type OnErrorCallback = (res: onErrorDetail) => void
|
|
408
|
+
/** 音频加载中事件的回调函数 */
|
|
409
|
+
type OnWaitingCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
410
|
+
/** 音频进行 seek 操作事件的回调函数 */
|
|
411
|
+
type OnSeekingCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
412
|
+
/** 音频完成 seek 操作事件的回调函数 */
|
|
413
|
+
type OnSeekedCallback = (res: Partial<TaroGeneral.CallbackResult>) => void
|
|
394
414
|
}
|
|
395
415
|
|
|
396
416
|
/** MediaAudioPlayer 实例,可通过 [Taro.createMediaAudioPlayer](./createMediaAudioPlayer) 接口获取实例。
|
|
@@ -57,14 +57,6 @@ declare module '../../index' {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
namespace DownloadTask {
|
|
60
|
-
/** HTTP Response Header 事件的回调函数 */
|
|
61
|
-
type OffHeadersReceivedCallback = (
|
|
62
|
-
res: TaroGeneral.CallbackResult,
|
|
63
|
-
) => void
|
|
64
|
-
/** 下载进度变化事件的回调函数 */
|
|
65
|
-
type OffProgressUpdateCallback = (
|
|
66
|
-
res: TaroGeneral.CallbackResult,
|
|
67
|
-
) => void
|
|
68
60
|
/** HTTP Response Header 事件的回调函数 */
|
|
69
61
|
type OnHeadersReceivedCallback = (
|
|
70
62
|
result: OnHeadersReceivedCallbackResult,
|
|
@@ -135,7 +127,7 @@ declare module '../../index' {
|
|
|
135
127
|
*/
|
|
136
128
|
offProgressUpdate(
|
|
137
129
|
/** 下载进度变化事件的回调函数 */
|
|
138
|
-
callback: DownloadTask.
|
|
130
|
+
callback: DownloadTask.OnProgressUpdateCallback,
|
|
139
131
|
): void
|
|
140
132
|
/** 监听 HTTP Response Header 事件。会比请求完成事件更早
|
|
141
133
|
* @supported weapp, h5
|
|
@@ -151,7 +143,7 @@ declare module '../../index' {
|
|
|
151
143
|
*/
|
|
152
144
|
offHeadersReceived(
|
|
153
145
|
/** HTTP Response Header 事件的回调函数 */
|
|
154
|
-
callback: DownloadTask.
|
|
146
|
+
callback: DownloadTask.OnHeadersReceivedCallback,
|
|
155
147
|
): void
|
|
156
148
|
}
|
|
157
149
|
|
|
@@ -56,14 +56,6 @@ declare module '../../index' {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
namespace UploadTask {
|
|
59
|
-
/** HTTP Response Header 事件的回调函数 */
|
|
60
|
-
type OffHeadersReceivedCallback = (
|
|
61
|
-
res: TaroGeneral.CallbackResult,
|
|
62
|
-
) => void
|
|
63
|
-
/** 上传进度变化事件的回调函数 */
|
|
64
|
-
type OffProgressUpdateCallback = (
|
|
65
|
-
res: TaroGeneral.CallbackResult,
|
|
66
|
-
) => void
|
|
67
59
|
/** HTTP Response Header 事件的回调函数 */
|
|
68
60
|
type OnHeadersReceivedCallback = (
|
|
69
61
|
result: OnHeadersReceivedCallbackResult,
|
|
@@ -138,7 +130,7 @@ declare module '../../index' {
|
|
|
138
130
|
*/
|
|
139
131
|
offProgressUpdate(
|
|
140
132
|
/** 上传进度变化事件的回调函数 */
|
|
141
|
-
callback: UploadTask.
|
|
133
|
+
callback: UploadTask.OnProgressUpdateCallback,
|
|
142
134
|
): void
|
|
143
135
|
/** 监听 HTTP Response Header 事件。会比请求完成事件更早
|
|
144
136
|
* @supported weapp, h5
|
|
@@ -154,7 +146,7 @@ declare module '../../index' {
|
|
|
154
146
|
*/
|
|
155
147
|
offHeadersReceived(
|
|
156
148
|
/** HTTP Response Header 事件的回调函数 */
|
|
157
|
-
callback: UploadTask.
|
|
149
|
+
callback: UploadTask.OnHeadersReceivedCallback,
|
|
158
150
|
): void
|
|
159
151
|
}
|
|
160
152
|
|
|
@@ -156,6 +156,7 @@ declare module '../../index' {
|
|
|
156
156
|
|
|
157
157
|
/** 关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面。
|
|
158
158
|
* @supported weapp, h5, rn, tt
|
|
159
|
+
* @h5 未针对 tabbar 页面做限制处理
|
|
159
160
|
* @example
|
|
160
161
|
* ```tsx
|
|
161
162
|
* Taro.redirectTo({
|
|
@@ -168,6 +169,7 @@ declare module '../../index' {
|
|
|
168
169
|
|
|
169
170
|
/** 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 Taro.navigateBack 可以返回到原页面。小程序中页面栈最多十层。
|
|
170
171
|
* @supported weapp, h5, rn, tt
|
|
172
|
+
* @h5 未针对 tabbar 页面做限制处理
|
|
171
173
|
* @example
|
|
172
174
|
* ```tsx
|
|
173
175
|
* Taro.navigateTo({
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface IHarmonyConfig {
|
|
2
|
-
/** Harmony 项目地址 */
|
|
3
|
-
projectPath: string
|
|
4
|
-
|
|
5
|
-
/** hap 名
|
|
6
|
-
* @default "entry"
|
|
7
|
-
*/
|
|
8
|
-
hapName?: string
|
|
9
|
-
|
|
10
|
-
/** 应用名称
|
|
11
|
-
* @default "default"
|
|
12
|
-
*/
|
|
13
|
-
name?: string
|
|
14
|
-
|
|
15
|
-
/** 用于告诉 Taro 编译器需要抽取的公共文件 */
|
|
16
|
-
commonChunks?: string[] | ((commonChunks: string[]) => string[])
|
|
17
|
-
|
|
18
|
-
/** Harmony 编译过程的相关配置 */
|
|
19
|
-
compile?: {
|
|
20
|
-
exclude?: any[]
|
|
21
|
-
include?: any[]
|
|
22
|
-
}
|
|
23
|
-
}
|