@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.
- package/dist/api/ad/index.d.ts +3 -2
- package/dist/api/ad/index.js +7 -3
- package/dist/api/ad/index.js.map +1 -0
- package/dist/api/ai/facial.d.ts +4 -3
- package/dist/api/ai/facial.js +8 -4
- package/dist/api/ai/facial.js.map +1 -0
- package/dist/api/ai/index.d.ts +2 -2
- package/dist/api/ai/index.js +3 -2
- package/dist/api/ai/index.js.map +1 -0
- package/dist/api/ai/visual.d.ts +3 -2
- package/dist/api/ai/visual.js +7 -3
- package/dist/api/ai/visual.js.map +1 -0
- package/dist/api/alipay/index.d.ts +2 -1
- package/dist/api/alipay/index.js +6 -2
- package/dist/api/alipay/index.js.map +1 -0
- package/dist/api/base/crypto.d.ts +2 -1
- package/dist/api/base/crypto.js +6 -2
- package/dist/api/base/crypto.js.map +1 -0
- package/dist/api/base/debug.d.ts +4 -3
- package/dist/api/base/debug.js +8 -4
- package/dist/api/base/debug.js.map +1 -0
- package/dist/api/base/index.d.ts +16 -10
- package/dist/api/base/index.js +20 -12
- package/dist/api/base/index.js.map +1 -0
- package/dist/api/base/performance.d.ts +3 -2
- package/dist/api/base/performance.js +7 -3
- package/dist/api/base/performance.js.map +1 -0
- package/dist/api/base/system.d.ts +11 -10
- package/dist/api/base/system.js +22 -22
- package/dist/api/base/system.js.map +1 -0
- package/dist/api/base/update.d.ts +3 -2
- package/dist/api/base/update.js +7 -3
- package/dist/api/base/update.js.map +1 -0
- package/dist/api/base/weapp/app-event.d.ts +17 -16
- package/dist/api/base/weapp/app-event.js +22 -18
- package/dist/api/base/weapp/app-event.js.map +1 -0
- package/dist/api/base/weapp/life-cycle.d.ts +3 -2
- package/dist/api/base/weapp/life-cycle.js +6 -2
- package/dist/api/base/weapp/life-cycle.js.map +1 -0
- package/dist/api/canvas/CanvasContext.d.ts +7 -2
- package/dist/api/canvas/CanvasContext.js +6 -10
- package/dist/api/canvas/CanvasContext.js.map +1 -0
- package/dist/api/canvas/canvasGetImageData.d.ts +2 -1
- package/dist/api/canvas/canvasGetImageData.js +7 -3
- package/dist/api/canvas/canvasGetImageData.js.map +1 -0
- package/dist/api/canvas/canvasPutImageData.d.ts +2 -1
- package/dist/api/canvas/canvasPutImageData.js +7 -3
- package/dist/api/canvas/canvasPutImageData.js.map +1 -0
- package/dist/api/canvas/canvasToTempFilePath.d.ts +2 -1
- package/dist/api/canvas/canvasToTempFilePath.js +7 -3
- package/dist/api/canvas/canvasToTempFilePath.js.map +1 -0
- package/dist/api/canvas/createCanvasContext.d.ts +2 -1
- package/dist/api/canvas/createCanvasContext.js +7 -3
- package/dist/api/canvas/createCanvasContext.js.map +1 -0
- package/dist/api/canvas/index.d.ts +6 -5
- package/dist/api/canvas/index.js +10 -10
- package/dist/api/canvas/index.js.map +1 -0
- package/dist/api/cloud/index.d.ts +2 -1
- package/dist/api/cloud/index.js +6 -2
- package/dist/api/cloud/index.js.map +1 -0
- package/dist/api/data-analysis/index.d.ts +5 -4
- package/dist/api/data-analysis/index.js +9 -5
- package/dist/api/data-analysis/index.js.map +1 -0
- package/dist/api/device/accelerometer.d.ts +5 -4
- package/dist/api/device/accelerometer.js +11 -6
- package/dist/api/device/accelerometer.js.map +1 -0
- package/dist/api/device/accessibility.d.ts +2 -1
- package/dist/api/device/accessibility.js +6 -2
- package/dist/api/device/accessibility.js.map +1 -0
- package/dist/api/device/battery.d.ts +3 -2
- package/dist/api/device/battery.js +9 -13
- package/dist/api/device/battery.js.map +1 -0
- package/dist/api/device/bluetooth-ble.d.ts +17 -16
- package/dist/api/device/bluetooth-ble.js +21 -17
- package/dist/api/device/bluetooth-ble.js.map +1 -0
- package/dist/api/device/bluetooth-peripheral.d.ts +4 -3
- package/dist/api/device/bluetooth-peripheral.js +8 -4
- package/dist/api/device/bluetooth-peripheral.js.map +1 -0
- package/dist/api/device/bluetooth.d.ts +14 -13
- package/dist/api/device/bluetooth.js +18 -14
- package/dist/api/device/bluetooth.js.map +1 -0
- package/dist/api/device/calendar.d.ts +3 -2
- package/dist/api/device/calendar.js +7 -3
- package/dist/api/device/calendar.js.map +1 -0
- package/dist/api/device/clipboard.d.ts +3 -2
- package/dist/api/device/clipboard.js +10 -14
- package/dist/api/device/clipboard.js.map +1 -0
- package/dist/api/device/compass.d.ts +5 -4
- package/dist/api/device/compass.js +12 -7
- package/dist/api/device/compass.js.map +1 -0
- package/dist/api/device/contact.d.ts +3 -2
- package/dist/api/device/contact.js +7 -3
- package/dist/api/device/contact.js.map +1 -0
- package/dist/api/device/crypto.d.ts +2 -1
- package/dist/api/device/crypto.js +6 -2
- package/dist/api/device/crypto.js.map +1 -0
- package/dist/api/device/gyroscope.d.ts +5 -4
- package/dist/api/device/gyroscope.js +9 -5
- package/dist/api/device/gyroscope.js.map +1 -0
- package/dist/api/device/iBeacon.d.ts +8 -7
- package/dist/api/device/iBeacon.js +12 -8
- package/dist/api/device/iBeacon.js.map +1 -0
- package/dist/api/device/index.d.ts +23 -23
- package/dist/api/device/index.js +24 -23
- package/dist/api/device/index.js.map +1 -0
- package/dist/api/device/keyboard.d.ts +5 -4
- package/dist/api/device/keyboard.js +9 -5
- package/dist/api/device/keyboard.js.map +1 -0
- package/dist/api/device/memory.d.ts +3 -2
- package/dist/api/device/memory.js +7 -3
- package/dist/api/device/memory.js.map +1 -0
- package/dist/api/device/motion.d.ts +5 -4
- package/dist/api/device/motion.js +11 -6
- package/dist/api/device/motion.js.map +1 -0
- package/dist/api/device/network.d.ts +7 -6
- package/dist/api/device/network.js +13 -17
- package/dist/api/device/network.js.map +1 -0
- package/dist/api/device/nfc.d.ts +8 -7
- package/dist/api/device/nfc.js +12 -8
- package/dist/api/device/nfc.js.map +1 -0
- package/dist/api/device/phone.d.ts +2 -1
- package/dist/api/device/phone.js +7 -3
- package/dist/api/device/phone.js.map +1 -0
- package/dist/api/device/scan.d.ts +2 -1
- package/dist/api/device/scan.js +6 -2
- package/dist/api/device/scan.js.map +1 -0
- package/dist/api/device/screen.d.ts +7 -6
- package/dist/api/device/screen.js +11 -7
- package/dist/api/device/screen.js.map +1 -0
- package/dist/api/device/vibrate.d.ts +3 -2
- package/dist/api/device/vibrate.js +7 -3
- package/dist/api/device/vibrate.js.map +1 -0
- package/dist/api/device/wifi.d.ts +12 -11
- package/dist/api/device/wifi.js +16 -12
- package/dist/api/device/wifi.js.map +1 -0
- package/dist/api/ext/index.d.ts +3 -2
- package/dist/api/ext/index.js +7 -3
- package/dist/api/ext/index.js.map +1 -0
- package/dist/api/files/index.d.ts +9 -8
- package/dist/api/files/index.js +13 -9
- package/dist/api/files/index.js.map +1 -0
- package/dist/api/framework/index.d.ts +3 -2
- package/dist/api/framework/index.js +7 -3
- package/dist/api/framework/index.js.map +1 -0
- package/dist/api/index.d.ts +24 -24
- package/dist/api/index.js +117 -24
- package/dist/api/index.js.map +1 -0
- package/dist/api/location/chooseLocation.d.ts +2 -2
- package/dist/api/location/chooseLocation.js +8 -14
- package/dist/api/location/chooseLocation.js.map +1 -0
- package/dist/api/location/getLocation.d.ts +2 -1
- package/dist/api/location/getLocation.js +7 -3
- package/dist/api/location/getLocation.js.map +1 -0
- package/dist/api/location/index.d.ts +13 -12
- package/dist/api/location/index.js +17 -13
- package/dist/api/location/index.js.map +1 -0
- package/dist/api/location/style.scss.js +8 -0
- package/dist/api/location/style.scss.js.map +1 -0
- package/dist/api/media/audio/InnerAudioContext.d.ts +3 -2
- package/dist/api/media/audio/InnerAudioContext.js +7 -3
- package/dist/api/media/audio/InnerAudioContext.js.map +1 -0
- package/dist/api/media/audio/index.d.ts +10 -9
- package/dist/api/media/audio/index.js +15 -11
- package/dist/api/media/audio/index.js.map +1 -0
- package/dist/api/media/background-audio/BackgroundAudioManager.d.ts +3 -2
- package/dist/api/media/background-audio/BackgroundAudioManager.js +7 -3
- package/dist/api/media/background-audio/BackgroundAudioManager.js.map +1 -0
- package/dist/api/media/background-audio/index.d.ts +11 -10
- package/dist/api/media/background-audio/index.js +15 -11
- package/dist/api/media/background-audio/index.js.map +1 -0
- package/dist/api/media/camera.d.ts +2 -1
- package/dist/api/media/camera.js +6 -2
- package/dist/api/media/camera.js.map +1 -0
- package/dist/api/media/image/chooseImage.d.ts +2 -1
- package/dist/api/media/image/chooseImage.js +7 -3
- package/dist/api/media/image/chooseImage.js.map +1 -0
- package/dist/api/media/image/getImageInfo.d.ts +2 -1
- package/dist/api/media/image/getImageInfo.js +7 -3
- package/dist/api/media/image/getImageInfo.js.map +1 -0
- package/dist/api/media/image/index.d.ts +8 -7
- package/dist/api/media/image/index.js +12 -8
- package/dist/api/media/image/index.js.map +1 -0
- package/dist/api/media/image/previewImage.d.ts +2 -1
- package/dist/api/media/image/previewImage.js +15 -12
- package/dist/api/media/image/previewImage.js.map +1 -0
- package/dist/api/media/index.d.ts +12 -12
- package/dist/api/media/index.js +13 -12
- package/dist/api/media/index.js.map +1 -0
- package/dist/api/media/live.d.ts +3 -2
- package/dist/api/media/live.js +7 -3
- package/dist/api/media/live.js.map +1 -0
- package/dist/api/media/map.d.ts +2 -1
- package/dist/api/media/map.js +6 -2
- package/dist/api/media/map.js.map +1 -0
- package/dist/api/media/media-recorder.d.ts +2 -1
- package/dist/api/media/media-recorder.js +6 -2
- package/dist/api/media/media-recorder.js.map +1 -0
- package/dist/api/media/recorder.d.ts +4 -3
- package/dist/api/media/recorder.js +8 -4
- package/dist/api/media/recorder.js.map +1 -0
- package/dist/api/media/video/index.d.ts +8 -7
- package/dist/api/media/video/index.js +13 -9
- package/dist/api/media/video/index.js.map +1 -0
- package/dist/api/media/video-decoder.d.ts +2 -1
- package/dist/api/media/video-decoder.js +6 -2
- package/dist/api/media/video-decoder.js.map +1 -0
- package/dist/api/media/video-processing.d.ts +2 -1
- package/dist/api/media/video-processing.js +6 -2
- package/dist/api/media/video-processing.js.map +1 -0
- package/dist/api/media/voip.d.ts +15 -14
- package/dist/api/media/voip.js +19 -15
- package/dist/api/media/voip.js.map +1 -0
- package/dist/api/navigate/index.d.ts +6 -5
- package/dist/api/navigate/index.js +10 -6
- package/dist/api/navigate/index.js.map +1 -0
- package/dist/api/network/download.d.ts +2 -1
- package/dist/api/network/download.js +14 -5
- package/dist/api/network/download.js.map +1 -0
- package/dist/api/network/index.d.ts +7 -7
- package/dist/api/network/index.js +8 -7
- package/dist/api/network/index.js.map +1 -0
- package/dist/api/network/mdns.d.ts +11 -10
- package/dist/api/network/mdns.js +15 -11
- package/dist/api/network/mdns.js.map +1 -0
- package/dist/api/network/request/index.d.ts +3 -3
- package/dist/api/network/request/index.js +8 -4
- package/dist/api/network/request/index.js.map +1 -0
- package/dist/api/network/tcp.d.ts +2 -1
- package/dist/api/network/tcp.js +6 -2
- package/dist/api/network/tcp.js.map +1 -0
- package/dist/api/network/udp.d.ts +2 -1
- package/dist/api/network/udp.js +6 -2
- package/dist/api/network/udp.js.map +1 -0
- package/dist/api/network/upload.d.ts +2 -1
- package/dist/api/network/upload.js +14 -5
- package/dist/api/network/upload.js.map +1 -0
- package/dist/api/network/utils.d.ts +5 -4
- package/dist/api/network/utils.js +7 -4
- package/dist/api/network/utils.js.map +1 -0
- package/dist/api/network/websocket/index.d.ts +8 -7
- package/dist/api/network/websocket/index.js +14 -10
- package/dist/api/network/websocket/index.js.map +1 -0
- package/dist/api/network/websocket/socketTask.d.ts +2 -1
- package/dist/api/network/websocket/socketTask.js +5 -1
- package/dist/api/network/websocket/socketTask.js.map +1 -0
- package/dist/api/open-api/account.d.ts +2 -1
- package/dist/api/open-api/account.js +6 -2
- package/dist/api/open-api/account.js.map +1 -0
- package/dist/api/open-api/address.d.ts +2 -1
- package/dist/api/open-api/address.js +6 -2
- package/dist/api/open-api/address.js.map +1 -0
- package/dist/api/open-api/authorize.d.ts +3 -2
- package/dist/api/open-api/authorize.js +7 -3
- package/dist/api/open-api/authorize.js.map +1 -0
- package/dist/api/open-api/card.d.ts +3 -2
- package/dist/api/open-api/card.js +7 -3
- package/dist/api/open-api/card.js.map +1 -0
- package/dist/api/open-api/channels-live.d.ts +7 -6
- package/dist/api/open-api/channels-live.js +11 -7
- package/dist/api/open-api/channels-live.js.map +1 -0
- package/dist/api/open-api/customer-service.d.ts +2 -1
- package/dist/api/open-api/customer-service.js +6 -2
- package/dist/api/open-api/customer-service.js.map +1 -0
- package/dist/api/open-api/facial.d.ts +5 -4
- package/dist/api/open-api/facial.js +9 -5
- package/dist/api/open-api/facial.js.map +1 -0
- package/dist/api/open-api/favorites.d.ts +3 -2
- package/dist/api/open-api/favorites.js +7 -3
- package/dist/api/open-api/favorites.js.map +1 -0
- package/dist/api/open-api/group.d.ts +2 -1
- package/dist/api/open-api/group.js +6 -2
- package/dist/api/open-api/group.js.map +1 -0
- package/dist/api/open-api/index.d.ts +18 -18
- package/dist/api/open-api/index.js +19 -18
- package/dist/api/open-api/index.js.map +1 -0
- package/dist/api/open-api/invoice.d.ts +3 -2
- package/dist/api/open-api/invoice.js +7 -3
- package/dist/api/open-api/invoice.js.map +1 -0
- package/dist/api/open-api/license-plate.d.ts +2 -1
- package/dist/api/open-api/license-plate.js +6 -2
- package/dist/api/open-api/license-plate.js.map +1 -0
- package/dist/api/open-api/login.d.ts +4 -3
- package/dist/api/open-api/login.js +8 -4
- package/dist/api/open-api/login.js.map +1 -0
- package/dist/api/open-api/red-package.d.ts +2 -1
- package/dist/api/open-api/red-package.js +6 -2
- package/dist/api/open-api/red-package.js.map +1 -0
- package/dist/api/open-api/settings.d.ts +3 -2
- package/dist/api/open-api/settings.js +7 -3
- package/dist/api/open-api/settings.js.map +1 -0
- package/dist/api/open-api/soter.d.ts +4 -3
- package/dist/api/open-api/soter.js +8 -4
- package/dist/api/open-api/soter.js.map +1 -0
- package/dist/api/open-api/subscribe-message.d.ts +2 -1
- package/dist/api/open-api/subscribe-message.js +6 -2
- package/dist/api/open-api/subscribe-message.js.map +1 -0
- package/dist/api/open-api/user-info.d.ts +3 -2
- package/dist/api/open-api/user-info.js +7 -3
- package/dist/api/open-api/user-info.js.map +1 -0
- package/dist/api/open-api/werun.d.ts +3 -2
- package/dist/api/open-api/werun.js +7 -3
- package/dist/api/open-api/werun.js.map +1 -0
- package/dist/api/payment/index.d.ts +3 -2
- package/dist/api/payment/index.js +7 -3
- package/dist/api/payment/index.js.map +1 -0
- package/dist/api/route/index.js +3 -1
- package/dist/api/route/index.js.map +1 -0
- package/dist/api/share/index.d.ts +11 -10
- package/dist/api/share/index.js +15 -11
- package/dist/api/share/index.js.map +1 -0
- package/dist/api/storage/background-fetch.d.ts +5 -4
- package/dist/api/storage/background-fetch.js +9 -5
- package/dist/api/storage/background-fetch.js.map +1 -0
- package/dist/api/storage/index.d.ts +14 -13
- package/dist/api/storage/index.js +19 -15
- package/dist/api/storage/index.js.map +1 -0
- package/dist/api/swan/index.d.ts +22 -21
- package/dist/api/swan/index.js +26 -22
- package/dist/api/swan/index.js.map +1 -0
- package/dist/api/taro.d.ts +1 -2
- package/dist/api/taro.js +17 -12
- package/dist/api/taro.js.map +1 -0
- package/dist/api/ui/animation/index.d.ts +2 -1
- package/dist/api/ui/animation/index.js +4 -1
- package/dist/api/ui/animation/index.js.map +1 -0
- package/dist/api/ui/background.d.ts +3 -2
- package/dist/api/ui/background.js +7 -3
- package/dist/api/ui/background.js.map +1 -0
- package/dist/api/ui/custom-component.d.ts +2 -1
- package/dist/api/ui/custom-component.js +5 -1
- package/dist/api/ui/custom-component.js.map +1 -0
- package/dist/api/ui/fonts.d.ts +2 -1
- package/dist/api/ui/fonts.js +7 -11
- package/dist/api/ui/fonts.js.map +1 -0
- package/dist/api/ui/index.d.ts +12 -12
- package/dist/api/ui/index.js +13 -12
- package/dist/api/ui/index.js.map +1 -0
- package/dist/api/ui/interaction/actionSheet.d.ts +2 -1
- package/dist/api/ui/interaction/actionSheet.js +6 -2
- package/dist/api/ui/interaction/actionSheet.js.map +1 -0
- package/dist/api/ui/interaction/index.js +9 -14
- package/dist/api/ui/interaction/index.js.map +1 -0
- package/dist/api/ui/interaction/modal.d.ts +2 -1
- package/dist/api/ui/interaction/modal.js +8 -4
- package/dist/api/ui/interaction/modal.js.map +1 -0
- package/dist/api/ui/interaction/toast.d.ts +2 -1
- package/dist/api/ui/interaction/toast.js +8 -4
- package/dist/api/ui/interaction/toast.js.map +1 -0
- package/dist/api/ui/menu.d.ts +2 -1
- package/dist/api/ui/menu.js +6 -2
- package/dist/api/ui/menu.js.map +1 -0
- package/dist/api/ui/navigation-bar/index.d.ts +6 -5
- package/dist/api/ui/navigation-bar/index.js +11 -7
- package/dist/api/ui/navigation-bar/index.js.map +1 -0
- package/dist/api/ui/pull-down-refresh.d.ts +3 -2
- package/dist/api/ui/pull-down-refresh.js +7 -3
- package/dist/api/ui/pull-down-refresh.js.map +1 -0
- package/dist/api/ui/scroll/index.d.ts +2 -1
- package/dist/api/ui/scroll/index.js +8 -3
- package/dist/api/ui/scroll/index.js.map +1 -0
- package/dist/api/ui/sticky.d.ts +2 -1
- package/dist/api/ui/sticky.js +6 -2
- package/dist/api/ui/sticky.js.map +1 -0
- package/dist/api/ui/tab-bar.d.ts +12 -10
- package/dist/api/ui/tab-bar.js +16 -11
- package/dist/api/ui/tab-bar.js.map +1 -0
- package/dist/api/ui/window.d.ts +4 -3
- package/dist/api/ui/window.js +9 -5
- package/dist/api/ui/window.js.map +1 -0
- package/dist/api/worker/index.d.ts +2 -1
- package/dist/api/worker/index.js +6 -2
- package/dist/api/worker/index.js.map +1 -0
- package/dist/api/wxml/IntersectionObserver.d.ts +20 -0
- package/dist/api/wxml/IntersectionObserver.js +108 -0
- package/dist/api/wxml/IntersectionObserver.js.map +1 -0
- package/dist/api/wxml/MediaQueryObserver.d.ts +10 -0
- package/dist/api/wxml/MediaQueryObserver.js +54 -0
- package/dist/api/wxml/MediaQueryObserver.js.map +1 -0
- package/dist/api/wxml/index.d.ts +4 -2
- package/dist/api/wxml/index.js +14 -4
- package/dist/api/wxml/index.js.map +1 -0
- package/dist/api/wxml/nodesRef.d.ts +3 -2
- package/dist/api/wxml/nodesRef.js +4 -1
- package/dist/api/wxml/nodesRef.js.map +1 -0
- package/dist/api/wxml/selectorQuery.d.ts +4 -4
- package/dist/api/wxml/selectorQuery.js +15 -6
- package/dist/api/wxml/selectorQuery.js.map +1 -0
- package/dist/index.cjs.d.ts +10 -5
- package/dist/index.cjs.js +248 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.d.ts +10 -5
- package/dist/index.esm.js +230 -49
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +113 -4
- package/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +29 -0
- 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
- package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js +221 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/utils/animation.d.ts +3 -2
- package/dist/utils/animation.js +5 -2
- package/dist/utils/animation.js.map +1 -0
- package/dist/utils/handler.d.ts +7 -7
- package/dist/utils/handler.js +7 -4
- package/dist/utils/handler.js.map +1 -0
- package/dist/utils/index.d.ts +17 -16
- package/dist/utils/index.js +37 -40
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/lodash.d.ts +3 -2
- package/dist/utils/lodash.js +5 -2
- package/dist/utils/lodash.js.map +1 -0
- package/dist/utils/valid.d.ts +2 -1
- package/dist/utils/valid.js +4 -1
- package/dist/utils/valid.js.map +1 -0
- package/package.json +15 -10
- package/types/define.d.ts +2 -0
- package/dist/api/location/style.css +0 -79
- package/dist/api/media/EditorContext.d.ts +0 -16
- package/dist/api/media/EditorContext.js +0 -19
- package/dist/taroApis.d.ts +0 -753
- package/dist/taroApis.js +0 -2
- package/dist/taroApis.js.map +0 -1
package/dist/api/ad/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 };
|
package/dist/api/ad/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 广告
|
|
3
|
-
|
|
4
|
-
|
|
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;;;;"}
|
package/dist/api/ai/facial.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 };
|
package/dist/api/ai/facial.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 人脸识别
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;;;;"}
|
package/dist/api/ai/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./facial";
|
|
2
|
+
export * from "./visual";
|
package/dist/api/ai/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
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":";"}
|
package/dist/api/ai/visual.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 };
|
package/dist/api/ai/visual.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 判断支持版本
|
|
3
|
-
|
|
4
|
+
const isVKSupport = temporarilyNotSupport('isVKSupport');
|
|
4
5
|
// 视觉算法
|
|
5
|
-
|
|
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
|
-
|
|
1
|
+
declare const getOpenUserInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
export { getOpenUserInfo };
|
package/dist/api/alipay/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// AliPay
|
|
3
|
-
|
|
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
|
-
|
|
1
|
+
declare const getUserCryptoManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
export { getUserCryptoManager };
|
package/dist/api/base/crypto.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 加密
|
|
3
|
-
|
|
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;;;;"}
|
package/dist/api/base/debug.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 };
|
package/dist/api/base/debug.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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;;;;"}
|
package/dist/api/base/index.d.ts
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export * from
|
|
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";
|
package/dist/api/base/index.js
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { fromByteArray, toByteArray } from 'base64-js';
|
|
2
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
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
|
-
|
|
20
|
+
function base64ToArrayBuffer(base64) {
|
|
9
21
|
return toByteArray(base64);
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
4
|
-
|
|
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
|
-
|
|
3
|
+
declare const openSystemBluetoothSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
4
|
/** 跳转系统微信授权管理页 */
|
|
5
|
-
|
|
5
|
+
declare const openAppAuthorizeSetting: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
6
6
|
/** 获取窗口信息 */
|
|
7
|
-
|
|
7
|
+
declare const getWindowInfo: typeof Taro.getWindowInfo;
|
|
8
8
|
/** 获取设备设置 */
|
|
9
|
-
|
|
9
|
+
declare const getSystemSetting: typeof Taro.getSystemSetting;
|
|
10
10
|
/** 获取设备设置 */
|
|
11
|
-
|
|
11
|
+
declare const getDeviceInfo: typeof Taro.getDeviceInfo;
|
|
12
12
|
/** 获取微信APP基础信息 */
|
|
13
|
-
|
|
13
|
+
declare const getAppBaseInfo: typeof Taro.getAppBaseInfo;
|
|
14
14
|
/** 获取微信APP授权设置 */
|
|
15
|
-
|
|
15
|
+
declare const getAppAuthorizeSetting: typeof Taro.getAppAuthorizeSetting;
|
|
16
16
|
/** 获取设备设置 */
|
|
17
|
-
|
|
17
|
+
declare const getSystemInfoSync: typeof Taro.getSystemInfoSync;
|
|
18
18
|
/** 获取系统信息 */
|
|
19
|
-
|
|
19
|
+
declare const getSystemInfoAsync: typeof Taro.getSystemInfoAsync;
|
|
20
20
|
/** 获取系统信息 */
|
|
21
|
-
|
|
21
|
+
declare const getSystemInfo: typeof Taro.getSystemInfo;
|
|
22
|
+
export { openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo };
|
package/dist/api/base/system.js
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
7
|
+
const openSystemBluetoothSetting = temporarilyNotSupport('openSystemBluetoothSetting');
|
|
15
8
|
/** 跳转系统微信授权管理页 */
|
|
16
|
-
|
|
9
|
+
const openAppAuthorizeSetting = temporarilyNotSupport('openAppAuthorizeSetting');
|
|
17
10
|
/** 获取窗口信息 */
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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}\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KAAK,EAAE;QACd,OAAO,MAAM,CAAC,IAAI,CAAC;AACjB,YAAA,MAAM,EAAE,KAAK;AACd,SAAA,CAAC,CAAA;AACH,KAAA;AACH,CAAC;;;;"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 };
|
package/dist/api/base/update.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 更新
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
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,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,GAAG,qBAAqB,CAAC,uBAAuB,EAAC;MACtE,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,QAAQ,GAAG,qBAAqB,CAAC,UAAU,EAAC;MAC5C,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,yBAAyB,GAAG,qBAAqB,CAAC,2BAA2B,EAAC;AAE9E,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,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
|
-
|
|
3
|
-
|
|
2
|
+
declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
|
|
3
|
+
declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
|
|
4
|
+
export { getLaunchOptionsSync, getEnterOptionsSync };
|