@tarojs/taro-h5 3.6.6-alpha.3 → 3.6.7-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/api/device/index.js +1 -1
  2. package/dist/api/device/network.js +1 -1
  3. package/dist/api/device/network.js.map +1 -1
  4. package/dist/api/device/wifi.d.ts +2 -1
  5. package/dist/api/device/wifi.js +2 -1
  6. package/dist/api/device/wifi.js.map +1 -1
  7. package/dist/api/index.d.ts +1 -0
  8. package/dist/api/index.js +5 -4
  9. package/dist/api/index.js.map +1 -1
  10. package/dist/api/location/chooseLocation.js +9 -5
  11. package/dist/api/location/chooseLocation.js.map +1 -1
  12. package/dist/api/media/audio/InnerAudioContext.d.ts +2 -0
  13. package/dist/api/media/audio/InnerAudioContext.js +4 -1
  14. package/dist/api/media/audio/InnerAudioContext.js.map +1 -1
  15. package/dist/api/media/image/index.d.ts +3 -1
  16. package/dist/api/media/image/index.js +3 -1
  17. package/dist/api/media/image/index.js.map +1 -1
  18. package/dist/api/media/index.js +1 -1
  19. package/dist/api/network/request/index.js +1 -1
  20. package/dist/api/network/request/index.js.map +1 -1
  21. package/dist/api/open-api/index.js +1 -1
  22. package/dist/api/open-api/subscribe-message.d.ts +2 -1
  23. package/dist/api/open-api/subscribe-message.js +3 -1
  24. package/dist/api/open-api/subscribe-message.js.map +1 -1
  25. package/dist/api/qq/index.d.ts +2 -0
  26. package/dist/api/qq/index.js +7 -0
  27. package/dist/api/qq/index.js.map +1 -0
  28. package/dist/api/ui/index.js +1 -1
  29. package/dist/api/ui/interaction/modal.js +6 -0
  30. package/dist/api/ui/interaction/modal.js.map +1 -1
  31. package/dist/api/ui/window.d.ts +2 -1
  32. package/dist/api/ui/window.js +2 -1
  33. package/dist/api/ui/window.js.map +1 -1
  34. package/dist/index.cjs.d.ts +9 -1
  35. package/dist/index.cjs.js +38 -15
  36. package/dist/index.cjs.js.map +1 -1
  37. package/dist/index.esm.d.ts +9 -1
  38. package/dist/index.esm.js +33 -16
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.js +5 -4
  41. package/dist/index.js.map +1 -1
  42. package/dist/utils/index.d.ts +4 -2
  43. package/dist/utils/index.js +3 -8
  44. package/dist/utils/index.js.map +1 -1
  45. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../../../../src/api/ui/interaction/modal.ts"],"sourcesContent":["import { Current } from '@tarojs/runtime'\n\nimport { getCurrentPath, inlineStyle } from '../../../utils'\n\nexport default class Modal {\n options = {\n title: '',\n content: '',\n showCancel: true,\n cancelText: '取消',\n cancelColor: '#000000',\n confirmText: '确定',\n confirmColor: '#3CC51F'\n }\n\n style = {\n maskStyle: {\n position: 'fixed',\n 'z-index': '1000',\n top: '0',\n right: '0',\n left: '0',\n bottom: '0',\n background: 'rgba(0,0,0,0.6)'\n },\n modalStyle: {\n 'z-index': '4999',\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '80%',\n 'max-width': '300px',\n 'border-radius': '3px',\n 'text-align': 'center',\n 'line-height': '1.6',\n overflow: 'hidden',\n background: '#FFFFFF'\n },\n titleStyle: {\n padding: '20px 24px 9px',\n 'font-size': '18px'\n },\n textStyle: {\n padding: '0 24px 12px',\n 'min-height': '40px',\n 'font-size': '15px',\n 'line-height': '1.3',\n color: '#808080'\n },\n footStyle: {\n position: 'relative',\n 'line-height': '48px',\n 'font-size': '18px',\n display: 'flex'\n },\n btnStyle: {\n position: 'relative',\n '-webkit-box-flex': '1',\n '-webkit-flex': '1',\n flex: '1'\n }\n }\n\n currentPath: string | null\n el: HTMLDivElement\n title: HTMLDivElement\n text: HTMLDivElement\n cancel: HTMLDivElement\n confirm: HTMLDivElement\n hideOpacityTimer: ReturnType<typeof setTimeout>\n hideDisplayTimer: ReturnType<typeof setTimeout>\n\n create (options = {}) {\n return new Promise<string>((resolve) => {\n // style\n const { maskStyle, modalStyle, titleStyle, textStyle, footStyle, btnStyle } = this.style\n\n // configuration\n const config = {\n ...this.options,\n ...options\n }\n\n // wrapper\n this.el = document.createElement('div')\n this.el.className = 'taro__modal'\n this.el.style.opacity = '0'\n this.el.style.transition = 'opacity 0.2s linear'\n\n // mask\n const mask = document.createElement('div')\n mask.className = 'taro-modal__mask'\n mask.setAttribute('style', inlineStyle(maskStyle))\n\n // modal\n const modal = document.createElement('div')\n modal.className = 'taro-modal__content'\n modal.setAttribute('style', inlineStyle(modalStyle))\n\n // title\n const titleCSS = config.title ? titleStyle : {\n ...titleStyle,\n display: 'none'\n }\n this.title = document.createElement('div')\n\n this.title.className = 'taro-modal__title'\n this.title.setAttribute('style', inlineStyle(titleCSS))\n this.title.textContent = config.title\n\n // text\n const textCSS = config.title ? textStyle : {\n ...textStyle,\n padding: '40px 20px 26px',\n color: '#353535'\n }\n this.text = document.createElement('div')\n this.text.className = 'taro-modal__text'\n this.text.setAttribute('style', inlineStyle(textCSS))\n this.text.textContent = config.content\n\n // foot\n const foot = document.createElement('div')\n foot.className = 'taro-modal__foot'\n foot.setAttribute('style', inlineStyle(footStyle))\n\n // cancel button\n const cancelCSS = {\n ...btnStyle,\n color: config.cancelColor,\n display: config.showCancel ? 'block' : 'none'\n }\n this.cancel = document.createElement('div')\n this.cancel.className = 'taro-model__btn taro-model__cancel'\n this.cancel.setAttribute('style', inlineStyle(cancelCSS))\n this.cancel.textContent = config.cancelText\n this.cancel.onclick = () => {\n this.hide()\n resolve('cancel')\n }\n\n // confirm button\n this.confirm = document.createElement('div')\n this.confirm.className = 'taro-model__btn taro-model__confirm'\n this.confirm.setAttribute('style', inlineStyle(btnStyle))\n this.confirm.style.color = config.confirmColor\n this.confirm.textContent = config.confirmText\n this.confirm.onclick = () => {\n this.hide()\n resolve('confirm')\n }\n\n // result\n foot.appendChild(this.cancel)\n foot.appendChild(this.confirm)\n modal.appendChild(this.title)\n modal.appendChild(this.text)\n modal.appendChild(foot)\n this.el.appendChild(mask)\n this.el.appendChild(modal)\n\n // show immediately\n document.body.appendChild(this.el)\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n })\n }\n\n show (options = {}) {\n return new Promise<string>((resolve) => {\n const config = {\n ...this.options,\n ...options\n }\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n // title & text\n const { textStyle } = this.style\n\n if (config.title) {\n this.title.textContent = config.title\n // none => block\n this.title.style.display = 'block'\n this.text.setAttribute('style', inlineStyle(textStyle))\n } else {\n this.title.textContent = ''\n // block => none\n this.title.style.display = 'none'\n const textCSS = {\n ...textStyle,\n padding: '40px 20px 26px',\n color: '#353535'\n }\n this.text.setAttribute('style', inlineStyle(textCSS))\n }\n\n this.text.textContent = config.content || ''\n\n // showCancel\n this.cancel.style.display = config.showCancel ? 'block' : 'none'\n\n // cancelText\n this.cancel.textContent = config.cancelText || ''\n\n // cancelColor\n this.cancel.style.color = config.cancelColor || ''\n\n // confirmText\n this.confirm.textContent = config.confirmText || ''\n\n // confirmColor\n this.confirm.style.color = config.confirmColor || ''\n\n // cbs\n this.cancel.onclick = () => {\n this.hide()\n resolve('cancel')\n }\n this.confirm.onclick = () => {\n this.hide()\n resolve('confirm')\n }\n\n // show\n this.el.style.display = 'block'\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n })\n }\n\n hide () {\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n this.currentPath = null\n\n this.hideOpacityTimer = setTimeout(() => {\n this.el.style.opacity = '0'\n this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none' }, 200)\n }, 0)\n }\n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O,GAAG,GAAG,CAAA;YAC3B,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAQ,EAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA,EAAE,EAAE,GAAG,CAAC,CAAA;SAClF,EAAE,CAAC,CAAC,CAAA;KACN;AACF;;;;"}
1
+ {"version":3,"file":"modal.js","sources":["../../../../src/api/ui/interaction/modal.ts"],"sourcesContent":["import { Current } from '@tarojs/runtime'\n\nimport { getCurrentPath, inlineStyle } from '../../../utils'\n\nexport default class Modal {\n options = {\n title: '',\n content: '',\n showCancel: true,\n cancelText: '取消',\n cancelColor: '#000000',\n confirmText: '确定',\n confirmColor: '#3CC51F'\n }\n\n style = {\n maskStyle: {\n position: 'fixed',\n 'z-index': '1000',\n top: '0',\n right: '0',\n left: '0',\n bottom: '0',\n background: 'rgba(0,0,0,0.6)'\n },\n modalStyle: {\n 'z-index': '4999',\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n width: '80%',\n 'max-width': '300px',\n 'border-radius': '3px',\n 'text-align': 'center',\n 'line-height': '1.6',\n overflow: 'hidden',\n background: '#FFFFFF'\n },\n titleStyle: {\n padding: '20px 24px 9px',\n 'font-size': '18px'\n },\n textStyle: {\n padding: '0 24px 12px',\n 'min-height': '40px',\n 'font-size': '15px',\n 'line-height': '1.3',\n color: '#808080'\n },\n footStyle: {\n position: 'relative',\n 'line-height': '48px',\n 'font-size': '18px',\n display: 'flex'\n },\n btnStyle: {\n position: 'relative',\n '-webkit-box-flex': '1',\n '-webkit-flex': '1',\n flex: '1'\n }\n }\n\n currentPath: string | null\n el: HTMLDivElement\n title: HTMLDivElement\n text: HTMLDivElement\n cancel: HTMLDivElement\n confirm: HTMLDivElement\n hideOpacityTimer: ReturnType<typeof setTimeout>\n hideDisplayTimer: ReturnType<typeof setTimeout>\n\n create (options = {}) {\n return new Promise<string>((resolve) => {\n // style\n const { maskStyle, modalStyle, titleStyle, textStyle, footStyle, btnStyle } = this.style\n\n // configuration\n const config = {\n ...this.options,\n ...options\n }\n\n // wrapper\n this.el = document.createElement('div')\n this.el.className = 'taro__modal'\n this.el.style.opacity = '0'\n this.el.style.transition = 'opacity 0.2s linear'\n\n const eventHandler = (e) => {\n e.stopPropagation()\n e.preventDefault()\n }\n // mask\n const mask = document.createElement('div')\n mask.className = 'taro-modal__mask'\n mask.setAttribute('style', inlineStyle(maskStyle))\n mask.ontouchmove = eventHandler\n // modal\n const modal = document.createElement('div')\n modal.className = 'taro-modal__content'\n modal.setAttribute('style', inlineStyle(modalStyle))\n modal.ontouchmove = eventHandler\n\n // title\n const titleCSS = config.title ? titleStyle : {\n ...titleStyle,\n display: 'none'\n }\n this.title = document.createElement('div')\n\n this.title.className = 'taro-modal__title'\n this.title.setAttribute('style', inlineStyle(titleCSS))\n this.title.textContent = config.title\n\n // text\n const textCSS = config.title ? textStyle : {\n ...textStyle,\n padding: '40px 20px 26px',\n color: '#353535'\n }\n this.text = document.createElement('div')\n this.text.className = 'taro-modal__text'\n this.text.setAttribute('style', inlineStyle(textCSS))\n this.text.textContent = config.content\n\n // foot\n const foot = document.createElement('div')\n foot.className = 'taro-modal__foot'\n foot.setAttribute('style', inlineStyle(footStyle))\n\n // cancel button\n const cancelCSS = {\n ...btnStyle,\n color: config.cancelColor,\n display: config.showCancel ? 'block' : 'none'\n }\n this.cancel = document.createElement('div')\n this.cancel.className = 'taro-model__btn taro-model__cancel'\n this.cancel.setAttribute('style', inlineStyle(cancelCSS))\n this.cancel.textContent = config.cancelText\n this.cancel.onclick = () => {\n this.hide()\n resolve('cancel')\n }\n\n // confirm button\n this.confirm = document.createElement('div')\n this.confirm.className = 'taro-model__btn taro-model__confirm'\n this.confirm.setAttribute('style', inlineStyle(btnStyle))\n this.confirm.style.color = config.confirmColor\n this.confirm.textContent = config.confirmText\n this.confirm.onclick = () => {\n this.hide()\n resolve('confirm')\n }\n\n // result\n foot.appendChild(this.cancel)\n foot.appendChild(this.confirm)\n modal.appendChild(this.title)\n modal.appendChild(this.text)\n modal.appendChild(foot)\n this.el.appendChild(mask)\n this.el.appendChild(modal)\n\n // show immediately\n document.body.appendChild(this.el)\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n })\n }\n\n show (options = {}) {\n return new Promise<string>((resolve) => {\n const config = {\n ...this.options,\n ...options\n }\n\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n // title & text\n const { textStyle } = this.style\n\n if (config.title) {\n this.title.textContent = config.title\n // none => block\n this.title.style.display = 'block'\n this.text.setAttribute('style', inlineStyle(textStyle))\n } else {\n this.title.textContent = ''\n // block => none\n this.title.style.display = 'none'\n const textCSS = {\n ...textStyle,\n padding: '40px 20px 26px',\n color: '#353535'\n }\n this.text.setAttribute('style', inlineStyle(textCSS))\n }\n\n this.text.textContent = config.content || ''\n\n // showCancel\n this.cancel.style.display = config.showCancel ? 'block' : 'none'\n\n // cancelText\n this.cancel.textContent = config.cancelText || ''\n\n // cancelColor\n this.cancel.style.color = config.cancelColor || ''\n\n // confirmText\n this.confirm.textContent = config.confirmText || ''\n\n // confirmColor\n this.confirm.style.color = config.confirmColor || ''\n\n // cbs\n this.cancel.onclick = () => {\n this.hide()\n resolve('cancel')\n }\n this.confirm.onclick = () => {\n this.hide()\n resolve('confirm')\n }\n\n // show\n this.el.style.display = 'block'\n setTimeout(() => { this.el.style.opacity = '1' }, 0)\n\n // Current.page不存在时说明路由还未挂载,此时需根据url来分配将要渲染的页面path\n this.currentPath = Current.page?.path ?? getCurrentPath()\n })\n }\n\n hide () {\n if (this.hideOpacityTimer) clearTimeout(this.hideOpacityTimer)\n if (this.hideDisplayTimer) clearTimeout(this.hideDisplayTimer)\n\n this.currentPath = null\n\n this.hideOpacityTimer = setTimeout(() => {\n this.el.style.opacity = '0'\n this.hideDisplayTimer = setTimeout(() => { this.el.style.display = 'none' }, 200)\n }, 0)\n }\n}\n"],"names":[],"mappings":";;;AAIc,MAAO,KAAK,CAAA;AAA1B,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,KAAK,EAAE,EAAE;AACT,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,WAAW,EAAE,SAAS;AACtB,YAAA,WAAW,EAAE,IAAI;AACjB,YAAA,YAAY,EAAE,SAAS;SACxB,CAAA;AAED,QAAA,IAAA,CAAA,KAAK,GAAG;AACN,YAAA,SAAS,EAAE;AACT,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,GAAG,EAAE,GAAG;AACR,gBAAA,KAAK,EAAE,GAAG;AACV,gBAAA,IAAI,EAAE,GAAG;AACT,gBAAA,MAAM,EAAE,GAAG;AACX,gBAAA,UAAU,EAAE,iBAAiB;AAC9B,aAAA;AACD,YAAA,UAAU,EAAE;AACV,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,GAAG,EAAE,KAAK;AACV,gBAAA,IAAI,EAAE,KAAK;AACX,gBAAA,SAAS,EAAE,uBAAuB;AAClC,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,WAAW,EAAE,OAAO;AACpB,gBAAA,eAAe,EAAE,KAAK;AACtB,gBAAA,YAAY,EAAE,QAAQ;AACtB,gBAAA,aAAa,EAAE,KAAK;AACpB,gBAAA,QAAQ,EAAE,QAAQ;AAClB,gBAAA,UAAU,EAAE,SAAS;AACtB,aAAA;AACD,YAAA,UAAU,EAAE;AACV,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,WAAW,EAAE,MAAM;AACpB,aAAA;AACD,YAAA,SAAS,EAAE;AACT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AI,CAAC,gBAAgB;AAAE,YAAA,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QAC9D,IAAI,IAAI,CAAC,gBAAgB;AAAE,YAAA,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;AAE9D,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAA;AAEvB,QAAA,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAK;YACtC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;YAC3B,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,MAAQ,EAAA,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA,EAAE,EAAE,GAAG,CAAC,CAAA;SAClF,EAAE,CAAC,CAAC,CAAA;KACN;AACF;;;;"}
@@ -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;;;;"}
@@ -310,6 +310,7 @@ declare const setWifiList: (option?: {}, ...args: any[]) => Promise<Partial<Taro
310
310
  declare const onWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
311
311
  declare const onWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
312
312
  declare const onGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
313
+ declare const offWifiConnectedWithPartialInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
313
314
  declare const offWifiConnected: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
314
315
  declare const offGetWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
315
316
  declare const getWifiList: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -475,6 +476,8 @@ declare const chooseMessageFile: (option?: {}, ...args: any[]) => Promise<Partia
475
476
  * 从本地相册选择图片或使用相机拍照。
476
477
  */
477
478
  declare const chooseImage: typeof Taro.chooseImage;
479
+ declare const editImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
480
+ declare const cropImage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
478
481
  // 实时音视频
479
482
  declare const createLivePusherContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
480
483
  declare const createLivePlayerContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -609,6 +612,8 @@ declare const checkIsSupportSoterAuthentication: (option?: {}, ...args: any[]) =
609
612
  declare const checkIsSoterEnrolledInDevice: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
610
613
  // 订阅消息
611
614
  declare const requestSubscribeMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
615
+ // 订阅设备消息
616
+ declare const requestSubscribeDeviceMessage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
612
617
  // 用户信息
613
618
  declare const getUserProfile: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
614
619
  declare const getUserInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -618,6 +623,8 @@ declare const getWeRunData: (option?: {}, ...args: any[]) => Promise<Partial<Tar
618
623
  // 支付
619
624
  declare const requestPayment: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
620
625
  declare const requestOrderPayment: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
626
+ // 打开手Q说说发表界面
627
+ declare const openQzonePublish: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
621
628
  // 转发
622
629
  declare const updateShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
623
630
  declare const showShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -759,10 +766,11 @@ declare const onWindowResize: typeof Taro.onWindowResize;
759
766
  * 取消监听窗口尺寸变化事件
760
767
  */
761
768
  declare const offWindowResize: typeof Taro.offWindowResize;
769
+ declare const checkIsPictureInPictureActive: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
762
770
  // Worker
763
771
  declare const createWorker: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
764
772
  declare const createSelectorQuery: typeof Taro.createSelectorQuery;
765
773
  declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
766
774
  declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
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 };
775
+ 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, 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 };
768
776
  export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
package/dist/index.cjs.js CHANGED
@@ -138,15 +138,10 @@ function findDOM(inst) {
138
138
  }
139
139
  return el;
140
140
  }
141
- function getParameterError({ name = '', para, correct, wrong }) {
141
+ function getParameterError({ name = '', para, correct, wrong, level = 'error' }) {
142
142
  const parameter = para ? `parameter.${para}` : 'parameter';
143
143
  const errorType = upperCaseFirstLetter(wrong === null ? 'Null' : typeof wrong);
144
- if (name) {
145
- return `${name}:fail parameter error: ${parameter} should be ${correct} instead of ${errorType}`;
146
- }
147
- else {
148
- return `parameter error: ${parameter} should be ${correct} instead of ${errorType}`;
149
- }
144
+ return `${name ? `${name}:fail ` : ''}parameter ${level}: ${parameter} should be ${correct} instead of ${errorType}`;
150
145
  }
151
146
  function upperCaseFirstLetter(string) {
152
147
  if (typeof string !== 'string')
@@ -1875,7 +1870,7 @@ const onNetworkStatusChange = callback => {
1875
1870
  connection.addEventListener('change', networkStatusListener);
1876
1871
  }
1877
1872
  };
1878
- const offNetworkWeakChange = temporarilyNotSupport('offNetworkStatusChange');
1873
+ const offNetworkWeakChange = temporarilyNotSupport('offNetworkWeakChange');
1879
1874
  const offNetworkStatusChange = callback => {
1880
1875
  networkStatusManager.remove(callback);
1881
1876
  const connection = getConnection();
@@ -1975,6 +1970,7 @@ const setWifiList = temporarilyNotSupport('setWifiList');
1975
1970
  const onWifiConnectedWithPartialInfo = temporarilyNotSupport('onWifiConnectedWithPartialInfo');
1976
1971
  const onWifiConnected = temporarilyNotSupport('onWifiConnected');
1977
1972
  const onGetWifiList = temporarilyNotSupport('onGetWifiList');
1973
+ const offWifiConnectedWithPartialInfo = temporarilyNotSupport('offWifiConnectedWithPartialInfo');
1978
1974
  const offWifiConnected = temporarilyNotSupport('offWifiConnected');
1979
1975
  const offGetWifiList = temporarilyNotSupport('offGetWifiList');
1980
1976
  const getWifiList = temporarilyNotSupport('getWifiList');
@@ -2095,11 +2091,13 @@ var css_248z = ".taro_choose_location {\n display: flex;\n position: fixed;\n
2095
2091
  var stylesheet=".taro_choose_location {\n display: flex;\n position: fixed;\n top: 100%;\n z-index: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: #fff;\n transition: ease top 0.3s;\n}\n.taro_choose_location_bar {\n display: flex;\n flex: 0 95px;\n height: 95px;\n background-color: #ededed;\n color: #090909;\n}\n.taro_choose_location_back {\n position: relative;\n flex: 0 45px;\n margin-top: 30px;\n width: 33px;\n height: 30px;\n}\n.taro_choose_location_back::before {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n border: solid 15px;\n border-color: transparent #090909 transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_back::after {\n display: block;\n position: absolute;\n left: 3px;\n top: 0;\n border: solid 15px;\n border-color: transparent #ededed transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_title {\n flex: 1;\n padding-left: 30px;\n line-height: 95px;\n}\n.taro_choose_location_submit {\n margin: 18px 30px 0 0;\n padding: 0;\n border: none;\n width: 110px;\n height: 60px;\n background-color: #08bf62;\n line-height: 60px;\n font-size: 28px;\n color: #fff;\n}\n.taro_choose_location_frame {\n flex: 1;\n}";
2096
2092
  styleInject(css_248z,{"insertAt":"top"});
2097
2093
 
2094
+ let container = null;
2098
2095
  function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
2099
2096
  var _a, _b, _c;
2100
2097
  const { latitude, longitude } = mapOpt, opts = __rest(mapOpt, ["latitude", "longitude"]);
2101
2098
  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);
2102
- const html = `
2099
+ if (!container) {
2100
+ const html = `
2103
2101
  <div class='taro_choose_location'>
2104
2102
  <div class='taro_choose_location_bar'>
2105
2103
  <div class='taro_choose_location_back'></div>
@@ -2109,8 +2107,9 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
2109
2107
  <iframe class='taro_choose_location_frame' frameborder='0' src="https://apis.map.qq.com/tools/locpicker?${queryString.stringify(query, { arrayFormat: 'comma', skipNull: true })}" />
2110
2108
  </div>
2111
2109
  `;
2112
- const container = document.createElement('div');
2113
- container.innerHTML = html;
2110
+ container = document.createElement('div');
2111
+ container.innerHTML = html;
2112
+ }
2114
2113
  const main = container.querySelector('.taro_choose_location');
2115
2114
  function show() {
2116
2115
  setTimeout(() => {
@@ -2129,7 +2128,8 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
2129
2128
  handler();
2130
2129
  }
2131
2130
  function remove() {
2132
- container.remove();
2131
+ container === null || container === void 0 ? void 0 : container.remove();
2132
+ container = null;
2133
2133
  window.removeEventListener('popstate', back);
2134
2134
  }
2135
2135
  (_b = container.querySelector('.taro_choose_location_back')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', back);
@@ -2138,7 +2138,7 @@ function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
2138
2138
  return {
2139
2139
  show,
2140
2140
  remove,
2141
- container
2141
+ container,
2142
2142
  };
2143
2143
  }
2144
2144
  /**
@@ -2207,6 +2207,7 @@ const getFuzzyLocation = temporarilyNotSupport('getFuzzyLocation');
2207
2207
  class InnerAudioContext {
2208
2208
  constructor() {
2209
2209
  this.__startTime = 0;
2210
+ this.__isFirstPlay = true;
2210
2211
  this.play = () => { var _a; return (_a = this.Instance) === null || _a === void 0 ? void 0 : _a.play(); };
2211
2212
  this.pause = () => { var _a; return (_a = this.Instance) === null || _a === void 0 ? void 0 : _a.pause(); };
2212
2213
  this.stop = () => {
@@ -2254,7 +2255,8 @@ class InnerAudioContext {
2254
2255
  this.stopStack = new CallbackManager();
2255
2256
  Taro.eventCenter.on('__taroRouterChange', () => { this.stop(); });
2256
2257
  this.onPlay(() => {
2257
- if (this.currentTime !== this.startTime) {
2258
+ if (this.__isFirstPlay) {
2259
+ this.__isFirstPlay = false;
2258
2260
  this.seek(this.startTime);
2259
2261
  }
2260
2262
  });
@@ -2263,6 +2265,7 @@ class InnerAudioContext {
2263
2265
  get autoplay() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.autoplay) || false; }
2264
2266
  get buffered() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.buffered.length) || 0; }
2265
2267
  get currentTime() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.currentTime) || 0; }
2268
+ set currentTime(e) { this.seek(e); }
2266
2269
  get duration() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.duration) || 0; }
2267
2270
  set loop(e) { this.setProperty('loop', e); }
2268
2271
  get loop() { var _a; return ((_a = this.Instance) === null || _a === void 0 ? void 0 : _a.loop) || false; }
@@ -2608,6 +2611,8 @@ const saveImageToPhotosAlbum = temporarilyNotSupport('saveImageToPhotosAlbum');
2608
2611
  const previewMedia = temporarilyNotSupport('previewMedia');
2609
2612
  const compressImage = temporarilyNotSupport('compressImage');
2610
2613
  const chooseMessageFile = temporarilyNotSupport('chooseMessageFile');
2614
+ const editImage = temporarilyNotSupport('editImage');
2615
+ const cropImage = temporarilyNotSupport('cropImage');
2611
2616
 
2612
2617
  // 实时音视频
2613
2618
  const createLivePusherContext = temporarilyNotSupport('createLivePusherContext');
@@ -2981,7 +2986,7 @@ function _request(options = {}) {
2981
2986
  if (methodUpper === 'GET' || methodUpper === 'HEAD') {
2982
2987
  url = generateRequestUrlWithParams(url, options.data);
2983
2988
  }
2984
- else if (Object.prototype.toString.call(options.data) === '[object Object]') {
2989
+ else if (['[object Array]', '[object Object]'].indexOf(Object.prototype.toString.call(options.data)) >= 0) {
2985
2990
  options.header = options.header || {};
2986
2991
  const keyOfContentType = Object.keys(options.header).find(item => item.toLowerCase() === 'content-type');
2987
2992
  if (!keyOfContentType) {
@@ -3439,6 +3444,8 @@ const checkIsSoterEnrolledInDevice = temporarilyNotSupport('checkIsSoterEnrolled
3439
3444
 
3440
3445
  // 订阅消息
3441
3446
  const requestSubscribeMessage = temporarilyNotSupport('requestSubscribeMessage');
3447
+ // 订阅设备消息
3448
+ const requestSubscribeDeviceMessage = temporarilyNotSupport('requestSubscribeDeviceMessage');
3442
3449
 
3443
3450
  // 用户信息
3444
3451
  const getUserProfile = temporarilyNotSupport('getUserProfile');
@@ -3452,6 +3459,9 @@ const getWeRunData = temporarilyNotSupport('getWeRunData');
3452
3459
  const requestPayment = temporarilyNotSupport('requestPayment');
3453
3460
  const requestOrderPayment = temporarilyNotSupport('requestOrderPayment');
3454
3461
 
3462
+ // 打开手Q说说发表界面
3463
+ const openQzonePublish = temporarilyNotSupport('openQzonePublish');
3464
+
3455
3465
  // 路由
3456
3466
  // FIXME 方法导出类型未对齐,后续修复
3457
3467
 
@@ -4098,14 +4108,20 @@ class Modal {
4098
4108
  this.el.className = 'taro__modal';
4099
4109
  this.el.style.opacity = '0';
4100
4110
  this.el.style.transition = 'opacity 0.2s linear';
4111
+ const eventHandler = (e) => {
4112
+ e.stopPropagation();
4113
+ e.preventDefault();
4114
+ };
4101
4115
  // mask
4102
4116
  const mask = document.createElement('div');
4103
4117
  mask.className = 'taro-modal__mask';
4104
4118
  mask.setAttribute('style', inlineStyle(maskStyle));
4119
+ mask.ontouchmove = eventHandler;
4105
4120
  // modal
4106
4121
  const modal = document.createElement('div');
4107
4122
  modal.className = 'taro-modal__content';
4108
4123
  modal.setAttribute('style', inlineStyle(modalStyle));
4124
+ modal.ontouchmove = eventHandler;
4109
4125
  // title
4110
4126
  const titleCSS = config.title ? titleStyle : Object.assign(Object.assign({}, titleStyle), { display: 'none' });
4111
4127
  this.title = document.createElement('div');
@@ -5123,6 +5139,7 @@ const offWindowResize = callback => {
5123
5139
  window.removeEventListener('resize', resizeListener);
5124
5140
  }
5125
5141
  };
5142
+ const checkIsPictureInPictureActive = temporarilyNotSupport('checkIsPictureInPictureActive');
5126
5143
 
5127
5144
  // Worker
5128
5145
  const createWorker = temporarilyNotSupport('createWorker');
@@ -5683,6 +5700,7 @@ exports.canvasToTempFilePath = canvasToTempFilePath;
5683
5700
  exports.carClassify = carClassify;
5684
5701
  exports.checkIsAddedToMyMiniProgram = checkIsAddedToMyMiniProgram;
5685
5702
  exports.checkIsOpenAccessibility = checkIsOpenAccessibility;
5703
+ exports.checkIsPictureInPictureActive = checkIsPictureInPictureActive;
5686
5704
  exports.checkIsSoterEnrolledInDevice = checkIsSoterEnrolledInDevice;
5687
5705
  exports.checkIsSupportFacialRecognition = checkIsSupportFacialRecognition;
5688
5706
  exports.checkIsSupportSoterAuthentication = checkIsSupportSoterAuthentication;
@@ -5736,10 +5754,12 @@ exports.createVideoContext = createVideoContext;
5736
5754
  exports.createVideoDecoder = createVideoDecoder;
5737
5755
  exports.createWebAudioContext = createWebAudioContext;
5738
5756
  exports.createWorker = createWorker;
5757
+ exports.cropImage = cropImage;
5739
5758
  exports.default = taro;
5740
5759
  exports.disableAlertBeforeUnload = disableAlertBeforeUnload;
5741
5760
  exports.dishClassify = dishClassify;
5742
5761
  exports.downloadFile = downloadFile;
5762
+ exports.editImage = editImage;
5743
5763
  exports.enableAlertBeforeUnload = enableAlertBeforeUnload;
5744
5764
  exports.env = env;
5745
5765
  exports.eventCenter = eventCenter;
@@ -5892,6 +5912,7 @@ exports.offVoIPChatMembersChanged = offVoIPChatMembersChanged;
5892
5912
  exports.offVoIPChatStateChanged = offVoIPChatStateChanged;
5893
5913
  exports.offVoIPVideoMembersChanged = offVoIPVideoMembersChanged;
5894
5914
  exports.offWifiConnected = offWifiConnected;
5915
+ exports.offWifiConnectedWithPartialInfo = offWifiConnectedWithPartialInfo;
5895
5916
  exports.offWindowResize = offWindowResize;
5896
5917
  exports.onAccelerometerChange = onAccelerometerChange;
5897
5918
  exports.onAppHide = onAppHide;
@@ -5954,6 +5975,7 @@ exports.openCustomerServiceChat = openCustomerServiceChat;
5954
5975
  exports.openDocument = openDocument;
5955
5976
  exports.openEmbeddedMiniProgram = openEmbeddedMiniProgram;
5956
5977
  exports.openLocation = openLocation;
5978
+ exports.openQzonePublish = openQzonePublish;
5957
5979
  exports.openSetting = openSetting;
5958
5980
  exports.openSystemBluetoothSetting = openSystemBluetoothSetting;
5959
5981
  exports.openVideoEditor = openVideoEditor;
@@ -5983,6 +6005,7 @@ exports.request = request;
5983
6005
  exports.requestOrderPayment = requestOrderPayment;
5984
6006
  exports.requestPayment = requestPayment;
5985
6007
  exports.requestPolymerPayment = requestPolymerPayment;
6008
+ exports.requestSubscribeDeviceMessage = requestSubscribeDeviceMessage;
5986
6009
  exports.requestSubscribeMessage = requestSubscribeMessage;
5987
6010
  exports.requirePlugin = requirePlugin;
5988
6011
  exports.reserveChannelsLive = reserveChannelsLive;