@tarojs/taro-h5 3.6.0-beta.2 → 3.6.0-beta.3
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 +17 -21
- 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 +6 -2
- 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 +6 -2
- 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 +3 -3
- package/dist/api/wxml/IntersectionObserver.js +6 -2
- package/dist/api/wxml/IntersectionObserver.js.map +1 -0
- package/dist/api/wxml/MediaQueryObserver.d.ts +4 -1
- package/dist/api/wxml/MediaQueryObserver.js +6 -2
- package/dist/api/wxml/MediaQueryObserver.js.map +1 -0
- package/dist/api/wxml/index.d.ts +4 -3
- package/dist/api/wxml/index.js +10 -6
- 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 +8 -4
- package/dist/api/wxml/selectorQuery.js.map +1 -0
- package/dist/index.cjs.d.ts +8 -4
- package/dist/index.cjs.js +14280 -78
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.d.ts +8 -4
- package/dist/index.esm.js +14279 -78
- 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_@stencil_core@2.22.2/node_modules/@stencil/core/internal/app-data/index.js +89 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@stencil_core@2.22.2/node_modules/@stencil/core/internal/app-data/index.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@stencil_core@2.22.2/node_modules/@stencil/core/internal/client/index.js +3371 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@stencil_core@2.22.2/node_modules/@stencil/core/internal/client/index.js.map +1 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@stencil_core@2.22.2/node_modules/@stencil/core/internal/client/shadow-css.js +388 -0
- package/dist/node_modules/.pnpm/registry.npmjs.org_@stencil_core@2.22.2/node_modules/@stencil/core/internal/client/shadow-css.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/packages/taro-components/dist/components/index2.js +77 -0
- package/dist/packages/taro-components/dist/components/index2.js.map +1 -0
- package/dist/packages/taro-components/dist/components/index3.js +35 -0
- package/dist/packages/taro-components/dist/components/index3.js.map +1 -0
- package/dist/packages/taro-components/dist/components/taro-swiper-core.js +10171 -0
- package/dist/packages/taro-components/dist/components/taro-swiper-core.js.map +1 -0
- package/dist/packages/taro-components/dist/components/taro-swiper-item-core.js +69 -0
- package/dist/packages/taro-components/dist/components/taro-swiper-item-core.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 +6 -2
- package/dist/utils/handler.js.map +1 -0
- package/dist/utils/index.d.ts +16 -15
- package/dist/utils/index.js +23 -19
- 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 +10 -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 -754
- package/dist/taroApis.js +0 -2
- package/dist/taroApis.js.map +0 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 键盘
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const onKeyboardHeightChange = temporarilyNotSupport('onKeyboardHeightChange');
|
|
5
|
+
const offKeyboardHeightChange = temporarilyNotSupport('offKeyboardHeightChange');
|
|
6
|
+
const hideKeyboard = temporarilyNotSupport('hideKeyboard');
|
|
7
|
+
const getSelectedTextRange = temporarilyNotSupport('getSelectedTextRange');
|
|
8
|
+
|
|
9
|
+
export { getSelectedTextRange, hideKeyboard, offKeyboardHeightChange, onKeyboardHeightChange };
|
|
10
|
+
//# sourceMappingURL=keyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.js","sources":["../../../src/api/device/keyboard.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 键盘\nexport const onKeyboardHeightChange = temporarilyNotSupport('onKeyboardHeightChange')\nexport const offKeyboardHeightChange = temporarilyNotSupport('offKeyboardHeightChange')\nexport const hideKeyboard = temporarilyNotSupport('hideKeyboard')\nexport const getSelectedTextRange = temporarilyNotSupport('getSelectedTextRange')\n"],"names":[],"mappings":";;AAEA;MACa,sBAAsB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;MACxE,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;MAC1E,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MACpD,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB;;;;"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const onMemoryWarning: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const offMemoryWarning: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
export { onMemoryWarning, offMemoryWarning };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 内存
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
const onMemoryWarning = temporarilyNotSupport('onMemoryWarning');
|
|
5
|
+
const offMemoryWarning = temporarilyNotSupport('offMemoryWarning');
|
|
6
|
+
|
|
7
|
+
export { offMemoryWarning, onMemoryWarning };
|
|
8
|
+
//# sourceMappingURL=memory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.js","sources":["../../../src/api/device/memory.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 内存\nexport const onMemoryWarning = temporarilyNotSupport('onMemoryWarning')\nexport const offMemoryWarning = temporarilyNotSupport('offMemoryWarning')\n"],"names":[],"mappings":";;AAEA;MACa,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB;;;;"}
|
|
@@ -2,16 +2,17 @@ import Taro from '@tarojs/api';
|
|
|
2
2
|
/**
|
|
3
3
|
* 停止监听设备方向的变化。
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
declare const stopDeviceMotionListening: typeof Taro.stopDeviceMotionListening;
|
|
6
6
|
/**
|
|
7
7
|
* 开始监听设备方向的变化。
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
declare const startDeviceMotionListening: typeof Taro.startDeviceMotionListening;
|
|
10
10
|
/**
|
|
11
11
|
* 监听设备方向变化事件。
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
declare const onDeviceMotionChange: typeof Taro.onDeviceMotionChange;
|
|
14
14
|
/**
|
|
15
15
|
* 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
declare const offDeviceMotionChange: typeof Taro.offDeviceMotionChange;
|
|
18
|
+
export { stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
1
|
+
import '../../utils/index.js';
|
|
2
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler.js';
|
|
3
|
+
import { throttle } from '../../utils/lodash.js';
|
|
4
|
+
|
|
3
5
|
const callbackManager = new CallbackManager();
|
|
4
6
|
let deviceMotionListener;
|
|
5
7
|
const INTERVAL_MAP = {
|
|
@@ -19,7 +21,7 @@ const INTERVAL_MAP = {
|
|
|
19
21
|
/**
|
|
20
22
|
* 停止监听设备方向的变化。
|
|
21
23
|
*/
|
|
22
|
-
|
|
24
|
+
const stopDeviceMotionListening = ({ success, fail, complete } = {}) => {
|
|
23
25
|
const handle = new MethodHandler({ name: 'stopDeviceMotionListening', success, fail, complete });
|
|
24
26
|
try {
|
|
25
27
|
window.removeEventListener('deviceorientation', deviceMotionListener, true);
|
|
@@ -32,7 +34,7 @@ export const stopDeviceMotionListening = ({ success, fail, complete } = {}) => {
|
|
|
32
34
|
/**
|
|
33
35
|
* 开始监听设备方向的变化。
|
|
34
36
|
*/
|
|
35
|
-
|
|
37
|
+
const startDeviceMotionListening = ({ interval = 'normal', success, fail, complete } = {}) => {
|
|
36
38
|
const handle = new MethodHandler({ name: 'startDeviceMotionListening', success, fail, complete });
|
|
37
39
|
try {
|
|
38
40
|
const intervalObj = INTERVAL_MAP[interval];
|
|
@@ -61,12 +63,15 @@ export const startDeviceMotionListening = ({ interval = 'normal', success, fail,
|
|
|
61
63
|
/**
|
|
62
64
|
* 监听设备方向变化事件。
|
|
63
65
|
*/
|
|
64
|
-
|
|
66
|
+
const onDeviceMotionChange = callback => {
|
|
65
67
|
callbackManager.add(callback);
|
|
66
68
|
};
|
|
67
69
|
/**
|
|
68
70
|
* 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。
|
|
69
71
|
*/
|
|
70
|
-
|
|
72
|
+
const offDeviceMotionChange = callback => {
|
|
71
73
|
callbackManager.remove(callback);
|
|
72
74
|
};
|
|
75
|
+
|
|
76
|
+
export { offDeviceMotionChange, onDeviceMotionChange, startDeviceMotionListening, stopDeviceMotionListening };
|
|
77
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sources":["../../../src/api/device/motion.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { throttle } from '../../utils'\r\nimport { CallbackManager, MethodHandler } from '../../utils/handler'\r\n\r\nconst callbackManager = new CallbackManager()\r\nlet deviceMotionListener\r\n\r\nconst INTERVAL_MAP = {\r\n game: {\r\n interval: 20,\r\n frequency: 50\r\n },\r\n ui: {\r\n interval: 60,\r\n frequency: 16.67\r\n },\r\n normal: {\r\n interval: 200,\r\n frequency: 5\r\n }\r\n}\r\n\r\n/**\r\n * 停止监听设备方向的变化。\r\n */\r\nexport const stopDeviceMotionListening: typeof Taro.stopDeviceMotionListening = ({ success, fail, complete } = {}) => {\r\n const handle = new MethodHandler({ name: 'stopDeviceMotionListening', success, fail, complete })\r\n try {\r\n window.removeEventListener('deviceorientation', deviceMotionListener, true)\r\n return handle.success()\r\n } catch (e) {\r\n return handle.fail({ errMsg: e.message })\r\n }\r\n}\r\n\r\n/**\r\n * 开始监听设备方向的变化。\r\n */\r\nexport const startDeviceMotionListening: typeof Taro.startDeviceMotionListening = ({ interval = 'normal', success, fail, complete } = {}) => {\r\n const handle = new MethodHandler({ name: 'startDeviceMotionListening', success, fail, complete })\r\n try {\r\n const intervalObj = INTERVAL_MAP[interval]\r\n if (window.DeviceOrientationEvent) {\r\n if (deviceMotionListener) {\r\n stopDeviceMotionListening()\r\n }\r\n deviceMotionListener = throttle((evt: DeviceOrientationEvent) => {\r\n callbackManager.trigger({\r\n alpha: evt.alpha,\r\n beta: evt.beta,\r\n gamma: evt.gamma\r\n })\r\n }, intervalObj.interval)\r\n window.addEventListener('deviceorientation', deviceMotionListener, true)\r\n } else {\r\n throw new Error('deviceMotion is not supported')\r\n }\r\n return handle.success()\r\n } catch (e) {\r\n return handle.fail({ errMsg: e.message })\r\n }\r\n}\r\n\r\n/**\r\n * 监听设备方向变化事件。\r\n */\r\nexport const onDeviceMotionChange: typeof Taro.onDeviceMotionChange = callback => {\r\n callbackManager.add(callback)\r\n}\r\n\r\n/**\r\n * 取消监听设备方向变化事件,参数为空,则取消所有的事件监听。\r\n */\r\nexport const offDeviceMotionChange: typeof Taro.offDeviceMotionChange = callback => {\r\n callbackManager.remove(callback)\r\n}\r\n"],"names":[],"mappings":";;;;AAKA,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;AAC7C,IAAI,oBAAoB,CAAA;AAExB,MAAM,YAAY,GAAG;AACnB,IAAA,IAAI,EAAE;AACJ,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,SAAS,EAAE,EAAE;AACd,KAAA;AACD,IAAA,EAAE,EAAE;AACF,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,SAAS,EAAE,KAAK;AACjB,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,GAAG;AACb,QAAA,SAAS,EAAE,CAAC;AACb,KAAA;CACF,CAAA;AAED;;AAEG;AACI,MAAM,yBAAyB,GAA0C,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AACnH,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAChG,IAAI;QACF,MAAM,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAA;AAC3E,QAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACxB,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;AAC1C,KAAA;AACH,EAAC;AAED;;AAEG;AACU,MAAA,0BAA0B,GAA2C,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AAC1I,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IACjG,IAAI;AACF,QAAA,MAAM,WAAW,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;QAC1C,IAAI,MAAM,CAAC,sBAAsB,EAAE;AACjC,YAAA,IAAI,oBAAoB,EAAE;AACxB,gBAAA,yBAAyB,EAAE,CAAA;AAC5B,aAAA;AACD,YAAA,oBAAoB,GAAG,QAAQ,CAAC,CAAC,GAA2B,KAAI;gBAC9D,eAAe,CAAC,OAAO,CAAC;oBACtB,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,KAAK,EAAE,GAAG,CAAC,KAAK;AACjB,iBAAA,CAAC,CAAA;AACJ,aAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAA;YACxB,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAA;AACzE,SAAA;AAAM,aAAA;AACL,YAAA,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;AACjD,SAAA;AACD,QAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACxB,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;AAC1C,KAAA;AACH,EAAC;AAED;;AAEG;AACU,MAAA,oBAAoB,GAAqC,QAAQ,IAAG;AAC/E,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC/B,EAAC;AAED;;AAEG;AACU,MAAA,qBAAqB,GAAsC,QAAQ,IAAG;AACjF,IAAA,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAClC;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Taro from '@tarojs/api';
|
|
2
|
-
|
|
2
|
+
declare const getNetworkType: typeof Taro.getNetworkType;
|
|
3
3
|
/**
|
|
4
4
|
* 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。
|
|
5
5
|
* - 出现三次以上连接超时
|
|
@@ -7,8 +7,9 @@ export declare const getNetworkType: typeof Taro.getNetworkType;
|
|
|
7
7
|
* - 出现三次以上的丢包
|
|
8
8
|
* > 弱网事件通知规则是: 弱网状态变化时立即通知, 状态不变时 30s 内最多通知一次。
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
declare const onNetworkWeakChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
11
|
+
declare const onNetworkStatusChange: typeof Taro.onNetworkStatusChange;
|
|
12
|
+
declare const offNetworkWeakChange: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
13
|
+
declare const offNetworkStatusChange: typeof Taro.offNetworkStatusChange;
|
|
14
|
+
declare const getLocalIPAddress: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
15
|
+
export { getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress };
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
};
|
|
10
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
11
|
-
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
1
|
+
import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@1.14.1/node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
3
|
+
import { MethodHandler, CallbackManager } from '../../utils/handler.js';
|
|
4
|
+
|
|
12
5
|
function getConnection() {
|
|
13
6
|
// @ts-ignore
|
|
14
7
|
return navigator.connection || navigator.mozConnection || navigator.webkitConnection || navigator.msConnection;
|
|
15
8
|
}
|
|
16
|
-
|
|
9
|
+
const getNetworkType = (options = {}) => {
|
|
17
10
|
const connection = getConnection();
|
|
18
11
|
const { success, fail, complete } = options;
|
|
19
12
|
const handle = new MethodHandler({ name: 'getNetworkType', success, fail, complete });
|
|
@@ -68,20 +61,23 @@ const networkStatusListener = () => __awaiter(void 0, void 0, void 0, function*
|
|
|
68
61
|
* - 出现三次以上的丢包
|
|
69
62
|
* > 弱网事件通知规则是: 弱网状态变化时立即通知, 状态不变时 30s 内最多通知一次。
|
|
70
63
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
const onNetworkWeakChange = temporarilyNotSupport('onNetworkWeakChange');
|
|
65
|
+
const onNetworkStatusChange = callback => {
|
|
73
66
|
networkStatusManager.add(callback);
|
|
74
67
|
const connection = getConnection();
|
|
75
68
|
if (connection && networkStatusManager.count() === 1) {
|
|
76
69
|
connection.addEventListener('change', networkStatusListener);
|
|
77
70
|
}
|
|
78
71
|
};
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
const offNetworkWeakChange = temporarilyNotSupport('offNetworkStatusChange');
|
|
73
|
+
const offNetworkStatusChange = callback => {
|
|
81
74
|
networkStatusManager.remove(callback);
|
|
82
75
|
const connection = getConnection();
|
|
83
76
|
if (connection && networkStatusManager.count() === 0) {
|
|
84
77
|
connection.removeEventListener('change', networkStatusListener);
|
|
85
78
|
}
|
|
86
79
|
};
|
|
87
|
-
|
|
80
|
+
const getLocalIPAddress = temporarilyNotSupport('getLocalIPAddress');
|
|
81
|
+
|
|
82
|
+
export { getLocalIPAddress, getNetworkType, offNetworkStatusChange, offNetworkWeakChange, onNetworkStatusChange, onNetworkWeakChange };
|
|
83
|
+
//# sourceMappingURL=network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.js","sources":["../../../src/api/device/network.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { temporarilyNotSupport } from '../../utils'\nimport { CallbackManager, MethodHandler } from '../../utils/handler'\n\nfunction getConnection () {\n // @ts-ignore\n return navigator.connection || navigator.mozConnection || navigator.webkitConnection || navigator.msConnection\n}\n\nexport const getNetworkType: typeof Taro.getNetworkType = (options = {}) => {\n const connection = getConnection()\n const { success, fail, complete } = options\n const handle = new MethodHandler<Taro.getNetworkType.SuccessCallbackResult>({ name: 'getNetworkType', success, fail, complete })\n\n let networkType: keyof Taro.getNetworkType.NetworkType = 'unknown'\n // 浏览器不支持获取网络状态\n if (!connection) {\n return handle.success({ networkType })\n }\n\n // Supports only the navigator.connection.type value which doesn't match the latest spec.\n // https://www.davidbcalhoun.com/2010/using-navigator-connection-android/\n if (!isNaN(Number(connection.type))) {\n switch (connection.type) {\n // @ts-ignore\n case connection.WIFI:\n networkType = 'wifi'\n break\n // @ts-ignore\n case connection.CELL_3G:\n networkType = '3g'\n break\n // @ts-ignore\n case connection.CELL_2G:\n networkType = '2g'\n break\n default:\n // ETHERNET, UNKNOWN\n networkType = 'unknown'\n }\n } else if (connection.type) {\n // @ts-ignore\n networkType = connection.type // Only supports the type value.\n // @ts-ignore\n } else if (connection.effectiveType) {\n // @ts-ignore\n networkType = connection.effectiveType\n }\n\n return handle.success({ networkType })\n}\n\nconst networkStatusManager = new CallbackManager()\n\nconst networkStatusListener = async () => {\n const { networkType } = await getNetworkType()\n const isConnected = networkType !== 'none'\n const obj = { isConnected, networkType }\n networkStatusManager.trigger(obj)\n}\n\n/**\n * 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。\n * - 出现三次以上连接超时\n * - 出现三次 rtt 超过 400\n * - 出现三次以上的丢包\n * > 弱网事件通知规则是: 弱网状态变化时立即通知, 状态不变时 30s 内最多通知一次。\n */\nexport const onNetworkWeakChange = temporarilyNotSupport('onNetworkWeakChange')\n\nexport const onNetworkStatusChange: typeof Taro.onNetworkStatusChange = callback => {\n networkStatusManager.add(callback)\n const connection = getConnection()\n if (connection && networkStatusManager.count() === 1) {\n connection.addEventListener('change', networkStatusListener)\n }\n}\n\nexport const offNetworkWeakChange = temporarilyNotSupport('offNetworkStatusChange')\n\nexport const offNetworkStatusChange: typeof Taro.offNetworkStatusChange = callback => {\n networkStatusManager.remove(callback)\n const connection = getConnection()\n if (connection && networkStatusManager.count() === 0) {\n connection.removeEventListener('change', networkStatusListener)\n }\n}\n\nexport const getLocalIPAddress = temporarilyNotSupport('getLocalIPAddress')\n"],"names":[],"mappings":";;;;AAKA,SAAS,aAAa,GAAA;;AAEpB,IAAA,OAAO,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,aAAa,IAAI,SAAS,CAAC,gBAAgB,IAAI,SAAS,CAAC,YAAY,CAAA;AAChH,CAAC;MAEY,cAAc,GAA+B,CAAC,OAAO,GAAG,EAAE,KAAI;AACzE,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AAC3C,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAA4C,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEhI,IAAI,WAAW,GAA0C,SAAS,CAAA;;IAElE,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;AACvC,KAAA;;;IAID,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE;QACnC,QAAQ,UAAU,CAAC,IAAI;;YAErB,KAAK,UAAU,CAAC,IAAI;gBAClB,WAAW,GAAG,MAAM,CAAA;gBACpB,MAAK;;YAEP,KAAK,UAAU,CAAC,OAAO;gBACrB,WAAW,GAAG,IAAI,CAAA;gBAClB,MAAK;;YAEP,KAAK,UAAU,CAAC,OAAO;gBACrB,WAAW,GAAG,IAAI,CAAA;gBAClB,MAAK;AACP,YAAA;;gBAEE,WAAW,GAAG,SAAS,CAAA;AAC1B,SAAA;AACF,KAAA;SAAM,IAAI,UAAU,CAAC,IAAI,EAAE;;AAE1B,QAAA,WAAW,GAAG,UAAU,CAAC,IAAI,CAAA;;AAE9B,KAAA;SAAM,IAAI,UAAU,CAAC,aAAa,EAAE;;AAEnC,QAAA,WAAW,GAAG,UAAU,CAAC,aAAa,CAAA;AACvC,KAAA;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC,CAAA;AACxC,EAAC;AAED,MAAM,oBAAoB,GAAG,IAAI,eAAe,EAAE,CAAA;AAElD,MAAM,qBAAqB,GAAG,MAAW,SAAA,CAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,aAAA;AACvC,IAAA,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,cAAc,EAAE,CAAA;AAC9C,IAAA,MAAM,WAAW,GAAG,WAAW,KAAK,MAAM,CAAA;AAC1C,IAAA,MAAM,GAAG,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA;AACxC,IAAA,oBAAoB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;AACnC,CAAC,CAAA,CAAA;AAED;;;;;;AAMG;MACU,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;AAElE,MAAA,qBAAqB,GAAsC,QAAQ,IAAG;AACjF,IAAA,oBAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAClC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,IAAI,UAAU,IAAI,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACpD,QAAA,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAA;AAC7D,KAAA;AACH,EAAC;MAEY,oBAAoB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;AAEtE,MAAA,sBAAsB,GAAuC,QAAQ,IAAG;AACnF,IAAA,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AACrC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,CAAA;IAClC,IAAI,UAAU,IAAI,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACpD,QAAA,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAA;AAChE,KAAA;AACH,EAAC;MAEY,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB;;;;"}
|
package/dist/api/device/nfc.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
declare const stopHCE: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const startHCE: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
declare const sendHCEMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
|
+
declare const onHCEMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
5
|
+
declare const offHCEMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
6
|
+
declare const getNFCAdapter: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
7
|
+
declare const getHCEState: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
8
|
+
export { stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState };
|
package/dist/api/device/nfc.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// NFC
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const stopHCE = temporarilyNotSupport('stopHCE');
|
|
5
|
+
const startHCE = temporarilyNotSupport('startHCE');
|
|
6
|
+
const sendHCEMessage = temporarilyNotSupport('sendHCEMessage');
|
|
7
|
+
const onHCEMessage = temporarilyNotSupport('onHCEMessage');
|
|
8
|
+
const offHCEMessage = temporarilyNotSupport('offHCEMessage');
|
|
9
|
+
const getNFCAdapter = temporarilyNotSupport('getNFCAdapter');
|
|
10
|
+
const getHCEState = temporarilyNotSupport('getHCEState');
|
|
11
|
+
|
|
12
|
+
export { getHCEState, getNFCAdapter, offHCEMessage, onHCEMessage, sendHCEMessage, startHCE, stopHCE };
|
|
13
|
+
//# sourceMappingURL=nfc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nfc.js","sources":["../../../src/api/device/nfc.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// NFC\nexport const stopHCE = temporarilyNotSupport('stopHCE')\nexport const startHCE = temporarilyNotSupport('startHCE')\nexport const sendHCEMessage = temporarilyNotSupport('sendHCEMessage')\nexport const onHCEMessage = temporarilyNotSupport('onHCEMessage')\nexport const offHCEMessage = temporarilyNotSupport('offHCEMessage')\nexport const getNFCAdapter = temporarilyNotSupport('getNFCAdapter')\nexport const getHCEState = temporarilyNotSupport('getHCEState')\n"],"names":[],"mappings":";;AAEA;MACa,OAAO,GAAG,qBAAqB,CAAC,SAAS,EAAC;MAC1C,QAAQ,GAAG,qBAAqB,CAAC,UAAU,EAAC;MAC5C,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MACpD,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;MACtD,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;MACtD,WAAW,GAAG,qBAAqB,CAAC,aAAa;;;;"}
|
package/dist/api/device/phone.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MethodHandler } from '../../utils/handler';
|
|
3
|
-
|
|
1
|
+
import { shouldBeObject, getParameterError } from '../../utils/index.js';
|
|
2
|
+
import { MethodHandler } from '../../utils/handler.js';
|
|
3
|
+
|
|
4
|
+
const makePhoneCall = (options) => {
|
|
4
5
|
// options must be an Object
|
|
5
6
|
const isObject = shouldBeObject(options);
|
|
6
7
|
if (!isObject.flag) {
|
|
@@ -22,3 +23,6 @@ export const makePhoneCall = (options) => {
|
|
|
22
23
|
window.location.href = `tel:${phoneNumber}`;
|
|
23
24
|
return handle.success();
|
|
24
25
|
};
|
|
26
|
+
|
|
27
|
+
export { makePhoneCall };
|
|
28
|
+
//# sourceMappingURL=phone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone.js","sources":["../../../src/api/device/phone.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { getParameterError, shouldBeObject } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nexport const makePhoneCall: typeof Taro.makePhoneCall = (options) => {\n // options must be an Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `makePhoneCall:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n const { phoneNumber, success, fail, complete } = options\n const handle = new MethodHandler({ name: 'makePhoneCall', success, fail, complete })\n\n if (typeof phoneNumber !== 'string') {\n return handle.fail({\n errMsg: getParameterError({\n para: 'phoneNumber',\n correct: 'String',\n wrong: phoneNumber\n })\n })\n }\n\n window.location.href = `tel:${phoneNumber}`\n\n return handle.success()\n}\n"],"names":[],"mappings":";;;AAKa,MAAA,aAAa,GAA8B,CAAC,OAAO,KAAI;;AAElE,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAClB,MAAM,GAAG,GAAG,EAAE,MAAM,EAAE,CAAsB,mBAAA,EAAA,QAAQ,CAAC,GAAG,CAAE,CAAA,EAAE,CAAA;AAC5D,QAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;AACzB,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC3B,KAAA;IAED,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;AACxD,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAEpF,IAAA,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,OAAO,MAAM,CAAC,IAAI,CAAC;YACjB,MAAM,EAAE,iBAAiB,CAAC;AACxB,gBAAA,IAAI,EAAE,aAAa;AACnB,gBAAA,OAAO,EAAE,QAAQ;AACjB,gBAAA,KAAK,EAAE,WAAW;aACnB,CAAC;AACH,SAAA,CAAC,CAAA;AACH,KAAA;IAED,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAO,IAAA,EAAA,WAAW,EAAE,CAAA;AAE3C,IAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB;;;;"}
|
package/dist/api/device/scan.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { processOpenApi } from '../../utils';
|
|
1
|
+
import { processOpenApi } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 扫码
|
|
3
|
-
|
|
4
|
+
const scanCode = processOpenApi({
|
|
4
5
|
name: 'scanQRCode',
|
|
5
6
|
defaultOptions: { needResult: 1 },
|
|
6
7
|
formatResult: res => ({
|
|
@@ -8,3 +9,6 @@ export const scanCode = processOpenApi({
|
|
|
8
9
|
result: res.resultStr
|
|
9
10
|
})
|
|
10
11
|
});
|
|
12
|
+
|
|
13
|
+
export { scanCode };
|
|
14
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sources":["../../../src/api/device/scan.ts"],"sourcesContent":["import { processOpenApi } from '../../utils'\n\n// 扫码\nexport const scanCode = processOpenApi({\n name: 'scanQRCode',\n defaultOptions: { needResult: 1 },\n formatResult: res => ({\n errMsg: res.errMsg === 'scanQRCode:ok' ? 'scanCode:ok' : res.errMsg,\n result: res.resultStr\n })\n})\n"],"names":[],"mappings":";;AAEA;AACO,MAAM,QAAQ,GAAG,cAAc,CAAC;AACrC,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,cAAc,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE;AACjC,IAAA,YAAY,EAAE,GAAG,KAAK;AACpB,QAAA,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,eAAe,GAAG,aAAa,GAAG,GAAG,CAAC,MAAM;QACnE,MAAM,EAAE,GAAG,CAAC,SAAS;KACtB,CAAC;AACH,CAAA;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare const setVisualEffectOnCapture: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const setScreenBrightness: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
declare const setKeepScreenOn: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
|
+
declare const onUserCaptureScreen: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
5
|
+
declare const offUserCaptureScreen: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
6
|
+
declare const getScreenBrightness: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
7
|
+
export { setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 屏幕
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const setVisualEffectOnCapture = temporarilyNotSupport('setVisualEffectOnCapture');
|
|
5
|
+
const setScreenBrightness = temporarilyNotSupport('setScreenBrightness');
|
|
6
|
+
const setKeepScreenOn = temporarilyNotSupport('setKeepScreenOn');
|
|
7
|
+
const onUserCaptureScreen = temporarilyNotSupport('onUserCaptureScreen');
|
|
8
|
+
const offUserCaptureScreen = temporarilyNotSupport('offUserCaptureScreen');
|
|
9
|
+
const getScreenBrightness = temporarilyNotSupport('getScreenBrightness');
|
|
10
|
+
|
|
11
|
+
export { getScreenBrightness, offUserCaptureScreen, onUserCaptureScreen, setKeepScreenOn, setScreenBrightness, setVisualEffectOnCapture };
|
|
12
|
+
//# sourceMappingURL=screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sources":["../../../src/api/device/screen.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 屏幕\nexport const setVisualEffectOnCapture = temporarilyNotSupport('setVisualEffectOnCapture')\nexport const setScreenBrightness = temporarilyNotSupport('setScreenBrightness')\nexport const setKeepScreenOn = temporarilyNotSupport('setKeepScreenOn')\nexport const onUserCaptureScreen = temporarilyNotSupport('onUserCaptureScreen')\nexport const offUserCaptureScreen = temporarilyNotSupport('offUserCaptureScreen')\nexport const getScreenBrightness = temporarilyNotSupport('getScreenBrightness')\n"],"names":[],"mappings":";;AAEA;MACa,wBAAwB,GAAG,qBAAqB,CAAC,0BAA0B,EAAC;MAC5E,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB,EAAC;MAClE,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB,EAAC;MACpE,mBAAmB,GAAG,qBAAqB,CAAC,qBAAqB;;;;"}
|
|
@@ -2,8 +2,9 @@ import Taro from '@tarojs/api';
|
|
|
2
2
|
/**
|
|
3
3
|
* 使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
declare const vibrateShort: typeof Taro.vibrateShort;
|
|
6
6
|
/**
|
|
7
7
|
* 使手机发生较长时间的振动(400 ms)
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
declare const vibrateLong: typeof Taro.vibrateLong;
|
|
10
|
+
export { vibrateShort, vibrateLong };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { MethodHandler } from '../../utils/handler';
|
|
1
|
+
import { MethodHandler } from '../../utils/handler.js';
|
|
2
|
+
|
|
2
3
|
const vibrator = function vibrator(mm) {
|
|
3
4
|
try {
|
|
4
5
|
return window.navigator.vibrate(mm);
|
|
@@ -10,7 +11,7 @@ const vibrator = function vibrator(mm) {
|
|
|
10
11
|
/**
|
|
11
12
|
* 使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
const vibrateShort = ({ success, fail, complete } = {}) => {
|
|
14
15
|
const handle = new MethodHandler({ name: 'vibrateShort', success, fail, complete });
|
|
15
16
|
if (vibrator(15)) {
|
|
16
17
|
return handle.success();
|
|
@@ -22,7 +23,7 @@ export const vibrateShort = ({ success, fail, complete } = {}) => {
|
|
|
22
23
|
/**
|
|
23
24
|
* 使手机发生较长时间的振动(400 ms)
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
const vibrateLong = ({ success, fail, complete } = {}) => {
|
|
26
27
|
const handle = new MethodHandler({ name: 'vibrateLong', success, fail, complete });
|
|
27
28
|
if (vibrator(400)) {
|
|
28
29
|
return handle.success();
|
|
@@ -31,3 +32,6 @@ export const vibrateLong = ({ success, fail, complete } = {}) => {
|
|
|
31
32
|
return handle.fail({ errMsg: 'style is not support' });
|
|
32
33
|
}
|
|
33
34
|
};
|
|
35
|
+
|
|
36
|
+
export { vibrateLong, vibrateShort };
|
|
37
|
+
//# sourceMappingURL=vibrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vibrate.js","sources":["../../../src/api/device/vibrate.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { MethodHandler } from '../../utils/handler'\r\n\r\nconst vibrator = function vibrator (mm: number | number[]) {\r\n try {\r\n return window.navigator.vibrate(mm)\r\n } catch (e) {\r\n console.warn('当前浏览器不支持 vibrate。')\r\n }\r\n}\r\n\r\n/**\r\n * 使手机发生较短时间的振动(15 ms)。仅在 iPhone 7 / 7 Plus 以上及 Android 机型生效\r\n */\r\nexport const vibrateShort: typeof Taro.vibrateShort = ({ success, fail, complete } = {}) => {\r\n const handle = new MethodHandler({ name: 'vibrateShort', success, fail, complete })\r\n if (vibrator(15)) {\r\n return handle.success()\r\n } else {\r\n return handle.fail({ errMsg: 'style is not support' })\r\n }\r\n}\r\n\r\n/**\r\n * 使手机发生较长时间的振动(400 ms)\r\n */\r\nexport const vibrateLong: typeof Taro.vibrateLong = ({ success, fail, complete } = {}) => {\r\n const handle = new MethodHandler({ name: 'vibrateLong', success, fail, complete })\r\n if (vibrator(400)) {\r\n return handle.success()\r\n } else {\r\n return handle.fail({ errMsg: 'style is not support' })\r\n }\r\n}\r\n"],"names":[],"mappings":";;AAIA,MAAM,QAAQ,GAAG,SAAS,QAAQ,CAAE,EAAqB,EAAA;IACvD,IAAI;QACF,OAAO,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AACpC,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACV,QAAA,OAAO,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AAClC,KAAA;AACH,CAAC,CAAA;AAED;;AAEG;AACI,MAAM,YAAY,GAA6B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AACzF,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AACnF,IAAA,IAAI,QAAQ,CAAC,EAAE,CAAC,EAAE;AAChB,QAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACxB,KAAA;AAAM,SAAA;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAA;AACvD,KAAA;AACH,EAAC;AAED;;AAEG;AACI,MAAM,WAAW,GAA4B,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAI;AACvF,IAAA,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAA;AAClF,IAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;AACjB,QAAA,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACxB,KAAA;AAAM,SAAA;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAAA;AACvD,KAAA;AACH;;;;"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
declare const stopWifi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const startWifi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
declare const setWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
|
+
declare const onWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
5
|
+
declare const onWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
6
|
+
declare const onGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
7
|
+
declare const offWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
8
|
+
declare const offGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
|
+
declare const getWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
10
|
+
declare const getConnectedWifi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
11
|
+
declare const connectWifi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
12
|
+
export { stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi };
|
package/dist/api/device/wifi.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// Wi-Fi
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
const stopWifi = temporarilyNotSupport('stopWifi');
|
|
5
|
+
const startWifi = temporarilyNotSupport('startWifi');
|
|
6
|
+
const setWifiList = temporarilyNotSupport('setWifiList');
|
|
7
|
+
const onWifiConnectedWithPartialInfo = temporarilyNotSupport('onWifiConnectedWithPartialInfo');
|
|
8
|
+
const onWifiConnected = temporarilyNotSupport('onWifiConnected');
|
|
9
|
+
const onGetWifiList = temporarilyNotSupport('onGetWifiList');
|
|
10
|
+
const offWifiConnected = temporarilyNotSupport('offWifiConnected');
|
|
11
|
+
const offGetWifiList = temporarilyNotSupport('offGetWifiList');
|
|
12
|
+
const getWifiList = temporarilyNotSupport('getWifiList');
|
|
13
|
+
const getConnectedWifi = temporarilyNotSupport('getConnectedWifi');
|
|
14
|
+
const connectWifi = temporarilyNotSupport('connectWifi');
|
|
15
|
+
|
|
16
|
+
export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi };
|
|
17
|
+
//# sourceMappingURL=wifi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wifi.js","sources":["../../../src/api/device/wifi.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// Wi-Fi\nexport const stopWifi = temporarilyNotSupport('stopWifi')\nexport const startWifi = temporarilyNotSupport('startWifi')\nexport const setWifiList = temporarilyNotSupport('setWifiList')\nexport const onWifiConnectedWithPartialInfo = temporarilyNotSupport('onWifiConnectedWithPartialInfo')\nexport const onWifiConnected = temporarilyNotSupport('onWifiConnected')\nexport const onGetWifiList = temporarilyNotSupport('onGetWifiList')\nexport const offWifiConnected = temporarilyNotSupport('offWifiConnected')\nexport const offGetWifiList = temporarilyNotSupport('offGetWifiList')\nexport const getWifiList = temporarilyNotSupport('getWifiList')\nexport const getConnectedWifi = temporarilyNotSupport('getConnectedWifi')\nexport const connectWifi = temporarilyNotSupport('connectWifi')\n"],"names":[],"mappings":";;AAEA;MACa,QAAQ,GAAG,qBAAqB,CAAC,UAAU,EAAC;MAC5C,SAAS,GAAG,qBAAqB,CAAC,WAAW,EAAC;MAC9C,WAAW,GAAG,qBAAqB,CAAC,aAAa,EAAC;MAClD,8BAA8B,GAAG,qBAAqB,CAAC,gCAAgC,EAAC;MACxF,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;MACtD,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,WAAW,GAAG,qBAAqB,CAAC,aAAa,EAAC;MAClD,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,WAAW,GAAG,qBAAqB,CAAC,aAAa;;;;"}
|
package/dist/api/ext/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const getExtConfigSync: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const getExtConfig: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
export { getExtConfigSync, getExtConfig };
|
package/dist/api/ext/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 getExtConfigSync = temporarilyNotSupport('getExtConfigSync');
|
|
5
|
+
const getExtConfig = temporarilyNotSupport('getExtConfig');
|
|
6
|
+
|
|
7
|
+
export { getExtConfig, getExtConfigSync };
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/ext/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 第三方平台\nexport const getExtConfigSync = temporarilyNotSupport('getExtConfigSync')\nexport const getExtConfig = temporarilyNotSupport('getExtConfig')\n"],"names":[],"mappings":";;AAEA;MACa,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,YAAY,GAAG,qBAAqB,CAAC,cAAc;;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const saveFileToDisk: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
2
|
+
declare const saveFile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
3
|
+
declare const removeSavedFile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
4
|
+
declare const openDocument: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
5
|
+
declare const getSavedFileList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
6
|
+
declare const getSavedFileInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
7
|
+
declare const getFileSystemManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
8
|
+
declare const getFileInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
9
|
+
export { saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo };
|
package/dist/api/files/index.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '../../utils';
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
|
+
|
|
2
3
|
// 文件
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
const saveFileToDisk = temporarilyNotSupport('saveFileToDisk');
|
|
5
|
+
const saveFile = temporarilyNotSupport('saveFile');
|
|
6
|
+
const removeSavedFile = temporarilyNotSupport('removeSavedFile');
|
|
7
|
+
const openDocument = temporarilyNotSupport('openDocument');
|
|
8
|
+
const getSavedFileList = temporarilyNotSupport('getSavedFileList');
|
|
9
|
+
const getSavedFileInfo = temporarilyNotSupport('getSavedFileInfo');
|
|
10
|
+
const getFileSystemManager = temporarilyNotSupport('getFileSystemManager');
|
|
11
|
+
const getFileInfo = temporarilyNotSupport('getFileInfo');
|
|
12
|
+
|
|
13
|
+
export { getFileInfo, getFileSystemManager, getSavedFileInfo, getSavedFileList, openDocument, removeSavedFile, saveFile, saveFileToDisk };
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/files/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\r\n\r\n// 文件\r\nexport const saveFileToDisk = temporarilyNotSupport('saveFileToDisk')\r\nexport const saveFile = temporarilyNotSupport('saveFile')\r\nexport const removeSavedFile = temporarilyNotSupport('removeSavedFile')\r\nexport const openDocument = temporarilyNotSupport('openDocument')\r\nexport const getSavedFileList = temporarilyNotSupport('getSavedFileList')\r\nexport const getSavedFileInfo = temporarilyNotSupport('getSavedFileInfo')\r\nexport const getFileSystemManager = temporarilyNotSupport('getFileSystemManager')\r\nexport const getFileInfo = temporarilyNotSupport('getFileInfo')\r\n"],"names":[],"mappings":";;AAEA;MACa,cAAc,GAAG,qBAAqB,CAAC,gBAAgB,EAAC;MACxD,QAAQ,GAAG,qBAAqB,CAAC,UAAU,EAAC;MAC5C,eAAe,GAAG,qBAAqB,CAAC,iBAAiB,EAAC;MAC1D,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MACpD,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB,EAAC;MAC5D,oBAAoB,GAAG,qBAAqB,CAAC,sBAAsB,EAAC;MACpE,WAAW,GAAG,qBAAqB,CAAC,aAAa;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Taro from '@tarojs/api';
|
|
2
|
-
|
|
2
|
+
declare const getApp: typeof Taro.getApp;
|
|
3
|
+
declare const getCurrentInstance: () => Taro.Current;
|
|
4
|
+
export { getApp, getCurrentInstance };
|
|
3
5
|
export { getCurrentPages } from '@tarojs/router';
|
|
4
|
-
export declare const getCurrentInstance: () => Taro.Current;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import Taro from '@tarojs/api';
|
|
2
|
-
export
|
|
2
|
+
export { getCurrentPages } from '@tarojs/router';
|
|
3
|
+
|
|
4
|
+
const getApp = function () {
|
|
3
5
|
return Taro.getCurrentInstance().app;
|
|
4
6
|
};
|
|
5
|
-
export { getCurrentPages } from '@tarojs/router';
|
|
6
7
|
// 自定义组件
|
|
7
|
-
|
|
8
|
+
const getCurrentInstance = Taro.getCurrentInstance;
|
|
9
|
+
|
|
10
|
+
export { getApp, getCurrentInstance };
|
|
11
|
+
//# sourceMappingURL=index.js.map
|