@tarojs/taro-h5 3.6.6-alpha.2 → 3.6.6-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/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/weapp/app-event.d.ts +10 -10
- package/dist/api/base/weapp/app-event.js +77 -9
- 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/device/accelerometer.js +1 -2
- package/dist/api/device/accelerometer.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/motion.js +1 -2
- package/dist/api/device/motion.js.map +1 -1
- package/dist/api/index.js +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/index.cjs.d.ts +27 -39
- package/dist/index.cjs.js +132 -125
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.d.ts +27 -39
- package/dist/index.esm.js +105 -74
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/handler.d.ts +13 -26
- package/dist/utils/handler.js +4 -16
- package/dist/utils/handler.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +15 -11
- 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/index.cjs.d.ts
CHANGED
|
@@ -37,7 +37,8 @@ declare const env: {
|
|
|
37
37
|
TARO_PLATFORM: string | undefined;
|
|
38
38
|
TARO_VERSION: string | undefined;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
// Note: 该方法由 taro-plugin-platform-h5 实现
|
|
41
|
+
// export const canIUse = temporarilyNotSupport('canIUse')
|
|
41
42
|
declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string;
|
|
42
43
|
declare function base64ToArrayBuffer(base64: string): Uint8Array;
|
|
43
44
|
// 加密
|
|
@@ -72,22 +73,22 @@ declare const getSystemInfo: typeof Taro.getSystemInfo;
|
|
|
72
73
|
declare const updateWeChatApp: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
73
74
|
declare const getUpdateManager: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
74
75
|
// 应用级事件
|
|
75
|
-
declare const onUnhandledRejection:
|
|
76
|
-
declare const onThemeChange:
|
|
77
|
-
declare const onPageNotFound:
|
|
78
|
-
declare const onError:
|
|
76
|
+
declare const onUnhandledRejection: typeof Taro.onUnhandledRejection;
|
|
77
|
+
declare const onThemeChange: typeof Taro.onThemeChange;
|
|
78
|
+
declare const onPageNotFound: typeof Taro.onPageNotFound;
|
|
79
|
+
declare const onError: typeof Taro.onError;
|
|
79
80
|
declare const onAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
80
81
|
declare const onAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
81
82
|
declare const onAppShow: typeof Taro.onAppShow;
|
|
82
83
|
declare const onAppHide: typeof Taro.onAppHide;
|
|
83
|
-
declare const offUnhandledRejection:
|
|
84
|
-
declare const offThemeChange:
|
|
85
|
-
declare const offPageNotFound:
|
|
86
|
-
declare const offError:
|
|
84
|
+
declare const offUnhandledRejection: typeof Taro.offUnhandledRejection;
|
|
85
|
+
declare const offThemeChange: typeof Taro.offThemeChange;
|
|
86
|
+
declare const offPageNotFound: typeof Taro.offPageNotFound;
|
|
87
|
+
declare const offError: typeof Taro.offError;
|
|
87
88
|
declare const offAudioInterruptionEnd: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
88
89
|
declare const offAudioInterruptionBegin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
89
|
-
declare const offAppShow: typeof Taro.
|
|
90
|
-
declare const offAppHide: typeof Taro.
|
|
90
|
+
declare const offAppShow: typeof Taro.offAppShow;
|
|
91
|
+
declare const offAppHide: typeof Taro.offAppHide;
|
|
91
92
|
// 生命周期
|
|
92
93
|
declare const getLaunchOptionsSync: typeof Taro.getLaunchOptionsSync;
|
|
93
94
|
declare const getEnterOptionsSync: typeof Taro.getEnterOptionsSync;
|
|
@@ -360,36 +361,23 @@ declare const createMediaAudioPlayer: (option?: {}, ...args: any[]) => Promise<P
|
|
|
360
361
|
*/
|
|
361
362
|
declare const createInnerAudioContext: typeof Taro.createInnerAudioContext;
|
|
362
363
|
declare const createAudioContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
363
|
-
type
|
|
364
|
-
interface ICallbackManagerOption {
|
|
365
|
-
callback?:
|
|
364
|
+
type TCallbackManagerFunc<T extends unknown[] = unknown[]> = (...arr: T) => void;
|
|
365
|
+
interface ICallbackManagerOption<T extends unknown[] = unknown[]> {
|
|
366
|
+
callback?: TCallbackManagerFunc<T>;
|
|
366
367
|
ctx?: any;
|
|
367
368
|
[key: string]: unknown;
|
|
368
369
|
}
|
|
369
|
-
type
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
add: (opt?: TCallbackManagerListItem) => void;
|
|
378
|
-
/**
|
|
379
|
-
* 移除回调
|
|
380
|
-
* @param {{ callback: function, ctx: any } | function} opt
|
|
381
|
-
*/
|
|
382
|
-
remove: (opt?: TCallbackManagerListItem) => void;
|
|
383
|
-
/**
|
|
384
|
-
* 获取回调函数数量
|
|
385
|
-
* @return {number}
|
|
386
|
-
*/
|
|
370
|
+
type TCallbackManagerUnit<T extends unknown[] = unknown[]> = (TCallbackManagerFunc<T> | ICallbackManagerOption<T>);
|
|
371
|
+
declare class CallbackManager<T extends unknown[] = unknown[]> {
|
|
372
|
+
callbacks: TCallbackManagerUnit<T>[];
|
|
373
|
+
/** 添加回调 */
|
|
374
|
+
add: (opt?: TCallbackManagerUnit<T>) => void;
|
|
375
|
+
/** 移除回调 */
|
|
376
|
+
remove: (opt?: TCallbackManagerUnit<T>) => void;
|
|
377
|
+
/** 获取回调函数数量 */
|
|
387
378
|
count: () => number;
|
|
388
|
-
/**
|
|
389
|
-
|
|
390
|
-
* @param {...any} args 回调的调用参数
|
|
391
|
-
*/
|
|
392
|
-
trigger: (...args: TCallbackManagerList) => void;
|
|
379
|
+
/** 触发回调 */
|
|
380
|
+
trigger: (...args: T) => void;
|
|
393
381
|
}
|
|
394
382
|
declare class BackgroundAudioManager implements Taro.BackgroundAudioManager {
|
|
395
383
|
Instance?: HTMLAudioElement;
|
|
@@ -553,7 +541,7 @@ declare const offLocalServiceResolveFail: (option?: {}, ...args: any[]) => Promi
|
|
|
553
541
|
declare const offLocalServiceLost: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
554
542
|
declare const offLocalServiceFound: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
555
543
|
declare const offLocalServiceDiscoveryStop: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
|
|
556
|
-
declare const request:
|
|
544
|
+
declare const request: <T = any, U = any>(option: Taro.request.Option<T, U>) => Taro.RequestTask<T>;
|
|
557
545
|
declare const addInterceptor: any;
|
|
558
546
|
declare const cleanInterceptors: any;
|
|
559
547
|
// TCP 通信
|
|
@@ -776,5 +764,5 @@ declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<Tar
|
|
|
776
764
|
declare const createSelectorQuery: typeof Taro.createSelectorQuery;
|
|
777
765
|
declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
|
|
778
766
|
declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
|
|
779
|
-
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env,
|
|
767
|
+
export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, isVKSupport, createVKSession, getOpenUserInfo, env, 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 };
|
|
780
768
|
export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
|