@tarojs/taro-h5 3.6.7 → 3.6.8
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.js +2 -2
- package/dist/api/ad/index.js.map +1 -1
- package/dist/api/ai/facial.js +3 -3
- package/dist/api/ai/facial.js.map +1 -1
- package/dist/api/ai/visual.js +2 -2
- package/dist/api/ai/visual.js.map +1 -1
- package/dist/api/alipay/index.js +1 -1
- package/dist/api/alipay/index.js.map +1 -1
- package/dist/api/base/crypto.js +1 -1
- package/dist/api/base/crypto.js.map +1 -1
- package/dist/api/base/debug.js +3 -3
- package/dist/api/base/debug.js.map +1 -1
- package/dist/api/base/index.d.ts +1 -2
- package/dist/api/base/index.js +3 -3
- package/dist/api/base/index.js.map +1 -1
- package/dist/api/base/performance.js +2 -2
- package/dist/api/base/performance.js.map +1 -1
- package/dist/api/base/system.js +2 -2
- package/dist/api/base/system.js.map +1 -1
- package/dist/api/base/update.js +2 -2
- package/dist/api/base/update.js.map +1 -1
- package/dist/api/base/weapp/app-event.js +7 -8
- package/dist/api/base/weapp/app-event.js.map +1 -1
- package/dist/api/canvas/CanvasContext.d.ts +2 -1
- package/dist/api/canvas/CanvasContext.js.map +1 -1
- package/dist/api/canvas/index.js +1 -1
- package/dist/api/canvas/index.js.map +1 -1
- package/dist/api/data-analysis/index.js +4 -4
- package/dist/api/data-analysis/index.js.map +1 -1
- package/dist/api/device/accelerometer.js +1 -2
- package/dist/api/device/accelerometer.js.map +1 -1
- package/dist/api/device/accessibility.js +1 -1
- package/dist/api/device/accessibility.js.map +1 -1
- package/dist/api/device/battery.js +1 -1
- package/dist/api/device/battery.js.map +1 -1
- package/dist/api/device/bluetooth-ble.js +16 -16
- package/dist/api/device/bluetooth-ble.js.map +1 -1
- package/dist/api/device/bluetooth-peripheral.js +3 -3
- package/dist/api/device/bluetooth-peripheral.js.map +1 -1
- package/dist/api/device/bluetooth.js +13 -13
- package/dist/api/device/bluetooth.js.map +1 -1
- package/dist/api/device/calendar.d.ts +3 -2
- package/dist/api/device/calendar.js +142 -3
- package/dist/api/device/calendar.js.map +1 -1
- package/dist/api/device/compass.js +1 -2
- package/dist/api/device/compass.js.map +1 -1
- package/dist/api/device/contact.js +2 -2
- package/dist/api/device/contact.js.map +1 -1
- package/dist/api/device/crypto.js +1 -1
- package/dist/api/device/crypto.js.map +1 -1
- package/dist/api/device/gyroscope.js +4 -4
- package/dist/api/device/gyroscope.js.map +1 -1
- package/dist/api/device/iBeacon.js +7 -7
- package/dist/api/device/iBeacon.js.map +1 -1
- package/dist/api/device/keyboard.js +4 -4
- package/dist/api/device/keyboard.js.map +1 -1
- package/dist/api/device/memory.js +2 -2
- package/dist/api/device/memory.js.map +1 -1
- package/dist/api/device/motion.js +1 -2
- package/dist/api/device/motion.js.map +1 -1
- package/dist/api/device/network.js +3 -3
- package/dist/api/device/network.js.map +1 -1
- package/dist/api/device/nfc.js +7 -7
- package/dist/api/device/nfc.js.map +1 -1
- package/dist/api/device/scan.js +1 -1
- package/dist/api/device/scan.js.map +1 -1
- package/dist/api/device/screen.js +6 -6
- package/dist/api/device/screen.js.map +1 -1
- package/dist/api/device/wifi.js +12 -12
- package/dist/api/device/wifi.js.map +1 -1
- package/dist/api/ext/index.js +2 -2
- package/dist/api/ext/index.js.map +1 -1
- package/dist/api/files/index.js +8 -8
- package/dist/api/files/index.js.map +1 -1
- package/dist/api/index.js +8 -3
- package/dist/api/index.js.map +1 -1
- package/dist/api/location/chooseLocation.js +9 -5
- package/dist/api/location/chooseLocation.js.map +1 -1
- package/dist/api/location/getLocation.js +1 -1
- package/dist/api/location/getLocation.js.map +1 -1
- package/dist/api/location/index.js +10 -10
- package/dist/api/location/index.js.map +1 -1
- package/dist/api/media/audio/index.js +8 -8
- package/dist/api/media/audio/index.js.map +1 -1
- package/dist/api/media/background-audio/index.js +8 -8
- package/dist/api/media/background-audio/index.js.map +1 -1
- package/dist/api/media/camera.js +1 -1
- package/dist/api/media/camera.js.map +1 -1
- package/dist/api/media/image/chooseImage.d.ts +1 -0
- package/dist/api/media/image/chooseImage.js +28 -71
- package/dist/api/media/image/chooseImage.js.map +1 -1
- package/dist/api/media/image/index.d.ts +4 -3
- package/dist/api/media/image/index.js +8 -9
- package/dist/api/media/image/index.js.map +1 -1
- package/dist/api/media/image/saveImageToPhotosAlbum.d.ts +3 -0
- package/dist/api/media/image/saveImageToPhotosAlbum.js +30 -0
- package/dist/api/media/image/saveImageToPhotosAlbum.js.map +1 -0
- package/dist/api/media/index.js +2 -2
- package/dist/api/media/live.js +2 -2
- package/dist/api/media/live.js.map +1 -1
- package/dist/api/media/map.js +1 -1
- package/dist/api/media/map.js.map +1 -1
- package/dist/api/media/media-recorder.js +1 -1
- package/dist/api/media/media-recorder.js.map +1 -1
- package/dist/api/media/recorder.js +3 -3
- package/dist/api/media/recorder.js.map +1 -1
- package/dist/api/media/video/chooseMedia.d.ts +6 -0
- package/dist/api/media/video/chooseMedia.js +208 -0
- package/dist/api/media/video/chooseMedia.js.map +1 -0
- package/dist/api/media/video/chooseVideo.d.ts +7 -0
- package/dist/api/media/video/chooseVideo.js +44 -0
- package/dist/api/media/video/chooseVideo.js.map +1 -0
- package/dist/api/media/video/getVideoInfo.d.ts +3 -0
- package/dist/api/media/video/getVideoInfo.js +63 -0
- package/dist/api/media/video/getVideoInfo.js.map +1 -0
- package/dist/api/media/video/index.d.ts +5 -8
- package/dist/api/media/video/index.js +8 -67
- package/dist/api/media/video/index.js.map +1 -1
- package/dist/api/media/video/saveVideoToPhotosAlbum.d.ts +3 -0
- package/dist/api/media/video/saveVideoToPhotosAlbum.js +30 -0
- package/dist/api/media/video/saveVideoToPhotosAlbum.js.map +1 -0
- package/dist/api/media/video-decoder.js +1 -1
- package/dist/api/media/video-decoder.js.map +1 -1
- package/dist/api/media/video-processing.js +1 -1
- package/dist/api/media/video-processing.js.map +1 -1
- package/dist/api/media/voip.js +14 -14
- package/dist/api/media/voip.js.map +1 -1
- package/dist/api/navigate/index.js +5 -5
- package/dist/api/navigate/index.js.map +1 -1
- package/dist/api/network/mdns.js +10 -10
- package/dist/api/network/mdns.js.map +1 -1
- package/dist/api/network/request/index.d.ts +1 -1
- package/dist/api/network/request/index.js +22 -17
- package/dist/api/network/request/index.js.map +1 -1
- package/dist/api/network/tcp.js +1 -1
- package/dist/api/network/tcp.js.map +1 -1
- package/dist/api/network/udp.js +1 -1
- package/dist/api/network/udp.js.map +1 -1
- package/dist/api/open-api/account.js +1 -1
- package/dist/api/open-api/account.js.map +1 -1
- package/dist/api/open-api/address.js +1 -1
- package/dist/api/open-api/address.js.map +1 -1
- package/dist/api/open-api/authorize.js +2 -2
- package/dist/api/open-api/authorize.js.map +1 -1
- package/dist/api/open-api/card.js +2 -2
- package/dist/api/open-api/card.js.map +1 -1
- package/dist/api/open-api/channels-live.js +6 -6
- package/dist/api/open-api/channels-live.js.map +1 -1
- package/dist/api/open-api/customer-service.js +1 -1
- package/dist/api/open-api/customer-service.js.map +1 -1
- package/dist/api/open-api/facial.js +4 -4
- package/dist/api/open-api/facial.js.map +1 -1
- package/dist/api/open-api/favorites.js +3 -3
- package/dist/api/open-api/favorites.js.map +1 -1
- package/dist/api/open-api/group.js +1 -1
- package/dist/api/open-api/group.js.map +1 -1
- package/dist/api/open-api/invoice.js +2 -2
- package/dist/api/open-api/invoice.js.map +1 -1
- package/dist/api/open-api/license-plate.js +1 -1
- package/dist/api/open-api/license-plate.js.map +1 -1
- package/dist/api/open-api/login.js +3 -3
- package/dist/api/open-api/login.js.map +1 -1
- package/dist/api/open-api/red-package.js +1 -1
- package/dist/api/open-api/red-package.js.map +1 -1
- package/dist/api/open-api/settings.js +2 -2
- package/dist/api/open-api/settings.js.map +1 -1
- package/dist/api/open-api/soter.js +3 -3
- package/dist/api/open-api/soter.js.map +1 -1
- package/dist/api/open-api/subscribe-message.js +2 -2
- package/dist/api/open-api/subscribe-message.js.map +1 -1
- package/dist/api/open-api/user-info.js +2 -2
- package/dist/api/open-api/user-info.js.map +1 -1
- package/dist/api/open-api/werun.js +2 -2
- package/dist/api/open-api/werun.js.map +1 -1
- package/dist/api/payment/index.js +2 -2
- package/dist/api/payment/index.js.map +1 -1
- package/dist/api/qq/index.js +1 -1
- package/dist/api/qq/index.js.map +1 -1
- package/dist/api/share/index.d.ts +10 -0
- package/dist/api/share/index.js +21 -11
- package/dist/api/share/index.js.map +1 -1
- package/dist/api/storage/background-fetch.js +4 -4
- package/dist/api/storage/background-fetch.js.map +1 -1
- package/dist/api/storage/index.js +2 -2
- package/dist/api/storage/index.js.map +1 -1
- package/dist/api/swan/index.js +21 -21
- package/dist/api/swan/index.js.map +1 -1
- package/dist/api/taro.js +1 -1
- package/dist/api/taro.js.map +1 -1
- package/dist/api/ui/background.js +2 -2
- package/dist/api/ui/background.js.map +1 -1
- package/dist/api/ui/interaction/index.d.ts +1 -1
- package/dist/api/ui/interaction/index.js +4 -4
- package/dist/api/ui/interaction/index.js.map +1 -1
- package/dist/api/ui/interaction/modal.js +6 -0
- package/dist/api/ui/interaction/modal.js.map +1 -1
- package/dist/api/ui/interaction/toast.js +4 -0
- package/dist/api/ui/interaction/toast.js.map +1 -1
- package/dist/api/ui/menu.js +1 -1
- package/dist/api/ui/menu.js.map +1 -1
- package/dist/api/ui/navigation-bar/index.js +3 -3
- package/dist/api/ui/navigation-bar/index.js.map +1 -1
- package/dist/api/ui/scroll/index.js +4 -3
- package/dist/api/ui/scroll/index.js.map +1 -1
- package/dist/api/ui/sticky.js +1 -1
- package/dist/api/ui/sticky.js.map +1 -1
- package/dist/api/ui/window.js +2 -2
- package/dist/api/ui/window.js.map +1 -1
- package/dist/api/worker/index.js +1 -1
- package/dist/api/worker/index.js.map +1 -1
- package/dist/api/wxml/IntersectionObserver.d.ts +1 -1
- package/dist/api/wxml/IntersectionObserver.js +0 -1
- package/dist/api/wxml/IntersectionObserver.js.map +1 -1
- package/dist/api/wxml/MediaQueryObserver.d.ts +1 -1
- package/dist/api/wxml/MediaQueryObserver.js.map +1 -1
- package/dist/index.cjs.d.ts +27 -13
- package/dist/index.cjs.js +3859 -20738
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +27 -13
- package/dist/index.esm.js +4354 -21228
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/helper.d.ts +2 -0
- package/dist/utils/helper.js +11 -0
- package/dist/utils/helper.js.map +1 -0
- package/dist/utils/index.d.ts +5 -3
- package/dist/utils/index.js +4 -9
- package/dist/utils/index.js.map +1 -1
- package/package.json +16 -10
- package/dist/_virtual/_commonjsHelpers.js +0 -35
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/lodash.js +0 -4
- package/dist/_virtual/lodash.js.map +0 -1
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js +0 -17220
- package/dist/node_modules/.pnpm/registry.npmjs.org_lodash@4.17.21/node_modules/lodash/lodash.js.map +0 -1
- package/dist/utils/lodash.d.ts +0 -3
- package/dist/utils/lodash.js +0 -32
- package/dist/utils/lodash.js.map +0 -1
package/dist/api/device/nfc.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// NFC
|
|
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');
|
|
4
|
+
const stopHCE = /* @__PURE__ */ temporarilyNotSupport('stopHCE');
|
|
5
|
+
const startHCE = /* @__PURE__ */ temporarilyNotSupport('startHCE');
|
|
6
|
+
const sendHCEMessage = /* @__PURE__ */ temporarilyNotSupport('sendHCEMessage');
|
|
7
|
+
const onHCEMessage = /* @__PURE__ */ temporarilyNotSupport('onHCEMessage');
|
|
8
|
+
const offHCEMessage = /* @__PURE__ */ temporarilyNotSupport('offHCEMessage');
|
|
9
|
+
const getNFCAdapter = /* @__PURE__ */ temporarilyNotSupport('getNFCAdapter');
|
|
10
|
+
const getHCEState = /* @__PURE__ */ temporarilyNotSupport('getHCEState');
|
|
11
11
|
|
|
12
12
|
export { getHCEState, getNFCAdapter, offHCEMessage, onHCEMessage, sendHCEMessage, startHCE, stopHCE };
|
|
13
13
|
//# sourceMappingURL=nfc.js.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"nfc.js","sources":["../../../src/api/device/nfc.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// NFC\nexport const stopHCE = /* @__PURE__ */ temporarilyNotSupport('stopHCE')\nexport const startHCE = /* @__PURE__ */ temporarilyNotSupport('startHCE')\nexport const sendHCEMessage = /* @__PURE__ */ temporarilyNotSupport('sendHCEMessage')\nexport const onHCEMessage = /* @__PURE__ */ temporarilyNotSupport('onHCEMessage')\nexport const offHCEMessage = /* @__PURE__ */ temporarilyNotSupport('offHCEMessage')\nexport const getNFCAdapter = /* @__PURE__ */ temporarilyNotSupport('getNFCAdapter')\nexport const getHCEState = /* @__PURE__ */ temporarilyNotSupport('getHCEState')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,OAAO,mBAAmB,qBAAqB,CAAC,SAAS,EAAC;AAC1D,MAAA,QAAQ,mBAAmB,qBAAqB,CAAC,UAAU,EAAC;AAC5D,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AACtE,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AACtE,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa;;;;"}
|
package/dist/api/device/scan.js
CHANGED
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"scan.js","sources":["../../../src/api/device/scan.ts"],"sourcesContent":["import { processOpenApi } from '../../utils'\n\n// 扫码\nexport const scanCode = /* @__PURE__ */ 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;AACa,MAAA,QAAQ,mBAAmB,cAAc,CAAC;AACrD,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,12 +1,12 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 屏幕
|
|
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');
|
|
4
|
+
const setVisualEffectOnCapture = /* @__PURE__ */ temporarilyNotSupport('setVisualEffectOnCapture');
|
|
5
|
+
const setScreenBrightness = /* @__PURE__ */ temporarilyNotSupport('setScreenBrightness');
|
|
6
|
+
const setKeepScreenOn = /* @__PURE__ */ temporarilyNotSupport('setKeepScreenOn');
|
|
7
|
+
const onUserCaptureScreen = /* @__PURE__ */ temporarilyNotSupport('onUserCaptureScreen');
|
|
8
|
+
const offUserCaptureScreen = /* @__PURE__ */ temporarilyNotSupport('offUserCaptureScreen');
|
|
9
|
+
const getScreenBrightness = /* @__PURE__ */ temporarilyNotSupport('getScreenBrightness');
|
|
10
10
|
|
|
11
11
|
export { getScreenBrightness, offUserCaptureScreen, onUserCaptureScreen, setKeepScreenOn, setScreenBrightness, setVisualEffectOnCapture };
|
|
12
12
|
//# sourceMappingURL=screen.js.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"screen.js","sources":["../../../src/api/device/screen.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 屏幕\nexport const setVisualEffectOnCapture = /* @__PURE__ */ temporarilyNotSupport('setVisualEffectOnCapture')\nexport const setScreenBrightness = /* @__PURE__ */ temporarilyNotSupport('setScreenBrightness')\nexport const setKeepScreenOn = /* @__PURE__ */ temporarilyNotSupport('setKeepScreenOn')\nexport const onUserCaptureScreen = /* @__PURE__ */ temporarilyNotSupport('onUserCaptureScreen')\nexport const offUserCaptureScreen = /* @__PURE__ */ temporarilyNotSupport('offUserCaptureScreen')\nexport const getScreenBrightness = /* @__PURE__ */ temporarilyNotSupport('getScreenBrightness')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B,EAAC;AAC5F,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAC1E,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB;;;;"}
|
package/dist/api/device/wifi.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// Wi-Fi
|
|
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 offWifiConnectedWithPartialInfo = temporarilyNotSupport('offWifiConnectedWithPartialInfo');
|
|
11
|
-
const offWifiConnected = temporarilyNotSupport('offWifiConnected');
|
|
12
|
-
const offGetWifiList = temporarilyNotSupport('offGetWifiList');
|
|
13
|
-
const getWifiList = temporarilyNotSupport('getWifiList');
|
|
14
|
-
const getConnectedWifi = temporarilyNotSupport('getConnectedWifi');
|
|
15
|
-
const connectWifi = temporarilyNotSupport('connectWifi');
|
|
4
|
+
const stopWifi = /* @__PURE__ */ temporarilyNotSupport('stopWifi');
|
|
5
|
+
const startWifi = /* @__PURE__ */ temporarilyNotSupport('startWifi');
|
|
6
|
+
const setWifiList = /* @__PURE__ */ temporarilyNotSupport('setWifiList');
|
|
7
|
+
const onWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('onWifiConnectedWithPartialInfo');
|
|
8
|
+
const onWifiConnected = /* @__PURE__ */ temporarilyNotSupport('onWifiConnected');
|
|
9
|
+
const onGetWifiList = /* @__PURE__ */ temporarilyNotSupport('onGetWifiList');
|
|
10
|
+
const offWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('offWifiConnectedWithPartialInfo');
|
|
11
|
+
const offWifiConnected = /* @__PURE__ */ temporarilyNotSupport('offWifiConnected');
|
|
12
|
+
const offGetWifiList = /* @__PURE__ */ temporarilyNotSupport('offGetWifiList');
|
|
13
|
+
const getWifiList = /* @__PURE__ */ temporarilyNotSupport('getWifiList');
|
|
14
|
+
const getConnectedWifi = /* @__PURE__ */ temporarilyNotSupport('getConnectedWifi');
|
|
15
|
+
const connectWifi = /* @__PURE__ */ temporarilyNotSupport('connectWifi');
|
|
16
16
|
|
|
17
17
|
export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, offWifiConnectedWithPartialInfo, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi };
|
|
18
18
|
//# sourceMappingURL=wifi.js.map
|
|
@@ -1 +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 offWifiConnectedWithPartialInfo = temporarilyNotSupport('offWifiConnectedWithPartialInfo')\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;
|
|
1
|
+
{"version":3,"file":"wifi.js","sources":["../../../src/api/device/wifi.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// Wi-Fi\nexport const stopWifi = /* @__PURE__ */ temporarilyNotSupport('stopWifi')\nexport const startWifi = /* @__PURE__ */ temporarilyNotSupport('startWifi')\nexport const setWifiList = /* @__PURE__ */ temporarilyNotSupport('setWifiList')\nexport const onWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('onWifiConnectedWithPartialInfo')\nexport const onWifiConnected = /* @__PURE__ */ temporarilyNotSupport('onWifiConnected')\nexport const onGetWifiList = /* @__PURE__ */ temporarilyNotSupport('onGetWifiList')\nexport const offWifiConnectedWithPartialInfo = /* @__PURE__ */ temporarilyNotSupport('offWifiConnectedWithPartialInfo')\nexport const offWifiConnected = /* @__PURE__ */ temporarilyNotSupport('offWifiConnected')\nexport const offGetWifiList = /* @__PURE__ */ temporarilyNotSupport('offGetWifiList')\nexport const getWifiList = /* @__PURE__ */ temporarilyNotSupport('getWifiList')\nexport const getConnectedWifi = /* @__PURE__ */ temporarilyNotSupport('getConnectedWifi')\nexport const connectWifi = /* @__PURE__ */ temporarilyNotSupport('connectWifi')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,QAAQ,mBAAmB,qBAAqB,CAAC,UAAU,EAAC;AAC5D,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,8BAA8B,mBAAmB,qBAAqB,CAAC,gCAAgC,EAAC;AACxG,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAC1E,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AACtE,MAAA,+BAA+B,mBAAmB,qBAAqB,CAAC,iCAAiC,EAAC;AAC1G,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa,EAAC;AAClE,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa;;;;"}
|
package/dist/api/ext/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 第三方平台
|
|
4
|
-
const getExtConfigSync = temporarilyNotSupport('getExtConfigSync');
|
|
5
|
-
const getExtConfig = temporarilyNotSupport('getExtConfig');
|
|
4
|
+
const getExtConfigSync = /* @__PURE__ */ temporarilyNotSupport('getExtConfigSync');
|
|
5
|
+
const getExtConfig = /* @__PURE__ */ temporarilyNotSupport('getExtConfig');
|
|
6
6
|
|
|
7
7
|
export { getExtConfig, getExtConfigSync };
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/ext/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 第三方平台\nexport const getExtConfigSync = /* @__PURE__ */ temporarilyNotSupport('getExtConfigSync')\nexport const getExtConfig = /* @__PURE__ */ temporarilyNotSupport('getExtConfig')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc;;;;"}
|
package/dist/api/files/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 文件
|
|
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');
|
|
4
|
+
const saveFileToDisk = /* @__PURE__ */ temporarilyNotSupport('saveFileToDisk');
|
|
5
|
+
const saveFile = /* @__PURE__ */ temporarilyNotSupport('saveFile');
|
|
6
|
+
const removeSavedFile = /* @__PURE__ */ temporarilyNotSupport('removeSavedFile');
|
|
7
|
+
const openDocument = /* @__PURE__ */ temporarilyNotSupport('openDocument');
|
|
8
|
+
const getSavedFileList = /* @__PURE__ */ temporarilyNotSupport('getSavedFileList');
|
|
9
|
+
const getSavedFileInfo = /* @__PURE__ */ temporarilyNotSupport('getSavedFileInfo');
|
|
10
|
+
const getFileSystemManager = /* @__PURE__ */ temporarilyNotSupport('getFileSystemManager');
|
|
11
|
+
const getFileInfo = /* @__PURE__ */ temporarilyNotSupport('getFileInfo');
|
|
12
12
|
|
|
13
13
|
export { getFileInfo, getFileSystemManager, getSavedFileInfo, getSavedFileList, openDocument, removeSavedFile, saveFile, saveFileToDisk };
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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;
|
|
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 = /* @__PURE__ */ temporarilyNotSupport('saveFileToDisk')\r\nexport const saveFile = /* @__PURE__ */ temporarilyNotSupport('saveFile')\r\nexport const removeSavedFile = /* @__PURE__ */ temporarilyNotSupport('removeSavedFile')\r\nexport const openDocument = /* @__PURE__ */ temporarilyNotSupport('openDocument')\r\nexport const getSavedFileList = /* @__PURE__ */ temporarilyNotSupport('getSavedFileList')\r\nexport const getSavedFileInfo = /* @__PURE__ */ temporarilyNotSupport('getSavedFileInfo')\r\nexport const getFileSystemManager = /* @__PURE__ */ temporarilyNotSupport('getFileSystemManager')\r\nexport const getFileInfo = /* @__PURE__ */ temporarilyNotSupport('getFileInfo')\r\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,cAAc,mBAAmB,qBAAqB,CAAC,gBAAgB,EAAC;AACxE,MAAA,QAAQ,mBAAmB,qBAAqB,CAAC,UAAU,EAAC;AAC5D,MAAA,eAAe,mBAAmB,qBAAqB,CAAC,iBAAiB,EAAC;AAC1E,MAAA,YAAY,mBAAmB,qBAAqB,CAAC,cAAc,EAAC;AACpE,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,WAAW,mBAAmB,qBAAqB,CAAC,aAAa;;;;"}
|
package/dist/api/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createInterstitialAd, createRewardedVideoAd } from './ad/index.js';
|
|
2
2
|
import './ai/index.js';
|
|
3
3
|
export { getOpenUserInfo } from './alipay/index.js';
|
|
4
|
-
export { arrayBufferToBase64, base64ToArrayBuffer,
|
|
4
|
+
export { arrayBufferToBase64, base64ToArrayBuffer, env } from './base/index.js';
|
|
5
5
|
export { createOffscreenCanvas } from './canvas/index.js';
|
|
6
6
|
export { cloud } from './cloud/index.js';
|
|
7
7
|
export { getExptInfoSync, reportAnalytics, reportEvent, reportMonitor } from './data-analysis/index.js';
|
|
@@ -65,15 +65,20 @@ export { chooseLocation } from './location/chooseLocation.js';
|
|
|
65
65
|
export { createAudioContext, createInnerAudioContext, createMediaAudioPlayer, createWebAudioContext, getAvailableAudioSources, pauseVoice, playVoice, setInnerAudioOption, stopVoice } from './media/audio/index.js';
|
|
66
66
|
export { getBackgroundAudioManager, getBackgroundAudioPlayerState, onBackgroundAudioPause, onBackgroundAudioPlay, onBackgroundAudioStop, pauseBackgroundAudio, playBackgroundAudio, seekBackgroundAudio, stopBackgroundAudio } from './media/background-audio/index.js';
|
|
67
67
|
export { createCameraContext } from './media/camera.js';
|
|
68
|
+
export { saveImageToPhotosAlbum } from './media/image/saveImageToPhotosAlbum.js';
|
|
68
69
|
export { getImageInfo } from './media/image/getImageInfo.js';
|
|
69
70
|
export { previewImage } from './media/image/previewImage.js';
|
|
70
71
|
export { chooseImage } from './media/image/chooseImage.js';
|
|
71
|
-
export { chooseMessageFile, compressImage, cropImage, editImage, previewMedia
|
|
72
|
+
export { chooseMessageFile, compressImage, cropImage, editImage, previewMedia } from './media/image/index.js';
|
|
72
73
|
export { createLivePlayerContext, createLivePusherContext } from './media/live.js';
|
|
73
74
|
export { createMapContext } from './media/map.js';
|
|
74
75
|
export { createMediaRecorder } from './media/media-recorder.js';
|
|
75
76
|
export { getRecorderManager, startRecord, stopRecord } from './media/recorder.js';
|
|
76
|
-
export {
|
|
77
|
+
export { saveVideoToPhotosAlbum } from './media/video/saveVideoToPhotosAlbum.js';
|
|
78
|
+
export { getVideoInfo } from './media/video/getVideoInfo.js';
|
|
79
|
+
export { chooseMedia } from './media/video/chooseMedia.js';
|
|
80
|
+
export { chooseVideo } from './media/video/chooseVideo.js';
|
|
81
|
+
export { compressVideo, createVideoContext, openVideoEditor } from './media/video/index.js';
|
|
77
82
|
export { createVideoDecoder } from './media/video-decoder.js';
|
|
78
83
|
export { createMediaContainer } from './media/video-processing.js';
|
|
79
84
|
export { exitVoIPChat, joinVoIPChat, offVoIPChatInterrupted, offVoIPChatMembersChanged, offVoIPChatStateChanged, offVoIPVideoMembersChanged, onVoIPChatInterrupted, onVoIPChatMembersChanged, onVoIPChatSpeakersChanged, onVoIPChatStateChanged, onVoIPVideoMembersChanged, setEnable1v1Chat, subscribeVoIPVideoMembers, updateVoIPChatMuteConfig } from './media/voip.js';
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,11 +3,13 @@ import './style.scss.js';
|
|
|
3
3
|
import { stringify } from 'query-string';
|
|
4
4
|
import { MethodHandler } from '../../utils/handler.js';
|
|
5
5
|
|
|
6
|
+
let container = null;
|
|
6
7
|
function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
|
|
7
8
|
var _a, _b, _c;
|
|
8
9
|
const { latitude, longitude } = mapOpt, opts = __rest(mapOpt, ["latitude", "longitude"]);
|
|
9
10
|
const query = Object.assign({ key, type: 1, coord: ((_a = mapOpt.coord) !== null && _a !== void 0 ? _a : [latitude, longitude].every(e => Number(e) >= 0)) ? `${latitude},${longitude}` : undefined, referer: 'myapp' }, opts);
|
|
10
|
-
|
|
11
|
+
if (!container) {
|
|
12
|
+
const html = `
|
|
11
13
|
<div class='taro_choose_location'>
|
|
12
14
|
<div class='taro_choose_location_bar'>
|
|
13
15
|
<div class='taro_choose_location_back'></div>
|
|
@@ -17,8 +19,9 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
|
|
|
17
19
|
<iframe class='taro_choose_location_frame' frameborder='0' src="https://apis.map.qq.com/tools/locpicker?${stringify(query, { arrayFormat: 'comma', skipNull: true })}" />
|
|
18
20
|
</div>
|
|
19
21
|
`;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
container = document.createElement('div');
|
|
23
|
+
container.innerHTML = html;
|
|
24
|
+
}
|
|
22
25
|
const main = container.querySelector('.taro_choose_location');
|
|
23
26
|
function show() {
|
|
24
27
|
setTimeout(() => {
|
|
@@ -37,7 +40,8 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
|
|
|
37
40
|
handler();
|
|
38
41
|
}
|
|
39
42
|
function remove() {
|
|
40
|
-
container.remove();
|
|
43
|
+
container === null || container === void 0 ? void 0 : container.remove();
|
|
44
|
+
container = null;
|
|
41
45
|
window.removeEventListener('popstate', back);
|
|
42
46
|
}
|
|
43
47
|
(_b = container.querySelector('.taro_choose_location_back')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', back);
|
|
@@ -46,7 +50,7 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
|
|
|
46
50
|
return {
|
|
47
51
|
show,
|
|
48
52
|
remove,
|
|
49
|
-
container
|
|
53
|
+
container,
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chooseLocation.js","sources":["../../../src/api/location/chooseLocation.ts"],"sourcesContent":["import './style.scss'\r\n\r\nimport Taro from '@tarojs/api'\r\nimport { stringify } from 'query-string'\r\n\r\nimport { MethodHandler } from '../../utils/handler'\r\n\r\nfunction createLocationChooser (handler, key = LOCATION_APIKEY, mapOpt: Taro.chooseLocation.Option['mapOpts'] = {}) {\r\n const { latitude, longitude, ...opts } = mapOpt\r\n const query = {\r\n key,\r\n type: 1,\r\n coord: mapOpt.coord ?? [latitude, longitude].every(e => Number(e) >= 0) ? `${latitude},${longitude}` : undefined,\r\n referer: 'myapp',\r\n ...opts\r\n }\r\n const html = `\r\n<div class='taro_choose_location'>\r\n <div class='taro_choose_location_bar'>\r\n <div class='taro_choose_location_back'></div>\r\n <p class='taro_choose_location_title'>位置</p>\r\n <button class='taro_choose_location_submit'>完成</button>\r\n </div>\r\n <iframe class='taro_choose_location_frame' frameborder='0' src=\"https://apis.map.qq.com/tools/locpicker?${stringify(query, { arrayFormat: 'comma', skipNull: true })}\" />\r\n</div>\r\n`\r\n
|
|
1
|
+
{"version":3,"file":"chooseLocation.js","sources":["../../../src/api/location/chooseLocation.ts"],"sourcesContent":["import './style.scss'\r\n\r\nimport Taro from '@tarojs/api'\r\nimport { stringify } from 'query-string'\r\n\r\nimport { MethodHandler } from '../../utils/handler'\r\n\r\nlet container: HTMLDivElement | null = null\r\nfunction createLocationChooser (handler, key = LOCATION_APIKEY, mapOpt: Taro.chooseLocation.Option['mapOpts'] = {}) {\r\n const { latitude, longitude, ...opts } = mapOpt\r\n const query = {\r\n key,\r\n type: 1,\r\n coord: mapOpt.coord ?? [latitude, longitude].every(e => Number(e) >= 0) ? `${latitude},${longitude}` : undefined,\r\n referer: 'myapp',\r\n ...opts\r\n }\r\n if (!container) {\r\n const html = `\r\n<div class='taro_choose_location'>\r\n <div class='taro_choose_location_bar'>\r\n <div class='taro_choose_location_back'></div>\r\n <p class='taro_choose_location_title'>位置</p>\r\n <button class='taro_choose_location_submit'>完成</button>\r\n </div>\r\n <iframe class='taro_choose_location_frame' frameborder='0' src=\"https://apis.map.qq.com/tools/locpicker?${stringify(query, { arrayFormat: 'comma', skipNull: true })}\" />\r\n</div>\r\n`\r\n container = document.createElement('div')\r\n container.innerHTML = html\r\n }\r\n const main: HTMLDivElement = container.querySelector('.taro_choose_location') as HTMLDivElement\r\n\r\n function show () {\r\n setTimeout(() => {\r\n main.style.top = '0'\r\n })\r\n }\r\n\r\n function hide () {\r\n main.style.top = '100%'\r\n }\r\n\r\n function back () {\r\n hide()\r\n handler({ errMsg: 'cancel' })\r\n }\r\n\r\n function submit () {\r\n hide()\r\n handler()\r\n }\r\n\r\n function remove () {\r\n container?.remove()\r\n container = null\r\n window.removeEventListener('popstate', back)\r\n }\r\n\r\n container.querySelector('.taro_choose_location_back')?.addEventListener('click', back)\r\n container.querySelector('.taro_choose_location_submit')?.addEventListener('click', submit)\r\n\r\n window.addEventListener('popstate', back)\r\n\r\n return {\r\n show,\r\n remove,\r\n container,\r\n }\r\n}\r\n\r\n/**\r\n * 打开地图选择位置。\r\n */\r\nexport const chooseLocation: typeof Taro.chooseLocation = ({ success, fail, complete, mapOpts } = {}) => {\r\n const key = LOCATION_APIKEY\r\n const handle = new MethodHandler({ name: 'chooseLocation', success, fail, complete })\r\n return new Promise((resolve, reject) => {\r\n const chooseLocation: Partial<Taro.chooseLocation.SuccessCallbackResult> = {}\r\n if (!key) {\r\n console.warn('chooseLocation api 依赖腾讯地图定位api,需要在 defineConstants 中配置 LOCATION_APIKEY')\r\n return handle.fail({\r\n errMsg: 'LOCATION_APIKEY needed'\r\n }, { resolve, reject })\r\n }\r\n\r\n const onMessage = event => {\r\n // 接收位置信息,用户选择确认位置点后选点组件会触发该事件,回传用户的位置信息\r\n const loc = event.data\r\n\r\n // 防止其他应用也会向该页面 post 信息,需判断 module 是否为'locationPicker'\r\n if (!loc || loc.module !== 'locationPicker') return\r\n\r\n chooseLocation.name = loc.poiname\r\n chooseLocation.address = loc.poiaddress\r\n chooseLocation.latitude = loc.latlng.lat\r\n chooseLocation.longitude = loc.latlng.lng\r\n }\r\n\r\n const chooser = createLocationChooser(res => {\r\n window.removeEventListener('message', onMessage, false)\r\n setTimeout(() => {\r\n chooser.remove()\r\n }, 300)\r\n if (res) {\r\n return handle.fail(res, { resolve, reject })\r\n } else {\r\n if (chooseLocation.latitude && chooseLocation.longitude) {\r\n return handle.success(chooseLocation, { resolve, reject })\r\n } else {\r\n return handle.fail({}, { resolve, reject })\r\n }\r\n }\r\n }, key, mapOpts)\r\n\r\n document.body.appendChild(chooser.container)\r\n\r\n window.addEventListener('message', onMessage, false)\r\n chooser.show()\r\n })\r\n}\r\n"],"names":[],"mappings":";;;;;AAOA,IAAI,SAAS,GAA0B,IAAI,CAAA;AAC3C,SAAS,qBAAqB,CAAE,OAAO,EAAE,GAAG,GAAG,eAAe,EAAE,MAAA,GAAgD,EAAE,EAAA;;AAChH,IAAA,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAc,GAAA,MAAM,EAAf,IAAI,GAAK,MAAA,CAAA,MAAM,EAAzC,CAAA,UAAA,EAAA,WAAA,CAAgC,CAAS,CAAA;IAC/C,MAAM,KAAK,GACT,MAAA,CAAA,MAAA,CAAA,EAAA,GAAG,EACH,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,CAAA,CAAA,EAAA,GAAA,MAAM,CAAC,KAAK,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAG,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,GAAG,SAAS,EAChH,OAAO,EAAE,OAAO,EAAA,EACb,IAAI,CACR,CAAA;IACD,IAAI,CAAC,SAAS,EAAE;AACd,QAAA,MAAM,IAAI,GAAG,CAAA;;;;;;;AAO2F,0GAAA,EAAA,SAAS,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;CAErK,CAAA;AACG,QAAA,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;AACzC,QAAA,SAAS,CAAC,SAAS,GAAG,IAAI,CAAA;AAC3B,KAAA;IACD,MAAM,IAAI,GAAmB,SAAS,CAAC,aAAa,CAAC,uBAAuB,CAAmB,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AAE,CAAA;aACjB,EAAE,GAAG,CAAC,CAAA;AACP,YAAA,IAAI,GAAG,EAAE;AACP,gBAAA,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AAC7C,aAAA;AAAM,iBAAA;AACL,gBAAA,IAAI,cAAc,CAAC,QAAQ,IAAI,cAAc,CAAC,SAAS,EAAE;AACvD,oBAAA,OAAO,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AAC3D,iBAAA;AAAM,qBAAA;AACL,oBAAA,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AAC5C,iBAAA;AACF,aAAA;AACH,SAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QAEhB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;QAE5C,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;QACpD,OAAO,CAAC,IAAI,EAAE,CAAA;AAChB,KAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocation.js","sources":["../../../src/api/location/getLocation.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { processOpenApi, shouldBeObject } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nconst getLocationByW3CApi: (options: Taro.getLocation.Option) => Promise<Taro.getLocation.SuccessCallbackResult> = (options: Taro.getLocation.Option): Promise<Taro.getLocation.SuccessCallbackResult> => {\n // 断言 options 必须是 Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getLocation:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n // 解构回调函数\n const { success, fail, complete } = options\n\n const handle = new MethodHandler({ name: 'getLocation', success, fail, complete })\n\n // const defaultMaximumAge = 5 * 1000\n\n const positionOptions: PositionOptions = {\n enableHighAccuracy: options.isHighAccuracy || (options.altitude != null), // 海拔定位需要高精度\n // maximumAge: defaultMaximumAge, // 允许取多久以内的缓存位置\n timeout: options.highAccuracyExpireTime // 高精度定位超时时间\n }\n\n // Web端API实现暂时仅支持GPS坐标系\n if (options.type?.toUpperCase() !== 'WGS84') {\n return handle.fail({\n errMsg: 'This coordinate system type is not temporarily supported'\n })\n }\n\n // 判断当前浏览器是否支持位置API\n const geolocationSupported = navigator.geolocation\n\n if (!geolocationSupported) {\n return handle.fail({\n errMsg: 'The current browser does not support this feature'\n })\n }\n\n // 开始获取位置\n return new Promise<Taro.getLocation.SuccessCallbackResult>(\n (resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const result: Taro.getLocation.SuccessCallbackResult = {\n /** 位置的精确度 */\n accuracy: position.coords.accuracy,\n /** 高度,单位 m */\n altitude: position.coords.altitude!,\n /** 水平精度,单位 m */\n horizontalAccuracy: position.coords.accuracy,\n /** 纬度,范围为 -90~90,负数表示南纬 */\n latitude: position.coords.latitude,\n /** 经度,范围为 -180~180,负数表示西经 */\n longitude: position.coords.longitude,\n /** 速度,单位 m/s */\n speed: position.coords.speed!,\n /** 垂直精度,单位 m(Android 无法获取,返回 0) */\n verticalAccuracy: position.coords.altitudeAccuracy || 0,\n /** 调用结果,自动补充 */\n errMsg: ''\n }\n handle.success(result, { resolve, reject })\n },\n (error) => {\n handle.fail({ errMsg: error.message }, { resolve, reject })\n },\n positionOptions\n )\n }\n )\n}\n\nexport const getLocation = processOpenApi({\n name: 'getLocation',\n standardMethod: getLocationByW3CApi\n})\n"],"names":[],"mappings":";;;AAKA,MAAM,mBAAmB,GAA0F,CAAC,OAAgC,KAAqD;;;AAEvM,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,CAAC,QAAQ,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AM,CAAC,QAAQ;;AAElC,gBAAA,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAS;;AAEnC,gBAAA,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ;;AAE5C,gBAAA,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ;;AAElC,gBAAA,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;;AAEpC,gBAAA,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAM;;AAE7B,gBAAA,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC;;AAEvD,gBAAA,MAAM,EAAE,EAAE;aACX,CAAA;YACD,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AAC7C,SAAC,EACD,CAAC,KAAK,KAAI;AACR,YAAA,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;SAC5D,EACD,eAAe,CAChB,CAAA;AACH,KAAC,CACF,CAAA;AACH,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"getLocation.js","sources":["../../../src/api/location/getLocation.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { processOpenApi, shouldBeObject } from '../../utils'\nimport { MethodHandler } from '../../utils/handler'\n\nconst getLocationByW3CApi: (options: Taro.getLocation.Option) => Promise<Taro.getLocation.SuccessCallbackResult> = (options: Taro.getLocation.Option): Promise<Taro.getLocation.SuccessCallbackResult> => {\n // 断言 options 必须是 Object\n const isObject = shouldBeObject(options)\n if (!isObject.flag) {\n const res = { errMsg: `getLocation:fail ${isObject.msg}` }\n console.error(res.errMsg)\n return Promise.reject(res)\n }\n\n // 解构回调函数\n const { success, fail, complete } = options\n\n const handle = new MethodHandler({ name: 'getLocation', success, fail, complete })\n\n // const defaultMaximumAge = 5 * 1000\n\n const positionOptions: PositionOptions = {\n enableHighAccuracy: options.isHighAccuracy || (options.altitude != null), // 海拔定位需要高精度\n // maximumAge: defaultMaximumAge, // 允许取多久以内的缓存位置\n timeout: options.highAccuracyExpireTime // 高精度定位超时时间\n }\n\n // Web端API实现暂时仅支持GPS坐标系\n if (options.type?.toUpperCase() !== 'WGS84') {\n return handle.fail({\n errMsg: 'This coordinate system type is not temporarily supported'\n })\n }\n\n // 判断当前浏览器是否支持位置API\n const geolocationSupported = navigator.geolocation\n\n if (!geolocationSupported) {\n return handle.fail({\n errMsg: 'The current browser does not support this feature'\n })\n }\n\n // 开始获取位置\n return new Promise<Taro.getLocation.SuccessCallbackResult>(\n (resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n const result: Taro.getLocation.SuccessCallbackResult = {\n /** 位置的精确度 */\n accuracy: position.coords.accuracy,\n /** 高度,单位 m */\n altitude: position.coords.altitude!,\n /** 水平精度,单位 m */\n horizontalAccuracy: position.coords.accuracy,\n /** 纬度,范围为 -90~90,负数表示南纬 */\n latitude: position.coords.latitude,\n /** 经度,范围为 -180~180,负数表示西经 */\n longitude: position.coords.longitude,\n /** 速度,单位 m/s */\n speed: position.coords.speed!,\n /** 垂直精度,单位 m(Android 无法获取,返回 0) */\n verticalAccuracy: position.coords.altitudeAccuracy || 0,\n /** 调用结果,自动补充 */\n errMsg: ''\n }\n handle.success(result, { resolve, reject })\n },\n (error) => {\n handle.fail({ errMsg: error.message }, { resolve, reject })\n },\n positionOptions\n )\n }\n )\n}\n\nexport const getLocation = /* @__PURE__ */ processOpenApi({\n name: 'getLocation',\n standardMethod: getLocationByW3CApi\n})\n"],"names":[],"mappings":";;;AAKA,MAAM,mBAAmB,GAA0F,CAAC,OAAgC,KAAqD;;;AAEvM,IAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;AACxC,IAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAClB,MAAM,GAAG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Q,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAS;;AAEnC,gBAAA,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ;;AAE5C,gBAAA,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ;;AAElC,gBAAA,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS;;AAEpC,gBAAA,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAM;;AAE7B,gBAAA,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,IAAI,CAAC;;AAEvD,gBAAA,MAAM,EAAE,EAAE;aACX,CAAA;YACD,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;AAC7C,SAAC,EACD,CAAC,KAAK,KAAI;AACR,YAAA,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;SAC5D,EACD,eAAe,CAChB,CAAA;AACH,KAAC,CACF,CAAA;AACH,CAAC,CAAA;AAEY,MAAA,WAAW,mBAAmB,cAAc,CAAC;AACxD,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,cAAc,EAAE,mBAAmB;AACpC,CAAA;;;;"}
|
|
@@ -3,19 +3,19 @@ export { getLocation } from './getLocation.js';
|
|
|
3
3
|
export { chooseLocation } from './chooseLocation.js';
|
|
4
4
|
|
|
5
5
|
// 位置
|
|
6
|
-
const stopLocationUpdate = temporarilyNotSupport('stopLocationUpdate');
|
|
7
|
-
const startLocationUpdateBackground = temporarilyNotSupport('startLocationUpdateBackground');
|
|
8
|
-
const startLocationUpdate = temporarilyNotSupport('startLocationUpdate');
|
|
9
|
-
const openLocation = processOpenApi({
|
|
6
|
+
const stopLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('stopLocationUpdate');
|
|
7
|
+
const startLocationUpdateBackground = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdateBackground');
|
|
8
|
+
const startLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdate');
|
|
9
|
+
const openLocation = /* @__PURE__ */ processOpenApi({
|
|
10
10
|
name: 'openLocation',
|
|
11
11
|
defaultOptions: { scale: 18 }
|
|
12
12
|
});
|
|
13
|
-
const onLocationChangeError = temporarilyNotSupport('onLocationChangeError');
|
|
14
|
-
const onLocationChange = temporarilyNotSupport('onLocationChange');
|
|
15
|
-
const offLocationChangeError = temporarilyNotSupport('offLocationChangeError');
|
|
16
|
-
const offLocationChange = temporarilyNotSupport('offLocationChange');
|
|
17
|
-
const choosePoi = temporarilyNotSupport('choosePoi');
|
|
18
|
-
const getFuzzyLocation = temporarilyNotSupport('getFuzzyLocation');
|
|
13
|
+
const onLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('onLocationChangeError');
|
|
14
|
+
const onLocationChange = /* @__PURE__ */ temporarilyNotSupport('onLocationChange');
|
|
15
|
+
const offLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('offLocationChangeError');
|
|
16
|
+
const offLocationChange = /* @__PURE__ */ temporarilyNotSupport('offLocationChange');
|
|
17
|
+
const choosePoi = /* @__PURE__ */ temporarilyNotSupport('choosePoi');
|
|
18
|
+
const getFuzzyLocation = /* @__PURE__ */ temporarilyNotSupport('getFuzzyLocation');
|
|
19
19
|
|
|
20
20
|
export { choosePoi, getFuzzyLocation, offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, openLocation, startLocationUpdate, startLocationUpdateBackground, stopLocationUpdate };
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/api/location/index.ts"],"sourcesContent":["import { processOpenApi, temporarilyNotSupport } from '../../utils/index'\r\n\r\n// 位置\r\nexport const stopLocationUpdate = temporarilyNotSupport('stopLocationUpdate')\r\nexport const startLocationUpdateBackground = temporarilyNotSupport('startLocationUpdateBackground')\r\nexport const startLocationUpdate = temporarilyNotSupport('startLocationUpdate')\r\n\r\nexport const openLocation = processOpenApi({\r\n name: 'openLocation',\r\n defaultOptions: { scale: 18 }\r\n})\r\n\r\nexport const onLocationChangeError = temporarilyNotSupport('onLocationChangeError')\r\nexport const onLocationChange = temporarilyNotSupport('onLocationChange')\r\nexport const offLocationChangeError = temporarilyNotSupport('offLocationChangeError')\r\nexport const offLocationChange = temporarilyNotSupport('offLocationChange')\r\n\r\nexport { getLocation } from './getLocation'\r\n\r\nexport const choosePoi = temporarilyNotSupport('choosePoi')\r\nexport const getFuzzyLocation = temporarilyNotSupport('getFuzzyLocation')\r\n\r\nexport { chooseLocation } from './chooseLocation'\r\n"],"names":[],"mappings":";;;;AAEA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/api/location/index.ts"],"sourcesContent":["import { processOpenApi, temporarilyNotSupport } from '../../utils/index'\r\n\r\n// 位置\r\nexport const stopLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('stopLocationUpdate')\r\nexport const startLocationUpdateBackground = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdateBackground')\r\nexport const startLocationUpdate = /* @__PURE__ */ temporarilyNotSupport('startLocationUpdate')\r\n\r\nexport const openLocation = /* @__PURE__ */ processOpenApi({\r\n name: 'openLocation',\r\n defaultOptions: { scale: 18 }\r\n})\r\n\r\nexport const onLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('onLocationChangeError')\r\nexport const onLocationChange = /* @__PURE__ */ temporarilyNotSupport('onLocationChange')\r\nexport const offLocationChangeError = /* @__PURE__ */ temporarilyNotSupport('offLocationChangeError')\r\nexport const offLocationChange = /* @__PURE__ */ temporarilyNotSupport('offLocationChange')\r\n\r\nexport { getLocation } from './getLocation'\r\n\r\nexport const choosePoi = /* @__PURE__ */ temporarilyNotSupport('choosePoi')\r\nexport const getFuzzyLocation = /* @__PURE__ */ temporarilyNotSupport('getFuzzyLocation')\r\n\r\nexport { chooseLocation } from './chooseLocation'\r\n"],"names":[],"mappings":";;;;AAEA;AACa,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB,EAAC;AAChF,MAAA,6BAA6B,mBAAmB,qBAAqB,CAAC,+BAA+B,EAAC;AACtG,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAElF,MAAA,YAAY,mBAAmB,cAAc,CAAC;AACzD,IAAA,IAAI,EAAE,cAAc;AACpB,IAAA,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;AAC9B,CAAA,EAAC;AAEW,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB,EAAC;AAC5E,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,iBAAiB,mBAAmB,qBAAqB,CAAC,mBAAmB,EAAC;AAI9E,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,gBAAgB,mBAAmB,qBAAqB,CAAC,kBAAkB;;;;"}
|
|
@@ -2,18 +2,18 @@ import { temporarilyNotSupport } from '../../../utils/index.js';
|
|
|
2
2
|
import { InnerAudioContext } from './InnerAudioContext.js';
|
|
3
3
|
|
|
4
4
|
// 音频
|
|
5
|
-
const stopVoice = temporarilyNotSupport('stopVoice');
|
|
6
|
-
const setInnerAudioOption = temporarilyNotSupport('setInnerAudioOption');
|
|
7
|
-
const playVoice = temporarilyNotSupport('playVoice');
|
|
8
|
-
const pauseVoice = temporarilyNotSupport('pauseVoice');
|
|
9
|
-
const getAvailableAudioSources = temporarilyNotSupport('getAvailableAudioSources');
|
|
10
|
-
const createWebAudioContext = temporarilyNotSupport('createWebAudioContext');
|
|
11
|
-
const createMediaAudioPlayer = temporarilyNotSupport('createMediaAudioPlayer');
|
|
5
|
+
const stopVoice = /* @__PURE__ */ temporarilyNotSupport('stopVoice');
|
|
6
|
+
const setInnerAudioOption = /* @__PURE__ */ temporarilyNotSupport('setInnerAudioOption');
|
|
7
|
+
const playVoice = /* @__PURE__ */ temporarilyNotSupport('playVoice');
|
|
8
|
+
const pauseVoice = /* @__PURE__ */ temporarilyNotSupport('pauseVoice');
|
|
9
|
+
const getAvailableAudioSources = /* @__PURE__ */ temporarilyNotSupport('getAvailableAudioSources');
|
|
10
|
+
const createWebAudioContext = /* @__PURE__ */ temporarilyNotSupport('createWebAudioContext');
|
|
11
|
+
const createMediaAudioPlayer = /* @__PURE__ */ temporarilyNotSupport('createMediaAudioPlayer');
|
|
12
12
|
/**
|
|
13
13
|
* 创建内部 audio 上下文 InnerAudioContext 对象。
|
|
14
14
|
*/
|
|
15
15
|
const createInnerAudioContext = () => new InnerAudioContext();
|
|
16
|
-
const createAudioContext = temporarilyNotSupport('createAudioContext');
|
|
16
|
+
const createAudioContext = /* @__PURE__ */ temporarilyNotSupport('createAudioContext');
|
|
17
17
|
|
|
18
18
|
export { createAudioContext, createInnerAudioContext, createMediaAudioPlayer, createWebAudioContext, getAvailableAudioSources, pauseVoice, playVoice, setInnerAudioOption, stopVoice };
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/api/media/audio/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { temporarilyNotSupport } from '../../../utils'\r\nimport { InnerAudioContext } from './InnerAudioContext'\r\n\r\n// 音频\r\n\r\nexport const stopVoice = temporarilyNotSupport('stopVoice')\r\nexport const setInnerAudioOption = temporarilyNotSupport('setInnerAudioOption')\r\nexport const playVoice = temporarilyNotSupport('playVoice')\r\nexport const pauseVoice = temporarilyNotSupport('pauseVoice')\r\nexport const getAvailableAudioSources = temporarilyNotSupport('getAvailableAudioSources')\r\nexport const createWebAudioContext = temporarilyNotSupport('createWebAudioContext')\r\nexport const createMediaAudioPlayer = temporarilyNotSupport('createMediaAudioPlayer')\r\n\r\n/**\r\n * 创建内部 audio 上下文 InnerAudioContext 对象。\r\n */\r\nexport const createInnerAudioContext: typeof Taro.createInnerAudioContext = () => new InnerAudioContext()\r\n\r\nexport const createAudioContext = temporarilyNotSupport('createAudioContext')\r\n"],"names":[],"mappings":";;;AAKA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/api/media/audio/index.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { temporarilyNotSupport } from '../../../utils'\r\nimport { InnerAudioContext } from './InnerAudioContext'\r\n\r\n// 音频\r\n\r\nexport const stopVoice = /* @__PURE__ */ temporarilyNotSupport('stopVoice')\r\nexport const setInnerAudioOption = /* @__PURE__ */ temporarilyNotSupport('setInnerAudioOption')\r\nexport const playVoice = /* @__PURE__ */ temporarilyNotSupport('playVoice')\r\nexport const pauseVoice = /* @__PURE__ */ temporarilyNotSupport('pauseVoice')\r\nexport const getAvailableAudioSources = /* @__PURE__ */ temporarilyNotSupport('getAvailableAudioSources')\r\nexport const createWebAudioContext = /* @__PURE__ */ temporarilyNotSupport('createWebAudioContext')\r\nexport const createMediaAudioPlayer = /* @__PURE__ */ temporarilyNotSupport('createMediaAudioPlayer')\r\n\r\n/**\r\n * 创建内部 audio 上下文 InnerAudioContext 对象。\r\n */\r\nexport const createInnerAudioContext: typeof Taro.createInnerAudioContext = () => new InnerAudioContext()\r\n\r\nexport const createAudioContext = /* @__PURE__ */ temporarilyNotSupport('createAudioContext')\r\n"],"names":[],"mappings":";;;AAKA;AAEa,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,SAAS,mBAAmB,qBAAqB,CAAC,WAAW,EAAC;AAC9D,MAAA,UAAU,mBAAmB,qBAAqB,CAAC,YAAY,EAAC;AAChE,MAAA,wBAAwB,mBAAmB,qBAAqB,CAAC,0BAA0B,EAAC;AAC5F,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AAErG;;AAEG;AACU,MAAA,uBAAuB,GAAwC,MAAM,IAAI,iBAAiB,GAAE;AAE5F,MAAA,kBAAkB,mBAAmB,qBAAqB,CAAC,oBAAoB;;;;"}
|
|
@@ -2,14 +2,14 @@ import { temporarilyNotSupport } from '../../../utils/index.js';
|
|
|
2
2
|
import { BackgroundAudioManager } from './BackgroundAudioManager.js';
|
|
3
3
|
|
|
4
4
|
// 背景音频
|
|
5
|
-
const stopBackgroundAudio = temporarilyNotSupport('stopBackgroundAudio');
|
|
6
|
-
const seekBackgroundAudio = temporarilyNotSupport('seekBackgroundAudio');
|
|
7
|
-
const playBackgroundAudio = temporarilyNotSupport('playBackgroundAudio');
|
|
8
|
-
const pauseBackgroundAudio = temporarilyNotSupport('pauseBackgroundAudio');
|
|
9
|
-
const onBackgroundAudioStop = temporarilyNotSupport('onBackgroundAudioStop');
|
|
10
|
-
const onBackgroundAudioPlay = temporarilyNotSupport('onBackgroundAudioPlay');
|
|
11
|
-
const onBackgroundAudioPause = temporarilyNotSupport('onBackgroundAudioPause');
|
|
12
|
-
const getBackgroundAudioPlayerState = temporarilyNotSupport('getBackgroundAudioPlayerState');
|
|
5
|
+
const stopBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('stopBackgroundAudio');
|
|
6
|
+
const seekBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('seekBackgroundAudio');
|
|
7
|
+
const playBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('playBackgroundAudio');
|
|
8
|
+
const pauseBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('pauseBackgroundAudio');
|
|
9
|
+
const onBackgroundAudioStop = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioStop');
|
|
10
|
+
const onBackgroundAudioPlay = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPlay');
|
|
11
|
+
const onBackgroundAudioPause = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPause');
|
|
12
|
+
const getBackgroundAudioPlayerState = /* @__PURE__ */ temporarilyNotSupport('getBackgroundAudioPlayerState');
|
|
13
13
|
/**
|
|
14
14
|
* 获取全局唯一的背景音频管理器
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/api/media/background-audio/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../../utils'\nimport { BackgroundAudioManager } from './BackgroundAudioManager'\n\n// 背景音频\nexport const stopBackgroundAudio = temporarilyNotSupport('stopBackgroundAudio')\nexport const seekBackgroundAudio = temporarilyNotSupport('seekBackgroundAudio')\nexport const playBackgroundAudio = temporarilyNotSupport('playBackgroundAudio')\nexport const pauseBackgroundAudio = temporarilyNotSupport('pauseBackgroundAudio')\nexport const onBackgroundAudioStop = temporarilyNotSupport('onBackgroundAudioStop')\nexport const onBackgroundAudioPlay = temporarilyNotSupport('onBackgroundAudioPlay')\nexport const onBackgroundAudioPause = temporarilyNotSupport('onBackgroundAudioPause')\nexport const getBackgroundAudioPlayerState = temporarilyNotSupport('getBackgroundAudioPlayerState')\n\n/**\n * 获取全局唯一的背景音频管理器\n */\nexport const getBackgroundAudioManager = () => new BackgroundAudioManager()\n"],"names":[],"mappings":";;;AAGA;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/api/media/background-audio/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../../utils'\nimport { BackgroundAudioManager } from './BackgroundAudioManager'\n\n// 背景音频\nexport const stopBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('stopBackgroundAudio')\nexport const seekBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('seekBackgroundAudio')\nexport const playBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('playBackgroundAudio')\nexport const pauseBackgroundAudio = /* @__PURE__ */ temporarilyNotSupport('pauseBackgroundAudio')\nexport const onBackgroundAudioStop = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioStop')\nexport const onBackgroundAudioPlay = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPlay')\nexport const onBackgroundAudioPause = /* @__PURE__ */ temporarilyNotSupport('onBackgroundAudioPause')\nexport const getBackgroundAudioPlayerState = /* @__PURE__ */ temporarilyNotSupport('getBackgroundAudioPlayerState')\n\n/**\n * 获取全局唯一的背景音频管理器\n */\nexport const getBackgroundAudioManager = () => new BackgroundAudioManager()\n"],"names":[],"mappings":";;;AAGA;AACa,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB,EAAC;AAClF,MAAA,oBAAoB,mBAAmB,qBAAqB,CAAC,sBAAsB,EAAC;AACpF,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,qBAAqB,mBAAmB,qBAAqB,CAAC,uBAAuB,EAAC;AACtF,MAAA,sBAAsB,mBAAmB,qBAAqB,CAAC,wBAAwB,EAAC;AACxF,MAAA,6BAA6B,mBAAmB,qBAAqB,CAAC,+BAA+B,EAAC;AAEnH;;AAEG;AACU,MAAA,yBAAyB,GAAG,MAAM,IAAI,sBAAsB;;;;"}
|
package/dist/api/media/camera.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { temporarilyNotSupport } from '../../utils/index.js';
|
|
2
2
|
|
|
3
3
|
// 相机
|
|
4
|
-
const createCameraContext = temporarilyNotSupport('createCameraContext');
|
|
4
|
+
const createCameraContext = /* @__PURE__ */ temporarilyNotSupport('createCameraContext');
|
|
5
5
|
|
|
6
6
|
export { createCameraContext };
|
|
7
7
|
//# sourceMappingURL=camera.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera.js","sources":["../../../src/api/media/camera.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 相机\nexport const createCameraContext = temporarilyNotSupport('createCameraContext')\n"],"names":[],"mappings":";;AAEA;
|
|
1
|
+
{"version":3,"file":"camera.js","sources":["../../../src/api/media/camera.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 相机\nexport const createCameraContext = /* @__PURE__ */ temporarilyNotSupport('createCameraContext')\n"],"names":[],"mappings":";;AAEA;AACa,MAAA,mBAAmB,mBAAmB,qBAAqB,CAAC,qBAAqB;;;;"}
|