@tarojs/components 3.5.7-alpha.9 → 3.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (898) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/helper-db78e01a.js +0 -2
  3. package/dist/cjs/index-47a1959e.js +0 -2
  4. package/dist/cjs/{index-9174e0b1.js → index-7c61bee9.js} +234 -477
  5. package/dist/cjs/index-f9d21cc5.js +0 -2
  6. package/dist/cjs/index.cjs.js +0 -2
  7. package/dist/cjs/intersection-observer-dc4cfcef.js +0 -2
  8. package/dist/cjs/loader.cjs.js +3 -5
  9. package/dist/cjs/taro-ad-core.cjs.entry.js +2 -4
  10. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +2 -4
  11. package/dist/cjs/taro-audio-core.cjs.entry.js +2 -5
  12. package/dist/cjs/taro-block-core.cjs.entry.js +2 -4
  13. package/dist/cjs/taro-button-core.cjs.entry.js +2 -7
  14. package/dist/cjs/taro-camera-core.cjs.entry.js +2 -4
  15. package/dist/cjs/taro-canvas-core.cjs.entry.js +3 -6
  16. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +9 -15
  17. package/dist/cjs/taro-components.cjs.js +3 -5
  18. package/dist/cjs/taro-cover-image-core.cjs.entry.js +4 -7
  19. package/dist/cjs/taro-cover-view-core.cjs.entry.js +3 -7
  20. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +2 -4
  21. package/dist/cjs/taro-editor-core.cjs.entry.js +2 -4
  22. package/dist/cjs/taro-form-core.cjs.entry.js +39 -34
  23. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +2 -4
  24. package/dist/cjs/taro-icon-core.cjs.entry.js +2 -6
  25. package/dist/cjs/taro-image-core.cjs.entry.js +4 -7
  26. package/dist/cjs/taro-input-core.cjs.entry.js +14 -29
  27. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +2 -4
  28. package/dist/cjs/taro-label-core.cjs.entry.js +2 -5
  29. package/dist/cjs/taro-live-player-core.cjs.entry.js +2 -4
  30. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +2 -4
  31. package/dist/cjs/taro-map-core.cjs.entry.js +2 -4
  32. package/dist/cjs/taro-match-media-core.cjs.entry.js +2 -4
  33. package/dist/cjs/taro-movable-area-core.cjs.entry.js +157 -0
  34. package/dist/cjs/{taro-movable-area-core_2.cjs.entry.js → taro-movable-view-core.cjs.entry.js} +54 -169
  35. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +2 -4
  36. package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -6
  37. package/dist/cjs/taro-official-account-core.cjs.entry.js +2 -4
  38. package/dist/cjs/taro-open-data-core.cjs.entry.js +2 -4
  39. package/dist/cjs/taro-page-container-core.cjs.entry.js +2 -4
  40. package/dist/cjs/taro-page-meta-core.cjs.entry.js +2 -4
  41. package/dist/cjs/taro-picker-core_2.cjs.entry.js +15 -31
  42. package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +95 -0
  43. package/dist/cjs/{taro-picker-view-column-core_2.cjs.entry.js → taro-picker-view-core.cjs.entry.js} +6 -101
  44. package/dist/cjs/taro-progress-core.cjs.entry.js +5 -7
  45. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +8 -10
  46. package/dist/cjs/taro-radio-core_2.cjs.entry.js +9 -15
  47. package/dist/cjs/taro-rich-text-core.cjs.entry.js +2 -5
  48. package/dist/cjs/taro-root-portal-core.cjs.entry.js +2 -4
  49. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +22 -28
  50. package/dist/cjs/taro-share-element-core.cjs.entry.js +2 -4
  51. package/dist/cjs/taro-slider-core.cjs.entry.js +40 -37
  52. package/dist/cjs/taro-slot-core.cjs.entry.js +7 -4
  53. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +77 -46
  54. package/dist/cjs/taro-switch-core.cjs.entry.js +8 -12
  55. package/dist/cjs/taro-tabbar.cjs.entry.js +4 -12
  56. package/dist/cjs/taro-text-core.cjs.entry.js +2 -4
  57. package/dist/cjs/taro-textarea-core.cjs.entry.js +10 -21
  58. package/dist/cjs/taro-video-control_3.cjs.entry.js +27723 -81
  59. package/dist/cjs/taro-view-core.cjs.entry.js +3 -7
  60. package/dist/cjs/taro-voip-room-core.cjs.entry.js +2 -4
  61. package/dist/cjs/taro-web-view-core.cjs.entry.js +2 -5
  62. package/dist/collection/collection-manifest.json +4 -16
  63. package/dist/collection/components/ad/ad.js +1 -2
  64. package/dist/collection/components/ad-custom/ad-custom.js +1 -2
  65. package/dist/collection/components/audio/audio.js +190 -199
  66. package/dist/collection/components/block/block.js +2 -2
  67. package/dist/collection/components/button/button.js +217 -230
  68. package/dist/collection/components/camera/camera.js +1 -2
  69. package/dist/collection/components/canvas/canvas.js +58 -67
  70. package/dist/collection/components/checkbox/checkbox-group.js +42 -50
  71. package/dist/collection/components/checkbox/checkbox.js +162 -175
  72. package/dist/collection/components/cover-image/cover-image.js +74 -83
  73. package/dist/collection/components/cover-view/cover-view.js +118 -131
  74. package/dist/collection/components/custom-wrapper/custom-wrapper.js +2 -2
  75. package/dist/collection/components/editor/editor.js +1 -2
  76. package/dist/collection/components/form/form.js +74 -66
  77. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +1 -2
  78. package/dist/collection/components/icon/icon.js +56 -61
  79. package/dist/collection/components/image/image.js +113 -125
  80. package/dist/collection/components/input/input.js +296 -336
  81. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +1 -2
  82. package/dist/collection/components/label/label.js +22 -27
  83. package/dist/collection/components/live-player/live-player.js +1 -2
  84. package/dist/collection/components/live-pusher/live-pusher.js +1 -2
  85. package/dist/collection/components/map/map.js +1 -2
  86. package/dist/collection/components/match-media/match-media.js +1 -2
  87. package/dist/collection/components/movable-area/movable-area.js +26 -34
  88. package/dist/collection/components/movable-area/movable-view.js +424 -397
  89. package/dist/collection/components/navigation-bar/navigation-bar.js +1 -2
  90. package/dist/collection/components/navigator/navigator.js +145 -158
  91. package/dist/collection/components/official-account/official-account.js +1 -2
  92. package/dist/collection/components/open-data/open-data.js +1 -2
  93. package/dist/collection/components/page-container/page-container.js +1 -2
  94. package/dist/collection/components/page-meta/page-meta.js +1 -2
  95. package/dist/collection/components/picker/constant.js +0 -1
  96. package/dist/collection/components/picker/picker-group.js +176 -240
  97. package/dist/collection/components/picker/picker.js +257 -261
  98. package/dist/collection/components/picker/utils.js +0 -1
  99. package/dist/collection/components/picker-view/picker-view-column.js +147 -158
  100. package/dist/collection/components/picker-view/picker-view.js +159 -171
  101. package/dist/collection/components/progress/progress.js +157 -153
  102. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +114 -121
  103. package/dist/collection/components/radio/radio-group.js +43 -50
  104. package/dist/collection/components/radio/radio.js +144 -152
  105. package/dist/collection/components/rich-text/rich-text.js +23 -27
  106. package/dist/collection/components/root-portal/root-portal.js +1 -2
  107. package/dist/collection/components/scroll-view/scroll-view.js +220 -242
  108. package/dist/collection/components/share-element/share-element.js +1 -2
  109. package/dist/collection/components/slider/slider.js +283 -279
  110. package/dist/collection/components/slot/slot.js +5 -2
  111. package/dist/collection/components/swiper/swiper-item.js +21 -26
  112. package/dist/collection/components/swiper/swiper.js +391 -346
  113. package/dist/collection/components/switch/switch.js +139 -153
  114. package/dist/collection/components/tabbar/tabbar-item.js +6 -2
  115. package/dist/collection/components/tabbar/tabbar.js +70 -86
  116. package/dist/collection/components/text/text.js +30 -35
  117. package/dist/collection/components/textarea/textarea.js +227 -262
  118. package/dist/collection/components/video/utils.js +0 -1
  119. package/dist/collection/components/video/video-control.js +247 -252
  120. package/dist/collection/components/video/video-danmu.js +66 -72
  121. package/dist/collection/components/video/video.js +775 -733
  122. package/dist/collection/components/view/view.js +118 -131
  123. package/dist/collection/components/voip-room/voip-room.js +1 -2
  124. package/dist/collection/components/web-view/web-view.js +57 -68
  125. package/dist/collection/index.js +0 -1
  126. package/dist/collection/utils/helper.js +0 -1
  127. package/dist/collection/utils/index.js +0 -1
  128. package/dist/collection/utils/style.js +0 -1
  129. package/dist/collection/utils/url.js +0 -1
  130. package/dist/esm/helper-3d0ecf0f.js +0 -2
  131. package/dist/esm/index-1d8e8acd.js +0 -2
  132. package/dist/esm/{index-5d881caf.js → index-8809c729.js} +234 -477
  133. package/dist/esm/index-cad8203e.js +0 -2
  134. package/dist/esm/index.js +0 -2
  135. package/dist/esm/intersection-observer-8e4c7135.js +0 -2
  136. package/dist/esm/loader.js +3 -5
  137. package/dist/esm/polyfills/css-shim.js +1 -1
  138. package/dist/esm/taro-ad-core.entry.js +2 -4
  139. package/dist/esm/taro-ad-custom-core.entry.js +2 -4
  140. package/dist/esm/taro-audio-core.entry.js +2 -5
  141. package/dist/esm/taro-block-core.entry.js +2 -4
  142. package/dist/esm/taro-button-core.entry.js +2 -7
  143. package/dist/esm/taro-camera-core.entry.js +2 -4
  144. package/dist/esm/taro-canvas-core.entry.js +3 -6
  145. package/dist/esm/taro-checkbox-core_2.entry.js +9 -15
  146. package/dist/esm/taro-components.js +3 -5
  147. package/dist/esm/taro-cover-image-core.entry.js +4 -7
  148. package/dist/esm/taro-cover-view-core.entry.js +3 -7
  149. package/dist/esm/taro-custom-wrapper-core.entry.js +2 -4
  150. package/dist/esm/taro-editor-core.entry.js +2 -4
  151. package/dist/esm/taro-form-core.entry.js +39 -34
  152. package/dist/esm/taro-functional-page-navigator-core.entry.js +2 -4
  153. package/dist/esm/taro-icon-core.entry.js +2 -6
  154. package/dist/esm/taro-image-core.entry.js +4 -7
  155. package/dist/esm/taro-input-core.entry.js +14 -29
  156. package/dist/esm/taro-keyboard-accessory-core.entry.js +2 -4
  157. package/dist/esm/taro-label-core.entry.js +2 -5
  158. package/dist/esm/taro-live-player-core.entry.js +2 -4
  159. package/dist/esm/taro-live-pusher-core.entry.js +2 -4
  160. package/dist/esm/taro-map-core.entry.js +2 -4
  161. package/dist/esm/taro-match-media-core.entry.js +2 -4
  162. package/dist/esm/taro-movable-area-core.entry.js +153 -0
  163. package/dist/esm/{taro-movable-area-core_2.entry.js → taro-movable-view-core.entry.js} +55 -169
  164. package/dist/esm/taro-navigation-bar-core.entry.js +2 -4
  165. package/dist/esm/taro-navigator-core.entry.js +2 -6
  166. package/dist/esm/taro-official-account-core.entry.js +2 -4
  167. package/dist/esm/taro-open-data-core.entry.js +2 -4
  168. package/dist/esm/taro-page-container-core.entry.js +2 -4
  169. package/dist/esm/taro-page-meta-core.entry.js +2 -4
  170. package/dist/esm/taro-picker-core_2.entry.js +15 -31
  171. package/dist/esm/taro-picker-view-column-core.entry.js +91 -0
  172. package/dist/esm/{taro-picker-view-column-core_2.entry.js → taro-picker-view-core.entry.js} +3 -97
  173. package/dist/esm/taro-progress-core.entry.js +5 -7
  174. package/dist/esm/taro-pull-to-refresh.entry.js +8 -10
  175. package/dist/esm/taro-radio-core_2.entry.js +9 -15
  176. package/dist/esm/taro-rich-text-core.entry.js +2 -5
  177. package/dist/esm/taro-root-portal-core.entry.js +2 -4
  178. package/dist/esm/taro-scroll-view-core.entry.js +22 -28
  179. package/dist/esm/taro-share-element-core.entry.js +2 -4
  180. package/dist/esm/taro-slider-core.entry.js +40 -37
  181. package/dist/esm/taro-slot-core.entry.js +7 -4
  182. package/dist/esm/taro-swiper-core_2.entry.js +77 -46
  183. package/dist/esm/taro-switch-core.entry.js +8 -12
  184. package/dist/esm/taro-tabbar.entry.js +4 -12
  185. package/dist/esm/taro-text-core.entry.js +2 -4
  186. package/dist/esm/taro-textarea-core.entry.js +10 -21
  187. package/dist/esm/taro-video-control_3.entry.js +27717 -75
  188. package/dist/esm/taro-view-core.entry.js +3 -7
  189. package/dist/esm/taro-voip-room-core.entry.js +2 -4
  190. package/dist/esm/taro-web-view-core.entry.js +2 -5
  191. package/dist/esm-es5/helper-3d0ecf0f.js +1 -2
  192. package/dist/esm-es5/index-1d8e8acd.js +1 -2
  193. package/dist/esm-es5/index-8809c729.js +1 -0
  194. package/dist/esm-es5/index-cad8203e.js +1 -2
  195. package/dist/esm-es5/index.js +0 -2
  196. package/dist/esm-es5/intersection-observer-8e4c7135.js +1 -2
  197. package/dist/esm-es5/loader.js +1 -2
  198. package/dist/esm-es5/taro-ad-core.entry.js +1 -2
  199. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -2
  200. package/dist/esm-es5/taro-audio-core.entry.js +1 -2
  201. package/dist/esm-es5/taro-block-core.entry.js +1 -2
  202. package/dist/esm-es5/taro-button-core.entry.js +1 -2
  203. package/dist/esm-es5/taro-camera-core.entry.js +1 -2
  204. package/dist/esm-es5/taro-canvas-core.entry.js +1 -2
  205. package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -2
  206. package/dist/esm-es5/taro-components.js +1 -2
  207. package/dist/esm-es5/taro-cover-image-core.entry.js +1 -2
  208. package/dist/esm-es5/taro-cover-view-core.entry.js +1 -2
  209. package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -2
  210. package/dist/esm-es5/taro-editor-core.entry.js +1 -2
  211. package/dist/esm-es5/taro-form-core.entry.js +1 -2
  212. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -2
  213. package/dist/esm-es5/taro-icon-core.entry.js +1 -2
  214. package/dist/esm-es5/taro-image-core.entry.js +1 -2
  215. package/dist/esm-es5/taro-input-core.entry.js +1 -2
  216. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -2
  217. package/dist/esm-es5/taro-label-core.entry.js +1 -2
  218. package/dist/esm-es5/taro-live-player-core.entry.js +1 -2
  219. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -2
  220. package/dist/esm-es5/taro-map-core.entry.js +1 -2
  221. package/dist/esm-es5/taro-match-media-core.entry.js +1 -2
  222. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -0
  223. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -0
  224. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -2
  225. package/dist/esm-es5/taro-navigator-core.entry.js +1 -2
  226. package/dist/esm-es5/taro-official-account-core.entry.js +1 -2
  227. package/dist/esm-es5/taro-open-data-core.entry.js +1 -2
  228. package/dist/esm-es5/taro-page-container-core.entry.js +1 -2
  229. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -2
  230. package/dist/esm-es5/taro-picker-core_2.entry.js +1 -2
  231. package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -0
  232. package/dist/esm-es5/taro-picker-view-core.entry.js +1 -0
  233. package/dist/esm-es5/taro-progress-core.entry.js +1 -2
  234. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -2
  235. package/dist/esm-es5/taro-radio-core_2.entry.js +1 -2
  236. package/dist/esm-es5/taro-rich-text-core.entry.js +1 -2
  237. package/dist/esm-es5/taro-root-portal-core.entry.js +1 -2
  238. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -2
  239. package/dist/esm-es5/taro-share-element-core.entry.js +1 -2
  240. package/dist/esm-es5/taro-slider-core.entry.js +1 -2
  241. package/dist/esm-es5/taro-slot-core.entry.js +1 -2
  242. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -2
  243. package/dist/esm-es5/taro-switch-core.entry.js +1 -2
  244. package/dist/esm-es5/taro-tabbar.entry.js +1 -2
  245. package/dist/esm-es5/taro-text-core.entry.js +1 -2
  246. package/dist/esm-es5/taro-textarea-core.entry.js +1 -2
  247. package/dist/esm-es5/taro-video-control_3.entry.js +365 -2
  248. package/dist/esm-es5/taro-view-core.entry.js +1 -2
  249. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -2
  250. package/dist/esm-es5/taro-web-view-core.entry.js +1 -2
  251. package/dist/taro-components/index.esm.js +0 -2
  252. package/dist/taro-components/p-028e2728.entry.js +1 -0
  253. package/dist/taro-components/p-0380841f.system.js +1 -0
  254. package/dist/taro-components/p-059912fd.js +1 -0
  255. package/dist/taro-components/p-06178a0c.entry.js +1 -0
  256. package/dist/taro-components/{p-dcfb7d97.system.entry.js → p-06b9d39c.system.entry.js} +1 -2
  257. package/dist/taro-components/p-06e6864b.system.entry.js +1 -0
  258. package/dist/taro-components/{p-8a3620a6.system.entry.js → p-07294134.system.entry.js} +1 -2
  259. package/dist/taro-components/{p-9f1ca602.system.entry.js → p-075458e5.system.entry.js} +1 -2
  260. package/dist/taro-components/p-10c47df8.system.entry.js +1 -0
  261. package/dist/taro-components/p-15e45ed6.system.js +1 -2
  262. package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
  263. package/dist/taro-components/p-25df0ce9.entry.js +1 -0
  264. package/dist/taro-components/p-27126803.system.entry.js +1 -0
  265. package/dist/taro-components/p-275d883f.system.entry.js +1 -0
  266. package/dist/taro-components/p-27c80869.system.entry.js +1 -0
  267. package/dist/taro-components/p-2ec47545.entry.js +1 -0
  268. package/dist/taro-components/p-3255f11f.system.entry.js +1 -0
  269. package/dist/taro-components/p-34178401.entry.js +1 -0
  270. package/dist/taro-components/p-3549b6d2.entry.js +1 -0
  271. package/dist/taro-components/p-362998cf.entry.js +1 -0
  272. package/dist/taro-components/p-3b1d2d37.system.js +1 -2
  273. package/dist/taro-components/p-3c6090fd.entry.js +1 -0
  274. package/dist/taro-components/{p-301a8b85.system.entry.js → p-3e11c8cc.system.entry.js} +1 -2
  275. package/dist/taro-components/p-4262d1b6.entry.js +1 -0
  276. package/dist/taro-components/p-42630f45.entry.js +1 -0
  277. package/dist/taro-components/p-44398c17.system.entry.js +1 -0
  278. package/dist/taro-components/p-44cbb351.system.js +1 -0
  279. package/dist/taro-components/p-4ada10aa.entry.js +1 -0
  280. package/dist/taro-components/{p-1743a04b.system.js → p-4c1a7cae.system.entry.js} +27 -28
  281. package/dist/taro-components/p-4cf436f9.entry.js +1 -0
  282. package/dist/taro-components/p-4d826fb7.entry.js +1 -0
  283. package/dist/taro-components/p-50ea2036.system.js +1 -2
  284. package/dist/taro-components/p-55266a1f.entry.js +1 -0
  285. package/dist/taro-components/p-56c86512.entry.js +1 -0
  286. package/dist/taro-components/p-5733124c.entry.js +1 -0
  287. package/dist/taro-components/p-5746d7ce.js +1 -2
  288. package/dist/taro-components/p-57a2a441.entry.js +1 -0
  289. package/dist/taro-components/p-59d93770.entry.js +1 -0
  290. package/dist/taro-components/p-5a2305e7.entry.js +1 -0
  291. package/dist/taro-components/p-5a374cb9.entry.js +1 -0
  292. package/dist/taro-components/p-5c87902f.system.entry.js +1 -0
  293. package/dist/taro-components/p-5e223bab.system.entry.js +1 -0
  294. package/dist/taro-components/p-5f18259d.system.entry.js +1 -0
  295. package/dist/taro-components/p-61f225ef.system.js +1 -2
  296. package/dist/taro-components/p-62fc514e.entry.js +1 -0
  297. package/dist/taro-components/p-64447f5a.system.entry.js +1 -0
  298. package/dist/taro-components/p-663d1bb9.system.js +1 -2
  299. package/dist/taro-components/p-67222d90.system.entry.js +1 -0
  300. package/dist/taro-components/{p-4b27df71.system.entry.js → p-692d986d.system.entry.js} +1 -2
  301. package/dist/taro-components/p-6a96da58.js +1 -2
  302. package/dist/taro-components/p-6aa557f0.entry.js +1 -0
  303. package/dist/taro-components/{p-580a72d1.system.entry.js → p-6ad59489.system.entry.js} +1 -2
  304. package/dist/taro-components/p-72f327e1.js +1 -2
  305. package/dist/taro-components/p-72f858e4.entry.js +1 -0
  306. package/dist/taro-components/{p-c4cf58af.system.entry.js → p-733cc64a.system.entry.js} +1 -2
  307. package/dist/taro-components/p-7374537f.entry.js +1 -0
  308. package/dist/taro-components/p-7407013d.entry.js +1 -0
  309. package/dist/taro-components/p-76724e58.js +2 -3
  310. package/dist/taro-components/p-7d329ab0.entry.js +1 -0
  311. package/dist/taro-components/{p-8bec95d4.system.entry.js → p-7e960ac3.system.entry.js} +1 -2
  312. package/dist/taro-components/p-82661d45.system.entry.js +1 -0
  313. package/dist/taro-components/p-8475421b.system.entry.js +1 -0
  314. package/dist/taro-components/p-8788dc46.system.entry.js +1 -0
  315. package/dist/taro-components/p-886571e5.entry.js +1 -0
  316. package/dist/taro-components/p-888fac99.entry.js +1 -0
  317. package/dist/taro-components/p-8aea3de3.entry.js +1 -0
  318. package/dist/taro-components/p-8c8be53b.entry.js +1 -0
  319. package/dist/taro-components/p-8cf86f31.system.entry.js +1 -0
  320. package/dist/taro-components/{p-f0d0160d.system.entry.js → p-8e2b048e.system.entry.js} +1 -2
  321. package/dist/taro-components/p-9234cc1d.entry.js +1 -0
  322. package/dist/taro-components/p-92699438.entry.js +1 -0
  323. package/dist/taro-components/{p-59418be7.system.entry.js → p-93eed5d7.system.entry.js} +1 -2
  324. package/dist/taro-components/p-99d17a1a.entry.js +365 -0
  325. package/dist/taro-components/p-9a0e70b1.entry.js +1 -0
  326. package/dist/taro-components/p-9afbb423.system.entry.js +1 -0
  327. package/dist/taro-components/p-9b39a940.entry.js +1 -0
  328. package/dist/taro-components/{p-1cd1c507.system.entry.js → p-a5496bf5.system.entry.js} +1 -2
  329. package/dist/taro-components/{p-439a3349.system.entry.js → p-a63fbc50.system.entry.js} +1 -2
  330. package/dist/taro-components/p-ab1256fe.entry.js +1 -0
  331. package/dist/taro-components/p-ad6ad7e3.system.entry.js +1 -0
  332. package/dist/taro-components/p-afbcd093.entry.js +1 -0
  333. package/dist/taro-components/{p-c5c331bf.system.entry.js → p-b11aaf69.system.entry.js} +1 -2
  334. package/dist/taro-components/p-b1ae9401.entry.js +1 -0
  335. package/dist/taro-components/p-b2800ccd.entry.js +1 -0
  336. package/dist/taro-components/p-b3b677fc.entry.js +1 -0
  337. package/dist/taro-components/p-b3d961f9.system.entry.js +1 -0
  338. package/dist/taro-components/p-b60820b4.entry.js +1 -0
  339. package/dist/taro-components/p-b7639674.entry.js +1 -0
  340. package/dist/taro-components/{p-c0e3c822.system.entry.js → p-b7681c76.system.entry.js} +1 -2
  341. package/dist/taro-components/p-b7ac0b7f.system.entry.js +1 -0
  342. package/dist/taro-components/p-b9903f15.system.entry.js +1 -0
  343. package/dist/taro-components/p-bd706d39.entry.js +1 -0
  344. package/dist/taro-components/{p-21b77a13.system.entry.js → p-c5fd5c7f.system.entry.js} +1 -2
  345. package/dist/taro-components/p-c92bafb6.system.entry.js +1 -0
  346. package/dist/taro-components/{p-b04a56bd.system.entry.js → p-c93bb915.system.entry.js} +1 -2
  347. package/dist/taro-components/p-cf048af9.entry.js +1 -0
  348. package/dist/taro-components/{p-45b6ea0c.system.entry.js → p-d075934f.system.entry.js} +1 -2
  349. package/dist/taro-components/{p-a6f2dc54.system.entry.js → p-d4da725f.system.entry.js} +1 -2
  350. package/dist/taro-components/p-d5f3080c.entry.js +1 -0
  351. package/dist/taro-components/{p-b500c116.system.entry.js → p-d6662ab3.system.entry.js} +1 -2
  352. package/dist/taro-components/p-df3b544a.system.entry.js +1 -0
  353. package/dist/taro-components/p-dff55efd.entry.js +1 -0
  354. package/dist/taro-components/{p-8c8fe164.system.entry.js → p-e671c8c5.system.entry.js} +1 -2
  355. package/dist/taro-components/p-eec00033.entry.js +1 -0
  356. package/dist/taro-components/p-eeed74e3.system.entry.js +1 -0
  357. package/dist/taro-components/p-ef006b23.entry.js +1 -0
  358. package/dist/taro-components/{p-f2c75971.system.entry.js → p-f2803c2e.system.entry.js} +1 -2
  359. package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
  360. package/dist/taro-components/{p-701b0286.system.entry.js → p-f4ea8a56.system.entry.js} +1 -2
  361. package/dist/taro-components/p-f5f1c3b7.system.entry.js +1 -0
  362. package/dist/taro-components/{p-4fbb8b4c.system.entry.js → p-f7c80795.system.entry.js} +1 -2
  363. package/dist/taro-components/p-fa2a9bab.entry.js +1 -0
  364. package/dist/taro-components/{p-cbe2436d.system.entry.js → p-fc9f4fd7.system.entry.js} +1 -2
  365. package/dist/taro-components/p-fec6ac36.entry.js +1 -0
  366. package/dist/taro-components/p-ff84986d.entry.js +1 -0
  367. package/dist/taro-components/p-ffefd74f.entry.js +1 -0
  368. package/dist/taro-components/taro-components.esm.js +1 -2
  369. package/dist/taro-components/taro-components.js +1 -2
  370. package/dist/types/components/checkbox/checkbox.d.ts +2 -2
  371. package/dist/types/components/cover-image/cover-image.d.ts +1 -1
  372. package/dist/types/components/form/form.d.ts +7 -4
  373. package/dist/types/components/image/image.d.ts +1 -1
  374. package/dist/types/components/input/input.d.ts +3 -4
  375. package/dist/types/components/movable-area/movable-view.d.ts +3 -3
  376. package/dist/types/components/progress/progress.d.ts +1 -1
  377. package/dist/types/components/radio/radio.d.ts +2 -2
  378. package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
  379. package/dist/types/components/slider/slider.d.ts +4 -3
  380. package/dist/types/components/slot/slot.d.ts +1 -0
  381. package/dist/types/components/swiper/swiper.d.ts +4 -0
  382. package/dist/types/components/textarea/textarea.d.ts +0 -1
  383. package/dist/types/components/video/utils.d.ts +1 -1
  384. package/dist/types/components.d.ts +78 -183
  385. package/dist/types/stencil-public-runtime.d.ts +4 -20
  386. package/{dist/react/component-lib → dist-h5/react/components}/index.js +1 -1
  387. package/{dist/react/component-lib → dist-h5/react/components}/input.js +5 -5
  388. package/{dist → dist-h5}/react/index.js +0 -0
  389. package/{dist/react/component-lib → dist-h5/react/utils}/reactify-wc.js +20 -10
  390. package/{dist/vue2/component-lib → dist-h5/vue/components}/icon.js +2 -2
  391. package/{dist/vue2/component-lib → dist-h5/vue/components}/image.js +2 -2
  392. package/{dist/vue2/component-lib/components.js → dist-h5/vue/components/index.js} +0 -0
  393. package/{dist/vue2/component-lib → dist-h5/vue/components}/picker.js +2 -2
  394. package/{dist/vue2/component-lib → dist-h5/vue/components}/scroll-view.js +2 -2
  395. package/{dist/vue2/component-lib → dist-h5/vue/components}/text.js +2 -2
  396. package/{dist/vue2/component-lib → dist-h5/vue}/createComponent.js +0 -0
  397. package/{dist/vue2/component-lib → dist-h5/vue}/createFormsComponent.js +0 -0
  398. package/{dist/vue2/component-lib → dist-h5/vue}/index.js +3 -4
  399. package/{dist/vue2/component-lib → dist-h5/vue}/mixins/listeners.js +0 -0
  400. package/{dist/vue2/component-lib → dist-h5/vue}/mixins/refs.js +0 -0
  401. package/{dist/vue3/component-lib → dist-h5/vue3/components}/icon.js +2 -2
  402. package/{dist/vue3/component-lib → dist-h5/vue3/components}/image.js +2 -2
  403. package/{dist/vue3/component-lib → dist-h5/vue3/components}/index.js +2 -2
  404. package/{dist/vue3/component-lib → dist-h5/vue3/components}/scroll-view.js +2 -2
  405. package/{dist/vue3/component-lib → dist-h5/vue3/components}/text.js +2 -2
  406. package/{dist/vue3/component-lib → dist-h5/vue3}/createComponent.js +1 -1
  407. package/{dist/vue3/component-lib → dist-h5/vue3}/createFormsComponent.js +0 -0
  408. package/{dist/vue3/component-lib → dist-h5/vue3}/forwardRef.js +0 -0
  409. package/{dist → dist-h5}/vue3/index.js +0 -0
  410. package/loader/package.json +0 -1
  411. package/package.json +28 -25
  412. package/types/AnimationVideo.d.ts +62 -0
  413. package/types/AnimationView.d.ts +45 -0
  414. package/types/ArCamera.d.ts +50 -0
  415. package/types/AwemeData.d.ts +43 -0
  416. package/types/CommentDetail.d.ts +72 -0
  417. package/types/CommentList.d.ts +128 -0
  418. package/types/ContactButton.d.ts +53 -0
  419. package/types/FollowSwan.d.ts +28 -0
  420. package/types/InlinePaymentPanel.d.ts +58 -0
  421. package/types/Input.d.ts +3 -3
  422. package/types/Lifestyle.d.ts +26 -0
  423. package/types/Like.d.ts +107 -0
  424. package/types/Login.d.ts +45 -0
  425. package/types/Lottie.d.ts +113 -0
  426. package/types/Map.d.ts +1 -1
  427. package/types/NativeSlot.d.ts +32 -0
  428. package/types/RtcRoom.d.ts +104 -0
  429. package/types/RtcRoomItem.d.ts +26 -0
  430. package/types/Slot.d.ts +1 -1
  431. package/types/Swiper.d.ts +12 -0
  432. package/types/TabItem.d.ts +35 -0
  433. package/types/Tabs.d.ts +58 -0
  434. package/types/Video.d.ts +1 -3
  435. package/types/View.d.ts +7 -6
  436. package/types/VoipRoom.d.ts +1 -1
  437. package/types/index.vue3.d.ts +267 -259
  438. package/dist/cjs/helper-db78e01a.js.map +0 -1
  439. package/dist/cjs/hls-67cbc62d.js +0 -27624
  440. package/dist/cjs/hls-67cbc62d.js.map +0 -1
  441. package/dist/cjs/index-47a1959e.js.map +0 -1
  442. package/dist/cjs/index-9174e0b1.js.map +0 -1
  443. package/dist/cjs/index-f9d21cc5.js.map +0 -1
  444. package/dist/cjs/index.cjs.js.map +0 -1
  445. package/dist/cjs/intersection-observer-dc4cfcef.js.map +0 -1
  446. package/dist/cjs/loader.cjs.js.map +0 -1
  447. package/dist/cjs/taro-ad-core.cjs.entry.js.map +0 -1
  448. package/dist/cjs/taro-ad-custom-core.cjs.entry.js.map +0 -1
  449. package/dist/cjs/taro-audio-core.cjs.entry.js.map +0 -1
  450. package/dist/cjs/taro-block-core.cjs.entry.js.map +0 -1
  451. package/dist/cjs/taro-button-core.cjs.entry.js.map +0 -1
  452. package/dist/cjs/taro-camera-core.cjs.entry.js.map +0 -1
  453. package/dist/cjs/taro-canvas-core.cjs.entry.js.map +0 -1
  454. package/dist/cjs/taro-checkbox-core_2.cjs.entry.js.map +0 -1
  455. package/dist/cjs/taro-components.cjs.js.map +0 -1
  456. package/dist/cjs/taro-cover-image-core.cjs.entry.js.map +0 -1
  457. package/dist/cjs/taro-cover-view-core.cjs.entry.js.map +0 -1
  458. package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js.map +0 -1
  459. package/dist/cjs/taro-editor-core.cjs.entry.js.map +0 -1
  460. package/dist/cjs/taro-form-core.cjs.entry.js.map +0 -1
  461. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js.map +0 -1
  462. package/dist/cjs/taro-icon-core.cjs.entry.js.map +0 -1
  463. package/dist/cjs/taro-image-core.cjs.entry.js.map +0 -1
  464. package/dist/cjs/taro-input-core.cjs.entry.js.map +0 -1
  465. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js.map +0 -1
  466. package/dist/cjs/taro-label-core.cjs.entry.js.map +0 -1
  467. package/dist/cjs/taro-live-player-core.cjs.entry.js.map +0 -1
  468. package/dist/cjs/taro-live-pusher-core.cjs.entry.js.map +0 -1
  469. package/dist/cjs/taro-map-core.cjs.entry.js.map +0 -1
  470. package/dist/cjs/taro-match-media-core.cjs.entry.js.map +0 -1
  471. package/dist/cjs/taro-movable-area-core_2.cjs.entry.js.map +0 -1
  472. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js.map +0 -1
  473. package/dist/cjs/taro-navigator-core.cjs.entry.js.map +0 -1
  474. package/dist/cjs/taro-official-account-core.cjs.entry.js.map +0 -1
  475. package/dist/cjs/taro-open-data-core.cjs.entry.js.map +0 -1
  476. package/dist/cjs/taro-page-container-core.cjs.entry.js.map +0 -1
  477. package/dist/cjs/taro-page-meta-core.cjs.entry.js.map +0 -1
  478. package/dist/cjs/taro-picker-core_2.cjs.entry.js.map +0 -1
  479. package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js.map +0 -1
  480. package/dist/cjs/taro-progress-core.cjs.entry.js.map +0 -1
  481. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js.map +0 -1
  482. package/dist/cjs/taro-radio-core_2.cjs.entry.js.map +0 -1
  483. package/dist/cjs/taro-rich-text-core.cjs.entry.js.map +0 -1
  484. package/dist/cjs/taro-root-portal-core.cjs.entry.js.map +0 -1
  485. package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +0 -1
  486. package/dist/cjs/taro-share-element-core.cjs.entry.js.map +0 -1
  487. package/dist/cjs/taro-slider-core.cjs.entry.js.map +0 -1
  488. package/dist/cjs/taro-slot-core.cjs.entry.js.map +0 -1
  489. package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +0 -1
  490. package/dist/cjs/taro-switch-core.cjs.entry.js.map +0 -1
  491. package/dist/cjs/taro-tabbar.cjs.entry.js.map +0 -1
  492. package/dist/cjs/taro-text-core.cjs.entry.js.map +0 -1
  493. package/dist/cjs/taro-textarea-core.cjs.entry.js.map +0 -1
  494. package/dist/cjs/taro-video-control_3.cjs.entry.js.map +0 -1
  495. package/dist/cjs/taro-view-core.cjs.entry.js.map +0 -1
  496. package/dist/cjs/taro-voip-room-core.cjs.entry.js.map +0 -1
  497. package/dist/cjs/taro-web-view-core.cjs.entry.js.map +0 -1
  498. package/dist/collection/components/ad/ad.js.map +0 -1
  499. package/dist/collection/components/ad-custom/ad-custom.js.map +0 -1
  500. package/dist/collection/components/audio/audio.js.map +0 -1
  501. package/dist/collection/components/block/block.js.map +0 -1
  502. package/dist/collection/components/button/button.js.map +0 -1
  503. package/dist/collection/components/camera/camera.js.map +0 -1
  504. package/dist/collection/components/canvas/canvas.js.map +0 -1
  505. package/dist/collection/components/checkbox/checkbox-group.js.map +0 -1
  506. package/dist/collection/components/checkbox/checkbox.js.map +0 -1
  507. package/dist/collection/components/cover-image/cover-image.js.map +0 -1
  508. package/dist/collection/components/cover-view/cover-view.js.map +0 -1
  509. package/dist/collection/components/custom-wrapper/custom-wrapper.js.map +0 -1
  510. package/dist/collection/components/editor/editor.js.map +0 -1
  511. package/dist/collection/components/form/form.js.map +0 -1
  512. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js.map +0 -1
  513. package/dist/collection/components/icon/icon.js.map +0 -1
  514. package/dist/collection/components/image/image.js.map +0 -1
  515. package/dist/collection/components/input/input.js.map +0 -1
  516. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js.map +0 -1
  517. package/dist/collection/components/label/label.js.map +0 -1
  518. package/dist/collection/components/live-player/live-player.js.map +0 -1
  519. package/dist/collection/components/live-pusher/live-pusher.js.map +0 -1
  520. package/dist/collection/components/map/map.js.map +0 -1
  521. package/dist/collection/components/match-media/match-media.js.map +0 -1
  522. package/dist/collection/components/movable-area/movable-area.js.map +0 -1
  523. package/dist/collection/components/movable-area/movable-view.js.map +0 -1
  524. package/dist/collection/components/navigation-bar/navigation-bar.js.map +0 -1
  525. package/dist/collection/components/navigator/navigator.js.map +0 -1
  526. package/dist/collection/components/official-account/official-account.js.map +0 -1
  527. package/dist/collection/components/open-data/open-data.js.map +0 -1
  528. package/dist/collection/components/page-container/page-container.js.map +0 -1
  529. package/dist/collection/components/page-meta/page-meta.js.map +0 -1
  530. package/dist/collection/components/picker/constant.js.map +0 -1
  531. package/dist/collection/components/picker/picker-group.js.map +0 -1
  532. package/dist/collection/components/picker/picker.js.map +0 -1
  533. package/dist/collection/components/picker/utils.js.map +0 -1
  534. package/dist/collection/components/picker-view/picker-view-column.js.map +0 -1
  535. package/dist/collection/components/picker-view/picker-view.js.map +0 -1
  536. package/dist/collection/components/progress/progress.js.map +0 -1
  537. package/dist/collection/components/pull-to-refresh/pull-to-refresh.js.map +0 -1
  538. package/dist/collection/components/radio/radio-group.js.map +0 -1
  539. package/dist/collection/components/radio/radio.js.map +0 -1
  540. package/dist/collection/components/rich-text/rich-text.js.map +0 -1
  541. package/dist/collection/components/root-portal/root-portal.js.map +0 -1
  542. package/dist/collection/components/scroll-view/scroll-view.js.map +0 -1
  543. package/dist/collection/components/share-element/share-element.js.map +0 -1
  544. package/dist/collection/components/slider/slider.js.map +0 -1
  545. package/dist/collection/components/slot/slot.js.map +0 -1
  546. package/dist/collection/components/swiper/swiper-item.js.map +0 -1
  547. package/dist/collection/components/swiper/swiper.js.map +0 -1
  548. package/dist/collection/components/switch/switch.js.map +0 -1
  549. package/dist/collection/components/tabbar/tabbar-item.js.map +0 -1
  550. package/dist/collection/components/tabbar/tabbar.js.map +0 -1
  551. package/dist/collection/components/text/text.js.map +0 -1
  552. package/dist/collection/components/textarea/textarea.js.map +0 -1
  553. package/dist/collection/components/video/utils.js.map +0 -1
  554. package/dist/collection/components/video/video-control.js.map +0 -1
  555. package/dist/collection/components/video/video-danmu.js.map +0 -1
  556. package/dist/collection/components/video/video.js.map +0 -1
  557. package/dist/collection/components/view/view.js.map +0 -1
  558. package/dist/collection/components/voip-room/voip-room.js.map +0 -1
  559. package/dist/collection/components/web-view/web-view.js.map +0 -1
  560. package/dist/collection/index.js.map +0 -1
  561. package/dist/collection/utils/helper.js.map +0 -1
  562. package/dist/collection/utils/index.js.map +0 -1
  563. package/dist/collection/utils/style.js.map +0 -1
  564. package/dist/collection/utils/url.js.map +0 -1
  565. package/dist/esm/helper-3d0ecf0f.js.map +0 -1
  566. package/dist/esm/hls-221423a1.js +0 -27622
  567. package/dist/esm/hls-221423a1.js.map +0 -1
  568. package/dist/esm/index-1d8e8acd.js.map +0 -1
  569. package/dist/esm/index-5d881caf.js.map +0 -1
  570. package/dist/esm/index-cad8203e.js.map +0 -1
  571. package/dist/esm/index.js.map +0 -1
  572. package/dist/esm/intersection-observer-8e4c7135.js.map +0 -1
  573. package/dist/esm/loader.js.map +0 -1
  574. package/dist/esm/taro-ad-core.entry.js.map +0 -1
  575. package/dist/esm/taro-ad-custom-core.entry.js.map +0 -1
  576. package/dist/esm/taro-audio-core.entry.js.map +0 -1
  577. package/dist/esm/taro-block-core.entry.js.map +0 -1
  578. package/dist/esm/taro-button-core.entry.js.map +0 -1
  579. package/dist/esm/taro-camera-core.entry.js.map +0 -1
  580. package/dist/esm/taro-canvas-core.entry.js.map +0 -1
  581. package/dist/esm/taro-checkbox-core_2.entry.js.map +0 -1
  582. package/dist/esm/taro-components.js.map +0 -1
  583. package/dist/esm/taro-cover-image-core.entry.js.map +0 -1
  584. package/dist/esm/taro-cover-view-core.entry.js.map +0 -1
  585. package/dist/esm/taro-custom-wrapper-core.entry.js.map +0 -1
  586. package/dist/esm/taro-editor-core.entry.js.map +0 -1
  587. package/dist/esm/taro-form-core.entry.js.map +0 -1
  588. package/dist/esm/taro-functional-page-navigator-core.entry.js.map +0 -1
  589. package/dist/esm/taro-icon-core.entry.js.map +0 -1
  590. package/dist/esm/taro-image-core.entry.js.map +0 -1
  591. package/dist/esm/taro-input-core.entry.js.map +0 -1
  592. package/dist/esm/taro-keyboard-accessory-core.entry.js.map +0 -1
  593. package/dist/esm/taro-label-core.entry.js.map +0 -1
  594. package/dist/esm/taro-live-player-core.entry.js.map +0 -1
  595. package/dist/esm/taro-live-pusher-core.entry.js.map +0 -1
  596. package/dist/esm/taro-map-core.entry.js.map +0 -1
  597. package/dist/esm/taro-match-media-core.entry.js.map +0 -1
  598. package/dist/esm/taro-movable-area-core_2.entry.js.map +0 -1
  599. package/dist/esm/taro-navigation-bar-core.entry.js.map +0 -1
  600. package/dist/esm/taro-navigator-core.entry.js.map +0 -1
  601. package/dist/esm/taro-official-account-core.entry.js.map +0 -1
  602. package/dist/esm/taro-open-data-core.entry.js.map +0 -1
  603. package/dist/esm/taro-page-container-core.entry.js.map +0 -1
  604. package/dist/esm/taro-page-meta-core.entry.js.map +0 -1
  605. package/dist/esm/taro-picker-core_2.entry.js.map +0 -1
  606. package/dist/esm/taro-picker-view-column-core_2.entry.js.map +0 -1
  607. package/dist/esm/taro-progress-core.entry.js.map +0 -1
  608. package/dist/esm/taro-pull-to-refresh.entry.js.map +0 -1
  609. package/dist/esm/taro-radio-core_2.entry.js.map +0 -1
  610. package/dist/esm/taro-rich-text-core.entry.js.map +0 -1
  611. package/dist/esm/taro-root-portal-core.entry.js.map +0 -1
  612. package/dist/esm/taro-scroll-view-core.entry.js.map +0 -1
  613. package/dist/esm/taro-share-element-core.entry.js.map +0 -1
  614. package/dist/esm/taro-slider-core.entry.js.map +0 -1
  615. package/dist/esm/taro-slot-core.entry.js.map +0 -1
  616. package/dist/esm/taro-swiper-core_2.entry.js.map +0 -1
  617. package/dist/esm/taro-switch-core.entry.js.map +0 -1
  618. package/dist/esm/taro-tabbar.entry.js.map +0 -1
  619. package/dist/esm/taro-text-core.entry.js.map +0 -1
  620. package/dist/esm/taro-textarea-core.entry.js.map +0 -1
  621. package/dist/esm/taro-video-control_3.entry.js.map +0 -1
  622. package/dist/esm/taro-view-core.entry.js.map +0 -1
  623. package/dist/esm/taro-voip-room-core.entry.js.map +0 -1
  624. package/dist/esm/taro-web-view-core.entry.js.map +0 -1
  625. package/dist/esm-es5/helper-3d0ecf0f.js.map +0 -1
  626. package/dist/esm-es5/hls-221423a1.js +0 -366
  627. package/dist/esm-es5/hls-221423a1.js.map +0 -1
  628. package/dist/esm-es5/index-1d8e8acd.js.map +0 -1
  629. package/dist/esm-es5/index-5d881caf.js +0 -3
  630. package/dist/esm-es5/index-5d881caf.js.map +0 -1
  631. package/dist/esm-es5/index-cad8203e.js.map +0 -1
  632. package/dist/esm-es5/index.js.map +0 -1
  633. package/dist/esm-es5/intersection-observer-8e4c7135.js.map +0 -1
  634. package/dist/esm-es5/loader.js.map +0 -1
  635. package/dist/esm-es5/taro-ad-core.entry.js.map +0 -1
  636. package/dist/esm-es5/taro-ad-custom-core.entry.js.map +0 -1
  637. package/dist/esm-es5/taro-audio-core.entry.js.map +0 -1
  638. package/dist/esm-es5/taro-block-core.entry.js.map +0 -1
  639. package/dist/esm-es5/taro-button-core.entry.js.map +0 -1
  640. package/dist/esm-es5/taro-camera-core.entry.js.map +0 -1
  641. package/dist/esm-es5/taro-canvas-core.entry.js.map +0 -1
  642. package/dist/esm-es5/taro-checkbox-core_2.entry.js.map +0 -1
  643. package/dist/esm-es5/taro-components.js.map +0 -1
  644. package/dist/esm-es5/taro-cover-image-core.entry.js.map +0 -1
  645. package/dist/esm-es5/taro-cover-view-core.entry.js.map +0 -1
  646. package/dist/esm-es5/taro-custom-wrapper-core.entry.js.map +0 -1
  647. package/dist/esm-es5/taro-editor-core.entry.js.map +0 -1
  648. package/dist/esm-es5/taro-form-core.entry.js.map +0 -1
  649. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js.map +0 -1
  650. package/dist/esm-es5/taro-icon-core.entry.js.map +0 -1
  651. package/dist/esm-es5/taro-image-core.entry.js.map +0 -1
  652. package/dist/esm-es5/taro-input-core.entry.js.map +0 -1
  653. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js.map +0 -1
  654. package/dist/esm-es5/taro-label-core.entry.js.map +0 -1
  655. package/dist/esm-es5/taro-live-player-core.entry.js.map +0 -1
  656. package/dist/esm-es5/taro-live-pusher-core.entry.js.map +0 -1
  657. package/dist/esm-es5/taro-map-core.entry.js.map +0 -1
  658. package/dist/esm-es5/taro-match-media-core.entry.js.map +0 -1
  659. package/dist/esm-es5/taro-movable-area-core_2.entry.js +0 -2
  660. package/dist/esm-es5/taro-movable-area-core_2.entry.js.map +0 -1
  661. package/dist/esm-es5/taro-navigation-bar-core.entry.js.map +0 -1
  662. package/dist/esm-es5/taro-navigator-core.entry.js.map +0 -1
  663. package/dist/esm-es5/taro-official-account-core.entry.js.map +0 -1
  664. package/dist/esm-es5/taro-open-data-core.entry.js.map +0 -1
  665. package/dist/esm-es5/taro-page-container-core.entry.js.map +0 -1
  666. package/dist/esm-es5/taro-page-meta-core.entry.js.map +0 -1
  667. package/dist/esm-es5/taro-picker-core_2.entry.js.map +0 -1
  668. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +0 -2
  669. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js.map +0 -1
  670. package/dist/esm-es5/taro-progress-core.entry.js.map +0 -1
  671. package/dist/esm-es5/taro-pull-to-refresh.entry.js.map +0 -1
  672. package/dist/esm-es5/taro-radio-core_2.entry.js.map +0 -1
  673. package/dist/esm-es5/taro-rich-text-core.entry.js.map +0 -1
  674. package/dist/esm-es5/taro-root-portal-core.entry.js.map +0 -1
  675. package/dist/esm-es5/taro-scroll-view-core.entry.js.map +0 -1
  676. package/dist/esm-es5/taro-share-element-core.entry.js.map +0 -1
  677. package/dist/esm-es5/taro-slider-core.entry.js.map +0 -1
  678. package/dist/esm-es5/taro-slot-core.entry.js.map +0 -1
  679. package/dist/esm-es5/taro-swiper-core_2.entry.js.map +0 -1
  680. package/dist/esm-es5/taro-switch-core.entry.js.map +0 -1
  681. package/dist/esm-es5/taro-tabbar.entry.js.map +0 -1
  682. package/dist/esm-es5/taro-text-core.entry.js.map +0 -1
  683. package/dist/esm-es5/taro-textarea-core.entry.js.map +0 -1
  684. package/dist/esm-es5/taro-video-control_3.entry.js.map +0 -1
  685. package/dist/esm-es5/taro-view-core.entry.js.map +0 -1
  686. package/dist/esm-es5/taro-voip-room-core.entry.js.map +0 -1
  687. package/dist/esm-es5/taro-web-view-core.entry.js.map +0 -1
  688. package/dist/react/components.js +0 -65
  689. package/dist/react/helper.js +0 -13
  690. package/dist/react/react-component-lib/createComponent.js +0 -126
  691. package/dist/react/react-component-lib/createOverlayComponent.js +0 -208
  692. package/dist/react/react-component-lib/index.js +0 -2
  693. package/dist/react/react-component-lib/interfaces.js +0 -1
  694. package/dist/react/react-component-lib/utils/attachProps.js +0 -107
  695. package/dist/react/react-component-lib/utils/case.js +0 -10
  696. package/dist/react/react-component-lib/utils/dev.js +0 -12
  697. package/dist/react/react-component-lib/utils/index.js +0 -35
  698. package/dist/taro-components/index.esm.js.map +0 -1
  699. package/dist/taro-components/p-001ef419.system.entry.js +0 -2
  700. package/dist/taro-components/p-001ef419.system.entry.js.map +0 -1
  701. package/dist/taro-components/p-01dc54a5.entry.js +0 -2
  702. package/dist/taro-components/p-01dc54a5.entry.js.map +0 -1
  703. package/dist/taro-components/p-0382d7d0.system.entry.js +0 -2
  704. package/dist/taro-components/p-0382d7d0.system.entry.js.map +0 -1
  705. package/dist/taro-components/p-0a896bc7.entry.js +0 -2
  706. package/dist/taro-components/p-0a896bc7.entry.js.map +0 -1
  707. package/dist/taro-components/p-0b38e6c7.system.entry.js +0 -2
  708. package/dist/taro-components/p-0b38e6c7.system.entry.js.map +0 -1
  709. package/dist/taro-components/p-0d36ef6b.entry.js +0 -2
  710. package/dist/taro-components/p-0d36ef6b.entry.js.map +0 -1
  711. package/dist/taro-components/p-0ee6a068.entry.js +0 -2
  712. package/dist/taro-components/p-0ee6a068.entry.js.map +0 -1
  713. package/dist/taro-components/p-12e4b019.entry.js +0 -2
  714. package/dist/taro-components/p-12e4b019.entry.js.map +0 -1
  715. package/dist/taro-components/p-15dced71.system.entry.js +0 -2
  716. package/dist/taro-components/p-15dced71.system.entry.js.map +0 -1
  717. package/dist/taro-components/p-15e45ed6.system.js.map +0 -1
  718. package/dist/taro-components/p-1743a04b.system.js.map +0 -1
  719. package/dist/taro-components/p-17657dca.entry.js +0 -2
  720. package/dist/taro-components/p-17657dca.entry.js.map +0 -1
  721. package/dist/taro-components/p-1b2556e2.system.entry.js +0 -2
  722. package/dist/taro-components/p-1b2556e2.system.entry.js.map +0 -1
  723. package/dist/taro-components/p-1b64d2a2.entry.js +0 -2
  724. package/dist/taro-components/p-1b64d2a2.entry.js.map +0 -1
  725. package/dist/taro-components/p-1bd3d09b.system.entry.js +0 -2
  726. package/dist/taro-components/p-1bd3d09b.system.entry.js.map +0 -1
  727. package/dist/taro-components/p-1cb76199.entry.js +0 -2
  728. package/dist/taro-components/p-1cb76199.entry.js.map +0 -1
  729. package/dist/taro-components/p-1cd1c507.system.entry.js.map +0 -1
  730. package/dist/taro-components/p-1e436d5b.entry.js +0 -2
  731. package/dist/taro-components/p-1e436d5b.entry.js.map +0 -1
  732. package/dist/taro-components/p-2096bc5f.entry.js +0 -2
  733. package/dist/taro-components/p-2096bc5f.entry.js.map +0 -1
  734. package/dist/taro-components/p-20ec6387.entry.js +0 -2
  735. package/dist/taro-components/p-20ec6387.entry.js.map +0 -1
  736. package/dist/taro-components/p-21b77a13.system.entry.js.map +0 -1
  737. package/dist/taro-components/p-2243a376.entry.js +0 -2
  738. package/dist/taro-components/p-2243a376.entry.js.map +0 -1
  739. package/dist/taro-components/p-29f04296.entry.js +0 -2
  740. package/dist/taro-components/p-29f04296.entry.js.map +0 -1
  741. package/dist/taro-components/p-301a8b85.system.entry.js.map +0 -1
  742. package/dist/taro-components/p-3b1d2d37.system.js.map +0 -1
  743. package/dist/taro-components/p-3b9a1125.entry.js +0 -2
  744. package/dist/taro-components/p-3b9a1125.entry.js.map +0 -1
  745. package/dist/taro-components/p-3c256e0e.entry.js +0 -2
  746. package/dist/taro-components/p-3c256e0e.entry.js.map +0 -1
  747. package/dist/taro-components/p-3e6b29c6.entry.js +0 -2
  748. package/dist/taro-components/p-3e6b29c6.entry.js.map +0 -1
  749. package/dist/taro-components/p-427a2872.entry.js +0 -2
  750. package/dist/taro-components/p-427a2872.entry.js.map +0 -1
  751. package/dist/taro-components/p-439a3349.system.entry.js.map +0 -1
  752. package/dist/taro-components/p-447386b2.system.entry.js +0 -2
  753. package/dist/taro-components/p-447386b2.system.entry.js.map +0 -1
  754. package/dist/taro-components/p-45b6ea0c.system.entry.js.map +0 -1
  755. package/dist/taro-components/p-49a6cae4.system.entry.js +0 -2
  756. package/dist/taro-components/p-49a6cae4.system.entry.js.map +0 -1
  757. package/dist/taro-components/p-4b05e003.entry.js +0 -2
  758. package/dist/taro-components/p-4b05e003.entry.js.map +0 -1
  759. package/dist/taro-components/p-4b27df71.system.entry.js.map +0 -1
  760. package/dist/taro-components/p-4b71c926.entry.js +0 -2
  761. package/dist/taro-components/p-4b71c926.entry.js.map +0 -1
  762. package/dist/taro-components/p-4fbb8b4c.system.entry.js.map +0 -1
  763. package/dist/taro-components/p-50ea2036.system.js.map +0 -1
  764. package/dist/taro-components/p-55519002.entry.js +0 -2
  765. package/dist/taro-components/p-55519002.entry.js.map +0 -1
  766. package/dist/taro-components/p-570222e2.entry.js +0 -2
  767. package/dist/taro-components/p-570222e2.entry.js.map +0 -1
  768. package/dist/taro-components/p-5746d7ce.js.map +0 -1
  769. package/dist/taro-components/p-580a72d1.system.entry.js.map +0 -1
  770. package/dist/taro-components/p-59418be7.system.entry.js.map +0 -1
  771. package/dist/taro-components/p-59e02aca.system.entry.js +0 -2
  772. package/dist/taro-components/p-59e02aca.system.entry.js.map +0 -1
  773. package/dist/taro-components/p-5b552407.entry.js +0 -2
  774. package/dist/taro-components/p-5b552407.entry.js.map +0 -1
  775. package/dist/taro-components/p-5bfefd19.js +0 -3
  776. package/dist/taro-components/p-5bfefd19.js.map +0 -1
  777. package/dist/taro-components/p-61f225ef.system.js.map +0 -1
  778. package/dist/taro-components/p-663d1bb9.system.js.map +0 -1
  779. package/dist/taro-components/p-6a96da58.js.map +0 -1
  780. package/dist/taro-components/p-6af8be19.entry.js +0 -2
  781. package/dist/taro-components/p-6af8be19.entry.js.map +0 -1
  782. package/dist/taro-components/p-6ea2995b.entry.js +0 -2
  783. package/dist/taro-components/p-6ea2995b.entry.js.map +0 -1
  784. package/dist/taro-components/p-6f8af69f.entry.js +0 -2
  785. package/dist/taro-components/p-6f8af69f.entry.js.map +0 -1
  786. package/dist/taro-components/p-701b0286.system.entry.js.map +0 -1
  787. package/dist/taro-components/p-72f327e1.js.map +0 -1
  788. package/dist/taro-components/p-72f626ab.system.entry.js +0 -2
  789. package/dist/taro-components/p-72f626ab.system.entry.js.map +0 -1
  790. package/dist/taro-components/p-755be847.system.entry.js +0 -2
  791. package/dist/taro-components/p-755be847.system.entry.js.map +0 -1
  792. package/dist/taro-components/p-76724e58.js.map +0 -1
  793. package/dist/taro-components/p-8231e748.entry.js +0 -2
  794. package/dist/taro-components/p-8231e748.entry.js.map +0 -1
  795. package/dist/taro-components/p-8a3620a6.system.entry.js.map +0 -1
  796. package/dist/taro-components/p-8a8f286f.system.js +0 -3
  797. package/dist/taro-components/p-8a8f286f.system.js.map +0 -1
  798. package/dist/taro-components/p-8bec95d4.system.entry.js.map +0 -1
  799. package/dist/taro-components/p-8c8fe164.system.entry.js.map +0 -1
  800. package/dist/taro-components/p-93cc7adc.entry.js +0 -2
  801. package/dist/taro-components/p-93cc7adc.entry.js.map +0 -1
  802. package/dist/taro-components/p-96a784f1.entry.js +0 -2
  803. package/dist/taro-components/p-96a784f1.entry.js.map +0 -1
  804. package/dist/taro-components/p-99bbe34a.system.entry.js +0 -2
  805. package/dist/taro-components/p-99bbe34a.system.entry.js.map +0 -1
  806. package/dist/taro-components/p-9e20c25c.entry.js +0 -2
  807. package/dist/taro-components/p-9e20c25c.entry.js.map +0 -1
  808. package/dist/taro-components/p-9f1ca602.system.entry.js.map +0 -1
  809. package/dist/taro-components/p-a1ace8c7.system.entry.js +0 -2
  810. package/dist/taro-components/p-a1ace8c7.system.entry.js.map +0 -1
  811. package/dist/taro-components/p-a29509fa.system.entry.js +0 -2
  812. package/dist/taro-components/p-a29509fa.system.entry.js.map +0 -1
  813. package/dist/taro-components/p-a2aab820.entry.js +0 -2
  814. package/dist/taro-components/p-a2aab820.entry.js.map +0 -1
  815. package/dist/taro-components/p-a6f2dc54.system.entry.js.map +0 -1
  816. package/dist/taro-components/p-ab105c26.entry.js +0 -2
  817. package/dist/taro-components/p-ab105c26.entry.js.map +0 -1
  818. package/dist/taro-components/p-b04a56bd.system.entry.js.map +0 -1
  819. package/dist/taro-components/p-b10cb428.entry.js +0 -2
  820. package/dist/taro-components/p-b10cb428.entry.js.map +0 -1
  821. package/dist/taro-components/p-b4ec48c3.entry.js +0 -2
  822. package/dist/taro-components/p-b4ec48c3.entry.js.map +0 -1
  823. package/dist/taro-components/p-b500c116.system.entry.js.map +0 -1
  824. package/dist/taro-components/p-b832f4e8.entry.js +0 -2
  825. package/dist/taro-components/p-b832f4e8.entry.js.map +0 -1
  826. package/dist/taro-components/p-b88a55b4.system.entry.js +0 -2
  827. package/dist/taro-components/p-b88a55b4.system.entry.js.map +0 -1
  828. package/dist/taro-components/p-b90926cc.entry.js +0 -2
  829. package/dist/taro-components/p-b90926cc.entry.js.map +0 -1
  830. package/dist/taro-components/p-ba743573.entry.js +0 -2
  831. package/dist/taro-components/p-ba743573.entry.js.map +0 -1
  832. package/dist/taro-components/p-be3f5ac0.entry.js +0 -2
  833. package/dist/taro-components/p-be3f5ac0.entry.js.map +0 -1
  834. package/dist/taro-components/p-beea63a7.entry.js +0 -2
  835. package/dist/taro-components/p-beea63a7.entry.js.map +0 -1
  836. package/dist/taro-components/p-c0e3c822.system.entry.js.map +0 -1
  837. package/dist/taro-components/p-c3acf0ea.system.entry.js +0 -2
  838. package/dist/taro-components/p-c3acf0ea.system.entry.js.map +0 -1
  839. package/dist/taro-components/p-c3bb8fa6.entry.js +0 -2
  840. package/dist/taro-components/p-c3bb8fa6.entry.js.map +0 -1
  841. package/dist/taro-components/p-c4cf58af.system.entry.js.map +0 -1
  842. package/dist/taro-components/p-c5c331bf.system.entry.js.map +0 -1
  843. package/dist/taro-components/p-cb17d8bd.system.js +0 -2
  844. package/dist/taro-components/p-cb17d8bd.system.js.map +0 -1
  845. package/dist/taro-components/p-cbe2436d.system.entry.js.map +0 -1
  846. package/dist/taro-components/p-cd6a7eea.entry.js +0 -2
  847. package/dist/taro-components/p-cd6a7eea.entry.js.map +0 -1
  848. package/dist/taro-components/p-d4b6f19e.system.entry.js +0 -2
  849. package/dist/taro-components/p-d4b6f19e.system.entry.js.map +0 -1
  850. package/dist/taro-components/p-d5234e7e.js +0 -366
  851. package/dist/taro-components/p-d5234e7e.js.map +0 -1
  852. package/dist/taro-components/p-d5579efa.system.entry.js +0 -2
  853. package/dist/taro-components/p-d5579efa.system.entry.js.map +0 -1
  854. package/dist/taro-components/p-d619f198.system.entry.js +0 -2
  855. package/dist/taro-components/p-d619f198.system.entry.js.map +0 -1
  856. package/dist/taro-components/p-d7ab3e23.system.entry.js +0 -2
  857. package/dist/taro-components/p-d7ab3e23.system.entry.js.map +0 -1
  858. package/dist/taro-components/p-d7f4b10f.entry.js +0 -2
  859. package/dist/taro-components/p-d7f4b10f.entry.js.map +0 -1
  860. package/dist/taro-components/p-d85b216d.entry.js +0 -2
  861. package/dist/taro-components/p-d85b216d.entry.js.map +0 -1
  862. package/dist/taro-components/p-dcb48fd9.system.entry.js +0 -2
  863. package/dist/taro-components/p-dcb48fd9.system.entry.js.map +0 -1
  864. package/dist/taro-components/p-dcfb7d97.system.entry.js.map +0 -1
  865. package/dist/taro-components/p-de762042.entry.js +0 -2
  866. package/dist/taro-components/p-de762042.entry.js.map +0 -1
  867. package/dist/taro-components/p-df862d0c.entry.js +0 -2
  868. package/dist/taro-components/p-df862d0c.entry.js.map +0 -1
  869. package/dist/taro-components/p-e0d6b00b.entry.js +0 -2
  870. package/dist/taro-components/p-e0d6b00b.entry.js.map +0 -1
  871. package/dist/taro-components/p-e4f1cc50.entry.js +0 -2
  872. package/dist/taro-components/p-e4f1cc50.entry.js.map +0 -1
  873. package/dist/taro-components/p-e59f999e.entry.js +0 -2
  874. package/dist/taro-components/p-e59f999e.entry.js.map +0 -1
  875. package/dist/taro-components/p-e7239faa.system.entry.js +0 -2
  876. package/dist/taro-components/p-e7239faa.system.entry.js.map +0 -1
  877. package/dist/taro-components/p-e7965c55.system.entry.js +0 -2
  878. package/dist/taro-components/p-e7965c55.system.entry.js.map +0 -1
  879. package/dist/taro-components/p-e98c07c3.system.entry.js +0 -2
  880. package/dist/taro-components/p-e98c07c3.system.entry.js.map +0 -1
  881. package/dist/taro-components/p-e9abe3e2.entry.js +0 -2
  882. package/dist/taro-components/p-e9abe3e2.entry.js.map +0 -1
  883. package/dist/taro-components/p-eddd00e9.system.entry.js +0 -2
  884. package/dist/taro-components/p-eddd00e9.system.entry.js.map +0 -1
  885. package/dist/taro-components/p-ef029c30.system.entry.js +0 -2
  886. package/dist/taro-components/p-ef029c30.system.entry.js.map +0 -1
  887. package/dist/taro-components/p-f0d0160d.system.entry.js.map +0 -1
  888. package/dist/taro-components/p-f120c272.entry.js +0 -2
  889. package/dist/taro-components/p-f120c272.entry.js.map +0 -1
  890. package/dist/taro-components/p-f2c75971.system.entry.js.map +0 -1
  891. package/dist/taro-components/p-ffc44634.entry.js +0 -2
  892. package/dist/taro-components/p-ffc44634.entry.js.map +0 -1
  893. package/dist/taro-components/taro-components.esm.js.map +0 -1
  894. package/dist/vue2/components.js +0 -490
  895. package/dist/vue2/index.js +0 -26
  896. package/dist/vue2/vue-component-lib/utils.js +0 -45
  897. package/dist/vue3/components.js +0 -64
  898. package/dist/vue3/vue-component-lib/utils.js +0 -201
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/switch/style/index.scss?tag=taro-switch-core","src/components/switch/switch.tsx"],"names":["indexCss","Switch","this","switchChange","e","stopPropagation","value","target","checked","_this","isChecked","onChange","emit","prototype","function","newVal","oldVal","isWillLoadCalled","componentWillLoad","componentDidLoad","Object","defineProperty","el","get","configurable","render","_a","type","color","name","disabled","nativeProps","style","borderColor","backgroundColor","h","assign","class","concat"],"mappings":"0FAAA,IAAMA,SAAW,uICMJC,OAAM,wGAoCjBC,KAAAC,aAAe,SAAAC,GACbA,EAAEC,kBACF,IAAMC,EAAQF,EAAEG,OAAOC,QACvBC,EAAKC,UAAYJ,EACjBG,EAAKE,SAASC,KAAK,CACjBN,MAAKA,eAxCM,sBACG,iBACF,4CAEG,uBACG,kDAGM,MAK5BL,EAAAY,UAAAC,SAAA,SAAUC,EAAiBC,GACzB,IAAKd,KAAKe,iBAAkB,OAC5B,GAAIF,IAAWC,EAAQd,KAAKQ,UAAYK,GAQ1Cd,EAAAY,UAAAK,kBAAA,WACEhB,KAAKe,iBAAmB,KACxBf,KAAKQ,UAAYR,KAAKM,SAGxBP,EAAAY,UAAAM,iBAAA,WAAA,IAAAV,EAAAP,KACEkB,OAAOC,eAAenB,KAAKoB,GAAI,QAAS,CACtCC,IAAK,WAAM,OAAAd,EAAKC,WAChBc,aAAc,QAalBvB,EAAAY,UAAAY,OAAA,WACQ,IAAAC,EAOFxB,KANFyB,EAAID,EAAAC,KACJC,EAAKF,EAAAE,MACLlB,EAASgB,EAAAhB,UACTmB,EAAIH,EAAAG,KACJC,EAAQJ,EAAAI,SACRC,EAAWL,EAAAK,YAGb,IAAMC,EAAQtB,EACV,CACAuB,YAAaL,GAAS,SACtBM,gBAAiBN,GAAS,UAE1B,GAEJ,OACEO,EAAA,QAAAf,OAAAgB,OAAA,CACET,KAAK,WACLU,MAAO,QAAAC,OAAQX,GACfK,MAAOA,EACPxB,QAASE,EACTmB,KAAMA,EACNC,SAAUA,EACVnB,SAAUT,KAAKC,cACX4B,yPAvEO","sourcesContent":["taro-switch-core {\n display: inline-block;\n width: 52px;\n height: 32px;\n\n .weui-switch {\n display: block;\n width: 100%;\n height: 100%;\n }\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Watch, Element } from '@stencil/core'\n\n@Component({\n tag: 'taro-switch-core',\n styleUrl: './style/index.scss'\n})\nexport class Switch implements ComponentInterface {\n @Prop() type = 'switch'\n @Prop() checked = false\n @Prop() color = '#04BE02'\n @Prop() name: string\n @Prop() disabled = false\n @Prop() nativeProps = {}\n\n @State() isChecked: boolean\n @State() isWillLoadCalled = false\n\n @Element() el: HTMLElement\n\n @Watch('checked')\n function (newVal: boolean, oldVal: boolean) {\n if (!this.isWillLoadCalled) return\n if (newVal !== oldVal) this.isChecked = newVal\n }\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n this.isChecked = this.checked\n }\n\n componentDidLoad () {\n Object.defineProperty(this.el, 'value', {\n get: () => this.isChecked,\n configurable: true\n })\n }\n\n switchChange = e => {\n e.stopPropagation()\n const value = e.target.checked\n this.isChecked = value\n this.onChange.emit({\n value\n })\n }\n\n render () {\n const {\n type,\n color,\n isChecked,\n name,\n disabled,\n nativeProps\n } = this\n\n const style = isChecked\n ? {\n borderColor: color || '04BE02',\n backgroundColor: color || '04BE02'\n }\n : {}\n\n return (\n <input\n type='checkbox'\n class={`weui-${type}`}\n style={style}\n checked={isChecked}\n name={name}\n disabled={disabled}\n onChange={this.switchChange}\n {...nativeProps}\n />\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/utils/url.ts","../taro-router/dist/utils/index.js","../../node_modules/.pnpm/registry.npmjs.org+resolve-pathname@3.0.0/node_modules/resolve-pathname/esm/resolve-pathname.js","src/components/tabbar/tabbar-item.tsx","src/components/tabbar/style/index.scss?tag=taro-tabbar","src/components/tabbar/tabbar.tsx"],"names":["splitUrl","_url","url","pos","res","path","query","fragment","indexOf","substring","addLeadingSlash","charAt","hasBasename","prefix","RegExp","test","stripBasename","length","stripSuffix","suffix","includes","isAbsolute","pathname","spliceOne","list","index","i","k","n","pop","resolvePathname","to","from","undefined","toParts","split","fromParts","isToAbs","isFromAbs","mustEndAbs","concat","hasTrailingSlash","last","up","part","unshift","result","join","substr","TabbarItem","_b","_c","isSelected","textColor","iconPath","badgeText","_d","showRedDot","text","onSelect","className","classNames","weui-bar__item_on","badgeStyle","position","top","right","dotStyle","onClick","h","key","href","class","style","display","src","alt","color","indexCss","STATUS_SHOW","STATUS_HIDE","STATUS_SLIDEOUT","basicTabBarClassName","hideTabBarClassName","hideTabBarWithAnimationClassName","Tabbar","hostRef","_this","this","homePage","customRoutes","tabbarPos","getOriginUrl","customRoute","filter","customUrl","pathA","pathB","getSelectedIndex","foundIndex","forEach","idx","pagePath","switchTab","selectedIndex","Taro","switchTabHandler","successHandler","errorHandler","currentUrl","getCurrentUrl","nextTab","errMsg","routerChangeHandler","options","_a","toLocation","currentPage","routerBasename","conf","basename","setTabBarBadgeHandler","__spreadArray","removeTabBarBadgeHandler","showTabBarRedDotHandler","hideTabBarRedDotHandler","showTabBarHandler","status","hideTabBarHandler","animation","setTabBarStyleHandler","selectedColor","backgroundColor","borderStyle","setTabBarItemHandler","selectedIconPath","Object","prototype","toString","call","Error","this_1","push","apply","map","p","item","routerMode","mode","window","location","hashIndex","processedUrl","decodeURI","bindEvent","eventCenter","on","removeEvent","off","componentDidLoad","tabbar","nextElementSibling","disconnectedCallback","render","containerCls","shouldHideTabBar","shouldSlideout","Host","height","bind"],"mappings":"saAsDO,IAAMA,SAAW,SAAAC,GACtB,IAAIC,EAAMD,GAAQ,GAClB,IAAIE,EACJ,IAAMC,EAAM,CACVC,KAAM,KACNC,MAAO,KACPC,SAAU,MAGZJ,EAAMD,EAAIM,QAAQ,KAClB,GAAIL,GAAO,EAAG,CACZC,EAAIG,SAAWL,EAAIO,UAAUN,EAAM,GACnCD,EAAMA,EAAIO,UAAU,EAAGN,GAGzBA,EAAMD,EAAIM,QAAQ,KAClB,GAAIL,GAAO,EAAG,CACZC,EAAIE,MAAQJ,EAAIO,UAAUN,EAAM,GAChCD,EAAMA,EAAIO,UAAU,EAAGN,GAGzBC,EAAIC,KAAOH,EAEX,OAAOE,GC3EF,IAAMM,gBAAkB,SAACR,GAAA,GAAAA,SAAA,EAAA,CAAAA,EAAA,GAAQ,OAAMA,EAAIS,OAAO,KAAO,IAAMT,EAAM,IAAMA,GAC3E,IAAMU,YAAc,SAACP,EAAWQ,GAAX,GAAAR,SA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AAG0C,qBAAoB,KAAA1C,OAAImD,IAAWxC,EAAA,GACpCA,EAACgC,qBAAsBkF,EACvBlH,EAACiC,kCAAmCkF,OAExCjG,EAAA,MAAA,CACEG,MAAO4F,EACP3F,MAAO,CACL2D,gBAAiB5C,KAAK4C,iBAAmB,GACzCoC,OAAQ,YAGThF,KAAKhE,KAAKwH,KAAI,SAACE,EAAMzH,GACpB,IAAM2B,EAAamC,EAAKiB,gBAAkB/E,EAC1C,IAAI4B,EACJ,IAAIC,EACJ,GAAIF,EAAY,CACdC,EAAYkC,EAAK4C,eAAiB,GAClC7E,EAAW4F,EAAKX,qBACX,CACLlF,EAAYkC,EAAKV,OAAS,GAC1BvB,EAAW4F,EAAK5F,SAElB,OACEe,EAACpB,WAAU,CACTxB,MAAOA,EACPkC,SAAU4B,EAAKgB,UAAUkE,KAAKlF,GAC9BnC,WAAYA,EACZC,UAAWA,EACXC,SAAUA,EACVI,KAAMwF,EAAKxF,KACXH,UAAW2F,EAAK3F,UAChBE,WAAYyF,EAAKzF,qJAzUd","sourcesContent":["export const normalizePath = url => {\n let _isRelative\n let _leadingParents = ''\n let _parent, _pos\n\n // handle relative paths\n if (url.charAt(0) !== '/') {\n _isRelative = true\n url = '/' + url\n }\n\n // handle relative files (as opposed to directories)\n if (url.substring(-3) === '/..' || url.slice(-2) === '/.') {\n url += '/'\n }\n\n // resolve simples\n url = url.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g, '/').replace(/\\/{2,}/g, '/')\n\n // remember leading parents\n if (_isRelative) {\n _leadingParents = url.substring(1).match(/^(\\.\\.\\/)+/) || ''\n if (_leadingParents) {\n _leadingParents = _leadingParents[0]\n }\n }\n\n // resolve parents\n while (true) {\n _parent = url.search(/\\/\\.\\.(\\/|$)/)\n if (_parent === -1) {\n // no more ../ to resolve\n break\n } else if (_parent === 0) {\n // top level cannot be relative, skip it\n url = url.substring(3)\n continue\n }\n\n _pos = url.substring(0, _parent).lastIndexOf('/')\n if (_pos === -1) {\n _pos = _parent\n }\n url = url.substring(0, _pos) + url.substring(_parent + 3)\n }\n\n // revert to relative\n if (_isRelative) {\n url = _leadingParents + url.substring(1)\n }\n\n return url\n}\n\nexport const splitUrl = _url => {\n let url = _url || ''\n let pos\n const res = {\n path: null,\n query: null,\n fragment: null\n }\n\n pos = url.indexOf('#')\n if (pos > -1) {\n res.fragment = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n pos = url.indexOf('?')\n if (pos > -1) {\n res.query = url.substring(pos + 1)\n url = url.substring(0, pos)\n }\n\n res.path = url\n\n return res\n}\n","// export const removeLeadingSlash = (str = '') => str.replace(/^\\.?\\//, '')\n// export const removeTrailingSearch = (str = '') => str.replace(/\\?[\\s\\S]*$/, '')\nexport const addLeadingSlash = (url = '') => (url.charAt(0) === '/' ? url : '/' + url);\nexport const hasBasename = (path = '', prefix = '') => new RegExp('^' + prefix + '(\\\\/|\\\\?|#|$)', 'i').test(path) || path === prefix;\nexport const stripBasename = (path = '', prefix = '') => hasBasename(path, prefix) ? path.substring(prefix.length) : path;\nexport const stripTrailing = (str = '') => str.replace(/[?#][\\s\\S]*$/, '');\nexport const stripSuffix = (path = '', suffix = '') => path.includes(suffix) ? path.substring(0, path.length - suffix.length) : path;\nclass RoutesAlias {\n constructor() {\n this.conf = [];\n this.getConfig = (url = '') => {\n const customRoute = this.conf.filter((arr) => {\n return arr.includes(url);\n });\n return customRoute[0];\n };\n this.getOrigin = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[0]) || url;\n };\n this.getAlias = (url = '') => {\n var _a;\n return ((_a = this.getConfig(url)) === null || _a === void 0 ? void 0 : _a[1]) || url;\n };\n this.getAll = (url = '') => {\n return this.conf\n .filter((arr) => arr.includes(url))\n .reduceRight((p, a) => {\n p.unshift(a[1]);\n return p;\n }, []);\n };\n }\n set(customRoutes = {}) {\n for (let key in customRoutes) {\n const path = customRoutes[key];\n key = addLeadingSlash(key);\n if (typeof path === 'string') {\n this.conf.push([key, addLeadingSlash(path)]);\n }\n else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {\n this.conf.push(...path.map(p => [key, addLeadingSlash(p)]));\n }\n }\n }\n}\nexport const routesAlias = new RoutesAlias();\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","import classNames from 'classnames'\nimport { FunctionalComponent, h } from '@stencil/core'\n\ntype TabbarItemProps = {\n index: number\n isSelected?: boolean\n textColor?: string\n badgeText?: string\n iconPath: string\n showRedDot?: boolean\n text?: string\n onSelect: (index: number) => void\n}\n\nexport const TabbarItem: FunctionalComponent<TabbarItemProps> = ({\n index,\n isSelected = false,\n textColor,\n iconPath,\n badgeText,\n showRedDot = false,\n text,\n onSelect\n}) => {\n const className = classNames('weui-tabbar__item', {\n 'weui-bar__item_on': isSelected\n })\n const badgeStyle = {\n position: 'absolute',\n top: '-2px',\n right: '-13px'\n }\n const dotStyle = {\n position: 'absolute',\n top: '0',\n right: '-6px'\n }\n\n function onClick () {\n onSelect(index)\n }\n\n return (\n <a key={index} href='javascript:;' class={className} onClick={onClick}>\n <span style={{ display: 'inline-block', position: 'relative' }}>\n <img src={iconPath} alt='' class='weui-tabbar__icon' />\n {!!badgeText && (\n <span\n class='weui-badge taro-tabbar-badge'\n style={badgeStyle}>\n {badgeText}\n </span>\n )}\n {showRedDot && (\n <span\n class='weui-badge weui-badge_dot'\n style={dotStyle}\n />\n )}\n </span>\n <p class='weui-tabbar__label' style={{ color: textColor }}>\n {text}\n </p>\n </a>\n )\n}\n","html,\nbody {\n height: 100%;\n}\n\n#app {\n height: 100%;\n}\n\n.taro-tabbar {\n &__border {\n &-white {\n &::before {\n border-top-color: #fff !important;\n }\n }\n }\n\n &__container {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n height: 100%;\n }\n\n &__panel {\n overflow: auto;\n position: relative;\n flex: 1;\n -webkit-overflow-scrolling: auto;\n }\n\n &__tabbar {\n position: relative;\n width: 100%;\n height: 50px;\n transition: bottom 0.2s, top 0.2s;\n\n &-top {\n top: 0;\n }\n\n &-bottom {\n bottom: 0;\n margin-bottom: constant(safe-area-inset-bottom);\n margin-bottom: env(safe-area-inset-bottom);\n }\n\n &-hide {\n display: none;\n }\n\n &-slideout {\n top: -52px;\n flex: 0 0;\n }\n }\n\n &__panel + &__tabbar-slideout {\n top: auto;\n bottom: -52px;\n }\n}\n","import { Component, Prop, h, ComponentInterface, Host, State, Event, EventEmitter, Element } from '@stencil/core'\nimport Taro from '@tarojs/taro'\nimport { addLeadingSlash, stripBasename, stripSuffix } from '@tarojs/router/dist/utils'\nimport { IH5RouterConfig } from '@tarojs/taro/types/compile'\nimport classNames from 'classnames'\nimport resolvePathname from 'resolve-pathname'\n\nimport { splitUrl } from '../../utils'\nimport { TabbarItem } from './tabbar-item'\n\nconst STATUS_SHOW = 0\nconst STATUS_HIDE = 1\nconst STATUS_SLIDEOUT = 2\n\nconst basicTabBarClassName = 'taro-tabbar__tabbar'\nconst hideTabBarClassName = 'taro-tabbar__tabbar-hide'\nconst hideTabBarWithAnimationClassName = 'taro-tabbar__tabbar-slideout'\n\ninterface RouterHandler {\n index: string\n text: string\n url: string\n successHandler: Function\n errorHandler: Function\n animation?: boolean\n}\n\nexport interface Conf {\n color: string\n selectedColor: string\n backgroundColor: string\n borderStyle?: 'black' | 'white'\n list: TabbarList[]\n position?: 'bottom' | 'top'\n custom: boolean\n customRoutes: Record<string, string | string[]>\n mode: IH5RouterConfig['mode']\n basename: string\n homePage: string\n currentPagename: string\n}\n\ninterface TabbarList {\n pagePath: string\n text: string\n iconPath?: string\n selectedIconPath?: string\n badgeText?: string\n showRedDot?: boolean\n}\n\n@Component({\n tag: 'taro-tabbar',\n styleUrl: './style/index.scss'\n})\nexport class Tabbar implements ComponentInterface {\n private homePage = ''\n\n private customRoutes: Array<string[]> = []\n\n private tabbarPos: 'top' | 'bottom' = 'bottom'\n\n @Prop() conf: Conf\n\n @State() list: TabbarList[]\n\n @State() borderStyle: Conf['borderStyle']\n\n @State() backgroundColor: Conf['backgroundColor']\n\n @State() color: Conf['color']\n\n @State() selectedColor: Conf['selectedColor']\n\n @State() selectedIndex = -1\n\n @State() status: 0 | 1 | 2 = STATUS_SHOW\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n @Element() tabbar: HTMLDivElement\n\n constructor () {\n const list = this.conf.list\n const customRoutes = this.conf.customRoutes\n if (\n Object.prototype.toString.call(list) !== '[object Array]' ||\n list.length < 2 ||\n list.length > 5\n ) {\n throw new Error('tabBar 配置错误')\n }\n\n this.homePage = addLeadingSlash(this.conf.homePage)\n for (let key in customRoutes) {\n const path = customRoutes[key]\n key = addLeadingSlash(key)\n if (typeof path === 'string') {\n this.customRoutes.push([key, addLeadingSlash(path)])\n } else if (path?.length > 0) {\n this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]))\n }\n }\n\n list.forEach(item => {\n if (item.pagePath.indexOf('/') !== 0) {\n item.pagePath = '/' + item.pagePath\n }\n })\n\n this.list = list\n this.borderStyle = this.conf.borderStyle\n this.backgroundColor = this.conf.backgroundColor\n this.color = this.conf.color\n this.selectedColor = this.conf.selectedColor\n }\n\n getCurrentUrl () {\n const routerMode = this.conf.mode\n const routerBasename = this.conf.basename || '/'\n let url\n if (routerMode === 'hash') {\n const href = window.location.href\n const hashIndex = href.indexOf('#')\n url = hashIndex === -1\n ? ''\n : href.substring(hashIndex + 1)\n } else {\n url = location.pathname\n }\n const processedUrl = addLeadingSlash(stripBasename(url, routerBasename))\n return decodeURI(processedUrl === '/' ? this.homePage : processedUrl)\n }\n\n getOriginUrl = (url: string) => {\n const customRoute = this.customRoutes.filter(([, customUrl]) => {\n const pathA = splitUrl(customUrl).path\n const pathB = splitUrl(url).path\n return pathA === pathB\n })\n return stripSuffix(customRoute.length ? customRoute[0][0] : url, '.html')\n }\n\n getSelectedIndex = (url: string) => {\n let foundIndex = -1\n this.list.forEach(({ pagePath }, idx) => {\n const pathA = splitUrl(url).path\n const pathB = splitUrl(pagePath).path\n if (pathA === pathB) {\n foundIndex = idx\n }\n })\n return foundIndex\n }\n\n switchTab = (index: number) => {\n this.selectedIndex = index\n Taro.switchTab({\n url: this.list[index].pagePath\n })\n }\n\n switchTabHandler = ({ url, successHandler, errorHandler }: RouterHandler) => {\n const currentUrl = this.getOriginUrl(this.getCurrentUrl() || this.homePage)\n const nextTab = resolvePathname(url, currentUrl)\n const foundIndex = this.getSelectedIndex(nextTab)\n\n if (foundIndex > -1) {\n this.switchTab(foundIndex)\n successHandler({\n errMsg: 'switchTab:ok'\n })\n } else {\n errorHandler({\n errMsg: `switchTab:fail page \"${nextTab}\" is not found`\n })\n }\n }\n\n routerChangeHandler = (options?) => {\n const to = options?.toLocation?.path\n let currentPage\n\n if (typeof to === 'string') {\n const routerBasename = this.conf.basename || '/'\n currentPage = stripBasename(addLeadingSlash(to || this.homePage), routerBasename) || '/'\n } else {\n currentPage = this.getCurrentUrl()\n }\n\n this.selectedIndex = this.getSelectedIndex(this.getOriginUrl(currentPage))\n }\n\n setTabBarBadgeHandler = ({ index, text, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n list[index].badgeText = text\n successHandler({\n errMsg: 'setTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n removeTabBarBadgeHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].badgeText = null\n successHandler({\n errMsg: 'removeTabBarBadge:ok'\n })\n } else {\n errorHandler({\n errMsg: 'removeTabBarBadge:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].badgeText = null\n list[index].showRedDot = true\n successHandler({\n errMsg: 'showTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'showTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n hideTabBarRedDotHandler = ({ index, successHandler, errorHandler }: RouterHandler) => {\n const list = [...this.list]\n if (index in list) {\n list[index].showRedDot = false\n successHandler({\n errMsg: 'hideTabBarRedDot:ok'\n })\n } else {\n errorHandler({\n errMsg: 'hideTabBarRedDot:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n showTabBarHandler = ({ successHandler }) => {\n this.status = STATUS_SHOW\n successHandler({\n errMsg: 'showTabBar:ok'\n })\n }\n\n hideTabBarHandler = ({ animation, successHandler }) => {\n this.status = animation ? STATUS_SLIDEOUT : STATUS_HIDE\n successHandler({\n errMsg: 'hideTabBar:ok'\n })\n }\n\n setTabBarStyleHandler = ({ color, selectedColor, backgroundColor, borderStyle, successHandler }) => {\n if (backgroundColor) this.backgroundColor = backgroundColor\n if (borderStyle) this.borderStyle = borderStyle\n if (color) this.color = color\n if (selectedColor) this.selectedColor = selectedColor\n successHandler({\n errMsg: 'setTabBarStyle:ok'\n })\n }\n\n setTabBarItemHandler = ({ index, iconPath, selectedIconPath, text, successHandler, errorHandler }) => {\n const list = [...this.list]\n if (index in list) {\n if (iconPath) list[index].iconPath = iconPath\n if (selectedIconPath) list[index].selectedIconPath = selectedIconPath\n if (text) list[index].text = text\n successHandler({\n errMsg: 'setTabBarItem:ok'\n })\n } else {\n errorHandler({\n errMsg: 'setTabBarItem:fail tabbar item not found'\n })\n }\n\n this.list = list\n }\n\n bindEvent () {\n Taro.eventCenter.on('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.on('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n removeEvent () {\n Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler)\n Taro.eventCenter.off('__taroSwitchTab', this.switchTabHandler)\n Taro.eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler)\n Taro.eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler)\n Taro.eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler)\n Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler)\n Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler)\n Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler)\n Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler)\n Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler)\n }\n\n componentDidLoad () {\n this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom'\n this.bindEvent()\n this.routerChangeHandler()\n }\n\n disconnectedCallback () {\n this.removeEvent()\n }\n\n render () {\n const { tabbarPos = 'bottom' } = this\n const status = this.status\n const containerCls = classNames('weui-tabbar', {\n [`taro-tabbar__border-${this.borderStyle || 'black'}`]: true\n })\n const shouldHideTabBar = this.selectedIndex === -1 || status === STATUS_HIDE\n const shouldSlideout = status === STATUS_SLIDEOUT\n\n return (\n <Host\n class={classNames(\n basicTabBarClassName,\n `${basicTabBarClassName}-${tabbarPos}`, {\n [hideTabBarClassName]: shouldHideTabBar,\n [hideTabBarWithAnimationClassName]: shouldSlideout\n })} >\n <div\n class={containerCls}\n style={{\n backgroundColor: this.backgroundColor || '',\n height: 'inherit'\n }}\n >\n {this.list.map((item, index) => {\n const isSelected = this.selectedIndex === index\n let textColor\n let iconPath\n if (isSelected) {\n textColor = this.selectedColor || ''\n iconPath = item.selectedIconPath\n } else {\n textColor = this.color || ''\n iconPath = item.iconPath\n }\n return (\n <TabbarItem\n index={index}\n onSelect={this.switchTab.bind(this)}\n isSelected={isSelected}\n textColor={textColor}\n iconPath={iconPath}\n text={item.text}\n badgeText={item.badgeText}\n showRedDot={item.showRedDot}\n />\n )\n })}\n </div>\n </Host>\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/text/style/index.scss?tag=taro-text-core","src/components/text/text.tsx"],"names":["indexCss","Text","prototype","render","cls","classNames","taro-text__selectable","this","selectable","h","Host","class"],"mappings":"oHAAA,IAAMA,SAAW,2PCOJC,KAAI,kEACM,MAErBA,EAAAC,UAAAC,OAAA,WACE,IAAMC,EAAMC,WAAW,CACrBC,wBAAyBC,KAAKC,aAEhC,OACEC,EAACC,KAAI,CAACC,MAAOP,GACXK,EAAA,OAAA,iBATS","sourcesContent":["taro-text-core {\n display: inline;\n user-select: none;\n white-space: pre-wrap;\n}\n\n.taro-text__selectable {\n user-select: text;\n}\n","import { Component, Prop, h, ComponentInterface, Host } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-text-core',\n styleUrl: './style/index.scss'\n})\nexport class Text implements ComponentInterface {\n @Prop() selectable = false\n\n render () {\n const cls = classNames({\n 'taro-text__selectable': this.selectable\n })\n return (\n <Host class={cls}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/textarea/style/index.scss?tag=taro-textarea-core","src/components/textarea/textarea.tsx"],"names":["indexCss","fixControlledValue","value","Textarea","this","handleInput","e","stopPropagation","_this","handleLineChange","target","onInput","emit","cursor","length","handleFocus","onFocus","handleBlur","onBlur","handleChange","onChange","line","getNumberOfLines","onLineChange","height","textareaRef","clientHeight","lineCount","calculateContentHeight","ta","scanAmount","origHeight","style","offsetHeight","scrollHeight","overflow","originMinHeight","minHeight","window","getComputedStyle","taLineHeight","parseInt","lineHeight","taHeight","numberOfLines","Math","floor","prototype","focus","componentDidLoad","Object","defineProperty","el","get","set","configurable","autoFocus","render","_a","placeholder","disabled","maxlength","autoHeight","name","nativeProps","otherProps","rows","h","assign","ref","input","class","concat","autofocus"],"mappings":"0FAAA,IAAMA,SAAW,ySCGjB,SAASC,mBAAmBC,GAC1B,OAAOA,IAAK,MAALA,SA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mBC,GAC1ByD,YAAaA,EACbI,KAAMA,EACNH,SAAUA,EACVC,UAAWA,EACXY,UAAWjB,EACX7C,QAASN,EACTW,QAASD,EACTG,OAAQD,EACRG,SAAUD,GACN6C,EACAC,mIA/LS","sourcesContent":["taro-textarea-core {\n display: block;\n width: 300px;\n}\n\ntaro-textarea-core .auto-height {\n height: auto;\n}\n\n.taro-textarea {\n &:focus {\n outline: none;\n }\n\n display: block;\n position: relative;\n border: 0;\n width: 100%;\n height: inherit;\n appearance: none;\n cursor: auto;\n line-height: 1.5;\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Element, Method } from '@stencil/core'\nimport { TaroEvent } from '../../../types'\n\nfunction fixControlledValue(value?: string) {\n return value ?? ''\n}\n\n@Component({\n tag: 'taro-textarea-core',\n styleUrl: './style/index.scss'\n})\nexport class Textarea implements ComponentInterface {\n private textareaRef: HTMLTextAreaElement\n\n @Element() el: HTMLElement\n\n @Prop({ mutable: true }) value: string\n @Prop() placeholder: string\n @Prop() disabled = false\n @Prop() maxlength = 140\n @Prop() autoFocus = false\n @Prop() autoHeight = false\n @Prop() name: string\n @Prop() nativeProps = {}\n @State() line = 1\n\n @Event({\n eventName: 'input'\n })\n onInput: EventEmitter\n\n @Event({\n eventName: 'focus'\n })\n onFocus: EventEmitter\n\n @Event({\n eventName: 'blur'\n })\n onBlur: EventEmitter\n\n @Event({\n eventName: 'change'\n })\n onChange: EventEmitter\n\n @Event({\n eventName: 'linechange' // 必须全小写\n })\n onLineChange: EventEmitter\n\n @Method()\n focus() {\n this.textareaRef.focus()\n }\n\n componentDidLoad() {\n Object.defineProperty(this.el, 'value', {\n get: () => this.textareaRef.value,\n set: value => (this.value = value),\n configurable: true\n })\n this.autoFocus && this.textareaRef.focus()\n }\n\n handleInput = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.handleLineChange()\n const value = e.target.value || ''\n this.onInput.emit({\n value,\n cursor: value.length\n })\n }\n\n handleFocus = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onFocus.emit({\n value: e.target.value\n })\n }\n\n handleBlur = (e: TaroEvent<HTMLInputElement> & FocusEvent) => {\n e.stopPropagation()\n this.onBlur.emit({\n value: e.target.value\n })\n }\n\n handleChange = (e: TaroEvent<HTMLInputElement>) => {\n e.stopPropagation()\n this.onChange.emit({\n value: e.target.value\n })\n }\n\n handleLineChange = () => {\n const line = this.getNumberOfLines()\n if (line !== this.line) {\n this.line = line\n this.onLineChange.emit({\n height: this.textareaRef.clientHeight,\n lineCount: this.line\n })\n }\n }\n\n calculateContentHeight = (ta, scanAmount) => {\n let origHeight = ta.style.height,\n height = ta.offsetHeight,\n scrollHeight = ta.scrollHeight,\n overflow = ta.style.overflow,\n originMinHeight = ta.style.minHeight || null\n\n /// only bother if the ta is bigger than content\n if (height >= scrollHeight) {\n ta.style.minHeight = 0\n /// check that our browser supports changing dimension\n /// calculations mid-way through a function call...\n ta.style.height = height + scanAmount + 'px'\n /// because the scrollbar can cause calculation problems\n ta.style.overflow = 'hidden'\n /// by checking that scrollHeight has updated\n if (scrollHeight < ta.scrollHeight) {\n /// now try and scan the ta's height downwards\n /// until scrollHeight becomes larger than height\n while (ta.offsetHeight >= ta.scrollHeight) {\n ta.style.height = (height -= scanAmount) + 'px'\n }\n /// be more specific to get the exact height\n while (ta.offsetHeight < ta.scrollHeight) {\n ta.style.height = height++ + 'px'\n }\n /// reset the ta back to it's original height\n ta.style.height = origHeight\n /// put the overflow back\n ta.style.overflow = overflow\n ta.style.minHeight = originMinHeight\n return height\n }\n } else {\n return scrollHeight\n }\n }\n\n getNumberOfLines = () => {\n const ta = this.textareaRef,\n style = window.getComputedStyle ? window.getComputedStyle(ta) : ta.style,\n // This will get the line-height only if it is set in the css,\n // otherwise it's \"normal\"\n taLineHeight = parseInt(style.lineHeight, 10),\n // Get the scroll height of the textarea\n taHeight = this.calculateContentHeight(ta, taLineHeight),\n // calculate the number of lines\n numberOfLines = Math.floor(taHeight / taLineHeight)\n\n return numberOfLines\n }\n\n render() {\n const {\n value,\n placeholder,\n disabled,\n maxlength,\n autoFocus,\n autoHeight,\n name,\n nativeProps,\n handleInput,\n handleFocus,\n handleBlur,\n handleChange\n } = this\n\n const otherProps: {\n [props: string]: any\n } = {}\n\n if (autoHeight) {\n otherProps.rows = this.line\n }\n\n return (\n <textarea\n ref={input => {\n if (input) {\n this.textareaRef = input\n }\n }}\n class={`taro-textarea ${autoHeight ? 'auto-height' : ''}`}\n value={fixControlledValue(value)}\n placeholder={placeholder}\n name={name}\n disabled={disabled}\n maxlength={maxlength}\n autofocus={autoFocus}\n onInput={handleInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onChange={handleChange}\n {...nativeProps}\n {...otherProps}\n />\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/video/utils.ts","src/components/video/video-control.tsx","src/components/video/style/index.scss?tag=taro-video-core","src/components/video/video.tsx","src/components/video/video-danmu.tsx"],"names":["formatTime","time","sec","Math","round","min","concat","calcDist","x","y","sqrt","pow","normalizeNumber","number","max","scene","screenFn","val","fnMap","defaultIOSMap","i","l","length","ret","document","isHls","url","test","VideoControl","this","visible","isDraggingProgressBall","percentage","progressDimensions","left","width","calcPercentage","pageX","pos","_this","onDragProgressBallStart","hideControlsTimer","clearTimeout","onClickProgress","e","stopPropagation","seekFunc","duration","toggleVisibility","class_1","prototype","onDocumentTouchMove","touchX","touches","setProgressBall","setCurrentTime","onDocumentTouchEnd","progressBallRef","style","nextVisible","undefined","isPlaying","setTimeout","el","visibility","getIsDraggingProgressBall","currentTimeRef","innerHTML","render","_c","controls","currentTime","pauseFunc","playFunc","showPlayBtn","showProgress","formattedDuration","playBtn","h","class","onClick","Host","ref","dom","rect","getBoundingClientRect","onTouchStart","indexCss","Video","isDraggingProgress","gestureType","analyzeGesture","obj","type","nowX","screenX","nowY","screenY","distX","lastTouchScreenX","distY","lastTouchScreenY","enableVslideGesture","isFullScreen","vslideGestureInFullscreen","vslideGesture","dist","abs","lastVolume","videoRef","volume","enableProgressGesture","lastPercentage","_a","_duration","dataX","dataY","loadNativePlayer","src","_b","load","call","init","import","then","n","Hls","default","HLS","isSupported","hls","destroy","loadSource","attachMedia","on","Events","MANIFEST_PARSED","autoplay","play","ERROR","_","data","handleError","canPlayType","console","error","handlePlay","isFirst","controlsRef","onPlay","emit","handlePause","onPause","handleEnded","pause","onEnded","handleTimeUpdate","throttle","__awaiter","isControlDragging","sent","danmuRef","tick","onTimeUpdate","target","seek","ErrorTypes","NETWORK_ERROR","onError","errMsg","response","startLoad","MEDIA_ERROR","reason","recoverMediaError","message","handleDurationChange","handleProgress","onProgress","handleLoadedMetaData","onLoadedMetaData","videoWidth","height","videoHeight","_play","_pause","_stop","_seek","position","onTouchStartContainer","onClickContainer","enablePlayGesture","now","Date","lastClickedTime","onClickFullScreenBtn","toggleFullScreen","handleFullScreenChange","timestamp","getTime","detail","fullscreenElement","fullScreenTimestamp","onFullScreenChange","fullScreen","direction","requestFullscreen","navigationUI","toggleMute","muted","isMute","toggleDanmu","_enableDanmu","class_2","componentWillLoad","enableDanmu","componentDidLoad","initialTime","sendDanmu","danmuList","addEventListener","fullscreenchange","componentDidRender","disconnectedCallback","removeEventListener","watchEnableDanmu","newVal","watchSrc","gestureObj","toastVolumeRef","nextVolume","toastVolumeBarRef","nextPercentage","toastProgressTitleRef","toastProgressRef","stop","requestFullScreen","exitFullScreen","loop","poster","objectFit","showCenterPlayBtn","showMuteBtn","danmuBtn","showFullscreenBtn","nativeProps","durationTime","classNames","taro-video-type-fullscreen","Object","assign","object-fit","playsinline","webkit-playsinline","onDurationChange","enable","taro-video-type-mute","taro-video-danmu-button-active","Array","fill","map","VideoDanmu","list","danmuElList","class_3","ensureProperties","danmu","clonedDanmu","key","random","bottom","isArray","__spreadArray","newDanmuList","filter","shouldUpdate","oldDanmuList","some","every","componentDidUpdate","requestAnimationFrame","splice","forEach","webkitTransform","transform","text","color","push"],"mappings":"+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Ae,SACV,CACLA,EAAeF,EAAaI,MAAK,SAAChN,OAAEuM,EAAGvM,EAAAuM,IACrC,OAAOQ,EAAaE,OAAM,SAACZ,GACzB,OAAOE,IAAQF,EAAME,UAI3B,GAAIO,EAAc,CAChBtP,KAAK8L,UAAYsD,mBAIrBT,EAAAtN,UAAAqO,mBAAA,WAAA,IAAAhP,EAAAV,KACE2P,uBAAsB,WACpB1N,YAAW,WACT,IAAMyM,EAAchO,EAAKgO,YAAYkB,OAAO,GAC5ClB,EAAYmB,SAAQ,SAAAhB,GAClBA,EAAMhN,MAAMxB,KAAO,IACnBwO,EAAMhN,MAAMiO,gBAAkB,oBAC9BjB,EAAMhN,MAAMkO,UAAY,8BAMhCpB,EAAAtN,UAAAkB,OAAA,WAAA,IAAA7B,EAAAV,KACE,IAAKA,KAAKkO,OAAQ,MAAO,GAEzB,OACEjL,EAACG,KAAI,CAACF,MAAM,oBACTlD,KAAK8L,UAAUyC,KAAI,SAAC/L,OAAEwN,EAAIxN,EAAAwN,KAAEC,EAAKzN,EAAAyN,MAAEhB,EAAMzM,EAAAyM,OAAEF,EAAGvM,EAAAuM,IAAE,OAC/C9L,EAAA,IAAA,CACEC,MAAM,wBACN6L,IAAKA,EACLlN,MAAO,CACLoO,MAAKA,EACLhB,OAAMA,GAER5L,IAAK,SAAAA,GACH,GAAIA,EAAK,CACP3C,EAAKgO,YAAYwB,KAAK7M,MAIzB2M,iBAlGU","sourcesContent":["export const formatTime = (time?: number): string => {\r\n if (!time) return ''\r\n const sec = Math.round(time % 60)\r\n const min = Math.round((time - sec) / 60)\r\n return `${min < 10 ? `0${min}` : min}:${sec < 10 ? `0${sec}` : sec}`\r\n}\r\n\r\nexport const calcDist = (x: number, y: number): number => {\r\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))\r\n}\r\n\r\nexport const normalizeNumber = (number: number): number => {\r\n return Math.max(-1, Math.min(number, 1))\r\n}\r\n\r\nexport let scene = 'default'\r\n\r\nexport const screenFn = (function () {\r\n let val\r\n const fnMap = [\r\n [\r\n 'requestFullscreen',\r\n 'exitFullscreen',\r\n 'fullscreenElement',\r\n 'fullscreenEnabled',\r\n 'fullscreenchange',\r\n 'fullscreenerror'\r\n ],\r\n // New WebKit\r\n [\r\n 'webkitRequestFullscreen',\r\n 'webkitExitFullscreen',\r\n 'webkitFullscreenElement',\r\n 'webkitFullscreenEnabled',\r\n 'webkitfullscreenchange',\r\n 'webkitfullscreenerror'\r\n ],\r\n // Old WebKit\r\n [\r\n 'webkitRequestFullScreen',\r\n 'webkitCancelFullScreen',\r\n 'webkitCurrentFullScreenElement',\r\n 'webkitCancelFullScreen',\r\n 'webkitfullscreenchange',\r\n 'webkitfullscreenerror'\r\n ],\r\n [\r\n 'mozRequestFullScreen',\r\n 'mozCancelFullScreen',\r\n 'mozFullScreenElement',\r\n 'mozFullScreenEnabled',\r\n 'mozfullscreenchange',\r\n 'mozfullscreenerror'\r\n ],\r\n [\r\n 'msRequestFullscreen',\r\n 'msExitFullscreen',\r\n 'msFullscreenElement',\r\n 'msFullscreenEnabled',\r\n 'MSFullscreenChange',\r\n 'MSFullscreenError'\r\n ]\r\n ]\r\n var defaultIOSMap = [\r\n 'webkitEnterFullscreen',\r\n 'webkitExitFullscreen',\r\n 'webkitCurrentFullScreenElement',\r\n 'webkitSupportsFullscreen',\r\n 'fullscreenchange',\r\n 'fullscreenerror'\r\n ]\r\n let i = 0\r\n const l = fnMap.length\r\n const ret: Record<string, any> = {}\r\n // This for loop essentially checks the current document object for the property/methods above.\r\n for (; i < l; i++) {\r\n val = fnMap[i]\r\n if (val && val[1] in document) {\r\n for (i = 0; i < val.length; i++) {\r\n ret[fnMap[0][i]] = val[i]\r\n }\r\n return ret\r\n }\r\n }\r\n if (!ret[fnMap[0][0]]) {\r\n scene = 'iOS'\r\n // when there is no any APIs be set.\r\n\r\n // In IOS, there is no 'webkitEnterFullscreen' property `in document` but video can use it for fullscreen.\r\n // ref: https://developer.apple.com/documentation/webkitjs/htmlvideoelement/1633500-webkitenterfullscreen\r\n for (i = 0; i < defaultIOSMap.length; i++) {\r\n ret[fnMap[0][i]] = defaultIOSMap[i]\r\n }\r\n }\r\n // If it doesn't find any of them, this whole function returns {}\r\n // and the fn variable is set to this returned value.\r\n return ret\r\n})()\r\n\r\nexport const isHls = url => /\\.(m3u8)($|\\?)/i.test(url)\r\n","import { Component, h, ComponentInterface, Prop, Host, Element, Listen, Method } from '@stencil/core'\nimport { formatTime } from './utils'\n\n@Component({\n tag: 'taro-video-control'\n})\nexport class VideoControl implements ComponentInterface {\n private currentTimeRef: HTMLDivElement\n private progressBallRef: HTMLDivElement\n private visible = false\n private isDraggingProgressBall = false\n private hideControlsTimer: ReturnType<typeof setTimeout>\n private percentage = 0\n private progressDimensions = {\n left: 0,\n width: 0\n }\n\n @Element() el: HTMLElement\n\n @Prop() controls: boolean\n @Prop() currentTime: number\n @Prop() duration: number\n @Prop() isPlaying: boolean\n @Prop() pauseFunc: () => void\n @Prop() playFunc: () => void\n @Prop() seekFunc: (position: number) => void\n @Prop() showPlayBtn: boolean\n @Prop() showProgress: boolean\n\n @Listen('touchmove', {\n target: 'document'\n })\n onDocumentTouchMove (e: TouchEvent) {\n if (!this.isDraggingProgressBall) return\n const touchX = e.touches[0].pageX\n this.percentage = this.calcPercentage(touchX)\n this.setProgressBall(this.percentage)\n this.setCurrentTime(this.percentage * this.duration)\n }\n\n @Listen('touchend', {\n target: 'document'\n })\n @Listen('touchcancel', {\n target: 'document'\n })\n onDocumentTouchEnd () {\n if (!this.isDraggingProgressBall) return\n\n this.isDraggingProgressBall = false\n this.seekFunc(this.percentage * this.duration)\n this.toggleVisibility(true)\n }\n\n @Method()\n async setProgressBall (percentage: number) {\n if (this.progressBallRef) {\n this.progressBallRef.style.left = `${percentage * 100}%`\n }\n }\n\n @Method()\n async toggleVisibility (nextVisible?: boolean) {\n const visible = nextVisible === undefined ? !this.visible : nextVisible\n if (visible) {\n this.hideControlsTimer && clearTimeout(this.hideControlsTimer)\n if (this.isPlaying) {\n this.hideControlsTimer = setTimeout(() => {\n this.toggleVisibility(false)\n }, 2000)\n }\n this.el.style.visibility = 'visible'\n } else {\n this.el.style.visibility = 'hidden'\n }\n this.visible = !!visible\n }\n\n @Method()\n async getIsDraggingProgressBall () {\n return this.isDraggingProgressBall\n }\n\n @Method()\n async setCurrentTime (time: number) {\n this.currentTimeRef.innerHTML = formatTime(time)\n }\n\n calcPercentage = (pageX: number): number => {\n let pos = pageX - this.progressDimensions.left\n pos = Math.max(pos, 0)\n pos = Math.min(pos, this.progressDimensions.width)\n return pos / this.progressDimensions.width\n }\n\n onDragProgressBallStart = () => {\n this.isDraggingProgressBall = true\n this.hideControlsTimer && clearTimeout(this.hideControlsTimer)\n }\n\n onClickProgress = (e: MouseEvent) => {\n e.stopPropagation()\n\n const percentage = this.calcPercentage(e.pageX)\n this.seekFunc(percentage * this.duration)\n this.toggleVisibility(true)\n }\n\n render () {\n const {\n controls,\n currentTime,\n duration,\n isPlaying,\n pauseFunc,\n playFunc,\n showPlayBtn,\n showProgress\n } = this\n\n const formattedDuration = formatTime(duration)\n let playBtn\n\n if (!showPlayBtn) {\n playBtn = null\n } else if (isPlaying) {\n playBtn = <div class='taro-video-control-button taro-video-control-button-pause' onClick={pauseFunc} />\n } else {\n playBtn = <div class='taro-video-control-button taro-video-control-button-play' onClick={playFunc} />\n }\n\n return (\n <Host class='taro-video-bar taro-video-bar-full'>\n {controls && (\n <div class='taro-video-controls'>\n {playBtn}\n {showProgress && (\n <div class='taro-video-current-time' ref={dom => (this.currentTimeRef = dom as HTMLDivElement)}>\n {formatTime(currentTime)}\n </div>\n )}\n {showProgress && (\n <div class='taro-video-progress-container' onClick={this.onClickProgress}>\n <div\n class='taro-video-progress'\n ref={ref => {\n if (!ref) return\n const rect = ref.getBoundingClientRect()\n this.progressDimensions.left = rect.left\n this.progressDimensions.width = rect.width\n }}>\n <div class='taro-video-progress-buffered' style={{ width: '100%' }} />\n <div\n class='taro-video-ball'\n ref={dom => (this.progressBallRef = dom as HTMLDivElement)}\n onTouchStart={this.onDragProgressBallStart}\n style={{\n left: `${formattedDuration ? (this.currentTime / duration) * 100 : 0}%`\n }}\n >\n <div class='taro-video-inner' />\n </div>\n </div>\n </div>\n )}\n {showProgress && <div class='taro-video-duration'>{formattedDuration}</div>}\n </div>\n )}\n <slot />\n </Host>\n )\n }\n}\n","@charset \"UTF-8\";\n\n.taro-video {\n display: inline-block;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 225px;\n line-height: 0;\n}\n\n.taro-video[hidden] {\n display: none;\n}\n\n.taro-video-container {\n display: inline-block;\n\n // NOTE: video 元素父节点设置该属性会导致 iOS 元素层级问题 https://stackoverflow.com/questions/49653475/video-and-z-index-inside-scaled-element-some-divs-disappear\n // overflow: hidden;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n object-position: inherit;\n}\n\n.taro-video-container.taro-video-type-fullscreen {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 999;\n}\n\n.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left {\n transform: translate(-50%, -50%) rotate(-90deg);\n}\n\n.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right {\n transform: translate(-50%, -50%) rotate(90deg);\n}\n\n.taro-video-video {\n width: 100%;\n height: 100%;\n object-position: inherit;\n}\n\n.taro-video-cover {\n display: flex;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n z-index: 1;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n background-color: rgb(1 1 1 / 50%);\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-box-pack: center;\n -webkit-box-align: center;\n}\n\n.taro-video-cover-play-button {\n width: 40px;\n height: 40px;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n}\n\n.taro-video-cover-duration {\n margin-top: 10px;\n line-height: 1;\n font-size: 16px;\n color: #fff;\n}\n\n.taro-video-bar {\n display: flex;\n visibility: hidden;\n overflow: hidden;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 1;\n align-items: center;\n padding: 0 10px;\n height: 44px;\n background-color: rgb(0 0 0 / 50%);\n -webkit-box-align: center;\n}\n\n.taro-video-bar.taro-video-bar-full {\n left: 0;\n}\n\n.taro-video-controls {\n display: flex;\n -webkit-box-flex: 1;\n flex-grow: 1;\n margin: 0 8.5px;\n}\n\n.taro-video-control-button {\n box-sizing: content-box;\n margin-left: -8.5px;\n padding: 14.5px 12.5px;\n width: 13px;\n height: 15px;\n}\n\n.taro-video-control-button::after {\n display: block;\n width: 100%;\n height: 100%;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 100%;\n content: \"\";\n}\n\n.taro-video-control-button.taro-video-control-button-play::after,\n.taro-video-cover-play-button {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==\");\n}\n\n.taro-video-control-button.taro-video-control-button-pause::after {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC\");\n}\n\n.taro-video-current-time,\n.taro-video-duration {\n margin-top: 15px;\n margin-bottom: 14.5px;\n height: 14.5px;\n line-height: 14.5px;\n font-size: 12px;\n color: #cbcbcb;\n}\n\n.taro-video-progress-container {\n position: relative;\n flex-grow: 2;\n -webkit-box-flex: 2;\n}\n\n.taro-video-progress {\n position: relative;\n margin: 21px 12px;\n height: 2px;\n background-color: hsl(0deg 0% 100% / 40%);\n}\n\n.taro-video-progress-buffered {\n position: absolute;\n left: 0;\n top: 0;\n width: 0;\n height: 100%;\n background-color: hsl(0deg 0% 100% / 80%);\n transition: width 0.1s;\n}\n\n.taro-video-ball {\n position: absolute;\n left: 0;\n top: -21px;\n box-sizing: content-box;\n margin-left: -22px;\n padding: 14px;\n width: 16px;\n height: 16px;\n}\n\n.taro-video-inner {\n border-radius: 50%;\n width: 100%;\n height: 100%;\n background-color: #fff;\n}\n\n.taro-video-danmu-button {\n margin: 0 8.5px;\n padding: 2px 10px;\n border: 1px solid #fff;\n border-radius: 5px;\n line-height: 1;\n font-size: 13px;\n color: #fff;\n white-space: nowrap;\n}\n\n.taro-video-danmu-button.taro-video-danmu-button-active {\n border-color: #48c23d;\n color: #48c23d;\n}\n\n.taro-video-fullscreen,\n.taro-video-mute {\n box-sizing: content-box;\n padding: 8.5px;\n width: 17px;\n height: 17px;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n}\n\n.taro-video-fullscreen {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==\");\n}\n\n.taro-video-fullscreen.taro-video-type-fullscreen {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=\");\n}\n\n.taro-video-mute {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxL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AbERsllEOyh31e8USV2mrMPdG9uyn+rDom2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==\");\n}\n\n.taro-video-mute.taro-video-type-mute {\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAv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R1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC\");\n}\n\n.taro-video-danmu {\n overflow: visible;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n margin-top: 14px;\n margin-bottom: 44px;\n width: 100%;\n line-height: 14px;\n font-size: 14px;\n}\n\n.taro-video-danmu-item {\n position: absolute;\n left: 100%;\n line-height: 1;\n color: #fff;\n white-space: nowrap;\n transform: translateX(0);\n transition-property: left, transform;\n transition-duration: 3s;\n transition-timing-function: linear;\n}\n\n.taro-video-toast {\n display: block;\n visibility: hidden;\n position: absolute;\n left: 50%;\n top: 50%;\n border-radius: 5px;\n background-color: hsl(0deg 0% 100% / 80%);\n pointer-events: none;\n color: #000;\n transform: translate(-50%, -50%);\n}\n\n.taro-video-toast.taro-video-toast-volume {\n display: block;\n width: 100px;\n height: 100px;\n}\n\n.taro-video-toast-volume .taro-video-toast-title {\n display: block;\n margin-top: 10px;\n width: 100%;\n line-height: 16px;\n text-align: center;\n font-size: 12px;\n}\n\n.taro-video-toast-volume .taro-video-toast-icon {\n display: block;\n margin-left: 25%;\n width: 50%;\n height: 50%;\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAdsBc4EdAyA/APZoKwHHAA8DG2UA/AnYrG0ErAVcD1yXA9gfQJ8c40obsqbPgH7AY8CROTVuFQFD3X7fJid4DWsNAWOAGZ0w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e7rKTzPAHqO44vpKPkFhH3cWWBVV6ogJVYZUgz/tXtIYelzI3Ct0fExIGx6j7iKWBUUveyYBehv1RIjIEsfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: 50%;\n fill: #000;\n}\n\n.taro-video-toast-volume .taro-video-toast-value {\n margin-left: 10px;\n margin-top: 5px;\n width: 80px;\n height: 5px;\n}\n\n.taro-video-toast-volume .taro-video-toast-value > .taro-video-toast-value-content {\n overflow: hidden;\n}\n\n.taro-video-toast-volume-grids {\n width: 80px;\n height: 5px;\n}\n\n.taro-video-toast-volume-grids-item {\n float: left;\n width: 7.1px;\n height: 5px;\n background-color: #000;\n}\n\n.taro-video-toast-volume-grids-item:not(:first-child) {\n margin-left: 1px;\n}\n\n.taro-video-toast.taro-video-toast-progress {\n padding: 6px;\n background-color: rgb(0 0 0 / 80%);\n line-height: 18px;\n font-size: 14px;\n color: #fff;\n}\n","import { Component, h, ComponentInterface, Prop, State, Event, EventEmitter, Host, Watch, Listen, Element, Method } from '@stencil/core'\nimport classNames from 'classnames'\n\nimport { throttle } from '../../utils'\nimport {\n formatTime,\n calcDist,\n normalizeNumber,\n screenFn,\n isHls,\n scene\n} from './utils'\n\nimport type HLS from 'hls.js'\n\n@Component({\n tag: 'taro-video-core',\n styleUrl: './style/index.scss'\n})\nexport class Video implements ComponentInterface {\n private videoRef: HTMLVideoElement\n private controlsRef: HTMLTaroVideoControlElement\n private danmuRef: HTMLTaroVideoDanmuElement\n private toastProgressRef: HTMLDivElement\n private toastProgressTitleRef: HTMLDivElement\n private toastVolumeRef: HTMLDivElement\n private toastVolumeBarRef: HTMLDivElement\n private currentTime = 0\n private lastClickedTime: number\n private lastTouchScreenX: number | undefined\n private lastTouchScreenY: number | undefined\n private isDraggingProgress = false\n private lastVolume: number\n private lastPercentage: number\n private nextPercentage: number\n private gestureType = 'none'\n private HLS: typeof HLS\n private hls: HLS\n\n @Element() el: HTMLTaroVideoCoreElement\n\n /**\n * 要播放视频的资源地址\n */\n @Prop() src: string\n\n /**\n * 指定视频时长\n */\n @Prop() duration: number\n\n /**\n * 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)\n */\n @Prop() controls = true\n\n /**\n * 是否自动播放\n */\n @Prop() autoplay = false\n\n /**\n * 是否循环播放\n */\n @Prop() loop = false\n\n /**\n * 是否静音播放\n */\n @Prop() muted = false\n\n /**\n * 指定视频初始播放位置\n */\n @Prop() initialTime = 0\n\n /**\n * 视频封面的图片网络资源地址或云文件ID(2.3.0)。若 controls 属性值为 false 则设置 poster 无效\n */\n @Prop() poster: string\n\n /**\n * 当视频大小与 video 容器大小不一致时,视频的表现形式\n */\n @Prop() objectFit: 'contain' | 'fill' | 'cover' = 'contain'\n\n /**\n * 若不设置,宽度大于 240 时才会显示\n */\n @Prop() showProgress = true\n\n /**\n * 是否显示全屏按钮\n */\n @Prop() showFullscreenBtn = true\n\n /**\n * 是否显示视频底部控制栏的播放按钮\n */\n @Prop() showPlayBtn = true\n\n /**\n * 是否显示视频中间的播放按钮\n */\n @Prop() showCenterPlayBtn = true\n\n /**\n * 是否显示静音按钮\n */\n @Prop() showMuteBtn = false\n\n /**\n * 弹幕列表\n */\n @Prop() danmuList: []\n\n /**\n * 是否显示弹幕按钮\n */\n @Prop() danmuBtn = false\n\n /**\n * 是否展示弹幕\n */\n @Prop() enableDanmu = false\n\n /**\n * 是否开启播放手势,即双击切换播放/暂停\n */\n @Prop() enablePlayGesture = false\n\n /**\n * 是否开启控制进度的手势\n */\n @Prop() enableProgressGesture = true\n\n /**\n * 在非全屏模式下,是否开启亮度与音量调节手势\n */\n @Prop() vslideGesture = false\n\n /**\n * 在全屏模式下,是否开启亮度与音量调节手势\n */\n @Prop() vslideGestureInFullscreen = true\n\n @Prop() nativeProps = {}\n\n @State() _duration: number\n @State() _enableDanmu = false\n @State() isPlaying = false\n @State() isFirst = true\n @State() isFullScreen = false\n @State() fullScreenTimestamp = new Date().getTime()\n @State() isMute = false\n\n @Event({\n eventName: 'play'\n }) onPlay: EventEmitter\n\n @Event({\n eventName: 'pause'\n }) onPause: EventEmitter\n\n @Event({\n eventName: 'ended'\n }) onEnded: EventEmitter\n\n @Event({\n eventName: 'timeupdate'\n }) onTimeUpdate: EventEmitter\n\n @Event({\n eventName: 'error'\n }) onError: EventEmitter\n\n @Event({\n eventName: 'fullscreenchange'\n }) onFullScreenChange: EventEmitter\n\n @Event({\n eventName: 'progress'\n }) onProgress: EventEmitter\n\n @Event({\n eventName: 'loadedmetadata'\n }) onLoadedMetaData: EventEmitter\n\n componentWillLoad () {\n this._enableDanmu = this.enableDanmu\n }\n\n componentDidLoad () {\n this.init()\n if (this.initialTime) {\n this.videoRef.currentTime = this.initialTime\n }\n // 目前只支持 danmuList 初始化弹幕列表,还未支持更新弹幕列表\n this.danmuRef.sendDanmu?.(this.danmuList)\n\n if (document.addEventListener) {\n document.addEventListener(screenFn.fullscreenchange, this.handleFullScreenChange)\n }\n if (this.videoRef && scene === 'iOS') {\n // NOTE: iOS 场景下 fullscreenchange 并不会在退出全屏状态下触发,仅 webkitpresentationmodechanged 与 webkitendfullscreen 可替代\n this.videoRef.addEventListener('webkitendfullscreen', this.handleFullScreenChange)\n }\n }\n\n componentDidRender () {\n }\n\n disconnectedCallback () {\n if (document.removeEventListener) {\n document.removeEventListener(screenFn.fullscreenchange, this.handleFullScreenChange)\n }\n if (this.videoRef && scene === 'iOS') {\n this.videoRef.removeEventListener('webkitendfullscreen', this.handleFullScreenChange)\n }\n }\n\n @Watch('enableDanmu')\n watchEnableDanmu (newVal) {\n this._enableDanmu = newVal\n }\n\n @Watch('src')\n watchSrc () {\n this.init()\n }\n\n analyzeGesture = (e: TouchEvent) => {\n const obj: {\n type: string\n dataX?: number\n dataY?: number\n } = {\n type: 'none'\n }\n const nowX = e.touches[0].screenX\n const nowY = e.touches[0].screenY\n const distX = nowX - (this.lastTouchScreenX as number)\n const distY = nowY - (this.lastTouchScreenY as number)\n const enableVslideGesture = this.isFullScreen ? this.vslideGestureInFullscreen : this.vslideGesture\n\n if (this.gestureType === 'none') {\n // 两点间距离\n const dist = calcDist(distX, distY)\n\n // 没有移动\n if (dist < 10) return obj\n\n if (Math.abs(distY) >= Math.abs(distX)) {\n // 垂直方向移动:调整音量\n if (enableVslideGesture) {\n this.gestureType = 'adjustVolume'\n this.lastVolume = this.videoRef.volume\n } else {\n return obj\n }\n } else if (Math.abs(distY) < Math.abs(distX)) {\n // 水平方向移动:调整进度\n if (this.enableProgressGesture) {\n this.gestureType = 'adjustProgress'\n this.lastPercentage = this.currentTime / (this.duration ?? this._duration)\n } else {\n return obj\n }\n }\n }\n obj.type = this.gestureType\n obj.dataX = normalizeNumber(distX / 200)\n obj.dataY = normalizeNumber(distY / 200)\n return obj\n }\n\n @Listen('touchmove', {\n target: 'document'\n })\n async onDocumentTouchMove (e: TouchEvent) {\n if (this.lastTouchScreenX === undefined || this.lastTouchScreenY === undefined) return\n if (await this.controlsRef.getIsDraggingProgressBall()) return\n\n const gestureObj = this.analyzeGesture(e)\n if (gestureObj.type === 'adjustVolume') {\n this.toastVolumeRef.style.visibility = 'visible'\n const nextVolume = Math.max(Math.min(this.lastVolume - gestureObj.dataY!, 1), 0)\n this.videoRef.volume = nextVolume\n this.toastVolumeBarRef.style.width = `${nextVolume * 100}%`\n } else if (gestureObj.type === 'adjustProgress') {\n this.isDraggingProgress = true\n this.nextPercentage = Math.max(Math.min(this.lastPercentage + (gestureObj.dataX || 0), 1), 0)\n if (this.controls && this.showProgress) {\n this.controlsRef.setProgressBall(this.nextPercentage)\n this.controlsRef.toggleVisibility(true)\n }\n const duration = this.duration || this._duration\n this.toastProgressTitleRef.innerHTML = `${formatTime(this.nextPercentage * duration)} / ${formatTime(duration)}`\n this.toastProgressRef.style.visibility = 'visible'\n }\n }\n\n @Listen('touchend', {\n target: 'document'\n })\n @Listen('touchcancel', {\n target: 'document'\n })\n onDocumentTouchEnd () {\n if (this.gestureType === 'adjustVolume') {\n this.toastVolumeRef.style.visibility = 'hidden'\n } else if (this.gestureType === 'adjustProgress') {\n this.toastProgressRef.style.visibility = 'hidden'\n }\n\n if (this.isDraggingProgress) {\n this.isDraggingProgress = false\n this.seek(this.nextPercentage * (this.duration ?? this._duration))\n }\n\n this.gestureType = 'none'\n this.lastTouchScreenX = undefined\n this.lastTouchScreenY = undefined\n }\n\n loadNativePlayer = () => {\n if (this.videoRef) {\n this.videoRef.src = this.src\n this.videoRef.load?.()\n }\n }\n\n init = () => {\n const { src, videoRef } = this\n\n\n if (isHls(src)) {\n import('hls.js').then(e => {\n const Hls = e.default\n this.HLS = Hls\n if (Hls.isSupported()) {\n if (this.hls) {\n this.hls.destroy()\n }\n this.hls = new Hls()\n this.hls.loadSource(src)\n this.hls.attachMedia(videoRef)\n this.hls.on(Hls.Events.MANIFEST_PARSED, () => {\n this.autoplay && this.play()\n })\n this.hls.on(Hls.Events.ERROR, (_, data) => {\n this.handleError(data)\n })\n } else if (videoRef.canPlayType('application/vnd.apple.mpegurl')) {\n this.loadNativePlayer()\n } else {\n console.error('该浏览器不支持 HLS 播放')\n }\n })\n } else {\n this.loadNativePlayer()\n }\n }\n\n handlePlay = () => {\n this.isPlaying = true\n this.isFirst = false\n this.controlsRef.toggleVisibility(true)\n this.onPlay.emit()\n }\n\n handlePause = () => {\n this.isPlaying = false\n this.controlsRef.toggleVisibility(true)\n this.onPause.emit()\n }\n\n handleEnded = () => {\n this.isFirst = true\n this.pause()\n this.controlsRef.toggleVisibility()\n this.onEnded.emit()\n }\n\n handleTimeUpdate = throttle(async e => {\n this.currentTime = this.videoRef.currentTime\n const duration = this.duration || this._duration\n\n const isControlDragging = await this.controlsRef.getIsDraggingProgressBall()\n if (this.controls && this.showProgress) {\n if (!isControlDragging && !this.isDraggingProgress) {\n this.controlsRef.setProgressBall(this.currentTime / duration)\n this.controlsRef.setCurrentTime(this.currentTime)\n }\n }\n\n this.danmuRef.tick(this.currentTime)\n\n this.onTimeUpdate.emit({\n duration: e.target?.duration,\n currentTime: e.target?.currentTime\n })\n\n if (this.duration) {\n if (this.currentTime >= this.duration) {\n this.seek(0)\n this.handleEnded()\n }\n }\n }, 250)\n\n handleError = e => {\n if (this.hls) {\n switch (e.type) {\n case this.HLS.ErrorTypes.NETWORK_ERROR:\n // try to recover network error\n this.onError.emit({ errMsg: e.response })\n this.hls.startLoad()\n break\n case this.HLS.ErrorTypes.MEDIA_ERROR:\n this.onError.emit({ errMsg: e.reason || '媒体错误,请重试' })\n this.hls.recoverMediaError()\n break\n default:\n break\n }\n } else {\n this.onError.emit({\n errMsg: e.target?.error?.message,\n })\n }\n }\n\n handleDurationChange = () => {\n this._duration = this.videoRef.duration\n }\n\n handleProgress = () => {\n this.onProgress.emit()\n }\n\n handleLoadedMetaData = (e: Event) => {\n const target = e.target as HTMLVideoElement\n this.onLoadedMetaData.emit({\n width: target.videoWidth,\n height: target.videoHeight,\n duration: target.duration\n })\n }\n\n /** 播放视频 */\n @Method()\n async play () {\n this._play()\n }\n\n _play = () => this.videoRef.play()\n\n /** 暂停视频 */\n @Method()\n async pause () {\n this._pause()\n }\n\n _pause = () => this.videoRef.pause()\n\n /** 停止视频 */\n @Method()\n async stop () {\n this._stop()\n }\n\n _stop = () => {\n this.videoRef.pause()\n this._seek(0)\n }\n\n /** 跳转到指定位置 */\n @Method()\n async seek (position: number) {\n this._seek(position)\n }\n\n _seek = (position: number) => {\n this.videoRef.currentTime = position\n }\n\n /** 进入全屏。若有自定义内容需在全屏时展示,需将内容节点放置到 video 节点内。 */\n @Method()\n async requestFullScreen () {\n this.toggleFullScreen(true)\n }\n\n /** 退出全屏 */\n @Method()\n async exitFullScreen () {\n this.toggleFullScreen(false)\n }\n\n onTouchStartContainer = (e: TouchEvent) => {\n this.lastTouchScreenX = e.touches[0].screenX\n this.lastTouchScreenY = e.touches[0].screenY\n }\n\n onClickContainer = () => {\n if (this.enablePlayGesture) {\n const now = Date.now()\n if (now - this.lastClickedTime < 300) {\n // 双击\n this.isPlaying ? this.pause() : this.play()\n }\n this.lastClickedTime = now\n }\n this.controlsRef.toggleVisibility()\n }\n\n onClickFullScreenBtn = (e: MouseEvent) => {\n e.stopPropagation()\n this.toggleFullScreen()\n }\n\n handleFullScreenChange = e => {\n // 全屏后,\"退出\"走的是浏览器事件,在此同步状态\n const timestamp = new Date().getTime()\n if (!e.detail && this.isFullScreen && !document[screenFn.fullscreenElement] && timestamp - this.fullScreenTimestamp > 100) {\n this.toggleFullScreen(false)\n }\n }\n\n toggleFullScreen = (isFullScreen = !this.isFullScreen) => {\n this.isFullScreen = isFullScreen // this.videoRef?.['webkitDisplayingFullscreen']\n this.controlsRef.toggleVisibility(true)\n this.fullScreenTimestamp = new Date().getTime()\n this.onFullScreenChange.emit({\n fullScreen: this.isFullScreen,\n direction: 'vertical'\n })\n if (this.isFullScreen && !document[screenFn.fullscreenElement]) {\n setTimeout(() => {\n this.videoRef[screenFn.requestFullscreen]({ navigationUI: 'auto' })\n }, 0)\n }\n }\n\n toggleMute = (e: MouseEvent) => {\n e.stopPropagation()\n this.videoRef.muted = !this.isMute\n this.controlsRef.toggleVisibility(true)\n this.isMute = !this.isMute\n }\n\n toggleDanmu = (e: MouseEvent) => {\n e.stopPropagation()\n this.controlsRef.toggleVisibility(true)\n this._enableDanmu = !this._enableDanmu\n }\n\n render () {\n const {\n controls,\n autoplay,\n loop,\n muted,\n poster,\n objectFit,\n isFirst,\n isMute,\n isFullScreen,\n showCenterPlayBtn,\n isPlaying,\n _enableDanmu,\n showMuteBtn,\n danmuBtn,\n showFullscreenBtn,\n nativeProps\n } = this\n const duration = this.duration || this._duration\n const durationTime = formatTime(duration)\n\n return (\n <Host\n class={classNames('taro-video-container', {\n 'taro-video-type-fullscreen': isFullScreen\n })}\n onTouchStart={this.onTouchStartContainer}\n onClick={this.onClickContainer}\n >\n <video\n class='taro-video-video'\n style={{\n 'object-fit': objectFit\n }}\n ref={dom => {\n if (dom) {\n this.videoRef = dom as HTMLVideoElement\n }\n }}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n poster={controls ? poster : undefined}\n playsinline\n webkit-playsinline\n onPlay={this.handlePlay}\n onPause={this.handlePause}\n onEnded={this.handleEnded}\n onTimeUpdate={this.handleTimeUpdate}\n onError={this.handleError}\n onDurationChange={this.handleDurationChange}\n onProgress={this.handleProgress}\n onLoadedMetaData={this.handleLoadedMetaData}\n {...nativeProps}\n >\n 暂时不支持播放该视频\n </video>\n\n <taro-video-danmu\n ref={dom => {\n if (dom) {\n this.danmuRef = dom as HTMLTaroVideoDanmuElement\n }\n }}\n enable={_enableDanmu}\n />\n\n {isFirst && showCenterPlayBtn && !isPlaying && (\n <div class='taro-video-cover'>\n <div class='taro-video-cover-play-button' onClick={() => this.play()} />\n <p class='taro-video-cover-duration'>{durationTime}</p>\n </div>\n )}\n\n <taro-video-control\n ref={dom => {\n if (dom) {\n this.controlsRef = dom\n }\n }}\n controls={controls}\n currentTime={this.currentTime}\n duration={duration}\n isPlaying={this.isPlaying}\n pauseFunc={this._pause}\n playFunc={this._play}\n seekFunc={this._seek}\n showPlayBtn={this.showPlayBtn}\n showProgress={this.showProgress}\n >\n {showMuteBtn && (\n <div\n class={classNames('taro-video-mute', {\n 'taro-video-type-mute': isMute\n })}\n onClick={this.toggleMute}\n />\n )}\n {danmuBtn && (\n <div\n class={classNames('taro-video-danmu-button', {\n 'taro-video-danmu-button-active': _enableDanmu\n })}\n onClick={this.toggleDanmu}>\n 弹幕\n </div>\n )}\n {showFullscreenBtn && (\n <div\n class={classNames('taro-video-fullscreen', {\n 'taro-video-type-fullscreen': isFullScreen\n })}\n onClick={this.onClickFullScreenBtn}\n />\n )}\n </taro-video-control>\n\n <div class='taro-video-toast taro-video-toast-volume' ref={dom => {\n if (dom) {\n this.toastVolumeRef = dom\n }\n }}>\n <div class='taro-video-toast-title'>音量</div>\n <div class='taro-video-toast-icon' />\n <div class='taro-video-toast-value'>\n <div class='taro-video-toast-value-content' ref={dom => {\n if (dom) {\n this.toastVolumeBarRef = dom\n }\n }}>\n <div class='taro-video-toast-volume-grids'>\n {Array(10).fill(1).map(() => (\n <div class='taro-video-toast-volume-grids-item' />\n ))}\n </div>\n </div>\n </div>\n </div>\n\n <div class='taro-video-toast taro-video-toast-progress' ref={dom => {\n if (dom) {\n this.toastProgressRef = dom\n }\n }}>\n <div class='taro-video-toast-title' ref={dom => {\n if (dom) {\n this.toastProgressTitleRef = dom\n }\n }} />\n </div>\n </Host>\n )\n }\n}\n","import { Component, h, ComponentInterface, Prop, State, Host, Method } from '@stencil/core'\n\nexport interface Danmu {\n text: string\n color: string\n time: number,\n key: number,\n bottom: string\n}\n\n@Component({\n tag: 'taro-video-danmu'\n})\nexport class VideoDanmu implements ComponentInterface {\n private list: Danmu[] = []\n private danmuElList: HTMLParagraphElement[] = []\n private currentTime = 0\n\n @Prop() enable = false\n\n @State() danmuList: Danmu[] = []\n\n ensureProperties (danmu: Partial<Danmu>): Danmu {\n const clonedDanmu = { ...danmu } as Danmu\n if (!('time' in danmu)) {\n clonedDanmu.time = this.currentTime\n }\n clonedDanmu.key = Math.random()\n clonedDanmu.bottom = `${Math.random() * 90 + 5}%`\n return clonedDanmu\n }\n\n @Method()\n async sendDanmu (danmuList: Partial<Danmu> | Partial<Danmu>[] = []) {\n if (Array.isArray(danmuList)) {\n this.list = [\n ...this.list,\n ...danmuList.map(danmu => this.ensureProperties(danmu))\n ]\n } else {\n const danmu = danmuList\n this.list = [\n ...this.list,\n { ...this.ensureProperties(danmu) }\n ]\n }\n }\n\n @Method()\n async tick (currentTime: number) {\n this.currentTime = currentTime\n\n if (!this.enable) return\n\n const danmuList = this.list\n\n /**\n * @todo 这个判断对拖拽进度的处理不严谨\n */\n const newDanmuList = danmuList.filter(({ time }) => {\n return currentTime - time < 4 && currentTime > time\n })\n let shouldUpdate = false\n const oldDanmuList = this.danmuList\n\n if (newDanmuList.length !== oldDanmuList.length) {\n shouldUpdate = true\n } else {\n shouldUpdate = newDanmuList.some(({ key }) => {\n return oldDanmuList.every((danmu) => {\n return key !== danmu.key\n })\n })\n }\n if (shouldUpdate) {\n this.danmuList = newDanmuList\n }\n }\n\n componentDidUpdate () {\n requestAnimationFrame(() => {\n setTimeout(() => {\n const danmuElList = this.danmuElList.splice(0)\n danmuElList.forEach(danmu => {\n danmu.style.left = '0'\n danmu.style.webkitTransform = 'translateX(-100%)'\n danmu.style.transform = 'translateX(-100%)'\n })\n })\n })\n }\n\n render () {\n if (!this.enable) return ''\n\n return (\n <Host class='taro-video-danmu'>\n {this.danmuList.map(({ text, color, bottom, key }) => (\n <p\n class='taro-video-danmu-item'\n key={key}\n style={{\n color,\n bottom\n }}\n ref={ref => {\n if (ref) {\n this.danmuElList.push(ref)\n }\n }}\n >\n {text}\n </p>\n ))}\n </Host>\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/view/style/index.scss?tag=taro-view-core","src/components/view/view.tsx"],"names":["indexCss","View","this","startTime","prototype","onTouchStart","_this","hoverClass","touch","setTimeout","hover","hoverStartTime","timeoutEvent","onLongPress","emit","Date","now","onTouchMove","clearTimeout","onTouchEnd","spanTime","hoverStayTime","componentDidRender","el","childNodes","forEach","item","nodeType","document","COMMENT_NODE","render","cls","classNames","_a","concat","attr","animation","h","Host","Object","assign","class"],"mappings":"qJAAA,IAAMA,SAAW,gLCOJC,KAAI,mGAePC,KAAAC,UAAY,yEAVK,sBACD,eACP,iBACA,MAUjBF,EAAAG,UAAAC,aAAA,WAAA,IAAAC,EAAAJ,KACE,GAAIA,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,KACbC,YAAW,WACT,GAAIH,EAAKE,MAAO,CACdF,EAAKI,MAAQ,QAEdR,KAAKS,gBAGVT,KAAKU,aAAeH,YAAW,WAC7BH,EAAKO,YAAYC,SAChB,KACHZ,KAAKC,UAAYY,KAAKC,OAIxBf,EAAAG,UAAAa,YAAA,WACEC,aAAahB,KAAKU,eAIpBX,EAAAG,UAAAe,WAAA,WAAA,IAAAb,EAAAJ,KACE,IAAMkB,EAAWL,KAAKC,MAAQd,KAAKC,UACnC,GAAIiB,EAAW,IAAK,CAClBF,aAAahB,KAAKU,cAEpB,GAAIV,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,MACbC,YAAW,WACT,IAAKH,EAAKE,MAAO,CACfF,EAAKI,MAAQ,SAEdR,KAAKmB,iBAIZpB,EAAAG,UAAAkB,mBAAA,WACE,IAAMC,EAAKrB,KAAKqB,GAChBA,EAAGC,WAAWC,SAAQ,SAAAC,GACpB,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,UAIhFzB,EAAAG,UAAA0B,OAAA,iBACE,IAAMC,EAAMC,YAAUC,EAAA,GACpBA,EAAC,GAAAC,OAAGhC,KAAKK,aAAeL,KAAKQ,UAE/B,IAAIyB,EAAO,GACX,KAAMjC,KAAKkC,UAAW,CACpBD,EAAK,aAAejC,KAAKkC,UACzBD,EAAK,kBAAoBjC,KAAKkC,UAEhC,OACEC,EAACC,KAAIC,OAAAC,OAAA,CAACC,MAAOV,GAASI,GACpBE,EAAA,OAAA,sIAzES","sourcesContent":["body,\nhtml {\n user-select: none;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n}\n\ntaro-view-core {\n display: block;\n}\n","import { Component, Prop, h, ComponentInterface, Host, Listen, State, Event, EventEmitter, Element } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-view-core',\n styleUrl: './style/index.scss'\n})\nexport class View implements ComponentInterface {\n @Element() el: HTMLElement\n\n @Prop() animation: string\n @Prop() hoverClass: string\n @Prop() hoverStartTime = 50\n @Prop() hoverStayTime = 400\n @State() hover = false\n @State() touch = false\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n private timeoutEvent: ReturnType<typeof setTimeout>\n private startTime = 0\n\n @Listen('touchstart')\n onTouchStart () {\n if (this.hoverClass) {\n this.touch = true\n setTimeout(() => {\n if (this.touch) {\n this.hover = true\n }\n }, this.hoverStartTime)\n }\n\n this.timeoutEvent = setTimeout(() => {\n this.onLongPress.emit()\n }, 350)\n this.startTime = Date.now()\n }\n\n @Listen('touchmove')\n onTouchMove () {\n clearTimeout(this.timeoutEvent)\n }\n\n @Listen('touchend')\n onTouchEnd () {\n const spanTime = Date.now() - this.startTime\n if (spanTime < 350) {\n clearTimeout(this.timeoutEvent)\n }\n if (this.hoverClass) {\n this.touch = false\n setTimeout(() => {\n if (!this.touch) {\n this.hover = false\n }\n }, this.hoverStayTime)\n }\n }\n\n componentDidRender () {\n const el = this.el\n el.childNodes.forEach(item => {\n if (item.nodeType === document.COMMENT_NODE && item[\"s-cn\"]) item[\"s-cn\"] = false\n })\n }\n\n render() {\n const cls = classNames({\n [`${this.hoverClass}`]: this.hover\n })\n let attr = {}\n if (!!this.animation) {\n attr['animation'] = this.animation\n attr['data-animation'] = this.animation\n }\n return (\n <Host class={cls} {...attr}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/voip-room/voip-room.tsx"],"names":["VoipRoom","prototype","componentDidLoad","notSupport","this","render","h","Host"],"mappings":"8IAOaA,SAAQ,kDACnBA,EAAAC,UAAAC,iBAAA,WACEC,WAAW,WAAYC,OAGzBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,KAAI,gBAPU","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-voip-room-core'\n})\nexport class VoipRoom implements ComponentInterface {\n componentDidLoad () {\n notSupport('VoipRoom', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/web-view/style/index.scss?tag=taro-web-view-core","src/components/web-view/web-view.tsx"],"names":["indexCss","WebView","prototype","render","_a","this","src","onLoad","onError","h","class","e","stopPropagation","emit"],"mappings":"0EAAA,IAAMA,SAAW,yGCMJC,QAAO,qJAalBA,EAAAC,UAAAC,OAAA,WACQ,IAAAC,EAIFC,KAHFC,EAAGF,EAAAE,IACHC,EAAMH,EAAAG,OACNC,EAAOJ,EAAAI,QAET,OACEC,EAAA,SAAA,CACEC,MAAM,eACNH,OAAQ,SAACI,GACPA,EAAEC,kBACFL,EAAOM,KAAK,CAAEP,IAAGA,KAEnBE,QAAS,SAACG,GACRA,EAAEC,kBACFJ,EAAQK,KAAK,CAAEP,IAAGA,KAEpBA,IAAKA,cA9BO","sourcesContent":["iframe {\n border: none;\n}\n\n.taro-webview {\n position: fixed;\n top: 0;\n bottom: 0;\n z-index: 999;\n width: 100%;\n height: 100%;\n}\n","import { Component, h, ComponentInterface, Prop, Event, EventEmitter } from '@stencil/core'\n\n@Component({\n tag: 'taro-web-view-core',\n styleUrl: './style/index.scss'\n})\nexport class WebView implements ComponentInterface {\n @Prop() src: string\n\n @Event({\n eventName: 'load'\n })\n onLoad: EventEmitter\n\n @Event({\n eventName: 'error'\n })\n onError: EventEmitter\n\n render () {\n const {\n src,\n onLoad,\n onError\n } = this\n return (\n <iframe\n class='taro-webview'\n onLoad={(e: Event) => {\n e.stopPropagation()\n onLoad.emit({ src })\n }}\n onError={(e: Event) => {\n e.stopPropagation()\n onError.emit({ src })\n }}\n src={src}\n />\n )\n }\n}\n"]}
@@ -1,65 +0,0 @@
1
- /* eslint-disable */
2
-
3
- /* tslint:disable */
4
-
5
- /* auto-generated react proxies */
6
- import { manipulatePropsFunction } from './helper';
7
- import { createReactComponent } from './react-component-lib';
8
- export var Ad = /*@__PURE__*/createReactComponent('taro-ad-core', undefined, manipulatePropsFunction);
9
- export var AdCustom = /*@__PURE__*/createReactComponent('taro-ad-custom-core', undefined, manipulatePropsFunction);
10
- export var Audio = /*@__PURE__*/createReactComponent('taro-audio-core', undefined, manipulatePropsFunction);
11
- export var Block = /*@__PURE__*/createReactComponent('taro-block-core', undefined, manipulatePropsFunction);
12
- export var Button = /*@__PURE__*/createReactComponent('taro-button-core', undefined, manipulatePropsFunction);
13
- export var Camera = /*@__PURE__*/createReactComponent('taro-camera-core', undefined, manipulatePropsFunction);
14
- export var Canvas = /*@__PURE__*/createReactComponent('taro-canvas-core', undefined, manipulatePropsFunction);
15
- export var Checkbox = /*@__PURE__*/createReactComponent('taro-checkbox-core', undefined, manipulatePropsFunction);
16
- export var CheckboxGroup = /*@__PURE__*/createReactComponent('taro-checkbox-group-core', undefined, manipulatePropsFunction);
17
- export var CoverImage = /*@__PURE__*/createReactComponent('taro-cover-image-core', undefined, manipulatePropsFunction);
18
- export var CoverView = /*@__PURE__*/createReactComponent('taro-cover-view-core', undefined, manipulatePropsFunction);
19
- export var CustomWrapper = /*@__PURE__*/createReactComponent('taro-custom-wrapper-core', undefined, manipulatePropsFunction);
20
- export var Editor = /*@__PURE__*/createReactComponent('taro-editor-core', undefined, manipulatePropsFunction);
21
- export var Form = /*@__PURE__*/createReactComponent('taro-form-core', undefined, manipulatePropsFunction);
22
- export var FunctionalPageNavigator = /*@__PURE__*/createReactComponent('taro-functional-page-navigator-core', undefined, manipulatePropsFunction);
23
- export var Icon = /*@__PURE__*/createReactComponent('taro-icon-core', undefined, manipulatePropsFunction);
24
- export var Image = /*@__PURE__*/createReactComponent('taro-image-core', undefined, manipulatePropsFunction);
25
- export var Input = /*@__PURE__*/createReactComponent('taro-input-core', undefined, manipulatePropsFunction);
26
- export var KeyboardAccessory = /*@__PURE__*/createReactComponent('taro-keyboard-accessory-core', undefined, manipulatePropsFunction);
27
- export var Label = /*@__PURE__*/createReactComponent('taro-label-core', undefined, manipulatePropsFunction);
28
- export var LivePlayer = /*@__PURE__*/createReactComponent('taro-live-player-core', undefined, manipulatePropsFunction);
29
- export var LivePusher = /*@__PURE__*/createReactComponent('taro-live-pusher-core', undefined, manipulatePropsFunction);
30
- export var Map = /*@__PURE__*/createReactComponent('taro-map-core', undefined, manipulatePropsFunction);
31
- export var MatchMedia = /*@__PURE__*/createReactComponent('taro-match-media-core', undefined, manipulatePropsFunction);
32
- export var MovableArea = /*@__PURE__*/createReactComponent('taro-movable-area-core', undefined, manipulatePropsFunction);
33
- export var MovableView = /*@__PURE__*/createReactComponent('taro-movable-view-core', undefined, manipulatePropsFunction);
34
- export var NavigationBar = /*@__PURE__*/createReactComponent('taro-navigation-bar-core', undefined, manipulatePropsFunction);
35
- export var Navigator = /*@__PURE__*/createReactComponent('taro-navigator-core', undefined, manipulatePropsFunction);
36
- export var OfficialAccount = /*@__PURE__*/createReactComponent('taro-official-account-core', undefined, manipulatePropsFunction);
37
- export var OpenData = /*@__PURE__*/createReactComponent('taro-open-data-core', undefined, manipulatePropsFunction);
38
- export var PageContainer = /*@__PURE__*/createReactComponent('taro-page-container-core', undefined, manipulatePropsFunction);
39
- export var PageMeta = /*@__PURE__*/createReactComponent('taro-page-meta-core', undefined, manipulatePropsFunction);
40
- export var Picker = /*@__PURE__*/createReactComponent('taro-picker-core', undefined, manipulatePropsFunction);
41
- export var PickerGroup = /*@__PURE__*/createReactComponent('taro-picker-group', undefined, manipulatePropsFunction);
42
- export var PickerViewColumn = /*@__PURE__*/createReactComponent('taro-picker-view-column-core', undefined, manipulatePropsFunction);
43
- export var PickerView = /*@__PURE__*/createReactComponent('taro-picker-view-core', undefined, manipulatePropsFunction);
44
- export var Progress = /*@__PURE__*/createReactComponent('taro-progress-core', undefined, manipulatePropsFunction);
45
- export var PullToRefresh = /*@__PURE__*/createReactComponent('taro-pull-to-refresh', undefined, manipulatePropsFunction);
46
- export var Radio = /*@__PURE__*/createReactComponent('taro-radio-core', undefined, manipulatePropsFunction);
47
- export var RadioGroup = /*@__PURE__*/createReactComponent('taro-radio-group-core', undefined, manipulatePropsFunction);
48
- export var RichText = /*@__PURE__*/createReactComponent('taro-rich-text-core', undefined, manipulatePropsFunction);
49
- export var RootPortal = /*@__PURE__*/createReactComponent('taro-root-portal-core', undefined, manipulatePropsFunction);
50
- export var ScrollView = /*@__PURE__*/createReactComponent('taro-scroll-view-core', undefined, manipulatePropsFunction);
51
- export var ShareElement = /*@__PURE__*/createReactComponent('taro-share-element-core', undefined, manipulatePropsFunction);
52
- export var Slider = /*@__PURE__*/createReactComponent('taro-slider-core', undefined, manipulatePropsFunction);
53
- export var Slot = /*@__PURE__*/createReactComponent('taro-slot-core', undefined, manipulatePropsFunction);
54
- export var Swiper = /*@__PURE__*/createReactComponent('taro-swiper-core', undefined, manipulatePropsFunction);
55
- export var SwiperItem = /*@__PURE__*/createReactComponent('taro-swiper-item-core', undefined, manipulatePropsFunction);
56
- export var Switch = /*@__PURE__*/createReactComponent('taro-switch-core', undefined, manipulatePropsFunction);
57
- export var Tabbar = /*@__PURE__*/createReactComponent('taro-tabbar', undefined, manipulatePropsFunction);
58
- export var Text = /*@__PURE__*/createReactComponent('taro-text-core', undefined, manipulatePropsFunction);
59
- export var Textarea = /*@__PURE__*/createReactComponent('taro-textarea-core', undefined, manipulatePropsFunction);
60
- export var VideoControl = /*@__PURE__*/createReactComponent('taro-video-control', undefined, manipulatePropsFunction);
61
- export var Video = /*@__PURE__*/createReactComponent('taro-video-core', undefined, manipulatePropsFunction);
62
- export var VideoDanmu = /*@__PURE__*/createReactComponent('taro-video-danmu', undefined, manipulatePropsFunction);
63
- export var View = /*@__PURE__*/createReactComponent('taro-view-core', undefined, manipulatePropsFunction);
64
- export var VoipRoom = /*@__PURE__*/createReactComponent('taro-voip-room-core', undefined, manipulatePropsFunction);
65
- export var WebView = /*@__PURE__*/createReactComponent('taro-web-view-core', undefined, manipulatePropsFunction);
@@ -1,13 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
-
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
-
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
-
7
- export var manipulatePropsFunction = function manipulatePropsFunction(originalProps) {
8
- var propsToPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9
- var dangerouslySetInnerHTML = originalProps.dangerouslySetInnerHTML;
10
- return _objectSpread(_objectSpread({}, propsToPass), {}, {
11
- dangerouslySetInnerHTML: dangerouslySetInnerHTML
12
- });
13
- };
@@ -1,126 +0,0 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime/helpers/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- var _excluded = ["children", "forwardedRef", "style", "className", "ref"];
11
-
12
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
-
14
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
-
16
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
17
-
18
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
19
-
20
- import React, { createElement } from 'react';
21
- import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
22
- export var createReactComponent = function createReactComponent(tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) {
23
- if (defineCustomElement !== undefined) {
24
- defineCustomElement();
25
- }
26
-
27
- var displayName = dashToPascalCase(tagName);
28
-
29
- var ReactComponent = /*#__PURE__*/function (_React$Component) {
30
- _inherits(ReactComponent, _React$Component);
31
-
32
- var _super = _createSuper(ReactComponent);
33
-
34
- function ReactComponent(props) {
35
- var _this;
36
-
37
- _classCallCheck(this, ReactComponent);
38
-
39
- _this = _super.call(this, props);
40
-
41
- _defineProperty(_assertThisInitialized(_this), "setComponentElRef", function (element) {
42
- _this.componentEl = element;
43
- });
44
-
45
- return _this;
46
- }
47
-
48
- _createClass(ReactComponent, [{
49
- key: "componentDidMount",
50
- value: function componentDidMount() {
51
- this.componentDidUpdate(this.props);
52
- }
53
- }, {
54
- key: "componentDidUpdate",
55
- value: function componentDidUpdate(prevProps) {
56
- attachProps(this.componentEl, this.props, prevProps);
57
- }
58
- }, {
59
- key: "render",
60
- value: function render() {
61
- var _this$props = this.props,
62
- children = _this$props.children,
63
- forwardedRef = _this$props.forwardedRef,
64
- style = _this$props.style,
65
- className = _this$props.className,
66
- ref = _this$props.ref,
67
- cProps = _objectWithoutProperties(_this$props, _excluded);
68
-
69
- var propsToPass = Object.keys(cProps).reduce(function (acc, name) {
70
- var value = cProps[name];
71
-
72
- if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
73
- var eventName = name.substring(2).toLowerCase();
74
-
75
- if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
76
- acc[name] = value;
77
- }
78
- } else {
79
- // we should only render strings, booleans, and numbers as attrs in html.
80
- // objects, functions, arrays etc get synced via properties on mount.
81
- var type = _typeof(value);
82
-
83
- if (type === 'string' || type === 'boolean' || type === 'number') {
84
- acc[camelToDashCase(name)] = value;
85
- }
86
- }
87
-
88
- return acc;
89
- }, {});
90
-
91
- if (manipulatePropsFunction) {
92
- propsToPass = manipulatePropsFunction(this.props, propsToPass);
93
- }
94
-
95
- var newProps = _objectSpread(_objectSpread({}, propsToPass), {}, {
96
- ref: mergeRefs(forwardedRef, this.setComponentElRef),
97
- style: style
98
- });
99
- /**
100
- * We use createElement here instead of
101
- * React.createElement to work around a
102
- * bug in Vite (https://github.com/vitejs/vite/issues/6104).
103
- * React.createElement causes all elements to be rendered
104
- * as <tagname> instead of the actual Web Component.
105
- */
106
-
107
-
108
- return createElement(tagName, newProps, children);
109
- }
110
- }], [{
111
- key: "displayName",
112
- get: function get() {
113
- return displayName;
114
- }
115
- }]);
116
-
117
- return ReactComponent;
118
- }(React.Component); // If context was passed to createReactComponent then conditionally add it to the Component Class
119
-
120
-
121
- if (ReactComponentContext) {
122
- ReactComponent.contextType = ReactComponentContext;
123
- }
124
-
125
- return createForwardRef(ReactComponent, displayName);
126
- };