@tarojs/components 3.6.0-canary.1 → 3.6.0-canary.10

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 (438) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-animation-video-core.cjs.entry.js +23 -0
  3. package/dist/cjs/taro-animation-video-core.cjs.entry.js.map +1 -0
  4. package/dist/cjs/taro-animation-view-core.cjs.entry.js +23 -0
  5. package/dist/cjs/taro-animation-view-core.cjs.entry.js.map +1 -0
  6. package/dist/cjs/taro-ar-camera-core.cjs.entry.js +23 -0
  7. package/dist/cjs/taro-ar-camera-core.cjs.entry.js.map +1 -0
  8. package/dist/cjs/taro-aweme-data-core.cjs.entry.js +23 -0
  9. package/dist/cjs/taro-aweme-data-core.cjs.entry.js.map +1 -0
  10. package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
  11. package/dist/cjs/taro-button-core.cjs.entry.js.map +1 -1
  12. package/dist/cjs/taro-comment-detail-core.cjs.entry.js +23 -0
  13. package/dist/cjs/taro-comment-detail-core.cjs.entry.js.map +1 -0
  14. package/dist/cjs/taro-comment-list-core.cjs.entry.js +23 -0
  15. package/dist/cjs/taro-comment-list-core.cjs.entry.js.map +1 -0
  16. package/dist/cjs/taro-components.cjs.js +1 -1
  17. package/dist/cjs/taro-contact-button-core.cjs.entry.js +23 -0
  18. package/dist/cjs/taro-contact-button-core.cjs.entry.js.map +1 -0
  19. package/dist/cjs/taro-follow-swan-core.cjs.entry.js +23 -0
  20. package/dist/cjs/taro-follow-swan-core.cjs.entry.js.map +1 -0
  21. package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js +23 -0
  22. package/dist/cjs/taro-inline-payment-panel-core.cjs.entry.js.map +1 -0
  23. package/dist/cjs/taro-lifestyle-core.cjs.entry.js +23 -0
  24. package/dist/cjs/taro-lifestyle-core.cjs.entry.js.map +1 -0
  25. package/dist/cjs/taro-like-core.cjs.entry.js +23 -0
  26. package/dist/cjs/taro-like-core.cjs.entry.js.map +1 -0
  27. package/dist/cjs/taro-login-core.cjs.entry.js +23 -0
  28. package/dist/cjs/taro-login-core.cjs.entry.js.map +1 -0
  29. package/dist/cjs/taro-lottie-core.cjs.entry.js +23 -0
  30. package/dist/cjs/taro-lottie-core.cjs.entry.js.map +1 -0
  31. package/dist/cjs/taro-native-slot-core.cjs.entry.js +23 -0
  32. package/dist/cjs/taro-native-slot-core.cjs.entry.js.map +1 -0
  33. package/dist/cjs/taro-rtc-room-core.cjs.entry.js +23 -0
  34. package/dist/cjs/taro-rtc-room-core.cjs.entry.js.map +1 -0
  35. package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js +23 -0
  36. package/dist/cjs/taro-rtc-room-item-core.cjs.entry.js.map +1 -0
  37. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
  38. package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +1 -1
  39. package/dist/cjs/taro-slot-core.cjs.entry.js +5 -0
  40. package/dist/cjs/taro-slot-core.cjs.entry.js.map +1 -1
  41. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -0
  42. package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
  43. package/dist/cjs/taro-tab-item-core.cjs.entry.js +23 -0
  44. package/dist/cjs/taro-tab-item-core.cjs.entry.js.map +1 -0
  45. package/dist/cjs/taro-tabbar.cjs.entry.js.map +1 -1
  46. package/dist/cjs/taro-tabs-core.cjs.entry.js +23 -0
  47. package/dist/cjs/taro-tabs-core.cjs.entry.js.map +1 -0
  48. package/dist/cjs/taro-view-core.cjs.entry.js +6 -2
  49. package/dist/cjs/taro-view-core.cjs.entry.js.map +1 -1
  50. package/dist/collection/collection-manifest.json +18 -0
  51. package/dist/collection/components/animation-video/animation-video.js +12 -0
  52. package/dist/collection/components/animation-video/animation-video.js.map +1 -0
  53. package/dist/collection/components/animation-view/animation-view.js +12 -0
  54. package/dist/collection/components/animation-view/animation-view.js.map +1 -0
  55. package/dist/collection/components/ar-camera/ar-camera.js +12 -0
  56. package/dist/collection/components/ar-camera/ar-camera.js.map +1 -0
  57. package/dist/collection/components/aweme-data/aweme-data.js +12 -0
  58. package/dist/collection/components/aweme-data/aweme-data.js.map +1 -0
  59. package/dist/collection/components/button/button.js +11 -0
  60. package/dist/collection/components/button/button.js.map +1 -1
  61. package/dist/collection/components/comment/comment-detail.js +12 -0
  62. package/dist/collection/components/comment/comment-detail.js.map +1 -0
  63. package/dist/collection/components/comment/comment-list.js +12 -0
  64. package/dist/collection/components/comment/comment-list.js.map +1 -0
  65. package/dist/collection/components/contact-button/contact-button.js +12 -0
  66. package/dist/collection/components/contact-button/contact-button.js.map +1 -0
  67. package/dist/collection/components/follow-swan/follow-swan.js +12 -0
  68. package/dist/collection/components/follow-swan/follow-swan.js.map +1 -0
  69. package/dist/collection/components/inline-payment-panel/inline-payment-panel.js +12 -0
  70. package/dist/collection/components/inline-payment-panel/inline-payment-panel.js.map +1 -0
  71. package/dist/collection/components/lifestyle/lifestyle.js +12 -0
  72. package/dist/collection/components/lifestyle/lifestyle.js.map +1 -0
  73. package/dist/collection/components/like/like.js +12 -0
  74. package/dist/collection/components/like/like.js.map +1 -0
  75. package/dist/collection/components/login/login.js +12 -0
  76. package/dist/collection/components/login/login.js.map +1 -0
  77. package/dist/collection/components/lottie/lottie.js +12 -0
  78. package/dist/collection/components/lottie/lottie.js.map +1 -0
  79. package/dist/collection/components/rtc-room/rtc-room-item.js +12 -0
  80. package/dist/collection/components/rtc-room/rtc-room-item.js.map +1 -0
  81. package/dist/collection/components/rtc-room/rtc-room.js +12 -0
  82. package/dist/collection/components/rtc-room/rtc-room.js.map +1 -0
  83. package/dist/collection/components/scroll-view/scroll-view.js +1 -1
  84. package/dist/collection/components/scroll-view/scroll-view.js.map +1 -1
  85. package/dist/collection/components/slot/native-slot.js +12 -0
  86. package/dist/collection/components/slot/native-slot.js.map +1 -0
  87. package/dist/collection/components/slot/slot.js +4 -0
  88. package/dist/collection/components/slot/slot.js.map +1 -1
  89. package/dist/collection/components/swiper/swiper.js +20 -0
  90. package/dist/collection/components/swiper/swiper.js.map +1 -1
  91. package/dist/collection/components/tabs/tab-item.js +12 -0
  92. package/dist/collection/components/tabs/tab-item.js.map +1 -0
  93. package/dist/collection/components/tabs/tabs.js +12 -0
  94. package/dist/collection/components/tabs/tabs.js.map +1 -0
  95. package/dist/collection/components/view/view.js +6 -2
  96. package/dist/collection/components/view/view.js.map +1 -1
  97. package/dist/esm/loader.js +1 -1
  98. package/dist/esm/taro-animation-video-core.entry.js +19 -0
  99. package/dist/esm/taro-animation-video-core.entry.js.map +1 -0
  100. package/dist/esm/taro-animation-view-core.entry.js +19 -0
  101. package/dist/esm/taro-animation-view-core.entry.js.map +1 -0
  102. package/dist/esm/taro-ar-camera-core.entry.js +19 -0
  103. package/dist/esm/taro-ar-camera-core.entry.js.map +1 -0
  104. package/dist/esm/taro-aweme-data-core.entry.js +19 -0
  105. package/dist/esm/taro-aweme-data-core.entry.js.map +1 -0
  106. package/dist/esm/taro-button-core.entry.js +5 -0
  107. package/dist/esm/taro-button-core.entry.js.map +1 -1
  108. package/dist/esm/taro-comment-detail-core.entry.js +19 -0
  109. package/dist/esm/taro-comment-detail-core.entry.js.map +1 -0
  110. package/dist/esm/taro-comment-list-core.entry.js +19 -0
  111. package/dist/esm/taro-comment-list-core.entry.js.map +1 -0
  112. package/dist/esm/taro-components.js +1 -1
  113. package/dist/esm/taro-contact-button-core.entry.js +19 -0
  114. package/dist/esm/taro-contact-button-core.entry.js.map +1 -0
  115. package/dist/esm/taro-follow-swan-core.entry.js +19 -0
  116. package/dist/esm/taro-follow-swan-core.entry.js.map +1 -0
  117. package/dist/esm/taro-inline-payment-panel-core.entry.js +19 -0
  118. package/dist/esm/taro-inline-payment-panel-core.entry.js.map +1 -0
  119. package/dist/esm/taro-lifestyle-core.entry.js +19 -0
  120. package/dist/esm/taro-lifestyle-core.entry.js.map +1 -0
  121. package/dist/esm/taro-like-core.entry.js +19 -0
  122. package/dist/esm/taro-like-core.entry.js.map +1 -0
  123. package/dist/esm/taro-login-core.entry.js +19 -0
  124. package/dist/esm/taro-login-core.entry.js.map +1 -0
  125. package/dist/esm/taro-lottie-core.entry.js +19 -0
  126. package/dist/esm/taro-lottie-core.entry.js.map +1 -0
  127. package/dist/esm/taro-native-slot-core.entry.js +19 -0
  128. package/dist/esm/taro-native-slot-core.entry.js.map +1 -0
  129. package/dist/esm/taro-rtc-room-core.entry.js +19 -0
  130. package/dist/esm/taro-rtc-room-core.entry.js.map +1 -0
  131. package/dist/esm/taro-rtc-room-item-core.entry.js +19 -0
  132. package/dist/esm/taro-rtc-room-item-core.entry.js.map +1 -0
  133. package/dist/esm/taro-scroll-view-core.entry.js +1 -1
  134. package/dist/esm/taro-scroll-view-core.entry.js.map +1 -1
  135. package/dist/esm/taro-slot-core.entry.js +5 -0
  136. package/dist/esm/taro-slot-core.entry.js.map +1 -1
  137. package/dist/esm/taro-swiper-core_2.entry.js +2 -0
  138. package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
  139. package/dist/esm/taro-tab-item-core.entry.js +19 -0
  140. package/dist/esm/taro-tab-item-core.entry.js.map +1 -0
  141. package/dist/esm/taro-tabbar.entry.js.map +1 -1
  142. package/dist/esm/taro-tabs-core.entry.js +19 -0
  143. package/dist/esm/taro-tabs-core.entry.js.map +1 -0
  144. package/dist/esm/taro-view-core.entry.js +6 -2
  145. package/dist/esm/taro-view-core.entry.js.map +1 -1
  146. package/dist/esm-es5/loader.js +1 -1
  147. package/dist/esm-es5/loader.js.map +1 -1
  148. package/dist/esm-es5/taro-animation-video-core.entry.js +2 -0
  149. package/dist/esm-es5/taro-animation-video-core.entry.js.map +1 -0
  150. package/dist/esm-es5/taro-animation-view-core.entry.js +2 -0
  151. package/dist/esm-es5/taro-animation-view-core.entry.js.map +1 -0
  152. package/dist/esm-es5/taro-ar-camera-core.entry.js +2 -0
  153. package/dist/esm-es5/taro-ar-camera-core.entry.js.map +1 -0
  154. package/dist/esm-es5/taro-aweme-data-core.entry.js +2 -0
  155. package/dist/esm-es5/taro-aweme-data-core.entry.js.map +1 -0
  156. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  157. package/dist/esm-es5/taro-button-core.entry.js.map +1 -1
  158. package/dist/esm-es5/taro-comment-detail-core.entry.js +2 -0
  159. package/dist/esm-es5/taro-comment-detail-core.entry.js.map +1 -0
  160. package/dist/esm-es5/taro-comment-list-core.entry.js +2 -0
  161. package/dist/esm-es5/taro-comment-list-core.entry.js.map +1 -0
  162. package/dist/esm-es5/taro-components.js +1 -1
  163. package/dist/esm-es5/taro-components.js.map +1 -1
  164. package/dist/esm-es5/taro-contact-button-core.entry.js +2 -0
  165. package/dist/esm-es5/taro-contact-button-core.entry.js.map +1 -0
  166. package/dist/esm-es5/taro-follow-swan-core.entry.js +2 -0
  167. package/dist/esm-es5/taro-follow-swan-core.entry.js.map +1 -0
  168. package/dist/esm-es5/taro-inline-payment-panel-core.entry.js +2 -0
  169. package/dist/esm-es5/taro-inline-payment-panel-core.entry.js.map +1 -0
  170. package/dist/esm-es5/taro-lifestyle-core.entry.js +2 -0
  171. package/dist/esm-es5/taro-lifestyle-core.entry.js.map +1 -0
  172. package/dist/esm-es5/taro-like-core.entry.js +2 -0
  173. package/dist/esm-es5/taro-like-core.entry.js.map +1 -0
  174. package/dist/esm-es5/taro-login-core.entry.js +2 -0
  175. package/dist/esm-es5/taro-login-core.entry.js.map +1 -0
  176. package/dist/esm-es5/taro-lottie-core.entry.js +2 -0
  177. package/dist/esm-es5/taro-lottie-core.entry.js.map +1 -0
  178. package/dist/esm-es5/taro-native-slot-core.entry.js +2 -0
  179. package/dist/esm-es5/taro-native-slot-core.entry.js.map +1 -0
  180. package/dist/esm-es5/taro-rtc-room-core.entry.js +2 -0
  181. package/dist/esm-es5/taro-rtc-room-core.entry.js.map +1 -0
  182. package/dist/esm-es5/taro-rtc-room-item-core.entry.js +2 -0
  183. package/dist/esm-es5/taro-rtc-room-item-core.entry.js.map +1 -0
  184. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  185. package/dist/esm-es5/taro-scroll-view-core.entry.js.map +1 -1
  186. package/dist/esm-es5/taro-slot-core.entry.js +1 -1
  187. package/dist/esm-es5/taro-slot-core.entry.js.map +1 -1
  188. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  189. package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
  190. package/dist/esm-es5/taro-tab-item-core.entry.js +2 -0
  191. package/dist/esm-es5/taro-tab-item-core.entry.js.map +1 -0
  192. package/dist/esm-es5/taro-tabbar.entry.js.map +1 -1
  193. package/dist/esm-es5/taro-tabs-core.entry.js +2 -0
  194. package/dist/esm-es5/taro-tabs-core.entry.js.map +1 -0
  195. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  196. package/dist/esm-es5/taro-view-core.entry.js.map +1 -1
  197. package/dist/react/component-lib/index.js +20 -10
  198. package/dist/react/component-lib/input.js +4 -10
  199. package/dist/react/component-lib/reactify-wc.js +21 -60
  200. package/dist/react/components.js +21 -4
  201. package/dist/react/helper.js +1 -6
  202. package/dist/react/react-component-lib/createComponent.js +99 -0
  203. package/dist/react/react-component-lib/createOverlayComponent.js +178 -0
  204. package/dist/react/react-component-lib/interfaces.js +0 -1
  205. package/dist/react/react-component-lib/utils/attachProps.js +10 -19
  206. package/dist/react/react-component-lib/utils/index.js +37 -0
  207. package/dist/taro-components/p-0be383a9.system.entry.js +2 -0
  208. package/dist/taro-components/p-0be383a9.system.entry.js.map +1 -0
  209. package/dist/taro-components/p-186ad7ff.entry.js +2 -0
  210. package/dist/taro-components/p-186ad7ff.entry.js.map +1 -0
  211. package/dist/taro-components/{p-e9abe3e2.entry.js → p-19afe402.entry.js} +2 -2
  212. package/dist/taro-components/p-19afe402.entry.js.map +1 -0
  213. package/dist/taro-components/p-1a47133c.system.entry.js +2 -0
  214. package/dist/taro-components/p-1a47133c.system.entry.js.map +1 -0
  215. package/dist/taro-components/p-1ad0aa95.system.entry.js +2 -0
  216. package/dist/taro-components/p-1ad0aa95.system.entry.js.map +1 -0
  217. package/dist/taro-components/p-1b1420c9.system.entry.js +2 -0
  218. package/dist/taro-components/p-1b1420c9.system.entry.js.map +1 -0
  219. package/dist/taro-components/p-281a2bcf.entry.js +2 -0
  220. package/dist/taro-components/p-281a2bcf.entry.js.map +1 -0
  221. package/dist/taro-components/p-28dade4f.entry.js +2 -0
  222. package/dist/taro-components/p-28dade4f.entry.js.map +1 -0
  223. package/dist/taro-components/p-31e10d77.system.entry.js +2 -0
  224. package/dist/taro-components/p-31e10d77.system.entry.js.map +1 -0
  225. package/dist/taro-components/p-36c64ed0.system.entry.js +2 -0
  226. package/dist/taro-components/p-36c64ed0.system.entry.js.map +1 -0
  227. package/dist/taro-components/p-37d71e63.entry.js +2 -0
  228. package/dist/taro-components/p-37d71e63.entry.js.map +1 -0
  229. package/dist/taro-components/p-386b9de8.entry.js +2 -0
  230. package/dist/taro-components/p-386b9de8.entry.js.map +1 -0
  231. package/dist/taro-components/{p-22f9f9fa.entry.js → p-427a2872.entry.js} +2 -2
  232. package/dist/taro-components/p-427a2872.entry.js.map +1 -0
  233. package/dist/taro-components/p-49a6cae4.system.entry.js.map +1 -1
  234. package/dist/taro-components/p-51040638.entry.js +2 -0
  235. package/dist/taro-components/p-51040638.entry.js.map +1 -0
  236. package/dist/taro-components/p-5bd1c1a1.entry.js +2 -0
  237. package/dist/taro-components/p-5bd1c1a1.entry.js.map +1 -0
  238. package/dist/taro-components/p-62d750a7.entry.js +2 -0
  239. package/dist/taro-components/p-62d750a7.entry.js.map +1 -0
  240. package/dist/taro-components/p-632f9a72.system.entry.js +2 -0
  241. package/dist/taro-components/p-632f9a72.system.entry.js.map +1 -0
  242. package/dist/taro-components/p-65971d99.entry.js +2 -0
  243. package/dist/taro-components/p-65971d99.entry.js.map +1 -0
  244. package/dist/taro-components/{p-1cd1c507.system.entry.js → p-6831f7b1.system.entry.js} +2 -2
  245. package/dist/taro-components/p-6831f7b1.system.entry.js.map +1 -0
  246. package/dist/taro-components/p-6c622fa2.system.entry.js +2 -0
  247. package/dist/taro-components/p-6c622fa2.system.entry.js.map +1 -0
  248. package/dist/taro-components/p-6cd941bc.entry.js +2 -0
  249. package/dist/taro-components/p-6cd941bc.entry.js.map +1 -0
  250. package/dist/taro-components/p-70defa84.entry.js +2 -0
  251. package/dist/taro-components/p-70defa84.entry.js.map +1 -0
  252. package/dist/taro-components/p-73106bc9.entry.js +2 -0
  253. package/dist/taro-components/p-73106bc9.entry.js.map +1 -0
  254. package/dist/taro-components/p-7afc274a.entry.js +2 -0
  255. package/dist/taro-components/p-7afc274a.entry.js.map +1 -0
  256. package/dist/taro-components/p-7bafbe22.entry.js +2 -0
  257. package/dist/taro-components/p-7bafbe22.entry.js.map +1 -0
  258. package/dist/taro-components/p-7e7a1e62.entry.js +2 -0
  259. package/dist/taro-components/p-7e7a1e62.entry.js.map +1 -0
  260. package/dist/taro-components/p-876edf66.entry.js +2 -0
  261. package/dist/taro-components/p-876edf66.entry.js.map +1 -0
  262. package/dist/taro-components/p-898aba38.system.entry.js +2 -0
  263. package/dist/taro-components/p-898aba38.system.entry.js.map +1 -0
  264. package/dist/taro-components/p-98901e99.system.entry.js +2 -0
  265. package/dist/taro-components/p-98901e99.system.entry.js.map +1 -0
  266. package/dist/taro-components/p-9f780103.system.entry.js +2 -0
  267. package/dist/taro-components/p-9f780103.system.entry.js.map +1 -0
  268. package/dist/taro-components/p-a4961ddd.entry.js +2 -0
  269. package/dist/taro-components/p-a4961ddd.entry.js.map +1 -0
  270. package/dist/taro-components/p-ad25cc91.system.entry.js +2 -0
  271. package/dist/taro-components/p-ad25cc91.system.entry.js.map +1 -0
  272. package/dist/taro-components/p-b4cccb3e.system.entry.js +2 -0
  273. package/dist/taro-components/p-b4cccb3e.system.entry.js.map +1 -0
  274. package/dist/taro-components/p-b6733e23.system.entry.js +2 -0
  275. package/dist/taro-components/p-b6733e23.system.entry.js.map +1 -0
  276. package/dist/taro-components/{p-c3acf0ea.system.entry.js → p-c43fe342.system.entry.js} +2 -2
  277. package/dist/taro-components/p-c43fe342.system.entry.js.map +1 -0
  278. package/dist/taro-components/p-cb17d8bd.system.js +1 -1
  279. package/dist/taro-components/p-cb17d8bd.system.js.map +1 -1
  280. package/dist/taro-components/{p-a2aab820.entry.js → p-d388c097.entry.js} +2 -2
  281. package/dist/taro-components/p-d388c097.entry.js.map +1 -0
  282. package/dist/taro-components/p-d6441fd8.entry.js +2 -0
  283. package/dist/taro-components/p-d6441fd8.entry.js.map +1 -0
  284. package/dist/taro-components/{p-057159bc.system.entry.js → p-dcfb7d97.system.entry.js} +2 -2
  285. package/dist/taro-components/p-dcfb7d97.system.entry.js.map +1 -0
  286. package/dist/taro-components/p-e0d6b00b.entry.js.map +1 -1
  287. package/dist/taro-components/p-e5607803.system.entry.js +2 -0
  288. package/dist/taro-components/p-e5607803.system.entry.js.map +1 -0
  289. package/dist/taro-components/p-e7965c55.system.entry.js +2 -0
  290. package/dist/taro-components/p-e7965c55.system.entry.js.map +1 -0
  291. package/dist/taro-components/p-f00ee372.system.entry.js +2 -0
  292. package/dist/taro-components/p-f00ee372.system.entry.js.map +1 -0
  293. package/dist/taro-components/{p-7baff0b4.entry.js → p-f120c272.entry.js} +2 -2
  294. package/dist/taro-components/p-f120c272.entry.js.map +1 -0
  295. package/dist/taro-components/p-f81d14ad.entry.js +2 -0
  296. package/dist/taro-components/p-f81d14ad.entry.js.map +1 -0
  297. package/dist/taro-components/p-fae28cc1.system.entry.js +2 -0
  298. package/dist/taro-components/p-fae28cc1.system.entry.js.map +1 -0
  299. package/dist/taro-components/p-fb843ff2.system.entry.js +2 -0
  300. package/dist/taro-components/p-fb843ff2.system.entry.js.map +1 -0
  301. package/dist/taro-components/p-fc0fbcce.system.entry.js +2 -0
  302. package/dist/taro-components/p-fc0fbcce.system.entry.js.map +1 -0
  303. package/dist/taro-components/taro-components.esm.js +1 -1
  304. package/dist/taro-components/taro-components.esm.js.map +1 -1
  305. package/dist/types/components/animation-video/animation-video.d.ts +5 -0
  306. package/dist/types/components/animation-view/animation-view.d.ts +5 -0
  307. package/dist/types/components/ar-camera/ar-camera.d.ts +5 -0
  308. package/dist/types/components/aweme-data/aweme-data.d.ts +5 -0
  309. package/dist/types/components/button/button.d.ts +1 -0
  310. package/dist/types/components/comment/comment-detail.d.ts +5 -0
  311. package/dist/types/components/comment/comment-list.d.ts +5 -0
  312. package/dist/types/components/contact-button/contact-button.d.ts +5 -0
  313. package/dist/types/components/follow-swan/follow-swan.d.ts +5 -0
  314. package/dist/types/components/inline-payment-panel/inline-payment-panel.d.ts +5 -0
  315. package/dist/types/components/lifestyle/lifestyle.d.ts +5 -0
  316. package/dist/types/components/like/like.d.ts +5 -0
  317. package/dist/types/components/login/login.d.ts +5 -0
  318. package/dist/types/components/lottie/lottie.d.ts +5 -0
  319. package/dist/types/components/rtc-room/rtc-room-item.d.ts +5 -0
  320. package/dist/types/components/rtc-room/rtc-room.d.ts +5 -0
  321. package/dist/types/components/slot/native-slot.d.ts +5 -0
  322. package/dist/types/components/slot/slot.d.ts +1 -0
  323. package/dist/types/components/swiper/swiper.d.ts +4 -0
  324. package/dist/types/components/tabs/tab-item.d.ts +5 -0
  325. package/dist/types/components/tabs/tabs.d.ts +5 -0
  326. package/dist/types/components.d.ts +242 -0
  327. package/dist/vue2/component-lib/components.js +22 -11
  328. package/dist/vue2/component-lib/createComponent.js +1 -1
  329. package/dist/vue2/component-lib/createFormsComponent.js +2 -12
  330. package/dist/vue2/component-lib/index.js +7 -9
  331. package/dist/vue2/component-lib/mixins/listeners.js +1 -6
  332. package/dist/vue2/component-lib/mixins/refs.js +1 -6
  333. package/dist/vue2/component-lib/picker.js +1 -6
  334. package/dist/vue2/component-lib/scroll-view.js +1 -6
  335. package/dist/vue2/components.js +58 -6
  336. package/dist/vue2/index.js +5 -9
  337. package/dist/vue2/vue-component-lib/utils.js +2 -7
  338. package/dist/vue3/component-lib/createComponent.js +2 -2
  339. package/dist/vue3/component-lib/createFormsComponent.js +6 -15
  340. package/dist/vue3/component-lib/forwardRef.js +0 -2
  341. package/dist/vue3/component-lib/icon.js +2 -2
  342. package/dist/vue3/component-lib/image.js +2 -2
  343. package/dist/vue3/component-lib/index.js +22 -11
  344. package/dist/vue3/component-lib/scroll-view.js +2 -2
  345. package/dist/vue3/component-lib/text.js +2 -2
  346. package/dist/vue3/components.js +19 -3
  347. package/dist/vue3/index.js +3 -5
  348. package/dist/vue3/vue-component-lib/utils.js +10 -36
  349. package/package.json +12 -6
  350. package/types/Ad.d.ts +1 -1
  351. package/types/AnimationVideo.d.ts +62 -0
  352. package/types/AnimationView.d.ts +45 -0
  353. package/types/ArCamera.d.ts +50 -0
  354. package/types/Audio.d.ts +1 -1
  355. package/types/AwemeData.d.ts +43 -0
  356. package/types/Button.d.ts +1 -1
  357. package/types/Camera.d.ts +1 -1
  358. package/types/Canvas.d.ts +1 -1
  359. package/types/Checkbox.d.ts +1 -1
  360. package/types/CheckboxGroup.d.ts +1 -1
  361. package/types/CommentDetail.d.ts +72 -0
  362. package/types/CommentList.d.ts +127 -0
  363. package/types/ContactButton.d.ts +53 -0
  364. package/types/CoverImage.d.ts +1 -1
  365. package/types/CoverView.d.ts +102 -4
  366. package/types/CustomWrapper.d.ts +2 -1
  367. package/types/FollowSwan.d.ts +28 -0
  368. package/types/Form.d.ts +1 -1
  369. package/types/Icon.d.ts +1 -1
  370. package/types/Image.d.ts +1 -1
  371. package/types/InlinePaymentPanel.d.ts +58 -0
  372. package/types/Input.d.ts +88 -11
  373. package/types/Label.d.ts +1 -1
  374. package/types/Lifestyle.d.ts +26 -0
  375. package/types/Like.d.ts +107 -0
  376. package/types/LivePlayer.d.ts +1 -1
  377. package/types/LivePusher.d.ts +1 -1
  378. package/types/Login.d.ts +45 -0
  379. package/types/Lottie.d.ts +113 -0
  380. package/types/Map.d.ts +2 -2
  381. package/types/MatchMedia.d.ts +1 -1
  382. package/types/MovableArea.d.ts +2 -2
  383. package/types/MovableView.d.ts +17 -17
  384. package/types/NativeSlot.d.ts +33 -0
  385. package/types/NavigationBar.d.ts +2 -1
  386. package/types/Navigator.d.ts +1 -1
  387. package/types/OpenData.d.ts +1 -1
  388. package/types/PageContainer.d.ts +28 -18
  389. package/types/PageMeta.d.ts +1 -1
  390. package/types/Picker.d.ts +1 -1
  391. package/types/PickerView.d.ts +1 -1
  392. package/types/PickerViewColumn.d.ts +1 -1
  393. package/types/Progress.d.ts +1 -1
  394. package/types/Radio.d.ts +1 -1
  395. package/types/RadioGroup.d.ts +1 -1
  396. package/types/RichText.d.ts +1 -1
  397. package/types/RootPortal.d.ts +11 -2
  398. package/types/RtcRoom.d.ts +104 -0
  399. package/types/RtcRoomItem.d.ts +26 -0
  400. package/types/ScrollView.d.ts +1 -1
  401. package/types/ShareElement.d.ts +20 -10
  402. package/types/Slider.d.ts +1 -1
  403. package/types/Slot.d.ts +3 -2
  404. package/types/Swiper.d.ts +13 -1
  405. package/types/SwiperItem.d.ts +3 -2
  406. package/types/Switch.d.ts +1 -1
  407. package/types/TabItem.d.ts +35 -0
  408. package/types/Tabs.d.ts +58 -0
  409. package/types/Text.d.ts +1 -1
  410. package/types/Textarea.d.ts +7 -1
  411. package/types/Video.d.ts +7 -3
  412. package/types/View.d.ts +8 -7
  413. package/types/VoipRoom.d.ts +1 -1
  414. package/types/WebView.d.ts +1 -1
  415. package/types/index.vue3.d.ts +268 -259
  416. package/virtual-list/index.d.ts +3 -120
  417. package/virtual-list/index.js +4 -7
  418. package/dist/taro-components/p-057159bc.system.entry.js.map +0 -1
  419. package/dist/taro-components/p-1cd1c507.system.entry.js.map +0 -1
  420. package/dist/taro-components/p-1e436d5b.entry.js +0 -2
  421. package/dist/taro-components/p-1e436d5b.entry.js.map +0 -1
  422. package/dist/taro-components/p-22f9f9fa.entry.js.map +0 -1
  423. package/dist/taro-components/p-7baff0b4.entry.js.map +0 -1
  424. package/dist/taro-components/p-946c0799.system.entry.js +0 -2
  425. package/dist/taro-components/p-946c0799.system.entry.js.map +0 -1
  426. package/dist/taro-components/p-a2aab820.entry.js.map +0 -1
  427. package/dist/taro-components/p-c3acf0ea.system.entry.js.map +0 -1
  428. package/dist/taro-components/p-d5579efa.system.entry.js +0 -2
  429. package/dist/taro-components/p-d5579efa.system.entry.js.map +0 -1
  430. package/dist/taro-components/p-e9abe3e2.entry.js.map +0 -1
  431. package/virtual-list/domHelpers.js +0 -40
  432. package/virtual-list/memoize.js +0 -38
  433. package/virtual-list/react/FixedSizeList.js +0 -193
  434. package/virtual-list/react/createListComponent.js +0 -654
  435. package/virtual-list/react/index.d.ts +0 -123
  436. package/virtual-list/react/index.js +0 -67
  437. package/virtual-list/timer.js +0 -24
  438. package/virtual-list/vue/index.js +0 -589
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class Lottie {
4
+ componentDidLoad() {
5
+ notSupport('Lottie', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-lottie-core"; }
11
+ }
12
+ //# sourceMappingURL=lottie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lottie.js","sourceRoot":"","sources":["../../../src/components/lottie/lottie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,MAAM;EACjB,gBAAgB;IACd,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;EAC5B,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-lottie-core'\n})\nexport class Lottie implements ComponentInterface {\n componentDidLoad () {\n notSupport('Lottie', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class RtcRoomItem {
4
+ componentDidLoad() {
5
+ notSupport('RtcRoomItem', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-rtc-room-item-core"; }
11
+ }
12
+ //# sourceMappingURL=rtc-room-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtc-room-item.js","sourceRoot":"","sources":["../../../src/components/rtc-room/rtc-room-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,WAAW;EACtB,gBAAgB;IACd,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;EACjC,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-rtc-room-item-core'\n})\nexport class RtcRoomItem implements ComponentInterface {\n componentDidLoad () {\n notSupport('RtcRoomItem', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class RtcRoom {
4
+ componentDidLoad() {
5
+ notSupport('RtcRoom', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-rtc-room-core"; }
11
+ }
12
+ //# sourceMappingURL=rtc-room.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtc-room.js","sourceRoot":"","sources":["../../../src/components/rtc-room/rtc-room.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,OAAO;EAClB,gBAAgB;IACd,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;EAC7B,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-rtc-room-core'\n})\nexport class RtcRoom implements ComponentInterface {\n componentDidLoad () {\n notSupport('RtcRoom', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -94,6 +94,7 @@ export class ScrollView {
94
94
  handleScroll(e) {
95
95
  if (e instanceof CustomEvent)
96
96
  return;
97
+ e.stopPropagation();
97
98
  const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = this.el;
98
99
  this._scrollLeft = scrollLeft;
99
100
  this._scrollTop = scrollTop;
@@ -104,7 +105,6 @@ export class ScrollView {
104
105
  scrollHeight,
105
106
  scrollWidth
106
107
  });
107
- e.cancelBubble = true;
108
108
  }
109
109
  componentDidLoad() {
110
110
  const { scrollY, scrollX, scrollWithAnimation } = this;
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-view.js","sourceRoot":"","sources":["../../../src/components/scroll-view/scroll-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAsB,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACzH,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,SAAS,aAAa,CAAE,IAAY,EAAE,EAAU,EAAE,QAAQ;EACxD,IA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IAAI,IAAC,KAAK,EAAE,GAAG;MACd,eAAQ,CACH,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Watch, Element, Host, Listen } from '@stencil/core'\nimport classNames from 'classnames'\n\nimport { debounce } from '../../utils'\n\nfunction easeOutScroll (from: number, to: number, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n\n const change = to - from\n const dur = 500\n const sTime = Date.now()\n const isLarger = to >= from\n\n function linear (t: number, b: number, c: number, d: number): number {\n return c * t / d + b\n }\n\n function step () {\n from = linear(Date.now() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n\n step()\n}\n\n@Component({\n tag: 'taro-scroll-view-core',\n styleUrl: './style/index.scss'\n})\nexport class ScrollView implements ComponentInterface {\n private _scrollLeft: number\n private _scrollTop: number\n\n @Element() el: HTMLElement\n\n @Prop() scrollX = false\n @Prop() scrollY = false\n @Prop() upperThreshold: number | string = 50\n @Prop() lowerThreshold: number | string = 50\n @Prop({ attribute: 'scroll-top', reflect: true }) mpScrollTop: number | string\n @Prop({ attribute: 'scroll-left', reflect: true }) mpScrollLeft: number | string\n @Prop({ attribute: 'scroll-into-view', reflect: true }) mpScrollIntoView: string\n @Prop() scrollWithAnimation = false\n\n @Event({\n eventName: 'scroll',\n bubbles: false\n })\n onScroll: EventEmitter\n\n @Event({\n eventName: 'scrolltoupper',\n bubbles: false\n })\n onScrollToUpper: EventEmitter\n\n @Event({\n eventName: 'scrolltolower',\n bubbles: false\n })\n onScrollToLower: EventEmitter\n\n @Watch('mpScrollLeft')\n watchScrollLeft (newVal) {\n const scrollLeft = Number(newVal)\n if (\n this.scrollX &&\n !isNaN(scrollLeft) &&\n scrollLeft !== this._scrollLeft\n ) {\n if (this.scrollWithAnimation) {\n easeOutScroll(this._scrollLeft, scrollLeft, pos => (this.el.scrollLeft = pos))\n } else {\n this.el.scrollLeft = scrollLeft\n }\n this._scrollLeft = scrollLeft\n }\n }\n\n @Watch('mpScrollTop')\n watchScrollTop (newVal) {\n const scrollTop = Number(newVal)\n if (\n this.scrollY &&\n !isNaN(scrollTop) &&\n scrollTop !== this._scrollTop\n ) {\n if (this.scrollWithAnimation) {\n easeOutScroll(this._scrollTop, scrollTop, pos => (this.el.scrollTop = pos))\n } else {\n this.el.scrollTop = scrollTop\n }\n this._scrollTop = scrollTop\n }\n }\n\n @Watch('mpScrollIntoView')\n watchScrollIntoView (newVal) {\n if (typeof newVal === 'string' && newVal) {\n document.querySelector(`#${newVal}`)?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'start'\n })\n }\n }\n\n @Listen('scroll', { capture: true })\n handleScroll (e: Event) {\n if (e instanceof CustomEvent) return\n\n const {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.el\n this._scrollLeft = scrollLeft\n this._scrollTop = scrollTop\n\n this.upperAndLower()\n\n this.onScroll.emit({\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n })\n e.cancelBubble = true\n }\n\n componentDidLoad () {\n const {\n scrollY,\n scrollX,\n scrollWithAnimation\n } = this\n\n const scrollTop = Number(this.mpScrollTop)\n const scrollLeft = Number(this.mpScrollLeft)\n\n if (scrollY && !isNaN(scrollTop)) {\n if (scrollWithAnimation) {\n easeOutScroll(0, scrollTop, pos => (this.el.scrollTop = pos))\n } else {\n this.el.scrollTop = scrollTop\n }\n this._scrollTop = scrollTop\n }\n\n if (scrollX && !isNaN(scrollLeft)) {\n if (scrollWithAnimation) {\n easeOutScroll(0, scrollLeft, pos => (this.el.scrollLeft = pos))\n } else {\n this.el.scrollLeft = scrollLeft\n }\n this._scrollLeft = scrollLeft\n }\n }\n\n upperAndLower = debounce(() => {\n const {\n offsetWidth,\n offsetHeight,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.el\n\n const lowerThreshold = Number(this.lowerThreshold)\n const upperThreshold = Number(this.upperThreshold)\n\n if (\n !isNaN(lowerThreshold) &&\n ((this.scrollY && offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (this.scrollX && offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n this.onScrollToLower.emit({\n direction: this.scrollX ? 'right' : (this.scrollY ? 'bottom' : '')\n })\n }\n\n if (\n !isNaN(upperThreshold) &&\n ((this.scrollY && scrollTop <= upperThreshold) ||\n (this.scrollX && scrollLeft <= upperThreshold))\n ) {\n this.onScrollToUpper.emit({\n direction: this.scrollX ? 'left' : (this.scrollY ? 'top' : '')\n })\n }\n }, 200)\n\n render () {\n const {\n scrollX,\n scrollY\n } = this\n\n const cls = classNames({\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n })\n return (\n <Host class={cls}>\n <slot />\n </Host>\n )\n }\n}\n"]}
1
+ {"version":3,"file":"scroll-view.js","sourceRoot":"","sources":["../../../src/components/scroll-view/scroll-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAsB,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACzH,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,SAAS,aAAa,CAAE,IAAY,EAAE,EAAU,EAAE,QAAQ;EACxD,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,IAAI,KAAK,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,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Watch, Element, Host, Listen } from '@stencil/core'\nimport classNames from 'classnames'\n\nimport { debounce } from '../../utils'\n\nfunction easeOutScroll (from: number, to: number, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n\n const change = to - from\n const dur = 500\n const sTime = Date.now()\n const isLarger = to >= from\n\n function linear (t: number, b: number, c: number, d: number): number {\n return c * t / d + b\n }\n\n function step () {\n from = linear(Date.now() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n\n step()\n}\n\n@Component({\n tag: 'taro-scroll-view-core',\n styleUrl: './style/index.scss'\n})\nexport class ScrollView implements ComponentInterface {\n private _scrollLeft: number\n private _scrollTop: number\n\n @Element() el: HTMLElement\n\n @Prop() scrollX = false\n @Prop() scrollY = false\n @Prop() upperThreshold: number | string = 50\n @Prop() lowerThreshold: number | string = 50\n @Prop({ attribute: 'scroll-top', reflect: true }) mpScrollTop: number | string\n @Prop({ attribute: 'scroll-left', reflect: true }) mpScrollLeft: number | string\n @Prop({ attribute: 'scroll-into-view', reflect: true }) mpScrollIntoView: string\n @Prop() scrollWithAnimation = false\n\n @Event({\n eventName: 'scroll',\n bubbles: false\n })\n onScroll: EventEmitter\n\n @Event({\n eventName: 'scrolltoupper',\n bubbles: false\n })\n onScrollToUpper: EventEmitter\n\n @Event({\n eventName: 'scrolltolower',\n bubbles: false\n })\n onScrollToLower: EventEmitter\n\n @Watch('mpScrollLeft')\n watchScrollLeft (newVal) {\n const scrollLeft = Number(newVal)\n if (\n this.scrollX &&\n !isNaN(scrollLeft) &&\n scrollLeft !== this._scrollLeft\n ) {\n if (this.scrollWithAnimation) {\n easeOutScroll(this._scrollLeft, scrollLeft, pos => (this.el.scrollLeft = pos))\n } else {\n this.el.scrollLeft = scrollLeft\n }\n this._scrollLeft = scrollLeft\n }\n }\n\n @Watch('mpScrollTop')\n watchScrollTop (newVal) {\n const scrollTop = Number(newVal)\n if (\n this.scrollY &&\n !isNaN(scrollTop) &&\n scrollTop !== this._scrollTop\n ) {\n if (this.scrollWithAnimation) {\n easeOutScroll(this._scrollTop, scrollTop, pos => (this.el.scrollTop = pos))\n } else {\n this.el.scrollTop = scrollTop\n }\n this._scrollTop = scrollTop\n }\n }\n\n @Watch('mpScrollIntoView')\n watchScrollIntoView (newVal) {\n if (typeof newVal === 'string' && newVal) {\n document.querySelector(`#${newVal}`)?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'start'\n })\n }\n }\n\n @Listen('scroll', { capture: true })\n handleScroll (e: Event) {\n if (e instanceof CustomEvent) return\n e.stopPropagation()\n\n const {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.el\n this._scrollLeft = scrollLeft\n this._scrollTop = scrollTop\n\n this.upperAndLower()\n\n this.onScroll.emit({\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n })\n }\n\n componentDidLoad () {\n const {\n scrollY,\n scrollX,\n scrollWithAnimation\n } = this\n\n const scrollTop = Number(this.mpScrollTop)\n const scrollLeft = Number(this.mpScrollLeft)\n\n if (scrollY && !isNaN(scrollTop)) {\n if (scrollWithAnimation) {\n easeOutScroll(0, scrollTop, pos => (this.el.scrollTop = pos))\n } else {\n this.el.scrollTop = scrollTop\n }\n this._scrollTop = scrollTop\n }\n\n if (scrollX && !isNaN(scrollLeft)) {\n if (scrollWithAnimation) {\n easeOutScroll(0, scrollLeft, pos => (this.el.scrollLeft = pos))\n } else {\n this.el.scrollLeft = scrollLeft\n }\n this._scrollLeft = scrollLeft\n }\n }\n\n upperAndLower = debounce(() => {\n const {\n offsetWidth,\n offsetHeight,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n } = this.el\n\n const lowerThreshold = Number(this.lowerThreshold)\n const upperThreshold = Number(this.upperThreshold)\n\n if (\n !isNaN(lowerThreshold) &&\n ((this.scrollY && offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (this.scrollX && offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n this.onScrollToLower.emit({\n direction: this.scrollX ? 'right' : (this.scrollY ? 'bottom' : '')\n })\n }\n\n if (\n !isNaN(upperThreshold) &&\n ((this.scrollY && scrollTop <= upperThreshold) ||\n (this.scrollX && scrollLeft <= upperThreshold))\n ) {\n this.onScrollToUpper.emit({\n direction: this.scrollX ? 'left' : (this.scrollY ? 'top' : '')\n })\n }\n }, 200)\n\n render () {\n const {\n scrollX,\n scrollY\n } = this\n\n const cls = classNames({\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n })\n return (\n <Host class={cls}>\n <slot />\n </Host>\n )\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class NativeSlot {
4
+ componentDidLoad() {
5
+ notSupport('NativeSlot', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-native-slot-core"; }
11
+ }
12
+ //# sourceMappingURL=native-slot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-slot.js","sourceRoot":"","sources":["../../../src/components/slot/native-slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,UAAU;EACrB,gBAAgB;IACd,UAAU,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;EAChC,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-native-slot-core'\n})\nexport class NativeSlot implements ComponentInterface {\n componentDidLoad () {\n notSupport('NativeSlot', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -1,5 +1,9 @@
1
1
  import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
2
3
  export class Slot {
4
+ componentDidLoad() {
5
+ notSupport('Slot', this);
6
+ }
3
7
  render() {
4
8
  return (h(Host, null));
5
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"slot.js","sourceRoot":"","sources":["../../../src/components/slot/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAKtE,MAAM,OAAO,IAAI;EACf,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
1
+ {"version":3,"file":"slot.js","sourceRoot":"","sources":["../../../src/components/slot/slot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,IAAI;EACf,gBAAgB;IACd,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;EAC1B,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n componentDidLoad () {\n notSupport('Slot', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -54,6 +54,7 @@ export class Swiper {
54
54
  this.nextMargin = '0px';
55
55
  this.displayMultipleItems = 1;
56
56
  this.full = false;
57
+ this.zoom = false;
57
58
  this.observer = undefined;
58
59
  this.observerFirst = undefined;
59
60
  this.observerLast = undefined;
@@ -179,6 +180,7 @@ export class Swiper {
179
180
  speed: duration,
180
181
  observer: true,
181
182
  observeParents: true,
183
+ zoom: this.zoom,
182
184
  on: {
183
185
  slideTo() {
184
186
  that.current = this.realIndex;
@@ -502,6 +504,24 @@ export class Swiper {
502
504
  "attribute": "full",
503
505
  "reflect": false,
504
506
  "defaultValue": "false"
507
+ },
508
+ "zoom": {
509
+ "type": "boolean",
510
+ "mutable": false,
511
+ "complexType": {
512
+ "original": "boolean",
513
+ "resolved": "boolean",
514
+ "references": {}
515
+ },
516
+ "required": false,
517
+ "optional": false,
518
+ "docs": {
519
+ "tags": [],
520
+ "text": "\u7ED9 previewImage API \u4F7F\u7528\uFF0C\u7F29\u653E\u652F\u6301"
521
+ },
522
+ "attribute": "zoom",
523
+ "reflect": false,
524
+ "defaultValue": "false"
505
525
  }
506
526
  };
507
527
  }
@@ -1 +1 @@
1
- {"version":3,"file":"swiper.js","sourceRoot":"","sources":["../../../src/components/swiper/swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAsB,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxH,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,QAAQ,MAAM,6BAA6B,CAAA;AAEl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CAAC,CAAA;IACpC,IAAI,QAAQ,EAAE;MACZ,KAAK,CAAC,SAAS,GAAG,GAAG,EAAE,IAAI,CAAA;MAC3B,KAAK,CAAC,YAAY,GAAG,GAAG,EAAE,IAAI,CAAA;KAC/B;SAAM;MACL,KAAK,CAAC,WAAW,GAAG,GAAG,EAAE,IAAI,CAAA;MAC7B,KAAK,CAAC,UAAU,GAAG,GAAG,EAAE,IAAI,CAAA;KAC7B;IAED,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,eAAe,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS;MACtD,WAAK,KAAK,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK;QACxC,aAAO,IAAI,EAAC,UAAU,IACnB;6BACgB,IAAI,CAAC,GAAG,uFAAuF,cAAc;6BAC7G,IAAI,CAAC,GAAG,8FAA8F,oBAAoB;aAC1I,CACK;QACR,WAAK,KAAK,EAAC,gBAAgB;UACzB,eAAQ,CACJ;QACN,WAAK,KAAK,EAAE,UAAU,CAAC,mBAAmB,EACxC;YACE,0BAA0B,EAAE,CAAC,aAAa;YAC1C,2BAA2B,EAAE,aAAa;WAC3C,CACF,GAAI,CACD,CACD,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Watch, Host, Element, State } from '@stencil/core'\nimport classNames from 'classnames'\nimport type ISwiper from 'swiper'\nimport SwiperJS from 'swiper/swiper-bundle.esm.js'\n\nimport { debounce } from '../../utils'\n\nlet INSTANCE_ID = 0\n\n@Component({\n tag: 'taro-swiper-core',\n styleUrls: [\n './style/index.scss'\n ]\n})\nexport class Swiper implements ComponentInterface {\n private _id = INSTANCE_ID++\n\n @Element() el: HTMLElement\n @State() swiperWrapper: HTMLElement | null\n @State() private swiper: ISwiper\n @State() isWillLoadCalled = false\n /**\n * 是否显示面板指示点\n */\n @Prop() indicatorDots = false\n\n /**\n * 指示点颜色\n */\n @Prop() indicatorColor = 'rgba(0, 0, 0, .3)'\n\n /**\n * 当前选中的指示点颜色\n */\n @Prop() indicatorActiveColor = '#000000'\n\n /**\n * 是否自动切换\n */\n @Prop() autoplay = false\n\n /**\n * 当前所在滑块的 index\n */\n @Prop() current = 0\n\n /**\n * 自动切换时间间隔\n */\n @Prop() interval = 5000\n\n /**\n * 滑动动画时长\n */\n @Prop() duration = 500\n\n /**\n * 是否采用衔接滑动\n */\n @Prop() circular = false\n\n /**\n * 滑动方向是否为纵向\n */\n @Prop() vertical = false\n\n /**\n * 前边距,可用于露出前一项的一小部分,接受 px 值\n */\n @Prop() previousMargin = '0px'\n\n /**\n * 后边距,可用于露出后一项的一小部分,接受 px 值\n */\n @Prop() nextMargin = '0px'\n\n /**\n * 同时显示的滑块数量\n */\n @Prop() displayMultipleItems = 1\n\n /**\n * 给 previewImage API 使用,全屏显示 swiper\n */\n @Prop() full = false\n\n @Event({\n eventName: 'change'\n }) onChange: EventEmitter\n\n @Event({\n eventName: 'animationfinish'\n }) onAnimationFinish: EventEmitter\n\n @Watch('current')\n watchCurrent (newVal) {\n if (!this.isWillLoadCalled) return\n\n const n = parseInt(newVal, 10)\n if (isNaN(n)) return\n\n if (this.circular) {\n if (!this.swiper.isBeginning && !this.swiper.isEnd) {\n this.swiper.slideToLoop(n) // 更新下标\n }\n } else {\n this.swiper.slideTo(n) // 更新下标\n }\n }\n\n @Watch('autoplay')\n watchAutoplay (newVal) {\n if (!this.isWillLoadCalled || !this.swiper) return\n\n const swiperAutoplay = this.swiper.autoplay\n if (swiperAutoplay) {\n if (swiperAutoplay.running === newVal) return\n \n if (newVal) {\n if (this.swiper.params && typeof this.swiper.params.autoplay === 'object') {\n if (this.swiper.params.autoplay.disableOnInteraction === true) {\n this.swiper.params.autoplay.disableOnInteraction = false\n }\n this.swiper.params.autoplay.delay = this.interval\n }\n swiperAutoplay.start()\n } else {\n swiperAutoplay.stop()\n }\n }\n }\n\n @Watch('duration')\n watchDuration (newVal) {\n if (!this.isWillLoadCalled) return\n this.swiper.params.speed = newVal\n }\n\n @Watch('interval')\n watchInterval (newVal) {\n if (!this.isWillLoadCalled) return\n\n if (typeof this.swiper.params.autoplay === 'object') {\n this.swiper.params.autoplay.delay = newVal\n }\n }\n\n @Watch('swiperWrapper')\n watchSwiperWrapper (newVal?: HTMLElement) {\n if (!this.isWillLoadCalled) return\n if (!newVal) return\n this.el.appendChild = <T extends Node>(newChild: T): T => {\n return newVal.appendChild(newChild)\n }\n this.el.insertBefore = <T extends Node>(newChild: T, refChild: Node | null): T => {\n return newVal.insertBefore(newChild, refChild)\n }\n this.el.replaceChild = <T extends Node>(newChild: Node, oldChild: T): T => {\n return newVal.replaceChild(newChild, oldChild)\n }\n this.el.removeChild = <T extends Node>(oldChild: T): T => {\n return newVal.removeChild(oldChild)\n }\n this.el.addEventListener('DOMNodeInserted', this.handleSwiperSize)\n this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSize)\n }\n\n @Watch(\"circular\")\n watchCircular () {\n if (this.swiper) {\n this.swiper.destroy()\n this.handleInit()\n }\n }\n\n @State() observer: MutationObserver\n @State() observerFirst: MutationObserver\n @State() observerLast: MutationObserver\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n }\n\n componentDidLoad () {\n this.handleInit()\n if (!this.swiper || !this.circular) return\n\n const wrapper = this.swiper.$wrapperEl?.[0]\n this.observer = new MutationObserver(this.handleSwiperLoopListen)\n\n this.observer.observe(wrapper, {\n childList: true\n })\n }\n\n componentWillUpdate () {\n if (!this.swiper) return\n if (this.autoplay && !this.swiper.autoplay?.running) {\n this.swiper.autoplay?.start()\n }\n this.swiper.update() // 更新子元素\n }\n\n componentDidRender () {\n this.handleSwiperLoop()\n }\n\n disconnectedCallback () {\n this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSize)\n this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSize)\n this.observer?.disconnect?.()\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n }\n\n handleSwiperLoopListen = () => {\n this.observerFirst?.disconnect && this.observerFirst.disconnect()\n this.observerLast?.disconnect && this.observerLast.disconnect()\n this.observerFirst = new MutationObserver(this.handleSwiperLoop)\n this.observerLast = new MutationObserver(this.handleSwiperLoop)\n const wrapper = this.swiper.$wrapperEl?.[0]\n const list = wrapper.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)')\n if (list.length >= 1) {\n this.observerFirst.observe(list[0], {\n characterData: true\n })\n } else if (list.length >= 2) {\n this.observerLast.observe(list[list.length - 1], {\n characterData: true\n })\n }\n }\n\n handleSwiperLoop = debounce(() => {\n if (this.swiper && this.circular) {\n // @ts-ignore\n this.swiper.loopDestroy()\n // @ts-ignore\n this.swiper.loopCreate()\n }\n }, 500)\n\n handleSwiperSize = debounce(() => {\n if (this.swiper && !this.circular) {\n this.swiper.updateSlides()\n }\n }, 50)\n\n handleInit () {\n const {\n autoplay,\n circular,\n current,\n displayMultipleItems,\n duration,\n interval,\n vertical\n } = this\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this\n\n const options: any = {\n pagination: { el: `.taro-swiper-${this._id} > .swiper-container > .swiper-pagination` },\n direction: vertical ? 'vertical' : 'horizontal',\n loop: circular,\n slidesPerView: displayMultipleItems,\n initialSlide: current,\n speed: duration,\n observer: true,\n observeParents: true,\n on: {\n slideTo () {\n that.current = this.realIndex\n },\n // slideChange 事件在 swiper.slideTo 改写 current 时不触发,因此用 slideChangeTransitionStart 事件代替\n slideChangeTransitionStart (_swiper: ISwiper) {\n if (that.circular) {\n if (_swiper.isBeginning || _swiper.isEnd) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n return\n }\n }\n that.onChange.emit({\n current: this.realIndex,\n source: ''\n })\n },\n transitionEnd () {\n that.onAnimationFinish.emit({\n current: this.realIndex,\n source: ''\n })\n },\n observerUpdate (_swiper: ISwiper, e) {\n const target = e.target\n const className = target && typeof target.className === 'string' ? target.className : ''\n if (className.includes('taro_page') && target.style.display !== 'none') {\n if (that.autoplay && target.contains(_swiper.$el[0])) {\n if (that.circular) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n } else {\n _swiper.slideTo(this.realIndex)\n }\n }\n }\n }\n }\n }\n\n // 自动播放\n if (autoplay) {\n options.autoplay = {\n delay: interval,\n disableOnInteraction: false\n }\n }\n\n this.swiper = new SwiperJS(`.taro-swiper-${this._id} > .swiper-container`, options)\n this.swiperWrapper = this.el.querySelector(`.taro-swiper-${this._id} > .swiper-container > .swiper-wrapper`)\n }\n\n render () {\n const {\n vertical,\n indicatorDots,\n indicatorColor,\n indicatorActiveColor\n } = this\n\n const hostStyle: Record<string, string> = { overflow: 'hidden' }\n const style: Record<string, string> = { overflow: 'visible' }\n if (this.full) {\n hostStyle.height = '100%'\n style.height = '100%'\n }\n\n const [, previousMargin] = /^(\\d+)px/.exec(this.previousMargin) || []\n const [, nextMargin] = /^(\\d+)px/.exec(this.nextMargin) || []\n const pM = parseInt(previousMargin) || 0\n const nM = parseInt(nextMargin) || 0\n if (vertical) {\n style.marginTop = `${pM}px`\n style.marginBottom = `${nM}px`\n } else {\n style.marginRight = `${nM}px`\n style.marginLeft = `${pM}px`\n }\n\n return (\n <Host class={`taro-swiper-${this._id}`} style={hostStyle}>\n <div class='swiper-container' style={style}>\n <style type='text/css'>\n {`\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }\n `}\n </style>\n <div class='swiper-wrapper'>\n <slot />\n </div>\n <div class={classNames('swiper-pagination',\n {\n 'swiper-pagination-hidden': !indicatorDots,\n 'swiper-pagination-bullets': indicatorDots\n }\n )} />\n </div>\n </Host>\n )\n }\n}\n"]}
1
+ {"version":3,"file":"swiper.js","sourceRoot":"","sources":["../../../src/components/swiper/swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAsB,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACxH,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,QAAQ,MAAM,6BAA6B,CAAA;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,IAAI,WAAW,GAAG,CAAC,CAAA;AAQnB,MAAM,OAAO,MAAM;;IACT,QAAG,GAAG,WAAW,EAAE,CAAA;IA6M3B,2BAAsB,GAAG,GAAG,EAAE;;MAC5B,CAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,UAAU,KAAI,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAA;MACjE,CAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,UAAU,KAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAA;MAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;MAChE,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;MAC/D,MAAM,OAAO,GAAG,MAAA,IAAI,CAAC,MAAM,CAAC,UAAU,0CAAG,CAAC,CAAC,CAAA;MAC3C,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,oDAAoD,CAAC,CA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AAmB,EACxC;YACE,0BAA0B,EAAE,CAAC,aAAa;YAC1C,2BAA2B,EAAE,aAAa;WAC3C,CACF,GAAI,CACD,CACD,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, ComponentInterface, Prop, Event, EventEmitter, Watch, Host, Element, State } from '@stencil/core'\nimport classNames from 'classnames'\nimport type ISwiper from 'swiper'\nimport SwiperJS from 'swiper/swiper-bundle.esm.js'\n\nimport { debounce } from '../../utils'\n\nlet INSTANCE_ID = 0\n\n@Component({\n tag: 'taro-swiper-core',\n styleUrls: [\n './style/index.scss'\n ]\n})\nexport class Swiper implements ComponentInterface {\n private _id = INSTANCE_ID++\n\n @Element() el: HTMLElement\n @State() swiperWrapper: HTMLElement | null\n @State() private swiper: ISwiper\n @State() isWillLoadCalled = false\n /**\n * 是否显示面板指示点\n */\n @Prop() indicatorDots = false\n\n /**\n * 指示点颜色\n */\n @Prop() indicatorColor = 'rgba(0, 0, 0, .3)'\n\n /**\n * 当前选中的指示点颜色\n */\n @Prop() indicatorActiveColor = '#000000'\n\n /**\n * 是否自动切换\n */\n @Prop() autoplay = false\n\n /**\n * 当前所在滑块的 index\n */\n @Prop() current = 0\n\n /**\n * 自动切换时间间隔\n */\n @Prop() interval = 5000\n\n /**\n * 滑动动画时长\n */\n @Prop() duration = 500\n\n /**\n * 是否采用衔接滑动\n */\n @Prop() circular = false\n\n /**\n * 滑动方向是否为纵向\n */\n @Prop() vertical = false\n\n /**\n * 前边距,可用于露出前一项的一小部分,接受 px 值\n */\n @Prop() previousMargin = '0px'\n\n /**\n * 后边距,可用于露出后一项的一小部分,接受 px 值\n */\n @Prop() nextMargin = '0px'\n\n /**\n * 同时显示的滑块数量\n */\n @Prop() displayMultipleItems = 1\n\n /**\n * 给 previewImage API 使用,全屏显示 swiper\n */\n @Prop() full = false\n\n /**\n * 给 previewImage API 使用,缩放支持\n */\n @Prop() zoom = false\n\n @Event({\n eventName: 'change'\n }) onChange: EventEmitter\n\n @Event({\n eventName: 'animationfinish'\n }) onAnimationFinish: EventEmitter\n\n @Watch('current')\n watchCurrent (newVal) {\n if (!this.isWillLoadCalled) return\n\n const n = parseInt(newVal, 10)\n if (isNaN(n)) return\n\n if (this.circular) {\n if (!this.swiper.isBeginning && !this.swiper.isEnd) {\n this.swiper.slideToLoop(n) // 更新下标\n }\n } else {\n this.swiper.slideTo(n) // 更新下标\n }\n }\n\n @Watch('autoplay')\n watchAutoplay (newVal) {\n if (!this.isWillLoadCalled || !this.swiper) return\n\n const swiperAutoplay = this.swiper.autoplay\n if (swiperAutoplay) {\n if (swiperAutoplay.running === newVal) return\n \n if (newVal) {\n if (this.swiper.params && typeof this.swiper.params.autoplay === 'object') {\n if (this.swiper.params.autoplay.disableOnInteraction === true) {\n this.swiper.params.autoplay.disableOnInteraction = false\n }\n this.swiper.params.autoplay.delay = this.interval\n }\n swiperAutoplay.start()\n } else {\n swiperAutoplay.stop()\n }\n }\n }\n\n @Watch('duration')\n watchDuration (newVal) {\n if (!this.isWillLoadCalled) return\n this.swiper.params.speed = newVal\n }\n\n @Watch('interval')\n watchInterval (newVal) {\n if (!this.isWillLoadCalled) return\n\n if (typeof this.swiper.params.autoplay === 'object') {\n this.swiper.params.autoplay.delay = newVal\n }\n }\n\n @Watch('swiperWrapper')\n watchSwiperWrapper (newVal?: HTMLElement) {\n if (!this.isWillLoadCalled) return\n if (!newVal) return\n this.el.appendChild = <T extends Node>(newChild: T): T => {\n return newVal.appendChild(newChild)\n }\n this.el.insertBefore = <T extends Node>(newChild: T, refChild: Node | null): T => {\n return newVal.insertBefore(newChild, refChild)\n }\n this.el.replaceChild = <T extends Node>(newChild: Node, oldChild: T): T => {\n return newVal.replaceChild(newChild, oldChild)\n }\n this.el.removeChild = <T extends Node>(oldChild: T): T => {\n return newVal.removeChild(oldChild)\n }\n this.el.addEventListener('DOMNodeInserted', this.handleSwiperSize)\n this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSize)\n }\n\n @Watch(\"circular\")\n watchCircular () {\n if (this.swiper) {\n this.swiper.destroy()\n this.handleInit()\n }\n }\n\n @State() observer: MutationObserver\n @State() observerFirst: MutationObserver\n @State() observerLast: MutationObserver\n\n componentWillLoad () {\n this.isWillLoadCalled = true\n }\n\n componentDidLoad () {\n this.handleInit()\n if (!this.swiper || !this.circular) return\n\n const wrapper = this.swiper.$wrapperEl?.[0]\n this.observer = new MutationObserver(this.handleSwiperLoopListen)\n\n this.observer.observe(wrapper, {\n childList: true\n })\n }\n\n componentWillUpdate () {\n if (!this.swiper) return\n if (this.autoplay && !this.swiper.autoplay?.running) {\n this.swiper.autoplay?.start()\n }\n this.swiper.update() // 更新子元素\n }\n\n componentDidRender () {\n this.handleSwiperLoop()\n }\n\n disconnectedCallback () {\n this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSize)\n this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSize)\n this.observer?.disconnect?.()\n this.observerFirst?.disconnect?.()\n this.observerLast?.disconnect?.()\n }\n\n handleSwiperLoopListen = () => {\n this.observerFirst?.disconnect && this.observerFirst.disconnect()\n this.observerLast?.disconnect && this.observerLast.disconnect()\n this.observerFirst = new MutationObserver(this.handleSwiperLoop)\n this.observerLast = new MutationObserver(this.handleSwiperLoop)\n const wrapper = this.swiper.$wrapperEl?.[0]\n const list = wrapper.querySelectorAll('taro-swiper-item-core:not(.swiper-slide-duplicate)')\n if (list.length >= 1) {\n this.observerFirst.observe(list[0], {\n characterData: true\n })\n } else if (list.length >= 2) {\n this.observerLast.observe(list[list.length - 1], {\n characterData: true\n })\n }\n }\n\n handleSwiperLoop = debounce(() => {\n if (this.swiper && this.circular) {\n // @ts-ignore\n this.swiper.loopDestroy()\n // @ts-ignore\n this.swiper.loopCreate()\n }\n }, 500)\n\n handleSwiperSize = debounce(() => {\n if (this.swiper && !this.circular) {\n this.swiper.updateSlides()\n }\n }, 50)\n\n handleInit () {\n const {\n autoplay,\n circular,\n current,\n displayMultipleItems,\n duration,\n interval,\n vertical\n } = this\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const that = this\n\n const options: any = {\n pagination: { el: `.taro-swiper-${this._id} > .swiper-container > .swiper-pagination` },\n direction: vertical ? 'vertical' : 'horizontal',\n loop: circular,\n slidesPerView: displayMultipleItems,\n initialSlide: current,\n speed: duration,\n observer: true,\n observeParents: true,\n zoom: this.zoom,\n on: {\n slideTo () {\n that.current = this.realIndex\n },\n // slideChange 事件在 swiper.slideTo 改写 current 时不触发,因此用 slideChangeTransitionStart 事件代替\n slideChangeTransitionStart (_swiper: ISwiper) {\n if (that.circular) {\n if (_swiper.isBeginning || _swiper.isEnd) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n return\n }\n }\n that.onChange.emit({\n current: this.realIndex,\n source: ''\n })\n },\n transitionEnd () {\n that.onAnimationFinish.emit({\n current: this.realIndex,\n source: ''\n })\n },\n observerUpdate (_swiper: ISwiper, e) {\n const target = e.target\n const className = target && typeof target.className === 'string' ? target.className : ''\n if (className.includes('taro_page') && target.style.display !== 'none') {\n if (that.autoplay && target.contains(_swiper.$el[0])) {\n if (that.circular) {\n _swiper.slideToLoop(this.realIndex, 0) // 更新下标\n } else {\n _swiper.slideTo(this.realIndex)\n }\n }\n }\n }\n }\n }\n\n // 自动播放\n if (autoplay) {\n options.autoplay = {\n delay: interval,\n disableOnInteraction: false\n }\n }\n\n this.swiper = new SwiperJS(`.taro-swiper-${this._id} > .swiper-container`, options)\n this.swiperWrapper = this.el.querySelector(`.taro-swiper-${this._id} > .swiper-container > .swiper-wrapper`)\n }\n\n render () {\n const {\n vertical,\n indicatorDots,\n indicatorColor,\n indicatorActiveColor\n } = this\n\n const hostStyle: Record<string, string> = { overflow: 'hidden' }\n const style: Record<string, string> = { overflow: 'visible' }\n if (this.full) {\n hostStyle.height = '100%'\n style.height = '100%'\n }\n\n const [, previousMargin] = /^(\\d+)px/.exec(this.previousMargin) || []\n const [, nextMargin] = /^(\\d+)px/.exec(this.nextMargin) || []\n const pM = parseInt(previousMargin) || 0\n const nM = parseInt(nextMargin) || 0\n if (vertical) {\n style.marginTop = `${pM}px`\n style.marginBottom = `${nM}px`\n } else {\n style.marginRight = `${nM}px`\n style.marginLeft = `${pM}px`\n }\n\n return (\n <Host class={`taro-swiper-${this._id}`} style={hostStyle}>\n <div class='swiper-container' style={style}>\n <style type='text/css'>\n {`\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet { background: ${indicatorColor} }\n .taro-swiper-${this._id} > .swiper-container > .swiper-pagination > .swiper-pagination-bullet-active { background: ${indicatorActiveColor} }\n `}\n </style>\n <div class='swiper-wrapper'>\n <slot />\n </div>\n <div class={classNames('swiper-pagination',\n {\n 'swiper-pagination-hidden': !indicatorDots,\n 'swiper-pagination-bullets': indicatorDots\n }\n )} />\n </div>\n </Host>\n )\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class TabItem {
4
+ componentDidLoad() {
5
+ notSupport('TabItem', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-tab-item-core"; }
11
+ }
12
+ //# sourceMappingURL=tab-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-item.js","sourceRoot":"","sources":["../../../src/components/tabs/tab-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,OAAO;EAClB,gBAAgB;IACd,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;EAC7B,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tab-item-core'\n})\nexport class TabItem implements ComponentInterface {\n componentDidLoad () {\n notSupport('TabItem', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import { notSupport } from '../../utils';
3
+ export class Tabs {
4
+ componentDidLoad() {
5
+ notSupport('Tabs', this);
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-tabs-core"; }
11
+ }
12
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,MAAM,OAAO,IAAI;EACf,gBAAgB;IACd,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;EAC1B,CAAC;EAED,MAAM;IACJ,OAAO,CACL,EAAC,IAAI,OAAG,CACT,CAAA;EACH,CAAC;;CACF","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-tabs-core'\n})\nexport class Tabs implements ComponentInterface {\n componentDidLoad () {\n notSupport('Tabs', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -44,8 +44,12 @@ export class View {
44
44
  componentDidRender() {
45
45
  const el = this.el;
46
46
  el.childNodes.forEach(item => {
47
- if (item.nodeType === document.COMMENT_NODE && item["s-cn"])
48
- item["s-cn"] = false;
47
+ // Note: ['s-cn'] Content Reference Node
48
+ if (item.nodeType === document.COMMENT_NODE && item['s-cn'])
49
+ item['s-cn'] = false;
50
+ // Note: ['s-sr'] Is a slot reference node (渲染完成后禁用 slotRelocation 特性, 避免 Stencil 组件相互调用时内置排序与第三方 UI 框架冲突导致组件顺序混乱)
51
+ if (item.nodeType !== document.COMMENT_NODE && item['s-sr'])
52
+ item['s-sr'] = false;
49
53
  });
50
54
  }
51
55
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/components/view/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAsB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAA;AACzH,OAAO,UAAU,MAAM,YAAY,CAAA;AAMnC,MAAM,OAAO,IAAI;;IAeP,cAAS,GAAG,CAAC,CAAA;;;0BAVI,EAAE;yBACH,GAAG;iBACV,KAAK;iBACL,KAAK;;EAUtB,YAAY;IACV,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;MACjB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,IAAI,CAAC,KAAK,EAAE;UACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;SAClB;MACH,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;KACxB;IAED,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;MAClC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;IACzB,CAAC,EAAE,GAAG,CAAC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;IACD,OAAO,CACL,EAAC,IAAI,kBAAC,KAAK,EAAE,GAAG,IAAM,IAAI;MACxB,eAAa,CACR,CACR,CAAA;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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
+ {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/components/view/view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAsB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAgB,OAAO,EAAE,MAAM,eAAe,CAAA;AACzH,OAAO,UAAU,MAAM,YAAY,CAAA;AAMnC,MAAM,OAAO,IAAI;;IAeP,cAAS,GAAG,CAAC,CAAA;;;0BAVI,EAAE;yBACH,GAAG;iBACV,KAAK;iBACL,KAAK;;EAUtB,YAAY;IACV,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;MACjB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,IAAI,CAAC,KAAK,EAAE;UACd,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;SAClB;MACH,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;KACxB;IAED,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,EAAE;MAClC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;IACzB,CAAC,EAAE,GAAG,CAAC,CAAA;IACP,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;EAC7B,CAAC;EAGD,WAAW;IACT,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;EACjC,CAAC;EAGD,UAAU;IACR,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;IAC5C,IAAI,QAAQ,GAAG,GAAG,EAAE;MAClB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;KAChC;IACD,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;MAClB,UA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cesContent":["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 // Note: ['s-cn'] Content Reference Node\n if (item.nodeType === document.COMMENT_NODE && item['s-cn']) item['s-cn'] = false\n // Note: ['s-sr'] Is a slot reference node (渲染完成后禁用 slotRelocation 特性, 避免 Stencil 组件相互调用时内置排序与第三方 UI 框架冲突导致组件顺序混乱)\n if (item.nodeType !== document.COMMENT_NODE && item['s-sr']) item['s-sr'] = 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"]}
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-movable-area-core_2",[[0,"taro-movable-area-core",{"scaleArea":[4,"scale-area"]}],[0,"taro-movable-view-core",{"x":[8],"y":[8],"direction":[1],"outOfBounds":[4,"out-of-bounds"],"inertia":[4],"friction":[2],"damping":[2],"disabled":[4],"scale":[4],"scaleMin":[2,"scale-min"],"scaleMax":[2,"scale-max"],"scaleValue":[2,"scale-value"],"animation":[4],"setParent":[64],"endScale":[64],"setScale":[64]}]]],["taro-picker-view-column-core_2",[[0,"taro-picker-view-column-core",{"col":[1],"initialPosition":[1,"initial-position"],"paddingVertical":[2,"padding-vertical"],"isInit":[32],"isMove":[32]},[[1,"scroll","onScroll"],[1,"mouseup","onMouseEnd"],[1,"mouseout","onMouseEnd"],[1,"mouseleave","onMouseEnd"],[1,"touchend","onTouchEnd"]]],[4,"taro-picker-view-core",{"indicatorStyle":[1,"indicator-style"],"indicatorClass":[1,"indicator-class"],"value":[16],"maskStyle":[1,"mask-style"],"maskClass":[1,"mask-class"]},[[0,"onselect","onSelect"],[0,"onselectstart","onSelectStart"],[0,"onselectend","onPickerColEnd"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1540],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-ad-core",[[0,"taro-ad-core"]]],["taro-ad-custom-core",[[0,"taro-ad-custom-core"]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[513,"form-type"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core",{"src":[1],"nativeProps":[16]}]]],["taro-cover-view-core",[[4,"taro-cover-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-editor-core",[[0,"taro-editor-core"]]],["taro-form-core",[[4,"taro-form-core",null,[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-functional-page-navigator-core",[[0,"taro-functional-page-navigator-core"]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-input-core",[[0,"taro-input-core",{"value":[1025],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[516,"focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"focus":[64]}]]],["taro-keyboard-accessory-core",[[0,"taro-keyboard-accessory-core"]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-live-player-core",[[0,"taro-live-player-core"]]],["taro-live-pusher-core",[[0,"taro-live-pusher-core"]]],["taro-map-core",[[0,"taro-map-core"]]],["taro-match-media-core",[[0,"taro-match-media-core"]]],["taro-navigation-bar-core",[[0,"taro-navigation-bar-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-official-account-core",[[0,"taro-official-account-core"]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-page-container-core",[[0,"taro-page-container-core"]]],["taro-page-meta-core",[[0,"taro-page-meta-core"]]],["taro-progress-core",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-root-portal-core",[[0,"taro-root-portal-core"]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[520,"scroll-top"],"mpScrollLeft":[520,"scroll-left"],"mpScrollIntoView":[513,"scroll-into-view"],"scrollWithAnimation":[4,"scroll-with-animation"]},[[3,"scroll","handleScroll"]]]]],["taro-share-element-core",[[0,"taro-share-element-core"]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1538],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-slot-core",[[0,"taro-slot-core"]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"borderStyle":[32],"backgroundColor":[32],"color":[32],"selectedColor":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1025],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"autoHeight":[4,"auto-height"],"name":[1],"nativeProps":[16],"line":[32],"focus":[64]}]]],["taro-view-core",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-voip-room-core",[[0,"taro-voip-room-core"]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[1032],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32],"handleMoveStart":[64],"handleMoving":[64],"handleMoveEnd":[64]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]], options);
13
+ return bootstrapLazy(JSON.parse("[[\"taro-checkbox-core_2\",[[4,\"taro-checkbox-core\",{\"name\":[1],\"value\":[1],\"color\":[1],\"id\":[1025],\"checked\":[4],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-checkbox-group-core\",{\"name\":[8]},[[0,\"checkboxchange\",\"function\"]]]]],[\"taro-movable-area-core_2\",[[0,\"taro-movable-area-core\",{\"scaleArea\":[4,\"scale-area\"]}],[0,\"taro-movable-view-core\",{\"x\":[8],\"y\":[8],\"direction\":[1],\"outOfBounds\":[4,\"out-of-bounds\"],\"inertia\":[4],\"friction\":[2],\"damping\":[2],\"disabled\":[4],\"scale\":[4],\"scaleMin\":[2,\"scale-min\"],\"scaleMax\":[2,\"scale-max\"],\"scaleValue\":[2,\"scale-value\"],\"animation\":[4],\"setParent\":[64],\"endScale\":[64],\"setScale\":[64]}]]],[\"taro-picker-view-column-core_2\",[[0,\"taro-picker-view-column-core\",{\"col\":[1],\"initialPosition\":[1,\"initial-position\"],\"paddingVertical\":[2,\"padding-vertical\"],\"isInit\":[32],\"isMove\":[32]},[[1,\"scroll\",\"onScroll\"],[1,\"mouseup\",\"onMouseEnd\"],[1,\"mouseout\",\"onMouseEnd\"],[1,\"mouseleave\",\"onMouseEnd\"],[1,\"touchend\",\"onTouchEnd\"]]],[4,\"taro-picker-view-core\",{\"indicatorStyle\":[1,\"indicator-style\"],\"indicatorClass\":[1,\"indicator-class\"],\"value\":[16],\"maskStyle\":[1,\"mask-style\"],\"maskClass\":[1,\"mask-class\"]},[[0,\"onselect\",\"onSelect\"],[0,\"onselectstart\",\"onSelectStart\"],[0,\"onselectend\",\"onPickerColEnd\"]]]]],[\"taro-radio-core_2\",[[4,\"taro-radio-core\",{\"name\":[1],\"value\":[1],\"id\":[1025],\"checked\":[1540],\"disabled\":[4],\"nativeProps\":[16],\"isWillLoadCalled\":[32]}],[0,\"taro-radio-group-core\",{\"name\":[8]},[[0,\"radiochange\",\"function\"]]]]],[\"taro-swiper-core_2\",[[4,\"taro-swiper-core\",{\"indicatorDots\":[4,\"indicator-dots\"],\"indicatorColor\":[1,\"indicator-color\"],\"indicatorActiveColor\":[1,\"indicator-active-color\"],\"autoplay\":[4],\"current\":[2],\"interval\":[2],\"duration\":[2],\"circular\":[4],\"vertical\":[4],\"previousMargin\":[1,\"previous-margin\"],\"nextMargin\":[1,\"next-margin\"],\"displayMultipleItems\":[2,\"display-multiple-items\"],\"full\":[4],\"zoom\":[4],\"swiperWrapper\":[32],\"swiper\":[32],\"isWillLoadCalled\":[32],\"observer\":[32],\"observerFirst\":[32],\"observerLast\":[32]}],[0,\"taro-swiper-item-core\",{\"itemId\":[1,\"item-id\"]}]]],[\"taro-ad-core\",[[0,\"taro-ad-core\"]]],[\"taro-ad-custom-core\",[[0,\"taro-ad-custom-core\"]]],[\"taro-animation-video-core\",[[0,\"taro-animation-video-core\"]]],[\"taro-animation-view-core\",[[0,\"taro-animation-view-core\"]]],[\"taro-ar-camera-core\",[[0,\"taro-ar-camera-core\"]]],[\"taro-audio-core\",[[0,\"taro-audio-core\",{\"src\":[1],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"nativeProps\":[16]}]]],[\"taro-aweme-data-core\",[[0,\"taro-aweme-data-core\"]]],[\"taro-block-core\",[[0,\"taro-block-core\"]]],[\"taro-button-core\",[[4,\"taro-button-core\",{\"disabled\":[4],\"hoverClass\":[1,\"hover-class\"],\"type\":[1],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"size\":[1],\"plain\":[4],\"loading\":[4],\"formType\":[513,\"form-type\"],\"hover\":[32],\"touch\":[32]},[[0,\"click\",\"onClick\"],[1,\"touchstart\",\"onTouchStart\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-camera-core\",[[0,\"taro-camera-core\"]]],[\"taro-canvas-core\",[[0,\"taro-canvas-core\",{\"canvasId\":[1,\"canvas-id\"],\"nativeProps\":[16]}]]],[\"taro-comment-detail-core\",[[0,\"taro-comment-detail-core\"]]],[\"taro-comment-list-core\",[[0,\"taro-comment-list-core\"]]],[\"taro-contact-button-core\",[[0,\"taro-contact-button-core\"]]],[\"taro-cover-image-core\",[[0,\"taro-cover-image-core\",{\"src\":[1],\"nativeProps\":[16]}]]],[\"taro-cover-view-core\",[[4,\"taro-cover-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-custom-wrapper-core\",[[0,\"taro-custom-wrapper-core\"]]],[\"taro-editor-core\",[[0,\"taro-editor-core\"]]],[\"taro-follow-swan-core\",[[0,\"taro-follow-swan-core\"]]],[\"taro-form-core\",[[4,\"taro-form-core\",null,[[0,\"tarobuttonsubmit\",\"onButtonSubmit\"],[0,\"tarobuttonreset\",\"onButtonReset\"]]]]],[\"taro-functional-page-navigator-core\",[[0,\"taro-functional-page-navigator-core\"]]],[\"taro-icon-core\",[[0,\"taro-icon-core\",{\"type\":[1],\"size\":[8],\"color\":[1]}]]],[\"taro-image-core\",[[0,\"taro-image-core\",{\"src\":[1],\"mode\":[1],\"lazyLoad\":[4,\"lazy-load\"],\"nativeProps\":[16],\"aspectFillMode\":[32]}]]],[\"taro-inline-payment-panel-core\",[[0,\"taro-inline-payment-panel-core\"]]],[\"taro-input-core\",[[0,\"taro-input-core\",{\"value\":[1025],\"type\":[1],\"password\":[4],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[516,\"focus\"],\"confirmType\":[1,\"confirm-type\"],\"name\":[1],\"nativeProps\":[16],\"focus\":[64]}]]],[\"taro-keyboard-accessory-core\",[[0,\"taro-keyboard-accessory-core\"]]],[\"taro-label-core\",[[4,\"taro-label-core\",{\"for\":[1]}]]],[\"taro-lifestyle-core\",[[0,\"taro-lifestyle-core\"]]],[\"taro-like-core\",[[0,\"taro-like-core\"]]],[\"taro-live-player-core\",[[0,\"taro-live-player-core\"]]],[\"taro-live-pusher-core\",[[0,\"taro-live-pusher-core\"]]],[\"taro-login-core\",[[0,\"taro-login-core\"]]],[\"taro-lottie-core\",[[0,\"taro-lottie-core\"]]],[\"taro-map-core\",[[0,\"taro-map-core\"]]],[\"taro-match-media-core\",[[0,\"taro-match-media-core\"]]],[\"taro-native-slot-core\",[[0,\"taro-native-slot-core\"]]],[\"taro-navigation-bar-core\",[[0,\"taro-navigation-bar-core\"]]],[\"taro-navigator-core\",[[0,\"taro-navigator-core\",{\"hoverClass\":[1,\"hover-class\"],\"url\":[1],\"openType\":[1,\"open-type\"],\"isHover\":[4,\"is-hover\"],\"delta\":[2]},[[0,\"click\",\"onClick\"]]]]],[\"taro-official-account-core\",[[0,\"taro-official-account-core\"]]],[\"taro-open-data-core\",[[0,\"taro-open-data-core\"]]],[\"taro-page-container-core\",[[0,\"taro-page-container-core\"]]],[\"taro-page-meta-core\",[[0,\"taro-page-meta-core\"]]],[\"taro-progress-core\",[[0,\"taro-progress-core\",{\"percent\":[2],\"showInfo\":[4,\"show-info\"],\"borderRadius\":[8,\"border-radius\"],\"fontSize\":[8,\"font-size\"],\"strokeWidth\":[8,\"stroke-width\"],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"active\":[4]}]]],[\"taro-pull-to-refresh\",[[4,\"taro-pull-to-refresh\",{\"prefixCls\":[1,\"prefix-cls\"],\"distanceToRefresh\":[2,\"distance-to-refresh\"],\"damping\":[2],\"indicator\":[16],\"currSt\":[32],\"dragOnEdge\":[32]}]]],[\"taro-rich-text-core\",[[0,\"taro-rich-text-core\",{\"nodes\":[1]}]]],[\"taro-root-portal-core\",[[0,\"taro-root-portal-core\"]]],[\"taro-rtc-room-core\",[[0,\"taro-rtc-room-core\"]]],[\"taro-rtc-room-item-core\",[[0,\"taro-rtc-room-item-core\"]]],[\"taro-scroll-view-core\",[[4,\"taro-scroll-view-core\",{\"scrollX\":[4,\"scroll-x\"],\"scrollY\":[4,\"scroll-y\"],\"upperThreshold\":[8,\"upper-threshold\"],\"lowerThreshold\":[8,\"lower-threshold\"],\"mpScrollTop\":[520,\"scroll-top\"],\"mpScrollLeft\":[520,\"scroll-left\"],\"mpScrollIntoView\":[513,\"scroll-into-view\"],\"scrollWithAnimation\":[4,\"scroll-with-animation\"]},[[3,\"scroll\",\"handleScroll\"]]]]],[\"taro-share-element-core\",[[0,\"taro-share-element-core\"]]],[\"taro-slider-core\",[[0,\"taro-slider-core\",{\"min\":[2],\"max\":[2],\"step\":[2],\"disabled\":[4],\"value\":[1538],\"activeColor\":[1,\"active-color\"],\"backgroundColor\":[1,\"background-color\"],\"blockSize\":[2,\"block-size\"],\"blockColor\":[1,\"block-color\"],\"showValue\":[4,\"show-value\"],\"name\":[1],\"totalWidth\":[32],\"touching\":[32],\"ogX\":[32],\"touchId\":[32],\"percent\":[32],\"ogPercent\":[32],\"isWillLoadCalled\":[32]}]]],[\"taro-slot-core\",[[0,\"taro-slot-core\"]]],[\"taro-switch-core\",[[0,\"taro-switch-core\",{\"type\":[1],\"checked\":[4],\"color\":[1],\"name\":[1],\"disabled\":[4],\"nativeProps\":[16],\"isChecked\":[32],\"isWillLoadCalled\":[32]}]]],[\"taro-tab-item-core\",[[0,\"taro-tab-item-core\"]]],[\"taro-tabbar\",[[0,\"taro-tabbar\",{\"conf\":[16],\"list\":[32],\"borderStyle\":[32],\"backgroundColor\":[32],\"color\":[32],\"selectedColor\":[32],\"selectedIndex\":[32],\"status\":[32]}]]],[\"taro-tabs-core\",[[0,\"taro-tabs-core\"]]],[\"taro-text-core\",[[4,\"taro-text-core\",{\"selectable\":[4]}]]],[\"taro-textarea-core\",[[0,\"taro-textarea-core\",{\"value\":[1025],\"placeholder\":[1],\"disabled\":[4],\"maxlength\":[2],\"autoFocus\":[4,\"auto-focus\"],\"autoHeight\":[4,\"auto-height\"],\"name\":[1],\"nativeProps\":[16],\"line\":[32],\"focus\":[64]}]]],[\"taro-view-core\",[[4,\"taro-view-core\",{\"animation\":[1],\"hoverClass\":[1,\"hover-class\"],\"hoverStartTime\":[2,\"hover-start-time\"],\"hoverStayTime\":[2,\"hover-stay-time\"],\"hover\":[32],\"touch\":[32]},[[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-voip-room-core\",[[0,\"taro-voip-room-core\"]]],[\"taro-web-view-core\",[[0,\"taro-web-view-core\",{\"src\":[1]}]]],[\"taro-picker-core_2\",[[4,\"taro-picker-core\",{\"mode\":[1],\"disabled\":[4],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"value\":[1032],\"start\":[1],\"end\":[1],\"fields\":[1],\"name\":[1],\"pickerValue\":[32],\"height\":[32],\"hidden\":[32],\"fadeOut\":[32],\"isWillLoadCalled\":[32]}],[0,\"taro-picker-group\",{\"mode\":[1],\"range\":[16],\"rangeKey\":[1,\"range-key\"],\"height\":[2],\"columnId\":[1,\"column-id\"],\"updateHeight\":[16],\"onColumnChange\":[16],\"updateDay\":[16],\"startY\":[32],\"preY\":[32],\"hadMove\":[32],\"touchEnd\":[32],\"isMove\":[32],\"handleMoveStart\":[64],\"handleMoving\":[64],\"handleMoveEnd\":[64]},[[1,\"mousedown\",\"onMouseDown\"],[1,\"mousemove\",\"onMouseMove\"],[1,\"mouseup\",\"onMouseMoveEnd\"],[1,\"mouseleave\",\"onMouseMoveEnd\"],[1,\"touchstart\",\"onTouchStart\"],[1,\"touchmove\",\"onTouchMove\"],[1,\"touchend\",\"onTouchEnd\"]]]]],[\"taro-video-control_3\",[[0,\"taro-video-core\",{\"src\":[1],\"duration\":[2],\"controls\":[4],\"autoplay\":[4],\"loop\":[4],\"muted\":[4],\"initialTime\":[2,\"initial-time\"],\"poster\":[1],\"objectFit\":[1,\"object-fit\"],\"showProgress\":[4,\"show-progress\"],\"showFullscreenBtn\":[4,\"show-fullscreen-btn\"],\"showPlayBtn\":[4,\"show-play-btn\"],\"showCenterPlayBtn\":[4,\"show-center-play-btn\"],\"showMuteBtn\":[4,\"show-mute-btn\"],\"danmuList\":[16],\"danmuBtn\":[4,\"danmu-btn\"],\"enableDanmu\":[4,\"enable-danmu\"],\"enablePlayGesture\":[4,\"enable-play-gesture\"],\"enableProgressGesture\":[4,\"enable-progress-gesture\"],\"vslideGesture\":[4,\"vslide-gesture\"],\"vslideGestureInFullscreen\":[4,\"vslide-gesture-in-fullscreen\"],\"nativeProps\":[16],\"_duration\":[32],\"_enableDanmu\":[32],\"isPlaying\":[32],\"isFirst\":[32],\"isFullScreen\":[32],\"fullScreenTimestamp\":[32],\"isMute\":[32],\"play\":[64],\"pause\":[64],\"stop\":[64],\"seek\":[64],\"requestFullScreen\":[64],\"exitFullScreen\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[4,\"taro-video-control\",{\"controls\":[4],\"currentTime\":[2,\"current-time\"],\"duration\":[2],\"isPlaying\":[4,\"is-playing\"],\"pauseFunc\":[16],\"playFunc\":[16],\"seekFunc\":[16],\"showPlayBtn\":[4,\"show-play-btn\"],\"showProgress\":[4,\"show-progress\"],\"setProgressBall\":[64],\"toggleVisibility\":[64],\"getIsDraggingProgressBall\":[64],\"setCurrentTime\":[64]},[[5,\"touchmove\",\"onDocumentTouchMove\"],[5,\"touchend\",\"onDocumentTouchEnd\"],[5,\"touchcancel\",\"onDocumentTouchEnd\"]]],[0,\"taro-video-danmu\",{\"enable\":[4],\"danmuList\":[32],\"sendDanmu\":[64],\"tick\":[64]}]]]]"), options);
14
14
  });
15
15
  };
16
16
 
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-5d881caf.js';
2
+ import { n as notSupport } from './helper-3d0ecf0f.js';
3
+ import '@tarojs/taro';
4
+
5
+ const AnimationVideo = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('AnimationVideo', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ };
16
+
17
+ export { AnimationVideo as taro_animation_video_core };
18
+
19
+ //# sourceMappingURL=taro-animation-video-core.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-animation-video-core.entry.js","mappings":";;;;MAOa,cAAc;;;;EACzB,gBAAgB;IACd,UAAU,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;GACnC;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;","names":[],"sources":["./src/components/animation-video/animation-video.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-animation-video-core'\n})\nexport class AnimationVideo implements ComponentInterface {\n componentDidLoad () {\n notSupport('AnimationVideo', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-5d881caf.js';
2
+ import { n as notSupport } from './helper-3d0ecf0f.js';
3
+ import '@tarojs/taro';
4
+
5
+ const AnimationView = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('AnimationView', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ };
16
+
17
+ export { AnimationView as taro_animation_view_core };
18
+
19
+ //# sourceMappingURL=taro-animation-view-core.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-animation-view-core.entry.js","mappings":";;;;MAOa,aAAa;;;;EACxB,gBAAgB;IACd,UAAU,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;GAClC;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;","names":[],"sources":["./src/components/animation-view/animation-view.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-animation-view-core'\n})\nexport class AnimationView implements ComponentInterface {\n componentDidLoad () {\n notSupport('AnimationView', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-5d881caf.js';
2
+ import { n as notSupport } from './helper-3d0ecf0f.js';
3
+ import '@tarojs/taro';
4
+
5
+ const ArCamera = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('ArCamera', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ };
16
+
17
+ export { ArCamera as taro_ar_camera_core };
18
+
19
+ //# sourceMappingURL=taro-ar-camera-core.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-ar-camera-core.entry.js","mappings":";;;;MAOa,QAAQ;;;;EACnB,gBAAgB;IACd,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;GAC7B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;","names":[],"sources":["./src/components/ar-camera/ar-camera.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-ar-camera-core'\n})\nexport class ArCamera implements ComponentInterface {\n componentDidLoad () {\n notSupport('ArCamera', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h, H as Host } from './index-5d881caf.js';
2
+ import { n as notSupport } from './helper-3d0ecf0f.js';
3
+ import '@tarojs/taro';
4
+
5
+ const AwemeData = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ componentDidLoad() {
10
+ notSupport('AwemeData', this);
11
+ }
12
+ render() {
13
+ return (h(Host, null));
14
+ }
15
+ };
16
+
17
+ export { AwemeData as taro_aweme_data_core };
18
+
19
+ //# sourceMappingURL=taro-aweme-data-core.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"taro-aweme-data-core.entry.js","mappings":";;;;MAOa,SAAS;;;;EACpB,gBAAgB;IACd,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;GAC9B;EAED,MAAM;IACJ,QACE,EAAC,IAAI,OAAG,EACT;GACF;;;;;","names":[],"sources":["./src/components/aweme-data/aweme-data.tsx"],"sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-aweme-data-core'\n})\nexport class AwemeData implements ComponentInterface {\n componentDidLoad () {\n notSupport('AwemeData', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"],"version":3}
@@ -20,6 +20,11 @@ const Button = class {
20
20
  this.hover = false;
21
21
  this.touch = false;
22
22
  }
23
+ onClick(e) {
24
+ if (this.disabled) {
25
+ e.stopPropagation();
26
+ }
27
+ }
23
28
  onTouchStart() {
24
29
  if (this.disabled) {
25
30
  return;