@tarojs/taro 3.8.0-canary.0 → 4.0.0-beta.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/html.css +9 -0
- package/package.json +11 -4
- package/types/api/ad/index.d.ts +6 -18
- package/types/api/ai/inference.d.ts +4 -8
- package/types/api/ai/visionkit.d.ts +625 -54
- package/types/api/base/performance.d.ts +5 -5
- package/types/api/base/system.d.ts +2 -2
- package/types/api/base/weapp/app-event.d.ts +4 -4
- package/types/api/canvas/index.d.ts +67 -54
- package/types/api/data-analysis/index.d.ts +51 -1
- package/types/api/device/accelerometer.d.ts +8 -6
- package/types/api/device/accessibility.d.ts +1 -1
- package/types/api/device/battery.d.ts +3 -3
- package/types/api/device/bluetooth-ble.d.ts +40 -17
- package/types/api/device/bluetooth-peripheral.d.ts +26 -26
- package/types/api/device/bluetooth.d.ts +37 -13
- package/types/api/device/calendar.d.ts +11 -1
- package/types/api/device/clipboard.d.ts +17 -17
- package/types/api/device/compass.d.ts +5 -5
- package/types/api/device/gyroscope.d.ts +4 -4
- package/types/api/device/iBeacon.d.ts +10 -8
- package/types/api/device/keyboard.d.ts +7 -5
- package/types/api/device/memory.d.ts +3 -4
- package/types/api/device/motion.d.ts +8 -6
- package/types/api/device/network.d.ts +12 -6
- package/types/api/device/nfc.d.ts +13 -13
- package/types/api/device/phone.d.ts +1 -1
- package/types/api/device/scan.d.ts +5 -3
- package/types/api/device/screen.d.ts +28 -12
- package/types/api/device/sms.d.ts +1 -1
- package/types/api/device/vibrate.d.ts +5 -5
- package/types/api/device/wifi.d.ts +25 -13
- package/types/api/files/index.d.ts +71 -41
- package/types/api/location/index.d.ts +166 -18
- package/types/api/media/audio.d.ts +50 -30
- package/types/api/media/camera.d.ts +6 -3
- package/types/api/media/image.d.ts +1 -1
- package/types/api/navigate/index.d.ts +2 -0
- package/types/api/network/download.d.ts +2 -10
- package/types/api/network/request.d.ts +1 -1
- package/types/api/network/upload.d.ts +2 -10
- package/types/api/open-api/device-voip.d.ts +2 -2
- package/types/api/open-api/login.d.ts +1 -1
- package/types/api/open-api/my-miniprogram.d.ts +2 -2
- package/types/api/open-api/privacy.d.ts +99 -0
- package/types/api/route/index.d.ts +8 -5
- package/types/api/skyline/index.d.ts +59 -0
- package/types/api/storage/background-fetch.d.ts +63 -11
- package/types/api/storage/cache-manager.d.ts +61 -10
- package/types/api/storage/index.d.ts +125 -10
- package/types/api/taro.extend.d.ts +9 -3
- package/types/api/ui/animation.d.ts +1 -1
- package/types/api/ui/fonts.d.ts +4 -3
- package/types/api/ui/interaction.d.ts +4 -4
- package/types/api/ui/navigation-bar.d.ts +5 -5
- package/types/api/ui/pull-down-refresh.d.ts +2 -2
- package/types/api/ui/scroll.d.ts +1 -1
- package/types/api/ui/tab-bar.d.ts +7 -7
- package/types/api/wxml/index.d.ts +4 -4
- package/types/compile/compiler.d.ts +7 -4
- package/types/compile/config/h5.d.ts +23 -10
- package/types/compile/config/harmony.d.ts +77 -0
- package/types/compile/config/index.d.ts +1 -0
- package/types/compile/config/mini.d.ts +58 -30
- package/types/compile/config/plugin.d.ts +34 -0
- package/types/compile/config/project.d.ts +26 -13
- package/types/compile/config/util.d.ts +22 -8
- package/types/compile/viteCompilerContext.d.ts +149 -0
- package/types/global.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/types/taro.api.d.ts +3 -0
- package/types/taro.component.d.ts +2 -1
- package/types/taro.config.d.ts +41 -4
package/html.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/taro",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
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,12 @@
|
|
|
21
21
|
"author": "O2Team",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tarojs/api": "
|
|
25
|
-
"@tarojs/runtime": "
|
|
24
|
+
"@tarojs/api": "4.0.0-beta.0",
|
|
25
|
+
"@tarojs/runtime": "4.0.0-beta.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@tarojs/helper": "
|
|
28
|
+
"@tarojs/helper": "4.0.0-beta.0",
|
|
29
|
+
"@tarojs/shared": "4.0.0-beta.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependenciesMeta": {
|
|
31
32
|
"@types/react": {
|
|
@@ -37,11 +38,17 @@
|
|
|
37
38
|
"@types/webpack-dev-server": {
|
|
38
39
|
"optional": true
|
|
39
40
|
},
|
|
41
|
+
"@types/postcss-url": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
40
44
|
"postcss": {
|
|
41
45
|
"optional": true
|
|
42
46
|
},
|
|
43
47
|
"vue": {
|
|
44
48
|
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"rollup": {
|
|
51
|
+
"optional": true
|
|
45
52
|
}
|
|
46
53
|
},
|
|
47
54
|
"scripts": {
|
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
|
}
|