@tarojs/components 3.3.16 → 3.4.0-beta.1

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 (371) hide show
  1. package/dist/cjs/{index-cde74e58.js → index-b9715722.js} +0 -0
  2. package/dist/cjs/{index-7464647f.js → index-dd4b7ba3.js} +0 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/taro-ad-core.cjs.entry.js +19 -0
  5. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +19 -0
  6. package/dist/cjs/taro-audio-core.cjs.entry.js +1 -1
  7. package/dist/cjs/taro-block-core.cjs.entry.js +1 -1
  8. package/dist/cjs/taro-button-core.cjs.entry.js +2 -2
  9. package/dist/cjs/taro-camera-core.cjs.entry.js +1 -1
  10. package/dist/cjs/taro-canvas-core.cjs.entry.js +1 -1
  11. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +1 -1
  12. package/dist/cjs/taro-components.cjs.js +2 -2
  13. package/dist/cjs/taro-cover-image-core.cjs.entry.js +1 -1
  14. package/dist/cjs/taro-cover-view-core.cjs.entry.js +2 -2
  15. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +1 -1
  16. package/dist/cjs/taro-editor-core.cjs.entry.js +19 -0
  17. package/dist/cjs/taro-form-core.cjs.entry.js +1 -1
  18. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +19 -0
  19. package/dist/cjs/taro-icon-core.cjs.entry.js +2 -2
  20. package/dist/cjs/taro-image-core.cjs.entry.js +4 -4
  21. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  22. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +19 -0
  23. package/dist/cjs/taro-label-core.cjs.entry.js +1 -1
  24. package/dist/cjs/taro-live-player-core.cjs.entry.js +19 -0
  25. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +19 -0
  26. package/dist/cjs/taro-map-core.cjs.entry.js +19 -0
  27. package/dist/cjs/taro-match-media-core.cjs.entry.js +19 -0
  28. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  29. package/dist/cjs/taro-movable-view-core.cjs.entry.js +1 -1
  30. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +19 -0
  31. package/dist/cjs/taro-navigator-core.cjs.entry.js +12 -8
  32. package/dist/cjs/taro-official-account-core.cjs.entry.js +19 -0
  33. package/dist/cjs/taro-open-data-core.cjs.entry.js +1 -1
  34. package/dist/cjs/taro-page-container-core.cjs.entry.js +19 -0
  35. package/dist/cjs/taro-page-meta-core.cjs.entry.js +19 -0
  36. package/dist/cjs/taro-picker-core_2.cjs.entry.js +2 -2
  37. package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +1 -1
  38. package/dist/cjs/taro-picker-view-core.cjs.entry.js +1 -1
  39. package/dist/cjs/taro-progress-core.cjs.entry.js +1 -1
  40. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +9 -5
  41. package/dist/cjs/taro-radio-core_2.cjs.entry.js +1 -1
  42. package/dist/cjs/taro-rich-text-core.cjs.entry.js +1 -1
  43. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -2
  44. package/dist/cjs/taro-share-element-core.cjs.entry.js +19 -0
  45. package/dist/cjs/taro-slider-core.cjs.entry.js +1 -1
  46. package/dist/cjs/taro-slot-core.cjs.entry.js +19 -0
  47. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +12 -3
  48. package/dist/cjs/taro-switch-core.cjs.entry.js +1 -1
  49. package/dist/cjs/taro-tabbar.cjs.entry.js +38 -32
  50. package/dist/cjs/taro-text-core.cjs.entry.js +2 -2
  51. package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -1
  52. package/dist/cjs/taro-video-control_3.cjs.entry.js +183 -100
  53. package/dist/cjs/taro-view-core.cjs.entry.js +2 -2
  54. package/dist/cjs/taro-voip-room-core.cjs.entry.js +19 -0
  55. package/dist/cjs/taro-web-view-core.cjs.entry.js +1 -1
  56. package/dist/collection/collection-manifest.json +20 -4
  57. package/dist/collection/components/ad/ad.js +11 -0
  58. package/dist/collection/components/ad-custom/ad-custom.js +11 -0
  59. package/dist/collection/components/editor/editor.js +11 -0
  60. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +11 -0
  61. package/dist/collection/components/image/image.js +1 -1
  62. package/dist/collection/components/image/style/index.css +2 -2
  63. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +11 -0
  64. package/dist/collection/components/live-player/live-player.js +11 -0
  65. package/dist/collection/components/live-pusher/live-pusher.js +11 -0
  66. package/dist/collection/components/map/map.js +11 -0
  67. package/dist/collection/components/match-media/match-media.js +11 -0
  68. package/dist/collection/components/{movable-view → movable-area}/movable-area.js +0 -0
  69. package/dist/collection/components/{movable-view → movable-area}/movable-view.js +0 -0
  70. package/dist/collection/components/navigation-bar/navigation-bar.js +11 -0
  71. package/dist/collection/components/navigator/navigator.js +1 -1
  72. package/dist/collection/components/official-account/official-account.js +11 -0
  73. package/dist/collection/components/page-container/page-container.js +11 -0
  74. package/dist/collection/components/page-meta/page-meta.js +11 -0
  75. package/dist/collection/components/{picker-view-column → picker-view}/picker-view-column.js +0 -0
  76. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.js +1 -1
  77. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/style/index.css +0 -0
  78. package/dist/collection/components/share-element/share-element.js +11 -0
  79. package/dist/collection/components/slot/slot.js +11 -0
  80. package/dist/collection/components/swiper/swiper.js +10 -1
  81. package/dist/collection/components/tabbar/tabbar.js +10 -4
  82. package/dist/collection/components/video/video-control.js +39 -22
  83. package/dist/collection/components/video/video-danmu.js +52 -39
  84. package/dist/collection/components/video/video.js +60 -37
  85. package/dist/collection/components/voip-room/voip-room.js +11 -0
  86. package/dist/collection/utils/index.js +50 -64
  87. package/dist/esm/{index-85e10859.js → index-3c78bcaf.js} +0 -0
  88. package/dist/esm/{index-165a6222.js → index-5bd7cbab.js} +0 -0
  89. package/dist/esm/loader.js +2 -2
  90. package/dist/esm/taro-ad-core.entry.js +15 -0
  91. package/dist/esm/taro-ad-custom-core.entry.js +15 -0
  92. package/dist/esm/taro-audio-core.entry.js +1 -1
  93. package/dist/esm/taro-block-core.entry.js +1 -1
  94. package/dist/esm/taro-button-core.entry.js +2 -2
  95. package/dist/esm/taro-camera-core.entry.js +1 -1
  96. package/dist/esm/taro-canvas-core.entry.js +1 -1
  97. package/dist/esm/taro-checkbox-core_2.entry.js +1 -1
  98. package/dist/esm/taro-components.js +2 -2
  99. package/dist/esm/taro-cover-image-core.entry.js +1 -1
  100. package/dist/esm/taro-cover-view-core.entry.js +2 -2
  101. package/dist/esm/taro-custom-wrapper-core.entry.js +1 -1
  102. package/dist/esm/taro-editor-core.entry.js +15 -0
  103. package/dist/esm/taro-form-core.entry.js +1 -1
  104. package/dist/esm/taro-functional-page-navigator-core.entry.js +15 -0
  105. package/dist/esm/taro-icon-core.entry.js +2 -2
  106. package/dist/esm/taro-image-core.entry.js +4 -4
  107. package/dist/esm/taro-input-core.entry.js +1 -1
  108. package/dist/esm/taro-keyboard-accessory-core.entry.js +15 -0
  109. package/dist/esm/taro-label-core.entry.js +1 -1
  110. package/dist/esm/taro-live-player-core.entry.js +15 -0
  111. package/dist/esm/taro-live-pusher-core.entry.js +15 -0
  112. package/dist/esm/taro-map-core.entry.js +15 -0
  113. package/dist/esm/taro-match-media-core.entry.js +15 -0
  114. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  115. package/dist/esm/taro-movable-view-core.entry.js +1 -1
  116. package/dist/esm/taro-navigation-bar-core.entry.js +15 -0
  117. package/dist/esm/taro-navigator-core.entry.js +3 -3
  118. package/dist/esm/taro-official-account-core.entry.js +15 -0
  119. package/dist/esm/taro-open-data-core.entry.js +1 -1
  120. package/dist/esm/taro-page-container-core.entry.js +15 -0
  121. package/dist/esm/taro-page-meta-core.entry.js +15 -0
  122. package/dist/esm/taro-picker-core_2.entry.js +2 -2
  123. package/dist/esm/taro-picker-view-column-core.entry.js +1 -1
  124. package/dist/esm/taro-picker-view-core.entry.js +1 -1
  125. package/dist/esm/taro-progress-core.entry.js +1 -1
  126. package/dist/esm/taro-pull-to-refresh.entry.js +3 -3
  127. package/dist/esm/taro-radio-core_2.entry.js +1 -1
  128. package/dist/esm/taro-rich-text-core.entry.js +1 -1
  129. package/dist/esm/taro-scroll-view-core.entry.js +2 -2
  130. package/dist/esm/taro-share-element-core.entry.js +15 -0
  131. package/dist/esm/taro-slider-core.entry.js +1 -1
  132. package/dist/esm/taro-slot-core.entry.js +15 -0
  133. package/dist/esm/taro-swiper-core_2.entry.js +12 -3
  134. package/dist/esm/taro-switch-core.entry.js +1 -1
  135. package/dist/esm/taro-tabbar.entry.js +13 -11
  136. package/dist/esm/taro-text-core.entry.js +2 -2
  137. package/dist/esm/taro-textarea-core.entry.js +1 -1
  138. package/dist/esm/taro-video-control_3.entry.js +183 -100
  139. package/dist/esm/taro-view-core.entry.js +2 -2
  140. package/dist/esm/taro-voip-room-core.entry.js +15 -0
  141. package/dist/esm/taro-web-view-core.entry.js +1 -1
  142. package/dist/esm-es5/{index-85e10859.js → index-3c78bcaf.js} +0 -0
  143. package/dist/esm-es5/{index-165a6222.js → index-5bd7cbab.js} +0 -0
  144. package/dist/esm-es5/loader.js +1 -1
  145. package/dist/esm-es5/taro-ad-core.entry.js +1 -0
  146. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -0
  147. package/dist/esm-es5/taro-audio-core.entry.js +1 -1
  148. package/dist/esm-es5/taro-block-core.entry.js +1 -1
  149. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  150. package/dist/esm-es5/taro-camera-core.entry.js +1 -1
  151. package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
  152. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
  153. package/dist/esm-es5/taro-components.js +1 -1
  154. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -1
  155. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
  156. package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -1
  157. package/dist/esm-es5/taro-editor-core.entry.js +1 -0
  158. package/dist/esm-es5/taro-form-core.entry.js +1 -1
  159. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -0
  160. package/dist/esm-es5/taro-icon-core.entry.js +1 -1
  161. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  162. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  163. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -0
  164. package/dist/esm-es5/taro-label-core.entry.js +1 -1
  165. package/dist/esm-es5/taro-live-player-core.entry.js +1 -0
  166. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -0
  167. package/dist/esm-es5/taro-map-core.entry.js +1 -0
  168. package/dist/esm-es5/taro-match-media-core.entry.js +1 -0
  169. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  170. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  171. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -0
  172. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  173. package/dist/esm-es5/taro-official-account-core.entry.js +1 -0
  174. package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
  175. package/dist/esm-es5/taro-page-container-core.entry.js +1 -0
  176. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -0
  177. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
  178. package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -1
  179. package/dist/esm-es5/taro-picker-view-core.entry.js +1 -1
  180. package/dist/esm-es5/taro-progress-core.entry.js +1 -1
  181. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  182. package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
  183. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
  184. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  185. package/dist/esm-es5/taro-share-element-core.entry.js +1 -0
  186. package/dist/esm-es5/taro-slider-core.entry.js +1 -1
  187. package/dist/esm-es5/taro-slot-core.entry.js +1 -0
  188. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  189. package/dist/esm-es5/taro-switch-core.entry.js +1 -1
  190. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  191. package/dist/esm-es5/taro-text-core.entry.js +1 -1
  192. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  193. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  194. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  195. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -0
  196. package/dist/esm-es5/taro-web-view-core.entry.js +1 -1
  197. package/dist/taro-components/p-0303f9e0.entry.js +1 -0
  198. package/dist/taro-components/p-0472e474.system.entry.js +1 -0
  199. package/dist/taro-components/p-04818461.system.entry.js +1 -0
  200. package/dist/taro-components/p-065ec61d.entry.js +1 -0
  201. package/dist/taro-components/p-06af26db.system.entry.js +1 -0
  202. package/dist/taro-components/{p-3e2d4793.entry.js → p-06bffead.entry.js} +1 -1
  203. package/dist/taro-components/p-0c2982fc.system.entry.js +1 -0
  204. package/dist/taro-components/p-0ee69803.entry.js +1 -0
  205. package/dist/taro-components/p-11932905.entry.js +1 -0
  206. package/dist/taro-components/{p-d9494012.system.entry.js → p-12638ebc.system.entry.js} +1 -1
  207. package/dist/taro-components/{p-79b3c05a.entry.js → p-12ae0a33.entry.js} +1 -1
  208. package/dist/taro-components/{p-8d905ff5.system.entry.js → p-13c1404f.system.entry.js} +1 -1
  209. package/dist/taro-components/p-14dbbb42.entry.js +1 -0
  210. package/dist/taro-components/p-15bea37d.entry.js +1 -0
  211. package/dist/taro-components/{p-d6269b5e.system.entry.js → p-17039974.system.entry.js} +1 -1
  212. package/dist/taro-components/{p-7a5be745.entry.js → p-17cf8b5b.entry.js} +1 -1
  213. package/dist/taro-components/{p-5a13bd63.system.entry.js → p-1b790eb0.system.entry.js} +1 -1
  214. package/dist/taro-components/{p-2eda9121.system.entry.js → p-1e4f1702.system.entry.js} +1 -1
  215. package/dist/taro-components/{p-00328ebf.system.entry.js → p-264b7229.system.entry.js} +1 -1
  216. package/dist/taro-components/p-2d2f8064.entry.js +1 -0
  217. package/dist/taro-components/{p-8cf16235.entry.js → p-32937866.entry.js} +1 -1
  218. package/dist/taro-components/p-3334ac67.system.entry.js +1 -0
  219. package/dist/taro-components/p-336f2b2a.system.entry.js +1 -0
  220. package/dist/taro-components/p-33ee636a.system.js +1 -0
  221. package/dist/taro-components/{p-1507bcbf.entry.js → p-3633bb84.entry.js} +1 -1
  222. package/dist/taro-components/{p-2ce9bc65.system.entry.js → p-3643d8f7.system.entry.js} +1 -1
  223. package/dist/taro-components/{p-6967e577.js → p-37cfdd8f.js} +0 -0
  224. package/dist/taro-components/p-3c0230ba.entry.js +1 -0
  225. package/dist/taro-components/p-3dfb1807.entry.js +1 -0
  226. package/dist/taro-components/p-431197bc.entry.js +1 -0
  227. package/dist/taro-components/{p-2de1a146.system.entry.js → p-43de2f12.system.entry.js} +1 -1
  228. package/dist/taro-components/{p-f4158e42.entry.js → p-4dbed323.entry.js} +1 -1
  229. package/dist/taro-components/{p-bd922592.system.entry.js → p-50066d5e.system.entry.js} +1 -1
  230. package/dist/taro-components/p-527a38ee.system.entry.js +1 -0
  231. package/dist/taro-components/p-554e1039.entry.js +1 -0
  232. package/dist/taro-components/{p-0da88b1b.entry.js → p-55b0a30b.entry.js} +1 -1
  233. package/dist/taro-components/p-56618f09.entry.js +1 -0
  234. package/dist/taro-components/p-59d38db0.entry.js +1 -0
  235. package/dist/taro-components/p-5c420456.entry.js +1 -0
  236. package/dist/taro-components/{p-d12592f1.entry.js → p-5f8b5f62.entry.js} +1 -1
  237. package/dist/taro-components/{p-8235b7b7.system.entry.js → p-627a5064.system.entry.js} +1 -1
  238. package/dist/taro-components/{p-39bee235.entry.js → p-66237ac0.entry.js} +1 -1
  239. package/dist/taro-components/p-665e8461.system.entry.js +1 -0
  240. package/dist/taro-components/{p-923c6e08.entry.js → p-6965567d.entry.js} +1 -1
  241. package/dist/taro-components/{p-a34988ff.system.entry.js → p-703dfad8.system.entry.js} +1 -1
  242. package/dist/taro-components/p-7423fc3b.system.entry.js +1 -0
  243. package/dist/taro-components/{p-cb8099dd.entry.js → p-74540410.entry.js} +1 -1
  244. package/dist/taro-components/p-7721e046.entry.js +1 -0
  245. package/dist/taro-components/p-7cdad34e.system.entry.js +1 -0
  246. package/dist/taro-components/{p-1ed219a6.system.entry.js → p-7d848382.system.entry.js} +1 -1
  247. package/dist/taro-components/{p-ca67c759.entry.js → p-83dedaa2.entry.js} +1 -1
  248. package/dist/taro-components/{p-81588c19.entry.js → p-865c21b5.entry.js} +1 -1
  249. package/dist/taro-components/{p-26c08f44.entry.js → p-8a5e67cb.entry.js} +1 -1
  250. package/dist/taro-components/p-8b2bf902.system.entry.js +1 -0
  251. package/dist/taro-components/p-8bc82aaa.entry.js +1 -0
  252. package/dist/taro-components/p-8db237e0.entry.js +1 -0
  253. package/dist/taro-components/{p-5c8ba192.system.entry.js → p-8f90fca9.system.entry.js} +1 -1
  254. package/dist/taro-components/p-92e95d3f.entry.js +1 -0
  255. package/dist/taro-components/p-94502fc3.entry.js +1 -0
  256. package/dist/taro-components/{p-696f0d1c.system.js → p-94c20f60.system.js} +0 -0
  257. package/dist/taro-components/p-95529dc0.entry.js +1 -0
  258. package/dist/taro-components/{p-d8363f59.system.entry.js → p-964692f7.system.entry.js} +1 -1
  259. package/dist/taro-components/p-98b47fc9.system.entry.js +1 -0
  260. package/dist/taro-components/p-99cb65a6.system.entry.js +1 -0
  261. package/dist/taro-components/{p-9bd65170.system.entry.js → p-99ed3ed2.system.entry.js} +1 -1
  262. package/dist/taro-components/{p-ce49e2f4.system.entry.js → p-9a618935.system.entry.js} +1 -1
  263. package/dist/taro-components/p-9d0ab7c4.entry.js +1 -0
  264. package/dist/taro-components/p-9eb7dfa8.entry.js +1 -0
  265. package/dist/taro-components/{p-9e807bd6.system.entry.js → p-9fc88fc1.system.entry.js} +1 -1
  266. package/dist/taro-components/p-a1423df9.entry.js +1 -0
  267. package/dist/taro-components/{p-098f4931.system.entry.js → p-b15d0302.system.entry.js} +1 -1
  268. package/dist/taro-components/{p-93748645.system.js → p-b2d01686.system.js} +0 -0
  269. package/dist/taro-components/p-b6d6c744.entry.js +1 -0
  270. package/dist/taro-components/p-b75d8a65.entry.js +1 -0
  271. package/dist/taro-components/p-b87cf623.entry.js +1 -0
  272. package/dist/taro-components/p-b9280444.entry.js +1 -0
  273. package/dist/taro-components/{p-4462dca4.system.entry.js → p-bd3fa355.system.entry.js} +1 -1
  274. package/dist/taro-components/p-c218c298.entry.js +1 -0
  275. package/dist/taro-components/p-c362734b.entry.js +1 -0
  276. package/dist/taro-components/p-cb395e7d.entry.js +1 -0
  277. package/dist/taro-components/p-cdffee54.system.entry.js +1 -0
  278. package/dist/taro-components/{p-d52bf5f5.system.entry.js → p-cea9a198.system.entry.js} +1 -1
  279. package/dist/taro-components/p-cf55a63c.entry.js +1 -0
  280. package/dist/taro-components/{p-321aeeec.system.entry.js → p-cfbdd4e3.system.entry.js} +1 -1
  281. package/dist/taro-components/p-cfbfeee8.entry.js +1 -0
  282. package/dist/taro-components/p-d1c2481c.system.entry.js +1 -0
  283. package/dist/taro-components/p-d394a61f.system.entry.js +1 -0
  284. package/dist/taro-components/{p-7b021c48.entry.js → p-d567b95e.entry.js} +1 -1
  285. package/dist/taro-components/{p-de3a4828.entry.js → p-d5971476.entry.js} +1 -1
  286. package/dist/taro-components/p-dd34408a.entry.js +1 -0
  287. package/dist/taro-components/p-df5a19b0.system.entry.js +1 -0
  288. package/dist/taro-components/p-e03fa2d5.system.entry.js +1 -0
  289. package/dist/taro-components/{p-26d8c60a.system.entry.js → p-e0af1d0d.system.entry.js} +1 -1
  290. package/dist/taro-components/p-e27798a4.entry.js +1 -0
  291. package/dist/taro-components/p-e2f6448d.system.entry.js +1 -0
  292. package/dist/taro-components/{p-37cfef64.entry.js → p-e6298500.entry.js} +1 -1
  293. package/dist/taro-components/p-ebf5b2eb.system.entry.js +1 -0
  294. package/dist/taro-components/{p-49ae5efb.js → p-f05e1558.js} +0 -0
  295. package/dist/taro-components/{p-5e6feca6.system.entry.js → p-fb0959c1.system.entry.js} +1 -1
  296. package/dist/taro-components/{p-4168e24d.system.entry.js → p-fb2252b7.system.entry.js} +1 -1
  297. package/dist/taro-components/{p-5412a1d2.system.entry.js → p-fc4939c6.system.entry.js} +1 -1
  298. package/dist/taro-components/p-fcc1c676.system.entry.js +1 -0
  299. package/dist/taro-components/{p-9d6a7a70.system.entry.js → p-fd8312e5.system.entry.js} +1 -1
  300. package/dist/taro-components/{p-7ffcfb05.system.entry.js → p-fdd73355.system.entry.js} +1 -1
  301. package/dist/taro-components/{p-016f56cc.system.entry.js → p-fde3a009.system.entry.js} +1 -1
  302. package/dist/taro-components/{p-9e912454.system.entry.js → p-fe156231.system.entry.js} +1 -1
  303. package/dist/taro-components/{p-2b6a2449.system.entry.js → p-ffe63ce9.system.entry.js} +1 -1
  304. package/dist/taro-components/taro-components.css +1 -1
  305. package/dist/taro-components/taro-components.esm.js +1 -1
  306. package/dist/taro-components/taro-components.js +1 -1
  307. package/dist/types/components/ad/ad.d.ts +4 -0
  308. package/dist/types/components/ad-custom/ad-custom.d.ts +4 -0
  309. package/dist/types/components/editor/editor.d.ts +4 -0
  310. package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +4 -0
  311. package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +4 -0
  312. package/dist/types/components/live-player/live-player.d.ts +4 -0
  313. package/dist/types/components/live-pusher/live-pusher.d.ts +4 -0
  314. package/dist/types/components/map/map.d.ts +4 -0
  315. package/dist/types/components/match-media/match-media.d.ts +4 -0
  316. package/dist/types/components/{movable-view → movable-area}/movable-area.d.ts +0 -0
  317. package/dist/types/components/{movable-view → movable-area}/movable-view.d.ts +0 -0
  318. package/dist/types/components/navigation-bar/navigation-bar.d.ts +4 -0
  319. package/dist/types/components/official-account/official-account.d.ts +4 -0
  320. package/dist/types/components/page-container/page-container.d.ts +4 -0
  321. package/dist/types/components/page-meta/page-meta.d.ts +4 -0
  322. package/dist/types/components/{picker-view-column → picker-view}/picker-view-column.d.ts +0 -0
  323. package/dist/types/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.d.ts +0 -0
  324. package/dist/types/components/share-element/share-element.d.ts +4 -0
  325. package/dist/types/components/slot/slot.d.ts +4 -0
  326. package/dist/types/components/swiper/swiper.d.ts +1 -0
  327. package/dist/types/components/tabbar/tabbar.d.ts +1 -1
  328. package/dist/types/components/voip-room/voip-room.d.ts +4 -0
  329. package/dist/types/components.d.ts +208 -0
  330. package/dist/types/utils/index.d.ts +8 -0
  331. package/dist-h5/react/index.js +2 -1
  332. package/package.json +3 -3
  333. package/types/Ad.d.ts +6 -6
  334. package/types/AdCustom.d.ts +50 -0
  335. package/types/Button.d.ts +2 -2
  336. package/types/CoverImage.d.ts +3 -3
  337. package/types/CoverView.d.ts +3 -3
  338. package/types/Image.d.ts +8 -2
  339. package/types/KeyboardAccessory.d.ts +29 -0
  340. package/types/MovableView.d.ts +1 -1
  341. package/types/PageContainer.d.ts +115 -0
  342. package/types/ShareElement.d.ts +39 -0
  343. package/types/View.d.ts +1 -1
  344. package/types/VoipRoom.d.ts +71 -0
  345. package/types/common.d.ts +3 -8
  346. package/types/index.d.ts +72 -46
  347. package/virtual-list/react/createListComponent.js +4 -3
  348. package/dist/taro-components/p-0fb7f599.entry.js +0 -1
  349. package/dist/taro-components/p-17c0731f.entry.js +0 -1
  350. package/dist/taro-components/p-30bfacb9.system.js +0 -1
  351. package/dist/taro-components/p-33bcdee9.entry.js +0 -1
  352. package/dist/taro-components/p-3554df41.entry.js +0 -1
  353. package/dist/taro-components/p-4a2ffc1c.entry.js +0 -1
  354. package/dist/taro-components/p-4ff67760.entry.js +0 -1
  355. package/dist/taro-components/p-5d84eaf0.entry.js +0 -1
  356. package/dist/taro-components/p-69be8189.system.entry.js +0 -1
  357. package/dist/taro-components/p-6daacf48.entry.js +0 -1
  358. package/dist/taro-components/p-72f2b6f5.entry.js +0 -1
  359. package/dist/taro-components/p-76c00960.entry.js +0 -1
  360. package/dist/taro-components/p-7f3e5f09.entry.js +0 -1
  361. package/dist/taro-components/p-9767491b.entry.js +0 -1
  362. package/dist/taro-components/p-a03009b5.entry.js +0 -1
  363. package/dist/taro-components/p-a65e86b8.system.entry.js +0 -1
  364. package/dist/taro-components/p-a895db87.entry.js +0 -1
  365. package/dist/taro-components/p-b685a487.system.entry.js +0 -1
  366. package/dist/taro-components/p-ce093936.entry.js +0 -1
  367. package/dist/taro-components/p-d52009d1.system.entry.js +0 -1
  368. package/dist/taro-components/p-d6a37b93.entry.js +0 -1
  369. package/dist/taro-components/p-f6c7f07c.system.entry.js +0 -1
  370. package/dist/taro-components/p-f7b6c1a6.entry.js +0 -1
  371. package/dist/taro-components/p-f991bc7b.entry.js +0 -1
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class NavigationBar {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 NavigationBar 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-navigation-bar-core"; }
11
+ }
@@ -1,6 +1,6 @@
1
1
  import { Component, Prop, h, Host, Listen, Event } from '@stencil/core';
2
+ import Taro from '@tarojs/taro';
2
3
  import classNames from 'classnames';
3
- const Taro = require('@tarojs/taro');
4
4
  /**
5
5
  * Navigator组件参数
6
6
  * @typedef NavigatorProps
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class OfficialAccount {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 OfficialAccount 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-official-account-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class PageContainer {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 PageContainer 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-page-container-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class PageMeta {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 PageMeta 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-page-meta-core"; }
11
+ }
@@ -1,6 +1,6 @@
1
1
  import { Component, Prop, h, Host, State, Event, Watch, Element } from '@stencil/core';
2
+ import Taro from '@tarojs/taro';
2
3
  import classNames from 'classnames';
3
- const Taro = require('@tarojs/taro');
4
4
  function setTransform(nodeStyle, value) {
5
5
  nodeStyle.transform = value;
6
6
  nodeStyle.webkitTransform = value;
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class ShareElement {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 ShareElement 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-share-element-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class Slot {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 Slot 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-slot-core"; }
11
+ }
@@ -86,6 +86,11 @@ export class Swiper {
86
86
  this.swiper.loopCreate();
87
87
  }
88
88
  }, 500);
89
+ this.handleSwiperSize = debounce(() => {
90
+ if (this.swiper && !this.circular) {
91
+ this.swiper.updateSlides();
92
+ }
93
+ }, 50);
89
94
  }
90
95
  watchCurrent(newVal) {
91
96
  if (!this.isWillLoadCalled)
@@ -149,6 +154,8 @@ export class Swiper {
149
154
  this.el.removeChild = (oldChild) => {
150
155
  return newVal.removeChild(oldChild);
151
156
  };
157
+ this.el.addEventListener('DOMNodeInserted', this.handleSwiperSize);
158
+ this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSize);
152
159
  }
153
160
  watchCircular() {
154
161
  if (this.swiper) {
@@ -182,6 +189,8 @@ export class Swiper {
182
189
  }
183
190
  disconnectedCallback() {
184
191
  var _a, _b, _c, _d, _e, _f;
192
+ this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSize);
193
+ this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSize);
185
194
  (_b = (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
186
195
  (_d = (_c = this.observerFirst) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
187
196
  (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
@@ -225,7 +234,7 @@ export class Swiper {
225
234
  observerUpdate(_swiper, e) {
226
235
  const target = e.target;
227
236
  const className = target && typeof target.className === 'string' ? target.className : '';
228
- if (className.includes('taro_page') && target.style.display === 'block') {
237
+ if (className.includes('taro_page') && target.style.display !== 'none') {
229
238
  if (that.autoplay && target.contains(_swiper.$el[0])) {
230
239
  _swiper.slideTo(that.current);
231
240
  }
@@ -1,10 +1,9 @@
1
1
  import { Component, Prop, h, Host, State, Event, Element } from '@stencil/core';
2
+ import Taro from '@tarojs/taro';
2
3
  import classNames from 'classnames';
3
4
  import resolvePathname from 'resolve-pathname';
4
5
  import { splitUrl } from '../../utils';
5
6
  import { TabbarItem } from './tabbar-item';
6
- // IGNORE: 由于 @tarojs/taro 与 @tarojs/components 中存在循环依赖,暂时使用 commonjs 引用
7
- const Taro = require('@tarojs/taro');
8
7
  // const removeLeadingSlash = str => str.replace(/^\.?\//, '')
9
8
  // const removeTrailingSearch = str => str.replace(/\?[\s\S]*$/, '')
10
9
  const addLeadingSlash = str => str[0] === '/' ? str : `/${str}`;
@@ -195,8 +194,15 @@ export class Tabbar {
195
194
  throw new Error('tabBar 配置错误');
196
195
  }
197
196
  this.homePage = addLeadingSlash(this.conf.homePage);
198
- for (const key in customRoutes) {
199
- this.customRoutes.push([key, customRoutes[key]]);
197
+ for (let key in customRoutes) {
198
+ const path = customRoutes[key];
199
+ key = addLeadingSlash(key);
200
+ if (typeof path === 'string') {
201
+ this.customRoutes.push([key, addLeadingSlash(path)]);
202
+ }
203
+ else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {
204
+ this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]));
205
+ }
200
206
  }
201
207
  list.forEach(item => {
202
208
  if (item.pagePath.indexOf('/') !== 0) {
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
11
  import { Component, h, Prop, Host, Element, Listen, Method } from '@stencil/core';
3
12
  import { formatTime } from './utils';
@@ -42,32 +51,40 @@ export class VideoControl {
42
51
  this.seekFunc(this.percentage * this.duration);
43
52
  this.toggleVisibility(true);
44
53
  }
45
- async setProgressBall(percentage) {
46
- if (this.progressBallRef) {
47
- this.progressBallRef.style.left = `${percentage * 100}%`;
48
- }
54
+ setProgressBall(percentage) {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ if (this.progressBallRef) {
57
+ this.progressBallRef.style.left = `${percentage * 100}%`;
58
+ }
59
+ });
49
60
  }
50
- async toggleVisibility(nextVisible) {
51
- const visible = nextVisible === undefined ? !this.visible : nextVisible;
52
- if (visible) {
53
- this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
54
- if (this.isPlaying) {
55
- this.hideControlsTimer = setTimeout(() => {
56
- this.toggleVisibility(false);
57
- }, 2000);
61
+ toggleVisibility(nextVisible) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const visible = nextVisible === undefined ? !this.visible : nextVisible;
64
+ if (visible) {
65
+ this.hideControlsTimer && clearTimeout(this.hideControlsTimer);
66
+ if (this.isPlaying) {
67
+ this.hideControlsTimer = setTimeout(() => {
68
+ this.toggleVisibility(false);
69
+ }, 2000);
70
+ }
71
+ this.controlsRef.style.visibility = 'visible';
58
72
  }
59
- this.controlsRef.style.visibility = 'visible';
60
- }
61
- else {
62
- this.controlsRef.style.visibility = 'hidden';
63
- }
64
- this.visible = !!visible;
73
+ else {
74
+ this.controlsRef.style.visibility = 'hidden';
75
+ }
76
+ this.visible = !!visible;
77
+ });
65
78
  }
66
- async getIsDraggingProgressBall() {
67
- return this.isDraggingProgressBall;
79
+ getIsDraggingProgressBall() {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ return this.isDraggingProgressBall;
82
+ });
68
83
  }
69
- async setCurrentTime(time) {
70
- this.currentTimeRef.innerHTML = formatTime(time);
84
+ setCurrentTime(time) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ this.currentTimeRef.innerHTML = formatTime(time);
87
+ });
71
88
  }
72
89
  render() {
73
90
  const { controls, currentTime, duration, isPlaying, pauseFunc, playFunc, showPlayBtn, showProgress } = this;
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
11
  import { Component, h, Prop, State, Host, Method } from '@stencil/core';
3
12
  export class VideoDanmu {
@@ -17,47 +26,51 @@ export class VideoDanmu {
17
26
  clonedDanmu.bottom = `${Math.random() * 90 + 5}%`;
18
27
  return clonedDanmu;
19
28
  }
20
- async sendDanmu(danmuList = []) {
21
- if (Array.isArray(danmuList)) {
22
- this.list = [
23
- ...this.list,
24
- ...danmuList.map(danmu => this.ensureProperties(danmu))
25
- ];
26
- }
27
- else {
28
- const danmu = danmuList;
29
- this.list = [
30
- ...this.list,
31
- Object.assign({}, this.ensureProperties(danmu))
32
- ];
33
- }
34
- }
35
- async tick(currentTime) {
36
- this.currentTime = currentTime;
37
- if (!this.enable)
38
- return;
39
- const danmuList = this.list;
40
- /**
41
- * @todo 这个判断对拖拽进度的处理不严谨
42
- */
43
- const newDanmuList = danmuList.filter(({ time }) => {
44
- return currentTime - time < 4 && currentTime > time;
29
+ sendDanmu(danmuList = []) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ if (Array.isArray(danmuList)) {
32
+ this.list = [
33
+ ...this.list,
34
+ ...danmuList.map(danmu => this.ensureProperties(danmu))
35
+ ];
36
+ }
37
+ else {
38
+ const danmu = danmuList;
39
+ this.list = [
40
+ ...this.list,
41
+ Object.assign({}, this.ensureProperties(danmu))
42
+ ];
43
+ }
45
44
  });
46
- let shouldUpdate = false;
47
- const oldDanmuList = this.danmuList;
48
- if (newDanmuList.length !== oldDanmuList.length) {
49
- shouldUpdate = true;
50
- }
51
- else {
52
- shouldUpdate = newDanmuList.some(({ key }) => {
53
- return oldDanmuList.every((danmu) => {
54
- return key !== danmu.key;
55
- });
45
+ }
46
+ tick(currentTime) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ this.currentTime = currentTime;
49
+ if (!this.enable)
50
+ return;
51
+ const danmuList = this.list;
52
+ /**
53
+ * @todo 这个判断对拖拽进度的处理不严谨
54
+ */
55
+ const newDanmuList = danmuList.filter(({ time }) => {
56
+ return currentTime - time < 4 && currentTime > time;
56
57
  });
57
- }
58
- if (shouldUpdate) {
59
- this.danmuList = newDanmuList;
60
- }
58
+ let shouldUpdate = false;
59
+ const oldDanmuList = this.danmuList;
60
+ if (newDanmuList.length !== oldDanmuList.length) {
61
+ shouldUpdate = true;
62
+ }
63
+ else {
64
+ shouldUpdate = newDanmuList.some(({ key }) => {
65
+ return oldDanmuList.every((danmu) => {
66
+ return key !== danmu.key;
67
+ });
68
+ });
69
+ }
70
+ if (shouldUpdate) {
71
+ this.danmuList = newDanmuList;
72
+ }
73
+ });
61
74
  }
62
75
  componentDidUpdate() {
63
76
  requestAnimationFrame(() => {
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
11
  import { Component, h, Prop, State, Event, Host, Watch, Listen, Element, Method } from '@stencil/core';
3
12
  import classNames from 'classnames';
@@ -141,11 +150,11 @@ export class Video {
141
150
  this.controlsRef.toggleVisibility();
142
151
  this.onEnded.emit();
143
152
  };
144
- this.handleTimeUpdate = throttle(async (e) => {
153
+ this.handleTimeUpdate = throttle((e) => __awaiter(this, void 0, void 0, function* () {
145
154
  var _a, _b;
146
155
  this.currentTime = this.videoRef.currentTime;
147
156
  const duration = this.duration || this._duration;
148
- const isControlDragging = await this.controlsRef.getIsDraggingProgressBall();
157
+ const isControlDragging = yield this.controlsRef.getIsDraggingProgressBall();
149
158
  if (this.controls && this.showProgress) {
150
159
  if (!isControlDragging && !this.isDraggingProgress) {
151
160
  this.controlsRef.setProgressBall(this.currentTime / duration);
@@ -163,7 +172,7 @@ export class Video {
163
172
  this.handleEnded();
164
173
  }
165
174
  }
166
- }, 250);
175
+ }), 250);
167
176
  this.handleError = e => {
168
177
  var _a, _b;
169
178
  this.onError.emit({
@@ -268,29 +277,31 @@ export class Video {
268
277
  watchEnableDanmu(newVal) {
269
278
  this._enableDanmu = newVal;
270
279
  }
271
- async onDocumentTouchMove(e) {
272
- if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
273
- return;
274
- if (await this.controlsRef.getIsDraggingProgressBall())
275
- return;
276
- const gestureObj = this.analyseGesture(e);
277
- if (gestureObj.type === 'adjustVolume') {
278
- this.toastVolumeRef.style.visibility = 'visible';
279
- const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
280
- this.videoRef.volume = nextVolume;
281
- this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
282
- }
283
- else if (gestureObj.type === 'adjustProgress') {
284
- this.isDraggingProgress = true;
285
- this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
286
- if (this.controls && this.showProgress) {
287
- this.controlsRef.setProgressBall(this.nextPercentage);
288
- this.controlsRef.toggleVisibility(true);
280
+ onDocumentTouchMove(e) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined)
283
+ return;
284
+ if (yield this.controlsRef.getIsDraggingProgressBall())
285
+ return;
286
+ const gestureObj = this.analyseGesture(e);
287
+ if (gestureObj.type === 'adjustVolume') {
288
+ this.toastVolumeRef.style.visibility = 'visible';
289
+ const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY, 1), 0);
290
+ this.videoRef.volume = nextVolume;
291
+ this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`;
289
292
  }
290
- const duration = this.duration || this._duration;
291
- this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
292
- this.toastProgressRef.style.visibility = 'visible';
293
- }
293
+ else if (gestureObj.type === 'adjustProgress') {
294
+ this.isDraggingProgress = true;
295
+ this.nextPercentage = Math.max(Math.min(this.lastPercentage + gestureObj.dataX, 1), 0);
296
+ if (this.controls && this.showProgress) {
297
+ this.controlsRef.setProgressBall(this.nextPercentage);
298
+ this.controlsRef.toggleVisibility(true);
299
+ }
300
+ const duration = this.duration || this._duration;
301
+ this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`;
302
+ this.toastProgressRef.style.visibility = 'visible';
303
+ }
304
+ });
294
305
  }
295
306
  onDocumentTouchEnd() {
296
307
  var _a;
@@ -309,28 +320,40 @@ export class Video {
309
320
  this.lastTouchScreenY = undefined;
310
321
  }
311
322
  /** 播放视频 */
312
- async play() {
313
- this._play();
323
+ play() {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ this._play();
326
+ });
314
327
  }
315
328
  /** 暂停视频 */
316
- async pause() {
317
- this._pause();
329
+ pause() {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ this._pause();
332
+ });
318
333
  }
319
334
  /** 停止视频 */
320
- async stop() {
321
- this._stop();
335
+ stop() {
336
+ return __awaiter(this, void 0, void 0, function* () {
337
+ this._stop();
338
+ });
322
339
  }
323
340
  /** 跳转到指定位置 */
324
- async seek(position) {
325
- this._seek(position);
341
+ seek(position) {
342
+ return __awaiter(this, void 0, void 0, function* () {
343
+ this._seek(position);
344
+ });
326
345
  }
327
346
  /** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */
328
- async requestFullScreen() {
329
- this.toggleFullScreen(true);
347
+ requestFullScreen() {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ this.toggleFullScreen(true);
350
+ });
330
351
  }
331
352
  /** 退出全屏 */
332
- async exitFullScreen() {
333
- this.toggleFullScreen(false);
353
+ exitFullScreen() {
354
+ return __awaiter(this, void 0, void 0, function* () {
355
+ this.toggleFullScreen(false);
356
+ });
334
357
  }
335
358
  render() {
336
359
  const { src, controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, duration, _duration, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class VoipRoom {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 VoipRoom 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-voip-room-core"; }
11
+ }
@@ -1,105 +1,91 @@
1
- export function throttle (fn, threshhold, scope) {
2
- threshhold || (threshhold = 250)
3
- let last, deferTimer
1
+ export function throttle(fn, threshhold, scope) {
2
+ threshhold || (threshhold = 250);
3
+ let last, deferTimer;
4
4
  return function () {
5
- const context = scope || this
6
-
7
- const now = +new Date()
5
+ const context = scope || this;
6
+ const now = +new Date();
8
7
  // eslint-disable-next-line prefer-rest-params
9
- const args = arguments
8
+ const args = arguments;
10
9
  if (last && now < last + threshhold) {
11
- clearTimeout(deferTimer)
10
+ clearTimeout(deferTimer);
12
11
  deferTimer = setTimeout(() => {
13
- last = now
14
- fn.apply(context, args)
15
- }, threshhold)
16
- } else {
17
- last = now
18
- fn.apply(context, args)
12
+ last = now;
13
+ fn.apply(context, args);
14
+ }, threshhold);
19
15
  }
20
- }
16
+ else {
17
+ last = now;
18
+ fn.apply(context, args);
19
+ }
20
+ };
21
21
  }
22
-
23
22
  export const normalizePath = url => {
24
- let _isRelative
25
- let _leadingParents = ''
26
- let _parent, _pos
27
-
23
+ let _isRelative;
24
+ let _leadingParents = '';
25
+ let _parent, _pos;
28
26
  // handle relative paths
29
27
  if (url.charAt(0) !== '/') {
30
- _isRelative = true
31
- url = '/' + url
28
+ _isRelative = true;
29
+ url = '/' + url;
32
30
  }
33
-
34
31
  // handle relative files (as opposed to directories)
35
32
  if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {
36
- url += '/'
33
+ url += '/';
37
34
  }
38
-
39
35
  // resolve simples
40
- url = url.replace(/(\/(\.\/)+)|(\/\.$)/g, '/').replace(/\/{2,}/g, '/')
41
-
36
+ url = url.replace(/(\/(\.\/)+)|(\/\.$)/g, '/').replace(/\/{2,}/g, '/');
42
37
  // remember leading parents
43
38
  if (_isRelative) {
44
- _leadingParents = url.substring(1).match(/^(\.\.\/)+/) || ''
39
+ _leadingParents = url.substring(1).match(/^(\.\.\/)+/) || '';
45
40
  if (_leadingParents) {
46
- _leadingParents = _leadingParents[0]
41
+ _leadingParents = _leadingParents[0];
47
42
  }
48
43
  }
49
-
50
44
  // resolve parents
51
45
  while (true) {
52
- _parent = url.search(/\/\.\.(\/|$)/)
46
+ _parent = url.search(/\/\.\.(\/|$)/);
53
47
  if (_parent === -1) {
54
48
  // no more ../ to resolve
55
- break
56
- } else if (_parent === 0) {
49
+ break;
50
+ }
51
+ else if (_parent === 0) {
57
52
  // top level cannot be relative, skip it
58
- url = url.substring(3)
59
- continue
53
+ url = url.substring(3);
54
+ continue;
60
55
  }
61
-
62
- _pos = url.substring(0, _parent).lastIndexOf('/')
56
+ _pos = url.substring(0, _parent).lastIndexOf('/');
63
57
  if (_pos === -1) {
64
- _pos = _parent
58
+ _pos = _parent;
65
59
  }
66
- url = url.substring(0, _pos) + url.substring(_parent + 3)
60
+ url = url.substring(0, _pos) + url.substring(_parent + 3);
67
61
  }
68
-
69
62
  // revert to relative
70
63
  if (_isRelative) {
71
- url = _leadingParents + url.substring(1)
64
+ url = _leadingParents + url.substring(1);
72
65
  }
73
-
74
- return url
75
- }
76
-
66
+ return url;
67
+ };
77
68
  export const splitUrl = _url => {
78
- let url = _url || ''
79
- let pos
69
+ let url = _url || '';
70
+ let pos;
80
71
  const res = {
81
72
  path: null,
82
73
  query: null,
83
74
  fragment: null
84
- }
85
-
86
- pos = url.indexOf('#')
75
+ };
76
+ pos = url.indexOf('#');
87
77
  if (pos > -1) {
88
- res.fragment = url.substring(pos + 1)
89
- url = url.substring(0, pos)
78
+ res.fragment = url.substring(pos + 1);
79
+ url = url.substring(0, pos);
90
80
  }
91
-
92
- pos = url.indexOf('?')
81
+ pos = url.indexOf('?');
93
82
  if (pos > -1) {
94
- res.query = url.substring(pos + 1)
95
- url = url.substring(0, pos)
83
+ res.query = url.substring(pos + 1);
84
+ url = url.substring(0, pos);
96
85
  }
97
-
98
- res.path = url
99
-
100
- return res
101
- }
102
-
86
+ res.path = url;
87
+ return res;
88
+ };
103
89
  export const isNumber = obj => {
104
- return typeof obj === 'number'
105
- }
90
+ return typeof obj === 'number';
91
+ };