@tarojs/taro-h5 3.5.0-theta.0 → 3.5.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.
Files changed (289) hide show
  1. package/dist/api/ad/index.d.ts +6 -0
  2. package/dist/api/ai/facial.d.ts +9 -0
  3. package/dist/api/ai/index.d.ts +2 -0
  4. package/dist/api/ai/visual.d.ts +6 -0
  5. package/dist/api/alipay/index.d.ts +3 -0
  6. package/dist/api/base/crypto.d.ts +3 -0
  7. package/dist/api/base/debug.d.ts +9 -0
  8. package/dist/api/base/index.d.ts +12 -0
  9. package/dist/api/base/performance.d.ts +6 -0
  10. package/dist/api/base/system.d.ts +27 -0
  11. package/dist/api/base/system.js +2 -2
  12. package/dist/api/base/update.d.ts +6 -0
  13. package/dist/api/base/weapp/app-event.d.ts +41 -0
  14. package/dist/api/base/weapp/life-cycle.d.ts +6 -0
  15. package/dist/api/canvas/CanvasContext.d.ts +104 -0
  16. package/dist/api/canvas/canvasGetImageData.d.ts +5 -0
  17. package/dist/api/canvas/canvasPutImageData.d.ts +6 -0
  18. package/dist/api/canvas/canvasToTempFilePath.d.ts +6 -0
  19. package/dist/api/canvas/canvasToTempFilePath.js +1 -1
  20. package/dist/api/canvas/createCanvasContext.d.ts +5 -0
  21. package/dist/api/canvas/index.d.ts +12 -0
  22. package/dist/api/cloud/index.d.ts +31 -0
  23. package/dist/api/data-analysis/index.d.ts +12 -0
  24. package/dist/api/device/accelerometer.d.ts +17 -0
  25. package/dist/api/device/accessibility.d.ts +3 -0
  26. package/dist/api/device/battery.d.ts +5 -0
  27. package/dist/api/device/bluetooth-ble.d.ts +48 -0
  28. package/dist/api/device/bluetooth-peripheral.d.ts +9 -0
  29. package/dist/api/device/bluetooth.d.ts +39 -0
  30. package/dist/api/device/calendar.d.ts +6 -0
  31. package/dist/api/device/clipboard.d.ts +15 -0
  32. package/dist/api/device/compass.d.ts +17 -0
  33. package/dist/api/device/contact.d.ts +6 -0
  34. package/dist/api/device/crypto.d.ts +3 -0
  35. package/dist/api/device/gyroscope.d.ts +12 -0
  36. package/dist/api/device/iBeacon.d.ts +21 -0
  37. package/dist/api/device/index.d.ts +23 -0
  38. package/dist/api/device/keyboard.d.ts +12 -0
  39. package/dist/api/device/memory.d.ts +6 -0
  40. package/dist/api/device/motion.d.ts +17 -0
  41. package/dist/api/device/network.d.ts +20 -0
  42. package/dist/api/device/nfc.d.ts +21 -0
  43. package/dist/api/device/phone.d.ts +2 -0
  44. package/dist/api/device/scan.d.ts +3 -0
  45. package/dist/api/device/screen.d.ts +18 -0
  46. package/dist/api/device/vibrate.d.ts +9 -0
  47. package/dist/api/device/vibrate.js +5 -7
  48. package/dist/api/device/wifi.d.ts +33 -0
  49. package/dist/api/ext/index.d.ts +6 -0
  50. package/dist/api/files/index.d.ts +24 -0
  51. package/dist/api/framework/index.d.ts +4 -0
  52. package/dist/api/index.d.ts +24 -0
  53. package/dist/api/location/chooseLocation.d.ts +6 -0
  54. package/dist/api/location/getLocation.d.ts +2 -0
  55. package/dist/api/location/index.d.ts +32 -0
  56. package/dist/api/location/index.js +1 -0
  57. package/dist/api/media/EditorContext.d.ts +42 -0
  58. package/dist/api/media/audio/InnerAudioContext.d.ts +58 -0
  59. package/dist/api/media/audio/index.d.ts +29 -0
  60. package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +71 -0
  61. package/dist/api/media/background-audio/index.d.ts +29 -0
  62. package/dist/api/media/camera.d.ts +3 -0
  63. package/dist/api/media/image/chooseImage.d.ts +5 -0
  64. package/dist/api/media/image/getImageInfo.d.ts +5 -0
  65. package/dist/api/media/image/index.d.ts +15 -0
  66. package/dist/api/media/image/previewImage.d.ts +8 -0
  67. package/dist/api/media/index.d.ts +12 -0
  68. package/dist/api/media/live.d.ts +6 -0
  69. package/dist/api/media/map.d.ts +3 -0
  70. package/dist/api/media/media-recorder.d.ts +3 -0
  71. package/dist/api/media/recorder.d.ts +9 -0
  72. package/dist/api/media/video/index.d.ts +24 -0
  73. package/dist/api/media/video-decoder.d.ts +3 -0
  74. package/dist/api/media/video-processing.d.ts +3 -0
  75. package/dist/api/media/voip.d.ts +42 -0
  76. package/dist/api/navigate/index.d.ts +12 -0
  77. package/dist/api/network/download.d.ts +6 -0
  78. package/dist/api/network/index.d.ts +7 -0
  79. package/dist/api/network/mdns.d.ts +30 -0
  80. package/dist/api/network/request/index.d.ts +4 -0
  81. package/dist/api/network/tcp.d.ts +3 -0
  82. package/dist/api/network/udp.d.ts +3 -0
  83. package/dist/api/network/upload.d.ts +5 -0
  84. package/{src/api/network/utils.ts → dist/api/network/utils.d.ts} +44 -72
  85. package/dist/api/network/websocket/index.d.ts +7 -0
  86. package/dist/api/network/websocket/socketTask.d.ts +25 -0
  87. package/dist/api/open-api/account.d.ts +3 -0
  88. package/dist/api/open-api/address.d.ts +3 -0
  89. package/dist/api/open-api/authorize.d.ts +6 -0
  90. package/dist/api/open-api/card.d.ts +6 -0
  91. package/dist/api/open-api/channels-live.d.ts +18 -0
  92. package/dist/api/open-api/customer-service.d.ts +3 -0
  93. package/dist/api/open-api/facial.d.ts +12 -0
  94. package/dist/api/open-api/favorites.d.ts +6 -0
  95. package/dist/api/open-api/group.d.ts +3 -0
  96. package/dist/api/open-api/index.d.ts +18 -0
  97. package/dist/api/open-api/invoice.d.ts +6 -0
  98. package/dist/api/open-api/license-plate.d.ts +3 -0
  99. package/dist/api/open-api/login.d.ts +9 -0
  100. package/dist/api/open-api/red-package.d.ts +3 -0
  101. package/dist/api/open-api/settings.d.ts +6 -0
  102. package/dist/api/open-api/soter.d.ts +9 -0
  103. package/dist/api/open-api/subscribe-message.d.ts +3 -0
  104. package/dist/api/open-api/user-info.d.ts +6 -0
  105. package/dist/api/open-api/werun.d.ts +6 -0
  106. package/dist/api/payment/index.d.ts +6 -0
  107. package/dist/api/route/index.d.ts +1 -0
  108. package/dist/api/share/index.d.ts +30 -0
  109. package/dist/api/storage/background-fetch.d.ts +12 -0
  110. package/dist/api/storage/index.d.ts +18 -0
  111. package/dist/api/swan/index.d.ts +63 -0
  112. package/dist/api/taro.d.ts +12 -0
  113. package/dist/api/ui/animation/index.d.ts +2 -0
  114. package/dist/api/ui/background.d.ts +6 -0
  115. package/dist/api/ui/custom-component.d.ts +1 -0
  116. package/dist/api/ui/fonts.d.ts +2 -0
  117. package/dist/api/ui/index.d.ts +12 -0
  118. package/dist/api/ui/interaction/actionSheet.d.ts +61 -0
  119. package/dist/api/ui/interaction/index.d.ts +14 -0
  120. package/dist/api/ui/interaction/modal.d.ts +69 -0
  121. package/dist/api/ui/interaction/modal.js +1 -0
  122. package/dist/api/ui/interaction/toast.d.ts +85 -0
  123. package/dist/api/ui/menu.d.ts +3 -0
  124. package/dist/api/ui/navigation-bar/index.d.ts +15 -0
  125. package/dist/api/ui/navigation-bar/index.js +2 -3
  126. package/dist/api/ui/pull-down-refresh.d.ts +9 -0
  127. package/dist/api/ui/scroll/index.d.ts +5 -0
  128. package/dist/api/ui/scroll/index.js +5 -5
  129. package/dist/api/ui/sticky.d.ts +3 -0
  130. package/dist/api/ui/tab-bar.d.ts +34 -0
  131. package/dist/api/ui/window.d.ts +15 -0
  132. package/dist/api/worker/index.d.ts +3 -0
  133. package/dist/api/wxml/index.d.ts +5 -0
  134. package/dist/api/wxml/nodesRef.d.ts +13 -0
  135. package/dist/api/wxml/selectorQuery.d.ts +24 -0
  136. package/dist/api/wxml/selectorQuery.js +1 -1
  137. package/dist/index.cjs.d.ts +1373 -0
  138. package/dist/index.cjs.js +18 -20
  139. package/dist/index.cjs.js.map +1 -1
  140. package/dist/index.d.ts +4 -0
  141. package/dist/index.esm.d.ts +1373 -0
  142. package/dist/index.esm.js +18 -20
  143. package/dist/index.esm.js.map +1 -1
  144. package/dist/taroApis.d.ts +1364 -0
  145. package/dist/taroApis.js +1 -1
  146. package/dist/utils/animation.d.ts +6 -0
  147. package/dist/utils/handler.d.ts +48 -0
  148. package/dist/utils/index.d.ts +39 -0
  149. package/dist/utils/lodash.d.ts +2 -0
  150. package/dist/utils/valid.d.ts +2 -0
  151. package/package.json +17 -18
  152. package/types/api.d.ts +4 -0
  153. package/types/define.d.ts +2 -0
  154. package/types/index.d.ts +33 -0
  155. package/types/overlay.d.ts +9 -0
  156. package/src/api/ad/index.ts +0 -5
  157. package/src/api/ai/facial.ts +0 -6
  158. package/src/api/ai/index.ts +0 -2
  159. package/src/api/ai/visual.ts +0 -7
  160. package/src/api/alipay/index.ts +0 -4
  161. package/src/api/base/crypto.ts +0 -4
  162. package/src/api/base/debug.ts +0 -5
  163. package/src/api/base/index.ts +0 -23
  164. package/src/api/base/performance.ts +0 -5
  165. package/src/api/base/system.ts +0 -207
  166. package/src/api/base/update.ts +0 -5
  167. package/src/api/base/weapp/app-event.ts +0 -79
  168. package/src/api/base/weapp/life-cycle.ts +0 -5
  169. package/src/api/canvas/CanvasContext.ts +0 -233
  170. package/src/api/canvas/canvasGetImageData.ts +0 -28
  171. package/src/api/canvas/canvasPutImageData.ts +0 -25
  172. package/src/api/canvas/canvasToTempFilePath.ts +0 -25
  173. package/src/api/canvas/createCanvasContext.ts +0 -19
  174. package/src/api/canvas/index.ts +0 -18
  175. package/src/api/cloud/index.ts +0 -32
  176. package/src/api/data-analysis/index.ts +0 -6
  177. package/src/api/device/accelerometer.ts +0 -79
  178. package/src/api/device/accessibility.ts +0 -4
  179. package/src/api/device/battery.ts +0 -23
  180. package/src/api/device/bluetooth-ble.ts +0 -19
  181. package/src/api/device/bluetooth-peripheral.ts +0 -6
  182. package/src/api/device/bluetooth.ts +0 -16
  183. package/src/api/device/calendar.ts +0 -5
  184. package/src/api/device/clipboard.ts +0 -68
  185. package/src/api/device/compass.ts +0 -83
  186. package/src/api/device/contact.ts +0 -5
  187. package/src/api/device/crypto.ts +0 -4
  188. package/src/api/device/gyroscope.ts +0 -7
  189. package/src/api/device/iBeacon.ts +0 -10
  190. package/src/api/device/index.ts +0 -23
  191. package/src/api/device/keyboard.ts +0 -7
  192. package/src/api/device/memory.ts +0 -5
  193. package/src/api/device/motion.ts +0 -77
  194. package/src/api/device/network.ts +0 -90
  195. package/src/api/device/nfc.ts +0 -10
  196. package/src/api/device/phone.ts +0 -31
  197. package/src/api/device/scan.ts +0 -11
  198. package/src/api/device/screen.ts +0 -9
  199. package/src/api/device/vibrate.ts +0 -37
  200. package/src/api/device/wifi.ts +0 -14
  201. package/src/api/ext/index.ts +0 -5
  202. package/src/api/files/index.ts +0 -11
  203. package/src/api/framework/index.ts +0 -10
  204. package/src/api/index.ts +0 -24
  205. package/src/api/location/chooseLocation.ts +0 -117
  206. package/src/api/location/getLocation.ts +0 -81
  207. package/src/api/location/index.ts +0 -22
  208. package/src/api/location/style.css +0 -79
  209. package/src/api/media/EditorContext.ts +0 -32
  210. package/src/api/media/audio/InnerAudioContext.ts +0 -99
  211. package/src/api/media/audio/index.ts +0 -21
  212. package/src/api/media/background-audio/BackgroundAudioManager.ts +0 -104
  213. package/src/api/media/background-audio/index.ts +0 -17
  214. package/src/api/media/camera.ts +0 -4
  215. package/src/api/media/image/chooseImage.ts +0 -95
  216. package/src/api/media/image/getImageInfo.ts +0 -50
  217. package/src/api/media/image/index.ts +0 -13
  218. package/src/api/media/image/previewImage.ts +0 -80
  219. package/src/api/media/index.ts +0 -12
  220. package/src/api/media/live.ts +0 -5
  221. package/src/api/media/map.ts +0 -4
  222. package/src/api/media/media-recorder.ts +0 -4
  223. package/src/api/media/recorder.ts +0 -6
  224. package/src/api/media/video/index.ts +0 -82
  225. package/src/api/media/video-decoder.ts +0 -4
  226. package/src/api/media/video-processing.ts +0 -4
  227. package/src/api/media/voip.ts +0 -17
  228. package/src/api/navigate/index.ts +0 -7
  229. package/src/api/network/download.ts +0 -142
  230. package/src/api/network/index.ts +0 -7
  231. package/src/api/network/mdns.ts +0 -13
  232. package/src/api/network/request/index.ts +0 -135
  233. package/src/api/network/tcp.ts +0 -4
  234. package/src/api/network/udp.ts +0 -4
  235. package/src/api/network/upload.ts +0 -170
  236. package/src/api/network/websocket/index.ts +0 -88
  237. package/src/api/network/websocket/socketTask.ts +0 -89
  238. package/src/api/open-api/account.ts +0 -4
  239. package/src/api/open-api/address.ts +0 -4
  240. package/src/api/open-api/authorize.ts +0 -5
  241. package/src/api/open-api/card.ts +0 -5
  242. package/src/api/open-api/channels-live.ts +0 -9
  243. package/src/api/open-api/customer-service.ts +0 -4
  244. package/src/api/open-api/facial.ts +0 -7
  245. package/src/api/open-api/favorites.ts +0 -5
  246. package/src/api/open-api/group.ts +0 -4
  247. package/src/api/open-api/index.ts +0 -18
  248. package/src/api/open-api/invoice.ts +0 -5
  249. package/src/api/open-api/license-plate.ts +0 -4
  250. package/src/api/open-api/login.ts +0 -6
  251. package/src/api/open-api/red-package.ts +0 -4
  252. package/src/api/open-api/settings.ts +0 -5
  253. package/src/api/open-api/soter.ts +0 -6
  254. package/src/api/open-api/subscribe-message.ts +0 -4
  255. package/src/api/open-api/user-info.ts +0 -5
  256. package/src/api/open-api/werun.ts +0 -5
  257. package/src/api/payment/index.ts +0 -5
  258. package/src/api/route/index.ts +0 -10
  259. package/src/api/share/index.ts +0 -13
  260. package/src/api/storage/background-fetch.ts +0 -7
  261. package/src/api/storage/index.ts +0 -182
  262. package/src/api/swan/index.ts +0 -31
  263. package/src/api/taro.ts +0 -84
  264. package/src/api/ui/animation/index.ts +0 -356
  265. package/src/api/ui/background.ts +0 -5
  266. package/src/api/ui/custom-component.ts +0 -4
  267. package/src/api/ui/fonts.ts +0 -64
  268. package/src/api/ui/index.ts +0 -12
  269. package/src/api/ui/interaction/actionSheet.ts +0 -212
  270. package/src/api/ui/interaction/index.ts +0 -302
  271. package/src/api/ui/interaction/modal.ts +0 -237
  272. package/src/api/ui/interaction/toast.ts +0 -220
  273. package/src/api/ui/menu.ts +0 -4
  274. package/src/api/ui/navigation-bar/index.ts +0 -52
  275. package/src/api/ui/pull-down-refresh.ts +0 -28
  276. package/src/api/ui/scroll/index.ts +0 -85
  277. package/src/api/ui/sticky.ts +0 -4
  278. package/src/api/ui/tab-bar.ts +0 -327
  279. package/src/api/ui/window.ts +0 -38
  280. package/src/api/worker/index.ts +0 -4
  281. package/src/api/wxml/index.ts +0 -10
  282. package/src/api/wxml/nodesRef.ts +0 -56
  283. package/src/api/wxml/selectorQuery.ts +0 -220
  284. package/src/index.ts +0 -6
  285. package/src/utils/animation.ts +0 -15
  286. package/src/utils/handler.ts +0 -105
  287. package/src/utils/index.ts +0 -179
  288. package/src/utils/lodash.ts +0 -30
  289. package/src/utils/valid.ts +0 -8
@@ -0,0 +1,17 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 停止监听设备方向的变化。
4
+ */
5
+ export declare const stopDeviceMotionListening: typeof Taro.stopDeviceMotionListening;
6
+ /**
7
+ * 开始监听设备方向的变化。
8
+ */
9
+ export declare const startDeviceMotionListening: typeof Taro.startDeviceMotionListening;
10
+ /**
11
+ * 监听设备方向变化事件。
12
+ */
13
+ export declare const onDeviceMotionChange: typeof Taro.onDeviceMotionChange;
14
+ /**
15
+ * 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。
16
+ */
17
+ export declare const offDeviceMotionChange: typeof Taro.offDeviceMotionChange;
@@ -0,0 +1,20 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const getNetworkType: typeof Taro.getNetworkType;
3
+ /**
4
+ * 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。
5
+ * - 出现三次以上连接超时
6
+ * - 出现三次 rtt 超过 400
7
+ * - 出现三次以上的丢包
8
+ * > 弱网事件通知规则是: 弱网状态变化时立即通知, 状态不变时 30s 内最多通知一次。
9
+ */
10
+ export declare const onNetworkWeakChange: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onNetworkStatusChange: typeof Taro.onNetworkStatusChange;
14
+ export declare const offNetworkWeakChange: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const offNetworkStatusChange: typeof Taro.offNetworkStatusChange;
18
+ export declare const getLocalIPAddress: () => Promise<{
19
+ errMsg: string;
20
+ }>;
@@ -0,0 +1,21 @@
1
+ export declare const stopHCE: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startHCE: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const sendHCEMessage: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onHCEMessage: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const offHCEMessage: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getNFCAdapter: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const getHCEState: () => Promise<{
20
+ errMsg: string;
21
+ }>;
@@ -0,0 +1,2 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const makePhoneCall: typeof Taro.makePhoneCall;
@@ -0,0 +1,3 @@
1
+ export declare const scanCode: (options?: Partial<{
2
+ needResult: number;
3
+ }>) => Promise<any>;
@@ -0,0 +1,18 @@
1
+ export declare const setVisualEffectOnCapture: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const setScreenBrightness: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const setKeepScreenOn: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onUserCaptureScreen: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const offUserCaptureScreen: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getScreenBrightness: () => Promise<{
17
+ errMsg: string;
18
+ }>;
@@ -0,0 +1,9 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效
4
+ */
5
+ export declare const vibrateShort: typeof Taro.vibrateShort;
6
+ /**
7
+ * 使手机发生较长时间的振动(400 ms)
8
+ */
9
+ export declare const vibrateLong: typeof Taro.vibrateLong;
@@ -4,7 +4,7 @@ const vibrator = function vibrator(mm) {
4
4
  return window.navigator.vibrate(mm);
5
5
  }
6
6
  catch (e) {
7
- console.warn('当前浏览器不支持vibrate');
7
+ console.warn('当前浏览器不支持 vibrate');
8
8
  }
9
9
  };
10
10
  /**
@@ -12,12 +12,11 @@ const vibrator = function vibrator(mm) {
12
12
  */
13
13
  export const vibrateShort = ({ success, fail, complete } = {}) => {
14
14
  const handle = new MethodHandler({ name: 'vibrateShort', success, fail, complete });
15
- if (vibrator) {
16
- vibrator(15);
15
+ if (vibrator(15)) {
17
16
  return handle.success();
18
17
  }
19
18
  else {
20
- return handle.fail();
19
+ return handle.fail({ errMsg: 'style is not support' });
21
20
  }
22
21
  };
23
22
  /**
@@ -25,11 +24,10 @@ export const vibrateShort = ({ success, fail, complete } = {}) => {
25
24
  */
26
25
  export const vibrateLong = ({ success, fail, complete } = {}) => {
27
26
  const handle = new MethodHandler({ name: 'vibrateLong', success, fail, complete });
28
- if (vibrator) {
29
- vibrator(400);
27
+ if (vibrator(400)) {
30
28
  return handle.success();
31
29
  }
32
30
  else {
33
- return handle.fail();
31
+ return handle.fail({ errMsg: 'style is not support' });
34
32
  }
35
33
  };
@@ -0,0 +1,33 @@
1
+ export declare const stopWifi: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startWifi: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const setWifiList: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const onWifiConnectedWithPartialInfo: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const onWifiConnected: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onGetWifiList: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const offWifiConnected: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const offGetWifiList: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export declare const getWifiList: () => Promise<{
26
+ errMsg: string;
27
+ }>;
28
+ export declare const getConnectedWifi: () => Promise<{
29
+ errMsg: string;
30
+ }>;
31
+ export declare const connectWifi: () => Promise<{
32
+ errMsg: string;
33
+ }>;
@@ -0,0 +1,6 @@
1
+ export declare const getExtConfigSync: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const getExtConfig: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,24 @@
1
+ export declare const saveFileToDisk: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const saveFile: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const removeSavedFile: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const openDocument: () => Promise<{
11
+ errMsg: string;
12
+ }>;
13
+ export declare const getSavedFileList: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const getSavedFileInfo: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const getFileSystemManager: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const getFileInfo: () => Promise<{
23
+ errMsg: string;
24
+ }>;
@@ -0,0 +1,4 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const getApp: typeof Taro.getApp;
3
+ export { getCurrentPages } from '@tarojs/router';
4
+ export declare const getCurrentInstance: () => Taro.Current;
@@ -0,0 +1,24 @@
1
+ export * from './ad';
2
+ export * from './ai';
3
+ export * from './alipay';
4
+ export * from './base';
5
+ export * from './canvas';
6
+ export * from './cloud';
7
+ export * from './data-analysis';
8
+ export * from './device';
9
+ export * from './ext';
10
+ export * from './files';
11
+ export * from './framework';
12
+ export * from './location';
13
+ export * from './media';
14
+ export * from './navigate';
15
+ export * from './network';
16
+ export * from './open-api';
17
+ export * from './payment';
18
+ export * from './route';
19
+ export * from './share';
20
+ export * from './storage';
21
+ export * from './swan';
22
+ export * from './ui';
23
+ export * from './worker';
24
+ export * from './wxml';
@@ -0,0 +1,6 @@
1
+ import './style.css';
2
+ import Taro from '@tarojs/api';
3
+ /**
4
+ * 打开地图选择位置。
5
+ */
6
+ export declare const chooseLocation: typeof Taro.chooseLocation;
@@ -0,0 +1,2 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const getLocation: (options?: Partial<Taro.getLocation.Option>) => Promise<Taro.getLocation.SuccessCallbackResult>;
@@ -0,0 +1,32 @@
1
+ export declare const stopLocationUpdate: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startLocationUpdateBackground: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const startLocationUpdate: () => Promise<{
8
+ errMsg: string;
9
+ }>;
10
+ export declare const openLocation: (options?: Partial<{
11
+ scale: number;
12
+ }>) => Promise<any>;
13
+ export declare const onLocationChangeError: () => Promise<{
14
+ errMsg: string;
15
+ }>;
16
+ export declare const onLocationChange: () => Promise<{
17
+ errMsg: string;
18
+ }>;
19
+ export declare const offLocationChangeError: () => Promise<{
20
+ errMsg: string;
21
+ }>;
22
+ export declare const offLocationChange: () => Promise<{
23
+ errMsg: string;
24
+ }>;
25
+ export { getLocation } from './getLocation';
26
+ export declare const choosePoi: () => Promise<{
27
+ errMsg: string;
28
+ }>;
29
+ export declare const getFuzzyLocation: () => Promise<{
30
+ errMsg: string;
31
+ }>;
32
+ export { chooseLocation } from './chooseLocation';
@@ -13,4 +13,5 @@ export const offLocationChangeError = temporarilyNotSupport('offLocationChangeEr
13
13
  export const offLocationChange = temporarilyNotSupport('offLocationChange');
14
14
  export { getLocation } from './getLocation';
15
15
  export const choosePoi = temporarilyNotSupport('choosePoi');
16
+ export const getFuzzyLocation = temporarilyNotSupport('getFuzzyLocation');
16
17
  export { chooseLocation } from './chooseLocation';
@@ -0,0 +1,42 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare class EditorContext implements Taro.EditorContext {
3
+ blur: () => Promise<{
4
+ errMsg: string;
5
+ }>;
6
+ clear: () => Promise<{
7
+ errMsg: string;
8
+ }>;
9
+ format: () => Promise<{
10
+ errMsg: string;
11
+ }>;
12
+ getContents: () => Promise<{
13
+ errMsg: string;
14
+ }>;
15
+ getSelectionText: () => Promise<{
16
+ errMsg: string;
17
+ }>;
18
+ insertDivider: () => Promise<{
19
+ errMsg: string;
20
+ }>;
21
+ insertImage: () => Promise<{
22
+ errMsg: string;
23
+ }>;
24
+ insertText: () => Promise<{
25
+ errMsg: string;
26
+ }>;
27
+ redo: () => Promise<{
28
+ errMsg: string;
29
+ }>;
30
+ removeFormat: () => Promise<{
31
+ errMsg: string;
32
+ }>;
33
+ scrollIntoView: () => Promise<{
34
+ errMsg: string;
35
+ }>;
36
+ setContents: () => Promise<{
37
+ errMsg: string;
38
+ }>;
39
+ undo: () => Promise<{
40
+ errMsg: string;
41
+ }>;
42
+ }
@@ -0,0 +1,58 @@
1
+ import Taro from '@tarojs/api';
2
+ import { CallbackManager } from '../../../utils/handler';
3
+ export declare class InnerAudioContext implements Taro.InnerAudioContext {
4
+ Instance?: HTMLAudioElement;
5
+ errorStack: CallbackManager;
6
+ stopStack: CallbackManager;
7
+ __startTime: number;
8
+ constructor();
9
+ set autoplay(e: boolean);
10
+ get autoplay(): boolean;
11
+ get buffered(): number;
12
+ get currentTime(): number;
13
+ get duration(): number;
14
+ set loop(e: boolean);
15
+ get loop(): boolean;
16
+ get paused(): boolean;
17
+ set src(e: string);
18
+ get src(): string;
19
+ set volume(e: number);
20
+ get volume(): number;
21
+ set playbackRate(e: number);
22
+ get playbackRate(): number;
23
+ set obeyMuteSwitch(_e: boolean);
24
+ get obeyMuteSwitch(): boolean;
25
+ set startTime(e: number);
26
+ get startTime(): number;
27
+ set referrerPolicy(e: string);
28
+ get referrerPolicy(): string;
29
+ private setProperty;
30
+ play: () => Promise<void> | undefined;
31
+ pause: () => void | undefined;
32
+ stop: () => void;
33
+ seek: (position: number) => void;
34
+ /**
35
+ * @TODO destroy得并不干净
36
+ */
37
+ destroy: () => void;
38
+ onCanplay: (callback?: () => void) => void | undefined;
39
+ onPlay: (callback?: () => void) => void | undefined;
40
+ onPause: (callback?: () => void) => void | undefined;
41
+ onStop: (callback?: () => void) => void;
42
+ onEnded: (callback?: () => void) => void | undefined;
43
+ onTimeUpdate: (callback?: () => void) => void | undefined;
44
+ onError: (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void) | undefined) => void;
45
+ onWaiting: (callback?: () => void) => void | undefined;
46
+ onSeeking: (callback?: () => void) => void | undefined;
47
+ onSeeked: (callback?: () => void) => void | undefined;
48
+ offCanplay: (callback?: () => void) => void | undefined;
49
+ offPlay: (callback?: () => void) => void | undefined;
50
+ offPause: (callback?: () => void) => void | undefined;
51
+ offStop: (callback?: () => void) => void;
52
+ offEnded: (callback?: () => void) => void | undefined;
53
+ offTimeUpdate: (callback?: () => void) => void | undefined;
54
+ offError: (callback?: () => void) => void;
55
+ offWaiting: (callback?: () => void) => void | undefined;
56
+ offSeeking: (callback?: () => void) => void | undefined;
57
+ offSeeked: (callback?: () => void) => void | undefined;
58
+ }
@@ -0,0 +1,29 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const stopVoice: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare const setInnerAudioOption: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ export declare const playVoice: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ export declare const pauseVoice: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export declare const getAvailableAudioSources: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const createWebAudioContext: () => Promise<{
18
+ errMsg: string;
19
+ }>;
20
+ export declare const createMediaAudioPlayer: () => Promise<{
21
+ errMsg: string;
22
+ }>;
23
+ /**
24
+ * 创建内部 audio 上下文 InnerAudioContext 对象。
25
+ */
26
+ export declare const createInnerAudioContext: typeof Taro.createInnerAudioContext;
27
+ export declare const createAudioContext: () => Promise<{
28
+ errMsg: string;
29
+ }>;
@@ -0,0 +1,71 @@
1
+ import Taro from '@tarojs/api';
2
+ import { CallbackManager } from '../../../utils/handler';
3
+ export declare class BackgroundAudioManager implements Taro.BackgroundAudioManager {
4
+ Instance?: HTMLAudioElement;
5
+ errorStack: CallbackManager;
6
+ stopStack: CallbackManager;
7
+ __startTime: number;
8
+ constructor();
9
+ set src(e: string);
10
+ get src(): string;
11
+ set startTime(e: number);
12
+ get startTime(): number;
13
+ set title(e: string);
14
+ get title(): string;
15
+ set epname(e: string);
16
+ get epname(): string;
17
+ set singer(e: string);
18
+ get singer(): string;
19
+ set coverImgUrl(e: string);
20
+ get coverImgUrl(): string;
21
+ set webUrl(e: string);
22
+ get webUrl(): string;
23
+ set protocol(e: string);
24
+ get protocol(): string;
25
+ set playbackRate(e: number);
26
+ get playbackRate(): number;
27
+ get duration(): number;
28
+ get currentTime(): number;
29
+ get paused(): boolean;
30
+ get buffered(): number;
31
+ set referrerPolicy(e: string);
32
+ get referrerPolicy(): string;
33
+ private setProperty;
34
+ private dataset;
35
+ play: () => Promise<void> | undefined;
36
+ pause: () => void | undefined;
37
+ seek: (position: number) => void;
38
+ stop: () => void;
39
+ onCanplay: (callback?: () => void) => void | undefined;
40
+ onWaiting: (callback?: () => void) => void | undefined;
41
+ onError: (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void) | undefined) => void;
42
+ onPlay: (callback?: () => void) => void | undefined;
43
+ onPause: (callback?: () => void) => void | undefined;
44
+ onSeeking: (callback?: () => void) => void | undefined;
45
+ onSeeked: (callback?: () => void) => void | undefined;
46
+ onEnded: (callback?: () => void) => void | undefined;
47
+ onStop: (callback?: () => void) => void;
48
+ onTimeUpdate: (callback?: () => void) => void | undefined;
49
+ onPrev: () => Promise<{
50
+ errMsg: string;
51
+ }>;
52
+ onNext: () => Promise<{
53
+ errMsg: string;
54
+ }>;
55
+ offCanplay: (callback?: () => void) => void | undefined;
56
+ offWaiting: (callback?: () => void) => void | undefined;
57
+ offError: (callback?: () => void) => void;
58
+ offPlay: (callback?: () => void) => void | undefined;
59
+ offPause: (callback?: () => void) => void | undefined;
60
+ offSeeking: (callback?: () => void) => void | undefined;
61
+ offSeeked: (callback?: () => void) => void | undefined;
62
+ offEnded: (callback?: () => void) => void | undefined;
63
+ offStop: (callback?: () => void) => void;
64
+ offTimeUpdate: (callback?: () => void) => void | undefined;
65
+ offPrev: () => Promise<{
66
+ errMsg: string;
67
+ }>;
68
+ offNext: () => Promise<{
69
+ errMsg: string;
70
+ }>;
71
+ }
@@ -0,0 +1,29 @@
1
+ import { BackgroundAudioManager } from './BackgroundAudioManager';
2
+ export declare const stopBackgroundAudio: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare const seekBackgroundAudio: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ export declare const playBackgroundAudio: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ export declare const pauseBackgroundAudio: () => Promise<{
12
+ errMsg: string;
13
+ }>;
14
+ export declare const onBackgroundAudioStop: () => Promise<{
15
+ errMsg: string;
16
+ }>;
17
+ export declare const onBackgroundAudioPlay: () => Promise<{
18
+ errMsg: string;
19
+ }>;
20
+ export declare const onBackgroundAudioPause: () => Promise<{
21
+ errMsg: string;
22
+ }>;
23
+ export declare const getBackgroundAudioPlayerState: () => Promise<{
24
+ errMsg: string;
25
+ }>;
26
+ /**
27
+ * 获取全局唯一的背景音频管理器
28
+ */
29
+ export declare const getBackgroundAudioManager: () => BackgroundAudioManager;
@@ -0,0 +1,3 @@
1
+ export declare const createCameraContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 从本地相册选择图片或使用相机拍照。
4
+ */
5
+ export declare const chooseImage: typeof Taro.chooseImage;
@@ -0,0 +1,5 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * 获取图片信息。网络图片需先配置download域名才能生效。
4
+ */
5
+ export declare const getImageInfo: typeof Taro.getImageInfo;
@@ -0,0 +1,15 @@
1
+ export declare const saveImageToPhotosAlbum: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const previewMedia: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export * from './getImageInfo';
8
+ export * from './previewImage';
9
+ export declare const compressImage: () => Promise<{
10
+ errMsg: string;
11
+ }>;
12
+ export declare const chooseMessageFile: () => Promise<{
13
+ errMsg: string;
14
+ }>;
15
+ export * from './chooseImage';
@@ -0,0 +1,8 @@
1
+ import Taro from '@tarojs/api';
2
+ /**
3
+ * previewImage api基于开源的React组件[react-wx-images-viewer](https://github.com/react-ld/react-wx-images-viewer)开发,感谢!
4
+ */
5
+ /**
6
+ * 在新页面中全屏预览图片。预览的过程中用户可以进行保存图片、发送给朋友等操作。
7
+ */
8
+ export declare const previewImage: typeof Taro.previewImage;
@@ -0,0 +1,12 @@
1
+ export * from './audio';
2
+ export * from './background-audio';
3
+ export * from './camera';
4
+ export * from './image';
5
+ export * from './live';
6
+ export * from './map';
7
+ export * from './media-recorder';
8
+ export * from './recorder';
9
+ export * from './video';
10
+ export * from './video-decoder';
11
+ export * from './video-processing';
12
+ export * from './voip';
@@ -0,0 +1,6 @@
1
+ export declare const createLivePusherContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const createLivePlayerContext: () => Promise<{
5
+ errMsg: string;
6
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createMapContext: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createMediaRecorder: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,9 @@
1
+ export declare const stopRecord: () => Promise<{
2
+ errMsg: string;
3
+ }>;
4
+ export declare const startRecord: () => Promise<{
5
+ errMsg: string;
6
+ }>;
7
+ export declare const getRecorderManager: () => Promise<{
8
+ errMsg: string;
9
+ }>;
@@ -0,0 +1,24 @@
1
+ import Taro from '@tarojs/api';
2
+ export declare const saveVideoToPhotosAlbum: () => Promise<{
3
+ errMsg: string;
4
+ }>;
5
+ export declare const openVideoEditor: () => Promise<{
6
+ errMsg: string;
7
+ }>;
8
+ export declare const getVideoInfo: () => Promise<{
9
+ errMsg: string;
10
+ }>;
11
+ /**
12
+ * 创建 video 上下文 VideoContext 对象。
13
+ */
14
+ export declare const createVideoContext: typeof Taro.createVideoContext;
15
+ export declare const compressVideo: () => Promise<{
16
+ errMsg: string;
17
+ }>;
18
+ /**
19
+ * 拍摄视频或从手机相册中选视频。
20
+ */
21
+ export declare const chooseVideo: typeof Taro.chooseVideo;
22
+ export declare const chooseMedia: () => Promise<{
23
+ errMsg: string;
24
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createVideoDecoder: () => Promise<{
2
+ errMsg: string;
3
+ }>;
@@ -0,0 +1,3 @@
1
+ export declare const createMediaContainer: () => Promise<{
2
+ errMsg: string;
3
+ }>;