@tarojs/taro-h5 3.6.6 → 3.6.7

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.
@@ -20,5 +20,5 @@ export { makePhoneCall } from './phone.js';
20
20
  export { scanCode } from './scan.js';
21
21
  export { getScreenBrightness, offUserCaptureScreen, onUserCaptureScreen, setKeepScreenOn, setScreenBrightness, setVisualEffectOnCapture } from './screen.js';
22
22
  export { vibrateLong, vibrateShort } from './vibrate.js';
23
- export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi } from './wifi.js';
23
+ export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, offWifiConnectedWithPartialInfo, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi } from './wifi.js';
24
24
  //# sourceMappingURL=index.js.map
@@ -4,9 +4,10 @@ declare const setWifiList: (option?: {}, ...args: any[]) => Promise<Partial<Taro
4
4
  declare const onWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
5
  declare const onWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
6
  declare const onGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
+ declare const offWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
8
  declare const offWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
8
9
  declare const offGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
9
10
  declare const getWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
10
11
  declare const getConnectedWifi: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
11
12
  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 };
13
+ export { stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi };
@@ -7,11 +7,12 @@ const setWifiList = temporarilyNotSupport('setWifiList');
7
7
  const onWifiConnectedWithPartialInfo = temporarilyNotSupport('onWifiConnectedWithPartialInfo');
8
8
  const onWifiConnected = temporarilyNotSupport('onWifiConnected');
9
9
  const onGetWifiList = temporarilyNotSupport('onGetWifiList');
10
+ const offWifiConnectedWithPartialInfo = temporarilyNotSupport('offWifiConnectedWithPartialInfo');
10
11
  const offWifiConnected = temporarilyNotSupport('offWifiConnected');
11
12
  const offGetWifiList = temporarilyNotSupport('offGetWifiList');
12
13
  const getWifiList = temporarilyNotSupport('getWifiList');
13
14
  const getConnectedWifi = temporarilyNotSupport('getConnectedWifi');
14
15
  const connectWifi = temporarilyNotSupport('connectWifi');
15
16
 
16
- export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi };
17
+ export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, offWifiConnectedWithPartialInfo, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi };
17
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 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;;;;"}
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;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,+BAA+B,GAAG,qBAAqB,CAAC,iCAAiC,EAAC;MAC1F,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;;;;"}
@@ -15,6 +15,7 @@ export * from "./navigate/index.js";
15
15
  export * from "./network/index.js";
16
16
  export * from "./open-api/index.js";
17
17
  export * from "./payment/index.js";
18
+ export * from "./qq/index.js";
18
19
  export * from "./route/index.js";
19
20
  export * from "./share/index.js";
20
21
  export * from "./storage/index.js";
package/dist/api/index.js CHANGED
@@ -15,6 +15,7 @@ export { exitMiniProgram, navigateBackMiniProgram, navigateToMiniProgram, openBu
15
15
  import './network/index.js';
16
16
  import './open-api/index.js';
17
17
  export { requestOrderPayment, requestPayment } from './payment/index.js';
18
+ export { openQzonePublish } from './qq/index.js';
18
19
  import './route/index.js';
19
20
  export { authPrivateMessage, getShareInfo, hideShareMenu, offCopyUrl, onCopyUrl, shareFileMessage, shareVideoMessage, showShareImageMenu, showShareMenu, updateShareMenu } from './share/index.js';
20
21
  export { clearStorage, clearStorageSync, createBufferURL, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, removeStorage, removeStorageSync, revokeBufferURL, setStorage, setStorageSync } from './storage/index.js';
@@ -57,7 +58,7 @@ export { makePhoneCall } from './device/phone.js';
57
58
  export { scanCode } from './device/scan.js';
58
59
  export { getScreenBrightness, offUserCaptureScreen, onUserCaptureScreen, setKeepScreenOn, setScreenBrightness, setVisualEffectOnCapture } from './device/screen.js';
59
60
  export { vibrateLong, vibrateShort } from './device/vibrate.js';
60
- export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi } from './device/wifi.js';
61
+ export { connectWifi, getConnectedWifi, getWifiList, offGetWifiList, offWifiConnected, offWifiConnectedWithPartialInfo, onGetWifiList, onWifiConnected, onWifiConnectedWithPartialInfo, setWifiList, startWifi, stopWifi } from './device/wifi.js';
61
62
  export { getCurrentPages, navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from '@tarojs/router';
62
63
  export { getLocation } from './location/getLocation.js';
63
64
  export { chooseLocation } from './location/chooseLocation.js';
@@ -67,7 +68,7 @@ export { createCameraContext } from './media/camera.js';
67
68
  export { getImageInfo } from './media/image/getImageInfo.js';
68
69
  export { previewImage } from './media/image/previewImage.js';
69
70
  export { chooseImage } from './media/image/chooseImage.js';
70
- export { chooseMessageFile, compressImage, previewMedia, saveImageToPhotosAlbum } from './media/image/index.js';
71
+ export { chooseMessageFile, compressImage, cropImage, editImage, previewMedia, saveImageToPhotosAlbum } from './media/image/index.js';
71
72
  export { createLivePlayerContext, createLivePusherContext } from './media/live.js';
72
73
  export { createMapContext } from './media/map.js';
73
74
  export { createMediaRecorder } from './media/media-recorder.js';
@@ -98,7 +99,7 @@ export { checkSession, login, pluginLogin } from './open-api/login.js';
98
99
  export { showRedPackage } from './open-api/red-package.js';
99
100
  export { getSetting, openSetting } from './open-api/settings.js';
100
101
  export { checkIsSoterEnrolledInDevice, checkIsSupportSoterAuthentication, startSoterAuthentication } from './open-api/soter.js';
101
- export { requestSubscribeMessage } from './open-api/subscribe-message.js';
102
+ export { requestSubscribeDeviceMessage, requestSubscribeMessage } from './open-api/subscribe-message.js';
102
103
  export { getUserInfo, getUserProfile } from './open-api/user-info.js';
103
104
  export { getWeRunData, shareToWeRun } from './open-api/werun.js';
104
105
  export { getBackgroundFetchData, getBackgroundFetchToken, onBackgroundFetchData, setBackgroundFetchToken } from './storage/background-fetch.js';
@@ -113,5 +114,5 @@ export { startPullDownRefresh, stopPullDownRefresh } from './ui/pull-down-refres
113
114
  export { pageScrollTo } from './ui/scroll/index.js';
114
115
  export { setTopBarText } from './ui/sticky.js';
115
116
  export { hideTabBar, hideTabBarRedDot, initTabBarApis, removeTabBarBadge, setTabBarBadge, setTabBarItem, setTabBarStyle, showTabBar, showTabBarRedDot } from './ui/tab-bar.js';
116
- export { offWindowResize, onWindowResize, setWindowSize } from './ui/window.js';
117
+ export { checkIsPictureInPictureActive, offWindowResize, onWindowResize, setWindowSize } from './ui/window.js';
117
118
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,11 +5,13 @@ declare class InnerAudioContext implements Taro.InnerAudioContext {
5
5
  errorStack: CallbackManager;
6
6
  stopStack: CallbackManager;
7
7
  __startTime: number;
8
+ __isFirstPlay: boolean;
8
9
  constructor();
9
10
  set autoplay(e: boolean);
10
11
  get autoplay(): boolean;
11
12
  get buffered(): number;
12
13
  get currentTime(): number;
14
+ set currentTime(e: number);
13
15
  get duration(): number;
14
16
  set loop(e: boolean);
15
17
  get loop(): boolean;
@@ -5,6 +5,7 @@ import { CallbackManager } from '../../../utils/handler.js';
5
5
  class InnerAudioContext {
6
6
  constructor() {
7
7
  this.__startTime = 0;
8
+ this.__isFirstPlay = true;
8
9
  this.play = () => { var _a; return (_a = this.Instance) === null || _a === void 0 ? void 0 : _a.play(); };
9
10
  this.pause = () => { var _a; return (_a = this.Instance) === null || _a === void 0 ? void 0 : _a.pause(); };
10
11
  this.stop = () => {
@@ -52,7 +53,8 @@ class InnerAudioContext {
52
53
  this.stopStack = new CallbackManager();
53
54
  Taro.eventCenter.on('__taroRouterChange', () => { this.stop(); });
54
55
  this.onPlay(() => {
55
- if (this.currentTime !== this.startTime) {
56
+ if (this.__isFirstPlay) {
57
+ this.__isFirstPlay = false;
56
58
  this.seek(this.startTime);
57
59
  }
58
60
  });
@@ -61,6 +63,7 @@ class InnerAudioContext {
61
63
  get autoplay() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.autoplay) || false; }
62
64
  get buffered() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.buffered.length) || 0; }
63
65
  get currentTime() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.currentTime) || 0; }
66
+ set currentTime(e) { this.seek(e); }
64
67
  get duration() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.duration) || 0; }
65
68
  set loop(e) { this.setProperty('loop', e); }
66
69
  get loop() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.loop) || false; }
@@ -1 +1 @@
1
- {"version":3,"file":"InnerAudioContext.js","sources":["../../../../src/api/media/audio/InnerAudioContext.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { permanentlyNotSupport } from '../../../utils'\nimport { CallbackManager } from '../../../utils/handler'\n\nexport class InnerAudioContext implements Taro.InnerAudioContext {\n Instance?: HTMLAudioElement\n errorStack: CallbackManager\n stopStack: CallbackManager\n __startTime = 0\n\n constructor () {\n this.Instance = new Audio()\n this.errorStack = new CallbackManager()\n this.stopStack = new CallbackManager()\n\n Taro.eventCenter.on('__taroRouterChange', () => { this.stop() })\n this.onPlay(() => {\n if (this.currentTime !== this.startTime) {\n this.seek(this.startTime)\n }\n })\n }\n\n set autoplay (e) { this.setProperty('autoplay', e) }\n get autoplay () { return this.Instance?.autoplay || false }\n get buffered () { return this.Instance?.buffered.length || 0 }\n get currentTime () { return this.Instance?.currentTime || 0 }\n get duration () { return this.Instance?.duration || 0 }\n set loop (e) { this.setProperty('loop', e) }\n get loop () { return this.Instance?.loop || false }\n get paused () { return this.Instance?.paused ?? true }\n set src (e) { this.setProperty('src', e) }\n get src () { return this.Instance?.src || '' }\n set volume (e) { this.setProperty('volume', e) }\n get volume () { return this.Instance?.volume || 0 }\n set playbackRate (e) { this.setProperty('playbackRate', e) }\n get playbackRate () { return this.Instance?.playbackRate || 0 }\n set obeyMuteSwitch (_e) { permanentlyNotSupport('InnerAudioContext.obeyMuteSwitch')() }\n get obeyMuteSwitch () { return true }\n set startTime (e) { this.__startTime = e }\n get startTime () { return this.__startTime || 0 }\n set referrerPolicy (e) { this.Instance?.setAttribute('referrerpolicy', e) }\n get referrerPolicy () { return this.Instance?.getAttribute('referrerpolicy') || 'origin' }\n\n private setProperty (key: string, value: unknown) {\n if (this.Instance) {\n this.Instance[key] = value\n }\n }\n\n play = () => this.Instance?.play()\n\n pause = () => this.Instance?.pause()\n\n stop = () => {\n this.pause()\n this.seek(0)\n this.stopStack.trigger()\n }\n\n seek = (position: number) => {\n if (this.Instance) {\n this.Instance.currentTime = position\n }\n }\n\n /**\n * @TODO destroy得并不干净\n */\n destroy = () => {\n this.stop()\n if (this.Instance) {\n document.body.removeChild(this.Instance)\n this.Instance = undefined\n }\n }\n\n onCanplay = (callback = () => {}) => this.Instance?.addEventListener('canplay', callback)\n onPlay = (callback = () => {}) => this.Instance?.addEventListener('play', callback)\n onPause = (callback = () => {}) => this.Instance?.addEventListener('pause', callback)\n onStop = (callback = () => {}) => this.stopStack.add(callback)\n onEnded = (callback = () => {}) => this.Instance?.addEventListener('ended', callback)\n onTimeUpdate = (callback = () => {}) => this.Instance?.addEventListener('timeupdate', callback)\n onError = (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void)) => this.errorStack.add(callback)\n onWaiting = (callback = () => {}) => this.Instance?.addEventListener('waiting', callback)\n onSeeking = (callback = () => {}) => this.Instance?.addEventListener('seeking', callback)\n onSeeked = (callback = () => {}) => this.Instance?.addEventListener('seeked', callback)\n offCanplay = (callback = () => {}) => this.Instance?.removeEventListener('canplay', callback)\n offPlay = (callback = () => {}) => this.Instance?.removeEventListener('play', callback)\n offPause = (callback = () => {}) => this.Instance?.removeEventListener('pause', callback)\n offStop = (callback = () => {}) => this.stopStack.remove(callback)\n offEnded = (callback = () => {}) => this.Instance?.removeEventListener('ended', callback)\n offTimeUpdate = (callback = () => {}) => this.Instance?.removeEventListener('timeupdate', callback)\n offError = (callback = () => {}) => this.errorStack.remove(callback)\n offWaiting = (callback = () => {}) => this.Instance?.removeEventListener('waiting', callback)\n offSeeking = (callback = () => {}) => this.Instance?.removeEventListener('seeking',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,EAAE,KAAc,EAAA;QAC9C,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAC3B,SAAA;KACF;AAiDF;;;;"}
1
+ {"version":3,"file":"InnerAudioContext.js","sources":["../../../../src/api/media/audio/InnerAudioContext.ts"],"sourcesContent":["import Taro from '@tarojs/api'\n\nimport { permanentlyNotSupport } from '../../../utils'\nimport { CallbackManager } from '../../../utils/handler'\n\nexport class InnerAudioContext implements Taro.InnerAudioContext {\n Instance?: HTMLAudioElement\n errorStack: CallbackManager\n stopStack: CallbackManager\n __startTime = 0\n __isFirstPlay = true\n\n constructor () {\n this.Instance = new Audio()\n this.errorStack = new CallbackManager()\n this.stopStack = new CallbackManager()\n\n Taro.eventCenter.on('__taroRouterChange', () => { this.stop() })\n this.onPlay(() => {\n if (this.__isFirstPlay) {\n this.__isFirstPlay = false\n this.seek(this.startTime)\n }\n })\n }\n\n set autoplay (e) { this.setProperty('autoplay', e) }\n get autoplay () { return this.Instance?.autoplay || false }\n get buffered () { return this.Instance?.buffered.length || 0 }\n get currentTime () { return this.Instance?.currentTime || 0 }\n set currentTime (e) { this.seek(e) }\n get duration () { return this.Instance?.duration || 0 }\n set loop (e) { this.setProperty('loop', e) }\n get loop () { return this.Instance?.loop || false }\n get paused () { return this.Instance?.paused ?? true }\n set src (e) { this.setProperty('src', e) }\n get src () { return this.Instance?.src || '' }\n set volume (e) { this.setProperty('volume', e) }\n get volume () { return this.Instance?.volume || 0 }\n set playbackRate (e) { this.setProperty('playbackRate', e) }\n get playbackRate () { return this.Instance?.playbackRate || 0 }\n set obeyMuteSwitch (_e) { permanentlyNotSupport('InnerAudioContext.obeyMuteSwitch')() }\n get obeyMuteSwitch () { return true }\n set startTime (e) { this.__startTime = e }\n get startTime () { return this.__startTime || 0 }\n set referrerPolicy (e) { this.Instance?.setAttribute('referrerpolicy', e) }\n get referrerPolicy () { return this.Instance?.getAttribute('referrerpolicy') || 'origin' }\n\n private setProperty (key: string, value: unknown) {\n if (this.Instance) {\n this.Instance[key] = value\n }\n }\n\n play = () => this.Instance?.play()\n\n pause = () => this.Instance?.pause()\n\n stop = () => {\n this.pause()\n this.seek(0)\n this.stopStack.trigger()\n }\n\n seek = (position: number) => {\n if (this.Instance) {\n this.Instance.currentTime = position\n }\n }\n\n /**\n * @TODO destroy得并不干净\n */\n destroy = () => {\n this.stop()\n if (this.Instance) {\n document.body.removeChild(this.Instance)\n this.Instance = undefined\n }\n }\n\n onCanplay = (callback = () => {}) => this.Instance?.addEventListener('canplay', callback)\n onPlay = (callback = () => {}) => this.Instance?.addEventListener('play', callback)\n onPause = (callback = () => {}) => this.Instance?.addEventListener('pause', callback)\n onStop = (callback = () => {}) => this.stopStack.add(callback)\n onEnded = (callback = () => {}) => this.Instance?.addEventListener('ended', callback)\n onTimeUpdate = (callback = () => {}) => this.Instance?.addEventListener('timeupdate', callback)\n onError = (callback?: ((res: Taro.InnerAudioContext.onErrorDetail) => void)) => this.errorStack.add(callback)\n onWaiting = (callback = () => {}) => this.Instance?.addEventListener('waiting', callback)\n onSeeking = (callback = () => {}) => this.Instance?.addEventListener('seeking', callback)\n onSeeked = (callback = () => {}) => this.Instance?.addEventListener('seeked', callback)\n offCanplay = (callback = () => {}) => this.Instance?.removeEventListener('canplay', callback)\n offPlay = (callback = () => {}) => this.Instance?.removeEventListener('play', callback)\n offPause = (callback = () => {}) => this.Instance?.removeEventListener('pause', callback)\n offStop = (callback = () => {}) => this.stopStack.remove(callback)\n offEnded = (callback = () => {}) => this.Instance?.removeEventListener('ended', callback)\n offTimeUpdate = (callback = () => {}) => this.Instance?.removeEventListener('timeupdate', callback)\n offError = (callback = () => {}) => this.errorStack.remove(callback)\n offWaiting = (callback = () => {}) => this.Instance?.removeEventListener('waiting', callback)\n offSeeking = (callback = () => {}) => this.Instance?.removeEventListener('seeking', callback)\n offSeeked = (callback = () => {}) => this.Instance?.removeEventListener('seeked', callback)\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A,KAAA,CAAA,GAAA,EAAA,CAAA,YAAY,CAAC,gBAAgB,CAAC,KAAI,QAAQ,CAAA,EAAE;IAElF,WAAW,CAAE,GAAW,EAAE,KAAc,EAAA;QAC9C,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAC3B,SAAA;KACF;AAiDF;;;;"}
@@ -2,7 +2,9 @@ declare const saveImageToPhotosAlbum: (option?: {}, ...args: any[]) => Promise<P
2
2
  declare const previewMedia: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
3
  declare const compressImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
4
  declare const chooseMessageFile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
- export { saveImageToPhotosAlbum, previewMedia, compressImage, chooseMessageFile };
5
+ declare const editImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
+ declare const cropImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
+ export { saveImageToPhotosAlbum, previewMedia, compressImage, chooseMessageFile, editImage, cropImage };
6
8
  export * from "./getImageInfo.js";
7
9
  export * from "./previewImage.js";
8
10
  export * from "./chooseImage.js";
@@ -8,6 +8,8 @@ const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum');
8
8
  const previewMedia = temporarilyNotSupport('previewMedia');
9
9
  const compressImage = temporarilyNotSupport('compressImage');
10
10
  const chooseMessageFile = temporarilyNotSupport('chooseMessageFile');
11
+ const editImage = temporarilyNotSupport('editImage');
12
+ const cropImage = temporarilyNotSupport('cropImage');
11
13
 
12
- export { chooseMessageFile, compressImage, previewMedia, saveImageToPhotosAlbum };
14
+ export { chooseMessageFile, compressImage, cropImage, editImage, previewMedia, saveImageToPhotosAlbum };
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/api/media/image/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../../utils'\r\n\r\n// 图片\r\nexport const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum')\r\nexport const previewMedia = temporarilyNotSupport('previewMedia')\r\n\r\nexport * from './getImageInfo'\r\nexport * from './previewImage'\r\n\r\nexport const compressImage = temporarilyNotSupport('compressImage')\r\nexport const chooseMessageFile = temporarilyNotSupport('chooseMessageFile')\r\n\r\nexport * from './chooseImage'\r\n"],"names":[],"mappings":";;;;;AAEA;MACa,sBAAsB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;MACxE,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MAKpD,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;MACtD,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/api/media/image/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../../utils'\r\n\r\n// 图片\r\nexport const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum')\r\nexport const previewMedia = temporarilyNotSupport('previewMedia')\r\n\r\nexport * from './getImageInfo'\r\nexport * from './previewImage'\r\n\r\nexport const compressImage = temporarilyNotSupport('compressImage')\r\nexport const chooseMessageFile = temporarilyNotSupport('chooseMessageFile')\r\n\r\nexport * from './chooseImage'\r\n\r\nexport const editImage = temporarilyNotSupport('editImage')\r\nexport const cropImage = temporarilyNotSupport('cropImage')\r\n"],"names":[],"mappings":";;;;;AAEA;MACa,sBAAsB,GAAG,qBAAqB,CAAC,wBAAwB,EAAC;MACxE,YAAY,GAAG,qBAAqB,CAAC,cAAc,EAAC;MAKpD,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;MACtD,iBAAiB,GAAG,qBAAqB,CAAC,mBAAmB,EAAC;MAI9D,SAAS,GAAG,qBAAqB,CAAC,WAAW,EAAC;MAC9C,SAAS,GAAG,qBAAqB,CAAC,WAAW;;;;"}
@@ -1,7 +1,7 @@
1
1
  export { createAudioContext, createInnerAudioContext, createMediaAudioPlayer, createWebAudioContext, getAvailableAudioSources, pauseVoice, playVoice, setInnerAudioOption, stopVoice } from './audio/index.js';
2
2
  export { getBackgroundAudioManager, getBackgroundAudioPlayerState, onBackgroundAudioPause, onBackgroundAudioPlay, onBackgroundAudioStop, pauseBackgroundAudio, playBackgroundAudio, seekBackgroundAudio, stopBackgroundAudio } from './background-audio/index.js';
3
3
  export { createCameraContext } from './camera.js';
4
- export { chooseMessageFile, compressImage, previewMedia, saveImageToPhotosAlbum } from './image/index.js';
4
+ export { chooseMessageFile, compressImage, cropImage, editImage, previewMedia, saveImageToPhotosAlbum } from './image/index.js';
5
5
  export { createLivePlayerContext, createLivePusherContext } from './live.js';
6
6
  export { createMapContext } from './map.js';
7
7
  export { createMediaRecorder } from './media-recorder.js';
@@ -55,7 +55,7 @@ function _request(options) {
55
55
  if (methodUpper === 'GET' || methodUpper === 'HEAD') {
56
56
  url = generateRequestUrlWithParams(url, options.data);
57
57
  }
58
- else if (Object.prototype.toString.call(options.data) === '[object Object]') {
58
+ else if (['[object Array]', '[object Object]'].indexOf(Object.prototype.toString.call(options.data)) >= 0) {
59
59
  options.header = options.header || {};
60
60
  const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type');
61
61
  if (!keyOfContentType) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/api/network/request/index.ts"],"sourcesContent":["import 'whatwg-fetch'\nimport 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'\n\nimport Taro from '@tarojs/api'\nimport { isFunction } from '@tarojs/shared'\nimport jsonpRetry from 'jsonp-retry'\n\nimport { serializeParams } from '../../../utils'\n\n// @ts-ignore\nconst { Link } = Taro\n\nfunction generateRequestUrlWithParams (url: string, params?: unknown) {\n params = typeof params === 'string' ? params : serializeParams(params)\n if (params) {\n url += (~url.indexOf('?') ? '&' : '?') + params\n }\n url = url.replace('?&', '?')\n return url\n}\n\n// FIXME 移除 any 标注\nfunction _request (options) {\n options = options || {}\n if (typeof options === 'string') {\n options = {\n url: options\n }\n }\n const { success, complete, fail } = options\n let url = options.url\n const params: any = {}\n const res: any = {}\n if (options.jsonp) {\n Object.assign(params, options)\n params.params = options.data\n params.cache = options.jsonpCache\n if (typeof options.jsonp === 'string') {\n params.name = options.jsonp\n }\n delete params.jsonp\n return jsonpRetry(url, params)\n .then(data => {\n res.statusCode = 200\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n return Promise.reject(err)\n })\n }\n params.method = options.method || 'GET'\n const methodUpper = params.method.toUpperCase()\n params.cache = options.cache || 'default'\n if (methodUpper === 'GET' || methodUpper === 'HEAD') {\n url = generateRequestUrlWithParams(url, options.data)\n } else if (Object.prototype.toString.call(options.data) === '[object Object]') {\n options.header = options.header || {}\n\n const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type')\n if (!keyOfContentType) {\n options.header['Content-Type'] = 'application/json'\n }\n const contentType = options.header[keyOfContentType || 'Content-Type']\n\n if (contentType.indexOf('application/json') >= 0) {\n params.body = JSON.stringify(options.data)\n } else if (contentType.indexOf('application/x-www-form-urlencoded') >= 0) {\n params.body = serializeParams(options.data)\n } else {\n params.body = options.data\n }\n } else {\n params.body = options.data\n }\n if (options.header) {\n params.headers = options.header\n }\n if (options.mode) {\n params.mode = options.mode\n }\n let timeoutTimer: ReturnType<typeof setTimeout> | null = null\n if (options.signal) {\n params.signal = options.signal\n } else if (typeof options.timeout === 'number') {\n const controller = new window.AbortController()\n params.signal = controller.signal\n timeoutTimer = setTimeout(function () {\n controller.abort()\n }, options.timeout)\n }\n params.credentials = options.credentials\n return fetch(url, params)\n .then(response => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n if (!response) {\n const errorResponse = { ok: false }\n throw errorResponse\n }\n res.statusCode = response.status\n res.header = {}\n for (const key of response.headers.keys()) {\n res.header[key] = response.headers.get(key)\n }\n if (options.responseType === 'arraybuffer') {\n return response.arrayBuffer()\n }\n if (res.statusCode !== 204) {\n if (options.dataType === 'json' || typeof options.dataType === 'undefined') {\n return response.json().catch(() => {\n return null\n })\n }\n }\n if (options.responseType === 'text' || options.dataType === 'text') {\n return response.text()\n }\n return Promise.resolve(null)\n })\n .then(data => {\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n err.statusCode = res.statusCode\n err.errMsg = err.message\n return Promise.reject(err)\n })\n}\n\nfunction taroInterceptor (chain) {\n return _request(chain.requestParams)\n}\n\nconst link = new Link(taroInterceptor)\n\nexport const request: typeof Taro.request = link.request.bind(link)\nexport const addInterceptor = link.addInterceptor.bind(link)\nexport const cleanInterceptors = link.cleanInterceptors.bind(link)\n"],"names":[],"mappings":";;;;;;;AASA;AACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;AAErB,SAAS,4BAA4B,CAAE,GAAW,EAAE,MAAgB,EAAA;AAClE,IAAA,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AACtE,IAAA,IAAI,MAAM,EAAE;QACV,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,MAAM,CAAA;AAChD,KAAA;IACD,GAAG,GAAG,G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CAAC,IAAI,IAAG;AACX,QAAA,GAAG,CAAC,IAAI,GAAG,IAAI,CAAA;QACf,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;QACnC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;AACrC,QAAA,OAAO,GAAG,CAAA;AACZ,KAAC,CAAC;SACD,KAAK,CAAC,GAAG,IAAG;AACX,QAAA,IAAI,YAAY,EAAE;YAChB,YAAY,CAAC,YAAY,CAAC,CAAA;YAC1B,YAAY,GAAG,IAAI,CAAA;AACpB,SAAA;QACD,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;QAC7B,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;AACrC,QAAA,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAA;AAC/B,QAAA,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAA;AACxB,QAAA,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC5B,KAAC,CAAC,CAAA;AACN,CAAC;AAED,SAAS,eAAe,CAAE,KAAK,EAAA;AAC7B,IAAA,OAAO,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;AACtC,CAAC;AAED,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,CAAA;AAE/B,MAAM,OAAO,GAAwB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAC;AAC5D,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAC;AACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/api/network/request/index.ts"],"sourcesContent":["import 'whatwg-fetch'\nimport 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'\n\nimport Taro from '@tarojs/api'\nimport { isFunction } from '@tarojs/shared'\nimport jsonpRetry from 'jsonp-retry'\n\nimport { serializeParams } from '../../../utils'\n\n// @ts-ignore\nconst { Link } = Taro\n\nfunction generateRequestUrlWithParams (url: string, params?: unknown) {\n params = typeof params === 'string' ? params : serializeParams(params)\n if (params) {\n url += (~url.indexOf('?') ? '&' : '?') + params\n }\n url = url.replace('?&', '?')\n return url\n}\n\n// FIXME 移除 any 标注\nfunction _request (options) {\n options = options || {}\n if (typeof options === 'string') {\n options = {\n url: options\n }\n }\n const { success, complete, fail } = options\n let url = options.url\n const params: any = {}\n const res: any = {}\n if (options.jsonp) {\n Object.assign(params, options)\n params.params = options.data\n params.cache = options.jsonpCache\n if (typeof options.jsonp === 'string') {\n params.name = options.jsonp\n }\n delete params.jsonp\n return jsonpRetry(url, params)\n .then(data => {\n res.statusCode = 200\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n return Promise.reject(err)\n })\n }\n params.method = options.method || 'GET'\n const methodUpper = params.method.toUpperCase()\n params.cache = options.cache || 'default'\n if (methodUpper === 'GET' || methodUpper === 'HEAD') {\n url = generateRequestUrlWithParams(url, options.data)\n } else if (['[object Array]', '[object Object]'].indexOf(Object.prototype.toString.call(options.data)) >= 0) {\n options.header = options.header || {}\n\n const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type')\n if (!keyOfContentType) {\n options.header['Content-Type'] = 'application/json'\n }\n const contentType = options.header[keyOfContentType || 'Content-Type']\n\n if (contentType.indexOf('application/json') >= 0) {\n params.body = JSON.stringify(options.data)\n } else if (contentType.indexOf('application/x-www-form-urlencoded') >= 0) {\n params.body = serializeParams(options.data)\n } else {\n params.body = options.data\n }\n } else {\n params.body = options.data\n }\n if (options.header) {\n params.headers = options.header\n }\n if (options.mode) {\n params.mode = options.mode\n }\n let timeoutTimer: ReturnType<typeof setTimeout> | null = null\n if (options.signal) {\n params.signal = options.signal\n } else if (typeof options.timeout === 'number') {\n const controller = new window.AbortController()\n params.signal = controller.signal\n timeoutTimer = setTimeout(function () {\n controller.abort()\n }, options.timeout)\n }\n params.credentials = options.credentials\n return fetch(url, params)\n .then(response => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n if (!response) {\n const errorResponse = { ok: false }\n throw errorResponse\n }\n res.statusCode = response.status\n res.header = {}\n for (const key of response.headers.keys()) {\n res.header[key] = response.headers.get(key)\n }\n if (options.responseType === 'arraybuffer') {\n return response.arrayBuffer()\n }\n if (res.statusCode !== 204) {\n if (options.dataType === 'json' || typeof options.dataType === 'undefined') {\n return response.json().catch(() => {\n return null\n })\n }\n }\n if (options.responseType === 'text' || options.dataType === 'text') {\n return response.text()\n }\n return Promise.resolve(null)\n })\n .then(data => {\n res.data = data\n isFunction(success) && success(res)\n isFunction(complete) && complete(res)\n return res\n })\n .catch(err => {\n if (timeoutTimer) {\n clearTimeout(timeoutTimer)\n timeoutTimer = null\n }\n isFunction(fail) && fail(err)\n isFunction(complete) && complete(res)\n err.statusCode = res.statusCode\n err.errMsg = err.message\n return Promise.reject(err)\n })\n}\n\nfunction taroInterceptor (chain) {\n return _request(chain.requestParams)\n}\n\nconst link = new Link(taroInterceptor)\n\nexport const request: typeof Taro.request = link.request.bind(link)\nexport const addInterceptor = link.addInterceptor.bind(link)\nexport const cleanInterceptors = link.cleanInterceptors.bind(link)\n"],"names":[],"mappings":";;;;;;;AASA;AACA,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;AAErB,SAAS,4BAA4B,CAAE,GAAW,EAAE,MAAgB,EAAA;AAClE,IAAA,MAAM,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;AACtE,IAAA,IAAI,MAAM,EAAE;QACV,GAAG,IAAI,CAAC,CAAC,GAAG,CAA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I,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI;;;;"}
@@ -13,7 +13,7 @@ export { checkSession, login, pluginLogin } from './login.js';
13
13
  export { showRedPackage } from './red-package.js';
14
14
  export { getSetting, openSetting } from './settings.js';
15
15
  export { checkIsSoterEnrolledInDevice, checkIsSupportSoterAuthentication, startSoterAuthentication } from './soter.js';
16
- export { requestSubscribeMessage } from './subscribe-message.js';
16
+ export { requestSubscribeDeviceMessage, requestSubscribeMessage } from './subscribe-message.js';
17
17
  export { getUserInfo, getUserProfile } from './user-info.js';
18
18
  export { getWeRunData, shareToWeRun } from './werun.js';
19
19
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,3 @@
1
1
  declare const requestSubscribeMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
- export { requestSubscribeMessage };
2
+ declare const requestSubscribeDeviceMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ export { requestSubscribeMessage, requestSubscribeDeviceMessage };
@@ -2,6 +2,8 @@ import { temporarilyNotSupport } from '../../utils/index.js';
2
2
 
3
3
  // 订阅消息
4
4
  const requestSubscribeMessage = temporarilyNotSupport('requestSubscribeMessage');
5
+ // 订阅设备消息
6
+ const requestSubscribeDeviceMessage = temporarilyNotSupport('requestSubscribeDeviceMessage');
5
7
 
6
- export { requestSubscribeMessage };
8
+ export { requestSubscribeDeviceMessage, requestSubscribeMessage };
7
9
  //# sourceMappingURL=subscribe-message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribe-message.js","sources":["../../../src/api/open-api/subscribe-message.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 订阅消息\nexport const requestSubscribeMessage = temporarilyNotSupport('requestSubscribeMessage')\n"],"names":[],"mappings":";;AAEA;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB;;;;"}
1
+ {"version":3,"file":"subscribe-message.js","sources":["../../../src/api/open-api/subscribe-message.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 订阅消息\nexport const requestSubscribeMessage = temporarilyNotSupport('requestSubscribeMessage')\n// 订阅设备消息\nexport const requestSubscribeDeviceMessage = temporarilyNotSupport('requestSubscribeDeviceMessage')\n"],"names":[],"mappings":";;AAEA;MACa,uBAAuB,GAAG,qBAAqB,CAAC,yBAAyB,EAAC;AACvF;MACa,6BAA6B,GAAG,qBAAqB,CAAC,+BAA+B;;;;"}
@@ -0,0 +1,2 @@
1
+ declare const openQzonePublish: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
2
+ export { openQzonePublish };
@@ -0,0 +1,7 @@
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
2
+
3
+ // 打开手Q说说发表界面
4
+ const openQzonePublish = temporarilyNotSupport('openQzonePublish');
5
+
6
+ export { openQzonePublish };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/qq/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\n// 打开手Q说说发表界面\nexport const openQzonePublish = temporarilyNotSupport('openQzonePublish')\n"],"names":[],"mappings":";;AAEA;MACa,gBAAgB,GAAG,qBAAqB,CAAC,kBAAkB;;;;"}
@@ -9,5 +9,5 @@ export { startPullDownRefresh, stopPullDownRefresh } from './pull-down-refresh.j
9
9
  export { pageScrollTo } from './scroll/index.js';
10
10
  export { setTopBarText } from './sticky.js';
11
11
  export { hideTabBar, hideTabBarRedDot, initTabBarApis, removeTabBarBadge, setTabBarBadge, setTabBarItem, setTabBarStyle, showTabBar, showTabBarRedDot } from './tab-bar.js';
12
- export { offWindowResize, onWindowResize, setWindowSize } from './window.js';
12
+ export { checkIsPictureInPictureActive, offWindowResize, onWindowResize, setWindowSize } from './window.js';
13
13
  //# sourceMappingURL=index.js.map
@@ -11,4 +11,5 @@ declare const onWindowResize: typeof Taro.onWindowResize;
11
11
  * 取消监听窗口尺寸变化事件
12
12
  */
13
13
  declare const offWindowResize: typeof Taro.offWindowResize;
14
- export { setWindowSize, onWindowResize, offWindowResize };
14
+ declare const checkIsPictureInPictureActive: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
15
+ export { setWindowSize, onWindowResize, offWindowResize, checkIsPictureInPictureActive };
@@ -30,6 +30,7 @@ const offWindowResize = callback => {
30
30
  window.removeEventListener('resize', resizeListener);
31
31
  }
32
32
  };
33
+ const checkIsPictureInPictureActive = temporarilyNotSupport('checkIsPictureInPictureActive');
33
34
 
34
- export { offWindowResize, onWindowResize, setWindowSize };
35
+ export { checkIsPictureInPictureActive, offWindowResize, onWindowResize, setWindowSize };
35
36
  //# sourceMappingURL=window.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.js","sources":["../../../src/api/ui/window.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { temporarilyNotSupport } from '../../utils'\r\nimport { CallbackManager } from '../../utils/handler'\r\n\r\nconst callbackManager = new CallbackManager()\r\n\r\nconst resizeListener = () => {\r\n callbackManager.trigger({\r\n windowWidth: window.screen.width,\r\n windowHeight: window.screen.height\r\n })\r\n}\r\n\r\n/**\r\n * 设置窗口大小,该接口仅适用于 PC 平台,使用细则请参见指南\r\n */\r\nexport const setWindowSize = temporarilyNotSupport('setWindowSize')\r\n\r\n/**\r\n * 监听窗口尺寸变化事件\r\n */\r\nexport const onWindowResize: typeof Taro.onWindowResize = callback => {\r\n callbackManager.add(callback)\r\n if (callbackManager.count() === 1) {\r\n window.addEventListener('resize', resizeListener)\r\n }\r\n}\r\n\r\n/**\r\n * 取消监听窗口尺寸变化事件\r\n */\r\nexport const offWindowResize: typeof Taro.offWindowResize = callback => {\r\n callbackManager.remove(callback)\r\n if (callbackManager.count() === 0) {\r\n window.removeEventListener('resize', resizeListener)\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAKA,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;AAE7C,MAAM,cAAc,GAAG,MAAK;IAC1B,eAAe,CAAC,OAAO,CAAC;AACtB,QAAA,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;AAChC,QAAA,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;AACnC,KAAA,CAAC,CAAA;AACJ,CAAC,CAAA;AAED;;AAEG;MACU,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;AAEnE;;AAEG;AACU,MAAA,cAAc,GAA+B,QAAQ,IAAG;AACnE,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC7B,IAAA,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACjC,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;AAClD,KAAA;AACH,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAgC,QAAQ,IAAG;AACrE,IAAA,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAChC,IAAA,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACjC,QAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;AACrD,KAAA;AACH;;;;"}
1
+ {"version":3,"file":"window.js","sources":["../../../src/api/ui/window.ts"],"sourcesContent":["import Taro from '@tarojs/api'\r\n\r\nimport { temporarilyNotSupport } from '../../utils'\r\nimport { CallbackManager } from '../../utils/handler'\r\n\r\nconst callbackManager = new CallbackManager()\r\n\r\nconst resizeListener = () => {\r\n callbackManager.trigger({\r\n windowWidth: window.screen.width,\r\n windowHeight: window.screen.height\r\n })\r\n}\r\n\r\n/**\r\n * 设置窗口大小,该接口仅适用于 PC 平台,使用细则请参见指南\r\n */\r\nexport const setWindowSize = temporarilyNotSupport('setWindowSize')\r\n\r\n/**\r\n * 监听窗口尺寸变化事件\r\n */\r\nexport const onWindowResize: typeof Taro.onWindowResize = callback => {\r\n callbackManager.add(callback)\r\n if (callbackManager.count() === 1) {\r\n window.addEventListener('resize', resizeListener)\r\n }\r\n}\r\n\r\n/**\r\n * 取消监听窗口尺寸变化事件\r\n */\r\nexport const offWindowResize: typeof Taro.offWindowResize = callback => {\r\n callbackManager.remove(callback)\r\n if (callbackManager.count() === 0) {\r\n window.removeEventListener('resize', resizeListener)\r\n }\r\n}\r\n\r\nexport const checkIsPictureInPictureActive = temporarilyNotSupport('checkIsPictureInPictureActive')\r\n"],"names":[],"mappings":";;;AAKA,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAA;AAE7C,MAAM,cAAc,GAAG,MAAK;IAC1B,eAAe,CAAC,OAAO,CAAC;AACtB,QAAA,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;AAChC,QAAA,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;AACnC,KAAA,CAAC,CAAA;AACJ,CAAC,CAAA;AAED;;AAEG;MACU,aAAa,GAAG,qBAAqB,CAAC,eAAe,EAAC;AAEnE;;AAEG;AACU,MAAA,cAAc,GAA+B,QAAQ,IAAG;AACnE,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;AAC7B,IAAA,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACjC,QAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;AAClD,KAAA;AACH,EAAC;AAED;;AAEG;AACU,MAAA,eAAe,GAAgC,QAAQ,IAAG;AACrE,IAAA,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAChC,IAAA,IAAI,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;AACjC,QAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAA;AACrD,KAAA;AACH,EAAC;MAEY,6BAA6B,GAAG,qBAAqB,CAAC,+BAA+B;;;;"}
@@ -309,6 +309,7 @@ declare const setWifiList: (option?: {}, ...args: any[]) => Promise<Partial<Taro
309
309
  declare const onWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
310
310
  declare const onWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
311
311
  declare const onGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
312
+ declare const offWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
312
313
  declare const offWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
313
314
  declare const offGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
314
315
  declare const getWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -474,6 +475,8 @@ declare const chooseMessageFile: (option?: {}, ...args: any[]) => Promise<Partia
474
475
  * 从本地相册选择图片或使用相机拍照。
475
476
  */
476
477
  declare const chooseImage: typeof Taro.chooseImage;
478
+ declare const editImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
479
+ declare const cropImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
477
480
  // 实时音视频
478
481
  declare const createLivePusherContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
479
482
  declare const createLivePlayerContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -608,6 +611,8 @@ declare const checkIsSupportSoterAuthentication: (option?: {}, ...args: any[]) =
608
611
  declare const checkIsSoterEnrolledInDevice: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
609
612
  // 订阅消息
610
613
  declare const requestSubscribeMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
614
+ // 订阅设备消息
615
+ declare const requestSubscribeDeviceMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
611
616
  // 用户信息
612
617
  declare const getUserProfile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
613
618
  declare const getUserInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -617,6 +622,8 @@ declare const getWeRunData: (option?: {}, ...args: any[]) => Promise<Partial<Tar
617
622
  // 支付
618
623
  declare const requestPayment: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
619
624
  declare const requestOrderPayment: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
625
+ // 打开手Q说说发表界面
626
+ declare const openQzonePublish: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
620
627
  // 转发
621
628
  declare const updateShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
622
629
  declare const showShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -758,10 +765,11 @@ declare const onWindowResize: typeof Taro.onWindowResize;
758
765
  * 取消监听窗口尺寸变化事件
759
766
  */
760
767
  declare const offWindowResize: typeof Taro.offWindowResize;
768
+ declare const checkIsPictureInPictureActive: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
761
769
  // Worker
762
770
  declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
763
771
  declare const createSelectorQuery: typeof Taro.createSelectorQuery;
764
772
  declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
765
773
  declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
766
- export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env, canIUse, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, stopLocationUpdate, startLocationUpdateBackground, startLocationUpdate, openLocation, onLocationChangeError, onLocationChange, offLocationChangeError, offLocationChange, getLocation, choosePoi, getFuzzyLocation, chooseLocation, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseVideo, chooseMedia, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, cleanInterceptors, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, checkIsAddedToMyMiniProgram, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestOrderPayment, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getAppInfo, getEnv, history, initPxTransform, interceptorify, interceptors, Link, options, preload, pxTransform, requirePlugin };
774
+ export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env, canIUse, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, stopLocationUpdate, startLocationUpdateBackground, startLocationUpdate, openLocation, onLocationChangeError, onLocationChange, offLocationChangeError, offLocationChange, getLocation, choosePoi, getFuzzyLocation, chooseLocation, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, editImage, cropImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseVideo, chooseMedia, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, cleanInterceptors, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, checkIsAddedToMyMiniProgram, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, requestSubscribeDeviceMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestOrderPayment, openQzonePublish, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, checkIsPictureInPictureActive, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getAppInfo, getEnv, history, initPxTransform, interceptorify, interceptors, Link, options, preload, pxTransform, requirePlugin };
767
775
  export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";