@tarojs/components 3.5.7-alpha.9 → 3.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/helper-db78e01a.js +0 -2
- package/dist/cjs/index-47a1959e.js +0 -2
- package/dist/cjs/{index-9174e0b1.js → index-7c61bee9.js} +234 -477
- package/dist/cjs/index-f9d21cc5.js +0 -2
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/intersection-observer-dc4cfcef.js +0 -2
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/cjs/taro-ad-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-audio-core.cjs.entry.js +2 -5
- package/dist/cjs/taro-block-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-button-core.cjs.entry.js +2 -7
- package/dist/cjs/taro-camera-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-canvas-core.cjs.entry.js +3 -6
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +9 -15
- package/dist/cjs/taro-components.cjs.js +3 -5
- package/dist/cjs/taro-cover-image-core.cjs.entry.js +4 -7
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +3 -7
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-editor-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-form-core.cjs.entry.js +39 -34
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-icon-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-image-core.cjs.entry.js +4 -7
- package/dist/cjs/taro-input-core.cjs.entry.js +14 -29
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-label-core.cjs.entry.js +2 -5
- package/dist/cjs/taro-live-player-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-map-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-match-media-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +157 -0
- package/dist/cjs/{taro-movable-area-core_2.cjs.entry.js → taro-movable-view-core.cjs.entry.js} +54 -169
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-navigator-core.cjs.entry.js +2 -6
- package/dist/cjs/taro-official-account-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-open-data-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-page-container-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +15 -31
- package/dist/cjs/taro-picker-view-column-core.cjs.entry.js +95 -0
- package/dist/cjs/{taro-picker-view-column-core_2.cjs.entry.js → taro-picker-view-core.cjs.entry.js} +6 -101
- package/dist/cjs/taro-progress-core.cjs.entry.js +5 -7
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +8 -10
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +9 -15
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +2 -5
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +22 -28
- package/dist/cjs/taro-share-element-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-slider-core.cjs.entry.js +40 -37
- package/dist/cjs/taro-slot-core.cjs.entry.js +7 -4
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +77 -46
- package/dist/cjs/taro-switch-core.cjs.entry.js +8 -12
- package/dist/cjs/taro-tabbar.cjs.entry.js +4 -12
- package/dist/cjs/taro-text-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-textarea-core.cjs.entry.js +10 -21
- package/dist/cjs/taro-video-control_3.cjs.entry.js +27723 -81
- package/dist/cjs/taro-view-core.cjs.entry.js +3 -7
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +2 -4
- package/dist/cjs/taro-web-view-core.cjs.entry.js +2 -5
- package/dist/collection/collection-manifest.json +4 -16
- package/dist/collection/components/ad/ad.js +1 -2
- package/dist/collection/components/ad-custom/ad-custom.js +1 -2
- package/dist/collection/components/audio/audio.js +190 -199
- package/dist/collection/components/block/block.js +2 -2
- package/dist/collection/components/button/button.js +217 -230
- package/dist/collection/components/camera/camera.js +1 -2
- package/dist/collection/components/canvas/canvas.js +58 -67
- package/dist/collection/components/checkbox/checkbox-group.js +42 -50
- package/dist/collection/components/checkbox/checkbox.js +162 -175
- package/dist/collection/components/cover-image/cover-image.js +74 -83
- package/dist/collection/components/cover-view/cover-view.js +118 -131
- package/dist/collection/components/custom-wrapper/custom-wrapper.js +2 -2
- package/dist/collection/components/editor/editor.js +1 -2
- package/dist/collection/components/form/form.js +74 -66
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +1 -2
- package/dist/collection/components/icon/icon.js +56 -61
- package/dist/collection/components/image/image.js +113 -125
- package/dist/collection/components/input/input.js +296 -336
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +1 -2
- package/dist/collection/components/label/label.js +22 -27
- package/dist/collection/components/live-player/live-player.js +1 -2
- package/dist/collection/components/live-pusher/live-pusher.js +1 -2
- package/dist/collection/components/map/map.js +1 -2
- package/dist/collection/components/match-media/match-media.js +1 -2
- package/dist/collection/components/movable-area/movable-area.js +26 -34
- package/dist/collection/components/movable-area/movable-view.js +424 -397
- package/dist/collection/components/navigation-bar/navigation-bar.js +1 -2
- package/dist/collection/components/navigator/navigator.js +145 -158
- package/dist/collection/components/official-account/official-account.js +1 -2
- package/dist/collection/components/open-data/open-data.js +1 -2
- package/dist/collection/components/page-container/page-container.js +1 -2
- package/dist/collection/components/page-meta/page-meta.js +1 -2
- package/dist/collection/components/picker/constant.js +0 -1
- package/dist/collection/components/picker/picker-group.js +176 -240
- package/dist/collection/components/picker/picker.js +257 -261
- package/dist/collection/components/picker/utils.js +0 -1
- package/dist/collection/components/picker-view/picker-view-column.js +147 -158
- package/dist/collection/components/picker-view/picker-view.js +159 -171
- package/dist/collection/components/progress/progress.js +157 -153
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +114 -121
- package/dist/collection/components/radio/radio-group.js +43 -50
- package/dist/collection/components/radio/radio.js +144 -152
- package/dist/collection/components/rich-text/rich-text.js +23 -27
- package/dist/collection/components/root-portal/root-portal.js +1 -2
- package/dist/collection/components/scroll-view/scroll-view.js +220 -242
- package/dist/collection/components/share-element/share-element.js +1 -2
- package/dist/collection/components/slider/slider.js +283 -279
- package/dist/collection/components/slot/slot.js +5 -2
- package/dist/collection/components/swiper/swiper-item.js +21 -26
- package/dist/collection/components/swiper/swiper.js +391 -346
- package/dist/collection/components/switch/switch.js +139 -153
- package/dist/collection/components/tabbar/tabbar-item.js +6 -2
- package/dist/collection/components/tabbar/tabbar.js +70 -86
- package/dist/collection/components/text/text.js +30 -35
- package/dist/collection/components/textarea/textarea.js +227 -262
- package/dist/collection/components/video/utils.js +0 -1
- package/dist/collection/components/video/video-control.js +247 -252
- package/dist/collection/components/video/video-danmu.js +66 -72
- package/dist/collection/components/video/video.js +775 -733
- package/dist/collection/components/view/view.js +118 -131
- package/dist/collection/components/voip-room/voip-room.js +1 -2
- package/dist/collection/components/web-view/web-view.js +57 -68
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/helper.js +0 -1
- package/dist/collection/utils/index.js +0 -1
- package/dist/collection/utils/style.js +0 -1
- package/dist/collection/utils/url.js +0 -1
- package/dist/esm/helper-3d0ecf0f.js +0 -2
- package/dist/esm/index-1d8e8acd.js +0 -2
- package/dist/esm/{index-5d881caf.js → index-8809c729.js} +234 -477
- package/dist/esm/index-cad8203e.js +0 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/intersection-observer-8e4c7135.js +0 -2
- package/dist/esm/loader.js +3 -5
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +2 -4
- package/dist/esm/taro-ad-custom-core.entry.js +2 -4
- package/dist/esm/taro-audio-core.entry.js +2 -5
- package/dist/esm/taro-block-core.entry.js +2 -4
- package/dist/esm/taro-button-core.entry.js +2 -7
- package/dist/esm/taro-camera-core.entry.js +2 -4
- package/dist/esm/taro-canvas-core.entry.js +3 -6
- package/dist/esm/taro-checkbox-core_2.entry.js +9 -15
- package/dist/esm/taro-components.js +3 -5
- package/dist/esm/taro-cover-image-core.entry.js +4 -7
- package/dist/esm/taro-cover-view-core.entry.js +3 -7
- package/dist/esm/taro-custom-wrapper-core.entry.js +2 -4
- package/dist/esm/taro-editor-core.entry.js +2 -4
- package/dist/esm/taro-form-core.entry.js +39 -34
- package/dist/esm/taro-functional-page-navigator-core.entry.js +2 -4
- package/dist/esm/taro-icon-core.entry.js +2 -6
- package/dist/esm/taro-image-core.entry.js +4 -7
- package/dist/esm/taro-input-core.entry.js +14 -29
- package/dist/esm/taro-keyboard-accessory-core.entry.js +2 -4
- package/dist/esm/taro-label-core.entry.js +2 -5
- package/dist/esm/taro-live-player-core.entry.js +2 -4
- package/dist/esm/taro-live-pusher-core.entry.js +2 -4
- package/dist/esm/taro-map-core.entry.js +2 -4
- package/dist/esm/taro-match-media-core.entry.js +2 -4
- package/dist/esm/taro-movable-area-core.entry.js +153 -0
- package/dist/esm/{taro-movable-area-core_2.entry.js → taro-movable-view-core.entry.js} +55 -169
- package/dist/esm/taro-navigation-bar-core.entry.js +2 -4
- package/dist/esm/taro-navigator-core.entry.js +2 -6
- package/dist/esm/taro-official-account-core.entry.js +2 -4
- package/dist/esm/taro-open-data-core.entry.js +2 -4
- package/dist/esm/taro-page-container-core.entry.js +2 -4
- package/dist/esm/taro-page-meta-core.entry.js +2 -4
- package/dist/esm/taro-picker-core_2.entry.js +15 -31
- package/dist/esm/taro-picker-view-column-core.entry.js +91 -0
- package/dist/esm/{taro-picker-view-column-core_2.entry.js → taro-picker-view-core.entry.js} +3 -97
- package/dist/esm/taro-progress-core.entry.js +5 -7
- package/dist/esm/taro-pull-to-refresh.entry.js +8 -10
- package/dist/esm/taro-radio-core_2.entry.js +9 -15
- package/dist/esm/taro-rich-text-core.entry.js +2 -5
- package/dist/esm/taro-root-portal-core.entry.js +2 -4
- package/dist/esm/taro-scroll-view-core.entry.js +22 -28
- package/dist/esm/taro-share-element-core.entry.js +2 -4
- package/dist/esm/taro-slider-core.entry.js +40 -37
- package/dist/esm/taro-slot-core.entry.js +7 -4
- package/dist/esm/taro-swiper-core_2.entry.js +77 -46
- package/dist/esm/taro-switch-core.entry.js +8 -12
- package/dist/esm/taro-tabbar.entry.js +4 -12
- package/dist/esm/taro-text-core.entry.js +2 -4
- package/dist/esm/taro-textarea-core.entry.js +10 -21
- package/dist/esm/taro-video-control_3.entry.js +27717 -75
- package/dist/esm/taro-view-core.entry.js +3 -7
- package/dist/esm/taro-voip-room-core.entry.js +2 -4
- package/dist/esm/taro-web-view-core.entry.js +2 -5
- package/dist/esm-es5/helper-3d0ecf0f.js +1 -2
- package/dist/esm-es5/index-1d8e8acd.js +1 -2
- package/dist/esm-es5/index-8809c729.js +1 -0
- package/dist/esm-es5/index-cad8203e.js +1 -2
- package/dist/esm-es5/index.js +0 -2
- package/dist/esm-es5/intersection-observer-8e4c7135.js +1 -2
- package/dist/esm-es5/loader.js +1 -2
- package/dist/esm-es5/taro-ad-core.entry.js +1 -2
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -2
- package/dist/esm-es5/taro-audio-core.entry.js +1 -2
- package/dist/esm-es5/taro-block-core.entry.js +1 -2
- package/dist/esm-es5/taro-button-core.entry.js +1 -2
- package/dist/esm-es5/taro-camera-core.entry.js +1 -2
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -2
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -2
- package/dist/esm-es5/taro-components.js +1 -2
- package/dist/esm-es5/taro-cover-image-core.entry.js +1 -2
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -2
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js +1 -2
- package/dist/esm-es5/taro-editor-core.entry.js +1 -2
- package/dist/esm-es5/taro-form-core.entry.js +1 -2
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -2
- package/dist/esm-es5/taro-icon-core.entry.js +1 -2
- package/dist/esm-es5/taro-image-core.entry.js +1 -2
- package/dist/esm-es5/taro-input-core.entry.js +1 -2
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -2
- package/dist/esm-es5/taro-label-core.entry.js +1 -2
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -2
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -2
- package/dist/esm-es5/taro-map-core.entry.js +1 -2
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -2
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -0
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -0
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -2
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -2
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -2
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -2
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -2
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -2
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -2
- package/dist/esm-es5/taro-picker-view-column-core.entry.js +1 -0
- package/dist/esm-es5/taro-picker-view-core.entry.js +1 -0
- package/dist/esm-es5/taro-progress-core.entry.js +1 -2
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -2
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -2
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -2
- package/dist/esm-es5/taro-root-portal-core.entry.js +1 -2
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -2
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -2
- package/dist/esm-es5/taro-slider-core.entry.js +1 -2
- package/dist/esm-es5/taro-slot-core.entry.js +1 -2
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -2
- package/dist/esm-es5/taro-switch-core.entry.js +1 -2
- package/dist/esm-es5/taro-tabbar.entry.js +1 -2
- package/dist/esm-es5/taro-text-core.entry.js +1 -2
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -2
- package/dist/esm-es5/taro-video-control_3.entry.js +365 -2
- package/dist/esm-es5/taro-view-core.entry.js +1 -2
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -2
- package/dist/esm-es5/taro-web-view-core.entry.js +1 -2
- package/dist/taro-components/index.esm.js +0 -2
- package/dist/taro-components/p-028e2728.entry.js +1 -0
- package/dist/taro-components/p-0380841f.system.js +1 -0
- package/dist/taro-components/p-059912fd.js +1 -0
- package/dist/taro-components/p-06178a0c.entry.js +1 -0
- package/dist/taro-components/{p-dcfb7d97.system.entry.js → p-06b9d39c.system.entry.js} +1 -2
- package/dist/taro-components/p-06e6864b.system.entry.js +1 -0
- package/dist/taro-components/{p-8a3620a6.system.entry.js → p-07294134.system.entry.js} +1 -2
- package/dist/taro-components/{p-9f1ca602.system.entry.js → p-075458e5.system.entry.js} +1 -2
- package/dist/taro-components/p-10c47df8.system.entry.js +1 -0
- package/dist/taro-components/p-15e45ed6.system.js +1 -2
- package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
- package/dist/taro-components/p-25df0ce9.entry.js +1 -0
- package/dist/taro-components/p-27126803.system.entry.js +1 -0
- package/dist/taro-components/p-275d883f.system.entry.js +1 -0
- package/dist/taro-components/p-27c80869.system.entry.js +1 -0
- package/dist/taro-components/p-2ec47545.entry.js +1 -0
- package/dist/taro-components/p-3255f11f.system.entry.js +1 -0
- package/dist/taro-components/p-34178401.entry.js +1 -0
- package/dist/taro-components/p-3549b6d2.entry.js +1 -0
- package/dist/taro-components/p-362998cf.entry.js +1 -0
- package/dist/taro-components/p-3b1d2d37.system.js +1 -2
- package/dist/taro-components/p-3c6090fd.entry.js +1 -0
- package/dist/taro-components/{p-301a8b85.system.entry.js → p-3e11c8cc.system.entry.js} +1 -2
- package/dist/taro-components/p-4262d1b6.entry.js +1 -0
- package/dist/taro-components/p-42630f45.entry.js +1 -0
- package/dist/taro-components/p-44398c17.system.entry.js +1 -0
- package/dist/taro-components/p-44cbb351.system.js +1 -0
- package/dist/taro-components/p-4ada10aa.entry.js +1 -0
- package/dist/taro-components/{p-1743a04b.system.js → p-4c1a7cae.system.entry.js} +27 -28
- package/dist/taro-components/p-4cf436f9.entry.js +1 -0
- package/dist/taro-components/p-4d826fb7.entry.js +1 -0
- package/dist/taro-components/p-50ea2036.system.js +1 -2
- package/dist/taro-components/p-55266a1f.entry.js +1 -0
- package/dist/taro-components/p-56c86512.entry.js +1 -0
- package/dist/taro-components/p-5733124c.entry.js +1 -0
- package/dist/taro-components/p-5746d7ce.js +1 -2
- package/dist/taro-components/p-57a2a441.entry.js +1 -0
- package/dist/taro-components/p-59d93770.entry.js +1 -0
- package/dist/taro-components/p-5a2305e7.entry.js +1 -0
- package/dist/taro-components/p-5a374cb9.entry.js +1 -0
- package/dist/taro-components/p-5c87902f.system.entry.js +1 -0
- package/dist/taro-components/p-5e223bab.system.entry.js +1 -0
- package/dist/taro-components/p-5f18259d.system.entry.js +1 -0
- package/dist/taro-components/p-61f225ef.system.js +1 -2
- package/dist/taro-components/p-62fc514e.entry.js +1 -0
- package/dist/taro-components/p-64447f5a.system.entry.js +1 -0
- package/dist/taro-components/p-663d1bb9.system.js +1 -2
- package/dist/taro-components/p-67222d90.system.entry.js +1 -0
- package/dist/taro-components/{p-4b27df71.system.entry.js → p-692d986d.system.entry.js} +1 -2
- package/dist/taro-components/p-6a96da58.js +1 -2
- package/dist/taro-components/p-6aa557f0.entry.js +1 -0
- package/dist/taro-components/{p-580a72d1.system.entry.js → p-6ad59489.system.entry.js} +1 -2
- package/dist/taro-components/p-72f327e1.js +1 -2
- package/dist/taro-components/p-72f858e4.entry.js +1 -0
- package/dist/taro-components/{p-c4cf58af.system.entry.js → p-733cc64a.system.entry.js} +1 -2
- package/dist/taro-components/p-7374537f.entry.js +1 -0
- package/dist/taro-components/p-7407013d.entry.js +1 -0
- package/dist/taro-components/p-76724e58.js +2 -3
- package/dist/taro-components/p-7d329ab0.entry.js +1 -0
- package/dist/taro-components/{p-8bec95d4.system.entry.js → p-7e960ac3.system.entry.js} +1 -2
- package/dist/taro-components/p-82661d45.system.entry.js +1 -0
- package/dist/taro-components/p-8475421b.system.entry.js +1 -0
- package/dist/taro-components/p-8788dc46.system.entry.js +1 -0
- package/dist/taro-components/p-886571e5.entry.js +1 -0
- package/dist/taro-components/p-888fac99.entry.js +1 -0
- package/dist/taro-components/p-8aea3de3.entry.js +1 -0
- package/dist/taro-components/p-8c8be53b.entry.js +1 -0
- package/dist/taro-components/p-8cf86f31.system.entry.js +1 -0
- package/dist/taro-components/{p-f0d0160d.system.entry.js → p-8e2b048e.system.entry.js} +1 -2
- package/dist/taro-components/p-9234cc1d.entry.js +1 -0
- package/dist/taro-components/p-92699438.entry.js +1 -0
- package/dist/taro-components/{p-59418be7.system.entry.js → p-93eed5d7.system.entry.js} +1 -2
- package/dist/taro-components/p-99d17a1a.entry.js +365 -0
- package/dist/taro-components/p-9a0e70b1.entry.js +1 -0
- package/dist/taro-components/p-9afbb423.system.entry.js +1 -0
- package/dist/taro-components/p-9b39a940.entry.js +1 -0
- package/dist/taro-components/{p-1cd1c507.system.entry.js → p-a5496bf5.system.entry.js} +1 -2
- package/dist/taro-components/{p-439a3349.system.entry.js → p-a63fbc50.system.entry.js} +1 -2
- package/dist/taro-components/p-ab1256fe.entry.js +1 -0
- package/dist/taro-components/p-ad6ad7e3.system.entry.js +1 -0
- package/dist/taro-components/p-afbcd093.entry.js +1 -0
- package/dist/taro-components/{p-c5c331bf.system.entry.js → p-b11aaf69.system.entry.js} +1 -2
- package/dist/taro-components/p-b1ae9401.entry.js +1 -0
- package/dist/taro-components/p-b2800ccd.entry.js +1 -0
- package/dist/taro-components/p-b3b677fc.entry.js +1 -0
- package/dist/taro-components/p-b3d961f9.system.entry.js +1 -0
- package/dist/taro-components/p-b60820b4.entry.js +1 -0
- package/dist/taro-components/p-b7639674.entry.js +1 -0
- package/dist/taro-components/{p-c0e3c822.system.entry.js → p-b7681c76.system.entry.js} +1 -2
- package/dist/taro-components/p-b7ac0b7f.system.entry.js +1 -0
- package/dist/taro-components/p-b9903f15.system.entry.js +1 -0
- package/dist/taro-components/p-bd706d39.entry.js +1 -0
- package/dist/taro-components/{p-21b77a13.system.entry.js → p-c5fd5c7f.system.entry.js} +1 -2
- package/dist/taro-components/p-c92bafb6.system.entry.js +1 -0
- package/dist/taro-components/{p-b04a56bd.system.entry.js → p-c93bb915.system.entry.js} +1 -2
- package/dist/taro-components/p-cf048af9.entry.js +1 -0
- package/dist/taro-components/{p-45b6ea0c.system.entry.js → p-d075934f.system.entry.js} +1 -2
- package/dist/taro-components/{p-a6f2dc54.system.entry.js → p-d4da725f.system.entry.js} +1 -2
- package/dist/taro-components/p-d5f3080c.entry.js +1 -0
- package/dist/taro-components/{p-b500c116.system.entry.js → p-d6662ab3.system.entry.js} +1 -2
- package/dist/taro-components/p-df3b544a.system.entry.js +1 -0
- package/dist/taro-components/p-dff55efd.entry.js +1 -0
- package/dist/taro-components/{p-8c8fe164.system.entry.js → p-e671c8c5.system.entry.js} +1 -2
- package/dist/taro-components/p-eec00033.entry.js +1 -0
- package/dist/taro-components/p-eeed74e3.system.entry.js +1 -0
- package/dist/taro-components/p-ef006b23.entry.js +1 -0
- package/dist/taro-components/{p-f2c75971.system.entry.js → p-f2803c2e.system.entry.js} +1 -2
- package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
- package/dist/taro-components/{p-701b0286.system.entry.js → p-f4ea8a56.system.entry.js} +1 -2
- package/dist/taro-components/p-f5f1c3b7.system.entry.js +1 -0
- package/dist/taro-components/{p-4fbb8b4c.system.entry.js → p-f7c80795.system.entry.js} +1 -2
- package/dist/taro-components/p-fa2a9bab.entry.js +1 -0
- package/dist/taro-components/{p-cbe2436d.system.entry.js → p-fc9f4fd7.system.entry.js} +1 -2
- package/dist/taro-components/p-fec6ac36.entry.js +1 -0
- package/dist/taro-components/p-ff84986d.entry.js +1 -0
- package/dist/taro-components/p-ffefd74f.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -2
- package/dist/taro-components/taro-components.js +1 -2
- package/dist/types/components/checkbox/checkbox.d.ts +2 -2
- package/dist/types/components/cover-image/cover-image.d.ts +1 -1
- package/dist/types/components/form/form.d.ts +7 -4
- package/dist/types/components/image/image.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +3 -4
- package/dist/types/components/movable-area/movable-view.d.ts +3 -3
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components/radio/radio.d.ts +2 -2
- package/dist/types/components/scroll-view/scroll-view.d.ts +1 -1
- package/dist/types/components/slider/slider.d.ts +4 -3
- package/dist/types/components/slot/slot.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components/textarea/textarea.d.ts +0 -1
- package/dist/types/components/video/utils.d.ts +1 -1
- package/dist/types/components.d.ts +78 -183
- package/dist/types/stencil-public-runtime.d.ts +4 -20
- package/{dist/react/component-lib → dist-h5/react/components}/index.js +1 -1
- package/{dist/react/component-lib → dist-h5/react/components}/input.js +5 -5
- package/{dist → dist-h5}/react/index.js +0 -0
- package/{dist/react/component-lib → dist-h5/react/utils}/reactify-wc.js +20 -10
- package/{dist/vue2/component-lib → dist-h5/vue/components}/icon.js +2 -2
- package/{dist/vue2/component-lib → dist-h5/vue/components}/image.js +2 -2
- package/{dist/vue2/component-lib/components.js → dist-h5/vue/components/index.js} +0 -0
- package/{dist/vue2/component-lib → dist-h5/vue/components}/picker.js +2 -2
- package/{dist/vue2/component-lib → dist-h5/vue/components}/scroll-view.js +2 -2
- package/{dist/vue2/component-lib → dist-h5/vue/components}/text.js +2 -2
- package/{dist/vue2/component-lib → dist-h5/vue}/createComponent.js +0 -0
- package/{dist/vue2/component-lib → dist-h5/vue}/createFormsComponent.js +0 -0
- package/{dist/vue2/component-lib → dist-h5/vue}/index.js +3 -4
- package/{dist/vue2/component-lib → dist-h5/vue}/mixins/listeners.js +0 -0
- package/{dist/vue2/component-lib → dist-h5/vue}/mixins/refs.js +0 -0
- package/{dist/vue3/component-lib → dist-h5/vue3/components}/icon.js +2 -2
- package/{dist/vue3/component-lib → dist-h5/vue3/components}/image.js +2 -2
- package/{dist/vue3/component-lib → dist-h5/vue3/components}/index.js +2 -2
- package/{dist/vue3/component-lib → dist-h5/vue3/components}/scroll-view.js +2 -2
- package/{dist/vue3/component-lib → dist-h5/vue3/components}/text.js +2 -2
- package/{dist/vue3/component-lib → dist-h5/vue3}/createComponent.js +1 -1
- package/{dist/vue3/component-lib → dist-h5/vue3}/createFormsComponent.js +0 -0
- package/{dist/vue3/component-lib → dist-h5/vue3}/forwardRef.js +0 -0
- package/{dist → dist-h5}/vue3/index.js +0 -0
- package/loader/package.json +0 -1
- package/package.json +28 -25
- package/types/AnimationVideo.d.ts +62 -0
- package/types/AnimationView.d.ts +45 -0
- package/types/ArCamera.d.ts +50 -0
- package/types/AwemeData.d.ts +43 -0
- package/types/CommentDetail.d.ts +72 -0
- package/types/CommentList.d.ts +128 -0
- package/types/ContactButton.d.ts +53 -0
- package/types/FollowSwan.d.ts +28 -0
- package/types/InlinePaymentPanel.d.ts +58 -0
- package/types/Input.d.ts +3 -3
- package/types/Lifestyle.d.ts +26 -0
- package/types/Like.d.ts +107 -0
- package/types/Login.d.ts +45 -0
- package/types/Lottie.d.ts +113 -0
- package/types/Map.d.ts +1 -1
- package/types/NativeSlot.d.ts +32 -0
- package/types/RtcRoom.d.ts +104 -0
- package/types/RtcRoomItem.d.ts +26 -0
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +12 -0
- package/types/TabItem.d.ts +35 -0
- package/types/Tabs.d.ts +58 -0
- package/types/Video.d.ts +1 -3
- package/types/View.d.ts +7 -6
- package/types/VoipRoom.d.ts +1 -1
- package/types/index.vue3.d.ts +267 -259
- package/dist/cjs/helper-db78e01a.js.map +0 -1
- package/dist/cjs/hls-67cbc62d.js +0 -27624
- package/dist/cjs/hls-67cbc62d.js.map +0 -1
- package/dist/cjs/index-47a1959e.js.map +0 -1
- package/dist/cjs/index-9174e0b1.js.map +0 -1
- package/dist/cjs/index-f9d21cc5.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/intersection-observer-dc4cfcef.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-audio-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-block-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-button-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-camera-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-canvas-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-components.cjs.js.map +0 -1
- package/dist/cjs/taro-cover-image-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-custom-wrapper-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-form-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-image-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-input-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-label-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-map-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-match-media-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-movable-area-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-navigator-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-official-account-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-progress-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-radio-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-root-portal-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-share-element-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-slider-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-switch-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-text-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-textarea-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-video-control_3.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-view-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-voip-room-core.cjs.entry.js.map +0 -1
- package/dist/cjs/taro-web-view-core.cjs.entry.js.map +0 -1
- package/dist/collection/components/ad/ad.js.map +0 -1
- package/dist/collection/components/ad-custom/ad-custom.js.map +0 -1
- package/dist/collection/components/audio/audio.js.map +0 -1
- package/dist/collection/components/block/block.js.map +0 -1
- package/dist/collection/components/button/button.js.map +0 -1
- package/dist/collection/components/camera/camera.js.map +0 -1
- package/dist/collection/components/canvas/canvas.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox-group.js.map +0 -1
- package/dist/collection/components/checkbox/checkbox.js.map +0 -1
- package/dist/collection/components/cover-image/cover-image.js.map +0 -1
- package/dist/collection/components/cover-view/cover-view.js.map +0 -1
- package/dist/collection/components/custom-wrapper/custom-wrapper.js.map +0 -1
- package/dist/collection/components/editor/editor.js.map +0 -1
- package/dist/collection/components/form/form.js.map +0 -1
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js.map +0 -1
- package/dist/collection/components/icon/icon.js.map +0 -1
- package/dist/collection/components/image/image.js.map +0 -1
- package/dist/collection/components/input/input.js.map +0 -1
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js.map +0 -1
- package/dist/collection/components/label/label.js.map +0 -1
- package/dist/collection/components/live-player/live-player.js.map +0 -1
- package/dist/collection/components/live-pusher/live-pusher.js.map +0 -1
- package/dist/collection/components/map/map.js.map +0 -1
- package/dist/collection/components/match-media/match-media.js.map +0 -1
- package/dist/collection/components/movable-area/movable-area.js.map +0 -1
- package/dist/collection/components/movable-area/movable-view.js.map +0 -1
- package/dist/collection/components/navigation-bar/navigation-bar.js.map +0 -1
- package/dist/collection/components/navigator/navigator.js.map +0 -1
- package/dist/collection/components/official-account/official-account.js.map +0 -1
- package/dist/collection/components/open-data/open-data.js.map +0 -1
- package/dist/collection/components/page-container/page-container.js.map +0 -1
- package/dist/collection/components/page-meta/page-meta.js.map +0 -1
- package/dist/collection/components/picker/constant.js.map +0 -1
- package/dist/collection/components/picker/picker-group.js.map +0 -1
- package/dist/collection/components/picker/picker.js.map +0 -1
- package/dist/collection/components/picker/utils.js.map +0 -1
- package/dist/collection/components/picker-view/picker-view-column.js.map +0 -1
- package/dist/collection/components/picker-view/picker-view.js.map +0 -1
- package/dist/collection/components/progress/progress.js.map +0 -1
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js.map +0 -1
- package/dist/collection/components/radio/radio-group.js.map +0 -1
- package/dist/collection/components/radio/radio.js.map +0 -1
- package/dist/collection/components/rich-text/rich-text.js.map +0 -1
- package/dist/collection/components/root-portal/root-portal.js.map +0 -1
- package/dist/collection/components/scroll-view/scroll-view.js.map +0 -1
- package/dist/collection/components/share-element/share-element.js.map +0 -1
- package/dist/collection/components/slider/slider.js.map +0 -1
- package/dist/collection/components/slot/slot.js.map +0 -1
- package/dist/collection/components/swiper/swiper-item.js.map +0 -1
- package/dist/collection/components/swiper/swiper.js.map +0 -1
- package/dist/collection/components/switch/switch.js.map +0 -1
- package/dist/collection/components/tabbar/tabbar-item.js.map +0 -1
- package/dist/collection/components/tabbar/tabbar.js.map +0 -1
- package/dist/collection/components/text/text.js.map +0 -1
- package/dist/collection/components/textarea/textarea.js.map +0 -1
- package/dist/collection/components/video/utils.js.map +0 -1
- package/dist/collection/components/video/video-control.js.map +0 -1
- package/dist/collection/components/video/video-danmu.js.map +0 -1
- package/dist/collection/components/video/video.js.map +0 -1
- package/dist/collection/components/view/view.js.map +0 -1
- package/dist/collection/components/voip-room/voip-room.js.map +0 -1
- package/dist/collection/components/web-view/web-view.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/utils/helper.js.map +0 -1
- package/dist/collection/utils/index.js.map +0 -1
- package/dist/collection/utils/style.js.map +0 -1
- package/dist/collection/utils/url.js.map +0 -1
- package/dist/esm/helper-3d0ecf0f.js.map +0 -1
- package/dist/esm/hls-221423a1.js +0 -27622
- package/dist/esm/hls-221423a1.js.map +0 -1
- package/dist/esm/index-1d8e8acd.js.map +0 -1
- package/dist/esm/index-5d881caf.js.map +0 -1
- package/dist/esm/index-cad8203e.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/intersection-observer-8e4c7135.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/taro-ad-core.entry.js.map +0 -1
- package/dist/esm/taro-ad-custom-core.entry.js.map +0 -1
- package/dist/esm/taro-audio-core.entry.js.map +0 -1
- package/dist/esm/taro-block-core.entry.js.map +0 -1
- package/dist/esm/taro-button-core.entry.js.map +0 -1
- package/dist/esm/taro-camera-core.entry.js.map +0 -1
- package/dist/esm/taro-canvas-core.entry.js.map +0 -1
- package/dist/esm/taro-checkbox-core_2.entry.js.map +0 -1
- package/dist/esm/taro-components.js.map +0 -1
- package/dist/esm/taro-cover-image-core.entry.js.map +0 -1
- package/dist/esm/taro-cover-view-core.entry.js.map +0 -1
- package/dist/esm/taro-custom-wrapper-core.entry.js.map +0 -1
- package/dist/esm/taro-editor-core.entry.js.map +0 -1
- package/dist/esm/taro-form-core.entry.js.map +0 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js.map +0 -1
- package/dist/esm/taro-icon-core.entry.js.map +0 -1
- package/dist/esm/taro-image-core.entry.js.map +0 -1
- package/dist/esm/taro-input-core.entry.js.map +0 -1
- package/dist/esm/taro-keyboard-accessory-core.entry.js.map +0 -1
- package/dist/esm/taro-label-core.entry.js.map +0 -1
- package/dist/esm/taro-live-player-core.entry.js.map +0 -1
- package/dist/esm/taro-live-pusher-core.entry.js.map +0 -1
- package/dist/esm/taro-map-core.entry.js.map +0 -1
- package/dist/esm/taro-match-media-core.entry.js.map +0 -1
- package/dist/esm/taro-movable-area-core_2.entry.js.map +0 -1
- package/dist/esm/taro-navigation-bar-core.entry.js.map +0 -1
- package/dist/esm/taro-navigator-core.entry.js.map +0 -1
- package/dist/esm/taro-official-account-core.entry.js.map +0 -1
- package/dist/esm/taro-open-data-core.entry.js.map +0 -1
- package/dist/esm/taro-page-container-core.entry.js.map +0 -1
- package/dist/esm/taro-page-meta-core.entry.js.map +0 -1
- package/dist/esm/taro-picker-core_2.entry.js.map +0 -1
- package/dist/esm/taro-picker-view-column-core_2.entry.js.map +0 -1
- package/dist/esm/taro-progress-core.entry.js.map +0 -1
- package/dist/esm/taro-pull-to-refresh.entry.js.map +0 -1
- package/dist/esm/taro-radio-core_2.entry.js.map +0 -1
- package/dist/esm/taro-rich-text-core.entry.js.map +0 -1
- package/dist/esm/taro-root-portal-core.entry.js.map +0 -1
- package/dist/esm/taro-scroll-view-core.entry.js.map +0 -1
- package/dist/esm/taro-share-element-core.entry.js.map +0 -1
- package/dist/esm/taro-slider-core.entry.js.map +0 -1
- package/dist/esm/taro-slot-core.entry.js.map +0 -1
- package/dist/esm/taro-swiper-core_2.entry.js.map +0 -1
- package/dist/esm/taro-switch-core.entry.js.map +0 -1
- package/dist/esm/taro-tabbar.entry.js.map +0 -1
- package/dist/esm/taro-text-core.entry.js.map +0 -1
- package/dist/esm/taro-textarea-core.entry.js.map +0 -1
- package/dist/esm/taro-video-control_3.entry.js.map +0 -1
- package/dist/esm/taro-view-core.entry.js.map +0 -1
- package/dist/esm/taro-voip-room-core.entry.js.map +0 -1
- package/dist/esm/taro-web-view-core.entry.js.map +0 -1
- package/dist/esm-es5/helper-3d0ecf0f.js.map +0 -1
- package/dist/esm-es5/hls-221423a1.js +0 -366
- package/dist/esm-es5/hls-221423a1.js.map +0 -1
- package/dist/esm-es5/index-1d8e8acd.js.map +0 -1
- package/dist/esm-es5/index-5d881caf.js +0 -3
- package/dist/esm-es5/index-5d881caf.js.map +0 -1
- package/dist/esm-es5/index-cad8203e.js.map +0 -1
- package/dist/esm-es5/index.js.map +0 -1
- package/dist/esm-es5/intersection-observer-8e4c7135.js.map +0 -1
- package/dist/esm-es5/loader.js.map +0 -1
- package/dist/esm-es5/taro-ad-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-audio-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-block-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-button-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-camera-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-canvas-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-components.js.map +0 -1
- package/dist/esm-es5/taro-cover-image-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-custom-wrapper-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-editor-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-form-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-icon-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-image-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-input-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-label-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-live-player-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-map-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-match-media-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-movable-area-core_2.entry.js +0 -2
- package/dist/esm-es5/taro-movable-area-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-navigator-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-official-account-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-open-data-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-page-container-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +0 -2
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-progress-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js.map +0 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-share-element-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-slider-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-slot-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +0 -1
- package/dist/esm-es5/taro-switch-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-tabbar.entry.js.map +0 -1
- package/dist/esm-es5/taro-text-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-textarea-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-video-control_3.entry.js.map +0 -1
- package/dist/esm-es5/taro-view-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js.map +0 -1
- package/dist/esm-es5/taro-web-view-core.entry.js.map +0 -1
- package/dist/react/components.js +0 -65
- package/dist/react/helper.js +0 -13
- package/dist/react/react-component-lib/createComponent.js +0 -126
- package/dist/react/react-component-lib/createOverlayComponent.js +0 -208
- package/dist/react/react-component-lib/index.js +0 -2
- package/dist/react/react-component-lib/interfaces.js +0 -1
- package/dist/react/react-component-lib/utils/attachProps.js +0 -107
- package/dist/react/react-component-lib/utils/case.js +0 -10
- package/dist/react/react-component-lib/utils/dev.js +0 -12
- package/dist/react/react-component-lib/utils/index.js +0 -35
- package/dist/taro-components/index.esm.js.map +0 -1
- package/dist/taro-components/p-001ef419.system.entry.js +0 -2
- package/dist/taro-components/p-001ef419.system.entry.js.map +0 -1
- package/dist/taro-components/p-01dc54a5.entry.js +0 -2
- package/dist/taro-components/p-01dc54a5.entry.js.map +0 -1
- package/dist/taro-components/p-0382d7d0.system.entry.js +0 -2
- package/dist/taro-components/p-0382d7d0.system.entry.js.map +0 -1
- package/dist/taro-components/p-0a896bc7.entry.js +0 -2
- package/dist/taro-components/p-0a896bc7.entry.js.map +0 -1
- package/dist/taro-components/p-0b38e6c7.system.entry.js +0 -2
- package/dist/taro-components/p-0b38e6c7.system.entry.js.map +0 -1
- package/dist/taro-components/p-0d36ef6b.entry.js +0 -2
- package/dist/taro-components/p-0d36ef6b.entry.js.map +0 -1
- package/dist/taro-components/p-0ee6a068.entry.js +0 -2
- package/dist/taro-components/p-0ee6a068.entry.js.map +0 -1
- package/dist/taro-components/p-12e4b019.entry.js +0 -2
- package/dist/taro-components/p-12e4b019.entry.js.map +0 -1
- package/dist/taro-components/p-15dced71.system.entry.js +0 -2
- package/dist/taro-components/p-15dced71.system.entry.js.map +0 -1
- package/dist/taro-components/p-15e45ed6.system.js.map +0 -1
- package/dist/taro-components/p-1743a04b.system.js.map +0 -1
- package/dist/taro-components/p-17657dca.entry.js +0 -2
- package/dist/taro-components/p-17657dca.entry.js.map +0 -1
- package/dist/taro-components/p-1b2556e2.system.entry.js +0 -2
- package/dist/taro-components/p-1b2556e2.system.entry.js.map +0 -1
- package/dist/taro-components/p-1b64d2a2.entry.js +0 -2
- package/dist/taro-components/p-1b64d2a2.entry.js.map +0 -1
- package/dist/taro-components/p-1bd3d09b.system.entry.js +0 -2
- package/dist/taro-components/p-1bd3d09b.system.entry.js.map +0 -1
- package/dist/taro-components/p-1cb76199.entry.js +0 -2
- package/dist/taro-components/p-1cb76199.entry.js.map +0 -1
- package/dist/taro-components/p-1cd1c507.system.entry.js.map +0 -1
- package/dist/taro-components/p-1e436d5b.entry.js +0 -2
- package/dist/taro-components/p-1e436d5b.entry.js.map +0 -1
- package/dist/taro-components/p-2096bc5f.entry.js +0 -2
- package/dist/taro-components/p-2096bc5f.entry.js.map +0 -1
- package/dist/taro-components/p-20ec6387.entry.js +0 -2
- package/dist/taro-components/p-20ec6387.entry.js.map +0 -1
- package/dist/taro-components/p-21b77a13.system.entry.js.map +0 -1
- package/dist/taro-components/p-2243a376.entry.js +0 -2
- package/dist/taro-components/p-2243a376.entry.js.map +0 -1
- package/dist/taro-components/p-29f04296.entry.js +0 -2
- package/dist/taro-components/p-29f04296.entry.js.map +0 -1
- package/dist/taro-components/p-301a8b85.system.entry.js.map +0 -1
- package/dist/taro-components/p-3b1d2d37.system.js.map +0 -1
- package/dist/taro-components/p-3b9a1125.entry.js +0 -2
- package/dist/taro-components/p-3b9a1125.entry.js.map +0 -1
- package/dist/taro-components/p-3c256e0e.entry.js +0 -2
- package/dist/taro-components/p-3c256e0e.entry.js.map +0 -1
- package/dist/taro-components/p-3e6b29c6.entry.js +0 -2
- package/dist/taro-components/p-3e6b29c6.entry.js.map +0 -1
- package/dist/taro-components/p-427a2872.entry.js +0 -2
- package/dist/taro-components/p-427a2872.entry.js.map +0 -1
- package/dist/taro-components/p-439a3349.system.entry.js.map +0 -1
- package/dist/taro-components/p-447386b2.system.entry.js +0 -2
- package/dist/taro-components/p-447386b2.system.entry.js.map +0 -1
- package/dist/taro-components/p-45b6ea0c.system.entry.js.map +0 -1
- package/dist/taro-components/p-49a6cae4.system.entry.js +0 -2
- package/dist/taro-components/p-49a6cae4.system.entry.js.map +0 -1
- package/dist/taro-components/p-4b05e003.entry.js +0 -2
- package/dist/taro-components/p-4b05e003.entry.js.map +0 -1
- package/dist/taro-components/p-4b27df71.system.entry.js.map +0 -1
- package/dist/taro-components/p-4b71c926.entry.js +0 -2
- package/dist/taro-components/p-4b71c926.entry.js.map +0 -1
- package/dist/taro-components/p-4fbb8b4c.system.entry.js.map +0 -1
- package/dist/taro-components/p-50ea2036.system.js.map +0 -1
- package/dist/taro-components/p-55519002.entry.js +0 -2
- package/dist/taro-components/p-55519002.entry.js.map +0 -1
- package/dist/taro-components/p-570222e2.entry.js +0 -2
- package/dist/taro-components/p-570222e2.entry.js.map +0 -1
- package/dist/taro-components/p-5746d7ce.js.map +0 -1
- package/dist/taro-components/p-580a72d1.system.entry.js.map +0 -1
- package/dist/taro-components/p-59418be7.system.entry.js.map +0 -1
- package/dist/taro-components/p-59e02aca.system.entry.js +0 -2
- package/dist/taro-components/p-59e02aca.system.entry.js.map +0 -1
- package/dist/taro-components/p-5b552407.entry.js +0 -2
- package/dist/taro-components/p-5b552407.entry.js.map +0 -1
- package/dist/taro-components/p-5bfefd19.js +0 -3
- package/dist/taro-components/p-5bfefd19.js.map +0 -1
- package/dist/taro-components/p-61f225ef.system.js.map +0 -1
- package/dist/taro-components/p-663d1bb9.system.js.map +0 -1
- package/dist/taro-components/p-6a96da58.js.map +0 -1
- package/dist/taro-components/p-6af8be19.entry.js +0 -2
- package/dist/taro-components/p-6af8be19.entry.js.map +0 -1
- package/dist/taro-components/p-6ea2995b.entry.js +0 -2
- package/dist/taro-components/p-6ea2995b.entry.js.map +0 -1
- package/dist/taro-components/p-6f8af69f.entry.js +0 -2
- package/dist/taro-components/p-6f8af69f.entry.js.map +0 -1
- package/dist/taro-components/p-701b0286.system.entry.js.map +0 -1
- package/dist/taro-components/p-72f327e1.js.map +0 -1
- package/dist/taro-components/p-72f626ab.system.entry.js +0 -2
- package/dist/taro-components/p-72f626ab.system.entry.js.map +0 -1
- package/dist/taro-components/p-755be847.system.entry.js +0 -2
- package/dist/taro-components/p-755be847.system.entry.js.map +0 -1
- package/dist/taro-components/p-76724e58.js.map +0 -1
- package/dist/taro-components/p-8231e748.entry.js +0 -2
- package/dist/taro-components/p-8231e748.entry.js.map +0 -1
- package/dist/taro-components/p-8a3620a6.system.entry.js.map +0 -1
- package/dist/taro-components/p-8a8f286f.system.js +0 -3
- package/dist/taro-components/p-8a8f286f.system.js.map +0 -1
- package/dist/taro-components/p-8bec95d4.system.entry.js.map +0 -1
- package/dist/taro-components/p-8c8fe164.system.entry.js.map +0 -1
- package/dist/taro-components/p-93cc7adc.entry.js +0 -2
- package/dist/taro-components/p-93cc7adc.entry.js.map +0 -1
- package/dist/taro-components/p-96a784f1.entry.js +0 -2
- package/dist/taro-components/p-96a784f1.entry.js.map +0 -1
- package/dist/taro-components/p-99bbe34a.system.entry.js +0 -2
- package/dist/taro-components/p-99bbe34a.system.entry.js.map +0 -1
- package/dist/taro-components/p-9e20c25c.entry.js +0 -2
- package/dist/taro-components/p-9e20c25c.entry.js.map +0 -1
- package/dist/taro-components/p-9f1ca602.system.entry.js.map +0 -1
- package/dist/taro-components/p-a1ace8c7.system.entry.js +0 -2
- package/dist/taro-components/p-a1ace8c7.system.entry.js.map +0 -1
- package/dist/taro-components/p-a29509fa.system.entry.js +0 -2
- package/dist/taro-components/p-a29509fa.system.entry.js.map +0 -1
- package/dist/taro-components/p-a2aab820.entry.js +0 -2
- package/dist/taro-components/p-a2aab820.entry.js.map +0 -1
- package/dist/taro-components/p-a6f2dc54.system.entry.js.map +0 -1
- package/dist/taro-components/p-ab105c26.entry.js +0 -2
- package/dist/taro-components/p-ab105c26.entry.js.map +0 -1
- package/dist/taro-components/p-b04a56bd.system.entry.js.map +0 -1
- package/dist/taro-components/p-b10cb428.entry.js +0 -2
- package/dist/taro-components/p-b10cb428.entry.js.map +0 -1
- package/dist/taro-components/p-b4ec48c3.entry.js +0 -2
- package/dist/taro-components/p-b4ec48c3.entry.js.map +0 -1
- package/dist/taro-components/p-b500c116.system.entry.js.map +0 -1
- package/dist/taro-components/p-b832f4e8.entry.js +0 -2
- package/dist/taro-components/p-b832f4e8.entry.js.map +0 -1
- package/dist/taro-components/p-b88a55b4.system.entry.js +0 -2
- package/dist/taro-components/p-b88a55b4.system.entry.js.map +0 -1
- package/dist/taro-components/p-b90926cc.entry.js +0 -2
- package/dist/taro-components/p-b90926cc.entry.js.map +0 -1
- package/dist/taro-components/p-ba743573.entry.js +0 -2
- package/dist/taro-components/p-ba743573.entry.js.map +0 -1
- package/dist/taro-components/p-be3f5ac0.entry.js +0 -2
- package/dist/taro-components/p-be3f5ac0.entry.js.map +0 -1
- package/dist/taro-components/p-beea63a7.entry.js +0 -2
- package/dist/taro-components/p-beea63a7.entry.js.map +0 -1
- package/dist/taro-components/p-c0e3c822.system.entry.js.map +0 -1
- package/dist/taro-components/p-c3acf0ea.system.entry.js +0 -2
- package/dist/taro-components/p-c3acf0ea.system.entry.js.map +0 -1
- package/dist/taro-components/p-c3bb8fa6.entry.js +0 -2
- package/dist/taro-components/p-c3bb8fa6.entry.js.map +0 -1
- package/dist/taro-components/p-c4cf58af.system.entry.js.map +0 -1
- package/dist/taro-components/p-c5c331bf.system.entry.js.map +0 -1
- package/dist/taro-components/p-cb17d8bd.system.js +0 -2
- package/dist/taro-components/p-cb17d8bd.system.js.map +0 -1
- package/dist/taro-components/p-cbe2436d.system.entry.js.map +0 -1
- package/dist/taro-components/p-cd6a7eea.entry.js +0 -2
- package/dist/taro-components/p-cd6a7eea.entry.js.map +0 -1
- package/dist/taro-components/p-d4b6f19e.system.entry.js +0 -2
- package/dist/taro-components/p-d4b6f19e.system.entry.js.map +0 -1
- package/dist/taro-components/p-d5234e7e.js +0 -366
- package/dist/taro-components/p-d5234e7e.js.map +0 -1
- package/dist/taro-components/p-d5579efa.system.entry.js +0 -2
- package/dist/taro-components/p-d5579efa.system.entry.js.map +0 -1
- package/dist/taro-components/p-d619f198.system.entry.js +0 -2
- package/dist/taro-components/p-d619f198.system.entry.js.map +0 -1
- package/dist/taro-components/p-d7ab3e23.system.entry.js +0 -2
- package/dist/taro-components/p-d7ab3e23.system.entry.js.map +0 -1
- package/dist/taro-components/p-d7f4b10f.entry.js +0 -2
- package/dist/taro-components/p-d7f4b10f.entry.js.map +0 -1
- package/dist/taro-components/p-d85b216d.entry.js +0 -2
- package/dist/taro-components/p-d85b216d.entry.js.map +0 -1
- package/dist/taro-components/p-dcb48fd9.system.entry.js +0 -2
- package/dist/taro-components/p-dcb48fd9.system.entry.js.map +0 -1
- package/dist/taro-components/p-dcfb7d97.system.entry.js.map +0 -1
- package/dist/taro-components/p-de762042.entry.js +0 -2
- package/dist/taro-components/p-de762042.entry.js.map +0 -1
- package/dist/taro-components/p-df862d0c.entry.js +0 -2
- package/dist/taro-components/p-df862d0c.entry.js.map +0 -1
- package/dist/taro-components/p-e0d6b00b.entry.js +0 -2
- package/dist/taro-components/p-e0d6b00b.entry.js.map +0 -1
- package/dist/taro-components/p-e4f1cc50.entry.js +0 -2
- package/dist/taro-components/p-e4f1cc50.entry.js.map +0 -1
- package/dist/taro-components/p-e59f999e.entry.js +0 -2
- package/dist/taro-components/p-e59f999e.entry.js.map +0 -1
- package/dist/taro-components/p-e7239faa.system.entry.js +0 -2
- package/dist/taro-components/p-e7239faa.system.entry.js.map +0 -1
- package/dist/taro-components/p-e7965c55.system.entry.js +0 -2
- package/dist/taro-components/p-e7965c55.system.entry.js.map +0 -1
- package/dist/taro-components/p-e98c07c3.system.entry.js +0 -2
- package/dist/taro-components/p-e98c07c3.system.entry.js.map +0 -1
- package/dist/taro-components/p-e9abe3e2.entry.js +0 -2
- package/dist/taro-components/p-e9abe3e2.entry.js.map +0 -1
- package/dist/taro-components/p-eddd00e9.system.entry.js +0 -2
- package/dist/taro-components/p-eddd00e9.system.entry.js.map +0 -1
- package/dist/taro-components/p-ef029c30.system.entry.js +0 -2
- package/dist/taro-components/p-ef029c30.system.entry.js.map +0 -1
- package/dist/taro-components/p-f0d0160d.system.entry.js.map +0 -1
- package/dist/taro-components/p-f120c272.entry.js +0 -2
- package/dist/taro-components/p-f120c272.entry.js.map +0 -1
- package/dist/taro-components/p-f2c75971.system.entry.js.map +0 -1
- package/dist/taro-components/p-ffc44634.entry.js +0 -2
- package/dist/taro-components/p-ffc44634.entry.js.map +0 -1
- package/dist/taro-components/taro-components.esm.js.map +0 -1
- package/dist/vue2/components.js +0 -490
- package/dist/vue2/index.js +0 -26
- package/dist/vue2/vue-component-lib/utils.js +0 -45
- package/dist/vue3/components.js +0 -64
- package/dist/vue3/vue-component-lib/utils.js +0 -201
|
@@ -22,14 +22,6 @@ function _interopNamespace(e) {
|
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'taro-components';
|
|
24
24
|
|
|
25
|
-
/**
|
|
26
|
-
* Virtual DOM patching algorithm based on Snabbdom by
|
|
27
|
-
* Simon Friis Vindum (@paldepind)
|
|
28
|
-
* Licensed under the MIT License
|
|
29
|
-
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
30
|
-
*
|
|
31
|
-
* Modified for Stencil's renderer and slot projection
|
|
32
|
-
*/
|
|
33
25
|
let contentRef;
|
|
34
26
|
let hostTagName;
|
|
35
27
|
let useNativeShadowDom = false;
|
|
@@ -37,6 +29,63 @@ let checkSlotFallbackVisibility = false;
|
|
|
37
29
|
let checkSlotRelocate = false;
|
|
38
30
|
let isSvgMode = false;
|
|
39
31
|
let queuePending = false;
|
|
32
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
33
|
+
const doc = win.document || { head: {} };
|
|
34
|
+
const plt = {
|
|
35
|
+
$flags$: 0,
|
|
36
|
+
$resourcesUrl$: '',
|
|
37
|
+
jmp: (h) => h(),
|
|
38
|
+
raf: (h) => requestAnimationFrame(h),
|
|
39
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
40
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
41
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
42
|
+
};
|
|
43
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
44
|
+
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
45
|
+
try {
|
|
46
|
+
new CSSStyleSheet();
|
|
47
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
48
|
+
}
|
|
49
|
+
catch (e) { }
|
|
50
|
+
return false;
|
|
51
|
+
})()
|
|
52
|
+
;
|
|
53
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
54
|
+
if (listeners) {
|
|
55
|
+
listeners.map(([flags, name, method]) => {
|
|
56
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
57
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
58
|
+
const opts = hostListenerOpts(flags);
|
|
59
|
+
plt.ael(target, name, handler, opts);
|
|
60
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
65
|
+
try {
|
|
66
|
+
{
|
|
67
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
68
|
+
// instance is ready, let's call it's member method for this event
|
|
69
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (e) {
|
|
77
|
+
consoleError(e);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
81
|
+
if (flags & 4 /* TargetDocument */)
|
|
82
|
+
return doc;
|
|
83
|
+
return elm;
|
|
84
|
+
};
|
|
85
|
+
// prettier-ignore
|
|
86
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
87
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
88
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
40
89
|
const createTime = (fnName, tagName = '') => {
|
|
41
90
|
{
|
|
42
91
|
return () => {
|
|
@@ -51,8 +100,59 @@ const uniqueTime = (key, measureText) => {
|
|
|
51
100
|
};
|
|
52
101
|
}
|
|
53
102
|
};
|
|
54
|
-
const
|
|
55
|
-
const
|
|
103
|
+
const rootAppliedStyles = new WeakMap();
|
|
104
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
105
|
+
let style = styles.get(scopeId);
|
|
106
|
+
if (supportsConstructibleStylesheets && allowCS) {
|
|
107
|
+
style = (style || new CSSStyleSheet());
|
|
108
|
+
style.replace(cssText);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
style = cssText;
|
|
112
|
+
}
|
|
113
|
+
styles.set(scopeId, style);
|
|
114
|
+
};
|
|
115
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
116
|
+
let scopeId = getScopeId(cmpMeta);
|
|
117
|
+
let style = styles.get(scopeId);
|
|
118
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
119
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
120
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
121
|
+
if (style) {
|
|
122
|
+
if (typeof style === 'string') {
|
|
123
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
124
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
125
|
+
let styleElm;
|
|
126
|
+
if (!appliedStyles) {
|
|
127
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
128
|
+
}
|
|
129
|
+
if (!appliedStyles.has(scopeId)) {
|
|
130
|
+
{
|
|
131
|
+
{
|
|
132
|
+
styleElm = doc.createElement('style');
|
|
133
|
+
styleElm.innerHTML = style;
|
|
134
|
+
}
|
|
135
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
136
|
+
}
|
|
137
|
+
if (appliedStyles) {
|
|
138
|
+
appliedStyles.add(scopeId);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
143
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return scopeId;
|
|
147
|
+
};
|
|
148
|
+
const attachStyles = (hostRef) => {
|
|
149
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
150
|
+
const elm = hostRef.$hostElement$;
|
|
151
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
152
|
+
addStyle(elm.getRootNode(), cmpMeta);
|
|
153
|
+
endAttachStyles();
|
|
154
|
+
};
|
|
155
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
56
156
|
/**
|
|
57
157
|
* Default style mode id
|
|
58
158
|
*/
|
|
@@ -83,7 +183,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
83
183
|
let slotName = null;
|
|
84
184
|
let simple = false;
|
|
85
185
|
let lastSimple = false;
|
|
86
|
-
|
|
186
|
+
let vNodeChildren = [];
|
|
87
187
|
const walk = (c) => {
|
|
88
188
|
for (let i = 0; i < c.length; i++) {
|
|
89
189
|
child = c[i];
|
|
@@ -195,137 +295,6 @@ const convertToPrivate = (node) => {
|
|
|
195
295
|
vnode.$name$ = node.vname;
|
|
196
296
|
return vnode;
|
|
197
297
|
};
|
|
198
|
-
/**
|
|
199
|
-
* Parse a new property value for a given property type.
|
|
200
|
-
*
|
|
201
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
202
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
203
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
204
|
-
* 2. the type stored from `propType`.
|
|
205
|
-
*
|
|
206
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
207
|
-
*
|
|
208
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
209
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
210
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
211
|
-
* ```tsx
|
|
212
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
213
|
-
* ```
|
|
214
|
-
*
|
|
215
|
-
* HTML prop values on the other hand, will always a string
|
|
216
|
-
*
|
|
217
|
-
* @param propValue the new value to coerce to some type
|
|
218
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
219
|
-
* @returns the parsed/coerced value
|
|
220
|
-
*/
|
|
221
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
222
|
-
// ensure this value is of the correct prop type
|
|
223
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
224
|
-
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
225
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
226
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
227
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
228
|
-
}
|
|
229
|
-
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
230
|
-
// force it to be a number
|
|
231
|
-
return parseFloat(propValue);
|
|
232
|
-
}
|
|
233
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
234
|
-
// could have been passed as a number or boolean
|
|
235
|
-
// but we still want it as a string
|
|
236
|
-
return String(propValue);
|
|
237
|
-
}
|
|
238
|
-
// redundant return here for better minification
|
|
239
|
-
return propValue;
|
|
240
|
-
}
|
|
241
|
-
// not sure exactly what type we want
|
|
242
|
-
// so no need to change to a different type
|
|
243
|
-
return propValue;
|
|
244
|
-
};
|
|
245
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
246
|
-
const createEvent = (ref, name, flags) => {
|
|
247
|
-
const elm = getElement(ref);
|
|
248
|
-
return {
|
|
249
|
-
emit: (detail) => {
|
|
250
|
-
return emitEvent(elm, name, {
|
|
251
|
-
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
252
|
-
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
253
|
-
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
254
|
-
detail,
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
261
|
-
* @param elm the target of the Event
|
|
262
|
-
* @param name the name to give the custom Event
|
|
263
|
-
* @param opts options for configuring a custom Event
|
|
264
|
-
* @returns the custom Event
|
|
265
|
-
*/
|
|
266
|
-
const emitEvent = (elm, name, opts) => {
|
|
267
|
-
const ev = plt.ce(name, opts);
|
|
268
|
-
elm.dispatchEvent(ev);
|
|
269
|
-
return ev;
|
|
270
|
-
};
|
|
271
|
-
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
272
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
273
|
-
let style = styles.get(scopeId);
|
|
274
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
275
|
-
style = (style || new CSSStyleSheet());
|
|
276
|
-
if (typeof style === 'string') {
|
|
277
|
-
style = cssText;
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
style.replaceSync(cssText);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
style = cssText;
|
|
285
|
-
}
|
|
286
|
-
styles.set(scopeId, style);
|
|
287
|
-
};
|
|
288
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
289
|
-
let scopeId = getScopeId(cmpMeta);
|
|
290
|
-
const style = styles.get(scopeId);
|
|
291
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
292
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
293
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
294
|
-
if (style) {
|
|
295
|
-
if (typeof style === 'string') {
|
|
296
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
297
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
298
|
-
let styleElm;
|
|
299
|
-
if (!appliedStyles) {
|
|
300
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
301
|
-
}
|
|
302
|
-
if (!appliedStyles.has(scopeId)) {
|
|
303
|
-
{
|
|
304
|
-
{
|
|
305
|
-
styleElm = doc.createElement('style');
|
|
306
|
-
styleElm.innerHTML = style;
|
|
307
|
-
}
|
|
308
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
309
|
-
}
|
|
310
|
-
if (appliedStyles) {
|
|
311
|
-
appliedStyles.add(scopeId);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
316
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return scopeId;
|
|
320
|
-
};
|
|
321
|
-
const attachStyles = (hostRef) => {
|
|
322
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
323
|
-
const elm = hostRef.$hostElement$;
|
|
324
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
325
|
-
addStyle(elm.getRootNode(), cmpMeta);
|
|
326
|
-
endAttachStyles();
|
|
327
|
-
};
|
|
328
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
329
298
|
/**
|
|
330
299
|
* Production setAccessor() function based on Preact by
|
|
331
300
|
* Jason Miller (@developit)
|
|
@@ -423,7 +392,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
423
392
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
424
393
|
try {
|
|
425
394
|
if (!elm.tagName.includes('-')) {
|
|
426
|
-
|
|
395
|
+
let n = newValue == null ? '' : newValue;
|
|
427
396
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
428
397
|
if (memberName === 'list') {
|
|
429
398
|
isProp = false;
|
|
@@ -462,7 +431,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
462
431
|
}
|
|
463
432
|
}
|
|
464
433
|
}
|
|
465
|
-
else if ((!isProp || flags & 4 /*
|
|
434
|
+
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
466
435
|
newValue = newValue === true ? '' : newValue;
|
|
467
436
|
if (xlink) {
|
|
468
437
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -480,7 +449,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
480
449
|
// if the element passed in is a shadow root, which is a document fragment
|
|
481
450
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
482
451
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
483
|
-
const elm = newVnode.$elm$.nodeType === 11 /*
|
|
452
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
484
453
|
? newVnode.$elm$.host
|
|
485
454
|
: newVnode.$elm$;
|
|
486
455
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -498,19 +467,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
498
467
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
499
468
|
}
|
|
500
469
|
};
|
|
501
|
-
/**
|
|
502
|
-
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
503
|
-
*
|
|
504
|
-
* @param oldParentVNode the parent VNode from the previous render
|
|
505
|
-
* @param newParentVNode the parent VNode from the current render
|
|
506
|
-
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
507
|
-
* children, for which we will create a new DOM node
|
|
508
|
-
* @param parentElm the parent DOM node which our new node will be a child of
|
|
509
|
-
* @returns the newly created node
|
|
510
|
-
*/
|
|
511
470
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
512
471
|
// tslint:disable-next-line: prefer-const
|
|
513
|
-
|
|
472
|
+
let newVNode = newParentVNode.$children$[childIndex];
|
|
514
473
|
let i = 0;
|
|
515
474
|
let elm;
|
|
516
475
|
let childNode;
|
|
@@ -521,23 +480,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
521
480
|
if (newVNode.$tag$ === 'slot') {
|
|
522
481
|
newVNode.$flags$ |= newVNode.$children$
|
|
523
482
|
? // slot element has fallback content
|
|
524
|
-
2 /*
|
|
483
|
+
2 /* isSlotFallback */
|
|
525
484
|
: // slot element does not have fallback content
|
|
526
|
-
1 /*
|
|
485
|
+
1 /* isSlotReference */;
|
|
527
486
|
}
|
|
528
487
|
}
|
|
529
488
|
if (newVNode.$text$ !== null) {
|
|
530
489
|
// create text node
|
|
531
490
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
532
491
|
}
|
|
533
|
-
else if (newVNode.$flags$ & 1 /*
|
|
492
|
+
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
534
493
|
// create a slot reference node
|
|
535
494
|
elm = newVNode.$elm$ =
|
|
536
495
|
doc.createTextNode('');
|
|
537
496
|
}
|
|
538
497
|
else {
|
|
539
498
|
// create element
|
|
540
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /*
|
|
499
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
541
500
|
? 'slot-fb'
|
|
542
501
|
: newVNode.$tag$));
|
|
543
502
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -558,7 +517,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
558
517
|
}
|
|
559
518
|
{
|
|
560
519
|
elm['s-hn'] = hostTagName;
|
|
561
|
-
if (newVNode.$flags$ & (2 /*
|
|
520
|
+
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
562
521
|
// remember the content reference comment
|
|
563
522
|
elm['s-sr'] = true;
|
|
564
523
|
// remember the content reference comment
|
|
@@ -577,7 +536,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
577
536
|
return elm;
|
|
578
537
|
};
|
|
579
538
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
580
|
-
plt.$flags$ |= 1 /*
|
|
539
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
581
540
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
582
541
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
583
542
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -598,7 +557,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
598
557
|
putBackInOriginalLocation(childNode, recursive);
|
|
599
558
|
}
|
|
600
559
|
}
|
|
601
|
-
plt.$flags$ &= ~1 /*
|
|
560
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
602
561
|
};
|
|
603
562
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
604
563
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -637,74 +596,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
637
596
|
}
|
|
638
597
|
}
|
|
639
598
|
};
|
|
640
|
-
/**
|
|
641
|
-
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
642
|
-
* traversing the two collections of children, identifying nodes that are
|
|
643
|
-
* conserved or changed, calling out to `patch` to make any necessary
|
|
644
|
-
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
645
|
-
*
|
|
646
|
-
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
647
|
-
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
648
|
-
* 'windows' by storing start and end indices and references to the
|
|
649
|
-
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
650
|
-
* to the entire array, but we progressively narrow the windows until there are
|
|
651
|
-
* no children left to update by doing the following:
|
|
652
|
-
*
|
|
653
|
-
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
654
|
-
* that if we have an initial array like the following we'll end up dealing
|
|
655
|
-
* only with a window bounded by the highlighted elements:
|
|
656
|
-
*
|
|
657
|
-
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
658
|
-
* ^^^^^^ ^^^^^^
|
|
659
|
-
*
|
|
660
|
-
* 2. Check to see if the elements at the head and tail positions are equal
|
|
661
|
-
* across the windows. This will basically detect elements which haven't
|
|
662
|
-
* been added, removed, or changed position, i.e. if you had the following
|
|
663
|
-
* VNode elements (represented as HTML):
|
|
664
|
-
*
|
|
665
|
-
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
666
|
-
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
667
|
-
*
|
|
668
|
-
* Then when comparing the children of the `<div>` tag we check the equality
|
|
669
|
-
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
670
|
-
* same tag in the same position, we'd be able to avoid completely
|
|
671
|
-
* re-rendering the subtree under them with a new DOM element and would just
|
|
672
|
-
* call out to `patch` to handle reconciling their children and so on.
|
|
673
|
-
*
|
|
674
|
-
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
675
|
-
* window corresponds to the element at the end of the other window. This is
|
|
676
|
-
* a heuristic which will let us identify _some_ situations in which
|
|
677
|
-
* elements have changed position, for instance it _should_ detect that the
|
|
678
|
-
* children nodes themselves have not changed but merely moved in the
|
|
679
|
-
* following example:
|
|
680
|
-
*
|
|
681
|
-
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
682
|
-
* newVNode: `<div><element-two /><element-one /></div>`
|
|
683
|
-
*
|
|
684
|
-
* If we find cases like this then we also need to move the concrete DOM
|
|
685
|
-
* elements corresponding to the moved children to write the re-order to the
|
|
686
|
-
* DOM.
|
|
687
|
-
*
|
|
688
|
-
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
689
|
-
* nodes in the old children which have the same key as the first element in
|
|
690
|
-
* our window on the new children. If we find such a node we handle calling
|
|
691
|
-
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
692
|
-
* what we find.
|
|
693
|
-
*
|
|
694
|
-
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
695
|
-
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
696
|
-
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
697
|
-
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
698
|
-
* children has collapsed we still have more nodes on the new children that
|
|
699
|
-
* we haven't dealt with yet then we need to add them, or if the new children
|
|
700
|
-
* collapse but we still have unhandled _old_ children then we need to make
|
|
701
|
-
* sure the corresponding DOM nodes are removed.
|
|
702
|
-
*
|
|
703
|
-
* @param parentElm the node into which the parent VNode is rendered
|
|
704
|
-
* @param oldCh the old children of the parent node
|
|
705
|
-
* @param newVNode the new VNode which will replace the parent
|
|
706
|
-
* @param newCh the new children of the parent node
|
|
707
|
-
*/
|
|
708
599
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
709
600
|
let oldStartIdx = 0;
|
|
710
601
|
let newStartIdx = 0;
|
|
@@ -720,7 +611,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
720
611
|
let elmToMove;
|
|
721
612
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
722
613
|
if (oldStartVnode == null) {
|
|
723
|
-
//
|
|
614
|
+
// Vnode might have been moved left
|
|
724
615
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
725
616
|
}
|
|
726
617
|
else if (oldEndVnode == null) {
|
|
@@ -733,100 +624,37 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
733
624
|
newEndVnode = newCh[--newEndIdx];
|
|
734
625
|
}
|
|
735
626
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
736
|
-
// if the start nodes are the same then we should patch the new VNode
|
|
737
|
-
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
738
|
-
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
739
|
-
// since things are matched up in order.
|
|
740
627
|
patch(oldStartVnode, newStartVnode);
|
|
741
628
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
742
629
|
newStartVnode = newCh[++newStartIdx];
|
|
743
630
|
}
|
|
744
631
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
745
|
-
// likewise, if the end nodes are the same we patch new onto old and
|
|
746
|
-
// decrement our end indices, and also likewise in this case we don't
|
|
747
|
-
// need to move any DOM Nodes.
|
|
748
632
|
patch(oldEndVnode, newEndVnode);
|
|
749
633
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
750
634
|
newEndVnode = newCh[--newEndIdx];
|
|
751
635
|
}
|
|
752
636
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
753
|
-
//
|
|
754
|
-
//
|
|
755
|
-
// We've found that the last node in our window on the new children is
|
|
756
|
-
// the same VNode as the _first_ node in our window on the old children
|
|
757
|
-
// we're dealing with now. Visually, this is the layout of these two
|
|
758
|
-
// nodes:
|
|
759
|
-
//
|
|
760
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
761
|
-
// ^^^^^^^^^^^
|
|
762
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
763
|
-
// ^^^^^^^^^^^^^
|
|
764
|
-
//
|
|
765
|
-
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
766
|
-
// and move the DOM element for `oldStartVnode`.
|
|
637
|
+
// Vnode moved right
|
|
767
638
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
768
639
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
769
640
|
}
|
|
770
641
|
patch(oldStartVnode, newEndVnode);
|
|
771
|
-
// We need to move the element for `oldStartVnode` into a position which
|
|
772
|
-
// will be appropriate for `newEndVnode`. For this we can use
|
|
773
|
-
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
774
|
-
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
775
|
-
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
776
|
-
//
|
|
777
|
-
// <old-start-node />
|
|
778
|
-
// <some-intervening-node />
|
|
779
|
-
// <old-end-node />
|
|
780
|
-
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
781
|
-
// <next-sibling />
|
|
782
|
-
//
|
|
783
|
-
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
784
|
-
// the node for `oldStartVnode` at the end of the children of
|
|
785
|
-
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
786
|
-
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
787
|
-
// append it to the children of the parent element.
|
|
788
642
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
789
643
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
790
644
|
newEndVnode = newCh[--newEndIdx];
|
|
791
645
|
}
|
|
792
646
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
793
|
-
//
|
|
794
|
-
//
|
|
795
|
-
// We've found that the first node in our window on the new children is
|
|
796
|
-
// the same VNode as the _last_ node in our window on the old children.
|
|
797
|
-
// Visually, this is the layout of these two nodes:
|
|
798
|
-
//
|
|
799
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
800
|
-
// ^^^^^^^^^^^^^
|
|
801
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
802
|
-
// ^^^^^^^^^^^
|
|
803
|
-
//
|
|
804
|
-
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
805
|
-
// (which will handle updating any changed attributes, reconciling their
|
|
806
|
-
// children etc) but we also need to move the DOM node to which
|
|
807
|
-
// `oldEndVnode` corresponds.
|
|
647
|
+
// Vnode moved left
|
|
808
648
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
809
649
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
810
650
|
}
|
|
811
651
|
patch(oldEndVnode, newStartVnode);
|
|
812
|
-
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
813
|
-
// the same node, so since we're here we know that they are not. Thus we
|
|
814
|
-
// can move the element for `oldEndVnode` _before_ the element for
|
|
815
|
-
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
816
|
-
// future.
|
|
817
652
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
818
653
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
819
654
|
newStartVnode = newCh[++newStartIdx];
|
|
820
655
|
}
|
|
821
656
|
else {
|
|
822
|
-
//
|
|
823
|
-
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
824
|
-
// in the JSX for a DOM element in the implementation of a Stencil
|
|
825
|
-
// component.
|
|
826
|
-
//
|
|
827
|
-
// First we check to see if there are any nodes in the array of old
|
|
828
|
-
// children which have the same key as the first node in the new
|
|
829
|
-
// children.
|
|
657
|
+
// createKeyToOldIdx
|
|
830
658
|
idxInOld = -1;
|
|
831
659
|
{
|
|
832
660
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -837,32 +665,23 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
837
665
|
}
|
|
838
666
|
}
|
|
839
667
|
if (idxInOld >= 0) {
|
|
840
|
-
// We found a node in the old children which matches up with the first
|
|
841
|
-
// node in the new children! So let's deal with that
|
|
842
668
|
elmToMove = oldCh[idxInOld];
|
|
843
669
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
844
|
-
// the tag doesn't match so we'll need a new DOM element
|
|
845
670
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld);
|
|
846
671
|
}
|
|
847
672
|
else {
|
|
848
673
|
patch(elmToMove, newStartVnode);
|
|
849
|
-
// invalidate the matching old node so that we won't try to update it
|
|
850
|
-
// again later on
|
|
851
674
|
oldCh[idxInOld] = undefined;
|
|
852
675
|
node = elmToMove.$elm$;
|
|
853
676
|
}
|
|
854
677
|
newStartVnode = newCh[++newStartIdx];
|
|
855
678
|
}
|
|
856
679
|
else {
|
|
857
|
-
//
|
|
858
|
-
// the key of the first new child OR the build is not using `key`
|
|
859
|
-
// attributes at all. In either case we need to create a new element
|
|
860
|
-
// for the new node.
|
|
680
|
+
// new element
|
|
861
681
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx);
|
|
862
682
|
newStartVnode = newCh[++newStartIdx];
|
|
863
683
|
}
|
|
864
684
|
if (node) {
|
|
865
|
-
// if we created a new node then handle inserting it to the DOM
|
|
866
685
|
{
|
|
867
686
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
868
687
|
}
|
|
@@ -870,43 +689,21 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
870
689
|
}
|
|
871
690
|
}
|
|
872
691
|
if (oldStartIdx > oldEndIdx) {
|
|
873
|
-
// we have some more new nodes to add which don't match up with old nodes
|
|
874
692
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
875
693
|
}
|
|
876
694
|
else if (newStartIdx > newEndIdx) {
|
|
877
|
-
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
878
|
-
// in the new array, so lets remove them (which entails cleaning up the
|
|
879
|
-
// relevant DOM nodes)
|
|
880
695
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
881
696
|
}
|
|
882
697
|
};
|
|
883
|
-
|
|
884
|
-
* Compare two VNodes to determine if they are the same
|
|
885
|
-
*
|
|
886
|
-
* **NB**: This function is an equality _heuristic_ based on the available
|
|
887
|
-
* information set on the two VNodes and can be misleading under certain
|
|
888
|
-
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
889
|
-
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
890
|
-
* checking that they have the same tag.
|
|
891
|
-
*
|
|
892
|
-
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
893
|
-
* changing order within a `children` array or something along those lines then
|
|
894
|
-
* we could obtain a false positive and then have to do needless re-rendering.
|
|
895
|
-
*
|
|
896
|
-
* @param leftVNode the first VNode to check
|
|
897
|
-
* @param rightVNode the second VNode to check
|
|
898
|
-
* @returns whether they're equal or not
|
|
899
|
-
*/
|
|
900
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
698
|
+
const isSameVnode = (vnode1, vnode2) => {
|
|
901
699
|
// compare if two vnode to see if they're "technically" the same
|
|
902
700
|
// need to have the same element tag, and same key to be the same
|
|
903
|
-
if (
|
|
904
|
-
if (
|
|
905
|
-
return
|
|
701
|
+
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
702
|
+
if (vnode1.$tag$ === 'slot') {
|
|
703
|
+
return vnode1.$name$ === vnode2.$name$;
|
|
906
704
|
}
|
|
907
|
-
// this will be set if components in the build have `key` attrs set on them
|
|
908
705
|
{
|
|
909
|
-
return
|
|
706
|
+
return vnode1.$key$ === vnode2.$key$;
|
|
910
707
|
}
|
|
911
708
|
}
|
|
912
709
|
return false;
|
|
@@ -919,14 +716,6 @@ const referenceNode = (node) => {
|
|
|
919
716
|
return (node && node['s-ol']) || node;
|
|
920
717
|
};
|
|
921
718
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
922
|
-
/**
|
|
923
|
-
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
924
|
-
* it. This function handles flushing updates to the DOM and reconciling the
|
|
925
|
-
* children of the two nodes (if any).
|
|
926
|
-
*
|
|
927
|
-
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
928
|
-
* @param newVNode a new VNode representing an updated version of the old one
|
|
929
|
-
*/
|
|
930
719
|
const patch = (oldVNode, newVNode) => {
|
|
931
720
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
932
721
|
const oldChildren = oldVNode.$children$;
|
|
@@ -935,6 +724,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
935
724
|
const text = newVNode.$text$;
|
|
936
725
|
let defaultHolder;
|
|
937
726
|
if (text === null) {
|
|
727
|
+
// element node
|
|
938
728
|
{
|
|
939
729
|
if (tag === 'slot')
|
|
940
730
|
;
|
|
@@ -947,7 +737,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
947
737
|
}
|
|
948
738
|
if (oldChildren !== null && newChildren !== null) {
|
|
949
739
|
// looks like there's child vnodes for both the old and new vnodes
|
|
950
|
-
// so we need to call `updateChildren` to reconcile them
|
|
951
740
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
952
741
|
}
|
|
953
742
|
else if (newChildren !== null) {
|
|
@@ -976,7 +765,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
976
765
|
};
|
|
977
766
|
const updateFallbackSlotVisibility = (elm) => {
|
|
978
767
|
// tslint:disable-next-line: prefer-const
|
|
979
|
-
|
|
768
|
+
let childNodes = elm.childNodes;
|
|
980
769
|
let childNode;
|
|
981
770
|
let i;
|
|
982
771
|
let ilen;
|
|
@@ -985,7 +774,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
985
774
|
let nodeType;
|
|
986
775
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
987
776
|
childNode = childNodes[i];
|
|
988
|
-
if (childNode.nodeType === 1 /*
|
|
777
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
989
778
|
if (childNode['s-sr']) {
|
|
990
779
|
// this is a slot fallback node
|
|
991
780
|
// get the slot name for this slot reference node
|
|
@@ -997,7 +786,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
997
786
|
nodeType = childNodes[j].nodeType;
|
|
998
787
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
999
788
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
1000
|
-
if (nodeType === 1 /*
|
|
789
|
+
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1001
790
|
childNode.hidden = true;
|
|
1002
791
|
break;
|
|
1003
792
|
}
|
|
@@ -1006,8 +795,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1006
795
|
// this is a default fallback slot node
|
|
1007
796
|
// any element or text node (with content)
|
|
1008
797
|
// should hide the default fallback slot node
|
|
1009
|
-
if (nodeType === 1 /*
|
|
1010
|
-
(nodeType === 3 /*
|
|
798
|
+
if (nodeType === 1 /* ElementNode */ ||
|
|
799
|
+
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1011
800
|
childNode.hidden = true;
|
|
1012
801
|
break;
|
|
1013
802
|
}
|
|
@@ -1029,8 +818,8 @@ const relocateSlotContent = (elm) => {
|
|
|
1029
818
|
let relocateNodeData;
|
|
1030
819
|
let j;
|
|
1031
820
|
let i = 0;
|
|
1032
|
-
|
|
1033
|
-
|
|
821
|
+
let childNodes = elm.childNodes;
|
|
822
|
+
let ilen = childNodes.length;
|
|
1034
823
|
for (; i < ilen; i++) {
|
|
1035
824
|
childNode = childNodes[i];
|
|
1036
825
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -1085,13 +874,13 @@ const relocateSlotContent = (elm) => {
|
|
|
1085
874
|
}
|
|
1086
875
|
}
|
|
1087
876
|
}
|
|
1088
|
-
if (childNode.nodeType === 1 /*
|
|
877
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1089
878
|
relocateSlotContent(childNode);
|
|
1090
879
|
}
|
|
1091
880
|
}
|
|
1092
881
|
};
|
|
1093
882
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
1094
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
883
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1095
884
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
1096
885
|
return true;
|
|
1097
886
|
}
|
|
@@ -1117,17 +906,13 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1117
906
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1118
907
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1119
908
|
hostTagName = hostElm.tagName;
|
|
1120
|
-
if (cmpMeta.$attrsToReflect$) {
|
|
1121
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1122
|
-
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1123
|
-
}
|
|
1124
909
|
rootVnode.$tag$ = null;
|
|
1125
|
-
rootVnode.$flags$ |= 4 /*
|
|
910
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1126
911
|
hostRef.$vnode$ = rootVnode;
|
|
1127
912
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm);
|
|
1128
913
|
{
|
|
1129
914
|
contentRef = hostElm['s-cr'];
|
|
1130
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /*
|
|
915
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1131
916
|
// always reset
|
|
1132
917
|
checkSlotFallbackVisibility = false;
|
|
1133
918
|
}
|
|
@@ -1136,7 +921,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1136
921
|
{
|
|
1137
922
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1138
923
|
// the disconnectCallback from working
|
|
1139
|
-
plt.$flags$ |= 1 /*
|
|
924
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1140
925
|
if (checkSlotRelocate) {
|
|
1141
926
|
relocateSlotContent(rootVnode.$elm$);
|
|
1142
927
|
let relocateData;
|
|
@@ -1194,7 +979,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1194
979
|
}
|
|
1195
980
|
else {
|
|
1196
981
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1197
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
982
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1198
983
|
nodeToRelocate.hidden = true;
|
|
1199
984
|
}
|
|
1200
985
|
}
|
|
@@ -1205,11 +990,37 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1205
990
|
}
|
|
1206
991
|
// done moving nodes around
|
|
1207
992
|
// allow the disconnect callback to work again
|
|
1208
|
-
plt.$flags$ &= ~1 /*
|
|
993
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1209
994
|
// always reset
|
|
1210
995
|
relocateNodes.length = 0;
|
|
1211
996
|
}
|
|
1212
997
|
};
|
|
998
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
999
|
+
const createEvent = (ref, name, flags) => {
|
|
1000
|
+
const elm = getElement(ref);
|
|
1001
|
+
return {
|
|
1002
|
+
emit: (detail) => {
|
|
1003
|
+
return emitEvent(elm, name, {
|
|
1004
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1005
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1006
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1007
|
+
detail,
|
|
1008
|
+
});
|
|
1009
|
+
},
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
/**
|
|
1013
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1014
|
+
* @param elm the target of the Event
|
|
1015
|
+
* @param name the name to give the custom Event
|
|
1016
|
+
* @param opts options for configuring a custom Event
|
|
1017
|
+
* @returns the custom Event
|
|
1018
|
+
*/
|
|
1019
|
+
const emitEvent = (elm, name, opts) => {
|
|
1020
|
+
const ev = plt.ce(name, opts);
|
|
1021
|
+
elm.dispatchEvent(ev);
|
|
1022
|
+
return ev;
|
|
1023
|
+
};
|
|
1213
1024
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1214
1025
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1215
1026
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1217,10 +1028,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1217
1028
|
};
|
|
1218
1029
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1219
1030
|
{
|
|
1220
|
-
hostRef.$flags$ |= 16 /*
|
|
1031
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1221
1032
|
}
|
|
1222
|
-
if (hostRef.$flags$ & 4 /*
|
|
1223
|
-
hostRef.$flags$ |= 512 /*
|
|
1033
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1034
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1224
1035
|
return;
|
|
1225
1036
|
}
|
|
1226
1037
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1236,7 +1047,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1236
1047
|
let promise;
|
|
1237
1048
|
if (isInitialLoad) {
|
|
1238
1049
|
{
|
|
1239
|
-
hostRef.$flags$ |= 256 /*
|
|
1050
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1240
1051
|
if (hostRef.$queuedListeners$) {
|
|
1241
1052
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1242
1053
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1284,7 +1095,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1284
1095
|
}
|
|
1285
1096
|
else {
|
|
1286
1097
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1287
|
-
hostRef.$flags$ |= 4 /*
|
|
1098
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1288
1099
|
childrenPromises.length = 0;
|
|
1289
1100
|
}
|
|
1290
1101
|
}
|
|
@@ -1293,10 +1104,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1293
1104
|
try {
|
|
1294
1105
|
instance = instance.render() ;
|
|
1295
1106
|
{
|
|
1296
|
-
hostRef.$flags$ &= ~16 /*
|
|
1107
|
+
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1297
1108
|
}
|
|
1298
1109
|
{
|
|
1299
|
-
hostRef.$flags$ |= 2 /*
|
|
1110
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1300
1111
|
}
|
|
1301
1112
|
{
|
|
1302
1113
|
{
|
|
@@ -1323,8 +1134,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1323
1134
|
{
|
|
1324
1135
|
safeCall(instance, 'componentDidRender');
|
|
1325
1136
|
}
|
|
1326
|
-
if (!(hostRef.$flags$ & 64 /*
|
|
1327
|
-
hostRef.$flags$ |= 64 /*
|
|
1137
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1138
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1328
1139
|
{
|
|
1329
1140
|
// DOM WRITE!
|
|
1330
1141
|
addHydratedFlag(elm);
|
|
@@ -1356,10 +1167,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1356
1167
|
hostRef.$onRenderResolve$();
|
|
1357
1168
|
hostRef.$onRenderResolve$ = undefined;
|
|
1358
1169
|
}
|
|
1359
|
-
if (hostRef.$flags$ & 512 /*
|
|
1170
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1360
1171
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1361
1172
|
}
|
|
1362
|
-
hostRef.$flags$ &= ~(4 /*
|
|
1173
|
+
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1363
1174
|
}
|
|
1364
1175
|
// ( •_•)
|
|
1365
1176
|
// ( •_•)>⌐■-■
|
|
@@ -1389,6 +1200,30 @@ const then = (promise, thenFn) => {
|
|
|
1389
1200
|
};
|
|
1390
1201
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1391
1202
|
;
|
|
1203
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
1204
|
+
// ensure this value is of the correct prop type
|
|
1205
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1206
|
+
if (propType & 4 /* Boolean */) {
|
|
1207
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
1208
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1209
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1210
|
+
}
|
|
1211
|
+
if (propType & 2 /* Number */) {
|
|
1212
|
+
// force it to be a number
|
|
1213
|
+
return parseFloat(propValue);
|
|
1214
|
+
}
|
|
1215
|
+
if (propType & 1 /* String */) {
|
|
1216
|
+
// could have been passed as a number or boolean
|
|
1217
|
+
// but we still want it as a string
|
|
1218
|
+
return String(propValue);
|
|
1219
|
+
}
|
|
1220
|
+
// redundant return here for better minification
|
|
1221
|
+
return propValue;
|
|
1222
|
+
}
|
|
1223
|
+
// not sure exactly what type we want
|
|
1224
|
+
// so no need to change to a different type
|
|
1225
|
+
return propValue;
|
|
1226
|
+
};
|
|
1392
1227
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1393
1228
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1394
1229
|
// check our new property value against our internal value
|
|
@@ -1398,16 +1233,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1398
1233
|
const flags = hostRef.$flags$;
|
|
1399
1234
|
const instance = hostRef.$lazyInstance$ ;
|
|
1400
1235
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1401
|
-
|
|
1402
|
-
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1403
|
-
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1404
|
-
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1236
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
|
|
1405
1237
|
// gadzooks! the property's value has changed!!
|
|
1406
1238
|
// set our new value!
|
|
1407
1239
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1408
1240
|
if (instance) {
|
|
1409
1241
|
// get an array of method names of watch functions to call
|
|
1410
|
-
if (cmpMeta.$watchers$ && flags & 128 /*
|
|
1242
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1411
1243
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1412
1244
|
if (watchMethods) {
|
|
1413
1245
|
// this instance is watching for when this property changed
|
|
@@ -1422,7 +1254,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1422
1254
|
});
|
|
1423
1255
|
}
|
|
1424
1256
|
}
|
|
1425
|
-
if ((flags & (2 /*
|
|
1257
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1426
1258
|
// looks like this value actually changed, so we've got work to do!
|
|
1427
1259
|
// but only if we've already rendered, otherwise just chill out
|
|
1428
1260
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1432,16 +1264,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1432
1264
|
}
|
|
1433
1265
|
}
|
|
1434
1266
|
};
|
|
1435
|
-
/**
|
|
1436
|
-
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1437
|
-
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1438
|
-
* decorators, callbacks for when attributes change, and so on.
|
|
1439
|
-
*
|
|
1440
|
-
* @param Cstr the constructor for a component that we need to process
|
|
1441
|
-
* @param cmpMeta metadata collected previously about the component
|
|
1442
|
-
* @param flags a number used to store a series of bit flags
|
|
1443
|
-
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1444
|
-
*/
|
|
1445
1267
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1446
1268
|
if (cmpMeta.$members$) {
|
|
1447
1269
|
if (Cstr.watchers) {
|
|
@@ -1451,8 +1273,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1451
1273
|
const members = Object.entries(cmpMeta.$members$);
|
|
1452
1274
|
const prototype = Cstr.prototype;
|
|
1453
1275
|
members.map(([memberName, [memberFlags]]) => {
|
|
1454
|
-
if ((memberFlags & 31 /*
|
|
1455
|
-
((flags & 2 /*
|
|
1276
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1277
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1456
1278
|
// proxyComponent - prop
|
|
1457
1279
|
Object.defineProperty(prototype, memberName, {
|
|
1458
1280
|
get() {
|
|
@@ -1467,8 +1289,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1467
1289
|
enumerable: true,
|
|
1468
1290
|
});
|
|
1469
1291
|
}
|
|
1470
|
-
else if (flags & 1 /*
|
|
1471
|
-
memberFlags & 64 /*
|
|
1292
|
+
else if (flags & 1 /* isElementConstructor */ &&
|
|
1293
|
+
memberFlags & 64 /* Method */) {
|
|
1472
1294
|
// proxyComponent - method
|
|
1473
1295
|
Object.defineProperty(prototype, memberName, {
|
|
1474
1296
|
value(...args) {
|
|
@@ -1478,7 +1300,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1478
1300
|
});
|
|
1479
1301
|
}
|
|
1480
1302
|
});
|
|
1481
|
-
if ((flags & 1 /*
|
|
1303
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
1482
1304
|
const attrNameToPropName = new Map();
|
|
1483
1305
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1484
1306
|
plt.jmp(() => {
|
|
@@ -1534,13 +1356,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1534
1356
|
// create an array of attributes to observe
|
|
1535
1357
|
// and also create a map of html attribute name to js property name
|
|
1536
1358
|
Cstr.observedAttributes = members
|
|
1537
|
-
.filter(([_, m]) => m[0] & 15 /*
|
|
1359
|
+
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1538
1360
|
.map(([propName, m]) => {
|
|
1539
1361
|
const attrName = m[1] || propName;
|
|
1540
1362
|
attrNameToPropName.set(attrName, propName);
|
|
1541
|
-
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1542
|
-
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1543
|
-
}
|
|
1544
1363
|
return attrName;
|
|
1545
1364
|
});
|
|
1546
1365
|
}
|
|
@@ -1549,10 +1368,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1549
1368
|
};
|
|
1550
1369
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1551
1370
|
// initializeComponent
|
|
1552
|
-
if ((hostRef.$flags$ & 32 /*
|
|
1371
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1553
1372
|
{
|
|
1554
1373
|
// we haven't initialized this element yet
|
|
1555
|
-
hostRef.$flags$ |= 32 /*
|
|
1374
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1556
1375
|
// lazy loaded components
|
|
1557
1376
|
// request the component's implementation to be
|
|
1558
1377
|
// wired up with the host element
|
|
@@ -1570,7 +1389,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1570
1389
|
{
|
|
1571
1390
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1572
1391
|
}
|
|
1573
|
-
proxyComponent(Cstr, cmpMeta, 2 /*
|
|
1392
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1574
1393
|
Cstr.isProxied = true;
|
|
1575
1394
|
}
|
|
1576
1395
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1578,7 +1397,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1578
1397
|
// but let's keep track of when we start and stop
|
|
1579
1398
|
// so that the getters/setters don't incorrectly step on data
|
|
1580
1399
|
{
|
|
1581
|
-
hostRef.$flags$ |= 8 /*
|
|
1400
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1582
1401
|
}
|
|
1583
1402
|
// construct the lazy-loaded component implementation
|
|
1584
1403
|
// passing the hostRef is very important during
|
|
@@ -1591,10 +1410,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1591
1410
|
consoleError(e);
|
|
1592
1411
|
}
|
|
1593
1412
|
{
|
|
1594
|
-
hostRef.$flags$ &= ~8 /*
|
|
1413
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1595
1414
|
}
|
|
1596
1415
|
{
|
|
1597
|
-
hostRef.$flags$ |= 128 /*
|
|
1416
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1598
1417
|
}
|
|
1599
1418
|
endNewInstance();
|
|
1600
1419
|
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
@@ -1605,7 +1424,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1605
1424
|
const scopeId = getScopeId(cmpMeta);
|
|
1606
1425
|
if (!styles.has(scopeId)) {
|
|
1607
1426
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1608
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /*
|
|
1427
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1609
1428
|
endRegisterStyles();
|
|
1610
1429
|
}
|
|
1611
1430
|
}
|
|
@@ -1632,19 +1451,19 @@ const fireConnectedCallback = (instance) => {
|
|
|
1632
1451
|
}
|
|
1633
1452
|
};
|
|
1634
1453
|
const connectedCallback = (elm) => {
|
|
1635
|
-
if ((plt.$flags$ & 1 /*
|
|
1454
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1636
1455
|
const hostRef = getHostRef(elm);
|
|
1637
1456
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1638
1457
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1639
|
-
if (!(hostRef.$flags$ & 1 /*
|
|
1458
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1640
1459
|
// first time this component has connected
|
|
1641
|
-
hostRef.$flags$ |= 1 /*
|
|
1460
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1642
1461
|
{
|
|
1643
1462
|
// initUpdate
|
|
1644
1463
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1645
1464
|
// in here to act as original content anchors as we move nodes around
|
|
1646
1465
|
// host element has been connected to the DOM
|
|
1647
|
-
if ((cmpMeta.$flags$ & (4 /*
|
|
1466
|
+
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1648
1467
|
setContentReference(elm);
|
|
1649
1468
|
}
|
|
1650
1469
|
}
|
|
@@ -1667,7 +1486,7 @@ const connectedCallback = (elm) => {
|
|
|
1667
1486
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1668
1487
|
if (cmpMeta.$members$) {
|
|
1669
1488
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1670
|
-
if (memberFlags & 31 /*
|
|
1489
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1671
1490
|
const value = elm[memberName];
|
|
1672
1491
|
delete elm[memberName];
|
|
1673
1492
|
elm[memberName] = value;
|
|
@@ -1701,7 +1520,7 @@ const setContentReference = (elm) => {
|
|
|
1701
1520
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1702
1521
|
};
|
|
1703
1522
|
const disconnectedCallback = (elm) => {
|
|
1704
|
-
if ((plt.$flags$ & 1 /*
|
|
1523
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1705
1524
|
const hostRef = getHostRef(elm);
|
|
1706
1525
|
const instance = hostRef.$lazyInstance$ ;
|
|
1707
1526
|
{
|
|
@@ -1742,9 +1561,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1742
1561
|
{
|
|
1743
1562
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1744
1563
|
}
|
|
1745
|
-
{
|
|
1746
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
1747
|
-
}
|
|
1748
1564
|
{
|
|
1749
1565
|
cmpMeta.$watchers$ = {};
|
|
1750
1566
|
}
|
|
@@ -1780,7 +1596,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1780
1596
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1781
1597
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1782
1598
|
cmpTags.push(tagName);
|
|
1783
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /*
|
|
1599
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1784
1600
|
}
|
|
1785
1601
|
});
|
|
1786
1602
|
});
|
|
@@ -1802,41 +1618,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1802
1618
|
// Fallback appLoad event
|
|
1803
1619
|
endBootstrap();
|
|
1804
1620
|
};
|
|
1805
|
-
const
|
|
1806
|
-
if (listeners) {
|
|
1807
|
-
listeners.map(([flags, name, method]) => {
|
|
1808
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
1809
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
1810
|
-
const opts = hostListenerOpts(flags);
|
|
1811
|
-
plt.ael(target, name, handler, opts);
|
|
1812
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1813
|
-
});
|
|
1814
|
-
}
|
|
1815
|
-
};
|
|
1816
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1817
|
-
try {
|
|
1818
|
-
{
|
|
1819
|
-
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1820
|
-
// instance is ready, let's call it's member method for this event
|
|
1821
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
1822
|
-
}
|
|
1823
|
-
else {
|
|
1824
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
catch (e) {
|
|
1829
|
-
consoleError(e);
|
|
1830
|
-
}
|
|
1831
|
-
};
|
|
1832
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
1833
|
-
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
1834
|
-
return doc;
|
|
1835
|
-
return elm;
|
|
1836
|
-
};
|
|
1837
|
-
// prettier-ignore
|
|
1838
|
-
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1839
|
-
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1621
|
+
const hostRefs = new WeakMap();
|
|
1840
1622
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1841
1623
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1842
1624
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1868,9 +1650,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1868
1650
|
if (module) {
|
|
1869
1651
|
return module[exportName];
|
|
1870
1652
|
}
|
|
1871
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
1872
1653
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1873
|
-
/* @vite-ignore */
|
|
1874
1654
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1875
1655
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1876
1656
|
/* webpackMode: "lazy" */
|
|
@@ -1881,35 +1661,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1881
1661
|
return importedModule[exportName];
|
|
1882
1662
|
}, consoleError);
|
|
1883
1663
|
};
|
|
1884
|
-
const styles =
|
|
1885
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
1886
|
-
const doc = win.document || { head: {} };
|
|
1887
|
-
const plt = {
|
|
1888
|
-
$flags$: 0,
|
|
1889
|
-
$resourcesUrl$: '',
|
|
1890
|
-
jmp: (h) => h(),
|
|
1891
|
-
raf: (h) => requestAnimationFrame(h),
|
|
1892
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1893
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1894
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
1895
|
-
};
|
|
1896
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
1897
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
1898
|
-
try {
|
|
1899
|
-
new CSSStyleSheet();
|
|
1900
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
1901
|
-
}
|
|
1902
|
-
catch (e) { }
|
|
1903
|
-
return false;
|
|
1904
|
-
})()
|
|
1905
|
-
;
|
|
1664
|
+
const styles = new Map();
|
|
1906
1665
|
const queueDomReads = [];
|
|
1907
1666
|
const queueDomWrites = [];
|
|
1908
1667
|
const queueTask = (queue, write) => (cb) => {
|
|
1909
1668
|
queue.push(cb);
|
|
1910
1669
|
if (!queuePending) {
|
|
1911
1670
|
queuePending = true;
|
|
1912
|
-
if (write && plt.$flags$ & 4 /*
|
|
1671
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
1913
1672
|
nextTick(flush);
|
|
1914
1673
|
}
|
|
1915
1674
|
else {
|
|
@@ -1953,5 +1712,3 @@ exports.getElement = getElement;
|
|
|
1953
1712
|
exports.h = h;
|
|
1954
1713
|
exports.promiseResolve = promiseResolve;
|
|
1955
1714
|
exports.registerInstance = registerInstance;
|
|
1956
|
-
|
|
1957
|
-
//# sourceMappingURL=index-9174e0b1.js.map
|