@tarojs/taro-h5 3.6.0-canary.9 → 3.6.1-alpha.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.
Files changed (423) hide show
  1. package/dist/api/ad/index.d.ts +3 -2
  2. package/dist/api/ad/index.js +7 -3
  3. package/dist/api/ad/index.js.map +1 -0
  4. package/dist/api/ai/facial.d.ts +4 -3
  5. package/dist/api/ai/facial.js +8 -4
  6. package/dist/api/ai/facial.js.map +1 -0
  7. package/dist/api/ai/index.d.ts +2 -2
  8. package/dist/api/ai/index.js +3 -2
  9. package/dist/api/ai/index.js.map +1 -0
  10. package/dist/api/ai/visual.d.ts +3 -2
  11. package/dist/api/ai/visual.js +7 -3
  12. package/dist/api/ai/visual.js.map +1 -0
  13. package/dist/api/alipay/index.d.ts +2 -1
  14. package/dist/api/alipay/index.js +6 -2
  15. package/dist/api/alipay/index.js.map +1 -0
  16. package/dist/api/base/crypto.d.ts +2 -1
  17. package/dist/api/base/crypto.js +6 -2
  18. package/dist/api/base/crypto.js.map +1 -0
  19. package/dist/api/base/debug.d.ts +4 -3
  20. package/dist/api/base/debug.js +8 -4
  21. package/dist/api/base/debug.js.map +1 -0
  22. package/dist/api/base/index.d.ts +16 -10
  23. package/dist/api/base/index.js +20 -12
  24. package/dist/api/base/index.js.map +1 -0
  25. package/dist/api/base/performance.d.ts +3 -2
  26. package/dist/api/base/performance.js +7 -3
  27. package/dist/api/base/performance.js.map +1 -0
  28. package/dist/api/base/system.d.ts +11 -10
  29. package/dist/api/base/system.js +22 -22
  30. package/dist/api/base/system.js.map +1 -0
  31. package/dist/api/base/update.d.ts +3 -2
  32. package/dist/api/base/update.js +7 -3
  33. package/dist/api/base/update.js.map +1 -0
  34. package/dist/api/base/weapp/app-event.d.ts +17 -16
  35. package/dist/api/base/weapp/app-event.js +22 -18
  36. package/dist/api/base/weapp/app-event.js.map +1 -0
  37. package/dist/api/base/weapp/life-cycle.d.ts +3 -2
  38. package/dist/api/base/weapp/life-cycle.js +6 -2
  39. package/dist/api/base/weapp/life-cycle.js.map +1 -0
  40. package/dist/api/canvas/CanvasContext.d.ts +7 -2
  41. package/dist/api/canvas/CanvasContext.js +6 -10
  42. package/dist/api/canvas/CanvasContext.js.map +1 -0
  43. package/dist/api/canvas/canvasGetImageData.d.ts +2 -1
  44. package/dist/api/canvas/canvasGetImageData.js +7 -3
  45. package/dist/api/canvas/canvasGetImageData.js.map +1 -0
  46. package/dist/api/canvas/canvasPutImageData.d.ts +2 -1
  47. package/dist/api/canvas/canvasPutImageData.js +7 -3
  48. package/dist/api/canvas/canvasPutImageData.js.map +1 -0
  49. package/dist/api/canvas/canvasToTempFilePath.d.ts +2 -1
  50. package/dist/api/canvas/canvasToTempFilePath.js +7 -3
  51. package/dist/api/canvas/canvasToTempFilePath.js.map +1 -0
  52. package/dist/api/canvas/createCanvasContext.d.ts +2 -1
  53. package/dist/api/canvas/createCanvasContext.js +7 -3
  54. package/dist/api/canvas/createCanvasContext.js.map +1 -0
  55. package/dist/api/canvas/index.d.ts +6 -5
  56. package/dist/api/canvas/index.js +10 -10
  57. package/dist/api/canvas/index.js.map +1 -0
  58. package/dist/api/cloud/index.d.ts +2 -1
  59. package/dist/api/cloud/index.js +6 -2
  60. package/dist/api/cloud/index.js.map +1 -0
  61. package/dist/api/data-analysis/index.d.ts +5 -4
  62. package/dist/api/data-analysis/index.js +9 -5
  63. package/dist/api/data-analysis/index.js.map +1 -0
  64. package/dist/api/device/accelerometer.d.ts +5 -4
  65. package/dist/api/device/accelerometer.js +11 -6
  66. package/dist/api/device/accelerometer.js.map +1 -0
  67. package/dist/api/device/accessibility.d.ts +2 -1
  68. package/dist/api/device/accessibility.js +6 -2
  69. package/dist/api/device/accessibility.js.map +1 -0
  70. package/dist/api/device/battery.d.ts +3 -2
  71. package/dist/api/device/battery.js +9 -13
  72. package/dist/api/device/battery.js.map +1 -0
  73. package/dist/api/device/bluetooth-ble.d.ts +17 -16
  74. package/dist/api/device/bluetooth-ble.js +21 -17
  75. package/dist/api/device/bluetooth-ble.js.map +1 -0
  76. package/dist/api/device/bluetooth-peripheral.d.ts +4 -3
  77. package/dist/api/device/bluetooth-peripheral.js +8 -4
  78. package/dist/api/device/bluetooth-peripheral.js.map +1 -0
  79. package/dist/api/device/bluetooth.d.ts +14 -13
  80. package/dist/api/device/bluetooth.js +18 -14
  81. package/dist/api/device/bluetooth.js.map +1 -0
  82. package/dist/api/device/calendar.d.ts +3 -2
  83. package/dist/api/device/calendar.js +7 -3
  84. package/dist/api/device/calendar.js.map +1 -0
  85. package/dist/api/device/clipboard.d.ts +3 -2
  86. package/dist/api/device/clipboard.js +10 -14
  87. package/dist/api/device/clipboard.js.map +1 -0
  88. package/dist/api/device/compass.d.ts +5 -4
  89. package/dist/api/device/compass.js +12 -7
  90. package/dist/api/device/compass.js.map +1 -0
  91. package/dist/api/device/contact.d.ts +3 -2
  92. package/dist/api/device/contact.js +7 -3
  93. package/dist/api/device/contact.js.map +1 -0
  94. package/dist/api/device/crypto.d.ts +2 -1
  95. package/dist/api/device/crypto.js +6 -2
  96. package/dist/api/device/crypto.js.map +1 -0
  97. package/dist/api/device/gyroscope.d.ts +5 -4
  98. package/dist/api/device/gyroscope.js +9 -5
  99. package/dist/api/device/gyroscope.js.map +1 -0
  100. package/dist/api/device/iBeacon.d.ts +8 -7
  101. package/dist/api/device/iBeacon.js +12 -8
  102. package/dist/api/device/iBeacon.js.map +1 -0
  103. package/dist/api/device/index.d.ts +23 -23
  104. package/dist/api/device/index.js +24 -23
  105. package/dist/api/device/index.js.map +1 -0
  106. package/dist/api/device/keyboard.d.ts +5 -4
  107. package/dist/api/device/keyboard.js +9 -5
  108. package/dist/api/device/keyboard.js.map +1 -0
  109. package/dist/api/device/memory.d.ts +3 -2
  110. package/dist/api/device/memory.js +7 -3
  111. package/dist/api/device/memory.js.map +1 -0
  112. package/dist/api/device/motion.d.ts +5 -4
  113. package/dist/api/device/motion.js +11 -6
  114. package/dist/api/device/motion.js.map +1 -0
  115. package/dist/api/device/network.d.ts +7 -6
  116. package/dist/api/device/network.js +13 -17
  117. package/dist/api/device/network.js.map +1 -0
  118. package/dist/api/device/nfc.d.ts +8 -7
  119. package/dist/api/device/nfc.js +12 -8
  120. package/dist/api/device/nfc.js.map +1 -0
  121. package/dist/api/device/phone.d.ts +2 -1
  122. package/dist/api/device/phone.js +7 -3
  123. package/dist/api/device/phone.js.map +1 -0
  124. package/dist/api/device/scan.d.ts +2 -1
  125. package/dist/api/device/scan.js +6 -2
  126. package/dist/api/device/scan.js.map +1 -0
  127. package/dist/api/device/screen.d.ts +7 -6
  128. package/dist/api/device/screen.js +11 -7
  129. package/dist/api/device/screen.js.map +1 -0
  130. package/dist/api/device/vibrate.d.ts +3 -2
  131. package/dist/api/device/vibrate.js +7 -3
  132. package/dist/api/device/vibrate.js.map +1 -0
  133. package/dist/api/device/wifi.d.ts +12 -11
  134. package/dist/api/device/wifi.js +16 -12
  135. package/dist/api/device/wifi.js.map +1 -0
  136. package/dist/api/ext/index.d.ts +3 -2
  137. package/dist/api/ext/index.js +7 -3
  138. package/dist/api/ext/index.js.map +1 -0
  139. package/dist/api/files/index.d.ts +9 -8
  140. package/dist/api/files/index.js +13 -9
  141. package/dist/api/files/index.js.map +1 -0
  142. package/dist/api/framework/index.d.ts +3 -2
  143. package/dist/api/framework/index.js +7 -3
  144. package/dist/api/framework/index.js.map +1 -0
  145. package/dist/api/index.d.ts +24 -24
  146. package/dist/api/index.js +117 -24
  147. package/dist/api/index.js.map +1 -0
  148. package/dist/api/location/chooseLocation.d.ts +2 -2
  149. package/dist/api/location/chooseLocation.js +8 -14
  150. package/dist/api/location/chooseLocation.js.map +1 -0
  151. package/dist/api/location/getLocation.d.ts +2 -1
  152. package/dist/api/location/getLocation.js +7 -3
  153. package/dist/api/location/getLocation.js.map +1 -0
  154. package/dist/api/location/index.d.ts +13 -12
  155. package/dist/api/location/index.js +17 -13
  156. package/dist/api/location/index.js.map +1 -0
  157. package/dist/api/location/style.scss.js +8 -0
  158. package/dist/api/location/style.scss.js.map +1 -0
  159. package/dist/api/media/audio/InnerAudioContext.d.ts +3 -2
  160. package/dist/api/media/audio/InnerAudioContext.js +7 -3
  161. package/dist/api/media/audio/InnerAudioContext.js.map +1 -0
  162. package/dist/api/media/audio/index.d.ts +10 -9
  163. package/dist/api/media/audio/index.js +15 -11
  164. package/dist/api/media/audio/index.js.map +1 -0
  165. package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +3 -2
  166. package/dist/api/media/background-audio/BackgroundAudioManager.js +7 -3
  167. package/dist/api/media/background-audio/BackgroundAudioManager.js.map +1 -0
  168. package/dist/api/media/background-audio/index.d.ts +11 -10
  169. package/dist/api/media/background-audio/index.js +15 -11
  170. package/dist/api/media/background-audio/index.js.map +1 -0
  171. package/dist/api/media/camera.d.ts +2 -1
  172. package/dist/api/media/camera.js +6 -2
  173. package/dist/api/media/camera.js.map +1 -0
  174. package/dist/api/media/image/chooseImage.d.ts +2 -1
  175. package/dist/api/media/image/chooseImage.js +7 -3
  176. package/dist/api/media/image/chooseImage.js.map +1 -0
  177. package/dist/api/media/image/getImageInfo.d.ts +2 -1
  178. package/dist/api/media/image/getImageInfo.js +7 -3
  179. package/dist/api/media/image/getImageInfo.js.map +1 -0
  180. package/dist/api/media/image/index.d.ts +8 -7
  181. package/dist/api/media/image/index.js +12 -8
  182. package/dist/api/media/image/index.js.map +1 -0
  183. package/dist/api/media/image/previewImage.d.ts +2 -1
  184. package/dist/api/media/image/previewImage.js +15 -12
  185. package/dist/api/media/image/previewImage.js.map +1 -0
  186. package/dist/api/media/index.d.ts +12 -12
  187. package/dist/api/media/index.js +13 -12
  188. package/dist/api/media/index.js.map +1 -0
  189. package/dist/api/media/live.d.ts +3 -2
  190. package/dist/api/media/live.js +7 -3
  191. package/dist/api/media/live.js.map +1 -0
  192. package/dist/api/media/map.d.ts +2 -1
  193. package/dist/api/media/map.js +6 -2
  194. package/dist/api/media/map.js.map +1 -0
  195. package/dist/api/media/media-recorder.d.ts +2 -1
  196. package/dist/api/media/media-recorder.js +6 -2
  197. package/dist/api/media/media-recorder.js.map +1 -0
  198. package/dist/api/media/recorder.d.ts +4 -3
  199. package/dist/api/media/recorder.js +8 -4
  200. package/dist/api/media/recorder.js.map +1 -0
  201. package/dist/api/media/video/index.d.ts +8 -7
  202. package/dist/api/media/video/index.js +13 -9
  203. package/dist/api/media/video/index.js.map +1 -0
  204. package/dist/api/media/video-decoder.d.ts +2 -1
  205. package/dist/api/media/video-decoder.js +6 -2
  206. package/dist/api/media/video-decoder.js.map +1 -0
  207. package/dist/api/media/video-processing.d.ts +2 -1
  208. package/dist/api/media/video-processing.js +6 -2
  209. package/dist/api/media/video-processing.js.map +1 -0
  210. package/dist/api/media/voip.d.ts +15 -14
  211. package/dist/api/media/voip.js +19 -15
  212. package/dist/api/media/voip.js.map +1 -0
  213. package/dist/api/navigate/index.d.ts +6 -5
  214. package/dist/api/navigate/index.js +10 -6
  215. package/dist/api/navigate/index.js.map +1 -0
  216. package/dist/api/network/download.d.ts +2 -1
  217. package/dist/api/network/download.js +14 -5
  218. package/dist/api/network/download.js.map +1 -0
  219. package/dist/api/network/index.d.ts +7 -7
  220. package/dist/api/network/index.js +8 -7
  221. package/dist/api/network/index.js.map +1 -0
  222. package/dist/api/network/mdns.d.ts +11 -10
  223. package/dist/api/network/mdns.js +15 -11
  224. package/dist/api/network/mdns.js.map +1 -0
  225. package/dist/api/network/request/index.d.ts +3 -3
  226. package/dist/api/network/request/index.js +8 -4
  227. package/dist/api/network/request/index.js.map +1 -0
  228. package/dist/api/network/tcp.d.ts +2 -1
  229. package/dist/api/network/tcp.js +6 -2
  230. package/dist/api/network/tcp.js.map +1 -0
  231. package/dist/api/network/udp.d.ts +2 -1
  232. package/dist/api/network/udp.js +6 -2
  233. package/dist/api/network/udp.js.map +1 -0
  234. package/dist/api/network/upload.d.ts +2 -1
  235. package/dist/api/network/upload.js +14 -5
  236. package/dist/api/network/upload.js.map +1 -0
  237. package/dist/api/network/utils.d.ts +5 -4
  238. package/dist/api/network/utils.js +7 -4
  239. package/dist/api/network/utils.js.map +1 -0
  240. package/dist/api/network/websocket/index.d.ts +8 -7
  241. package/dist/api/network/websocket/index.js +14 -10
  242. package/dist/api/network/websocket/index.js.map +1 -0
  243. package/dist/api/network/websocket/socketTask.d.ts +2 -1
  244. package/dist/api/network/websocket/socketTask.js +5 -1
  245. package/dist/api/network/websocket/socketTask.js.map +1 -0
  246. package/dist/api/open-api/account.d.ts +2 -1
  247. package/dist/api/open-api/account.js +6 -2
  248. package/dist/api/open-api/account.js.map +1 -0
  249. package/dist/api/open-api/address.d.ts +2 -1
  250. package/dist/api/open-api/address.js +6 -2
  251. package/dist/api/open-api/address.js.map +1 -0
  252. package/dist/api/open-api/authorize.d.ts +3 -2
  253. package/dist/api/open-api/authorize.js +7 -3
  254. package/dist/api/open-api/authorize.js.map +1 -0
  255. package/dist/api/open-api/card.d.ts +3 -2
  256. package/dist/api/open-api/card.js +7 -3
  257. package/dist/api/open-api/card.js.map +1 -0
  258. package/dist/api/open-api/channels-live.d.ts +7 -6
  259. package/dist/api/open-api/channels-live.js +11 -7
  260. package/dist/api/open-api/channels-live.js.map +1 -0
  261. package/dist/api/open-api/customer-service.d.ts +2 -1
  262. package/dist/api/open-api/customer-service.js +6 -2
  263. package/dist/api/open-api/customer-service.js.map +1 -0
  264. package/dist/api/open-api/facial.d.ts +5 -4
  265. package/dist/api/open-api/facial.js +9 -5
  266. package/dist/api/open-api/facial.js.map +1 -0
  267. package/dist/api/open-api/favorites.d.ts +3 -2
  268. package/dist/api/open-api/favorites.js +7 -3
  269. package/dist/api/open-api/favorites.js.map +1 -0
  270. package/dist/api/open-api/group.d.ts +2 -1
  271. package/dist/api/open-api/group.js +6 -2
  272. package/dist/api/open-api/group.js.map +1 -0
  273. package/dist/api/open-api/index.d.ts +18 -18
  274. package/dist/api/open-api/index.js +19 -18
  275. package/dist/api/open-api/index.js.map +1 -0
  276. package/dist/api/open-api/invoice.d.ts +3 -2
  277. package/dist/api/open-api/invoice.js +7 -3
  278. package/dist/api/open-api/invoice.js.map +1 -0
  279. package/dist/api/open-api/license-plate.d.ts +2 -1
  280. package/dist/api/open-api/license-plate.js +6 -2
  281. package/dist/api/open-api/license-plate.js.map +1 -0
  282. package/dist/api/open-api/login.d.ts +4 -3
  283. package/dist/api/open-api/login.js +8 -4
  284. package/dist/api/open-api/login.js.map +1 -0
  285. package/dist/api/open-api/red-package.d.ts +2 -1
  286. package/dist/api/open-api/red-package.js +6 -2
  287. package/dist/api/open-api/red-package.js.map +1 -0
  288. package/dist/api/open-api/settings.d.ts +3 -2
  289. package/dist/api/open-api/settings.js +7 -3
  290. package/dist/api/open-api/settings.js.map +1 -0
  291. package/dist/api/open-api/soter.d.ts +4 -3
  292. package/dist/api/open-api/soter.js +8 -4
  293. package/dist/api/open-api/soter.js.map +1 -0
  294. package/dist/api/open-api/subscribe-message.d.ts +2 -1
  295. package/dist/api/open-api/subscribe-message.js +6 -2
  296. package/dist/api/open-api/subscribe-message.js.map +1 -0
  297. package/dist/api/open-api/user-info.d.ts +3 -2
  298. package/dist/api/open-api/user-info.js +7 -3
  299. package/dist/api/open-api/user-info.js.map +1 -0
  300. package/dist/api/open-api/werun.d.ts +3 -2
  301. package/dist/api/open-api/werun.js +7 -3
  302. package/dist/api/open-api/werun.js.map +1 -0
  303. package/dist/api/payment/index.d.ts +3 -2
  304. package/dist/api/payment/index.js +7 -3
  305. package/dist/api/payment/index.js.map +1 -0
  306. package/dist/api/route/index.js +3 -1
  307. package/dist/api/route/index.js.map +1 -0
  308. package/dist/api/share/index.d.ts +11 -10
  309. package/dist/api/share/index.js +15 -11
  310. package/dist/api/share/index.js.map +1 -0
  311. package/dist/api/storage/background-fetch.d.ts +5 -4
  312. package/dist/api/storage/background-fetch.js +9 -5
  313. package/dist/api/storage/background-fetch.js.map +1 -0
  314. package/dist/api/storage/index.d.ts +14 -13
  315. package/dist/api/storage/index.js +19 -15
  316. package/dist/api/storage/index.js.map +1 -0
  317. package/dist/api/swan/index.d.ts +22 -21
  318. package/dist/api/swan/index.js +26 -22
  319. package/dist/api/swan/index.js.map +1 -0
  320. package/dist/api/taro.d.ts +1 -2
  321. package/dist/api/taro.js +17 -12
  322. package/dist/api/taro.js.map +1 -0
  323. package/dist/api/ui/animation/index.d.ts +2 -1
  324. package/dist/api/ui/animation/index.js +4 -1
  325. package/dist/api/ui/animation/index.js.map +1 -0
  326. package/dist/api/ui/background.d.ts +3 -2
  327. package/dist/api/ui/background.js +7 -3
  328. package/dist/api/ui/background.js.map +1 -0
  329. package/dist/api/ui/custom-component.d.ts +2 -1
  330. package/dist/api/ui/custom-component.js +5 -1
  331. package/dist/api/ui/custom-component.js.map +1 -0
  332. package/dist/api/ui/fonts.d.ts +2 -1
  333. package/dist/api/ui/fonts.js +7 -11
  334. package/dist/api/ui/fonts.js.map +1 -0
  335. package/dist/api/ui/index.d.ts +12 -12
  336. package/dist/api/ui/index.js +13 -12
  337. package/dist/api/ui/index.js.map +1 -0
  338. package/dist/api/ui/interaction/actionSheet.d.ts +2 -1
  339. package/dist/api/ui/interaction/actionSheet.js +6 -2
  340. package/dist/api/ui/interaction/actionSheet.js.map +1 -0
  341. package/dist/api/ui/interaction/index.js +9 -14
  342. package/dist/api/ui/interaction/index.js.map +1 -0
  343. package/dist/api/ui/interaction/modal.d.ts +2 -1
  344. package/dist/api/ui/interaction/modal.js +8 -4
  345. package/dist/api/ui/interaction/modal.js.map +1 -0
  346. package/dist/api/ui/interaction/toast.d.ts +2 -1
  347. package/dist/api/ui/interaction/toast.js +8 -4
  348. package/dist/api/ui/interaction/toast.js.map +1 -0
  349. package/dist/api/ui/menu.d.ts +2 -1
  350. package/dist/api/ui/menu.js +6 -2
  351. package/dist/api/ui/menu.js.map +1 -0
  352. package/dist/api/ui/navigation-bar/index.d.ts +6 -5
  353. package/dist/api/ui/navigation-bar/index.js +11 -7
  354. package/dist/api/ui/navigation-bar/index.js.map +1 -0
  355. package/dist/api/ui/pull-down-refresh.d.ts +3 -2
  356. package/dist/api/ui/pull-down-refresh.js +7 -3
  357. package/dist/api/ui/pull-down-refresh.js.map +1 -0
  358. package/dist/api/ui/scroll/index.d.ts +2 -1
  359. package/dist/api/ui/scroll/index.js +8 -3
  360. package/dist/api/ui/scroll/index.js.map +1 -0
  361. package/dist/api/ui/sticky.d.ts +2 -1
  362. package/dist/api/ui/sticky.js +6 -2
  363. package/dist/api/ui/sticky.js.map +1 -0
  364. package/dist/api/ui/tab-bar.d.ts +12 -10
  365. package/dist/api/ui/tab-bar.js +16 -11
  366. package/dist/api/ui/tab-bar.js.map +1 -0
  367. package/dist/api/ui/window.d.ts +4 -3
  368. package/dist/api/ui/window.js +9 -5
  369. package/dist/api/ui/window.js.map +1 -0
  370. package/dist/api/worker/index.d.ts +2 -1
  371. package/dist/api/worker/index.js +6 -2
  372. package/dist/api/worker/index.js.map +1 -0
  373. package/dist/api/wxml/IntersectionObserver.d.ts +20 -0
  374. package/dist/api/wxml/IntersectionObserver.js +108 -0
  375. package/dist/api/wxml/IntersectionObserver.js.map +1 -0
  376. package/dist/api/wxml/MediaQueryObserver.d.ts +10 -0
  377. package/dist/api/wxml/MediaQueryObserver.js +54 -0
  378. package/dist/api/wxml/MediaQueryObserver.js.map +1 -0
  379. package/dist/api/wxml/index.d.ts +4 -2
  380. package/dist/api/wxml/index.js +14 -4
  381. package/dist/api/wxml/index.js.map +1 -0
  382. package/dist/api/wxml/nodesRef.d.ts +3 -2
  383. package/dist/api/wxml/nodesRef.js +4 -1
  384. package/dist/api/wxml/nodesRef.js.map +1 -0
  385. package/dist/api/wxml/selectorQuery.d.ts +4 -4
  386. package/dist/api/wxml/selectorQuery.js +15 -6
  387. package/dist/api/wxml/selectorQuery.js.map +1 -0
  388. package/dist/index.cjs.d.ts +10 -5
  389. package/dist/index.cjs.js +248 -47
  390. package/dist/index.cjs.js.map +1 -1
  391. package/dist/index.d.ts +4 -4
  392. package/dist/index.esm.d.ts +10 -5
  393. package/dist/index.esm.js +230 -49
  394. package/dist/index.esm.js.map +1 -1
  395. package/dist/index.js +113 -4
  396. package/dist/index.js.map +1 -0
  397. package/dist/node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +29 -0
  398. package/dist/node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  399. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js +221 -0
  400. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js.map +1 -0
  401. package/dist/utils/animation.d.ts +3 -2
  402. package/dist/utils/animation.js +5 -2
  403. package/dist/utils/animation.js.map +1 -0
  404. package/dist/utils/handler.d.ts +7 -7
  405. package/dist/utils/handler.js +7 -4
  406. package/dist/utils/handler.js.map +1 -0
  407. package/dist/utils/index.d.ts +17 -16
  408. package/dist/utils/index.js +37 -40
  409. package/dist/utils/index.js.map +1 -0
  410. package/dist/utils/lodash.d.ts +3 -2
  411. package/dist/utils/lodash.js +5 -2
  412. package/dist/utils/lodash.js.map +1 -0
  413. package/dist/utils/valid.d.ts +2 -1
  414. package/dist/utils/valid.js +4 -1
  415. package/dist/utils/valid.js.map +1 -0
  416. package/package.json +15 -10
  417. package/types/define.d.ts +2 -0
  418. package/dist/api/location/style.css +0 -79
  419. package/dist/api/media/EditorContext.d.ts +0 -16
  420. package/dist/api/media/EditorContext.js +0 -19
  421. package/dist/taroApis.d.ts +0 -753
  422. package/dist/taroApis.js +0 -2
  423. package/dist/taroApis.js.map +0 -1
@@ -1,2 +1,3 @@
1
- export declare const createRewardedVideoAd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const createInterstitialAd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const createRewardedVideoAd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const createInterstitialAd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { createRewardedVideoAd, createInterstitialAd };
@@ -1,4 +1,8 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 广告
3
- export const createRewardedVideoAd = temporarilyNotSupport('createRewardedVideoAd');
4
- export const createInterstitialAd = temporarilyNotSupport('createInterstitialAd');
4
+ const createRewardedVideoAd = temporarilyNotSupport('createRewardedVideoAd');
5
+ const createInterstitialAd = temporarilyNotSupport('createInterstitialAd');
6
+
7
+ export { createInterstitialAd, createRewardedVideoAd };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/ad/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 广告\nexport const createRewardedVideoAd = temporarilyNotSupport('createRewardedVideoAd')\nexport const createInterstitialAd = temporarilyNotSupport('createInterstitialAd')\n"],"names":[],"mappings":";;AAEA;MACa,qBAAqB,GAAG,qBAAqB,CAAC,uBAAuB,EAAC;MACtE,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB;;;;"}
@@ -1,3 +1,4 @@
1
- export declare const stopFaceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const initFaceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
- export declare const faceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const stopFaceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const initFaceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ declare const faceDetect: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
+ export { stopFaceDetect, initFaceDetect, faceDetect };
@@ -1,5 +1,9 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 人脸识别
3
- export const stopFaceDetect = temporarilyNotSupport('stopFaceDetect');
4
- export const initFaceDetect = temporarilyNotSupport('initFaceDetect');
5
- export const faceDetect = temporarilyNotSupport('faceDetect');
4
+ const stopFaceDetect = temporarilyNotSupport('stopFaceDetect');
5
+ const initFaceDetect = temporarilyNotSupport('initFaceDetect');
6
+ const faceDetect = temporarilyNotSupport('faceDetect');
7
+
8
+ export { faceDetect, initFaceDetect, stopFaceDetect };
9
+ //# sourceMappingURL=facial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facial.js","sources":["../../../src/api/ai/facial.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 人脸识别\nexport const stopFaceDetect = temporarilyNotSupport('stopFaceDetect')\nexport const initFaceDetect = temporarilyNotSupport('initFaceDetect')\nexport const faceDetect = temporarilyNotSupport('faceDetect')\n"],"names":[],"mappings":";;AAEA;MACa,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,UAAU,GAAG,qBAAqB,CAAC,YAAY;;;;"}
@@ -1,2 +1,2 @@
1
- export * from './facial';
2
- export * from './visual';
1
+ export * from "./facial";
2
+ export * from "./visual";
@@ -1,2 +1,3 @@
1
- export * from './facial';
2
- export * from './visual';
1
+ export { faceDetect, initFaceDetect, stopFaceDetect } from './facial.js';
2
+ export { createVKSession, isVKSupport } from './visual.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +1,3 @@
1
- export declare const isVKSupport: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const createVKSession: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const isVKSupport: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const createVKSession: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { isVKSupport, createVKSession };
@@ -1,5 +1,9 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 判断支持版本
3
- export const isVKSupport = temporarilyNotSupport('isVKSupport');
4
+ const isVKSupport = temporarilyNotSupport('isVKSupport');
4
5
  // 视觉算法
5
- export const createVKSession = temporarilyNotSupport('createVKSession');
6
+ const createVKSession = temporarilyNotSupport('createVKSession');
7
+
8
+ export { createVKSession, isVKSupport };
9
+ //# sourceMappingURL=visual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual.js","sources":["../../../src/api/ai/visual.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 判断支持版本\nexport const isVKSupport = temporarilyNotSupport('isVKSupport')\n\n// 视觉算法\nexport const createVKSession = temporarilyNotSupport('createVKSession')\n"],"names":[],"mappings":";;AAEA;MACa,WAAW,GAAG,qBAAqB,CAAC,aAAa,EAAC;AAE/D;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB;;;;"}
@@ -1 +1,2 @@
1
- export declare const getOpenUserInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const getOpenUserInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ export { getOpenUserInfo };
@@ -1,3 +1,7 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // AliPay
3
- export const getOpenUserInfo = temporarilyNotSupport('getOpenUserInfo');
4
+ const getOpenUserInfo = temporarilyNotSupport('getOpenUserInfo');
5
+
6
+ export { getOpenUserInfo };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/alipay/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// AliPay\nexport const getOpenUserInfo = temporarilyNotSupport('getOpenUserInfo')\n"],"names":[],"mappings":";;AAEA;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB;;;;"}
@@ -1 +1,2 @@
1
- export declare const getUserCryptoManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const getUserCryptoManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ export { getUserCryptoManager };
@@ -1,3 +1,7 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 加密
3
- export const getUserCryptoManager = temporarilyNotSupport('getUserCryptoManager');
4
+ const getUserCryptoManager = temporarilyNotSupport('getUserCryptoManager');
5
+
6
+ export { getUserCryptoManager };
7
+ //# sourceMappingURL=crypto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.js","sources":["../../../src/api/base/crypto.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 加密\nexport const getUserCryptoManager = temporarilyNotSupport('getUserCryptoManager')\n"],"names":[],"mappings":";;AAEA;MACa,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB;;;;"}
@@ -1,3 +1,4 @@
1
- export declare const setEnableDebug: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const getRealtimeLogManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
- export declare const getLogManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const setEnableDebug: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const getRealtimeLogManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ declare const getLogManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
+ export { setEnableDebug, getRealtimeLogManager, getLogManager };
@@ -1,4 +1,8 @@
1
- import { temporarilyNotSupport } from '../../utils';
2
- export const setEnableDebug = temporarilyNotSupport('setEnableDebug');
3
- export const getRealtimeLogManager = temporarilyNotSupport('getRealtimeLogManager');
4
- export const getLogManager = temporarilyNotSupport('getLogManager');
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
3
+ const setEnableDebug = temporarilyNotSupport('setEnableDebug');
4
+ const getRealtimeLogManager = temporarilyNotSupport('getRealtimeLogManager');
5
+ const getLogManager = temporarilyNotSupport('getLogManager');
6
+
7
+ export { getLogManager, getRealtimeLogManager, setEnableDebug };
8
+ //# sourceMappingURL=debug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.js","sources":["../../../src/api/base/debug.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\nexport const setEnableDebug = temporarilyNotSupport('setEnableDebug')\nexport const getRealtimeLogManager = temporarilyNotSupport('getRealtimeLogManager')\nexport const getLogManager = temporarilyNotSupport('getLogManager')\n"],"names":[],"mappings":";;MAEa,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,qBAAqB,GAAG,qBAAqB,CAAC,uBAAuB,EAAC;MACtE,aAAa,GAAG,qBAAqB,CAAC,eAAe;;;;"}
@@ -1,10 +1,16 @@
1
- export declare const canIUse: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare function arrayBufferToBase64(arrayBuffer: any): string;
3
- export declare function base64ToArrayBuffer(base64: any): Uint8Array;
4
- export * from './crypto';
5
- export * from './debug';
6
- export * from './performance';
7
- export * from './system';
8
- export * from './update';
9
- export * from './weapp/app-event';
10
- export * from './weapp/life-cycle';
1
+ declare const env: {
2
+ FRAMEWORK: string | undefined;
3
+ TARO_ENV: string | undefined;
4
+ TARO_VERSION: string | undefined;
5
+ };
6
+ declare const canIUse: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
+ declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
8
+ declare function base64ToArrayBuffer(base64: string): Uint8Array;
9
+ export { env, canIUse, arrayBufferToBase64, base64ToArrayBuffer };
10
+ export * from "./crypto";
11
+ export * from "./debug";
12
+ export * from "./performance";
13
+ export * from "./system";
14
+ export * from "./update";
15
+ export * from "./weapp/app-event";
16
+ export * from "./weapp/life-cycle";
@@ -1,17 +1,25 @@
1
1
  import { fromByteArray, toByteArray } from 'base64-js';
2
- import { temporarilyNotSupport } from '../../utils';
3
- // TODO env 环境变量
4
- export const canIUse = temporarilyNotSupport('canIUse');
5
- export function arrayBufferToBase64(arrayBuffer) {
2
+ import { temporarilyNotSupport } from '../../utils/index.js';
3
+ export { getUserCryptoManager } from './crypto.js';
4
+ export { getLogManager, getRealtimeLogManager, setEnableDebug } from './debug.js';
5
+ export { getPerformance, reportPerformance } from './performance.js';
6
+ export { getAppAuthorizeSetting, getAppBaseInfo, getDeviceInfo, getSystemInfo, getSystemInfoAsync, getSystemInfoSync, getSystemSetting, getWindowInfo, openAppAuthorizeSetting, openSystemBluetoothSetting } from './system.js';
7
+ export { getUpdateManager, updateWeChatApp } from './update.js';
8
+ export { offAppHide, offAppShow, offAudioInterruptionBegin, offAudioInterruptionEnd, offError, offPageNotFound, offThemeChange, offUnhandledRejection, onAppHide, onAppShow, onAudioInterruptionBegin, onAudioInterruptionEnd, onError, onPageNotFound, onThemeChange, onUnhandledRejection } from './weapp/app-event.js';
9
+ export { getEnterOptionsSync, getLaunchOptionsSync } from './weapp/life-cycle.js';
10
+
11
+ const env = {
12
+ FRAMEWORK: process.env.FRAMEWORK,
13
+ TARO_ENV: process.env.TARO_ENV,
14
+ TARO_VERSION: process.env.TARO_VERSION,
15
+ };
16
+ const canIUse = temporarilyNotSupport('canIUse');
17
+ function arrayBufferToBase64(arrayBuffer) {
6
18
  return fromByteArray(arrayBuffer);
7
19
  }
8
- export function base64ToArrayBuffer(base64) {
20
+ function base64ToArrayBuffer(base64) {
9
21
  return toByteArray(base64);
10
22
  }
11
- export * from './crypto';
12
- export * from './debug';
13
- export * from './performance';
14
- export * from './system';
15
- export * from './update';
16
- export * from './weapp/app-event';
17
- export * from './weapp/life-cycle';
23
+
24
+ export { arrayBufferToBase64, base64ToArrayBuffer, canIUse, env };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/base/index.ts"],"sourcesContent":["import { fromByteArray, toByteArray } from 'base64-js'\n\nimport { temporarilyNotSupport } from '../../utils'\n\nexport const env = {\n FRAMEWORK: process.env.FRAMEWORK,\n TARO_ENV: process.env.TARO_ENV,\n TARO_VERSION: process.env.TARO_VERSION,\n}\n\nexport const canIUse = temporarilyNotSupport('canIUse')\n\nexport function arrayBufferToBase64 (arrayBuffer: ArrayBuffer) {\n return fromByteArray(arrayBuffer as Uint8Array)\n}\n\nexport function base64ToArrayBuffer (base64: string) {\n return toByteArray(base64)\n}\n\nexport * from './crypto'\nexport * from './debug'\nexport * from './performance'\nexport * from './system'\nexport * from './update'\nexport * from './weapp/app-event'\nexport * from './weapp/life-cycle'\n"],"names":[],"mappings":";;;;;;;;;;AAIa,MAAA,GAAG,GAAG;AACjB,IAAA,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;AAChC,IAAA,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;AAC9B,IAAA,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;EACvC;MAEY,OAAO,GAAG,qBAAqB,CAAC,SAAS,EAAC;AAEjD,SAAU,mBAAmB,CAAE,WAAwB,EAAA;AAC3D,IAAA,OAAO,aAAa,CAAC,WAAyB,CAAC,CAAA;AACjD,CAAC;AAEK,SAAU,mBAAmB,CAAE,MAAc,EAAA;AACjD,IAAA,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;AAC5B;;;;"}
@@ -1,2 +1,3 @@
1
- export declare const reportPerformance: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const getPerformance: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const reportPerformance: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const getPerformance: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { reportPerformance, getPerformance };
@@ -1,4 +1,8 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 性能
3
- export const reportPerformance = temporarilyNotSupport('reportPerformance');
4
- export const getPerformance = temporarilyNotSupport('getPerformance');
4
+ const reportPerformance = temporarilyNotSupport('reportPerformance');
5
+ const getPerformance = temporarilyNotSupport('getPerformance');
6
+
7
+ export { getPerformance, reportPerformance };
8
+ //# sourceMappingURL=performance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance.js","sources":["../../../src/api/base/performance.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 性能\nexport const reportPerformance = temporarilyNotSupport('reportPerformance')\nexport const getPerformance = temporarilyNotSupport('getPerformance')\n"],"names":[],"mappings":";;AAEA;MACa,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB,EAAC;MAC9D,cAAc,GAAG,qBAAqB,CAAC,gBAAgB;;;;"}
@@ -1,21 +1,22 @@
1
1
  import Taro from '@tarojs/api';
2
2
  /** 跳转系统蓝牙设置页 */
3
- export declare const openSystemBluetoothSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ declare const openSystemBluetoothSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
4
  /** 跳转系统微信授权管理页 */
5
- export declare const openAppAuthorizeSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
+ declare const openAppAuthorizeSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
6
  /** 获取窗口信息 */
7
- export declare const getWindowInfo: typeof Taro.getWindowInfo;
7
+ declare const getWindowInfo: typeof Taro.getWindowInfo;
8
8
  /** 获取设备设置 */
9
- export declare const getSystemSetting: typeof Taro.getSystemSetting;
9
+ declare const getSystemSetting: typeof Taro.getSystemSetting;
10
10
  /** 获取设备设置 */
11
- export declare const getDeviceInfo: typeof Taro.getDeviceInfo;
11
+ declare const getDeviceInfo: typeof Taro.getDeviceInfo;
12
12
  /** 获取微信APP基础信息 */
13
- export declare const getAppBaseInfo: typeof Taro.getAppBaseInfo;
13
+ declare const getAppBaseInfo: typeof Taro.getAppBaseInfo;
14
14
  /** 获取微信APP授权设置 */
15
- export declare const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting;
15
+ declare const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting;
16
16
  /** 获取设备设置 */
17
- export declare const getSystemInfoSync: typeof Taro.getSystemInfoSync;
17
+ declare const getSystemInfoSync: typeof Taro.getSystemInfoSync;
18
18
  /** 获取系统信息 */
19
- export declare const getSystemInfoAsync: typeof Taro.getSystemInfoAsync;
19
+ declare const getSystemInfoAsync: typeof Taro.getSystemInfoAsync;
20
20
  /** 获取系统信息 */
21
- export declare const getSystemInfo: typeof Taro.getSystemInfo;
21
+ declare const getSystemInfo: typeof Taro.getSystemInfo;
22
+ export { openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo };
@@ -1,21 +1,14 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
1
+ import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js';
10
2
  import { getMobileDetect } from '@tarojs/router/dist/utils/navigate';
11
- import { temporarilyNotSupport } from '../../utils';
12
- import { MethodHandler } from '../../utils/handler';
3
+ import { temporarilyNotSupport } from '../../utils/index.js';
4
+ import { MethodHandler } from '../../utils/handler.js';
5
+
13
6
  /** 跳转系统蓝牙设置页 */
14
- export const openSystemBluetoothSetting = temporarilyNotSupport('openSystemBluetoothSetting');
7
+ const openSystemBluetoothSetting = temporarilyNotSupport('openSystemBluetoothSetting');
15
8
  /** 跳转系统微信授权管理页 */
16
- export const openAppAuthorizeSetting = temporarilyNotSupport('openAppAuthorizeSetting');
9
+ const openAppAuthorizeSetting = temporarilyNotSupport('openAppAuthorizeSetting');
17
10
  /** 获取窗口信息 */
18
- export const getWindowInfo = () => {
11
+ const getWindowInfo = () => {
19
12
  const info = {
20
13
  /** 设备像素比 */
21
14
  pixelRatio: window.devicePixelRatio,
@@ -42,7 +35,7 @@ export const getWindowInfo = () => {
42
35
  return info;
43
36
  };
44
37
  /** 获取设备设置 */
45
- export const getSystemSetting = () => {
38
+ const getSystemSetting = () => {
46
39
  const isLandscape = window.screen.width >= window.screen.height;
47
40
  const info = {
48
41
  /** 蓝牙的系统开关 */
@@ -57,11 +50,13 @@ export const getSystemSetting = () => {
57
50
  return info;
58
51
  };
59
52
  /** 获取设备设置 */
60
- export const getDeviceInfo = () => {
53
+ const getDeviceInfo = () => {
61
54
  const md = getMobileDetect();
62
55
  const info = {
63
56
  /** 应用二进制接口类型(仅 Android 支持) */
64
57
  abi: '',
58
+ /** 设备二进制接口类型(仅 Android 支持) */
59
+ deviceAbi: '',
65
60
  /** 设备性能等级(仅Android小游戏)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50) */
66
61
  benchmarkLevel: -1,
67
62
  /** 设备品牌 */
@@ -71,12 +66,14 @@ export const getDeviceInfo = () => {
71
66
  /** 操作系统及版本 */
72
67
  system: md.os(),
73
68
  /** 客户端平台 */
74
- platform: navigator.platform
69
+ platform: navigator.platform,
70
+ /** 设备二进制接口类型(仅 Android 支持) */
71
+ CPUType: '',
75
72
  };
76
73
  return info;
77
74
  };
78
75
  /** 获取微信APP基础信息 */
79
- export const getAppBaseInfo = () => {
76
+ const getAppBaseInfo = () => {
80
77
  var _a;
81
78
  let isDarkMode = false;
82
79
  if ((_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-color-scheme: dark)').matches) {
@@ -99,7 +96,7 @@ export const getAppBaseInfo = () => {
99
96
  return info;
100
97
  };
101
98
  /** 获取微信APP授权设置 */
102
- export const getAppAuthorizeSetting = () => {
99
+ const getAppAuthorizeSetting = () => {
103
100
  const info = {
104
101
  /** 允许微信使用相册的开关(仅 iOS 有效) */
105
102
  albumAuthorized: 'not determined',
@@ -127,7 +124,7 @@ export const getAppAuthorizeSetting = () => {
127
124
  return info;
128
125
  };
129
126
  /** 获取设备设置 */
130
- export const getSystemInfoSync = () => {
127
+ const getSystemInfoSync = () => {
131
128
  const windowInfo = getWindowInfo();
132
129
  const systemSetting = getSystemSetting();
133
130
  const deviceInfo = getDeviceInfo();
@@ -162,7 +159,7 @@ export const getSystemInfoSync = () => {
162
159
  return info;
163
160
  };
164
161
  /** 获取系统信息 */
165
- export const getSystemInfoAsync = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
162
+ const getSystemInfoAsync = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
166
163
  const { success, fail, complete } = options;
167
164
  const handle = new MethodHandler({ name: 'getSystemInfoAsync', success, fail, complete });
168
165
  try {
@@ -176,7 +173,7 @@ export const getSystemInfoAsync = (options = {}) => __awaiter(void 0, void 0, vo
176
173
  }
177
174
  });
178
175
  /** 获取系统信息 */
179
- export const getSystemInfo = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
176
+ const getSystemInfo = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
180
177
  const { success, fail, complete } = options;
181
178
  const handle = new MethodHandler({ name: 'getSystemInfo', success, fail, complete });
182
179
  try {
@@ -189,3 +186,6 @@ export const getSystemInfo = (options = {}) => __awaiter(void 0, void 0, void 0,
189
186
  });
190
187
  }
191
188
  });
189
+
190
+ export { getAppAuthorizeSetting, getAppBaseInfo, getDeviceInfo, getSystemInfo, getSystemInfoAsync, getSystemInfoSync, getSystemSetting, getWindowInfo, openAppAuthorizeSetting, openSystemBluetoothSetting };
191
+ //# sourceMappingURL=system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system.js","sources":["../../../src/api/base/system.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { getMobileDetect } from '@tarojs/router/dist/utils/navigate'\n\nimport { temporarilyNotSupport } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\n/** 跳转系统蓝牙设置页 */\nexport const openSystemBluetoothSetting = temporarilyNotSupport('openSystemBluetoothSetting')\n\n/** 跳转系统微信授权管理页 */\nexport const openAppAuthorizeSetting = temporarilyNotSupport('openAppAuthorizeSetting')\n\n/** 获取窗口信息 */\nexport const getWindowInfo: typeof Taro.getWindowInfo = () => {\n const info: ReturnType<typeof Taro.getWindowInfo> = {\n /** 设备像素比 */\n pixelRatio: window.devicePixelRatio,\n /** 屏幕宽度,单位px */\n screenWidth: window.screen.width,\n /** 屏幕高度,单位px */\n screenHeight: window.screen.height,\n /** 可使用窗口宽度,单位px */\n windowWidth: document.documentElement.clientWidth,\n /** 可使用窗口高度,单位px */\n windowHeight: document.documentElement.clientHeight,\n /** 状态栏的高度,单位px */\n statusBarHeight: NaN,\n /** 在竖屏正方向下的安全区域 */\n safeArea: {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0\n }\n }\n\n return info\n}\n\n/** 获取设备设置 */\nexport const getSystemSetting: typeof Taro.getSystemSetting = () => {\n const isLandscape = window.screen.width >= window.screen.height\n const info: ReturnType<typeof Taro.getSystemSetting> = {\n /** 蓝牙的系统开关 */\n bluetoothEnabled: false,\n /** 地理位置的系统开关 */\n locationEnabled: false,\n /** Wi-Fi 的系统开关 */\n wifiEnabled: false,\n /** 设备方向 */\n deviceOrientation: isLandscape ? 'landscape' : 'portrait'\n }\n\n return info\n}\n\n/** 获取设备设置 */\nexport const getDeviceInfo: typeof Taro.getDeviceInfo = () => {\n const md = getMobileDetect()\n\n const info: ReturnType<typeof Taro.getDeviceInfo> = {\n /** 应用二进制接口类型(仅 Android 支持) */\n abi: '',\n /** 设备二进制接口类型(仅 Android 支持) */\n deviceAbi: '',\n /** 设备性能等级(仅Android小游戏)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50) */\n benchmarkLevel: -1,\n /** 设备品牌 */\n brand: md.mobile() || '',\n /** 设备型号 */\n model: md.mobile() || '',\n /** 操作系统及版本 */\n system: md.os(),\n /** 客户端平台 */\n platform: navigator.platform,\n /** 设备二进制接口类型(仅 Android 支持) */\n CPUType: '',\n }\n\n return info\n}\n\n/** 获取微信APP基础信息 */\nexport const getAppBaseInfo: typeof Taro.getAppBaseInfo = () => {\n let isDarkMode = false\n if (window.matchMedia?.('(prefers-color-scheme: dark)').matches) {\n isDarkMode = true\n }\n\n const info: ReturnType<typeof Taro.getAppBaseInfo> = {\n /** 客户端基础库版本 */\n SDKVersion: '',\n /** 是否已打开调试。可通过右上角菜单或 [Taro.setEnableDebug](/docs/apis/base/debug/setEnableDebug) 打开调试。 */\n enableDebug: process.env.NODE_ENV !== 'production',\n /** 当前小程序运行的宿主环境 */\n // host: { appId: '' },\n /** 微信设置的语言 */\n language: navigator.language,\n /** 微信版本号 */\n version: '',\n /** 系统当前主题,取值为light或dark,全局配置\"darkmode\":true时才能获取,否则为 undefined (不支持小游戏) */\n theme: isDarkMode ? 'dark' : 'light'\n }\n\n return info\n}\n\n/** 获取微信APP授权设置 */\nexport const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting = () => {\n const info: ReturnType<typeof Taro.getAppAuthorizeSetting> = {\n /** 允许微信使用相册的开关(仅 iOS 有效) */\n albumAuthorized: 'not determined',\n /** 允许微信使用蓝牙的开关(仅 iOS 有效) */\n bluetoothAuthorized: 'not determined',\n /** 允许微信使用摄像头的开关 */\n cameraAuthorized: 'not determined',\n /** 允许微信使用定位的开关 */\n locationAuthorized: 'not determined',\n /** 定位准确度。true 表示模糊定位,false 表示精确定位(仅 iOS 有效) */\n locationReducedAccuracy: false,\n /** 允许微信使用麦克风的开关 */\n microphoneAuthorized: 'not determined',\n /** 允许微信通知的开关 */\n notificationAuthorized: 'not determined',\n /** 允许微信通知带有提醒的开关(仅 iOS 有效) */\n notificationAlertAuthorized: 'not determined',\n /** 允许微信通知带有标记的开关(仅 iOS 有效) */\n notificationBadgeAuthorized: 'not determined',\n /** 允许微信通知带有声音的开关(仅 iOS 有效) */\n notificationSoundAuthorized: 'not determined',\n /** 允许微信使用日历的开关 */\n phoneCalendarAuthorized: 'not determined'\n }\n\n return info\n}\n\n/** 获取设备设置 */\nexport const getSystemInfoSync: typeof Taro.getSystemInfoSync = () => {\n const windowInfo = getWindowInfo()\n const systemSetting = getSystemSetting()\n const deviceInfo: Taro.getDeviceInfo.Result = getDeviceInfo()\n const appBaseInfo = getAppBaseInfo()\n const appAuthorizeSetting = getAppAuthorizeSetting()\n delete deviceInfo.abi\n\n const info: ReturnType<typeof Taro.getSystemInfoSync> = {\n ...windowInfo,\n ...systemSetting,\n ...deviceInfo,\n ...appBaseInfo,\n /** 用户字体大小(单位px)。以微信客户端「我-设置-通用-字体大小」中的设置为准 */\n fontSizeSetting: NaN,\n /** 允许微信使用相册的开关(仅 iOS 有效) */\n albumAuthorized: appAuthorizeSetting.albumAuthorized === 'authorized',\n /** 允许微信使用摄像头的开关 */\n cameraAuthorized: appAuthorizeSetting.cameraAuthorized === 'authorized',\n /** 允许微信使用定位的开关 */\n locationAuthorized: appAuthorizeSetting.locationAuthorized === 'authorized',\n /** 允许微信使用麦克风的开关 */\n microphoneAuthorized: appAuthorizeSetting.microphoneAuthorized === 'authorized',\n /** 允许微信通知的开关 */\n notificationAuthorized: appAuthorizeSetting.notificationAuthorized === 'authorized',\n /** 允许微信通知带有提醒的开关(仅 iOS 有效) */\n notificationAlertAuthorized: appAuthorizeSetting.notificationAlertAuthorized === 'authorized',\n /** 允许微信通知带有标记的开关(仅 iOS 有效) */\n notificationBadgeAuthorized: appAuthorizeSetting.notificationBadgeAuthorized === 'authorized',\n /** 允许微信通知带有声音的开关(仅 iOS 有效) */\n notificationSoundAuthorized: appAuthorizeSetting.notificationSoundAuthorized === 'authorized',\n /** 允许微信使用日历的开关 */\n phoneCalendarAuthorized: appAuthorizeSetting.phoneCalendarAuthorized === 'authorized',\n /** `true` 表示模糊定位,`false` 表示精确定位,仅 iOS 支持 */\n locationReducedAccuracy: appAuthorizeSetting.locationReducedAccuracy,\n /** 小程序当前运行环境 */\n environment: ''\n }\n\n return info\n}\n\n/** 获取系统信息 */\nexport const getSystemInfoAsync: typeof Taro.getSystemInfoAsync = async (options = {}) => {\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'getSystemInfoAsync', success, fail, complete })\n\n try {\n const info = await getSystemInfoSync()\n return handle.success(info)\n } catch (error) {\n return handle.fail({\n errMsg: error\n })\n }\n}\n\n/** 获取系统信息 */\nexport const getSystemInfo: typeof Taro.getSystemInfo = async (options = {}) => {\n const { success, fail, complete } = options\n const handle = new MethodHandler({ name: 'getSystemInfo', success, fail, complete })\n\n try {\n const info = await getSystemInfoSync()\n return handle.success(info)\n } catch (error) {\n return handle.fail({\n errMsg: error\n })\n }\n}\n"],"names":[],"mappings":";;;;;AAMA;MACa,0BAA0B,GAAG,qBAAqB,CAAC,4BAA4B,EAAC;AAE7F;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;AAEvF;AACO,MAAM,aAAa,GAA8B,MAAK;AAC3D,IAA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: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export declare const getUpdateManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
1
+ declare const updateWeChatApp: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ declare const getUpdateManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { updateWeChatApp, getUpdateManager };
@@ -1,4 +1,8 @@
1
- import { temporarilyNotSupport } from '../../utils';
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
2
3
  // 更新
3
- export const updateWeChatApp = temporarilyNotSupport('updateWeChatApp');
4
- export const getUpdateManager = temporarilyNotSupport('getUpdateManager');
4
+ const updateWeChatApp = temporarilyNotSupport('updateWeChatApp');
5
+ const getUpdateManager = temporarilyNotSupport('getUpdateManager');
6
+
7
+ export { getUpdateManager, updateWeChatApp };
8
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sources":["../../../src/api/base/update.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 更新\nexport const updateWeChatApp = temporarilyNotSupport('updateWeChatApp')\nexport const getUpdateManager = temporarilyNotSupport('getUpdateManager')\n"],"names":[],"mappings":";;AAEA;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB;;;;"}
@@ -1,17 +1,18 @@
1
1
  import Taro from '@tarojs/api';
2
- export declare const onUnhandledRejection: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
- export declare const onThemeChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
- export declare const onPageNotFound: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
- export declare const onError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
- export declare const onAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
- export declare const onAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
8
- export declare const onAppShow: typeof Taro.onAppShow;
9
- export declare const onAppHide: typeof Taro.onAppHide;
10
- export declare const offUnhandledRejection: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
11
- export declare const offThemeChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
12
- export declare const offPageNotFound: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
13
- export declare const offError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
14
- export declare const offAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
15
- export declare const offAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
16
- export declare const offAppShow: typeof Taro.offWindowResize;
17
- export declare const offAppHide: typeof Taro.offWindowResize;
2
+ declare const onUnhandledRejection: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ declare const onThemeChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
+ declare const onPageNotFound: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
+ declare const onError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
+ declare const onAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
+ declare const onAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
8
+ declare const onAppShow: typeof Taro.onAppShow;
9
+ declare const onAppHide: typeof Taro.onAppHide;
10
+ declare const offUnhandledRejection: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
11
+ declare const offThemeChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
12
+ declare const offPageNotFound: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
13
+ declare const offError: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
14
+ declare const offAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
15
+ declare const offAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
16
+ declare const offAppShow: typeof Taro.offWindowResize;
17
+ declare const offAppHide: typeof Taro.offWindowResize;
18
+ export { onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide };
@@ -1,7 +1,8 @@
1
1
  import Taro from '@tarojs/api';
2
2
  import { parse } from 'query-string';
3
- import { temporarilyNotSupport } from '../../../utils';
4
- import { CallbackManager } from '../../../utils/handler';
3
+ import { temporarilyNotSupport } from '../../../utils/index.js';
4
+ import { CallbackManager } from '../../../utils/handler.js';
5
+
5
6
  const appShowCallbackManager = new CallbackManager();
6
7
  const appHideCallbackManager = new CallbackManager();
7
8
  const getApp = () => {
@@ -31,39 +32,42 @@ const appHideListener = () => {
31
32
  }
32
33
  };
33
34
  // 应用级事件
34
- export const onUnhandledRejection = temporarilyNotSupport('onUnhandledRejection');
35
- export const onThemeChange = temporarilyNotSupport('onThemeChange');
36
- export const onPageNotFound = temporarilyNotSupport('onPageNotFound');
37
- export const onError = temporarilyNotSupport('onError');
38
- export const onAudioInterruptionEnd = temporarilyNotSupport('onAudioInterruptionEnd');
39
- export const onAudioInterruptionBegin = temporarilyNotSupport('onAudioInterruptionBegin');
40
- export const onAppShow = callback => {
35
+ const onUnhandledRejection = temporarilyNotSupport('onUnhandledRejection');
36
+ const onThemeChange = temporarilyNotSupport('onThemeChange');
37
+ const onPageNotFound = temporarilyNotSupport('onPageNotFound');
38
+ const onError = temporarilyNotSupport('onError');
39
+ const onAudioInterruptionEnd = temporarilyNotSupport('onAudioInterruptionEnd');
40
+ const onAudioInterruptionBegin = temporarilyNotSupport('onAudioInterruptionBegin');
41
+ const onAppShow = callback => {
41
42
  appShowCallbackManager.add(callback);
42
43
  if (appShowCallbackManager.count() === 1) {
43
44
  window.addEventListener('visibilitychange', appShowListener);
44
45
  }
45
46
  };
46
- export const onAppHide = callback => {
47
+ const onAppHide = callback => {
47
48
  appHideCallbackManager.add(callback);
48
49
  if (appHideCallbackManager.count() === 1) {
49
50
  window.addEventListener('visibilitychange', appHideListener);
50
51
  }
51
52
  };
52
- export const offUnhandledRejection = temporarilyNotSupport('offUnhandledRejection');
53
- export const offThemeChange = temporarilyNotSupport('offThemeChange');
54
- export const offPageNotFound = temporarilyNotSupport('offPageNotFound');
55
- export const offError = temporarilyNotSupport('offError');
56
- export const offAudioInterruptionEnd = temporarilyNotSupport('offAudioInterruptionEnd');
57
- export const offAudioInterruptionBegin = temporarilyNotSupport('offAudioInterruptionBegin');
58
- export const offAppShow = callback => {
53
+ const offUnhandledRejection = temporarilyNotSupport('offUnhandledRejection');
54
+ const offThemeChange = temporarilyNotSupport('offThemeChange');
55
+ const offPageNotFound = temporarilyNotSupport('offPageNotFound');
56
+ const offError = temporarilyNotSupport('offError');
57
+ const offAudioInterruptionEnd = temporarilyNotSupport('offAudioInterruptionEnd');
58
+ const offAudioInterruptionBegin = temporarilyNotSupport('offAudioInterruptionBegin');
59
+ const offAppShow = callback => {
59
60
  appShowCallbackManager.remove(callback);
60
61
  if (appShowCallbackManager.count() === 0) {
61
62
  window.removeEventListener('visibilitychange', appShowListener);
62
63
  }
63
64
  };
64
- export const offAppHide = callback => {
65
+ const offAppHide = callback => {
65
66
  appHideCallbackManager.remove(callback);
66
67
  if (appHideCallbackManager.count() === 0) {
67
68
  window.removeEventListener('visibilitychange', appHideListener);
68
69
  }
69
70
  };
71
+
72
+ export { offAppHide, offAppShow, offAudioInterruptionBegin, offAudioInterruptionEnd, offError, offPageNotFound, offThemeChange, offUnhandledRejection, onAppHide, onAppShow, onAudioInterruptionBegin, onAudioInterruptionEnd, onError, onPageNotFound, onThemeChange, onUnhandledRejection };
73
+ //# sourceMappingURL=app-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-event.js","sources":["../../../../src/api/base/weapp/app-event.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { parse } from 'query-string'\n\nimport { temporarilyNotSupport } from '../../../utils'\nimport { CallbackManager } from '../../../utils/handler'\n\nconst appShowCallbackManager = new CallbackManager()\nconst appHideCallbackManager = new CallbackManager()\n\nconst getApp = () => {\n const path = Taro.Current.page?.path\n return {\n /** 小程序切前台的路径 */\n path: path?.substring(0, path.indexOf('?')),\n /** 小程序切前台的 query 参数 */\n query: parse(location.search),\n /** 来源信息。 */\n referrerInfo: {},\n /** 小程序切前台的[场景值](https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/scene.html) */\n scene: 0,\n /** shareTicket,详见[获取更多转发信息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html) */\n shareTicket: ''\n }\n}\n\nconst appShowListener = () => {\n if (document.visibilityState !== 'hidden') {\n appShowCallbackManager.trigger(getApp())\n }\n}\n\nconst appHideListener = () => {\n if (document.visibilityState === 'hidden') {\n appHideCallbackManager.trigger(getApp())\n }\n}\n\n// 应用级事件\nexport const onUnhandledRejection = temporarilyNotSupport('onUnhandledRejection')\nexport const onThemeChange = temporarilyNotSupport('onThemeChange')\nexport const onPageNotFound = temporarilyNotSupport('onPageNotFound')\nexport const onError = temporarilyNotSupport('onError')\nexport const onAudioInterruptionEnd = temporarilyNotSupport('onAudioInterruptionEnd')\nexport const onAudioInterruptionBegin = temporarilyNotSupport('onAudioInterruptionBegin')\n\nexport const onAppShow: typeof Taro.onAppShow = callback => {\n appShowCallbackManager.add(callback)\n if (appShowCallbackManager.count() === 1) {\n window.addEventListener('visibilitychange', appShowListener)\n }\n}\n\nexport const onAppHide: typeof Taro.onAppHide = callback => {\n appHideCallbackManager.add(callback)\n if (appHideCallbackManager.count() === 1) {\n window.addEventListener('visibilitychange', appHideListener)\n }\n}\n\nexport const offUnhandledRejection = temporarilyNotSupport('offUnhandledRejection')\nexport const offThemeChange = temporarilyNotSupport('offThemeChange')\nexport const offPageNotFound = temporarilyNotSupport('offPageNotFound')\nexport const offError = temporarilyNotSupport('offError')\nexport const offAudioInterruptionEnd = temporarilyNotSupport('offAudioInterruptionEnd')\nexport const offAudioInterruptionBegin = temporarilyNotSupport('offAudioInterruptionBegin')\n\nexport const offAppShow: typeof Taro.offWindowResize = callback => {\n appShowCallbackManager.remove(callback)\n if (appShowCallbackManager.count() === 0) {\n window.removeEventListener('visibilitychange', appShowListener)\n }\n}\n\nexport const offAppHide: typeof Taro.offWindowResize = callback => {\n appHideCallbackManager.remove(callback)\n if (appHideCallbackManager.count() === 0) {\n window.removeEventListener('visibilitychange', appHideListener)\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,sBAAsB,GAAG,IAAI,eAAe,EAAE,CAAA;AACpD,MAAM,sBAAsB,GAAG,IAAI,eAAe,EAAE,CAAA;AAEpD,MAAM,MAAM,GAAG,MAAK;;IAClB,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAA;IACpC,OAAO;;AAEL,QAAA,IAAI,EAAE,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJ,IAAI,CAAE,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;;AAE3C,QAAA,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;;AAE7B,QAAA,YAAY,EAAE,EAAE;;AAEhB,QAAA,KAAK,EAAE,CAAC;;AAER,QAAA,WAAW,EAAE,EAAE;KAChB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,MAAK;AAC3B,IAAA,IAAI,QAAQ,CAAC,eAAe,KAAK,QAAQ,EAAE;AACzC,QAAA,sBAAsB,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AACzC,KAAA;AACH,CAAC,CAAA;AAED,MAAM,eAAe,GAAG,MAAK;AAC3B,IAAA,IAAI,QAAQ,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AAgC,QAAQ,IAAG;AAChE,IAAA,sBAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACvC,IAAA,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACxC,QAAA,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAA;AAChE,KAAA;AACH,EAAC;AAEY,MAAA,UAAU,GAAgC,QAAQ,IAAG;AAChE,IAAA,sBAAsB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACvC,IAAA,IAAI,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACxC,QAAA,MAAM,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAA;AAChE,KAAA;AACH;;;;"}
@@ -1,3 +1,4 @@
1
1
  import Taro from '@tarojs/api';
2
- export declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
3
- export declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
2
+ declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
3
+ declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
4
+ export { getLaunchOptionsSync, getEnterOptionsSync };